Table of Contents

Class SyncIntegrationManager

Namespace
ZeroInstall.DesktopIntegration
Assembly
ZeroInstall.DesktopIntegration.dll

Synchronizes the AppList with other computers.

public class SyncIntegrationManager : IntegrationManager, IDisposable, IIntegrationManager
Inheritance
SyncIntegrationManager
Implements
Inherited Members

Remarks

To prevent race-conditions there may only be one desktop integration class instance active at any given time. This class acquires a mutex upon calling its constructor and releases it upon calling Dispose().

Constructors

SyncIntegrationManager(Config, Converter<FeedUri, Feed>, ITaskHandler, bool)

Creates a new sync manager. Performs Mutex-based locking!

public SyncIntegrationManager(Config config, Converter<FeedUri, Feed> feedRetriever, ITaskHandler handler, bool machineWide = false)

Parameters

config Config

Configuration for communicating with a sync server.

feedRetriever Converter<FeedUri, Feed>

Callback method used to retrieve additional Feeds on demand.

handler ITaskHandler

A callback object used when the the user is to be informed about the progress of long-running operations such as downloads.

machineWide bool

Apply operations machine-wide instead of just for the current user.

Exceptions

IOException

A problem occurred while accessing the AppList file.

UnauthorizedAccessException

Read or write access to the AppList file is not permitted or another desktop integration class is currently active.

InvalidDataException

A problem occurred while deserializing an XML file.

Fields

AppListLastSyncSuffix

The suffix added to the AppList path to store a copy of the state at the last sync point.

public const string AppListLastSyncSuffix = ".last-sync"

Field Value

string

Methods

Dispose()

Releases the mutex.

public override void Dispose()

Sync(SyncResetMode)

Synchronize the AppList with the sync server and (un)apply AccessPoints accordingly.

public void Sync(SyncResetMode resetMode = SyncResetMode.None)

Parameters

resetMode SyncResetMode

Controls how synchronization data is reset.

Exceptions

OperationCanceledException

The user canceled the task.

InvalidDataException

A problem occurred while deserializing an XML file or the specified crypto key was wrong.

KeyNotFoundException

An AccessPoint reference to a Capability is invalid.

ConflictException

One or more new AccessPoint would cause a conflict with the existing AccessPoints in AppList.

WebException

A problem occurred while communicating with the sync server or while downloading additional data (such as icons).

IOException

A problem occurs while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.