Debian Codegraph @

src/dex-gio.h

raw symbols SCIP
1 /*
2 * dex-gio.h
3 *
4 * Copyright 2022 Christian Hergert <[email protected]>
5 *
6 * This library is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 2.1 of the
9 * License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * SPDX-License-Identifier: LGPL-2.1-or-later
20 */
21
22 #pragma once
23
24 #include <gio/gio.h>
25
26 #ifdef G_OS_UNIX
27 # include <gio/gunixconnection.h>
28 #endif
29
30 #include "dex-future.h"
31
32 G_BEGIN_DECLS
33
34 #define DEX_TYPE_FILE_INFO_LIST (dex_file_info_list_get_type())
35 #define DEX_TYPE_INET_ADDRESS_LIST (dex_inet_address_list_get_type())
36
37 DEX_AVAILABLE_IN_ALL
38 GType dex_file_info_list_get_type (void);
39 DEX_AVAILABLE_IN_ALL
40 GType dex_inet_address_list_get_type (void);
41 DEX_AVAILABLE_IN_1_2
42 DexFuture *dex_app_info_launch_uris (GAppInfo *appinfo,
43 GList *uris,
44 GAppLaunchContext *context) G_GNUC_WARN_UNUSED_RESULT;
45 DEX_AVAILABLE_IN_1_2
46 DexFuture *dex_app_info_get_default_for_type (const char *content_type,
47 gboolean must_support_uris) G_GNUC_WARN_UNUSED_RESULT;
48 DEX_AVAILABLE_IN_1_2
49 DexFuture *dex_app_info_get_default_for_uri_scheme (const char *uri_scheme) G_GNUC_WARN_UNUSED_RESULT;
50 DEX_AVAILABLE_IN_1_2
51 DexFuture *dex_app_info_launch_default_for_uri (const char *uri,
52 GAppLaunchContext *context) G_GNUC_WARN_UNUSED_RESULT;
53 DEX_AVAILABLE_IN_1_2
54 DexFuture *dex_async_initable_new (GType object_type,
55 int io_priority,
56 const char *first_property_name,
57 ...) G_GNUC_NULL_TERMINATED G_GNUC_WARN_UNUSED_RESULT;
58 DEX_AVAILABLE_IN_1_2
59 DexFuture *dex_file_new_tmp_dir (const char *tmpl,
60 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
61 DEX_AVAILABLE_IN_ALL
62 DexFuture *dex_file_make_directory (GFile *file,
63 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
64 DEX_AVAILABLE_IN_ALL
65 DexFuture *dex_file_make_directory_with_parents (GFile *file) G_GNUC_WARN_UNUSED_RESULT;
66 DEX_AVAILABLE_IN_ALL
67 DexFuture *dex_file_copy (GFile *source,
68 GFile *destination,
69 GFileCopyFlags flags,
70 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
71 DEX_AVAILABLE_IN_1_2
72 DexFuture *dex_file_copy_with_progress (GFile *source,
73 GFile *destination,
74 GFileCopyFlags flags,
75 int io_priority,
76 GFileProgressCallback progress_callback,
77 gpointer progress_callback_data,
78 GDestroyNotify progress_callback_data_destroy) G_GNUC_WARN_UNUSED_RESULT;
79 DEX_AVAILABLE_IN_ALL
80 DexFuture *dex_file_delete (GFile *file,
81 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
82 DEX_AVAILABLE_IN_1_2
83 DexFuture *dex_file_trash (GFile *file,
84 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
85 DEX_AVAILABLE_IN_ALL
86 DexFuture *dex_file_read (GFile *file,
87 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
88 DEX_AVAILABLE_IN_1_2
89 DexFuture *dex_file_append_to (GFile *file,
90 GFileCreateFlags flags,
91 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
92 DEX_AVAILABLE_IN_ALL
93 DexFuture *dex_file_load_contents_bytes (GFile *file) G_GNUC_WARN_UNUSED_RESULT;
94 DEX_AVAILABLE_IN_1_2
95 DexFuture *dex_file_load_partial_contents_bytes (GFile *file,
96 GFileReadMoreCallback read_more_callback,
97 gpointer read_more_callback_data,
98 GDestroyNotify read_more_callback_data_destroy) G_GNUC_WARN_UNUSED_RESULT;
99 DEX_AVAILABLE_IN_1_2
100 DexFuture *dex_file_load_bytes (GFile *file) G_GNUC_WARN_UNUSED_RESULT;
101 DEX_AVAILABLE_IN_ALL
102 DexFuture *dex_file_query_info (GFile *file,
103 const char *attributes,
104 GFileQueryInfoFlags flags,
105 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
106 DEX_AVAILABLE_IN_1_2
107 DexFuture *dex_file_query_filesystem_info (GFile *file,
108 const char *attributes,
109 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
110 DEX_AVAILABLE_IN_ALL
111 DexFuture *dex_file_query_file_type (GFile *file,
112 GFileQueryInfoFlags flags,
113 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
114 DEX_AVAILABLE_IN_1_2
115 DexFuture *dex_file_query_default_handler (GFile *file,
116 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
117 DEX_AVAILABLE_IN_1_2
118 DexFuture *dex_file_find_enclosing_mount (GFile *file,
119 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
120 DEX_AVAILABLE_IN_ALL
121 DexFuture *dex_file_set_attributes (GFile *file,
122 GFileInfo *file_info,
123 GFileQueryInfoFlags flags,
124 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
125 DEX_AVAILABLE_IN_1_2
126 DexFuture *dex_file_set_display_name (GFile *file,
127 const char *display_name,
128 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
129 DEX_AVAILABLE_IN_1_1
130 DexFuture *dex_file_create (GFile *file,
131 GFileCreateFlags flags,
132 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
133 DEX_AVAILABLE_IN_1_2
134 DexFuture *dex_file_open_readwrite (GFile *file,
135 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
136 DEX_AVAILABLE_IN_1_2
137 DexFuture *dex_file_create_readwrite (GFile *file,
138 GFileCreateFlags flags,
139 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
140 DEX_AVAILABLE_IN_ALL
141 DexFuture *dex_file_replace (GFile *file,
142 const char *etag,
143 gboolean make_backup,
144 GFileCreateFlags flags,
145 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
146 DEX_AVAILABLE_IN_1_2
147 DexFuture *dex_file_replace_readwrite (GFile *file,
148 const char *etag,
149 gboolean make_backup,
150 GFileCreateFlags flags,
151 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
152 DEX_AVAILABLE_IN_1_2
153 DexFuture *dex_file_replace_contents (GFile *file,
154 const char *contents,
155 gsize length,
156 const char *etag,
157 gboolean make_backup,
158 GFileCreateFlags flags) G_GNUC_WARN_UNUSED_RESULT;
159 DEX_AVAILABLE_IN_ALL
160 DexFuture *dex_file_replace_contents_bytes (GFile *file,
161 GBytes *contents,
162 const char *etag,
163 gboolean make_backup,
164 GFileCreateFlags flags) G_GNUC_WARN_UNUSED_RESULT;
165 DEX_AVAILABLE_IN_1_2
166 DexFuture *dex_file_make_symbolic_link (GFile *file,
167 const char *symlink_value,
168 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
169 DEX_AVAILABLE_IN_ALL
170 DexFuture *dex_file_enumerate_children (GFile *file,
171 const char *attributes,
172 GFileQueryInfoFlags flags,
173 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
174 DEX_AVAILABLE_IN_ALL
175 DexFuture *dex_file_enumerator_next_files (GFileEnumerator *file_enumerator,
176 int num_files,
177 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
178 DEX_AVAILABLE_IN_1_2
179 DexFuture *dex_file_enumerator_close (GFileEnumerator *file_enumerator,
180 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
181 DEX_AVAILABLE_IN_1_2
182 DexFuture *dex_file_input_stream_query_info (GFileInputStream *stream,
183 const char *attributes,
184 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
185 DEX_AVAILABLE_IN_1_2
186 DexFuture *dex_file_io_stream_query_info (GFileIOStream *stream,
187 const char *attributes,
188 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
189 DEX_AVAILABLE_IN_1_2
190 DexFuture *dex_file_output_stream_query_info (GFileOutputStream *stream,
191 const char *attributes,
192 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
193 DEX_AVAILABLE_IN_1_2
194 DexFuture *dex_buffered_input_stream_fill (GBufferedInputStream *stream,
195 gssize count,
196 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
197 DEX_AVAILABLE_IN_ALL
198 DexFuture *dex_input_stream_close (GInputStream *self,
199 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
200 DEX_AVAILABLE_IN_ALL
201 DexFuture *dex_input_stream_read (GInputStream *self,
202 gpointer buffer,
203 gsize count,
204 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
205 DEX_AVAILABLE_IN_ALL
206 DexFuture *dex_input_stream_skip (GInputStream *self,
207 gsize count,
208 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
209 DEX_AVAILABLE_IN_ALL
210 DexFuture *dex_input_stream_read_bytes (GInputStream *stream,
211 gsize count,
212 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
213 DEX_AVAILABLE_IN_1_1
214 DexFuture *dex_data_input_stream_read_line (GDataInputStream *stream,
215 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
216 DEX_AVAILABLE_IN_1_2
217 DexFuture *dex_data_input_stream_read_line_utf8 (GDataInputStream *stream,
218 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
219 DEX_AVAILABLE_IN_1_2
220 DexFuture *dex_data_input_stream_read_upto (GDataInputStream *stream,
221 const char *stop_chars,
222 gssize stop_chars_len,
223 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
224 DEX_AVAILABLE_IN_ALL
225 DexFuture *dex_output_stream_close (GOutputStream *self,
226 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
227 DEX_AVAILABLE_IN_1_2
228 DexFuture *dex_output_stream_flush (GOutputStream *self,
229 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
230 DEX_AVAILABLE_IN_ALL
231 DexFuture *dex_output_stream_splice (GOutputStream *output,
232 GInputStream *input,
233 GOutputStreamSpliceFlags flags,
234 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
235 DEX_AVAILABLE_IN_ALL
236 DexFuture *dex_output_stream_write (GOutputStream *self,
237 gconstpointer buffer,
238 gsize count,
239 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
240 DEX_AVAILABLE_IN_1_2
241 DexFuture *dex_output_stream_writev_all (GOutputStream *stream,
242 const GOutputVector *vectors,
243 gsize n_vectors,
244 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
245 DEX_AVAILABLE_IN_ALL
246 DexFuture *dex_output_stream_write_bytes (GOutputStream *stream,
247 GBytes *bytes,
248 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
249 DEX_AVAILABLE_IN_1_2
250 DexFuture *dex_socket_wait (GSocket *socket,
251 GIOCondition condition) G_GNUC_WARN_UNUSED_RESULT;
252 DEX_AVAILABLE_IN_ALL
253 DexFuture *dex_socket_listener_accept (GSocketListener *listener) G_GNUC_WARN_UNUSED_RESULT;
254 DEX_AVAILABLE_IN_ALL
255 DexFuture *dex_socket_client_connect (GSocketClient *socket_client,
256 GSocketConnectable *socket_connectable) G_GNUC_WARN_UNUSED_RESULT;
257 DEX_AVAILABLE_IN_1_2
258 DexFuture *dex_socket_client_connect_to_host (GSocketClient *socket_client,
259 const char *host_and_port,
260 guint16 default_port) G_GNUC_WARN_UNUSED_RESULT;
261 DEX_AVAILABLE_IN_1_2
262 DexFuture *dex_socket_client_connect_to_service (GSocketClient *socket_client,
263 const char *domain,
264 const char *service) G_GNUC_WARN_UNUSED_RESULT;
265 DEX_AVAILABLE_IN_1_2
266 DexFuture *dex_socket_client_connect_to_uri (GSocketClient *socket_client,
267 const char *uri,
268 guint16 default_port) G_GNUC_WARN_UNUSED_RESULT;
269 DEX_AVAILABLE_IN_1_2
270 DexFuture *dex_socket_connection_connect (GSocketConnection *connection,
271 GSocketAddress *address) G_GNUC_WARN_UNUSED_RESULT;
272 DEX_AVAILABLE_IN_1_2
273 DexFuture *dex_socket_address_enumerator_next (GSocketAddressEnumerator *enumerator) G_GNUC_WARN_UNUSED_RESULT;
274 DEX_AVAILABLE_IN_ALL
275 DexFuture *dex_io_stream_close (GIOStream *io_stream,
276 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
277 DEX_AVAILABLE_IN_1_2
278 DexFuture *dex_io_stream_splice (GIOStream *stream1,
279 GIOStream *stream2,
280 GIOStreamSpliceFlags flags,
281 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
282 DEX_AVAILABLE_IN_1_2
283 DexFuture *dex_tls_connection_handshake (GTlsConnection *tls_connection,
284 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
285 DEX_AVAILABLE_IN_1_2
286 DexFuture *dex_dtls_connection_handshake (GDtlsConnection *dtls_connection,
287 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
288 DEX_AVAILABLE_IN_1_2
289 DexFuture *dex_dtls_connection_shutdown (GDtlsConnection *dtls_connection,
290 gboolean shutdown_read,
291 gboolean shutdown_write,
292 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
293 DEX_AVAILABLE_IN_1_2
294 DexFuture *dex_dtls_connection_close (GDtlsConnection *dtls_connection,
295 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
296 DEX_AVAILABLE_IN_ALL
297 DexFuture *dex_resolver_lookup_by_name (GResolver *resolver,
298 const char *address) G_GNUC_WARN_UNUSED_RESULT;
299 DEX_AVAILABLE_IN_1_2
300 DexFuture *dex_resolver_lookup_by_name_with_flags (GResolver *resolver,
301 const char *address,
302 GResolverNameLookupFlags flags) G_GNUC_WARN_UNUSED_RESULT;
303 DEX_AVAILABLE_IN_1_2
304 DexFuture *dex_resolver_lookup_by_address (GResolver *resolver,
305 GInetAddress *address) G_GNUC_WARN_UNUSED_RESULT;
306 DEX_AVAILABLE_IN_1_2
307 DexFuture *dex_resolver_lookup_service (GResolver *resolver,
308 const char *service,
309 const char *protocol,
310 const char *domain) G_GNUC_WARN_UNUSED_RESULT;
311 DEX_AVAILABLE_IN_1_2
312 DexFuture *dex_resolver_lookup_records (GResolver *resolver,
313 const char *rrname,
314 GResolverRecordType record_type) G_GNUC_WARN_UNUSED_RESULT;
315 DEX_AVAILABLE_IN_1_2
316 DexFuture *dex_network_monitor_can_reach (GNetworkMonitor *monitor,
317 GSocketConnectable *connectable) G_GNUC_WARN_UNUSED_RESULT;
318 DEX_AVAILABLE_IN_1_2
319 DexFuture *dex_proxy_connect (GProxy *proxy,
320 GIOStream *connection,
321 GProxyAddress *proxy_address) G_GNUC_WARN_UNUSED_RESULT;
322 DEX_AVAILABLE_IN_1_2
323 DexFuture *dex_proxy_resolver_lookup (GProxyResolver *resolver,
324 const char *uri) G_GNUC_WARN_UNUSED_RESULT;
325 DEX_AVAILABLE_IN_ALL
326 DexFuture *dex_subprocess_wait_check (GSubprocess *subprocess) G_GNUC_WARN_UNUSED_RESULT;
327 DEX_AVAILABLE_IN_1_2
328 DexFuture *dex_subprocess_wait (GSubprocess *subprocess) G_GNUC_WARN_UNUSED_RESULT;
329 DEX_AVAILABLE_IN_1_2
330 DexFuture *dex_tls_database_verify_chain (GTlsDatabase *database,
331 GTlsCertificate *chain,
332 const char *purpose,
333 GSocketConnectable *identity,
334 GTlsInteraction *interaction,
335 GTlsDatabaseVerifyFlags flags) G_GNUC_WARN_UNUSED_RESULT;
336 DEX_AVAILABLE_IN_1_2
337 DexFuture *dex_tls_database_lookup_certificate_for_handle (GTlsDatabase *database,
338 const char *handle,
339 GTlsInteraction *interaction,
340 GTlsDatabaseLookupFlags flags) G_GNUC_WARN_UNUSED_RESULT;
341 DEX_AVAILABLE_IN_1_2
342 DexFuture *dex_tls_database_lookup_certificate_issuer (GTlsDatabase *database,
343 GTlsCertificate *certificate,
344 GTlsInteraction *interaction,
345 GTlsDatabaseLookupFlags flags) G_GNUC_WARN_UNUSED_RESULT;
346 DEX_AVAILABLE_IN_1_2
347 DexFuture *dex_tls_database_lookup_certificates_issued_by (GTlsDatabase *database,
348 GByteArray *issuer_raw_dn,
349 GTlsInteraction *interaction,
350 GTlsDatabaseLookupFlags flags) G_GNUC_WARN_UNUSED_RESULT;
351 DEX_AVAILABLE_IN_1_2
352 DexFuture *dex_tls_interaction_ask_password (GTlsInteraction *interaction,
353 GTlsPassword *password) G_GNUC_WARN_UNUSED_RESULT;
354 DEX_AVAILABLE_IN_1_2
355 DexFuture *dex_tls_interaction_request_certificate (GTlsInteraction *interaction,
356 GTlsConnection *connection,
357 GTlsCertificateRequestFlags flags) G_GNUC_WARN_UNUSED_RESULT;
358 DEX_AVAILABLE_IN_1_2
359 DexFuture *dex_permission_acquire (GPermission *permission) G_GNUC_WARN_UNUSED_RESULT;
360 DEX_AVAILABLE_IN_1_2
361 DexFuture *dex_permission_release (GPermission *permission) G_GNUC_WARN_UNUSED_RESULT;
362 DEX_AVAILABLE_IN_1_2
363 DexFuture *dex_unix_connection_send_credentials (GUnixConnection *connection) G_GNUC_WARN_UNUSED_RESULT;
364 DEX_AVAILABLE_IN_1_2
365 DexFuture *dex_unix_connection_receive_credentials (GUnixConnection *connection) G_GNUC_WARN_UNUSED_RESULT;
366 DEX_AVAILABLE_IN_ALL
367 DexFuture *dex_file_query_exists (GFile *file) G_GNUC_WARN_UNUSED_RESULT;
368 DEX_AVAILABLE_IN_ALL
369 DexFuture *dex_file_move (GFile *source,
370 GFile *destination,
371 GFileCopyFlags flags,
372 int io_priority,
373 GFileProgressCallback progress_callback,
374 gpointer progress_callback_data,
375 GDestroyNotify progress_callback_data_destroy) G_GNUC_WARN_UNUSED_RESULT;
376 DEX_AVAILABLE_IN_ALL
377 DexFuture *dex_async_initable_init (GAsyncInitable *initable,
378 int io_priority) G_GNUC_WARN_UNUSED_RESULT;
379 DEX_AVAILABLE_IN_1_1
380 DexFuture *dex_mkdir_with_parents (const char *path,
381 int mode) G_GNUC_WARN_UNUSED_RESULT;
382 DEX_AVAILABLE_IN_1_1
383 DexFuture *dex_find_program_in_path (const char *program) G_GNUC_WARN_UNUSED_RESULT;
384 DEX_AVAILABLE_IN_1_1
385 DexFuture *dex_unlink (const char *path) G_GNUC_WARN_UNUSED_RESULT;
386 DEX_AVAILABLE_IN_1_1
387 DexFuture *dex_fd_watch (int fd,
388 int events) G_GNUC_WARN_UNUSED_RESULT;
389
390 G_END_DECLS