Buteo Synchronization Framework: Buteo::SyncDBusInterface Class Reference

Buteo Synchronization Framework

Public Slots | Signals | List of all members
Buteo::SyncDBusInterface Class Referenceabstract

Defines a D-Bus interface for the sync daemon. More...

`#include <SyncDBusInterface.h>`

Inheritance diagram for Buteo::SyncDBusInterface:

## 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...

## Detailed Description

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.

## Member Function Documentation

## ◆ abortSync [1/2]

virtual Q_NOREPLY void Buteo::SyncDBusInterface::abortSync | ( | QString | aProfileId | ) |
| 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.

Parameters

  aProfileId | Name of the profile to stop syncing.

## ◆ abortSync [2/2]

virtual Q_NOREPLY void Buteo::SyncDBusInterface::abortSync | ( | QString | aProfileId | ) |
| 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.

Parameters

  aProfileId | Name of the profile to stop syncing.

## ◆ allVisibleSyncProfiles [1/2]

virtual QStringList Buteo::SyncDBusInterface::allVisibleSyncProfiles | ( |  | ) |
| 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.

Returns
  The list of sync profiles.

## ◆ allVisibleSyncProfiles [2/2]

virtual QStringList Buteo::SyncDBusInterface::allVisibleSyncProfiles | ( |  | ) |
| 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.

Returns
  The list of sync profiles.

## ◆ backupDone [1/2]

void Buteo::SyncDBusInterface::backupDone | ( |  | ) |
| signal

Notifies about Backup done.

This signal is sent when the backup framework has completed backing the sync related data.

## ◆ backupDone [2/2]

void Buteo::SyncDBusInterface::backupDone | ( |  | ) |
| signal

Notifies about Backup done.

This signal is sent when the backup framework has completed backing the sync related data.

## ◆ backupInProgress [1/2]

void Buteo::SyncDBusInterface::backupInProgress | ( |  | ) |
| signal

Notifies about Backup start.

This signal is sent when the backup framework is backing the sync related data

## ◆ backupInProgress [2/2]

void Buteo::SyncDBusInterface::backupInProgress | ( |  | ) |
| signal

Notifies about Backup start.

This signal is sent when the backup framework is backing the sync related data

## ◆ createSyncProfileForAccount

virtual QString Buteo::SyncDBusInterface::createSyncProfileForAccount | ( | uint | aAccountId | ) |
| pure virtualslot

Create a sync profile for the account if it does not exists.

Parameters

  aAccountId | The account ID.

Returns
  The profile name if the profile was created successful or empty if it fails

## ◆ getLastSyncResult [1/2]

virtual QString Buteo::SyncDBusInterface::getLastSyncResult | ( | const QString & | aProfileId | ) |
| pure virtualslot

To get lastSyncResult.

Parameters

  aProfileId |

Returns
  QString of syncResult.

## ◆ getLastSyncResult [2/2]

virtual QString Buteo::SyncDBusInterface::getLastSyncResult | ( | const QString & | aProfileId | ) |
| pure virtualslot

To get lastSyncResult.

Parameters

  aProfileId |

Returns
  QString of syncResult.

## ◆ isConnectivityAvailable

bool Buteo::SyncDBusInterface::isConnectivityAvailable | ( | int | connectivityType | ) |
| signal

Returns the connectivity state of a specific medium like bluetooth, USB or network.

See also
  SyncCommonDefs::ConnectivityType for arguments

## ◆ isSyncedExternally

virtual Q_NOREPLY void Buteo::SyncDBusInterface::isSyncedExternally | ( | unsigned int | aAccountId,
|  | const QString | aClientProfileName
| ) |  |
| 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.

Parameters

  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

## ◆ releaseStorages [1/2]

virtual Q_NOREPLY void Buteo::SyncDBusInterface::releaseStorages | ( | QStringList | aStorageNames | ) |
| 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.

## ◆ releaseStorages [2/2]

virtual Q_NOREPLY void Buteo::SyncDBusInterface::releaseStorages | ( | QStringList | aStorageNames | ) |
| 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.

## ◆ removeProfile [1/2]

virtual bool Buteo::SyncDBusInterface::removeProfile | ( | QString | aProfileId | ) |
| pure virtualslot

This function should be called when sync profile has to be deleted.

Parameters

  aProfileId | Id of the profile to be deleted.

Returns
  status of the remove operation

## ◆ removeProfile [2/2]

virtual bool Buteo::SyncDBusInterface::removeProfile | ( | QString | aProfileId | ) |
| pure virtualslot

This function should be called when sync profile has to be deleted.

Parameters

  aProfileId | Id of the profile to be deleted.

Returns
  status of the remove operation

## ◆ requestStorages [1/2]

virtual bool Buteo::SyncDBusInterface::requestStorages | ( | QStringList | aStorageNames | ) |
| 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.

Parameters

  aStorageNames | Names of the storages to reserve.

Returns
  Success indicator. True if all requested storages were successfully reserved. False if request failed and no storages were reserved.

## ◆ requestStorages [2/2]

virtual bool Buteo::SyncDBusInterface::requestStorages | ( | QStringList | aStorageNames | ) |
| 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.

Parameters

  aStorageNames | Names of the storages to reserve.

Returns
  Success indicator. True if all requested storages were successfully reserved. False if request failed and no storages were reserved.

## ◆ restoreDone [1/2]

void Buteo::SyncDBusInterface::restoreDone | ( |  | ) |
| signal

Notifies about Restore Done.

This signal is sent when the backup framework has restored the sync related data

## ◆ restoreDone [2/2]

void Buteo::SyncDBusInterface::restoreDone | ( |  | ) |
| signal

Notifies about Restore Done.

This signal is sent when the backup framework has restored the sync related data

## ◆ restoreInProgress [1/2]

void Buteo::SyncDBusInterface::restoreInProgress | ( |  | ) |
| signal

Notifies about Restore start.

This signal is sent when the backup framework is restoring the sync related data

## ◆ restoreInProgress [2/2]

void Buteo::SyncDBusInterface::restoreInProgress | ( |  | ) |
| signal

Notifies about Restore start.

This signal is sent when the backup framework is restoring the sync related data

## ◆ resultsAvailable [1/2]

void Buteo::SyncDBusInterface::resultsAvailable | ( | QString | aProfileName,
|  | QString | aResultsAsXml
| ) |  |
| 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.

Parameters

  aProfileName | Name of the profile for which results are available
  aResultsAsXml | results as an xml object

## ◆ resultsAvailable [2/2]

void Buteo::SyncDBusInterface::resultsAvailable | ( | QString | aProfileName,
|  | QString | aResultsAsXml
| ) |  |
| 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.

Parameters

  aProfileName | Name of the profile for which results are available
  aResultsAsXml | results as an xml object

## ◆ runningSyncs [1/2]

virtual QStringList Buteo::SyncDBusInterface::runningSyncs | ( |  | ) |
| pure virtualslot

Gets the list of profile names of currently running syncs.

Returns
  Profile name list.

## ◆ runningSyncs [2/2]

virtual QStringList Buteo::SyncDBusInterface::runningSyncs | ( |  | ) |
| pure virtualslot

Gets the list of profile names of currently running syncs.

Returns
  Profile name list.

## ◆ saveSyncResults [1/2]

virtual bool Buteo::SyncDBusInterface::saveSyncResults | ( | QString | aProfileId,
|  | QString | aSyncResults
| ) |  |
| pure virtualslot

Save SyncResults to log.xml file.

Parameters

  aProfileId | to save result in corresponding file.
  aSyncResults | to save in the <profileId>.log.xml.

Returns
  status of the saveSyncResults

## ◆ saveSyncResults [2/2]

virtual bool Buteo::SyncDBusInterface::saveSyncResults | ( | QString | aProfileId,
|  | QString | aSyncResults
| ) |  |
| pure virtualslot

Save SyncResults to log.xml file.

Parameters

  aProfileId | to save result in corresponding file.
  aSyncResults | to save in the <profileId>.log.xml.

Returns
  status of the saveSyncResults

## ◆ setSyncSchedule [1/2]

virtual bool Buteo::SyncDBusInterface::setSyncSchedule | ( | QString | aProfileId,
|  | QString | aScheduleAsXml
| ) |  |
| 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

Parameters

  aProfileId | - Id of the profile for which schedule has to be set
  aScheduleAsXml | - Over the dbus the schedule object is transmitted as xml

Returns
  bool - status of the operation

## ◆ setSyncSchedule [2/2]

virtual bool Buteo::SyncDBusInterface::setSyncSchedule | ( | QString | aProfileId,
|  | QString | aScheduleAsXml
| ) |  |
| 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

Parameters

  aProfileId | - Id of the profile for which schedule has to be set
  aScheduleAsXml | - Over the dbus the schedule object is transmitted as xml

Returns
  bool - status of the operation

## ◆ signalProfileChanged [1/2]

void Buteo::SyncDBusInterface::signalProfileChanged | ( | QString | aProfileName,
|  | int | aChangeType,
|  | QString | aProfileAsXml
| ) |  |
| 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.

Parameters

  aProfileName | Name of the changed profile.
  aChangeType | 0 (ADDITION): Profile was added. 1 (MODIFICATION): Profile was modified. 2 (DELETION): Profile was deleted.
  aProfileAsXml | Updated Profile Object is sent as xml

## ◆ signalProfileChanged [2/2]

void Buteo::SyncDBusInterface::signalProfileChanged | ( | QString | aProfileName,
|  | int | aChangeType,
|  | QString | aProfileAsXml
| ) |  |
| 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.

Parameters

  aProfileName | Name of the changed profile.
  aChangeType | 0 (ADDITION): Profile was added. 1 (MODIFICATION): Profile was modified. 2 (DELETION): Profile was deleted.
  aProfileAsXml | Updated Profile Object is sent as xml

## ◆ start [1/2]

virtual Q_NOREPLY void Buteo::SyncDBusInterface::start | ( | unsigned int | aAccountId | ) |
| pure virtualslot

Starts sync for all profiles matching the given account ID.

Parameters

  aAccountId | The account ID.

## ◆ start [2/2]

virtual Q_NOREPLY void Buteo::SyncDBusInterface::start | ( | unsigned int | aAccountId | ) |
| pure virtualslot

Starts sync for all profiles matching the given account ID.

Parameters

  aAccountId | The account ID.

## ◆ startSync [1/2]

virtual bool Buteo::SyncDBusInterface::startSync | ( | QString | aProfileId | ) |
| 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.

Parameters

  aProfileId | Id of the profile to use in sync.

Returns
  True if a profile with the given id was found. Otherwise false and no status change signals will follow from this request.

## ◆ startSync [2/2]

virtual bool Buteo::SyncDBusInterface::startSync | ( | QString | aProfileId | ) |
| 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.

Parameters

  aProfileId | Id of the profile to use in sync.

Returns
  True if a profile with the given id was found. Otherwise false and no status change signals will follow from this request.

## ◆ status [1/2]

virtual int Buteo::SyncDBusInterface::status | ( | unsigned int | aAccountId,
|  | int & | aFailedReason,
|  | qlonglong & | aPrevSyncTime,
|  | qlonglong & | aNextSyncTime
| ) |  |
| pure virtualslot

Returns the status of the sync for the given account Id.

Parameters

  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.

Returns
  The status of sync: 0 = Sync is running, 1 = Last sync succeeded, 2 = last sync failed

## ◆ status [2/2]

virtual int Buteo::SyncDBusInterface::status | ( | unsigned int | aAccountId,
|  | int & | aFailedReason,
|  | qlonglong & | aPrevSyncTime,
|  | qlonglong & | aNextSyncTime
| ) |  |
| pure virtualslot

Returns the status of the sync for the given account Id.

Parameters

  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.

Returns
  The status of sync: 0 = Sync is running, 1 = Last sync succeeded, 2 = last sync failed

## ◆ statusChanged [1/2]

void Buteo::SyncDBusInterface::statusChanged | ( | unsigned int | aAccountId,
|  | int | aNewStatus,
|  | int | aFailedReason,
|  | qlonglong | aPrevSyncTime,
|  | qlonglong | aNextSyncTime
| ) |  |
| 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

Parameters

  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.

## ◆ statusChanged [2/2]

void Buteo::SyncDBusInterface::statusChanged | ( | unsigned int | aAccountId,
|  | int | aNewStatus,
|  | int | aFailedReason,
|  | qlonglong | aPrevSyncTime,
|  | qlonglong | aNextSyncTime
| ) |  |
| 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

Parameters

  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.

## ◆ stop [1/2]

virtual Q_NOREPLY void Buteo::SyncDBusInterface::stop | ( | unsigned int | aAccountId | ) |
| pure virtualslot

Stops sync for all profiles matching the given account ID.

Parameters

  aAccountId | The account ID.

## ◆ stop [2/2]

virtual Q_NOREPLY void Buteo::SyncDBusInterface::stop | ( | unsigned int | aAccountId | ) |
| pure virtualslot

Stops sync for all profiles matching the given account ID.

Parameters

  aAccountId | The account ID.

## ◆ syncedExternallyStatus

void Buteo::SyncDBusInterface::syncedExternallyStatus | ( | uint | aAccountId,
|  | const QString & | aClientProfileName,
|  | bool | aState
| ) |  |
| 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'

Parameters

  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).

## ◆ syncingAccounts [1/2]

virtual QList< unsigned int > Buteo::SyncDBusInterface::syncingAccounts | ( |  | ) |
| pure virtualslot

Returns the list of account IDs for which sync is ongoing.

Returns
  The list of account IDs currectly syncing.

## ◆ syncingAccounts [2/2]

virtual QList< unsigned int > Buteo::SyncDBusInterface::syncingAccounts | ( |  | ) |
| pure virtualslot

Returns the list of account IDs for which sync is ongoing.

Returns
  The list of account IDs currectly syncing.

## ◆ syncProfile [1/2]

virtual QString Buteo::SyncDBusInterface::syncProfile | ( | const QString & | aProfileId | ) |
| 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.

Parameters

  aProfileId | Name of the profile to get.

Returns
  The sync profile as Xml string.

## ◆ syncProfile [2/2]

virtual QString Buteo::SyncDBusInterface::syncProfile | ( | const QString & | aProfileId | ) |
| 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.

Parameters

  aProfileId | Name of the profile to get.

Returns
  The sync profile as Xml string.

## ◆ syncProfilesByKey [1/2]

virtual QStringList Buteo::SyncDBusInterface::syncProfilesByKey | ( | const QString & | aKey,
|  | const QString & | aValue
| ) |  |
| 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.

Parameters

  aKey | Key to match for profile.
  aValue | Value to match for profile.

Returns
  The sync profiles as Xml string list.

## ◆ syncProfilesByKey [2/2]

virtual QStringList Buteo::SyncDBusInterface::syncProfilesByKey | ( | const QString & | aKey,
|  | const QString & | aValue
| ) |  |
| 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.

Parameters

  aKey | Key to match for profile.
  aValue | Value to match for profile.

Returns
  The sync profiles as Xml string list.

## ◆ syncProfilesByType [1/2]

virtual QStringList Buteo::SyncDBusInterface::syncProfilesByType | ( | const QString & | aType | ) |
| pure virtualslot

Gets a profiles matching the profile type.

Parameters

  aType | Type of the profile service/storage/sync.

Returns
  The sync profile ids as string list.

## ◆ syncProfilesByType [2/2]

virtual QStringList Buteo::SyncDBusInterface::syncProfilesByType | ( | const QString & | aType | ) |
| pure virtualslot

Gets a profiles matching the profile type.

Parameters

  aType | Type of the profile service/storage/sync.

Returns
  The sync profile ids as string list.

## ◆ syncStatus [1/2]

void Buteo::SyncDBusInterface::syncStatus | ( | QString | aProfileName,
|  | int | aStatus,
|  | QString | aMessage,
|  | int | aMoreDetails
| ) |  |
| signal

Notifies about a change in synchronization status.

Parameters

  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

## ◆ syncStatus [2/2]

void Buteo::SyncDBusInterface::syncStatus | ( | QString | aProfileName,
|  | int | aStatus,
|  | QString | aMessage,
|  | int | aMoreDetails
| ) |  |
| signal

Notifies about a change in synchronization status.

Parameters

  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

## ◆ transferProgress [1/2]

void Buteo::SyncDBusInterface::transferProgress | ( | QString | aProfileName,
|  | int | aTransferDatabase,
|  | int | aTransferType,
|  | QString | aMimeType,
|  | int | aCommittedItems
| ) |  |
| signal

Notifies about progress in transferring items.

Parameters

  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

## ◆ transferProgress [2/2]

void Buteo::SyncDBusInterface::transferProgress | ( | QString | aProfileName,
|  | int | aTransferDatabase,
|  | int | aTransferType,
|  | QString | aMimeType,
|  | int | aCommittedItems
| ) |  |
| signal

Notifies about progress in transferring items.

Parameters

  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

## ◆ updateProfile [1/2]

virtual bool Buteo::SyncDBusInterface::updateProfile | ( | QString | aProfileAsXml | ) |
| pure virtualslot

This function should be called when sync profile information has been changed by someone else than the sync daemon.

Note
  If profile does not exist prior to calling this function, a new profile file is created

Parameters

  aProfileAsXml | - Modified Profile Object as XML.

Returns
  status of the update operation

## ◆ updateProfile [2/2]

virtual bool Buteo::SyncDBusInterface::updateProfile | ( | QString | aProfileAsXml | ) |
| pure virtualslot

This function should be called when sync profile information has been changed by someone else than the sync daemon.

Note
  If profile does not exist prior to calling this function, a new profile file is created

Parameters

  aProfileAsXml | - Modified Profile Object as XML.

Returns
  status of the update operation

The documentation for this class was generated from the following files:

- msyncd/SyncDBusInterface.h
- libbuteosyncfw/pluginmgr/SyncDBusInterface.h
- moc_SyncDBusInterface.cpp