Sync results for one target.
More...
#include <TargetResults.h>
|
enum | ItemOperation { ITEM_ADDED
, ITEM_DELETED
, ITEM_MODIFIED
} |
|
enum | ItemOperationStatus { ITEM_OPERATION_SUCCEEDED
, ITEM_OPERATION_FAILED
} |
|
|
| TargetResults (const TargetResults &aSource) |
| Copy constructor.
|
|
| TargetResults (const QString &aTargetName, ItemCounts aLocalItems=ItemCounts(), ItemCounts aRemoteItems=ItemCounts()) |
| Constructor.
|
|
| TargetResults (const QDomElement &aRoot) |
| Constructs TargetResults from XML.
|
|
| ~TargetResults () |
| Destructor.
|
|
TargetResults & | operator= (const TargetResults &aRhs) |
| Assignment operator.
|
|
QDomElement | toXml (QDomDocument &aDoc) const |
| Exports the target results to XML.
|
|
QString | targetName () const |
| Gets the target name.
|
|
ItemCounts | localItems () const |
| Gets the counts of items added, deleted and modified locally.
|
|
ItemCounts | remoteItems () const |
| Gets the counts of items added, deleted and modified at remote.
|
|
void | addLocalDetails (const QString &aUid, ItemOperation aOperation, ItemOperationStatus aStatus=ITEM_OPERATION_SUCCEEDED, const QString &aMessage=QString()) |
| Add some details on the local changes done during the sync process.
|
|
void | addRemoteDetails (const QString &aUid, ItemOperation aOperation, ItemOperationStatus aStatus=ITEM_OPERATION_SUCCEEDED, const QString &aMessage=QString()) |
| Add some details on the remote changes done during the sync process.
|
|
QList< QString > | localDetails (ItemOperation aOperation, ItemOperationStatus aStatus) const |
| Gets the details, if any for changes done local during a sync process.
|
|
Q_INVOKABLE QString | localMessage (const QString &aUid) const |
| Gets a possible message related to the a given item.
|
|
QList< QString > | remoteDetails (ItemOperation aOperation, ItemOperationStatus aStatus) const |
| Gets the details, if any for changes done remote during a sync process.
|
|
Q_INVOKABLE QString | remoteMessage (const QString &aUid) const |
| Gets a possible message related to the a given item.
|
|
Sync results for one target.
TargetResults contains information about how many items were added, deleted and modified in a specific sync target during the sync session.
◆ TargetResults() [1/3]
Copy constructor.
- Parameters
-
◆ TargetResults() [2/3]
Constructor.
- Parameters
-
aTargetName | Name of the target. |
aLocalItems | Counts of local items. |
aRemoteItems | Counts of remote items. |
◆ TargetResults() [3/3]
TargetResults::TargetResults |
( |
const QDomElement & |
aRoot | ) |
|
|
explicit |
Constructs TargetResults from XML.
- Parameters
-
aRoot | Root element of the XML representation. |
◆ addLocalDetails()
void TargetResults::addLocalDetails |
( |
const QString & |
aUid, |
|
|
ItemOperation |
aOperation, |
|
|
ItemOperationStatus |
aStatus = ITEM_OPERATION_SUCCEEDED , |
|
|
const QString & |
aMessage = QString() |
|
) |
| |
Add some details on the local changes done during the sync process.
Provide additional information per item basis on the local changes done during the sync process. If the operation succeeded, the associated item count is increase by one.
- Parameters
-
aUid | A way for a sync plugin to identify the changed item. |
aOperation | The operation done on the item (addition, deletion or modification). |
aStatus | Particular status for this item sync operation. |
aMessage | Additional information related to this item operation. |
◆ addRemoteDetails()
void TargetResults::addRemoteDetails |
( |
const QString & |
aUid, |
|
|
ItemOperation |
aOperation, |
|
|
ItemOperationStatus |
aStatus = ITEM_OPERATION_SUCCEEDED , |
|
|
const QString & |
aMessage = QString() |
|
) |
| |
Add some details on the remote changes done during the sync process.
Provide additional information per item basis on the remote changes done during the sync process. If the operation succeeded, the associated item count is increase by one.
- Parameters
-
aUid | A way for a sync plugin to identify the changed item. |
aOperation | The operation done on the item (addition, deletion or modification). |
aStatus | Particular status for this item sync operation. |
aMessage | Additional information related to this item operation. |
◆ localDetails()
QList< QString > TargetResults::localDetails |
( |
ItemOperation |
aOperation, |
|
|
ItemOperationStatus |
aStatus |
|
) |
| const |
Gets the details, if any for changes done local during a sync process.
- Parameters
-
aOperation | The operation the details are related to (addition, deletion or modification). |
aStatus | The kind of status for the operation (success or failure). |
- Returns
- A list of UIDs that correspond to this operation and status. The meaning of these UIDs is defined by the SyncPlugin which generated the log.
◆ localItems()
Gets the counts of items added, deleted and modified locally.
- Returns
- Item counts.
◆ localMessage()
QString TargetResults::localMessage |
( |
const QString & |
aUid | ) |
const |
Gets a possible message related to the a given item.
- Parameters
-
- Returns
- A message stored in the log related to this particular item.
◆ operator=()
Assignment operator.
- Parameters
-
◆ remoteDetails()
QList< QString > TargetResults::remoteDetails |
( |
ItemOperation |
aOperation, |
|
|
ItemOperationStatus |
aStatus |
|
) |
| const |
Gets the details, if any for changes done remote during a sync process.
- Parameters
-
aOperation | The operation the details are related to (addition, deletion or modification). |
aStatus | The kind of status for the operation (success or failure). |
- Returns
- A list of UIDs that correspond to this operation and status. The meaning of these UIDs is defined by the SyncPlugin which generated the log.
◆ remoteItems()
Gets the counts of items added, deleted and modified at remote.
- Returns
- Item counts.
◆ remoteMessage()
QString TargetResults::remoteMessage |
( |
const QString & |
aUid | ) |
const |
Gets a possible message related to the a given item.
- Parameters
-
- Returns
- A message stored in the log related to this particular item.
◆ targetName()
QString TargetResults::targetName |
( |
| ) |
const |
Gets the target name.
- Returns
- Target name.
◆ toXml()
QDomElement TargetResults::toXml |
( |
QDomDocument & |
aDoc | ) |
const |
Exports the target results to XML.
- Parameters
-
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. |
- Returns
- Root element of the created XML.
The documentation for this class was generated from the following files: