| 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 __GIO_TYPES_H__ |
| 24 | #define __GIO_TYPES_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/gioenums.h> |
| 31 | |
| 32 | G_BEGIN_DECLS |
| 33 | |
| 34 | typedef struct _GAppLaunchContext GAppLaunchContext; |
| 35 | typedef struct _GAppInfo GAppInfo; /* Dummy typedef */ |
| 36 | typedef struct _GAsyncResult GAsyncResult; /* Dummy typedef */ |
| 37 | typedef struct _GAsyncInitable GAsyncInitable; |
| 38 | typedef struct _GBufferedInputStream GBufferedInputStream; |
| 39 | typedef struct _GBufferedOutputStream GBufferedOutputStream; |
| 40 | typedef struct _GCancellable GCancellable; |
| 41 | typedef struct _GCharsetConverter GCharsetConverter; |
| 42 | typedef struct _GConverter GConverter; |
| 43 | typedef struct _GConverterInputStream GConverterInputStream; |
| 44 | typedef struct _GConverterOutputStream GConverterOutputStream; |
| 45 | typedef struct _GDatagramBased GDatagramBased; |
| 46 | typedef struct _GDataInputStream GDataInputStream; |
| 47 | typedef struct _GSimplePermission GSimplePermission; |
| 48 | typedef struct _GZlibCompressor GZlibCompressor; |
| 49 | typedef struct _GZlibDecompressor GZlibDecompressor; |
| 50 | |
| 51 | typedef struct _GSimpleActionGroup GSimpleActionGroup; |
| 52 | typedef struct _GRemoteActionGroup GRemoteActionGroup; |
| 53 | typedef struct _GDBusActionGroup GDBusActionGroup; |
| 54 | typedef struct _GActionMap GActionMap; |
| 55 | typedef struct _GActionGroup GActionGroup; |
| 56 | typedef struct _GPropertyAction GPropertyAction; |
| 57 | typedef struct _GSimpleAction GSimpleAction; |
| 58 | typedef struct _GAction GAction; |
| 59 | typedef struct _GApplication GApplication; |
| 60 | typedef struct _GApplicationCommandLine GApplicationCommandLine; |
| 61 | typedef struct _GSettingsBackend GSettingsBackend; |
| 62 | typedef struct _GSettings GSettings; |
| 63 | typedef struct _GPermission GPermission; |
| 64 | |
| 65 | typedef struct _GMenuModel ; |
| 66 | typedef struct _GNotification GNotification; |
| 67 | |
| 68 | typedef struct _GDrive GDrive; /* Dummy typedef */ |
| 69 | typedef struct _GFileEnumerator GFileEnumerator; |
| 70 | typedef struct _GFileMonitor GFileMonitor; |
| 71 | typedef struct _GFilterInputStream GFilterInputStream; |
| 72 | typedef struct _GFilterOutputStream GFilterOutputStream; |
| 73 | |
| 74 | typedef struct _GFile GFile; /* Dummy typedef */ |
| 75 | typedef struct _GFileInfo GFileInfo; |
| 76 | |
| 77 | /** |
| 78 | * GFileAttributeMatcher: |
| 79 | * |
| 80 | * Determines if a string matches a file attribute. |
| 81 | **/ |
| 82 | typedef struct _GFileAttributeMatcher GFileAttributeMatcher; |
| 83 | typedef struct _GFileAttributeInfo GFileAttributeInfo; |
| 84 | typedef struct _GFileAttributeInfoList GFileAttributeInfoList; |
| 85 | typedef struct _GFileInputStream GFileInputStream; |
| 86 | typedef struct _GFileOutputStream GFileOutputStream; |
| 87 | typedef struct _GFileIOStream GFileIOStream; |
| 88 | typedef struct _GFileIcon GFileIcon; |
| 89 | typedef struct _GFilenameCompleter GFilenameCompleter; |
| 90 | |
| 91 | |
| 92 | typedef struct _GIcon GIcon; /* Dummy typedef */ |
| 93 | typedef struct _GInetAddress GInetAddress; |
| 94 | typedef struct _GInetAddressMask GInetAddressMask; |
| 95 | typedef struct _GInetSocketAddress GInetSocketAddress; |
| 96 | typedef struct _GNativeSocketAddress GNativeSocketAddress; |
| 97 | typedef struct _GInputStream GInputStream; |
| 98 | typedef struct _GInitable GInitable; |
| 99 | typedef struct _GIOModule GIOModule; |
| 100 | typedef struct _GIOExtensionPoint GIOExtensionPoint; |
| 101 | typedef struct _GIOExtension GIOExtension; |
| 102 | |
| 103 | /** |
| 104 | * GIOSchedulerJob: |
| 105 | * |
| 106 | * Opaque class for defining and scheduling IO jobs. |
| 107 | * |
| 108 | * Deprecated: 2.36: Use [struct@GLib.ThreadPool] or |
| 109 | * [method@Gio.Task.run_in_thread] |
| 110 | **/ |
| 111 | typedef struct _GIOSchedulerJob GIOSchedulerJob; |
| 112 | typedef struct _GIOStreamAdapter GIOStreamAdapter; |
| 113 | typedef struct _GLoadableIcon GLoadableIcon; /* Dummy typedef */ |
| 114 | typedef struct _GBytesIcon GBytesIcon; |
| 115 | typedef struct _GMemoryInputStream GMemoryInputStream; |
| 116 | typedef struct _GMemoryOutputStream GMemoryOutputStream; |
| 117 | |
| 118 | typedef struct _GMount GMount; /* Dummy typedef */ |
| 119 | typedef struct _GMountOperation GMountOperation; |
| 120 | typedef struct _GNetworkAddress GNetworkAddress; |
| 121 | typedef struct _GNetworkMonitor GNetworkMonitor; |
| 122 | typedef struct _GNetworkService GNetworkService; |
| 123 | typedef struct _GOutputStream GOutputStream; |
| 124 | typedef struct _GIOStream GIOStream; |
| 125 | typedef struct _GSimpleIOStream GSimpleIOStream; |
| 126 | typedef struct _GPollableInputStream GPollableInputStream; /* Dummy typedef */ |
| 127 | typedef struct _GPollableOutputStream GPollableOutputStream; /* Dummy typedef */ |
| 128 | typedef struct _GResolver GResolver; |
| 129 | |
| 130 | typedef struct _GResource GResource; |
| 131 | typedef struct _GSeekable GSeekable; |
| 132 | typedef struct _GSimpleAsyncResult GSimpleAsyncResult; |
| 133 | |
| 134 | typedef struct _GSocket GSocket; |
| 135 | |
| 136 | typedef struct _GSocketControlMessage GSocketControlMessage; |
| 137 | typedef struct _GSocketClient GSocketClient; |
| 138 | typedef struct _GSocketConnection GSocketConnection; |
| 139 | typedef struct _GSocketListener GSocketListener; |
| 140 | typedef struct _GSocketService GSocketService; |
| 141 | typedef struct _GSocketAddress GSocketAddress; |
| 142 | typedef struct _GSocketAddressEnumerator GSocketAddressEnumerator; |
| 143 | typedef struct _GSocketConnectable GSocketConnectable; |
| 144 | typedef struct _GSrvTarget GSrvTarget; |
| 145 | typedef struct _GTask GTask; |
| 146 | typedef struct _GTcpConnection GTcpConnection; |
| 147 | typedef struct _GTcpWrapperConnection GTcpWrapperConnection; |
| 148 | typedef struct _GThreadedSocketService GThreadedSocketService; |
| 149 | typedef struct _GDtlsConnection GDtlsConnection; |
| 150 | typedef struct _GDtlsClientConnection GDtlsClientConnection; /* Dummy typedef */ |
| 151 | typedef struct _GDtlsServerConnection GDtlsServerConnection; /* Dummy typedef */ |
| 152 | typedef struct _GThemedIcon GThemedIcon; |
| 153 | typedef struct _GTlsCertificate GTlsCertificate; |
| 154 | typedef struct _GTlsClientConnection GTlsClientConnection; /* Dummy typedef */ |
| 155 | typedef struct _GTlsConnection GTlsConnection; |
| 156 | typedef struct _GTlsDatabase GTlsDatabase; |
| 157 | typedef struct _GTlsFileDatabase GTlsFileDatabase; |
| 158 | typedef struct _GTlsInteraction GTlsInteraction; |
| 159 | typedef struct _GTlsPassword GTlsPassword; |
| 160 | typedef struct _GTlsServerConnection GTlsServerConnection; /* Dummy typedef */ |
| 161 | typedef struct _GVfs GVfs; /* Dummy typedef */ |
| 162 | |
| 163 | typedef struct _GProxyResolver GProxyResolver; |
| 164 | typedef struct _GProxy GProxy; |
| 165 | typedef struct _GProxyAddress GProxyAddress; |
| 166 | typedef struct _GProxyAddressEnumerator GProxyAddressEnumerator; |
| 167 | |
| 168 | typedef struct _GVolume GVolume; /* Dummy typedef */ |
| 169 | typedef struct _GVolumeMonitor GVolumeMonitor; |
| 170 | |
| 171 | /** |
| 172 | * GAsyncReadyCallback: |
| 173 | * @source_object: (nullable): the object the asynchronous operation was started with. |
| 174 | * @res: a #GAsyncResult. |
| 175 | * @data: user data passed to the callback. |
| 176 | * |
| 177 | * Type definition for a function that will be called back when an asynchronous |
| 178 | * operation within GIO has been completed. #GAsyncReadyCallback |
| 179 | * callbacks from #GTask are guaranteed to be invoked in a later |
| 180 | * iteration of the |
| 181 | * [thread-default main context][g-main-context-push-thread-default] |
| 182 | * where the #GTask was created. All other users of |
| 183 | * #GAsyncReadyCallback must likewise call it asynchronously in a |
| 184 | * later iteration of the main context. |
| 185 | * |
| 186 | * The asynchronous operation is guaranteed to have held a reference to |
| 187 | * @source_object from the time when the `*_async()` function was called, until |
| 188 | * after this callback returns. |
| 189 | **/ |
| 190 | typedef void (*GAsyncReadyCallback) (GObject *source_object, |
| 191 | GAsyncResult *res, |
| 192 | gpointer data); |
| 193 | |
| 194 | /** |
| 195 | * GFileProgressCallback: |
| 196 | * @current_num_bytes: the current number of bytes in the operation. |
| 197 | * @total_num_bytes: the total number of bytes in the operation. |
| 198 | * @data: user data passed to the callback. |
| 199 | * |
| 200 | * When doing file operations that may take a while, such as moving |
| 201 | * a file or copying a file, a progress callback is used to pass how |
| 202 | * far along that operation is to the application. |
| 203 | **/ |
| 204 | typedef void (*GFileProgressCallback) (goffset current_num_bytes, |
| 205 | goffset total_num_bytes, |
| 206 | gpointer data); |
| 207 | |
| 208 | /** |
| 209 | * GFileReadMoreCallback: |
| 210 | * @file_contents: the data as currently read. |
| 211 | * @file_size: the size of the data currently read. |
| 212 | * @callback_data: data passed to the callback. |
| 213 | * |
| 214 | * When loading the partial contents of a file with g_file_load_partial_contents_async(), |
| 215 | * it may become necessary to determine if any more data from the file should be loaded. |
| 216 | * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data |
| 217 | * should be read, or %FALSE otherwise. |
| 218 | * |
| 219 | * Returns: %TRUE if more data should be read back. %FALSE otherwise. |
| 220 | **/ |
| 221 | typedef gboolean (* GFileReadMoreCallback) (const char *file_contents, |
| 222 | goffset file_size, |
| 223 | gpointer callback_data); |
| 224 | |
| 225 | /** |
| 226 | * GFileMeasureProgressCallback: |
| 227 | * @reporting: %TRUE if more reports will come |
| 228 | * @current_size: the current cumulative size measurement |
| 229 | * @num_dirs: the number of directories visited so far |
| 230 | * @num_files: the number of non-directory files encountered |
| 231 | * @data: the data passed to the original request for this callback |
| 232 | * |
| 233 | * This callback type is used by g_file_measure_disk_usage() to make |
| 234 | * periodic progress reports when measuring the amount of disk spaced |
| 235 | * used by a directory. |
| 236 | * |
| 237 | * These calls are made on a best-effort basis and not all types of |
| 238 | * #GFile will support them. At the minimum, however, one call will |
| 239 | * always be made immediately. |
| 240 | * |
| 241 | * In the case that there is no support, @reporting will be set to |
| 242 | * %FALSE (and the other values undefined) and no further calls will be |
| 243 | * made. Otherwise, the @reporting will be %TRUE and the other values |
| 244 | * all-zeros during the first (immediate) call. In this way, you can |
| 245 | * know which type of progress UI to show without a delay. |
| 246 | * |
| 247 | * For g_file_measure_disk_usage() the callback is made directly. For |
| 248 | * g_file_measure_disk_usage_async() the callback is made via the |
| 249 | * default main context of the calling thread (ie: the same way that the |
| 250 | * final async result would be reported). |
| 251 | * |
| 252 | * @current_size is in the same units as requested by the operation (see |
| 253 | * %G_FILE_MEASURE_APPARENT_SIZE). |
| 254 | * |
| 255 | * The frequency of the updates is implementation defined, but is |
| 256 | * ideally about once every 200ms. |
| 257 | * |
| 258 | * The last progress callback may or may not be equal to the final |
| 259 | * result. Always check the async result to get the final value. |
| 260 | * |
| 261 | * Since: 2.38 |
| 262 | **/ |
| 263 | typedef void (* GFileMeasureProgressCallback) (gboolean reporting, |
| 264 | guint64 current_size, |
| 265 | guint64 num_dirs, |
| 266 | guint64 num_files, |
| 267 | gpointer data); |
| 268 | |
| 269 | /** |
| 270 | * GIOSchedulerJobFunc: |
| 271 | * @job: a #GIOSchedulerJob. |
| 272 | * @cancellable: optional #GCancellable object, %NULL to ignore. |
| 273 | * @data: data passed to the callback function |
| 274 | * |
| 275 | * I/O Job function. |
| 276 | * |
| 277 | * Long-running jobs should periodically check the @cancellable |
| 278 | * to see if they have been cancelled. |
| 279 | * |
| 280 | * Returns: %TRUE if this function should be called again to |
| 281 | * complete the job, %FALSE if the job is complete (or cancelled) |
| 282 | * Deprecated: 2.36: Use [struct@GLib.ThreadPool] or |
| 283 | * [method@Gio.Task.run_in_thread] |
| 284 | **/ |
| 285 | typedef gboolean (*GIOSchedulerJobFunc) (GIOSchedulerJob *job, |
| 286 | GCancellable *cancellable, |
| 287 | gpointer data); |
| 288 | |
| 289 | /** |
| 290 | * GSimpleAsyncThreadFunc: |
| 291 | * @res: a #GSimpleAsyncResult. |
| 292 | * @object: a #GObject. |
| 293 | * @cancellable: optional #GCancellable object, %NULL to ignore. |
| 294 | * |
| 295 | * Simple thread function that runs an asynchronous operation and |
| 296 | * checks for cancellation. |
| 297 | **/ |
| 298 | typedef void (*GSimpleAsyncThreadFunc) (GSimpleAsyncResult *res, |
| 299 | GObject *object, |
| 300 | GCancellable *cancellable); |
| 301 | |
| 302 | /** |
| 303 | * GSocketSourceFunc: |
| 304 | * @socket: the #GSocket |
| 305 | * @condition: the current condition at the source fired. |
| 306 | * @data: data passed in by the user. |
| 307 | * |
| 308 | * This is the function type of the callback used for the #GSource |
| 309 | * returned by g_socket_create_source(). |
| 310 | * |
| 311 | * Returns: it should return %FALSE if the source should be removed. |
| 312 | * |
| 313 | * Since: 2.22 |
| 314 | */ |
| 315 | typedef gboolean (*GSocketSourceFunc) (GSocket *socket, |
| 316 | GIOCondition condition, |
| 317 | gpointer data); |
| 318 | |
| 319 | /** |
| 320 | * GDatagramBasedSourceFunc: |
| 321 | * @datagram_based: the #GDatagramBased |
| 322 | * @condition: the current condition at the source fired |
| 323 | * @data: data passed in by the user |
| 324 | * |
| 325 | * This is the function type of the callback used for the #GSource |
| 326 | * returned by g_datagram_based_create_source(). |
| 327 | * |
| 328 | * Returns: %G_SOURCE_REMOVE if the source should be removed, |
| 329 | * %G_SOURCE_CONTINUE otherwise |
| 330 | * |
| 331 | * Since: 2.48 |
| 332 | */ |
| 333 | typedef gboolean (*GDatagramBasedSourceFunc) (GDatagramBased *datagram_based, |
| 334 | GIOCondition condition, |
| 335 | gpointer data); |
| 336 | |
| 337 | /** |
| 338 | * GInputVector: |
| 339 | * @buffer: Pointer to a buffer where data will be written. |
| 340 | * @size: the available size in @buffer. |
| 341 | * |
| 342 | * Structure used for scatter/gather data input. |
| 343 | * You generally pass in an array of #GInputVectors |
| 344 | * and the operation will store the read data starting in the |
| 345 | * first buffer, switching to the next as needed. |
| 346 | * |
| 347 | * Since: 2.22 |
| 348 | */ |
| 349 | typedef struct _GInputVector GInputVector; |
| 350 | |
| 351 | struct _GInputVector { |
| 352 | gpointer buffer; |
| 353 | gsize size; |
| 354 | }; |
| 355 | |
| 356 | /** |
| 357 | * GInputMessage: |
| 358 | * @address: (optional) (out) (transfer full): return location |
| 359 | * for a #GSocketAddress, or %NULL |
| 360 | * @vectors: (array length=num_vectors) (out): pointer to an |
| 361 | * array of input vectors |
| 362 | * @num_vectors: the number of input vectors pointed to by @vectors |
| 363 | * @bytes_received: (out): will be set to the number of bytes that have been |
| 364 | * received |
| 365 | * @flags: (out): collection of #GSocketMsgFlags for the received message, |
| 366 | * outputted by the call |
| 367 | * @control_messages: (array length=num_control_messages) (optional) |
| 368 | * (out) (transfer full): return location for a |
| 369 | * caller-allocated array of #GSocketControlMessages, or %NULL |
| 370 | * @num_control_messages: (out) (optional): return location for the number of |
| 371 | * elements in @control_messages |
| 372 | * |
| 373 | * Structure used for scatter/gather data input when receiving multiple |
| 374 | * messages or packets in one go. You generally pass in an array of empty |
| 375 | * #GInputVectors and the operation will use all the buffers as if they |
| 376 | * were one buffer, and will set @bytes_received to the total number of bytes |
| 377 | * received across all #GInputVectors. |
| 378 | * |
| 379 | * This structure closely mirrors `struct mmsghdr` and `struct msghdr` from |
| 380 | * the POSIX sockets API (see `man 2 recvmmsg`). |
| 381 | * |
| 382 | * If @address is non-%NULL then it is set to the source address the message |
| 383 | * was received from, and the caller must free it afterwards. |
| 384 | * |
| 385 | * If @control_messages is non-%NULL then it is set to an array of control |
| 386 | * messages received with the message (if any), and the caller must free it |
| 387 | * afterwards. @num_control_messages is set to the number of elements in |
| 388 | * this array, which may be zero. |
| 389 | * |
| 390 | * Flags relevant to this message will be returned in @flags. For example, |
| 391 | * `MSG_EOR` or `MSG_TRUNC`. |
| 392 | * |
| 393 | * Since: 2.48 |
| 394 | */ |
| 395 | typedef struct _GInputMessage GInputMessage; |
| 396 | |
| 397 | struct _GInputMessage { |
| 398 | GSocketAddress **address; |
| 399 | |
| 400 | GInputVector *vectors; |
| 401 | guint num_vectors; |
| 402 | |
| 403 | gsize bytes_received; |
| 404 | gint flags; |
| 405 | |
| 406 | GSocketControlMessage ***control_messages; |
| 407 | guint *num_control_messages; |
| 408 | }; |
| 409 | |
| 410 | /** |
| 411 | * GOutputVector: |
| 412 | * @buffer: Pointer to a buffer of data to read. |
| 413 | * @size: the size of @buffer. |
| 414 | * |
| 415 | * Structure used for scatter/gather data output. |
| 416 | * You generally pass in an array of #GOutputVectors |
| 417 | * and the operation will use all the buffers as if they were |
| 418 | * one buffer. |
| 419 | * |
| 420 | * Since: 2.22 |
| 421 | */ |
| 422 | typedef struct _GOutputVector GOutputVector; |
| 423 | |
| 424 | struct _GOutputVector { |
| 425 | gconstpointer buffer; |
| 426 | gsize size; |
| 427 | }; |
| 428 | |
| 429 | /** |
| 430 | * GOutputMessage: |
| 431 | * @address: (nullable): a #GSocketAddress, or %NULL |
| 432 | * @vectors: pointer to an array of output vectors |
| 433 | * @num_vectors: the number of output vectors pointed to by @vectors. |
| 434 | * @bytes_sent: initialize to 0. Will be set to the number of bytes |
| 435 | * that have been sent |
| 436 | * @control_messages: (array length=num_control_messages) (nullable): a pointer |
| 437 | * to an array of #GSocketControlMessages, or %NULL. |
| 438 | * @num_control_messages: number of elements in @control_messages. |
| 439 | * |
| 440 | * Structure used for scatter/gather data output when sending multiple |
| 441 | * messages or packets in one go. You generally pass in an array of |
| 442 | * #GOutputVectors and the operation will use all the buffers as if they |
| 443 | * were one buffer. |
| 444 | * |
| 445 | * If @address is %NULL then the message is sent to the default receiver |
| 446 | * (as previously set by g_socket_connect()). |
| 447 | * |
| 448 | * Since: 2.44 |
| 449 | */ |
| 450 | typedef struct _GOutputMessage GOutputMessage; |
| 451 | |
| 452 | struct _GOutputMessage { |
| 453 | GSocketAddress *address; |
| 454 | |
| 455 | GOutputVector *vectors; |
| 456 | guint num_vectors; |
| 457 | |
| 458 | guint bytes_sent; |
| 459 | |
| 460 | GSocketControlMessage **control_messages; |
| 461 | guint num_control_messages; |
| 462 | }; |
| 463 | |
| 464 | typedef struct _GCredentials GCredentials; |
| 465 | typedef struct _GUnixCredentialsMessage GUnixCredentialsMessage; |
| 466 | typedef struct _GUnixFDList GUnixFDList; |
| 467 | typedef struct _GDBusMessage GDBusMessage; |
| 468 | typedef struct _GDBusConnection GDBusConnection; |
| 469 | typedef struct _GDBusProxy GDBusProxy; |
| 470 | typedef struct _GDBusMethodInvocation GDBusMethodInvocation; |
| 471 | typedef struct _GDBusServer GDBusServer; |
| 472 | typedef struct _GDBusAuthObserver GDBusAuthObserver; |
| 473 | typedef struct _GDBusErrorEntry GDBusErrorEntry; |
| 474 | typedef struct _GDBusInterfaceVTable GDBusInterfaceVTable; |
| 475 | typedef struct _GDBusSubtreeVTable GDBusSubtreeVTable; |
| 476 | typedef struct _GDBusAnnotationInfo GDBusAnnotationInfo; |
| 477 | typedef struct _GDBusArgInfo GDBusArgInfo; |
| 478 | typedef struct _GDBusMethodInfo GDBusMethodInfo; |
| 479 | typedef struct _GDBusSignalInfo GDBusSignalInfo; |
| 480 | typedef struct _GDBusPropertyInfo GDBusPropertyInfo; |
| 481 | typedef struct _GDBusInterfaceInfo GDBusInterfaceInfo; |
| 482 | typedef struct _GDBusNodeInfo GDBusNodeInfo; |
| 483 | |
| 484 | /** |
| 485 | * GCancellableSourceFunc: |
| 486 | * @cancellable: the #GCancellable |
| 487 | * @data: data passed in by the user. |
| 488 | * |
| 489 | * This is the function type of the callback used for the #GSource |
| 490 | * returned by g_cancellable_source_new(). |
| 491 | * |
| 492 | * Returns: it should return %FALSE if the source should be removed. |
| 493 | * |
| 494 | * Since: 2.28 |
| 495 | */ |
| 496 | typedef gboolean (*GCancellableSourceFunc) (GCancellable *cancellable, |
| 497 | gpointer data); |
| 498 | |
| 499 | /** |
| 500 | * GPollableSourceFunc: |
| 501 | * @pollable_stream: the #GPollableInputStream or #GPollableOutputStream |
| 502 | * @data: data passed in by the user. |
| 503 | * |
| 504 | * This is the function type of the callback used for the #GSource |
| 505 | * returned by g_pollable_input_stream_create_source() and |
| 506 | * g_pollable_output_stream_create_source(). |
| 507 | * |
| 508 | * Returns: it should return %FALSE if the source should be removed. |
| 509 | * |
| 510 | * Since: 2.28 |
| 511 | */ |
| 512 | typedef gboolean (*GPollableSourceFunc) (GObject *pollable_stream, |
| 513 | gpointer data); |
| 514 | |
| 515 | typedef struct _GDBusInterface GDBusInterface; /* Dummy typedef */ |
| 516 | typedef struct _GDBusInterfaceSkeleton GDBusInterfaceSkeleton; |
| 517 | typedef struct _GDBusObject GDBusObject; /* Dummy typedef */ |
| 518 | typedef struct _GDBusObjectSkeleton GDBusObjectSkeleton; |
| 519 | typedef struct _GDBusObjectProxy GDBusObjectProxy; |
| 520 | typedef struct _GDBusObjectManager GDBusObjectManager; /* Dummy typedef */ |
| 521 | typedef struct _GDBusObjectManagerClient GDBusObjectManagerClient; |
| 522 | typedef struct _GDBusObjectManagerServer GDBusObjectManagerServer; |
| 523 | |
| 524 | /** |
| 525 | * GDBusProxyTypeFunc: |
| 526 | * @manager: A #GDBusObjectManagerClient. |
| 527 | * @object_path: The object path of the remote object. |
| 528 | * @interface_name: (nullable): The interface name of the remote object or %NULL if a #GDBusObjectProxy #GType is requested. |
| 529 | * @data: data passed in by the user. |
| 530 | * |
| 531 | * Function signature for a function used to determine the #GType to |
| 532 | * use for an interface proxy (if @interface_name is not %NULL) or |
| 533 | * object proxy (if @interface_name is %NULL). |
| 534 | * |
| 535 | * This function is called in the |
| 536 | * [thread-default main loop][g-main-context-push-thread-default] |
| 537 | * that @manager was constructed in. |
| 538 | * |
| 539 | * Returns: A #GType to use for the remote object. The returned type |
| 540 | * must be a #GDBusProxy or #GDBusObjectProxy -derived |
| 541 | * type. |
| 542 | * |
| 543 | * Since: 2.30 |
| 544 | */ |
| 545 | typedef GType (*GDBusProxyTypeFunc) (GDBusObjectManagerClient *manager, |
| 546 | const gchar *object_path, |
| 547 | const gchar *interface_name, |
| 548 | gpointer data); |
| 549 | |
| 550 | typedef struct _GTestDBus GTestDBus; |
| 551 | |
| 552 | typedef struct _GSubprocess GSubprocess; |
| 553 | typedef struct _GSubprocessLauncher GSubprocessLauncher; |
| 554 | |
| 555 | G_END_DECLS |
| 556 | |
| 557 | #endif /* __GIO_TYPES_H__ */ |
| 558 | |