#include <SyncSourceReport.h>
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 |
| SyncSourceReport & | operator= (const SyncSourceReport &ssr) |
Static Public Attributes | |
| static const char *const | targets [] |
| static const char *const | commands [] |
Definition at line 67 of file SyncSourceReport.h.
| SyncSourceReport::SyncSourceReport | ( | const char * | name = NULL |
) |
| SyncSourceReport::SyncSourceReport | ( | SyncSourceReport & | ssr | ) |
| virtual SyncSourceReport::~SyncSourceReport | ( | ) | [virtual] |
| 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.
| 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.
| 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.
| 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 | |||
| ) |
Referenced by CheckSyncReport::check(), and SourceList::syncDone().
| 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.
| target | to select if client/server side (values = CLIENT - SERVER) | |
| command | to select the desired list of ItemReport (values = Add - Replace - Delete) |
| 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 | ) |
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.
1.5.7.1