22 #ifndef _SML_TRANSPORT_INTERNALS_H_
23 #define _SML_TRANSPORT_INTERNALS_H_
25 #include "sml_queue_internals.h"
27 typedef SmlBool (* SmlTransportSetConfigOptionFn) (
SmlTransport *tsp,
const char *name,
const char *value,
SmlError **error);
28 typedef SmlBool (* SmlTransportSetConnectionTypeFn) (
SmlTransport *tsp, SmlTransportConnectionType type,
SmlError **error);
36 typedef SmlBool (* SmlTransportSetResponseUriFn) (
SmlTransport *tsp,
const char *uri,
SmlError **error);
44 typedef SmlBool (* SmlTransportFinalizeFn) (
void *data,
SmlError **error);
46 typedef void (* SmlTransportConnectFn) (
void *data);
47 typedef void (* SmlTransportDisconnectFn) (
void *data,
void *link_data);
51 SmlTransportSetConfigOptionFn set_config_option;
52 SmlTransportSetConnectionTypeFn set_connection_type;
53 SmlTransportInitializeFn initialize;
54 SmlTransportSetResponseUriFn set_response_uri;
55 SmlTransportGetResponseUriFn get_response_uri;
56 SmlTransportFinalizeFn finalize;
57 SmlTransportConnectFn connect;
58 SmlTransportDisconnectFn disconnect;
59 SmlTransportSendFn send;
62 typedef enum SmlTransportState {
63 SML_TRANSPORT_UNINITIALIZED,
64 SML_TRANSPORT_INITIALIZED,
65 SML_TRANSPORT_CONNECTED,
70 GMainContext *context;
73 SmlTransportState state;
75 SmlTransportType type;
80 SmlTransportEventCb event_callback;
81 void *event_callback_userdata;
82 gint event_callback_ref_count;
88 unsigned int connections;
89 GMutex *connections_mutex;
98 typedef enum SmlTransportCommandType {
99 SML_TRANSPORT_CMD_SEND,
100 SML_TRANSPORT_CMD_CONNECT,
101 SML_TRANSPORT_CMD_DISCONNECT
102 } SmlTransportCommandType;
105 SmlTransportCommandType type;
135 void smlTransportWorkerHandler(
void *message,
void *userdata);
141 #endif //_SML_TRANSPORT_INTERNALS_H_
SmlBool smlTransportSetResponseURI(SmlTransport *tsp, const char *uri, SmlError **error)
Sets the response URI after initialization.
Represents a Queue which can be used to receive messages.