File indexing completed on 2025-01-18 09:59:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #ifndef __G_IO_STREAM_H__
0020 #define __G_IO_STREAM_H__
0021
0022 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0023 #error "Only <gio/gio.h> can be included directly."
0024 #endif
0025
0026 #include <gio/ginputstream.h>
0027 #include <gio/goutputstream.h>
0028 #include <gio/gcancellable.h>
0029 #include <gio/gioerror.h>
0030
0031 G_BEGIN_DECLS
0032
0033 #define G_TYPE_IO_STREAM (g_io_stream_get_type ())
0034 #define G_IO_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_IO_STREAM, GIOStream))
0035 #define G_IO_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_IO_STREAM, GIOStreamClass))
0036 #define G_IS_IO_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_IO_STREAM))
0037 #define G_IS_IO_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_IO_STREAM))
0038 #define G_IO_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_IO_STREAM, GIOStreamClass))
0039
0040 typedef struct _GIOStreamPrivate GIOStreamPrivate;
0041 typedef struct _GIOStreamClass GIOStreamClass;
0042
0043 struct _GIOStream
0044 {
0045 GObject parent_instance;
0046
0047
0048 GIOStreamPrivate *priv;
0049 };
0050
0051 struct _GIOStreamClass
0052 {
0053 GObjectClass parent_class;
0054
0055 GInputStream * (*get_input_stream) (GIOStream *stream);
0056 GOutputStream * (*get_output_stream) (GIOStream *stream);
0057
0058 gboolean (* close_fn) (GIOStream *stream,
0059 GCancellable *cancellable,
0060 GError **error);
0061 void (* close_async) (GIOStream *stream,
0062 int io_priority,
0063 GCancellable *cancellable,
0064 GAsyncReadyCallback callback,
0065 gpointer user_data);
0066 gboolean (* close_finish) (GIOStream *stream,
0067 GAsyncResult *result,
0068 GError **error);
0069
0070
0071 void (*_g_reserved1) (void);
0072 void (*_g_reserved2) (void);
0073 void (*_g_reserved3) (void);
0074 void (*_g_reserved4) (void);
0075 void (*_g_reserved5) (void);
0076 void (*_g_reserved6) (void);
0077 void (*_g_reserved7) (void);
0078 void (*_g_reserved8) (void);
0079 void (*_g_reserved9) (void);
0080 void (*_g_reserved10) (void);
0081 };
0082
0083 GIO_AVAILABLE_IN_ALL
0084 GType g_io_stream_get_type (void) G_GNUC_CONST;
0085
0086 GIO_AVAILABLE_IN_ALL
0087 GInputStream * g_io_stream_get_input_stream (GIOStream *stream);
0088 GIO_AVAILABLE_IN_ALL
0089 GOutputStream *g_io_stream_get_output_stream (GIOStream *stream);
0090
0091 GIO_AVAILABLE_IN_ALL
0092 void g_io_stream_splice_async (GIOStream *stream1,
0093 GIOStream *stream2,
0094 GIOStreamSpliceFlags flags,
0095 int io_priority,
0096 GCancellable *cancellable,
0097 GAsyncReadyCallback callback,
0098 gpointer user_data);
0099
0100 GIO_AVAILABLE_IN_ALL
0101 gboolean g_io_stream_splice_finish (GAsyncResult *result,
0102 GError **error);
0103
0104 GIO_AVAILABLE_IN_ALL
0105 gboolean g_io_stream_close (GIOStream *stream,
0106 GCancellable *cancellable,
0107 GError **error);
0108
0109 GIO_AVAILABLE_IN_ALL
0110 void g_io_stream_close_async (GIOStream *stream,
0111 int io_priority,
0112 GCancellable *cancellable,
0113 GAsyncReadyCallback callback,
0114 gpointer user_data);
0115 GIO_AVAILABLE_IN_ALL
0116 gboolean g_io_stream_close_finish (GIOStream *stream,
0117 GAsyncResult *result,
0118 GError **error);
0119
0120 GIO_AVAILABLE_IN_ALL
0121 gboolean g_io_stream_is_closed (GIOStream *stream);
0122 GIO_AVAILABLE_IN_ALL
0123 gboolean g_io_stream_has_pending (GIOStream *stream);
0124 GIO_AVAILABLE_IN_ALL
0125 gboolean g_io_stream_set_pending (GIOStream *stream,
0126 GError **error);
0127 GIO_AVAILABLE_IN_ALL
0128 void g_io_stream_clear_pending (GIOStream *stream);
0129
0130 G_END_DECLS
0131
0132 #endif