[telepathy-gabble/master] util: add ensure_bare_contact_from_jid
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Thu Sep 24 09:22:09 PDT 2009
---
src/util.c | 10 ++++++++++
src/util.h | 4 ++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/util.c b/src/util.c
index 847a175..d22844d 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1000,3 +1000,13 @@ gabble_g_ptr_array_copy (GPtrArray *source)
return ret;
}
+
+WockyBareContact *
+ensure_bare_contact_from_jid (GabbleConnection *conn,
+ const gchar *jid)
+{
+ WockyContactFactory *contact_factory;
+
+ contact_factory = wocky_session_get_contact_factory (conn->session);
+ return wocky_contact_factory_ensure_bare_contact (contact_factory, jid);
+}
diff --git a/src/util.h b/src/util.h
index 20376f1..2e23d61 100644
--- a/src/util.h
+++ b/src/util.h
@@ -28,6 +28,7 @@
#include <telepathy-glib/handle-repo.h>
#include <telepathy-glib/util.h>
#include <loudmouth/loudmouth.h>
+#include <wocky/wocky-bare-contact.h>
#include "types.h"
@@ -97,4 +98,7 @@ const gchar * lm_message_node_get_attribute_with_namespace (LmMessageNode *node,
GPtrArray *gabble_g_ptr_array_copy (GPtrArray *source);
+WockyBareContact * ensure_bare_contact_from_jid (GabbleConnection *conn,
+ const gchar *jid);
+
#endif /* __GABBLE_UTIL_H__ */
--
1.5.6.5
More information about the telepathy-commits
mailing list