giotypes.h 24.1 KB
Newer Older
1
/* GIO - GLib Input, Output and Streaming Library
2
 *
3 4 5 6 7
 * Copyright (C) 2006-2007 Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
8
 * version 2.1 of the License, or (at your option) any later version.
9 10 11 12 13 14 15
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General
16
 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 18 19 20
 *
 * Author: Alexander Larsson <alexl@redhat.com>
 */

21 22 23
#ifndef __GIO_TYPES_H__
#define __GIO_TYPES_H__

24 25 26 27 28 29 30 31 32 33 34
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif

#include <gio/gioenums.h>

G_BEGIN_DECLS

typedef struct _GAppLaunchContext             GAppLaunchContext;
typedef struct _GAppInfo                      GAppInfo; /* Dummy typedef */
typedef struct _GAsyncResult                  GAsyncResult; /* Dummy typedef */
35
typedef struct _GAsyncInitable                GAsyncInitable;
36 37 38
typedef struct _GBufferedInputStream          GBufferedInputStream;
typedef struct _GBufferedOutputStream         GBufferedOutputStream;
typedef struct _GCancellable                  GCancellable;
39
typedef struct _GCharsetConverter             GCharsetConverter;
40
typedef struct _GConverter                    GConverter;
41
typedef struct _GConverterInputStream         GConverterInputStream;
42
typedef struct _GConverterOutputStream        GConverterOutputStream;
43
typedef struct _GDatagramBased                GDatagramBased;
44
typedef struct _GDataInputStream              GDataInputStream;
45
typedef struct _GSimplePermission             GSimplePermission;
Alexander Larsson's avatar
Alexander Larsson committed
46
typedef struct _GZlibCompressor               GZlibCompressor;
47
typedef struct _GZlibDecompressor             GZlibDecompressor;
48

49
typedef struct _GSimpleActionGroup            GSimpleActionGroup;
50
typedef struct _GRemoteActionGroup            GRemoteActionGroup;
51
typedef struct _GDBusActionGroup              GDBusActionGroup;
52
typedef struct _GActionMap                    GActionMap;
53
typedef struct _GActionGroup                  GActionGroup;
54
typedef struct _GPropertyAction               GPropertyAction;
55
typedef struct _GSimpleAction                 GSimpleAction;
56
typedef struct _GAction                       GAction;
57 58
typedef struct _GApplication                  GApplication;
typedef struct _GApplicationCommandLine       GApplicationCommandLine;
59 60 61 62
typedef struct _GSettingsBackend              GSettingsBackend;
typedef struct _GSettings                     GSettings;
typedef struct _GPermission                   GPermission;

Matthias Clasen's avatar
Matthias Clasen committed
63
typedef struct _GMenuModel                    GMenuModel;
Lars Uebernickel's avatar
Lars Uebernickel committed
64
typedef struct _GNotification                 GNotification;
Matthias Clasen's avatar
Matthias Clasen committed
65

66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
/**
 * GDrive:
 *
 * Opaque drive object.
 **/
typedef struct _GDrive                        GDrive; /* Dummy typedef */
typedef struct _GFileEnumerator               GFileEnumerator;
typedef struct _GFileMonitor                  GFileMonitor;
typedef struct _GFilterInputStream            GFilterInputStream;
typedef struct _GFilterOutputStream           GFilterOutputStream;

/**
 * GFile:
 *
 * A handle to an object implementing the #GFileIface interface.
 * Generally stores a location within the file system. Handles do not
 * necessarily represent files or directories that currently exist.
 **/
typedef struct _GFile                         GFile; /* Dummy typedef */
typedef struct _GFileInfo                     GFileInfo;

/**
 * GFileAttributeMatcher:
 *
 * Determines if a string matches a file attribute.
 **/
typedef struct _GFileAttributeMatcher         GFileAttributeMatcher;
typedef struct _GFileAttributeInfo            GFileAttributeInfo;
typedef struct _GFileAttributeInfoList        GFileAttributeInfoList;
95
typedef struct _GFileDescriptorBased          GFileDescriptorBased;
96 97
typedef struct _GFileInputStream              GFileInputStream;
typedef struct _GFileOutputStream             GFileOutputStream;
98
typedef struct _GFileIOStream                 GFileIOStream;
99 100 101 102 103
typedef struct _GFileIcon                     GFileIcon;
typedef struct _GFilenameCompleter            GFilenameCompleter;


typedef struct _GIcon                         GIcon; /* Dummy typedef */
104
typedef struct _GInetAddress                  GInetAddress;
105
typedef struct _GInetAddressMask              GInetAddressMask;
106
typedef struct _GInetSocketAddress            GInetSocketAddress;
107
typedef struct _GNativeSocketAddress          GNativeSocketAddress;
108
typedef struct _GInputStream                  GInputStream;
109
typedef struct _GInitable                     GInitable;
110 111 112 113 114 115 116
typedef struct _GIOModule                     GIOModule;
typedef struct _GIOExtensionPoint             GIOExtensionPoint;
typedef struct _GIOExtension                  GIOExtension;

/**
 * GIOSchedulerJob:
 *
Matthias Clasen's avatar
Matthias Clasen committed
117
 * Opaque class for defining and scheduling IO jobs.
118 119
 **/
typedef struct _GIOSchedulerJob               GIOSchedulerJob;
120
typedef struct _GIOStreamAdapter              GIOStreamAdapter;
121
typedef struct _GLoadableIcon                 GLoadableIcon; /* Dummy typedef */
122
typedef struct _GBytesIcon                    GBytesIcon;
123 124 125 126 127 128 129 130 131 132
typedef struct _GMemoryInputStream            GMemoryInputStream;
typedef struct _GMemoryOutputStream           GMemoryOutputStream;

/**
 * GMount:
 *
 * A handle to an object implementing the #GMountIface interface.
 **/
typedef struct _GMount                        GMount; /* Dummy typedef */
typedef struct _GMountOperation               GMountOperation;
133
typedef struct _GNetworkAddress               GNetworkAddress;
134
typedef struct _GNetworkMonitor               GNetworkMonitor;
135
typedef struct _GNetworkService               GNetworkService;
136
typedef struct _GOutputStream                 GOutputStream;
137
typedef struct _GIOStream                     GIOStream;
138
typedef struct _GSimpleIOStream               GSimpleIOStream;
139 140
typedef struct _GPollableInputStream          GPollableInputStream; /* Dummy typedef */
typedef struct _GPollableOutputStream         GPollableOutputStream; /* Dummy typedef */
141
typedef struct _GResolver                     GResolver;
142

143 144 145 146 147 148 149 150
/**
 * GResource:
 *
 * A resource bundle.
 *
 * Since: 2.32
 */
typedef struct _GResource                     GResource;
151 152
typedef struct _GSeekable                     GSeekable;
typedef struct _GSimpleAsyncResult            GSimpleAsyncResult;
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169

/**
 * GSocket:
 *
 * A lowlevel network socket object.
 *
 * Since: 2.22
 **/
typedef struct _GSocket                       GSocket;

/**
 * GSocketControlMessage:
 *
 * Base class for socket-type specific control messages that can be sent and
 * received over #GSocket.
 **/
typedef struct _GSocketControlMessage         GSocketControlMessage;
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
/**
 * GSocketClient:
 *
 * A helper class for network clients to make connections.
 *
 * Since: 2.22
 **/
typedef struct _GSocketClient                               GSocketClient;
/**
 * GSocketConnection:
 *
 * A socket connection GIOStream object for connection-oriented sockets.
 *
 * Since: 2.22
 **/
typedef struct _GSocketConnection                           GSocketConnection;
/**
187
 * GSocketListener:
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
 *
 * A helper class for network servers to listen for and accept connections.
 *
 * Since: 2.22
 **/
typedef struct _GSocketListener                             GSocketListener;
/**
 * GSocketService:
 *
 * A helper class for handling accepting incomming connections in the
 * glib mainloop.
 *
 * Since: 2.22
 **/
typedef struct _GSocketService                              GSocketService;
203
typedef struct _GSocketAddress                GSocketAddress;
204 205
typedef struct _GSocketAddressEnumerator      GSocketAddressEnumerator;
typedef struct _GSocketConnectable            GSocketConnectable;
206
typedef struct _GSrvTarget                    GSrvTarget;
207
typedef struct _GTask                         GTask;
208 209 210 211 212 213 214 215
/**
 * GTcpConnection:
 *
 * A #GSocketConnection for TCP/IP connections.
 *
 * Since: 2.22
 **/
typedef struct _GTcpConnection                              GTcpConnection;
216
typedef struct _GTcpWrapperConnection                       GTcpWrapperConnection;
217 218 219
/**
 * GThreadedSocketService:
 *
220
 * A helper class for handling accepting incoming connections in the
221 222 223 224 225
 * glib mainloop and handling them in a thread.
 *
 * Since: 2.22
 **/
typedef struct _GThreadedSocketService                      GThreadedSocketService;
226 227 228
typedef struct _GDtlsConnection               GDtlsConnection;
typedef struct _GDtlsClientConnection         GDtlsClientConnection; /* Dummy typedef */
typedef struct _GDtlsServerConnection         GDtlsServerConnection; /* Dummy typedef */
229
typedef struct _GThemedIcon                   GThemedIcon;
230 231 232
typedef struct _GTlsCertificate               GTlsCertificate;
typedef struct _GTlsClientConnection          GTlsClientConnection; /* Dummy typedef */
typedef struct _GTlsConnection                GTlsConnection;
233 234 235 236
typedef struct _GTlsDatabase                  GTlsDatabase;
typedef struct _GTlsFileDatabase              GTlsFileDatabase;
typedef struct _GTlsInteraction               GTlsInteraction;
typedef struct _GTlsPassword                  GTlsPassword;
237
typedef struct _GTlsServerConnection          GTlsServerConnection; /* Dummy typedef */
238 239
typedef struct _GVfs                          GVfs; /* Dummy typedef */

240 241 242 243 244 245 246 247
/**
 * GProxyResolver:
 *
 * A helper class to enumerate proxies base on URI.
 *
 * Since: 2.26
 **/
typedef struct _GProxyResolver                GProxyResolver;
248
typedef struct _GProxy			      GProxy;
249
typedef struct _GProxyAddress		      GProxyAddress;
250
typedef struct _GProxyAddressEnumerator	      GProxyAddressEnumerator;
251

252 253 254 255 256 257 258 259 260 261
/**
 * GVolume:
 *
 * Opaque mountable volume object.
 **/
typedef struct _GVolume                       GVolume; /* Dummy typedef */
typedef struct _GVolumeMonitor                GVolumeMonitor;

/**
 * GAsyncReadyCallback:
262
 * @source_object: (nullable): the object the asynchronous operation was started with.
263 264 265 266
 * @res: a #GAsyncResult.
 * @user_data: user data passed to the callback.
 *
 * Type definition for a function that will be called back when an asynchronous
267 268 269 270 271 272 273
 * operation within GIO has been completed. #GAsyncReadyCallback
 * callbacks from #GTask are guaranteed to be invoked in a later
 * iteration of the
 * [thread-default main context][g-main-context-push-thread-default]
 * where the #GTask was created. All other users of
 * #GAsyncReadyCallback must likewise call it asynchronously in a
 * later iteration of the main context.
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296
 **/
typedef void (*GAsyncReadyCallback) (GObject *source_object,
				     GAsyncResult *res,
				     gpointer user_data);

/**
 * GFileProgressCallback:
 * @current_num_bytes: the current number of bytes in the operation.
 * @total_num_bytes: the total number of bytes in the operation.
 * @user_data: user data passed to the callback.
 *
 * When doing file operations that may take a while, such as moving
 * a file or copying a file, a progress callback is used to pass how
 * far along that operation is to the application.
 **/
typedef void (*GFileProgressCallback) (goffset current_num_bytes,
                                       goffset total_num_bytes,
                                       gpointer user_data);

/**
 * GFileReadMoreCallback:
 * @file_contents: the data as currently read.
 * @file_size: the size of the data currently read.
297
 * @callback_data: (closure): data passed to the callback.
298
 *
299
 * When loading the partial contents of a file with g_file_load_partial_contents_async(),
300 301 302 303 304 305 306 307 308 309
 * it may become necessary to determine if any more data from the file should be loaded.
 * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
 * should be read, or %FALSE otherwise.
 *
 * Returns: %TRUE if more data should be read back. %FALSE otherwise.
 **/
typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
                                            goffset file_size,
                                            gpointer callback_data);

310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337
/**
 * GFileMeasureProgressCallback:
 * @reporting: %TRUE if more reports will come
 * @current_size: the current cumulative size measurement
 * @num_dirs: the number of directories visited so far
 * @num_files: the number of non-directory files encountered
 * @user_data: the data passed to the original request for this callback
 *
 * This callback type is used by g_file_measure_disk_usage() to make
 * periodic progress reports when measuring the amount of disk spaced
 * used by a directory.
 *
 * These calls are made on a best-effort basis and not all types of
 * #GFile will support them.  At the minimum, however, one call will
 * always be made immediately.
 *
 * In the case that there is no support, @reporting will be set to
 * %FALSE (and the other values undefined) and no further calls will be
 * made.  Otherwise, the @reporting will be %TRUE and the other values
 * all-zeros during the first (immediate) call.  In this way, you can
 * know which type of progress UI to show without a delay.
 *
 * For g_file_measure_disk_usage() the callback is made directly.  For
 * g_file_measure_disk_usage_async() the callback is made via the
 * default main context of the calling thread (ie: the same way that the
 * final async result would be reported).
 *
 * @current_size is in the same units as requested by the operation (see
338
 * %G_FILE_MEASURE_APPARENT_SIZE).
339 340 341 342 343 344 345 346 347 348 349 350 351 352
 *
 * The frequency of the updates is implementation defined, but is
 * ideally about once every 200ms.
 *
 * The last progress callback may or may not be equal to the final
 * result.  Always check the async result to get the final value.
 *
 * Since: 2.38
 **/
typedef void (* GFileMeasureProgressCallback) (gboolean reporting,
                                               guint64  current_size,
                                               guint64  num_dirs,
                                               guint64  num_files,
                                               gpointer user_data);
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384

/**
 * GIOSchedulerJobFunc:
 * @job: a #GIOSchedulerJob.
 * @cancellable: optional #GCancellable object, %NULL to ignore.
 * @user_data: the data to pass to callback function
 *
 * I/O Job function.
 *
 * Long-running jobs should periodically check the @cancellable
 * to see if they have been cancelled.
 *
 * Returns: %TRUE if this function should be called again to
 *    complete the job, %FALSE if the job is complete (or cancelled)
 **/
typedef gboolean (*GIOSchedulerJobFunc) (GIOSchedulerJob *job,
					 GCancellable    *cancellable,
					 gpointer         user_data);

/**
 * GSimpleAsyncThreadFunc:
 * @res: a #GSimpleAsyncResult.
 * @object: a #GObject.
 * @cancellable: optional #GCancellable object, %NULL to ignore.
 *
 * Simple thread function that runs an asynchronous operation and
 * checks for cancellation.
 **/
typedef void (*GSimpleAsyncThreadFunc) (GSimpleAsyncResult *res,
                                        GObject *object,
                                        GCancellable *cancellable);

385 386
/**
 * GSocketSourceFunc:
387
 * @socket: the #GSocket
388
 * @condition: the current condition at the source fired.
389
 * @user_data: data passed in by the user.
390 391 392 393
 *
 * This is the function type of the callback used for the #GSource
 * returned by g_socket_create_source().
 *
394
 * Returns: it should return %FALSE if the source should be removed.
395
 *
396 397
 * Since: 2.22
 */
398 399 400
typedef gboolean (*GSocketSourceFunc) (GSocket *socket,
				       GIOCondition condition,
				       gpointer user_data);
401

402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419
/**
 * GDatagramBasedSourceFunc:
 * @datagram_based: the #GDatagramBased
 * @condition: the current condition at the source fired
 * @user_data: data passed in by the user
 *
 * This is the function type of the callback used for the #GSource
 * returned by g_datagram_based_create_source().
 *
 * Returns: %G_SOURCE_REMOVE if the source should be removed,
 *   %G_SOURCE_CONTINUE otherwise
 *
 * Since: 2.48
 */
typedef gboolean (*GDatagramBasedSourceFunc) (GDatagramBased *datagram_based,
                                              GIOCondition    condition,
                                              gpointer        user_data);

420 421
/**
 * GInputVector:
422
 * @buffer: Pointer to a buffer where data will be written.
423
 * @size: the available size in @buffer.
424 425
 *
 * Structure used for scatter/gather data input.
426
 * You generally pass in an array of #GInputVectors
427 428
 * and the operation will store the read data starting in the
 * first buffer, switching to the next as needed.
429 430 431
 *
 * Since: 2.22
 */
432 433 434
typedef struct _GInputVector GInputVector;

struct _GInputVector {
435 436
  gpointer buffer;
  gsize size;
437
};
438

439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492
/**
 * GInputMessage:
 * @address: (optional) (out) (transfer full): return location
 *   for a #GSocketAddress, or %NULL
 * @vectors: (array length=num_vectors) (out): pointer to an
 *   array of input vectors
 * @num_vectors: the number of input vectors pointed to by @vectors
 * @bytes_received: (out): will be set to the number of bytes that have been
 *   received
 * @flags: (out): collection of #GSocketMsgFlags for the received message,
 *   outputted by the call
 * @control_messages: (array length=num_control_messages) (optional)
 *   (out) (transfer full): return location for a
 *   caller-allocated array of #GSocketControlMessages, or %NULL
 * @num_control_messages: (out) (optional): return location for the number of
 *   elements in @control_messages
 *
 * Structure used for scatter/gather data input when receiving multiple
 * messages or packets in one go. You generally pass in an array of empty
 * #GInputVectors and the operation will use all the buffers as if they
 * were one buffer, and will set @bytes_received to the total number of bytes
 * received across all #GInputVectors.
 *
 * This structure closely mirrors `struct mmsghdr` and `struct msghdr` from
 * the POSIX sockets API (see `man 2 recvmmsg`).
 *
 * If @address is non-%NULL then it is set to the source address the message
 * was received from, and the caller must free it afterwards.
 *
 * If @control_messages is non-%NULL then it is set to an array of control
 * messages received with the message (if any), and the caller must free it
 * afterwards. @num_control_messages is set to the number of elements in
 * this array, which may be zero.
 *
 * Flags relevant to this message will be returned in @flags. For example,
 * `MSG_EOR` or `MSG_TRUNC`.
 *
 * Since: 2.48
 */
typedef struct _GInputMessage GInputMessage;

struct _GInputMessage {
  GSocketAddress         **address;

  GInputVector            *vectors;
  guint                    num_vectors;

  gsize                    bytes_received;
  gint                     flags;

  GSocketControlMessage ***control_messages;
  guint                   *num_control_messages;
};

493 494
/**
 * GOutputVector:
495 496
 * @buffer: Pointer to a buffer of data to read.
 * @size: the size of @buffer.
497 498
 *
 * Structure used for scatter/gather data output.
499
 * You generally pass in an array of #GOutputVectors
500 501
 * and the operation will use all the buffers as if they were
 * one buffer.
502 503 504
 *
 * Since: 2.22
 */
505 506 507
typedef struct _GOutputVector GOutputVector;

struct _GOutputVector {
508 509
  gconstpointer buffer;
  gsize size;
510
};
511

512 513
/**
 * GOutputMessage:
514
 * @address: (nullable): a #GSocketAddress, or %NULL
515 516 517 518
 * @vectors: pointer to an array of output vectors
 * @num_vectors: the number of output vectors pointed to by @vectors.
 * @bytes_sent: initialize to 0. Will be set to the number of bytes
 *     that have been sent
519
 * @control_messages: (array length=num_control_messages) (nullable): a pointer
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546
 *   to an array of #GSocketControlMessages, or %NULL.
 * @num_control_messages: number of elements in @control_messages.
 *
 * Structure used for scatter/gather data output when sending multiple
 * messages or packets in one go. You generally pass in an array of
 * #GOutputVectors and the operation will use all the buffers as if they
 * were one buffer.
 *
 * If @address is %NULL then the message is sent to the default receiver
 * (as previously set by g_socket_connect()).
 *
 * Since: 2.44
 */
typedef struct _GOutputMessage GOutputMessage;

struct _GOutputMessage {
  GSocketAddress         *address;

  GOutputVector          *vectors;
  guint                   num_vectors;

  guint                   bytes_sent;

  GSocketControlMessage **control_messages;
  guint                   num_control_messages;
};

547 548
typedef struct _GCredentials                  GCredentials;
typedef struct _GUnixCredentialsMessage       GUnixCredentialsMessage;
549
typedef struct _GUnixFDList                   GUnixFDList;
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565
typedef struct _GDBusMessage                  GDBusMessage;
typedef struct _GDBusConnection               GDBusConnection;
typedef struct _GDBusProxy                    GDBusProxy;
typedef struct _GDBusMethodInvocation         GDBusMethodInvocation;
typedef struct _GDBusServer                   GDBusServer;
typedef struct _GDBusAuthObserver             GDBusAuthObserver;
typedef struct _GDBusErrorEntry               GDBusErrorEntry;
typedef struct _GDBusInterfaceVTable          GDBusInterfaceVTable;
typedef struct _GDBusSubtreeVTable            GDBusSubtreeVTable;
typedef struct _GDBusAnnotationInfo           GDBusAnnotationInfo;
typedef struct _GDBusArgInfo                  GDBusArgInfo;
typedef struct _GDBusMethodInfo               GDBusMethodInfo;
typedef struct _GDBusSignalInfo               GDBusSignalInfo;
typedef struct _GDBusPropertyInfo             GDBusPropertyInfo;
typedef struct _GDBusInterfaceInfo            GDBusInterfaceInfo;
typedef struct _GDBusNodeInfo                 GDBusNodeInfo;
566

567 568 569 570 571 572 573 574 575 576 577 578 579 580 581
/**
 * GCancellableSourceFunc:
 * @cancellable: the #GCancellable
 * @user_data: data passed in by the user.
 *
 * This is the function type of the callback used for the #GSource
 * returned by g_cancellable_source_new().
 *
 * Returns: it should return %FALSE if the source should be removed.
 *
 * Since: 2.28
 */
typedef gboolean (*GCancellableSourceFunc) (GCancellable *cancellable,
					    gpointer      user_data);

582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597
/**
 * GPollableSourceFunc:
 * @pollable_stream: the #GPollableInputStream or #GPollableOutputStream
 * @user_data: data passed in by the user.
 *
 * This is the function type of the callback used for the #GSource
 * returned by g_pollable_input_stream_create_source() and
 * g_pollable_output_stream_create_source().
 *
 * Returns: it should return %FALSE if the source should be removed.
 *
 * Since: 2.28
 */
typedef gboolean (*GPollableSourceFunc) (GObject  *pollable_stream,
					 gpointer  user_data);

598
typedef struct _GDBusInterface              GDBusInterface; /* Dummy typedef */
599
typedef struct _GDBusInterfaceSkeleton      GDBusInterfaceSkeleton;
600
typedef struct _GDBusObject                 GDBusObject;  /* Dummy typedef */
601
typedef struct _GDBusObjectSkeleton         GDBusObjectSkeleton;
602 603 604 605 606 607 608 609 610
typedef struct _GDBusObjectProxy            GDBusObjectProxy;
typedef struct _GDBusObjectManager          GDBusObjectManager;  /* Dummy typedef */
typedef struct _GDBusObjectManagerClient    GDBusObjectManagerClient;
typedef struct _GDBusObjectManagerServer    GDBusObjectManagerServer;

/**
 * GDBusProxyTypeFunc:
 * @manager: A #GDBusObjectManagerClient.
 * @object_path: The object path of the remote object.
611
 * @interface_name: (nullable): The interface name of the remote object or %NULL if a #GDBusObjectProxy #GType is requested.
612 613 614
 * @user_data: User data.
 *
 * Function signature for a function used to determine the #GType to
615 616
 * use for an interface proxy (if @interface_name is not %NULL) or
 * object proxy (if @interface_name is %NULL).
617 618
 *
 * This function is called in the
619
 * [thread-default main loop][g-main-context-push-thread-default]
620 621 622
 * that @manager was constructed in.
 *
 * Returns: A #GType to use for the remote object. The returned type
623
 *   must be a #GDBusProxy or #GDBusObjectProxy -derived
624
 *   type.
625 626 627 628 629 630 631 632
 *
 * Since: 2.30
 */
typedef GType (*GDBusProxyTypeFunc) (GDBusObjectManagerClient   *manager,
                                     const gchar                *object_path,
                                     const gchar                *interface_name,
                                     gpointer                    user_data);

Xavier Claessens's avatar
Xavier Claessens committed
633 634
typedef struct _GTestDBus GTestDBus;

635 636 637 638 639
/**
 * GSubprocess:
 *
 * A child process.
 *
640
 * Since: 2.40
641 642 643 644 645 646 647
 */
typedef struct _GSubprocess                   GSubprocess;
/**
 * GSubprocessLauncher:
 *
 * Options for launching a child process.
 *
648
 * Since: 2.40
649 650 651
 */
typedef struct _GSubprocessLauncher           GSubprocessLauncher;

652 653 654
G_END_DECLS

#endif /* __GIO_TYPES_H__ */