SyncSourceReport Class Reference
[Client]

#include <SyncSourceReport.h>

List of all members.

Public Member Functions

 SyncSourceReport (const char *name=NULL)
 SyncSourceReport (SyncSourceReport &ssr)
virtual ~SyncSourceReport ()
const int getLastErrorCode () const
const SourceState getState () const
const char * getLastErrorMsg () const
const char * getSourceName () const
void setLastErrorCode (const int code)
void setState (const SourceState s)
void setLastErrorMsg (const char *msg)
void setSourceName (const char *name)
bool checkState ()
ItemReport * getItemReport (const char *target, const char *command, int index)
int getItemReportCount (const char *target, const char *command)
int getItemReportSuccessfulCount (const char *target, const char *command)
int getItemReportFailedCount (const char *target, const char *command)
int getItemReportAlreadyExistCount (const char *target, const char *command)
void addItem (const char *target, const char *command, const WCHAR *ID, const int status, const WCHAR *statusMessage)
ArrayList * getList (const char *target, const char *command) const
SyncSourceReportoperator= (const SyncSourceReport &ssr)

Static Public Attributes

static const char *const targets []
static const char *const commands []


Detailed Description

SyncSourceReport class rapresents the report of each SyncSource synchronized. It is used to store the sync results for a specific syncsource, its state (active/inactive/error) and the status of each item synchronized (both on client and server side).

Definition at line 67 of file SyncSourceReport.h.


Constructor & Destructor Documentation

SyncSourceReport::SyncSourceReport ( const char *  name = NULL  ) 

SyncSourceReport::SyncSourceReport ( SyncSourceReport ssr  ) 

virtual SyncSourceReport::~SyncSourceReport (  )  [virtual]


Member Function Documentation

void SyncSourceReport::addItem ( const char *  target,
const char *  command,
const WCHAR *  ID,
const int  status,
const WCHAR *  statusMessage 
)

Used to add an ItemReport to a specific list. This function is called inside API to store the status of each item added/modified/deleted on client and on server.

Parameters:
target to select if client/server side (values = CLIENT - SERVER)
command to select the desired list of ItemReport (values = Add - Replace - Delete)
ID the LUID of item (used to create the ItemReport element)
status the status code of the operation (used to create the ItemReport element)
statusMessage the status message associated to the operation (used to create the ItemReport element)

bool SyncSourceReport::checkState (  ) 

Check the state of this source. Returns true if source is active (state = SOURCE_ACTIVE).

ItemReport* SyncSourceReport::getItemReport ( const char *  target,
const char *  command,
int  index 
)

Get internal pointer to a specific ItemReport.

Parameters:
target to select if client/server side (values = CLIENT - SERVER)
command to select the desired list of ItemReport (values = Add - Replace - Delete)
index the index of desired item inside the list

int SyncSourceReport::getItemReportAlreadyExistCount ( const char *  target,
const char *  command 
)

int SyncSourceReport::getItemReportCount ( const char *  target,
const char *  command 
)

Return the total number of ItemReport for a specific list.

Parameters:
target to select if client/server side (values = CLIENT - SERVER)
command to select the desired list of ItemReport (values = Add - Replace - Delete)

Referenced by SourceList::syncDone().

int SyncSourceReport::getItemReportFailedCount ( const char *  target,
const char *  command 
)

Referenced by CheckSyncReport::check().

int SyncSourceReport::getItemReportSuccessfulCount ( const char *  target,
const char *  command 
)

const int SyncSourceReport::getLastErrorCode (  )  const

source specific error code, see also SyncReport::getLastErrorCode()

const char* SyncSourceReport::getLastErrorMsg (  )  const

source specific error message, see also SyncReport::getLastErrorMsg()

ArrayList* SyncSourceReport::getList ( const char *  target,
const char *  command 
) const

Utility to switch on the right list, based on target and command.

Parameters:
target to select if client/server side (values = CLIENT - SERVER)
command to select the desired list of ItemReport (values = Add - Replace - Delete)
Returns:
a pointer to the desired ArrayList

const char* SyncSourceReport::getSourceName (  )  const

the unique name of the source that this report is about

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

const SourceState SyncSourceReport::getState (  )  const

the current state of the source, see SourceState

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

SyncSourceReport& SyncSourceReport::operator= ( const SyncSourceReport ssr  )  [inline]

Assign operator

Definition at line 206 of file SyncSourceReport.h.

void SyncSourceReport::setLastErrorCode ( const int  code  ) 

void SyncSourceReport::setLastErrorMsg ( const char *  msg  ) 

void SyncSourceReport::setSourceName ( const char *  name  ) 

void SyncSourceReport::setState ( const SourceState  s  ) 


Member Data Documentation

const char* const SyncSourceReport::commands[] [static]

all valid strings for "command", NULL terminated

Definition at line 201 of file SyncSourceReport.h.

const char* const SyncSourceReport::targets[] [static]

all valid strings for "target", NULL terminated

Definition at line 196 of file SyncSourceReport.h.


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

Generated on Sat Oct 18 17:17:06 2008 for SyncEvolution and Funambol by  doxygen 1.5.7.1