30 #ifndef _SML_DS_SERVER_H_ 31 #define _SML_DS_SERVER_H_ 37 SML_DS_EVENT_GOTCHANGES = 0,
38 SML_DS_EVENT_COMMITEDCHANGES = 1
41 typedef void (* SmlDsSessionConnectCb) (
SmlDsSession *dsession,
void *userdata);
42 typedef SmlBool (* SmlDsSessionAlertCb) (
SmlDsSession *dsession, SmlAlertType type,
const char *last,
const char *next,
void *userdata);
43 typedef void (* SmlDsSessionSyncCb) (
SmlDsSession *dsession,
unsigned int numchanges,
void *userdata);
44 typedef void (* SmlDsSessionEventCb) (
SmlDsSession *dsession, SmlDsEvent event,
void *userdata);
45 typedef SmlBool (* SmlDsSessionChangesCb) (
SmlDsSession *dsession, SmlChangeType type,
const char *uid,
char *data,
unsigned int size,
const char *contenttype,
void *userdata,
SmlError **error);
49 typedef void (* SmlDsSessionWriteCb) (
SmlDsSession *dsession,
SmlStatus *status,
const char *newuid,
void *userdata);
53 SmlDsServerType smlDsServerGetServerType(
SmlDsServer *server);
59 const char *smlDsServerGetLocation(
SmlDsServer *server);
60 const char *smlDsServerGetContentType(
SmlDsServer *server);
71 void smlDsSessionGetSync(
SmlDsSession *dsession, SmlDsSessionSyncCb chgCallback,
void *userdata);
72 void smlDsSessionGetEvent(
SmlDsSession *dsession, SmlDsSessionEventCb eventCallback,
void *userdata);
74 SmlBool smlDsSessionQueueChange(
SmlDsSession *dsession, SmlChangeType type,
const char *uid,
const char *data,
unsigned int size,
const char *contenttype, SmlDsSessionWriteCb callback,
void *userdata,
SmlError **error);
76 SmlBool smlDsSessionQueueMap(
SmlDsSession *dsession,
const char *uid,
const char *newuid,
SmlError **error);
78 const char *smlDsSessionGetLocation(
SmlDsSession *dsession);
79 const char *smlDsSessionGetContentType(
SmlDsSession *dsession);
85 typedef SmlErrorType (* SmlDsServerSanSessionCb) (
SmlDsServer *dsserver,
SmlSession *session, SmlAlertType type,
void *userdata);
86 void smlDsServerSetSanSessionCallback(
SmlDsServer *server, SmlDsServerSanSessionCb callback,
void *userdata);
90 typedef SmlErrorType (* SmlDsServerSanCb) (
SmlDsServer *dsserver, SmlAlertType type,
void *userdata);
91 void smlDsServerSetSanCallback(
SmlDsServer *server, SmlDsServerSanCb callback,
void *userdata) LIBSYNCML_DEPRECATED;
93 #endif //_SML_DS_SERVER_H_
void smlDsSessionGetChanges(SmlDsSession *dsession, SmlDsSessionChangesCb chgCallback, void *userdata)
Gets a already received sync command.
SmlBool smlDsSessionSendAlert(SmlDsSession *dsession, SmlAlertType type, const char *last, const char *next, SmlStatusReplyCb callback, void *userdata, SmlError **error)
Sends the alert to the remote side.
void smlDsSessionGetAlert(SmlDsSession *dsession, SmlDsSessionAlertCb callback, void *userdata)
Gets a already received alert.
SmlBool smlDsSessionSendSync(SmlDsSession *dsession, unsigned int num_changes, SmlStatusReplyCb callback, void *userdata, SmlError **error)
Start the sync command to send to the other side.
SmlBool smlDsSessionCloseMap(SmlDsSession *dsession, SmlStatusReplyCb callback, void *userdata, SmlError **error)
Closes the map command.
void smlDsServerSetConnectCallback(SmlDsServer *server, SmlDsSessionConnectCb callback, void *userdata)
Registers a callback that will get called once a client connects.
SmlBool smlDsSessionCloseSync(SmlDsSession *dsession, SmlError **error)
Closes the sync command.