diff options
author | Dan Winship <danw@gnome.org> | 2010-11-06 15:49:55 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2010-11-26 15:07:28 -0500 |
commit | 6181c7de36771d4d3bb55785912a934e078b16df (patch) | |
tree | d26b2f688a1c6002775a91b380a1ed1fa11fe2c5 /gio/gcancellable.h | |
parent | d15cdbefecc235cfa431ee7de9c35af174bd1552 (diff) | |
download | glib-6181c7de36771d4d3bb55785912a934e078b16df.tar.gz glib-6181c7de36771d4d3bb55785912a934e078b16df.tar.bz2 glib-6181c7de36771d4d3bb55785912a934e078b16df.zip |
GCancellable: add g_cancellable_create_source()
g_cancellable_create_source() returns a GSource that triggers when its
corresponding GCancellable is cancelled. This can be used with
g_source_add_child_source() to add cancellability to a source.
Port gasynchelper's FDSource to use this rather than doing its own
cancellable handling, and also fix up its callback argument order to
be more normal.
https://bugzilla.gnome.org/show_bug.cgi?id=634239
Diffstat (limited to 'gio/gcancellable.h')
-rw-r--r-- | gio/gcancellable.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gio/gcancellable.h b/gio/gcancellable.h index dc73ccd32..d8fa63368 100644 --- a/gio/gcancellable.h +++ b/gio/gcancellable.h @@ -83,6 +83,8 @@ gboolean g_cancellable_make_pollfd (GCancellable *cancellable, GPollFD *pollfd); void g_cancellable_release_fd (GCancellable *cancellable); +GSource * g_cancellable_source_new (GCancellable *cancellable); + GCancellable *g_cancellable_get_current (void); void g_cancellable_push_current (GCancellable *cancellable); void g_cancellable_pop_current (GCancellable *cancellable); |