summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2010-07-29 15:53:33 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-08-03 16:10:47 +0100
commita07e273d4694040ab4ed287c97bb8a99fcf46b90 (patch)
tree75d8b4d3f5b13b2556aa92932a21be239d750c80 /src/util.h
parent7cc336265aeb4423d83bb8fa7897720dfd052541 (diff)
downloadtelepathy-gabble-a07e273d4694040ab4ed287c97bb8a99fcf46b90.tar.gz
gabble_simple_async_countdown_new, _inc, _dec: new utility code
This encapsulates a common pattern for "plural" asynchronous operations that are implemented as a set of parallel protocol operations: finish only when all sub-operations have finished, with success if and only if all sub-operations succeeded. If this functionality proves to be useful, it should be added to telepathy-glib, or even to GLib.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 3d36aad26..b63da5491 100644
--- a/src/util.h
+++ b/src/util.h
@@ -123,4 +123,12 @@ gchar * gabble_peer_to_jid (GabbleConnection *conn,
TpHandle peer,
const gchar *resource);
+GSimpleAsyncResult *gabble_simple_async_countdown_new (gpointer self,
+ GAsyncReadyCallback callback,
+ gpointer user_data,
+ gpointer source_tag,
+ gssize todo);
+void gabble_simple_async_countdown_inc (GSimpleAsyncResult *simple);
+void gabble_simple_async_countdown_dec (GSimpleAsyncResult *simple);
+
#endif /* __GABBLE_UTIL_H__ */