Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
goutputstream.h
Go to the documentation of this file.
1/* GIO - GLib Input, Output and Streaming Library
2 *
3 * Copyright (C) 2006-2007 Red Hat, Inc.
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General
18 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 *
20 * Author: Alexander Larsson <alexl@redhat.com>
21 */
22
23#ifndef __G_OUTPUT_STREAM_H__
24#define __G_OUTPUT_STREAM_H__
25
26#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
27#error "Only <gio/gio.h> can be included directly."
28#endif
29
30#include <gio/giotypes.h>
31
33
34#define G_TYPE_OUTPUT_STREAM (g_output_stream_get_type ())
35#define G_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_OUTPUT_STREAM, GOutputStream))
36#define G_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_OUTPUT_STREAM, GOutputStreamClass))
37#define G_IS_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_OUTPUT_STREAM))
38#define G_IS_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_OUTPUT_STREAM))
39#define G_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_OUTPUT_STREAM, GOutputStreamClass))
40
42typedef struct _GOutputStreamPrivate GOutputStreamPrivate;
43
45{
47
48 /*< private >*/
50};
51
52
54{
56
57 /* Sync ops: */
58
60 const void *buffer,
61 gsize count,
62 GCancellable *cancellable,
63 GError **error);
65 GInputStream *source,
67 GCancellable *cancellable,
68 GError **error);
70 GCancellable *cancellable,
71 GError **error);
73 GCancellable *cancellable,
74 GError **error);
75
76 /* Async ops: (optional in derived classes) */
77
78 void (* write_async) (GOutputStream *stream,
79 const void *buffer,
80 gsize count,
81 int io_priority,
82 GCancellable *cancellable,
83 GAsyncReadyCallback callback,
84 gpointer user_data);
86 GAsyncResult *result,
87 GError **error);
88 void (* splice_async) (GOutputStream *stream,
89 GInputStream *source,
91 int io_priority,
92 GCancellable *cancellable,
93 GAsyncReadyCallback callback,
94 gpointer user_data);
96 GAsyncResult *result,
97 GError **error);
98 void (* flush_async) (GOutputStream *stream,
99 int io_priority,
100 GCancellable *cancellable,
101 GAsyncReadyCallback callback,
102 gpointer user_data);
104 GAsyncResult *result,
105 GError **error);
106 void (* close_async) (GOutputStream *stream,
107 int io_priority,
108 GCancellable *cancellable,
109 GAsyncReadyCallback callback,
110 gpointer user_data);
112 GAsyncResult *result,
113 GError **error);
114
116 const GOutputVector *vectors,
117 gsize n_vectors,
118 gsize *bytes_written,
119 GCancellable *cancellable,
120 GError **error);
121
122 void (* writev_async) (GOutputStream *stream,
123 const GOutputVector *vectors,
124 gsize n_vectors,
125 int io_priority,
126 GCancellable *cancellable,
127 GAsyncReadyCallback callback,
128 gpointer user_data);
129
131 GAsyncResult *result,
132 gsize *bytes_written,
133 GError **error);
134
135 /*< private >*/
136 /* Padding for future expansion */
137 void (*_g_reserved4) (void);
138 void (*_g_reserved5) (void);
139 void (*_g_reserved6) (void);
140 void (*_g_reserved7) (void);
141 void (*_g_reserved8) (void);
142};
143
146
149 const void *buffer,
150 gsize count,
151 GCancellable *cancellable,
152 GError **error);
155 const void *buffer,
156 gsize count,
157 gsize *bytes_written,
158 GCancellable *cancellable,
159 GError **error);
160
163 const GOutputVector *vectors,
164 gsize n_vectors,
165 gsize *bytes_written,
166 GCancellable *cancellable,
167 GError **error);
170 GOutputVector *vectors,
171 gsize n_vectors,
172 gsize *bytes_written,
173 GCancellable *cancellable,
174 GError **error);
175
178 gsize *bytes_written,
179 GCancellable *cancellable,
180 GError **error,
181 const gchar *format,
182 ...) G_GNUC_PRINTF (5, 6);
185 gsize *bytes_written,
186 GCancellable *cancellable,
187 GError **error,
188 const gchar *format,
189 va_list args) G_GNUC_PRINTF (5, 0);
192 GBytes *bytes,
193 GCancellable *cancellable,
194 GError **error);
197 GInputStream *source,
199 GCancellable *cancellable,
200 GError **error);
203 GCancellable *cancellable,
204 GError **error);
207 GCancellable *cancellable,
208 GError **error);
211 const void *buffer,
212 gsize count,
213 int io_priority,
214 GCancellable *cancellable,
215 GAsyncReadyCallback callback,
216 gpointer user_data);
219 GAsyncResult *result,
220 GError **error);
221
224 const void *buffer,
225 gsize count,
226 int io_priority,
227 GCancellable *cancellable,
228 GAsyncReadyCallback callback,
229 gpointer user_data);
230
233 GAsyncResult *result,
234 gsize *bytes_written,
235 GError **error);
236
239 const GOutputVector *vectors,
240 gsize n_vectors,
241 int io_priority,
242 GCancellable *cancellable,
243 GAsyncReadyCallback callback,
244 gpointer user_data);
247 GAsyncResult *result,
248 gsize *bytes_written,
249 GError **error);
250
253 GOutputVector *vectors,
254 gsize n_vectors,
255 int io_priority,
256 GCancellable *cancellable,
257 GAsyncReadyCallback callback,
258 gpointer user_data);
259
262 GAsyncResult *result,
263 gsize *bytes_written,
264 GError **error);
265
268 GBytes *bytes,
269 int io_priority,
270 GCancellable *cancellable,
271 GAsyncReadyCallback callback,
272 gpointer user_data);
275 GAsyncResult *result,
276 GError **error);
279 GInputStream *source,
281 int io_priority,
282 GCancellable *cancellable,
283 GAsyncReadyCallback callback,
284 gpointer user_data);
287 GAsyncResult *result,
288 GError **error);
291 int io_priority,
292 GCancellable *cancellable,
293 GAsyncReadyCallback callback,
294 gpointer user_data);
297 GAsyncResult *result,
298 GError **error);
301 int io_priority,
302 GCancellable *cancellable,
303 GAsyncReadyCallback callback,
304 gpointer user_data);
307 GAsyncResult *result,
308 GError **error);
309
318 GError **error);
321
322
324
325#endif /* __G_OUTPUT_STREAM_H__ */
typedefG_BEGIN_DECLS struct _GBytes GBytes
Definition garray.h:38
#define GIO_AVAILABLE_IN_ALL
#define GIO_AVAILABLE_IN_2_60
#define GIO_AVAILABLE_IN_2_40
#define GIO_AVAILABLE_IN_2_44
#define GIO_AVAILABLE_IN_2_34
GOutputStreamSpliceFlags
Definition gioenums.h:665
struct _GAsyncResult GAsyncResult
Definition giotypes.h:36
void(* GAsyncReadyCallback)(GObject *source_object, GAsyncResult *res, gpointer data)
Definition giotypes.h:190
signed long gssize
Definition glibconfig.h:82
unsigned long gsize
Definition glibconfig.h:83
#define G_END_DECLS
Definition gmacros.h:910
#define G_GNUC_PRINTF(format_idx, arg_idx)
Definition gmacros.h:608
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
GIO_AVAILABLE_IN_2_60 gboolean g_output_stream_writev_all_finish(GOutputStream *stream, GAsyncResult *result, gsize *bytes_written, GError **error)
GIO_AVAILABLE_IN_ALL gboolean g_output_stream_flush_finish(GOutputStream *stream, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL gssize g_output_stream_write_finish(GOutputStream *stream, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL gboolean g_output_stream_flush(GOutputStream *stream, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_2_34 void g_output_stream_write_bytes_async(GOutputStream *stream, GBytes *bytes, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_2_60 gboolean g_output_stream_writev_finish(GOutputStream *stream, GAsyncResult *result, gsize *bytes_written, GError **error)
GIO_AVAILABLE_IN_ALL void g_output_stream_splice_async(GOutputStream *stream, GInputStream *source, GOutputStreamSpliceFlags flags, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_ALL gboolean g_output_stream_is_closed(GOutputStream *stream)
GIO_AVAILABLE_IN_ALL gboolean g_output_stream_write_all(GOutputStream *stream, const void *buffer, gsize count, gsize *bytes_written, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL void g_output_stream_flush_async(GOutputStream *stream, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_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)
GIO_AVAILABLE_IN_ALL gboolean g_output_stream_close(GOutputStream *stream, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL gssize g_output_stream_splice(GOutputStream *stream, GInputStream *source, GOutputStreamSpliceFlags flags, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_2_44 gboolean g_output_stream_write_all_finish(GOutputStream *stream, GAsyncResult *result, gsize *bytes_written, GError **error)
GIO_AVAILABLE_IN_2_34 gssize g_output_stream_write_bytes_finish(GOutputStream *stream, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL void g_output_stream_write_async(GOutputStream *stream, const void *buffer, gsize count, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_ALL gboolean g_output_stream_close_finish(GOutputStream *stream, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL gssize g_output_stream_splice_finish(GOutputStream *stream, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL gboolean g_output_stream_has_pending(GOutputStream *stream)
GIO_AVAILABLE_IN_2_44 void g_output_stream_write_all_async(GOutputStream *stream, const void *buffer, gsize count, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_2_60 gboolean g_output_stream_writev_all(GOutputStream *stream, GOutputVector *vectors, gsize n_vectors, gsize *bytes_written, GCancellable *cancellable, GError **error)
GIO_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)
struct _GOutputStreamPrivate GOutputStreamPrivate
GIO_AVAILABLE_IN_ALL void g_output_stream_close_async(GOutputStream *stream, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_ALL gssize g_output_stream_write(GOutputStream *stream, const void *buffer, gsize count, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL GType g_output_stream_get_type(void) G_GNUC_CONST
GIO_AVAILABLE_IN_2_60 gboolean g_output_stream_writev(GOutputStream *stream, const GOutputVector *vectors, gsize n_vectors, gsize *bytes_written, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_2_40 gboolean GIO_AVAILABLE_IN_2_40 gboolean GIO_AVAILABLE_IN_2_34 gssize g_output_stream_write_bytes(GOutputStream *stream, GBytes *bytes, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL void g_output_stream_clear_pending(GOutputStream *stream)
GIO_AVAILABLE_IN_2_40 gboolean GIO_AVAILABLE_IN_2_40 gboolean g_output_stream_vprintf(GOutputStream *stream, gsize *bytes_written, GCancellable *cancellable, GError **error, const gchar *format, va_list args) G_GNUC_PRINTF(5
GIO_AVAILABLE_IN_2_40 gboolean g_output_stream_printf(GOutputStream *stream, gsize *bytes_written, GCancellable *cancellable, GError **error, const gchar *format,...) G_GNUC_PRINTF(5
GIO_AVAILABLE_IN_ALL gboolean g_output_stream_set_pending(GOutputStream *stream, GError **error)
GIO_AVAILABLE_IN_ALL gboolean g_output_stream_is_closing(GOutputStream *stream)
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
G_BEGIN_DECLS typedef char gchar
Definition gtypes.h:52
void * gpointer
Definition gtypes.h:109
json_t format(printf, 1, 2)))
static void error(LoadState *S, const char *why)
void(* _g_reserved5)(void)
void(* flush_async)(GOutputStream *stream, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
void(* _g_reserved6)(void)
gboolean(* flush)(GOutputStream *stream, GCancellable *cancellable, GError **error)
gboolean(* close_finish)(GOutputStream *stream, GAsyncResult *result, GError **error)
void(* _g_reserved8)(void)
void(* close_async)(GOutputStream *stream, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
gssize(* write_finish)(GOutputStream *stream, GAsyncResult *result, GError **error)
void(* write_async)(GOutputStream *stream, const void *buffer, gsize count, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
gboolean(* writev_fn)(GOutputStream *stream, const GOutputVector *vectors, gsize n_vectors, gsize *bytes_written, GCancellable *cancellable, GError **error)
gssize(* splice)(GOutputStream *stream, GInputStream *source, GOutputStreamSpliceFlags flags, 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)
void(* _g_reserved7)(void)
gboolean(* close_fn)(GOutputStream *stream, GCancellable *cancellable, GError **error)
GObjectClass parent_class
gssize(* write_fn)(GOutputStream *stream, const void *buffer, gsize count, GCancellable *cancellable, GError **error)
void(* _g_reserved4)(void)
gboolean(* writev_finish)(GOutputStream *stream, GAsyncResult *result, gsize *bytes_written, GError **error)
gssize(* splice_finish)(GOutputStream *stream, GAsyncResult *result, GError **error)
gboolean(* flush_finish)(GOutputStream *stream, GAsyncResult *result, GError **error)
void(* splice_async)(GOutputStream *stream, GInputStream *source, GOutputStreamSpliceFlags flags, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GOutputStreamPrivate * priv
GObject parent_instance