SyncReport Class Reference
[Sync Client]

The SyncReport class is used to summarize all results of a single synchronization. More...

#include <SyncReport.h>

Collaboration diagram for SyncReport:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SyncReport (SyncReport &sr)
 SyncReport (SyncManagerConfig &config)
const int getLastErrorCode () const
 Returns the last error code for the whole sync; there are other error codes attached to each sync source.
const char * getLastErrorMsg () const
 the error description corresponding to getLastErrorCode(), might be NULL even if an error occurred
const unsigned int getSyncSourceReportCount () const
 returns number of sync source reports stored in this report
void setLastErrorCode (const int code)
void setLastErrorMsg (const char *msg)
SyncSourceReportgetSyncSourceReport (const char *name) const
 return pointer to internal SyncSourceReport object given the source name
SyncSourceReportgetSyncSourceReport (unsigned int index) const
 return pointer to internal SyncSourceReport object given its index (>=0, < getSyncSourceReportCount())
void setSyncSourceReports (SyncManagerConfig &config)
 Create ssReport array from config.
void toString (StringBuffer &str, BOOL verbose=FALSE)
 Appends a textual representation of the sync report at the end of the string buffer, without clearing it first.
SyncReportoperator= (const SyncReport &sr)
 Assign operator.

Detailed Description

The SyncReport class is used to summarize all results of a single synchronization.

During the synchronization process, all results about different operations are stored in a SyncReport object, so the client will be able to get these informations at the end. Accessing this object a client can easily know for example the outcome of each source synchronized, retrieve the number of items modified on both sides, and the status code of each one.


Member Function Documentation

void SyncReport::setSyncSourceReports ( SyncManagerConfig config  ) 

Create ssReport array from config.

The array is allocated new, will be freed in the desctructor. SyncSourceReports are all owned here by SyncReport, each SyncSource object has a link to its correspondent (external) report, but does not own it. SyncSourceReports are linked during SyncClient::sync().

Parameters:
config,: the SyncManager config to get source number/names.

void SyncReport::toString ( StringBuffer &  str,
BOOL  verbose = FALSE 
)

Appends a textual representation of the sync report at the end of the string buffer, without clearing it first.

Parameters:
str buffer to which text gets appended
verbose if true, then detailed information about each item is printed, otherwise only a summary


The documentation for this class was generated from the following file:
Generated on Fri Apr 27 12:29:23 2007 for Funambol C++ Client Library by  doxygen 1.5.2