first draft of API documentation via Doxygen
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@15371 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
This commit is contained in:
parent
b97d0be337
commit
02333c6b39
|
@ -16,6 +16,10 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/** @cond API */
|
||||
/** @addtogroup ClientTest */
|
||||
/** @{ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
@ -354,7 +358,7 @@ public:
|
|||
*
|
||||
* @param refFile existing file with source reference items, NULL uses a dump of sync source A instead
|
||||
* @param copy a sync source which contains the copied items, begin/endSync will be called
|
||||
* @param raiseAssertion raise assertion if comparison yields differences (defaults to true)
|
||||
* @param raiseAssert raise assertion if comparison yields differences (defaults to true)
|
||||
*/
|
||||
void compareDatabases(const char *refFile, SyncSource ©, bool raiseAssert = true) {
|
||||
CPPUNIT_ASSERT(config.dump);
|
||||
|
@ -387,7 +391,7 @@ public:
|
|||
* insert artificial items, number of them determined by TEST_EVOLUTION_NUM_ITEMS
|
||||
* unless passed explicitly
|
||||
*
|
||||
* @param config determines which client is modified
|
||||
* @param createSource a factory for the sync source that is to be used
|
||||
* @param startIndex IDs are generated starting with this value
|
||||
* @param numItems number of items to be inserted if non-null, otherwise TEST_EVOLUTION_NUM_ITEMS is used
|
||||
* @param size minimum size for new items
|
||||
|
@ -2270,4 +2274,6 @@ void CheckSyncReport::check(SyncReport &report) const
|
|||
LOG.debug("Done with checking sync report.");
|
||||
}
|
||||
|
||||
/** @} */
|
||||
/** @endcond */
|
||||
#endif // ENABLE_INTEGRATION_TESTS
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* This class encapsulates logging and checking of a SyncReport.
|
||||
* When constructed with default parameters, no checking will be done.
|
||||
* Otherwise the sync report has to contain exactly the expected result.
|
||||
* When multiple sync sources are active, _all_ of them have to behave
|
||||
* When multiple sync sources are active, @b all of them have to behave
|
||||
* alike (which is how the tests are constructed).
|
||||
*
|
||||
* No item is ever supposed to fail.
|
||||
|
@ -357,20 +357,21 @@ class ClientTest {
|
|||
* in LOG has been set up already for the synchronization run
|
||||
* and should not be changed by the client.
|
||||
*
|
||||
* @param sources a -1 terminated array of sync source indices
|
||||
* @param activeSources a -1 terminated array of sync source indices
|
||||
* @param syncMode the synchronization mode to be used
|
||||
* @param checkReport has to be called after a successful or unsuccessful sync,
|
||||
* will dump the report and (optionally) check the result;
|
||||
* beware, the later may throw exceptions inside CPPUNIT macros
|
||||
* @param maxMsgSize >0: enable the maximum message size, else disable it
|
||||
* @param maxObjSize same as maxMsgSize for maximum object size
|
||||
* @param loSupport if TRUE, then the sync is expected to enable Large Object support
|
||||
* @param encoding if non-empty, then let client library transform all items
|
||||
* into this format (guaranteed to be not NULL)
|
||||
*
|
||||
* @return - 0 on success, an error otherwise (may also throw an exception)
|
||||
*/
|
||||
virtual int sync(
|
||||
const int *sources,
|
||||
const int *activeSources,
|
||||
SyncMode syncMode,
|
||||
const CheckSyncReport &checkReport,
|
||||
long maxMsgSize = 0,
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/** @cond API */
|
||||
/** @addtogroup ClientTest */
|
||||
/** @{ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
@ -220,3 +224,6 @@ int main(int argc, char* argv[])
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/** @} */
|
||||
/** @endcond */
|
||||
|
|
|
@ -16,6 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/** @cond API */
|
||||
/** @addtogroup ClientTest */
|
||||
/** @{ */
|
||||
|
||||
|
||||
/**
|
||||
* This code uses the ClientTest and FILESyncSource to test real
|
||||
* synchronization against a server. More than one FILESyncSource can
|
||||
|
@ -47,16 +52,21 @@
|
|||
* (only works on Unix)
|
||||
*
|
||||
* For example, on Linux running
|
||||
* CLIENT_TEST_SERVER=funambol CLIENT_TEST_SOURCES=vcard30,ical20 ./client-test
|
||||
* @verbatim
|
||||
CLIENT_TEST_SERVER=funambol CLIENT_TEST_SOURCES=vcard30,ical20 ./client-test
|
||||
@endverbatim
|
||||
*
|
||||
* expects the following configuration layout:
|
||||
* ~/.sync4j/client-test/
|
||||
* funambol_1/spds/
|
||||
* syncml/config.text
|
||||
* sources/
|
||||
* vcard30/config.txt
|
||||
* ical20/config.txt
|
||||
* funambol_1/spds/
|
||||
* <same as for funambol_1>
|
||||
* @verbatim
|
||||
~/.sync4j/client-test/
|
||||
funambol_1/spds/
|
||||
syncml/config.text
|
||||
sources/
|
||||
vcard30/config.txt
|
||||
ical20/config.txt
|
||||
funambol_1/spds/
|
||||
<same as for funambol_1>
|
||||
@endverbatim
|
||||
*
|
||||
* If any of the configuration nodes does not exist yet, then it will
|
||||
* be created, but further information may have to be added, in
|
||||
|
@ -72,10 +82,13 @@
|
|||
* a "client-data" directory created in the current working directory.
|
||||
*
|
||||
* Here is an example of using the CLIENT_TEST_LOG:
|
||||
* CLIENT_TEST_SERVER=funambol \
|
||||
* CLIENT_TEST_LOG=/opt/Funambol-3.0/ds-server/logs/funambol_ds.log \
|
||||
* CLIENT_TEST_SOURCES=vcard30 \
|
||||
* ./client-test
|
||||
* @verbatim
|
||||
CLIENT_TEST_SERVER=funambol \
|
||||
CLIENT_TEST_LOG=/opt/Funambol-3.0/ds-server/logs/funambol_ds.log \
|
||||
CLIENT_TEST_SOURCES=vcard30 \
|
||||
./client-test
|
||||
@endverbatim
|
||||
*
|
||||
* will create files with the suffix .client.1.log for synchronizations with
|
||||
* the first client and .client.2.log for the second client. The base name
|
||||
* of these files is unique, so the corresponding part of the server log
|
||||
|
@ -307,4 +320,6 @@ private:
|
|||
TestFileSource testFileSource;
|
||||
} registerTest;
|
||||
|
||||
/** @} */
|
||||
/** @endcond */
|
||||
#endif // ENABLE_INTEGRATION_TESTS
|
||||
|
|
Loading…
Reference in New Issue