24#ifndef SYNCCLIENTINTERFACE_H
25#define SYNCCLIENTINTERFACE_H
29#include <QSharedPointer>
31#include <SyncProfile.h>
32#include <SyncResults.h>
33#include <SyncSchedule.h>
35class QDBusPendingCallWatcher;
39class SyncClientInterfacePrivate;
79 bool startSync(
const QString &aProfileId)
const;
88 QDBusPendingCallWatcher*
requestSync(
const QString &aProfileId, QObject *aParent =
nullptr)
const;
98 void abortSync(
const QString &aProfileId)
const;
218 QDBusPendingCallWatcher*
requestSyncProfilesByKey(
const QString &aKey,
const QString &aValue, QObject *aParent =
nullptr)
const;
234 QDBusPendingCallWatcher*
requestProfilesByType(
const QString &aProfileId, QObject *aParent =
nullptr)
const;
299 void profileChanged(QString aProfileId,
int aChangeType, QString aChangedProfile);
333 void syncStatus(QString aProfileId,
int aStatus,
334 QString aMessage,
int aStatusDetails);
351 int aTransferType, QString aMimeType,
int aCommittedItems);
Private implementation class for SyncClientInterface.
Definition SyncClientInterfacePrivate.h:42
SyncInterface Class - Main Entry Point for SyncFW Clients.
Definition SyncClientInterface.h:52
QDBusPendingCallWatcher * requestSyncProfilesByKey(const QString &aKey, const QString &aValue, QObject *aParent=nullptr) const
asynchronous version of syncProfilesByKey().
Definition SyncClientInterface.cpp:137
void transferProgress(QString aProfileId, int aTransferDatabase, int aTransferType, QString aMimeType, int aCommittedItems)
Notifies about progress in transferring items.
Definition moc_SyncClientInterface.cpp:298
QDBusPendingCallWatcher * requestAllVisibleSyncProfiles(QObject *aParent=nullptr) const
asynchronous version of allVisibleSyncProfiles()
Definition SyncClientInterface.cpp:121
void profileChanged(QString aProfileId, int aChangeType, QString aChangedProfile)
Notifies about a change in profile.
Definition moc_SyncClientInterface.cpp:277
void syncStatus(QString aProfileId, int aStatus, QString aMessage, int aStatusDetails)
Notifies about a change in synchronization status.
Definition moc_SyncClientInterface.cpp:291
QStringList profilesByType(const QString &aType)
Gets profiles matching the profile type.
Definition SyncClientInterface.cpp:147
QString syncProfile(const QString &aProfileId)
Gets a sync profile.
Definition SyncClientInterface.cpp:127
QStringList syncProfilesByKey(const QString &aKey, const QString &aValue)
Gets a sync profiles which matches the key-value.
Definition SyncClientInterface.cpp:132
bool updateProfile(const Buteo::SyncProfile &aSyncProfile)
This function should be called when sync profile information has been changed by the client.
Definition SyncClientInterface.cpp:85
SyncClientInterface()
Constructor.
Definition SyncClientInterface.cpp:43
bool removeProfile(const QString &aProfileId) const
This function should be called when sync profile has to be deleted.
Definition SyncClientInterface.cpp:80
QList< QString > allVisibleSyncProfiles()
Gets all visible sync profiles.
Definition SyncClientInterface.cpp:116
QDBusPendingCallWatcher * requestSync(const QString &aProfileId, QObject *aParent=nullptr) const
asynchronous version of startSync()
Definition SyncClientInterface.cpp:60
void isValidChanged()
Notifies when the synchronisation service is available or not.
Definition moc_SyncClientInterface.cpp:247
QDBusPendingCallWatcher * requestRunningSyncList(QObject *aParent=nullptr) const
asynchronous version of getRunningSyncList()
Definition SyncClientInterface.cpp:75
Buteo::SyncResults getLastSyncResult(const QString &aProfileId)
To get lastSyncResult.
Definition SyncClientInterface.cpp:110
bool setSyncSchedule(const QString &aProfileId, const SyncSchedule &aSchedule)
Sets Sync Schedule to the profile.
Definition SyncClientInterface.cpp:90
QStringList syncProfilesByType(const QString &aType)
Gets a profiles matching the profile type.
Definition SyncClientInterface.cpp:142
QDBusPendingCallWatcher * requestProfilesByType(const QString &aProfileId, QObject *aParent=nullptr) const
asynchronous version of profilesByType()
Definition SyncClientInterface.cpp:152
bool getBackUpRestoreState()
This function returns true if backup/restore in progress else false.
Definition SyncClientInterface.cpp:100
~SyncClientInterface()
Destructor.
Definition SyncClientInterface.cpp:49
void restoreDone()
Notifies about Restore Done.
Definition moc_SyncClientInterface.cpp:271
void abortSync(const QString &aProfileId) const
Stops synchronizing the profile with the given Id.
Definition SyncClientInterface.cpp:65
void backupDone()
Notifies about Backup done.
Definition moc_SyncClientInterface.cpp:259
static QSharedPointer< SyncClientInterface > sharedInstance()
creates a process singleton
Definition SyncClientInterface.cpp:31
bool isValid() const
Use this function to understand if the dbus connection to msyncd is working or not.
Definition SyncClientInterface.cpp:105
void backupInProgress()
Notifies about Backup start.
Definition moc_SyncClientInterface.cpp:253
bool saveSyncResults(const QString &aProfileId, const Buteo::SyncResults &aSyncResults)
Save SyncResults to log.xml file.
Definition SyncClientInterface.cpp:95
QStringList getRunningSyncList() const
Gets the list of profile names of currently running syncs.
Definition SyncClientInterface.cpp:70
void restoreInProgress()
Notifies about Restore start.
Definition moc_SyncClientInterface.cpp:265
bool startSync(const QString &aProfileId) const
Requests to starts synchronizing using a profile Id.
Definition SyncClientInterface.cpp:55
void resultsAvailable(QString aProfileId, Buteo::SyncResults aResults)
Notifies about the results of a recent sync for a profile.
Definition moc_SyncClientInterface.cpp:284
A top level synchronization profile.
Definition SyncProfile.h:49
Contains information about a completed synchronization session.
Definition SyncResults.h:62
Class for handling sync schedule settings.
Definition SyncSchedule.h:53
Definition SyncBackupAdaptor.h:40