23#ifndef SYNCRESULTS_H_2
24#define SYNCRESULTS_H_2
28#include <QSharedPointer>
30#include <QVariantList>
31#include "TargetResults.h"
58class SyncResultsPrivate;
69 Q_PROPERTY(QDateTime syncTime READ syncTime CONSTANT)
70 Q_PROPERTY(
MajorCode majorCode READ majorCode CONSTANT)
71 Q_PROPERTY(
MinorCode minorCode READ minorCode CONSTANT)
72 Q_PROPERTY(
bool scheduled READ
isScheduled CONSTANT)
73 Q_PROPERTY(QString targetId READ
getTargetId CONSTANT)
74 Q_PROPERTY(QVariantList results READ variantTargetResults CONSTANT)
82 SYNC_RESULT_INVALID = -1,
83 SYNC_RESULT_SUCCESS = 0,
101 INTERNAL_ERROR = 401,
102 AUTHENTICATION_FAILURE,
110 UNSUPPORTED_SYNC_TYPE,
111 UNSUPPORTED_STORAGE_TYPE,
114 LOW_BATTERY_POWER = 601,
166 QDomElement
toXml(QDomDocument &aDoc)
const;
247 QVariantList variantTargetResults()
const;
248 QSharedPointer<SyncResultsPrivate> d_ptr;
250#ifdef SYNCFW_UNIT_TESTS
251 friend class ClientThreadTest;
Contains information about a completed synchronization session.
Definition SyncResults.h:67
void setScheduled(bool aScheduled)
Sets if the results are from a scheduled sync.
Definition SyncResults.cpp:214
QString getTargetId() const
Gets the remote target Id.
Definition SyncResults.cpp:204
void setMajorCode(MajorCode aMajorCode)
Sets the result code.
Definition SyncResults.cpp:182
MinorCode minorCode() const
Gets the failed reason.
Definition SyncResults.cpp:188
MajorCode
enum value
Definition SyncResults.h:81
void setTargetId(const QString &aTargetId)
Sets the remote target Id.
Definition SyncResults.cpp:199
MajorCode majorCode() const
Gets the result code.
Definition SyncResults.cpp:177
void setMinorCode(MinorCode aMinorCode)
Sets the failed Reason.
Definition SyncResults.cpp:193
bool operator<(const SyncResults &aOther) const
Compares two results objects by sync time.
Definition SyncResults.cpp:209
bool isScheduled() const
Checks if the results are from a scheduled sync.
Definition SyncResults.cpp:219
QString toString() const
Exports the sync results to QString.
Definition SyncResults.cpp:140
void addTargetResults(const TargetResults &aResults)
Adds target results to this object.
Definition SyncResults.cpp:167
SyncResults()
Constructs an empty sync results object.
Definition SyncResults.cpp:79
SyncResults & operator=(const SyncResults &aRhs)
Assignment operator.
Definition SyncResults.cpp:116
QDateTime syncTime() const
Gets the sync time.
Definition SyncResults.cpp:172
MinorCode
enum value
Definition SyncResults.h:93
QDomElement toXml(QDomDocument &aDoc) const
Exports the sync results to XML.
Definition SyncResults.cpp:125
~SyncResults()
Destructor.
Definition SyncResults.cpp:112
QList< TargetResults > targetResults() const
Gets the results of all targets.
Definition SyncResults.cpp:153
Sync results for one target.
Definition TargetResults.h:72
Definition SyncBackupAdaptor.h:40
int iLocalItemsModified
Definition SyncResults.h:41
int iRemoteItemsAdded
Definition SyncResults.h:44
int iRemoteItemsDeleted
Definition SyncResults.h:46
int iLocalItemsAdded
Definition SyncResults.h:40
int iLocalItemsDeleted
Definition SyncResults.h:42
int iRemoteItemsModified
Definition SyncResults.h:45