Client


Classes

class  CheckSyncReport
class  ClientTest
class  CreateSource
class  LocalTests
class  SyncTests
class  ArrayListKeyValueStore
class  KeyValueStore
class  PropertyFile
class  CacheSyncSource
class  DMTClientConfig
class  SyncClient
class  AbstractSyncConfig
class  AbstractSyncSourceConfig
class  SyncManager
class  SyncManagerConfig
class  SyncReport
class  SyncSource
class  SyncSourceConfig
class  SyncSourceReport

Defines

#define CLIENT_TEST_EQUAL(_prefix, _expected, _actual)
#define SOURCE_ASSERT_NO_FAILURE(_source, _x)
#define SOURCE_ASSERT(_source, _x)
#define SOURCE_ASSERT_EQUAL(_source, _value, _x)
#define SOURCE_ASSERT_MESSAGE(_message, _source, _x)
#define ADD_TEST(_class, _function)   addTest(new CppUnit::TestCaller<_class>(getName() + "::" #_function, &_class::_function, *this))
#define CLIENT_TEST_EQUAL(_prefix, _expected, _actual)
#define SOURCE_ASSERT_NO_FAILURE(_source, _x)
#define SOURCE_ASSERT(_source, _x)
#define SOURCE_ASSERT_EQUAL(_source, _value, _x)
#define SOURCE_ASSERT_MESSAGE(_message, _source, _x)
#define ADD_TEST(_class, _function)   addTest(new CppUnit::TestCaller<_class>(getName() + "::" #_function, &_class::_function, *this))
#define CACHE_FILE_NAME   "cache_items.dat"
#define DATA_SIZE_TOLERANCE   1.06
#define CLIENT   "Client"
#define SERVER   "Server"

Typedefs

typedef std::list< std::string > UIDList
typedef std::list< std::string > UIDList

Enumerations

enum  itemType {
  NEW_ITEMS, UPDATED_ITEMS, DELETED_ITEMS, TOTAL_ITEMS,
  NEW_ITEMS, UPDATED_ITEMS, DELETED_ITEMS, TOTAL_ITEMS
}
enum  itemType {
  NEW_ITEMS, UPDATED_ITEMS, DELETED_ITEMS, TOTAL_ITEMS,
  NEW_ITEMS, UPDATED_ITEMS, DELETED_ITEMS, TOTAL_ITEMS
}
enum  SyncManagerState {
  STATE_START = 0, STATE_PKG1_SENDING = 1, STATE_PKG1_SENT = 2, STATE_PKG3_SENDING = 3,
  STATE_PKG3_SENT = 4, STATE_PKG5_SENDING = 5, STATE_PKG5_SENT = 6
}
enum  SourceState { SOURCE_ACTIVE = 0, SOURCE_INACTIVE = 1, SOURCE_ERROR = 2 }

Functions

int countItemsOfType (SyncSource *source, itemType type)
UIDList listItemsOfType (SyncSource *source, itemType type)

Detailed Description


Define Documentation

#define ADD_TEST ( _class,
_function   )     addTest(new CppUnit::TestCaller<_class>(getName() + "::" #_function, &_class::_function, *this))

convenience macro for adding a test name like a function, to be used inside addTests() of an instance of that class

Parameters:
_class class which contains the function
_function a function without parameters in that class

Definition at line 842 of file ClientTest.h.

#define ADD_TEST ( _class,
_function   )     addTest(new CppUnit::TestCaller<_class>(getName() + "::" #_function, &_class::_function, *this))

convenience macro for adding a test name like a function, to be used inside addTests() of an instance of that class

Parameters:
_class class which contains the function
_function a function without parameters in that class

Definition at line 858 of file ClientTest.h.

Referenced by SyncTests::addTests(), LocalTests::addTests(), and EvolutionLocalTests::addTests().

#define CACHE_FILE_NAME   "cache_items.dat"

Definition at line 59 of file CacheSyncSource.h.

#define CLIENT   "Client"

Definition at line 52 of file SyncReport.h.

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

#define CLIENT_TEST_EQUAL ( _prefix,
_expected,
_actual   ) 

Value:

CPPUNIT_ASSERT_EQUAL_MESSAGE( std::string(_prefix) + ": " + #_expected + " == " + #_actual, \
                                  _expected, \
                                  _actual )
assert equality, include string in message if unequal

Definition at line 801 of file ClientTest.h.

#define CLIENT_TEST_EQUAL ( _prefix,
_expected,
_actual   ) 

Value:

CPPUNIT_ASSERT_EQUAL_MESSAGE( std::string(_prefix) + ": " + #_expected + " == " + #_actual, \
                                  _expected, \
                                  _actual )
assert equality, include string in message if unequal

Definition at line 817 of file ClientTest.h.

Referenced by CheckSyncReport::check().

#define DATA_SIZE_TOLERANCE   1.06

Definition at line 55 of file SyncManager.h.

#define SERVER   "Server"

Definition at line 53 of file SyncReport.h.

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

#define SOURCE_ASSERT ( _source,
_x   ) 

Value:

{ \
    CPPUNIT_ASSERT(_x); \
    CPPUNIT_ASSERT((_source) && (!(_source)->getReport() || (_source)->getReport()->getState() != SOURCE_ERROR)); \
}
check _x for true and then the status of the _source pointer

Definition at line 814 of file ClientTest.h.

#define SOURCE_ASSERT ( _source,
_x   ) 

Value:

{ \
    CPPUNIT_ASSERT(_x); \
    CPPUNIT_ASSERT((_source) && (!(_source)->getReport() || (_source)->getReport()->getState() != SOURCE_ERROR)); \
}
check _x for true and then the status of the _source pointer

Definition at line 830 of file ClientTest.h.

Referenced by LocalTests::deleteAll(), LocalTests::insert(), LocalTests::testLinkedItemsChildChangesParent(), LocalTests::testLinkedItemsInsertBothUpdateParent(), LocalTests::testLinkedItemsRemoveNormal(), LocalTests::testLinkedItemsRemoveParentFirst(), and LocalTests::update().

#define SOURCE_ASSERT_EQUAL ( _source,
_value,
_x   ) 

Value:

{ \
    CPPUNIT_ASSERT_EQUAL(_value, _x); \
    CPPUNIT_ASSERT((_source) && (!(_source)->getReport() || (_source)->getReport()->getState() != SOURCE_ERROR)); \
}
check that _x evaluates to a specific value and then the status of the _source pointer

Definition at line 821 of file ClientTest.h.

#define SOURCE_ASSERT_EQUAL ( _source,
_value,
_x   ) 

#define SOURCE_ASSERT_MESSAGE ( _message,
_source,
_x   ) 

Value:

{ \
    CPPUNIT_ASSERT_MESSAGE((_message), (_x)); \
    CPPUNIT_ASSERT((_source) && (!(_source)->getReport() || (_source)->getReport()->getState() != SOURCE_ERROR)); \
}
same as SOURCE_ASSERT() with a specific failure message

Definition at line 828 of file ClientTest.h.

#define SOURCE_ASSERT_MESSAGE ( _message,
_source,
_x   ) 

Value:

{ \
    CPPUNIT_ASSERT_MESSAGE((_message), (_x)); \
    CPPUNIT_ASSERT((_source) && (!(_source)->getReport() || (_source)->getReport()->getState() != SOURCE_ERROR)); \
}
same as SOURCE_ASSERT() with a specific failure message

Definition at line 844 of file ClientTest.h.

Referenced by LocalTests::deleteAll(), and LocalTests::testIterateTwice().

#define SOURCE_ASSERT_NO_FAILURE ( _source,
_x   ) 

Value:

{ \
    CPPUNIT_ASSERT_NO_THROW(_x); \
    CPPUNIT_ASSERT((_source) && (!(_source)->getReport() || (_source)->getReport()->getState() != SOURCE_ERROR)); \
}
execute _x and then check the status of the _source pointer

Definition at line 807 of file ClientTest.h.

#define SOURCE_ASSERT_NO_FAILURE ( _source,
_x   ) 


Typedef Documentation

typedef std::list<std::string> UIDList

Definition at line 654 of file ClientTest.h.

typedef std::list<std::string> UIDList

Definition at line 670 of file ClientTest.h.


Enumeration Type Documentation

enum itemType

Enumerator:
NEW_ITEMS 
UPDATED_ITEMS 
DELETED_ITEMS 
TOTAL_ITEMS 
NEW_ITEMS 
UPDATED_ITEMS 
DELETED_ITEMS 
TOTAL_ITEMS 

Definition at line 639 of file ClientTest.h.

enum itemType

Enumerator:
NEW_ITEMS 
UPDATED_ITEMS 
DELETED_ITEMS 
TOTAL_ITEMS 
NEW_ITEMS 
UPDATED_ITEMS 
DELETED_ITEMS 
TOTAL_ITEMS 

Definition at line 655 of file ClientTest.h.

Possible states of syncsource (state member)

Enumerator:
SOURCE_ACTIVE  source is part of the current sync and in a sane state
SOURCE_INACTIVE  source was excluded from the current sync before starting it
SOURCE_ERROR  source encountered and error sometime during the sync

Definition at line 54 of file SyncSourceReport.h.

Enumerator:
STATE_START 
STATE_PKG1_SENDING 
STATE_PKG1_SENT 
STATE_PKG3_SENDING 
STATE_PKG3_SENT 
STATE_PKG5_SENDING 
STATE_PKG5_SENT 

Definition at line 59 of file SyncManager.h.


Function Documentation

int countItemsOfType ( SyncSource source,
itemType  type 
)

utility function which counts items of a certain kind known to the sync source

Parameters:
source valid source ready to iterate; NULL triggers an assert
itemType determines which iterator functions are used
Returns:
number of valid items iterated over

Definition at line 164 of file ClientTest.cpp.

References listItemsOfType().

UIDList listItemsOfType ( SyncSource source,
itemType  type 
)

generates list of UIDs in the specified kind of items

Definition at line 136 of file ClientTest.cpp.

References DELETED_ITEMS, NEW_ITEMS, TOTAL_ITEMS, and UPDATED_ITEMS.

Referenced by countItemsOfType().


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