SyncSourceReport Class Reference
[Sync Client]

SyncSourceReport class rapresents the report of each SyncSource synchronized. More...

#include <SyncSourceReport.h>

List of all members.

Public Member Functions

 SyncSourceReport (const char *name=NULL)
 SyncSourceReport (SyncSourceReport &ssr)
const int getLastErrorCode () const
 source specific error code, see also SyncReport::getLastErrorCode()
const SourceState getState () const
 the current state of the source, see SourceState
const char * getLastErrorMsg () const
 source specific error message, see also SyncReport::getLastErrorMsg()
const char * getSourceName () const
 the unique name of the source that this report is about
void setLastErrorCode (const int code)
void setState (const SourceState s)
void setLastErrorMsg (const char *msg)
void setSourceName (const char *name)
bool checkState ()
 Check the state of this source.
ItemReport * getItemReport (const char *target, const char *command, int index)
 Get internal pointer to a specific ItemReport.
int getItemReportCount (const char *target, const char *command)
 Return the total number of ItemReport for a specific list.
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)
 Used to add an ItemReport to a specific list.
ArrayList * getList (const char *target, const char *command) const
 Utility to switch on the right list, based on target and command.
SyncSourceReportoperator= (const SyncSourceReport &ssr)
 Assign operator.

Static Public Attributes

static const char *const targets []
 all valid strings for "target", NULL terminated
static const char *const commands []
 all valid strings for "command", NULL terminated


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).


Member Function Documentation

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::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)

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)

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


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