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
0020
0021
0022
0023 #ifndef __G_INPUT_STREAM_H__
0024 #define __G_INPUT_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_INPUT_STREAM (g_input_stream_get_type ())
0035 #define G_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INPUT_STREAM, GInputStream))
0036 #define G_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INPUT_STREAM, GInputStreamClass))
0037 #define G_IS_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INPUT_STREAM))
0038 #define G_IS_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INPUT_STREAM))
0039 #define G_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INPUT_STREAM, GInputStreamClass))
0040
0041 typedef struct _GInputStreamClass GInputStreamClass;
0042 typedef struct _GInputStreamPrivate GInputStreamPrivate;
0043
0044 struct _GInputStream
0045 {
0046 GObject parent_instance;
0047
0048
0049 GInputStreamPrivate *priv;
0050 };
0051
0052 struct _GInputStreamClass
0053 {
0054 GObjectClass parent_class;
0055
0056
0057
0058 gssize (* read_fn) (GInputStream *stream,
0059 void *buffer,
0060 gsize count,
0061 GCancellable *cancellable,
0062 GError **error);
0063 gssize (* skip) (GInputStream *stream,
0064 gsize count,
0065 GCancellable *cancellable,
0066 GError **error);
0067 gboolean (* close_fn) (GInputStream *stream,
0068 GCancellable *cancellable,
0069 GError **error);
0070
0071
0072 void (* read_async) (GInputStream *stream,
0073 void *buffer,
0074 gsize count,
0075 int io_priority,
0076 GCancellable *cancellable,
0077 GAsyncReadyCallback callback,
0078 gpointer user_data);
0079 gssize (* read_finish) (GInputStream *stream,
0080 GAsyncResult *result,
0081 GError **error);
0082 void (* skip_async) (GInputStream *stream,
0083 gsize count,
0084 int io_priority,
0085 GCancellable *cancellable,
0086 GAsyncReadyCallback callback,
0087 gpointer user_data);
0088 gssize (* skip_finish) (GInputStream *stream,
0089 GAsyncResult *result,
0090 GError **error);
0091 void (* close_async) (GInputStream *stream,
0092 int io_priority,
0093 GCancellable *cancellable,
0094 GAsyncReadyCallback callback,
0095 gpointer user_data);
0096 gboolean (* close_finish) (GInputStream *stream,
0097 GAsyncResult *result,
0098 GError **error);
0099
0100
0101
0102 void (*_g_reserved1) (void);
0103 void (*_g_reserved2) (void);
0104 void (*_g_reserved3) (void);
0105 void (*_g_reserved4) (void);
0106 void (*_g_reserved5) (void);
0107 };
0108
0109 GIO_AVAILABLE_IN_ALL
0110 GType g_input_stream_get_type (void) G_GNUC_CONST;
0111
0112 GIO_AVAILABLE_IN_ALL
0113 gssize g_input_stream_read (GInputStream *stream,
0114 void *buffer,
0115 gsize count,
0116 GCancellable *cancellable,
0117 GError **error);
0118 GIO_AVAILABLE_IN_ALL
0119 gboolean g_input_stream_read_all (GInputStream *stream,
0120 void *buffer,
0121 gsize count,
0122 gsize *bytes_read,
0123 GCancellable *cancellable,
0124 GError **error);
0125 GIO_AVAILABLE_IN_2_34
0126 GBytes *g_input_stream_read_bytes (GInputStream *stream,
0127 gsize count,
0128 GCancellable *cancellable,
0129 GError **error);
0130 GIO_AVAILABLE_IN_ALL
0131 gssize g_input_stream_skip (GInputStream *stream,
0132 gsize count,
0133 GCancellable *cancellable,
0134 GError **error);
0135 GIO_AVAILABLE_IN_ALL
0136 gboolean g_input_stream_close (GInputStream *stream,
0137 GCancellable *cancellable,
0138 GError **error);
0139 GIO_AVAILABLE_IN_ALL
0140 void g_input_stream_read_async (GInputStream *stream,
0141 void *buffer,
0142 gsize count,
0143 int io_priority,
0144 GCancellable *cancellable,
0145 GAsyncReadyCallback callback,
0146 gpointer user_data);
0147 GIO_AVAILABLE_IN_ALL
0148 gssize g_input_stream_read_finish (GInputStream *stream,
0149 GAsyncResult *result,
0150 GError **error);
0151
0152 GIO_AVAILABLE_IN_2_44
0153 void g_input_stream_read_all_async (GInputStream *stream,
0154 void *buffer,
0155 gsize count,
0156 int io_priority,
0157 GCancellable *cancellable,
0158 GAsyncReadyCallback callback,
0159 gpointer user_data);
0160 GIO_AVAILABLE_IN_2_44
0161 gboolean g_input_stream_read_all_finish (GInputStream *stream,
0162 GAsyncResult *result,
0163 gsize *bytes_read,
0164 GError **error);
0165
0166 GIO_AVAILABLE_IN_2_34
0167 void g_input_stream_read_bytes_async (GInputStream *stream,
0168 gsize count,
0169 int io_priority,
0170 GCancellable *cancellable,
0171 GAsyncReadyCallback callback,
0172 gpointer user_data);
0173 GIO_AVAILABLE_IN_2_34
0174 GBytes *g_input_stream_read_bytes_finish (GInputStream *stream,
0175 GAsyncResult *result,
0176 GError **error);
0177 GIO_AVAILABLE_IN_ALL
0178 void g_input_stream_skip_async (GInputStream *stream,
0179 gsize count,
0180 int io_priority,
0181 GCancellable *cancellable,
0182 GAsyncReadyCallback callback,
0183 gpointer user_data);
0184 GIO_AVAILABLE_IN_ALL
0185 gssize g_input_stream_skip_finish (GInputStream *stream,
0186 GAsyncResult *result,
0187 GError **error);
0188 GIO_AVAILABLE_IN_ALL
0189 void g_input_stream_close_async (GInputStream *stream,
0190 int io_priority,
0191 GCancellable *cancellable,
0192 GAsyncReadyCallback callback,
0193 gpointer user_data);
0194 GIO_AVAILABLE_IN_ALL
0195 gboolean g_input_stream_close_finish (GInputStream *stream,
0196 GAsyncResult *result,
0197 GError **error);
0198
0199
0200
0201 GIO_AVAILABLE_IN_ALL
0202 gboolean g_input_stream_is_closed (GInputStream *stream);
0203 GIO_AVAILABLE_IN_ALL
0204 gboolean g_input_stream_has_pending (GInputStream *stream);
0205 GIO_AVAILABLE_IN_ALL
0206 gboolean g_input_stream_set_pending (GInputStream *stream,
0207 GError **error);
0208 GIO_AVAILABLE_IN_ALL
0209 void g_input_stream_clear_pending (GInputStream *stream);
0210
0211 G_END_DECLS
0212
0213 #endif