forked from JumpMind/symmetric-ds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
56 lines (42 loc) · 1.56 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
SymmetricDS C Library Client
============================
This is the SymmetricDS client data synchronization engine implemented as
a C library.
How to Build
------------
The project was built with the Eclipse CDT, which generates makefiles that
can be run from command line. Choose either the Debug (larger size, with
symbols for debugging) or Release version and run the makefile from
that directory.
# cd symmetric-client-clib/Release
# make
Using the API
-------------
This example client will connect to a SQLite database, create its runtime
tables, and attempt to register and pull data from a server.
#include "libsymclient.h"
int main() {
SymProperties *prop = SymProperties_new(NULL);
prop->put(prop, SYM_PARAMETER_DB_URL, "sqlite:file:data.db");
prop->put(prop, SYM_PARAMETER_GROUP_ID, "client");
prop->put(prop, SYM_PARAMETER_EXTERNAL_ID, "001");
prop->put(prop, SYM_PARAMETER_REGISTRATION_URL, "http://localhost:31415/sync/server");
SymEngine *engine = SymEngine_new(NULL, prop);
engine->start(engine);
engine->pullService->pull_data(engine->pullService);
engine->stop(engine);
engine->destroy(engine);
}
Required software for compile/runtime:
--------------------------------------
Dependency: Curl
License: MIT/X derivate license
Website: http://curl.haxx.se/libcurl/
APT: sudo apt-get install libcurl4-gnutls-dev
Dependency: SQLite
License: Public Domain
Website: https://www.sqlite.org/
APT: sudo apt-get install sqlite3 libsqlite3 libsqlite3-dev
Dependency: LibCSV
License: LGPL v2
APT: https://sourceforge.net/projects/libcsv/