27 #include "SyncCommonDefs.h" 28 #include "SyncResults.h" 97 void abort(Sync::SyncStatus aStatus = Sync::SYNC_ABORTED);
191 Sync::TransferDatabase aDatabase, Sync::TransferType aType,
192 const QString &aMimeType,
int aCommittedItems);
199 void storageAccquired (
const QString &aProfileName ,
const QString &aMimeType) ;
208 void finished(
const QString &aProfileName, Sync::SyncStatus aStatus,
209 const QString &aMessage,
int aErrorCode);
225 void onSuccess(
const QString &aProfileName,
const QString &aMessage);
227 void onError(
const QString &aProfileName,
const QString &aMessage,
int aErrorCode);
229 void onTransferProgress(
const QString &aProfileName,
230 Sync::TransferDatabase aDatabase, Sync::TransferType aType,
231 const QString &aMimeType,
int aCommittedItems);
233 void onStorageAccquired (
const QString &aMimeType);
235 void onSyncProgressDetail(
const QString &aProfileName,
int aProgressDetail);
239 void onDestroyed(QObject *aPluginRunner);
241 void onNetworkSessionOpened();
243 void onNetworkSessionError();
253 Sync::SyncStatus iStatus;
257 bool iPluginRunnerOwned;
279 #ifdef SYNCFW_UNIT_TESTS 280 friend class SyncSessionTest;
287 #endif // SYNCSESSION_H Sync::SyncStatus mapToSyncStatusError(int aErrorCode)
Maps sync failure error code from stack to SyncStatus.
Definition: SyncSession.cpp:333
void releaseStorages()
Releases storages that were reserved earlier with reserveStorages.
Definition: SyncSession.cpp:435
void transferProgress(const QString &aProfileName, Sync::TransferDatabase aDatabase, Sync::TransferType aType, const QString &aMimeType, int aCommittedItems)
Definition: moc_SyncSession.cpp:247
virtual ~SyncSession()
Destructor.
Definition: SyncSession.cpp:51
void storageAccquired(const QString &aProfileName, const QString &aMimeType)
Signal sent when a storage is accquired.
Definition: moc_SyncSession.cpp:254
bool isScheduled() const
Checks if the session was started by the scheduler.
Definition: SyncSession.cpp:281
QString profileName() const
Gets the name of the profile used by this session.
Definition: SyncSession.cpp:253
Contains information about a completed synchronization session.
Definition: SyncResults.h:58
void finished(const QString &aProfileName, Sync::SyncStatus aStatus, const QString &aMessage, int aErrorCode)
Signal sent when the session has finished.
Definition: moc_SyncSession.cpp:261
bool isProfileCreated()
returns the returns the status of the profile creation for this session
Definition: SyncSession.cpp:220
void setFailureResult(int aMajorCode, int aMinorCode)
Sets the results for this session using the provided error code.
Definition: SyncSession.cpp:411
Definition: AccountsHelper.h:31
QMap< QString, bool > getStorageMap()
returns the StorageMap used for this session
Definition: SyncSession.cpp:208
bool isAborted()
Returns if the sync session was aborted.
Definition: SyncSession.cpp:179
bool isFinished()
Returns if the sync session is finished or in process.
Definition: SyncSession.cpp:174
void abort(Sync::SyncStatus aStatus=Sync::SYNC_ABORTED)
Aborts the session. Returns when the abort request is sent.
Definition: SyncSession.cpp:184
void updateResults(const SyncResults &aResults)
Sets the results for this session.
Definition: SyncSession.cpp:403
void setStorageMap(QMap< QString, bool > &aStorageMap)
sets the storage map for this session
Definition: SyncSession.cpp:214
void setPluginRunner(PluginRunner *aPluginRunner, bool aTransferOwnership)
Associates a plug-in runner with this session.
Definition: SyncSession.cpp:78
void setScheduled(bool aScheduled)
Sets if the session was started by the scheduler.
Definition: SyncSession.cpp:274
SyncResults results() const
Gets the results of the finished session.
Definition: SyncSession.cpp:266
Class representing a single sync session.
Definition: SyncSession.h:43
bool start()
Starts the session using the associated plug-in runner.
Definition: SyncSession.cpp:124
bool reserveStorages(StorageBooker *aStorageBooker)
Tries to reserve storages needed by the session.
Definition: SyncSession.cpp:419
SyncProfile * profile() const
Gets the sync profile used by this session.
Definition: SyncSession.cpp:246
PluginRunner * pluginRunner()
Gets the plug-in runner associated with this session.
Definition: SyncSession.cpp:117
Class for managing network sessions.
Definition: NetworkManager.h:43
void setProfileCreated(bool aProfileCreated)
sets Profile Created flag to true
Definition: SyncSession.cpp:226
Base class for running sync plug-ins.
Definition: PluginRunner.h:44
A top level synchronization profile.
Definition: SyncProfile.h:47
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:268
SyncSession(SyncProfile *aProfile, QObject *aParent=0)
Constructor.
Definition: SyncSession.cpp:33
A helper class for managing storage reservations.
Definition: StorageBooker.h:36
void stop()
Stops the session. Returns when the session is stopped.
Definition: SyncSession.cpp:232