21 #include "transport.h" 22 #include "libsyncml/sml_error_internals.h" 23 #include "libsyncml/sml_support.h" 25 SmlBool smlDataSyncTransportObexClientInit(
29 smlTrace(TRACE_ENTRY,
"%s(%p, %p)", __func__, dsObject, error);
35 SML_TRANSPORT_CONFIG_URL, dsObject->url,
39 smlTrace(TRACE_EXIT,
"%s - TRUE", __func__);
48 smlTrace(TRACE_ENTRY,
"%s(%p, %p)", __func__, dsObject, error);
53 if (!smlTransportConnect(dsObject->tsp, error))
58 SmlNotificationVersion sanVersion = SML_SAN_VERSION_UNKNOWN;
59 switch(dsObject->version)
62 sanVersion = SML_SAN_VERSION_10;
65 sanVersion = SML_SAN_VERSION_11;
68 sanVersion = SML_SAN_VERSION_12;
70 case SML_VERSION_UNKNOWN:
71 smlErrorSet(error, SML_ERROR_GENERIC,
"Unknown SyncML SAN Version.");
78 SML_SAN_UIMODE_UNSPECIFIED,
79 SML_SAN_INITIATOR_USER, 1,
80 dsObject->identifier,
"/",
81 dsObject->useWbxml ? SML_MIMETYPE_WBXML : SML_MIMETYPE_XML,
86 smlNotificationSetManager(san, dsObject->manager);
89 if (dsObject->username != NULL && strlen(dsObject->username))
98 smlNotificationSetCred(san, cred);
103 GList *o = dsObject->datastores;
104 for (; o; o = o->next) {
106 if (!smlDsServerAddSan(datastore->server, san, error))
110 if (!smlNotificationSend(san, dsObject->tsp, error))
113 smlNotificationFree(san);
116 smlTrace(TRACE_EXIT,
"%s", __func__);
This object represents an OMA DS datastore.
SmlBool smlTransportSetConfigOption(SmlTransport *tsp, const char *name, const char *value, SmlError **error)
Sets a configuration parameter.
const char * smlErrorPrint(SmlError **error)
Returns the message of the error.
This is the central synchronization object.
void smlTrace(SmlTraceType type, const char *message,...)
Used for tracing the application.
void smlErrorSet(SmlError **error, SmlErrorType type, const char *format,...)
Sets the error.