summaryrefslogtreecommitdiff
path: root/telepathy-glib/util.h
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2010-04-01 17:42:25 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-04-06 17:17:54 +0100
commit455f8dc19bf09b2d7c9d46e38a817f7b509d675b (patch)
tree33129c9b58d0c7f27c9c19c8d9fc74e7b6513c50 /telepathy-glib/util.h
parent4ad8d6d5c47f14f1ddfd75900ed306591b9f0ac1 (diff)
downloadtelepathy-glib-455f8dc19bf09b2d7c9d46e38a817f7b509d675b.tar.gz
Add TpWeakRef, a weak-ref wrapper
This can bridge between the semantics of tp_connection_manager_call_when_ready, and user-data-only functions like tp_*_prepare_async.
Diffstat (limited to 'telepathy-glib/util.h')
-rw-r--r--telepathy-glib/util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/telepathy-glib/util.h b/telepathy-glib/util.h
index 3bdc3d496..d089822a0 100644
--- a/telepathy-glib/util.h
+++ b/telepathy-glib/util.h
@@ -99,6 +99,13 @@ void tp_value_array_unpack (GValueArray *array,
gsize len,
...);
+typedef struct _TpWeakRef TpWeakRef;
+TpWeakRef *tp_weak_ref_new (gpointer object, gpointer user_data,
+ GDestroyNotify destroy) G_GNUC_WARN_UNUSED_RESULT;
+gpointer tp_weak_ref_get_user_data (TpWeakRef *self) G_GNUC_WARN_UNUSED_RESULT;
+gpointer tp_weak_ref_dup_object (TpWeakRef *self) G_GNUC_WARN_UNUSED_RESULT;
+void tp_weak_ref_destroy (TpWeakRef *self);
+
G_END_DECLS
#undef __TP_IN_UTIL_H__