diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-02-09 12:37:59 +0000 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-02-09 13:32:03 +0000 |
commit | e36cc7e902fec88a1fb979e10cf1f2b86611464d (patch) | |
tree | d4639fb579e6406aebc4daf5cf0f40c976085abc /src/text-helper.c | |
parent | c06e646052ad30573ee2404b841eda6352e036e7 (diff) | |
download | telepathy-salut-e36cc7e902fec88a1fb979e10cf1f2b86611464d.tar.gz |
gibber: remove GibberXmppNode wrapper
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'src/text-helper.c')
-rw-r--r-- | src/text-helper.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/text-helper.c b/src/text-helper.c index 942e6f08..3e240184 100644 --- a/src/text-helper.c +++ b/src/text-helper.c @@ -48,14 +48,14 @@ static void add_text (WockyStanza *stanza, const gchar *text) { WockyNode *node = wocky_stanza_get_top_node (stanza); - GibberXmppNode *htmlnode; + WockyNode *htmlnode; - gibber_xmpp_node_add_child_with_content (node, "body", text); + wocky_node_add_child_with_content (node, "body", text); /* Add plain xhtml-im node */ - htmlnode = gibber_xmpp_node_add_child_ns (node, "html", + htmlnode = wocky_node_add_child_ns (node, "html", GIBBER_XMPP_NS_XHTML_IM); - gibber_xmpp_node_add_child_with_content_ns (htmlnode, "body", text, + wocky_node_add_child_with_content_ns (htmlnode, "body", text, GIBBER_W3C_NS_XHTML); } @@ -79,8 +79,8 @@ create_message_stanza (const gchar *from, stanza = wocky_stanza_new ("message", WOCKY_XMPP_NS_JABBER_CLIENT); node = wocky_stanza_get_top_node (stanza); - gibber_xmpp_node_set_attribute (node, "from", from); - gibber_xmpp_node_set_attribute (node, "to", to); + wocky_node_set_attribute (node, "from", from); + wocky_node_set_attribute (node, "to", to); if (type == TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION) { @@ -117,10 +117,10 @@ text_helper_create_message (const gchar *from, { case TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL: case TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION: - gibber_xmpp_node_set_attribute (node, "type", "chat"); + wocky_node_set_attribute (node, "type", "chat"); break; case TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE: - gibber_xmpp_node_set_attribute (node, "type", "normal"); + wocky_node_set_attribute (node, "type", "normal"); break; default: g_assert_not_reached (); @@ -150,10 +150,10 @@ text_helper_create_message_groupchat (const gchar *from, { case TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL: case TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION: - gibber_xmpp_node_set_attribute (node, "type", "groupchat"); + wocky_node_set_attribute (node, "type", "groupchat"); break; case TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE: - gibber_xmpp_node_set_attribute (node, "type", "normal"); + wocky_node_set_attribute (node, "type", "normal"); break; default: g_assert_not_reached (); @@ -171,22 +171,22 @@ text_helper_parse_incoming_message (WockyStanza *stanza, const gchar **body_offset) { const gchar *type; - GibberXmppNode *node; - GibberXmppNode *event; + WockyNode *node; + WockyNode *event; WockyNode *top_node = wocky_stanza_get_top_node (stanza); - *from = gibber_xmpp_node_get_attribute (top_node, "from"); - type = gibber_xmpp_node_get_attribute (top_node, "type"); + *from = wocky_node_get_attribute (top_node, "from"); + type = wocky_node_get_attribute (top_node, "type"); /* Work around iChats strange way of doing typing notification */ - event = gibber_xmpp_node_get_child_ns (top_node, "x", + event = wocky_node_get_child_ns (top_node, "x", GIBBER_XMPP_NS_EVENT); if (event != NULL) { /* If the event has a composing and an id child, this is a typing * notification and it should be dropped */ - if (gibber_xmpp_node_get_child (event, "composing") != NULL && - gibber_xmpp_node_get_child (event, "id") != NULL) + if (wocky_node_get_child (event, "composing") != NULL && + wocky_node_get_child (event, "id") != NULL) { return FALSE; } @@ -194,7 +194,7 @@ text_helper_parse_incoming_message (WockyStanza *stanza, /* * Parse body if it exists. */ - node = gibber_xmpp_node_get_child (top_node, "body"); + node = wocky_node_get_child (top_node, "body"); if (node) { |