summaryrefslogtreecommitdiff
path: root/telepathy-glib/handle-set.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2010-05-21 11:51:40 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-05-21 11:55:49 +0100
commitd21fce565beb44bc4eea8a3be088bb9b48377a68 (patch)
tree9491a779b361e75d57baa7a20f6acd2e2d08def6 /telepathy-glib/handle-set.c
parent72a71fd03006ad5ce03fec6414d3d383dd56a94b (diff)
downloadtelepathy-glib-d21fce565beb44bc4eea8a3be088bb9b48377a68.tar.gz
Add a boxed type for handle sets
Diffstat (limited to 'telepathy-glib/handle-set.c')
-rw-r--r--telepathy-glib/handle-set.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/telepathy-glib/handle-set.c b/telepathy-glib/handle-set.c
index 7a1e74946..8839d5c30 100644
--- a/telepathy-glib/handle-set.c
+++ b/telepathy-glib/handle-set.c
@@ -29,6 +29,12 @@
#include <telepathy-glib/intset.h>
+/**
+ * TpHandleSet:
+ *
+ * A set of handles. This is similar to a #TpIntSet (and implemented using
+ * one), but adding a handle to the set also references it.
+ */
struct _TpHandleSet
{
TpHandleRepoIface *repo;
@@ -36,6 +42,30 @@ struct _TpHandleSet
};
/**
+ * TP_TYPE_HANDLE_SET:
+ *
+ * The boxed type of a #TpHandleSet.
+ *
+ * Since: 0.11.UNRELEASED
+ */
+
+GType
+tp_handle_set_get_type (void)
+{
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0))
+ {
+ type = g_boxed_type_register_static (
+ g_intern_static_string ("TpHandleSet"),
+ (GBoxedCopyFunc) tp_handle_set_copy,
+ (GBoxedFreeFunc) tp_handle_set_destroy);
+ }
+
+ return type;
+}
+
+/**
* tp_handle_set_new:
* @repo: #TpHandleRepoIface that holds the handles to be reffed by this set
*