libsyncml
0.5.4
|
Transports can be used to connect to other syncml capable devices and servers. More...
![]() |
Transport Management | |
These functions allow to create, delete, initialize and finalize transports | |
SmlTransport * | smlTransportNew (SmlTransportType type, SmlError **error) |
Creates a new transport. More... | |
void | smlTransportFree (SmlTransport *tsp) |
Frees the given transport. More... | |
SmlBool | smlTransportSetConfigOption (SmlTransport *tsp, const char *name, const char *value, SmlError **error) |
Sets a configuration parameter. More... | |
SmlBool | smlTransportSetConnectionType (SmlTransport *tsp, SmlTransportConnectionType type, SmlError **error) |
Sets a configuration parameter. More... | |
SmlBool | smlTransportInitialize (SmlTransport *tsp, SmlError **error) |
Initializes the transport with the given config. More... | |
SmlBool | smlTransportSetResponseURI (SmlTransport *tsp, const char *uri, SmlError **error) |
Sets the response URI after initialization. More... | |
SmlBool | smlTransportFinalize (SmlTransport *tsp, SmlError **error) |
Finalizes the transport. More... | |
char * | smlTransportGetResponseURI (SmlLink *link_, SmlSession *session, SmlError **error) |
Transports can be used to connect to other syncml capable devices and servers.
SmlTransport* smlTransportNew | ( | SmlTransportType | type, |
SmlError ** | error | ||
) |
Creates a new transport.
A transport is a abstraction of a transport type like http or obex
type | The type of the transport |
error | Return location if an error occured |
Definition at line 721 of file sml_transport.c.
void smlTransportFree | ( | SmlTransport * | tsp | ) |
Frees the given transport.
tsp | The transport to free |
Definition at line 810 of file sml_transport.c.
Referenced by smlTransportNew().
SmlBool smlTransportSetConfigOption | ( | SmlTransport * | tsp, |
const char * | name, | ||
const char * | value, | ||
SmlError ** | error | ||
) |
Sets a configuration parameter.
This function sets the configuration option "name" to the value which you specified. The option is checked by the according transport layer implementation. The transport must be in the state "Uninitialized" to use this functions. The state will then is not switched.
tsp | The transport |
name | The name of the configuration option |
value | The value of the configuration option |
error | Return location if an error occured |
Definition at line 883 of file sml_transport.c.
SmlBool smlTransportSetConnectionType | ( | SmlTransport * | tsp, |
SmlTransportConnectionType | type, | ||
SmlError ** | error | ||
) |
Sets a configuration parameter.
This function sets the configuration option "name" to the value which you specified. The option is checked by the according transport layer implementation. The transport must be in the state "Uninitialized" to use this functions. The state will then is not switched.
tsp | The transport |
name | The name of the configuration option |
value | The value of the configuration option |
error | Return location if an error occured |
Definition at line 931 of file sml_transport.c.
SmlBool smlTransportInitialize | ( | SmlTransport * | tsp, |
SmlError ** | error | ||
) |
Initializes the transport with the given config.
This function will init the transport with the options that you specify in the options. The options that are available depend on the transport used. The transport must be in the state "Uninitialized" to use this functions. The state will then switch to "Initialized".
tsp | The transport |
error | Return location if an error occured |
Definition at line 969 of file sml_transport.c.
SmlBool smlTransportSetResponseURI | ( | SmlTransport * | tsp, |
const char * | uri, | ||
SmlError ** | error | ||
) |
Sets the response URI after initialization.
This function sets the response URI after initialization if the transport layer supports this. If the transport layer does not support this feature then this is a fatal error. The URI must be an absolute URI according to OMA DS 1.2 Representation Protocol
tsp | The transport |
uri | The response URI |
error | Return location if an error occured |
Definition at line 1041 of file sml_transport.c.
SmlBool smlTransportFinalize | ( | SmlTransport * | tsp, |
SmlError ** | error | ||
) |
Finalizes the transport.
This function will finalize the transport . The transport must be in the state "Initialized" to use this functions. The state will then switch to "Uninitialized".
tsp | The transport |
error | Return location if an error occured |
Definition at line 1104 of file sml_transport.c.