GMemoryInputStream: Add API to accept GBytes

And s/Chunk/GBytes/ internally.  GBytes is really a perfect match for
GMemoryInputStream.

https://bugzilla.gnome.org/show_bug.cgi?id=672102
This commit is contained in:
Colin Walters
2012-05-17 14:36:15 -04:00
parent 6e32f0a601
commit 1bedf24879
3 changed files with 78 additions and 41 deletions

View File

@@ -72,10 +72,16 @@ GInputStream * g_memory_input_stream_new (void);
GInputStream * g_memory_input_stream_new_from_data (const void *data,
gssize len,
GDestroyNotify destroy);
GLIB_AVAILABLE_IN_2_34
GInputStream * g_memory_input_stream_new_from_bytes (GBytes *bytes);
void g_memory_input_stream_add_data (GMemoryInputStream *stream,
const void *data,
gssize len,
GDestroyNotify destroy);
GLIB_AVAILABLE_IN_2_34
void g_memory_input_stream_add_bytes (GMemoryInputStream *stream,
GBytes *bytes);
G_END_DECLS