Buteo Synchronization Framework
|
Defines a D-Bus interface for the sync daemon. More...
#include <SyncDBusInterface.h>
Public Slots | |
virtual bool | startSync (QString aProfileId)=0 |
Requests to starts synchronizing using a profile with the given name. More... | |
virtual Q_NOREPLY void | abortSync (QString aProfileId)=0 |
Stops synchronizing the profile with the given name. More... | |
virtual bool | removeProfile (QString aProfileId)=0 |
This function should be called when sync profile has to be deleted. More... | |
virtual bool | updateProfile (QString aProfileAsXml)=0 |
This function should be called when sync profile information has been changed by someone else than the sync daemon. More... | |
virtual bool | requestStorages (QStringList aStorageNames)=0 |
Requests sync daemon to reserve storages for the caller. More... | |
virtual Q_NOREPLY void | releaseStorages (QStringList aStorageNames)=0 |
Releases the given storages so that sync daemon can again use them freely. More... | |
virtual QStringList | runningSyncs ()=0 |
Gets the list of profile names of currently running syncs. More... | |
virtual bool | getBackUpRestoreState ()=0 |
This function returns true if backup/restore in progress else false. | |
virtual bool | setSyncSchedule (QString aProfileId, QString aScheduleAsXml)=0 |
sets the schedule for a profile More... | |
virtual bool | saveSyncResults (QString aProfileId, QString aSyncResults)=0 |
Save SyncResults to log.xml file. More... | |
virtual QString | getLastSyncResult (const QString &aProfileId)=0 |
To get lastSyncResult. More... | |
virtual QStringList | allVisibleSyncProfiles ()=0 |
Gets all visible sync profiles. More... | |
virtual QString | syncProfile (const QString &aProfileId)=0 |
Gets a sync profile. More... | |
virtual QStringList | syncProfilesByKey (const QString &aKey, const QString &aValue)=0 |
Gets a sync profiles matching the key-value. More... | |
virtual QStringList | syncProfilesByType (const QString &aType)=0 |
Gets a profiles matching the profile type. More... | |
virtual Q_NOREPLY void | start (unsigned int aAccountId)=0 |
Starts sync for all profiles matching the given account ID. More... | |
virtual Q_NOREPLY void | stop (unsigned int aAccountId)=0 |
Stops sync for all profiles matching the given account ID. More... | |
virtual QList< unsigned int > | syncingAccounts ()=0 |
Returns the list of account IDs for which sync is ongoing. More... | |
virtual int | status (unsigned int aAccountId, int &aFailedReason, qlonglong &aPrevSyncTime, qlonglong &aNextSyncTime)=0 |
Returns the status of the sync for the given account Id. More... | |
virtual Q_NOREPLY void | isSyncedExternally (unsigned int aAccountId, const QString aClientProfileName)=0 |
Queries the sync externally status of a given account, 'syncedExternallyStatus' signal is emitted with the reply is ready, clients should listen to the later. More... | |
virtual QString | createSyncProfileForAccount (uint aAccountId)=0 |
Create a sync profile for the account if it does not exists. More... | |
virtual bool | startSync (QString aProfileId)=0 |
Requests to starts synchronizing using a profile with the given name. More... | |
virtual Q_NOREPLY void | abortSync (QString aProfileId)=0 |
Stops synchronizing the profile with the given name. More... | |
virtual bool | removeProfile (QString aProfileId)=0 |
This function should be called when sync profile has to be deleted. More... | |
virtual bool | updateProfile (QString aProfileAsXml)=0 |
This function should be called when sync profile information has been changed by someone else than the sync daemon. More... | |
virtual bool | requestStorages (QStringList aStorageNames)=0 |
Requests sync daemon to reserve storages for the caller. More... | |
virtual Q_NOREPLY void | releaseStorages (QStringList aStorageNames)=0 |
Releases the given storages so that sync daemon can again use them freely. More... | |
virtual QStringList | runningSyncs ()=0 |
Gets the list of profile names of currently running syncs. More... | |
virtual bool | getBackUpRestoreState ()=0 |
This function returns true if backup/restore in progress else false. | |
virtual bool | setSyncSchedule (QString aProfileId, QString aScheduleAsXml)=0 |
sets the schedule for a profile More... | |
virtual bool | saveSyncResults (QString aProfileId, QString aSyncResults)=0 |
Save SyncResults to log.xml file. More... | |
virtual QString | getLastSyncResult (const QString &aProfileId)=0 |
To get lastSyncResult. More... | |
virtual QStringList | allVisibleSyncProfiles ()=0 |
Gets all visible sync profiles. More... | |
virtual QString | syncProfile (const QString &aProfileId)=0 |
Gets a sync profile. More... | |
virtual QStringList | syncProfilesByKey (const QString &aKey, const QString &aValue)=0 |
Gets a sync profiles matching the key-value. More... | |
virtual QStringList | syncProfilesByType (const QString &aType)=0 |
Gets a profiles matching the profile type. More... | |
virtual Q_NOREPLY void | start (unsigned int aAccountId)=0 |
Starts sync for all profiles matching the given account ID. More... | |
virtual Q_NOREPLY void | stop (unsigned int aAccountId)=0 |
Stops sync for all profiles matching the given account ID. More... | |
virtual QList< unsigned int > | syncingAccounts ()=0 |
Returns the list of account IDs for which sync is ongoing. More... | |
virtual int | status (unsigned int aAccountId, int &aFailedReason, qlonglong &aPrevSyncTime, qlonglong &aNextSyncTime)=0 |
Returns the status of the sync for the given account Id. More... | |
Signals | |
void | syncStatus (QString aProfileName, int aStatus, QString aMessage, int aMoreDetails) |
Notifies about a change in synchronization status. More... | |
void | transferProgress (QString aProfileName, int aTransferDatabase, int aTransferType, QString aMimeType, int aCommittedItems) |
Notifies about progress in transferring items. More... | |
void | signalProfileChanged (QString aProfileName, int aChangeType, QString aProfileAsXml) |
Notifies about a change in profile. More... | |
void | backupInProgress () |
Notifies about Backup start. More... | |
void | backupDone () |
Notifies about Backup done. More... | |
void | restoreInProgress () |
Notifies about Restore start. More... | |
void | restoreDone () |
Notifies about Restore Done. More... | |
void | resultsAvailable (QString aProfileName, QString aResultsAsXml) |
Notifies about the availability of Results for a recent sync. More... | |
void | statusChanged (unsigned int aAccountId, int aNewStatus, int aFailedReason, qlonglong aPrevSyncTime, qlonglong aNextSyncTime) |
Notifies sync status change for a set of account Ids. More... | |
bool | isConnectivityAvailable (int connectivityType) |
Returns the connectivity state of a specific medium like bluetooth, USB or network. More... | |
void | syncedExternallyStatus (uint aAccountId, const QString &aClientProfileName, bool aState) |
Notifies sync externally status for an account and client profile. More... | |
void | syncStatus (QString aProfileName, int aStatus, QString aMessage, int aMoreDetails) |
Notifies about a change in synchronization status. More... | |
void | transferProgress (QString aProfileName, int aTransferDatabase, int aTransferType, QString aMimeType, int aCommittedItems) |
Notifies about progress in transferring items. More... | |
void | signalProfileChanged (QString aProfileName, int aChangeType, QString aProfileAsXml) |
Notifies about a change in profile. More... | |
void | backupInProgress () |
Notifies about Backup start. More... | |
void | backupDone () |
Notifies about Backup done. More... | |
void | restoreInProgress () |
Notifies about Restore start. More... | |
void | restoreDone () |
Notifies about Restore Done. More... | |
void | resultsAvailable (QString aProfileName, QString aResultsAsXml) |
Notifies about the availability of Results for a recent sync. More... | |
void | statusChanged (unsigned int aAccountId, int aNewStatus, int aFailedReason, qlonglong aPrevSyncTime, qlonglong aNextSyncTime) |
Notifies sync status change for a set of account Ids. More... | |
Defines a D-Bus interface for the sync daemon.
A XML file describing the interface can be generated from this class using qdbuscpp2xml tool. This XML file can then be used to generate interface adaptor and proxy classes using qdbusxml2cpp tool.
|
pure virtualslot |
Stops synchronizing the profile with the given name.
If the sync request is still in queue and not yet started, the queue entry is removed.
aProfileId | Name of the profile to stop syncing. |
|
pure virtualslot |
Stops synchronizing the profile with the given name.
If the sync request is still in queue and not yet started, the queue entry is removed.
aProfileId | Name of the profile to stop syncing. |
|
pure virtualslot |
Gets all visible sync profiles.
Returns all sync profiles that should be visible in sync ui. A profile is visible if it has not been explicitly set as hidden.
|
pure virtualslot |
Gets all visible sync profiles.
Returns all sync profiles that should be visible in sync ui. A profile is visible if it has not been explicitly set as hidden.
|
signal |
Notifies about Backup done.
This signal is sent when the backup framework has completed backing the sync related data.
|
signal |
Notifies about Backup done.
This signal is sent when the backup framework has completed backing the sync related data.
|
signal |
Notifies about Backup start.
This signal is sent when the backup framework is backing the sync related data
|
signal |
Notifies about Backup start.
This signal is sent when the backup framework is backing the sync related data
|
pure virtualslot |
Create a sync profile for the account if it does not exists.
aAccountId | The account ID. |
|
pure virtualslot |
To get lastSyncResult.
aProfileId |
|
pure virtualslot |
To get lastSyncResult.
aProfileId |
|
signal |
Returns the connectivity state of a specific medium like bluetooth, USB or network.
|
pure virtualslot |
Queries the sync externally status of a given account, 'syncedExternallyStatus' signal is emitted with the reply is ready, clients should listen to the later.
aAccountId | The account ID. |
aClientProfileName | The name of the client profile resposible for the sync, this is used to distinguish accounts having several services enabled |
|
pure virtualslot |
Releases the given storages so that sync daemon can again use them freely.
This function must be called after a successful requestStorages call, when the reserved storages are not used by the caller any more.
|
pure virtualslot |
Releases the given storages so that sync daemon can again use them freely.
This function must be called after a successful requestStorages call, when the reserved storages are not used by the caller any more.
|
pure virtualslot |
This function should be called when sync profile has to be deleted.
aProfileId | Id of the profile to be deleted. |
|
pure virtualslot |
This function should be called when sync profile has to be deleted.
aProfileId | Id of the profile to be deleted. |
|
pure virtualslot |
Requests sync daemon to reserve storages for the caller.
This function must be called if an external sync entity (like Active Sync engine) wants to use the same storages that the sync daemon uses, because concurrent access might lead to data corruption. If none of the requested storages is currently used by the sync daemon, they are all marked as reserved and can not be used by the daemon until the storages are freed by calling releaseStorages. If one or more of the requested storages is already in use, none of them is reserved.
aStorageNames | Names of the storages to reserve. |
|
pure virtualslot |
Requests sync daemon to reserve storages for the caller.
This function must be called if an external sync entity (like Active Sync engine) wants to use the same storages that the sync daemon uses, because concurrent access might lead to data corruption. If none of the requested storages is currently used by the sync daemon, they are all marked as reserved and can not be used by the daemon until the storages are freed by calling releaseStorages. If one or more of the requested storages is already in use, none of them is reserved.
aStorageNames | Names of the storages to reserve. |
|
signal |
Notifies about Restore Done.
This signal is sent when the backup framework has restored the sync related data
|
signal |
Notifies about Restore Done.
This signal is sent when the backup framework has restored the sync related data
|
signal |
Notifies about Restore start.
This signal is sent when the backup framework is restoring the sync related data
|
signal |
Notifies about Restore start.
This signal is sent when the backup framework is restoring the sync related data
|
signal |
Notifies about the availability of Results for a recent sync.
This signal is sent when the results are available for the last sync only recent results ( SyncResults object) are sent as xml.
aProfileName | Name of the profile for which results are available |
aResultsAsXml | results as an xml object |
|
signal |
Notifies about the availability of Results for a recent sync.
This signal is sent when the results are available for the last sync only recent results ( SyncResults object) are sent as xml.
aProfileName | Name of the profile for which results are available |
aResultsAsXml | results as an xml object |
|
pure virtualslot |
Gets the list of profile names of currently running syncs.
|
pure virtualslot |
Gets the list of profile names of currently running syncs.
|
pure virtualslot |
Save SyncResults to log.xml file.
aProfileId | to save result in corresponding file. |
aSyncResults | to save in the <profileId>.log.xml.
|
|
pure virtualslot |
Save SyncResults to log.xml file.
aProfileId | to save result in corresponding file. |
aSyncResults | to save in the <profileId>.log.xml.
|
|
pure virtualslot |
sets the schedule for a profile
This Function helps in setting a schedule to profile this Function is to be used by the SyncInterface Client Library to expose a user friendly API by abstracting the dbus mechanisms involved with synchronizer
aProfileId | - Id of the profile for which schedule has to be set |
aScheduleAsXml | - Over the dbus the schedule object is transmitted as xml |
|
pure virtualslot |
sets the schedule for a profile
This Function helps in setting a schedule to profile this Function is to be used by the SyncInterface Client Library to expose a user friendly API by abstracting the dbus mechanisms involved with synchronizer
aProfileId | - Id of the profile for which schedule has to be set |
aScheduleAsXml | - Over the dbus the schedule object is transmitted as xml |
|
signal |
Notifies about a change in profile.
This signal is sent when the profile data is modified or when a profile is added or deleted in msyncd.
|
signal |
Notifies about a change in profile.
This signal is sent when the profile data is modified or when a profile is added or deleted in msyncd.
|
pure virtualslot |
Starts sync for all profiles matching the given account ID.
aAccountId | The account ID. |
|
pure virtualslot |
Starts sync for all profiles matching the given account ID.
aAccountId | The account ID. |
|
pure virtualslot |
Requests to starts synchronizing using a profile with the given name.
A status change signal (QUEUED, STARTED or ERROR) will be sent by the daemon when the request is processed. If there is a sync already in progress using the same resources that are needed by the given profile, adds the sync request to a sync queue. Otherwise a sync session is started immediately.
aProfileId | Id of the profile to use in sync. |
|
pure virtualslot |
Requests to starts synchronizing using a profile with the given name.
A status change signal (QUEUED, STARTED or ERROR) will be sent by the daemon when the request is processed. If there is a sync already in progress using the same resources that are needed by the given profile, adds the sync request to a sync queue. Otherwise a sync session is started immediately.
aProfileId | Id of the profile to use in sync. |
|
pure virtualslot |
Returns the status of the sync for the given account Id.
aAccountId | The account ID. |
aFailedReason | This is an out parameter. In case the last sync has failed, this will contain the code indicating the failure reason (TODO: Define error codes). In case the last sync has not failed, this must be ignored |
aPrevSyncTime | This is an out parameter. The previous sync time. Invalid time is returned if there was no last sync. |
aNextSyncTime | This is an out parameter. The next sync time. |
|
pure virtualslot |
Returns the status of the sync for the given account Id.
aAccountId | The account ID. |
aFailedReason | This is an out parameter. In case the last sync has failed, this will contain the code indicating the failure reason (TODO: Define error codes). In case the last sync has not failed, this must be ignored |
aPrevSyncTime | This is an out parameter. The previous sync time. Invalid time is returned if there was no last sync. |
aNextSyncTime | This is an out parameter. The next sync time. |
|
signal |
Notifies sync status change for a set of account Ids.
This signal is sent when the status of a sync for a particular account ID changes state Upon receiving this signal, the client is expected to call the status method to check whether sync is running/stopped for this account ID
aAccountId | The account IDs that changed state |
aNewStatus | The new status of sync for this account |
aFailedReason | This is an out parameter. In case the last sync has failed, this will contain the code indicating the failure reason (TODO: Define error codes). In case the last sync has not failed, this must be ignored |
aPrevSyncTime | This is an out parameter. The previous sync time. Invalid time is returned if there was no last sync. |
aNextSyncTime | This is an out parameter. The next sync time. |
|
signal |
Notifies sync status change for a set of account Ids.
This signal is sent when the status of a sync for a particular account ID changes state Upon receiving this signal, the client is expected to call the status method to check whether sync is running/stopped for this account ID
aAccountId | The account IDs that changed state |
aNewStatus | The new status of sync for this account |
aFailedReason | This is an out parameter. In case the last sync has failed, this will contain the code indicating the failure reason (TODO: Define error codes). In case the last sync has not failed, this must be ignored |
aPrevSyncTime | This is an out parameter. The previous sync time. Invalid time is returned if there was no last sync. |
aNextSyncTime | This is an out parameter. The next sync time. |
|
pure virtualslot |
Stops sync for all profiles matching the given account ID.
aAccountId | The account ID. |
|
pure virtualslot |
Stops sync for all profiles matching the given account ID.
aAccountId | The account ID. |
|
signal |
Notifies sync externally status for an account and client profile.
This signal is sent when the sync externally status of a particular account changes or a client queries for the state via 'isSyncedExternally'
aAccountId | The account IDs that changed state/was queried the state |
aClientProfileName | The name of the client profile resposible for the sync. |
aState | The current status of sync externally(on/off). |
|
pure virtualslot |
Returns the list of account IDs for which sync is ongoing.
|
pure virtualslot |
Returns the list of account IDs for which sync is ongoing.
|
pure virtualslot |
Gets a sync profile.
Loads and merges also all sub-profiles that are referenced from the main profile. Loads the log of finished synchronization sessions with this profile.
aProfileId | Name of the profile to get. |
|
pure virtualslot |
Gets a sync profile.
Loads and merges also all sub-profiles that are referenced from the main profile. Loads the log of finished synchronization sessions with this profile.
aProfileId | Name of the profile to get. |
|
pure virtualslot |
Gets a sync profiles matching the key-value.
Loads and merges also all sub-profiles that are referenced from the main profile. Loads the log of finished synchronization sessions with this profile.
aKey | Key to match for profile. |
aValue | Value to match for profile. |
|
pure virtualslot |
Gets a sync profiles matching the key-value.
Loads and merges also all sub-profiles that are referenced from the main profile. Loads the log of finished synchronization sessions with this profile.
aKey | Key to match for profile. |
aValue | Value to match for profile. |
|
pure virtualslot |
Gets a profiles matching the profile type.
aType | Type of the profile service/storage/sync. |
|
pure virtualslot |
Gets a profiles matching the profile type.
aType | Type of the profile service/storage/sync. |
|
signal |
Notifies about a change in synchronization status.
aProfileName | Name of the profile used in the sync session whose status has changed. |
aStatus | The new status. One of the following: 0 (QUEUED): Sync request has been queued or was already in the queue when sync start was requested. 1 (STARTED): Sync session has been started. 2 (PROGRESS): Sync session is progressing. 3 (ERROR): Sync session has encountered an error and has been stopped, or the session could not be started at all. 4 (DONE): Sync session was successfully completed. 5 (ABORTED): Sync session was aborted. Statuses 3-5 are final, no more status changes will be sent from the same sync session. |
aMessage | A message describing the status change in detail. This can for example be shown to the user or written to a log |
aMoreDetails | When aStatus is ERROR, this parameter contains a specific error code. When aStatus is PROGRESS, this parameter contains more details about the progress |
|
signal |
Notifies about a change in synchronization status.
aProfileName | Name of the profile used in the sync session whose status has changed. |
aStatus | The new status. One of the following: 0 (QUEUED): Sync request has been queued or was already in the queue when sync start was requested. 1 (STARTED): Sync session has been started. 2 (PROGRESS): Sync session is progressing. 3 (ERROR): Sync session has encountered an error and has been stopped, or the session could not be started at all. 4 (DONE): Sync session was successfully completed. 5 (ABORTED): Sync session was aborted. Statuses 3-5 are final, no more status changes will be sent from the same sync session. |
aMessage | A message describing the status change in detail. This can for example be shown to the user or written to a log |
aMoreDetails | When aStatus is ERROR, this parameter contains a specific error code. When aStatus is PROGRESS, this parameter contains more details about the progress |
|
signal |
Notifies about progress in transferring items.
aProfileName | Name of the profile where progress has occurred |
aTransferDatabase | Database to which transfer was made. One of the following: 0 (LOCAL_DATABASE): Transfer was made from remote database to local database 1 (REMOTE_DATABASE): Transfer was made from local database to remote database |
aTransferType | Type of transfer that was made. One of the following: 0 (ADDITION): Addition was made to database 1 (MODIFICATION): Modification was made to database 2 (DELETION): Deletion was made to database 3 (ERROR): Addition/Modification/Deletion was attempted, but it failed |
aMimeType | Mime type of the processed item |
aCommittedItems | No. of Items committed for this operation |
|
signal |
Notifies about progress in transferring items.
aProfileName | Name of the profile where progress has occurred |
aTransferDatabase | Database to which transfer was made. One of the following: 0 (LOCAL_DATABASE): Transfer was made from remote database to local database 1 (REMOTE_DATABASE): Transfer was made from local database to remote database |
aTransferType | Type of transfer that was made. One of the following: 0 (ADDITION): Addition was made to database 1 (MODIFICATION): Modification was made to database 2 (DELETION): Deletion was made to database 3 (ERROR): Addition/Modification/Deletion was attempted, but it failed |
aMimeType | Mime type of the processed item |
aCommittedItems | No. of Items committed for this operation |
|
pure virtualslot |
This function should be called when sync profile information has been changed by someone else than the sync daemon.
aProfileAsXml | - Modified Profile Object as XML. |
|
pure virtualslot |
This function should be called when sync profile information has been changed by someone else than the sync daemon.
aProfileAsXml | - Modified Profile Object as XML. |