|
ButeoSynchronizationFramework
|
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
SyncResults results() const
Gets the results of the finished session.
Definition: SyncSession.cpp:266
SyncSession(SyncProfile *aProfile, QObject *aParent=0)
Constructor.
Definition: SyncSession.cpp:33
bool isScheduled() const
Checks if the session was started by the scheduler.
Definition: SyncSession.cpp:282
void setScheduled(bool aScheduled)
Sets if the session was started by the scheduler.
Definition: SyncSession.cpp:274
void transferProgress(const QString &aProfileName, Sync::TransferDatabase aDatabase, Sync::TransferType aType, const QString &aMimeType, int aCommittedItems)
Definition: moc_SyncSession.cpp:253
void finished(const QString &aProfileName, Sync::SyncStatus aStatus, const QString &aMessage, int aErrorCode)
Signal sent when the session has finished.
Definition: moc_SyncSession.cpp:267
bool isAborted()
Returns if the sync session was aborted.
Definition: SyncSession.cpp:179
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:274
void updateResults(const SyncResults &aResults)
Sets the results for this session.
Definition: SyncSession.cpp:404
QMap< QString, bool > getStorageMap()
returns the StorageMap used for this session
Definition: SyncSession.cpp:208
void setProfileCreated(bool aProfileCreated)
sets Profile Created flag to true
Definition: SyncSession.cpp:226
void stop()
Stops the session. Returns when the session is stopped.
Definition: SyncSession.cpp:232
Sync::SyncStatus mapToSyncStatusError(int aErrorCode)
Maps sync failure error code from stack to SyncStatus.
Definition: SyncSession.cpp:334
bool reserveStorages(StorageBooker *aStorageBooker)
Tries to reserve storages needed by the session.
Definition: SyncSession.cpp:420
QString profileName() const
Gets the name of the profile used by this session.
Definition: SyncSession.cpp:253
A top level synchronization profile.
Definition: SyncProfile.h:48
A helper class for managing storage reservations.
Definition: StorageBooker.h:36
void setStorageMap(QMap< QString, bool > &aStorageMap)
sets the storage map for this session
Definition: SyncSession.cpp:214
void storageAccquired(const QString &aProfileName, const QString &aMimeType)
Signal sent when a storage is accquired.
Definition: moc_SyncSession.cpp:260
virtual ~SyncSession()
Destructor.
Definition: SyncSession.cpp:51
void abort(Sync::SyncStatus aStatus=Sync::SYNC_ABORTED)
Aborts the session. Returns when the abort request is sent.
Definition: SyncSession.cpp:184
bool start()
Starts the session using the associated plug-in runner.
Definition: SyncSession.cpp:124
SyncProfile * profile() const
Gets the sync profile used by this session.
Definition: SyncSession.cpp:246
Contains information about a completed synchronization session.
Definition: SyncResults.h:58
void releaseStorages()
Releases storages that were reserved earlier with reserveStorages.
Definition: SyncSession.cpp:436
bool isProfileCreated()
returns the returns the status of the profile creation for this session
Definition: SyncSession.cpp:220
void setPluginRunner(PluginRunner *aPluginRunner, bool aTransferOwnership)
Associates a plug-in runner with this session.
Definition: SyncSession.cpp:78
Base class for running sync plug-ins.
Definition: PluginRunner.h:44
Class representing a single sync session.
Definition: SyncSession.h:43
bool isFinished()
Returns if the sync session is finished or in process.
Definition: SyncSession.cpp:174
Class for managing network sessions.
Definition: NetworkManager.h:43
void setFailureResult(int aMajorCode, int aMinorCode)
Sets the results for this session using the provided error code.
Definition: SyncSession.cpp:412
PluginRunner * pluginRunner()
Gets the plug-in runner associated with this session.
Definition: SyncSession.cpp:117