libsyncml 0.5.4

- Main Page
- Modules
- Data Structures
- Files

SyncML Transport API
Low Level 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
SmlTransport * | smlTransportNew (SmlTransportType type, SmlError **error)
| Creates a new transport.
void | smlTransportFree (SmlTransport *tsp)
| Frees the given transport.
SmlBool | smlTransportSetConfigOption (SmlTransport *tsp, const char *name, const char *value, SmlError **error)
| Sets a configuration parameter.
SmlBool | smlTransportSetConnectionType (SmlTransport *tsp, SmlTransportConnectionType type, SmlError **error)
| Sets a configuration parameter.
SmlBool | smlTransportInitialize (SmlTransport *tsp, SmlError **error)
| Initializes the transport with the given config.
SmlBool | smlTransportSetResponseURI (SmlTransport *tsp, const char *uri, SmlError **error)
| Sets the response URI after initialization.
SmlBool | smlTransportFinalize (SmlTransport *tsp, SmlError **error)
| Finalizes the transport.
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:

  type | The type of the transport
  error | Return 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:

  tsp | The 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:

  tsp | The transport
  name | The name of the configuration option
  value | The value of the configuration option
  error | Return 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:

  tsp | The transport
  name | The name of the configuration option
  value | The value of the configuration option
  error | Return 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:

  tsp | The transport
  error | Return 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:

  tsp | The transport
  uri | The response URI
  error | Return 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:

  tsp | The transport
  error | Return 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: