gpollableutils: utility functions for pollable stream implementations

Move g_pollable_source_new() here from gpollableinputstream.c, add
g_pollable_source_new_full(), and add some new methods to do either
blocking or nonblocking reads depending on a boolean argument.

https://bugzilla.gnome.org/show_bug.cgi?id=673997
This commit is contained in:
Dan Winship
2012-02-11 17:22:49 -05:00
parent 7e95777a6a
commit 111ba203c2
9 changed files with 435 additions and 110 deletions

View File

@@ -76,6 +76,7 @@
<xi:include href="xml/gconverteroutputstream.xml"/>
<xi:include href="xml/gpollableinputstream.xml"/>
<xi:include href="xml/gpollableoutputstream.xml"/>
<xi:include href="xml/gpollableutils.xml"/>
</chapter>
<chapter id="types">
<title>File types and applications</title>

View File

@@ -3202,9 +3202,6 @@ g_pollable_input_stream_can_poll
g_pollable_input_stream_is_readable
g_pollable_input_stream_create_source
g_pollable_input_stream_read_nonblocking
<SUBSECTION>
GPollableSourceFunc
g_pollable_source_new
<SUBSECTION Standard>
G_POLLABLE_INPUT_STREAM
G_POLLABLE_INPUT_STREAM_GET_INTERFACE
@@ -3233,6 +3230,17 @@ G_TYPE_POLLABLE_OUTPUT_STREAM
g_pollable_output_stream_get_type
</SECTION>
<SECTION>
<FILE>gpollableutils</FILE>
GPollableSourceFunc
g_pollable_source_new
g_pollable_source_new_full
<SUBSECTION>
g_pollable_stream_read
g_pollable_stream_write
g_pollable_stream_write_all
</SECTION>
<SECTION>
<FILE>gtls</FILE>
G_TLS_ERROR