summaryrefslogtreecommitdiff
path: root/gio/gcancellable.h
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2008-09-26 16:19:35 +0000
committerDan Winship <danw@src.gnome.org>2008-09-26 16:19:35 +0000
commit7f4864e58d4ee438a83cbf15f76e7d7aa171016c (patch)
treeea94c2bec6ef967491f73a211345d785fc27e784 /gio/gcancellable.h
parentea0970e9ca2e875d47a5bb8982bcd42bcc4f76f6 (diff)
downloadglib-7f4864e58d4ee438a83cbf15f76e7d7aa171016c.tar.gz
glib-7f4864e58d4ee438a83cbf15f76e7d7aa171016c.tar.bz2
glib-7f4864e58d4ee438a83cbf15f76e7d7aa171016c.zip
Bug 505361 - gunixinputstream.c assumes poll() available
Bug 509446 - portable blocking gio cancellation * gcancellable.c (g_cancellable_make_pollfd): New method to make a GPollFD for a cancellable (which is slightly more complicated on Windows than Unix). * gunixinputstream.c (g_unix_input_stream_read): * gunixoutputstream.c (g_unix_output_stream_write): Use g_cancellable_make_pollfd() and g_poll() rather than using poll() directly. * tests/unix-streams.c: test of GUnixInputStream, GUnixOutputStream, and GCancellable. svn path=/trunk/; revision=7553
Diffstat (limited to 'gio/gcancellable.h')
-rw-r--r--gio/gcancellable.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gio/gcancellable.h b/gio/gcancellable.h
index 364311f28..c327fe7e9 100644
--- a/gio/gcancellable.h
+++ b/gio/gcancellable.h
@@ -68,7 +68,11 @@ GCancellable *g_cancellable_new (void);
gboolean g_cancellable_is_cancelled (GCancellable *cancellable);
gboolean g_cancellable_set_error_if_cancelled (GCancellable *cancellable,
GError **error);
+
int g_cancellable_get_fd (GCancellable *cancellable);
+void g_cancellable_make_pollfd (GCancellable *cancellable,
+ GPollFD *pollfd);
+
GCancellable *g_cancellable_get_current (void);
void g_cancellable_push_current (GCancellable *cancellable);
void g_cancellable_pop_current (GCancellable *cancellable);