Class SyncIntegrationManager
Synchronizes the AppList with other computers.
Inherited Members
Namespace: ZeroInstall.DesktopIntegration
Assembly: ZeroInstall.DesktopIntegration.dll
Syntax
public class SyncIntegrationManager : IntegrationManager, IIntegrationManager
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, Boolean)
Creates a new sync manager. Performs Mutex-based locking!
Declaration
public SyncIntegrationManager(Config config, Converter<FeedUri, Feed> feedRetriever, ITaskHandler handler, bool machineWide = false)
Parameters
Type | Name | Description |
---|---|---|
Config | config | Configuration for communicating with a sync server. |
Converter<FeedUri, Feed> | feedRetriever | Callback method used to retrieve additional Feeds on demand. |
ITaskHandler | handler | A callback object used when the the user is to be informed about the progress of long-running operations such as downloads. |
Boolean | machineWide | Apply operations machine-wide instead of just for the current user. |
Exceptions
Type | Condition |
---|---|
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.
Declaration
public const string AppListLastSyncSuffix = ".last-sync"
Field Value
Type | Description |
---|---|
String |
Methods
Sync(SyncResetMode)
Synchronize the AppList with the sync server and (un)apply AccessPoints accordingly.
Declaration
public void Sync(SyncResetMode resetMode)
Parameters
Type | Name | Description |
---|---|---|
SyncResetMode | resetMode | Controls how synchronization data is reset. |
Exceptions
Type | Condition |
---|---|
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. |