File indexing completed on 2025-01-18 09:59:58
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef __G_OUTPUT_STREAM_H__
0024 #define __G_OUTPUT_STREAM_H__
0025
0026 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0027 #error "Only <gio/gio.h> can be included directly."
0028 #endif
0029
0030 #include <gio/giotypes.h>
0031
0032 G_BEGIN_DECLS
0033
0034 #define G_TYPE_OUTPUT_STREAM (g_output_stream_get_type ())
0035 #define G_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_OUTPUT_STREAM, GOutputStream))
0036 #define G_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_OUTPUT_STREAM, GOutputStreamClass))
0037 #define G_IS_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_OUTPUT_STREAM))
0038 #define G_IS_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_OUTPUT_STREAM))
0039 #define G_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_OUTPUT_STREAM, GOutputStreamClass))
0040
0041 typedef struct _GOutputStreamClass GOutputStreamClass;
0042 typedef struct _GOutputStreamPrivate GOutputStreamPrivate;
0043
0044 struct _GOutputStream
0045 {
0046 GObject parent_instance;
0047
0048
0049 GOutputStreamPrivate *priv;
0050 };
0051
0052
0053 struct _GOutputStreamClass
0054 {
0055 GObjectClass parent_class;
0056
0057
0058
0059 gssize (* write_fn) (GOutputStream *stream,
0060 const void *buffer,
0061 gsize count,
0062 GCancellable *cancellable,
0063 GError **error);
0064 gssize (* splice) (GOutputStream *stream,
0065 GInputStream *source,
0066 GOutputStreamSpliceFlags flags,
0067 GCancellable *cancellable,
0068 GError **error);
0069 gboolean (* flush) (GOutputStream *stream,
0070 GCancellable *cancellable,
0071 GError **error);
0072 gboolean (* close_fn) (GOutputStream *stream,
0073 GCancellable *cancellable,
0074 GError **error);
0075
0076
0077
0078 void (* write_async) (GOutputStream *stream,
0079 const void *buffer,
0080 gsize count,
0081 int io_priority,
0082 GCancellable *cancellable,
0083 GAsyncReadyCallback callback,
0084 gpointer user_data);
0085 gssize (* write_finish) (GOutputStream *stream,
0086 GAsyncResult *result,
0087 GError **error);
0088 void (* splice_async) (GOutputStream *stream,
0089 GInputStream *source,
0090 GOutputStreamSpliceFlags flags,
0091 int io_priority,
0092 GCancellable *cancellable,
0093 GAsyncReadyCallback callback,
0094 gpointer user_data);
0095 gssize (* splice_finish) (GOutputStream *stream,
0096 GAsyncResult *result,
0097 GError **error);
0098 void (* flush_async) (GOutputStream *stream,
0099 int io_priority,
0100 GCancellable *cancellable,
0101 GAsyncReadyCallback callback,
0102 gpointer user_data);
0103 gboolean (* flush_finish) (GOutputStream *stream,
0104 GAsyncResult *result,
0105 GError **error);
0106 void (* close_async) (GOutputStream *stream,
0107 int io_priority,
0108 GCancellable *cancellable,
0109 GAsyncReadyCallback callback,
0110 gpointer user_data);
0111 gboolean (* close_finish) (GOutputStream *stream,
0112 GAsyncResult *result,
0113 GError **error);
0114
0115 gboolean (* writev_fn) (GOutputStream *stream,
0116 const GOutputVector *vectors,
0117 gsize n_vectors,
0118 gsize *bytes_written,
0119 GCancellable *cancellable,
0120 GError **error);
0121
0122 void (* writev_async) (GOutputStream *stream,
0123 const GOutputVector *vectors,
0124 gsize n_vectors,
0125 int io_priority,
0126 GCancellable *cancellable,
0127 GAsyncReadyCallback callback,
0128 gpointer user_data);
0129
0130 gboolean (* writev_finish) (GOutputStream *stream,
0131 GAsyncResult *result,
0132 gsize *bytes_written,
0133 GError **error);
0134
0135
0136
0137 void (*_g_reserved4) (void);
0138 void (*_g_reserved5) (void);
0139 void (*_g_reserved6) (void);
0140 void (*_g_reserved7) (void);
0141 void (*_g_reserved8) (void);
0142 };
0143
0144 GIO_AVAILABLE_IN_ALL
0145 GType g_output_stream_get_type (void) G_GNUC_CONST;
0146
0147 GIO_AVAILABLE_IN_ALL
0148 gssize g_output_stream_write (GOutputStream *stream,
0149 const void *buffer,
0150 gsize count,
0151 GCancellable *cancellable,
0152 GError **error);
0153 GIO_AVAILABLE_IN_ALL
0154 gboolean g_output_stream_write_all (GOutputStream *stream,
0155 const void *buffer,
0156 gsize count,
0157 gsize *bytes_written,
0158 GCancellable *cancellable,
0159 GError **error);
0160
0161 GIO_AVAILABLE_IN_2_60
0162 gboolean g_output_stream_writev (GOutputStream *stream,
0163 const GOutputVector *vectors,
0164 gsize n_vectors,
0165 gsize *bytes_written,
0166 GCancellable *cancellable,
0167 GError **error);
0168 GIO_AVAILABLE_IN_2_60
0169 gboolean g_output_stream_writev_all (GOutputStream *stream,
0170 GOutputVector *vectors,
0171 gsize n_vectors,
0172 gsize *bytes_written,
0173 GCancellable *cancellable,
0174 GError **error);
0175
0176 GIO_AVAILABLE_IN_2_40
0177 gboolean g_output_stream_printf (GOutputStream *stream,
0178 gsize *bytes_written,
0179 GCancellable *cancellable,
0180 GError **error,
0181 const gchar *format,
0182 ...) G_GNUC_PRINTF (5, 6);
0183 GIO_AVAILABLE_IN_2_40
0184 gboolean g_output_stream_vprintf (GOutputStream *stream,
0185 gsize *bytes_written,
0186 GCancellable *cancellable,
0187 GError **error,
0188 const gchar *format,
0189 va_list args) G_GNUC_PRINTF (5, 0);
0190 GIO_AVAILABLE_IN_2_34
0191 gssize g_output_stream_write_bytes (GOutputStream *stream,
0192 GBytes *bytes,
0193 GCancellable *cancellable,
0194 GError **error);
0195 GIO_AVAILABLE_IN_ALL
0196 gssize g_output_stream_splice (GOutputStream *stream,
0197 GInputStream *source,
0198 GOutputStreamSpliceFlags flags,
0199 GCancellable *cancellable,
0200 GError **error);
0201 GIO_AVAILABLE_IN_ALL
0202 gboolean g_output_stream_flush (GOutputStream *stream,
0203 GCancellable *cancellable,
0204 GError **error);
0205 GIO_AVAILABLE_IN_ALL
0206 gboolean g_output_stream_close (GOutputStream *stream,
0207 GCancellable *cancellable,
0208 GError **error);
0209 GIO_AVAILABLE_IN_ALL
0210 void g_output_stream_write_async (GOutputStream *stream,
0211 const void *buffer,
0212 gsize count,
0213 int io_priority,
0214 GCancellable *cancellable,
0215 GAsyncReadyCallback callback,
0216 gpointer user_data);
0217 GIO_AVAILABLE_IN_ALL
0218 gssize g_output_stream_write_finish (GOutputStream *stream,
0219 GAsyncResult *result,
0220 GError **error);
0221
0222 GIO_AVAILABLE_IN_2_44
0223 void g_output_stream_write_all_async (GOutputStream *stream,
0224 const void *buffer,
0225 gsize count,
0226 int io_priority,
0227 GCancellable *cancellable,
0228 GAsyncReadyCallback callback,
0229 gpointer user_data);
0230
0231 GIO_AVAILABLE_IN_2_44
0232 gboolean g_output_stream_write_all_finish (GOutputStream *stream,
0233 GAsyncResult *result,
0234 gsize *bytes_written,
0235 GError **error);
0236
0237 GIO_AVAILABLE_IN_2_60
0238 void g_output_stream_writev_async (GOutputStream *stream,
0239 const GOutputVector *vectors,
0240 gsize n_vectors,
0241 int io_priority,
0242 GCancellable *cancellable,
0243 GAsyncReadyCallback callback,
0244 gpointer user_data);
0245 GIO_AVAILABLE_IN_2_60
0246 gboolean g_output_stream_writev_finish (GOutputStream *stream,
0247 GAsyncResult *result,
0248 gsize *bytes_written,
0249 GError **error);
0250
0251 GIO_AVAILABLE_IN_2_60
0252 void g_output_stream_writev_all_async (GOutputStream *stream,
0253 GOutputVector *vectors,
0254 gsize n_vectors,
0255 int io_priority,
0256 GCancellable *cancellable,
0257 GAsyncReadyCallback callback,
0258 gpointer user_data);
0259
0260 GIO_AVAILABLE_IN_2_60
0261 gboolean g_output_stream_writev_all_finish (GOutputStream *stream,
0262 GAsyncResult *result,
0263 gsize *bytes_written,
0264 GError **error);
0265
0266 GIO_AVAILABLE_IN_2_34
0267 void g_output_stream_write_bytes_async (GOutputStream *stream,
0268 GBytes *bytes,
0269 int io_priority,
0270 GCancellable *cancellable,
0271 GAsyncReadyCallback callback,
0272 gpointer user_data);
0273 GIO_AVAILABLE_IN_2_34
0274 gssize g_output_stream_write_bytes_finish (GOutputStream *stream,
0275 GAsyncResult *result,
0276 GError **error);
0277 GIO_AVAILABLE_IN_ALL
0278 void g_output_stream_splice_async (GOutputStream *stream,
0279 GInputStream *source,
0280 GOutputStreamSpliceFlags flags,
0281 int io_priority,
0282 GCancellable *cancellable,
0283 GAsyncReadyCallback callback,
0284 gpointer user_data);
0285 GIO_AVAILABLE_IN_ALL
0286 gssize g_output_stream_splice_finish (GOutputStream *stream,
0287 GAsyncResult *result,
0288 GError **error);
0289 GIO_AVAILABLE_IN_ALL
0290 void g_output_stream_flush_async (GOutputStream *stream,
0291 int io_priority,
0292 GCancellable *cancellable,
0293 GAsyncReadyCallback callback,
0294 gpointer user_data);
0295 GIO_AVAILABLE_IN_ALL
0296 gboolean g_output_stream_flush_finish (GOutputStream *stream,
0297 GAsyncResult *result,
0298 GError **error);
0299 GIO_AVAILABLE_IN_ALL
0300 void g_output_stream_close_async (GOutputStream *stream,
0301 int io_priority,
0302 GCancellable *cancellable,
0303 GAsyncReadyCallback callback,
0304 gpointer user_data);
0305 GIO_AVAILABLE_IN_ALL
0306 gboolean g_output_stream_close_finish (GOutputStream *stream,
0307 GAsyncResult *result,
0308 GError **error);
0309
0310 GIO_AVAILABLE_IN_ALL
0311 gboolean g_output_stream_is_closed (GOutputStream *stream);
0312 GIO_AVAILABLE_IN_ALL
0313 gboolean g_output_stream_is_closing (GOutputStream *stream);
0314 GIO_AVAILABLE_IN_ALL
0315 gboolean g_output_stream_has_pending (GOutputStream *stream);
0316 GIO_AVAILABLE_IN_ALL
0317 gboolean g_output_stream_set_pending (GOutputStream *stream,
0318 GError **error);
0319 GIO_AVAILABLE_IN_ALL
0320 void g_output_stream_clear_pending (GOutputStream *stream);
0321
0322
0323 G_END_DECLS
0324
0325 #endif