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;
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);
334 QString aMessage,
int aStatusDetails);
351 int aTransferType, QString aMimeType,
int aCommittedItems);
Private implementation class for SyncClientInterface.
Definition SyncClientInterfacePrivate.h:42
QDBusPendingCallWatcher * requestSyncProfilesByKey(const QString &aKey, const QString &aValue, QObject *aParent=nullptr) const
asynchronous version of syncProfilesByKey().
Definition SyncClientInterface.cpp:136
void transferProgress(QString aProfileId, int aTransferDatabase, int aTransferType, QString aMimeType, int aCommittedItems)
Notifies about progress in transferring items.
QDBusPendingCallWatcher * requestAllVisibleSyncProfiles(QObject *aParent=nullptr) const
asynchronous version of allVisibleSyncProfiles()
Definition SyncClientInterface.cpp:120
void profileChanged(QString aProfileId, int aChangeType, QString aChangedProfile)
Notifies about a change in profile.
void syncStatus(QString aProfileId, int aStatus, QString aMessage, int aStatusDetails)
Notifies about a change in synchronization status.
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:126
QStringList syncProfilesByKey(const QString &aKey, const QString &aValue)
Gets a sync profiles which matches the key-value.
Definition SyncClientInterface.cpp:131
bool updateProfile(const Buteo::SyncProfile &aSyncProfile)
This function should be called when sync profile information has been changed by the client.
Definition SyncClientInterface.cpp:84
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:79
QList< QString > allVisibleSyncProfiles()
Gets all visible sync profiles.
Definition SyncClientInterface.cpp:115
QDBusPendingCallWatcher * requestSync(const QString &aProfileId, QObject *aParent=nullptr) const
asynchronous version of startSync()
Definition SyncClientInterface.cpp:59
void isValidChanged()
Notifies when the synchronisation service is available or not.
QDBusPendingCallWatcher * requestRunningSyncList(QObject *aParent=nullptr) const
asynchronous version of getRunningSyncList()
Definition SyncClientInterface.cpp:74
Buteo::SyncResults getLastSyncResult(const QString &aProfileId)
To get lastSyncResult.
Definition SyncClientInterface.cpp:109
bool setSyncSchedule(const QString &aProfileId, const SyncSchedule &aSchedule)
Sets Sync Schedule to the profile.
Definition SyncClientInterface.cpp:89
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:99
~SyncClientInterface()
Destructor.
Definition SyncClientInterface.cpp:48
void restoreDone()
Notifies about Restore Done.
void abortSync(const QString &aProfileId) const
Stops synchronizing the profile with the given Id.
Definition SyncClientInterface.cpp:64
void backupDone()
Notifies about Backup done.
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:104
void backupInProgress()
Notifies about Backup start.
bool saveSyncResults(const QString &aProfileId, const Buteo::SyncResults &aSyncResults)
Save SyncResults to log.xml file.
Definition SyncClientInterface.cpp:94
QStringList getRunningSyncList() const
Gets the list of profile names of currently running syncs.
Definition SyncClientInterface.cpp:69
void restoreInProgress()
Notifies about Restore start.
bool startSync(const QString &aProfileId) const
Requests to starts synchronizing using a profile Id.
Definition SyncClientInterface.cpp:54
void resultsAvailable(QString aProfileId, Buteo::SyncResults aResults)
Notifies about the results of a recent sync for a profile.
A top level synchronization profile.
Definition SyncProfile.h:49
Contains information about a completed synchronization session.
Definition SyncResults.h:67
Class for handling sync schedule settings.
Definition SyncSchedule.h:53
Definition SyncBackupAdaptor.h:40