giotypes.h 24 KB

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