SyncReport Class Reference
[Client]

#include <SyncReport.h>

Collaboration diagram for SyncReport:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SyncReport ()
 SyncReport (SyncReport &sr)
 SyncReport (AbstractSyncConfig &config)
virtual ~SyncReport ()
const int getLastErrorCode () const
const char * getLastErrorMsg () const
const unsigned int getSyncSourceReportCount () const
void setLastErrorCode (const int code)
void setLastErrorMsg (const char *msg)
SyncSourceReportgetSyncSourceReport (const char *name) const
SyncSourceReportgetSyncSourceReport (unsigned int index) const
void setSyncSourceReports (AbstractSyncConfig &config)
void toString (StringBuffer &str, bool verbose=false)
SyncReportoperator= (const SyncReport &sr)


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.

Definition at line 69 of file SyncReport.h.


Constructor & Destructor Documentation

SyncReport::SyncReport (  ) 

SyncReport::SyncReport ( SyncReport sr  ) 

SyncReport::SyncReport ( AbstractSyncConfig config  ) 

virtual SyncReport::~SyncReport (  )  [virtual]


Member Function Documentation

const int SyncReport::getLastErrorCode (  )  const

Returns the last error code for the whole sync; there are other error codes attached to each sync source.

const char* SyncReport::getLastErrorMsg (  )  const

the error description corresponding to getLastErrorCode(), might be NULL even if an error occurred

SyncSourceReport* SyncReport::getSyncSourceReport ( unsigned int  index  )  const

return pointer to internal SyncSourceReport object given its index (>=0, < getSyncSourceReportCount())

SyncSourceReport* SyncReport::getSyncSourceReport ( const char *  name  )  const

return pointer to internal SyncSourceReport object given the source name

Referenced by CheckSyncReport::check(), and SourceList::syncDone().

const unsigned int SyncReport::getSyncSourceReportCount (  )  const

returns number of sync source reports stored in this report

SyncReport& SyncReport::operator= ( const SyncReport sr  )  [inline]

Assign operator

Definition at line 155 of file SyncReport.h.

void SyncReport::setLastErrorCode ( const int  code  ) 

void SyncReport::setLastErrorMsg ( const char *  msg  ) 

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 Sat Oct 18 17:17:05 2008 for SyncEvolution and Funambol by  doxygen 1.5.7.1