Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
ginputstream.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_INPUT_STREAM_H__
24#define __G_INPUT_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_INPUT_STREAM (g_input_stream_get_type ())
35#define G_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INPUT_STREAM, GInputStream))
36#define G_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INPUT_STREAM, GInputStreamClass))
37#define G_IS_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INPUT_STREAM))
38#define G_IS_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INPUT_STREAM))
39#define G_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INPUT_STREAM, GInputStreamClass))
40
42typedef struct _GInputStreamPrivate GInputStreamPrivate;
43
45{
47
48 /*< private >*/
50};
51
53{
55
56 /* Sync ops: */
57
59 void *buffer,
60 gsize count,
61 GCancellable *cancellable,
62 GError **error);
63 gssize (* skip) (GInputStream *stream,
64 gsize count,
65 GCancellable *cancellable,
66 GError **error);
68 GCancellable *cancellable,
69 GError **error);
70
71 /* Async ops: (optional in derived classes) */
72 void (* read_async) (GInputStream *stream,
73 void *buffer,
74 gsize count,
75 int io_priority,
76 GCancellable *cancellable,
77 GAsyncReadyCallback callback,
78 gpointer user_data);
80 GAsyncResult *result,
81 GError **error);
82 void (* skip_async) (GInputStream *stream,
83 gsize count,
84 int io_priority,
85 GCancellable *cancellable,
86 GAsyncReadyCallback callback,
87 gpointer user_data);
89 GAsyncResult *result,
90 GError **error);
91 void (* close_async) (GInputStream *stream,
92 int io_priority,
93 GCancellable *cancellable,
94 GAsyncReadyCallback callback,
95 gpointer user_data);
97 GAsyncResult *result,
98 GError **error);
99
100 /*< private >*/
101 /* Padding for future expansion */
102 void (*_g_reserved1) (void);
103 void (*_g_reserved2) (void);
104 void (*_g_reserved3) (void);
105 void (*_g_reserved4) (void);
106 void (*_g_reserved5) (void);
107};
108
111
114 void *buffer,
115 gsize count,
116 GCancellable *cancellable,
117 GError **error);
120 void *buffer,
121 gsize count,
122 gsize *bytes_read,
123 GCancellable *cancellable,
124 GError **error);
127 gsize count,
128 GCancellable *cancellable,
129 GError **error);
132 gsize count,
133 GCancellable *cancellable,
134 GError **error);
137 GCancellable *cancellable,
138 GError **error);
141 void *buffer,
142 gsize count,
143 int io_priority,
144 GCancellable *cancellable,
145 GAsyncReadyCallback callback,
146 gpointer user_data);
149 GAsyncResult *result,
150 GError **error);
151
154 void *buffer,
155 gsize count,
156 int io_priority,
157 GCancellable *cancellable,
158 GAsyncReadyCallback callback,
159 gpointer user_data);
162 GAsyncResult *result,
163 gsize *bytes_read,
164 GError **error);
165
168 gsize count,
169 int io_priority,
170 GCancellable *cancellable,
171 GAsyncReadyCallback callback,
172 gpointer user_data);
175 GAsyncResult *result,
176 GError **error);
179 gsize count,
180 int io_priority,
181 GCancellable *cancellable,
182 GAsyncReadyCallback callback,
183 gpointer user_data);
186 GAsyncResult *result,
187 GError **error);
190 int io_priority,
191 GCancellable *cancellable,
192 GAsyncReadyCallback callback,
193 gpointer user_data);
196 GAsyncResult *result,
197 GError **error);
198
199/* For implementations: */
200
207 GError **error);
210
212
213#endif /* __G_INPUT_STREAM_H__ */
typedefG_BEGIN_DECLS struct _GBytes GBytes
Definition garray.h:38
GIO_AVAILABLE_IN_ALL GType g_input_stream_get_type(void) G_GNUC_CONST
GIO_AVAILABLE_IN_2_34 void g_input_stream_read_bytes_async(GInputStream *stream, gsize count, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_ALL gboolean g_input_stream_set_pending(GInputStream *stream, GError **error)
GIO_AVAILABLE_IN_ALL void g_input_stream_skip_async(GInputStream *stream, gsize count, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_ALL gboolean g_input_stream_has_pending(GInputStream *stream)
GIO_AVAILABLE_IN_ALL gssize g_input_stream_read(GInputStream *stream, void *buffer, gsize count, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL gboolean g_input_stream_read_all(GInputStream *stream, void *buffer, gsize count, gsize *bytes_read, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL gboolean g_input_stream_is_closed(GInputStream *stream)
GIO_AVAILABLE_IN_2_34 GBytes * g_input_stream_read_bytes_finish(GInputStream *stream, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL gssize g_input_stream_read_finish(GInputStream *stream, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL void g_input_stream_close_async(GInputStream *stream, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
struct _GInputStreamPrivate GInputStreamPrivate
GIO_AVAILABLE_IN_ALL gboolean g_input_stream_close(GInputStream *stream, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL gboolean g_input_stream_close_finish(GInputStream *stream, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_2_44 void g_input_stream_read_all_async(GInputStream *stream, void *buffer, gsize count, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_ALL void g_input_stream_read_async(GInputStream *stream, void *buffer, gsize count, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_2_34 GBytes * g_input_stream_read_bytes(GInputStream *stream, gsize count, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL gssize g_input_stream_skip(GInputStream *stream, gsize count, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_2_44 gboolean g_input_stream_read_all_finish(GInputStream *stream, GAsyncResult *result, gsize *bytes_read, GError **error)
GIO_AVAILABLE_IN_ALL gssize g_input_stream_skip_finish(GInputStream *stream, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL void g_input_stream_clear_pending(GInputStream *stream)
#define GIO_AVAILABLE_IN_ALL
#define GIO_AVAILABLE_IN_2_44
#define GIO_AVAILABLE_IN_2_34
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_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
void * gpointer
Definition gtypes.h:109
static void error(LoadState *S, const char *why)
void(* _g_reserved3)(void)
void(* _g_reserved2)(void)
void(* read_async)(GInputStream *stream, void *buffer, gsize count, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
gboolean(* close_finish)(GInputStream *stream, GAsyncResult *result, GError **error)
GObjectClass parent_class
void(* _g_reserved5)(void)
void(* close_async)(GInputStream *stream, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
gboolean(* close_fn)(GInputStream *stream, GCancellable *cancellable, GError **error)
gssize(* skip_finish)(GInputStream *stream, GAsyncResult *result, GError **error)
gssize(* read_fn)(GInputStream *stream, void *buffer, gsize count, GCancellable *cancellable, GError **error)
void(* _g_reserved1)(void)
void(* _g_reserved4)(void)
gssize(* read_finish)(GInputStream *stream, GAsyncResult *result, GError **error)
void(* skip_async)(GInputStream *stream, gsize count, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
gssize(* skip)(GInputStream *stream, gsize count, GCancellable *cancellable, GError **error)
GObject parent_instance
GInputStreamPrivate * priv