SyncReport Class Reference
[Client]

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

#include <SyncReport.h>

Collaboration diagram for SyncReport:
[legend]

List of all members.

Public Member Functions

 SyncReport (SyncReport &sr)
 SyncReport (AbstractSyncConfig &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 (AbstractSyncConfig &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.

Private Member Functions

void initialize ()
void assign (const SyncReport &sr)

Private Attributes

int lastErrorCode
char * lastErrorMsg
SyncSourceReportssReport
unsigned int ssReportCount


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 ( AbstractSyncConfig 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

Referenced by CheckSyncReport::check().


The documentation for this class was generated from the following file:

Generated on Tue Apr 6 13:00:43 2010 for Funambol Outlook Plug-in Library by  doxygen 1.5.7.1