23#ifndef SYNCRESULTS_H_2
24#define SYNCRESULTS_H_2
28#include <QSharedPointer>
30#include <QVariantList>
31#include "TargetResults.h"
53class SyncResultsPrivate;
64 Q_PROPERTY(QDateTime syncTime READ syncTime CONSTANT)
65 Q_PROPERTY(
MajorCode majorCode READ majorCode CONSTANT)
66 Q_PROPERTY(
MinorCode minorCode READ minorCode CONSTANT)
67 Q_PROPERTY(
bool scheduled READ
isScheduled CONSTANT)
68 Q_PROPERTY(QString targetId READ
getTargetId CONSTANT)
69 Q_PROPERTY(QVariantList results READ variantTargetResults CONSTANT)
78 SYNC_RESULT_INVALID = -1,
79 SYNC_RESULT_SUCCESS = 0,
98 AUTHENTICATION_FAILURE,
106 UNSUPPORTED_SYNC_TYPE,
107 UNSUPPORTED_STORAGE_TYPE,
110 LOW_BATTERY_POWER = 601,
162 QDomElement
toXml(QDomDocument &aDoc)
const;
186 QDateTime syncTime()
const;
243 QVariantList variantTargetResults()
const;
244 QSharedPointer<SyncResultsPrivate> d_ptr;
246#ifdef SYNCFW_UNIT_TESTS
247 friend class ClientThreadTest;
Contains information about a completed synchronization session.
Definition SyncResults.h:62
void setScheduled(bool aScheduled)
Sets if the results are from a scheduled sync.
Definition SyncResults.cpp:219
QString getTargetId() const
Gets the remote target Id.
Definition SyncResults.cpp:209
void setMajorCode(MajorCode aMajorCode)
Sets the result code.
Definition SyncResults.cpp:187
MajorCode
enum value
Definition SyncResults.h:77
void setTargetId(const QString &aTargetId)
Sets the remote target Id.
Definition SyncResults.cpp:204
void setMinorCode(MinorCode aMinorCode)
Sets the failed Reason.
Definition SyncResults.cpp:198
bool operator<(const SyncResults &aOther) const
Compares two results objects by sync time.
Definition SyncResults.cpp:214
bool isScheduled() const
Checks if the results are from a scheduled sync.
Definition SyncResults.cpp:224
QString toString() const
Exports the sync results to QString.
Definition SyncResults.cpp:144
void addTargetResults(const TargetResults &aResults)
Adds target results to this object.
Definition SyncResults.cpp:172
SyncResults()
Constructs an empty sync results object.
Definition SyncResults.cpp:82
SyncResults & operator=(const SyncResults &aRhs)
Assignment operator.
Definition SyncResults.cpp:119
MinorCode
enum value
Definition SyncResults.h:89
QDomElement toXml(QDomDocument &aDoc) const
Exports the sync results to XML.
Definition SyncResults.cpp:128
~SyncResults()
Destructor.
Definition SyncResults.cpp:115
QList< TargetResults > targetResults() const
Gets the results of all targets.
Definition SyncResults.cpp:158
Sync results for one target.
Definition TargetResults.h:68
Definition SyncBackupAdaptor.h:40
Definition SyncResults.h:38
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