summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@luon.net>2007-01-12 13:56:29 +0000
committerSjoerd Simons <sjoerd@luon.net>2007-01-12 13:56:29 +0000
commitb9684ae74b9726a457cbfe656dfbb63fd7ea0091 (patch)
tree7b5ffa333bc121465a1c3ce361985e052ff244f2 /src/util.c
parent71b52a1a3588a9bff133df3690a75a2b4df1db1b (diff)
downloadtelepathy-salut-b9684ae74b9726a457cbfe656dfbb63fd7ea0091.tar.gz
first compilable non-loudmouth version
First compilable version with the new xmpp infrastructure. Currently the xmpp connection is just a dummy for now. 20070112135629-93b9a-c315cde73954264a7a5121782aede9ea41f11633.gz
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c97
1 files changed, 0 insertions, 97 deletions
diff --git a/src/util.c b/src/util.c
index 4e4a2b64..1991e9d4 100644
--- a/src/util.c
+++ b/src/util.c
@@ -24,103 +24,6 @@
#include "util.h"
-static gboolean
-g_strdiff (const gchar *left, const gchar *right)
-{
- if ((NULL == left) != (NULL == right))
- return TRUE;
-
- else if (left == right)
- return FALSE;
-
- else
- return (0 != strcmp (left, right));
-}
-
-void
-lm_message_node_steal_children (LmMessageNode *snatcher,
- LmMessageNode *mum)
-{
- LmMessageNode *baby;
-
- g_return_if_fail (snatcher->children == NULL);
-
- if (mum->children == NULL)
- return;
-
- snatcher->children = mum->children;
- mum->children = NULL;
-
- for (baby = snatcher->children;
- baby != NULL;
- baby = baby->next)
- baby->parent = snatcher;
-}
-
-gboolean
-lm_message_node_has_namespace (LmMessageNode *node,
- const gchar *ns,
- const gchar *tag)
-{
- gchar *attribute = NULL;
- const gchar *node_ns;
- gboolean ret;
-
- if (tag != NULL)
- attribute = g_strconcat ("xmlns:", tag, NULL);
-
- node_ns = lm_message_node_get_attribute (node,
- tag != NULL ? attribute : "xmlns");
-
- ret = !g_strdiff (node_ns, ns);
-
- g_free (attribute);
-
- return ret;
-}
-
-LmMessageNode *
-lm_message_node_get_child_with_namespace (LmMessageNode *node,
- const gchar *name,
- const gchar *ns)
-{
- LmMessageNode *tmp;
-
- for (tmp = node->children;
- tmp != NULL;
- tmp = tmp->next)
- {
- gchar *tag = NULL;
- gboolean found;
-
- if (g_strdiff (tmp->name, name))
- {
- const gchar *suffix;
-
- suffix = strchr (tmp->name, ':');
-
- if (suffix == NULL)
- continue;
- else
- suffix++;
-
- if (g_strdiff (suffix, name))
- continue;
-
- tag = g_strndup (tmp->name, suffix - tmp->name - 1);
- }
-
- found = lm_message_node_has_namespace (tmp, ns, tag);
-
- g_free (tag);
-
- if (found)
- return tmp;
- }
-
- return NULL;
-}
-
/* extend a pointer by an offset, provided the offset is not 0 */
gpointer
mixin_offset_cast (gpointer instance, guint offset)