22 #ifndef _SML_TRANSPORT_H_ 23 #define _SML_TRANSPORT_H_ 25 typedef enum SmlTransportEventType {
26 SML_TRANSPORT_EVENT_CONNECT_DONE,
27 SML_TRANSPORT_EVENT_DISCONNECT_DONE,
28 SML_TRANSPORT_EVENT_ERROR,
29 SML_TRANSPORT_EVENT_DATA
30 } SmlTransportEventType;
33 SML_TRANSPORT_CONNECTION_TYPE_UNKNOWN = 0,
34 SML_TRANSPORT_CONNECTION_TYPE_SERIAL = 1,
35 SML_TRANSPORT_CONNECTION_TYPE_BLUETOOTH = 2,
36 SML_TRANSPORT_CONNECTION_TYPE_IRDA = 3,
37 SML_TRANSPORT_CONNECTION_TYPE_NET = 4,
38 SML_TRANSPORT_CONNECTION_TYPE_USB = 5
39 } SmlTransportConnectionType;
50 void smlTransportSetEventCallback(
SmlTransport *tsp, SmlTransportEventCb callback,
void *userdata);
55 SmlTransportData *smlTransportDataNew(
char *data,
unsigned long size, SmlMimeType mimetype, SmlBool ownsData,
SmlError **error);
60 void smlLinkDeref(
SmlLink *link);
67 void smlTransportStop(
SmlTransport *tsp) LIBSYNCML_DEPRECATED;
74 #endif //_SML_TRANSPORT_H_ SmlBool smlTransportSetConfigOption(SmlTransport *tsp, const char *name, const char *value, SmlError **error)
Sets a configuration parameter.
SmlBool smlTransportFinalize(SmlTransport *tsp, SmlError **error)
Finalizes the transport.
SmlBool smlTransportSetConnectionType(SmlTransport *tsp, SmlTransportConnectionType type, SmlError **error)
Sets a configuration parameter.
SmlTransport * smlTransportNew(SmlTransportType type, SmlError **error)
Creates a new transport.
void smlTransportFree(SmlTransport *tsp)
Frees the given transport.
SmlBool smlTransportInitialize(SmlTransport *tsp, SmlError **error)
Initializes the transport with the given config.