Top | ![]() |
![]() |
![]() |
![]() |
GQuark
wocky_xmpp_connection_error_quark (void
);
Get the error quark used by the connection.
#define WOCKY_XMPP_CONNECTION_ERROR (wocky_xmpp_connection_error_quark ())
Get access to the error quark of the xmpp connection.
WockyXmppConnection *
wocky_xmpp_connection_new (GIOStream *stream
);
Convenience function to create a new WockyXmppConnection.
void wocky_xmpp_connection_send_open_async (WockyXmppConnection *connection
,const gchar *to
,const gchar *from
,const gchar *version
,const gchar *lang
,const gchar *id
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Request asynchronous sending of an XMPP stream opening over the stream. When
the operation is finished callback
will be called. You can then call
wocky_xmpp_connection_send_open_finish()
to get the result of the operation.
connection |
||
to |
destination in the XMPP opening (can be NULL). |
|
from |
sender in the XMPP opening (can be NULL). |
|
version |
XMPP version sent (can be NULL). |
|
lang |
language sent (can be NULL). |
|
id |
XMPP Stream ID, if any, or NULL |
|
cancellable |
optional GCancellable object, NULL to ignore. |
|
callback |
callback to call when the request is satisfied. |
|
user_data |
the data to pass to callback function. |
gboolean wocky_xmpp_connection_send_open_finish (WockyXmppConnection *connection
,GAsyncResult *result
,GError **error
);
Finishes sending a stream opening.
void wocky_xmpp_connection_recv_open_async (WockyXmppConnection *connection
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Request asynchronous receiving of an XMPP stream opening over the stream.
When the operation is finished callback
will be called. You can then call
wocky_xmpp_connection_recv_open_finish()
to get the result of the operation.
gboolean wocky_xmpp_connection_recv_open_finish (WockyXmppConnection *connection
,GAsyncResult *result
,gchar **to
,gchar **from
,gchar **version
,gchar **lang
,gchar **id
,GError **error
);
Finishes receiving a stream opening.
connection |
||
result |
a GAsyncResult. |
|
to |
Optional location to store the to attribute in the XMPP open stanza will be stored (free after usage). |
|
from |
Optional location to store the from attribute in the XMPP open stanza will be stored (free after usage). |
|
version |
Optional location to store the version attribute in the XMPP open stanza will be stored (free after usage). |
|
lang |
Optional location to store the lang attribute in the XMPP open stanza will be stored (free after usage). |
|
id |
Optional location to store the Session ID of the XMPP stream (free after usage) |
|
error |
a GError location to store the error occuring, or NULL to ignore. |
void wocky_xmpp_connection_send_stanza_async (WockyXmppConnection *connection
,WockyStanza *stanza
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Request asynchronous sending of a WockyStanza. When the operation is
finished callback
will be called. You can then call
wocky_xmpp_connection_send_stanza_finish()
to get the result of
the operation.
Can only be called after wocky_xmpp_connection_send_open_async has finished its operation.
connection |
||
stanza |
WockyStanza to send. |
|
cancellable |
optional GCancellable object, NULL to ignore. |
|
callback |
callback to call when the request is satisfied. |
|
user_data |
the data to pass to callback function. |
gboolean wocky_xmpp_connection_send_stanza_finish (WockyXmppConnection *connection
,GAsyncResult *result
,GError **error
);
Finishes sending a stanza.
void wocky_xmpp_connection_recv_stanza_async (WockyXmppConnection *connection
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronous receive a WockyStanza. When the operation is
finished callback
will be called. You can then call
wocky_xmpp_connection_recv_stanza_finish()
to get the result of
the operation.
Can only be called after wocky_xmpp_connection_recv_open_async has finished its operation.
WockyStanza * wocky_xmpp_connection_recv_stanza_finish (WockyXmppConnection *connection
,GAsyncResult *result
,GError **error
);
Finishes receiving a stanza
void wocky_xmpp_connection_send_close_async (WockyXmppConnection *connection
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Request asynchronous sending of an XMPP stream close. When
the operation is finished callback
will be called. You can then call
wocky_xmpp_connection_send_close_finish()
to get the result of the
operation.
Can only be called after wocky_xmpp_connection_send_open_async has finished its operation.
gboolean wocky_xmpp_connection_send_close_finish (WockyXmppConnection *connection
,GAsyncResult *result
,GError **error
);
Finishes send the xmpp stream close.
void wocky_xmpp_connection_force_close_async (WockyXmppConnection *connection
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
gboolean wocky_xmpp_connection_force_close_finish (WockyXmppConnection *connection
,GAsyncResult *result
,GError **error
);
void wocky_xmpp_connection_send_whitespace_ping_async (WockyXmppConnection *connection
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Request asynchronous sending of a whitespace ping. When the operation is
finished callback
will be called. You can then call
wocky_xmpp_connection_send_whitespace_ping_finish()
to get the result of
the operation.
Can only be called after wocky_xmpp_connection_send_open_async has finished its operation.
gboolean wocky_xmpp_connection_send_whitespace_ping_finish (WockyXmppConnection *connection
,GAsyncResult *result
,GError **error
);
Finishes sending a whitespace ping.
void
wocky_xmpp_connection_reset (WockyXmppConnection *connection
);
Reset the XMPP Connection. After the reset the connection is back in its
initial state (as if wocky_xmpp_connection_send_open_async()
and
wocky_xmpp_connection_recv_open_async()
were never called).
The WockyXmppConnection specific errors that can occur while reading a stream.
struct WockyXmppConnectionClass { };
The class of a WockyXmppConnection.
“base-stream”
property“base-stream” GIOStream *
the stream that the XMPP connection communicates over.
Flags: Read / Write / Construct Only