|
Buteo Synchronization Framework
|
Contains information about a completed synchronization session. More...
#include <SyncResults.h>
Public Types | |
| enum | MajorCode { SYNC_RESULT_INVALID = -1 , SYNC_RESULT_SUCCESS = 0 , SYNC_RESULT_FAILED , SYNC_RESULT_CANCELLED } |
| enum value More... | |
| enum | MinorCode { NO_ERROR = 0 , ITEM_FAILURES = 301 , INTERNAL_ERROR = 401 , AUTHENTICATION_FAILURE , DATABASE_FAILURE , PLUGIN_ERROR , PLUGIN_TIMEOUT , ABORTED = 501 , CONNECTION_ERROR , UNSUPPORTED_SYNC_TYPE , UNSUPPORTED_STORAGE_TYPE , LOW_BATTERY_POWER = 601 , POWER_SAVING_MODE , OFFLINE_MODE , BACKUP_IN_PROGRESS , LOW_MEMORY } |
| enum value More... | |
Public Member Functions | |
| SyncResults () | |
| Constructs an empty sync results object. More... | |
| SyncResults (const SyncResults &aSource) | |
| Copy constructor. More... | |
| SyncResults (QDateTime aTime, MajorCode aMajorCode, MinorCode aMinorCode) | |
| Constructs sync results, sets sync time and result code. More... | |
| SyncResults (const QDomElement &aRoot) | |
| Constructs sync results from XML. More... | |
| ~SyncResults () | |
| Destructor. | |
| SyncResults & | operator= (const SyncResults &aRhs) |
| Assignment operator. More... | |
| QDomElement | toXml (QDomDocument &aDoc) const |
| Exports the sync results to XML. More... | |
| QString | toString () const |
| Exports the sync results to QString. More... | |
| QList< TargetResults > | targetResults () const |
| Gets the results of all targets. More... | |
| void | addTargetResults (const TargetResults &aResults) |
| Adds target results to this object. More... | |
| QDateTime | syncTime () const |
| Gets the sync time. More... | |
| MajorCode | majorCode () const |
| Gets the result code. More... | |
| void | setMajorCode (MajorCode aMajorCode) |
| Sets the result code. More... | |
| MinorCode | minorCode () const |
| Gets the failed reason. More... | |
| void | setMinorCode (MinorCode aMinorCode) |
| Sets the failed Reason. More... | |
| void | setTargetId (const QString &aTargetId) |
| Sets the remote target Id. More... | |
| QString | getTargetId () const |
| Gets the remote target Id. | |
| bool | operator< (const SyncResults &aOther) const |
| Compares two results objects by sync time. More... | |
| void | setScheduled (bool aScheduled) |
| Sets if the results are from a scheduled sync. More... | |
| bool | isScheduled () const |
| Checks if the results are from a scheduled sync. More... | |
Properties | |
| Q_GADGETQDateTime | syncTime |
| MajorCode | majorCode |
| MinorCode | minorCode |
| bool | scheduled |
| QString | targetId |
| QVariantList | results |
Contains information about a completed synchronization session.
SyncResults consists of the sync time/date, result code and one TargetResults object for each sync target/storage (calendar, bookmarks etc.).
enum value
Used to set the major code in *.log.xml file for profile
enum value
Used to set the minor code in *.log.xml file for profile
| SyncResults::SyncResults | ( | ) |
Constructs an empty sync results object.
Sync time is set to current time, result code should be set later by calling setMajorCode , setMinorCode.
| SyncResults::SyncResults | ( | const SyncResults & | aSource | ) |
Copy constructor.
| aSource | Copy source. |
| SyncResults::SyncResults | ( | QDateTime | aTime, |
| SyncResults::MajorCode | aMajorCode, | ||
| SyncResults::MinorCode | aMinorCode | ||
| ) |
Constructs sync results, sets sync time and result code.
| aTime | Sync time for the results. |
| aMajorCode | Sync result code. |
| aMinorCode | Sync Failed Reason. |
|
explicit |
Constructs sync results from XML.
| aRoot | Root element of the XML representation. |
| void SyncResults::addTargetResults | ( | const TargetResults & | aResults | ) |
Adds target results to this object.
| aResults | The target results to add. |
| bool SyncResults::isScheduled | ( | ) | const |
Checks if the results are from a scheduled sync.
| SyncResults::MajorCode SyncResults::majorCode | ( | ) | const |
Gets the result code.
| SyncResults::MinorCode SyncResults::minorCode | ( | ) | const |
Gets the failed reason.
| bool SyncResults::operator< | ( | const SyncResults & | aOther | ) | const |
Compares two results objects by sync time.
The object with earlier sync time is smaller.
| aOther | Point of comparison. |
| SyncResults & SyncResults::operator= | ( | const SyncResults & | aRhs | ) |
Assignment operator.
| aRhs | Source. |
| void SyncResults::setMajorCode | ( | SyncResults::MajorCode | aMajorCode | ) |
Sets the result code.
| aMajorCode | The result code. |
| void SyncResults::setMinorCode | ( | SyncResults::MinorCode | aMinorCode | ) |
Sets the failed Reason.
| aMinorCode | - minor code or the reason |
| void SyncResults::setScheduled | ( | bool | aScheduled | ) |
Sets if the results are from a scheduled sync.
| aScheduled | True if this is a scheduled sync. |
| void SyncResults::setTargetId | ( | const QString & | aTargetId | ) |
Sets the remote target Id.
| aTargetId | The remote device Id. |
| QDateTime SyncResults::syncTime | ( | ) | const |
Gets the sync time.
| QList< TargetResults > SyncResults::targetResults | ( | ) | const |
Gets the results of all targets.
| QString SyncResults::toString | ( | ) | const |
Exports the sync results to QString.
| QDomElement SyncResults::toXml | ( | QDomDocument & | aDoc | ) | const |
Exports the sync results to XML.
| aDoc | Parent document for the created XML elements. The created elements are not inserted to the document by this function, but the document is still required for creating the elements. |