libsyncml  0.5.4
SyncML Transport API

Transports can be used to connect to other syncml capable devices and servers. More...

Collaboration diagram for SyncML Transport API:

Transport Management

These functions allow to create, delete, initialize and finalize transports

SmlTransportsmlTransportNew (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)
 

Detailed Description

Transports can be used to connect to other syncml capable devices and servers.

Function Documentation

SmlTransport* smlTransportNew ( SmlTransportType  type,
SmlError **  error 
)

Creates a new transport.

A transport is a abstraction of a transport type like http or obex

Parameters
typeThe type of the transport
errorReturn location if an error occured
Returns
The new transport or NULL in the case of an error

Definition at line 721 of file sml_transport.c.

Here is the call graph for this function:

void smlTransportFree ( SmlTransport tsp)

Frees the given transport.

Parameters
tspThe transport to free

Definition at line 810 of file sml_transport.c.

Referenced by smlTransportNew().

Here is the call graph for this function:

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.

Parameters
tspThe transport
nameThe name of the configuration option
valueThe value of the configuration option
errorReturn location if an error occured
Returns
TRUE if the call succeded or FALSE in the case of an error

Definition at line 883 of file sml_transport.c.

Here is the call graph for this function:

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.

Parameters
tspThe transport
nameThe name of the configuration option
valueThe value of the configuration option
errorReturn location if an error occured
Returns
TRUE if the call succeded or FALSE in the case of an error

Definition at line 931 of file sml_transport.c.

Here is the call graph for this function:

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".

Parameters
tspThe transport
errorReturn location if an error occured
Returns
TRUE if the call succeded or FALSE in the case of an error

Definition at line 969 of file sml_transport.c.

Here is the call graph for this function:

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

Parameters
tspThe transport
uriThe response URI
errorReturn location if an error occured
Returns
TRUE if the call succeded or FALSE in the case of an error

Definition at line 1041 of file sml_transport.c.

Here is the call graph for this function:

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".

Parameters
tspThe transport
errorReturn location if an error occured
Returns
TRUE if the call succeded or FALSE in the case of an error

Definition at line 1104 of file sml_transport.c.

Here is the call graph for this function: