summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-04-15 19:31:42 +0100
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-04-20 12:28:03 +0100
commit30eafcc8eed22bf3913b642de9e31c4844b939e0 (patch)
tree143d97e4a6b69b2950c202de21069f7b8876472c /plugins
parenta19b8f0f19c12f8f3d7cd9dac4daf25d620049bf (diff)
Rename to WockyStanza, WockyNode and related changes
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gateways.c23
-rw-r--r--plugins/test.c8
2 files changed, 16 insertions, 15 deletions
diff --git a/plugins/gateways.c b/plugins/gateways.c
index bd5c20b8..808fd38c 100644
--- a/plugins/gateways.c
+++ b/plugins/gateways.c
@@ -236,7 +236,7 @@ gabble_gateway_sidecar_dispose (GObject *object)
static gboolean
presence_cb (WockyPorter *porter,
- WockyXmppStanza *stanza,
+ WockyStanza *stanza,
gpointer user_data)
{
GabbleGatewaySidecar *self = GABBLE_GATEWAY_SIDECAR (user_data);
@@ -245,7 +245,7 @@ presence_cb (WockyPorter *porter,
gboolean ret = FALSE;
WockyStanzaSubType subtype;
- wocky_xmpp_stanza_get_type_info (stanza, NULL, &subtype);
+ wocky_stanza_get_type_info (stanza, NULL, &subtype);
switch (subtype)
{
@@ -261,7 +261,8 @@ presence_cb (WockyPorter *porter,
g_return_val_if_reached (FALSE);
}
- from = wocky_xmpp_node_get_attribute (stanza->node, "from");
+ from = wocky_node_get_attribute (
+ wocky_stanza_get_top_node (stanza), "from");
if (from == NULL || strchr (from, '@') != NULL || strchr (from, '/') != NULL)
goto finally;
@@ -273,12 +274,12 @@ presence_cb (WockyPorter *porter,
if (subtype == WOCKY_STANZA_SUB_TYPE_SUBSCRIBE)
{
- WockyXmppStanza *reply;
+ WockyStanza *reply;
/* It's a gateway we've registered with during this session, and they
* want to subscribe to us. OK, let them. */
DEBUG ("Allowing gateway '%s' to subscribe to us", normalized);
- reply = wocky_xmpp_stanza_build (WOCKY_STANZA_TYPE_PRESENCE,
+ reply = wocky_stanza_build (WOCKY_STANZA_TYPE_PRESENCE,
WOCKY_STANZA_SUB_TYPE_SUBSCRIBED, NULL, normalized,
NULL);
wocky_porter_send (porter, reply);
@@ -393,13 +394,13 @@ register_cb (GObject *source,
{
WockyPorter *porter = WOCKY_PORTER (source);
PendingRegistration *pr = user_data;
- WockyXmppStanza *reply;
+ WockyStanza *reply;
GError *error = NULL;
reply = wocky_porter_send_iq_finish (porter, result, &error);
if (reply == NULL ||
- wocky_xmpp_stanza_extract_errors (reply, NULL, &error, NULL, NULL))
+ wocky_stanza_extract_errors (reply, NULL, &error, NULL, NULL))
{
GError *tp_error = NULL;
@@ -439,13 +440,13 @@ register_cb (GObject *source,
}
else
{
- WockyXmppStanza *request;
+ WockyStanza *request;
DEBUG ("Registered with '%s', exchanging presence...", pr->gateway);
/* attempt to subscribe to the gateway's presence (FIXME: is this
* harmless if we're already subscribed to it?) */
- request = wocky_xmpp_stanza_build (WOCKY_STANZA_TYPE_PRESENCE,
+ request = wocky_stanza_build (WOCKY_STANZA_TYPE_PRESENCE,
WOCKY_STANZA_SUB_TYPE_SUBSCRIBE, NULL, pr->gateway,
NULL);
wocky_porter_send (porter, request);
@@ -471,7 +472,7 @@ gateways_register (
{
GabbleGatewaySidecar *self = GABBLE_GATEWAY_SIDECAR (sidecar);
WockyPorter *porter = wocky_session_get_porter (self->priv->session);
- WockyXmppStanza *stanza;
+ WockyStanza *stanza;
gchar *normalized_gateway;
GError *error = NULL;
@@ -520,7 +521,7 @@ gateways_register (
* method Service.Release() [distributed refcounting]
*/
- stanza = wocky_xmpp_stanza_build (WOCKY_STANZA_TYPE_IQ,
+ stanza = wocky_stanza_build (WOCKY_STANZA_TYPE_IQ,
WOCKY_STANZA_SUB_TYPE_SET,
NULL, normalized_gateway,
'(', "query", ':', WOCKY_XEP77_NS_REGISTER,
diff --git a/plugins/test.c b/plugins/test.c
index 6e36565e..9712a39f 100644
--- a/plugins/test.c
+++ b/plugins/test.c
@@ -331,7 +331,7 @@ iq_cb (
{
GSimpleAsyncResult *result = user_data;
GError *error = NULL;
- WockyXmppStanza *reply;
+ WockyStanza *reply;
reply = wocky_porter_send_iq_finish (WOCKY_PORTER (source),
nested_result, &error);
@@ -345,7 +345,7 @@ iq_cb (
{
WockyStanzaSubType t;
- wocky_xmpp_stanza_get_type_info (reply, NULL, &t);
+ wocky_stanza_get_type_info (reply, NULL, &t);
if (t == WOCKY_STANZA_SUB_TYPE_RESULT)
g_simple_async_result_set_op_res_gboolean (result, TRUE);
@@ -371,9 +371,9 @@ sidecar_iq_init_async (
GSimpleAsyncResult *result = g_simple_async_result_new (G_OBJECT (self),
callback, user_data, sidecar_iq_init_async);
WockyPorter *porter = wocky_session_get_porter (self->session);
- WockyXmppStanza *iq;
+ WockyStanza *iq;
- iq = wocky_xmpp_stanza_build (WOCKY_STANZA_TYPE_IQ,
+ iq = wocky_stanza_build (WOCKY_STANZA_TYPE_IQ,
WOCKY_STANZA_SUB_TYPE_GET, NULL, "sidecar.example.com",
'(', "query",
':', "http://example.com/sidecar",