1 #ifndef __G_CALLBACK_INPUT_STREAM_H__
2 #define __G_CALLBACK_INPUT_STREAM_H__
8 #define G_TYPE_CALLBACK_INPUT_STREAM (g_callback_input_stream_get_type ())
9 #define G_CALLBACK_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CALLBACK_INPUT_STREAM, GCallbackInputStream))
10 #define G_CALLBACK_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CALLBACK_INPUT_STREAM, GCallbackInputStreamClass))
11 #define G_IS_CALLBACK_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CALLBACK_INPUT_STREAM))
12 #define G_IS_CALLBACK_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CALLBACK_INPUT_STREAM))
13 #define G_CALLBACK_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CALLBACK_INPUT_STREAM, GCallbackInputStreamClass))
16 typedef struct _GCallbackInputStream GCallbackInputStream;
17 typedef struct _GCallbackInputStreamClass GCallbackInputStreamClass;
18 typedef struct _GCallbackInputStreamPrivate GCallbackInputStreamPrivate;
20 struct _GCallbackInputStream
22 GInputStream parent_instance;
25 GCallbackInputStreamPrivate *priv;
28 struct _GCallbackInputStreamClass
30 GInputStreamClass parent_class;
33 GType g_callback_input_stream_get_type (void) G_GNUC_CONST;
35 typedef gssize (*GCallbackInputStreamReadFunc) (void *buffer,
37 GCancellable *cancellable,
41 typedef gboolean (*GCallbackInputStreamCloseFunc) (GCancellable *cancellable,
47 g_callback_input_stream_new (GCallbackInputStreamReadFunc read_func,
48 GCallbackInputStreamCloseFunc close_func,
53 #endif /* __G_CALLBACK_INPUT_STREAM_H__ */