27#include "SyncCommonDefs.h"
28#include "SyncResults.h"
96 void abort(Sync::SyncStatus aStatus = Sync::SYNC_ABORTED);
189 Sync::TransferDatabase aDatabase, Sync::TransferType aType,
190 const QString &aMimeType,
int aCommittedItems);
197 void storageAccquired(
const QString &aProfileName,
const QString &aMimeType);
206 void finished(
const QString &aProfileName, Sync::SyncStatus aStatus,
221 void onSuccess(
const QString &aProfileName,
const QString &aMessage);
223 void onTransferProgress(
const QString &aProfileName,
224 Sync::TransferDatabase aDatabase, Sync::TransferType aType,
225 const QString &aMimeType,
int aCommittedItems);
226 void onStorageAccquired (
const QString &aMimeType);
227 void onSyncProgressDetail(
const QString &aProfileName,
int aProgressDetail);
229 void onDestroyed(QObject *aPluginRunner);
230 void onNetworkSessionOpened();
231 void onNetworkSessionError();
237 Sync::SyncStatus iStatus;
239 bool iPluginRunnerOwned;
251#ifdef SYNCFW_UNIT_TESTS
252 friend class SyncSessionTest;
Class for managing network sessions.
Definition NetworkManager.h:43
Base class for running sync plug-ins.
Definition PluginRunner.h:45
A helper class for managing storage reservations.
Definition StorageBooker.h:37
A top level synchronization profile.
Definition SyncProfile.h:49
Contains information about a completed synchronization session.
Definition SyncResults.h:62
MajorCode
enum value
Definition SyncResults.h:77
MinorCode
enum value
Definition SyncResults.h:89
Class representing a single sync session.
Definition SyncSession.h:44
void finished(const QString &aProfileName, Sync::SyncStatus aStatus, const QString &aMessage, SyncResults::MinorCode aErrorCode)
Signal sent when the session has finished.
Definition moc_SyncSession.cpp:269
bool isScheduled() const
Checks if the session was started by the scheduler.
Definition SyncSession.cpp:261
void setPluginRunner(PluginRunner *aPluginRunner, bool aTransferOwnership)
Associates a plug-in runner with this session.
Definition SyncSession.cpp:76
bool isAborted()
Returns if the sync session was aborted.
Definition SyncSession.cpp:167
QMap< QString, bool > getStorageMap()
returns the StorageMap used for this session
Definition SyncSession.cpp:192
PluginRunner * pluginRunner()
Gets the plug-in runner associated with this session.
Definition SyncSession.cpp:112
SyncResults results() const
Gets the results of the finished session.
Definition SyncSession.cpp:246
void transferProgress(const QString &aProfileName, Sync::TransferDatabase aDatabase, Sync::TransferType aType, const QString &aMimeType, int aCommittedItems)
Definition moc_SyncSession.cpp:255
void setProfileCreated(bool aProfileCreated)
sets Profile Created flag to true
Definition SyncSession.cpp:210
void storageAccquired(const QString &aProfileName, const QString &aMimeType)
Signal sent when a storage is accquired.
Definition moc_SyncSession.cpp:262
void updateResults(const SyncResults &aResults)
Sets the results for this session.
Definition SyncSession.cpp:372
void stop()
Stops the session. Returns when the session is stopped.
Definition SyncSession.cpp:216
void abort(Sync::SyncStatus aStatus=Sync::SYNC_ABORTED)
Aborts the session. Returns when the abort request is sent.
Definition SyncSession.cpp:172
void syncProgressDetail(const QString &aProfileName, int aProgressDetail)
Signal sent when the sync is in progress to indicate the detail of the progress.
Definition moc_SyncSession.cpp:276
bool start()
Starts the session using the associated plug-in runner.
Definition SyncSession.cpp:119
void setStorageMap(QMap< QString, bool > &aStorageMap)
sets the storage map for this session
Definition SyncSession.cpp:198
bool isFinished()
Returns if the sync session is finished or in process.
Definition SyncSession.cpp:162
bool isProfileCreated()
returns the returns the status of the profile creation for this session
Definition SyncSession.cpp:204
void releaseStorages()
Releases storages that were reserved earlier with reserveStorages.
Definition SyncSession.cpp:403
void setFailureResult(SyncResults::MajorCode aMajorCode, SyncResults::MinorCode aMinorCode)
Sets the results for this session using the provided error code.
Definition SyncSession.cpp:380
bool reserveStorages(StorageBooker *aStorageBooker)
Tries to reserve storages needed by the session.
Definition SyncSession.cpp:388
virtual ~SyncSession()
Destructor.
Definition SyncSession.cpp:51
QString profileName() const
Gets the name of the profile used by this session.
Definition SyncSession.cpp:234
SyncProfile * profile() const
Gets the sync profile used by this session.
Definition SyncSession.cpp:227
void setScheduled(bool aScheduled)
Sets if the session was started by the scheduler.
Definition SyncSession.cpp:253
Sync::SyncStatus mapToSyncStatusError(int aErrorCode)
Maps sync failure error code from stack to SyncStatus.
Definition SyncSession.cpp:308
Definition SyncBackupAdaptor.h:41