13 #ifndef JABBERWERX_CLIENT_H
14 #define JABBERWERX_CLIENT_H
26 #define JW_CLIENT_CONFIG_USERJID "userjid"
31 #define JW_CLIENT_CONFIG_USERPW "userpassword"
37 #define JW_CLIENT_CONFIG_STREAM_TYPE "streamtype"
43 #define JW_CLIENT_CONFIG_JID_CONTEXT "jidcontext"
49 #define JW_CLIENT_CONFIG_SM_ENABLED "sm_enabled"
56 #define JW_CLIENT_CONFIG_SM_RESUME_ENABLED "sm_resume_enabled"
65 #define JW_CLIENT_CONFIG_SM_RESUME_TIMEOUT_SECONDS "sm_resume_timeout"
78 #define JW_CLIENT_CONFIG_SM_ACK_REQUEST_THRESHOLD "sm_ack_request_threshold"
99 #define JW_CLIENT_CONFIG_SM_ACK_REQUEST_THRESHOLD_SECONDS \
100 "sm_ack_request_threshold_seconds"
121 #define JW_CLIENT_CONFIG_RECONNECT_BASE_COUNTDOWN "client_reconnect_countdown"
128 #define JW_CLIENT_CONFIG_SASL_FACTORY "client_sasl_factory"
133 #define JW_CLIENT_CONFIG_STREAM_TYPE_SOCKET "socket"
137 #define JW_CLIENT_CONFIG_STREAM_TYPE_BOSH "bosh"
143 #define JW_CLIENT_EVENT_STATUSCHANGED "clientStatusChanged"
148 #define JW_CLIENT_EVENT_CONNECTED "clientConnected"
153 #define JW_CLIENT_EVENT_DISCONNECTED "clientDisconnected"
158 #define JW_CLIENT_EVENT_SESSION_PAUSED "clientSessionPaused"
163 #define JW_CLIENT_EVENT_SESSION_RESUMED "clientSessionResumed"
168 #define JW_CLIENT_EVENT_DESTROYED "clientDestroyed"
174 #define JW_CLIENT_EVENT_BEFORE_IQ_RECEIVED "beforeIqReceived"
179 #define JW_CLIENT_EVENT_IQ_RECEIVED "iqReceived"
184 #define JW_CLIENT_EVENT_AFTER_IQ_RECEIVED "afterIqReceived"
190 #define JW_CLIENT_EVENT_BEFORE_IQ_SENT "beforeIqSent"
195 #define JW_CLIENT_EVENT_IQ_SENT "iqSent"
201 #define JW_CLIENT_EVENT_BEFORE_PRESENCE_RECEIVED "beforePresenceReceived"
206 #define JW_CLIENT_EVENT_PRESENCE_RECEIVED "presenceReceived"
211 #define JW_CLIENT_EVENT_AFTER_PRESENCE_RECEIVED "afterPresenceReceived"
217 #define JW_CLIENT_EVENT_BEFORE_PRESENCE_SENT "beforePresenceSent"
222 #define JW_CLIENT_EVENT_PRESENCE_SENT "presenceSent"
228 #define JW_CLIENT_EVENT_BEFORE_MESSAGE_RECEIVED "beforeMessageReceived"
233 #define JW_CLIENT_EVENT_MESSAGE_RECEIVED "messageReceived"
238 #define JW_CLIENT_EVENT_AFTER_MESSAGE_RECEIVED "afterMessageReceived"
244 #define JW_CLIENT_EVENT_BEFORE_MESSAGE_SENT "beforeMessageSent"
249 #define JW_CLIENT_EVENT_MESSAGE_SENT "messageSent"
255 #define JW_CLIENT_EVENT_RECONNECT_STATUSCHANGED "reconnectStatusChanged"
263 JW_CLIENT_DISCONNECTED = 0,
264 JW_CLIENT_CONNECTING,
266 JW_CLIENT_DISCONNECTING
285 JW_CLIENT_RECONNECT_CANCELED = 0,
286 JW_CLIENT_RECONNECT_PENDING,
287 JW_CLIENT_RECONNECT_STARTING
701 uint32_t timeout_sec,
JABBERWERX_API bool jw_client_is_reconnect_pending(jw_client *client)
JABBERWERX_API void jw_client_destroy(jw_client *client)
#define JABBERWERX_API
Definition: basics.h:32
jw_errcode
Definition: basics.h:122
struct _jw_client_reconnect_status jw_client_reconnect_status
Definition: client.h:298
Functions and data structures for JIDs.
JABBERWERX_API jw_client_statustype jw_client_get_status(jw_client *client)
JABBERWERX_API jw_jid * jw_client_get_jid(jw_client *client)
JABBERWERX_API jw_dom_node * jw_client_status_get_error(jw_client_status *status)
struct _jw_dom_node jw_dom_node
Definition: dom.h:46
JABBERWERX_API jw_client_reconnect_statustype jw_client_reconnect_get_status(jw_client_reconnect_status *status)
Functions and data structures for tracking IQs and XDBs.
JABBERWERX_API bool jw_client_track_iq(jw_client *client, jw_dom_node *iq, jw_tracker_cb_func cb, void *user_data, uint32_t timeout_sec, jw_err *err)
struct _jw_client jw_client
Definition: client.h:292
Functions and data structures for Streams of XML data over a data transport, such as a TCP stream...
JABBERWERX_API void jw_client_disconnect(jw_client *client, jw_errcode disconnect_reason)
JABBERWERX_API bool jw_client_send_stanza(jw_client *client, jw_dom_node *stanza, jw_err *err)
JABBERWERX_API jw_htable * jw_client_get_config(jw_client *client)
void(* jw_tracker_cb_func)(jw_dom_node *result, void *arg)
Definition: tracker.h:38
JABBERWERX_API jw_client_statustype jw_client_status_get_previous(jw_client_status *status)
jw_client_statustype
Definition: client.h:261
struct jw_workq_t jw_workq
Definition: workq.h:30
struct _jw_client_status jw_client_status
Definition: client.h:295
JABBERWERX_API bool jw_client_connect(jw_client *client, jw_htable *config, jw_err *err)
JABBERWERX_API uint32_t jw_client_reconnect_get_countdown(jw_client_reconnect_status *status)
This file contains JabberWerxC Work Queue types and functions.
struct _jw_htable jw_htable
Definition: htable.h:27
jw_client_reconnect_statustype
Definition: client.h:283
JABBERWERX_API bool jw_client_status_is_reconnect(jw_client_status *status)
JABBERWERX_API bool jw_client_is_connected(jw_client *client)
JABBERWERX_API struct event_base * jw_client_get_selector(jw_client *client)
JABBERWERX_API jw_client_statustype jw_client_status_get_next(jw_client_status *status)
struct _jw_jid_int jw_jid
Definition: jid.h:37
JABBERWERX_API bool jw_client_create(jw_workq *workq, jw_client **client, jw_err *err)
JABBERWERX_API uint32_t jw_client_reconnect_get_attempts(jw_client_reconnect_status *status)
JABBERWERX_API jw_workq * jw_client_get_workq(jw_client *client)
JABBERWERX_API jw_event * jw_client_event(jw_client *client, const char *name)
struct _jw_event_t jw_event
Definition: eventing.h:39