mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Add writev() / writev_all() API to GOutputStream and GPollableOutputStream
This comes with default implementations around the normal write functions and async variants. Fixes https://gitlab.gnome.org/GNOME/glib/issues/1431
This commit is contained in:
@@ -119,11 +119,28 @@ struct _GOutputStreamClass
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
gboolean (* writev_fn) (GOutputStream *stream,
|
||||
const GOutputVector *vectors,
|
||||
gsize n_vectors,
|
||||
gsize *bytes_written,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
void (* writev_async) (GOutputStream *stream,
|
||||
const GOutputVector *vectors,
|
||||
gsize n_vectors,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
gboolean (* writev_finish) (GOutputStream *stream,
|
||||
GAsyncResult *result,
|
||||
gsize *bytes_written,
|
||||
GError **error);
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
void (*_g_reserved6) (void);
|
||||
@@ -147,6 +164,22 @@ gboolean g_output_stream_write_all (GOutputStream *stream,
|
||||
gsize *bytes_written,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
gboolean g_output_stream_writev (GOutputStream *stream,
|
||||
const GOutputVector *vectors,
|
||||
gsize n_vectors,
|
||||
gsize *bytes_written,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
gboolean g_output_stream_writev_all (GOutputStream *stream,
|
||||
GOutputVector *vectors,
|
||||
gsize n_vectors,
|
||||
gsize *bytes_written,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_40
|
||||
gboolean g_output_stream_printf (GOutputStream *stream,
|
||||
gsize *bytes_written,
|
||||
@@ -208,6 +241,35 @@ gboolean g_output_stream_write_all_finish (GOutputStream *stream,
|
||||
gsize *bytes_written,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
void g_output_stream_writev_async (GOutputStream *stream,
|
||||
const GOutputVector *vectors,
|
||||
gsize n_vectors,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
gboolean g_output_stream_writev_finish (GOutputStream *stream,
|
||||
GAsyncResult *result,
|
||||
gsize *bytes_written,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
void g_output_stream_writev_all_async (GOutputStream *stream,
|
||||
GOutputVector *vectors,
|
||||
gsize n_vectors,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
gboolean g_output_stream_writev_all_finish (GOutputStream *stream,
|
||||
GAsyncResult *result,
|
||||
gsize *bytes_written,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
void g_output_stream_write_bytes_async (GOutputStream *stream,
|
||||
GBytes *bytes,
|
||||
|
Reference in New Issue
Block a user