summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2011-05-04 09:11:29 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2011-05-04 09:11:37 +0100
commit27e730bbd087abbc79452eb071fa51c5ed07c863 (patch)
tree14384ce89342f93d19a4d4a6239e73aaf940d15e /lib
parent3342b364c9678d063e9287a411f6b46336a9f988 (diff)
downloadtelepathy-salut-27e730bbd087abbc79452eb071fa51c5ed07c863.tar.gz
stop using gibber-namespaces.h
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'lib')
-rw-r--r--lib/gibber/gibber-bytestream-ibb.c22
-rw-r--r--lib/gibber/gibber-bytestream-muc.c5
-rw-r--r--lib/gibber/gibber-bytestream-oob.c18
-rw-r--r--lib/gibber/gibber-muc-connection.c10
-rw-r--r--lib/gibber/gibber-oob-file-transfer.c11
-rw-r--r--lib/gibber/gibber-xmpp-error.c60
6 files changed, 64 insertions, 62 deletions
diff --git a/lib/gibber/gibber-bytestream-ibb.c b/lib/gibber/gibber-bytestream-ibb.c
index d2116c3c..755c21d8 100644
--- a/lib/gibber/gibber-bytestream-ibb.c
+++ b/lib/gibber/gibber-bytestream-ibb.c
@@ -27,9 +27,9 @@
#include <wocky/wocky-namespaces.h>
#include <wocky/wocky-stanza.h>
#include <wocky/wocky-porter.h>
+#include <wocky/wocky-namespaces.h>
#include "gibber-muc-connection.h"
-#include "gibber-namespaces.h"
#include "gibber-xmpp-error.h"
#define DEBUG_FLAG DEBUG_BYTESTREAM
@@ -212,7 +212,7 @@ gibber_bytestream_ibb_get_property (GObject *object,
g_value_set_uint (value, priv->state);
break;
case PROP_PROTOCOL:
- g_value_set_string (value, GIBBER_XMPP_NS_IBB);
+ g_value_set_string (value, WOCKY_XMPP_NS_IBB);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -408,13 +408,13 @@ gibber_bytestream_ibb_send (GibberBytestreamIface *bytestream,
WOCKY_STANZA_SUB_TYPE_NONE,
priv->self_id, priv->contact,
'(', "data",
- ':', GIBBER_XMPP_NS_IBB,
+ ':', WOCKY_XMPP_NS_IBB,
'@', "sid", priv->stream_id,
'@', "seq", seq,
'$', encoded,
')',
'(', "amp",
- ':', GIBBER_XMPP_NS_AMP,
+ ':', WOCKY_XMPP_NS_AMP,
'(', "rule",
'@', "condition", "deliver-at",
'@', "value", "stored",
@@ -448,16 +448,16 @@ create_si_accept_iq (GibberBytestreamIBB *self)
priv->self_id, priv->contact,
'@', "id", priv->stream_init_id,
'(', "si",
- ':', GIBBER_XMPP_NS_SI,
+ ':', WOCKY_XMPP_NS_SI,
'(', "feature",
- ':', GIBBER_XMPP_NS_FEATURENEG,
+ ':', WOCKY_XMPP_NS_FEATURENEG,
'(', "x",
- ':', GIBBER_XMPP_NS_DATA,
+ ':', WOCKY_XMPP_NS_DATA,
'@', "type", "submit",
'(', "field",
'@', "var", "stream-method",
'(', "value",
- '$', GIBBER_XMPP_NS_IBB,
+ '$', WOCKY_XMPP_NS_IBB,
')',
')',
')',
@@ -490,7 +490,7 @@ gibber_bytestream_ibb_accept (GibberBytestreamIface *bytestream,
stanza = create_si_accept_iq (self);
node = wocky_stanza_get_top_node (stanza);
- si = wocky_node_get_child_ns (node, "si", GIBBER_XMPP_NS_SI);
+ si = wocky_node_get_child_ns (node, "si", WOCKY_XMPP_NS_SI);
g_assert (si != NULL);
if (func != NULL)
@@ -572,7 +572,7 @@ gibber_bytestream_ibb_close (GibberBytestreamIface *bytestream,
WOCKY_STANZA_SUB_TYPE_SET,
priv->self_id, priv->contact,
'(', "close",
- ':', GIBBER_XMPP_NS_IBB,
+ ':', WOCKY_XMPP_NS_IBB,
'@', "sid", priv->stream_id,
')', NULL);
@@ -639,7 +639,7 @@ gibber_bytestream_ibb_initiate (GibberBytestreamIface *bytestream)
WOCKY_STANZA_TYPE_IQ, WOCKY_STANZA_SUB_TYPE_SET,
priv->self_id, priv->contact,
'(', "open",
- ':', GIBBER_XMPP_NS_IBB,
+ ':', WOCKY_XMPP_NS_IBB,
'@', "sid", priv->stream_id,
'@', "block-size", "4096",
')', NULL);
diff --git a/lib/gibber/gibber-bytestream-muc.c b/lib/gibber/gibber-bytestream-muc.c
index b0a2912e..0a3a11fd 100644
--- a/lib/gibber/gibber-bytestream-muc.c
+++ b/lib/gibber/gibber-bytestream-muc.c
@@ -28,7 +28,8 @@
#include "gibber-bytestream-iface.h"
#include "gibber-muc-connection.h"
#include "gibber-linklocal-transport.h"
-#include "gibber-namespaces.h"
+
+#include <wocky/wocky-namespaces.h>
#define DEBUG_FLAG DEBUG_BYTESTREAM
#include "gibber-debug.h"
@@ -199,7 +200,7 @@ gibber_bytestream_muc_get_property (GObject *object,
case PROP_PROTOCOL:
/* We use the Clique namespace to signify that we're using streams
* 1 to 65535 of the reliable multicast layer */
- g_value_set_string (value, GIBBER_TELEPATHY_NS_CLIQUE);
+ g_value_set_string (value, WOCKY_TELEPATHY_NS_CLIQUE);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
diff --git a/lib/gibber/gibber-bytestream-oob.c b/lib/gibber/gibber-bytestream-oob.c
index 805f397a..ef45796e 100644
--- a/lib/gibber/gibber-bytestream-oob.c
+++ b/lib/gibber/gibber-bytestream-oob.c
@@ -31,10 +31,10 @@
#include <wocky/wocky-stanza.h>
#include <wocky/wocky-porter.h>
#include <wocky/wocky-meta-porter.h>
+#include <wocky/wocky-namespaces.h>
#include "gibber-sockets.h"
#include "gibber-bytestream-iface.h"
-#include "gibber-namespaces.h"
#include "gibber-linklocal-transport.h"
#include "gibber-xmpp-error.h"
#include "gibber-util.h"
@@ -366,7 +366,7 @@ parse_oob_init_iq (GibberBytestreamOOB *self,
return FALSE;
query_node = wocky_node_get_child_ns (node, "query",
- GIBBER_XMPP_NS_IQ_OOB);
+ WOCKY_XMPP_NS_IQ_OOB);
if (query_node == NULL)
return FALSE;
@@ -556,7 +556,7 @@ gibber_bytestream_oob_get_property (GObject *object,
g_value_set_string (value, priv->host);
break;
case PROP_PROTOCOL:
- g_value_set_string (value, GIBBER_XMPP_NS_IQ_OOB);
+ g_value_set_string (value, WOCKY_XMPP_NS_IQ_OOB);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -794,16 +794,16 @@ create_si_accept_iq (GibberBytestreamOOB *self)
priv->self_id, priv->contact,
'@', "id", priv->stream_init_id,
'(', "si",
- ':', GIBBER_XMPP_NS_SI,
+ ':', WOCKY_XMPP_NS_SI,
'(', "feature",
- ':', GIBBER_XMPP_NS_FEATURENEG,
+ ':', WOCKY_XMPP_NS_FEATURENEG,
'(', "x",
- ':', GIBBER_XMPP_NS_DATA,
+ ':', WOCKY_XMPP_NS_DATA,
'@', "type", "submit",
'(', "field",
'@', "var", "stream-method",
'(', "value",
- '$', GIBBER_XMPP_NS_IQ_OOB,
+ '$', WOCKY_XMPP_NS_IQ_OOB,
')',
')',
')',
@@ -836,7 +836,7 @@ gibber_bytestream_oob_accept (GibberBytestreamIface *bytestream,
stanza = create_si_accept_iq (self);
node = wocky_stanza_get_top_node (stanza);
- si = wocky_node_get_child_ns (node, "si", GIBBER_XMPP_NS_SI);
+ si = wocky_node_get_child_ns (node, "si", WOCKY_XMPP_NS_SI);
g_assert (si != NULL);
if (func != NULL)
@@ -974,7 +974,7 @@ make_oob_init_iq (const gchar *from,
WOCKY_STANZA_TYPE_IQ, WOCKY_STANZA_SUB_TYPE_SET,
from, to,
'(', "query",
- ':', GIBBER_XMPP_NS_IQ_OOB,
+ ':', WOCKY_XMPP_NS_IQ_OOB,
'@', "sid", stream_id,
'(', "url",
'$', url,
diff --git a/lib/gibber/gibber-muc-connection.c b/lib/gibber/gibber-muc-connection.c
index 98d0d530..a64ba16e 100644
--- a/lib/gibber/gibber-muc-connection.c
+++ b/lib/gibber/gibber-muc-connection.c
@@ -29,13 +29,13 @@
#include "gibber-signals-marshal.h"
#include "gibber-sockets.h"
-#include "gibber-namespaces.h"
#include "gibber-multicast-transport.h"
#include "gibber-r-multicast-transport.h"
#include "gibber-r-multicast-causal-transport.h"
#include <wocky/wocky-xmpp-reader.h>
#include <wocky/wocky-xmpp-writer.h>
+#include <wocky/wocky-namespaces.h>
#define ADDRESS_KEY "address"
#define PORT_KEY "port"
@@ -269,7 +269,7 @@ gibber_muc_connection_finalize (GObject *object)
const gchar **
gibber_muc_connection_get_protocols (void)
{
- static const gchar *protocols[] = { GIBBER_TELEPATHY_NS_CLIQUE, NULL };
+ static const gchar *protocols[] = { WOCKY_TELEPATHY_NS_CLIQUE, NULL };
return protocols;
}
@@ -283,7 +283,7 @@ gibber_muc_connection_get_required_parameters (const gchar *protocol)
struct {
const gchar *protocol;
const gchar **parameters;
- } protocols[] = { { GIBBER_TELEPATHY_NS_CLIQUE, parameters },
+ } protocols[] = { { WOCKY_TELEPATHY_NS_CLIQUE, parameters },
{ NULL, NULL }
};
@@ -389,7 +389,7 @@ gibber_muc_connection_new (const gchar *name, const gchar *protocol,
GibberMucConnection *result;
GibberMucConnectionPrivate *priv;
- if (protocol != NULL && strcmp (protocol, GIBBER_TELEPATHY_NS_CLIQUE) != 0)
+ if (protocol != NULL && strcmp (protocol, WOCKY_TELEPATHY_NS_CLIQUE) != 0)
{
g_set_error (error, GIBBER_MUC_CONNECTION_ERROR,
GIBBER_MUC_CONNECTION_ERROR_INVALID_PROTOCOL,
@@ -426,7 +426,7 @@ gibber_muc_connection_new (const gchar *name, const gchar *protocol,
}
else
{
- priv->protocol = g_strdup (GIBBER_TELEPATHY_NS_CLIQUE);
+ priv->protocol = g_strdup (WOCKY_TELEPATHY_NS_CLIQUE);
}
priv->address = g_strdup (address);
diff --git a/lib/gibber/gibber-oob-file-transfer.c b/lib/gibber/gibber-oob-file-transfer.c
index f242262d..f501598b 100644
--- a/lib/gibber/gibber-oob-file-transfer.c
+++ b/lib/gibber/gibber-oob-file-transfer.c
@@ -28,9 +28,10 @@
#include <wocky/wocky-stanza.h>
#include <wocky/wocky-meta-porter.h>
+#include <wocky/wocky-namespaces.h>
+
#include "gibber-oob-file-transfer.h"
#include "gibber-fd-transport.h"
-#include "gibber-namespaces.h"
#include "gibber-util.h"
#define DEBUG_FLAG DEBUG_FILE_TRANSFER
@@ -555,7 +556,7 @@ create_transfer_offer (GibberOobFileTransfer *self,
node = wocky_stanza_get_top_node (stanza);
query_node = wocky_node_add_child_ns (node, "query",
- GIBBER_XMPP_NS_IQ_OOB);
+ WOCKY_XMPP_NS_IQ_OOB);
url_node = wocky_node_add_child_with_content (query_node, "url", url);
wocky_node_set_attribute (url_node, "type", "file");
@@ -933,7 +934,7 @@ gibber_oob_file_transfer_cancel (GibberFileTransfer *ft,
node = wocky_stanza_get_top_node (stanza);
query = wocky_node_add_child_ns (node, "query",
- GIBBER_XMPP_NS_IQ_OOB);
+ WOCKY_XMPP_NS_IQ_OOB);
wocky_node_add_child_with_content (query, "url", self->priv->url);
error_node = wocky_node_add_child (node, "error");
@@ -945,13 +946,13 @@ gibber_oob_file_transfer_cancel (GibberFileTransfer *ft,
wocky_node_set_attribute (error_node, "code", code_string);
wocky_node_set_attribute (error_node, "type", "cancel");
wocky_node_add_child_ns (error_node,
- "item-not-found", GIBBER_XMPP_NS_STANZAS);
+ "item-not-found", WOCKY_XMPP_NS_STANZAS);
break;
case HTTP_STATUS_CODE_NOT_ACCEPTABLE:
wocky_node_set_attribute (error_node, "code", code_string);
wocky_node_set_attribute (error_node, "type", "modify");
wocky_node_add_child_ns (error_node,
- "not-acceptable", GIBBER_XMPP_NS_STANZAS);
+ "not-acceptable", WOCKY_XMPP_NS_STANZAS);
break;
default:
g_assert_not_reached ();
diff --git a/lib/gibber/gibber-xmpp-error.c b/lib/gibber/gibber-xmpp-error.c
index 1d03238d..2ec6c1b1 100644
--- a/lib/gibber/gibber-xmpp-error.c
+++ b/lib/gibber/gibber-xmpp-error.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <stdio.h>
-#include "gibber-namespaces.h"
+#include <wocky/wocky-namespaces.h>
#define MAX_LEGACY_ERRORS 3
@@ -43,7 +43,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"application-specific condition",
NULL,
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 500, 0, },
},
{
@@ -52,7 +52,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"to another entity",
"modify",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 302, 0, },
},
@@ -61,7 +61,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"the recipient or server can no longer be contacted at this address",
"modify",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 302, 0, },
},
@@ -70,7 +70,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"the sender has sent XML that is malformed or that cannot be processed",
"modify",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 400, 0, },
},
{
@@ -79,7 +79,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"it at this time",
"wait",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 400, 0, },
},
{
@@ -89,7 +89,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"to the syntax defined in Addressing Scheme (Section 3)",
"modify",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 400, 0, },
},
@@ -99,7 +99,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"perform the action, or has provided improper credentials",
"auth",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 401, 0, },
},
@@ -109,7 +109,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"service because payment is required",
"auth",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 402, 0, },
},
@@ -119,7 +119,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"perform the action",
"auth",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 403, 0, },
},
@@ -128,7 +128,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"the addressed JID or item requested cannot be found",
"cancel",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 404, 0, },
},
{
@@ -136,7 +136,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"the intended recipient is temporarily unavailable",
"wait",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 404, 0, },
},
{
@@ -146,7 +146,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"contacted within a reasonable amount of time",
"cancel",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 404, 0, },
},
@@ -155,7 +155,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"the recipient or server does not allow any entity to perform the action",
"cancel",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 405, 0, },
},
@@ -166,7 +166,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"or server (e.g., a local policy regarding acceptable words in messages)",
"modify",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 406, 0, },
},
@@ -176,7 +176,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"because registration is required",
"auth",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 407, 0, },
},
{
@@ -185,7 +185,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"because a subscription is required",
"auth",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 407, 0, },
},
@@ -196,7 +196,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"contacted within a reasonable amount of time",
"wait",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 408, 504, 0, },
},
@@ -206,7 +206,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"with the same name or address",
"cancel",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 409, 0, },
},
@@ -216,7 +216,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"or an otherwise-undefined internal server error",
"wait",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 500, 0, },
},
{
@@ -225,7 +225,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"the request",
"wait",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 500, 0, },
},
@@ -235,7 +235,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"therefore cannot be processed",
"cancel",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 501, 0, },
},
@@ -245,7 +245,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"service",
"cancel",
0,
- GIBBER_XMPP_NS_STANZAS,
+ WOCKY_XMPP_NS_STANZAS,
{ 502, 503, 510, },
},
@@ -254,7 +254,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"the request cannot occur at this point in the state machine",
"cancel",
XMPP_ERROR_UNEXPECTED_REQUEST,
- GIBBER_XMPP_NS_JINGLE_ERRORS,
+ WOCKY_XMPP_NS_JINGLE_ERRORS,
{ 0, },
},
@@ -264,7 +264,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"recipient",
"cancel",
XMPP_ERROR_BAD_REQUEST,
- GIBBER_XMPP_NS_JINGLE_ERRORS,
+ WOCKY_XMPP_NS_JINGLE_ERRORS,
{ 0, },
},
@@ -274,7 +274,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"methods",
"cancel",
XMPP_ERROR_FEATURE_NOT_IMPLEMENTED,
- GIBBER_XMPP_NS_JINGLE_ERRORS,
+ WOCKY_XMPP_NS_JINGLE_ERRORS,
{ 0, },
},
@@ -284,7 +284,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"formats",
"cancel",
XMPP_ERROR_FEATURE_NOT_IMPLEMENTED,
- GIBBER_XMPP_NS_JINGLE_ERRORS,
+ WOCKY_XMPP_NS_JINGLE_ERRORS,
{ 0, },
},
@@ -293,7 +293,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"None of the available streams are acceptable.",
"cancel",
XMPP_ERROR_BAD_REQUEST,
- GIBBER_XMPP_NS_SI,
+ WOCKY_XMPP_NS_SI,
{ 400, 0 },
},
@@ -302,7 +302,7 @@ static const XmppErrorSpec xmpp_errors[NUM_XMPP_ERRORS] =
"The profile is not understood or invalid.",
"modify",
XMPP_ERROR_BAD_REQUEST,
- GIBBER_XMPP_NS_SI,
+ WOCKY_XMPP_NS_SI,
{ 400, 0 },
},
};
@@ -416,7 +416,7 @@ gibber_xmpp_error_to_node (GibberXmppError error,
}
node = wocky_node_add_child_ns (error_node, spec->name,
- GIBBER_XMPP_NS_STANZAS);
+ WOCKY_XMPP_NS_STANZAS);
if (extra != NULL)
{