Update gio-2.0.c and gobject-2.0.c from glib
[platform/upstream/gobject-introspection.git] / gir / gio-2.0.c
1 /************************************************************/
2 /* THIS FILE IS GENERATED DO NOT EDIT */
3 /************************************************************/
4
5 /**
6  * GAction:enabled:
7  *
8  * If @action is currently enabled.
9  * If the action is disabled then calls to g_action_activate() and
10  * g_action_set_state() have no effect.
11  *
12  * Since: 2.28
13  */
14
15
16 /**
17  * GAction:name:
18  *
19  * The name of the action.  This is mostly meaningful for identifying
20  * the action once it has been added to a #GActionGroup.
21  *
22  * Since: 2.28
23  */
24
25
26 /**
27  * GAction:parameter-type:
28  *
29  * The type of the parameter that must be given when activating the
30  * action.
31  *
32  * Since: 2.28
33  */
34
35
36 /**
37  * GAction:state:
38  *
39  * The state of the action, or %NULL if the action is stateless.
40  *
41  * Since: 2.28
42  */
43
44
45 /**
46  * GAction:state-type:
47  *
48  * The #GVariantType of the state that the action has, or %NULL if the
49  * action is stateless.
50  *
51  * Since: 2.28
52  */
53
54
55 /**
56  * GActionGroup::action-added:
57  * @action_group: the #GActionGroup that changed
58  * @action_name: the name of the action in @action_group
59  *
60  * Signals that a new action was just added to the group.
61  * This signal is emitted after the action has been added
62  * and is now visible.
63  *
64  * Since: 2.28
65  */
66
67
68 /**
69  * GActionGroup::action-enabled-changed:
70  * @action_group: the #GActionGroup that changed
71  * @action_name: the name of the action in @action_group
72  * @enabled: whether the action is enabled or not
73  *
74  * Signals that the enabled status of the named action has changed.
75  *
76  * Since: 2.28
77  */
78
79
80 /**
81  * GActionGroup::action-removed:
82  * @action_group: the #GActionGroup that changed
83  * @action_name: the name of the action in @action_group
84  *
85  * Signals that an action is just about to be removed from the group.
86  * This signal is emitted before the action is removed, so the action
87  * is still visible and can be queried from the signal handler.
88  *
89  * Since: 2.28
90  */
91
92
93 /**
94  * GActionGroup::action-state-changed:
95  * @action_group: the #GActionGroup that changed
96  * @action_name: the name of the action in @action_group
97  * @value: the new value of the state
98  *
99  * Signals that the state of the named action has changed.
100  *
101  * Since: 2.28
102  */
103
104
105 /**
106  * GActionGroupInterface:
107  * @has_action: the virtual function pointer for g_action_group_has_action()
108  * @list_actions: the virtual function pointer for g_action_group_list_actions()
109  * @get_action_parameter_type: the virtual function pointer for g_action_group_get_action_parameter_type()
110  * @get_action_state_type: the virtual function pointer for g_action_group_get_action_state_type()
111  * @get_action_state_hint: the virtual function pointer for g_action_group_get_action_state_hint()
112  * @get_action_enabled: the virtual function pointer for g_action_group_get_action_enabled()
113  * @get_action_state: the virtual function pointer for g_action_group_get_action_state()
114  * @set_action_state: the virtual function pointer for g_action_group_set_action_state()
115  * @activate_action: the virtual function pointer for g_action_group_activate_action()
116  * @action_added: the class closure for the #GActionGroup::action-added signal
117  * @action_removed: the class closure for the #GActionGroup::action-removed signal
118  * @action_enabled_changed: the class closure for the #GActionGroup::action-enabled-changed signal
119  * @action_state_changed: the class closure for the #GActionGroup::action-enabled-changed signal
120  *
121  * The virtual function table for #GActionGroup.
122  *
123  * Since: 2.28
124  */
125
126
127 /**
128  * GActionInterface:
129  * @get_name: the virtual function pointer for g_action_get_name()
130  * @get_parameter_type: the virtual function pointer for g_action_get_parameter_type()
131  * @get_state_type: the virtual function pointer for g_action_get_state_type()
132  * @get_state_hint: the virtual function pointer for g_action_get_state_hint()
133  * @get_enabled: the virtual function pointer for g_action_get_enabled()
134  * @get_state: the virtual function pointer for g_action_get_state()
135  * @set_state: the virtual function pointer for g_action_set_state()
136  * @activate: the virtual function pointer for g_action_activate().  Note that #GAction does not have an 'activate' signal but that implementations of it may have one.
137  *
138  *
139  *
140  * Since: 2.28
141  */
142
143
144 /**
145  * GAppInfo:
146  *
147  * Information about an installed application and methods to launch
148  * it (with file arguments).
149  */
150
151
152 /**
153  * GAppInfoCreateFlags:
154  * @G_APP_INFO_CREATE_NONE: No flags.
155  * @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window.
156  * @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments.
157  * @G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION: Application supports startup notification. Since 2.26
158  *
159  * Flags used when creating a #GAppInfo.
160  */
161
162
163 /**
164  * GAppInfoIface:
165  * @g_iface: The parent interface.
166  * @dup: Copies a #GAppInfo.
167  * @equal: Checks two #GAppInfo<!-- -->s for equality.
168  * @get_id: Gets a string identifier for a #GAppInfo.
169  * @get_name: Gets the name of the application for a #GAppInfo.
170  * @get_description: Gets a short description for the application described by the #GAppInfo.
171  * @get_executable: Gets the executable name for the #GAppInfo.
172  * @get_icon: Gets the #GIcon for the #GAppInfo.
173  * @launch: Launches an application specified by the #GAppInfo.
174  * @supports_uris: Indicates whether the application specified supports launching URIs.
175  * @supports_files: Indicates whether the application specified accepts filename arguments.
176  * @launch_uris: Launches an application with a list of URIs.
177  * @should_show: Returns whether an application should be shown (e.g. when getting a list of installed applications). <ulink url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt"> <citetitle>FreeDesktop.Org Startup Notification Specification</citetitle></ulink>.
178  * @set_as_default_for_type: Sets an application as default for a given content type.
179  * @set_as_default_for_extension: Sets an application as default for a given file extension.
180  * @add_supports_type: Adds to the #GAppInfo information about supported file types.
181  * @can_remove_supports_type: Checks for support for removing supported file types from a #GAppInfo.
182  * @remove_supports_type: Removes a supported application type from a #GAppInfo.
183  * @can_delete: Checks if a #GAppInfo can be deleted. Since 2.20
184  * @do_delete: Deletes a #GAppInfo. Since 2.20
185  * @get_commandline: Gets the commandline for the #GAppInfo. Since 2.20
186  * @get_display_name: Gets the display name for the #GAppInfo. Since 2.24
187  *
188  * Application Information interface, for operating system portability.
189  */
190
191
192 /**
193  * GAppLaunchContext:
194  *
195  * Integrating the launch with the launching application. This is used to
196  * handle for instance startup notification and launching the new application
197  * on the same screen as the launching window.
198  */
199
200
201 /**
202  * GApplication:
203  *
204  * The <structname>GApplication</structname> structure contains private
205  * data and should only be accessed using the provided API
206  *
207  * Since: 2.28
208  */
209
210
211 /**
212  * GApplication::activate:
213  * @application: the application
214  *
215  * The ::activate signal is emitted on the primary instance when an
216  * activation occurs. See g_application_activate().
217  */
218
219
220 /**
221  * GApplication::command-line:
222  * @application: the application
223  * @command_line: a #GApplicationCommandLine representing the passed commandline
224  *
225  * The ::command-line signal is emitted on the primary instance when
226  * a commandline is not handled locally. See g_application_run() and
227  * the #GApplicationCommandline documentation for more information.
228  * process. See g_application_command_line_set_exit_status().
229  *
230  * Returns: An integer that is set as the exit status for the calling
231  */
232
233
234 /**
235  * GApplication::open:
236  * @application: the application
237  * @files: (array length=n_files) (element-type GFile): an array of #GFiles
238  * @n_files: the length of @files
239  * @hint: a hint provided by the calling instance
240  *
241  * The ::open signal is emitted on the primary instance when there are
242  * files to open. See g_application_open() for more information.
243  */
244
245
246 /**
247  * GApplication::startup:
248  * @application: the application
249  *
250  * The ::startup signal is emitted on the primary instance immediately
251  * after registration. See g_application_register().
252  */
253
254
255 /**
256  * GApplicationClass:
257  * @startup: invoked on the primary instance immediately after registration
258  * @activate: invoked on the primary instance when an activation occurs
259  * @open: invoked on the primary instance when there are files to open
260  * @command_line: invoked on the primary instance when a command-line is not handled locally
261  * @local_command_line: invoked (locally) when the process has been invoked via commandline execution.  The virtual function has the chance to inspect (and possibly replace) the list of command line arguments. See g_application_run() for more information.
262  * @before_emit: invoked on the primary instance before 'activate', 'open', 'command-line' or any action invocation, gets the 'platform data' from the calling instance
263  * @after_emit: invoked on the primary instance after 'activate', 'open', 'command-line' or any action invocation, gets the 'platform data' from the calling instance
264  * @add_platform_data: invoked (locally) to add 'platform data' to be sent to the primary instance when activating, opening or invoking actions
265  * @quit_mainloop: invoked on the primary instance when the use count of the application drops to zero (and after any inactivity timeout, if requested)
266  * @run_mainloop: invoked on the primary instance from g_application_run() if the use-count is non-zero
267  *
268  *
269  *
270  * Since: 2.28
271  */
272
273
274 /**
275  * GApplicationCommandLine:
276  *
277  * The <structname>GApplicationCommandLine</structname> structure contains private
278  * data and should only be accessed using the provided API
279  *
280  * Since: 2.28
281  */
282
283
284 /**
285  * GApplicationCommandLineClass:
286  *
287  * The <structname>GApplicationCommandLineClass</structname> structure contains
288  * private data only
289  *
290  * Since: 2.28
291  */
292
293
294 /**
295  * GApplicationFlags:
296  * @G_APPLICATION_FLAGS_NONE: Default
297  * @G_APPLICATION_IS_SERVICE: Run as a service. In this mode, registration fails if the service is already running, and the application will stay around for a while when the use count falls to zero.
298  * @G_APPLICATION_IS_LAUNCHER: Don't try to become the primary instance.
299  * @G_APPLICATION_HANDLES_OPEN: This application handles opening files (in the primary instance). Note that this flag only affects the default implementation of local_command_line(), and has no effect if %G_APPLICATION_HANDLES_COMMAND_LINE is given. See g_application_run() for details.
300  * @G_APPLICATION_HANDLES_COMMAND_LINE: This application handles command line arguments (in the primary instance). Note that this flag only affect the default implementation of local_command_line(). See g_application_run() for details.
301  * @G_APPLICATION_SEND_ENVIRONMENT: Send the environment of the launching process to the primary instance. Set this flag if your application is expected to behave differently depending on certain environment variables. For instance, an editor might be expected to use the <envar>GIT_COMMITTER_NAME</envar> environment variable when editing a git commit message. The environment is available to the #GApplication::command-line signal handler, via g_application_command_line_getenv().
302  * @G_APPLICATION_NON_UNIQUE: Make no attempts to do any of the typical single-instance application negotiation.  The application neither attempts to become the owner of the application ID nor does it check if an existing owner already exists.  Everything occurs in the local process.  Since: 2.30.
303  *
304  * Flags used to define the behaviour of a #GApplication.
305  *
306  * Since: 2.28
307  */
308
309
310 /**
311  * GAskPasswordFlags:
312  * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password.
313  * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username.
314  * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain.
315  * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings.
316  * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users.
317  *
318  * #GAskPasswordFlags are used to request specific information from the
319  * user, or to notify the user of their choices in an authentication
320  * situation.
321  */
322
323
324 /**
325  * GAsyncInitable:
326  *
327  * Interface for asynchronously initializable objects.
328  *
329  * Since: 2.22
330  */
331
332
333 /**
334  * GAsyncInitableIface:
335  * @g_iface: The parent interface.
336  * @init_async: Starts initialization of the object.
337  * @init_finish: Finishes initialization of the object.
338  *
339  * Provides an interface for asynchronous initializing object such that
340  * initialization may fail.
341  *
342  * Since: 2.22
343  */
344
345
346 /**
347  * GAsyncReadyCallback:
348  * @source_object: the object the asynchronous operation was started with.
349  * @res: a #GAsyncResult.
350  * @user_data: user data passed to the callback.
351  *
352  * Type definition for a function that will be called back when an asynchronous
353  * operation within GIO has been completed.
354  */
355
356
357 /**
358  * GAsyncResult:
359  *
360  * Holds results information for an asynchronous operation,
361  * usually passed directly to a asynchronous _finish() operation.
362  */
363
364
365 /**
366  * GAsyncResultIface:
367  * @g_iface: The parent interface.
368  * @get_user_data: Gets the user data passed to the callback.
369  * @get_source_object: Gets the source object that issued the asynchronous operation.
370  *
371  * Interface definition for #GAsyncResult.
372  */
373
374
375 /**
376  * GBaseFinalizeFunc:
377  * @g_class: The #GTypeClass structure to finalize.
378  *
379  * A callback function used by the type system to finalize those portions
380  * of a derived types class structure that were setup from the corresponding
381  * GBaseInitFunc() function. Class finalization basically works the inverse
382  * way in which class intialization is performed.
383  * See GClassInitFunc() for a discussion of the class intialization process.
384  */
385
386
387 /**
388  * GBaseInitFunc:
389  * @g_class: The #GTypeClass structure to initialize.
390  *
391  * A callback function used by the type system to do base initialization
392  * of the class structures of derived types. It is called as part of the
393  * initialization process of all derived classes and should reallocate
394  * or reset all dynamic class members copied over from the parent class.
395  * For example, class members (such as strings) that are not sufficiently
396  * handled by a plain memory copy of the parent class into the derived class
397  * have to be altered. See GClassInitFunc() for a discussion of the class
398  * intialization process.
399  */
400
401
402 /**
403  * GBinding:
404  *
405  * <structname>GBinding</structname> is an opaque structure whose members
406  * cannot be accessed directly.
407  *
408  * Since: 2.26
409  */
410
411
412 /**
413  * GBindingFlags:
414  * @G_BINDING_DEFAULT: The default binding; if the source property changes, the target property is updated with its value.
415  * @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the property of the source or the property of the target changes, the other is updated.
416  * @G_BINDING_SYNC_CREATE: Synchronize the values of the source and target properties when creating the binding; the direction of the synchronization is always from the source to the target.
417  * @G_BINDING_INVERT_BOOLEAN: If the two properties being bound are booleans, setting one to %TRUE will result in the other being set to %FALSE and vice versa. This flag will only work for boolean properties, and cannot be used when passing custom transformation functions to g_object_bind_property_full().
418  *
419  * Flags to be passed to g_object_bind_property() or
420  * g_object_bind_property_full().
421  * This enumeration can be extended at later date.
422  *
423  * Since: 2.26
424  */
425
426
427 /**
428  * GBindingTransformFunc:
429  * @binding: a #GBinding
430  * @source_value: the value of the source property
431  * @target_value: the value of the target property
432  * @user_data: data passed to the transform function
433  *
434  * A function to be called to transform the source property of @source
435  * from @source_value into the target property of @target
436  * using @target_value.
437  * otherwise
438  *
439  * Returns: %TRUE if the transformation was successful, and %FALSE
440  * Since: 2.26
441  */
442
443
444 /**
445  * GBookmarkFile:
446  *
447  * The <structname>GBookmarkFile</structname> struct contains only
448  * private data and should not be directly accessed.
449  */
450
451
452 /**
453  * GBookmarkFileError:
454  * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed
455  * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found
456  * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did not register a bookmark
457  * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found
458  * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed
459  * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an unknown encoding
460  * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing
461  * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found
462  *
463  * Error codes returned by bookmark file parsing.
464  */
465
466
467 /**
468  * GBoxedCopyFunc:
469  * @boxed: The boxed structure to be copied.
470  *
471  * This function is provided by the user and should produce a copy
472  * of the passed in boxed structure.
473  *
474  * Returns: The newly created copy of the boxed structure.
475  */
476
477
478 /**
479  * GBoxedFreeFunc:
480  * @boxed: The boxed structure to be freed.
481  *
482  * This function is provided by the user and should free the boxed
483  * structure passed.
484  */
485
486
487 /**
488  * GBufferedInputStream:
489  *
490  * Implements #GFilterInputStream with a sized input buffer.
491  */
492
493
494 /**
495  * GBufferedOutputStream:
496  *
497  * An implementation of #GFilterOutputStream with a sized buffer.
498  */
499
500
501 /**
502  * GBusAcquiredCallback:
503  * @connection: The #GDBusConnection to a message bus.
504  * @name: The name that is requested to be owned.
505  * @user_data: User data passed to g_bus_own_name().
506  *
507  * Invoked when a connection to a message bus has been obtained.
508  *
509  * Since: 2.26
510  */
511
512
513 /**
514  * GBusNameAcquiredCallback:
515  * @connection: The #GDBusConnection on which to acquired the name.
516  * @name: The name being owned.
517  * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
518  *
519  * Invoked when the name is acquired.
520  *
521  * Since: 2.26
522  */
523
524
525 /**
526  * GBusNameAppearedCallback:
527  * @connection: The #GDBusConnection the name is being watched on.
528  * @name: The name being watched.
529  * @name_owner: Unique name of the owner of the name being watched.
530  * @user_data: User data passed to g_bus_watch_name().
531  *
532  * Invoked when the name being watched is known to have to have a owner.
533  *
534  * Since: 2.26
535  */
536
537
538 /**
539  * GBusNameLostCallback:
540  * @connection: The #GDBusConnection on which to acquire the name or %NULL if the connection was disconnected.
541  * @name: The name being owned.
542  * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
543  *
544  * Invoked when the name is lost or @connection has been closed.
545  *
546  * Since: 2.26
547  */
548
549
550 /**
551  * GBusNameOwnerFlags:
552  * @G_BUS_NAME_OWNER_FLAGS_NONE: No flags set.
553  * @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the the name.
554  * @G_BUS_NAME_OWNER_FLAGS_REPLACE: If another message bus connection owns the name and have specified #G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection.
555  *
556  * Flags used in g_bus_own_name().
557  *
558  * Since: 2.26
559  */
560
561
562 /**
563  * GBusNameVanishedCallback:
564  * @connection: The #GDBusConnection the name is being watched on.
565  * @name: The name being watched.
566  * @user_data: User data passed to g_bus_watch_name().
567  *
568  * Invoked when the name being watched is known not to have to have a owner.
569  *
570  * Since: 2.26
571  */
572
573
574 /**
575  * GBusNameWatcherFlags:
576  * @G_BUS_NAME_WATCHER_FLAGS_NONE: No flags set.
577  * @G_BUS_NAME_WATCHER_FLAGS_AUTO_START: If no-one owns the name when beginning to watch the name, ask the bus to launch an owner for the name.
578  *
579  * Flags used in g_bus_watch_name().
580  *
581  * Since: 2.26
582  */
583
584
585 /**
586  * GBusType:
587  * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any.
588  * @G_BUS_TYPE_NONE: Not a message bus.
589  * @G_BUS_TYPE_SYSTEM: The system-wide message bus.
590  * @G_BUS_TYPE_SESSION: The login session message bus.
591  *
592  * An enumeration for well-known message buses.
593  *
594  * Since: 2.26
595  */
596
597
598 /**
599  * GCClosure:
600  * @closure: the #GClosure
601  * @callback: the callback function
602  *
603  * A #GCClosure is a specialization of #GClosure for C function callbacks.
604  */
605
606
607 /**
608  * GCallback:
609  *
610  * The type used for callback functions in structure definitions and function
611  * signatures. This doesn't mean that all callback functions must take no
612  * parameters and return void. The required signature of a callback function
613  * is determined by the context in which is used (e.g. the signal to which it
614  * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
615  */
616
617
618 /**
619  * GCancellable:
620  *
621  * Allows actions to be cancelled.
622  */
623
624
625 /**
626  * GCancellable::cancelled:
627  * @cancellable: a #GCancellable.
628  *
629  * Emitted when the operation has been cancelled.
630  * Can be used by implementations of cancellable operations. If the
631  * operation is cancelled from another thread, the signal will be
632  * emitted in the thread that cancelled the operation, not the
633  * thread that is running the operation.
634  * Note that disconnecting from this signal (or any signal) in a
635  * multi-threaded program is prone to race conditions. For instance
636  * it is possible that a signal handler may be invoked even
637  * <emphasis>after</emphasis> a call to
638  * g_signal_handler_disconnect() for that handler has already
639  * returned.
640  * There is also a problem when cancellation happen
641  * right before connecting to the signal. If this happens the
642  * signal will unexpectedly not be emitted, and checking before
643  * connecting to the signal leaves a race condition where this is
644  * still happening.
645  * In order to make it safe and easy to connect handlers there
646  * g_cancellable_disconnect() which protect against problems
647  * like this.
648  * An example of how to us this:
649  * |[
650  * /<!-- -->* Make sure we don't do any unnecessary work if already cancelled *<!-- -->/
651  * if (g_cancellable_set_error_if_cancelled (cancellable))
652  * return;
653  * /<!-- -->* Set up all the data needed to be able to
654  * * handle cancellation of the operation *<!-- -->/
655  * my_data = my_data_new (...);
656  * id = 0;
657  * if (cancellable)
658  * id = g_cancellable_connect (cancellable,
659  * G_CALLBACK (cancelled_handler)
660  * data, NULL);
661  * /<!-- -->* cancellable operation here... *<!-- -->/
662  * g_cancellable_disconnect (cancellable, id);
663  * /<!-- -->* cancelled_handler is never called after this, it
664  * * is now safe to free the data *<!-- -->/
665  * my_data_free (my_data);
666  * ]|
667  * Note that the cancelled signal is emitted in the thread that
668  * the user cancelled from, which may be the main thread. So, the
669  * cancellable signal should not do something that can block.
670  *
671  * Are two helper functions: g_cancellable_connect() and
672  */
673
674
675 /**
676  * GCancellableSourceFunc:
677  * @cancellable: the #GCancellable
678  * @user_data: data passed in by the user.
679  *
680  * This is the function type of the callback used for the #GSource
681  * returned by g_cancellable_source_new().
682  *
683  * Returns: it should return %FALSE if the source should be removed.
684  * Since: 2.28
685  */
686
687
688 /**
689  * GCharsetConverter:
690  *
691  * Conversions between character sets.
692  */
693
694
695 /**
696  * GChecksum:
697  *
698  * An opaque structure representing a checksumming operation.
699  * To create a new GChecksum, use g_checksum_new(). To free
700  * a GChecksum, use g_checksum_free().
701  *
702  * Since: 2.16
703  */
704
705
706 /**
707  * GChecksumType:
708  * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
709  * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
710  * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
711  *
712  * The hashing algorithm to be used by #GChecksum when performing the
713  * digest of some data.
714  * Note that the #GChecksumType enumeration may be extended at a later
715  * date to include new hashing algorithm types.
716  *
717  * Since: 2.16
718  */
719
720
721 /**
722  * GChildWatchFunc:
723  * @pid: the process id of the child process
724  * @status: Status information about the child process, see waitpid(2) for more information about this field
725  * @data: user data passed to g_child_watch_add()
726  *
727  * The type of functions to be called when a child exists.
728  */
729
730
731 /**
732  * GClassFinalizeFunc:
733  * @g_class: The #GTypeClass structure to finalize.
734  * @class_data: The @class_data member supplied via the #GTypeInfo structure.
735  *
736  * A callback function used by the type system to finalize a class.
737  * This function is rarely needed, as dynamically allocated class resources
738  * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
739  * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
740  * structure of a static type is invalid, because classes of static types
741  * will never be finalized (they are artificially kept alive when their
742  * reference count drops to zero).
743  */
744
745
746 /**
747  * GClassInitFunc:
748  * @g_class: The #GTypeClass structure to initialize.
749  * @class_data: The @class_data member supplied via the #GTypeInfo structure.
750  *
751  * A callback function used by the type system to initialize the class
752  * of a specific type. This function should initialize all static class
753  * members.
754  * The initialization process of a class involves:
755  * <itemizedlist>
756  * <listitem><para>
757  * 1 - Copying common members from the parent class over to the
758  * derived class structure.
759  * </para></listitem>
760  * <listitem><para>
761  * 2 -  Zero initialization of the remaining members not copied
762  * over from the parent class.
763  * </para></listitem>
764  * <listitem><para>
765  * 3 - Invocation of the GBaseInitFunc() initializers of all parent
766  * types and the class' type.
767  * </para></listitem>
768  * <listitem><para>
769  * 4 - Invocation of the class' GClassInitFunc() initializer.
770  * </para></listitem>
771  * </itemizedlist>
772  * Since derived classes are partially initialized through a memory copy
773  * of the parent class, the general rule is that GBaseInitFunc() and
774  * GBaseFinalizeFunc() should take care of necessary reinitialization
775  * and release of those class members that were introduced by the type
776  * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
777  * GClassInitFunc() should only care about initializing static
778  * class members, while dynamic class members (such as allocated strings
779  * or reference counted resources) are better handled by a GBaseInitFunc()
780  * for this type, so proper initialization of the dynamic class members
781  * is performed for class initialization of derived types as well.
782  * An example may help to correspond the intend of the different class
783  * initializers:
784  * |[
785  * typedef struct {
786  * GObjectClass parent_class;
787  * gint         static_integer;
788  * gchar       *dynamic_string;
789  * } TypeAClass;
790  * static void
791  * type_a_base_class_init (TypeAClass *class)
792  * {
793  * class->dynamic_string = g_strdup ("some string");
794  * }
795  * static void
796  * type_a_base_class_finalize (TypeAClass *class)
797  * {
798  * g_free (class->dynamic_string);
799  * }
800  * static void
801  * type_a_class_init (TypeAClass *class)
802  * {
803  * class->static_integer = 42;
804  * }
805  * typedef struct {
806  * TypeAClass   parent_class;
807  * gfloat       static_float;
808  * GString     *dynamic_gstring;
809  * } TypeBClass;
810  * static void
811  * type_b_base_class_init (TypeBClass *class)
812  * {
813  * class->dynamic_gstring = g_string_new ("some other string");
814  * }
815  * static void
816  * type_b_base_class_finalize (TypeBClass *class)
817  * {
818  * g_string_free (class->dynamic_gstring);
819  * }
820  * static void
821  * type_b_class_init (TypeBClass *class)
822  * {
823  * class->static_float = 3.14159265358979323846;
824  * }
825  * ]|
826  * Initialization of TypeBClass will first cause initialization of
827  * TypeAClass (derived classes reference their parent classes, see
828  * g_type_class_ref() on this).
829  * Initialization of TypeAClass roughly involves zero-initializing its fields,
830  * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
831  * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
832  * type_a_class_init() to initialize its static members (static_integer).
833  * The first step in the initialization process of TypeBClass is then
834  * a plain memory copy of the contents of TypeAClass into TypeBClass and
835  * zero-initialization of the remaining fields in TypeBClass.
836  * The dynamic members of TypeAClass within TypeBClass now need
837  * reinitialization which is performed by calling type_a_base_class_init()
838  * with an argument of TypeBClass.
839  * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
840  * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
841  * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
842  * is called to complete the initialization process with the static members
843  * (static_float).
844  * Corresponding finalization counter parts to the GBaseInitFunc() functions
845  * have to be provided to release allocated resources at class finalization
846  * time.
847  */
848
849
850 /**
851  * GClosure:
852  * @in_marshal: Indicates whether the closure is currently being invoked with g_closure_invoke()
853  * @is_invalid: Indicates whether the closure has been invalidated by g_closure_invalidate()
854  *
855  * A #GClosure represents a callback supplied by the programmer.
856  */
857
858
859 /**
860  * GClosureMarshal:
861  * @closure: the #GClosure to which the marshaller belongs
862  * @return_value: a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
863  * @n_param_values: the length of the @param_values array
864  * @param_values: an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
865  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
866  * @marshal_data: additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
867  *
868  * The type used for marshaller functions.
869  */
870
871
872 /**
873  * GClosureNotify:
874  * @data: data specified when registering the notification callback
875  * @closure: the #GClosure on which the notification is emitted
876  *
877  * The type used for the various notification callbacks which can be registered
878  * on closures.
879  */
880
881
882 /**
883  * GConnectFlags:
884  * @G_CONNECT_AFTER: whether the handler should be called before or after the default handler of the signal.
885  * @G_CONNECT_SWAPPED: whether the instance and data should be swapped when calling the handler.
886  *
887  * The connection flags are used to specify the behaviour of a signal's
888  * connection.
889  */
890
891
892 /**
893  * GConvertError:
894  * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character sets is not supported.
895  * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input.
896  * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason.
897  * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input.
898  * @G_CONVERT_ERROR_BAD_URI: URI is invalid.
899  * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path.
900  *
901  * Error codes returned by character set conversion routines.
902  */
903
904
905 /**
906  * GConverter:
907  *
908  * Seek object for streaming operations.
909  *
910  * Since: 2.24
911  */
912
913
914 /**
915  * GConverterFlags:
916  * @G_CONVERTER_NO_FLAGS: No flags.
917  * @G_CONVERTER_INPUT_AT_END: At end of input data
918  * @G_CONVERTER_FLUSH: Flush data
919  *
920  * Flags used when calling a g_converter_convert().
921  *
922  * Since: 2.24
923  */
924
925
926 /**
927  * GConverterIface:
928  * @g_iface: The parent interface.
929  * @convert: Converts data.
930  * @reset: Reverts the internal state of the converter to its initial state.
931  *
932  * Provides an interface for converting data from one type
933  * to another type. The conversion can be stateful
934  * and may fail at any place.
935  *
936  * Since: 2.24
937  */
938
939
940 /**
941  * GConverterInputStream:
942  *
943  * An implementation of #GFilterInputStream that allows data
944  * conversion.
945  */
946
947
948 /**
949  * GConverterOutputStream:
950  *
951  * An implementation of #GFilterOutputStream that allows data
952  * conversion.
953  */
954
955
956 /**
957  * GConverterResult:
958  * @G_CONVERTER_ERROR: There was an error during conversion.
959  * @G_CONVERTER_CONVERTED: Some data was consumed or produced
960  * @G_CONVERTER_FINISHED: The conversion is finished
961  * @G_CONVERTER_FLUSHED: Flushing is finished
962  *
963  * Results returned from g_converter_convert().
964  *
965  * Since: 2.24
966  */
967
968
969 /**
970  * GCopyFunc:
971  * @src: A pointer to the data which should be copied
972  * @data: Additional data
973  *
974  * A function of this signature is used to copy the node data
975  * when doing a deep-copy of a tree.
976  *
977  * Returns: A pointer to the copy
978  * Since: 2.4
979  */
980
981
982 /**
983  * GCredentials:
984  *
985  * The #GCredentials structure contains only private data and
986  * should only be accessed using the provided API.
987  *
988  * Since: 2.26
989  */
990
991
992 /**
993  * GCredentialsClass:
994  *
995  * Class structure for #GCredentials.
996  *
997  * Since: 2.26
998  */
999
1000
1001 /**
1002  * GCredentialsType:
1003  * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type.
1004  * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a <type>struct ucred</type>.
1005  * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a <type>struct cmsgcred</type>.
1006  * @G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED: The native credentials type is a <type>struct sockpeercred</type>. Added in 2.30.
1007  *
1008  * Enumeration describing different kinds of native credential types.
1009  *
1010  * Since: 2.26
1011  */
1012
1013
1014 /**
1015  * GDBusAnnotationInfo:
1016  * @ref_count: The reference count or -1 if statically allocated.
1017  * @key: The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".
1018  * @value: The value of the annotation.
1019  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1020  *
1021  * Information about an annotation.
1022  *
1023  * Since: 2.26
1024  */
1025
1026
1027 /**
1028  * GDBusArgInfo:
1029  * @ref_count: The reference count or -1 if statically allocated.
1030  * @name: Name of the argument, e.g. @unix_user_id.
1031  * @signature: D-Bus signature of the argument (a single complete type).
1032  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1033  *
1034  * Information about an argument for a method or a signal.
1035  *
1036  * Since: 2.26
1037  */
1038
1039
1040 /**
1041  * GDBusAuthMechanism:credentials:
1042  *
1043  * If authenticating as a server, this property contains the
1044  * received credentials, if any.
1045  * If authenticating as a client, the property contains the
1046  * credentials that were sent, if any.
1047  */
1048
1049
1050 /**
1051  * GDBusAuthObserver:
1052  *
1053  * The #GDBusAuthObserver structure contains only private data and
1054  * should only be accessed using the provided API.
1055  *
1056  * Since: 2.26
1057  */
1058
1059
1060 /**
1061  * GDBusAuthObserver::authorize-authenticated-peer:
1062  * @observer: The #GDBusAuthObserver emitting the signal.
1063  * @stream: A #GIOStream for the #GDBusConnection.
1064  * @credentials: Credentials received from the peer or %NULL.
1065  *
1066  * Emitted to check if a peer that is successfully authenticated
1067  * is authorized.
1068  *
1069  * Returns: %TRUE if the peer is authorized, %FALSE if not.
1070  * Since: 2.26
1071  */
1072
1073
1074 /**
1075  * GDBusAuthObserverClass:
1076  * @authorize_authenticated_peer: Signal class handler for the #GDBusAuthObserver::authorize-authenticated-peer signal.
1077  *
1078  * Class structure for #GDBusAuthObserverClass.
1079  *
1080  * Since: 2.26
1081  */
1082
1083
1084 /**
1085  * GDBusCallFlags:
1086  * @G_DBUS_CALL_FLAGS_NONE: No flags set.
1087  * @G_DBUS_CALL_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this method invocation.
1088  *
1089  * Flags used in g_dbus_connection_call() and similar APIs.
1090  *
1091  * Since: 2.26
1092  */
1093
1094
1095 /**
1096  * GDBusCapabilityFlags:
1097  * @G_DBUS_CAPABILITY_FLAGS_NONE: No flags set.
1098  * @G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING: The connection supports exchanging UNIX file descriptors with the remote peer.
1099  *
1100  * Capabilities negotiated with the remote peer.
1101  *
1102  * Since: 2.26
1103  */
1104
1105
1106 /**
1107  * GDBusConnection:
1108  *
1109  * The #GDBusConnection structure contains only private data and
1110  * should only be accessed using the provided API.
1111  *
1112  * Since: 2.26
1113  */
1114
1115
1116 /**
1117  * GDBusConnection::closed:
1118  * @connection: The #GDBusConnection emitting the signal.
1119  * @remote_peer_vanished: %TRUE if @connection is closed because the remote peer closed its end of the connection.
1120  * @error: A #GError with more details about the event or %NULL.
1121  *
1122  * Emitted when the connection is closed.
1123  * The cause of this event can be
1124  * <itemizedlist>
1125  * <listitem><para>
1126  * If g_dbus_connection_close() is called. In this case
1127  * </para></listitem>
1128  * <listitem><para>
1129  * If the remote peer closes the connection. In this case
1130  * </para></listitem>
1131  * <listitem><para>
1132  * If the remote peer sends invalid or malformed data. In this
1133  * case @remote_peer_vanished is set to %FALSE and @error
1134  * is set.
1135  * </para></listitem>
1136  * </itemizedlist>
1137  * Upon receiving this signal, you should give up your reference to
1138  * once.
1139  *
1140  * Since: 2.26
1141  */
1142
1143
1144 /**
1145  * GDBusConnection:address:
1146  *
1147  * A D-Bus address specifying potential endpoints that can be used
1148  * when establishing the connection.
1149  *
1150  * Since: 2.26
1151  */
1152
1153
1154 /**
1155  * GDBusConnection:authentication-observer:
1156  *
1157  * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
1158  *
1159  * Since: 2.26
1160  */
1161
1162
1163 /**
1164  * GDBusConnection:capabilities:
1165  *
1166  * Flags from the #GDBusCapabilityFlags enumeration
1167  * representing connection features negotiated with the other peer.
1168  *
1169  * Since: 2.26
1170  */
1171
1172
1173 /**
1174  * GDBusConnection:closed:
1175  *
1176  * A boolean specifying whether the connection has been closed.
1177  *
1178  * Since: 2.26
1179  */
1180
1181
1182 /**
1183  * GDBusConnection:exit-on-close:
1184  *
1185  * A boolean specifying whether the process will be terminated (by
1186  * calling <literal>raise(SIGTERM)</literal>) if the connection
1187  * is closed by the remote peer.
1188  *
1189  * Since: 2.26
1190  */
1191
1192
1193 /**
1194  * GDBusConnection:flags:
1195  *
1196  * Flags from the #GDBusConnectionFlags enumeration.
1197  *
1198  * Since: 2.26
1199  */
1200
1201
1202 /**
1203  * GDBusConnection:guid:
1204  *
1205  * The GUID of the peer performing the role of server when
1206  * authenticating.
1207  * If you are constructing a #GDBusConnection and pass
1208  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the
1209  * #GDBusConnection:flags property then you MUST also set this
1210  * property to a valid guid.
1211  * If you are constructing a #GDBusConnection and pass
1212  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
1213  * #GDBusConnection:flags property you will be able to read the GUID
1214  * of the other peer here after the connection has been successfully
1215  * initialized.
1216  *
1217  * Since: 2.26
1218  */
1219
1220
1221 /**
1222  * GDBusConnection:locked:
1223  *
1224  * A boolean specifying whether the message is locked.
1225  *
1226  * Since: 2.26
1227  */
1228
1229
1230 /**
1231  * GDBusConnection:stream:
1232  *
1233  * The underlying #GIOStream used for I/O.
1234  * If this is passed on construction and is a #GSocketConnection,
1235  * then the corresponding #GSocket will be put into non-blocking mode.
1236  *
1237  * Since: 2.26
1238  */
1239
1240
1241 /**
1242  * GDBusConnection:unique-name:
1243  *
1244  * The unique name as assigned by the message bus or %NULL if the
1245  * connection is not open or not a message bus connection.
1246  *
1247  * Since: 2.26
1248  */
1249
1250
1251 /**
1252  * GDBusConnectionClass:
1253  * @closed: Signal class handler for the #GDBusConnection::closed signal.
1254  *
1255  * Class structure for #GDBusConnection.
1256  *
1257  * Since: 2.26
1258  */
1259
1260
1261 /**
1262  * GDBusConnectionFlags:
1263  * @G_DBUS_CONNECTION_FLAGS_NONE: No flags set.
1264  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT: Perform authentication against server.
1265  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER: Perform authentication against client.
1266  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: When authenticating as a server, allow the anonymous authentication method.
1267  * @G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION: Pass this flag if connecting to a peer that is a message bus. This means that the Hello() method will be invoked as part of the connection setup.
1268  * @G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING: If set, processing of D-Bus messages is delayed until g_dbus_connection_start_message_processing() is called.
1269  *
1270  * Flags used when creating a new #GDBusConnection.
1271  *
1272  * Since: 2.26
1273  */
1274
1275
1276 /**
1277  * GDBusError:
1278  *
1279  * A generic error; "something went wrong" - see the error message for
1280  * more.
1281  * There was not enough memory to complete an operation.
1282  * The bus doesn't know how to launch a service to supply the bus name
1283  * you wanted.
1284  * The bus name you referenced doesn't exist (i.e. no application owns
1285  * it).
1286  * No reply to a message expecting one, usually means a timeout occurred.
1287  * Something went wrong reading or writing to a socket, for example.
1288  * A D-Bus bus address was malformed.
1289  * Requested operation isn't supported (like ENOSYS on UNIX).
1290  * Some limited resource is exhausted.
1291  * Security restrictions don't allow doing what you're trying to do.
1292  * Authentication didn't work.
1293  * Unable to connect to server (probably caused by ECONNREFUSED on a
1294  * socket).
1295  * Certain timeout errors, possibly ETIMEDOUT on a socket.  Note that
1296  * %G_DBUS_ERROR_NO_REPLY is used for message reply timeouts. Warning:
1297  * this is confusingly-named given that %G_DBUS_ERROR_TIMED_OUT also
1298  * exists. We can't fix it for compatibility reasons so just be
1299  * careful.
1300  * No network access (probably ENETUNREACH on a socket).
1301  * Can't bind a socket since its address is in use (i.e. EADDRINUSE).
1302  * The connection is disconnected and you're trying to use it.
1303  * Invalid arguments passed to a method call.
1304  * Missing file.
1305  * Existing file and the operation you're using does not silently overwrite.
1306  * Method name you invoked isn't known by the object you invoked it on.
1307  * confusingly-named given that %G_DBUS_ERROR_TIMEOUT also exists. We
1308  * can't fix it for compatibility reasons so just be careful.
1309  * Tried to remove or modify a match rule that didn't exist.
1310  * The match rule isn't syntactically valid.
1311  * While starting a new process, the exec() call failed.
1312  * While starting a new process, the fork() call failed.
1313  * While starting a new process, the child exited with a status code.
1314  * While starting a new process, the child exited on a signal.
1315  * While starting a new process, something went wrong.
1316  * We failed to setup the environment correctly.
1317  * We failed to setup the config parser correctly.
1318  * Bus name was not valid.
1319  * Service file not found in system-services directory.
1320  * Permissions are incorrect on the setuid helper.
1321  * Service file invalid (Name, User or Exec missing).
1322  * Tried to get a UNIX process ID and it wasn't available.
1323  * Tried to get a UNIX process ID and it wasn't available.
1324  * A type signature is not valid.
1325  * A file contains invalid syntax or is otherwise broken.
1326  * Asked for SELinux security context and it wasn't available.
1327  * Asked for ADT audit data and it wasn't available.
1328  * There's already an object with the requested object path.
1329  * Error codes for the %G_DBUS_ERROR error domain.
1330  *
1331  * Certain timeout errors, e.g. while starting a service. warning: this is
1332  * Since: 2.26
1333  */
1334
1335
1336 /**
1337  * GDBusErrorEntry:
1338  * @error_code: An error code.
1339  * @dbus_error_name: The D-Bus error name to associate with @error_code.
1340  *
1341  * Struct used in g_dbus_error_register_error_domain().
1342  *
1343  * Since: 2.26
1344  */
1345
1346
1347 /**
1348  * GDBusInterface:
1349  *
1350  * Base type for D-Bus interfaces.
1351  *
1352  * Since: 2.30
1353  */
1354
1355
1356 /**
1357  * GDBusInterfaceGetPropertyFunc:
1358  * @connection: A #GDBusConnection.
1359  * @sender: The unique bus name of the remote caller.
1360  * @object_path: The object path that the method was invoked on.
1361  * @interface_name: The D-Bus interface name for the property.
1362  * @property_name: The name of the property to get the value of.
1363  * @error: Return location for error.
1364  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1365  *
1366  * The type of the @get_property function in #GDBusInterfaceVTable.
1367  * consumed - otherwise its reference count is decreased by one.
1368  *
1369  * Returns: A #GVariant with the value for @property_name or %NULL if
1370  * Since: 2.26
1371  */
1372
1373
1374 /**
1375  * GDBusInterfaceIface:
1376  * @parent_iface: The parent interface.
1377  * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_get_info().
1378  * @get_object: Gets the enclosing #GDBusObject. See g_dbus_interface_get_object().
1379  * @set_object: Sets the enclosing #GDBusObject. See g_dbus_interface_set_object().
1380  *
1381  * Base type for D-Bus interfaces.
1382  *
1383  * Since: 2.30
1384  */
1385
1386
1387 /**
1388  * GDBusInterfaceInfo:
1389  * @ref_count: The reference count or -1 if statically allocated.
1390  * @name: The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".
1391  * @methods: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods.
1392  * @signals: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals.
1393  * @properties: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties.
1394  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1395  *
1396  * Information about a D-Bus interface.
1397  *
1398  * Since: 2.26
1399  */
1400
1401
1402 /**
1403  * GDBusInterfaceMethodCallFunc:
1404  * @connection: A #GDBusConnection.
1405  * @sender: The unique bus name of the remote caller.
1406  * @object_path: The object path that the method was invoked on.
1407  * @interface_name: The D-Bus interface name the method was invoked on.
1408  * @method_name: The name of the method that was invoked.
1409  * @parameters: A #GVariant tuple with parameters.
1410  * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
1411  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1412  *
1413  * The type of the @method_call function in #GDBusInterfaceVTable.
1414  *
1415  * Since: 2.26
1416  */
1417
1418
1419 /**
1420  * GDBusInterfaceSetPropertyFunc:
1421  * @connection: A #GDBusConnection.
1422  * @sender: The unique bus name of the remote caller.
1423  * @object_path: The object path that the method was invoked on.
1424  * @interface_name: The D-Bus interface name for the property.
1425  * @property_name: The name of the property to get the value of.
1426  * @value: The value to set the property to.
1427  * @error: Return location for error.
1428  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1429  *
1430  * The type of the @set_property function in #GDBusInterfaceVTable.
1431  *
1432  * Returns: %TRUE if the property was set to @value, %FALSE if @error is set.
1433  * Since: 2.26
1434  */
1435
1436
1437 /**
1438  * GDBusInterfaceSkeleton:
1439  *
1440  * The #GDBusInterfaceSkeleton structure contains private data and should
1441  * only be accessed using the provided API.
1442  *
1443  * Since: 2.30
1444  */
1445
1446
1447 /**
1448  * GDBusInterfaceSkeleton::g-authorize-method:
1449  * @interface: The #GDBusInterfaceSkeleton emitting the signal.
1450  * @invocation: A #GDBusMethodInvocation.
1451  *
1452  * Emitted when a method is invoked by a remote caller and used to
1453  * determine if the method call is authorized.
1454  * Note that this signal is emitted in a thread dedicated to
1455  * handling the method call so handlers are allowed to perform
1456  * blocking IO. This means that it is appropriate to call
1457  * e.g. <ulink
1458  * url="http://hal.freedesktop.org/docs/polkit/PolkitAuthority.html#polkit-authority-check-authorization-sync">polkit_authority_check_authorization_sync()</ulink>
1459  * with the <ulink
1460  * url="http://hal.freedesktop.org/docs/polkit/PolkitAuthority.html#POLKIT-CHECK-AUTHORIZATION-FLAGS-ALLOW-USER-INTERACTION:CAPS">POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION</ulink> flag set.
1461  * If %FALSE is returned then no further handlers are run and the
1462  * signal handler must take a reference to @invocation and finish
1463  * handling the call (e.g. return an error via
1464  * g_dbus_method_invocation_return_error()).
1465  * Otherwise, if %TRUE is returned, signal emission continues. If no
1466  * handlers return %FALSE, then the method is dispatched. If
1467  * #GDBusObjectSkeleton::authorize-method signal handlers run before
1468  * the handlers for this signal.
1469  * The default class handler just returns %TRUE.
1470  * handlers are connected and the default class handler isn't
1471  * overridden (for both @interface and the enclosing
1472  * #GDBusObjectSkeleton, if any) and #GDBusInterfaceSkeleton:g-flags does
1473  * not have the
1474  * %G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD
1475  * flags set, no dedicated thread is ever used and the call will be
1476  * handled in the same thread as the object that @interface belongs
1477  * to was exported in.
1478  *
1479  * Please note that the common case is optimized: if no signals
1480  * Returns: %TRUE if the call is authorized, %FALSE otherwise.
1481  * Since: 2.30
1482  */
1483
1484
1485 /**
1486  * GDBusInterfaceSkeleton:g-flags:
1487  *
1488  * Flags from the #GDBusInterfaceSkeletonFlags enumeration.
1489  *
1490  * Since: 2.30
1491  */
1492
1493
1494 /**
1495  * GDBusInterfaceSkeletonClass:
1496  * @parent_class: The parent class.
1497  * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details.
1498  * @get_vtable: Returns a #GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details.
1499  * @get_properties: Returns a new, floating, #GVariant with all properties. See g_dbus_interface_skeleton_get_properties().
1500  * @flush: Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush().
1501  * @g_authorize_method: Signal class handler for the #GDBusInterfaceSkeleton::g-authorize-method signal.
1502  *
1503  * Class structure for #GDBusInterfaceSkeleton.
1504  *
1505  * Since: 2.30
1506  */
1507
1508
1509 /**
1510  * GDBusInterfaceSkeletonFlags:
1511  * @G_DBUS_INTERFACE_SKELETON_FLAGS_NONE: No flags set.
1512  * @G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD: Each method invocation is handled in a thread dedicated to the invocation. This means that the method implementation can use blocking IO without blocking any other part of the process. It also means that the method implementation must use locking to access data structures used by other threads.
1513  *
1514  * Flags describing the behavior of a #GDBusInterfaceSkeleton instance.
1515  *
1516  * Since: 2.30
1517  */
1518
1519
1520 /**
1521  * GDBusInterfaceVTable:
1522  * @method_call: Function for handling incoming method calls.
1523  * @get_property: Function for getting a property.
1524  * @set_property: Function for setting a property.
1525  *
1526  * Virtual table for handling properties and method calls for a D-Bus
1527  * interface.
1528  * If you want to handle getting/setting D-Bus properties asynchronously, simply
1529  * register an object with the <literal>org.freedesktop.DBus.Properties</literal>
1530  * D-Bus interface using g_dbus_connection_register_object().
1531  *
1532  * Since: 2.26
1533  */
1534
1535
1536 /**
1537  * GDBusMessage:
1538  *
1539  * The #GDBusMessage structure contains only private data and should
1540  * only be accessed using the provided API.
1541  *
1542  * Since: 2.26
1543  */
1544
1545
1546 /**
1547  * GDBusMessageByteOrder:
1548  * @G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN: The byte order is big endian.
1549  * @G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN: The byte order is little endian.
1550  *
1551  * Enumeration used to describe the byte order of a D-Bus message.
1552  *
1553  * Since: 2.26
1554  */
1555
1556
1557 /**
1558  * GDBusMessageClass:
1559  *
1560  * Class structure for #GDBusMessage.
1561  *
1562  * Since: 2.26
1563  */
1564
1565
1566 /**
1567  * GDBusMessageFilterFunction:
1568  * @connection: (transfer none): A #GDBusConnection.
1569  * @message: (transfer full): A locked #GDBusMessage that the filter function takes ownership of.
1570  * @incoming: %TRUE if it is a message received from the other peer, %FALSE if it is a message to be sent to the other peer.
1571  * @user_data: User data passed when adding the filter.
1572  *
1573  * Signature for function used in g_dbus_connection_add_filter().
1574  * A filter function is passed a #GDBusMessage and expected to return
1575  * a #GDBusMessage too. Passive filter functions that don't modify the
1576  * message can simply return the @message object:
1577  * |[
1578  * static GDBusMessage *
1579  * passive_filter (GDBusConnection *connection
1580  * GDBusMessage    *message,
1581  * gboolean         incoming,
1582  * gpointer         user_data)
1583  * {
1584  * /<!-- -->* inspect @message *<!-- -->/
1585  * return message;
1586  * }
1587  * ]|
1588  * Filter functions that wants to drop a message can simply return %NULL:
1589  * |[
1590  * static GDBusMessage *
1591  * drop_filter (GDBusConnection *connection
1592  * GDBusMessage    *message,
1593  * gboolean         incoming,
1594  * gpointer         user_data)
1595  * {
1596  * if (should_drop_message)
1597  * {
1598  * g_object_unref (message);
1599  * message = NULL;
1600  * }
1601  * return message;
1602  * }
1603  * ]|
1604  * Finally, a filter function may modify a message by copying it:
1605  * |[
1606  * static GDBusMessage *
1607  * modifying_filter (GDBusConnection *connection
1608  * GDBusMessage    *message,
1609  * gboolean         incoming,
1610  * gpointer         user_data)
1611  * {
1612  * GDBusMessage *copy;
1613  * GError *error;
1614  * error = NULL;
1615  * copy = g_dbus_message_copy (message, &error);
1616  * /<!-- -->* handle @error being is set *<!-- -->/
1617  * g_object_unref (message);
1618  * /<!-- -->* modify @copy *<!-- -->/
1619  * return copy;
1620  * }
1621  * ]|
1622  * If the returned #GDBusMessage is different from @message and cannot
1623  * be sent on @connection (it could use features, such as file
1624  * descriptors, not compatible with @connection), then a warning is
1625  * logged to <emphasis>standard error</emphasis>. Applications can
1626  * check this ahead of time using g_dbus_message_to_blob() passing a
1627  * #GDBusCapabilityFlags value obtained from @connection.
1628  * g_object_unref() or %NULL to drop the message. Passive filter
1629  * functions can simply return the passed @message object.
1630  *
1631  * Returns: (transfer full) (allow-none): A #GDBusMessage that will be freed with
1632  * Since: 2.26
1633  */
1634
1635
1636 /**
1637  * GDBusMessageFlags:
1638  * @G_DBUS_MESSAGE_FLAGS_NONE: No flags set.
1639  * @G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED: A reply is not expected.
1640  * @G_DBUS_MESSAGE_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this message.
1641  *
1642  * Message flags used in #GDBusMessage.
1643  *
1644  * Since: 2.26
1645  */
1646
1647
1648 /**
1649  * GDBusMessageHeaderField:
1650  * @G_DBUS_MESSAGE_HEADER_FIELD_INVALID: Not a valid header field.
1651  * @G_DBUS_MESSAGE_HEADER_FIELD_PATH: The object path.
1652  * @G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE: The interface name.
1653  * @G_DBUS_MESSAGE_HEADER_FIELD_MEMBER: The method or signal name.
1654  * @G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME: The name of the error that occurred.
1655  * @G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL: The serial number the message is a reply to.
1656  * @G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION: The name the message is intended for.
1657  * @G_DBUS_MESSAGE_HEADER_FIELD_SENDER: Unique name of the sender of the message (filled in by the bus).
1658  * @G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE: The signature of the message body.
1659  * @G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS: The number of UNIX file descriptors that accompany the message.
1660  *
1661  * Header fields used in #GDBusMessage.
1662  *
1663  * Since: 2.26
1664  */
1665
1666
1667 /**
1668  * GDBusMessageType:
1669  * @G_DBUS_MESSAGE_TYPE_INVALID: Message is of invalid type.
1670  * @G_DBUS_MESSAGE_TYPE_METHOD_CALL: Method call.
1671  * @G_DBUS_MESSAGE_TYPE_METHOD_RETURN: Method reply.
1672  * @G_DBUS_MESSAGE_TYPE_ERROR: Error reply.
1673  * @G_DBUS_MESSAGE_TYPE_SIGNAL: Signal emission.
1674  *
1675  * Message types used in #GDBusMessage.
1676  *
1677  * Since: 2.26
1678  */
1679
1680
1681 /**
1682  * GDBusMethodInfo:
1683  * @ref_count: The reference count or -1 if statically allocated.
1684  * @name: The name of the D-Bus method, e.g. @RequestName.
1685  * @in_args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no in arguments.
1686  * @out_args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no out arguments.
1687  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1688  *
1689  * Information about a method on an D-Bus interface.
1690  *
1691  * Since: 2.26
1692  */
1693
1694
1695 /**
1696  * GDBusMethodInvocation:
1697  *
1698  * The #GDBusMethodInvocation structure contains only private data and
1699  * should only be accessed using the provided API.
1700  *
1701  * Since: 2.26
1702  */
1703
1704
1705 /**
1706  * GDBusMethodInvocationClass:
1707  *
1708  * Class structure for #GDBusMethodInvocation.
1709  *
1710  * Since: 2.26
1711  */
1712
1713
1714 /**
1715  * GDBusNodeInfo:
1716  * @ref_count: The reference count or -1 if statically allocated.
1717  * @path: The path of the node or %NULL if omitted. Note that this may be a relative path. See the D-Bus specification for more details.
1718  * @interfaces: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces.
1719  * @nodes: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes.
1720  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1721  *
1722  * Information about nodes in a remote object hierarchy.
1723  *
1724  * Since: 2.26
1725  */
1726
1727
1728 /**
1729  * GDBusObject::interface-added:
1730  * @object: The #GDBusObject emitting the signal.
1731  * @interface: The #GDBusInterface that was added.
1732  *
1733  * Emitted when @interface is added to @object.
1734  *
1735  * Since: 2.30
1736  */
1737
1738
1739 /**
1740  * GDBusObject::interface-removed:
1741  * @object: The #GDBusObject emitting the signal.
1742  * @interface: The #GDBusInterface that was removed.
1743  *
1744  * Emitted when @interface is removed from @object.
1745  *
1746  * Since: 2.30
1747  */
1748
1749
1750 /**
1751  * GDBusObjectIface:
1752  * @parent_iface: The parent interface.
1753  * @get_object_path: Returns the object path. See g_dbus_object_get_object_path().
1754  * @get_interfaces: Returns all interfaces. See g_dbus_object_get_interfaces().
1755  * @get_interface: Returns an interface by name. See g_dbus_object_get_interface().
1756  * @interface_added: Signal handler for the #GDBusObject::interface-added signal.
1757  * @interface_removed: Signal handler for the #GDBusObject::interface-removed signal.
1758  *
1759  * Base object type for D-Bus objects.
1760  *
1761  * Since: 2.30
1762  */
1763
1764
1765 /**
1766  * GDBusObjectManager::interface-added:
1767  * @manager: The #GDBusObjectManager emitting the signal.
1768  * @object: The #GDBusObject on which an interface was added.
1769  * @interface: The #GDBusInterface that was added.
1770  *
1771  * Emitted when @interface is added to @object.
1772  * This signal exists purely as a convenience to avoid having to
1773  * connect signals to all objects managed by @manager.
1774  *
1775  * Since: 2.30
1776  */
1777
1778
1779 /**
1780  * GDBusObjectManager::interface-removed:
1781  * @manager: The #GDBusObjectManager emitting the signal.
1782  * @object: The #GDBusObject on which an interface was removed.
1783  * @interface: The #GDBusInterface that was removed.
1784  *
1785  * Emitted when @interface has been removed from @object.
1786  * This signal exists purely as a convenience to avoid having to
1787  * connect signals to all objects managed by @manager.
1788  *
1789  * Since: 2.30
1790  */
1791
1792
1793 /**
1794  * GDBusObjectManager::object-added:
1795  * @manager: The #GDBusObjectManager emitting the signal.
1796  * @object: The #GDBusObject that was added.
1797  *
1798  * Emitted when @object is added to @manager.
1799  *
1800  * Since: 2.30
1801  */
1802
1803
1804 /**
1805  * GDBusObjectManager::object-removed:
1806  * @manager: The #GDBusObjectManager emitting the signal.
1807  * @object: The #GDBusObject that was removed.
1808  *
1809  * Emitted when @object is removed from @manager.
1810  *
1811  * Since: 2.30
1812  */
1813
1814
1815 /**
1816  * GDBusObjectManagerClient:
1817  *
1818  * The #GDBusObjectManagerClient structure contains private data and should
1819  * only be accessed using the provided API.
1820  *
1821  * Since: 2.30
1822  */
1823
1824
1825 /**
1826  * GDBusObjectManagerClient::interface-proxy-properties-changed:
1827  * @manager: The #GDBusObjectManagerClient emitting the signal.
1828  * @object_proxy: The #GDBusObjectProxy on which an interface has properties that are changing.
1829  * @interface_proxy: The #GDBusProxy that has properties that are changing.
1830  * @changed_properties: A #GVariant containing the properties that changed.
1831  * @invalidated_properties: A %NULL terminated array of properties that was invalidated.
1832  *
1833  * Emitted when one or more D-Bus properties on proxy changes. The
1834  * local cache has already been updated when this signal fires. Note
1835  * that both @changed_properties and @invalidated_properties are
1836  * guaranteed to never be %NULL (either may be empty though).
1837  * This signal exists purely as a convenience to avoid having to
1838  * connect signals to all interface proxies managed by @manager.
1839  * This signal is emitted in the
1840  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
1841  * that @manager was constructed in.
1842  *
1843  * Since: 2.30
1844  */
1845
1846
1847 /**
1848  * GDBusObjectManagerClient::interface-proxy-signal:
1849  * @manager: The #GDBusObjectManagerClient emitting the signal.
1850  * @object_proxy: The #GDBusObjectProxy on which an interface is emitting a D-Bus signal.
1851  * @interface_proxy: The #GDBusProxy that is emitting a D-Bus signal.
1852  * @sender_name: The sender of the signal or NULL if the connection is not a bus connection.
1853  * @signal_name: The signal name.
1854  * @parameters: A #GVariant tuple with parameters for the signal.
1855  *
1856  * Emitted when a D-Bus signal is received on @interface_proxy.
1857  * This signal exists purely as a convenience to avoid having to
1858  * connect signals to all interface proxies managed by @manager.
1859  * This signal is emitted in the
1860  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
1861  * that @manager was constructed in.
1862  *
1863  * Since: 2.30
1864  */
1865
1866
1867 /**
1868  * GDBusObjectManagerClient:bus-type:
1869  *
1870  * If this property is not %G_BUS_TYPE_NONE, then
1871  * #GDBusObjectManagerClient:connection must be %NULL and will be set to the
1872  * #GDBusConnection obtained by calling g_bus_get() with the value
1873  * of this property.
1874  *
1875  * Since: 2.30
1876  */
1877
1878
1879 /**
1880  * GDBusObjectManagerClient:connection:
1881  *
1882  * The #GDBusConnection to use.
1883  *
1884  * Since: 2.30
1885  */
1886
1887
1888 /**
1889  * GDBusObjectManagerClient:flags:
1890  *
1891  * Flags from the #GDBusObjectManagerClientFlags enumeration.
1892  *
1893  * Since: 2.30
1894  */
1895
1896
1897 /**
1898  * GDBusObjectManagerClient:get-proxy-type-destroy-notify:
1899  *
1900  * A #GDestroyNotify for the #gpointer user_data in #GDBusObjectManagerClient:get-proxy-type-user-data.
1901  *
1902  * Since: 2.30
1903  */
1904
1905
1906 /**
1907  * GDBusObjectManagerClient:get-proxy-type-func:
1908  *
1909  * The #GDBusProxyTypeFunc to use when determining what #GType to
1910  * use for interface proxies or %NULL.
1911  *
1912  * Since: 2.30
1913  */
1914
1915
1916 /**
1917  * GDBusObjectManagerClient:get-proxy-type-user-data:
1918  *
1919  * The #gpointer user_data to pass to #GDBusObjectManagerClient:get-proxy-type-func.
1920  *
1921  * Since: 2.30
1922  */
1923
1924
1925 /**
1926  * GDBusObjectManagerClient:name:
1927  *
1928  * The well-known name or unique name that the manager is for.
1929  *
1930  * Since: 2.30
1931  */
1932
1933
1934 /**
1935  * GDBusObjectManagerClient:name-owner:
1936  *
1937  * The unique name that owns #GDBusObjectManagerClient:name or %NULL if
1938  * no-one is currently owning the name. Connect to the
1939  * #GObject::notify signal to track changes to this property.
1940  *
1941  * Since: 2.30
1942  */
1943
1944
1945 /**
1946  * GDBusObjectManagerClient:object-path:
1947  *
1948  * The object path the manager is for.
1949  *
1950  * Since: 2.30
1951  */
1952
1953
1954 /**
1955  * GDBusObjectManagerClientClass:
1956  * @parent_class: The parent class.
1957  * @interface_proxy_signal: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-signal signal.
1958  * @interface_proxy_properties_changed: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-properties-changed signal.
1959  *
1960  * Class structure for #GDBusObjectManagerClient.
1961  *
1962  * Since: 2.30
1963  */
1964
1965
1966 /**
1967  * GDBusObjectManagerClientFlags:
1968  * @G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE: No flags set.
1969  * @G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START: If not set and the manager is for a well-known name, then request the bus to launch an owner for the name if no-one owns the name. This flag can only be used in managers for well-known names.
1970  *
1971  * Flags used when constructing a #GDBusObjectManagerClient.
1972  *
1973  * Since: 2.30
1974  */
1975
1976
1977 /**
1978  * GDBusObjectManagerIface:
1979  * @parent_iface: The parent interface.
1980  * @get_object_path: Virtual function for g_dbus_object_manager_get_object_path().
1981  * @get_objects: Virtual function for g_dbus_object_manager_get_objects().
1982  * @get_object: Virtual function for g_dbus_object_manager_get_object().
1983  * @get_interface: Virtual function for g_dbus_object_manager_get_interface().
1984  * @object_added: Signal handler for the #GDBusObjectManager::object-added signal.
1985  * @object_removed: Signal handler for the #GDBusObjectManager::object-removed signal.
1986  * @interface_added: Signal handler for the #GDBusObjectManager::interface-added signal.
1987  * @interface_removed: Signal handler for the #GDBusObjectManager::interface-removed signal.
1988  *
1989  * Base type for D-Bus object managers.
1990  *
1991  * Since: 2.30
1992  */
1993
1994
1995 /**
1996  * GDBusObjectManagerServer:
1997  *
1998  * The #GDBusObjectManagerServer structure contains private data and should
1999  * only be accessed using the provided API.
2000  *
2001  * Since: 2.30
2002  */
2003
2004
2005 /**
2006  * GDBusObjectManagerServer:connection:
2007  *
2008  * The #GDBusConnection to export objects on.
2009  *
2010  * Since: 2.30
2011  */
2012
2013
2014 /**
2015  * GDBusObjectManagerServer:object-path:
2016  *
2017  * The object path to register the manager object at.
2018  *
2019  * Since: 2.30
2020  */
2021
2022
2023 /**
2024  * GDBusObjectManagerServerClass:
2025  * @parent_class: The parent class.
2026  *
2027  * Class structure for #GDBusObjectManagerServer.
2028  *
2029  * Since: 2.30
2030  */
2031
2032
2033 /**
2034  * GDBusObjectProxy:
2035  *
2036  * The #GDBusObjectProxy structure contains private data and should
2037  * only be accessed using the provided API.
2038  *
2039  * Since: 2.30
2040  */
2041
2042
2043 /**
2044  * GDBusObjectProxy:connection:
2045  *
2046  * The connection of the proxy.
2047  *
2048  * Since: 2.30
2049  */
2050
2051
2052 /**
2053  * GDBusObjectProxy:object-path:
2054  *
2055  * The object path of the proxy.
2056  *
2057  * Since: 2.30
2058  */
2059
2060
2061 /**
2062  * GDBusObjectProxyClass:
2063  * @parent_class: The parent class.
2064  *
2065  * Class structure for #GDBusObjectProxy.
2066  *
2067  * Since: 2.30
2068  */
2069
2070
2071 /**
2072  * GDBusObjectSkeleton:
2073  *
2074  * The #GDBusObjectSkeleton structure contains private data and should only be
2075  * accessed using the provided API.
2076  *
2077  * Since: 2.30
2078  */
2079
2080
2081 /**
2082  * GDBusObjectSkeleton::authorize-method:
2083  * @object: The #GDBusObjectSkeleton emitting the signal.
2084  * @interface: The #GDBusInterfaceSkeleton that @invocation is for.
2085  * @invocation: A #GDBusMethodInvocation.
2086  *
2087  * Emitted when a method is invoked by a remote caller and used to
2088  * determine if the method call is authorized.
2089  * This signal is like #GDBusInterfaceSkeleton<!-- -->'s
2090  * #GDBusInterfaceSkeleton::g-authorize-method signal, except that it is
2091  * for the enclosing object.
2092  * The default class handler just returns %TRUE.
2093  *
2094  * Returns: %TRUE if the call is authorized, %FALSE otherwise.
2095  * Since: 2.30
2096  */
2097
2098
2099 /**
2100  * GDBusObjectSkeleton:object-path:
2101  *
2102  * The object path where the object is exported.
2103  *
2104  * Since: 2.30
2105  */
2106
2107
2108 /**
2109  * GDBusObjectSkeletonClass:
2110  * @parent_class: The parent class.
2111  * @authorize_method: Signal class handler for the #GDBusObjectSkeleton::authorize-method signal.
2112  *
2113  * Class structure for #GDBusObjectSkeleton.
2114  *
2115  * Since: 2.30
2116  */
2117
2118
2119 /**
2120  * GDBusPropertyInfo:
2121  * @ref_count: The reference count or -1 if statically allocated.
2122  * @name: The name of the D-Bus property, e.g. "SupportedFilesystems".
2123  * @signature: The D-Bus signature of the property (a single complete type).
2124  * @flags: Access control flags for the property.
2125  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
2126  *
2127  * Information about a D-Bus property on a D-Bus interface.
2128  *
2129  * Since: 2.26
2130  */
2131
2132
2133 /**
2134  * GDBusPropertyInfoFlags:
2135  * @G_DBUS_PROPERTY_INFO_FLAGS_NONE: No flags set.
2136  * @G_DBUS_PROPERTY_INFO_FLAGS_READABLE: Property is readable.
2137  * @G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE: Property is writable.
2138  *
2139  * Flags describing the access control of a D-Bus property.
2140  *
2141  * Since: 2.26
2142  */
2143
2144
2145 /**
2146  * GDBusProxy:
2147  *
2148  * The #GDBusProxy structure contains only private data and
2149  * should only be accessed using the provided API.
2150  *
2151  * Since: 2.26
2152  */
2153
2154
2155 /**
2156  * GDBusProxy::g-properties-changed:
2157  * @proxy: The #GDBusProxy emitting the signal.
2158  * @changed_properties: A #GVariant containing the properties that changed
2159  * @invalidated_properties: A %NULL terminated array of properties that was invalidated
2160  *
2161  * Emitted when one or more D-Bus properties on @proxy changes. The
2162  * local cache has already been updated when this signal fires. Note
2163  * that both @changed_properties and @invalidated_properties are
2164  * guaranteed to never be %NULL (either may be empty though).
2165  * This signal corresponds to the
2166  * <literal>PropertiesChanged</literal> D-Bus signal on the
2167  * <literal>org.freedesktop.DBus.Properties</literal> interface.
2168  *
2169  * Since: 2.26
2170  */
2171
2172
2173 /**
2174  * GDBusProxy::g-signal:
2175  * @proxy: The #GDBusProxy emitting the signal.
2176  * @sender_name: The sender of the signal or %NULL if the connection is not a bus connection.
2177  * @signal_name: The name of the signal.
2178  * @parameters: A #GVariant tuple with parameters for the signal.
2179  *
2180  * Emitted when a signal from the remote object and interface that @proxy is for, has been received.
2181  *
2182  * Since: 2.26
2183  */
2184
2185
2186 /**
2187  * GDBusProxy:g-bus-type:
2188  *
2189  * If this property is not %G_BUS_TYPE_NONE, then
2190  * #GDBusProxy:g-connection must be %NULL and will be set to the
2191  * #GDBusConnection obtained by calling g_bus_get() with the value
2192  * of this property.
2193  *
2194  * Since: 2.26
2195  */
2196
2197
2198 /**
2199  * GDBusProxy:g-connection:
2200  *
2201  * The #GDBusConnection the proxy is for.
2202  *
2203  * Since: 2.26
2204  */
2205
2206
2207 /**
2208  * GDBusProxy:g-default-timeout:
2209  *
2210  * The timeout to use if -1 (specifying default timeout) is passed
2211  * as @timeout_msec in the g_dbus_proxy_call() and
2212  * g_dbus_proxy_call_sync() functions.
2213  * This allows applications to set a proxy-wide timeout for all
2214  * remote method invocations on the proxy. If this property is -1,
2215  * the default timeout (typically 25 seconds) is used. If set to
2216  * %G_MAXINT, then no timeout is used.
2217  *
2218  * Since: 2.26
2219  */
2220
2221
2222 /**
2223  * GDBusProxy:g-flags:
2224  *
2225  * Flags from the #GDBusProxyFlags enumeration.
2226  *
2227  * Since: 2.26
2228  */
2229
2230
2231 /**
2232  * GDBusProxy:g-interface-info:
2233  *
2234  * Ensure that interactions with this proxy conform to the given
2235  * interface.  For example, when completing a method call, if the
2236  * type signature of the message isn't what's expected, the given
2237  * #GError is set.  Signals that have a type signature mismatch are
2238  * simply dropped.
2239  *
2240  * Since: 2.26
2241  */
2242
2243
2244 /**
2245  * GDBusProxy:g-interface-name:
2246  *
2247  * The D-Bus interface name the proxy is for.
2248  *
2249  * Since: 2.26
2250  */
2251
2252
2253 /**
2254  * GDBusProxy:g-name:
2255  *
2256  * The well-known or unique name that the proxy is for.
2257  *
2258  * Since: 2.26
2259  */
2260
2261
2262 /**
2263  * GDBusProxy:g-name-owner:
2264  *
2265  * The unique name that owns #GDBusProxy:name or %NULL if no-one
2266  * currently owns that name. You may connect to #GObject::notify signal to
2267  * track changes to this property.
2268  *
2269  * Since: 2.26
2270  */
2271
2272
2273 /**
2274  * GDBusProxy:g-object-path:
2275  *
2276  * The object path the proxy is for.
2277  *
2278  * Since: 2.26
2279  */
2280
2281
2282 /**
2283  * GDBusProxyClass:
2284  * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal.
2285  * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal.
2286  *
2287  * Class structure for #GDBusProxy.
2288  *
2289  * Since: 2.26
2290  */
2291
2292
2293 /**
2294  * GDBusProxyFlags:
2295  * @G_DBUS_PROXY_FLAGS_NONE: No flags set.
2296  * @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties.
2297  * @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object.
2298  * @G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START: If not set and the proxy if for a well-known name, then request the bus to launch an owner for the name if no-one owns the name. This flag can only be used in proxies for well-known names.
2299  *
2300  * Flags used when constructing an instance of a #GDBusProxy derived class.
2301  *
2302  * Since: 2.26
2303  */
2304
2305
2306 /**
2307  * GDBusProxyTypeFunc:
2308  * @manager: A #GDBusObjectManagerClient.
2309  * @object_path: The object path of the remote object.
2310  * @interface_name: (allow-none): The interface name of the remote object or %NULL if a #GDBusObjectProxy #GType is requested.
2311  * @user_data: User data.
2312  *
2313  * Function signature for a function used to determine the #GType to
2314  * use for an interface proxy (if @interface_name is not %NULL) or
2315  * object proxy (if @interface_name is %NULL).
2316  * This function is called in the
2317  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
2318  * that @manager was constructed in.
2319  * must be a #GDBusProxy<!-- -->- or #GDBusObjectProxy<!-- -->-derived
2320  * type.
2321  *
2322  * Returns: A #GType to use for the remote object. The returned type
2323  * Since: 2.30
2324  */
2325
2326
2327 /**
2328  * GDBusSendMessageFlags:
2329  * @G_DBUS_SEND_MESSAGE_FLAGS_NONE: No flags set.
2330  * @G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL: Do not automatically assign a serial number from the #GDBusConnection object when sending a message.
2331  *
2332  * Flags used when sending #GDBusMessage<!-- -->s on a #GDBusConnection.
2333  *
2334  * Since: 2.26
2335  */
2336
2337
2338 /**
2339  * GDBusServer:
2340  *
2341  * The #GDBusServer structure contains only private data and
2342  * should only be accessed using the provided API.
2343  *
2344  * Since: 2.26
2345  */
2346
2347
2348 /**
2349  * GDBusServer::new-connection:
2350  * @server: The #GDBusServer emitting the signal.
2351  * @connection: A #GDBusConnection for the new connection.
2352  *
2353  * Emitted when a new authenticated connection has been made. Use
2354  * g_dbus_connection_get_peer_credentials() to figure out what
2355  * identity (if any), was authenticated.
2356  * If you want to accept the connection, take a reference to the
2357  * connection call g_dbus_connection_close() and give up your
2358  * reference. Note that the other peer may disconnect at any time -
2359  * a typical thing to do when accepting a connection is to listen to
2360  * the #GDBusConnection::closed signal.
2361  * If #GDBusServer:flags contains %G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
2362  * then the signal is emitted in a new thread dedicated to the
2363  * connection. Otherwise the signal is emitted in the <link
2364  * linkend="g-main-context-push-thread-default">thread-default main
2365  * loop</link> of the thread that @server was constructed in.
2366  * You are guaranteed that signal handlers for this signal runs
2367  * before incoming messages on @connection are processed. This means
2368  * that it's suitable to call g_dbus_connection_register_object() or
2369  * similar from the signal handler.
2370  * run.
2371  *
2372  * Returns: %TRUE to claim @connection, %FALSE to let other handlers
2373  * Since: 2.26
2374  */
2375
2376
2377 /**
2378  * GDBusServer:active:
2379  *
2380  * Whether the server is currently active.
2381  *
2382  * Since: 2.26
2383  */
2384
2385
2386 /**
2387  * GDBusServer:address:
2388  *
2389  * The D-Bus address to listen on.
2390  *
2391  * Since: 2.26
2392  */
2393
2394
2395 /**
2396  * GDBusServer:authentication-observer:
2397  *
2398  * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
2399  *
2400  * Since: 2.26
2401  */
2402
2403
2404 /**
2405  * GDBusServer:client-address:
2406  *
2407  * The D-Bus address that clients can use.
2408  *
2409  * Since: 2.26
2410  */
2411
2412
2413 /**
2414  * GDBusServer:flags:
2415  *
2416  * Flags from the #GDBusServerFlags enumeration.
2417  *
2418  * Since: 2.26
2419  */
2420
2421
2422 /**
2423  * GDBusServer:guid:
2424  *
2425  * The guid of the server.
2426  *
2427  * Since: 2.26
2428  */
2429
2430
2431 /**
2432  * GDBusServerClass:
2433  * @new_connection: Signal class handler for the #GDBusServer::new-connection signal.
2434  *
2435  * Class structure for #GDBusServer.
2436  *
2437  * Since: 2.26
2438  */
2439
2440
2441 /**
2442  * GDBusServerFlags:
2443  * @G_DBUS_SERVER_FLAGS_NONE: No flags set.
2444  * @G_DBUS_SERVER_FLAGS_RUN_IN_THREAD: All #GDBusServer::new-connection signals will run in separated dedicated threads (see signal for details).
2445  * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: Allow the anonymous authentication method.
2446  *
2447  * Flags used when creating a #GDBusServer.
2448  *
2449  * Since: 2.26
2450  */
2451
2452
2453 /**
2454  * GDBusSignalCallback:
2455  * @connection: A #GDBusConnection.
2456  * @sender_name: The unique bus name of the sender of the signal.
2457  * @object_path: The object path that the signal was emitted on.
2458  * @interface_name: The name of the interface.
2459  * @signal_name: The name of the signal.
2460  * @parameters: A #GVariant tuple with parameters for the signal.
2461  * @user_data: User data passed when subscribing to the signal.
2462  *
2463  * Signature for callback function used in g_dbus_connection_signal_subscribe().
2464  *
2465  * Since: 2.26
2466  */
2467
2468
2469 /**
2470  * GDBusSignalFlags:
2471  * @G_DBUS_SIGNAL_FLAGS_NONE: No flags set.
2472  * @G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE: Don't actually send the AddMatch D-Bus call for this signal subscription.  This gives you more control over which match rules you add (but you must add them manually).
2473  *
2474  * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe().
2475  *
2476  * Since: 2.26
2477  */
2478
2479
2480 /**
2481  * GDBusSignalInfo:
2482  * @ref_count: The reference count or -1 if statically allocated.
2483  * @name: The name of the D-Bus signal, e.g. "NameOwnerChanged".
2484  * @args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments.
2485  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
2486  *
2487  * Information about a signal on a D-Bus interface.
2488  *
2489  * Since: 2.26
2490  */
2491
2492
2493 /**
2494  * GDBusSubtreeDispatchFunc:
2495  * @connection: A #GDBusConnection.
2496  * @sender: The unique bus name of the remote caller.
2497  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2498  * @interface_name: The D-Bus interface name that the method call or property access is for.
2499  * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
2500  * @out_user_data: Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL).
2501  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2502  *
2503  * The type of the @dispatch function in #GDBusSubtreeVTable.
2504  * Subtrees are flat.  @node, if non-%NULL, is always exactly one
2505  *
2506  * Segment of the object path (ie: it never contains a slash).
2507  * Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.
2508  * Since: 2.26
2509  */
2510
2511
2512 /**
2513  * GDBusSubtreeEnumerateFunc:
2514  * @connection: A #GDBusConnection.
2515  * @sender: The unique bus name of the remote caller.
2516  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2517  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2518  *
2519  * The type of the @enumerate function in #GDBusSubtreeVTable.
2520  * This function is called when generating introspection data and also
2521  * when preparing to dispatch incoming messages in the event that the
2522  * %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not
2523  * Hierarchies are not supported; the items that you return should not
2524  * contain the '/' character.
2525  * The return value will be freed with g_strfreev().
2526  *
2527  * Specified (ie: to verify that the object path is valid).
2528  * Returns: A newly allocated array of strings for node names that are children of @object_path.
2529  * Since: 2.26
2530  */
2531
2532
2533 /**
2534  * GDBusSubtreeFlags:
2535  * @G_DBUS_SUBTREE_FLAGS_NONE: No flags set.
2536  * @G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES: Method calls to objects not in the enumerated range will still be dispatched. This is useful if you want to dynamically spawn objects in the subtree.
2537  *
2538  * Flags passed to g_dbus_connection_register_subtree().
2539  *
2540  * Since: 2.26
2541  */
2542
2543
2544 /**
2545  * GDBusSubtreeIntrospectFunc:
2546  * @connection: A #GDBusConnection.
2547  * @sender: The unique bus name of the remote caller.
2548  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2549  * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
2550  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2551  *
2552  * The type of the @introspect function in #GDBusSubtreeVTable.
2553  * Subtrees are flat.  @node, if non-%NULL, is always exactly one
2554  * This function should return %NULL to indicate that there is no object
2555  * at this node.
2556  * If this function returns non-%NULL, the return value is expected to
2557  * be a %NULL-terminated array of pointers to #GDBusInterfaceInfo
2558  * structures describing the interfaces implemented by @node.  This
2559  * array will have g_dbus_interface_info_unref() called on each item
2560  * before being freed with g_free().
2561  * The difference between returning %NULL and an array containing zero
2562  * items is that the standard DBus interfaces will returned to the
2563  * remote introspector in the empty array case, but not in the %NULL
2564  * case.
2565  *
2566  * Segment of the object path (ie: it never contains a slash).
2567  * Returns: A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL.
2568  * Since: 2.26
2569  */
2570
2571
2572 /**
2573  * GDBusSubtreeVTable:
2574  * @enumerate: Function for enumerating child nodes.
2575  * @introspect: Function for introspecting a child node.
2576  * @dispatch: Function for dispatching a remote call on a child node.
2577  *
2578  * Virtual table for handling subtrees registered with g_dbus_connection_register_subtree().
2579  *
2580  * Since: 2.26
2581  */
2582
2583
2584 /**
2585  * GDataInputStream:
2586  *
2587  * An implementation of #GBufferedInputStream that allows for high-level
2588  * data manipulation of arbitrary data (including binary operations).
2589  */
2590
2591
2592 /**
2593  * GDataOutputStream:
2594  *
2595  * An implementation of #GBufferedOutputStream that allows for high-level
2596  * data manipulation of arbitrary data (including binary operations).
2597  */
2598
2599
2600 /**
2601  * GDataOutputStream:byte-order:
2602  *
2603  * Determines the byte ordering that is used when writing
2604  * multi-byte entities (such as integers) to the stream.
2605  */
2606
2607
2608 /**
2609  * GDataStream:byte-order:
2610  *
2611  * The ::byte-order property determines the byte ordering that
2612  * is used when reading multi-byte entities (such as integers)
2613  * from the stream.
2614  */
2615
2616
2617 /**
2618  * GDataStream:newline-type:
2619  *
2620  * The :newline-type property determines what is considered
2621  * as a line ending when reading complete lines from the stream.
2622  */
2623
2624
2625 /**
2626  * GDataStreamByteOrder:
2627  * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order.
2628  * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order.
2629  * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture.
2630  *
2631  * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources
2632  * across various machine architectures.
2633  */
2634
2635
2636 /**
2637  * GDataStreamNewlineType:
2638  * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms.
2639  * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings.
2640  * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows.
2641  * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type.
2642  *
2643  * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file.
2644  */
2645
2646
2647 /**
2648  * GDateTime:
2649  *
2650  * <structname>GDateTime</structname> is an opaque structure whose members
2651  * cannot be accessed directly.
2652  *
2653  * Since: 2.26
2654  */
2655
2656
2657 /**
2658  * GDebugKey:
2659  * @key: the string
2660  * @value: the flag
2661  *
2662  * Associates a string with a bit flag.
2663  * Used in g_parse_debug_string().
2664  */
2665
2666
2667 /**
2668  * GDesktopAppInfo:
2669  *
2670  * Information about an installed application from a desktop file.
2671  */
2672
2673
2674 /**
2675  * GDesktopAppInfo:filename:
2676  *
2677  * The origin filename of this #GDesktopAppInfo
2678  */
2679
2680
2681 /**
2682  * GDrive:
2683  *
2684  * Opaque drive object.
2685  */
2686
2687
2688 /**
2689  * GDrive::changed:
2690  * @drive: a #GDrive.
2691  *
2692  * Emitted when the drive's state has changed.
2693  */
2694
2695
2696 /**
2697  * GDrive::disconnected:
2698  * @drive: a #GDrive.
2699  *
2700  * This signal is emitted when the #GDrive have been
2701  * disconnected. If the recipient is holding references to the
2702  * object they should release them so the object can be
2703  * finalized.
2704  */
2705
2706
2707 /**
2708  * GDrive::eject-button:
2709  * @drive: a #GDrive.
2710  *
2711  * Emitted when the physical eject button (if any) of a drive has
2712  * been pressed.
2713  */
2714
2715
2716 /**
2717  * GDrive::stop-button:
2718  * @drive: a #GDrive.
2719  *
2720  * Emitted when the physical stop button (if any) of a drive has
2721  * been pressed.
2722  *
2723  * Since: 2.22
2724  */
2725
2726
2727 /**
2728  * GDriveIface:
2729  * @g_iface: The parent interface.
2730  * @changed: Signal emitted when the drive is changed.
2731  * @disconnected: The removed signal that is emitted when the #GDrive have been disconnected. If the recipient is holding references to the object they should release them so the object can be finalized.
2732  * @eject_button: Signal emitted when the physical eject button (if any) of a drive have been pressed.
2733  * @get_name: Returns the name for the given #GDrive.
2734  * @get_icon: Returns a #GIcon for the given #GDrive.
2735  * @has_volumes: Returns %TRUE if the #GDrive has mountable volumes.
2736  * @get_volumes: Returns a list #GList of #GVolume for the #GDrive.
2737  * @is_media_removable: Returns %TRUE if the #GDrive supports removal and insertion of media.
2738  * @has_media: Returns %TRUE if the #GDrive has media inserted.
2739  * @is_media_check_automatic: Returns %TRUE if the #GDrive is capabable of automatically detecting media changes.
2740  * @can_poll_for_media: Returns %TRUE if the #GDrive is capable of manually polling for media change.
2741  * @can_eject: Returns %TRUE if the #GDrive can eject media.
2742  * @eject: Ejects a #GDrive.
2743  * @eject_finish: Finishes an eject operation.
2744  * @poll_for_media: Poll for media insertion/removal on a #GDrive.
2745  * @poll_for_media_finish: Finishes a media poll operation.
2746  * @get_identifier: Returns the identifier of the given kind, or %NULL if the #GDrive doesn't have one.
2747  * @enumerate_identifiers: Returns an array strings listing the kinds of identifiers which the #GDrive has.
2748  * @get_start_stop_type: Gets a #GDriveStartStopType with details about starting/stopping the drive. Since 2.22.
2749  * @can_stop: Returns %TRUE if a #GDrive can be stopped. Since 2.22.
2750  * @stop: Stops a #GDrive. Since 2.22.
2751  * @stop_finish: Finishes a stop operation. Since 2.22.
2752  * @can_start: Returns %TRUE if a #GDrive can be started. Since 2.22.
2753  * @can_start_degraded: Returns %TRUE if a #GDrive can be started degraded. Since 2.22.
2754  * @start: Starts a #GDrive. Since 2.22.
2755  * @start_finish: Finishes a start operation. Since 2.22.
2756  * @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.
2757  * @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22.
2758  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
2759  *
2760  * Interface for creating #GDrive implementations.
2761  */
2762
2763
2764 /**
2765  * GDriveStartFlags:
2766  * @G_DRIVE_START_NONE: No flags set.
2767  *
2768  * Flags used when starting a drive.
2769  *
2770  * Since: 2.22
2771  */
2772
2773
2774 /**
2775  * GDriveStartStopType:
2776  * @G_DRIVE_START_STOP_TYPE_UNKNOWN: Unknown or drive doesn't support start/stop.
2777  * @G_DRIVE_START_STOP_TYPE_SHUTDOWN: The stop method will physically shut down the drive and e.g. power down the port the drive is attached to.
2778  * @G_DRIVE_START_STOP_TYPE_NETWORK: The start/stop methods are used for connecting/disconnect to the drive over the network.
2779  * @G_DRIVE_START_STOP_TYPE_MULTIDISK: The start/stop methods will assemble/disassemble a virtual drive from several physical drives.
2780  * @G_DRIVE_START_STOP_TYPE_PASSWORD: The start/stop methods will unlock/lock the disk (for example using the ATA <quote>SECURITY UNLOCK DEVICE</quote> command)
2781  *
2782  * Enumeration describing how a drive can be started/stopped.
2783  *
2784  * Since: 2.22
2785  */
2786
2787
2788 /**
2789  * GEmblem:
2790  *
2791  * An object for Emblems
2792  */
2793
2794
2795 /**
2796  * GEmblemOrigin:
2797  * @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin
2798  * @G_EMBLEM_ORIGIN_DEVICE: Emblem adds device-specific information
2799  * @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly"
2800  * @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)
2801  *
2802  * GEmblemOrigin is used to add information about the origin of the emblem
2803  * to #GEmblem.
2804  *
2805  * Since: 2.18
2806  */
2807
2808
2809 /**
2810  * GEmblemedIcon:
2811  *
2812  * An implementation of #GIcon for icons with emblems.
2813  */
2814
2815
2816 /**
2817  * GEnumClass:
2818  * @g_type_class: the parent class
2819  * @minimum: the smallest possible value.
2820  * @maximum: the largest possible value.
2821  * @n_values: the number of possible values.
2822  * @values: an array of #GEnumValue structs describing the individual values.
2823  *
2824  * The class of an enumeration type holds information about its
2825  * possible values.
2826  */
2827
2828
2829 /**
2830  * GEnumValue:
2831  * @value: the enum value
2832  * @value_name: the name of the value
2833  * @value_nick: the nickname of the value
2834  *
2835  * A structure which contains a single enum value, its name, and its
2836  * nickname.
2837  */
2838
2839
2840 /**
2841  * GFile:
2842  *
2843  * A handle to an object implementing the #GFileIface interface.
2844  * Generally stores a location within the file system. Handles do not
2845  * necessarily represent files or directories that currently exist.
2846  */
2847
2848
2849 /**
2850  * GFileAttributeInfo:
2851  * @name: the name of the attribute.
2852  * @type: the #GFileAttributeType type of the attribute.
2853  * @flags: a set of #GFileAttributeInfoFlags.
2854  *
2855  * Information about a specific attribute.
2856  */
2857
2858
2859 /**
2860  * GFileAttributeInfoFlags:
2861  * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set.
2862  * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied.
2863  * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved.
2864  *
2865  * Flags specifying the behaviour of an attribute.
2866  */
2867
2868
2869 /**
2870  * GFileAttributeInfoList:
2871  * @infos: an array of #GFileAttributeInfo<!-- -->s.
2872  * @n_infos: the number of values in the array.
2873  *
2874  * Acts as a lightweight registry for possible valid file attributes.
2875  * The registry stores Key-Value pair formats as #GFileAttributeInfo<!-- -->s.
2876  */
2877
2878
2879 /**
2880  * GFileAttributeMatcher:
2881  *
2882  * Determines if a string matches a file attribute.
2883  */
2884
2885
2886 /**
2887  * GFileAttributeStatus:
2888  * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty).
2889  * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set.
2890  * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value.
2891  *
2892  * Used by g_file_set_attributes_from_info() when setting file attributes.
2893  */
2894
2895
2896 /**
2897  * GFileAttributeType:
2898  * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitalized type.
2899  * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string.
2900  * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes.
2901  * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value.
2902  * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer.
2903  * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer.
2904  * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer.
2905  * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer.
2906  * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject.
2907  * @G_FILE_ATTRIBUTE_TYPE_STRINGV: a %NULL terminated char **. Since 2.22
2908  *
2909  * The data types for file attributes.
2910  */
2911
2912
2913 /**
2914  * GFileCopyFlags:
2915  * @G_FILE_COPY_NONE: No flags set.
2916  * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
2917  * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
2918  * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
2919  * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
2920  * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
2921  * @G_FILE_COPY_TARGET_DEFAULT_PERMS: Leaves target file with default perms, instead of setting the source file perms.
2922  *
2923  * Flags used when copying or moving files.
2924  */
2925
2926
2927 /**
2928  * GFileCreateFlags:
2929  * @G_FILE_CREATE_NONE: No flags set.
2930  * @G_FILE_CREATE_PRIVATE: Create a file that can only be accessed by the current user.
2931  * @G_FILE_CREATE_REPLACE_DESTINATION: Replace the destination as if it didn't exist before. Don't try to keep any old permissions, replace instead of following links. This is generally useful if you're doing a "copy over" rather than a "save new version of" replace operation. You can think of it as "unlink destination" before writing to it, although the implementation may not be exactly like that. Since 2.20
2932  *
2933  * Flags used when an operation may create a file.
2934  */
2935
2936
2937 /**
2938  * GFileEnumerator:
2939  *
2940  * A per matched file iterator.
2941  */
2942
2943
2944 /**
2945  * GFileIOStream:
2946  *
2947  * A subclass of GIOStream for opened files. This adds
2948  * a few file-specific operations and seeking and truncating.
2949  * #GFileIOStream implements GSeekable.
2950  */
2951
2952
2953 /**
2954  * GFileIcon:
2955  *
2956  * Gets an icon for a #GFile. Implements #GLoadableIcon.
2957  */
2958
2959
2960 /**
2961  * GFileIcon:file:
2962  *
2963  * The file containing the icon.
2964  */
2965
2966
2967 /**
2968  * GFileIface:
2969  * @g_iface: The parent interface.
2970  * @dup: Duplicates a #GFile.
2971  * @hash: Creates a hash of a #GFile.
2972  * @equal: Checks equality of two given #GFile<!-- -->s.
2973  * @is_native: Checks to see if a file is native to the system.
2974  * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
2975  * @get_uri_scheme: Gets the URI scheme for a #GFile.
2976  * @get_basename: Gets the basename for a given #GFile.
2977  * @get_path: Gets the current path within a #GFile.
2978  * @get_uri: Gets a URI for the path within a #GFile.
2979  * @get_parse_name: Gets the parsed name for the #GFile.
2980  * @get_parent: Gets the parent directory for the #GFile.
2981  * @prefix_matches: Checks whether a #GFile contains a specified file.
2982  * @get_relative_path: Gets the path for a #GFile relative to a given path.
2983  * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
2984  * @get_child_for_display_name: Gets the child #GFile for a given display name.
2985  * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
2986  * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
2987  * @enumerate_children_finish: Finishes asynchronously enumerating the children.
2988  * @query_info: Gets the #GFileInfo for a #GFile.
2989  * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
2990  * @query_info_finish: Finishes an asynchronous query info operation.
2991  * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
2992  * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
2993  * @query_filesystem_info_finish: Finishes asynchronously getting the file system info.
2994  * @find_enclosing_mount: Gets a #GMount for the #GFile.
2995  * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
2996  * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
2997  * @set_display_name: Sets the display name for a #GFile.
2998  * @set_display_name_async: Asynchronously sets a #GFile's display name.
2999  * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
3000  * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
3001  * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
3002  * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
3003  * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
3004  * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
3005  * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
3006  * @set_attribute: Sets a #GFileAttribute.
3007  * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
3008  * @set_attributes_async: Asynchronously sets a file's attributes.
3009  * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
3010  * @read_fn: Reads a file asynchronously.
3011  * @read_async: Asynchronously reads a file.
3012  * @read_finish: Finishes asynchronously reading a file.
3013  * @append_to: Writes to the end of a file.
3014  * @append_to_async: Asynchronously writes to the end of a file.
3015  * @append_to_finish: Finishes an asynchronous file append operation.
3016  * @create: Creates a new file.
3017  * @create_async: Asynchronously creates a file.
3018  * @create_finish: Finishes asynchronously creating a file.
3019  * @replace: Replaces the contents of a file.
3020  * @replace_async: Asynchronously replaces the contents of a file.
3021  * @replace_finish: Finishes asynchronously replacing a file.
3022  * @delete_file: Deletes a file.
3023  * @_delete_file_async: Asynchronously deletes a file.
3024  * @_delete_file_finish: Finishes an asynchronous delete.
3025  * @trash: Sends a #GFile to the Trash location.
3026  * @_trash_async: Asynchronously sends a #GFile to the Trash location.
3027  * @_trash_finish: Finishes an asynchronous file trashing operation.
3028  * @make_directory: Makes a directory.
3029  * @_make_directory_async: Asynchronously makes a directory.
3030  * @_make_directory_finish: Finishes making a directory asynchronously.
3031  * @make_symbolic_link: Makes a symbolic link.
3032  * @_make_symbolic_link_async: Asynchronously makes a symbolic link
3033  * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
3034  * @copy: Copies a file.
3035  * @copy_async: Asynchronously copies a file.
3036  * @copy_finish: Finishes an asynchronous copy operation.
3037  * @move: Moves a file.
3038  * @_move_async: Asynchronously moves a file.
3039  * @_move_finish: Finishes an asynchronous move operation.
3040  * @mount_mountable: Mounts a mountable object.
3041  * @mount_mountable_finish: Finishes a mounting operation.
3042  * @unmount_mountable: Unmounts a mountable object.
3043  * @unmount_mountable_finish: Finishes an unmount operation.
3044  * @eject_mountable: Ejects a mountable.
3045  * @eject_mountable_finish: Finishes an eject operation.
3046  * @mount_enclosing_volume: Mounts a specified location.
3047  * @mount_enclosing_volume_finish: Finishes mounting a specified location.
3048  * @monitor_dir: Creates a #GFileMonitor for the location.
3049  * @monitor_file: Creates a #GFileMonitor for the location.
3050  * @open_readwrite: Open file read/write. Since 2.22.
3051  * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22.
3052  * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22.
3053  * @create_readwrite: Creates file read/write. Since 2.22.
3054  * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22.
3055  * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22.
3056  * @replace_readwrite: Replaces file read/write. Since 2.22.
3057  * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22.
3058  * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22.
3059  * @start_mountable: Starts a mountable object. Since 2.22.
3060  * @start_mountable_finish: Finishes an start operation. Since 2.22.
3061  * @stop_mountable: Stops a mountable. Since 2.22.
3062  * @stop_mountable_finish: Finishes an stop operation. Since 2.22.
3063  * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22.
3064  * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22.
3065  * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22.
3066  * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22.
3067  * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
3068  * @poll_mountable: Polls a mountable object for media changes. Since 2.22.
3069  * @poll_mountable_finish: Finishes an poll operation for media changes. Since 2.22.
3070  *
3071  * An interface for writing VFS file handles.
3072  */
3073
3074
3075 /**
3076  * GFileInfo:
3077  *
3078  * Stores information about a file system object referenced by a #GFile.
3079  */
3080
3081
3082 /**
3083  * GFileInputStream:
3084  *
3085  * A subclass of GInputStream for opened files. This adds
3086  * a few file-specific operations and seeking.
3087  * #GFileInputStream implements #GSeekable.
3088  */
3089
3090
3091 /**
3092  * GFileMonitor:
3093  *
3094  * Watches for changes to a file.
3095  */
3096
3097
3098 /**
3099  * GFileMonitor::changed:
3100  * @monitor: a #GFileMonitor.
3101  * @file: a #GFile.
3102  * @other_file: a #GFile or #NULL.
3103  * @event_type: a #GFileMonitorEvent.
3104  *
3105  * Emitted when @file has been changed.
3106  * If using #G_FILE_MONITOR_SEND_MOVED flag and @event_type is
3107  * #G_FILE_MONITOR_SEND_MOVED, @file will be set to a #GFile containing the
3108  * old path, and @other_file will be set to a #GFile containing the new path.
3109  * In all the other cases, @other_file will be set to #NULL.
3110  */
3111
3112
3113 /**
3114  * GFileMonitorEvent:
3115  * @G_FILE_MONITOR_EVENT_CHANGED: a file changed.
3116  * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes.
3117  * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted.
3118  * @G_FILE_MONITOR_EVENT_CREATED: a file was created.
3119  * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed.
3120  * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted.
3121  * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted.
3122  * @G_FILE_MONITOR_EVENT_MOVED: the file was moved.
3123  *
3124  * Specifies what type of event a monitor event is.
3125  */
3126
3127
3128 /**
3129  * GFileMonitorFlags:
3130  * @G_FILE_MONITOR_NONE: No flags set.
3131  * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
3132  * @G_FILE_MONITOR_SEND_MOVED: Pair DELETED and CREATED events caused by file renames (moves) and send a single G_FILE_MONITOR_EVENT_MOVED event instead (NB: not supported on all backends; the default behaviour -without specifying this flag- is to send single DELETED and CREATED events).
3133  *
3134  * Flags used to set what a #GFileMonitor will watch for.
3135  */
3136
3137
3138 /**
3139  * GFileOutputStream:
3140  *
3141  * A subclass of GOutputStream for opened files. This adds
3142  * a few file-specific operations and seeking and truncating.
3143  * #GFileOutputStream implements GSeekable.
3144  */
3145
3146
3147 /**
3148  * GFileProgressCallback:
3149  * @current_num_bytes: the current number of bytes in the operation.
3150  * @total_num_bytes: the total number of bytes in the operation.
3151  * @user_data: user data passed to the callback.
3152  *
3153  * When doing file operations that may take a while, such as moving
3154  * a file or copying a file, a progress callback is used to pass how
3155  * far along that operation is to the application.
3156  */
3157
3158
3159 /**
3160  * GFileQueryInfoFlags:
3161  * @G_FILE_QUERY_INFO_NONE: No flags set.
3162  * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
3163  *
3164  * Flags used when querying a #GFileInfo.
3165  */
3166
3167
3168 /**
3169  * GFileReadMoreCallback:
3170  * @file_contents: the data as currently read.
3171  * @file_size: the size of the data currently read.
3172  * @callback_data: data passed to the callback.
3173  *
3174  * When loading the partial contents of a file with g_file_load_partial_contents_async(),
3175  * it may become necessary to determine if any more data from the file should be loaded.
3176  * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
3177  * should be read, or %FALSE otherwise.
3178  *
3179  * Returns: %TRUE if more data should be read back. %FALSE otherwise.
3180  */
3181
3182
3183 /**
3184  * GFileType:
3185  * @G_FILE_TYPE_UNKNOWN: File's type is unknown.
3186  * @G_FILE_TYPE_REGULAR: File handle represents a regular file.
3187  * @G_FILE_TYPE_DIRECTORY: File handle represents a directory.
3188  * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link (Unix systems).
3189  * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo, block device, or character device.
3190  * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems).
3191  * @G_FILE_TYPE_MOUNTABLE: File is a mountable location.
3192  *
3193  * Indicates the file's on-disk type.
3194  */
3195
3196
3197 /**
3198  * GFilenameCompleter:
3199  *
3200  * Completes filenames based on files that exist within the file system.
3201  */
3202
3203
3204 /**
3205  * GFilenameCompleter::got-completion-data:
3206  *
3207  * Emitted when the file name completion information comes available.
3208  */
3209
3210
3211 /**
3212  * GFilesystemPreviewType:
3213  * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it.
3214  * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files.
3215  * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files.
3216  *
3217  * Indicates a hint from the file system whether files should be
3218  * previewed in a file manager. Returned as the value of the key
3219  * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW.
3220  */
3221
3222
3223 /**
3224  * GFilterInputStream:
3225  *
3226  * A base class for all input streams that work on an underlying stream.
3227  */
3228
3229
3230 /**
3231  * GFilterOutputStream:
3232  *
3233  * A base class for all output streams that work on an underlying stream.
3234  */
3235
3236
3237 /**
3238  * GFlagsClass:
3239  * @g_type_class: the parent class
3240  * @mask: a mask covering all possible values.
3241  * @n_values: the number of possible values.
3242  * @values: an array of #GFlagsValue structs describing the individual values.
3243  *
3244  * The class of a flags type holds information about its
3245  * possible values.
3246  */
3247
3248
3249 /**
3250  * GFlagsValue:
3251  * @value: the flags value
3252  * @value_name: the name of the value
3253  * @value_nick: the nickname of the value
3254  *
3255  * A structure which contains a single flags value, its name, and its
3256  * nickname.
3257  */
3258
3259
3260 /**
3261  * GFreeFunc:
3262  * @data: a data pointer
3263  *
3264  * Declares a type of function which takes an arbitrary
3265  * data pointer argument and has no return value. It is
3266  * not currently used in GLib or GTK+.
3267  */
3268
3269
3270 /**
3271  * GIOErrorEnum:
3272  * @G_IO_ERROR_FAILED: Generic error condition for when any operation fails.
3273  * @G_IO_ERROR_NOT_FOUND: File not found error.
3274  * @G_IO_ERROR_EXISTS: File already exists error.
3275  * @G_IO_ERROR_IS_DIRECTORY: File is a directory error.
3276  * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory.
3277  * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty.
3278  * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file.
3279  * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link.
3280  * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted.
3281  * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters.
3282  * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters.
3283  * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links.
3284  * @G_IO_ERROR_NO_SPACE: No space left on drive.
3285  * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument.
3286  * @G_IO_ERROR_PERMISSION_DENIED: Permission denied.
3287  * @G_IO_ERROR_NOT_SUPPORTED: Operation not supported for the current backend.
3288  * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted.
3289  * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted.
3290  * @G_IO_ERROR_CLOSED: File was closed.
3291  * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable.
3292  * @G_IO_ERROR_PENDING: Operations are still pending.
3293  * @G_IO_ERROR_READ_ONLY: File is read only.
3294  * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created.
3295  * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect.
3296  * @G_IO_ERROR_TIMED_OUT: Operation timed out.
3297  * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive.
3298  * @G_IO_ERROR_BUSY: File is busy.
3299  * @G_IO_ERROR_WOULD_BLOCK: Operation would block.
3300  * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
3301  * @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
3302  * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has already interacted with the user. Do not display any error dialog.
3303  * @G_IO_ERROR_TOO_MANY_OPEN_FILES: The current process has too many files open and can't open any more. Duplicate descriptors do count toward this limit. Since 2.20
3304  * @G_IO_ERROR_NOT_INITIALIZED: The object has not been initialized. Since 2.22
3305  * @G_IO_ERROR_ADDRESS_IN_USE: The requested address is already in use. Since 2.22
3306  * @G_IO_ERROR_PARTIAL_INPUT: Need more input to finish operation. Since 2.24
3307  * @G_IO_ERROR_INVALID_DATA: There input data was invalid. Since 2.24
3308  * @G_IO_ERROR_DBUS_ERROR: A remote object generated an error that doesn't correspond to a locally registered #GError error domain. Use g_dbus_error_get_remote_error() to extract the D-Bus error name and g_dbus_error_strip_remote_error() to fix up the message so it matches what was received on the wire. Since 2.26.
3309  * @G_IO_ERROR_HOST_UNREACHABLE: Host unreachable. Since 2.26
3310  * @G_IO_ERROR_NETWORK_UNREACHABLE: Network unreachable. Since 2.26
3311  * @G_IO_ERROR_CONNECTION_REFUSED: Connection refused. Since 2.26
3312  * @G_IO_ERROR_PROXY_FAILED: Connection to proxy server failed. Since 2.26
3313  * @G_IO_ERROR_PROXY_AUTH_FAILED: Proxy authentication failed. Since 2.26
3314  * @G_IO_ERROR_PROXY_NEED_AUTH: Proxy server needs authentication. Since 2.26
3315  * @G_IO_ERROR_PROXY_NOT_ALLOWED: Proxy connection is not allowed by ruleset. Since 2.26
3316  *
3317  * Error codes returned by GIO functions.
3318  */
3319
3320
3321 /**
3322  * GIOModule:
3323  *
3324  * Opaque module base class for extending GIO.
3325  */
3326
3327
3328 /**
3329  * GIOSchedulerJob:
3330  *
3331  * Opaque class for definining and scheduling IO jobs.
3332  */
3333
3334
3335 /**
3336  * GIOSchedulerJobFunc:
3337  * @job: a #GIOSchedulerJob.
3338  * @cancellable: optional #GCancellable object, %NULL to ignore.
3339  * @user_data: the data to pass to callback function
3340  *
3341  * I/O Job function.
3342  * Note that depending on whether threads are available, the
3343  * #GIOScheduler may run jobs in separate threads or in an idle
3344  * in the mainloop.
3345  * Long-running jobs should periodically check the @cancellable
3346  * to see if they have been cancelled.
3347  * complete the job, %FALSE if the job is complete (or cancelled)
3348  *
3349  * Returns: %TRUE if this function should be called again to
3350  */
3351
3352
3353 /**
3354  * GIOStream:
3355  *
3356  * Base class for read-write streams.
3357  */
3358
3359
3360 /**
3361  * GIOStreamSpliceFlags:
3362  * @G_IO_STREAM_SPLICE_NONE: Do not close either stream.
3363  * @G_IO_STREAM_SPLICE_CLOSE_STREAM1: Close the first stream after the splice.
3364  * @G_IO_STREAM_SPLICE_CLOSE_STREAM2: Close the second stream after the splice.
3365  * @G_IO_STREAM_SPLICE_WAIT_FOR_BOTH: Wait for both splice operations to finish before calling the callback.
3366  *
3367  * GIOStreamSpliceFlags determine how streams should be spliced.
3368  *
3369  * Since: 2.28
3370  */
3371
3372
3373 /**
3374  * GIcon:
3375  *
3376  * An abstract type that specifies an icon.
3377  */
3378
3379
3380 /**
3381  * GIconIface:
3382  * @g_iface: The parent interface.
3383  * @hash: A hash for a given #GIcon.
3384  * @equal: Checks if two #GIcon<!-- -->s are equal.
3385  * @to_tokens: Serializes a #GIcon into tokens. The tokens must not contain any whitespace. Don't implement if the #GIcon can't be serialized (Since 2.20).
3386  * @from_tokens: Constructs a #GIcon from tokens. Set the #GError if the tokens are malformed. Don't implement if the #GIcon can't be serialized (Since 2.20).
3387  *
3388  * GIconIface is used to implement GIcon types for various
3389  * different systems. See #GThemedIcon and #GLoadableIcon for
3390  * examples of how to implement this interface.
3391  */
3392
3393
3394 /**
3395  * GIconv:
3396  *
3397  * The <structname>GIConv</structname> struct wraps an
3398  * iconv() conversion descriptor. It contains private data
3399  * and should only be accessed using the following functions.
3400  */
3401
3402
3403 /**
3404  * GInetAddress:
3405  *
3406  * An IPv4 or IPv6 internet address.
3407  */
3408
3409
3410 /**
3411  * GInetAddress:is-any:
3412  *
3413  * Whether this is the "any" address for its family.
3414  * See g_inet_address_get_is_any().
3415  *
3416  * Since: 2.22
3417  */
3418
3419
3420 /**
3421  * GInetAddress:is-link-local:
3422  *
3423  * Whether this is a link-local address.
3424  * See g_inet_address_get_is_link_local().
3425  *
3426  * Since: 2.22
3427  */
3428
3429
3430 /**
3431  * GInetAddress:is-loopback:
3432  *
3433  * Whether this is the loopback address for its family.
3434  * See g_inet_address_get_is_loopback().
3435  *
3436  * Since: 2.22
3437  */
3438
3439
3440 /**
3441  * GInetAddress:is-mc-global:
3442  *
3443  * Whether this is a global multicast address.
3444  * See g_inet_address_get_is_mc_global().
3445  *
3446  * Since: 2.22
3447  */
3448
3449
3450 /**
3451  * GInetAddress:is-mc-link-local:
3452  *
3453  * Whether this is a link-local multicast address.
3454  * See g_inet_address_get_is_mc_link_local().
3455  *
3456  * Since: 2.22
3457  */
3458
3459
3460 /**
3461  * GInetAddress:is-mc-node-local:
3462  *
3463  * Whether this is a node-local multicast address.
3464  * See g_inet_address_get_is_mc_node_local().
3465  *
3466  * Since: 2.22
3467  */
3468
3469
3470 /**
3471  * GInetAddress:is-mc-org-local:
3472  *
3473  * Whether this is an organization-local multicast address.
3474  * See g_inet_address_get_is_mc_org_local().
3475  *
3476  * Since: 2.22
3477  */
3478
3479
3480 /**
3481  * GInetAddress:is-mc-site-local:
3482  *
3483  * Whether this is a site-local multicast address.
3484  * See g_inet_address_get_is_mc_site_local().
3485  *
3486  * Since: 2.22
3487  */
3488
3489
3490 /**
3491  * GInetAddress:is-multicast:
3492  *
3493  * Whether this is a multicast address.
3494  * See g_inet_address_get_is_multicast().
3495  *
3496  * Since: 2.22
3497  */
3498
3499
3500 /**
3501  * GInetAddress:is-site-local:
3502  *
3503  * Whether this is a site-local address.
3504  * See g_inet_address_get_is_loopback().
3505  *
3506  * Since: 2.22
3507  */
3508
3509
3510 /**
3511  * GInetSocketAddress:
3512  *
3513  * An IPv4 or IPv6 socket address, corresponding to a <type>struct
3514  * sockaddr_in</type> or <type>struct sockaddr_in6</type>.
3515  */
3516
3517
3518 /**
3519  * GInitable:
3520  *
3521  * Interface for initializable objects.
3522  *
3523  * Since: 2.22
3524  */
3525
3526
3527 /**
3528  * GInitableIface:
3529  * @g_iface: The parent interface.
3530  * @init: Initializes the object.
3531  *
3532  * Provides an interface for initializing object such that initialization
3533  * may fail.
3534  *
3535  * Since: 2.22
3536  */
3537
3538
3539 /**
3540  * GInitiallyUnowned:
3541  *
3542  * All the fields in the <structname>GInitiallyUnowned</structname> structure
3543  * are private to the #GInitiallyUnowned implementation and should never be
3544  * accessed directly.
3545  */
3546
3547
3548 /**
3549  * GInitiallyUnownedClass:
3550  *
3551  * The class structure for the <structname>GInitiallyUnowned</structname> type.
3552  */
3553
3554
3555 /**
3556  * GInputStream:
3557  *
3558  * Base class for streaming input operations.
3559  */
3560
3561
3562 /**
3563  * GInputVector:
3564  * @buffer: Pointer to a buffer where data will be written.
3565  * @size: the available size in @buffer.
3566  *
3567  * Structure used for scatter/gather data input.
3568  * You generally pass in an array of #GInputVector<!-- -->s
3569  * and the operation will store the read data starting in the
3570  * first buffer, switching to the next as needed.
3571  *
3572  * Since: 2.22
3573  */
3574
3575
3576 /**
3577  * GInstanceInitFunc:
3578  * @instance: The instance to initialize.
3579  * @g_class: The class of the type the instance is created for.
3580  *
3581  * A callback function used by the type system to initialize a new
3582  * instance of a type. This function initializes all instance members and
3583  * allocates any resources required by it.
3584  * Initialization of a derived instance involves calling all its parent
3585  * types instance initializers, so the class member of the instance
3586  * is altered during its initialization to always point to the class that
3587  * belongs to the type the current initializer was introduced for.
3588  */
3589
3590
3591 /**
3592  * GInterfaceFinalizeFunc:
3593  * @g_iface: The interface structure to finalize.
3594  * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3595  *
3596  * A callback function used by the type system to finalize an interface.
3597  * This function should destroy any internal data and release any resources
3598  * allocated by the corresponding GInterfaceInitFunc() function.
3599  */
3600
3601
3602 /**
3603  * GInterfaceInfo:
3604  * @interface_init: location of the interface initialization function
3605  * @interface_finalize: location of the interface finalization function
3606  * @interface_data: user-supplied data passed to the interface init/finalize functions
3607  *
3608  * A structure that provides information to the type system which is
3609  * used specifically for managing interface types.
3610  */
3611
3612
3613 /**
3614  * GInterfaceInitFunc:
3615  * @g_iface: The interface structure to initialize.
3616  * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3617  *
3618  * A callback function used by the type system to initialize a new
3619  * interface.  This function should initialize all internal data and
3620  * allocate any resources required by the interface.
3621  */
3622
3623
3624 /**
3625  * GLoadableIcon:
3626  *
3627  * Generic type for all kinds of icons that can be loaded
3628  * as a stream.
3629  */
3630
3631
3632 /**
3633  * GLoadableIconIface:
3634  * @g_iface: The parent interface.
3635  * @load: Loads an icon.
3636  * @load_async: Loads an icon asynchronously.
3637  * @load_finish: Finishes an asynchronous icon load.
3638  *
3639  * Interface for icons that can be loaded as a stream.
3640  */
3641
3642
3643 /**
3644  * GMainContext:
3645  *
3646  * The <structname>GMainContext</structname> struct is an opaque data
3647  * type representing a set of sources to be handled in a main loop.
3648  */
3649
3650
3651 /**
3652  * GMainLoop:
3653  *
3654  * The <structname>GMainLoop</structname> struct is an opaque data type
3655  * representing the main event loop of a GLib or GTK+ application.
3656  */
3657
3658
3659 /**
3660  * GMarkupError:
3661  * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8
3662  * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace
3663  * @G_MARKUP_ERROR_PARSE: document was ill-formed
3664  * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser functions; element wasn't known
3665  * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser functions; attribute wasn't known
3666  * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser functions; content was invalid
3667  * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser functions; a required attribute was missing
3668  *
3669  * Error codes returned by markup parsing.
3670  */
3671
3672
3673 /**
3674  * GMarkupParseContext:
3675  *
3676  * A parse context is used to parse a stream of bytes that
3677  * you expect to contain marked-up text.
3678  * See g_markup_parse_context_new(), #GMarkupParser, and so
3679  * on for more details.
3680  */
3681
3682
3683 /**
3684  * GMarkupParseFlags:
3685  * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use
3686  * @G_MARKUP_TREAT_CDATA_AS_TEXT: When this flag is set, CDATA marked sections are not passed literally to the @passthrough function of the parser. Instead, the content of the section (without the <literal>&lt;![CDATA[</literal> and <literal>]]&gt;</literal>) is passed to the @text function. This flag was added in GLib 2.12
3687  * @G_MARKUP_PREFIX_ERROR_POSITION: Normally errors caught by GMarkup itself have line/column information prefixed to them to let the caller know the location of the error. When this flag is set the location information is also prefixed to errors generated by the #GMarkupParser implementation functions
3688  *
3689  * Flags that affect the behaviour of the parser.
3690  */
3691
3692
3693 /**
3694  * GMarkupParser:
3695  * @start_element: Callback to invoke when the opening tag of an element is seen.
3696  * @end_element: Callback to invoke when the closing tag of an element is seen. Note that this is also called for empty tags like <literal>&lt;empty/&gt;</literal>.
3697  * @text: Callback to invoke when some text is seen (text is always inside an element). Note that the text of an element may be spread over multiple calls of this function. If the %G_MARKUP_TREAT_CDATA_AS_TEXT flag is set, this function is also called for the content of CDATA marked sections.
3698  * @passthrough: Callback to invoke for comments, processing instructions and doctype declarations; if you're re-writing the parsed document, write the passthrough text back out in the same position. If the %G_MARKUP_TREAT_CDATA_AS_TEXT flag is not set, this function is also called for CDATA marked sections.
3699  * @error: Callback to invoke when an error occurs.
3700  *
3701  * Any of the fields in #GMarkupParser can be %NULL, in which case they
3702  * will be ignored. Except for the @error function, any of these callbacks
3703  * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT,
3704  * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT
3705  * errors are intended to be set from these callbacks. If you set an error
3706  * from a callback, g_markup_parse_context_parse() will report that error
3707  * back to its caller.
3708  */
3709
3710
3711 /**
3712  * GMemVTable:
3713  * @malloc: function to use for allocating memory.
3714  * @realloc: function to use for reallocating memory.
3715  * @free: function to use to free memory.
3716  * @calloc: function to use for allocating zero-filled memory.
3717  * @try_malloc: function to use for allocating memory without a default error handler.
3718  * @try_realloc: function to use for reallocating memory without a default error handler.
3719  *
3720  * A set of functions used to perform memory allocation. The same #GMemVTable must
3721  * be used for all allocations in the same program; a call to g_mem_set_vtable(),
3722  * if it exists, should be prior to any use of GLib.
3723  */
3724
3725
3726 /**
3727  * GMemoryInputStream:
3728  *
3729  * Implements #GInputStream for arbitrary memory chunks.
3730  */
3731
3732
3733 /**
3734  * GMemoryOutputStream:
3735  *
3736  * Implements #GOutputStream for arbitrary memory chunks.
3737  */
3738
3739
3740 /**
3741  * GMemoryOutputStream:data:
3742  *
3743  * Pointer to buffer where data will be written.
3744  *
3745  * Since: 2.24
3746  */
3747
3748
3749 /**
3750  * GMemoryOutputStream:data-size:
3751  *
3752  * Size of data written to the buffer.
3753  *
3754  * Since: 2.24
3755  */
3756
3757
3758 /**
3759  * GMemoryOutputStream:destroy-function: (skip)
3760  *
3761  * Function called with the buffer as argument when the stream is destroyed.
3762  *
3763  * Since: 2.24
3764  */
3765
3766
3767 /**
3768  * GMemoryOutputStream:realloc-function: (skip)
3769  *
3770  * Function with realloc semantics called to enlarge the buffer.
3771  *
3772  * Since: 2.24
3773  */
3774
3775
3776 /**
3777  * GMemoryOutputStream:size:
3778  *
3779  * Current size of the data buffer.
3780  *
3781  * Since: 2.24
3782  */
3783
3784
3785 /**
3786  * GMount:
3787  *
3788  * A handle to an object implementing the #GMountIface interface.
3789  */
3790
3791
3792 /**
3793  * GMount::changed:
3794  * @mount: the object on which the signal is emitted
3795  *
3796  * Emitted when the mount has been changed.
3797  */
3798
3799
3800 /**
3801  * GMount::pre-unmount:
3802  * @mount: the object on which the signal is emitted
3803  *
3804  * This signal is emitted when the #GMount is about to be
3805  * unmounted.
3806  *
3807  * Since: 2.22
3808  */
3809
3810
3811 /**
3812  * GMount::unmounted:
3813  * @mount: the object on which the signal is emitted
3814  *
3815  * This signal is emitted when the #GMount have been
3816  * unmounted. If the recipient is holding references to the
3817  * object they should release them so the object can be
3818  * finalized.
3819  */
3820
3821
3822 /**
3823  * GMountIface:
3824  * @g_iface: The parent interface.
3825  * @changed: Changed signal that is emitted when the mount's state has changed.
3826  * @unmounted: The unmounted signal that is emitted when the #GMount have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized.
3827  * @pre_unmount: The pre_unmout signal that is emitted when the #GMount will soon be emitted. If the recipient is somehow holding the mount open by keeping an open file on it it should close the file.
3828  * @get_root: Gets a #GFile to the root directory of the #GMount.
3829  * @get_name: Gets a string containing the name of the #GMount.
3830  * @get_icon: Gets a #GIcon for the #GMount.
3831  * @get_uuid: Gets the UUID for the #GMount. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available.
3832  * @get_volume: Gets a #GVolume the mount is located on. Returns %NULL if the #GMount is not associated with a #GVolume.
3833  * @get_drive: Gets a #GDrive the volume of the mount is located on. Returns %NULL if the #GMount is not associated with a #GDrive or a #GVolume. This is convenience method for getting the #GVolume and using that to get the #GDrive.
3834  * @can_unmount: Checks if a #GMount can be unmounted.
3835  * @can_eject: Checks if a #GMount can be ejected.
3836  * @unmount: Starts unmounting a #GMount.
3837  * @unmount_finish: Finishes an unmounting operation.
3838  * @eject: Starts ejecting a #GMount.
3839  * @eject_finish: Finishes an eject operation.
3840  * @remount: Starts remounting a #GMount.
3841  * @remount_finish: Finishes a remounting operation.
3842  * @guess_content_type: Starts guessing the type of the content of a #GMount. See g_mount_guess_content_type() for more information on content type guessing. This operation was added in 2.18.
3843  * @guess_content_type_finish: Finishes a contenet type guessing operation. Added in 2.18.
3844  * @guess_content_type_sync: Synchronous variant of @guess_content_type. Added in 2.18
3845  * @unmount_with_operation: Starts unmounting a #GMount using a #GMountOperation. Since 2.22.
3846  * @unmount_with_operation_finish: Finishes an unmounting operation using a #GMountOperation. Since 2.22.
3847  * @eject_with_operation: Starts ejecting a #GMount using a #GMountOperation. Since 2.22.
3848  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
3849  * @get_default_location: Gets a #GFile indication a start location that can be use as the entry point for this mount. Since 2.24.
3850  *
3851  * Interface for implementing operations for mounts.
3852  */
3853
3854
3855 /**
3856  * GMountMountFlags:
3857  * @G_MOUNT_MOUNT_NONE: No flags set.
3858  *
3859  * Flags used when mounting a mount.
3860  */
3861
3862
3863 /**
3864  * GMountOperation:
3865  *
3866  * Class for providing authentication methods for mounting operations,
3867  * such as mounting a file locally, or authenticating with a server.
3868  */
3869
3870
3871 /**
3872  * GMountOperation::aborted:
3873  *
3874  * Emitted by the backend when e.g. a device becomes unavailable
3875  * while a mount operation is in progress.
3876  * Implementations of GMountOperation should handle this signal
3877  * by dismissing open password dialogs.
3878  *
3879  * Since: 2.20
3880  */
3881
3882
3883 /**
3884  * GMountOperation::ask-password:
3885  * @op: a #GMountOperation requesting a password.
3886  * @message: string containing a message to display to the user.
3887  * @default_user: string containing the default user name.
3888  * @default_domain: string containing the default domain.
3889  * @flags: a set of #GAskPasswordFlags.
3890  *
3891  * Emitted when a mount operation asks the user for a password.
3892  * If the message contains a line break, the first line should be
3893  * presented as a heading. For example, it may be used as the
3894  * primary text in a #GtkMessageDialog.
3895  */
3896
3897
3898 /**
3899  * GMountOperation::ask-question:
3900  * @op: a #GMountOperation asking a question.
3901  * @message: string containing a message to display to the user.
3902  * @choices: an array of strings for each possible choice.
3903  *
3904  * Emitted when asking the user a question and gives a list of
3905  * choices for the user to choose from.
3906  * If the message contains a line break, the first line should be
3907  * presented as a heading. For example, it may be used as the
3908  * primary text in a #GtkMessageDialog.
3909  */
3910
3911
3912 /**
3913  * GMountOperation::reply:
3914  * @op: a #GMountOperation.
3915  * @result: a #GMountOperationResult indicating how the request was handled
3916  *
3917  * Emitted when the user has replied to the mount operation.
3918  */
3919
3920
3921 /**
3922  * GMountOperation::show-processes:
3923  * @op: a #GMountOperation.
3924  * @message: string containing a message to display to the user.
3925  * @processes: an array of #GPid for processes blocking the operation.
3926  * @choices: an array of strings for each possible choice.
3927  *
3928  * Emitted when one or more processes are blocking an operation
3929  * e.g. unmounting/ejecting a #GMount or stopping a #GDrive.
3930  * Note that this signal may be emitted several times to update the
3931  * list of blocking processes as processes close files. The
3932  * application should only respond with g_mount_operation_reply() to
3933  * the latest signal (setting #GMountOperation:choice to the choice
3934  * the user made).
3935  * If the message contains a line break, the first line should be
3936  * presented as a heading. For example, it may be used as the
3937  * primary text in a #GtkMessageDialog.
3938  *
3939  * Since: 2.22
3940  */
3941
3942
3943 /**
3944  * GMountOperation:anonymous:
3945  *
3946  * Whether to use an anonymous user when authenticating.
3947  */
3948
3949
3950 /**
3951  * GMountOperation:choice:
3952  *
3953  * The index of the user's choice when a question is asked during the
3954  * mount operation. See the #GMountOperation::ask-question signal.
3955  */
3956
3957
3958 /**
3959  * GMountOperation:domain:
3960  *
3961  * The domain to use for the mount operation.
3962  */
3963
3964
3965 /**
3966  * GMountOperation:password:
3967  *
3968  * The password that is used for authentication when carrying out
3969  * the mount operation.
3970  */
3971
3972
3973 /**
3974  * GMountOperation:password-save:
3975  *
3976  * Determines if and how the password information should be saved.
3977  */
3978
3979
3980 /**
3981  * GMountOperation:username:
3982  *
3983  * The user name that is used for authentication when carrying out
3984  * the mount operation.
3985  */
3986
3987
3988 /**
3989  * GMountOperationResult:
3990  * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the user specified data is now available
3991  * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation to be aborted
3992  * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not implemented)
3993  *
3994  * #GMountOperationResult is returned as a result when a request for
3995  * information is send by the mounting operation.
3996  */
3997
3998
3999 /**
4000  * GMountUnmountFlags:
4001  * @G_MOUNT_UNMOUNT_NONE: No flags set.
4002  * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding file operations on the mount.
4003  *
4004  * Flags used when an unmounting a mount.
4005  */
4006
4007
4008 /**
4009  * GNetworkAddress:
4010  *
4011  * A #GSocketConnectable for resolving a hostname and connecting to
4012  * that host.
4013  */
4014
4015
4016 /**
4017  * GNetworkService:
4018  *
4019  * A #GSocketConnectable for resolving a SRV record and connecting to
4020  * that service.
4021  */
4022
4023
4024 /**
4025  * GObject:
4026  *
4027  * All the fields in the <structname>GObject</structname> structure are private
4028  * to the #GObject implementation and should never be accessed directly.
4029  */
4030
4031
4032 /**
4033  * GObjectClass:
4034  * @g_type_class: the parent class
4035  * @constructor: the @constructor function is called by g_object_new () to complete the object initialization after all the construction properties are set. The first thing a @constructor implementation must do is chain up to the needed, e.g. to handle construct properties, or to implement singletons.
4036  * @set_property: the generic setter for all properties of this type. Should be overridden for every type with properties. Implementations of @set_property don't need to emit property change notification explicitly, this is handled by the type system.
4037  * @get_property: the generic getter for all properties of this type. Should be overridden for every type with properties.
4038  * @dispose: the @dispose function is supposed to drop all references to other objects, but keep the instance otherwise intact, so that client method invocations still work. It may be run multiple times (due to reference loops). Before returning, @dispose should chain up to the @dispose method of the parent class.
4039  * @finalize: instance finalization function, should finish the finalization of the instance begun in @dispose and chain up to the @finalize method of the parent class.
4040  * @dispatch_properties_changed: emits property change notification for a bunch of properties. Overriding @dispatch_properties_changed should be rarely needed.
4041  * @notify: the class closure for the notify signal
4042  * @constructed: the @constructed function is called by g_object_new() as the final step of the object creation process.  At the point of the call, all construction properties have been set on the object.  The purpose of this call is to allow for object initialisation steps that can only be performed after construction properties have been set.  @constructed implementors should chain up to the @constructed call of their parent class to allow it to complete its initialisation.
4043  *
4044  * The class structure for the <structname>GObject</structname> type.
4045  * <example>
4046  * <title>Implementing singletons using a constructor</title>
4047  * <programlisting>
4048  * static MySingleton *the_singleton = NULL;
4049  * static GObject*
4050  * my_singleton_constructor (GType                  type,
4051  * guint                  n_construct_params,
4052  * GObjectConstructParam *construct_params)
4053  * {
4054  * GObject *object;
4055  * if (!the_singleton)
4056  * {
4057  * object = G_OBJECT_CLASS (parent_class)->constructor (type,
4058  * n_construct_params,
4059  * construct_params);
4060  * the_singleton = MY_SINGLETON (object);
4061  * }
4062  * else
4063  * object = g_object_ref (G_OBJECT (the_singleton));
4064  * return object;
4065  * }
4066  * </programlisting></example>
4067  */
4068
4069
4070 /**
4071  * GObjectConstructParam:
4072  * @pspec: the #GParamSpec of the construct parameter
4073  * @value: the value to set the parameter to
4074  *
4075  * The <structname>GObjectConstructParam</structname> struct is an auxiliary
4076  * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
4077  * a #GObjectClass.
4078  */
4079
4080
4081 /**
4082  * GObjectFinalizeFunc:
4083  * @object: the #GObject being finalized
4084  *
4085  * The type of the @finalize function of #GObjectClass.
4086  */
4087
4088
4089 /**
4090  * GObjectGetPropertyFunc:
4091  * @object: a #GObject
4092  * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
4093  * @value: a #GValue to return the property value in
4094  * @pspec: the #GParamSpec describing the property
4095  *
4096  * The type of the @get_property function of #GObjectClass.
4097  */
4098
4099
4100 /**
4101  * GObjectSetPropertyFunc:
4102  * @object: a #GObject
4103  * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
4104  * @value: the new value for the property
4105  * @pspec: the #GParamSpec describing the property
4106  *
4107  * The type of the @set_property function of #GObjectClass.
4108  */
4109
4110
4111 /**
4112  * GOptionArg:
4113  * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags.
4114  * @G_OPTION_ARG_STRING: The option takes a string argument.
4115  * @G_OPTION_ARG_INT: The option takes an integer argument.
4116  * @G_OPTION_ARG_CALLBACK: The option provides a callback to parse the extra argument.
4117  * @G_OPTION_ARG_FILENAME: The option takes a filename as argument.
4118  * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple uses of the option are collected into an array of strings.
4119  * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, multiple uses of the option are collected into an array of strings.
4120  * @G_OPTION_ARG_DOUBLE: The option takes a double argument. The argument can be formatted either for the user's locale or for the "C" locale. Since 2.12
4121  * @G_OPTION_ARG_INT64: The option takes a 64-bit integer. Like %G_OPTION_ARG_INT but for larger numbers. The number can be in decimal base, or in hexadecimal (when prefixed with <literal>0x</literal>, for example, <literal>0xffffffff</literal>). Since 2.12
4122  *
4123  * The #GOptionArg enum values determine which type of extra argument the
4124  * options expect to find. If an option expects an extra argument, it
4125  * can be specified in several ways; with a short option:
4126  * <option>-x arg</option>, with a long option: <option>--name arg</option>
4127  *
4128  * Or combined in a single argument: <option>--name=arg</option>.
4129  */
4130
4131
4132 /**
4133  * GOptionArgFunc:
4134  * @option_name: The name of the option being parsed. This will be either a single dash followed by a single letter (for a short name) or two dashes followed by a long option name.
4135  * @value: The value to be parsed.
4136  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
4137  * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED is intended to be used for errors in #GOptionArgFunc callbacks.
4138  *
4139  * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK
4140  * options.
4141  * occurred, in which case @error should be set with g_set_error()
4142  *
4143  * Returns: %TRUE if the option was successfully parsed, %FALSE if an error
4144  */
4145
4146
4147 /**
4148  * GOptionContext:
4149  *
4150  * A <structname>GOptionContext</structname> struct defines which options
4151  * are accepted by the commandline option parser. The struct has only private
4152  * fields and should not be directly accessed.
4153  */
4154
4155
4156 /**
4157  * GOptionEntry:
4158  * @long_name: The long name of an option can be used to specify it in a commandline as --<replaceable>long_name</replaceable>. Every option must have a long name. To resolve conflicts if multiple option groups contain the same long name, it is also possible to specify the option as --<replaceable>groupname</replaceable>-<replaceable>long_name</replaceable>.
4159  * @short_name: If an option has a short name, it can be specified -<replaceable>short_name</replaceable> in a commandline. @short_name must be a printable ASCII character different from '-', or zero if the option has no short name.
4160  * @flags: Flags from #GOptionFlags.
4161  * @arg: The type of the option, as a #GOptionArg.
4162  * @arg_data: If the @arg type is %G_OPTION_ARG_CALLBACK, then @arg_data must point to a #GOptionArgFunc callback function, which will be called to handle the extra argument. Otherwise, @arg_data is a pointer to a location to store the value, the required type of the location depends on the @arg type: <variablelist> <varlistentry> <term>%G_OPTION_ARG_NONE</term> <listitem><para>%gboolean</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_STRING</term> <listitem><para>%gchar*</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_INT</term> <listitem><para>%gint</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_FILENAME</term> <listitem><para>%gchar*</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_STRING_ARRAY</term> <listitem><para>%gchar**</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_FILENAME_ARRAY</term> <listitem><para>%gchar**</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_DOUBLE</term> <listitem><para>%gdouble</para></listitem> </varlistentry> </variablelist> If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME the location will contain a newly allocated string if the option was given. That string needs to be freed by the callee using g_free(). Likewise if @arg type is %G_OPTION_ARG_STRING_ARRAY or %G_OPTION_ARG_FILENAME_ARRAY, the data should be freed using g_strfreev().
4163  * @description: the description for the option in <option>--help</option> output. The @description is translated using the @translate_func of the group, see g_option_group_set_translation_domain().
4164  * @arg_description: The placeholder to use for the extra argument parsed by the option in <option>--help</option> output. The @arg_description is translated using the @translate_func of the group, see g_option_group_set_translation_domain().
4165  *
4166  * A <structname>GOptionEntry</structname> defines a single option.
4167  * To have an effect, they must be added to a #GOptionGroup with
4168  * g_option_context_add_main_entries() or g_option_group_add_entries().
4169  */
4170
4171
4172 /**
4173  * GOptionError:
4174  * @G_OPTION_ERROR_UNKNOWN_OPTION: An option was not known to the parser. This error will only be reported, if the parser hasn't been instructed to ignore unknown options, see g_option_context_set_ignore_unknown_options().
4175  * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed.
4176  * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed.
4177  *
4178  * Error codes returned by option parsing.
4179  */
4180
4181
4182 /**
4183  * GOptionErrorFunc:
4184  * @context: The active #GOptionContext
4185  * @group: The group to which the function belongs
4186  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
4187  * @error: The #GError containing details about the parse error
4188  *
4189  * The type of function to be used as callback when a parse error occurs.
4190  */
4191
4192
4193 /**
4194  * GOptionFlags:
4195  * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in <option>--help</option> output.
4196  * @G_OPTION_FLAG_IN_MAIN: The option appears in the main section of the <option>--help</option> output, even if it is defined in a group.
4197  * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this flag indicates that the sense of the option is reversed.
4198  * @G_OPTION_FLAG_NO_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the callback does not take any argument (like a %G_OPTION_ARG_NONE option). Since 2.8
4199  * @G_OPTION_FLAG_FILENAME: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the argument should be passed to the callback in the GLib filename encoding rather than UTF-8. Since 2.8
4200  * @G_OPTION_FLAG_OPTIONAL_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the argument supply is optional. If no argument is given then data of %GOptionParseFunc will be set to NULL. Since 2.8
4201  * @G_OPTION_FLAG_NOALIAS: This flag turns off the automatic conflict resolution which prefixes long option names with <literal>groupname-</literal> if there is a conflict. This option should only be used in situations where aliasing is necessary to model some legacy commandline interface. It is not safe to use this option, unless all option groups are under your direct control. Since 2.8.
4202  *
4203  * Flags which modify individual options.
4204  */
4205
4206
4207 /**
4208  * GOptionGroup:
4209  *
4210  * A <structname>GOptionGroup</structname> struct defines the options in a single
4211  * group. The struct has only private fields and should not be directly accessed.
4212  * All options in a group share the same translation function. Libraries which
4213  * need to parse commandline options are expected to provide a function for
4214  * getting a <structname>GOptionGroup</structname> holding their options, which
4215  * the application can then add to its #GOptionContext.
4216  */
4217
4218
4219 /**
4220  * GOptionParseFunc:
4221  * @context: The active #GOptionContext
4222  * @group: The group to which the function belongs
4223  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
4224  * @error: A return location for error details
4225  *
4226  * The type of function that can be called before and after parsing.
4227  * occurred, in which case @error should be set with g_set_error()
4228  *
4229  * Returns: %TRUE if the function completed successfully, %FALSE if an error
4230  */
4231
4232
4233 /**
4234  * GOutputStream:
4235  *
4236  * Base class for writing output.
4237  * All classes derived from GOutputStream should implement synchronous
4238  * writing, splicing, flushing and closing streams, but may implement
4239  * asynchronous versions.
4240  */
4241
4242
4243 /**
4244  * GOutputStreamSpliceFlags:
4245  * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream.
4246  * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after the splice.
4247  * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after the splice.
4248  *
4249  * GOutputStreamSpliceFlags determine how streams should be spliced.
4250  */
4251
4252
4253 /**
4254  * GOutputVector:
4255  * @buffer: Pointer to a buffer of data to read.
4256  * @size: the size of @buffer.
4257  *
4258  * Structure used for scatter/gather data output.
4259  * You generally pass in an array of #GOutputVector<!-- -->s
4260  * and the operation will use all the buffers as if they were
4261  * one buffer.
4262  *
4263  * Since: 2.22
4264  */
4265
4266
4267 /**
4268  * GParamFlags:
4269  * @G_PARAM_READABLE: the parameter is readable
4270  * @G_PARAM_WRITABLE: the parameter is writable
4271  * @G_PARAM_CONSTRUCT: the parameter will be set upon object construction
4272  * @G_PARAM_CONSTRUCT_ONLY: the parameter will only be set upon object construction
4273  * @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) strict validation is not required
4274  * @G_PARAM_STATIC_NAME: the string used as name when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8
4275  * @G_PARAM_STATIC_NICK: the string used as nick when constructing the parameter is guaranteed to remain valid and unmmodified for the lifetime of the parameter. Since 2.8
4276  * @G_PARAM_STATIC_BLURB: the string used as blurb when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8
4277  * @G_PARAM_PRIVATE: internal
4278  * @G_PARAM_DEPRECATED: the parameter is deprecated and will be removed in a future version. A warning will be generated if it is used while running with G_ENABLE_DIAGNOSTIC=1. Since: 2.26
4279  *
4280  * Through the #GParamFlags flag values, certain aspects of parameters
4281  * can be configured.
4282  */
4283
4284
4285 /**
4286  * GParamSpec:
4287  * @g_type_instance: private #GTypeInstance portion
4288  * @name: name of this parameter
4289  * @flags: #GParamFlags flags for this parameter
4290  * @value_type: the #GValue type for this parameter
4291  * @owner_type: #GType type that uses (introduces) this parameter
4292  *
4293  * All other fields of the <structname>GParamSpec</structname> struct are private and
4294  * should not be used directly.
4295  */
4296
4297
4298 /**
4299  * GParamSpecBoolean:
4300  * @parent_instance: private #GParamSpec portion
4301  * @default_value: default value for the property specified
4302  *
4303  * A #GParamSpec derived structure that contains the meta data for boolean properties.
4304  */
4305
4306
4307 /**
4308  * GParamSpecBoxed:
4309  * @parent_instance: private #GParamSpec portion
4310  *
4311  * A #GParamSpec derived structure that contains the meta data for boxed properties.
4312  */
4313
4314
4315 /**
4316  * GParamSpecChar:
4317  * @parent_instance: private #GParamSpec portion
4318  * @minimum: minimum value for the property specified
4319  * @maximum: maximum value for the property specified
4320  * @default_value: default value for the property specified
4321  *
4322  * A #GParamSpec derived structure that contains the meta data for character properties.
4323  */
4324
4325
4326 /**
4327  * GParamSpecClass:
4328  * @g_type_class: the parent class
4329  * @value_type: the #GValue type for this parameter
4330  * @finalize: The instance finalization function (optional), should chain up to the finalize method of the parent class.
4331  * @value_set_default: Resets a @value to the default value for this type (recommended, the default is g_value_reset()), see g_param_value_set_default().
4332  * @value_validate: Ensures that the contents of @value comply with the specifications set out by this type (optional), see g_param_value_set_validate().
4333  * @values_cmp: Compares @value1 with @value2 according to this type (recommended, the default is memcmp()), see g_param_values_cmp().
4334  *
4335  * The class structure for the <structname>GParamSpec</structname> type.
4336  * Normally, <structname>GParamSpec</structname> classes are filled by
4337  * g_param_type_register_static().
4338  */
4339
4340
4341 /**
4342  * GParamSpecDouble:
4343  * @parent_instance: private #GParamSpec portion
4344  * @minimum: minimum value for the property specified
4345  * @maximum: maximum value for the property specified
4346  * @default_value: default value for the property specified
4347  * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-90.
4348  *
4349  * A #GParamSpec derived structure that contains the meta data for double properties.
4350  */
4351
4352
4353 /**
4354  * GParamSpecEnum:
4355  * @parent_instance: private #GParamSpec portion
4356  * @enum_class: the #GEnumClass for the enum
4357  * @default_value: default value for the property specified
4358  *
4359  * A #GParamSpec derived structure that contains the meta data for enum
4360  * properties.
4361  */
4362
4363
4364 /**
4365  * GParamSpecFlags:
4366  * @parent_instance: private #GParamSpec portion
4367  * @flags_class: the #GFlagsClass for the flags
4368  * @default_value: default value for the property specified
4369  *
4370  * A #GParamSpec derived structure that contains the meta data for flags
4371  * properties.
4372  */
4373
4374
4375 /**
4376  * GParamSpecFloat:
4377  * @parent_instance: private #GParamSpec portion
4378  * @minimum: minimum value for the property specified
4379  * @maximum: maximum value for the property specified
4380  * @default_value: default value for the property specified
4381  * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-30.
4382  *
4383  * A #GParamSpec derived structure that contains the meta data for float properties.
4384  */
4385
4386
4387 /**
4388  * GParamSpecGType:
4389  * @parent_instance: private #GParamSpec portion
4390  * @is_a_type: a #GType whose subtypes can occur as values
4391  *
4392  * A #GParamSpec derived structure that contains the meta data for #GType properties.
4393  *
4394  * Since: 2.10
4395  */
4396
4397
4398 /**
4399  * GParamSpecInt:
4400  * @parent_instance: private #GParamSpec portion
4401  * @minimum: minimum value for the property specified
4402  * @maximum: maximum value for the property specified
4403  * @default_value: default value for the property specified
4404  *
4405  * A #GParamSpec derived structure that contains the meta data for integer properties.
4406  */
4407
4408
4409 /**
4410  * GParamSpecInt64:
4411  * @parent_instance: private #GParamSpec portion
4412  * @minimum: minimum value for the property specified
4413  * @maximum: maximum value for the property specified
4414  * @default_value: default value for the property specified
4415  *
4416  * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
4417  */
4418
4419
4420 /**
4421  * GParamSpecLong:
4422  * @parent_instance: private #GParamSpec portion
4423  * @minimum: minimum value for the property specified
4424  * @maximum: maximum value for the property specified
4425  * @default_value: default value for the property specified
4426  *
4427  * A #GParamSpec derived structure that contains the meta data for long integer properties.
4428  */
4429
4430
4431 /**
4432  * GParamSpecObject:
4433  * @parent_instance: private #GParamSpec portion
4434  *
4435  * A #GParamSpec derived structure that contains the meta data for object properties.
4436  */
4437
4438
4439 /**
4440  * GParamSpecOverride:
4441  *
4442  * This is a type of #GParamSpec type that simply redirects operations to
4443  * another paramspec.  All operations other than getting or
4444  * setting the value are redirected, including accessing the nick and
4445  * blurb, validating a value, and so forth. See
4446  * g_param_spec_get_redirect_target() for retrieving the overidden
4447  * property. #GParamSpecOverride is used in implementing
4448  * g_object_class_override_property(), and will not be directly useful
4449  * unless you are implementing a new base type similar to GObject.
4450  *
4451  * Since: 2.4
4452  */
4453
4454
4455 /**
4456  * GParamSpecParam:
4457  * @parent_instance: private #GParamSpec portion
4458  *
4459  * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
4460  * properties.
4461  */
4462
4463
4464 /**
4465  * GParamSpecPointer:
4466  * @parent_instance: private #GParamSpec portion
4467  *
4468  * A #GParamSpec derived structure that contains the meta data for pointer properties.
4469  */
4470
4471
4472 /**
4473  * GParamSpecString:
4474  * @parent_instance: private #GParamSpec portion
4475  * @default_value: default value for the property specified
4476  * @cset_first: a string containing the allowed values for the first byte
4477  * @cset_nth: a string containing the allowed values for the subsequent bytes
4478  * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
4479  * @null_fold_if_empty: replace empty string by %NULL
4480  * @ensure_non_null: replace %NULL strings by an empty string
4481  *
4482  * A #GParamSpec derived structure that contains the meta data for string
4483  * properties.
4484  */
4485
4486
4487 /**
4488  * GParamSpecTypeInfo:
4489  * @instance_size: Size of the instance (object) structure.
4490  * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
4491  * @instance_init: Location of the instance initialization function (optional).
4492  * @value_type: The #GType of values conforming to this #GParamSpec
4493  * @finalize: The instance finalization function (optional).
4494  * @value_set_default: Resets a @value to the default value for @pspec (recommended, the default is g_value_reset()), see g_param_value_set_default().
4495  * @value_validate: Ensures that the contents of @value comply with the specifications set out by @pspec (optional), see g_param_value_set_validate().
4496  * @values_cmp: Compares @value1 with @value2 according to @pspec (recommended, the default is memcmp()), see g_param_values_cmp().
4497  *
4498  * This structure is used to provide the type system with the information
4499  * required to initialize and destruct (finalize) a parameter's class and
4500  * instances thereof.
4501  * The initialized structure is passed to the g_param_type_register_static()
4502  * The type system will perform a deep copy of this structure, so its memory
4503  * does not need to be persistent across invocation of
4504  * g_param_type_register_static().
4505  */
4506
4507
4508 /**
4509  * GParamSpecUChar:
4510  * @parent_instance: private #GParamSpec portion
4511  * @minimum: minimum value for the property specified
4512  * @maximum: maximum value for the property specified
4513  * @default_value: default value for the property specified
4514  *
4515  * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
4516  */
4517
4518
4519 /**
4520  * GParamSpecUInt:
4521  * @parent_instance: private #GParamSpec portion
4522  * @minimum: minimum value for the property specified
4523  * @maximum: maximum value for the property specified
4524  * @default_value: default value for the property specified
4525  *
4526  * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
4527  */
4528
4529
4530 /**
4531  * GParamSpecUInt64:
4532  * @parent_instance: private #GParamSpec portion
4533  * @minimum: minimum value for the property specified
4534  * @maximum: maximum value for the property specified
4535  * @default_value: default value for the property specified
4536  *
4537  * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
4538  */
4539
4540
4541 /**
4542  * GParamSpecULong:
4543  * @parent_instance: private #GParamSpec portion
4544  * @minimum: minimum value for the property specified
4545  * @maximum: maximum value for the property specified
4546  * @default_value: default value for the property specified
4547  *
4548  * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
4549  */
4550
4551
4552 /**
4553  * GParamSpecUnichar:
4554  * @parent_instance: private #GParamSpec portion
4555  * @default_value: default value for the property specified
4556  *
4557  * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
4558  */
4559
4560
4561 /**
4562  * GParamSpecValueArray:
4563  * @parent_instance: private #GParamSpec portion
4564  * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
4565  * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
4566  *
4567  * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
4568  */
4569
4570
4571 /**
4572  * GParamSpecVariant:
4573  * @parent_instance: private #GParamSpec portion
4574  * @type: a #GVariantType, or %NULL
4575  * @default_value: a #GVariant, or %NULL
4576  *
4577  * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
4578  *
4579  * Since: 2.26
4580  */
4581
4582
4583 /**
4584  * GParameter:
4585  * @name: the parameter name
4586  * @value: the parameter value
4587  *
4588  * The <structname>GParameter</structname> struct is an auxiliary structure used
4589  * to hand parameter name/value pairs to g_object_newv().
4590  */
4591
4592
4593 /**
4594  * GPasswordSave:
4595  * @G_PASSWORD_SAVE_NEVER: never save a password.
4596  * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session.
4597  * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently.
4598  *
4599  * #GPasswordSave is used to indicate the lifespan of a saved password.
4600  * #Gvfs stores passwords in the Gnome keyring when this flag allows it
4601  * to, and later retrieves it again from there.
4602  */
4603
4604
4605 /**
4606  * GPermission:
4607  *
4608  * #GPermission is an opaque data structure and can only be accessed
4609  * using the following functions.
4610  */
4611
4612
4613 /**
4614  * GPermission:allowed:
4615  *
4616  * %TRUE if the caller currently has permission to perform the action that
4617  */
4618
4619
4620 /**
4621  * GPermission:can-acquire:
4622  *
4623  * %TRUE if it is generally possible to acquire the permission by calling
4624  * g_permission_acquire().
4625  */
4626
4627
4628 /**
4629  * GPermission:can-release:
4630  *
4631  * %TRUE if it is generally possible to release the permission by calling
4632  * g_permission_release().
4633  */
4634
4635
4636 /**
4637  * GPid:
4638  *
4639  * A type which is used to hold a process identification.
4640  * On UNIX, processes are identified by a process id (an integer),
4641  * while Windows uses process handles (which are pointers).
4642  */
4643
4644
4645 /**
4646  * GPollFD:
4647  * @fd: the file descriptor to poll (or a <type>HANDLE</type> on Win32)
4648  * @events: a bitwise combination from #GIOCondition, specifying which events should be polled for. Typically for reading from a file descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and for writing you would use %G_IO_OUT | %G_IO_ERR.
4649  * @revents: a bitwise combination of flags from #GIOCondition, returned from the poll() function to indicate which events occurred.
4650  *
4651  *
4652  */
4653
4654
4655 /**
4656  * GPollFunc:
4657  * @ufds: an array of #GPollFD elements
4658  * @nfsd: the number of elements in @ufds
4659  * @timeout_: the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout.
4660  *
4661  * Specifies the type of function passed to g_main_context_set_poll_func().
4662  * The semantics of the function should match those of the poll() system call.
4663  * reported, or -1 if an error occurred.
4664  *
4665  * Returns: the number of #GPollFD elements which have events or errors
4666  */
4667
4668
4669 /**
4670  * GPollableInputStream:
4671  *
4672  * An interface for a #GInputStream that can be polled for readability.
4673  *
4674  * Since: 2.28
4675  */
4676
4677
4678 /**
4679  * GPollableInputStreamInterface:
4680  * @g_iface: The parent interface.
4681  * @can_poll: Checks if the #GPollableInputStream instance is actually pollable
4682  * @is_readable: Checks if the stream is readable
4683  * @create_source: Creates a #GSource to poll the stream
4684  * @read_nonblocking: Does a non-blocking read or returns %G_IO_ERROR_WOULD_BLOCK
4685  *
4686  * The interface for pollable input streams.
4687  * The default implementation of @can_poll always returns %TRUE.
4688  * The default implementation of @read_nonblocking calls
4689  * g_pollable_input_stream_is_readable(), and then calls
4690  * g_input_stream_read() if it returns %TRUE. This means you only need
4691  * to override it if it is possible that your @is_readable
4692  * implementation may return %TRUE when the stream is not actually
4693  * readable.
4694  *
4695  * Since: 2.28
4696  */
4697
4698
4699 /**
4700  * GPollableOutputStream:
4701  *
4702  * An interface for a #GOutputStream that can be polled for readability.
4703  *
4704  * Since: 2.28
4705  */
4706
4707
4708 /**
4709  * GPollableOutputStreamInterface:
4710  * @g_iface: The parent interface.
4711  * @can_poll: Checks if the #GPollableOutputStream instance is actually pollable
4712  * @is_writable: Checks if the stream is writable
4713  * @create_source: Creates a #GSource to poll the stream
4714  * @write_nonblocking: Does a non-blocking write or returns %G_IO_ERROR_WOULD_BLOCK
4715  *
4716  * The interface for pollable output streams.
4717  * The default implementation of @can_poll always returns %TRUE.
4718  * The default implementation of @write_nonblocking calls
4719  * g_pollable_output_stream_is_writable(), and then calls
4720  * g_output_stream_write() if it returns %TRUE. This means you only
4721  * need to override it if it is possible that your @is_writable
4722  * implementation may return %TRUE when the stream is not actually
4723  * writable.
4724  *
4725  * Since: 2.28
4726  */
4727
4728
4729 /**
4730  * GPollableSourceFunc:
4731  * @pollable_stream: the #GPollableInputStream or #GPollableOutputStream
4732  * @user_data: data passed in by the user.
4733  *
4734  * This is the function type of the callback used for the #GSource
4735  * returned by g_pollable_input_stream_create_source() and
4736  * g_pollable_output_stream_create_source().
4737  *
4738  * Returns: it should return %FALSE if the source should be removed.
4739  * Since: 2.28
4740  */
4741
4742
4743 /**
4744  * GProxy:
4745  *
4746  * Interface that handles proxy connection and payload.
4747  *
4748  * Since: 2.26
4749  */
4750
4751
4752 /**
4753  * GProxyAddress:
4754  *
4755  * A #GInetSocketAddress representing a connection via a proxy server
4756  *
4757  * Since: 2.26
4758  */
4759
4760
4761 /**
4762  * GProxyAddressEnumerator:
4763  *
4764  * A subclass of #GSocketAddressEnumerator that takes another address
4765  * enumerator and wraps its results in #GProxyAddress<!-- -->es as
4766  * directed by the default #GProxyResolver.
4767  */
4768
4769
4770 /**
4771  * GProxyInterface:
4772  * @g_iface: The parent interface.
4773  * @connect: Connect to proxy server and wrap (if required) the #connection to handle payload.
4774  * @connect_async: Same has connect() but asynchronous.
4775  * @connect_finish: Returns the result of connect_async()
4776  *
4777  * Provides an interface for handling proxy connection and payload.
4778  *
4779  * Since: 2.26
4780  */
4781
4782
4783 /**
4784  * GProxyResolver:
4785  *
4786  * Interface that can be used to resolve proxy address.
4787  */
4788
4789
4790 /**
4791  * GReallocFunc:
4792  * @data: memory block to reallocate
4793  * @size: size to reallocate @data to
4794  *
4795  * Changes the size of the memory block pointed to by @data to
4796  * The function should have the same semantics as realloc().
4797  *
4798  * Returns: a pointer to the reallocated memory
4799  */
4800
4801
4802 /**
4803  * GRegex:
4804  *
4805  * A GRegex is the "compiled" form of a regular expression pattern. This
4806  * structure is opaque and its fields cannot be accessed directly.
4807  *
4808  * Since: 2.14
4809  */
4810
4811
4812 /**
4813  * GRegexCompileFlags:
4814  * @G_REGEX_CASELESS: Letters in the pattern match both upper- and lowercase letters. This option can be changed within a pattern by a "(?i)" option setting.
4815  * @G_REGEX_MULTILINE: By default, GRegex treats the strings as consisting of a single line of characters (even if it actually contains newlines). The "start of line" metacharacter ("^") matches only at the start of the string, while the "end of line" metacharacter ("$") matches only at the end of the string, or before a terminating newline (unless #G_REGEX_DOLLAR_ENDONLY is set). When #G_REGEX_MULTILINE is set, the "start of line" and "end of line" constructs match immediately following or immediately before any newline in the string, respectively, as well as at the very start and end. This can be changed within a pattern by a "(?m)" option setting.
4816  * @G_REGEX_DOTALL: A dot metacharater (".") in the pattern matches all characters, including newlines. Without it, newlines are excluded. This option can be changed within a pattern by a ("?s") option setting.
4817  * @G_REGEX_EXTENDED: Whitespace data characters in the pattern are totally ignored except when escaped or inside a character class. Whitespace does not include the VT character (code 11). In addition, characters between an unescaped "#" outside a character class and the next newline character, inclusive, are also ignored. This can be changed within a pattern by a "(?x)" option setting.
4818  * @G_REGEX_ANCHORED: The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharater.
4819  * @G_REGEX_DOLLAR_ENDONLY: A dollar metacharacter ("$") in the pattern matches only at the end of the string. Without this option, a dollar also matches immediately before the final character if it is a newline (but not before any other newlines). This option is ignored if #G_REGEX_MULTILINE is set.
4820  * @G_REGEX_UNGREEDY: Inverts the "greediness" of the quantifiers so that they are not greedy by default, but become greedy if followed by "?". It can also be set by a "(?U)" option setting within the pattern.
4821  * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this flag they are considered as a raw sequence of bytes.
4822  * @G_REGEX_NO_AUTO_CAPTURE: Disables the use of numbered capturing parentheses in the pattern. Any opening parenthesis that is not followed by "?" behaves as if it were followed by "?:" but named parentheses can still be used for capturing (and they acquire numbers in the usual way).
4823  * @G_REGEX_OPTIMIZE: Optimize the regular expression. If the pattern will be used many times, then it may be worth the effort to optimize it to improve the speed of matches.
4824  * @G_REGEX_DUPNAMES: Names used to identify capturing subpatterns need not be unique. This can be helpful for certain types of pattern when it is known that only one instance of the named subpattern can ever be matched.
4825  * @G_REGEX_NEWLINE_CR: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\r'.
4826  * @G_REGEX_NEWLINE_LF: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\n'.
4827  * @G_REGEX_NEWLINE_CRLF: Usually any newline character is recognized, if this option is set, the only recognized newline character sequence is '\r\n'.
4828  *
4829  * Flags specifying compile-time options.
4830  *
4831  * Since: 2.14
4832  */
4833
4834
4835 /**
4836  * GRegexError:
4837  * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed.
4838  * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed.
4839  * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement string.
4840  * @G_REGEX_ERROR_MATCH: The match process failed.
4841  * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. Since 2.16
4842  * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16
4843  * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16
4844  * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". Since 2.16
4845  * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" quantifier. Since 2.16
4846  * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. Since 2.16
4847  * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for character class. Since 2.16
4848  * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence in character class. Since 2.16
4849  * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. Since 2.16
4850  * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16
4851  * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", "(?&lt;" or "(?P". Since 2.16
4852  * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are supported only within a class. Since 2.16
4853  * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" without opening "(". Since 2.16
4854  * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent subpattern. Since 2.16
4855  * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. Since 2.16
4856  * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. Since 2.16
4857  * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16
4858  * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not fixed length. Since 2.16
4859  * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". Since 2.16
4860  * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains more than two branches. Since 2.16
4861  * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". Since 2.16
4862  * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. Since 2.16
4863  * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating elements are not supported. Since 2.16
4864  * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence is too large. Since 2.16
4865  * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16
4866  * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in lookbehind assertion. Since 2.16
4867  * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. Since 2.16
4868  * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator in subpattern name. Since 2.16
4869  * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have the same name. Since 2.16
4870  * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. Since 2.16
4871  * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or "\\p". Since 2.16
4872  * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long (maximum 32 characters). Since 2.16
4873  * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum 10,000). Since 2.16
4874  * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". Since 2.16
4875  * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more than one branch. Since 2.16
4876  * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. Since 2.16
4877  * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. Since 2.16
4878  * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced name or an optionally braced non-zero number. Since 2.16
4879  *
4880  * Error codes returned by regular expressions functions.
4881  *
4882  * Since: 2.14
4883  */
4884
4885
4886 /**
4887  * GRegexEvalCallback:
4888  * @match_info: the #GMatchInfo generated by the match. Use g_match_info_get_regex() and g_match_info_get_string() if you need the #GRegex or the matched string.
4889  * @result: a #GString containing the new string
4890  * @user_data: user data passed to g_regex_replace_eval()
4891  *
4892  * Specifies the type of the function passed to g_regex_replace_eval().
4893  * It is called for each occurance of the pattern in the string passed
4894  * to g_regex_replace_eval(), and it should append the replacement to
4895  *
4896  * Returns: %FALSE to continue the replacement process, %TRUE to stop it
4897  * Since: 2.14
4898  */
4899
4900
4901 /**
4902  * GRegexMatchFlags:
4903  * @G_REGEX_MATCH_ANCHORED: The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharater.
4904  * @G_REGEX_MATCH_NOTBOL: Specifies that first character of the string is not the beginning of a line, so the circumflex metacharacter should not match before it. Setting this without #G_REGEX_MULTILINE (at compile time) causes circumflex never to match. This option affects only the behaviour of the circumflex metacharacter, it does not affect "\A".
4905  * @G_REGEX_MATCH_NOTEOL: Specifies that the end of the subject string is not the end of a line, so the dollar metacharacter should not match it nor (except in multiline mode) a newline immediately before it. Setting this without #G_REGEX_MULTILINE (at compile time) causes dollar never to match. This option affects only the behaviour of the dollar metacharacter, it does not affect "\Z" or "\z".
4906  * @G_REGEX_MATCH_NOTEMPTY: An empty string is not considered to be a valid match if this option is set. If there are alternatives in the pattern, they are tried. If all the alternatives match the empty string, the entire match fails. For example, if the pattern "a?b?" is applied to a string not beginning with "a" or "b", it matches the empty string at the start of the string. With this flag set, this match is not valid, so GRegex searches further into the string for occurrences of "a" or "b".
4907  * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().
4908  * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when creating a new #GRegex, setting the '\r' character as line terminator.
4909  * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when creating a new #GRegex, setting the '\n' character as line terminator.
4910  * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when creating a new #GRegex, setting the '\r\n' characters as line terminator.
4911  * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when creating a new #GRegex, any newline character or character sequence is recognized.
4912  *
4913  * Flags specifying match-time options.
4914  *
4915  * Since: 2.14
4916  */
4917
4918
4919 /**
4920  * GResolver:
4921  *
4922  * The object that handles DNS resolution. Use g_resolver_get_default()
4923  * to get the default resolver.
4924  */
4925
4926
4927 /**
4928  * GResolver::reload:
4929  * @resolver: a #GResolver
4930  *
4931  * Emitted when the resolver notices that the system resolver
4932  * configuration has changed.
4933  */
4934
4935
4936 /**
4937  * GResolverError:
4938  * @G_RESOLVER_ERROR_NOT_FOUND: the requested name/address/service was not found
4939  * @G_RESOLVER_ERROR_TEMPORARY_FAILURE: the requested information could not be looked up due to a network error or similar problem
4940  * @G_RESOLVER_ERROR_INTERNAL: unknown error
4941  *
4942  * An error code used with %G_RESOLVER_ERROR in a #GError returned
4943  * from a #GResolver routine.
4944  *
4945  * Since: 2.22
4946  */
4947
4948
4949 /**
4950  * GSeekable:
4951  *
4952  * Seek object for streaming operations.
4953  */
4954
4955
4956 /**
4957  * GSeekableIface:
4958  * @g_iface: The parent interface.
4959  * @tell: Tells the current location within a stream.
4960  * @can_seek: Checks if seeking is supported by the stream.
4961  * @seek: Seeks to a location within a stream.
4962  * @can_truncate: Chekcs if truncation is suppored by the stream.
4963  * @truncate_fn: Truncates a stream.
4964  *
4965  * Provides an interface for implementing seekable functionality on I/O Streams.
4966  */
4967
4968
4969 /**
4970  * GSettings::change-event:
4971  * @settings: the object on which the signal was emitted
4972  * @keys: (array length=n_keys) (element-type GQuark) (allow-none):  an array of #GQuark<!-- -->s for the changed keys, or %NULL
4973  * @n_keys: the length of the @keys array, or 0
4974  * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
4975  *
4976  * The "change-event" signal is emitted once per change event that
4977  * affects this settings object.  You should connect to this signal
4978  * only if you are interested in viewing groups of changes before they
4979  * are split out into multiple emissions of the "changed" signal.
4980  * For most use cases it is more appropriate to use the "changed" signal.
4981  * In the event that the change event applies to one or more specified
4982  * keys, @keys will be an array of #GQuark of length @n_keys.  In the
4983  * event that the change event applies to the #GSettings object as a
4984  * be %NULL and @n_keys will be 0.
4985  * The default handler for this signal invokes the "changed" signal
4986  * for each affected key.  If any other connected handler returns
4987  * %TRUE then this default functionality will be supressed.
4988  *
4989  * Whole (ie: potentially every key has been changed) then @keys will
4990  */
4991
4992
4993 /**
4994  * GSettings::changed:
4995  * @settings: the object on which the signal was emitted
4996  * @key: the name of the key that changed
4997  *
4998  * The "changed" signal is emitted when a key has potentially changed.
4999  * You should call one of the g_settings_get() calls to check the new
5000  * value.
5001  * This signal supports detailed connections.  You can connect to the
5002  * detailed signal "changed::x" in order to only receive callbacks
5003  * when key "x" changes.
5004  */
5005
5006
5007 /**
5008  * GSettings::writable-change-event:
5009  * @settings: the object on which the signal was emitted
5010  * @key: the quark of the key, or 0
5011  * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
5012  *
5013  * The "writable-change-event" signal is emitted once per writability
5014  * change event that affects this settings object.  You should connect
5015  * to this signal if you are interested in viewing groups of changes
5016  * before they are split out into multiple emissions of the
5017  * "writable-changed" signal.  For most use cases it is more
5018  * appropriate to use the "writable-changed" signal.
5019  * In the event that the writability change applies only to a single
5020  * key, @key will be set to the #GQuark for that key.  In the event
5021  * that the writability change affects the entire settings object,
5022  * The default handler for this signal invokes the "writable-changed"
5023  * and "changed" signals for each affected key.  This is done because
5024  * changes in writability might also imply changes in value (if for
5025  * example, a new mandatory setting is introduced).  If any other
5026  * connected handler returns %TRUE then this default functionality
5027  * will be supressed.
5028  */
5029
5030
5031 /**
5032  * GSettings::writable-changed:
5033  * @settings: the object on which the signal was emitted
5034  * @key: the key
5035  *
5036  * The "writable-changed" signal is emitted when the writability of a
5037  * key has potentially changed.  You should call
5038  * g_settings_is_writable() in order to determine the new status.
5039  * This signal supports detailed connections.  You can connect to the
5040  * detailed signal "writable-changed::x" in order to only receive
5041  * callbacks when the writability of "x" changes.
5042  */
5043
5044
5045 /**
5046  * GSettings:context:
5047  *
5048  * The name of the context that the settings are stored in.
5049  */
5050
5051
5052 /**
5053  * GSettings:delay-apply:
5054  *
5055  * Whether the #GSettings object is in 'delay-apply' mode. See
5056  * g_settings_delay() for details.
5057  *
5058  * Since: 2.28
5059  */
5060
5061
5062 /**
5063  * GSettings:has-unapplied:
5064  *
5065  * If this property is %TRUE, the #GSettings object has outstanding
5066  * changes that will be applied when g_settings_apply() is called.
5067  */
5068
5069
5070 /**
5071  * GSettings:path:
5072  *
5073  * The path within the backend where the settings are stored.
5074  */
5075
5076
5077 /**
5078  * GSettings:schema:
5079  *
5080  * The name of the schema that describes the types of keys
5081  * for this #GSettings object.
5082  */
5083
5084
5085 /**
5086  * GSettingsBackend:
5087  *
5088  * An implementation of a settings storage repository.
5089  */
5090
5091
5092 /**
5093  * GSettingsBindFlags:
5094  * @G_SETTINGS_BIND_DEFAULT: Equivalent to <literal>G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET</literal>
5095  * @G_SETTINGS_BIND_GET: Update the #GObject property when the setting changes. It is an error to use this flag if the property is not writable.
5096  * @G_SETTINGS_BIND_SET: Update the setting when the #GObject property changes. It is an error to use this flag if the property is not readable.
5097  * @G_SETTINGS_BIND_NO_SENSITIVITY: Do not try to bind a "sensitivity" property to the writability of the setting
5098  * @G_SETTINGS_BIND_GET_NO_CHANGES: When set in addition to #G_SETTINGS_BIND_GET, set the #GObject property value initially from the setting, but do not listen for changes of the setting
5099  * @G_SETTINGS_BIND_INVERT_BOOLEAN: When passed to g_settings_bind(), uses a pair of mapping functions that invert the boolean value when mapping between the setting and the property.  The setting and property must both be booleans.  You cannot pass this flag to g_settings_bind_with_mapping().
5100  *
5101  * Flags used when creating a binding. These flags determine in which
5102  * direction the binding works. The default is to synchronize in both
5103  * directions.
5104  */
5105
5106
5107 /**
5108  * GSettingsBindGetMapping:
5109  * @value: return location for the property value
5110  * @variant: the #GVariant
5111  * @user_data: user data that was specified when the binding was created
5112  * @returns: %TRUE if the conversion succeeded, %FALSE in case of an error
5113  *
5114  * The type for the function that is used to convert from #GSettings to
5115  * an object property. The @value is already initialized to hold values
5116  * of the appropriate type.
5117  */
5118
5119
5120 /**
5121  * GSettingsBindSetMapping:
5122  * @value: a #GValue containing the property value to map
5123  * @expected_type: the #GVariantType to create
5124  * @user_data: user data that was specified when the binding was created
5125  * @returns: a new #GVariant holding the data from @value, or %NULL in case of an error
5126  *
5127  * The type for the function that is used to convert an object property
5128  * value to a #GVariant for storing it in #GSettings.
5129  */
5130
5131
5132 /**
5133  * GSettingsGetMapping:
5134  * @value: the #GVariant to map, or %NULL
5135  * @result: (out): the result of the mapping
5136  * @user_data: (closure): the user data that was passed to g_settings_get_mapped()
5137  * @returns: %TRUE if the conversion succeeded, %FALSE in case of an error
5138  *
5139  * The type of the function that is used to convert from a value stored
5140  * in a #GSettings to a value that is useful to the application.
5141  * If the value is successfully mapped, the result should be stored at
5142  * is not in the right format) then %FALSE should be returned.
5143  * If @value is %NULL then it means that the mapping function is being
5144  * given a "last chance" to successfully return a valid value.  %TRUE
5145  * must be returned in this case.
5146  */
5147
5148
5149 /**
5150  * GSignalAccumulator:
5151  * @ihint: Signal invocation hint, see #GSignalInvocationHint.
5152  * @return_accu: Accumulator to collect callback return values in, this is the return value of the current signal emission.
5153  * @handler_return: A #GValue holding the return value of the signal handler.
5154  * @data: Callback data that was specified when creating the signal.
5155  *
5156  * The signal accumulator is a special callback function that can be used
5157  * to collect return values of the various callbacks that are called
5158  * during a signal emission. The signal accumulator is specified at signal
5159  * creation time, if it is left %NULL, no accumulation of callback return
5160  * values is performed. The return value of signal emissions is then the
5161  * value returned by the last callback.
5162  * should be aborted. Returning %FALSE means to abort the
5163  * current emission and %TRUE is returned for continuation.
5164  *
5165  * Returns: The accumulator function returns whether the signal emission
5166  */
5167
5168
5169 /**
5170  * GSignalCMarshaller:
5171  *
5172  * This is the signature of marshaller functions, required to marshall
5173  * arrays of parameter values to signal emissions into C language callback
5174  * invocations. It is merely an alias to #GClosureMarshal since the #GClosure
5175  * mechanism takes over responsibility of actual function invocation for the
5176  * signal system.
5177  */
5178
5179
5180 /**
5181  * GSignalEmissionHook:
5182  * @ihint: Signal invocation hint, see #GSignalInvocationHint.
5183  * @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
5184  * @param_values: the instance on which the signal was emitted, followed by the parameters of the emission.
5185  * @data: user data associated with the hook.
5186  *
5187  * A simple function pointer to get invoked when the signal is emitted. This
5188  * allows you to tie a hook to the signal type, so that it will trap all
5189  * emissions of that signal, from any object.
5190  * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
5191  * hook is disconnected (and destroyed).
5192  *
5193  * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
5194  */
5195
5196
5197 /**
5198  * GSignalFlags:
5199  * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage.
5200  * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage.
5201  * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage.
5202  * @G_SIGNAL_NO_RECURSE: Signals being emitted for an object while currently being in emission for this very object will not be emitted recursively, but instead cause the first emission to be restarted.
5203  * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name upon handler connections and emissions.
5204  * @G_SIGNAL_ACTION: Action signals are signals that may freely be emitted on alive objects from user code via g_signal_emit() and friends, without the need of being embedded into extra code that performs pre or post emission adjustments on the object. They can also be thought of as object methods which can be called generically by third-party code.
5205  * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
5206  * @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the arguments, even if there are no signal handlers connected.  Since 2.30.
5207  *
5208  * The signal flags are used to specify a signal's behaviour, the overall
5209  * signal description outlines how especially the RUN flags control the
5210  * stages of a signal emission.
5211  */
5212
5213
5214 /**
5215  * GSignalInvocationHint:
5216  * @signal_id: The signal id of the signal invoking the callback
5217  * @detail: The detail passed on for this emission
5218  * @run_type: The stage the signal emission is currently in, this field will contain one of %G_SIGNAL_RUN_FIRST, %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP.
5219  *
5220  * The #GSignalInvocationHint structure is used to pass on additional information
5221  * to callbacks during a signal emission.
5222  */
5223
5224
5225 /**
5226  * GSignalMatchType:
5227  * @G_SIGNAL_MATCH_ID: The signal id must be equal.
5228  * @G_SIGNAL_MATCH_DETAIL: The signal detail be equal.
5229  * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same.
5230  * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same.
5231  * @G_SIGNAL_MATCH_DATA: The closure data must be the same.
5232  * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may matched.
5233  *
5234  * The match types specify what g_signal_handlers_block_matched(),
5235  * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
5236  * match signals by.
5237  */
5238
5239
5240 /**
5241  * GSignalQuery:
5242  * @signal_id: The signal id of the signal being queried, or 0 if the signal to be queried was unknown.
5243  * @signal_name: The signal name.
5244  * @itype: The interface/instance type that this signal can be emitted for.
5245  * @signal_flags: The signal flags as passed in to g_signal_new().
5246  * @return_type: The return type for user callbacks.
5247  * @n_params: The number of parameters that user callbacks take.
5248  * @param_types: The individual parameter types for user callbacks, note that the effective callback signature is: <programlisting> [#param_types param_names,] #gpointer     data2); </programlisting>
5249  *
5250  * A structure holding in-depth information for a specific signal. It is
5251  * filled in by the g_signal_query() function.
5252  */
5253
5254
5255 /**
5256  * GSimpleAction:
5257  *
5258  * The <structname>GSimpleAction</structname> structure contains private
5259  * data and should only be accessed using the provided API
5260  *
5261  * Since: 2.28
5262  */
5263
5264
5265 /**
5266  * GSimpleAction::activate:
5267  * @simple: the #GSimpleAction
5268  * @parameter: (allow-none): the parameter to the activation
5269  *
5270  * Indicates that the action was just activated.
5271  * an incorrect type was given, no signal will be emitted.
5272  *
5273  * Since: 2.28
5274  */
5275
5276
5277 /**
5278  * GSimpleAction:enabled:
5279  *
5280  * If @action is currently enabled.
5281  * If the action is disabled then calls to g_simple_action_activate() and
5282  * g_simple_action_set_state() have no effect.
5283  *
5284  * Since: 2.28
5285  */
5286
5287
5288 /**
5289  * GSimpleAction:name:
5290  *
5291  * The name of the action.  This is mostly meaningful for identifying
5292  * the action once it has been added to a #GSimpleActionGroup.
5293  *
5294  * Since: 2.28
5295  */
5296
5297
5298 /**
5299  * GSimpleAction:parameter-type:
5300  *
5301  * The type of the parameter that must be given when activating the
5302  * action.
5303  *
5304  * Since: 2.28
5305  */
5306
5307
5308 /**
5309  * GSimpleAction:state:
5310  *
5311  * The state of the action, or %NULL if the action is stateless.
5312  *
5313  * Since: 2.28
5314  */
5315
5316
5317 /**
5318  * GSimpleAction:state-type:
5319  *
5320  * The #GVariantType of the state that the action has, or %NULL if the
5321  * action is stateless.
5322  *
5323  * Since: 2.28
5324  */
5325
5326
5327 /**
5328  * GSimpleActionClass:
5329  * @activate: the class closure for the activate signal
5330  *
5331  *
5332  *
5333  * Since: 2.28
5334  */
5335
5336
5337 /**
5338  * GSimpleActionGroup:
5339  *
5340  * The #GSimpleActionGroup structure contains private data and should only be accessed using the provided API.
5341  *
5342  * Since: 2.28
5343  */
5344
5345
5346 /**
5347  * GSimpleAsyncResult:
5348  *
5349  * A simple implementation of #GAsyncResult.
5350  */
5351
5352
5353 /**
5354  * GSimpleAsyncThreadFunc:
5355  * @res: a #GSimpleAsyncResult.
5356  * @object: a #GObject.
5357  * @cancellable: optional #GCancellable object, %NULL to ignore.
5358  *
5359  * Simple thread function that runs an asynchronous operation and
5360  * checks for cancellation.
5361  */
5362
5363
5364 /**
5365  * GSimplePermission:
5366  *
5367  * #GSimplePermission is an opaque data structure.  There are no methods
5368  * except for those defined by #GPermission.
5369  */
5370
5371
5372 /**
5373  * GSocket:
5374  *
5375  * A lowlevel network socket object.
5376  *
5377  * Since: 2.22
5378  */
5379
5380
5381 /**
5382  * GSocket:timeout:
5383  *
5384  * The timeout in seconds on socket I/O
5385  *
5386  * Since: 2.26
5387  */
5388
5389
5390 /**
5391  * GSocketAddress:
5392  *
5393  * A socket endpoint address, corresponding to <type>struct sockaddr</type>
5394  * or one of its subtypes.
5395  */
5396
5397
5398 /**
5399  * GSocketAddressEnumerator:
5400  *
5401  * Enumerator type for objects that contain or generate
5402  * #GSocketAddress<!-- -->es.
5403  */
5404
5405
5406 /**
5407  * GSocketClient:
5408  *
5409  * A helper class for network servers to listen for and accept connections.
5410  *
5411  * Since: 2.22
5412  */
5413
5414
5415 /**
5416  * GSocketConnectable:
5417  *
5418  * Interface for objects that contain or generate #GSocketAddress<!-- -->es.
5419  */
5420
5421
5422 /**
5423  * GSocketConnectableIface:
5424  * @g_iface: The parent interface.
5425  * @enumerate: Creates a #GSocketAddressEnumerator
5426  * @proxy_enumerate: Creates a #GProxyAddressEnumerator
5427  *
5428  * Provides an interface for returning a #GSocketAddressEnumerator
5429  * and #GProxyAddressEnumerator
5430  */
5431
5432
5433 /**
5434  * GSocketConnection:
5435  *
5436  * A socket connection GIOStream object for connection-oriented sockets.
5437  *
5438  * Since: 2.22
5439  */
5440
5441
5442 /**
5443  * GSocketControlMessage:
5444  *
5445  * Base class for socket-type specific control messages that can be sent and
5446  * received over #GSocket.
5447  */
5448
5449
5450 /**
5451  * GSocketControlMessageClass:
5452  * @get_size: gets the size of the message.
5453  * @get_level: gets the protocol of the message.
5454  * @get_type: gets the protocol specific type of the message.
5455  * @serialize: Writes out the message data.
5456  * @deserialize: Tries to deserialize a message.
5457  *
5458  *
5459  */
5460
5461
5462 /**
5463  * GSocketFamily:
5464  * @G_SOCKET_FAMILY_INVALID: no address family
5465  * @G_SOCKET_FAMILY_IPV4: the IPv4 family
5466  * @G_SOCKET_FAMILY_IPV6: the IPv6 family
5467  * @G_SOCKET_FAMILY_UNIX: the UNIX domain family
5468  *
5469  * The protocol family of a #GSocketAddress. (These values are
5470  * identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX,
5471  * if available.)
5472  *
5473  * Since: 2.22
5474  */
5475
5476
5477 /**
5478  * GSocketListenerClass:
5479  * @changed: virtual method called when the set of socket listened to changes
5480  *
5481  *
5482  */
5483
5484
5485 /**
5486  * GSocketMsgFlags:
5487  * @G_SOCKET_MSG_NONE: No flags.
5488  * @G_SOCKET_MSG_OOB: Request to send/receive out of band data.
5489  * @G_SOCKET_MSG_PEEK: Read data from the socket without removing it from the queue.
5490  * @G_SOCKET_MSG_DONTROUTE: Don't use a gateway to send out the packet, only send to hosts on directly connected networks.
5491  *
5492  * Flags used in g_socket_receive_message() and g_socket_send_message().
5493  * The flags listed in the enum are some commonly available flags, but the
5494  * values used for them are the same as on the platform, and any other flags
5495  * are passed in/out as is. So to use a platform specific flag, just include
5496  * the right system header and pass in the flag.
5497  *
5498  * Since: 2.22
5499  */
5500
5501
5502 /**
5503  * GSocketProtocol:
5504  * @G_SOCKET_PROTOCOL_UNKNOWN: The protocol type is unknown
5505  * @G_SOCKET_PROTOCOL_DEFAULT: The default protocol for the family/type
5506  * @G_SOCKET_PROTOCOL_TCP: TCP over IP
5507  * @G_SOCKET_PROTOCOL_UDP: UDP over IP
5508  * @G_SOCKET_PROTOCOL_SCTP: SCTP over IP
5509  *
5510  * A protocol identifier is specified when creating a #GSocket, which is a
5511  * family/type specific identifier, where 0 means the default protocol for
5512  * the particular family/type.
5513  * This enum contains a set of commonly available and used protocols. You
5514  * can also pass any other identifiers handled by the platform in order to
5515  * use protocols not listed here.
5516  *
5517  * Since: 2.22
5518  */
5519
5520
5521 /**
5522  * GSocketService:
5523  *
5524  * A helper class for handling accepting incomming connections in the
5525  * glib mainloop.
5526  *
5527  * Since: 2.22
5528  */
5529
5530
5531 /**
5532  * GSocketService::incoming:
5533  * @service: the #GSocketService
5534  * @connection: a new #GSocketConnection object
5535  * @source_object: the source_object passed to g_socket_listener_add_address()
5536  *
5537  * The ::incoming signal is emitted when a new incoming connection
5538  * to @service needs to be handled. The handler must initiate the
5539  * handling of @connection, but may not block; in essence,
5540  * asynchronous operations must be used.
5541  * so you need to ref it yourself if you are planning to use it.
5542  *
5543  * Returns: %TRUE to stop other handlers from being called
5544  * Since: 2.22
5545  */
5546
5547
5548 /**
5549  * GSocketServiceClass:
5550  * @incomming: signal emitted when new connections are accepted
5551  *
5552  *
5553  */
5554
5555
5556 /**
5557  * GSocketSourceFunc:
5558  * @socket: the #GSocket
5559  * @condition: the current condition at the source fired.
5560  * @user_data: data passed in by the user.
5561  *
5562  * This is the function type of the callback used for the #GSource
5563  * returned by g_socket_create_source().
5564  *
5565  * Returns: it should return %FALSE if the source should be removed.
5566  * Since: 2.22
5567  */
5568
5569
5570 /**
5571  * GSocketType:
5572  * @G_SOCKET_TYPE_INVALID: Type unknown or wrong
5573  * @G_SOCKET_TYPE_STREAM: Reliable connection-based byte streams (e.g. TCP).
5574  * @G_SOCKET_TYPE_DATAGRAM: Connectionless, unreliable datagram passing. (e.g. UDP)
5575  * @G_SOCKET_TYPE_SEQPACKET: Reliable connection-based passing of datagrams of fixed maximum length (e.g. SCTP).
5576  *
5577  * Flags used when creating a #GSocket. Some protocols may not implement
5578  * all the socket types.
5579  *
5580  * Since: 2.22
5581  */
5582
5583
5584 /**
5585  * GSource:
5586  *
5587  * The <structname>GSource</structname> struct is an opaque data type
5588  * representing an event source.
5589  */
5590
5591
5592 /**
5593  * GSourceCallbackFuncs:
5594  * @ref: Called when a reference is added to the callback object
5595  * @unref: Called when a reference to the callback object is dropped
5596  * @get: Called to extract the callback function and data from the callback object.
5597  *
5598  * The <structname>GSourceCallbackFuncs</structname> struct contains
5599  * functions for managing callback objects.
5600  */
5601
5602
5603 /**
5604  * GSourceDummyMarshal:
5605  *
5606  * This is just a placeholder for #GClosureMarshal,
5607  * which cannot be used here for dependency reasons.
5608  */
5609
5610
5611 /**
5612  * GSourceFunc:
5613  * @data: data passed to the function, set when the source was created with one of the above functions
5614  *
5615  * Specifies the type of function passed to g_timeout_add(),
5616  * g_timeout_add_full(), g_idle_add(), and g_idle_add_full().
5617  *
5618  * Returns: %FALSE if the source should be removed
5619  */
5620
5621
5622 /**
5623  * GSourceFuncs:
5624  * @prepare: Called before all the file descriptors are polled. If the source can determine that it is ready here (without waiting for the results of the poll() call) it should return %TRUE. It can also return a @timeout_ value which should be the maximum timeout (in milliseconds) which should be passed to the poll() call. The actual timeout used will be -1 if all sources returned -1, or it will be the minimum of all the
5625  * @check: Called after all the file descriptors are polled. The source should return %TRUE if it is ready to be dispatched. Note that some time may have passed since the previous prepare function was called, so the source should be checked again here.
5626  * @dispatch: Called to dispatch the event source, after it has returned %TRUE in either its @prepare or its @check function. The @dispatch function is passed in a callback function and data. The callback function may be %NULL if the source was never connected to a callback using g_source_set_callback(). The @dispatch function should call the callback function with @user_data and whatever additional parameters are needed for this type of event source.
5627  * @finalize: Called when the source is finalized.
5628  *
5629  * The <structname>GSourceFuncs</structname> struct contains a table of
5630  * functions used to handle event sources in a generic manner.
5631  * For idle sources, the prepare and check functions always return %TRUE
5632  * to indicate that the source is always ready to be processed. The prepare
5633  * function also returns a timeout value of 0 to ensure that the poll() call
5634  * doesn't block (since that would be time wasted which could have been spent
5635  * running the idle function).
5636  * For timeout sources, the prepare and check functions both return %TRUE
5637  * if the timeout interval has expired. The prepare function also returns
5638  * a timeout value to ensure that the poll() call doesn't block too long
5639  * and miss the next timeout.
5640  * For file descriptor sources, the prepare function typically returns %FALSE,
5641  * since it must wait until poll() has been called before it knows whether
5642  * any events need to be processed. It sets the returned timeout to -1 to
5643  * indicate that it doesn't mind how long the poll() call blocks. In the
5644  * check function, it tests the results of the poll() call to see if the
5645  * required condition has been met, and returns %TRUE if so.
5646  */
5647
5648
5649 /**
5650  * GSrvTarget:
5651  *
5652  * A single target host/port that a network service is running on.
5653  */
5654
5655
5656 /**
5657  * GStrv:
5658  *
5659  * A C representable type name for #G_TYPE_STRV.
5660  */
5661
5662
5663 /**
5664  * GTcpConnection:
5665  *
5666  * A #GSocketConnection for TCP/IP connections.
5667  *
5668  * Since: 2.22
5669  */
5670
5671
5672 /**
5673  * GTestLogFatalFunc:
5674  * @log_domain: the log domain of the message
5675  * @log_level: the log level of the message (including the fatal and recursion flags)
5676  * @message: the message to process
5677  * @user_data: user data, set in g_test_log_set_fatal_handler()
5678  *
5679  * Specifies the prototype of fatal log handler functions.
5680  *
5681  * Returns: %TRUE if the program should abort, %FALSE otherwise
5682  * Since: 2.22
5683  */
5684
5685
5686 /**
5687  * GThemedIcon:
5688  *
5689  * An implementation of #GIcon for themed icons.
5690  */
5691
5692
5693 /**
5694  * GThemedIcon:name:
5695  *
5696  * The icon name.
5697  */
5698
5699
5700 /**
5701  * GThemedIcon:names:
5702  *
5703  * A %NULL-terminated array of icon names.
5704  */
5705
5706
5707 /**
5708  * GThemedIcon:use-default-fallbacks:
5709  *
5710  * Whether to use the default fallbacks found by shortening the icon name
5711  * at '-' characters. If the "names" array has more than one element,
5712  * ignores any past the first.
5713  * For example, if the icon name was "gnome-dev-cdrom-audio", the array
5714  * would become
5715  * |[
5716  * {
5717  * "gnome-dev-cdrom-audio",
5718  * "gnome-dev-cdrom",
5719  * "gnome-dev",
5720  * "gnome",
5721  * NULL
5722  * };
5723  * ]|
5724  */
5725
5726
5727 /**
5728  * GThreadedSocketService:
5729  *
5730  * A helper class for handling accepting incomming connections in the
5731  * glib mainloop and handling them in a thread.
5732  *
5733  * Since: 2.22
5734  */
5735
5736
5737 /**
5738  * GThreadedSocketService::run:
5739  * @service: the #GThreadedSocketService.
5740  * @connection: a new #GSocketConnection object.
5741  * @source_object: the source_object passed to g_socket_listener_add_address().
5742  *
5743  * The ::run signal is emitted in a worker thread in response to an
5744  * incoming connection. This thread is dedicated to handling
5745  * not return until the connection is closed.
5746  *
5747  * Returns: %TRUE to stop further signal handlers from being called
5748  */
5749
5750
5751 /**
5752  * GTimeSpan:
5753  *
5754  * A value representing an interval of time, in microseconds.
5755  *
5756  * Since: 2.26
5757  */
5758
5759
5760 /**
5761  * GTimeType:
5762  * @G_TIME_TYPE_STANDARD: the time is in local standard time
5763  * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time
5764  * @G_TIME_TYPE_UNIVERSAL: the time is in UTC
5765  *
5766  * Disambiguates a given time in two ways.
5767  * First, specifies if the given time is in universal or local time.
5768  * Second, if the time is in local time, specifies if it is local
5769  * standard time or local daylight time.  This is important for the case
5770  * where the same local time occurs twice (during daylight savings time
5771  * transitions, for example).
5772  */
5773
5774
5775 /**
5776  * GTimeZoneMonitor:
5777  *
5778  * This is an opaque structure type.
5779  */
5780
5781
5782 /**
5783  * GTimeZoneMonitor::changed:
5784  * @monitor: the #GTimeZoneMonitor
5785  *
5786  * Indicates that the local timezone has changed.
5787  * The g_time_zone_refresh_local() function is called just before this
5788  * signal is emitted, so any new #GTimeZone or #GDateTime instances
5789  * created from signal handlers will be as per the new timezone.
5790  * Note that this signal is not emitted in response to entering or
5791  * exiting daylight savings time within a given timezone.  It's only
5792  * for when the user has changed the timezone to that of a different
5793  * location.
5794  */
5795
5796
5797 /**
5798  * GTlsAuthenticationMode:
5799  * @G_TLS_AUTHENTICATION_NONE: client authentication not required
5800  * @G_TLS_AUTHENTICATION_REQUESTED: client authentication is requested
5801  * @G_TLS_AUTHENTICATION_REQUIRED: client authentication is required
5802  *
5803  * The client authentication mode for a #GTlsServerConnection.
5804  *
5805  * Since: 2.28
5806  */
5807
5808
5809 /**
5810  * GTlsBackend:
5811  *
5812  * TLS (Transport Layer Security, aka SSL) backend. This is an
5813  * internal type used to coordinate the different classes implemented
5814  * by a TLS backend.
5815  *
5816  * Since: 2.28
5817  */
5818
5819
5820 /**
5821  * GTlsBackendInterface:
5822  * @g_iface: The parent interface.
5823  * @get_certificate_type: returns the #GTlsCertificate implementation type
5824  * @get_client_connection_type: returns the #GTlsClientConnection implementation type
5825  * @get_server_connection_type: returns the #GTlsServerConnection implementation type
5826  *
5827  * Provides an interface for describing TLS-related types.
5828  *
5829  * Since: 2.28
5830  */
5831
5832
5833 /**
5834  * GTlsCertificate:
5835  *
5836  * Abstract base class for TLS certificate types.
5837  *
5838  * Since: 2.28
5839  */
5840
5841
5842 /**
5843  * GTlsCertificate:certificate:
5844  *
5845  * The DER (binary) encoded representation of the certificate's
5846  * public key. This property and the
5847  * #GTlsCertificate:certificate-pem property represent the same
5848  * data, just in different forms.
5849  *
5850  * Since: 2.28
5851  */
5852
5853
5854 /**
5855  * GTlsCertificate:certificate-pem:
5856  *
5857  * The PEM (ASCII) encoded representation of the certificate's
5858  * public key. This property and the #GTlsCertificate:certificate
5859  * property represent the same data, just in different forms.
5860  *
5861  * Since: 2.28
5862  */
5863
5864
5865 /**
5866  * GTlsCertificate:issuer:
5867  *
5868  * A #GTlsCertificate representing the entity that issued this
5869  * certificate. If %NULL, this means that the certificate is either
5870  * self-signed, or else the certificate of the issuer is not
5871  * available.
5872  *
5873  * Since: 2.28
5874  */
5875
5876
5877 /**
5878  * GTlsCertificate:private-key:
5879  *
5880  * The DER (binary) encoded representation of the certificate's
5881  * private key. This property (or the
5882  * #GTlsCertificate:private-key-pem property) can be set when
5883  * constructing a key (eg, from a file), but cannot be read.
5884  *
5885  * Since: 2.28
5886  */
5887
5888
5889 /**
5890  * GTlsCertificate:private-key-pem:
5891  *
5892  * The PEM (ASCII) encoded representation of the certificate's
5893  * private key. This property (or the #GTlsCertificate:private-key
5894  * property) can be set when constructing a key (eg, from a file),
5895  * but cannot be read.
5896  *
5897  * Since: 2.28
5898  */
5899
5900
5901 /**
5902  * GTlsCertificateFlags:
5903  * @G_TLS_CERTIFICATE_UNKNOWN_CA: The signing certificate authority is not known.
5904  * @G_TLS_CERTIFICATE_BAD_IDENTITY: The certificate does not match the expected identity of the site that it was retrieved from.
5905  * @G_TLS_CERTIFICATE_NOT_ACTIVATED: The certificate's activation time is still in the future
5906  * @G_TLS_CERTIFICATE_EXPIRED: The certificate has expired
5907  * @G_TLS_CERTIFICATE_REVOKED: The certificate has been revoked according to the #GTlsConnection's certificate revocation list.
5908  * @G_TLS_CERTIFICATE_INSECURE: The certificate's algorithm is considered insecure.
5909  * @G_TLS_CERTIFICATE_GENERIC_ERROR: Some other error occurred validating the certificate
5910  * @G_TLS_CERTIFICATE_VALIDATE_ALL: the combination of all of the above flags
5911  *
5912  * A set of flags describing TLS certification validation. This can be
5913  * used to set which validation steps to perform (eg, with
5914  * g_tls_client_connection_set_validation_flags()), or to describe why
5915  * a particular certificate was rejected (eg, in
5916  * #GTlsConnection::accept-certificate).
5917  *
5918  * Since: 2.28
5919  */
5920
5921
5922 /**
5923  * GTlsClientConnection:
5924  *
5925  * TLS client-side connection; the client-side implementation of a
5926  * #GTlsConnection
5927  *
5928  * Since: 2.28
5929  */
5930
5931
5932 /**
5933  * GTlsClientConnection:accepted-cas:
5934  *
5935  * A list of the distinguished names of the Certificate Authorities
5936  * that the server will accept client certificates signed by. If the
5937  * server requests a client certificate during the handshake, then
5938  * this property will be set after the handshake completes.
5939  * Each item in the list is a #GByteArray which contains the complete
5940  * subject DN of the certificate authority.
5941  *
5942  * Since: 2.28
5943  */
5944
5945
5946 /**
5947  * GTlsClientConnection:server-identity:
5948  *
5949  * A #GSocketConnectable describing the identity of the server that
5950  * is expected on the other end of the connection.
5951  * If the %G_TLS_CERTIFICATE_BAD_IDENTITY flag is set in
5952  * #GTlsClientConnection:validation-flags, this object will be used
5953  * to determine the expected identify of the remote end of the
5954  * connection; if #GTlsClientConnection:server-identity is not set,
5955  * or does not match the identity presented by the server, then the
5956  * %G_TLS_CERTIFICATE_BAD_IDENTITY validation will fail.
5957  * In addition to its use in verifying the server certificate,
5958  * this is also used to give a hint to the server about what
5959  * certificate we expect, which is useful for servers that serve
5960  * virtual hosts.
5961  *
5962  * Since: 2.28
5963  */
5964
5965
5966 /**
5967  * GTlsClientConnection:use-ssl3:
5968  *
5969  * If %TRUE, tells the connection to use SSL 3.0 rather than trying
5970  * to negotiate the best version of TLS or SSL to use. This can be
5971  * used when talking to servers that don't implement version
5972  * negotiation correctly and therefore refuse to handshake at all with
5973  * a "modern" TLS handshake.
5974  *
5975  * Since: 2.28
5976  */
5977
5978
5979 /**
5980  * GTlsClientConnection:validation-flags:
5981  *
5982  * What steps to perform when validating a certificate received from
5983  * a server. Server certificates that fail to validate in all of the
5984  * ways indicated here will be rejected unless the application
5985  * overrides the default via #GTlsConnection::accept-certificate.
5986  *
5987  * Since: 2.28
5988  */
5989
5990
5991 /**
5992  * GTlsConnection:
5993  *
5994  * TLS connection. This is an abstract type that will be subclassed by
5995  * a TLS-library-specific subtype.
5996  *
5997  * Since: 2.28
5998  */
5999
6000
6001 /**
6002  * GTlsConnection::accept-certificate:
6003  * @conn: a #GTlsConnection
6004  * @peer_cert: the peer's #GTlsCertificate
6005  * @errors: the problems with @peer_cert.
6006  *
6007  * Emitted during the TLS handshake after the peer certificate has
6008  * been received. You can examine @peer_cert's certification path by
6009  * calling g_tls_certificate_get_issuer() on it.
6010  * For a client-side connection, @peer_cert is the server's
6011  * certificate, and the signal will only be emitted if the
6012  * certificate was not acceptable according to @conn's
6013  * #GTlsClientConnection:validation_flags. If you would like the
6014  * certificate to be accepted despite @errors, return %TRUE from the
6015  * signal handler. Otherwise, if no handler accepts the certificate,
6016  * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE.
6017  * For a server-side connection, @peer_cert is the certificate
6018  * presented by the client, if this was requested via the server's
6019  * #GTlsServerConnection:authentication_mode. On the server side,
6020  * the signal is always emitted when the client presents a
6021  * certificate, and the certificate will only be accepted if a
6022  * handler returns %TRUE.
6023  * Note that if this signal is emitted as part of asynchronous I/O
6024  * in the main thread, then you should not attempt to interact with
6025  * the user before returning from the signal handler. If you want to
6026  * let the user decide whether or not to accept the certificate, you
6027  * would have to return %FALSE from the signal handler on the first
6028  * attempt, and then after the connection attempt returns a
6029  * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if
6030  * the user decides to accept the certificate, remember that fact,
6031  * create a new connection, and return %TRUE from the signal handler
6032  * the next time.
6033  * If you are doing I/O in another thread, you do not
6034  * need to worry about this, and can simply block in the signal
6035  * handler until the UI thread returns an answer.
6036  * immediately end the signal emission). %FALSE to allow the signal
6037  * emission to continue, which will cause the handshake to fail if
6038  * no one else overrides it.
6039  *
6040  * Returns: %TRUE to accept @peer_cert (which will also
6041  * Since: 2.28
6042  */
6043
6044
6045 /**
6046  * GTlsConnection:base-io-stream:
6047  *
6048  * The #GIOStream that the connection wraps
6049  *
6050  * Since: 2.28
6051  */
6052
6053
6054 /**
6055  * GTlsConnection:certificate:
6056  *
6057  * The connection's certificate; see
6058  * g_tls_connection_set_certificate().
6059  *
6060  * Since: 2.28
6061  */
6062
6063
6064 /**
6065  * GTlsConnection:peer-certificate:
6066  *
6067  * The connection's peer's certificate, after the TLS handshake has
6068  * completed and the certificate has been accepted. Note in
6069  * particular that this is not yet set during the emission of
6070  * #GTlsConnection::accept-certificate.
6071  * (You can watch for a #GObject::notify signal on this property to
6072  * detect when a handshake has occurred.)
6073  *
6074  * Since: 2.28
6075  */
6076
6077
6078 /**
6079  * GTlsConnection:peer-certificate-errors:
6080  *
6081  * The errors noticed-and-ignored while verifying
6082  * #GTlsConnection:peer-certificate. Normally this should be 0, but
6083  * it may not be if #GTlsClientConnection:validation-flags is not
6084  * %G_TLS_CERTIFICATE_VALIDATE_ALL, or if
6085  * #GTlsConnection::accept-certificate overrode the default
6086  * behavior.
6087  *
6088  * Since: 2.28
6089  */
6090
6091
6092 /**
6093  * GTlsConnection:rehandshake-mode:
6094  *
6095  * The rehandshaking mode. See
6096  * g_tls_connection_set_rehandshake_mode().
6097  *
6098  * Since: 2.28
6099  */
6100
6101
6102 /**
6103  * GTlsConnection:require-close-notify:
6104  *
6105  * Whether or not proper TLS close notification is required.
6106  * See g_tls_connection_set_require_close_notify().
6107  *
6108  * Since: 2.28
6109  */
6110
6111
6112 /**
6113  * GTlsConnection:use-system-certdb:
6114  *
6115  * Whether or not the system certificate database will be used to
6116  * verify peer certificates. See
6117  * g_tls_connection_set_use_system_certdb().
6118  *
6119  * Since: 2.28
6120  */
6121
6122
6123 /**
6124  * GTlsError:
6125  * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available
6126  * @G_TLS_ERROR_MISC: Miscellaneous TLS error
6127  * @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed
6128  * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the peer does not seem to be a TLS server.
6129  * @G_TLS_ERROR_HANDSHAKE: The TLS handshake failed because the peer's certificate was not acceptable.
6130  * @G_TLS_ERROR_CERTIFICATE_REQUIRED: The TLS handshake failed because the server requested a client-side certificate, but none was provided. See g_tls_connection_set_certificate().
6131  * @G_TLS_ERROR_EOF: The TLS connection was closed without proper notice, which may indicate an attack. See g_tls_connection_set_require_close_notify().
6132  *
6133  * An error code used with %G_TLS_ERROR in a #GError returned from a
6134  * TLS-related routine.
6135  *
6136  * Since: 2.28
6137  */
6138
6139
6140 /**
6141  * GTlsRehandshakeMode:
6142  * @G_TLS_REHANDSHAKE_NEVER: Never allow rehandshaking
6143  * @G_TLS_REHANDSHAKE_SAFELY: Allow safe rehandshaking only
6144  * @G_TLS_REHANDSHAKE_UNSAFELY: Allow unsafe rehandshaking
6145  *
6146  * When to allow rehandshaking. See
6147  * g_tls_connection_set_rehandshake_mode().
6148  *
6149  * Since: 2.28
6150  */
6151
6152
6153 /**
6154  * GTlsServerConnection:
6155  *
6156  * TLS server-side connection. This is the server-side implementation
6157  * of a #GTlsConnection.
6158  *
6159  * Since: 2.28
6160  */
6161
6162
6163 /**
6164  * GTlsServerConnection:authentication-mode:
6165  *
6166  * The #GTlsAuthenticationMode for the server. This can be changed
6167  * before calling g_tls_connection_handshake() if you want to
6168  * rehandshake with a different mode from the initial handshake.
6169  *
6170  * Since: 2.28
6171  */
6172
6173
6174 /**
6175  * GToggleNotify:
6176  * @data: Callback data passed to g_object_add_toggle_ref()
6177  * @object: The object on which g_object_add_toggle_ref() was called.
6178  * @is_last_ref: %TRUE if the toggle reference is now the last reference to the object. %FALSE if the toggle reference was the last reference and there are now other references.
6179  *
6180  * A callback function used for notification when the state
6181  * of a toggle reference changes. See g_object_add_toggle_ref().
6182  */
6183
6184
6185 /**
6186  * GTranslateFunc:
6187  * @str: the untranslated string
6188  * @data: user data specified when installing the function, e.g. in g_option_group_set_translate_func()
6189  *
6190  * The type of functions which are used to translate user-visible
6191  * strings, for <option>--help</option> output.
6192  * The returned string is owned by GLib and must not be freed.
6193  *
6194  * Returns: a translation of the string for the current locale.
6195  */
6196
6197
6198 /**
6199  * GType:
6200  *
6201  * A numerical value which represents the unique identifier of a registered
6202  * type.
6203  */
6204
6205
6206 /**
6207  * GTypeClass:
6208  *
6209  * An opaque structure used as the base of all classes.
6210  */
6211
6212
6213 /**
6214  * GTypeClassCacheFunc:
6215  * @cache_data: data that was given to the g_type_add_class_cache_func() call
6216  * @g_class: The #GTypeClass structure which is unreferenced
6217  *
6218  * A callback function which is called when the reference count of a class
6219  * drops to zero. It may use g_type_class_ref() to prevent the class from
6220  * being freed. You should not call g_type_class_unref() from a
6221  * #GTypeClassCacheFunc function to prevent infinite recursion, use
6222  * g_type_class_unref_uncached() instead.
6223  * The functions have to check the class id passed in to figure
6224  * whether they actually want to cache the class of this type, since all
6225  * classes are routed through the same #GTypeClassCacheFunc chain.
6226  * called, %FALSE to continue.
6227  *
6228  * Returns: %TRUE to stop further #GTypeClassCacheFunc<!-- -->s from being
6229  */
6230
6231
6232 /**
6233  * GTypeDebugFlags:
6234  * @G_TYPE_DEBUG_NONE: Print no messages.
6235  * @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping.
6236  * @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions.
6237  * @G_TYPE_DEBUG_MASK: Mask covering all debug flags.
6238  *
6239  * The <type>GTypeDebugFlags</type> enumeration values can be passed to
6240  * g_type_init_with_debug_flags() to trigger debugging messages during runtime.
6241  * Note that the messages can also be triggered by setting the
6242  * <envar>GOBJECT_DEBUG</envar> environment variable to a ':'-separated list of
6243  * "objects" and "signals".
6244  */
6245
6246
6247 /**
6248  * GTypeFlags:
6249  * @G_TYPE_FLAG_ABSTRACT: Indicates an abstract type. No instances can be created for an abstract type.
6250  * @G_TYPE_FLAG_VALUE_ABSTRACT: Indicates an abstract value type, i.e. a type that introduces a value table, but can't be used for g_value_init().
6251  *
6252  * Bit masks used to check or determine characteristics of a type.
6253  */
6254
6255
6256 /**
6257  * GTypeFundamentalFlags:
6258  * @G_TYPE_FLAG_CLASSED: Indicates a classed type.
6259  * @G_TYPE_FLAG_INSTANTIATABLE: Indicates an instantiable type (implies classed).
6260  * @G_TYPE_FLAG_DERIVABLE: Indicates a flat derivable type.
6261  * @G_TYPE_FLAG_DEEP_DERIVABLE: Indicates a deep derivable type (implies derivable).
6262  *
6263  * Bit masks used to check or determine specific characteristics of a
6264  * fundamental type.
6265  */
6266
6267
6268 /**
6269  * GTypeFundamentalInfo:
6270  * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type
6271  *
6272  * A structure that provides information to the type system which is
6273  * used specifically for managing fundamental types.
6274  */
6275
6276
6277 /**
6278  * GTypeInfo:
6279  * @class_size: Size of the class structure (required for interface, classed and instantiatable types).
6280  * @base_init: Location of the base initialization function (optional).
6281  * @base_finalize: Location of the base finalization function (optional).
6282  * @class_init: Location of the class initialization function for classed and instantiatable types. Location of the default vtable inititalization function for interface types. (optional) This function is used both to fill in virtual functions in the class or default vtable, and to do type-specific setup such as registering signals and object properties.
6283  * @class_finalize: Location of the class finalization function for classed and instantiatable types. Location fo the default vtable finalization function for interface types. (optional)
6284  * @class_data: User-supplied data passed to the class init/finalize functions.
6285  * @instance_size: Size of the instance (object) structure (required for instantiatable types only).
6286  * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
6287  * @instance_init: Location of the instance initialization function (optional, for instantiatable types only).
6288  * @value_table: A #GTypeValueTable function table for generic handling of GValues of this type (usually only useful for fundamental types).
6289  *
6290  * This structure is used to provide the type system with the information
6291  * required to initialize and destruct (finalize) a type's class and
6292  * its instances.
6293  * The initialized structure is passed to the g_type_register_static() function
6294  * (or is copied into the provided #GTypeInfo structure in the
6295  * g_type_plugin_complete_type_info()). The type system will perform a deep
6296  * copy of this structure, so its memory does not need to be persistent
6297  * across invocation of g_type_register_static().
6298  */
6299
6300
6301 /**
6302  * GTypeInstance:
6303  *
6304  * An opaque structure used as the base of all type instances.
6305  */
6306
6307
6308 /**
6309  * GTypeInterface:
6310  *
6311  * An opaque structure used as the base of all interface types.
6312  */
6313
6314
6315 /**
6316  * GTypeInterfaceCheckFunc:
6317  * @check_data: data passed to g_type_add_interface_check().
6318  * @g_iface: the interface that has been initialized
6319  *
6320  * A callback called after an interface vtable is initialized.
6321  * See g_type_add_interface_check().
6322  *
6323  * Since: 2.4
6324  */
6325
6326
6327 /**
6328  * GTypeModule:
6329  * @name: the name of the module
6330  *
6331  * The members of the <structname>GTypeModule</structname> structure should not
6332  * be accessed directly, except for the @name field.
6333  */
6334
6335
6336 /**
6337  * GTypeModuleClass:
6338  * @parent_class: the parent class
6339  * @load: loads the module and registers one or more types using g_type_module_register_type().
6340  * @unload: unloads the module
6341  *
6342  * In order to implement dynamic loading of types based on #GTypeModule,
6343  * the @load and @unload functions in #GTypeModuleClass must be implemented.
6344  */
6345
6346
6347 /**
6348  * GTypePlugin:
6349  *
6350  * The <structname>GTypePlugin</structname> typedef is used as a placeholder
6351  * for objects that implement the <structname>GTypePlugin</structname>
6352  * interface.
6353  */
6354
6355
6356 /**
6357  * GTypePluginClass:
6358  * @use_plugin: Increases the use count of the plugin.
6359  * @unuse_plugin: Decreases the use count of the plugin.
6360  * @complete_type_info: Fills in the #GTypeInfo and #GTypeValueTable structs for the type. The structs are initialized with <literal>memset(s, 0, sizeof (s))</literal> before calling this function.
6361  * @complete_interface_info: Fills in missing parts of the #GInterfaceInfo for the interface. The structs is initialized with <literal>memset(s, 0, sizeof (s))</literal> before calling this function.
6362  *
6363  * The #GTypePlugin interface is used by the type system in order to handle
6364  * the lifecycle of dynamically loaded types.
6365  */
6366
6367
6368 /**
6369  * GTypePluginCompleteInterfaceInfo:
6370  * @plugin: the #GTypePlugin
6371  * @instance_type: the #GType of an instantiable type to which the interface is added
6372  * @interface_type: the #GType of the interface whose info is completed
6373  * @info: the #GInterfaceInfo to fill in
6374  *
6375  * The type of the @complete_interface_info function of #GTypePluginClass.
6376  */
6377
6378
6379 /**
6380  * GTypePluginCompleteTypeInfo:
6381  * @plugin: the #GTypePlugin
6382  * @g_type: the #GType whose info is completed
6383  * @info: the #GTypeInfo struct to fill in
6384  * @value_table: the #GTypeValueTable to fill in
6385  *
6386  * The type of the @complete_type_info function of #GTypePluginClass.
6387  */
6388
6389
6390 /**
6391  * GTypePluginUnuse:
6392  * @plugin: the #GTypePlugin whose use count should be decreased
6393  *
6394  * The type of the @unuse_plugin function of #GTypePluginClass.
6395  */
6396
6397
6398 /**
6399  * GTypePluginUse:
6400  * @plugin: the #GTypePlugin whose use count should be increased
6401  *
6402  * The type of the @use_plugin function of #GTypePluginClass, which gets called
6403  * to increase the use count of @plugin.
6404  */
6405
6406
6407 /**
6408  * GTypeQuery:
6409  * @type: the #GType value of the type.
6410  * @type_name: the name of the type.
6411  * @class_size: the size of the class structure.
6412  * @instance_size: the size of the instance structure.
6413  *
6414  * A structure holding information for a specific type. It is
6415  * filled in by the g_type_query() function.
6416  */
6417
6418
6419 /**
6420  * GTypeValueTable:
6421  * @value_init: Default initialize @values contents by poking values directly into the value->data array. The data array of the #GValue passed into this function was zero-filled with <function>memset()</function>, so no care has to be taken to free any old contents. E.g. for the implementation of a string value that may never be %NULL, the implementation might look like: |[ value->data[0].v_pointer = g_strdup (""); ]|
6422  * @value_free: Free any old contents that might be left in the data array of the passed in @value. No resources may remain allocated through the #GValue contents after this function returns. E.g. for our above string type: |[ // only free strings without a specific flag for static storage if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)) g_free (value->data[0].v_pointer); ]|
6423  * @value_copy: @dest_value is a #GValue with zero-filled data section and @src_value is a properly setup #GValue of same or derived type. The purpose of this function is to copy the contents of remain valid. String type example: |[ dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); ]|
6424  * @value_peek_pointer: If the value contents fit into a pointer, such as objects or strings, return this pointer, so the caller can peek at the current contents. To extend on our above string example: |[ return value->data[0].v_pointer; ]|
6425  * @collect_format: A string format describing how to collect the contents of this value bit-by-bit. Each character in the format represents an argument to be collected, and the characters themselves indicate the type of the argument. Currently supported arguments are: <variablelist> <varlistentry><term /><listitem><para> 'i' - Integers. passed as collect_values[].v_int. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'l' - Longs. passed as collect_values[].v_long. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'd' - Doubles. passed as collect_values[].v_double. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'p' - Pointers. passed as collect_values[].v_pointer. </para></listitem></varlistentry> </variablelist> It should be noted that for variable argument list construction, ANSI C promotes every type smaller than an integer to an int, and floats to doubles. So for collection of short int or char, 'i' needs to be used, and for collection of floats 'd'.
6426  * @collect_value: The collect_value() function is responsible for converting the values collected from a variable argument list into contents suitable for storage in a GValue. This function should setup does not allow %NULL pointers, it needs to either spew an error, or do an implicit conversion by storing an empty string. The @value passed in to this function has a zero-filled data array, so just like for value_init() it is guaranteed to not contain any old contents that might need freeing. and @collect_values is an array of unions #GTypeCValue with length @n_collect_values, containing the collected values according to @collect_format. It may contain the flag %G_VALUE_NOCOPY_CONTENTS indicating, that the collected value contents may be considered "static" for the duration of the @value lifetime. Thus an extra copy of the contents stored in @collect_values is not required for assignment to @value. For our above string example, we continue with: |[ if (!collect_values[0].v_pointer) value->data[0].v_pointer = g_strdup (""); else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { value->data[0].v_pointer = collect_values[0].v_pointer; // keep a flag for the value_free() implementation to not free this string value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS; } else value->data[0].v_pointer = g_strdup (collect_values[0].v_pointer); return NULL; ]| It should be noted, that it is generally a bad idea to follow the #G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to reentrancy requirements and reference count assertions performed by the #GSignal code, reference counts should always be incremented for reference counted contents stored in the value->data array. To deviate from our string example for a moment, and taking a look at an exemplary implementation for collect_value() of #GObject: |[ if (collect_values[0].v_pointer) { GObject *object = G_OBJECT (collect_values[0].v_pointer); // never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types value->data[0].v_pointer = g_object_ref (object); return NULL; } else return g_strdup_printf ("Object passed as invalid NULL pointer"); } ]| The reference count for valid objects is always incremented, regardless of @collect_flags. For invalid objects, the example returns a newly allocated string without altering @value. Upon success, collect_value() needs to return %NULL. If, however, an error condition occurred, collect_value() may spew an error by returning a newly allocated non-%NULL string, giving a suitable description of the error condition. The calling code makes no assumptions about the @value contents being valid upon error returns, @value is simply thrown away without further freeing. As such, it is a good idea to not allocate #GValue contents, prior to returning an error, however, collect_values() is not obliged to return a correctly setup @value for error returns, simply because any non-%NULL return is considered a fatal condition so further program behaviour is undefined.
6427  * @lcopy_format: Format description of the arguments to collect for @lcopy_value, analogous to @collect_format. Usually, @lcopy_format string consists only of 'p's to provide lcopy_value() with pointers to storage locations.
6428  * @lcopy_value: This function is responsible for storing the @value contents into arguments passed through a variable argument list which got collected into @collect_values according to @lcopy_format. and @collect_flags may contain %G_VALUE_NOCOPY_CONTENTS. In contrast to collect_value(), lcopy_value() is obliged to always properly support %G_VALUE_NOCOPY_CONTENTS. Similar to collect_value() the function may prematurely abort by returning a newly allocated string describing an error condition. To complete the string example: |[ gchar **string_p = collect_values[0].v_pointer; if (!string_p) return g_strdup_printf ("string location passed as NULL"); if (collect_flags & G_VALUE_NOCOPY_CONTENTS) *string_p = value->data[0].v_pointer; else *string_p = g_strdup (value->data[0].v_pointer); ]| And an illustrative version of lcopy_value() for reference-counted types: |[ GObject **object_p = collect_values[0].v_pointer; if (!object_p) return g_strdup_printf ("object location passed as NULL"); if (!value->data[0].v_pointer) *object_p = NULL; else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) /&ast; always honour &ast;/ *object_p = value->data[0].v_pointer; else *object_p = g_object_ref (value->data[0].v_pointer); return NULL; ]|
6429  *
6430  * The #GTypeValueTable provides the functions required by the #GValue implementation,
6431  * to serve as a container for values of a type.
6432  */
6433
6434
6435 /**
6436  * GUnixCredentialsMessage:credentials:
6437  *
6438  * The credentials stored in the message.
6439  *
6440  * Since: 2.26
6441  */
6442
6443
6444 /**
6445  * GUnixInputStream:close-fd:
6446  *
6447  * Whether to close the file descriptor when the stream is closed.
6448  *
6449  * Since: 2.20
6450  */
6451
6452
6453 /**
6454  * GUnixInputStream:fd:
6455  *
6456  * The file descriptor that the stream reads from.
6457  *
6458  * Since: 2.20
6459  */
6460
6461
6462 /**
6463  * GUnixMountMonitor::mountpoints-changed:
6464  * @monitor: the object on which the signal is emitted
6465  *
6466  * Emitted when the unix mount points have changed.
6467  */
6468
6469
6470 /**
6471  * GUnixMountMonitor::mounts-changed:
6472  * @monitor: the object on which the signal is emitted
6473  *
6474  * Emitted when the unix mounts have changed.
6475  */
6476
6477
6478 /**
6479  * GUnixOutputStream:close-fd:
6480  *
6481  * Whether to close the file descriptor when the stream is closed.
6482  *
6483  * Since: 2.20
6484  */
6485
6486
6487 /**
6488  * GUnixOutputStream:fd:
6489  *
6490  * The file descriptor that the stream writes to.
6491  *
6492  * Since: 2.20
6493  */
6494
6495
6496 /**
6497  * GUnixSocketAddress:
6498  *
6499  * A UNIX-domain (local) socket address, corresponding to a
6500  * <type>struct sockaddr_un</type>.
6501  */
6502
6503
6504 /**
6505  * GUnixSocketAddress:abstract:
6506  *
6507  * Whether or not this is an abstract address
6508  * distinguishes between zero-padded and non-zero-padded
6509  * abstract addresses.
6510  *
6511  * Deprecated: Use #GUnixSocketAddress:address-type, which
6512  */
6513
6514
6515 /**
6516  * GUnixSocketAddressType:
6517  * @G_UNIX_SOCKET_ADDRESS_INVALID: invalid
6518  * @G_UNIX_SOCKET_ADDRESS_ANONYMOUS: anonymous
6519  * @G_UNIX_SOCKET_ADDRESS_PATH: a filesystem path
6520  * @G_UNIX_SOCKET_ADDRESS_ABSTRACT: an abstract name
6521  * @G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED: an abstract name, 0-padded to the full length of a unix socket name
6522  *
6523  * The type of name used by a #GUnixSocketAddress.
6524  * %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain
6525  * socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS
6526  * indicates a socket not bound to any name (eg, a client-side socket,
6527  * or a socket created with socketpair()).
6528  * For abstract sockets, there are two incompatible ways of naming
6529  * them; the man pages suggest using the entire <literal>struct
6530  * sockaddr_un</literal> as the name, padding the unused parts of the
6531  * %sun_path field with zeroes; this corresponds to
6532  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED. However, many programs
6533  * instead just use a portion of %sun_path, and pass an appropriate
6534  * smaller length to bind() or connect(). This is
6535  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT.
6536  *
6537  * Since: 2.26
6538  */
6539
6540
6541 /**
6542  * GUserDirectory:
6543  * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory
6544  * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory
6545  * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory
6546  * @G_USER_DIRECTORY_MUSIC: the user's Music directory
6547  * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory
6548  * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory
6549  * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory
6550  * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory
6551  * @G_USER_N_DIRECTORIES: the number of enum values
6552  *
6553  * These are logical ids for special directories which are defined
6554  * depending on the platform used. You should use g_get_user_special_dir()
6555  * to retrieve the full path associated to the logical id.
6556  * The #GUserDirectory enumeration can be extended at later date. Not
6557  * every platform has a directory for every logical id in this
6558  * enumeration.
6559  *
6560  * Since: 2.14
6561  */
6562
6563
6564 /**
6565  * GValue:
6566  *
6567  * An opaque structure used to hold different types of values.
6568  * to functions within a #GTypeValueTable structure, or implementations of
6569  * the g_value_*() API. That is, code portions which implement new fundamental
6570  * types.
6571  * #GValue users cannot make any assumptions about how data is stored
6572  * within the 2 element @data union, and the @g_type member should
6573  * only be accessed through the G_VALUE_TYPE() macro.
6574  *
6575  * The data within the structure has protected scope: it is accessible only
6576  */
6577
6578
6579 /**
6580  * GValueArray:
6581  * @n_values: number of values contained in the array
6582  * @values: array of values
6583  *
6584  * A #GValueArray contains an array of #GValue elements.
6585  */
6586
6587
6588 /**
6589  * GValueTransform:
6590  * @src_value: Source value.
6591  * @dest_value: Target value.
6592  *
6593  * The type of value transformation functions which can be registered with
6594  * g_value_register_transform_func().
6595  */
6596
6597
6598 /**
6599  * GVariantType:
6600  *
6601  * A type in the GVariant type system.
6602  * Two types may not be compared by value; use g_variant_type_equal() or
6603  * g_variant_type_is_subtype_of().  May be copied using
6604  * g_variant_type_copy() and freed using g_variant_type_free().
6605  */
6606
6607
6608 /**
6609  * GVfs:
6610  *
6611  * Virtual File System object.
6612  */
6613
6614
6615 /**
6616  * GVoidFunc:
6617  *
6618  * Declares a type of function which takes no arguments
6619  * and has no return value. It is used to specify the type
6620  * function passed to g_atexit().
6621  */
6622
6623
6624 /**
6625  * GVolume:
6626  *
6627  * Opaque mountable volume object.
6628  */
6629
6630
6631 /**
6632  * GVolume::changed:
6633  *
6634  * Emitted when the volume has been changed.
6635  */
6636
6637
6638 /**
6639  * GVolume::removed:
6640  *
6641  * This signal is emitted when the #GVolume have been removed. If
6642  * the recipient is holding references to the object they should
6643  * release them so the object can be finalized.
6644  */
6645
6646
6647 /**
6648  * GVolumeIface:
6649  * @g_iface: The parent interface.
6650  * @changed: Changed signal that is emitted when the volume's state has changed.
6651  * @removed: The removed signal that is emitted when the #GVolume have been removed. If the recipient is holding references to the object they should release them so the object can be finalized.
6652  * @get_name: Gets a string containing the name of the #GVolume.
6653  * @get_icon: Gets a #GIcon for the #GVolume.
6654  * @get_uuid: Gets the UUID for the #GVolume. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available.
6655  * @get_drive: Gets a #GDrive the volume is located on. Returns %NULL if the #GVolume is not associated with a #GDrive.
6656  * @get_mount: Gets a #GMount representing the mounted volume. Returns %NULL if the #GVolume is not mounted.
6657  * @can_mount: Returns %TRUE if the #GVolume can be mounted.
6658  * @can_eject: Checks if a #GVolume can be ejected.
6659  * @mount_fn: Mounts a given #GVolume. #GVolume implementations must emit the #GMountOperation::aborted signal before completing a mount operation that is aborted while awaiting input from the user through a #GMountOperation instance.
6660  * @mount_finish: Finishes a mount operation.
6661  * @eject: Ejects a given #GVolume.
6662  * @eject_finish: Finishes an eject operation.
6663  * @get_identifier: Returns the <link linkend="volume-identifier">identifier</link> of the given kind, or %NULL if the #GVolume doesn't have one.
6664  * @enumerate_identifiers: Returns an array strings listing the kinds of <link linkend="volume-identifier">identifiers</link> which the #GVolume has.
6665  * @should_automount: Returns %TRUE if the #GVolume should be automatically mounted.
6666  * @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if it is not known.
6667  * @eject_with_operation: Starts ejecting a #GVolume using a #GMountOperation. Since 2.22.
6668  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
6669  *
6670  * Interface for implementing operations for mountable volumes.
6671  */
6672
6673
6674 /**
6675  * GVolumeMonitor:
6676  *
6677  * A Volume Monitor that watches for volume events.
6678  */
6679
6680
6681 /**
6682  * GVolumeMonitor::drive-changed:
6683  * @volume_monitor: The volume monitor emitting the signal.
6684  * @drive: the drive that changed
6685  *
6686  * Emitted when a drive changes.
6687  */
6688
6689
6690 /**
6691  * GVolumeMonitor::drive-connected:
6692  * @volume_monitor: The volume monitor emitting the signal.
6693  * @drive: a #GDrive that was connected.
6694  *
6695  * Emitted when a drive is connected to the system.
6696  */
6697
6698
6699 /**
6700  * GVolumeMonitor::drive-disconnected:
6701  * @volume_monitor: The volume monitor emitting the signal.
6702  * @drive: a #GDrive that was disconnected.
6703  *
6704  * Emitted when a drive is disconnected from the system.
6705  */
6706
6707
6708 /**
6709  * GVolumeMonitor::drive-eject-button:
6710  * @volume_monitor: The volume monitor emitting the signal.
6711  * @drive: the drive where the eject button was pressed
6712  *
6713  * Emitted when the eject button is pressed on @drive.
6714  *
6715  * Since: 2.18
6716  */
6717
6718
6719 /**
6720  * GVolumeMonitor::drive-stop-button:
6721  * @volume_monitor: The volume monitor emitting the signal.
6722  * @drive: the drive where the stop button was pressed
6723  *
6724  * Emitted when the stop button is pressed on @drive.
6725  *
6726  * Since: 2.22
6727  */
6728
6729
6730 /**
6731  * GVolumeMonitor::mount-added:
6732  * @volume_monitor: The volume monitor emitting the signal.
6733  * @mount: a #GMount that was added.
6734  *
6735  * Emitted when a mount is added.
6736  */
6737
6738
6739 /**
6740  * GVolumeMonitor::mount-changed:
6741  * @volume_monitor: The volume monitor emitting the signal.
6742  * @mount: a #GMount that changed.
6743  *
6744  * Emitted when a mount changes.
6745  */
6746
6747
6748 /**
6749  * GVolumeMonitor::mount-pre-unmount:
6750  * @volume_monitor: The volume monitor emitting the signal.
6751  * @mount: a #GMount that is being unmounted.
6752  *
6753  * Emitted when a mount is about to be removed.
6754  */
6755
6756
6757 /**
6758  * GVolumeMonitor::mount-removed:
6759  * @volume_monitor: The volume monitor emitting the signal.
6760  * @mount: a #GMount that was removed.
6761  *
6762  * Emitted when a mount is removed.
6763  */
6764
6765
6766 /**
6767  * GVolumeMonitor::volume-added:
6768  * @volume_monitor: The volume monitor emitting the signal.
6769  * @volume: a #GVolume that was added.
6770  *
6771  * Emitted when a mountable volume is added to the system.
6772  */
6773
6774
6775 /**
6776  * GVolumeMonitor::volume-changed:
6777  * @volume_monitor: The volume monitor emitting the signal.
6778  * @volume: a #GVolume that changed.
6779  *
6780  * Emitted when mountable volume is changed.
6781  */
6782
6783
6784 /**
6785  * GVolumeMonitor::volume-removed:
6786  * @volume_monitor: The volume monitor emitting the signal.
6787  * @volume: a #GVolume that was removed.
6788  *
6789  * Emitted when a mountable volume is removed from the system.
6790  */
6791
6792
6793 /**
6794  * GWeakNotify:
6795  * @data: data that was provided when the weak reference was established
6796  * @where_the_object_was: the object being finalized
6797  *
6798  * A #GWeakNotify function can be added to an object as a callback that gets
6799  * triggered when the object is finalized. Since the object is already being
6800  * finalized when the #GWeakNotify is called, there's not much you could do
6801  * with the object, apart from e.g. using its adress as hash-index or the like.
6802  */
6803
6804
6805 /**
6806  * GWin32InputStream:close-handle:
6807  *
6808  * Whether to close the file handle when the stream is closed.
6809  *
6810  * Since: 2.26
6811  */
6812
6813
6814 /**
6815  * GWin32InputStream:handle:
6816  *
6817  * The handle that the stream reads from.
6818  *
6819  * Since: 2.26
6820  */
6821
6822
6823 /**
6824  * GWin32OutputStream:close-handle:
6825  *
6826  * Whether to close the file handle when the stream is closed.
6827  *
6828  * Since: 2.26
6829  */
6830
6831
6832 /**
6833  * GWin32OutputStream:handle:
6834  *
6835  * The file handle that the stream writes to.
6836  *
6837  * Since: 2.26
6838  */
6839
6840
6841 /**
6842  * GZlibCompressor:
6843  *
6844  * Zlib decompression
6845  */
6846
6847
6848 /**
6849  * GZlibCompressor:file-info:
6850  *
6851  * If set to a non-%NULL #GFileInfo object, and #GZlibCompressor:format is
6852  * %G_ZLIB_COMPRESSOR_FORMAT_GZIP, the compressor will write the file name
6853  * and modification time from the file info to the the GZIP header.
6854  *
6855  * Since: 2.26
6856  */
6857
6858
6859 /**
6860  * GZlibCompressorFormat:
6861  * @G_ZLIB_COMPRESSOR_FORMAT_ZLIB: deflate compression with zlib header
6862  * @G_ZLIB_COMPRESSOR_FORMAT_GZIP: gzip file format
6863  * @G_ZLIB_COMPRESSOR_FORMAT_RAW: deflate compression with no header
6864  *
6865  * Used to select the type of data format to use for #GZlibDecompressor
6866  * and #GZlibCompressor.
6867  *
6868  * Since: 2.24
6869  */
6870
6871
6872 /**
6873  * GZlibDecompressor:
6874  *
6875  * Zlib decompression
6876  */
6877
6878
6879 /**
6880  * GZlibDecompressor:file-info:
6881  *
6882  * A #GFileInfo containing the information found in the GZIP header
6883  * of the data stream processed, or %NULL if the header was not yet
6884  * fully processed, is not present at all, or the compressor's
6885  * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP.
6886  *
6887  * Since: 2.26
6888  */
6889
6890
6891 /**
6892  * G_BOOKMARK_FILE_ERROR:
6893  *
6894  * Error domain for bookmark file parsing.
6895  * Errors in this domain will be from the #GBookmarkFileError
6896  * enumeration. See #GError for information on error domains.
6897  */
6898
6899
6900 /**
6901  * G_CALLBACK:
6902  * @f: a function pointer.
6903  *
6904  * Cast a function pointer to a #GCallback.
6905  */
6906
6907
6908 /**
6909  * G_CCLOSURE_SWAP_DATA:
6910  * @cclosure: a #GCClosure
6911  *
6912  * Checks whether the user data of the #GCClosure should be passed as the
6913  * first parameter to the callback. See g_cclosure_new_swap().
6914  *
6915  * Returns: %TRUE if data has to be swapped.
6916  */
6917
6918
6919 /**
6920  * G_CLOSURE_NEEDS_MARSHAL:
6921  * @closure: a #GClosure
6922  *
6923  * Check if the closure still needs a marshaller. See g_closure_set_marshal().
6924  *
6925  * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on
6926  */
6927
6928
6929 /**
6930  * G_CLOSURE_N_NOTIFIERS:
6931  * @cl: a #GClosure
6932  *
6933  * Get the total number of notifiers connected with the closure @cl.
6934  * The count includes the meta marshaller, the finalize and invalidate notifiers
6935  * and the marshal guards. Note that each guard counts as two notifiers.
6936  * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
6937  * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
6938  *
6939  * Returns: number of notifiers
6940  */
6941
6942
6943 /**
6944  * G_CONVERT_ERROR:
6945  *
6946  * Error domain for character set conversions. Errors in this domain will
6947  * be from the #GConvertError enumeration. See #GError for information on
6948  * error domains.
6949  */
6950
6951
6952 /**
6953  * G_DATALIST_FLAGS_MASK:
6954  *
6955  * A bitmask that restricts the possible flags passed to
6956  * g_datalist_set_flags(). Passing a flags value where
6957  * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.
6958  */
6959
6960
6961 /**
6962  * G_DBUS_ERROR:
6963  *
6964  * Error domain for errors generated by a remote message bus. Errors
6965  * in this domain will be from the #GDBusError enumeration.  See
6966  * #GError for more information on error domains.
6967  * Note that errors in this error domain is intended only for
6968  * returning errors from a remote message bus process. Errors
6969  * generated locally in-process by e.g. #GDBusConnection is from the
6970  * %G_IO_ERROR domain.
6971  *
6972  * Since: 2.26
6973  */
6974
6975
6976 /**
6977  * G_DEFINE_ABSTRACT_TYPE:
6978  * @TN: The name of the new type, in Camel case.
6979  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6980  * @T_P: The #GType of the parent type.
6981  *
6982  * A convenience macro for type implementations.
6983  * Similar to G_DEFINE_TYPE(), but defines an abstract type.
6984  * See G_DEFINE_TYPE_EXTENDED() for an example.
6985  *
6986  * Since: 2.4
6987  */
6988
6989
6990 /**
6991  * G_DEFINE_ABSTRACT_TYPE_WITH_CODE:
6992  * @TN: The name of the new type, in Camel case.
6993  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6994  * @T_P: The #GType of the parent type.
6995  * @_C_: Custom code that gets inserted in the @type_name_get_type() function.
6996  *
6997  * A convenience macro for type implementations.
6998  * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows you to
6999  * insert custom code into the *_get_type() function, e.g. interface implementations
7000  * via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
7001  *
7002  * Since: 2.4
7003  */
7004
7005
7006 /**
7007  * G_DEFINE_BOXED_TYPE:
7008  * @TypeName: The name of the new type, in Camel case.
7009  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
7010  * @copy_func: the #GBoxedCopyFunc for the new type
7011  * @free_func: the #GBoxedFreeFunc for the new type
7012  *
7013  * A convenience macro for boxed type implementations, which defines a
7014  * type_name_get_type() function registering the boxed type.
7015  *
7016  * Since: 2.26
7017  */
7018
7019
7020 /**
7021  * G_DEFINE_BOXED_TYPE_WITH_CODE:
7022  * @TypeName: The name of the new type, in Camel case.
7023  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
7024  * @copy_func: the #GBoxedCopyFunc for the new type
7025  * @free_func: the #GBoxedFreeFunc for the new type
7026  * @_C_: Custom code that gets inserted in the *_get_type() function.
7027  *
7028  * A convenience macro for boxed type implementations.
7029  * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the
7030  * type_name_get_type() function, e.g. to register value transformations with
7031  * g_value_register_transform_func().
7032  *
7033  * Since: 2.26
7034  */
7035
7036
7037 /**
7038  * G_DEFINE_DYNAMIC_TYPE:
7039  * @TN: The name of the new type, in Camel case.
7040  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
7041  * @T_P: The #GType of the parent type.
7042  *
7043  * A convenience macro for dynamic type implementations, which declares a
7044  * class initialization function, an instance initialization function (see
7045  * #GTypeInfo for information about these) and a static variable named
7046  * it defines a <function>*_get_type()</function> and a static
7047  * <function>*_register_type()</function> function for use in your
7048  * <function>module_init()</function>.
7049  * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.
7050  *
7051  * Since: 2.14
7052  */
7053
7054
7055 /**
7056  * G_DEFINE_DYNAMIC_TYPE_EXTENDED:
7057  * @TypeName: The name of the new type, in Camel case.
7058  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
7059  * @TYPE_PARENT: The #GType of the parent type.
7060  * @flags: #GTypeFlags to pass to g_type_module_register_type()
7061  * @CODE: Custom code that gets inserted in the *_get_type() function.
7062  *
7063  * A more general version of G_DEFINE_DYNAMIC_TYPE() which
7064  * allows to specify #GTypeFlags and custom code.
7065  * |[
7066  * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
7067  * gtk_gadget,
7068  * GTK_TYPE_THING,
7069  * 0,
7070  * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO,
7071  * gtk_gadget_gizmo_init));
7072  * ]|
7073  * expands to
7074  * |[
7075  * static void     gtk_gadget_init              (GtkGadget      *self);
7076  * static void     gtk_gadget_class_init        (GtkGadgetClass *klass);
7077  * static void     gtk_gadget_class_finalize    (GtkGadgetClass *klass);
7078  * static gpointer gtk_gadget_parent_class = NULL;
7079  * static GType    gtk_gadget_type_id = 0;
7080  * static void     gtk_gadget_class_intern_init (gpointer klass)
7081  * {
7082  * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
7083  * gtk_gadget_class_init ((GtkGadgetClass*) klass);
7084  * }
7085  * GType
7086  * gtk_gadget_get_type (void)
7087  * {
7088  * return gtk_gadget_type_id;
7089  * }
7090  * static void
7091  * gtk_gadget_register_type (GTypeModule *type_module)
7092  * {
7093  * const GTypeInfo g_define_type_info = {
7094  * sizeof (GtkGadgetClass),
7095  * (GBaseInitFunc) NULL,
7096  * (GBaseFinalizeFunc) NULL,
7097  * (GClassInitFunc) gtk_gadget_class_intern_init,
7098  * (GClassFinalizeFunc) gtk_gadget_class_finalize,
7099  * NULL,   // class_data
7100  * sizeof (GtkGadget),
7101  * 0,      // n_preallocs
7102  * (GInstanceInitFunc) gtk_gadget_init,
7103  * NULL    // value_table
7104  * };
7105  * gtk_gadget_type_id = g_type_module_register_type (type_module,
7106  * GTK_TYPE_THING,
7107  * GtkGadget,
7108  * &g_define_type_info,
7109  * (GTypeFlags) flags);
7110  * {
7111  * const GInterfaceInfo g_implement_interface_info = {
7112  * (GInterfaceInitFunc) gtk_gadget_gizmo_init
7113  * };
7114  * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
7115  * }
7116  * }
7117  * ]|
7118  *
7119  * Since: 2.14
7120  */
7121
7122
7123 /**
7124  * G_DEFINE_INTERFACE:
7125  * @TN: The name of the new type, in Camel case.
7126  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
7127  * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
7128  *
7129  * A convenience macro for #GTypeInterface definitions, which declares
7130  * a default vtable initialization function and defines a *_get_type()
7131  * function.
7132  * The macro expects the interface initialization function to have the
7133  * name <literal>t_n ## _default_init</literal>, and the interface
7134  * structure to have the name <literal>TN ## Interface</literal>.
7135  *
7136  * Since: 2.24
7137  */
7138
7139
7140 /**
7141  * G_DEFINE_INTERFACE_WITH_CODE:
7142  * @TN: The name of the new type, in Camel case.
7143  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
7144  * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
7145  * @_C_: Custom code that gets inserted in the *_get_type() function.
7146  *
7147  * A convenience macro for #GTypeInterface definitions. Similar to
7148  * G_DEFINE_INTERFACE(), but allows you to insert custom code into the
7149  * *_get_type() function, e.g. additional interface implementations
7150  * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See
7151  * G_DEFINE_TYPE_EXTENDED() for a similar example using
7152  * G_DEFINE_TYPE_WITH_CODE().
7153  *
7154  * Since: 2.24
7155  */
7156
7157
7158 /**
7159  * G_DEFINE_POINTER_TYPE:
7160  * @TypeName: The name of the new type, in Camel case.
7161  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
7162  *
7163  * A convenience macro for pointer type implementations, which defines a
7164  * type_name_get_type() function registering the pointer type.
7165  *
7166  * Since: 2.26
7167  */
7168
7169
7170 /**
7171  * G_DEFINE_POINTER_TYPE_WITH_CODE:
7172  * @TypeName: The name of the new type, in Camel case.
7173  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
7174  * @_C_: Custom code that gets inserted in the *_get_type() function.
7175  *
7176  * A convenience macro for pointer type implementations.
7177  * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert custom code into the
7178  * type_name_get_type() function.
7179  *
7180  * Since: 2.26
7181  */
7182
7183
7184 /**
7185  * G_DEFINE_TYPE:
7186  * @TN: The name of the new type, in Camel case.
7187  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
7188  * @T_P: The #GType of the parent type.
7189  *
7190  * A convenience macro for type implementations, which declares a
7191  * class initialization function, an instance initialization function (see #GTypeInfo for information about
7192  * these) and a static variable named @t_n<!-- -->_parent_class pointing to the parent class. Furthermore, it defines
7193  * a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() for an example.
7194  *
7195  * Since: 2.4
7196  */
7197
7198
7199 /**
7200  * G_DEFINE_TYPE_EXTENDED:
7201  * @TN: The name of the new type, in Camel case.
7202  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
7203  * @T_P: The #GType of the parent type.
7204  * @_f_: #GTypeFlags to pass to g_type_register_static()
7205  * @_C_: Custom code that gets inserted in the *_get_type() function.
7206  *
7207  * The most general convenience macro for type implementations, on which
7208  * G_DEFINE_TYPE(), etc are based.
7209  * |[
7210  * G_DEFINE_TYPE_EXTENDED (GtkGadget,
7211  * gtk_gadget,
7212  * GTK_TYPE_WIDGET,
7213  * 0,
7214  * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
7215  * gtk_gadget_gizmo_init));
7216  * ]|
7217  * expands to
7218  * |[
7219  * static void     gtk_gadget_init       (GtkGadget      *self);
7220  * static void     gtk_gadget_class_init (GtkGadgetClass *klass);
7221  * static gpointer gtk_gadget_parent_class = NULL;
7222  * static void     gtk_gadget_class_intern_init (gpointer klass)
7223  * {
7224  * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
7225  * gtk_gadget_class_init ((GtkGadgetClass*) klass);
7226  * }
7227  * GType
7228  * gtk_gadget_get_type (void)
7229  * {
7230  * static volatile gsize g_define_type_id__volatile = 0;
7231  * if (g_once_init_enter (&g_define_type_id__volatile))
7232  * {
7233  * GType g_define_type_id =
7234  * g_type_register_static_simple (GTK_TYPE_WIDGET,
7235  * g_intern_static_string ("GtkGadget"),
7236  * sizeof (GtkGadgetClass),
7237  * (GClassInitFunc) gtk_gadget_class_intern_init,
7238  * sizeof (GtkGadget),
7239  * (GInstanceInitFunc) gtk_gadget_init,
7240  * (GTypeFlags) flags);
7241  * {
7242  * static const GInterfaceInfo g_implement_interface_info = {
7243  * (GInterfaceInitFunc) gtk_gadget_gizmo_init
7244  * };
7245  * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
7246  * }
7247  * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
7248  * }
7249  * return g_define_type_id__volatile;
7250  * }
7251  * ]|
7252  * The only pieces which have to be manually provided are the definitions of
7253  * the instance and class structure and the definitions of the instance and
7254  * class init functions.
7255  *
7256  * Since: 2.4
7257  */
7258
7259
7260 /**
7261  * G_DEFINE_TYPE_WITH_CODE:
7262  * @TN: The name of the new type, in Camel case.
7263  * @t_n: The name of the new type in lowercase, with words separated by '_'.
7264  * @T_P: The #GType of the parent type.
7265  * @_C_: Custom code that gets inserted in the *_get_type() function.
7266  *
7267  * A convenience macro for type implementations.
7268  * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the
7269  * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
7270  * See G_DEFINE_TYPE_EXTENDED() for an example.
7271  *
7272  * Since: 2.4
7273  */
7274
7275
7276 /**
7277  * G_ENUM_CLASS:
7278  * @class: a valid #GEnumClass
7279  *
7280  * Casts a derived #GEnumClass structure into a #GEnumClass structure.
7281  */
7282
7283
7284 /**
7285  * G_ENUM_CLASS_TYPE:
7286  * @class: a #GEnumClass
7287  *
7288  * Get the type identifier from a given #GEnumClass structure.
7289  *
7290  * Returns: the #GType
7291  */
7292
7293
7294 /**
7295  * G_ENUM_CLASS_TYPE_NAME:
7296  * @class: a #GEnumClass
7297  *
7298  * Get the static type name from a given #GEnumClass structure.
7299  *
7300  * Returns: the type name.
7301  */
7302
7303
7304 /**
7305  * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE:
7306  *
7307  * A key in the "access" namespace for checking deletion privileges.
7308  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7309  * This attribute will be %TRUE if the user is able to delete the file.
7310  */
7311
7312
7313 /**
7314  * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE:
7315  *
7316  * A key in the "access" namespace for getting execution privileges.
7317  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7318  * This attribute will be %TRUE if the user is able to execute the file.
7319  */
7320
7321
7322 /**
7323  * G_FILE_ATTRIBUTE_ACCESS_CAN_READ:
7324  *
7325  * A key in the "access" namespace for getting read privileges.
7326  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7327  * This attribute will be %TRUE if the user is able to read the file.
7328  */
7329
7330
7331 /**
7332  * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME:
7333  *
7334  * A key in the "access" namespace for checking renaming privileges.
7335  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7336  * This attribute will be %TRUE if the user is able to rename the file.
7337  */
7338
7339
7340 /**
7341  * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH:
7342  *
7343  * A key in the "access" namespace for checking trashing privileges.
7344  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7345  * This attribute will be %TRUE if the user is able to move the file to
7346  * the trash.
7347  */
7348
7349
7350 /**
7351  * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE:
7352  *
7353  * A key in the "access" namespace for getting write privileges.
7354  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7355  * This attribute will be %TRUE if the user is able to write to the file.
7356  */
7357
7358
7359 /**
7360  * G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE:
7361  *
7362  * A key in the "dos" namespace for checking if the file's archive flag
7363  * is set. This attribute is %TRUE if the archive flag is set. This attribute
7364  * is only available for DOS file systems. Corresponding #GFileAttributeType
7365  * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7366  */
7367
7368
7369 /**
7370  * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM:
7371  *
7372  * A key in the "dos" namespace for checking if the file's backup flag
7373  * is set. This attribute is %TRUE if the backup flag is set. This attribute
7374  * is only available for DOS file systems. Corresponding #GFileAttributeType
7375  * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7376  */
7377
7378
7379 /**
7380  * G_FILE_ATTRIBUTE_ETAG_VALUE:
7381  *
7382  * A key in the "etag" namespace for getting the value of the file's
7383  * entity tag. Corresponding #GFileAttributeType is
7384  * %G_FILE_ATTRIBUTE_TYPE_STRING.
7385  */
7386
7387
7388 /**
7389  * G_FILE_ATTRIBUTE_FILESYSTEM_FREE:
7390  *
7391  * A key in the "filesystem" namespace for getting the number of bytes of free space left on the
7392  * file system. Corresponding #GFileAttributeType is
7393  * %G_FILE_ATTRIBUTE_TYPE_UINT64.
7394  */
7395
7396
7397 /**
7398  * G_FILE_ATTRIBUTE_FILESYSTEM_READONLY:
7399  *
7400  * A key in the "filesystem" namespace for checking if the file system
7401  * is read only. Is set to %TRUE if the file system is read only.
7402  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7403  */
7404
7405
7406 /**
7407  * G_FILE_ATTRIBUTE_FILESYSTEM_SIZE:
7408  *
7409  * A key in the "filesystem" namespace for getting the total size (in bytes) of the file system,
7410  * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType
7411  * is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7412  */
7413
7414
7415 /**
7416  * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE:
7417  *
7418  * A key in the "filesystem" namespace for getting the file system's type.
7419  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7420  */
7421
7422
7423 /**
7424  * G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW:
7425  *
7426  * A key in the "filesystem" namespace for hinting a file manager
7427  * application whether it should preview (e.g. thumbnail) files on the
7428  * file system. The value for this key contain a
7429  * #GFilesystemPreviewType.
7430  */
7431
7432
7433 /**
7434  * G_FILE_ATTRIBUTE_GVFS_BACKEND:
7435  *
7436  * A key in the "gvfs" namespace that gets the name of the current
7437  * GVFS backend in use. Corresponding #GFileAttributeType is
7438  * %G_FILE_ATTRIBUTE_TYPE_STRING.
7439  */
7440
7441
7442 /**
7443  * G_FILE_ATTRIBUTE_ID_FILE:
7444  *
7445  * A key in the "id" namespace for getting a file identifier.
7446  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7447  * An example use would be during listing files, to avoid recursive
7448  * directory scanning.
7449  */
7450
7451
7452 /**
7453  * G_FILE_ATTRIBUTE_ID_FILESYSTEM:
7454  *
7455  * A key in the "id" namespace for getting the file system identifier.
7456  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7457  * An example use would be during drag and drop to see if the source
7458  * and target are on the same filesystem (default to move) or not (default
7459  * to copy).
7460  */
7461
7462
7463 /**
7464  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT:
7465  *
7466  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
7467  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7468  */
7469
7470
7471 /**
7472  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT:
7473  *
7474  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
7475  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7476  */
7477
7478
7479 /**
7480  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL:
7481  *
7482  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
7483  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7484  *
7485  * Since: 2.22
7486  */
7487
7488
7489 /**
7490  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START:
7491  *
7492  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
7493  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7494  *
7495  * Since: 2.22
7496  */
7497
7498
7499 /**
7500  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED:
7501  *
7502  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started
7503  * degraded.
7504  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7505  *
7506  * Since: 2.22
7507  */
7508
7509
7510 /**
7511  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP:
7512  *
7513  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
7514  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7515  *
7516  * Since: 2.22
7517  */
7518
7519
7520 /**
7521  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT:
7522  *
7523  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)  is unmountable.
7524  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7525  */
7526
7527
7528 /**
7529  * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI:
7530  *
7531  * A key in the "mountable" namespace for getting the HAL UDI for the mountable
7532  * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7533  */
7534
7535
7536 /**
7537  * G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC:
7538  *
7539  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)
7540  * is automatically polled for media.
7541  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7542  *
7543  * Since: 2.22
7544  */
7545
7546
7547 /**
7548  * G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE:
7549  *
7550  * A key in the "mountable" namespace for getting the #GDriveStartStopType.
7551  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7552  *
7553  * Since: 2.22
7554  */
7555
7556
7557 /**
7558  * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE:
7559  *
7560  * A key in the "mountable" namespace for getting the unix device.
7561  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7562  */
7563
7564
7565 /**
7566  * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE:
7567  *
7568  * A key in the "mountable" namespace for getting the unix device file.
7569  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7570  *
7571  * Since: 2.22
7572  */
7573
7574
7575 /**
7576  * G_FILE_ATTRIBUTE_OWNER_GROUP:
7577  *
7578  * A key in the "owner" namespace for getting the file owner's group.
7579  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7580  */
7581
7582
7583 /**
7584  * G_FILE_ATTRIBUTE_OWNER_USER:
7585  *
7586  * A key in the "owner" namespace for getting the user name of the
7587  * file's owner. Corresponding #GFileAttributeType is
7588  * %G_FILE_ATTRIBUTE_TYPE_STRING.
7589  */
7590
7591
7592 /**
7593  * G_FILE_ATTRIBUTE_OWNER_USER_REAL:
7594  *
7595  * A key in the "owner" namespace for getting the real name of the
7596  * user that owns the file. Corresponding #GFileAttributeType is
7597  * %G_FILE_ATTRIBUTE_TYPE_STRING.
7598  */
7599
7600
7601 /**
7602  * G_FILE_ATTRIBUTE_PREVIEW_ICON:
7603  *
7604  * A key in the "preview" namespace for getting a #GIcon that can be
7605  * used to get preview of the file. For example, it may be a low
7606  * resolution thumbnail without metadata. Corresponding
7607  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.  The value
7608  * for this key should contain a #GIcon.
7609  *
7610  * Since: 2.20
7611  */
7612
7613
7614 /**
7615  * G_FILE_ATTRIBUTE_SELINUX_CONTEXT:
7616  *
7617  * A key in the "selinux" namespace for getting the file's SELinux
7618  * context. Corresponding #GFileAttributeType is
7619  * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only
7620  * available if GLib has been built with SELinux support.
7621  */
7622
7623
7624 /**
7625  * G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE:
7626  *
7627  * A key in the "standard" namespace for getting the amount of disk space
7628  * that is consumed by the file (in bytes).  This will generally be larger
7629  * than the file size (due to block size overhead) but can occasionally be
7630  * smaller (for example, for sparse files).
7631  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7632  *
7633  * Since: 2.20
7634  */
7635
7636
7637 /**
7638  * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE:
7639  *
7640  * A key in the "standard" namespace for getting the content type of the file.
7641  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7642  * The value for this key should contain a valid content type.
7643  */
7644
7645
7646 /**
7647  * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME:
7648  *
7649  * A key in the "standard" namespace for getting the copy name of the file.
7650  * The copy name is an optional version of the name. If available it's always
7651  * in UTF8, and corresponds directly to the original filename (only transcoded to
7652  * UTF8). This is useful if you want to copy the file to another filesystem that
7653  * might have a different encoding. If the filename is not a valid string in the
7654  * encoding selected for the filesystem it is in then the copy name will not be set.
7655  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7656  */
7657
7658
7659 /**
7660  * G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION:
7661  *
7662  * A key in the "standard" namespace for getting the description of the file.
7663  * The description is a utf8 string that describes the file, generally containing
7664  * the filename, but can also contain furter information. Example descriptions
7665  * could be "filename (on hostname)" for a remote file or "filename (in trash)"
7666  * for a file in the trash. This is useful for instance as the window title
7667  * when displaying a directory or for a bookmarks menu.
7668  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7669  */
7670
7671
7672 /**
7673  * G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME:
7674  *
7675  * A key in the "standard" namespace for getting the display name of the file.
7676  * A display name is guaranteed to be in UTF8 and can thus be displayed in
7677  * the UI.
7678  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7679  */
7680
7681
7682 /**
7683  * G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME:
7684  *
7685  * A key in the "standard" namespace for edit name of the file.
7686  * An edit name is similar to the display name, but it is meant to be
7687  * used when you want to rename the file in the UI. The display name
7688  * might contain information you don't want in the new filename (such as
7689  * "(invalid unicode)" if the filename was in an invalid encoding).
7690  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7691  */
7692
7693
7694 /**
7695  * G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE:
7696  *
7697  * A key in the "standard" namespace for getting the fast content type.
7698  * The fast content type isn't as reliable as the regular one, as it
7699  * only uses the filename to guess it, but it is faster to calculate than the
7700  * regular content type.
7701  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7702  */
7703
7704
7705 /**
7706  * G_FILE_ATTRIBUTE_STANDARD_ICON:
7707  *
7708  * A key in the "standard" namespace for getting the icon for the file.
7709  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
7710  * The value for this key should contain a #GIcon.
7711  */
7712
7713
7714 /**
7715  * G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP:
7716  *
7717  * A key in the "standard" namespace for checking if a file is a backup file.
7718  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7719  */
7720
7721
7722 /**
7723  * G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN:
7724  *
7725  * A key in the "standard" namespace for checking if a file is hidden.
7726  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7727  */
7728
7729
7730 /**
7731  * G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK:
7732  *
7733  * A key in the "standard" namespace for checking if the file is a symlink.
7734  * Typically the actual type is something else, if we followed the symlink
7735  * to get the type.
7736  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7737  */
7738
7739
7740 /**
7741  * G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL:
7742  *
7743  * A key in the "standard" namespace for checking if a file is virtual.
7744  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7745  */
7746
7747
7748 /**
7749  * G_FILE_ATTRIBUTE_STANDARD_NAME:
7750  *
7751  * A key in the "standard" namespace for getting the name of the file.
7752  * The name is the on-disk filename which may not be in any known encoding,
7753  * and can thus not be generally displayed as is.
7754  * Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
7755  * name in a user interface.
7756  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7757  */
7758
7759
7760 /**
7761  * G_FILE_ATTRIBUTE_STANDARD_SIZE:
7762  *
7763  * A key in the "standard" namespace for getting the file's size (in bytes).
7764  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7765  */
7766
7767
7768 /**
7769  * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER:
7770  *
7771  * A key in the "standard" namespace for setting the sort order of a file.
7772  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
7773  * An example use would be in file managers, which would use this key
7774  * to set the order files are displayed. Files with smaller sort order
7775  * should be sorted first, and files without sort order as if sort order
7776  * was zero.
7777  */
7778
7779
7780 /**
7781  * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET:
7782  *
7783  * A key in the "standard" namespace for getting the symlink target, if the file
7784  * is a symlink. Corresponding #GFileAttributeType is
7785  * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7786  */
7787
7788
7789 /**
7790  * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI:
7791  *
7792  * A key in the "standard" namespace for getting the target URI for the file, in
7793  * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
7794  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7795  */
7796
7797
7798 /**
7799  * G_FILE_ATTRIBUTE_STANDARD_TYPE:
7800  *
7801  * A key in the "standard" namespace for storing file types.
7802  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7803  * The value for this key should contain a #GFileType.
7804  */
7805
7806
7807 /**
7808  * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED:
7809  *
7810  * A key in the "thumbnail" namespace for checking if thumbnailing failed.
7811  * This attribute is %TRUE if thumbnailing failed. Corresponding
7812  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7813  */
7814
7815
7816 /**
7817  * G_FILE_ATTRIBUTE_THUMBNAIL_PATH:
7818  *
7819  * A key in the "thumbnail" namespace for getting the path to the thumbnail
7820  * image. Corresponding #GFileAttributeType is
7821  * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7822  */
7823
7824
7825 /**
7826  * G_FILE_ATTRIBUTE_TIME_ACCESS:
7827  *
7828  * A key in the "time" namespace for getting the time the file was last
7829  * accessed. Corresponding #GFileAttributeType is
7830  * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
7831  * file was last accessed.
7832  */
7833
7834
7835 /**
7836  * G_FILE_ATTRIBUTE_TIME_ACCESS_USEC:
7837  *
7838  * A key in the "time" namespace for getting the microseconds of the time
7839  * the file was last accessed. This should be used in conjunction with
7840  * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is
7841  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7842  */
7843
7844
7845 /**
7846  * G_FILE_ATTRIBUTE_TIME_CHANGED:
7847  *
7848  * A key in the "time" namespace for getting the time the file was last
7849  * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
7850  * and contains the UNIX time since the file was last changed.
7851  * This corresponds to the traditional UNIX ctime.
7852  */
7853
7854
7855 /**
7856  * G_FILE_ATTRIBUTE_TIME_CHANGED_USEC:
7857  *
7858  * A key in the "time" namespace for getting the microseconds of the time
7859  * the file was last changed. This should be used in conjunction with
7860  * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is
7861  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7862  */
7863
7864
7865 /**
7866  * G_FILE_ATTRIBUTE_TIME_CREATED:
7867  *
7868  * A key in the "time" namespace for getting the time the file was created.
7869  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
7870  * and contains the UNIX time since the file was created.
7871  * This corresponds to the NTFS ctime.
7872  */
7873
7874
7875 /**
7876  * G_FILE_ATTRIBUTE_TIME_CREATED_USEC:
7877  *
7878  * A key in the "time" namespace for getting the microseconds of the time
7879  * the file was created. This should be used in conjunction with
7880  * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is
7881  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7882  */
7883
7884
7885 /**
7886  * G_FILE_ATTRIBUTE_TIME_MODIFIED:
7887  *
7888  * A key in the "time" namespace for getting the time the file was last
7889  * modified. Corresponding #GFileAttributeType is
7890  * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
7891  * file was modified.
7892  */
7893
7894
7895 /**
7896  * G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC:
7897  *
7898  * A key in the "time" namespace for getting the miliseconds of the time
7899  * the file was last modified. This should be used in conjunction with
7900  * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is
7901  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7902  */
7903
7904
7905 /**
7906  * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE:
7907  *
7908  * A key in the "trash" namespace.  When requested against
7909  * items in "trash:///", will return the date and time when the file
7910  * was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss.
7911  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7912  *
7913  * Since: 2.24.
7914  */
7915
7916
7917 /**
7918  * G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT:
7919  *
7920  * A key in the "trash" namespace.  When requested against
7921  * "trash:///" returns the number of (toplevel) items in the trash folder.
7922  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7923  */
7924
7925
7926 /**
7927  * G_FILE_ATTRIBUTE_TRASH_ORIG_PATH:
7928  *
7929  * A key in the "trash" namespace.  When requested against
7930  * items in "trash:///", will return the original path to the file before it
7931  * was trashed. Corresponding #GFileAttributeType is
7932  * %G_FILE_ATTRIBUTE_TYPE_STRING.
7933  *
7934  * Since: 2.24.
7935  */
7936
7937
7938 /**
7939  * G_FILE_ATTRIBUTE_UNIX_BLOCKS:
7940  *
7941  * A key in the "unix" namespace for getting the number of blocks allocated
7942  * for the file. This attribute is only available for UNIX file systems.
7943  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7944  */
7945
7946
7947 /**
7948  * G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE:
7949  *
7950  * A key in the "unix" namespace for getting the block size for the file
7951  * system. This attribute is only available for UNIX file systems.
7952  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7953  */
7954
7955
7956 /**
7957  * G_FILE_ATTRIBUTE_UNIX_DEVICE:
7958  *
7959  * A key in the "unix" namespace for getting the device id of the device the
7960  * file is located on (see stat() documentation). This attribute is only
7961  * available for UNIX file systems. Corresponding #GFileAttributeType is
7962  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7963  */
7964
7965
7966 /**
7967  * G_FILE_ATTRIBUTE_UNIX_GID:
7968  *
7969  * A key in the "unix" namespace for getting the group ID for the file.
7970  * This attribute is only available for UNIX file systems.
7971  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7972  */
7973
7974
7975 /**
7976  * G_FILE_ATTRIBUTE_UNIX_INODE:
7977  *
7978  * A key in the "unix" namespace for getting the inode of the file.
7979  * This attribute is only available for UNIX file systems. Corresponding
7980  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7981  */
7982
7983
7984 /**
7985  * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT:
7986  *
7987  * A key in the "unix" namespace for checking if the file represents a
7988  * UNIX mount point. This attribute is %TRUE if the file is a UNIX mount
7989  * point. This attribute is only available for UNIX file systems.
7990  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7991  */
7992
7993
7994 /**
7995  * G_FILE_ATTRIBUTE_UNIX_MODE:
7996  *
7997  * A key in the "unix" namespace for getting the mode of the file
7998  * (e.g. whether the file is a regular file, symlink, etc). See lstat()
7999  * documentation. This attribute is only available for UNIX file systems.
8000  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8001  */
8002
8003
8004 /**
8005  * G_FILE_ATTRIBUTE_UNIX_NLINK:
8006  *
8007  * A key in the "unix" namespace for getting the number of hard links
8008  * for a file. See lstat() documentation. This attribute is only available
8009  * for UNIX file systems. Corresponding #GFileAttributeType is
8010  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
8011  */
8012
8013
8014 /**
8015  * G_FILE_ATTRIBUTE_UNIX_RDEV:
8016  *
8017  * A key in the "unix" namespace for getting the device ID for the file
8018  * (if it is a special file). See lstat() documentation. This attribute
8019  * is only available for UNIX file systems. Corresponding #GFileAttributeType
8020  * is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8021  */
8022
8023
8024 /**
8025  * G_FILE_ATTRIBUTE_UNIX_UID:
8026  *
8027  * A key in the "unix" namespace for getting the user ID for the file.
8028  * This attribute is only available for UNIX file systems.
8029  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8030  */
8031
8032
8033 /**
8034  * G_FLAGS_CLASS:
8035  * @class: a valid #GFlagsClass
8036  *
8037  * Casts a derived #GFlagsClass structure into a #GFlagsClass structure.
8038  */
8039
8040
8041 /**
8042  * G_FLAGS_CLASS_TYPE:
8043  * @class: a #GFlagsClass
8044  *
8045  * Get the type identifier from a given #GFlagsClass structure.
8046  *
8047  * Returns: the #GType
8048  */
8049
8050
8051 /**
8052  * G_FLAGS_CLASS_TYPE_NAME:
8053  * @class: a #GFlagsClass
8054  *
8055  * Get the static type name from a given #GFlagsClass structure.
8056  *
8057  * Returns: the type name.
8058  */
8059
8060
8061 /**
8062  * G_IMPLEMENT_INTERFACE:
8063  * @TYPE_IFACE: The #GType of the interface to add
8064  * @iface_init: The interface init function
8065  *
8066  * A convenience macro to ease interface addition in the @_C_ section
8067  * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE().
8068  * See G_DEFINE_TYPE_EXTENDED() for an example.
8069  * Note that this macro can only be used together with the G_DEFINE_TYPE_*
8070  * macros, since it depends on variable names from those macros.
8071  *
8072  * Since: 2.4
8073  */
8074
8075
8076 /**
8077  * G_IMPLEMENT_INTERFACE_DYNAMIC:
8078  * @TYPE_IFACE: The #GType of the interface to add
8079  * @iface_init: The interface init function
8080  *
8081  * A convenience macro to ease interface addition in the @_C_ section
8082  * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED()
8083  * for an example.
8084  * Note that this macro can only be used together with the
8085  * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable
8086  * names from that macro.
8087  *
8088  * Since: 2.24
8089  */
8090
8091
8092 /**
8093  * G_INITIALLY_UNOWNED:
8094  * @object: Object which is subject to casting.
8095  *
8096  * Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*)
8097  * pointer. Depending on the current debugging level, this function may invoke
8098  * certain runtime checks to identify invalid casts.
8099  */
8100
8101
8102 /**
8103  * G_INITIALLY_UNOWNED_CLASS:
8104  * @class: a valid #GInitiallyUnownedClass
8105  *
8106  * Casts a derived #GInitiallyUnownedClass structure into a
8107  * #GInitiallyUnownedClass structure.
8108  */
8109
8110
8111 /**
8112  * G_INITIALLY_UNOWNED_GET_CLASS:
8113  * @object: a #GInitiallyUnowned instance.
8114  *
8115  * Get the class structure associated to a #GInitiallyUnowned instance.
8116  *
8117  * Returns: pointer to object class structure.
8118  */
8119
8120
8121 /**
8122  * G_IO_ERROR:
8123  *
8124  * Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration.
8125  * See #GError for more information on error domains.
8126  */
8127
8128
8129 /**
8130  * G_IS_ENUM_CLASS:
8131  * @class: a #GEnumClass
8132  *
8133  * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM
8134  * or derived.
8135  */
8136
8137
8138 /**
8139  * G_IS_FLAGS_CLASS:
8140  * @class: a #GFlagsClass
8141  *
8142  * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS
8143  * or derived.
8144  */
8145
8146
8147 /**
8148  * G_IS_INITIALLY_UNOWNED:
8149  * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED.
8150  *
8151  * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED.
8152  */
8153
8154
8155 /**
8156  * G_IS_INITIALLY_UNOWNED_CLASS:
8157  * @class: a #GInitiallyUnownedClass
8158  *
8159  * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type
8160  * %G_TYPE_INITIALLY_UNOWNED or derived.
8161  */
8162
8163
8164 /**
8165  * G_IS_OBJECT:
8166  * @object: Instance to check for being a %G_TYPE_OBJECT.
8167  *
8168  * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT.
8169  */
8170
8171
8172 /**
8173  * G_IS_OBJECT_CLASS:
8174  * @class: a #GObjectClass
8175  *
8176  * Checks whether @class "is a" valid #GObjectClass structure of type
8177  * %G_TYPE_OBJECT or derived.
8178  */
8179
8180
8181 /**
8182  * G_IS_PARAM_SPEC:
8183  * @pspec: a #GParamSpec
8184  *
8185  * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM
8186  * or derived.
8187  */
8188
8189
8190 /**
8191  * G_IS_PARAM_SPEC_BOOLEAN:
8192  * @pspec: a valid #GParamSpec instance
8193  *
8194  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
8195  *
8196  * Returns: %TRUE on success.
8197  */
8198
8199
8200 /**
8201  * G_IS_PARAM_SPEC_BOXED:
8202  * @pspec: a valid #GParamSpec instance
8203  *
8204  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
8205  *
8206  * Returns: %TRUE on success.
8207  */
8208
8209
8210 /**
8211  * G_IS_PARAM_SPEC_CHAR:
8212  * @pspec: a valid #GParamSpec instance
8213  *
8214  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
8215  *
8216  * Returns: %TRUE on success.
8217  */
8218
8219
8220 /**
8221  * G_IS_PARAM_SPEC_CLASS:
8222  * @pclass: a #GParamSpecClass
8223  *
8224  * Checks whether @pclass "is a" valid #GParamSpecClass structure of type
8225  * %G_TYPE_PARAM or derived.
8226  */
8227
8228
8229 /**
8230  * G_IS_PARAM_SPEC_DOUBLE:
8231  * @pspec: a valid #GParamSpec instance
8232  *
8233  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
8234  *
8235  * Returns: %TRUE on success.
8236  */
8237
8238
8239 /**
8240  * G_IS_PARAM_SPEC_ENUM:
8241  * @pspec: a valid #GParamSpec instance
8242  *
8243  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
8244  *
8245  * Returns: %TRUE on success.
8246  */
8247
8248
8249 /**
8250  * G_IS_PARAM_SPEC_FLAGS:
8251  * @pspec: a valid #GParamSpec instance
8252  *
8253  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
8254  *
8255  * Returns: %TRUE on success.
8256  */
8257
8258
8259 /**
8260  * G_IS_PARAM_SPEC_FLOAT:
8261  * @pspec: a valid #GParamSpec instance
8262  *
8263  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
8264  *
8265  * Returns: %TRUE on success.
8266  */
8267
8268
8269 /**
8270  * G_IS_PARAM_SPEC_GTYPE:
8271  * @pspec: a #GParamSpec
8272  *
8273  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
8274  *
8275  * Since: 2.10
8276  * Returns: %TRUE on success.
8277  */
8278
8279
8280 /**
8281  * G_IS_PARAM_SPEC_INT:
8282  * @pspec: a valid #GParamSpec instance
8283  *
8284  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
8285  *
8286  * Returns: %TRUE on success.
8287  */
8288
8289
8290 /**
8291  * G_IS_PARAM_SPEC_INT64:
8292  * @pspec: a valid #GParamSpec instance
8293  *
8294  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
8295  *
8296  * Returns: %TRUE on success.
8297  */
8298
8299
8300 /**
8301  * G_IS_PARAM_SPEC_LONG:
8302  * @pspec: a valid #GParamSpec instance
8303  *
8304  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
8305  *
8306  * Returns: %TRUE on success.
8307  */
8308
8309
8310 /**
8311  * G_IS_PARAM_SPEC_OBJECT:
8312  * @pspec: a valid #GParamSpec instance
8313  *
8314  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
8315  *
8316  * Returns: %TRUE on success.
8317  */
8318
8319
8320 /**
8321  * G_IS_PARAM_SPEC_OVERRIDE:
8322  * @pspec: a #GParamSpec
8323  *
8324  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
8325  *
8326  * Since: 2.4
8327  * Returns: %TRUE on success.
8328  */
8329
8330
8331 /**
8332  * G_IS_PARAM_SPEC_PARAM:
8333  * @pspec: a valid #GParamSpec instance
8334  *
8335  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
8336  *
8337  * Returns: %TRUE on success.
8338  */
8339
8340
8341 /**
8342  * G_IS_PARAM_SPEC_POINTER:
8343  * @pspec: a valid #GParamSpec instance
8344  *
8345  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
8346  *
8347  * Returns: %TRUE on success.
8348  */
8349
8350
8351 /**
8352  * G_IS_PARAM_SPEC_STRING:
8353  * @pspec: a valid #GParamSpec instance
8354  *
8355  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
8356  *
8357  * Returns: %TRUE on success.
8358  */
8359
8360
8361 /**
8362  * G_IS_PARAM_SPEC_UCHAR:
8363  * @pspec: a valid #GParamSpec instance
8364  *
8365  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
8366  *
8367  * Returns: %TRUE on success.
8368  */
8369
8370
8371 /**
8372  * G_IS_PARAM_SPEC_UINT:
8373  * @pspec: a valid #GParamSpec instance
8374  *
8375  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
8376  *
8377  * Returns: %TRUE on success.
8378  */
8379
8380
8381 /**
8382  * G_IS_PARAM_SPEC_UINT64:
8383  * @pspec: a valid #GParamSpec instance
8384  *
8385  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
8386  *
8387  * Returns: %TRUE on success.
8388  */
8389
8390
8391 /**
8392  * G_IS_PARAM_SPEC_ULONG:
8393  * @pspec: a valid #GParamSpec instance
8394  *
8395  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
8396  *
8397  * Returns: %TRUE on success.
8398  */
8399
8400
8401 /**
8402  * G_IS_PARAM_SPEC_UNICHAR:
8403  * @pspec: a valid #GParamSpec instance
8404  *
8405  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
8406  *
8407  * Returns: %TRUE on success.
8408  */
8409
8410
8411 /**
8412  * G_IS_PARAM_SPEC_VALUE_ARRAY:
8413  * @pspec: a valid #GParamSpec instance
8414  *
8415  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
8416  *
8417  * Returns: %TRUE on success.
8418  */
8419
8420
8421 /**
8422  * G_IS_PARAM_SPEC_VARIANT:
8423  * @pspec: a #GParamSpec
8424  *
8425  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
8426  *
8427  * Returns: %TRUE on success
8428  * Since: 2.26
8429  */
8430
8431
8432 /**
8433  * G_IS_VALUE:
8434  * @value: A #GValue structure.
8435  *
8436  * Checks if @value is a valid and initialized #GValue structure.
8437  *
8438  * Returns: %TRUE on success.
8439  */
8440
8441
8442 /**
8443  * G_MARKUP_ERROR:
8444  *
8445  * Error domain for markup parsing.
8446  * Errors in this domain will be from the #GMarkupError enumeration.
8447  * See #GError for information on error domains.
8448  */
8449
8450
8451 /**
8452  * G_NODE_IS_LEAF:
8453  * @node: a #GNode
8454  *
8455  * Returns %TRUE if a #GNode is a leaf node.
8456  * (i.e. it has no children)
8457  *
8458  * Returns: %TRUE if the #GNode is a leaf node
8459  */
8460
8461
8462 /**
8463  * G_NODE_IS_ROOT:
8464  * @node: a #GNode
8465  *
8466  * Returns %TRUE if a #GNode is the root of a tree.
8467  * (i.e. it has no parent or siblings)
8468  *
8469  * Returns: %TRUE if the #GNode is the root of a tree
8470  */
8471
8472
8473 /**
8474  * G_OBJECT:
8475  * @object: Object which is subject to casting.
8476  *
8477  * Casts a #GObject or derived pointer into a (GObject*) pointer.
8478  * Depending on the current debugging level, this function may invoke
8479  * certain runtime checks to identify invalid casts.
8480  */
8481
8482
8483 /**
8484  * G_OBJECT_CLASS:
8485  * @class: a valid #GObjectClass
8486  *
8487  * Casts a derived #GObjectClass structure into a #GObjectClass structure.
8488  */
8489
8490
8491 /**
8492  * G_OBJECT_CLASS_NAME:
8493  * @class: a valid #GObjectClass
8494  *
8495  * Return the name of a class structure's type.
8496  * should not be freed.
8497  *
8498  * Returns: Type name of @class. The string is owned by the type system and
8499  */
8500
8501
8502 /**
8503  * G_OBJECT_CLASS_TYPE:
8504  * @class: a valid #GObjectClass
8505  *
8506  * Get the type id of a class structure.
8507  *
8508  * Returns: Type id of @class.
8509  */
8510
8511
8512 /**
8513  * G_OBJECT_GET_CLASS:
8514  * @object: a #GObject instance.
8515  *
8516  * Get the class structure associated to a #GObject instance.
8517  *
8518  * Returns: pointer to object class structure.
8519  */
8520
8521
8522 /**
8523  * G_OBJECT_TYPE:
8524  * @object: Object to return the type id for.
8525  *
8526  * Get the type id of an object.
8527  *
8528  * Returns: Type id of @object.
8529  */
8530
8531
8532 /**
8533  * G_OBJECT_TYPE_NAME:
8534  * @object: Object to return the type name for.
8535  *
8536  * Get the name of an object's type.
8537  * should not be freed.
8538  *
8539  * Returns: Type name of @object. The string is owned by the type system and
8540  */
8541
8542
8543 /**
8544  * G_OBJECT_WARN_INVALID_PROPERTY_ID:
8545  * @object: the #GObject on which set_property() or get_property() was called
8546  * @property_id: the numeric id of the property
8547  * @pspec: the #GParamSpec of the property
8548  *
8549  * This macro should be used to emit a standard warning about unexpected
8550  * properties in set_property() and get_property() implementations.
8551  */
8552
8553
8554 /**
8555  * G_OPTION_ERROR:
8556  *
8557  * Error domain for option parsing. Errors in this domain will
8558  * be from the #GOptionError enumeration. See #GError for information on
8559  * error domains.
8560  */
8561
8562
8563 /**
8564  * G_OPTION_REMAINING:
8565  *
8566  * If a long option in the main group has this name, it is not treated as a
8567  * regular option. Instead it collects all non-option arguments which would
8568  * otherwise be left in <literal>argv</literal>. The option must be of type
8569  * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY
8570  * or %G_OPTION_ARG_FILENAME_ARRAY.
8571  * Using #G_OPTION_REMAINING instead of simply scanning <literal>argv</literal>
8572  * for leftover arguments has the advantage that GOption takes care of
8573  * necessary encoding conversions for strings or filenames.
8574  *
8575  * Since: 2.6
8576  */
8577
8578
8579 /**
8580  * G_PARAM_MASK:
8581  *
8582  * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
8583  */
8584
8585
8586 /**
8587  * G_PARAM_READWRITE:
8588  *
8589  * #GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.
8590  */
8591
8592
8593 /**
8594  * G_PARAM_SPEC:
8595  * @pspec: a valid #GParamSpec
8596  *
8597  * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into
8598  * a #GParamSpec object.
8599  */
8600
8601
8602 /**
8603  * G_PARAM_SPEC_BOOLEAN:
8604  * @pspec: a valid #GParamSpec instance
8605  *
8606  * Cast a #GParamSpec instance into a #GParamSpecBoolean.
8607  */
8608
8609
8610 /**
8611  * G_PARAM_SPEC_BOXED:
8612  * @pspec: a valid #GParamSpec instance
8613  *
8614  * Cast a #GParamSpec instance into a #GParamSpecBoxed.
8615  */
8616
8617
8618 /**
8619  * G_PARAM_SPEC_CHAR:
8620  * @pspec: a valid #GParamSpec instance
8621  *
8622  * Cast a #GParamSpec instance into a #GParamSpecChar.
8623  */
8624
8625
8626 /**
8627  * G_PARAM_SPEC_CLASS:
8628  * @pclass: a valid #GParamSpecClass
8629  *
8630  * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure.
8631  */
8632
8633
8634 /**
8635  * G_PARAM_SPEC_DOUBLE:
8636  * @pspec: a valid #GParamSpec instance
8637  *
8638  * Cast a #GParamSpec instance into a #GParamSpecDouble.
8639  */
8640
8641
8642 /**
8643  * G_PARAM_SPEC_ENUM:
8644  * @pspec: a valid #GParamSpec instance
8645  *
8646  * Cast a #GParamSpec instance into a #GParamSpecEnum.
8647  */
8648
8649
8650 /**
8651  * G_PARAM_SPEC_FLAGS:
8652  * @pspec: a valid #GParamSpec instance
8653  *
8654  * Cast a #GParamSpec instance into a #GParamSpecFlags.
8655  */
8656
8657
8658 /**
8659  * G_PARAM_SPEC_FLOAT:
8660  * @pspec: a valid #GParamSpec instance
8661  *
8662  * Cast a #GParamSpec instance into a #GParamSpecFloat.
8663  */
8664
8665
8666 /**
8667  * G_PARAM_SPEC_GET_CLASS:
8668  * @pspec: a valid #GParamSpec
8669  *
8670  * Retrieves the #GParamSpecClass of a #GParamSpec.
8671  */
8672
8673
8674 /**
8675  * G_PARAM_SPEC_GTYPE:
8676  * @pspec: a #GParamSpec
8677  *
8678  * Casts a #GParamSpec into a #GParamSpecGType.
8679  *
8680  * Since: 2.10
8681  */
8682
8683
8684 /**
8685  * G_PARAM_SPEC_INT:
8686  * @pspec: a valid #GParamSpec instance
8687  *
8688  * Cast a #GParamSpec instance into a #GParamSpecInt.
8689  */
8690
8691
8692 /**
8693  * G_PARAM_SPEC_INT64:
8694  * @pspec: a valid #GParamSpec instance
8695  *
8696  * Cast a #GParamSpec instance into a #GParamSpecInt64.
8697  */
8698
8699
8700 /**
8701  * G_PARAM_SPEC_LONG:
8702  * @pspec: a valid #GParamSpec instance
8703  *
8704  * Cast a #GParamSpec instance into a #GParamSpecLong.
8705  */
8706
8707
8708 /**
8709  * G_PARAM_SPEC_OBJECT:
8710  * @pspec: a valid #GParamSpec instance
8711  *
8712  * Casts a #GParamSpec instance into a #GParamSpecObject.
8713  */
8714
8715
8716 /**
8717  * G_PARAM_SPEC_OVERRIDE:
8718  * @pspec: a #GParamSpec
8719  *
8720  * Casts a #GParamSpec into a #GParamSpecOverride.
8721  *
8722  * Since: 2.4
8723  */
8724
8725
8726 /**
8727  * G_PARAM_SPEC_PARAM:
8728  * @pspec: a valid #GParamSpec instance
8729  *
8730  * Casts a #GParamSpec instance into a #GParamSpecParam.
8731  */
8732
8733
8734 /**
8735  * G_PARAM_SPEC_POINTER:
8736  * @pspec: a valid #GParamSpec instance
8737  *
8738  * Casts a #GParamSpec instance into a #GParamSpecPointer.
8739  */
8740
8741
8742 /**
8743  * G_PARAM_SPEC_STRING:
8744  * @pspec: a valid #GParamSpec instance
8745  *
8746  * Casts a #GParamSpec instance into a #GParamSpecString.
8747  */
8748
8749
8750 /**
8751  * G_PARAM_SPEC_TYPE:
8752  * @pspec: a valid #GParamSpec
8753  *
8754  * Retrieves the #GType of this @pspec.
8755  */
8756
8757
8758 /**
8759  * G_PARAM_SPEC_TYPE_NAME:
8760  * @pspec: a valid #GParamSpec
8761  *
8762  * Retrieves the #GType name of this @pspec.
8763  */
8764
8765
8766 /**
8767  * G_PARAM_SPEC_UCHAR:
8768  * @pspec: a valid #GParamSpec instance
8769  *
8770  * Cast a #GParamSpec instance into a #GParamSpecUChar.
8771  */
8772
8773
8774 /**
8775  * G_PARAM_SPEC_UINT:
8776  * @pspec: a valid #GParamSpec instance
8777  *
8778  * Cast a #GParamSpec instance into a #GParamSpecUInt.
8779  */
8780
8781
8782 /**
8783  * G_PARAM_SPEC_UINT64:
8784  * @pspec: a valid #GParamSpec instance
8785  *
8786  * Cast a #GParamSpec instance into a #GParamSpecUInt64.
8787  */
8788
8789
8790 /**
8791  * G_PARAM_SPEC_ULONG:
8792  * @pspec: a valid #GParamSpec instance
8793  *
8794  * Cast a #GParamSpec instance into a #GParamSpecULong.
8795  */
8796
8797
8798 /**
8799  * G_PARAM_SPEC_UNICHAR:
8800  * @pspec: a valid #GParamSpec instance
8801  *
8802  * Cast a #GParamSpec instance into a #GParamSpecUnichar.
8803  */
8804
8805
8806 /**
8807  * G_PARAM_SPEC_VALUE_ARRAY:
8808  * @pspec: a valid #GParamSpec instance
8809  *
8810  * Cast a #GParamSpec instance into a #GParamSpecValueArray.
8811  */
8812
8813
8814 /**
8815  * G_PARAM_SPEC_VALUE_TYPE:
8816  * @pspec: a valid #GParamSpec
8817  *
8818  * Retrieves the #GType to initialize a #GValue for this parameter.
8819  */
8820
8821
8822 /**
8823  * G_PARAM_SPEC_VARIANT:
8824  * @pspec: a #GParamSpec
8825  *
8826  * Casts a #GParamSpec into a #GParamSpecVariant.
8827  *
8828  * Since: 2.26
8829  */
8830
8831
8832 /**
8833  * G_PARAM_STATIC_STRINGS:
8834  *
8835  * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
8836  * Since 2.13.0
8837  */
8838
8839
8840 /**
8841  * G_PARAM_USER_SHIFT:
8842  *
8843  * Minimum shift count to be used for user defined flags, to be stored in
8844  * #GParamSpec.flags. The maximum allowed is 30 + G_PARAM_USER_SHIFT.
8845  */
8846
8847
8848 /**
8849  * G_PRIORITY_DEFAULT:
8850  *
8851  * Use this for default priority event sources.
8852  * In GLib this priority is used when adding timeout functions
8853  * with g_timeout_add(). In GDK this priority is used for events
8854  * from the X server.
8855  */
8856
8857
8858 /**
8859  * G_PRIORITY_DEFAULT_IDLE:
8860  *
8861  * Use this for default priority idle functions.
8862  * In GLib this priority is used when adding idle functions with
8863  * g_idle_add().
8864  */
8865
8866
8867 /**
8868  * G_PRIORITY_HIGH:
8869  *
8870  * Use this for high priority event sources.
8871  * It is not used within GLib or GTK+.
8872  */
8873
8874
8875 /**
8876  * G_PRIORITY_HIGH_IDLE:
8877  *
8878  * Use this for high priority idle functions.
8879  * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations,
8880  * and #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is
8881  * done to ensure that any pending resizes are processed before any
8882  * pending redraws, so that widgets are not redrawn twice unnecessarily.)
8883  */
8884
8885
8886 /**
8887  * G_PRIORITY_LOW:
8888  *
8889  * Use this for very low priority background tasks.
8890  * It is not used within GLib or GTK+.
8891  */
8892
8893
8894 /**
8895  * G_PROXY_EXTENSION_POINT_NAME:
8896  *
8897  * Extension point for proxy functionality.
8898  * See <link linkend="extending-gio">Extending GIO</link>.
8899  *
8900  * Since: 2.26
8901  */
8902
8903
8904 /**
8905  * G_PROXY_RESOLVER_EXTENSION_POINT_NAME:
8906  *
8907  * Extension point for proxy resolving functionality.
8908  * See <link linkend="extending-gio">Extending GIO</link>.
8909  */
8910
8911
8912 /**
8913  * G_REGEX_ERROR:
8914  *
8915  * Error domain for regular expressions. Errors in this domain will be
8916  * from the #GRegexError enumeration. See #GError for information on
8917  * error domains.
8918  *
8919  * Since: 2.14
8920  */
8921
8922
8923 /**
8924  * G_RESOLVER_ERROR:
8925  *
8926  * Error domain for #GResolver. Errors in this domain will be from the
8927  * #GResolverError enumeration. See #GError for more information on
8928  * error domains.
8929  */
8930
8931
8932 /**
8933  * G_SETTINGS_BACKEND_EXTENSION_POINT_NAME:
8934  *
8935  * Extension point for #GSettingsBackend functionality.
8936  */
8937
8938
8939 /**
8940  * G_SIGNAL_FLAGS_MASK:
8941  *
8942  * A mask for all #GSignalFlags bits.
8943  */
8944
8945
8946 /**
8947  * G_SIGNAL_MATCH_MASK:
8948  *
8949  * A mask for all #GSignalMatchType bits.
8950  */
8951
8952
8953 /**
8954  * G_SIGNAL_TYPE_STATIC_SCOPE:
8955  *
8956  * This macro flags signal argument types for which the signal system may
8957  * assume that instances thereof remain persistent across all signal emissions
8958  * they are used in. This is only useful for non ref-counted, value-copy types.
8959  * To flag a signal argument in this way, add
8960  * <literal>| G_SIGNAL_TYPE_STATIC_SCOPE</literal> to the corresponding argument
8961  * of g_signal_new().
8962  * |[
8963  * g_signal_new ("size_request",
8964  * G_TYPE_FROM_CLASS (gobject_class),
8965  * G_SIGNAL_RUN_FIRST,
8966  * G_STRUCT_OFFSET (GtkWidgetClass, size_request),
8967  * NULL, NULL,
8968  * _gtk_marshal_VOID__BOXED,
8969  * G_TYPE_NONE, 1,
8970  * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
8971  * ]|
8972  */
8973
8974
8975 /**
8976  * G_TIME_SPAN_DAY:
8977  *
8978  * Evaluates to a time span of one day.
8979  *
8980  * Since: 2.26
8981  */
8982
8983
8984 /**
8985  * G_TIME_SPAN_HOUR:
8986  *
8987  * Evaluates to a time span of one hour.
8988  *
8989  * Since: 2.26
8990  */
8991
8992
8993 /**
8994  * G_TIME_SPAN_MILLISECOND:
8995  *
8996  * Evaluates to a time span of one millisecond.
8997  *
8998  * Since: 2.26
8999  */
9000
9001
9002 /**
9003  * G_TIME_SPAN_MINUTE:
9004  *
9005  * Evaluates to a time span of one minute.
9006  *
9007  * Since: 2.26
9008  */
9009
9010
9011 /**
9012  * G_TIME_SPAN_SECOND:
9013  *
9014  * Evaluates to a time span of one second.
9015  *
9016  * Since: 2.26
9017  */
9018
9019
9020 /**
9021  * G_TLS_BACKEND_EXTENSION_POINT_NAME:
9022  *
9023  * Extension point for TLS functionality via #GTlsBackend.
9024  * See <link linkend="extending-gio">Extending GIO</link>.
9025  */
9026
9027
9028 /**
9029  * G_TLS_ERROR:
9030  *
9031  * Error domain for TLS. Errors in this domain will be from the
9032  * #GTlsError enumeration. See #GError for more information on error
9033  * domains.
9034  */
9035
9036
9037 /**
9038  * G_TYPE_ARRAY:
9039  *
9040  * The #GType for a boxed type holding a #GArray reference.
9041  *
9042  * Since: 2.22
9043  */
9044
9045
9046 /**
9047  * G_TYPE_BOOLEAN:
9048  *
9049  * The fundamental type corresponding to #gboolean.
9050  */
9051
9052
9053 /**
9054  * G_TYPE_BOXED:
9055  *
9056  * The fundamental type from which all boxed types are derived.
9057  */
9058
9059
9060 /**
9061  * G_TYPE_BYTE_ARRAY:
9062  *
9063  * The #GType for a boxed type holding a #GByteArray reference.
9064  *
9065  * Since: 2.22
9066  */
9067
9068
9069 /**
9070  * G_TYPE_CHAR:
9071  *
9072  * The fundamental type corresponding to #gchar.
9073  * The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
9074  * This may or may not be the same type a the C type "gchar".
9075  */
9076
9077
9078 /**
9079  * G_TYPE_CHECK_CLASS_CAST:
9080  * @g_class: Location of a #GTypeClass structure.
9081  * @g_type: The type to be returned.
9082  * @c_type: The corresponding C type of class structure of @g_type.
9083  *
9084  * Checks that @g_class is a class structure of the type identified by @g_type
9085  * and issues a warning if this is not the case. Returns @g_class casted
9086  * to a pointer to @c_type.
9087  * This macro should only be used in type implementations.
9088  */
9089
9090
9091 /**
9092  * G_TYPE_CHECK_CLASS_TYPE:
9093  * @g_class: Location of a #GTypeClass structure.
9094  * @g_type: The type to be checked.
9095  *
9096  * Checks if @g_class is a class structure of the type identified by
9097  * This macro should only be used in type implementations.
9098  *
9099  * Returns: %TRUE on success.
9100  */
9101
9102
9103 /**
9104  * G_TYPE_CHECK_INSTANCE:
9105  * @instance: Location of a #GTypeInstance structure.
9106  *
9107  * Checks if @instance is a valid #GTypeInstance structure,
9108  * otherwise issues a warning and returns %FALSE.
9109  * This macro should only be used in type implementations.
9110  *
9111  * Returns: %TRUE on success.
9112  */
9113
9114
9115 /**
9116  * G_TYPE_CHECK_INSTANCE_CAST:
9117  * @instance: Location of a #GTypeInstance structure.
9118  * @g_type: The type to be returned.
9119  * @c_type: The corresponding C type of @g_type.
9120  *
9121  * Checks that @instance is an instance of the type identified by @g_type
9122  * and issues a warning if this is not the case. Returns @instance casted
9123  * to a pointer to @c_type.
9124  * This macro should only be used in type implementations.
9125  */
9126
9127
9128 /**
9129  * G_TYPE_CHECK_INSTANCE_TYPE:
9130  * @instance: Location of a #GTypeInstance structure.
9131  * @g_type: The type to be checked
9132  *
9133  * Checks if @instance is an instance of the type identified by @g_type.
9134  * This macro should only be used in type implementations.
9135  *
9136  * Returns: %TRUE on success.
9137  */
9138
9139
9140 /**
9141  * G_TYPE_CHECK_VALUE:
9142  * @value: a #GValue
9143  *
9144  * Checks if @value has been initialized to hold values
9145  * of a value type.
9146  * This macro should only be used in type implementations.
9147  *
9148  * Returns: %TRUE on success.
9149  */
9150
9151
9152 /**
9153  * G_TYPE_CHECK_VALUE_TYPE:
9154  * @value: a #GValue
9155  * @g_type: The type to be checked.
9156  *
9157  * Checks if @value has been initialized to hold values
9158  * of type @g_type.
9159  * This macro should only be used in type implementations.
9160  *
9161  * Returns: %TRUE on success.
9162  */
9163
9164
9165 /**
9166  * G_TYPE_CLASS_GET_PRIVATE:
9167  * @klass: the class of a type deriving from @private_type.
9168  * @g_type: the type identifying which private data to retrieve.
9169  * @c_type: The C type for the private structure.
9170  *
9171  * Gets the private class structure for a particular type.
9172  * The private structure must have been registered in the
9173  * get_type() function with g_type_add_class_private().
9174  * This macro should only be used in type implementations.
9175  *
9176  * Since: 2.24
9177  * Returns: a pointer to the private data structure.
9178  */
9179
9180
9181 /**
9182  * G_TYPE_CLOSURE:
9183  *
9184  * The #GType for #GClosure.
9185  */
9186
9187
9188 /**
9189  * G_TYPE_DATE:
9190  *
9191  * The #GType for #GDate.
9192  */
9193
9194
9195 /**
9196  * G_TYPE_DATE_TIME:
9197  *
9198  * The #GType for a boxed type holding a #GDateTime.
9199  *
9200  * Since: 2.26
9201  */
9202
9203
9204 /**
9205  * G_TYPE_DBUS_ANNOTATION_INFO:
9206  *
9207  * The #GType for a boxed type holding a #GDBusAnnotationInfo.
9208  *
9209  * Since: 2.26
9210  */
9211
9212
9213 /**
9214  * G_TYPE_DBUS_ARG_INFO:
9215  *
9216  * The #GType for a boxed type holding a #GDBusArgInfo.
9217  *
9218  * Since: 2.26
9219  */
9220
9221
9222 /**
9223  * G_TYPE_DBUS_INTERFACE_INFO:
9224  *
9225  * The #GType for a boxed type holding a #GDBusInterfaceInfo.
9226  *
9227  * Since: 2.26
9228  */
9229
9230
9231 /**
9232  * G_TYPE_DBUS_METHOD_INFO:
9233  *
9234  * The #GType for a boxed type holding a #GDBusMethodInfo.
9235  *
9236  * Since: 2.26
9237  */
9238
9239
9240 /**
9241  * G_TYPE_DBUS_NODE_INFO:
9242  *
9243  * The #GType for a boxed type holding a #GDBusNodeInfo.
9244  *
9245  * Since: 2.26
9246  */
9247
9248
9249 /**
9250  * G_TYPE_DBUS_PROPERTY_INFO:
9251  *
9252  * The #GType for a boxed type holding a #GDBusPropertyInfo.
9253  *
9254  * Since: 2.26
9255  */
9256
9257
9258 /**
9259  * G_TYPE_DBUS_SIGNAL_INFO:
9260  *
9261  * The #GType for a boxed type holding a #GDBusSignalInfo.
9262  *
9263  * Since: 2.26
9264  */
9265
9266
9267 /**
9268  * G_TYPE_DOUBLE:
9269  *
9270  * The fundamental type corresponding to #gdouble.
9271  */
9272
9273
9274 /**
9275  * G_TYPE_ENUM:
9276  *
9277  * The fundamental type from which all enumeration types are derived.
9278  */
9279
9280
9281 /**
9282  * G_TYPE_ERROR:
9283  *
9284  * The #GType for a boxed type holding a #GError.
9285  *
9286  * Since: 2.26
9287  */
9288
9289
9290 /**
9291  * G_TYPE_FLAGS:
9292  *
9293  * The fundamental type from which all flags types are derived.
9294  */
9295
9296
9297 /**
9298  * G_TYPE_FLAG_RESERVED_ID_BIT:
9299  *
9300  * A bit in the type number that's supposed to be left untouched.
9301  */
9302
9303
9304 /**
9305  * G_TYPE_FLOAT:
9306  *
9307  * The fundamental type corresponding to #gfloat.
9308  */
9309
9310
9311 /**
9312  * G_TYPE_FROM_CLASS:
9313  * @g_class: Location of a valid #GTypeClass structure.
9314  *
9315  * Get the type identifier from a given @class structure.
9316  * This macro should only be used in type implementations.
9317  *
9318  * Returns: the #GType
9319  */
9320
9321
9322 /**
9323  * G_TYPE_FROM_INSTANCE:
9324  * @instance: Location of a valid #GTypeInstance structure.
9325  *
9326  * Get the type identifier from a given @instance structure.
9327  * This macro should only be used in type implementations.
9328  *
9329  * Returns: the #GType
9330  */
9331
9332
9333 /**
9334  * G_TYPE_FROM_INTERFACE:
9335  * @g_iface: Location of a valid #GTypeInterface structure.
9336  *
9337  * Get the type identifier from a given @interface structure.
9338  * This macro should only be used in type implementations.
9339  *
9340  * Returns: the #GType
9341  */
9342
9343
9344 /**
9345  * G_TYPE_FUNDAMENTAL:
9346  * @type: A #GType value.
9347  *
9348  * The fundamental type which is the ancestor of @type.
9349  * Fundamental types are types that serve as ultimate bases for the derived types,
9350  * thus they are the roots of distinct inheritance hierarchies.
9351  */
9352
9353
9354 /**
9355  * G_TYPE_FUNDAMENTAL_MAX:
9356  *
9357  * An integer constant that represents the number of identifiers reserved
9358  * for types that are assigned at compile-time.
9359  */
9360
9361
9362 /**
9363  * G_TYPE_FUNDAMENTAL_SHIFT:
9364  *
9365  * Shift value used in converting numbers to type IDs.
9366  */
9367
9368
9369 /**
9370  * G_TYPE_GSTRING:
9371  *
9372  * The #GType for #GString.
9373  */
9374
9375
9376 /**
9377  * G_TYPE_GTYPE:
9378  *
9379  * The type for #GType.
9380  */
9381
9382
9383 /**
9384  * G_TYPE_HASH_TABLE:
9385  *
9386  * The #GType for a boxed type holding a #GHashTable reference.
9387  *
9388  * Since: 2.10
9389  */
9390
9391
9392 /**
9393  * G_TYPE_HAS_VALUE_TABLE:
9394  * @type: A #GType value.
9395  *
9396  * Checks if @type has a #GTypeValueTable.
9397  *
9398  * Returns: %TRUE on success.
9399  */
9400
9401
9402 /**
9403  * G_TYPE_INITIALLY_UNOWNED:
9404  *
9405  * The type for #GInitiallyUnowned.
9406  */
9407
9408
9409 /**
9410  * G_TYPE_INSTANCE_GET_CLASS:
9411  * @instance: Location of the #GTypeInstance structure.
9412  * @g_type: The #GType of the class to be returned.
9413  * @c_type: The C type of the class structure.
9414  *
9415  * Get the class structure of a given @instance, casted
9416  * to a specified ancestor type @g_type of the instance.
9417  * Note that while calling a GInstanceInitFunc(), the class pointer gets
9418  * modified, so it might not always return the expected pointer.
9419  * This macro should only be used in type implementations.
9420  *
9421  * Returns: a pointer to the class structure
9422  */
9423
9424
9425 /**
9426  * G_TYPE_INSTANCE_GET_INTERFACE:
9427  * @instance: Location of the #GTypeInstance structure.
9428  * @g_type: The #GType of the interface to be returned.
9429  * @c_type: The C type of the interface structure.
9430  *
9431  * Get the interface structure for interface @g_type of a given @instance.
9432  * This macro should only be used in type implementations.
9433  *
9434  * Returns: a pointer to the interface structure
9435  */
9436
9437
9438 /**
9439  * G_TYPE_INSTANCE_GET_PRIVATE:
9440  * @instance: the instance of a type deriving from @private_type.
9441  * @g_type: the type identifying which private data to retrieve.
9442  * @c_type: The C type for the private structure.
9443  *
9444  * Gets the private structure for a particular type.
9445  * The private structure must have been registered in the
9446  * class_init function with g_type_class_add_private().
9447  * This macro should only be used in type implementations.
9448  *
9449  * Since: 2.4
9450  * Returns: a pointer to the private data structure.
9451  */
9452
9453
9454 /**
9455  * G_TYPE_INT:
9456  *
9457  * The fundamental type corresponding to #gint.
9458  */
9459
9460
9461 /**
9462  * G_TYPE_INT64:
9463  *
9464  * The fundamental type corresponding to #gint64.
9465  */
9466
9467
9468 /**
9469  * G_TYPE_INTERFACE:
9470  *
9471  * The fundamental type from which all interfaces are derived.
9472  */
9473
9474
9475 /**
9476  * G_TYPE_INVALID:
9477  *
9478  * An invalid #GType used as error return value in some functions which return
9479  * a #GType.
9480  */
9481
9482
9483 /**
9484  * G_TYPE_IO_CHANNEL:
9485  *
9486  * The #GType for #GIOChannel.
9487  */
9488
9489
9490 /**
9491  * G_TYPE_IO_CONDITION:
9492  *
9493  * The #GType for #GIOCondition.
9494  */
9495
9496
9497 /**
9498  * G_TYPE_IS_ABSTRACT:
9499  * @type: A #GType value.
9500  *
9501  * Checks if @type is an abstract type.  An abstract type cannot be
9502  * instantiated and is normally used as an abstract base class for
9503  * derived classes.
9504  *
9505  * Returns: %TRUE on success.
9506  */
9507
9508
9509 /**
9510  * G_TYPE_IS_CLASSED:
9511  * @type: A #GType value.
9512  *
9513  * Checks if @type is a classed type.
9514  *
9515  * Returns: %TRUE on success.
9516  */
9517
9518
9519 /**
9520  * G_TYPE_IS_DEEP_DERIVABLE:
9521  * @type: A #GType value.
9522  *
9523  * Checks if @type is a deep derivable type.  A deep derivable type
9524  * can be used as the base class of a deep (multi-level) class hierarchy.
9525  *
9526  * Returns: %TRUE on success.
9527  */
9528
9529
9530 /**
9531  * G_TYPE_IS_DERIVABLE:
9532  * @type: A #GType value.
9533  *
9534  * Checks if @type is a derivable type.  A derivable type can
9535  * be used as the base class of a flat (single-level) class hierarchy.
9536  *
9537  * Returns: %TRUE on success.
9538  */
9539
9540
9541 /**
9542  * G_TYPE_IS_DERIVED:
9543  * @type: A #GType value.
9544  *
9545  * Checks if @type is derived (or in object-oriented terminology:
9546  * inherited) from another type (this holds true for all non-fundamental
9547  * types).
9548  *
9549  * Returns: %TRUE on success.
9550  */
9551
9552
9553 /**
9554  * G_TYPE_IS_ENUM:
9555  * @type: a #GType ID.
9556  *
9557  * Checks whether @type "is a" %G_TYPE_ENUM.
9558  *
9559  * Returns: %TRUE if @type "is a" %G_TYPE_ENUM.
9560  */
9561
9562
9563 /**
9564  * G_TYPE_IS_FLAGS:
9565  * @type: a #GType ID.
9566  *
9567  * Checks whether @type "is a" %G_TYPE_FLAGS.
9568  *
9569  * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS.
9570  */
9571
9572
9573 /**
9574  * G_TYPE_IS_FUNDAMENTAL:
9575  * @type: A #GType value.
9576  *
9577  * Checks if @type is a fundamental type.
9578  *
9579  * Returns: %TRUE on success.
9580  */
9581
9582
9583 /**
9584  * G_TYPE_IS_INSTANTIATABLE:
9585  * @type: A #GType value.
9586  *
9587  * Checks if @type can be instantiated.  Instantiation is the
9588  * process of creating an instance (object) of this type.
9589  *
9590  * Returns: %TRUE on success.
9591  */
9592
9593
9594 /**
9595  * G_TYPE_IS_INTERFACE:
9596  * @type: A #GType value.
9597  *
9598  * Checks if @type is an interface type.
9599  * An interface type provides a pure API, the implementation
9600  * of which is provided by another type (which is then said to conform
9601  * to the interface).  GLib interfaces are somewhat analogous to Java
9602  * interfaces and C++ classes containing only pure virtual functions,
9603  * with the difference that GType interfaces are not derivable (but see
9604  * g_type_interface_add_prerequisite() for an alternative).
9605  *
9606  * Returns: %TRUE on success.
9607  */
9608
9609
9610 /**
9611  * G_TYPE_IS_OBJECT:
9612  * @type: Type id to check
9613  *
9614  * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it.
9615  *
9616  * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT.
9617  */
9618
9619
9620 /**
9621  * G_TYPE_IS_PARAM:
9622  * @type: a #GType ID
9623  *
9624  * Checks whether @type "is a" %G_TYPE_PARAM.
9625  */
9626
9627
9628 /**
9629  * G_TYPE_IS_VALUE:
9630  * @type: A #GType value.
9631  *
9632  * Checks whether the passed in type ID can be used for g_value_init().
9633  * That is, this macro checks whether this type provides an implementation
9634  * of the #GTypeValueTable functions required for a type to create a #GValue of.
9635  *
9636  * Returns: Whether @type is suitable as a #GValue type.
9637  */
9638
9639
9640 /**
9641  * G_TYPE_IS_VALUE_ABSTRACT:
9642  * @type: A #GType value.
9643  *
9644  * Checks if @type is an abstract value type.  An abstract value type introduces
9645  * a value table, but can't be used for g_value_init() and is normally used as
9646  * an abstract base type for derived value types.
9647  *
9648  * Returns: %TRUE on success.
9649  */
9650
9651
9652 /**
9653  * G_TYPE_IS_VALUE_TYPE:
9654  * @type: A #GType value.
9655  *
9656  * Checks if @type is a value type and can be used with g_value_init().
9657  *
9658  * Returns: %TRUE on success.
9659  */
9660
9661
9662 /**
9663  * G_TYPE_LONG:
9664  *
9665  * The fundamental type corresponding to #glong.
9666  */
9667
9668
9669 /**
9670  * G_TYPE_MAKE_FUNDAMENTAL:
9671  * @x: the fundamental type number.
9672  *
9673  * Get the type ID for the fundamental type number @x.
9674  * Use g_type_fundamental_next() instead of this macro to create new fundamental
9675  * types.
9676  *
9677  * Returns: the GType
9678  */
9679
9680
9681 /**
9682  * G_TYPE_NONE:
9683  *
9684  * A fundamental type which is used as a replacement for the C
9685  * <literal>void</literal> return type.
9686  */
9687
9688
9689 /**
9690  * G_TYPE_OBJECT:
9691  *
9692  * The fundamental type for #GObject.
9693  */
9694
9695
9696 /**
9697  * G_TYPE_PARAM:
9698  *
9699  * The fundamental type from which all #GParamSpec types are derived.
9700  */
9701
9702
9703 /**
9704  * G_TYPE_PARAM_BOOLEAN:
9705  *
9706  * The #GType of #GParamSpecBoolean.
9707  */
9708
9709
9710 /**
9711  * G_TYPE_PARAM_BOXED:
9712  *
9713  * The #GType of #GParamSpecBoxed.
9714  */
9715
9716
9717 /**
9718  * G_TYPE_PARAM_CHAR:
9719  *
9720  * The #GType of #GParamSpecChar.
9721  */
9722
9723
9724 /**
9725  * G_TYPE_PARAM_DOUBLE:
9726  *
9727  * The #GType of #GParamSpecDouble.
9728  */
9729
9730
9731 /**
9732  * G_TYPE_PARAM_ENUM:
9733  *
9734  * The #GType of #GParamSpecEnum.
9735  */
9736
9737
9738 /**
9739  * G_TYPE_PARAM_FLAGS:
9740  *
9741  * The #GType of #GParamSpecFlags.
9742  */
9743
9744
9745 /**
9746  * G_TYPE_PARAM_FLOAT:
9747  *
9748  * The #GType of #GParamSpecFloat.
9749  */
9750
9751
9752 /**
9753  * G_TYPE_PARAM_GTYPE:
9754  *
9755  * The #GType of #GParamSpecGType.
9756  *
9757  * Since: 2.10
9758  */
9759
9760
9761 /**
9762  * G_TYPE_PARAM_INT:
9763  *
9764  * The #GType of #GParamSpecInt.
9765  */
9766
9767
9768 /**
9769  * G_TYPE_PARAM_INT64:
9770  *
9771  * The #GType of #GParamSpecInt64.
9772  */
9773
9774
9775 /**
9776  * G_TYPE_PARAM_LONG:
9777  *
9778  * The #GType of #GParamSpecLong.
9779  */
9780
9781
9782 /**
9783  * G_TYPE_PARAM_OBJECT:
9784  *
9785  * The #GType of #GParamSpecObject.
9786  */
9787
9788
9789 /**
9790  * G_TYPE_PARAM_OVERRIDE:
9791  *
9792  * The #GType of #GParamSpecOverride.
9793  *
9794  * Since: 2.4
9795  */
9796
9797
9798 /**
9799  * G_TYPE_PARAM_PARAM:
9800  *
9801  * The #GType of #GParamSpecParam.
9802  */
9803
9804
9805 /**
9806  * G_TYPE_PARAM_POINTER:
9807  *
9808  * The #GType of #GParamSpecPointer.
9809  */
9810
9811
9812 /**
9813  * G_TYPE_PARAM_STRING:
9814  *
9815  * The #GType of #GParamSpecString.
9816  */
9817
9818
9819 /**
9820  * G_TYPE_PARAM_UCHAR:
9821  *
9822  * The #GType of #GParamSpecUChar.
9823  */
9824
9825
9826 /**
9827  * G_TYPE_PARAM_UINT:
9828  *
9829  * The #GType of #GParamSpecUInt.
9830  */
9831
9832
9833 /**
9834  * G_TYPE_PARAM_UINT64:
9835  *
9836  * The #GType of #GParamSpecUInt64.
9837  */
9838
9839
9840 /**
9841  * G_TYPE_PARAM_ULONG:
9842  *
9843  * The #GType of #GParamSpecULong.
9844  */
9845
9846
9847 /**
9848  * G_TYPE_PARAM_UNICHAR:
9849  *
9850  * The #GType of #GParamSpecUnichar.
9851  */
9852
9853
9854 /**
9855  * G_TYPE_PARAM_VALUE_ARRAY:
9856  *
9857  * The #GType of #GParamSpecValueArray.
9858  */
9859
9860
9861 /**
9862  * G_TYPE_PARAM_VARIANT:
9863  *
9864  * The #GType of #GParamSpecVariant.
9865  *
9866  * Since: 2.26
9867  */
9868
9869
9870 /**
9871  * G_TYPE_POINTER:
9872  *
9873  * The fundamental type corresponding to #gpointer.
9874  */
9875
9876
9877 /**
9878  * G_TYPE_PTR_ARRAY:
9879  *
9880  * The #GType for a boxed type holding a #GPtrArray reference.
9881  *
9882  * Since: 2.22
9883  */
9884
9885
9886 /**
9887  * G_TYPE_REGEX:
9888  *
9889  * The #GType for a boxed type holding a #GRegex reference.
9890  *
9891  * Since: 2.14
9892  */
9893
9894
9895 /**
9896  * G_TYPE_RESERVED_BSE_FIRST:
9897  *
9898  * First fundamental type number to create a new fundamental type id with
9899  * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
9900  */
9901
9902
9903 /**
9904  * G_TYPE_RESERVED_BSE_LAST:
9905  *
9906  * Last fundamental type number reserved for BSE.
9907  */
9908
9909
9910 /**
9911  * G_TYPE_RESERVED_GLIB_FIRST:
9912  *
9913  * First fundamental type number to create a new fundamental type id with
9914  * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
9915  */
9916
9917
9918 /**
9919  * G_TYPE_RESERVED_GLIB_LAST:
9920  *
9921  * Last fundamental type number reserved for GLib.
9922  */
9923
9924
9925 /**
9926  * G_TYPE_RESERVED_USER_FIRST:
9927  *
9928  * First available fundamental type number to create new fundamental
9929  * type id with G_TYPE_MAKE_FUNDAMENTAL().
9930  */
9931
9932
9933 /**
9934  * G_TYPE_STRING:
9935  *
9936  * The fundamental type corresponding to nul-terminated C strings.
9937  */
9938
9939
9940 /**
9941  * G_TYPE_STRV:
9942  *
9943  * The #GType for a boxed type holding a %NULL-terminated array of strings.
9944  * The code fragments in the following example show the use of a property of
9945  * type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
9946  * and g_object_get().
9947  * |[
9948  * g_object_class_install_property (object_class,
9949  * PROP_AUTHORS,
9950  * g_param_spec_boxed ("authors",
9951  * _("Authors"),
9952  * _("List of authors"),
9953  * G_TYPE_STRV,
9954  * G_PARAM_READWRITE));
9955  * gchar *authors[] = { "Owen", "Tim", NULL };
9956  * g_object_set (obj, "authors", authors, NULL);
9957  * gchar *writers[];
9958  * g_object_get (obj, "authors", &writers, NULL);
9959  * /&ast; do something with writers &ast;/
9960  * g_strfreev (writers);
9961  * ]|
9962  *
9963  * Since: 2.4
9964  */
9965
9966
9967 /**
9968  * G_TYPE_UCHAR:
9969  *
9970  * The fundamental type corresponding to #guchar.
9971  */
9972
9973
9974 /**
9975  * G_TYPE_UINT:
9976  *
9977  * The fundamental type corresponding to #guint.
9978  */
9979
9980
9981 /**
9982  * G_TYPE_UINT64:
9983  *
9984  * The fundamental type corresponding to #guint64.
9985  */
9986
9987
9988 /**
9989  * G_TYPE_ULONG:
9990  *
9991  * The fundamental type corresponding to #gulong.
9992  */
9993
9994
9995 /**
9996  * G_TYPE_VALUE:
9997  *
9998  * The type ID of the "GValue" type which is a boxed type,
9999  * used to pass around pointers to GValues.
10000  */
10001
10002
10003 /**
10004  * G_TYPE_VALUE_ARRAY:
10005  *
10006  * The type ID of the "GValueArray" type which is a boxed type,
10007  * used to pass around pointers to GValueArrays.
10008  */
10009
10010
10011 /**
10012  * G_TYPE_VARIANT:
10013  *
10014  * The fundamental type corresponding to #GVariant.
10015  * All floating #GVariant instances passed through the #GType system are
10016  * consumed.
10017  * Note that callbacks in closures, and signal handlers
10018  * for signals of return type %G_TYPE_VARIANT, must never return floating
10019  * variants.
10020  * with this fundamental type in 2.26.
10021  *
10022  * Note: GLib 2.24 did include a boxed type with this name. It was replaced
10023  * Since: 2.26
10024  */
10025
10026
10027 /**
10028  * G_TYPE_VARIANT_BUILDER:
10029  *
10030  * The #GType for a boxed type holding a #GVariantBuilder.
10031  *
10032  * Since: 2.30
10033  */
10034
10035
10036 /**
10037  * G_TYPE_VARIANT_TYPE:
10038  *
10039  * The #GType for a boxed type holding a #GVariantType.
10040  *
10041  * Since: 2.24
10042  */
10043
10044
10045 /**
10046  * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH:
10047  *
10048  * Allowed characters in a path. Includes "!$&'()*+,;=:@/".
10049  */
10050
10051
10052 /**
10053  * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT:
10054  *
10055  * Allowed characters in path elements. Includes "!$&'()*+,;=:@".
10056  */
10057
10058
10059 /**
10060  * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO:
10061  *
10062  * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".
10063  */
10064
10065
10066 /**
10067  * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS:
10068  *
10069  * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".
10070  */
10071
10072
10073 /**
10074  * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS:
10075  *
10076  * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
10077  */
10078
10079
10080 /**
10081  * G_VALUE_HOLDS:
10082  * @value: A #GValue structure.
10083  * @type: A #GType value.
10084  *
10085  * Checks if @value holds (or contains) a value of @type.
10086  * This macro will also check for @value != %NULL and issue a
10087  * warning if the check fails.
10088  *
10089  * Returns: %TRUE if @value holds the @type.
10090  */
10091
10092
10093 /**
10094  * G_VALUE_HOLDS_BOOLEAN:
10095  * @value: a valid #GValue structure
10096  *
10097  * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN.
10098  *
10099  * Returns: %TRUE on success.
10100  */
10101
10102
10103 /**
10104  * G_VALUE_HOLDS_BOXED:
10105  * @value: a valid #GValue structure
10106  *
10107  * Checks whether the given #GValue can hold values derived
10108  * from type %G_TYPE_BOXED.
10109  *
10110  * Returns: %TRUE on success.
10111  */
10112
10113
10114 /**
10115  * G_VALUE_HOLDS_CHAR:
10116  * @value: a valid #GValue structure
10117  *
10118  * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR.
10119  *
10120  * Returns: %TRUE on success.
10121  */
10122
10123
10124 /**
10125  * G_VALUE_HOLDS_DOUBLE:
10126  * @value: a valid #GValue structure
10127  *
10128  * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE.
10129  *
10130  * Returns: %TRUE on success.
10131  */
10132
10133
10134 /**
10135  * G_VALUE_HOLDS_ENUM:
10136  * @value: a valid #GValue structure
10137  *
10138  * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM.
10139  *
10140  * Returns: %TRUE on success.
10141  */
10142
10143
10144 /**
10145  * G_VALUE_HOLDS_FLAGS:
10146  * @value: a valid #GValue structure
10147  *
10148  * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS.
10149  *
10150  * Returns: %TRUE on success.
10151  */
10152
10153
10154 /**
10155  * G_VALUE_HOLDS_FLOAT:
10156  * @value: a valid #GValue structure
10157  *
10158  * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT.
10159  *
10160  * Returns: %TRUE on success.
10161  */
10162
10163
10164 /**
10165  * G_VALUE_HOLDS_GTYPE:
10166  * @value: a valid #GValue structure
10167  *
10168  * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE.
10169  *
10170  * Since: 2.12
10171  * Returns: %TRUE on success.
10172  */
10173
10174
10175 /**
10176  * G_VALUE_HOLDS_INT:
10177  * @value: a valid #GValue structure
10178  *
10179  * Checks whether the given #GValue can hold values of type %G_TYPE_INT.
10180  *
10181  * Returns: %TRUE on success.
10182  */
10183
10184
10185 /**
10186  * G_VALUE_HOLDS_INT64:
10187  * @value: a valid #GValue structure
10188  *
10189  * Checks whether the given #GValue can hold values of type %G_TYPE_INT64.
10190  *
10191  * Returns: %TRUE on success.
10192  */
10193
10194
10195 /**
10196  * G_VALUE_HOLDS_LONG:
10197  * @value: a valid #GValue structure
10198  *
10199  * Checks whether the given #GValue can hold values of type %G_TYPE_LONG.
10200  *
10201  * Returns: %TRUE on success.
10202  */
10203
10204
10205 /**
10206  * G_VALUE_HOLDS_OBJECT:
10207  * @value: a valid #GValue structure
10208  *
10209  * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT.
10210  *
10211  * Returns: %TRUE on success.
10212  */
10213
10214
10215 /**
10216  * G_VALUE_HOLDS_PARAM:
10217  * @value: a valid #GValue structure
10218  *
10219  * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM.
10220  *
10221  * Returns: %TRUE on success.
10222  */
10223
10224
10225 /**
10226  * G_VALUE_HOLDS_POINTER:
10227  * @value: a valid #GValue structure
10228  *
10229  * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER.
10230  *
10231  * Returns: %TRUE on success.
10232  */
10233
10234
10235 /**
10236  * G_VALUE_HOLDS_STRING:
10237  * @value: a valid #GValue structure
10238  *
10239  * Checks whether the given #GValue can hold values of type %G_TYPE_STRING.
10240  *
10241  * Returns: %TRUE on success.
10242  */
10243
10244
10245 /**
10246  * G_VALUE_HOLDS_UCHAR:
10247  * @value: a valid #GValue structure
10248  *
10249  * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR.
10250  *
10251  * Returns: %TRUE on success.
10252  */
10253
10254
10255 /**
10256  * G_VALUE_HOLDS_UINT:
10257  * @value: a valid #GValue structure
10258  *
10259  * Checks whether the given #GValue can hold values of type %G_TYPE_UINT.
10260  *
10261  * Returns: %TRUE on success.
10262  */
10263
10264
10265 /**
10266  * G_VALUE_HOLDS_UINT64:
10267  * @value: a valid #GValue structure
10268  *
10269  * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64.
10270  *
10271  * Returns: %TRUE on success.
10272  */
10273
10274
10275 /**
10276  * G_VALUE_HOLDS_ULONG:
10277  * @value: a valid #GValue structure
10278  *
10279  * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG.
10280  *
10281  * Returns: %TRUE on success.
10282  */
10283
10284
10285 /**
10286  * G_VALUE_HOLDS_VARIANT:
10287  * @value: a valid #GValue structure
10288  *
10289  * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT.
10290  *
10291  * Returns: %TRUE on success.
10292  * Since: 2.26
10293  */
10294
10295
10296 /**
10297  * G_VALUE_NOCOPY_CONTENTS:
10298  *
10299  * If passed to G_VALUE_COLLECT(), allocated data won't be copied
10300  * but used verbatim. This does not affect ref-counted types like
10301  * objects. For more details, see the #GValueTable documentation.
10302  */
10303
10304
10305 /**
10306  * G_VALUE_TYPE:
10307  * @value: A #GValue structure.
10308  *
10309  * Get the type identifier of @value.
10310  *
10311  * Returns: the #GType.
10312  */
10313
10314
10315 /**
10316  * G_VALUE_TYPE_NAME:
10317  * @value: A #GValue structure.
10318  *
10319  * Gets the the type name of @value.
10320  *
10321  * Returns: the type name.
10322  */
10323
10324
10325 /**
10326  * G_VARIANT_TYPE:
10327  * @type_string: a well-formed #GVariantType type string
10328  *
10329  * Converts a string to a const #GVariantType.  Depending on the
10330  * current debugging level, this function may perform a runtime check
10331  * to ensure that @string is a valid GVariant type string.
10332  * It is always a programmer error to use this macro with an invalid
10333  * type string.
10334  * Since 2.24
10335  */
10336
10337
10338 /**
10339  * G_VARIANT_TYPE_ANY:
10340  *
10341  * An indefinite type that is a supertype of every type (including
10342  * itself).
10343  */
10344
10345
10346 /**
10347  * G_VARIANT_TYPE_ARRAY:
10348  *
10349  * An indefinite type that is a supertype of every array type.
10350  */
10351
10352
10353 /**
10354  * G_VARIANT_TYPE_BASIC:
10355  *
10356  * An indefinite type that is a supertype of every basic (ie:
10357  * non-container) type.
10358  */
10359
10360
10361 /**
10362  * G_VARIANT_TYPE_BOOLEAN:
10363  *
10364  * The type of a value that can be either %TRUE or %FALSE.
10365  */
10366
10367
10368 /**
10369  * G_VARIANT_TYPE_BYTE:
10370  *
10371  * The type of an integer value that can range from 0 to 255.
10372  */
10373
10374
10375 /**
10376  * G_VARIANT_TYPE_BYTESTRING:
10377  *
10378  * The type of an array of bytes.  This type is commonly used to pass
10379  * around strings that may not be valid utf8.  In that case, the
10380  * convention is that the nul terminator character should be included as
10381  * the last character in the array.
10382  */
10383
10384
10385 /**
10386  * G_VARIANT_TYPE_BYTESTRING_ARRAY:
10387  *
10388  * The type of an array of byte strings (an array of arrays of bytes).
10389  */
10390
10391
10392 /**
10393  * G_VARIANT_TYPE_DICTIONARY:
10394  *
10395  * An indefinite type that is a supertype of every dictionary type --
10396  * that is, any array type that has an element type equal to any
10397  * dictionary entry type.
10398  */
10399
10400
10401 /**
10402  * G_VARIANT_TYPE_DICT_ENTRY:
10403  *
10404  * An indefinite type that is a supertype of every dictionary entry
10405  * type.
10406  */
10407
10408
10409 /**
10410  * G_VARIANT_TYPE_DOUBLE:
10411  *
10412  * The type of a double precision IEEE754 floating point number.
10413  * These guys go up to about 1.80e308 (plus and minus) but miss out on
10414  * some numbers in between.  In any case, that's far greater than the
10415  * estimated number of fundamental particles in the observable
10416  * universe.
10417  */
10418
10419
10420 /**
10421  * G_VARIANT_TYPE_HANDLE:
10422  *
10423  * The type of a 32bit signed integer value, that by convention, is used
10424  * as an index into an array of file descriptors that are sent alongside
10425  * a D-Bus message.
10426  * If you are not interacting with D-Bus, then there is no reason to make
10427  * use of this type.
10428  */
10429
10430
10431 /**
10432  * G_VARIANT_TYPE_INT16:
10433  *
10434  * The type of an integer value that can range from -32768 to 32767.
10435  */
10436
10437
10438 /**
10439  * G_VARIANT_TYPE_INT32:
10440  *
10441  * The type of an integer value that can range from -2147483648 to
10442  * 2147483647.
10443  */
10444
10445
10446 /**
10447  * G_VARIANT_TYPE_INT64:
10448  *
10449  * The type of an integer value that can range from
10450  * -9223372036854775808 to 9223372036854775807.
10451  */
10452
10453
10454 /**
10455  * G_VARIANT_TYPE_MAYBE:
10456  *
10457  * An indefinite type that is a supertype of every maybe type.
10458  */
10459
10460
10461 /**
10462  * G_VARIANT_TYPE_OBJECT_PATH:
10463  *
10464  * The type of a D-Bus object reference.  These are strings of a
10465  * specific format used to identify objects at a given destination on
10466  * the bus.
10467  * If you are not interacting with D-Bus, then there is no reason to make
10468  * use of this type.  If you are, then the D-Bus specification contains a
10469  * precise description of valid object paths.
10470  */
10471
10472
10473 /**
10474  * G_VARIANT_TYPE_SIGNATURE:
10475  *
10476  * The type of a D-Bus type signature.  These are strings of a specific
10477  * format used as type signatures for D-Bus methods and messages.
10478  * If you are not interacting with D-Bus, then there is no reason to make
10479  * use of this type.  If you are, then the D-Bus specification contains a
10480  * precise description of valid signature strings.
10481  */
10482
10483
10484 /**
10485  * G_VARIANT_TYPE_STRING:
10486  *
10487  * The type of a string.  "" is a string.  %NULL is not a string.
10488  */
10489
10490
10491 /**
10492  * G_VARIANT_TYPE_STRING_ARRAY:
10493  *
10494  * The type of an array of strings.
10495  */
10496
10497
10498 /**
10499  * G_VARIANT_TYPE_TUPLE:
10500  *
10501  * An indefinite type that is a supertype of every tuple type,
10502  * regardless of the number of items in the tuple.
10503  */
10504
10505
10506 /**
10507  * G_VARIANT_TYPE_UINT16:
10508  *
10509  * The type of an integer value that can range from 0 to 65535.
10510  * There were about this many people living in Toronto in the 1870s.
10511  */
10512
10513
10514 /**
10515  * G_VARIANT_TYPE_UINT32:
10516  *
10517  * The type of an integer value that can range from 0 to 4294967295.
10518  * That's one number for everyone who was around in the late 1970s.
10519  */
10520
10521
10522 /**
10523  * G_VARIANT_TYPE_UINT64:
10524  *
10525  * The type of an integer value that can range from 0 to
10526  * 18446744073709551616.  That's a really big number, but a Rubik's
10527  * cube can have a bit more than twice as many possible positions.
10528  */
10529
10530
10531 /**
10532  * G_VARIANT_TYPE_UNIT:
10533  *
10534  * The empty tuple type.  Has only one instance.  Known also as "triv"
10535  * or "void".
10536  */
10537
10538
10539 /**
10540  * G_VARIANT_TYPE_VARDICT:
10541  *
10542  * The type of a dictionary mapping strings to variants (the ubiquitous
10543  * "a{sv}" type).
10544  *
10545  * Since: 2.30
10546  */
10547
10548
10549 /**
10550  * G_VARIANT_TYPE_VARIANT:
10551  *
10552  * The type of a box that contains any other value (including another
10553  * variant).
10554  */
10555
10556
10557 /**
10558  * G_VFS_EXTENSION_POINT_NAME:
10559  *
10560  * Extension point for #GVfs functionality.
10561  * See <link linkend="extending-gio">Extending GIO</link>.
10562  */
10563
10564
10565 /**
10566  * G_VOLUME_IDENTIFIER_KIND_HAL_UDI:
10567  *
10568  * The string used to obtain a Hal UDI with g_volume_get_identifier().
10569  */
10570
10571
10572 /**
10573  * G_VOLUME_IDENTIFIER_KIND_LABEL:
10574  *
10575  * The string used to obtain a filesystem label with g_volume_get_identifier().
10576  */
10577
10578
10579 /**
10580  * G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT:
10581  *
10582  * The string used to obtain a NFS mount with g_volume_get_identifier().
10583  */
10584
10585
10586 /**
10587  * G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE:
10588  *
10589  * The string used to obtain a Unix device path with g_volume_get_identifier().
10590  */
10591
10592
10593 /**
10594  * G_VOLUME_IDENTIFIER_KIND_UUID:
10595  *
10596  * The string used to obtain a UUID with g_volume_get_identifier().
10597  */
10598
10599
10600 /**
10601  * G_VOLUME_MONITOR_EXTENSION_POINT_NAME:
10602  *
10603  * Extension point for volume monitor functionality.
10604  * See <link linkend="extending-gio">Extending GIO</link>.
10605  */
10606
10607
10608 /**
10609  * SECTION:extensionpoints
10610  * @short_description: Extension Points
10611  * @include: gio.h
10612  * @see_also: <link linkend="extending-gio">Extending GIO</link>
10613  *
10614  * #GIOExtensionPoint provides a mechanism for modules to extend the
10615  * functionality of the library or application that loaded it in an
10616  * organized fashion.
10617  * An extension point is identified by a name, and it may optionally
10618  * require that any implementation must by of a certain type (or derived
10619  * thereof). Use g_io_extension_point_register() to register an
10620  * extension point, and g_io_extension_point_set_required_type() to
10621  * set a required type.
10622  * A module can implement an extension point by specifying the #GType
10623  * that implements the functionality. Additionally, each implementation
10624  * of an extension point has a name, and a priority. Use
10625  * g_io_extension_point_implement() to implement an extension point.
10626  * |[
10627  * GIOExtensionPoint *ep;
10628  * /&ast; Register an extension point &ast;/
10629  * ep = g_io_extension_point_register ("my-extension-point");
10630  * g_io_extension_point_set_required_type (ep, MY_TYPE_EXAMPLE);
10631  * ]|
10632  * |[
10633  * /&ast; Implement an extension point &ast;/
10634  * G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE);
10635  * g_io_extension_point_implement ("my-extension-point",
10636  * my_example_impl_get_type (),
10637  * "my-example",
10638  * 10);
10639  * ]|
10640  * It is up to the code that registered the extension point how
10641  * it uses the implementations that have been associated with it.
10642  * Depending on the use case, it may use all implementations, or
10643  * only the one with the highest priority, or pick a specific
10644  * one by name.
10645  * To avoid opening all modules just to find out what extension
10646  * points they implement, GIO makes use of a caching mechanism,
10647  * see <link linkend="gio-querymodules">gio-querymodules</link>.
10648  * You are expected to run this command after installing a
10649  * GIO module.
10650  */
10651
10652
10653 /**
10654  * SECTION:gaction
10655  * @title: GAction
10656  * @short_description: An action
10657  *
10658  * #GAction represents a single named action.
10659  * The main interface to an action is that it can be activated with
10660  * g_action_activate().  This results in the 'activate' signal being
10661  * emitted.  An activation has a #GVariant parameter (which may be
10662  * %NULL).  The correct type for the parameter is determined by a static
10663  * parameter type (which is given at construction time).
10664  * An action may optionally have a state, in which case the state may be
10665  * set with g_action_set_state().  This call takes a #GVariant.  The
10666  * correct type for the state is determined by a static state type
10667  * (which is given at construction time).
10668  * The state may have a hint associated with it, specifying its valid
10669  * range.
10670  * #GAction is merely the interface to the concept of an action, as
10671  * described above.  Various implementations of actions exist, including
10672  * #GSimpleAction and #GtkAction.
10673  * In all cases, the implementing class is responsible for storing the
10674  * name of the action, the parameter type, the enabled state, the
10675  * optional state type and the state and emitting the appropriate
10676  * signals when these change.  The implementor responsible for filtering
10677  * calls to g_action_activate() and g_action_set_state() for type safety
10678  * and for the state being enabled.
10679  * Probably the only useful thing to do with a #GAction is to put it
10680  * inside of a #GSimpleActionGroup.
10681  */
10682
10683
10684 /**
10685  * SECTION:gactiongroup
10686  * @title: GActionGroup
10687  * @short_description: A group of actions
10688  *
10689  * #GActionGroup represents a group of actions.
10690  * Each action in the group has a unique name (which is a string).  All
10691  * method calls, except g_action_group_list_actions() take the name of
10692  * an action as an argument.
10693  * The #GActionGroup API is meant to be the 'public' API to the action
10694  * group.  The calls here are exactly the interaction that 'external
10695  * the action group implementation) are found on subclasses.  This is
10696  * why you will find -- for example -- g_action_group_get_action_enabled()
10697  * but not an equivalent <function>set()</function> call.
10698  * Signals are emitted on the action group in response to state changes
10699  * on individual actions.
10700  *
10701  * Forces' (eg: UI, incoming D-Bus messages, etc.) are supposed to have
10702  * With actions.  'internal' apis (ie: ones meant only to be accessed by
10703  */
10704
10705
10706 /**
10707  * SECTION:gappinfo
10708  * @short_description: Application information and launch contexts
10709  * @include: gio/gio.h
10710  *
10711  * #GAppInfo and #GAppLaunchContext are used for describing and launching
10712  * applications installed on the system.
10713  * As of GLib 2.20, URIs will always be converted to POSIX paths
10714  * (using g_file_get_path()) when using g_app_info_launch() even if
10715  * the application requested an URI and not a POSIX path. For example
10716  * for an desktop-file based application with Exec key <literal>totem
10717  * &percnt;U</literal> and a single URI,
10718  * <literal>sftp://foo/file.avi</literal>, then
10719  * <literal>/home/user/.gvfs/sftp on foo/file.avi</literal> will be
10720  * passed. This will only work if a set of suitable GIO extensions
10721  * (such as gvfs 2.26 compiled with FUSE support), is available and
10722  * operational; if this is not the case, the URI will be passed
10723  * unmodified to the application. Some URIs, such as
10724  * <literal>mailto:</literal>, of course cannot be mapped to a POSIX
10725  * path (in gvfs there's no FUSE mount for it); such URIs will be
10726  * passed unmodified to the application.
10727  * Specifically for gvfs 2.26 and later, the POSIX URI will be mapped
10728  * back to the GIO URI in the #GFile constructors (since gvfs
10729  * implements the #GVfs extension point). As such, if the application
10730  * needs to examine the URI, it needs to use g_file_get_uri() or
10731  * similar on #GFile. In other words, an application cannot assume
10732  * that the URI passed to e.g. g_file_new_for_commandline_arg() is
10733  * equal to the result of g_file_get_uri(). The following snippet
10734  * illustrates this:
10735  * <programlisting>
10736  * GFile *f;
10737  * char *uri;
10738  * file = g_file_new_for_commandline_arg (uri_from_commandline);
10739  * uri = g_file_get_uri (file);
10740  * strcmp (uri, uri_from_commandline) == 0; // FALSE
10741  * g_free (uri);
10742  * if (g_file_has_uri_scheme (file, "cdda"))
10743  * {
10744  * // do something special with uri
10745  * }
10746  * g_object_unref (file);
10747  * </programlisting>
10748  * This code will work when both <literal>cdda://sr0/Track
10749  * 1.wav</literal> and <literal>/home/user/.gvfs/cdda on sr0/Track
10750  * 1.wav</literal> is passed to the application. It should be noted
10751  * that it's generally not safe for applications to rely on the format
10752  * of a particular URIs. Different launcher applications (e.g. file
10753  * managers) may have different ideas of what a given URI means.
10754  */
10755
10756
10757 /**
10758  * SECTION:gapplication
10759  * @title: GApplication
10760  * @short_description: Core application class
10761  *
10762  * A #GApplication is the foundation of an application, unique for a
10763  * given application identifier.  The GApplication class wraps some
10764  * low-level platform-specific services and is intended to act as the
10765  * foundation for higher-level application classes such as
10766  * #GtkApplication or #MxApplication.  In general, you should not use
10767  * this class outside of a higher level framework.
10768  * One of the core features that GApplication provides is process
10769  * uniqueness, in the context of a "session".  The session concept is
10770  * platform-dependent, but corresponds roughly to a graphical desktop
10771  * login.  When your application is launched again, its arguments
10772  * are passed through platform communication to the already running
10773  * program. The already running instance of the program is called the
10774  * <firstterm>primary instance</firstterm>.
10775  * Before using GApplication, you must choose an "application identifier".
10776  * The expected form of an application identifier is very close to that of
10777  * of a <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-interface">DBus bus name</ulink>.
10778  * For details on valid application identifiers, see
10779  * g_application_id_is_valid().
10780  * The application identifier is claimed by the application as a
10781  * well-known bus name on the user's session bus.  This means that the
10782  * uniqueness of your application is scoped to the current session.  It
10783  * also means that your application may provide additional services
10784  * (through registration of other object paths) at that bus name.
10785  * The registration of these object paths should be done with the shared
10786  * GDBus session bus.  Note that due to the internal architecture of
10787  * GDBus, method calls can be dispatched at any time (even if a main
10788  * loop is not running).  For this reason, you must ensure that any
10789  * object paths that you wish to register are registered before
10790  * #GApplication attempts to acquire the bus name of your application
10791  * (which happens in g_application_register()).  Unfortunately, this
10792  * means that you cannot use g_application_get_is_remote() to decide if
10793  * you want to register object paths.
10794  * GApplication provides convenient life cycle management by maintaining
10795  * a <firstterm>use count</firstterm> for the primary application instance.
10796  * The use count can be changed using g_application_hold() and
10797  * g_application_release(). If it drops to zero, the application exits.
10798  * GApplication also implements the #GActionGroup interface and lets you
10799  * easily export actions by adding them with g_application_set_action_group().
10800  * When invoking an action by calling g_action_group_activate_action() on
10801  * the application, it is always invoked in the primary instance.
10802  * There is a number of different entry points into a #GApplication:
10803  * <itemizedlist>
10804  * <listitem>via 'Activate' (i.e. just starting the application)</listitem>
10805  * <listitem>via 'Open' (i.e. opening some files)</listitem>
10806  * <listitem>by handling a command-line</listitem>
10807  * <listitem>via activating an action</listitem>
10808  * </itemizedlist>
10809  * The #GApplication::startup signal lets you handle the application
10810  * initialization for all of these in a single place.
10811  * Regardless of which of these entry points is used to start the application,
10812  * GApplication passes some <firstterm id="platform-data">platform
10813  * data</firstterm> from the launching instance to the primary instance,
10814  * in the form of a #GVariant dictionary mapping strings to variants.
10815  * To use platform data, override the @before_emit or @after_emit virtual
10816  * functions in your #GApplication subclass. When dealing with
10817  * #GApplicationCommandline objects, the platform data is directly
10818  * available via g_application_command_line_get_cwd(),
10819  * g_application_command_line_get_environ() and
10820  * g_application_command_line_get_platform_data().
10821  * As the name indicates, the platform data may vary depending on the
10822  * operating system, but it always includes the current directory (key
10823  * "cwd"), and optionally the environment (ie the set of environment
10824  * variables and their values) of the calling process (key "environ").
10825  * The environment is only added to the platform data if the
10826  * #G_APPLICATION_SEND_ENVIONMENT flag is set. GApplication subclasses
10827  * can add their own platform data by overriding the @add_platform_data
10828  * virtual function. For instance, #GtkApplication adds startup notification
10829  * data in this way.
10830  * To parse commandline arguments you may handle the
10831  * #GApplication::command-line signal or override the local_command_line()
10832  * vfunc, to parse them in either the primary instance or the local instance,
10833  * respectively.
10834  * <example id="gapplication-example-open"><title>Opening files with a GApplication</title>
10835  * <programlisting>
10836  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-open.c">
10837  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10838  * </xi:include>
10839  * </programlisting>
10840  * </example>
10841  * <example id="gapplication-example-actions"><title>A GApplication with actions</title>
10842  * <programlisting>
10843  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-actions.c">
10844  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10845  * </xi:include>
10846  * </programlisting>
10847  * </example>
10848  *
10849  * Examples include: "com.example.MyApp", "org.example.internal-apps.Calculator".
10850  */
10851
10852
10853 /**
10854  * SECTION:gapplicationcommandline
10855  * @title: GApplicationCommandLine
10856  * @short_description: A command-line invocation of an application
10857  * @see_also: #GApplication
10858  *
10859  * #GApplicationCommandLine represents a command-line invocation of
10860  * an application.  It is created by #GApplication and emitted
10861  * in the #GApplication::command-line signal and virtual function.
10862  * The class contains the list of arguments that the program was invoked
10863  * with.  It is also possible to query if the commandline invocation was
10864  * commandline to this process).
10865  * The GApplicationCommandLine object can provide the @argc and @argv
10866  * parameters for use with the #GOptionContext command-line parsing API,
10867  * with the g_application_command_line_get_arguments() function. See
10868  * <xref linkend="gapplication-example-cmdline3"/> for an example.
10869  * The exit status of the originally-invoked process may be set and
10870  * messages can be printed to stdout or stderr of that process.  The
10871  * lifecycle of the originally-invoked process is tied to the lifecycle
10872  * dropped).
10873  * The main use for #GApplicationCommandline (and the
10874  * #GApplication::command-line signal) is 'Emacs server' like use cases:
10875  * You can set the <envar>EDITOR</envar> environment variable to have
10876  * e.g. git use your favourite editor to edit commit messages, and if you
10877  * already have an instance of the editor running, the editing will happen
10878  * in the running instance, instead of opening a new one. An important
10879  * aspect of this use case is that the process that gets started by git
10880  * does not return until the editing is done.
10881  * <example id="gapplication-example-cmdline"><title>Handling commandline arguments with GApplication</title>
10882  * <para>
10883  * A simple example where the commandline is completely handled
10884  * in the #GApplication::command-line handler. The launching instance exits
10885  * once the signal handler in the primary instance has returned, and the
10886  * return value of the signal handler becomes the exit status of the launching
10887  * instance.
10888  * </para>
10889  * <programlisting>
10890  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline.c">
10891  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10892  * </xi:include>
10893  * </programlisting>
10894  * </example>
10895  * <example id="gapplication-example-cmdline2"><title>Split commandline handling</title>
10896  * <para>
10897  * An example of split commandline handling. Options that start with
10898  * <literal>--local-</literal> are handled locally, all other options are
10899  * passed to the #GApplication::command-line handler which runs in the primary
10900  * instance.
10901  * </para>
10902  * <programlisting>
10903  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline2.c">
10904  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10905  * </xi:include>
10906  * </programlisting>
10907  * </example>
10908  * <example id="gapplication-example-cmdline3"><title>Deferred commandline handling</title>
10909  * <para>
10910  * An example of deferred commandline handling. Here, the commandline is
10911  * not completely handled before the #GApplication::command-line handler
10912  * returns. Instead, we keep a reference to the GApplicationCommandline
10913  * object and handle it later(in this example, in an idle). Note that it
10914  * is necessary to hold the application until you are done with the
10915  * commandline.
10916  * </para>
10917  * <para>
10918  * This example also shows how to use #GOptionContext for parsing the
10919  * commandline arguments. Note that it is necessary to disable the
10920  * built-in help-handling of #GOptionContext, since it calls exit()
10921  * after printing help, which is not what you want to happen in
10922  * the primary instance.
10923  * </para>
10924  * <programlisting>
10925  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline3.c">
10926  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10927  * </xi:include>
10928  * </programlisting>
10929  * </example>
10930  *
10931  * Local (ie: the current process is running in direct response to the
10932  * Invocation) or remote (ie: some other process forwarded the
10933  * Of this object (ie: the process exits when the last reference is
10934  */
10935
10936
10937 /**
10938  * SECTION:gasynchelper
10939  * @short_description: Asynchronous Helper Functions
10940  * @include: gio/gio.h
10941  * @see_also: #GAsyncReady
10942  *
10943  * Provides helper functions for asynchronous operations.
10944  */
10945
10946
10947 /**
10948  * SECTION:gasyncinitable
10949  * @short_description: Asynchronously failable object initialization interface
10950  * @include: gio/gio.h
10951  * @see_also: #GInitable
10952  *
10953  * This is the asynchronous version of #GInitable; it behaves the same
10954  * in all ways except that initialization is asynchronous. For more details
10955  * see the descriptions on #GInitable.
10956  * A class may implement both the #GInitable and #GAsyncInitable interfaces.
10957  * Users of objects implementing this are not intended to use the interface
10958  * method directly; instead it will be used automatically in various ways.
10959  * For C applications you generally just call g_async_initable_new_async()
10960  * directly, or indirectly via a foo_thing_new_async() wrapper. This will call
10961  * g_async_initable_init_async() under the cover, calling back with %NULL and
10962  * a set %GError on failure.
10963  * A typical implementation might look something like this:
10964  * |[
10965  * enum {
10966  * NOT_INITIALIZED,
10967  * INITIALIZING,
10968  * INITIALIZED
10969  * };
10970  * static void
10971  * _foo_ready_cb (Foo *self)
10972  * {
10973  * GList *l;
10974  * self->priv->state = INITIALIZED;
10975  * for (l = self->priv->init_results; l != NULL; l = l->next)
10976  * {
10977  * GSimpleAsyncResult *simple = l->data;
10978  * if (!self->priv->success)
10979  * g_simple_async_result_set_error (simple, ...);
10980  * g_simple_async_result_complete (simple);
10981  * g_object_unref (simple);
10982  * }
10983  * g_list_free (self->priv->init_results);
10984  * self->priv->init_results = NULL;
10985  * }
10986  * static void
10987  * foo_init_async (GAsyncInitable       *initable,
10988  * int                   io_priority,
10989  * GCancellable         *cancellable,
10990  * GAsyncReadyCallback   callback,
10991  * gpointer              user_data)
10992  * {
10993  * Foo *self = FOO (initable);
10994  * GSimpleAsyncResult *simple;
10995  * simple = g_simple_async_result_new (G_OBJECT (initable)
10996  * callback,
10997  * user_data,
10998  * foo_init_async);
10999  * switch (self->priv->state)
11000  * {
11001  * case NOT_INITIALIZED:
11002  * _foo_get_ready (self);
11003  * self->priv->init_results = g_list_append (self->priv->init_results,
11004  * simple);
11005  * self->priv->state = INITIALIZING;
11006  * break;
11007  * case INITIALIZING:
11008  * self->priv->init_results = g_list_append (self->priv->init_results,
11009  * simple);
11010  * break;
11011  * case INITIALIZED:
11012  * if (!self->priv->success)
11013  * g_simple_async_result_set_error (simple, ...);
11014  * g_simple_async_result_complete_in_idle (simple);
11015  * g_object_unref (simple);
11016  * break;
11017  * }
11018  * }
11019  * static gboolean
11020  * foo_init_finish (GAsyncInitable       *initable,
11021  * GAsyncResult         *result,
11022  * GError              **error)
11023  * {
11024  * g_return_val_if_fail (g_simple_async_result_is_valid (result,
11025  * G_OBJECT (initable), foo_init_async), FALSE);
11026  * if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
11027  * error))
11028  * return FALSE;
11029  * return TRUE;
11030  * }
11031  * static void
11032  * foo_async_initable_iface_init (gpointer g_iface,
11033  * gpointer data)
11034  * {
11035  * GAsyncInitableIface *iface = g_iface;
11036  * iface->init_async = foo_init_async;
11037  * iface->init_finish = foo_init_finish;
11038  * }
11039  * ]|
11040  */
11041
11042
11043 /**
11044  * SECTION:gasyncresult
11045  * @short_description: Asynchronous Function Results
11046  * @include: gio/gio.h
11047  * @see_also: #GSimpleAsyncResult
11048  *
11049  * Provides a base class for implementing asynchronous function results.
11050  * Asynchronous operations are broken up into two separate operations
11051  * which are chained together by a #GAsyncReadyCallback. To begin
11052  * an asynchronous operation, provide a #GAsyncReadyCallback to the
11053  * asynchronous function. This callback will be triggered when the
11054  * operation has completed, and will be passed a #GAsyncResult instance
11055  * filled with the details of the operation's success or failure, the
11056  * object the asynchronous function was started for and any error codes
11057  * returned. The asynchronous callback function is then expected to call
11058  * the corresponding "_finish()" function, passing the object the
11059  * function was called for, the #GAsyncResult instance, and (optionally)
11060  * an @error to grab any error conditions that may have occurred.
11061  * The "_finish()" function for an operation takes the generic result
11062  * (of type #GAsyncResult) and returns the specific result that the
11063  * operation in question yields (e.g. a #GFileEnumerator for a
11064  * "enumerate children" operation). If the result or error status of the
11065  * operation is not needed, there is no need to call the "_finish()"
11066  * function; GIO will take care of cleaning up the result and error
11067  * information after the #GAsyncReadyCallback returns. Applications may
11068  * also take a reference to the #GAsyncResult and call "_finish()"
11069  * later; however, the "_finish()" function may be called at most once.
11070  * Example of a typical asynchronous operation flow:
11071  * |[
11072  * void _theoretical_frobnitz_async (Theoretical         *t,
11073  * GCancellable        *c,
11074  * GAsyncReadyCallback *cb,
11075  * gpointer             u);
11076  * gboolean _theoretical_frobnitz_finish (Theoretical   *t,
11077  * GAsyncResult  *res,
11078  * GError       **e);
11079  * static void
11080  * frobnitz_result_func (GObject      *source_object,
11081  * GAsyncResult *res,
11082  * gpointer      user_data)
11083  * {
11084  * gboolean success = FALSE;
11085  * success = _theoretical_frobnitz_finish (source_object, res, NULL);
11086  * if (success)
11087  * g_printf ("Hurray!\n");
11088  * else
11089  * g_printf ("Uh oh!\n");
11090  * /<!-- -->* ... *<!-- -->/
11091  * }
11092  * int main (int argc, void *argv[])
11093  * {
11094  * /<!-- -->* ... *<!-- -->/
11095  * _theoretical_frobnitz_async (theoretical_data,
11096  * NULL,
11097  * frobnitz_result_func,
11098  * NULL);
11099  * /<!-- -->* ... *<!-- -->/
11100  * }
11101  * ]|
11102  * The callback for an asynchronous operation is called only once, and is
11103  * always called, even in the case of a cancelled operation. On cancellation
11104  * the result is a %G_IO_ERROR_CANCELLED error.
11105  * Some asynchronous operations are implemented using synchronous calls.
11106  * These are run in a separate thread, if #GThread has been initialized, but
11107  * otherwise they are sent to the Main Event Loop and processed in an idle
11108  * function. So, if you truly need asynchronous operations, make sure to
11109  * initialize #GThread.
11110  */
11111
11112
11113 /**
11114  * SECTION:gbufferedinputstream
11115  * @short_description: Buffered Input Stream
11116  * @include: gio/gio.h
11117  * @see_also: #GFilterInputStream, #GInputStream
11118  *
11119  * Buffered input stream implements #GFilterInputStream and provides
11120  * for buffered reads.
11121  * By default, #GBufferedInputStream's buffer size is set at 4 kilobytes.
11122  * To create a buffered input stream, use g_buffered_input_stream_new(),
11123  * or g_buffered_input_stream_new_sized() to specify the buffer's size at
11124  * construction.
11125  * To get the size of a buffer within a buffered input stream, use
11126  * g_buffered_input_stream_get_buffer_size(). To change the size of a
11127  * buffered input stream's buffer, use
11128  * g_buffered_input_stream_set_buffer_size(). Note that the buffer's size
11129  * cannot be reduced below the size of the data within the buffer.
11130  */
11131
11132
11133 /**
11134  * SECTION:gbufferedoutputstream
11135  * @short_description: Buffered Output Stream
11136  * @include: gio/gio.h
11137  * @see_also: #GFilterOutputStream, #GOutputStream
11138  *
11139  * Buffered output stream implements #GFilterOutputStream and provides
11140  * for buffered writes.
11141  * By default, #GBufferedOutputStream's buffer size is set at 4 kilobytes.
11142  * To create a buffered output stream, use g_buffered_output_stream_new(),
11143  * or g_buffered_output_stream_new_sized() to specify the buffer's size
11144  * at construction.
11145  * To get the size of a buffer within a buffered input stream, use
11146  * g_buffered_output_stream_get_buffer_size(). To change the size of a
11147  * buffered output stream's buffer, use
11148  * g_buffered_output_stream_set_buffer_size(). Note that the buffer's
11149  * size cannot be reduced below the size of the data within the buffer.
11150  */
11151
11152
11153 /**
11154  * SECTION:gcancellable
11155  * @short_description: Thread-safe Operation Cancellation Stack
11156  * @include: gio/gio.h
11157  *
11158  * GCancellable is a thread-safe operation cancellation stack used
11159  * throughout GIO to allow for cancellation of synchronous and
11160  * asynchronous operations.
11161  */
11162
11163
11164 /**
11165  * SECTION:gcharsetconverter
11166  * @short_description: Convert between charsets
11167  * @include: gio/gio.h
11168  *
11169  * #GCharsetConverter is an implementation of #GConverter based on
11170  * GIConv.
11171  */
11172
11173
11174 /**
11175  * SECTION:gcontenttype
11176  * @short_description: Platform-specific content typing
11177  * @include: gio/gio.h
11178  *
11179  * A content type is a platform specific string that defines the type
11180  * of a file. On UNIX it is a <ulink url="http://www.wikipedia.org/wiki/Internet_media_type">mime type</ulink> like "text/plain" or "image/png".
11181  * On Win32 it is an extension string like ".doc", ".txt" or a perceived
11182  * string like "audio". Such strings can be looked up in the registry at
11183  * HKEY_CLASSES_ROOT.
11184  */
11185
11186
11187 /**
11188  * SECTION:gconverter
11189  * @short_description: Data conversion interface
11190  * @include: gio/gio.h
11191  * @see_also: #GInputStream, #GOutputStream
11192  *
11193  * #GConverter is implemented by objects that convert
11194  * binary data in various ways. The conversion can be
11195  * stateful and may fail at any place.
11196  * compression, decompression and regular expression
11197  * replace.
11198  *
11199  * Some example conversions are: character set conversion,
11200  * Since: 2.24
11201  */
11202
11203
11204 /**
11205  * SECTION:gconverterinputstream
11206  * @short_description: Converter Input Stream
11207  * @include: gio/gio.h
11208  * @see_also: #GInputStream, #GConverter
11209  *
11210  * Converter input stream implements #GInputStream and allows
11211  * conversion of data of various types during reading.
11212  */
11213
11214
11215 /**
11216  * SECTION:gconverteroutputstream
11217  * @short_description: Converter Output Stream
11218  * @include: gio/gio.h
11219  * @see_also: #GOutputStream, #GConverter
11220  *
11221  * Converter output stream implements #GOutputStream and allows
11222  * conversion of data of various types during reading.
11223  */
11224
11225
11226 /**
11227  * SECTION:gcredentials
11228  * @short_description: An object containing credentials
11229  * @include: gio/gio.h
11230  *
11231  * The #GCredentials type is a reference-counted wrapper for native
11232  * credentials. This information is typically used for identifying,
11233  * authenticating and authorizing other processes.
11234  * Some operating systems supports looking up the credentials of the
11235  * remote peer of a communication endpoint - see e.g.
11236  * g_socket_get_credentials().
11237  * Some operating systems supports securely sending and receiving
11238  * credentials over a Unix Domain Socket, see
11239  * #GUnixCredentialsMessage, g_unix_connection_send_credentials() and
11240  * g_unix_connection_receive_credentials() for details.
11241  * On Linux, the native credential type is a <type>struct ucred</type>
11242  * - see the
11243  * <citerefentry><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>
11244  * man page for details. This corresponds to
11245  * %G_CREDENTIALS_TYPE_LINUX_UCRED.
11246  * On FreeBSD, the native credential type is a <type>struct cmsgcred</type>.
11247  * This corresponds to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED.
11248  * On OpenBSD, the native credential type is a <type>struct sockpeercred</type>.
11249  * This corresponds to %G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED.
11250  */
11251
11252
11253 /**
11254  * SECTION:gdatainputstream
11255  * @short_description: Data Input Stream
11256  * @include: gio/gio.h
11257  * @see_also: #GInputStream
11258  *
11259  * Data input stream implements #GInputStream and includes functions for
11260  * reading structured data directly from a binary input stream.
11261  */
11262
11263
11264 /**
11265  * SECTION:gdataoutputstream
11266  * @short_description: Data Output Stream
11267  * @include: gio/gio.h
11268  * @see_also: #GOutputStream
11269  *
11270  * Data output stream implements #GOutputStream and includes functions for
11271  * writing data directly to an output stream.
11272  */
11273
11274
11275 /**
11276  * SECTION:gdbusaddress
11277  * @title: D-Bus Addresses
11278  * @short_description: D-Bus connection endpoints
11279  * @include: gio/gio.h
11280  *
11281  * Routines for working with D-Bus addresses. A D-Bus address is a string
11282  * like "unix:tmpdir=/tmp/my-app-name". The exact format of addresses
11283  * is explained in detail in the <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html&num;addresses">D-Bus specification</link>.
11284  */
11285
11286
11287 /**
11288  * SECTION:gdbusauthobserver
11289  * @short_description: Object used for authenticating connections
11290  * @include: gio/gio.h
11291  *
11292  * The #GDBusAuthObserver type provides a mechanism for participating
11293  * in how a #GDBusServer (or a #GDBusConnection) authenticates remote
11294  * peers. Simply instantiate a #GDBusAuthObserver and connect to the
11295  * signals you are interested in. Note that new signals may be added
11296  * in the future
11297  * For example, if you only want to allow D-Bus connections from
11298  * processes owned by the same uid as the server, you would use a
11299  * signal handler like the following:
11300  * <example id="auth-observer"><title>Controlling Authentication</title><programlisting>
11301  * static gboolean
11302  * on_authorize_authenticated_peer (GDBusAuthObserver *observer,
11303  * GIOStream         *stream,
11304  * GCredentials      *credentials,
11305  * gpointer           user_data)
11306  * {
11307  * gboolean authorized;
11308  * authorized = FALSE;
11309  * if (credentials != NULL)
11310  * {
11311  * GCredentials *own_credentials;
11312  * own_credentials = g_credentials_new ();
11313  * if (g_credentials_is_same_user (credentials, own_credentials, NULL))
11314  * authorized = TRUE;
11315  * g_object_unref (own_credentials);
11316  * }
11317  * return authorized;
11318  * }
11319  * </programlisting></example>
11320  */
11321
11322
11323 /**
11324  * SECTION:gdbusconnection
11325  * @short_description: D-Bus Connections
11326  * @include: gio/gio.h
11327  *
11328  * The #GDBusConnection type is used for D-Bus connections to remote
11329  * peers such as a message buses. It is a low-level API that offers a
11330  * lot of flexibility. For instance, it lets you establish a connection
11331  * over any transport that can by represented as an #GIOStream.
11332  * This class is rarely used directly in D-Bus clients. If you are writing
11333  * an D-Bus client, it is often easier to use the g_bus_own_name(),
11334  * g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs.
11335  * <example id="gdbus-server"><title>D-Bus server example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-server.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
11336  * <example id="gdbus-subtree-server"><title>D-Bus subtree example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-subtree.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
11337  * <example id="gdbus-unix-fd-client"><title>D-Bus UNIX File Descriptor example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-unix-fd-client.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
11338  * <example id="gdbus-export"><title>Exporting a GObject</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-export.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
11339  */
11340
11341
11342 /**
11343  * SECTION:gdbuserror
11344  * @title: GDBusError
11345  * @short_description: Mapping D-Bus errors to and from GError
11346  * @include: gio/gio.h
11347  *
11348  * All facilities that return errors from remote methods (such as
11349  * g_dbus_connection_call_sync()) use #GError to represent both D-Bus
11350  * errors (e.g. errors returned from the other peer) and locally
11351  * in-process generated errors.
11352  * To check if a returned #GError is an error from a remote peer, use
11353  * g_dbus_error_is_remote_error(). To get the actual D-Bus error name,
11354  * use g_dbus_error_get_remote_error(). Before presenting an error,
11355  * always use g_dbus_error_strip_remote_error().
11356  * In addition, facilities used to return errors to a remote peer also
11357  * use #GError. See g_dbus_method_invocation_return_error() for
11358  * discussion about how the D-Bus error name is set.
11359  * Applications can associate a #GError error domain with a set of D-Bus errors in order to
11360  * automatically map from D-Bus errors to #GError and back. This
11361  * is typically done in the function returning the #GQuark for the
11362  * error domain:
11363  * <example id="error-registration"><title>Error Registration</title><programlisting>
11364  * /<!-- -->* foo-bar-error.h: *<!-- -->/
11365  * #define FOO_BAR_ERROR (foo_bar_error_quark ())
11366  * GQuark foo_bar_error_quark (void);
11367  * typedef enum
11368  * {
11369  * FOO_BAR_ERROR_FAILED,
11370  * FOO_BAR_ERROR_ANOTHER_ERROR,
11371  * FOO_BAR_ERROR_SOME_THIRD_ERROR,
11372  * } FooBarError;
11373  * /<!-- -->* foo-bar-error.c: *<!-- -->/
11374  * static const GDBusErrorEntry foo_bar_error_entries[] =
11375  * {
11376  * {FOO_BAR_ERROR_FAILED,           "org.project.Foo.Bar.Error.Failed"},
11377  * {FOO_BAR_ERROR_ANOTHER_ERROR,    "org.project.Foo.Bar.Error.AnotherError"},
11378  * {FOO_BAR_ERROR_SOME_THIRD_ERROR, "org.project.Foo.Bar.Error.SomeThirdError"},
11379  * };
11380  * GQuark
11381  * foo_bar_error_quark (void)
11382  * {
11383  * static volatile gsize quark_volatile = 0;
11384  * g_dbus_error_register_error_domain ("foo-bar-error-quark",
11385  * &quark_volatile,
11386  * foo_bar_error_entries,
11387  * G_N_ELEMENTS (foo_bar_error_entries));
11388  * G_STATIC_ASSERT (G_N_ELEMENTS (foo_bar_error_entries) - 1 == FOO_BAR_ERROR_SOME_THIRD_ERROR);
11389  * return (GQuark) quark_volatile;
11390  * }
11391  * </programlisting></example>
11392  * With this setup, a D-Bus peer can transparently pass e.g. %FOO_BAR_ERROR_ANOTHER_ERROR and
11393  * other peers will see the D-Bus error name <literal>org.project.Foo.Bar.Error.AnotherError</literal>.
11394  * If the other peer is using GDBus, the peer will see also %FOO_BAR_ERROR_ANOTHER_ERROR instead
11395  * of %G_IO_ERROR_DBUS_ERROR. Note that GDBus clients can still recover
11396  * <literal>org.project.Foo.Bar.Error.AnotherError</literal> using g_dbus_error_get_remote_error().
11397  * Note that errors in the %G_DBUS_ERROR error domain is intended only
11398  * for returning errors from a remote message bus process. Errors
11399  * generated locally in-process by e.g. #GDBusConnection is from the
11400  * %G_IO_ERROR domain.
11401  */
11402
11403
11404 /**
11405  * SECTION:gdbusinterface
11406  * @short_description: Base type for D-Bus interfaces
11407  * @include: gio/gio.h
11408  *
11409  * The #GDBusInterface type is the base type for D-Bus interfaces both
11410  * on the service side (see #GDBusInterfaceSkeleton) and client side
11411  * (see #GDBusProxy).
11412  */
11413
11414
11415 /**
11416  * SECTION:gdbusinterfaceskeleton
11417  * @short_description: Service-side D-Bus interface
11418  * @include: gio/gio.h
11419  *
11420  * Abstract base class for D-Bus interfaces on the service side.
11421  */
11422
11423
11424 /**
11425  * SECTION:gdbusintrospection
11426  * @title: D-Bus Introspection Data
11427  * @short_description: Node and interface description data structures
11428  * @include: gio/gio.h
11429  *
11430  * Various data structures and convenience routines to parse and
11431  * generate D-Bus introspection XML. Introspection information is
11432  * used when registering objects with g_dbus_connection_register_object().
11433  * The format of D-Bus introspection XML is specified in the
11434  * <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html&num;introspection-format">D-Bus specification</link>.
11435  */
11436
11437
11438 /**
11439  * SECTION:gdbusmessage
11440  * @short_description: D-Bus Message
11441  * @include: gio/gio.h
11442  *
11443  * A type for representing D-Bus messages that can be sent or received
11444  * on a #GDBusConnection.
11445  */
11446
11447
11448 /**
11449  * SECTION:gdbusmethodinvocation
11450  * @short_description: Object for handling remote calls
11451  * @include: gio/gio.h
11452  *
11453  * Instances of the #GDBusMethodInvocation class are used when
11454  * handling D-Bus method calls. It provides a way to asynchronously
11455  * return results and errors.
11456  * The normal way to obtain a #GDBusMethodInvocation object is to receive
11457  * it as an argument to the handle_method_call() function in a
11458  * #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object().
11459  */
11460
11461
11462 /**
11463  * SECTION:gdbusnameowning
11464  * @title: Owning Bus Names
11465  * @short_description: Simple API for owning bus names
11466  * @include: gio/gio.h
11467  *
11468  * Convenience API for owning bus names.
11469  * <example id="gdbus-owning-names"><title>Simple application owning a name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-own-name.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
11470  */
11471
11472
11473 /**
11474  * SECTION:gdbusnamewatching
11475  * @title: Watching Bus Names
11476  * @short_description: Simple API for watching bus names
11477  * @include: gio/gio.h
11478  *
11479  * Convenience API for watching bus names.
11480  * <example id="gdbus-watching-names"><title>Simple application watching a name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-watch-name.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
11481  */
11482
11483
11484 /**
11485  * SECTION:gdbusobject
11486  * @short_description: Base type for D-Bus objects
11487  * @include: gio/gio.h
11488  *
11489  * The #GDBusObject type is the base type for D-Bus objects on both
11490  * the service side (see #GDBusObjectSkeleton) and the client side
11491  * (see #GDBusObjectProxy). It is essentially just a container of
11492  * interfaces.
11493  */
11494
11495
11496 /**
11497  * SECTION:gdbusobjectmanager
11498  * @short_description: Base type for D-Bus object managers
11499  * @include: gio/gio.h
11500  *
11501  * The #GDBusObjectManager type is the base type for service- and
11502  * client-side implementations of the standardized <ulink
11503  * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
11504  * interface.
11505  * See #GDBusObjectManagerClient for the client-side implementation
11506  * and #GDBusObjectManagerServer for the service-side implementation.
11507  */
11508
11509
11510 /**
11511  * SECTION:gdbusobjectmanagerclient
11512  * @short_description: Client-side object manager
11513  * @include: gio/gio.h
11514  *
11515  * #GDBusObjectManagerClient is used to create, monitor and delete object
11516  * proxies for remote objects exported by a #GDBusObjectManagerServer (or any
11517  * code implementing the <ulink
11518  * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
11519  * interface).
11520  * Once an instance of this type has been created, you can connect to
11521  * the #GDBusObjectManager::object-added and
11522  * #GDBusObjectManager::object-removed signals and inspect the
11523  * #GDBusObjectProxy objects returned by
11524  * g_dbus_object_manager_get_objects().
11525  * If the name for a #GDBusObjectManagerClient is not owned by anyone at
11526  * object construction time, the default behavior is to request the
11527  * message bus to launch an owner for the name. This behavior can be
11528  * disabled using the %G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START
11529  * flag. It's also worth noting that this only works if the name of
11530  * interest is activatable in the first place. E.g. in some cases it
11531  * is not possible to launch an owner for the requested name. In this
11532  * case, #GDBusObjectManagerClient object construction still succeeds but
11533  * there will be no object proxies
11534  * (e.g. g_dbus_object_manager_get_objects() returns the empty list) and
11535  * the #GDBusObjectManagerClient:name-owner property is %NULL.
11536  * The owner of the requested name can come and go (for example
11537  * consider a system service being restarted) â€“ #GDBusObjectManagerClient
11538  * handles this case too; simply connect to the #GObject::notify
11539  * signal to watch for changes on the #GDBusObjectManagerClient:name-owner
11540  * property. When the name owner vanishes, the behavior is that
11541  * #GDBusObjectManagerClient:name-owner is set to %NULL (this includes
11542  * emission of the #GObject::notify signal) and then
11543  * #GDBusObjectManager::object-removed signals are synthesized
11544  * for all currently existing object proxies. Since
11545  * #GDBusObjectManagerClient:name-owner is %NULL when this happens, you can
11546  * use this information to disambiguate a synthesized signal from a
11547  * genuine signal caused by object removal on the remote
11548  * #GDBusObjectManager. Similarly, when a new name owner appears,
11549  * #GDBusObjectManager::object-added signals are synthesized
11550  * while #GDBusObjectManagerClient:name-owner is still %NULL. Only when all
11551  * object proxies have been added, the #GDBusObjectManagerClient:name-owner
11552  * is set to the new name owner (this includes emission of the
11553  * #GObject::notify signal).  Furthermore, you are guaranteed that
11554  * #GDBusObjectManagerClient:name-owner will alternate between a name owner
11555  * (e.g. <literal>:1.42</literal>) and %NULL even in the case where
11556  * the name of interest is atomically replaced
11557  * Ultimately, #GDBusObjectManagerClient is used to obtain #GDBusProxy
11558  * instances. All signals (including the
11559  * <literal>org.freedesktop.DBus.Properties::PropertiesChanged</literal>
11560  * signal) delivered to #GDBusProxy instances are guaranteed to
11561  * originate from the name owner. This guarantee along with the
11562  * behavior described above, means that certain race conditions
11563  * including the <emphasis><quote>half the proxy is from the old owner
11564  * and the other half is from the new owner</quote></emphasis> problem
11565  * cannot happen.
11566  * To avoid having the application connect to signals on the returned
11567  * #GDBusObjectProxy and #GDBusProxy objects, the
11568  * #GDBusObject::interface-added,
11569  * #GDBusObject::interface-removed,
11570  * #GDBusProxy::g-properties-changed and
11571  * #GDBusProxy::g-signal signals
11572  * are also emitted on the #GDBusObjectManagerClient instance managing these
11573  * objects. The signals emitted are
11574  * #GDBusObjectManager::interface-added,
11575  * #GDBusObjectManager::interface-removed,
11576  * #GDBusObjectManagerClient::interface-proxy-properties-changed and
11577  * #GDBusObjectManagerClient::interface-proxy-signal.
11578  * Note that all callbacks and signals are emitted in the
11579  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
11580  * that the #GDBusObjectManagerClient object was constructed
11581  * in. Additionally, the #GDBusObjectProxy and #GDBusProxy objects
11582  * originating from the #GDBusObjectManagerClient object will be created in
11583  * the same context and, consequently, will deliver signals in the
11584  * same main loop.
11585  */
11586
11587
11588 /**
11589  * SECTION:gdbusobjectmanagerserver
11590  * @short_description: Service-side object manager
11591  * @include: gio/gio.h
11592  *
11593  * #GDBusObjectManagerServer is used to export #GDBusObject instances using
11594  * the standardized <ulink
11595  * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
11596  * interface. For example, remote D-Bus clients can get all objects
11597  * and properties in a single call. Additionally, any change in the
11598  * object hierarchy is broadcast using signals. This means that D-Bus
11599  * clients can keep caches up to date by only listening to D-Bus
11600  * signals.
11601  * See #GDBusObjectManagerClient for the client-side code that is
11602  * intended to be used with #GDBusObjectManagerServer or any D-Bus
11603  * object implementing the org.freedesktop.DBus.ObjectManager
11604  * interface.
11605  */
11606
11607
11608 /**
11609  * SECTION:gdbusobjectproxy
11610  * @short_description: Client-side D-Bus object
11611  * @include: gio/gio.h
11612  *
11613  * A #GDBusObjectProxy is an object used to represent a remote object
11614  * with one or more D-Bus interfaces. Normally, you don't instantiate
11615  * a #GDBusObjectProxy yourself - typically #GDBusObjectManagerClient
11616  * is used to obtain it.
11617  *
11618  * Since: 2.30
11619  */
11620
11621
11622 /**
11623  * SECTION:gdbusobjectskeleton
11624  * @short_description: Service-side D-Bus object
11625  * @include: gio/gio.h
11626  *
11627  * A #GDBusObjectSkeleton instance is essentially a group of D-Bus
11628  * interfaces. The set of exported interfaces on the object may be
11629  * dynamic and change at runtime.
11630  * This type is intended to be used with #GDBusObjectManager.
11631  */
11632
11633
11634 /**
11635  * SECTION:gdbusproxy
11636  * @short_description: Client-side D-Bus interface proxy
11637  * @include: gio/gio.h
11638  *
11639  * #GDBusProxy is a base class used for proxies to access a D-Bus
11640  * interface on a remote object. A #GDBusProxy can be constructed for
11641  * both well-known and unique names.
11642  * By default, #GDBusProxy will cache all properties (and listen to
11643  * changes) of the remote object, and proxy all signals that gets
11644  * emitted. This behaviour can be changed by passing suitable
11645  * #GDBusProxyFlags when the proxy is created. If the proxy is for a
11646  * well-known name, the property cache is flushed when the name owner
11647  * vanishes and reloaded when a name owner appears.
11648  * If a #GDBusProxy is used for a well-known name, the owner of the
11649  * name is tracked and can be read from
11650  * #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to
11651  * get notified of changes. Additionally, only signals and property
11652  * changes emitted from the current name owner are considered and
11653  * calls are always sent to the current name owner. This avoids a
11654  * number of race conditions when the name is lost by one owner and
11655  * claimed by another. However, if no name owner currently exists,
11656  * then calls will be sent to the well-known name which may result in
11657  * the message bus launching an owner (unless
11658  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set).
11659  * The generic #GDBusProxy::g-properties-changed and
11660  * #GDBusProxy::g-signal signals are not very convenient to work
11661  * with. Therefore, the recommended way of working with proxies is to
11662  * subclass #GDBusProxy, and have more natural properties and signals
11663  * in your derived class. See <xref linkend="gdbus-example-gdbus-codegen"/>
11664  * for how this can easily be done using the
11665  * <command><link linkend="gdbus-codegen">gdbus-codegen</link></command>
11666  * tool.
11667  * A #GDBusProxy instance can be used from multiple threads but note
11668  * that all signals (e.g. #GDBusProxy::g-signal, #GDBusProxy::g-properties-changed
11669  * and #GObject::notify) are emitted in the
11670  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
11671  * of the thread where the instance was constructed.
11672  * <example id="gdbus-wellknown-proxy"><title>GDBusProxy for a well-known-name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-watch-proxy.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
11673  */
11674
11675
11676 /**
11677  * SECTION:gdbusserver
11678  * @short_description: Helper for accepting connections
11679  * @include: gio/gio.h
11680  *
11681  * #GDBusServer is a helper for listening to and accepting D-Bus
11682  * connections. This can be used to create a new D-Bus server, allowing two
11683  * peers to use the D-Bus protocol for their own specialized communication.
11684  * A server instance provided in this way will not perform message routing or
11685  * implement the org.freedesktop.DBus interface.
11686  * To just export an object on a well-known name on a message bus, such as the
11687  * session or system bus, you should instead use g_bus_own_name().
11688  * <example id="gdbus-peer-to-peer"><title>D-Bus peer-to-peer example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-peer.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
11689  */
11690
11691
11692 /**
11693  * SECTION:gdbusutils
11694  * @title: D-Bus Utilities
11695  * @short_description: Various utilities related to D-Bus.
11696  * @include: gio/gio.h
11697  *
11698  * Various utility routines related to D-Bus.
11699  */
11700
11701
11702 /**
11703  * SECTION:gdesktopappinfo
11704  * @title: GDesktopAppInfo
11705  * @short_description: Application information from desktop files
11706  * @include: gio/gdesktopappinfo.h
11707  *
11708  * #GDesktopAppInfo is an implementation of #GAppInfo based on
11709  * desktop files.
11710  * Note that <filename>&lt;gio/gdesktopappinfo.h&gt;</filename> belongs to
11711  * the UNIX-specific GIO interfaces, thus you have to use the
11712  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
11713  */
11714
11715
11716 /**
11717  * SECTION:gdrive
11718  * @short_description: Drive management
11719  * @include: gio/gio.h
11720  *
11721  * #GDrive - this represent a piece of hardware connected to the machine.
11722  * It's generally only created for removable hardware or hardware with
11723  * removable media.
11724  * #GDrive is a container class for #GVolume objects that stem from
11725  * the same piece of media. As such, #GDrive abstracts a drive with
11726  * (or without) removable media and provides operations for querying
11727  * whether media is available, determing whether media change is
11728  * automatically detected and ejecting the media.
11729  * If the #GDrive reports that media isn't automatically detected, one
11730  * can poll for media; typically one should not do this periodically
11731  * as a poll for media operation is potententially expensive and may
11732  * spin up the drive creating noise.
11733  * #GDrive supports starting and stopping drives with authentication
11734  * support for the former. This can be used to support a diverse set
11735  * of use cases including connecting/disconnecting iSCSI devices,
11736  * powering down external disk enclosures and starting/stopping
11737  * multi-disk devices such as RAID devices. Note that the actual
11738  * semantics and side-effects of starting/stopping a #GDrive may vary
11739  * according to implementation. To choose the correct verbs in e.g. a
11740  * file manager, use g_drive_get_start_stop_type().
11741  * For porting from GnomeVFS note that there is no equivalent of
11742  * #GDrive in that API.
11743  */
11744
11745
11746 /**
11747  * SECTION:gemblem
11748  * @short_description: An object for emblems
11749  * @include: gio/gio.h
11750  * @see_also: #GIcon, #GEmblemedIcon, #GLoadableIcon, #GThemedIcon
11751  *
11752  * #GEmblem is an implementation of #GIcon that supports
11753  * having an emblem, which is an icon with additional properties.
11754  * It can than be added to a #GEmblemedIcon.
11755  * Currently, only metainformation about the emblem's origin is
11756  * supported. More may be added in the future.
11757  */
11758
11759
11760 /**
11761  * SECTION:gemblemedicon
11762  * @short_description: Icon with emblems
11763  * @include: gio/gio.h
11764  * @see_also: #GIcon, #GLoadableIcon, #GThemedIcon, #GEmblem
11765  *
11766  * #GEmblemedIcon is an implementation of #GIcon that supports
11767  * adding an emblem to an icon. Adding multiple emblems to an
11768  * icon is ensured via g_emblemed_icon_add_emblem().
11769  * Note that #GEmblemedIcon allows no control over the position
11770  * of the emblems. See also #GEmblem for more information.
11771  */
11772
11773
11774 /**
11775  * SECTION:gfile
11776  * @short_description: File and Directory Handling
11777  * @include: gio/gio.h
11778  * @see_also: #GFileInfo, #GFileEnumerator
11779  *
11780  * #GFile is a high level abstraction for manipulating files on a
11781  * virtual file system. #GFile<!-- -->s are lightweight, immutable
11782  * objects that do no I/O upon creation. It is necessary to understand that
11783  * #GFile objects do not represent files, merely an identifier for a file. All
11784  * file content I/O is implemented as streaming operations (see #GInputStream and
11785  * #GOutputStream).
11786  * g_file_new_for_path() if you have a path.
11787  * g_file_new_for_uri() if you have a URI.
11788  * g_file_new_for_commandline_arg() for a command line argument.
11789  * g_file_parse_name() from a utf8 string gotten from g_file_get_parse_name().
11790  * One way to think of a #GFile is as an abstraction of a pathname. For normal
11791  * files the system pathname is what is stored internally, but as #GFile<!-- -->s
11792  * are extensible it could also be something else that corresponds to a pathname
11793  * in a userspace implementation of a filesystem.
11794  * #GFile<!-- -->s make up hierarchies of directories and files that correspond to the
11795  * files on a filesystem. You can move through the file system with #GFile using
11796  * g_file_get_parent() to get an identifier for the parent directory, g_file_get_child()
11797  * to get a child within a directory, g_file_resolve_relative_path() to resolve a relative
11798  * path between two #GFile<!-- -->s. There can be multiple hierarchies, so you may not
11799  * end up at the same root if you repeatedly call g_file_get_parent() on two different
11800  * files.
11801  * All #GFile<!-- -->s have a basename (get with g_file_get_basename()). These names
11802  * are byte strings that are used to identify the file on the filesystem (relative to
11803  * its parent directory) and there is no guarantees that they have any particular charset
11804  * encoding or even make any sense at all. If you want to use filenames in a user
11805  * interface you should use the display name that you can get by requesting the
11806  * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info().
11807  * This is guaranteed to be in utf8 and can be used in a user interface. But always
11808  * store the real basename or the #GFile to use to actually access the file, because
11809  * there is no way to go from a display name to the actual name.
11810  * Using #GFile as an identifier has the same weaknesses as using a path in that
11811  * there may be multiple aliases for the same file. For instance, hard or
11812  * soft links may cause two different #GFile<!-- -->s to refer to the same file.
11813  * and long names on Fat/NTFS, or bind mounts in Linux. If you want to check if
11814  * two #GFile<!-- -->s point to the same file you can query for the
11815  * %G_FILE_ATTRIBUTE_ID_FILE attribute. Note that #GFile does some trivial
11816  * canonicalization of pathnames passed in, so that trivial differences in the
11817  * path string used at creation (duplicated slashes, slash at end of path, "."
11818  * or ".." path segments, etc) does not create different #GFile<!-- -->s.
11819  * Many #GFile operations have both synchronous and asynchronous versions
11820  * to suit your application. Asynchronous versions of synchronous functions
11821  * simply have _async() appended to their function names. The asynchronous
11822  * I/O functions call a #GAsyncReadyCallback which is then used to finalize
11823  * the operation, producing a GAsyncResult which is then passed to the
11824  * function's matching _finish() operation.
11825  * Some #GFile operations do not have synchronous analogs, as they may
11826  * take a very long time to finish, and blocking may leave an application
11827  * unusable. Notable cases include:
11828  * g_file_mount_mountable() to mount a mountable file.
11829  * g_file_unmount_mountable_with_operation() to unmount a mountable file.
11830  * g_file_eject_mountable_with_operation() to eject a mountable file.
11831  * <para id="gfile-etag"><indexterm><primary>entity tag</primary></indexterm>
11832  * One notable feature of #GFile<!-- -->s are entity tags, or "etags" for
11833  * short. Entity tags are somewhat like a more abstract version of the
11834  * traditional mtime, and can be used to quickly determine if the file has
11835  * been modified from the version on the file system. See the HTTP 1.1
11836  * <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">specification</ulink>
11837  * for HTTP Etag headers, which are a very similar concept.
11838  * </para>
11839  *
11840  * To construct a #gfile, you can use:
11841  * Other possible causes for aliases are: case insensitive filesystems, short
11842  */
11843
11844
11845 /**
11846  * SECTION:gfileattribute
11847  * @short_description: Key-Value Paired File Attributes
11848  * @include: gio/gio.h
11849  * @see_also: #GFile, #GFileInfo
11850  *
11851  * File attributes in GIO consist of a list of key-value pairs.
11852  * Keys are strings that contain a key namespace and a key name, separated
11853  * by a colon, e.g. "namespace:keyname". Namespaces are included to sort
11854  * key-value pairs by namespaces for relevance. Keys can be retrived
11855  * using wildcards, e.g. "standard::*" will return all of the keys in the
11856  * "standard" namespace.
11857  * Values are stored within the list in #GFileAttributeValue structures.
11858  * Values can store different types, listed in the enum #GFileAttributeType.
11859  * Upon creation of a #GFileAttributeValue, the type will be set to
11860  * %G_FILE_ATTRIBUTE_TYPE_INVALID.
11861  * The list of possible attributes for a filesystem (pointed to by a #GFile) is
11862  * availible as a #GFileAttributeInfoList. This list is queryable by key names
11863  * as indicated earlier.
11864  * Classes that implement #GFileIface will create a #GFileAttributeInfoList and
11865  * install default keys and values for their given file system, architecture,
11866  * and other possible implementation details (e.g., on a UNIX system, a file
11867  * attribute key will be registered for the user id for a given file).
11868  * <para>
11869  * <table>
11870  * <title>GFileAttributes Default Namespaces</title>
11871  * <tgroup cols='2' align='left'><thead>
11872  * <row><entry>Namspace</entry><entry>Description</entry></row>
11873  * </thead>
11874  * <tbody>
11875  * <row><entry>"standard"</entry><entry>The "Standard" namespace. General file
11876  * information that any application may need should be put in this namespace.
11877  * Examples include the file's name, type, and size.</entry></row>
11878  * <row><entry>"etag"</entry><entry>The <link linkend="gfile-etag">"Entity Tag"</link>
11879  * namespace. Currently, the only key in this namespace is "value", which contains
11880  * the value of the current entity tag.</entry></row>
11881  * <row><entry>"id"</entry><entry>The "Identification" namespace. This
11882  * namespace is used by file managers and applications that list directories
11883  * to check for loops and to uniquely identify files.</entry></row>
11884  * <row><entry>"access"</entry><entry>The "Access" namespace. Used to check
11885  * if a user has the proper privilidges to access files and perform
11886  * file operations. Keys in this namespace are made to be generic
11887  * and easily understood, e.g. the "can_read" key is %TRUE if
11888  * the current user has permission to read the file. UNIX permissions and
11889  * NTFS ACLs in Windows should be mapped to these values.</entry></row>
11890  * <row><entry>"mountable"</entry><entry>The "Mountable" namespace. Includes
11891  * simple boolean keys for checking if a file or path supports mount operations, e.g.
11892  * mount, unmount, eject. These are used for files of type %G_FILE_TYPE_MOUNTABLE.</entry></row>
11893  * <row><entry>"time"</entry><entry>The "Time" namespace. Includes file
11894  * access, changed, created times. </entry></row>
11895  * <row><entry>"unix"</entry><entry>The "Unix" namespace. Includes UNIX-specific
11896  * information and may not be available for all files. Examples include
11897  * the UNIX "UID", "GID", etc.</entry></row>
11898  * <row><entry>"dos"</entry><entry>The "DOS" namespace. Includes DOS-specific
11899  * information and may not be available for all files. Examples include
11900  * "is_system" for checking if a file is marked as a system file, and "is_archive"
11901  * for checking if a file is marked as an archive file.</entry></row>
11902  * <row><entry>"owner"</entry><entry>The "Owner" namespace. Includes information
11903  * about who owns a file. May not be available for all file systems. Examples include
11904  * "user" for getting the user name of the file owner. This information is often mapped from
11905  * some backend specific data such as a unix UID.</entry></row>
11906  * <row><entry>"thumbnail"</entry><entry>The "Thumbnail" namespace. Includes
11907  * information about file thumbnails and their location within the file system. Exaples of
11908  * keys in this namespace include "path" to get the location of a thumbnail, and "failed"
11909  * to check if thumbnailing of the file failed.</entry></row>
11910  * <row><entry>"filesystem"</entry><entry>The "Filesystem" namespace. Gets information
11911  * about the file system where a file is located, such as its type, how much
11912  * space is left available, and the overall size of the file system.</entry></row>
11913  * <row><entry>"gvfs"</entry><entry>The "GVFS" namespace. Keys in this namespace
11914  * contain information about the current GVFS backend in use. </entry></row>
11915  * <row><entry>"xattr"</entry><entry>The "xattr" namespace. Gets information
11916  * about extended user attributes. See attr(5). The "user." prefix of the
11917  * extended user attribute name is stripped away when constructing keys in
11918  * this namespace, e.g. "xattr::mime_type" for the extended attribute with
11919  * the name "user.mime_type". Note that this information is only available
11920  * if GLib has been built with extended attribute support.</entry></row>
11921  * <row><entry>"xattr-sys"</entry><entry>The "xattr-sys" namespace.
11922  * Gets information about extended attributes which are not user-specific.
11923  * See attr(5). Note that this information is only available if GLib
11924  * has been built with extended attribute support.</entry></row>
11925  * <row><entry>"selinux"</entry><entry>The "SELinux" namespace. Includes
11926  * information about the SELinux context of files. Note that this information
11927  * is only available if GLib has been built with SELinux support.</entry></row>
11928  * </tbody>
11929  * </tgroup>
11930  * </table>
11931  * </para>
11932  * Please note that these are not all of the possible namespaces.
11933  * More namespaces can be added from GIO modules or by individual applications.
11934  * For more information about writing GIO modules, see #GIOModule.
11935  * <!-- TODO: Implementation note about using extended attributes on supported
11936  * file systems -->
11937  * <para><table>
11938  * <title>GFileAttributes Built-in Keys and Value Types</title>
11939  * <tgroup cols='3' align='left'><thead>
11940  * <row><entry>Enum Value</entry><entry>Namespace:Key</entry><entry>Value Type</entry></row>
11941  * </thead><tbody>
11942  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TYPE</entry><entry>standard::type</entry><entry>uint32 (#GFileType)</entry></row>
11943  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</entry><entry>standard::is-hidden</entry><entry>boolean</entry></row>
11944  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP</entry><entry>standard::is-backup</entry><entry>boolean</entry></row>
11945  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</entry><entry>standard::is-symlink</entry><entry>boolean</entry></row>
11946  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</entry><entry>standard::is-virtual</entry><entry>boolean</entry></row>
11947  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_NAME</entry><entry>standard::name</entry><entry>byte string</entry></row>
11948  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</entry><entry>standard::display-name</entry><entry>string</entry></row>
11949  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</entry><entry>standard::edit-name</entry><entry>string</entry></row>
11950  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ICON</entry><entry>standard::icon</entry><entry>object (#GIcon)</entry></row>
11951  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</entry><entry>standard::content-type</entry><entry>string</entry></row>
11952  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</entry><entry>standard::fast-content-type</entry><entry>string</entry></row>
11953  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SIZE</entry><entry>standard::size</entry><entry>uint64</entry></row>
11954  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE</entry><entry>standard::allocated-size</entry><entry>uint64</entry></row>
11955  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</entry><entry>standard::symlink-target</entry><entry>byte string</entry></row>
11956  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TARGET_URI</entry><entry>standard::target-uri</entry><entry>string</entry></row>
11957  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER</entry><entry>standard::sort-order</entry><entry>int32</entry></row>
11958  * <row><entry>%G_FILE_ATTRIBUTE_ETAG_VALUE</entry><entry>etag::value</entry><entry>string</entry></row>
11959  * <row><entry>%G_FILE_ATTRIBUTE_ID_FILE</entry><entry>id::file</entry><entry>string</entry></row>
11960  * <row><entry>%G_FILE_ATTRIBUTE_ID_FILESYSTEM</entry><entry>id::filesystem</entry><entry>string</entry></row>
11961  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_READ</entry><entry>access::can-read</entry><entry>boolean</entry></row>
11962  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE</entry><entry>access::can-write</entry><entry>boolean</entry></row>
11963  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</entry><entry>access::can-execute</entry><entry>boolean</entry></row>
11964  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE</entry><entry>access::can-delete</entry><entry>boolean</entry></row>
11965  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH</entry><entry>access::can-trash</entry><entry>boolean</entry></row>
11966  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME</entry><entry>access::can-rename</entry><entry>boolean</entry></row>
11967  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</entry><entry>mountable::can-mount</entry><entry>boolean</entry></row>
11968  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</entry><entry>mountable::can-unmount</entry><entry>boolean</entry></row>
11969  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</entry><entry>mountable::can-eject</entry><entry>boolean</entry></row>
11970  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</entry><entry>mountable::unix-device</entry><entry>uint32</entry></row>
11971  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE</entry><entry>mountable::unix-device-file</entry><entry>string</entry></row>
11972  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</entry><entry>mountable::hal-udi</entry><entry>string</entry></row>
11973  * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED</entry><entry>time::modified</entry><entry>uint64</entry></row>
11974  * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC</entry><entry>time::modified-usec</entry><entry>uint32</entry></row>
11975  * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS</entry><entry>time::access</entry><entry>uint64</entry></row>
11976  * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS_USEC</entry><entry>time::access-usec</entry><entry>uint32</entry></row>
11977  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED</entry><entry>time::changed</entry><entry>uint64</entry></row>
11978  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED_USEC</entry><entry>time::changed-usec</entry><entry>uint32</entry></row>
11979  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED</entry><entry>time::created</entry><entry>uint64</entry></row>
11980  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED_USEC</entry><entry>time::created-usec</entry><entry>uint32</entry></row>
11981  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_DEVICE</entry><entry>unix::device</entry><entry>uint32</entry></row>
11982  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_INODE</entry><entry>unix::inode</entry><entry>uint64</entry></row>
11983  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_MODE</entry><entry>unix::mode</entry><entry>uint32</entry></row>
11984  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_NLINK</entry><entry>unix::nlink</entry><entry>uint32</entry></row>
11985  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_UID</entry><entry>unix::uid</entry><entry>uint32</entry></row>
11986  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_GID</entry><entry>unix::gid</entry><entry>uint32</entry></row>
11987  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_RDEV</entry><entry>unix::rdev</entry><entry>uint32</entry></row>
11988  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</entry><entry>unix::block-size</entry><entry>uint32</entry></row>
11989  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCKS</entry><entry>unix::blocks</entry><entry>uint64</entry></row>
11990  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</entry><entry>unix::is-mountpoint</entry><entry>boolean</entry></row>
11991  * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE</entry><entry>dos::is-archive</entry><entry>boolean</entry></row>
11992  * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_SYSTEM</entry><entry>dos::is-system</entry><entry>boolean</entry></row>
11993  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER</entry><entry>owner::user</entry><entry>string</entry></row>
11994  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER_REAL</entry><entry>owner::user-real</entry><entry>string</entry></row>
11995  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_GROUP</entry><entry>owner::group</entry><entry>string</entry></row>
11996  * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAIL_PATH</entry><entry>thumbnail::path</entry><entry>bytestring</entry></row>
11997  * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAILING_FAILED</entry><entry>thumbnail::failed</entry><entry>boolean</entry></row>
11998  * <row><entry>%G_FILE_ATTRIBUTE_PREVIEW_ICON</entry><entry>preview::icon</entry><entry>object (#GIcon)</entry></row>
11999  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_SIZE</entry><entry>filesystem::size</entry><entry>uint64</entry></row>
12000  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_FREE</entry><entry>filesystem::free</entry><entry>uint64</entry></row>
12001  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_TYPE</entry><entry>filesystem::type</entry><entry>string</entry></row>
12002  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_READONLY</entry><entry>filesystem::readonly</entry><entry>boolean</entry></row>
12003  * <row><entry>%G_FILE_ATTRIBUTE_GVFS_BACKEND</entry><entry>gvfs::backend</entry><entry>string</entry></row>
12004  * <row><entry>%G_FILE_ATTRIBUTE_SELINUX_CONTEXT</entry><entry>selinux::context</entry><entry>string</entry></row>
12005  * </tbody></tgroup></table></para>
12006  * Note that there are no predefined keys in the "xattr" and "xattr-sys"
12007  * namespaces. Keys for the "xattr" namespace are constructed by stripping
12008  * away the "user." prefix from the extended user attribute, and prepending
12009  * "xattr::". Keys for the "xattr-sys" namespace are constructed by
12010  * concatenating "xattr-sys::" with the extended attribute name. All extended
12011  * attribute values are returned as hex-encoded strings in which bytes outside
12012  * the ASCII range are encoded as hexadecimal escape sequences of the form
12013  * \x<replaceable>nn</replaceable>.
12014  */
12015
12016
12017 /**
12018  * SECTION:gfiledescriptorbased
12019  * @short_description: Interface for file descriptor based IO
12020  * @include: gio/gfiledescriptorbased.h
12021  * @see_also: #GInputStream, #GOutputStream
12022  *
12023  * #GFileDescriptorBased is implemented by streams (implementations of
12024  * #GInputStream or #GOutputStream) that are based on file descriptors.
12025  * Note that <filename>&lt;gio/gfiledescriptorbased.h&gt;</filename> belongs to
12026  * the UNIX-specific GIO interfaces, thus you have to use the
12027  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12028  *
12029  * Since: 2.24
12030  */
12031
12032
12033 /**
12034  * SECTION:gfileenumerator
12035  * @short_description: Enumerated Files Routines
12036  * @include: gio/gio.h
12037  *
12038  * #GFileEnumerator allows you to operate on a set of #GFile<!-- -->s,
12039  * returning a #GFileInfo structure for each file enumerated (e.g.
12040  * g_file_enumerate_children() will return a #GFileEnumerator for each
12041  * of the children within a directory).
12042  * To get the next file's information from a #GFileEnumerator, use
12043  * g_file_enumerator_next_file() or its asynchronous version,
12044  * g_file_enumerator_next_files_async(). Note that the asynchronous
12045  * version will return a list of #GFileInfo<!---->s, whereas the
12046  * synchronous will only return the next file in the enumerator.
12047  * To close a #GFileEnumerator, use g_file_enumerator_close(), or
12048  * its asynchronous version, g_file_enumerator_close_async(). Once
12049  * a #GFileEnumerator is closed, no further actions may be performed
12050  * on it, and it should be freed with g_object_unref().
12051  */
12052
12053
12054 /**
12055  * SECTION:gfileicon
12056  * @short_description: Icons pointing to an image file
12057  * @include: gio/gio.h
12058  * @see_also: #GIcon, #GLoadableIcon
12059  *
12060  * #GFileIcon specifies an icon by pointing to an image file
12061  * to be used as icon.
12062  */
12063
12064
12065 /**
12066  * SECTION:gfileinfo
12067  * @short_description: File Information and Attributes
12068  * @include: gio/gio.h
12069  * @see_also: #GFile, <link linkend="gio-GFileAttribute">GFileAttribute</link>
12070  *
12071  * Functionality for manipulating basic metadata for files. #GFileInfo
12072  * implements methods for getting information that all files should
12073  * contain, and allows for manipulation of extended attributes.
12074  * See <link linkend="gio-GFileAttribute">GFileAttribute</link> for more
12075  * information on how GIO handles file attributes.
12076  * To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its
12077  * async variant). To obtain a #GFileInfo for a file input or output
12078  * stream, use g_file_input_stream_query_info() or
12079  * g_file_output_stream_query_info() (or their async variants).
12080  * To change the actual attributes of a file, you should then set the
12081  * attribute in the #GFileInfo and call g_file_set_attributes_from_info()
12082  * or g_file_set_attributes_async() on a GFile.
12083  * However, not all attributes can be changed in the file. For instance,
12084  * the actual size of a file cannot be changed via g_file_info_set_size().
12085  * You may call g_file_query_settable_attributes() and
12086  * g_file_query_writable_namespaces() to discover the settable attributes
12087  * of a particular file at runtime.
12088  * #GFileAttributeMatcher allows for searching through a #GFileInfo for
12089  * attributes.
12090  */
12091
12092
12093 /**
12094  * SECTION:gfileinputstream
12095  * @short_description: File input streaming operations
12096  * @include: gio/gio.h
12097  * @see_also: #GInputStream, #GDataInputStream, #GSeekable
12098  *
12099  * GFileInputStream provides input streams that take their
12100  * content from a file.
12101  * GFileInputStream implements #GSeekable, which allows the input
12102  * stream to jump to arbitrary positions in the file, provided the
12103  * filesystem of the file allows it. To find the position of a file
12104  * input stream, use g_seekable_tell(). To find out if a file input
12105  * stream supports seeking, use g_seekable_stream_can_seek().
12106  * To position a file input stream, use g_seekable_seek().
12107  */
12108
12109
12110 /**
12111  * SECTION:gfileiostream
12112  * @short_description: File read and write streaming operations
12113  * @include: gio/gio.h
12114  * @see_also: #GIOStream, #GFileInputStream, #GFileOutputStream, #GSeekable
12115  *
12116  * GFileIOStream provides io streams that both read and write to the same
12117  * file handle.
12118  * GFileIOStream implements #GSeekable, which allows the io
12119  * stream to jump to arbitrary positions in the file and to truncate
12120  * the file, provided the filesystem of the file supports these
12121  * operations.
12122  * To find the position of a file io stream, use
12123  * g_seekable_tell().
12124  * To find out if a file io stream supports seeking, use g_seekable_can_seek().
12125  * To position a file io stream, use g_seekable_seek().
12126  * To find out if a file io stream supports truncating, use
12127  * g_seekable_can_truncate(). To truncate a file io
12128  * stream, use g_seekable_truncate().
12129  * The default implementation of all the #GFileIOStream operations
12130  * and the implementation of #GSeekable just call into the same operations
12131  * on the output stream.
12132  *
12133  * Since: 2.22
12134  */
12135
12136
12137 /**
12138  * SECTION:gfilemonitor
12139  * @short_description: File Monitor
12140  * @include: gio/gio.h
12141  *
12142  * Monitors a file or directory for changes.
12143  * To obtain a #GFileMonitor for a file or directory, use
12144  * g_file_monitor(), g_file_monitor_file(), or
12145  * g_file_monitor_directory().
12146  * To get informed about changes to the file or directory you are
12147  * monitoring, connect to the #GFileMonitor::changed signal. The
12148  * signal will be emitted in the <link
12149  * linkend="g-main-context-push-thread-default">thread-default main
12150  * context</link> of the thread that the monitor was created in
12151  * (though if the global default main context is blocked, this may
12152  * cause notifications to be blocked even if the thread-default
12153  * context is still running).
12154  */
12155
12156
12157 /**
12158  * SECTION:gfilenamecompleter
12159  * @short_description: Filename Completer
12160  * @include: gio/gio.h
12161  *
12162  * Completes partial file and directory names given a partial string by
12163  * looking in the file system for clues. Can return a list of possible
12164  * completion strings for widget implementations.
12165  */
12166
12167
12168 /**
12169  * SECTION:gfileoutputstream
12170  * @short_description: File output streaming operations
12171  * @include: gio/gio.h
12172  * @see_also: #GOutputStream, #GDataOutputStream, #GSeekable
12173  *
12174  * GFileOutputStream provides output streams that write their
12175  * content to a file.
12176  * GFileOutputStream implements #GSeekable, which allows the output
12177  * stream to jump to arbitrary positions in the file and to truncate
12178  * the file, provided the filesystem of the file supports these
12179  * operations.
12180  * To find the position of a file output stream, use g_seekable_tell().
12181  * To find out if a file output stream supports seeking, use
12182  * g_seekable_can_seek().To position a file output stream, use
12183  * g_seekable_seek(). To find out if a file output stream supports
12184  * truncating, use g_seekable_can_truncate(). To truncate a file output
12185  * stream, use g_seekable_truncate().
12186  */
12187
12188
12189 /**
12190  * SECTION:gfilterinputstream
12191  * @short_description: Filter Input Stream
12192  * @include: gio/gio.h
12193  *
12194  * Base class for input stream implementations that perform some
12195  * kind of filtering operation on a base stream. Typical examples
12196  * of filtering operations are character set conversion, compression
12197  * and byte order flipping.
12198  */
12199
12200
12201 /**
12202  * SECTION:gfilteroutputstream
12203  * @short_description: Filter Output Stream
12204  * @include: gio/gio.h
12205  *
12206  * Base class for output stream implementations that perform some
12207  * kind of filtering operation on a base stream. Typical examples
12208  * of filtering operations are character set conversion, compression
12209  * and byte order flipping.
12210  */
12211
12212
12213 /**
12214  * SECTION:gicon
12215  * @short_description: Interface for icons
12216  * @include: gio/gio.h
12217  *
12218  * #GIcon is a very minimal interface for icons. It provides functions
12219  * for checking the equality of two icons, hashing of icons and
12220  * serializing an icon to and from strings.
12221  * #GIcon does not provide the actual pixmap for the icon as this is out
12222  * of GIO's scope, however implementations of #GIcon may contain the name
12223  * of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon).
12224  * To obtain a hash of a #GIcon, see g_icon_hash().
12225  * To check if two #GIcons are equal, see g_icon_equal().
12226  * For serializing a #GIcon, use g_icon_to_string() and
12227  * g_icon_new_for_string().
12228  * If your application or library provides one or more #GIcon
12229  * implementations you need to ensure that each #GType is registered
12230  * with the type system prior to calling g_icon_new_for_string().
12231  */
12232
12233
12234 /**
12235  * SECTION:ginetaddress
12236  * @short_description: An IPv4/IPv6 address
12237  *
12238  * #GInetAddress represents an IPv4 or IPv6 internet address. Use
12239  * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_async() to
12240  * look up the #GInetAddress for a hostname. Use
12241  * g_resolver_lookup_by_address() or
12242  * g_resolver_lookup_by_address_async() to look up the hostname for a
12243  * #GInetAddress.
12244  * To actually connect to a remote host, you will need a
12245  * #GInetSocketAddress (which includes a #GInetAddress as well as a
12246  * port number).
12247  */
12248
12249
12250 /**
12251  * SECTION:ginetsocketaddress
12252  * @short_description: Internet GSocketAddress
12253  *
12254  * An IPv4 or IPv6 socket address; that is, the combination of a
12255  * #GInetAddress and a port number.
12256  */
12257
12258
12259 /**
12260  * SECTION:ginitable
12261  * @short_description: Failable object initialization interface
12262  * @include: gio/gio.h
12263  * @see_also: #GAsyncInitable
12264  *
12265  * #GInitable is implemented by objects that can fail during
12266  * initialization. If an object implements this interface the
12267  * g_initable_init() function must be called as the first thing
12268  * after construction. If g_initable_init() is not called, or if
12269  * it returns an error, all further operations on the object
12270  * should fail, generally with a %G_IO_ERROR_NOT_INITIALIZED error.
12271  * Users of objects implementing this are not intended to use
12272  * the interface method directly, instead it will be used automatically
12273  * in various ways. For C applications you generally just call
12274  * g_initable_new() directly, or indirectly via a foo_thing_new() wrapper.
12275  * This will call g_initable_init() under the cover, returning %NULL and
12276  * setting a #GError on failure (at which point the instance is
12277  * unreferenced).
12278  * For bindings in languages where the native constructor supports
12279  * exceptions the binding could check for objects implemention %GInitable
12280  * during normal construction and automatically initialize them, throwing
12281  * an exception on failure.
12282  */
12283
12284
12285 /**
12286  * SECTION:ginputstream
12287  * @short_description: Base class for implementing streaming input
12288  * @include: gio/gio.h
12289  *
12290  * GInputStream has functions to read from a stream (g_input_stream_read()),
12291  * to close a stream (g_input_stream_close()) and to skip some content
12292  * (g_input_stream_skip()).
12293  * To copy the content of an input stream to an output stream without
12294  * manually handling the reads and writes, use g_output_stream_splice().
12295  * All of these functions have async variants too.
12296  */
12297
12298
12299 /**
12300  * SECTION:gioerror
12301  * @short_description: Error helper functions
12302  * @include: gio/gio.h
12303  *
12304  * Contains helper functions for reporting errors to the user.
12305  */
12306
12307
12308 /**
12309  * SECTION:giomodule
12310  * @short_description: Loadable GIO Modules
12311  * @include: gio/gio.h
12312  *
12313  * Provides an interface and default functions for loading and unloading
12314  * modules. This is used internally to make GIO extensible, but can also
12315  * be used by others to implement module loading.
12316  */
12317
12318
12319 /**
12320  * SECTION:gioscheduler
12321  * @short_description: I/O Scheduler
12322  * @include: gio/gio.h
12323  *
12324  * Schedules asynchronous I/O operations. #GIOScheduler integrates
12325  * into the main event loop (#GMainLoop) and may use threads if they
12326  * are available.
12327  * <para id="io-priority"><indexterm><primary>I/O priority</primary></indexterm>
12328  * Each I/O operation has a priority, and the scheduler uses the priorities
12329  * to determine the order in which operations are executed. They are
12330  * <emphasis>not</emphasis> used to determine system-wide I/O scheduling.
12331  * Priorities are integers, with lower numbers indicating higher priority.
12332  * It is recommended to choose priorities between %G_PRIORITY_LOW and
12333  * %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT as a default.
12334  * </para>
12335  */
12336
12337
12338 /**
12339  * SECTION:giostream
12340  * @short_description: Base class for implementing read/write streams
12341  * @include: gio/gio.h
12342  * @see_also: #GInputStream, #GOutputStream
12343  *
12344  * GIOStream represents an object that has both read and write streams.
12345  * Generally the two streams acts as separate input and output streams,
12346  * but they share some common resources and state. For instance, for
12347  * seekable streams they may use the same position in both streams.
12348  * Examples of #GIOStream objects are #GSocketConnection which represents
12349  * a two-way network connection, and #GFileIOStream which represent a
12350  * file handle opened in read-write mode.
12351  * To do the actual reading and writing you need to get the substreams
12352  * with g_io_stream_get_input_stream() and g_io_stream_get_output_stream().
12353  * The #GIOStream object owns the input and the output streams, not the other
12354  * way around, so keeping the substreams alive will not keep the #GIOStream
12355  * object alive. If the #GIOStream object is freed it will be closed, thus
12356  * closing the substream, so even if the substreams stay alive they will
12357  * always just return a %G_IO_ERROR_CLOSED for all operations.
12358  * To close a stream use g_io_stream_close() which will close the common
12359  * stream object and also the individual substreams. You can also close
12360  * the substreams themselves. In most cases this only marks the
12361  * substream as closed, so further I/O on it fails. However, some streams
12362  * may support "half-closed" states where one direction of the stream
12363  * is actually shut down.
12364  *
12365  * Since: 2.22
12366  */
12367
12368
12369 /**
12370  * SECTION:gloadableicon
12371  * @short_description: Loadable Icons
12372  * @include: gio/gio.h
12373  * @see_also: #GIcon, #GThemedIcon
12374  *
12375  * Extends the #GIcon interface and adds the ability to
12376  * load icons from streams.
12377  */
12378
12379
12380 /**
12381  * SECTION:gmemoryinputstream
12382  * @short_description: Streaming input operations on memory chunks
12383  * @include: gio/gio.h
12384  * @see_also: #GMemoryOutputStream
12385  *
12386  * #GMemoryInputStream is a class for using arbitrary
12387  * memory chunks as input for GIO streaming input operations.
12388  */
12389
12390
12391 /**
12392  * SECTION:gmemoryoutputstream
12393  * @short_description: Streaming output operations on memory chunks
12394  * @include: gio/gio.h
12395  * @see_also: #GMemoryInputStream
12396  *
12397  * #GMemoryOutputStream is a class for using arbitrary
12398  * memory chunks as output for GIO streaming output operations.
12399  */
12400
12401
12402 /**
12403  * SECTION:gmount
12404  * @short_description: Mount management
12405  * @include: gio/gio.h
12406  * @see_also: GVolume, GUnixMount
12407  *
12408  * The #GMount interface represents user-visible mounts. Note, when
12409  * porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.
12410  * #GMount is a "mounted" filesystem that you can access. Mounted is in
12411  * quotes because it's not the same as a unix mount, it might be a gvfs
12412  * mount, but you can still access the files on it if you use GIO. Might or
12413  * might not be related to a volume object.
12414  * Unmounting a #GMount instance is an asynchronous operation. For
12415  * more information about asynchronous operations, see #GAsyncReady
12416  * and #GSimpleAsyncReady. To unmount a #GMount instance, first call
12417  * g_mount_unmount_with_operation() with (at least) the #GMount instance and a
12418  * #GAsyncReadyCallback.  The callback will be fired when the
12419  * operation has resolved (either with success or failure), and a
12420  * #GAsyncReady structure will be passed to the callback.  That
12421  * callback should then call g_mount_unmount_with_operation_finish() with the #GMount
12422  * and the #GAsyncReady data to see if the operation was completed
12423  * successfully.  If an @error is present when g_mount_unmount_with_operation_finish()
12424  * is called, then it will be filled with any error information.
12425  */
12426
12427
12428 /**
12429  * SECTION:gmountoperation
12430  * @short_description: Object used for authentication and user interaction
12431  * @include: gio/gio.h
12432  *
12433  * #GMountOperation provides a mechanism for interacting with the user.
12434  * It can be used for authenticating mountable operations, such as loop
12435  * mounting files, hard drive partitions or server locations. It can
12436  * also be used to ask the user questions or show a list of applications
12437  * preventing unmount or eject operations from completing.
12438  * Note that #GMountOperation is used for more than just #GMount
12439  * objects â€“ for example it is also used in g_drive_start() and
12440  * g_drive_stop().
12441  * Users should instantiate a subclass of this that implements all the
12442  * various callbacks to show the required dialogs, such as
12443  * #GtkMountOperation. If no user interaction is desired (for example
12444  * when automounting filesystems at login time), usually %NULL can be
12445  * passed, see each method taking a #GMountOperation for details.
12446  */
12447
12448
12449 /**
12450  * SECTION:gnetworkaddress
12451  * @short_description: A GSocketConnectable for resolving hostnames
12452  * @include: gio/gio.h
12453  *
12454  * #GNetworkAddress provides an easy way to resolve a hostname and
12455  * then attempt to connect to that host, handling the possibility of
12456  * multiple IP addresses and multiple address families.
12457  * See #GSocketConnectable for and example of using the connectable
12458  * interface.
12459  */
12460
12461
12462 /**
12463  * SECTION:gnetworkservice
12464  * @short_description: A GSocketConnectable for resolving SRV records
12465  * @include: gio/gio.h
12466  *
12467  * Like #GNetworkAddress does with hostnames, #GNetworkService
12468  * provides an easy way to resolve a SRV record, and then attempt to
12469  * connect to one of the hosts that implements that service, handling
12470  * service priority/weighting, multiple IP addresses, and multiple
12471  * address families.
12472  * See #GSrvTarget for more information about SRV records, and see
12473  * #GSocketConnectable for and example of using the connectable
12474  * interface.
12475  */
12476
12477
12478 /**
12479  * SECTION:goutputstream
12480  * @short_description: Base class for implementing streaming output
12481  * @include: gio/gio.h
12482  *
12483  * GOutputStream has functions to write to a stream (g_output_stream_write()),
12484  * to close a stream (g_output_stream_close()) and to flush pending writes
12485  * (g_output_stream_flush()).
12486  * To copy the content of an input stream to an output stream without
12487  * manually handling the reads and writes, use g_output_stream_splice().
12488  * All of these functions have async variants too.
12489  */
12490
12491
12492 /**
12493  * SECTION:gpermission
12494  * @title: GPermission
12495  * @short_description: An object representing the permission to perform a certain action
12496  *
12497  * A #GPermission represents the status of the caller's permission to
12498  * perform a certain action.
12499  * You can query if the action is currently allowed and if it is
12500  * possible to acquire the permission so that the action will be allowed
12501  * in the future.
12502  * There is also an API to actually acquire the permission and one to
12503  * release it.
12504  * As an example, a #GPermission might represent the ability for the
12505  * user to write to a #GSettings object.  This #GPermission object could
12506  * then be used to decide if it is appropriate to show a "Click here to
12507  * unlock" button in a dialog and to provide the mechanism to invoke
12508  * when that button is clicked.
12509  */
12510
12511
12512 /**
12513  * SECTION:gpollableinputstream
12514  * @short_description: Interface for pollable input streams
12515  * @include: gio/gio.h
12516  * @see_also: #GInputStream, #GPollableOutputStream, #GFileDescriptorBased
12517  *
12518  * #GPollableInputStream is implemented by #GInputStream<!-- -->s that
12519  * can be polled for readiness to read. This can be used when
12520  * interfacing with a non-GIO API that expects
12521  * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
12522  *
12523  * Since: 2.28
12524  */
12525
12526
12527 /**
12528  * SECTION:gpollableoutputstream
12529  * @short_description: Interface for pollable output streams
12530  * @include: gio/gio.h
12531  * @see_also: #GOutputStream, #GFileDescriptorBased, #GPollableInputStream
12532  *
12533  * #GPollableOutputStream is implemented by #GOutputStream<!-- -->s that
12534  * can be polled for readiness to write. This can be used when
12535  * interfacing with a non-GIO API that expects
12536  * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
12537  *
12538  * Since: 2.28
12539  */
12540
12541
12542 /**
12543  * SECTION:gproxy
12544  * @short_description: Interface for proxy handling
12545  *
12546  * A #GProxy handles connecting to a remote host via a given type of
12547  * proxy server. It is implemented by the 'gio-proxy' extension point.
12548  * The extensions are named after their proxy protocol name. As an
12549  * example, a SOCKS5 proxy implementation can be retrieved with the
12550  * name 'socks5' using the function
12551  * g_io_extension_point_get_extension_by_name().
12552  *
12553  * Since: 2.26
12554  */
12555
12556
12557 /**
12558  * SECTION:gproxyaddress
12559  * @short_description: An internet address with proxy information
12560  *
12561  * Support for proxied #GInetSocketAddress.
12562  */
12563
12564
12565 /**
12566  * SECTION:gproxyresolver
12567  * @short_description: Asynchronous and cancellable network proxy resolver
12568  * @include: gio/gio.h
12569  *
12570  * #GProxyResolver provides synchronous and asynchronous network proxy
12571  * resolution. #GProxyResolver is used within #GSocketClient through
12572  * the method g_socket_connectable_proxy_enumerate().
12573  */
12574
12575
12576 /**
12577  * SECTION:gresolver
12578  * @short_description: Asynchronous and cancellable DNS resolver
12579  * @include: gio/gio.h
12580  *
12581  * #GResolver provides cancellable synchronous and asynchronous DNS
12582  * resolution, for hostnames (g_resolver_lookup_by_address(),
12583  * g_resolver_lookup_by_name() and their async variants) and SRV
12584  * (service) records (g_resolver_lookup_service()).
12585  * #GNetworkAddress and #GNetworkService provide wrappers around
12586  * #GResolver functionality that also implement #GSocketConnectable,
12587  * making it easy to connect to a remote host/service.
12588  */
12589
12590
12591 /**
12592  * SECTION:gseekable
12593  * @short_description: Stream seeking interface
12594  * @include: gio/gio.h
12595  * @see_also: #GInputStream, #GOutputStream
12596  *
12597  * #GSeekable is implemented by streams (implementations of
12598  * #GInputStream or #GOutputStream) that support seeking.
12599  */
12600
12601
12602 /**
12603  * SECTION:gsettings
12604  * @short_description: High-level API for application settings
12605  *
12606  * The #GSettings class provides a convenient API for storing and retrieving
12607  * application settings.
12608  * Reads and writes can be considered to be non-blocking.  Reading
12609  * approximately the same order of magnitude (but slower than) a
12610  * #GHashTable lookup.  Writing settings is also extremely fast in terms
12611  * of time to return to your application, but can be extremely expensive
12612  * for other threads and other processes.  Many settings backends
12613  * (including dconf) have lazy initialisation which means in the common
12614  * case of the user using their computer without modifying any settings
12615  * a lot of work can be avoided.  For dconf, the D-Bus service doesn't
12616  * even need to be started in this case.  For this reason, you should
12617  * only ever modify #GSettings keys in response to explicit user action.
12618  * Particular care should be paid to ensure that modifications are not
12619  * made during startup -- for example, when setting the initial value
12620  * of preferences widgets.  The built-in g_settings_bind() functionality
12621  * is careful not to write settings in response to notify signals as a
12622  * result of modifications that it makes to widgets.
12623  * When creating a GSettings instance, you have to specify a schema
12624  * that describes the keys in your settings and their types and default
12625  * values, as well as some other information.
12626  * Normally, a schema has as fixed path that determines where the settings
12627  * are stored in the conceptual global tree of settings. However, schemas
12628  * can also be 'relocatable', i.e. not equipped with a fixed path. This is
12629  * useful e.g. when the schema describes an 'account', and you want to be
12630  * able to store a arbitrary number of accounts.
12631  * Unlike other configuration systems (like GConf), GSettings does not
12632  * restrict keys to basic types like strings and numbers. GSettings stores
12633  * values as #GVariant, and allows any #GVariantType for keys. Key names
12634  * are restricted to lowercase characters, numbers and '-'. Furthermore,
12635  * the names must begin with a lowercase character, must not end
12636  * with a '-', and must not contain consecutive dashes. Key names can
12637  * be up to 32 characters long.
12638  * Similar to GConf, the default values in GSettings schemas can be
12639  * localized, but the localized values are stored in gettext catalogs
12640  * and looked up with the domain that is specified in the
12641  * <tag class="attribute">gettext-domain</tag> attribute of the
12642  * <tag class="starttag">schemalist</tag> or <tag class="starttag">schema</tag>
12643  * elements and the category that is specified in the l10n attribute of the
12644  * <tag class="starttag">key</tag> element.
12645  * GSettings uses schemas in a compact binary form that is created
12646  * by the <link linkend="glib-compile-schemas">glib-compile-schemas</link>
12647  * utility. The input is a schema description in an XML format that can be
12648  * described by the following DTD:
12649  * |[<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/gschema.dtd"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include>]|
12650  * glib-compile-schemas expects schema files to have the extension <filename>.gschema.xml</filename>
12651  * At runtime, schemas are identified by their id (as specified
12652  * in the <tag class="attribute">id</tag> attribute of the
12653  * <tag class="starttag">schema</tag> element). The
12654  * convention for schema ids is to use a dotted name, similar in
12655  * style to a D-Bus bus name, e.g. "org.gnome.SessionManager". In particular,
12656  * if the settings are for a specific service that owns a D-Bus bus name,
12657  * the D-Bus bus name and schema id should match. For schemas which deal
12658  * with settings not associated with one named application, the id should
12659  * not use StudlyCaps, e.g. "org.gnome.font-rendering".
12660  * In addition to #GVariant types, keys can have types that have enumerated
12661  * types. These can be described by a <tag class="starttag">choice</tag>,
12662  * <tag class="starttag">enum</tag> or <tag class="starttag">flags</tag> element, see
12663  * <xref linkend="schema-enumerated"/>. The underlying type of
12664  * such a key is string, but you can use g_settings_get_enum(),
12665  * g_settings_set_enum(), g_settings_get_flags(), g_settings_set_flags()
12666  * access the numeric values corresponding to the string value of enum
12667  * and flags keys.
12668  * <example id="schema-default-values"><title>Default values</title>
12669  * <programlisting><![CDATA[
12670  * <schemalist>
12671  * <schema id="org.gtk.Test" path="/tests/" gettext-domain="test">
12672  * <key name="greeting" type="s">
12673  * <default l10n="messages">"Hello, earthlings"</default>
12674  * <summary>A greeting</summary>
12675  * <description>
12676  * Greeting of the invading martians
12677  * </description>
12678  * </key>
12679  * <key name="box" type="(ii)">
12680  * <default>(20,30)</default>
12681  * </key>
12682  * </schema>
12683  * </schemalist>
12684  * ]]></programlisting></example>
12685  * <example id="schema-enumerated"><title>Ranges, choices and enumerated types</title>
12686  * <programlisting><![CDATA[
12687  * <schemalist>
12688  * <enum id="org.gtk.Test.myenum">
12689  * <value nick="first" value="1"/>
12690  * <value nick="second" value="2"/>
12691  * </enum>
12692  * <flags id="org.gtk.Test.myflags">
12693  * <value nick="flag1" value="1"/>
12694  * <value nick="flag2" value="2"/>
12695  * <value nick="flag3" value="4"/>
12696  * </flags>
12697  * <schema id="org.gtk.Test">
12698  * <key name="key-with-range" type="i">
12699  * <range min="1" max="100"/>
12700  * <default>10</default>
12701  * </key>
12702  * <key name="key-with-choices" type="s">
12703  * <choices>
12704  * <choice value='Elisabeth'/>
12705  * <choice value='Annabeth'/>
12706  * <choice value='Joe'/>
12707  * </choices>
12708  * <aliases>
12709  * <alias value='Anna' target='Annabeth'/>
12710  * <alias value='Beth' target='Elisabeth'/>
12711  * </aliases>
12712  * <default>'Joe'</default>
12713  * </key>
12714  * <key name='enumerated-key' enum='org.gtk.Test.myenum'>
12715  * <default>'first'</default>
12716  * </key>
12717  * <key name='flags-key' flags='org.gtk.Test.myflags'>
12718  * <default>["flag1",flag2"]</default>
12719  * </key>
12720  * </schema>
12721  * </schemalist>
12722  * ]]></programlisting></example>
12723  * <refsect2>
12724  * <title>Vendor overrides</title>
12725  * <para>
12726  * Default values are defined in the schemas that get installed by
12727  * an application. Sometimes, it is necessary for a vendor or distributor
12728  * to adjust these defaults. Since patching the XML source for the schema
12729  * is inconvenient and error-prone,
12730  * <link linkend="glib-compile-schemas">glib-compile-schemas</link> reads
12731  * so-called 'vendor override' files. These are keyfiles in the same
12732  * directory as the XML schema sources which can override default values.
12733  * The schema id serves as the group name in the key file, and the values
12734  * are expected in serialized GVariant form, as in the following example:
12735  * <informalexample><programlisting>
12736  * [org.gtk.Example]
12737  * key1='string'
12738  * key2=1.5
12739  * </programlisting></informalexample>
12740  * </para>
12741  * <para>
12742  * glib-compile-schemas expects schema files to have the extension
12743  * <filename>.gschema.override</filename>
12744  * </para>
12745  * </refsect2>
12746  * <refsect2>
12747  * <title>Binding</title>
12748  * <para>
12749  * A very convenient feature of GSettings lets you bind #GObject properties
12750  * directly to settings, using g_settings_bind(). Once a GObject property
12751  * has been bound to a setting, changes on either side are automatically
12752  * propagated to the other side. GSettings handles details like
12753  * mapping between GObject and GVariant types, and preventing infinite
12754  * cycles.
12755  * </para>
12756  * <para>
12757  * This makes it very easy to hook up a preferences dialog to the
12758  * underlying settings. To make this even more convenient, GSettings
12759  * looks for a boolean property with the name "sensitivity" and
12760  * automatically binds it to the writability of the bound setting.
12761  * If this 'magic' gets in the way, it can be suppressed with the
12762  * #G_SETTINGS_BIND_NO_SENSITIVITY flag.
12763  * </para>
12764  * </refsect2>
12765  *
12766  * Settings with #gsettings is typically extremely fast: on
12767  */
12768
12769
12770 /**
12771  * SECTION:gsettingsbackend
12772  * @title: GSettingsBackend
12773  * @short_description: Interface for settings backend implementations
12774  * @include: gio/gsettingsbackend.h
12775  * @see_also: #GSettings, #GIOExtensionPoint
12776  *
12777  * The #GSettingsBackend interface defines a generic interface for
12778  * non-strictly-typed data that is stored in a hierarchy. To implement
12779  * an alternative storage backend for #GSettings, you need to implement
12780  * the #GSettingsBackend interface and then make it implement the
12781  * extension point #G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.
12782  * The interface defines methods for reading and writing values, a
12783  * method for determining if writing of certain values will fail
12784  * (lockdown) and a change notification mechanism.
12785  * The semantics of the interface are very precisely defined and
12786  * implementations must carefully adhere to the expectations of
12787  * callers that are documented on each of the interface methods.
12788  * Some of the GSettingsBackend functions accept or return a #GTree.
12789  * These trees always have strings as keys and #GVariant as values.
12790  * g_settings_backend_create_tree() is a convenience function to create
12791  * suitable trees.
12792  * <note><para>
12793  * The #GSettingsBackend API is exported to allow third-party
12794  * implementations, but does not carry the same stability guarantees
12795  * as the public GIO API. For this reason, you have to define the
12796  * C preprocessor symbol #G_SETTINGS_ENABLE_BACKEND before including
12797  * <filename>gio/gsettingsbackend.h</filename>
12798  * </para></note>
12799  */
12800
12801
12802 /**
12803  * SECTION:gsimpleaction
12804  * @title: GSimpleAction
12805  * @short_description: A simple GSimpleAction
12806  *
12807  * A #GSimpleAction is the obvious simple implementation of the #GSimpleAction
12808  * interface.  This is the easiest way to create an action for purposes of
12809  * adding it to a #GSimpleActionGroup.
12810  * See also #GtkAction.
12811  */
12812
12813
12814 /**
12815  * SECTION:gsimpleactiongroup
12816  * @title: GSimpleActionGroup
12817  * @short_description: A simple GActionGroup implementation
12818  *
12819  * #GSimpleActionGroup is a hash table filled with #GAction objects,
12820  * implementing the #GActionGroup interface.
12821  */
12822
12823
12824 /**
12825  * SECTION:gsimpleasyncresult
12826  * @short_description: Simple asynchronous results implementation
12827  * @include: gio/gio.h
12828  * @see_also: #GAsyncResult
12829  *
12830  * Implements #GAsyncResult for simple cases. Most of the time, this
12831  * will be all an application needs, and will be used transparently.
12832  * Because of this, #GSimpleAsyncResult is used throughout GIO for
12833  * handling asynchronous functions.
12834  * GSimpleAsyncResult handles #GAsyncReadyCallback<!-- -->s, error
12835  * reporting, operation cancellation and the final state of an operation,
12836  * completely transparent to the application. Results can be returned
12837  * as a pointer e.g. for functions that return data that is collected
12838  * asynchronously, a boolean value for checking the success or failure
12839  * of an operation, or a #gssize for operations which return the number
12840  * of bytes modified by the operation; all of the simple return cases
12841  * are covered.
12842  * Most of the time, an application will not need to know of the details
12843  * of this API; it is handled transparently, and any necessary operations
12844  * are handled by #GAsyncResult's interface. However, if implementing a
12845  * new GIO module, for writing language bindings, or for complex
12846  * applications that need better control of how asynchronous operations
12847  * are completed, it is important to understand this functionality.
12848  * GSimpleAsyncResults are tagged with the calling function to ensure
12849  * that asynchronous functions and their finishing functions are used
12850  * together correctly.
12851  * To create a new #GSimpleAsyncResult, call g_simple_async_result_new().
12852  * If the result needs to be created for a #GError, use
12853  * g_simple_async_result_new_from_error() or
12854  * g_simple_async_result_new_take_error(). If a #GError is not available
12855  * (e.g. the asynchronous operation's doesn't take a #GError argument),
12856  * but the result still needs to be created for an error condition, use
12857  * g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
12858  * if your application or binding requires passing a variable argument list
12859  * directly), and the error can then be propagated through the use of
12860  * g_simple_async_result_propagate_error().
12861  * An asynchronous operation can be made to ignore a cancellation event by
12862  * calling g_simple_async_result_set_handle_cancellation() with a
12863  * #GSimpleAsyncResult for the operation and %FALSE. This is useful for
12864  * operations that are dangerous to cancel, such as close (which would
12865  * cause a leak if cancelled before being run).
12866  * GSimpleAsyncResult can integrate into GLib's event loop, #GMainLoop,
12867  * or it can use #GThread<!-- -->s if available.
12868  * g_simple_async_result_complete() will finish an I/O task directly
12869  * from the point where it is called. g_simple_async_result_complete_in_idle()
12870  * will finish it from an idle handler in the <link
12871  * linkend="g-main-context-push-thread-default">thread-default main
12872  * context</link>. g_simple_async_result_run_in_thread() will run the
12873  * job in a separate thread and then deliver the result to the
12874  * thread-default main context.
12875  * To set the results of an asynchronous function,
12876  * g_simple_async_result_set_op_res_gpointer(),
12877  * g_simple_async_result_set_op_res_gboolean(), and
12878  * g_simple_async_result_set_op_res_gssize()
12879  * are provided, setting the operation's result to a gpointer, gboolean, or
12880  * gssize, respectively.
12881  * Likewise, to get the result of an asynchronous function,
12882  * g_simple_async_result_get_op_res_gpointer(),
12883  * g_simple_async_result_get_op_res_gboolean(), and
12884  * g_simple_async_result_get_op_res_gssize() are
12885  * provided, getting the operation's result as a gpointer, gboolean, and
12886  * gssize, respectively.
12887  * For the details of the requirements implementations must respect, see
12888  * #GAsyncResult.  A typical implementation of an asynchronous operation
12889  * using GSimpleAsyncResult looks something like this:
12890  * |[
12891  * static void
12892  * baked_cb (Cake    *cake,
12893  * gpointer user_data)
12894  * {
12895  * /&ast; In this example, this callback is not given a reference to the cake, so
12896  * &ast; the GSimpleAsyncResult has to take a reference to it.
12897  * &ast;/
12898  * GSimpleAsyncResult *result = user_data;
12899  * if (cake == NULL)
12900  * g_simple_async_result_set_error (result,
12901  * BAKER_ERRORS,
12902  * BAKER_ERROR_NO_FLOUR,
12903  * "Go to the supermarket");
12904  * else
12905  * g_simple_async_result_set_op_res_gpointer (result,
12906  * g_object_ref (cake),
12907  * g_object_unref);
12908  * /&ast; In this example, we assume that baked_cb is called as a callback from
12909  * &ast; the mainloop, so it's safe to complete the operation synchronously here.
12910  * &ast; If, however, _baker_prepare_cake () might call its callback without
12911  * &ast; first returning to the mainloop â€” inadvisable, but some APIs do so â€”
12912  * &ast; we would need to use g_simple_async_result_complete_in_idle().
12913  * &ast;/
12914  * g_simple_async_result_complete (result);
12915  * g_object_unref (result);
12916  * }
12917  * void
12918  * baker_bake_cake_async (Baker              *self,
12919  * guint               radius,
12920  * GAsyncReadyCallback callback,
12921  * gpointer            user_data)
12922  * {
12923  * GSimpleAsyncResult *simple;
12924  * Cake               *cake;
12925  * if (radius < 3)
12926  * {
12927  * g_simple_async_report_error_in_idle (G_OBJECT (self),
12928  * callback,
12929  * user_data,
12930  * BAKER_ERRORS,
12931  * BAKER_ERROR_TOO_SMALL,
12932  * "%ucm radius cakes are silly",
12933  * radius);
12934  * return;
12935  * }
12936  * simple = g_simple_async_result_new (G_OBJECT (self),
12937  * callback,
12938  * user_data,
12939  * baker_bake_cake_async);
12940  * cake = _baker_get_cached_cake (self, radius);
12941  * if (cake != NULL)
12942  * {
12943  * g_simple_async_result_set_op_res_gpointer (simple,
12944  * g_object_ref (cake),
12945  * g_object_unref);
12946  * g_simple_async_result_complete_in_idle (simple);
12947  * g_object_unref (simple);
12948  * /&ast; Drop the reference returned by _baker_get_cached_cake(); the
12949  * &ast; GSimpleAsyncResult has taken its own reference.
12950  * &ast;/
12951  * g_object_unref (cake);
12952  * return;
12953  * }
12954  * _baker_prepare_cake (self, radius, baked_cb, simple);
12955  * }
12956  * Cake *
12957  * baker_bake_cake_finish (Baker        *self,
12958  * GAsyncResult *result,
12959  * GError      **error)
12960  * {
12961  * GSimpleAsyncResult *simple;
12962  * Cake               *cake;
12963  * g_return_val_if_fail (g_simple_async_result_is_valid (result,
12964  * G_OBJECT (self),
12965  * baker_bake_cake_async),
12966  * NULL);
12967  * simple = (GSimpleAsyncResult *) result;
12968  * if (g_simple_async_result_propagate_error (simple, error))
12969  * return NULL;
12970  * cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple));
12971  * return g_object_ref (cake);
12972  * }
12973  * ]|
12974  */
12975
12976
12977 /**
12978  * SECTION:gsimplepermission
12979  * @title: GSimplePermission
12980  * @short_description: A GPermission that doesn't change value
12981  *
12982  * #GSimplePermission is a trivial implementation of #GPermission that
12983  * represents a permission that is either always or never allowed.  The
12984  * value is given at constuction and doesn't change.
12985  * Calling request or release will result in errors.
12986  */
12987
12988
12989 /**
12990  * SECTION:gsocket
12991  * @short_description: Low-level socket object
12992  * @include: gio/gio.h
12993  * @see_also: #GInitable
12994  *
12995  * A #GSocket is a low-level networking primitive. It is a more or less
12996  * direct mapping of the BSD socket API in a portable GObject based API.
12997  * It supports both the UNIX socket implementations and winsock2 on Windows.
12998  * #GSocket is the platform independent base upon which the higher level
12999  * network primitives are based. Applications are not typically meant to
13000  * use it directly, but rather through classes like #GSocketClient,
13001  * #GSocketService and #GSocketConnection. However there may be cases where
13002  * direct use of #GSocket is useful.
13003  * #GSocket implements the #GInitable interface, so if it is manually constructed
13004  * by e.g. g_object_new() you must call g_initable_init() and check the
13005  * results before using the object. This is done automatically in
13006  * g_socket_new() and g_socket_new_from_fd(), so these functions can return
13007  * %NULL.
13008  * Sockets operate in two general modes, blocking or non-blocking. When
13009  * in blocking mode all operations block until the requested operation
13010  * is finished or there is an error. In non-blocking mode all calls that
13011  * would block return immediately with a %G_IO_ERROR_WOULD_BLOCK error.
13012  * To know when a call would successfully run you can call g_socket_condition_check(),
13013  * or g_socket_condition_wait(). You can also use g_socket_create_source() and
13014  * attach it to a #GMainContext to get callbacks when I/O is possible.
13015  * Note that all sockets are always set to non blocking mode in the system, and
13016  * blocking mode is emulated in GSocket.
13017  * When working in non-blocking mode applications should always be able to
13018  * handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other
13019  * function said that I/O was possible. This can easily happen in case
13020  * of a race condition in the application, but it can also happen for other
13021  * reasons. For instance, on Windows a socket is always seen as writable
13022  * until a write returns %G_IO_ERROR_WOULD_BLOCK.
13023  * #GSocket<!-- -->s can be either connection oriented or datagram based.
13024  * For connection oriented types you must first establish a connection by
13025  * either connecting to an address or accepting a connection from another
13026  * address. For connectionless socket types the target/source address is
13027  * specified or received in each I/O operation.
13028  * All socket file descriptors are set to be close-on-exec.
13029  * Note that creating a #GSocket causes the signal %SIGPIPE to be
13030  * ignored for the remainder of the program. If you are writing a
13031  * command-line utility that uses #GSocket, you may need to take into
13032  * account the fact that your program will not automatically be killed
13033  * if it tries to write to %stdout after it has been closed.
13034  *
13035  * Since: 2.22
13036  */
13037
13038
13039 /**
13040  * SECTION:gsocketaddress
13041  * @short_description: Abstract base class representing endpoints for socket communication
13042  *
13043  * #GSocketAddress is the equivalent of <type>struct sockaddr</type>
13044  * in the BSD sockets API. This is an abstract class; use
13045  * #GInetSocketAddress for internet sockets, or #GUnixSocketAddress
13046  * for UNIX domain sockets.
13047  */
13048
13049
13050 /**
13051  * SECTION:gsocketclient
13052  * @short_description: Helper for connecting to a network service
13053  * @include: gio/gio.h
13054  * @see_also: #GSocketConnection, #GSocketListener
13055  *
13056  * #GSocketClient is a high-level utility class for connecting to a
13057  * network host using a connection oriented socket type.
13058  * You create a #GSocketClient object, set any options you want, and then
13059  * call a sync or async connect operation, which returns a #GSocketConnection
13060  * subclass on success.
13061  * The type of the #GSocketConnection object returned depends on the type of
13062  * the underlying socket that is in use. For instance, for a TCP/IP connection
13063  * it will be a #GTcpConnection.
13064  *
13065  * Since: 2.22
13066  */
13067
13068
13069 /**
13070  * SECTION:gsocketconnectable
13071  * @short_description: Interface for potential socket endpoints
13072  *
13073  * Objects that describe one or more potential socket endpoints
13074  * implement #GSocketConnectable. Callers can then use
13075  * g_socket_connectable_enumerate() to get a #GSocketAddressEnumerator
13076  * to try out each socket address in turn until one succeeds, as shown
13077  * in the sample code below.
13078  * |[
13079  * MyConnectionType *
13080  * connect_to_host (const char    *hostname,
13081  * guint16        port,
13082  * GCancellable  *cancellable,
13083  * GError       **error)
13084  * {
13085  * MyConnection *conn = NULL;
13086  * GSocketConnectable *addr;
13087  * GSocketAddressEnumerator *enumerator;
13088  * GSocketAddress *sockaddr;
13089  * GError *conn_error = NULL;
13090  * addr = g_network_address_new ("www.gnome.org", 80);
13091  * enumerator = g_socket_connectable_enumerate (addr);
13092  * g_object_unref (addr);
13093  * /<!-- -->* Try each sockaddr until we succeed. Record the first
13094  * * connection error, but not any further ones (since they'll probably
13095  * * be basically the same as the first).
13096  * *<!-- -->/
13097  * while (!conn && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
13098  * {
13099  * g_object_unref (sockaddr);
13100  * }
13101  * g_object_unref (enumerator);
13102  * if (conn)
13103  * {
13104  * if (conn_error)
13105  * {
13106  * /<!-- -->* We couldn't connect to the first address, but we succeeded
13107  * * in connecting to a later address.
13108  * *<!-- -->/
13109  * g_error_free (conn_error);
13110  * }
13111  * return conn;
13112  * }
13113  * else if (error)
13114  * {
13115  * /<!-- -->* Either the initial lookup failed, or else the caller
13116  * * cancelled us.
13117  * *<!-- -->/
13118  * if (conn_error)
13119  * g_error_free (conn_error);
13120  * return NULL;
13121  * }
13122  * else
13123  * {
13124  * g_error_propagate (error, conn_error);
13125  * return NULL;
13126  * }
13127  * }
13128  * ]|
13129  *
13130  * Conn = connect_to_sockaddr (sockaddr, conn_error ? null : &conn_error);
13131  */
13132
13133
13134 /**
13135  * SECTION:gsocketconnection
13136  * @short_description: A socket connection
13137  * @include: gio/gio.h
13138  * @see_also: #GIOStream, #GSocketClient, #GSocketListener
13139  *
13140  * #GSocketConnection is a #GIOStream for a connected socket. They
13141  * can be created either by #GSocketClient when connecting to a host,
13142  * or by #GSocketListener when accepting a new client.
13143  * The type of the #GSocketConnection object returned from these calls
13144  * depends on the type of the underlying socket that is in use. For
13145  * instance, for a TCP/IP connection it will be a #GTcpConnection.
13146  * Choosing what type of object to construct is done with the socket
13147  * connection factory, and it is possible for 3rd parties to register
13148  * custom socket connection types for specific combination of socket
13149  * family/type/protocol using g_socket_connection_factory_register_type().
13150  *
13151  * Since: 2.22
13152  */
13153
13154
13155 /**
13156  * SECTION:gsocketcontrolmessage
13157  * @title: GSocketControlMessage
13158  * @short_description: A GSocket control message
13159  * @see_also: #GSocket.
13160  *
13161  * A #GSocketControlMessage is a special-purpose utility message that
13162  * can be sent to or received from a #GSocket. These types of
13163  * messages are often called "ancillary data".
13164  * The message can represent some sort of special instruction to or
13165  * information from the socket or can represent a special kind of
13166  * transfer to the peer (for example, sending a file description over
13167  * a UNIX socket).
13168  * These messages are sent with g_socket_send_message() and received
13169  * with g_socket_receive_message().
13170  * To extend the set of control message that can be sent, subclass this
13171  * class and override the get_size, get_level, get_type and serialize
13172  * methods.
13173  * To extend the set of control messages that can be received, subclass
13174  * this class and implement the deserialize method. Also, make sure your
13175  * class is registered with the GType typesystem before calling
13176  * g_socket_receive_message() to read such a message.
13177  *
13178  * Since: 2.22
13179  */
13180
13181
13182 /**
13183  * SECTION:gsocketlistener
13184  * @title: GSocketListener
13185  * @short_description: Helper for accepting network client connections
13186  * @see_also: #GThreadedSocketService, #GSocketService.
13187  *
13188  * A #GSocketListener is an object that keeps track of a set
13189  * of server sockets and helps you accept sockets from any of the
13190  * socket, either sync or async.
13191  * If you want to implement a network server, also look at #GSocketService
13192  * and #GThreadedSocketService which are subclass of #GSocketListener
13193  * that makes this even easier.
13194  *
13195  * Since: 2.22
13196  */
13197
13198
13199 /**
13200  * SECTION:gsocketservice
13201  * @title: GSocketService
13202  * @short_description: Make it easy to implement a network service
13203  * @see_also: #GThreadedSocketService, #GSocketListener.
13204  *
13205  * A #GSocketService is an object that represents a service that
13206  * is provided to the network or over local sockets.  When a new
13207  * connection is made to the service the #GSocketService::incoming
13208  * signal is emitted.
13209  * A #GSocketService is a subclass of #GSocketListener and you need
13210  * to add the addresses you want to accept connections on with the
13211  * #GSocketListener APIs.
13212  * There are two options for implementing a network service based on
13213  * #GSocketService. The first is to create the service using
13214  * g_socket_service_new() and to connect to the #GSocketService::incoming
13215  * signal. The second is to subclass #GSocketService and override the
13216  * default signal handler implementation.
13217  * In either case, the handler must immediately return, or else it
13218  * will block additional incoming connections from being serviced.
13219  * If you are interested in writing connection handlers that contain
13220  * blocking code then see #GThreadedSocketService.
13221  * The socket service runs on the main loop in the main thread, and is
13222  * not threadsafe in general. However, the calls to start and stop
13223  * the service are threadsafe so these can be used from threads that
13224  * handle incoming clients.
13225  *
13226  * Since: 2.22
13227  */
13228
13229
13230 /**
13231  * SECTION:gsrvtarget
13232  * @short_description: DNS SRV record target
13233  * @include: gio/gio.h
13234  *
13235  * SRV (service) records are used by some network protocols to provide
13236  * service-specific aliasing and load-balancing. For example, XMPP
13237  * (Jabber) uses SRV records to locate the XMPP server for a domain;
13238  * rather than connecting directly to "example.com" or assuming a
13239  * specific server hostname like "xmpp.example.com", an XMPP client
13240  * would look up the "xmpp-client" SRV record for "example.com", and
13241  * then connect to whatever host was pointed to by that record.
13242  * You can use g_resolver_lookup_service() or
13243  * g_resolver_lookup_service_async() to find the #GSrvTarget<!-- -->s
13244  * for a given service. However, if you are simply planning to connect
13245  * to the remote service, you can use #GNetworkService's
13246  * #GSocketConnectable interface and not need to worry about
13247  * #GSrvTarget at all.
13248  */
13249
13250
13251 /**
13252  * SECTION:gtcpconnection
13253  * @title: GTcpConnection
13254  * @short_description: A TCP GSocketConnection
13255  * @see_also: #GSocketConnection.
13256  *
13257  * This is the subclass of #GSocketConnection that is created
13258  * for TCP/IP sockets.
13259  *
13260  * Since: 2.22
13261  */
13262
13263
13264 /**
13265  * SECTION:gtcpwrapperconnection
13266  * @title: GTcpWrapperConnection
13267  * @short_description: wrapper for non-GSocketConnection-based, GSocket-based GIOStreams
13268  * @see_also: #GSocketConnection.
13269  *
13270  * A #GTcpWrapperConnection can be used to wrap a #GIOStream that is
13271  * based on a #GSocket, but which is not actually a
13272  * #GSocketConnection. This is used by #GSocketClient so that it can
13273  * always return a #GSocketConnection, even when the connection it has
13274  * actually created is not directly a #GSocketConnection.
13275  *
13276  * Since: 2.28
13277  */
13278
13279
13280 /**
13281  * SECTION:gthemedicon
13282  * @short_description: Icon theming support
13283  * @include: gio/gio.h
13284  * @see_also: #GIcon, #GLoadableIcon
13285  *
13286  * #GThemedIcon is an implementation of #GIcon that supports icon themes.
13287  * #GThemedIcon contains a list of all of the icons present in an icon
13288  * theme, so that icons can be looked up quickly. #GThemedIcon does
13289  * not provide actual pixmaps for icons, just the icon names.
13290  * Ideally something like gtk_icon_theme_choose_icon() should be used to
13291  * resolve the list of names so that fallback icons work nicely with
13292  * themes that inherit other themes.
13293  */
13294
13295
13296 /**
13297  * SECTION:gthreadedsocketservice
13298  * @title: GThreadedSocketService
13299  * @short_description: A threaded GSocketService
13300  * @see_also: #GSocketService.
13301  *
13302  * A #GThreadedSocketService is a simple subclass of #GSocketService
13303  * that handles incoming connections by creating a worker thread and
13304  * dispatching the connection to it by emitting the
13305  * #GThreadedSocketService::run signal in the new thread.
13306  * The signal handler may perform blocking IO and need not return
13307  * until the connection is closed.
13308  * The service is implemented using a thread pool, so there is a
13309  * limited amount of threads available to serve incoming requests.
13310  * The service automatically stops the #GSocketService from accepting
13311  * new connections when all threads are busy.
13312  * As with #GSocketService, you may connect to #GThreadedSocketService::run,
13313  * or subclass and override the default handler.
13314  */
13315
13316
13317 /**
13318  * SECTION:gtimezonemonitor
13319  * @title: GTimeZoneMonitor
13320  * @short_description: Monitor the local timezone
13321  *
13322  * #GTimeZoneMonitor is a utility class to monitor the local timezone for
13323  * to that of a different locale).
13324  * You must use this class in order for your program to notice changes
13325  * to the local timezone.  It works by monitoring the /etc/localtime
13326  * file.  When the timezone is found to have changed,
13327  * g_time_zone_refresh_local() is called and the "changed" signal is
13328  * emitted on the #GTimeZoneMonitor (in that order).
13329  * Windows support is not presently working.
13330  *
13331  * Changes (ie: in response to the user manually changing the timezone
13332  */
13333
13334
13335 /**
13336  * SECTION:gtls
13337  * @title: TLS Overview
13338  * @short_description: TLS (aka SSL) support for GSocketConnection
13339  * @include: gio/gio.h
13340  *
13341  * #GTlsConnection and related classes provide TLS (Transport Layer
13342  * Security, previously known as SSL, Secure Sockets Layer) support for
13343  * gio-based network streams.
13344  * In the simplest case, for a client connection, you can just set the
13345  * #GSocketClient:tls flag on a #GSocketClient, and then any
13346  * connections created by that client will have TLS negotiated
13347  * automatically, using appropriate default settings, and rejecting
13348  * any invalid or self-signed certificates (unless you change that
13349  * default by setting the #GSocketClient:tls-validation-flags
13350  * property). The returned object will be a #GTcpWrapperConnection,
13351  * which wraps the underlying #GTlsClientConnection.
13352  * For greater control, you can create your own #GTlsClientConnection,
13353  * wrapping a #GSocketConnection (or an arbitrary #GIOStream with
13354  * pollable input and output streams) and then connect to its signals,
13355  * such as #GTlsConnection::accept-certificate, before starting the
13356  * handshake.
13357  * Server-side TLS is similar, using #GTlsServerConnection. At the
13358  * moment, there is no support for automatically wrapping server-side
13359  * connections in the way #GSocketClient does for client-side
13360  * connections.
13361  */
13362
13363
13364 /**
13365  * SECTION:gtlsbackend
13366  * @title: GTlsBackend
13367  * @short_description: TLS backend implementation
13368  * @include: gio/gio.h
13369  *
13370  *
13371  */
13372
13373
13374 /**
13375  * SECTION:gtlscertificate
13376  * @title: GTlsCertificate
13377  * @short_description: TLS certificate
13378  * @see_also: #GTlsConnection
13379  *
13380  * A certificate used for TLS authentication and encryption.
13381  * This can represent either a public key only (eg, the certificate
13382  * received by a client from a server), or the combination of
13383  * a public key and a private key (which is needed when acting as a
13384  * #GTlsServerConnection).
13385  *
13386  * Since: 2.28
13387  */
13388
13389
13390 /**
13391  * SECTION:gtlsclientconnection
13392  * @short_description: TLS client-side connection
13393  * @include: gio/gio.h
13394  *
13395  * #GTlsClientConnection is the client-side subclass of
13396  * #GTlsConnection, representing a client-side TLS connection.
13397  */
13398
13399
13400 /**
13401  * SECTION:gtlsconnection
13402  * @short_description: TLS connection type
13403  * @include: gio/gio.h
13404  *
13405  * #GTlsConnection is the base TLS connection class type, which wraps
13406  * a #GIOStream and provides TLS encryption on top of it. Its
13407  * subclasses, #GTlsClientConnection and #GTlsServerConnection,
13408  * implement client-side and server-side TLS, respectively.
13409  *
13410  * Since: 2.28
13411  */
13412
13413
13414 /**
13415  * SECTION:gtlsserverconnection
13416  * @short_description: TLS server-side connection
13417  * @include: gio/gio.h
13418  *
13419  * #GTlsServerConnection is the server-side subclass of #GTlsConnection,
13420  * representing a server-side TLS connection.
13421  *
13422  * Since: 2.28
13423  */
13424
13425
13426 /**
13427  * SECTION:gunixconnection
13428  * @title: GUnixConnection
13429  * @short_description: A UNIX domain GSocketConnection
13430  * @include: gio/gunixconnection.h
13431  * @see_also: #GSocketConnection.
13432  *
13433  * This is the subclass of #GSocketConnection that is created
13434  * for UNIX domain sockets.
13435  * It contains functions to do some of the UNIX socket specific
13436  * functionality like passing file descriptors.
13437  * Note that <filename>&lt;gio/gunixconnection.h&gt;</filename> belongs to
13438  * the UNIX-specific GIO interfaces, thus you have to use the
13439  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
13440  *
13441  * Since: 2.22
13442  */
13443
13444
13445 /**
13446  * SECTION:gunixcredentialsmessage
13447  * @title: GUnixCredentialsMessage
13448  * @short_description: A GSocketControlMessage containing credentials
13449  * @include: gio/gunixcredentialsmessage.h
13450  * @see_also: #GUnixConnection, #GSocketControlMessage
13451  *
13452  * This #GSocketControlMessage contains a #GCredentials instance.  It
13453  * may be sent using g_socket_send_message() and received using
13454  * %G_SOCKET_FAMILY_UNIX family).
13455  * For an easier way to send and receive credentials over
13456  * stream-oriented UNIX sockets, see
13457  * g_unix_connection_send_credentials() and
13458  * g_unix_connection_receive_credentials(). To receive credentials of
13459  * a foreign process connected to a socket, use
13460  * g_socket_get_credentials().
13461  *
13462  * G_socket_receive_message() over unix sockets (ie: sockets in the
13463  */
13464
13465
13466 /**
13467  * SECTION:gunixfdlist
13468  * @title: GUnixFDList
13469  * @short_description: An object containing a set of UNIX file descriptors
13470  * @include: gio/gunixfdlist.h
13471  * @see_also: #GUnixFDMessage
13472  *
13473  * A #GUnixFDList contains a list of file descriptors.  It owns the file
13474  * descriptors that it contains, closing them when finalized.
13475  * It may be wrapped in a #GUnixFDMessage and sent over a #GSocket in
13476  * the %G_SOCKET_ADDRESS_UNIX family by using g_socket_send_message()
13477  * and received using g_socket_receive_message().
13478  * Note that <filename>&lt;gio/gunixfdlist.h&gt;</filename> belongs to
13479  * the UNIX-specific GIO interfaces, thus you have to use the
13480  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
13481  */
13482
13483
13484 /**
13485  * SECTION:gunixfdmessage
13486  * @title: GUnixFDMessage
13487  * @short_description: A GSocketControlMessage containing a GUnixFDList
13488  * @include: gio/gunixfdmessage.h
13489  * @see_also: #GUnixConnection, #GUnixFDList, #GSocketControlMessage
13490  *
13491  * This #GSocketControlMessage contains a #GUnixFDList.
13492  * It may be sent using g_socket_send_message() and received using
13493  * %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied
13494  * between processes by the kernel.
13495  * For an easier way to send and receive file descriptors over
13496  * stream-oriented UNIX sockets, see g_unix_connection_send_fd() and
13497  * g_unix_connection_receive_fd().
13498  * Note that <filename>&lt;gio/gunixfdmessage.h&gt;</filename> belongs to
13499  * the UNIX-specific GIO interfaces, thus you have to use the
13500  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
13501  *
13502  * G_socket_receive_message() over unix sockets (ie: sockets in the
13503  */
13504
13505
13506 /**
13507  * SECTION:gunixinputstream
13508  * @short_description: Streaming input operations for UNIX file descriptors
13509  * @include: gio/gunixinputstream.h
13510  * @see_also: #GInputStream
13511  *
13512  * #GUnixInputStream implements #GInputStream for reading from a
13513  * UNIX file descriptor, including asynchronous operations. The file
13514  * descriptor must be selectable, so it doesn't work with opened files.
13515  * Note that <filename>&lt;gio/gunixinputstream.h&gt;</filename> belongs
13516  * to the UNIX-specific GIO interfaces, thus you have to use the
13517  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
13518  */
13519
13520
13521 /**
13522  * SECTION:gunixmounts
13523  * @include: gio/gunixmounts.h
13524  * @short_description: UNIX mounts
13525  *
13526  * Routines for managing mounted UNIX mount points and paths.
13527  * Note that <filename>&lt;gio/gunixmounts.h&gt;</filename> belongs to the
13528  * UNIX-specific GIO interfaces, thus you have to use the
13529  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
13530  */
13531
13532
13533 /**
13534  * SECTION:gunixoutputstream
13535  * @short_description: Streaming output operations for UNIX file descriptors
13536  * @include: gio/gunixoutputstream.h
13537  * @see_also: #GOutputStream
13538  *
13539  * #GUnixOutputStream implements #GOutputStream for writing to a
13540  * UNIX file descriptor, including asynchronous operations. The file
13541  * descriptor must be selectable, so it doesn't work with opened files.
13542  * Note that <filename>&lt;gio/gunixoutputstream.h&gt;</filename> belongs
13543  * to the UNIX-specific GIO interfaces, thus you have to use the
13544  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
13545  */
13546
13547
13548 /**
13549  * SECTION:gunixsocketaddress
13550  * @short_description: UNIX GSocketAddress
13551  * @include: gio/gunixsocketaddress.h
13552  *
13553  * Support for UNIX-domain (also known as local) sockets.
13554  * UNIX domain sockets are generally visible in the filesystem.
13555  * However, some systems support abstract socket names which are not
13556  * visible in the filesystem and not affected by the filesystem
13557  * permissions, visibility, etc. Currently this is only supported
13558  * under Linux. If you attempt to use abstract sockets on other
13559  * systems, function calls may return %G_IO_ERROR_NOT_SUPPORTED
13560  * errors. You can use g_unix_socket_address_abstract_names_supported()
13561  * to see if abstract names are supported.
13562  * Note that <filename>&lt;gio/gunixsocketaddress.h&gt;</filename> belongs to
13563  * the UNIX-specific GIO interfaces, thus you have to use the
13564  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
13565  */
13566
13567
13568 /**
13569  * SECTION:gvfs
13570  * @short_description: Virtual File System
13571  * @include: gio/gio.h
13572  *
13573  * Entry point for using GIO functionality.
13574  */
13575
13576
13577 /**
13578  * SECTION:gvolume
13579  * @short_description: Volume management
13580  * @include: gio/gio.h
13581  *
13582  * The #GVolume interface represents user-visible objects that can be
13583  * mounted. Note, when porting from GnomeVFS, #GVolume is the moral
13584  * equivalent of #GnomeVFSDrive.
13585  * Mounting a #GVolume instance is an asynchronous operation. For more
13586  * information about asynchronous operations, see #GAsyncReady and
13587  * #GSimpleAsyncReady. To mount a #GVolume, first call
13588  * g_volume_mount() with (at least) the #GVolume instance, optionally
13589  * a #GMountOperation object and a #GAsyncReadyCallback.
13590  * Typically, one will only want to pass %NULL for the
13591  * #GMountOperation if automounting all volumes when a desktop session
13592  * starts since it's not desirable to put up a lot of dialogs asking
13593  * for credentials.
13594  * The callback will be fired when the operation has resolved (either
13595  * with success or failure), and a #GAsyncReady structure will be
13596  * passed to the callback.  That callback should then call
13597  * g_volume_mount_finish() with the #GVolume instance and the
13598  * #GAsyncReady data to see if the operation was completed
13599  * successfully.  If an @error is present when g_volume_mount_finish()
13600  * is called, then it will be filled with any error information.
13601  * <para id="volume-identifier">
13602  * It is sometimes necessary to directly access the underlying
13603  * operating system object behind a volume (e.g. for passing a volume
13604  * to an application via the commandline). For this purpose, GIO
13605  * allows to obtain an 'identifier' for the volume. There can be
13606  * different kinds of identifiers, such as Hal UDIs, filesystem labels,
13607  * traditional Unix devices (e.g. <filename>/dev/sda2</filename>),
13608  * uuids. GIO uses predefind strings as names for the different kinds
13609  * #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. Use g_volume_get_identifier()
13610  * to obtain an identifier for a volume.
13611  * </para>
13612  * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available
13613  * when the gvfs hal volume monitor is in use. Other volume monitors
13614  * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
13615  * identifier, which can be used to obtain a hal device by means of
13616  * libhal_manger_find_device_string_match().
13617  *
13618  * Of identifiers: #G_VOLUME_IDENTIFIER_KIND_HAL_UDI,
13619  */
13620
13621
13622 /**
13623  * SECTION:gvolumemonitor
13624  * @short_description: Volume Monitor
13625  * @include: gio/gio.h
13626  * @see_also: #GFileMonitor
13627  *
13628  * #GVolumeMonitor is for listing the user interesting devices and volumes
13629  * on the computer. In other words, what a file selector or file manager
13630  * would show in a sidebar.
13631  * #GVolumeMonitor is not <link
13632  * linkend="g-main-context-push-thread-default">thread-default-context
13633  * aware</link>, and so should not be used other than from the main
13634  * thread, with no thread-default-context active.
13635  */
13636
13637
13638 /**
13639  * SECTION:gwin32inputstream
13640  * @short_description: Streaming input operations for Windows file handles
13641  * @include: gio/gwin32inputstream.h
13642  * @see_also: #GInputStream
13643  *
13644  * #GWin32InputStream implements #GInputStream for reading from a
13645  * Windows file handle.
13646  * Note that <filename>&lt;gio/gwin32inputstream.h&gt;</filename> belongs
13647  * to the Windows-specific GIO interfaces, thus you have to use the
13648  * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
13649  */
13650
13651
13652 /**
13653  * SECTION:gwin32outputstream
13654  * @short_description: Streaming output operations for Windows file handles
13655  * @include: gio/gwin32outputstream.h
13656  * @see_also: #GOutputStream
13657  *
13658  * #GWin32OutputStream implements #GOutputStream for writing to a
13659  * Windows file handle.
13660  * Note that <filename>&lt;gio/gwin32outputstream.h&gt;</filename> belongs
13661  * to the Windows-specific GIO interfaces, thus you have to use the
13662  * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
13663  */
13664
13665
13666 /**
13667  * SECTION:gzcompressor
13668  * @short_description: Zlib compressor
13669  * @include: gio/gio.h
13670  *
13671  * #GZlibCompressor is an implementation of #GConverter that
13672  * compresses data using zlib.
13673  */
13674
13675
13676 /**
13677  * SECTION:gzdecompressor
13678  * @short_description: Zlib decompressor
13679  * @include: gio/gio.h
13680  *
13681  * #GZlibDecompressor is an implementation of #GConverter that
13682  * decompresses data compressed with zlib.
13683  */
13684
13685
13686 /**
13687  * The string info map is an efficient data structure designed to be:
13688  *
13689  * used with a small set of items.  It is used by GSettings schemas for
13690  * three purposes:
13691  * 1) Implement <choices> with a list of valid strings
13692  * 2) Implement <alias> by mapping one string to another
13693  * 3) Implement enumerated types by mapping strings to integer values
13694  * (and back).
13695  * The map is made out of an array of uint32s.  Each entry in the array
13696  * is an integer value, followed by a specially formatted string value:
13697  * The string starts with the byte 0xff or 0xfe, followed by the
13698  * content of the string, followed by a nul byte, followed by
13699  * additional nul bytes for padding, followed by a 0xff byte.
13700  * Padding is added so that the entire formatted string takes up a
13701  * multiple of 4 bytes, and not less than 8 bytes.  The requirement
13702  * for a string to take up 8 bytes is so that the scanner doesn't lose
13703  * synch and mistake a string for an integer value.
13704  * The first byte of the formatted string depends on if the integer is
13705  * an enum value (0xff) or an alias (0xfe).  If it is an alias then the
13706  * number refers to the word offset within the info map at which the
13707  * integer corresponding to the "target" value is stored.
13708  * For example, consider the case of the string info map representing an
13709  * enumerated type of 'foo' (value 1) and 'bar' (value 2) and 'baz'
13710  * (alias for 'bar').  Note that string info maps are always little
13711  * endian.
13712  * x01 x00 x00 x00   xff 'f' 'o' 'o'   x00 x00 x00 xff   x02 x00 x00 x00
13713  * xff 'b' 'a' 'r'   x00 x00 x00 xff   x03 x00 x00 x00   xfe 'b' 'a' 'z'
13714  * x00 x00 x00 xff
13715  * The operations that someone may want to perform with the map:
13716  * - lookup if a string is valid (and not an alias)
13717  * - lookup the integer value for a enum 'nick'
13718  * - lookup the integer value for the target of an alias
13719  * - lookup an alias and convert it to its target string
13720  * - lookup the enum nick for a given value
13721  * In order to lookup if a string is valid, it is padded on either side
13722  * (as described) and scanned for in the array.  For example, you might
13723  * look for "foo":
13724  * xff 'f' 'o' 'o'   x00 x00 x00 xff
13725  * In order to lookup the integer value for a nick, the string is padded
13726  * on either side and scanned for in the array, as above.  Instead of
13727  * merely succeeding, we look at the integer value to the left of the
13728  * match.  This is the enum value.
13729  * In order to lookup an alias and convert it to its target enum value,
13730  * the string is padded on either side (as described, with 0xfe) and
13731  * scanned for.  For example, you might look for "baz":
13732  * xfe 'b' 'a' 'z'  x00 x00 x00 xff
13733  * The integer immediately preceeding the match then contains the offset
13734  * of the integer value of the target.  In our example, that's '3'.
13735  * This index is dereferenced to find the enum value of '2'.
13736  * To convert the alias to its target string, 5 bytes just need to be
13737  * added past the start of the integer value to find the start of the
13738  * string.
13739  * To lookup the enum nick for a given value, the value is searched for
13740  * in the array.  To ensure that the value isn't matching the inside of a
13741  * string, we must check that it is either the first item in the array or
13742  * immediately preceeded by the byte 0xff.  It must also be immediately
13743  * followed by the byte 0xff.
13744  * Because strings always take up a minimum of 2 words, because 0xff or
13745  * 0xfe never appear inside of a utf-8 string and because no two integer
13746  * values ever appear in sequence, the only way we can have the
13747  * sequence:
13748  * xff __ __ __ __ xff (or 0xfe)
13749  * is in the event of an integer nested between two strings.
13750  * For implementation simplicity/efficiency, strings may not be more
13751  * the value of each choice is set to zero and ignored.
13752  *
13753  * Than 65 characters in length (ie: 17 32bit words after padding).
13754  * In the event that we are doing <choices> (ie: not an enum type) then
13755  */
13756
13757
13758 /**
13759  * g_action_activate:
13760  * @action: a #GAction
13761  * @parameter: (allow-none): the parameter to the activation
13762  *
13763  * Activates the action.
13764  * the parameter type given at construction time).  If the parameter
13765  * type was %NULL then @parameter must also be %NULL.
13766  *
13767  * Since: 2.28
13768  */
13769
13770
13771 /**
13772  * g_action_get_enabled:
13773  * @action: a #GAction
13774  *
13775  * Checks if @action is currently enabled.
13776  * An action must be enabled in order to be activated or in order to
13777  * have its state changed from outside callers.
13778  *
13779  * Returns: whether the action is enabled
13780  * Since: 2.28
13781  */
13782
13783
13784 /**
13785  * g_action_get_name:
13786  * @action: a #GAction
13787  *
13788  * Queries the name of @action.
13789  *
13790  * Returns: the name of the action
13791  * Since: 2.28
13792  */
13793
13794
13795 /**
13796  * g_action_get_parameter_type:
13797  * @action: a #GAction
13798  *
13799  * Queries the type of the parameter that must be given when activating
13800  * When activating the action using g_action_activate(), the #GVariant
13801  * given to that function must be of the type returned by this function.
13802  * In the case that this function returns %NULL, you must not give any
13803  * #GVariant, but %NULL instead.
13804  *
13805  * Returns: (allow-none): the parameter type
13806  * Since: 2.28
13807  */
13808
13809
13810 /**
13811  * g_action_get_state:
13812  * @action: a #GAction
13813  *
13814  * Queries the current state of @action.
13815  * If the action is not stateful then %NULL will be returned.  If the
13816  * action is stateful then the type of the return value is the type
13817  * given by g_action_get_state_type().
13818  * The return value (if non-%NULL) should be freed with
13819  * g_variant_unref() when it is no longer required.
13820  *
13821  * Returns: (transfer full): the current state of the action
13822  * Since: 2.28
13823  */
13824
13825
13826 /**
13827  * g_action_get_state_hint:
13828  * @action: a #GAction
13829  *
13830  * Requests a hint about the valid range of values for the state of
13831  * If %NULL is returned it either means that the action is not stateful
13832  * or that there is no hint about the valid range of values for the
13833  * state of the action.
13834  * If a #GVariant array is returned then each item in the array is a
13835  * returned then the tuple specifies the inclusive lower and upper bound
13836  * of valid values for the state.
13837  * In any case, the information is merely a hint.  It may be possible to
13838  * have a state value outside of the hinted range and setting a value
13839  * within the range may fail.
13840  * The return value (if non-%NULL) should be freed with
13841  * g_variant_unref() when it is no longer required.
13842  *
13843  * Possible value for the state.  if a #gvariant pair (ie: two-tuple) is
13844  * Returns: (transfer full): the state range hint
13845  * Since: 2.28
13846  */
13847
13848
13849 /**
13850  * g_action_get_state_type:
13851  * @action: a #GAction
13852  *
13853  * Queries the type of the state of @action.
13854  * If the action is stateful (e.g. created with
13855  * g_simple_action_new_stateful()) then this function returns the
13856  * #GVariantType of the state.  This is the type of the initial value
13857  * given as the state. All calls to g_action_set_state() must give a
13858  * #GVariant of this type and g_action_get_state() will return a
13859  * #GVariant of the same type.
13860  * If the action is not stateful (e.g. created with g_simple_action_new())
13861  * then this function will return %NULL. In that case, g_action_get_state()
13862  * will return %NULL and you must not call g_action_set_state().
13863  *
13864  * Returns: (allow-none): the state type, if the action is stateful
13865  * Since: 2.28
13866  */
13867
13868
13869 /**
13870  * g_action_group_action_added:
13871  * @action_group: a #GActionGroup
13872  * @action_name: the name of an action in the group
13873  *
13874  * Emits the #GActionGroup::action-added signal on @action_group.
13875  * This function should only be called by #GActionGroup implementations.
13876  *
13877  * Since: 2.28
13878  */
13879
13880
13881 /**
13882  * g_action_group_action_enabled_changed:
13883  * @action_group: a #GActionGroup
13884  * @action_name: the name of an action in the group
13885  * @enabled: whether or not the action is now enabled
13886  *
13887  * Emits the #GActionGroup::action-enabled-changed signal on @action_group.
13888  * This function should only be called by #GActionGroup implementations.
13889  *
13890  * Since: 2.28
13891  */
13892
13893
13894 /**
13895  * g_action_group_action_removed:
13896  * @action_group: a #GActionGroup
13897  * @action_name: the name of an action in the group
13898  *
13899  * Emits the #GActionGroup::action-removed signal on @action_group.
13900  * This function should only be called by #GActionGroup implementations.
13901  *
13902  * Since: 2.28
13903  */
13904
13905
13906 /**
13907  * g_action_group_action_state_changed:
13908  * @action_group: a #GActionGroup
13909  * @action_name: the name of an action in the group
13910  * @state: the new state of the named action
13911  *
13912  * Emits the #GActionGroup::action-state-changed signal on @action_group.
13913  * This function should only be called by #GActionGroup implementations.
13914  *
13915  * Since: 2.28
13916  */
13917
13918
13919 /**
13920  * g_action_group_activate_action:
13921  * @action_group: a #GActionGroup
13922  * @action_name: the name of the action to activate
13923  * @parameter: (allow-none): parameters to the activation
13924  *
13925  * Activate the named action within @action_group.
13926  * If the action is expecting a parameter, then the correct type of
13927  * parameter must be given as @parameter.  If the action is expecting no
13928  * parameters then @parameter must be %NULL.  See
13929  * g_action_group_get_action_parameter_type().
13930  *
13931  * Since: 2.28
13932  */
13933
13934
13935 /**
13936  * g_action_group_change_action_state:
13937  * @action_group: a #GActionGroup
13938  * @action_name: the name of the action to request the change on
13939  * @value: the new state
13940  *
13941  * Request for the state of the named action within @action_group to be
13942  * changed to @value.
13943  * The action must be stateful and @value must be of the correct type.
13944  * See g_action_group_get_action_state_type().
13945  * This call merely requests a change.  The action may refuse to change
13946  * its state or may change its state to something other than @value.
13947  * See g_action_group_get_action_state_hint().
13948  * If the @value GVariant is floating, it is consumed.
13949  *
13950  * Since: 2.28
13951  */
13952
13953
13954 /**
13955  * g_action_group_get_action_enabled:
13956  * @action_group: a #GActionGroup
13957  * @action_name: the name of the action to query
13958  *
13959  * Checks if the named action within @action_group is currently enabled.
13960  * An action must be enabled in order to be activated or in order to
13961  * have its state changed from outside callers.
13962  *
13963  * Returns: whether or not the action is currently enabled
13964  * Since: 2.28
13965  */
13966
13967
13968 /**
13969  * g_action_group_get_action_parameter_type:
13970  * @action_group: a #GActionGroup
13971  * @action_name: the name of the action to query
13972  *
13973  * Queries the type of the parameter that must be given when activating
13974  * the named action within @action_group.
13975  * When activating the action using g_action_group_activate_action(),
13976  * the #GVariant given to that function must be of the type returned
13977  * by this function.
13978  * In the case that this function returns %NULL, you must not give any
13979  * #GVariant, but %NULL instead.
13980  * The parameter type of a particular action will never change but it is
13981  * possible for an action to be removed and for a new action to be added
13982  * with the same name but a different parameter type.
13983  *
13984  * Returns: the parameter type
13985  * Since: 2.28
13986  */
13987
13988
13989 /**
13990  * g_action_group_get_action_state:
13991  * @action_group: a #GActionGroup
13992  * @action_name: the name of the action to query
13993  *
13994  * Queries the current state of the named action within @action_group.
13995  * If the action is not stateful then %NULL will be returned.  If the
13996  * action is stateful then the type of the return value is the type
13997  * given by g_action_group_get_action_state_type().
13998  * The return value (if non-%NULL) should be freed with
13999  * g_variant_unref() when it is no longer required.
14000  *
14001  * Returns: (allow-none): the current state of the action
14002  * Since: 2.28
14003  */
14004
14005
14006 /**
14007  * g_action_group_get_action_state_hint:
14008  * @action_group: a #GActionGroup
14009  * @action_name: the name of the action to query
14010  *
14011  * Requests a hint about the valid range of values for the state of the
14012  * named action within @action_group.
14013  * If %NULL is returned it either means that the action is not stateful
14014  * or that there is no hint about the valid range of values for the
14015  * state of the action.
14016  * If a #GVariant array is returned then each item in the array is a
14017  * returned then the tuple specifies the inclusive lower and upper bound
14018  * of valid values for the state.
14019  * In any case, the information is merely a hint.  It may be possible to
14020  * have a state value outside of the hinted range and setting a value
14021  * within the range may fail.
14022  * The return value (if non-%NULL) should be freed with
14023  * g_variant_unref() when it is no longer required.
14024  *
14025  * Possible value for the state.  if a #gvariant pair (ie: two-tuple) is
14026  * Returns: (transfer full): the state range hint
14027  * Since: 2.28
14028  */
14029
14030
14031 /**
14032  * g_action_group_get_action_state_type:
14033  * @action_group: a #GActionGroup
14034  * @action_name: the name of the action to query
14035  *
14036  * Queries the type of the state of the named action within
14037  * If the action is stateful then this function returns the
14038  * #GVariantType of the state.  All calls to
14039  * g_action_group_change_action_state() must give a #GVariant of this
14040  * type and g_action_group_get_action_state() will return a #GVariant
14041  * of the same type.
14042  * If the action is not stateful then this function will return %NULL.
14043  * In that case, g_action_group_get_action_state() will return %NULL
14044  * and you must not call g_action_group_change_action_state().
14045  * The state type of a particular action will never change but it is
14046  * possible for an action to be removed and for a new action to be added
14047  * with the same name but a different state type.
14048  *
14049  * Returns: (transfer full): the state type, if the action is stateful
14050  * Since: 2.28
14051  */
14052
14053
14054 /**
14055  * g_action_group_has_action:
14056  * @action_group: a #GActionGroup
14057  * @action_name: the name of the action to check for
14058  *
14059  * Checks if the named action exists within @action_group.
14060  *
14061  * Returns: whether the named action exists
14062  * Since: 2.28
14063  */
14064
14065
14066 /**
14067  * g_action_group_list_actions:
14068  * @action_group: a #GActionGroup
14069  *
14070  * Lists the actions contained within @action_group.
14071  * The caller is responsible for freeing the list with g_strfreev() when
14072  * it is no longer required.
14073  * actions in the groupb
14074  *
14075  * Returns: (transfer full): a %NULL-terminated array of the names of the
14076  * Since: 2.28
14077  */
14078
14079
14080 /**
14081  * g_action_set_state:
14082  * @action: a #GAction
14083  * @value: the new state
14084  *
14085  * Request for the state of @action to be changed to @value.
14086  * The action must be stateful and @value must be of the correct type.
14087  * See g_action_get_state_type().
14088  * This call merely requests a change.  The action may refuse to change
14089  * its state or may change its state to something other than @value.
14090  * See g_action_get_state_hint().
14091  * If the @value GVariant is floating, it is consumed.
14092  *
14093  * Since: 2.28
14094  */
14095
14096
14097 /**
14098  * g_alloca:
14099  * @size: number of bytes to allocate.
14100  *
14101  * Allocates @size bytes on the stack; these bytes will be freed when the current
14102  * stack frame is cleaned up. This macro essentially just wraps the alloca()
14103  * function present on most UNIX variants.
14104  * Thus it provides the same advantages and pitfalls as alloca():
14105  * <variablelist>
14106  * <varlistentry><term></term><listitem><para>
14107  * + alloca() is very fast, as on most systems it's implemented by just adjusting
14108  * the stack pointer register.
14109  * </para></listitem></varlistentry>
14110  * <varlistentry><term></term><listitem><para>
14111  * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
14112  * blocks just build up and are released together at function end.
14113  * </para></listitem></varlistentry>
14114  * <varlistentry><term></term><listitem><para>
14115  * - Allocation sizes have to fit into the current stack frame. For instance in a
14116  * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
14117  * so be sparse with alloca() uses.
14118  * </para></listitem></varlistentry>
14119  * <varlistentry><term></term><listitem><para>
14120  * - Allocation failure due to insufficient stack space is not indicated with a %NULL
14121  * return like e.g. with malloc(). Instead, most systems probably handle it the same
14122  * way as out of stack space situations from infinite function recursion, i.e.
14123  * with a segmentation fault.
14124  * </para></listitem></varlistentry>
14125  * <varlistentry><term></term><listitem><para>
14126  * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
14127  * Stack space allocated with alloca() in the same scope as a variable sized array
14128  * will be freed together with the variable sized array upon exit of that scope, and
14129  * not upon exit of the enclosing function scope.
14130  * </para></listitem></varlistentry>
14131  * </variablelist>
14132  *
14133  * Returns: space for @size bytes, allocated on the stack
14134  */
14135
14136
14137 /**
14138  * g_app_info_add_supports_type:
14139  * @appinfo: a #GAppInfo.
14140  * @content_type: a string.
14141  * @error: a #GError.
14142  *
14143  * Adds a content type to the application information to indicate the
14144  * application is capable of opening files with the given content type.
14145  *
14146  * Returns: %TRUE on success, %FALSE on error.
14147  */
14148
14149
14150 /**
14151  * g_app_info_can_delete:
14152  * @appinfo: a #GAppInfo
14153  *
14154  * Obtains the information whether the #GAppInfo can be deleted.
14155  * See g_app_info_delete().
14156  *
14157  * Returns: %TRUE if @appinfo can be deleted
14158  * Since: 2.20
14159  */
14160
14161
14162 /**
14163  * g_app_info_can_remove_supports_type:
14164  * @appinfo: a #GAppInfo.
14165  *
14166  * Checks if a supported content type can be removed from an application.
14167  * content types from a given @appinfo, %FALSE if not.
14168  *
14169  * Returns: %TRUE if it is possible to remove supported
14170  */
14171
14172
14173 /**
14174  * g_app_info_create_from_commandline:
14175  * @commandline: the commandline to use
14176  * @application_name: (allow-none): the application name, or %NULL to use @commandline
14177  * @flags: flags that can specify details of the created #GAppInfo
14178  * @error: a #GError location to store the error occuring, %NULL to ignore.
14179  *
14180  * Creates a new #GAppInfo from the given information.
14181  *
14182  * Returns: (transfer full): new #GAppInfo for given command.
14183  */
14184
14185
14186 /**
14187  * g_app_info_delete:
14188  * @appinfo: a #GAppInfo
14189  *
14190  * Tries to delete a #GAppInfo.
14191  * On some platforms, there may be a difference between user-defined
14192  * #GAppInfo<!-- -->s which can be deleted, and system-wide ones which
14193  * cannot. See g_app_info_can_delete().
14194  *
14195  * Virtual: do_delete
14196  * Returns: %TRUE if @appinfo has been deleted
14197  * Since: 2.20
14198  */
14199
14200
14201 /**
14202  * g_app_info_dup:
14203  * @appinfo: a #GAppInfo.
14204  *
14205  * Creates a duplicate of a #GAppInfo.
14206  *
14207  * Returns: (transfer full): a duplicate of @appinfo.
14208  */
14209
14210
14211 /**
14212  * g_app_info_equal:
14213  * @appinfo1: the first #GAppInfo.
14214  * @appinfo2: the second #GAppInfo.
14215  *
14216  * Checks if two #GAppInfo<!-- -->s are equal.
14217  *
14218  * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.
14219  */
14220
14221
14222 /**
14223  * g_app_info_get_all:
14224  *
14225  * Gets a list of all of the applications currently registered
14226  * on this system.
14227  * For desktop files, this includes applications that have
14228  * <literal>NoDisplay=true</literal> set or are excluded from
14229  * display by means of <literal>OnlyShowIn</literal> or
14230  * <literal>NotShowIn</literal>. See g_app_info_should_show().
14231  * The returned list does not include applications which have
14232  * the <literal>Hidden</literal> key set.
14233  *
14234  * Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfo<!---->s.
14235  */
14236
14237
14238 /**
14239  * g_app_info_get_all_for_type:
14240  * @content_type: the content type to find a #GAppInfo for
14241  *
14242  * Gets a list of all #GAppInfos for a given content type.
14243  * for given @content_type or %NULL on error.
14244  *
14245  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
14246  */
14247
14248
14249 /**
14250  * g_app_info_get_commandline:
14251  * @appinfo: a #GAppInfo
14252  *
14253  * Gets the commandline with which the application will be
14254  * started.
14255  * or %NULL if this information is not available
14256  *
14257  * Returns: a string containing the @appinfo's commandline,
14258  * Since: 2.20
14259  */
14260
14261
14262 /**
14263  * g_app_info_get_default_for_type:
14264  * @content_type: the content type to find a #GAppInfo for
14265  * @must_support_uris: if %TRUE, the #GAppInfo is expected to support URIs
14266  *
14267  * Gets the #GAppInfo that corresponds to a given content type.
14268  * %NULL on error.
14269  *
14270  * Returns: (transfer full): #GAppInfo for given @content_type or
14271  */
14272
14273
14274 /**
14275  * g_app_info_get_default_for_uri_scheme:
14276  * @uri_scheme: a string containing a URI scheme.
14277  *
14278  * Gets the default application for launching applications
14279  * using this URI scheme. A URI scheme is the initial part
14280  * of the URI, up to but not including the ':', e.g. "http",
14281  * "ftp" or "sip".
14282  *
14283  * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
14284  */
14285
14286
14287 /**
14288  * g_app_info_get_description:
14289  * @appinfo: a #GAppInfo.
14290  *
14291  * Gets a human-readable description of an installed application.
14292  * application @appinfo, or %NULL if none.
14293  *
14294  * Returns: a string containing a description of the
14295  */
14296
14297
14298 /**
14299  * g_app_info_get_display_name:
14300  * @appinfo: a #GAppInfo.
14301  *
14302  * Gets the display name of the application. The display name is often more
14303  * descriptive to the user than the name itself.
14304  * no display name is available.
14305  *
14306  * Returns: the display name of the application for @appinfo, or the name if
14307  * Since: 2.24
14308  */
14309
14310
14311 /**
14312  * g_app_info_get_executable:
14313  * @appinfo: a #GAppInfo
14314  *
14315  * Gets the executable's name for the installed application.
14316  * binaries name
14317  *
14318  * Returns: a string containing the @appinfo's application
14319  */
14320
14321
14322 /**
14323  * g_app_info_get_fallback_for_type:
14324  * @content_type: the content type to find a #GAppInfo for
14325  *
14326  * Gets a list of fallback #GAppInfos for a given content type, i.e.
14327  * those applications which claim to support the given content type
14328  * by MIME type subclassing and not directly.
14329  * for given @content_type or %NULL on error.
14330  *
14331  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
14332  * Since: 2.28
14333  */
14334
14335
14336 /**
14337  * g_app_info_get_icon:
14338  * @appinfo: a #GAppInfo.
14339  *
14340  * Gets the icon for the application.
14341  *
14342  * Returns: (transfer none): the default #GIcon for @appinfo.
14343  */
14344
14345
14346 /**
14347  * g_app_info_get_id:
14348  * @appinfo: a #GAppInfo.
14349  *
14350  * Gets the ID of an application. An id is a string that
14351  * identifies the application. The exact format of the id is
14352  * platform dependent. For instance, on Unix this is the
14353  * desktop file id from the xdg menu specification.
14354  * Note that the returned ID may be %NULL, depending on how
14355  * the @appinfo has been constructed.
14356  *
14357  * Returns: a string containing the application's ID.
14358  */
14359
14360
14361 /**
14362  * g_app_info_get_name:
14363  * @appinfo: a #GAppInfo.
14364  *
14365  * Gets the installed name of the application.
14366  *
14367  * Returns: the name of the application for @appinfo.
14368  */
14369
14370
14371 /**
14372  * g_app_info_get_recommended_for_type:
14373  * @content_type: the content type to find a #GAppInfo for
14374  *
14375  * Gets a list of recommended #GAppInfos for a given content type, i.e.
14376  * those applications which claim to support the given content type exactly,
14377  * and not by MIME type subclassing.
14378  * Note that the first application of the list is the last used one, i.e.
14379  * the last one for which #g_app_info_set_as_last_used_for_type has been
14380  * called.
14381  * for given @content_type or %NULL on error.
14382  *
14383  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
14384  * Since: 2.28
14385  */
14386
14387
14388 /**
14389  * g_app_info_launch:
14390  * @appinfo: a #GAppInfo
14391  * @files: (element-type GFile): a #GList of #GFile objects
14392  * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
14393  * @error: a #GError
14394  *
14395  * Launches the application. Passes @files to the launched application
14396  * as arguments, using the optional @launch_context to get information
14397  * about the details of the launcher (like what screen it is on).
14398  * On error, @error will be set accordingly.
14399  * To launch the application without arguments pass a %NULL @files list.
14400  * Note that even if the launch is successful the application launched
14401  * can fail to start if it runs into problems during startup. There is
14402  * no way to detect this.
14403  * Some URIs can be changed when passed through a GFile (for instance
14404  * unsupported uris with strange formats like mailto:), so if you have
14405  * a textual uri you want to pass in as argument, consider using
14406  * g_app_info_launch_uris() instead.
14407  * On UNIX, this function sets the <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>
14408  * environment variable with the path of the launched desktop file and
14409  * <envar>GIO_LAUNCHED_DESKTOP_FILE_PID</envar> to the process
14410  * id of the launched process. This can be used to ignore
14411  * <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>, should it be inherited
14412  * by further processes. The <envar>DISPLAY</envar> and
14413  * <envar>DESKTOP_STARTUP_ID</envar> environment variables are also
14414  * set, based on information provided in @launch_context.
14415  *
14416  * Returns: %TRUE on successful launch, %FALSE otherwise.
14417  */
14418
14419
14420 /**
14421  * g_app_info_launch_default_for_uri:
14422  * @uri: the uri to show
14423  * @launch_context: (allow-none): an optional #GAppLaunchContext.
14424  * @error: a #GError.
14425  *
14426  * Utility function that launches the default application
14427  * registered to handle the specified uri. Synchronous I/O
14428  * is done on the uri to detect the type of the file if
14429  * required.
14430  *
14431  * Returns: %TRUE on success, %FALSE on error.
14432  */
14433
14434
14435 /**
14436  * g_app_info_launch_uris:
14437  * @appinfo: a #GAppInfo
14438  * @uris: (element-type utf8): a #GList containing URIs to launch.
14439  * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
14440  * @error: a #GError
14441  *
14442  * Launches the application. Passes @uris to the launched application
14443  * as arguments, using the optional @launch_context to get information
14444  * about the details of the launcher (like what screen it is on).
14445  * On error, @error will be set accordingly.
14446  * To lauch the application without arguments pass a %NULL @uris list.
14447  * Note that even if the launch is successful the application launched
14448  * can fail to start if it runs into problems during startup. There is
14449  * no way to detect this.
14450  *
14451  * Returns: %TRUE on successful launch, %FALSE otherwise.
14452  */
14453
14454
14455 /**
14456  * g_app_info_remove_supports_type:
14457  * @appinfo: a #GAppInfo.
14458  * @content_type: a string.
14459  * @error: a #GError.
14460  *
14461  * Removes a supported type from an application, if possible.
14462  *
14463  * Returns: %TRUE on success, %FALSE on error.
14464  */
14465
14466
14467 /**
14468  * g_app_info_reset_type_associations:
14469  * @content_type: a content type
14470  *
14471  * Removes all changes to the type associations done by
14472  * g_app_info_set_as_default_for_type(),
14473  * g_app_info_set_as_default_for_extension(),
14474  * g_app_info_add_supports_type() or g_app_info_remove_supports_type().
14475  *
14476  * Since: 2.20
14477  */
14478
14479
14480 /**
14481  * g_app_info_set_as_default_for_extension:
14482  * @appinfo: a #GAppInfo.
14483  * @extension: a string containing the file extension (without the dot).
14484  * @error: a #GError.
14485  *
14486  * Sets the application as the default handler for the given file extension.
14487  *
14488  * Returns: %TRUE on success, %FALSE on error.
14489  */
14490
14491
14492 /**
14493  * g_app_info_set_as_default_for_type:
14494  * @appinfo: a #GAppInfo.
14495  * @content_type: the content type.
14496  * @error: a #GError.
14497  *
14498  * Sets the application as the default handler for a given type.
14499  *
14500  * Returns: %TRUE on success, %FALSE on error.
14501  */
14502
14503
14504 /**
14505  * g_app_info_set_as_last_used_for_type:
14506  * @appinfo: a #GAppInfo.
14507  * @content_type: the content type.
14508  * @error: a #GError.
14509  *
14510  * Sets the application as the last used application for a given type.
14511  * This will make the application appear as first in the list returned
14512  * by g_app_info_get_recommended_for_type(), regardless of the default
14513  * application for that content type.
14514  *
14515  * Returns: %TRUE on success, %FALSE on error.
14516  */
14517
14518
14519 /**
14520  * g_app_info_should_show:
14521  * @appinfo: a #GAppInfo.
14522  *
14523  * Checks if the application info should be shown in menus that
14524  * list available applications.
14525  *
14526  * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise.
14527  */
14528
14529
14530 /**
14531  * g_app_info_supports_files:
14532  * @appinfo: a #GAppInfo.
14533  *
14534  * Checks if the application accepts files as arguments.
14535  *
14536  * Returns: %TRUE if the @appinfo supports files.
14537  */
14538
14539
14540 /**
14541  * g_app_info_supports_uris:
14542  * @appinfo: a #GAppInfo.
14543  *
14544  * Checks if the application supports reading files and directories from URIs.
14545  *
14546  * Returns: %TRUE if the @appinfo supports URIs.
14547  */
14548
14549
14550 /**
14551  * g_app_launch_context_get_display:
14552  * @context: a #GAppLaunchContext
14553  * @info: a #GAppInfo
14554  * @files: (element-type GFile): a #GList of #GFile objects
14555  *
14556  * Gets the display string for the @context. This is used to ensure new
14557  * applications are started on the same display as the launching
14558  * application, by setting the <envar>DISPLAY</envar> environment variable.
14559  *
14560  * Returns: a display string for the display.
14561  */
14562
14563
14564 /**
14565  * g_app_launch_context_get_startup_notify_id:
14566  * @context: a #GAppLaunchContext
14567  * @info: a #GAppInfo
14568  * @files: (element-type GFile): a #GList of of #GFile objects
14569  *
14570  * Initiates startup notification for the application and returns the
14571  * <envar>DESKTOP_STARTUP_ID</envar> for the launched operation,
14572  * if supported.
14573  * Startup notification IDs are defined in the <ulink
14574  * url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">
14575  * FreeDesktop.Org Startup Notifications standard</ulink>.
14576  * not supported.
14577  *
14578  * Returns: a startup notification ID for the application, or %NULL if
14579  */
14580
14581
14582 /**
14583  * g_app_launch_context_launch_failed:
14584  * @context: a #GAppLaunchContext.
14585  * @startup_notify_id: the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
14586  *
14587  * Called when an application has failed to launch, so that it can cancel
14588  * the application startup notification started in g_app_launch_context_get_startup_notify_id().
14589  */
14590
14591
14592 /**
14593  * g_app_launch_context_new:
14594  *
14595  * Creates a new application launch context. This is not normally used,
14596  * instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
14597  *
14598  * Returns: a #GAppLaunchContext.
14599  */
14600
14601
14602 /**
14603  * g_application_activate:
14604  * @application: a #GApplication
14605  *
14606  * Activates the application.
14607  * In essence, this results in the #GApplication::activate() signal being
14608  * emitted in the primary instance.
14609  * The application must be registered before calling this function.
14610  *
14611  * Since: 2.28
14612  */
14613
14614
14615 /**
14616  * g_application_command_line_get_arguments:
14617  * @cmdline: a #GApplicationCommandLine
14618  * @argc: (out): the length of the arguments array, or %NULL
14619  *
14620  * Gets the list of arguments that was passed on the command line.
14621  * The strings in the array may contain non-utf8 data.
14622  * The return value is %NULL-terminated and should be freed using
14623  * g_strfreev().
14624  * containing the arguments (the argv)
14625  *
14626  * Returns: (array length=argc) (transfer full): the string array
14627  * Since: 2.28
14628  */
14629
14630
14631 /**
14632  * g_application_command_line_get_cwd:
14633  * @cmdline: a #GApplicationCommandLine
14634  *
14635  * Gets the working directory of the command line invocation.
14636  * The string may contain non-utf8 data.
14637  * It is possible that the remote application did not send a working
14638  * directory, so this may be %NULL.
14639  * The return value should not be modified or freed and is valid for as
14640  * long as @cmdline exists.
14641  *
14642  * Returns: the current directory, or %NULL
14643  * Since: 2.28
14644  */
14645
14646
14647 /**
14648  * g_application_command_line_get_environ:
14649  * @cmdline: a #GApplicationCommandLine
14650  *
14651  * Gets the contents of the 'environ' variable of the command line
14652  * invocation, as would be returned by g_get_environ(), ie as a
14653  * %NULL-terminated list of strings in the form 'NAME=VALUE'.
14654  * The strings may contain non-utf8 data.
14655  * The remote application usually does not send an environment.  Use
14656  * %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
14657  * set it is possible that the environment is still not available (due
14658  * to invocation messages from other applications).
14659  * The return value should not be modified or freed and is valid for as
14660  * long as @cmdline exists.
14661  * See g_application_command_line_getenv() if you are only interested
14662  * in the value of a single environment variable.
14663  * strings, or %NULL if they were not sent
14664  *
14665  * Returns: (array zero-terminated=1) (transfer none): the environment
14666  * Since: 2.28
14667  */
14668
14669
14670 /**
14671  * g_application_command_line_get_exit_status:
14672  * @cmdline: a #GApplicationCommandLine
14673  *
14674  * Gets the exit status of @cmdline.  See
14675  * g_application_command_line_set_exit_status() for more information.
14676  *
14677  * Returns: the exit status
14678  * Since: 2.28
14679  */
14680
14681
14682 /**
14683  * g_application_command_line_get_is_remote:
14684  * @cmdline: a #GApplicationCommandLine
14685  *
14686  * Determines if @cmdline represents a remote invocation.
14687  *
14688  * Returns: %TRUE if the invocation was remote
14689  * Since: 2.28
14690  */
14691
14692
14693 /**
14694  * g_application_command_line_get_platform_data:
14695  * @cmdline: #GApplicationCommandLine
14696  *
14697  * Gets the platform data associated with the invocation of @cmdline.
14698  * This is a #GVariant dictionary containing information about the
14699  * context in which the invocation occured.  It typically contains
14700  * information like the current working directory and the startup
14701  * notification ID.
14702  * For local invocation, it will be %NULL.
14703  *
14704  * Returns: the platform data, or %NULL
14705  * Since: 2.28
14706  */
14707
14708
14709 /**
14710  * g_application_command_line_getenv:
14711  * @cmdline: a #GApplicationCommandLine
14712  * @name: the environment variable to get
14713  *
14714  * Gets the value of a particular environment variable of the command
14715  * line invocation, as would be returned by g_getenv().  The strings may
14716  * contain non-utf8 data.
14717  * The remote application usually does not send an environment.  Use
14718  * %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
14719  * set it is possible that the environment is still not available (due
14720  * to invocation messages from other applications).
14721  * The return value should not be modified or freed and is valid for as
14722  * long as @cmdline exists.
14723  *
14724  * Returns: the value of the variable, or %NULL if unset or unsent
14725  * Since: 2.28
14726  */
14727
14728
14729 /**
14730  * g_application_command_line_print:
14731  * @cmdline: a #GApplicationCommandLine
14732  * @format: a printf-style format string
14733  * @...: arguments, as per @format
14734  *
14735  * Formats a message and prints it using the stdout print handler in the
14736  * invoking process.
14737  * If @cmdline is a local invocation then this is exactly equivalent to
14738  * g_print().  If @cmdline is remote then this is equivalent to calling
14739  * g_print() in the invoking process.
14740  *
14741  * Since: 2.28
14742  */
14743
14744
14745 /**
14746  * g_application_command_line_printerr:
14747  * @cmdline: a #GApplicationCommandLine
14748  * @format: a printf-style format string
14749  * @...: arguments, as per @format
14750  *
14751  * Formats a message and prints it using the stderr print handler in the
14752  * invoking process.
14753  * If @cmdline is a local invocation then this is exactly equivalent to
14754  * g_printerr().  If @cmdline is remote then this is equivalent to
14755  * calling g_printerr() in the invoking process.
14756  *
14757  * Since: 2.28
14758  */
14759
14760
14761 /**
14762  * g_application_command_line_set_exit_status:
14763  * @cmdline: a #GApplicationCommandLine
14764  * @exit_status: the exit status
14765  *
14766  * Sets the exit status that will be used when the invoking process
14767  * exits.
14768  * The return value of the #GApplication::command-line signal is
14769  * passed to this function when the handler returns.  This is the usual
14770  * way of setting the exit status.
14771  * In the event that you want the remote invocation to continue running
14772  * and want to decide on the exit status in the future, you can use this
14773  * call.  For the case of a remote invocation, the remote process will
14774  * typically exit when the last reference is dropped on @cmdline.  The
14775  * exit status of the remote process will be equal to the last value
14776  * that was set with this function.
14777  * In the case that the commandline invocation is local, the situation
14778  * is slightly more complicated.  If the commandline invocation results
14779  * increased to a non-zero value) then the application is considered to
14780  * have been 'successful' in a certain sense, and the exit status is
14781  * always zero.  If the application use count is zero, though, the exit
14782  * status of the local #GApplicationCommandLine is used.
14783  *
14784  * In the mainloop running (ie: because the use-count of the application
14785  * Since: 2.28
14786  */
14787
14788
14789 /**
14790  * g_application_get_application_id:
14791  * @application: a #GApplication
14792  * @returns: the identifier for @application, owned by @application
14793  *
14794  * Gets the unique identifier for @application.
14795  *
14796  * Since: 2.28
14797  */
14798
14799
14800 /**
14801  * g_application_get_flags:
14802  * @application: a #GApplication
14803  * @returns: the flags for @application
14804  *
14805  * Gets the flags for @application.
14806  * See #GApplicationFlags.
14807  *
14808  * Since: 2.28
14809  */
14810
14811
14812 /**
14813  * g_application_get_inactivity_timeout:
14814  * @application: a #GApplication
14815  *
14816  * Gets the current inactivity timeout for the application.
14817  * This is the amount of time (in milliseconds) after the last call to
14818  * g_application_release() before the application stops running.
14819  *
14820  * Returns: the timeout, in milliseconds
14821  * Since: 2.28
14822  */
14823
14824
14825 /**
14826  * g_application_get_is_registered:
14827  * @application: a #GApplication
14828  * @returns: %TRUE if @application is registered
14829  *
14830  * Checks if @application is registered.
14831  * An application is registered if g_application_register() has been
14832  * successfully called.
14833  *
14834  * Since: 2.28
14835  */
14836
14837
14838 /**
14839  * g_application_get_is_remote:
14840  * @application: a #GApplication
14841  * @returns: %TRUE if @application is remote
14842  *
14843  * Checks if @application is remote.
14844  * If @application is remote then it means that another instance of
14845  * application already exists (the 'primary' instance).  Calls to
14846  * perform actions on @application will result in the actions being
14847  * performed by the primary instance.
14848  * The value of this property cannot be accessed before
14849  * g_application_register() has been called.  See
14850  * g_application_get_is_registered().
14851  *
14852  * Since: 2.28
14853  */
14854
14855
14856 /**
14857  * g_application_hold:
14858  * @application: a #GApplication
14859  *
14860  * Increases the use count of @application.
14861  * Use this function to indicate that the application has a reason to
14862  * continue to run.  For example, g_application_hold() is called by GTK+
14863  * when a toplevel window is on the screen.
14864  * To cancel the hold, call g_application_release().
14865  */
14866
14867
14868 /**
14869  * g_application_id_is_valid:
14870  * @application_id: a potential application identifier
14871  * @returns: %TRUE if @application_id is valid
14872  *
14873  * Checks if @application_id is a valid application identifier.
14874  * A valid ID is required for calls to g_application_new() and
14875  * g_application_set_application_id().
14876  * For convenience, the restrictions on application identifiers are
14877  * reproduced here:
14878  * <itemizedlist>
14879  * <listitem>Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-." and must not begin with a digit.</listitem>
14880  * <listitem>Application identifiers must contain at least one '.' (period) character (and thus at least three elements).</listitem>
14881  * <listitem>Application identifiers must not begin or end with a '.' (period) character.</listitem>
14882  * <listitem>Application identifiers must not contain consecutive '.' (period) characters.</listitem>
14883  * <listitem>Application identifiers must not exceed 255 characters.</listitem>
14884  * </itemizedlist>
14885  */
14886
14887
14888 /**
14889  * g_application_new:
14890  * @application_id: the application id
14891  * @flags: the application flags
14892  * @returns: a new #GApplication instance
14893  *
14894  * Creates a new #GApplication instance.
14895  * This function calls g_type_init() for you.
14896  * The application id must be valid.  See g_application_id_is_valid().
14897  */
14898
14899
14900 /**
14901  * g_application_open:
14902  * @application: a #GApplication
14903  * @files: (array length=n_files): an array of #GFiles to open
14904  * @n_files: the length of the @files array
14905  * @hint: a hint (or ""), but never %NULL
14906  *
14907  * Opens the given files.
14908  * In essence, this results in the #GApplication::open signal being emitted
14909  * in the primary instance.
14910  * intended to be used by applications that have multiple modes for
14911  * for this functionality, you should use "".
14912  * The application must be registered before calling this function
14913  * and it must have the %G_APPLICATION_HANDLES_OPEN flag set.
14914  *
14915  * Opening files (eg: "view" vs "edit", etc).  Unless you have a need
14916  * Since: 2.28
14917  */
14918
14919
14920 /**
14921  * g_application_register:
14922  * @application: a #GApplication
14923  * @cancellable: a #GCancellable, or %NULL
14924  * @error: a pointer to a NULL #GError, or %NULL
14925  * @returns: %TRUE if registration succeeded
14926  *
14927  * Attempts registration of the application.
14928  * This is the point at which the application discovers if it is the
14929  * primary instance or merely acting as a remote for an already-existing
14930  * primary instance.  This is implemented by attempting to acquire the
14931  * application identifier as a unique bus name on the session bus using
14932  * GDBus.
14933  * Due to the internal architecture of GDBus, method calls can be
14934  * dispatched at any time (even if a main loop is not running).  For
14935  * this reason, you must ensure that any object paths that you wish to
14936  * register are registered before calling this function.
14937  * If the application has already been registered then %TRUE is
14938  * returned with no work performed.
14939  * The #GApplication::startup signal is emitted if registration succeeds
14940  * and @application is the primary instance.
14941  * In the event of an error (such as @cancellable being cancelled, or a
14942  * failure to connect to the session bus), %FALSE is returned and @error
14943  * is set appropriately.
14944  * instance is or is not the primary instance of the application.  See
14945  * g_application_get_is_remote() for that.
14946  *
14947  * Note: the return value of this function is not an indicator that this
14948  * Since: 2.28
14949  */
14950
14951
14952 /**
14953  * g_application_release:
14954  * @application: a #GApplication
14955  *
14956  * Decrease the use count of @application.
14957  * When the use count reaches zero, the application will stop running.
14958  * Never call this function except to cancel the effect of a previous
14959  * call to g_application_hold().
14960  */
14961
14962
14963 /**
14964  * g_application_run:
14965  * @application: a #GApplication
14966  * @argc: the argc from main() (or 0 if @argv is %NULL)
14967  * @argv: (array length=argc) (allow-none): the argv from main(), or %NULL
14968  * @returns: the exit status
14969  *
14970  * Runs the application.
14971  * This function is intended to be run from main() and its return value
14972  * is intended to be returned by main(). Although you are expected to pass
14973  * the @argc, @argv parameters from main() to this function, it is possible
14974  * to pass %NULL if @argv is not available or commandline handling is not
14975  * required.
14976  * First, the local_command_line() virtual function is invoked.
14977  * This function always runs on the local instance. It gets passed a pointer
14978  * to a %NULL-terminated copy of @argv and is expected to remove the arguments
14979  * that it handled (shifting up remaining arguments). See
14980  * <xref linkend="gapplication-example-cmdline2"/> for an example of
14981  * parsing @argv manually. Alternatively, you may use the #GOptionContext API,
14982  * after setting <literal>argc = g_strv_length (argv);</literal>.
14983  * The last argument to local_command_line() is a pointer to the @status
14984  * variable which can used to set the exit status that is returned from
14985  * g_application_run().
14986  * If local_command_line() returns %TRUE, the command line is expected
14987  * to be completely handled, including possibly registering as the primary
14988  * instance, calling g_application_activate() or g_application_open(), etc.
14989  * If local_command_line() returns %FALSE then the application is registered
14990  * and the #GApplication::command-line signal is emitted in the primary
14991  * instance (which may or may not be this instance). The signal handler
14992  * gets passed a #GApplicationCommandline object that (among other things)
14993  * contains the remaining commandline arguments that have not been handled
14994  * by local_command_line().
14995  * If the application has the %G_APPLICATION_HANDLES_COMMAND_LINE
14996  * flag set then the default implementation of local_command_line()
14997  * always returns %FALSE immediately, resulting in the commandline
14998  * always being handled in the primary instance.
14999  * Otherwise, the default implementation of local_command_line() tries
15000  * to do a couple of things that are probably reasonable for most
15001  * applications.  First, g_application_register() is called to attempt
15002  * to register the application.  If that works, then the command line
15003  * arguments are inspected.  If no commandline arguments are given, then
15004  * g_application_activate() is called.  If commandline arguments are
15005  * given and the %G_APPLICATION_HANDLES_OPEN flag is set then they
15006  * are assumed to be filenames and g_application_open() is called.
15007  * If you need to handle commandline arguments that are not filenames,
15008  * and you don't mind commandline handling to happen in the primary
15009  * instance, you should set %G_APPLICATION_HANDLED_COMMAND_LINE and
15010  * process the commandline arguments in your #GApplication::command-line
15011  * signal handler, either manually or using the #GOptionContext API.
15012  * If you are interested in doing more complicated local handling of the
15013  * commandline then you should implement your own #GApplication subclass
15014  * and override local_command_line(). In this case, you most likely want
15015  * to return %TRUE from your local_command_line() implementation to
15016  * suppress the default handling. See
15017  * <xref linkend="gapplication-example-cmdline2"/> for an example.
15018  * If, after the above is done, the use count of the application is zero
15019  * then the exit status is returned immediately.  If the use count is
15020  * non-zero then the mainloop is run until the use count falls to zero,
15021  * at which point 0 is returned.
15022  * If the %G_APPLICATION_IS_SERVICE flag is set, then the exiting at
15023  * around to provide its <emphasis>service</emphasis> to others).
15024  *
15025  * Use count of zero is delayed for a while (ie: the instance stays
15026  * Since: 2.28
15027  */
15028
15029
15030 /**
15031  * g_application_set_action_group:
15032  * @application: a #GApplication
15033  * @action_group: (allow-none): a #GActionGroup, or %NULL
15034  *
15035  * Sets or unsets the group of actions associated with the application.
15036  * These actions are the actions that can be remotely invoked.
15037  * It is an error to call this function after the application has been
15038  * registered.
15039  *
15040  * Since: 2.28
15041  */
15042
15043
15044 /**
15045  * g_application_set_application_id:
15046  * @application: a #GApplication
15047  * @application_id: the identifier for @application
15048  *
15049  * Sets the unique identifier for @application.
15050  * The application id can only be modified if @application has not yet
15051  * been registered.
15052  * The application id must be valid.  See g_application_id_is_valid().
15053  *
15054  * Since: 2.28
15055  */
15056
15057
15058 /**
15059  * g_application_set_flags:
15060  * @application: a #GApplication
15061  * @flags: the flags for @application
15062  *
15063  * Sets the flags for @application.
15064  * The flags can only be modified if @application has not yet been
15065  * registered.
15066  * See #GApplicationFlags.
15067  *
15068  * Since: 2.28
15069  */
15070
15071
15072 /**
15073  * g_application_set_inactivity_timeout:
15074  * @application: a #GApplication
15075  * @inactivity_timeout: the timeout, in milliseconds
15076  *
15077  * Sets the current inactivity timeout for the application.
15078  * This is the amount of time (in milliseconds) after the last call to
15079  * g_application_release() before the application stops running.
15080  * This call has no side effects of its own.  The value set here is only
15081  * used for next time g_application_release() drops the use count to
15082  * zero.  Any timeouts currently in progress are not impacted.
15083  *
15084  * Returns: the timeout, in milliseconds
15085  * Since: 2.28
15086  */
15087
15088
15089 /**
15090  * g_async_initable_init_async:
15091  * @initable: a #GAsyncInitable.
15092  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
15093  * @cancellable: optional #GCancellable object, %NULL to ignore.
15094  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
15095  * @user_data: the data to pass to callback function
15096  *
15097  * Starts asynchronous initialization of the object implementing the
15098  * interface. This must be done before any real use of the object after
15099  * initial construction. If the object also implements #GInitable you can
15100  * optionally call g_initable_init() instead.
15101  * When the initialization is finished, @callback will be called. You can
15102  * then call g_async_initable_init_finish() to get the result of the
15103  * initialization.
15104  * Implementations may also support cancellation. If @cancellable is not
15105  * %NULL, then initialization can be cancelled by triggering the cancellable
15106  * object from another thread. If the operation was cancelled, the error
15107  * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
15108  * the object doesn't support cancellable initialization, the error
15109  * %G_IO_ERROR_NOT_SUPPORTED will be returned.
15110  * If this function is not called, or returns with an error, then all
15111  * operations on the object should fail, generally returning the
15112  * error %G_IO_ERROR_NOT_INITIALIZED.
15113  * to this function with the same argument should return the same results.
15114  * Only the first call initializes the object; further calls return the result
15115  * of the first call. This is so that it's safe to implement the singleton
15116  * pattern in the GObject constructor function.
15117  * For classes that also support the #GInitable interface, the default
15118  * implementation of this method will run the g_initable_init() function
15119  * in a thread, so if you want to support asynchronous initialization via
15120  * threads, just implement the #GAsyncInitable interface without overriding
15121  * any interface methods.
15122  *
15123  * Implementations of this method must be idempotent: i.e. multiple calls
15124  * Since: 2.22
15125  */
15126
15127
15128 /**
15129  * g_async_initable_init_finish:
15130  * @initable: a #GAsyncInitable.
15131  * @res: a #GAsyncResult.
15132  * @error: a #GError location to store the error occuring, or %NULL to ignore.
15133  *
15134  * Finishes asynchronous initialization and returns the result.
15135  * See g_async_initable_init_async().
15136  * will return %FALSE and set @error appropriately if present.
15137  *
15138  * Returns: %TRUE if successful. If an error has occurred, this function
15139  * Since: 2.22
15140  */
15141
15142
15143 /**
15144  * g_async_initable_new_async:
15145  * @object_type: a #GType supporting #GAsyncInitable.
15146  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
15147  * @cancellable: optional #GCancellable object, %NULL to ignore.
15148  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
15149  * @user_data: the data to pass to callback function
15150  * @first_property_name: the name of the first property, or %NULL if no properties
15151  * @...: the value of the first property, followed by other property value pairs, and ended by %NULL.
15152  *
15153  * Helper function for constructing #GAsyncInitable object. This is
15154  * similar to g_object_new() but also initializes the object asynchronously.
15155  * When the initialization is finished, @callback will be called. You can
15156  * then call g_async_initable_new_finish() to get the new object and check
15157  * for any errors.
15158  *
15159  * Since: 2.22
15160  */
15161
15162
15163 /**
15164  * g_async_initable_new_finish:
15165  * @initable: the #GAsyncInitable from the callback
15166  * @res: the #GAsyncResult from the callback
15167  * @error: return location for errors, or %NULL to ignore
15168  *
15169  * Finishes the async construction for the various g_async_initable_new
15170  * calls, returning the created object or %NULL on error.
15171  * Free with g_object_unref().
15172  *
15173  * Returns: (transfer full): a newly created #GObject, or %NULL on error.
15174  * Since: 2.22
15175  */
15176
15177
15178 /**
15179  * g_async_initable_new_valist_async:
15180  * @object_type: a #GType supporting #GAsyncInitable.
15181  * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
15182  * @var_args: The var args list generated from @first_property_name.
15183  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
15184  * @cancellable: optional #GCancellable object, %NULL to ignore.
15185  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
15186  * @user_data: the data to pass to callback function
15187  *
15188  * Helper function for constructing #GAsyncInitable object. This is
15189  * similar to g_object_new_valist() but also initializes the object
15190  * asynchronously.
15191  * When the initialization is finished, @callback will be called. You can
15192  * then call g_async_initable_new_finish() to get the new object and check
15193  * for any errors.
15194  *
15195  * Since: 2.22
15196  */
15197
15198
15199 /**
15200  * g_async_initable_newv_async:
15201  * @object_type: a #GType supporting #GAsyncInitable.
15202  * @n_parameters: the number of parameters in @parameters
15203  * @parameters: the parameters to use to construct the object
15204  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
15205  * @cancellable: optional #GCancellable object, %NULL to ignore.
15206  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
15207  * @user_data: the data to pass to callback function
15208  *
15209  * Helper function for constructing #GAsyncInitable object. This is
15210  * similar to g_object_newv() but also initializes the object asynchronously.
15211  * When the initialization is finished, @callback will be called. You can
15212  * then call g_async_initable_new_finish() to get the new object and check
15213  * for any errors.
15214  *
15215  * Since: 2.22
15216  */
15217
15218
15219 /**
15220  * g_async_result_get_source_object:
15221  * @res: a #GAsyncResult
15222  *
15223  * Gets the source object from a #GAsyncResult.
15224  * or %NULL if there is none.
15225  *
15226  * Returns: (transfer full): a new reference to the source object for the @res,
15227  */
15228
15229
15230 /**
15231  * g_async_result_get_user_data:
15232  * @res: a #GAsyncResult.
15233  *
15234  * Gets the user data from a #GAsyncResult.
15235  *
15236  * Returns: (transfer full): the user data for @res.
15237  */
15238
15239
15240 /**
15241  * g_buffered_input_stream_fill:
15242  * @stream: a #GBufferedInputStream
15243  * @count: the number of bytes that will be read from the stream
15244  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
15245  * @error: location to store the error occuring, or %NULL to ignore
15246  *
15247  * Tries to read @count bytes from the stream into the buffer.
15248  * Will block during this read.
15249  * If @count is zero, returns zero and does nothing. A value of @count
15250  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
15251  * On success, the number of bytes read into the buffer is returned.
15252  * It is not an error if this is not the same as the requested size, as it
15253  * can happen e.g. near the end of a file. Zero is returned on end of file
15254  * (or if @count is zero),  but never otherwise.
15255  * If @count is -1 then the attempted read size is equal to the number of
15256  * bytes that are required to fill the buffer.
15257  * If @cancellable is not %NULL, then the operation can be cancelled by
15258  * triggering the cancellable object from another thread. If the operation
15259  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
15260  * operation was partially finished when the operation was cancelled the
15261  * partial result will be returned, without an error.
15262  * On error -1 is returned and @error is set accordingly.
15263  * For the asynchronous, non-blocking, version of this function, see
15264  * g_buffered_input_stream_fill_async().
15265  * or -1 on error.
15266  *
15267  * Returns: the number of bytes read into @stream's buffer, up to @count,
15268  */
15269
15270
15271 /**
15272  * g_buffered_input_stream_fill_async:
15273  * @stream: a #GBufferedInputStream
15274  * @count: the number of bytes that will be read from the stream
15275  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
15276  * @cancellable: (allow-none): optional #GCancellable object
15277  * @callback: (scope async): a #GAsyncReadyCallback
15278  * @user_data: (closure): a #gpointer
15279  *
15280  * Reads data into @stream's buffer asynchronously, up to @count size.
15281  * version of this function, see g_buffered_input_stream_fill().
15282  * If @count is -1 then the attempted read size is equal to the number
15283  * of bytes that are required to fill the buffer.
15284  */
15285
15286
15287 /**
15288  * g_buffered_input_stream_fill_finish:
15289  * @stream: a #GBufferedInputStream
15290  * @result: a #GAsyncResult
15291  * @error: a #GError
15292  *
15293  * Finishes an asynchronous read.
15294  *
15295  * Returns: a #gssize of the read stream, or %-1 on an error.
15296  */
15297
15298
15299 /**
15300  * g_buffered_input_stream_get_available:
15301  * @stream: #GBufferedInputStream
15302  *
15303  * Gets the size of the available data within the stream.
15304  *
15305  * Returns: size of the available stream.
15306  */
15307
15308
15309 /**
15310  * g_buffered_input_stream_get_buffer_size:
15311  * @stream: a #GBufferedInputStream
15312  *
15313  * Gets the size of the input buffer.
15314  *
15315  * Returns: the current buffer size.
15316  */
15317
15318
15319 /**
15320  * g_buffered_input_stream_new:
15321  * @base_stream: a #GInputStream
15322  *
15323  * Creates a new #GInputStream from the given @base_stream, with
15324  * a buffer set to the default size (4 kilobytes).
15325  *
15326  * Returns: a #GInputStream for the given @base_stream.
15327  */
15328
15329
15330 /**
15331  * g_buffered_input_stream_new_sized:
15332  * @base_stream: a #GInputStream
15333  * @size: a #gsize
15334  *
15335  * Creates a new #GBufferedInputStream from the given @base_stream,
15336  * with a buffer set to @size.
15337  *
15338  * Returns: a #GInputStream.
15339  */
15340
15341
15342 /**
15343  * g_buffered_input_stream_peek:
15344  * @stream: a #GBufferedInputStream
15345  * @buffer: a pointer to an allocated chunk of memory
15346  * @offset: a #gsize
15347  * @count: a #gsize
15348  *
15349  * Peeks in the buffer, copying data of size @count into @buffer,
15350  * offset @offset bytes.
15351  *
15352  * Returns: a #gsize of the number of bytes peeked, or -1 on error.
15353  */
15354
15355
15356 /**
15357  * g_buffered_input_stream_peek_buffer:
15358  * @stream: a #GBufferedInputStream
15359  * @count: (out): a #gsize to get the number of bytes available in the buffer
15360  *
15361  * Returns the buffer with the currently available bytes. The returned
15362  * buffer must not be modified and will become invalid when reading from
15363  * the stream or filling the buffer.
15364  * read-only buffer
15365  *
15366  * Returns: (array length=count) (element-type guint8) (transfer none):
15367  */
15368
15369
15370 /**
15371  * g_buffered_input_stream_read_byte:
15372  * @stream: a #GBufferedInputStream
15373  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
15374  * @error: location to store the error occuring, or %NULL to ignore
15375  *
15376  * Tries to read a single byte from the stream or the buffer. Will block
15377  * during this read.
15378  * On success, the byte read from the stream is returned. On end of stream
15379  * -1 is returned but it's not an exceptional error and @error is not set.
15380  * If @cancellable is not %NULL, then the operation can be cancelled by
15381  * triggering the cancellable object from another thread. If the operation
15382  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
15383  * operation was partially finished when the operation was cancelled the
15384  * partial result will be returned, without an error.
15385  * On error -1 is returned and @error is set accordingly.
15386  *
15387  * Returns: the byte read from the @stream, or -1 on end of stream or error.
15388  */
15389
15390
15391 /**
15392  * g_buffered_input_stream_set_buffer_size:
15393  * @stream: a #GBufferedInputStream
15394  * @size: a #gsize
15395  *
15396  * Sets the size of the internal buffer of @stream to @size, or to the
15397  * size of the contents of the buffer. The buffer can never be resized
15398  * smaller than its current contents.
15399  */
15400
15401
15402 /**
15403  * g_buffered_output_stream_get_auto_grow:
15404  * @stream: a #GBufferedOutputStream.
15405  *
15406  * Checks if the buffer automatically grows as data is added.
15407  * %FALSE otherwise.
15408  *
15409  * Returns: %TRUE if the @stream's buffer automatically grows,
15410  */
15411
15412
15413 /**
15414  * g_buffered_output_stream_get_buffer_size:
15415  * @stream: a #GBufferedOutputStream.
15416  *
15417  * Gets the size of the buffer in the @stream.
15418  *
15419  * Returns: the current size of the buffer.
15420  */
15421
15422
15423 /**
15424  * g_buffered_output_stream_new:
15425  * @base_stream: a #GOutputStream.
15426  *
15427  * Creates a new buffered output stream for a base stream.
15428  *
15429  * Returns: a #GOutputStream for the given @base_stream.
15430  */
15431
15432
15433 /**
15434  * g_buffered_output_stream_new_sized:
15435  * @base_stream: a #GOutputStream.
15436  * @size: a #gsize.
15437  *
15438  * Creates a new buffered output stream with a given buffer size.
15439  *
15440  * Returns: a #GOutputStream with an internal buffer set to @size.
15441  */
15442
15443
15444 /**
15445  * g_buffered_output_stream_set_auto_grow:
15446  * @stream: a #GBufferedOutputStream.
15447  * @auto_grow: a #gboolean.
15448  *
15449  * Sets whether or not the @stream's buffer should automatically grow.
15450  * If @auto_grow is true, then each write will just make the buffer
15451  * larger, and you must manually flush the buffer to actually write out
15452  * the data to the underlying stream.
15453  */
15454
15455
15456 /**
15457  * g_buffered_output_stream_set_buffer_size:
15458  * @stream: a #GBufferedOutputStream.
15459  * @size: a #gsize.
15460  *
15461  * Sets the size of the internal buffer to @size.
15462  */
15463
15464
15465 /**
15466  * g_bus_get:
15467  * @bus_type: A #GBusType.
15468  * @cancellable: A #GCancellable or %NULL.
15469  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
15470  * @user_data: The data to pass to @callback.
15471  *
15472  * Asynchronously connects to the message bus specified by @bus_type.
15473  * When the operation is finished, @callback will be invoked. You can
15474  * then call g_bus_get_finish() to get the result of the operation.
15475  * This is a asynchronous failable function. See g_bus_get_sync() for
15476  * the synchronous version.
15477  *
15478  * Since: 2.26
15479  */
15480
15481
15482 /**
15483  * g_bus_get_finish:
15484  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_bus_get().
15485  * @error: Return location for error or %NULL.
15486  *
15487  * Finishes an operation started with g_bus_get().
15488  * The returned object is a singleton, that is, shared with other
15489  * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
15490  * event that you need a private message bus connection, use
15491  * g_dbus_address_get_for_bus_sync() and
15492  * g_dbus_connection_new_for_address().
15493  * Note that the returned #GDBusConnection object will (usually) have
15494  * the #GDBusConnection:exit-on-close property set to %TRUE.
15495  *
15496  * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
15497  * Since: 2.26
15498  */
15499
15500
15501 /**
15502  * g_bus_get_sync:
15503  * @bus_type: A #GBusType.
15504  * @cancellable: A #GCancellable or %NULL.
15505  * @error: Return location for error or %NULL.
15506  *
15507  * Synchronously connects to the message bus specified by @bus_type.
15508  * Note that the returned object may shared with other callers,
15509  * e.g. if two separate parts of a process calls this function with
15510  * the same @bus_type, they will share the same object.
15511  * This is a synchronous failable function. See g_bus_get() and
15512  * g_bus_get_finish() for the asynchronous version.
15513  * The returned object is a singleton, that is, shared with other
15514  * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
15515  * event that you need a private message bus connection, use
15516  * g_dbus_address_get_for_bus_sync() and
15517  * g_dbus_connection_new_for_address().
15518  * Note that the returned #GDBusConnection object will (usually) have
15519  * the #GDBusConnection:exit-on-close property set to %TRUE.
15520  *
15521  * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
15522  * Since: 2.26
15523  */
15524
15525
15526 /**
15527  * g_bus_own_name:
15528  * @bus_type: The type of bus to own a name on.
15529  * @name: The well-known name to own.
15530  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
15531  * @bus_acquired_handler: Handler to invoke when connected to the bus of type @bus_type or %NULL.
15532  * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
15533  * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
15534  * @user_data: User data to pass to handlers.
15535  * @user_data_free_func: Function for freeing @user_data or %NULL.
15536  *
15537  * Starts acquiring @name on the bus specified by @bus_type and calls
15538  * acquired respectively lost. Callbacks will be invoked in the <link
15539  * linkend="g-main-context-push-thread-default">thread-default main
15540  * loop</link> of the thread you are calling this function from.
15541  * You are guaranteed that one of the @name_acquired_handler and @name_lost_handler
15542  * callbacks will be invoked after calling this function - there are three
15543  * possible cases:
15544  * <itemizedlist>
15545  * <listitem><para>
15546  * </para></listitem>
15547  * <listitem><para>
15548  * </para></listitem>
15549  * <listitem><para>
15550  * </para></listitem>
15551  * </itemizedlist>
15552  * When you are done owning the name, just call g_bus_unown_name()
15553  * with the owner id this function returns.
15554  * If the name is acquired or lost (for example another application
15555  * could acquire the name if you allow replacement or the application
15556  * currently owning the name exits), the handlers are also invoked. If the
15557  * #GDBusConnection that is used for attempting to own the name
15558  * closes, then @name_lost_handler is invoked since it is no
15559  * longer possible for other processes to access the process.
15560  * You cannot use g_bus_own_name() several times for the same name (unless
15561  * interleaved with calls to g_bus_unown_name()) - only the first call
15562  * will work.
15563  * Another guarantee is that invocations of @name_acquired_handler
15564  * and @name_lost_handler are guaranteed to alternate; that
15565  * is, if @name_acquired_handler is invoked then you are
15566  * guaranteed that the next time one of the handlers is invoked, it
15567  * will be @name_lost_handler. The reverse is also true.
15568  * If you plan on exporting objects (using e.g.
15569  * g_dbus_connection_register_object()), note that it is generally too late
15570  * to export the objects in @name_acquired_handler. Instead, you can do this
15571  * in @bus_acquired_handler since you are guaranteed that this will run
15572  * before @name is requested from the bus.
15573  * This behavior makes it very simple to write applications that wants
15574  * to own names and export objects, see <xref linkend="gdbus-owning-names"/>.
15575  * Simply register objects to be exported in @bus_acquired_handler and
15576  * unregister the objects (if any) in @name_lost_handler.
15577  * g_bus_unown_name() to stop owning the name.
15578  *
15579  * Returns: An identifier (never 0) that an be used with
15580  * Since: 2.26
15581  */
15582
15583
15584 /**
15585  * g_bus_own_name_on_connection:
15586  * @connection: A #GDBusConnection.
15587  * @name: The well-known name to own.
15588  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
15589  * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
15590  * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
15591  * @user_data: User data to pass to handlers.
15592  * @user_data_free_func: Function for freeing @user_data or %NULL.
15593  *
15594  * Like g_bus_own_name() but takes a #GDBusConnection instead of a
15595  * #GBusType.
15596  * g_bus_unown_name() to stop owning the name.
15597  *
15598  * Returns: An identifier (never 0) that an be used with
15599  * Since: 2.26
15600  */
15601
15602
15603 /**
15604  * g_bus_own_name_on_connection_with_closures:
15605  * @connection: A #GDBusConnection.
15606  * @name: The well-known name to own.
15607  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
15608  * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
15609  * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
15610  *
15611  * Version of g_bus_own_name_on_connection() using closures instead of callbacks for
15612  * easier binding in other languages.
15613  * g_bus_unown_name() to stop owning the name.
15614  *
15615  * Returns: An identifier (never 0) that an be used with
15616  * Rename to: g_bus_own_name_on_connection
15617  * Since: 2.26
15618  */
15619
15620
15621 /**
15622  * g_bus_own_name_with_closures:
15623  * @bus_type: The type of bus to own a name on.
15624  * @name: The well-known name to own.
15625  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
15626  * @bus_acquired_closure: (allow-none): #GClosure to invoke when connected to the bus of type @bus_type or %NULL.
15627  * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
15628  * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
15629  *
15630  * Version of g_bus_own_name() using closures instead of callbacks for
15631  * easier binding in other languages.
15632  * g_bus_unown_name() to stop owning the name.
15633  *
15634  * Returns: An identifier (never 0) that an be used with
15635  * Rename to: g_bus_own_name
15636  * Since: 2.26
15637  */
15638
15639
15640 /**
15641  * g_bus_unown_name:
15642  * @owner_id: An identifier obtained from g_bus_own_name()
15643  *
15644  * Stops owning a name.
15645  *
15646  * Since: 2.26
15647  */
15648
15649
15650 /**
15651  * g_bus_unwatch_name:
15652  * @watcher_id: An identifier obtained from g_bus_watch_name()
15653  *
15654  * Stops watching a name.
15655  *
15656  * Since: 2.26
15657  */
15658
15659
15660 /**
15661  * g_bus_watch_name:
15662  * @bus_type: The type of bus to watch a name on.
15663  * @name: The name (well-known or unique) to watch.
15664  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
15665  * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
15666  * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
15667  * @user_data: User data to pass to handlers.
15668  * @user_data_free_func: Function for freeing @user_data or %NULL.
15669  *
15670  * Starts watching @name on the bus specified by @bus_type and calls
15671  * known to have a owner respectively known to lose its
15672  * owner. Callbacks will be invoked in the <link
15673  * linkend="g-main-context-push-thread-default">thread-default main
15674  * loop</link> of the thread you are calling this function from.
15675  * You are guaranteed that one of the handlers will be invoked after
15676  * calling this function. When you are done watching the name, just
15677  * call g_bus_unwatch_name() with the watcher id this function
15678  * returns.
15679  * If the name vanishes or appears (for example the application owning
15680  * the name could restart), the handlers are also invoked. If the
15681  * #GDBusConnection that is used for watching the name disconnects, then
15682  * possible to access the name.
15683  * Another guarantee is that invocations of @name_appeared_handler
15684  * and @name_vanished_handler are guaranteed to alternate; that
15685  * is, if @name_appeared_handler is invoked then you are
15686  * guaranteed that the next time one of the handlers is invoked, it
15687  * will be @name_vanished_handler. The reverse is also true.
15688  * This behavior makes it very simple to write applications that wants
15689  * to take action when a certain name exists, see <xref
15690  * linkend="gdbus-watching-names"/>. Basically, the application
15691  * should create object proxies in @name_appeared_handler and destroy
15692  * them again (if any) in @name_vanished_handler.
15693  * g_bus_unwatch_name() to stop watching the name.
15694  *
15695  * Returns: An identifier (never 0) that an be used with
15696  * Since: 2.26
15697  */
15698
15699
15700 /**
15701  * g_bus_watch_name_on_connection:
15702  * @connection: A #GDBusConnection.
15703  * @name: The name (well-known or unique) to watch.
15704  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
15705  * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
15706  * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
15707  * @user_data: User data to pass to handlers.
15708  * @user_data_free_func: Function for freeing @user_data or %NULL.
15709  *
15710  * Like g_bus_watch_name() but takes a #GDBusConnection instead of a
15711  * #GBusType.
15712  * g_bus_unwatch_name() to stop watching the name.
15713  *
15714  * Returns: An identifier (never 0) that an be used with
15715  * Since: 2.26
15716  */
15717
15718
15719 /**
15720  * g_bus_watch_name_on_connection_with_closures:
15721  * @connection: A #GDBusConnection.
15722  * @name: The name (well-known or unique) to watch.
15723  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
15724  * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
15725  * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
15726  *
15727  * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for
15728  * easier binding in other languages.
15729  * g_bus_unwatch_name() to stop watching the name.
15730  *
15731  * Returns: An identifier (never 0) that an be used with
15732  * Rename to: g_bus_watch_name_on_connection
15733  * Since: 2.26
15734  */
15735
15736
15737 /**
15738  * g_bus_watch_name_with_closures:
15739  * @bus_type: The type of bus to watch a name on.
15740  * @name: The name (well-known or unique) to watch.
15741  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
15742  * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
15743  * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
15744  *
15745  * Version of g_bus_watch_name() using closures instead of callbacks for
15746  * easier binding in other languages.
15747  * g_bus_unwatch_name() to stop watching the name.
15748  *
15749  * Returns: An identifier (never 0) that an be used with
15750  * Rename to: g_bus_watch_name
15751  * Since: 2.26
15752  */
15753
15754
15755 /**
15756  * g_cancellable_cancel:
15757  * @cancellable: a #GCancellable object.
15758  *
15759  * Will set @cancellable to cancelled, and will emit the
15760  * #GCancellable::cancelled signal. (However, see the warning about
15761  * race conditions in the documentation for that signal if you are
15762  * planning to connect to it.)
15763  * This function is thread-safe. In other words, you can safely call
15764  * it from a thread other than the one running the operation that was
15765  * passed the @cancellable.
15766  * The convention within gio is that cancelling an asynchronous
15767  * operation causes it to complete asynchronously. That is, if you
15768  * cancel the operation from the same thread in which it is running,
15769  * then the operation's #GAsyncReadyCallback will not be invoked until
15770  * the application returns to the main loop.
15771  */
15772
15773
15774 /**
15775  * g_cancellable_connect:
15776  * @cancellable: A #GCancellable.
15777  * @callback: The #GCallback to connect.
15778  * @data: Data to pass to @callback.
15779  * @data_destroy_func: Free function for @data or %NULL.
15780  *
15781  * Convenience function to connect to the #GCancellable::cancelled
15782  * signal. Also handles the race condition that may happen
15783  * if the cancellable is cancelled right before connecting.
15784  * time of the connect if @cancellable is already cancelled,
15785  * or when @cancellable is cancelled in some thread.
15786  * disconnected, or immediately if the cancellable is already
15787  * cancelled.
15788  * See #GCancellable::cancelled for details on how to use this.
15789  * been cancelled.
15790  *
15791  * Returns: The id of the signal handler or 0 if @cancellable has already
15792  * Since: 2.22
15793  */
15794
15795
15796 /**
15797  * g_cancellable_disconnect:
15798  * @cancellable: A #GCancellable or %NULL.
15799  * @handler_id: Handler id of the handler to be disconnected, or %0.
15800  *
15801  * Disconnects a handler from a cancellable instance similar to
15802  * g_signal_handler_disconnect().  Additionally, in the event that a
15803  * signal handler is currently running, this call will block until the
15804  * handler has finished.  Calling this function from a
15805  * #GCancellable::cancelled signal handler will therefore result in a
15806  * deadlock.
15807  * This avoids a race condition where a thread cancels at the
15808  * same time as the cancellable operation is finished and the
15809  * signal handler is removed. See #GCancellable::cancelled for
15810  * details on how to use this.
15811  * If @cancellable is %NULL or @handler_id is %0 this function does
15812  * nothing.
15813  *
15814  * Since: 2.22
15815  */
15816
15817
15818 /**
15819  * g_cancellable_get_current:
15820  *
15821  * Gets the top cancellable from the stack.
15822  * if the stack is empty.
15823  *
15824  * Returns: (transfer none): a #GCancellable from the top of the stack, or %NULL
15825  */
15826
15827
15828 /**
15829  * g_cancellable_get_fd:
15830  * @cancellable: a #GCancellable.
15831  *
15832  * Gets the file descriptor for a cancellable job. This can be used to
15833  * implement cancellable operations on Unix systems. The returned fd will
15834  * turn readable when @cancellable is cancelled.
15835  * You are not supposed to read from the fd yourself, just check for
15836  * readable status. Reading to unset the readable status is done
15837  * with g_cancellable_reset().
15838  * After a successful return from this function, you should use
15839  * g_cancellable_release_fd() to free up resources allocated for
15840  * the returned file descriptor.
15841  * See also g_cancellable_make_pollfd().
15842  * is not supported, or on errors.
15843  *
15844  * Returns: A valid file descriptor. %-1 if the file descriptor
15845  */
15846
15847
15848 /**
15849  * g_cancellable_is_cancelled:
15850  * @cancellable: a #GCancellable or NULL.
15851  *
15852  * Checks if a cancellable job has been cancelled.
15853  * FALSE if called with %NULL or if item is not cancelled.
15854  *
15855  * Returns: %TRUE if @cancellable is cancelled,
15856  */
15857
15858
15859 /**
15860  * g_cancellable_make_pollfd:
15861  * @cancellable: a #GCancellable or %NULL
15862  * @pollfd: a pointer to a #GPollFD
15863  *
15864  * Creates a #GPollFD corresponding to @cancellable; this can be passed
15865  * to g_poll() and used to poll for cancellation. This is useful both
15866  * for unix systems without a native poll and for portability to
15867  * windows.
15868  * When this function returns %TRUE, you should use
15869  * g_cancellable_release_fd() to free up resources allocated for the
15870  * If this function returns %FALSE, either no @cancellable was given or
15871  * resource limits prevent this function from allocating the necessary
15872  * structures for polling. (On Linux, you will likely have reached
15873  * the maximum number of file descriptors.) The suggested way to handle
15874  * these cases is to ignore the @cancellable.
15875  * You are not supposed to read from the fd yourself, just check for
15876  * readable status. Reading to unset the readable status is done
15877  * with g_cancellable_reset().
15878  * failure to prepare the cancellable.
15879  *
15880  * Returns: %TRUE if @pollfd was successfully initialized, %FALSE on
15881  * Since: 2.22
15882  */
15883
15884
15885 /**
15886  * g_cancellable_new:
15887  *
15888  * Creates a new #GCancellable object.
15889  * Applications that want to start one or more operations
15890  * that should be cancellable should create a #GCancellable
15891  * and pass it to the operations.
15892  * One #GCancellable can be used in multiple consecutive
15893  * operations, but not in multiple concurrent operations.
15894  *
15895  * Returns: a #GCancellable.
15896  */
15897
15898
15899 /**
15900  * g_cancellable_pop_current:
15901  * @cancellable: a #GCancellable object
15902  *
15903  * Pops @cancellable off the cancellable stack (verifying that @cancellable
15904  * is on the top of the stack).
15905  */
15906
15907
15908 /**
15909  * g_cancellable_push_current:
15910  * @cancellable: a #GCancellable object
15911  *
15912  * Pushes @cancellable onto the cancellable stack. The current
15913  * cancellable can then be recieved using g_cancellable_get_current().
15914  * This is useful when implementing cancellable operations in
15915  * code that does not allow you to pass down the cancellable object.
15916  * This is typically called automatically by e.g. #GFile operations,
15917  * so you rarely have to call this yourself.
15918  */
15919
15920
15921 /**
15922  * g_cancellable_release_fd:
15923  * @cancellable: a #GCancellable
15924  *
15925  * Releases a resources previously allocated by g_cancellable_get_fd()
15926  * or g_cancellable_make_pollfd().
15927  * For compatibility reasons with older releases, calling this function
15928  * is not strictly required, the resources will be automatically freed
15929  * when the @cancellable is finalized. However, the @cancellable will
15930  * block scarce file descriptors until it is finalized if this function
15931  * is not called. This can cause the application to run out of file
15932  * descriptors when many #GCancellables are used at the same time.
15933  *
15934  * Since: 2.22
15935  */
15936
15937
15938 /**
15939  * g_cancellable_reset:
15940  * @cancellable: a #GCancellable object.
15941  *
15942  * Resets @cancellable to its uncancelled state.
15943  */
15944
15945
15946 /**
15947  * g_cancellable_set_error_if_cancelled:
15948  * @cancellable: a #GCancellable object.
15949  * @error: #GError to append error state to.
15950  *
15951  * If the @cancellable is cancelled, sets the error to notify
15952  * that the operation was cancelled.
15953  *
15954  * Returns: %TRUE if @cancellable was cancelled, %FALSE if it was not.
15955  */
15956
15957
15958 /**
15959  * g_cancellable_source_new: (skip)
15960  * @cancellable: a #GCancellable, or %NULL
15961  *
15962  * Creates a source that triggers if @cancellable is cancelled and
15963  * calls its callback of type #GCancellableSourceFunc. This is
15964  * primarily useful for attaching to another (non-cancellable) source
15965  * with g_source_add_child_source() to add cancellability to it.
15966  * For convenience, you can call this with a %NULL #GCancellable,
15967  * in which case the source will never trigger.
15968  *
15969  * Returns: (transfer full): the new #GSource.
15970  * Since: 2.28
15971  */
15972
15973
15974 /**
15975  * g_charset_converter_get_num_fallbacks:
15976  * @converter: a #GCharsetConverter
15977  *
15978  * Gets the number of fallbacks that @converter has applied so far.
15979  *
15980  * Returns: the number of fallbacks that @converter has applied
15981  * Since: 2.24
15982  */
15983
15984
15985 /**
15986  * g_charset_converter_get_use_fallback:
15987  * @converter: a #GCharsetConverter
15988  *
15989  * Gets the #GCharsetConverter:use-fallback property.
15990  *
15991  * Returns: %TRUE if fallbacks are used by @converter
15992  * Since: 2.24
15993  */
15994
15995
15996 /**
15997  * g_charset_converter_new:
15998  * @to_charset: destination charset
15999  * @from_charset: source charset
16000  * @error: #GError for error reporting, or %NULL to ignore.
16001  *
16002  * Creates a new #GCharsetConverter.
16003  *
16004  * Returns: a new #GCharsetConverter or %NULL on error.
16005  * Since: 2.24
16006  */
16007
16008
16009 /**
16010  * g_charset_converter_set_use_fallback:
16011  * @converter: a #GCharsetConverter
16012  * @use_fallback: %TRUE to use fallbacks
16013  *
16014  * Sets the #GCharsetConverter:use-fallback property.
16015  *
16016  * Since: 2.24
16017  */
16018
16019
16020 /**
16021  * g_content_type_can_be_executable:
16022  * @type: a content type string
16023  *
16024  * Checks if a content type can be executable. Note that for instance
16025  * things like text files can be executables (i.e. scripts and batch files).
16026  * can be executable, %FALSE otherwise.
16027  *
16028  * Returns: %TRUE if the file type corresponds to a type that
16029  */
16030
16031
16032 /**
16033  * g_content_type_equals:
16034  * @type1: a content type string
16035  * @type2: a content type string
16036  *
16037  * Compares two content types for equality.
16038  * %FALSE otherwise.
16039  *
16040  * Returns: %TRUE if the two strings are identical or equivalent,
16041  */
16042
16043
16044 /**
16045  * g_content_type_from_mime_type:
16046  * @mime_type: a mime type string
16047  *
16048  * Tries to find a content type based on the mime type name.
16049  * or %NULL. Free with g_free()
16050  *
16051  * Returns: (allow-none): Newly allocated string with content type
16052  * Since: 2.18
16053  */
16054
16055
16056 /**
16057  * g_content_type_get_description:
16058  * @type: a content type string
16059  *
16060  * Gets the human readable description of the content type.
16061  * returned string with g_free()
16062  *
16063  * Returns: a short description of the content type @type. Free the
16064  */
16065
16066
16067 /**
16068  * g_content_type_get_icon:
16069  * @type: a content type string
16070  *
16071  * Gets the icon for a content type.
16072  * object with g_object_unref()
16073  *
16074  * Returns: (transfer full): #GIcon corresponding to the content type. Free the returned
16075  */
16076
16077
16078 /**
16079  * g_content_type_get_mime_type:
16080  * @type: a content type string
16081  *
16082  * Gets the mime type for the content type, if one is registered.
16083  * or %NULL if unknown.
16084  *
16085  * Returns: (allow-none): the registered mime type for the given @type,
16086  */
16087
16088
16089 /**
16090  * g_content_type_guess:
16091  * @filename: (allow-none): a string, or %NULL
16092  * @data: (allow-none) (array length=data_size): a stream of data, or %NULL
16093  * @data_size: the size of @data
16094  * @result_uncertain: (allow-none) (out): return location for the certainty of the result, or %NULL
16095  *
16096  * Guesses the content type based on example data. If the function is
16097  * uncertain, @result_uncertain will be set to %TRUE. Either @filename
16098  * or @data may be %NULL, in which case the guess will be based solely
16099  * on the other argument.
16100  * given data. Free with g_free()
16101  *
16102  * Returns: a string indicating a guessed content type for the
16103  */
16104
16105
16106 /**
16107  * g_content_type_guess_for_tree:
16108  * @root: the root of the tree to guess a type for
16109  *
16110  * Tries to guess the type of the tree with root @root, by
16111  * looking at the files it contains. The result is an array
16112  * of content types, with the best guess coming first.
16113  * The types returned all have the form x-content/foo, e.g.
16114  * x-content/audio-cdda (for audio CDs) or x-content/image-dcf
16115  * (for a camera memory card). See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
16116  * specification for more on x-content types.
16117  * This function is useful in the implementation of
16118  * g_mount_guess_content_type().
16119  * array of zero or more content types, or %NULL. Free with g_strfreev()
16120  *
16121  * Returns: (transfer full) (array zero-terminated=1): an %NULL-terminated
16122  * Since: 2.18
16123  */
16124
16125
16126 /**
16127  * g_content_type_is_a:
16128  * @type: a content type string
16129  * @supertype: a content type string
16130  *
16131  * Determines if @type is a subset of @supertype.
16132  * %FALSE otherwise.
16133  *
16134  * Returns: %TRUE if @type is a kind of @supertype,
16135  */
16136
16137
16138 /**
16139  * g_content_type_is_unknown:
16140  * @type: a content type string
16141  *
16142  * Checks if the content type is the generic "unknown" type.
16143  * On UNIX this is the "application/octet-stream" mimetype,
16144  * while on win32 it is "*".
16145  *
16146  * Returns: %TRUE if the type is the unknown type.
16147  */
16148
16149
16150 /**
16151  * g_content_types_get_registered:
16152  *
16153  * Gets a list of strings containing all the registered content types
16154  * known to the system. The list and its data should be freed using
16155  * <programlisting>
16156  * g_list_foreach (list, g_free, NULL);
16157  * g_list_free (list);
16158  * </programlisting>
16159  *
16160  * Returns: (element-type utf8) (transfer full): #GList of the registered content types
16161  */
16162
16163
16164 /**
16165  * g_converter_convert:
16166  * @converter: a #GConverter.
16167  * @inbuf: (array length=inbuf_size) (element-type guint8): the buffer containing the data to convert.
16168  * @inbuf_size: the number of bytes in @inbuf
16169  * @outbuf: a buffer to write converted data in.
16170  * @outbuf_size: the number of bytes in @outbuf, must be at least one
16171  * @flags: a #GConvertFlags controlling the conversion details
16172  * @bytes_read: (out): will be set to the number of bytes read from @inbuf on success
16173  * @bytes_written: (out): will be set to the number of bytes written to @outbuf on success
16174  * @error: location to store the error occuring, or %NULL to ignore
16175  *
16176  * This is the main operation used when converting data. It is to be called
16177  * multiple times in a loop, and each time it will do some work, i.e.
16178  * producing some output (in @outbuf) or consuming some input (from @inbuf) or
16179  * both. If its not possible to do any work an error is returned.
16180  * Note that a single call may not consume all input (or any input at all).
16181  * Also a call may produce output even if given no input, due to state stored
16182  * in the converter producing output.
16183  * If any data was either produced or consumed, and then an error happens, then
16184  * only the successful conversion is reported and the error is returned on the
16185  * next call.
16186  * A full conversion loop involves calling this method repeatedly, each time
16187  * giving it new input and space output space. When there is no more input
16188  * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set.
16189  * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED
16190  * each time until all data is consumed and all output is produced, then
16191  * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED
16192  * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance
16193  * in a decompression converter where the end of data is detectable from the
16194  * data (and there might even be other data after the end of the compressed data).
16195  * When some data has successfully been converted @bytes_read and is set to
16196  * the number of bytes read from @inbuf, and @bytes_written is set to indicate
16197  * how many bytes was written to @outbuf. If there are more data to output
16198  * or consume (i.e. unless the %G_CONVERTER_INPUT_AT_END is specified) then
16199  * %G_CONVERTER_CONVERTED is returned, and if no more data is to be output
16200  * then %G_CONVERTER_FINISHED is returned.
16201  * On error %G_CONVERTER_ERROR is returned and @error is set accordingly.
16202  * Some errors need special handling:
16203  * %G_IO_ERROR_NO_SPACE is returned if there is not enough space
16204  * to write the resulting converted data, the application should
16205  * call the function again with a larger @outbuf to continue.
16206  * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough
16207  * input to fully determine what the conversion should produce,
16208  * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for
16209  * example with an incomplete multibyte sequence when converting text,
16210  * or when a regexp matches up to the end of the input (and may match
16211  * further input). It may also happen when @inbuf_size is zero and
16212  * there is no more data to produce.
16213  * When this happens the application should read more input and then
16214  * call the function again. If further input shows that there is no
16215  * more data call the function again with the same data but with
16216  * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion
16217  * to finish as e.g. in the regexp match case (or, to fail again with
16218  * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the
16219  * input is actually partial).
16220  * After g_converter_convert() has returned %G_CONVERTER_FINISHED the
16221  * converter object is in an invalid state where its not allowed
16222  * to call g_converter_convert() anymore. At this time you can only
16223  * free the object or call g_converter_reset() to reset it to the
16224  * initial state.
16225  * If the flag %G_CONVERTER_FLUSH is set then conversion is modified
16226  * to try to write out all internal state to the output. The application
16227  * has to call the function multiple times with the flag set, and when
16228  * the availible input has been consumed and all internal state has
16229  * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if
16230  * really at the end) is returned instead of %G_CONVERTER_CONVERTED.
16231  * This is somewhat similar to what happens at the end of the input stream,
16232  * but done in the middle of the data.
16233  * This has different meanings for different conversions. For instance
16234  * in a compression converter it would mean that we flush all the
16235  * compression state into output such that if you uncompress the
16236  * compressed data you get back all the input data. Doing this may
16237  * make the final file larger due to padding though. Another example
16238  * is a regexp conversion, where if you at the end of the flushed data
16239  * have a match, but there is also a potential longer match. In the
16240  * non-flushed case we would ask for more input, but when flushing we
16241  * treat this as the end of input and do the match.
16242  * Flushing is not always possible (like if a charset converter flushes
16243  * at a partial multibyte sequence). Converters are supposed to try
16244  * to produce as much output as possible and then return an error
16245  * (typically %G_IO_ERROR_PARTIAL_INPUT).
16246  *
16247  * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error.
16248  * Since: 2.24
16249  */
16250
16251
16252 /**
16253  * g_converter_input_stream_get_converter:
16254  * @converter_stream: a #GConverterInputStream
16255  *
16256  * Gets the #GConverter that is used by @converter_stream.
16257  *
16258  * Returns: (transfer none): the converter of the converter input stream
16259  * Since: 2.24
16260  */
16261
16262
16263 /**
16264  * g_converter_input_stream_new:
16265  * @base_stream: a #GInputStream
16266  * @converter: a #GConverter
16267  *
16268  * Creates a new converter input stream for the @base_stream.
16269  *
16270  * Returns: a new #GInputStream.
16271  */
16272
16273
16274 /**
16275  * g_converter_output_stream_get_converter:
16276  * @converter_stream: a #GConverterOutputStream
16277  *
16278  * Gets the #GConverter that is used by @converter_stream.
16279  *
16280  * Returns: (transfer none): the converter of the converter output stream
16281  * Since: 2.24
16282  */
16283
16284
16285 /**
16286  * g_converter_output_stream_new:
16287  * @base_stream: a #GOutputStream
16288  * @converter: a #GConverter
16289  *
16290  * Creates a new converter output stream for the @base_stream.
16291  *
16292  * Returns: a new #GOutputStream.
16293  */
16294
16295
16296 /**
16297  * g_converter_reset:
16298  * @converter: a #GConverter.
16299  *
16300  * Resets all internal state in the converter, making it behave
16301  * as if it was just created. If the converter has any internal
16302  * state that would produce output then that output is lost.
16303  *
16304  * Since: 2.24
16305  */
16306
16307
16308 /**
16309  * g_credentials_get_native: (skip)
16310  * @credentials: A #GCredentials.
16311  * @native_type: The type of native credentials to get.
16312  *
16313  * Gets a pointer to native credentials of type @native_type from
16314  * It is a programming error (which will cause an warning to be
16315  * logged) to use this method if there is no #GCredentials support for
16316  * the OS or if @native_type isn't supported by the OS.
16317  * operation there is no #GCredentials support for the OS or if
16318  * data, it is owned by @credentials.
16319  *
16320  * Returns: The pointer to native credentials or %NULL if the
16321  * Since: 2.26
16322  */
16323
16324
16325 /**
16326  * g_credentials_get_unix_user:
16327  * @credentials: A #GCredentials
16328  * @error: Return location for error or %NULL.
16329  *
16330  * Tries to get the UNIX user identifier from @credentials. This
16331  * method is only available on UNIX platforms.
16332  * This operation can fail if #GCredentials is not supported on the
16333  * OS or if the native credentials type does not contain information
16334  * about the UNIX user.
16335  *
16336  * Returns: The UNIX user identifier or -1 if @error is set.
16337  * Since: 2.26
16338  */
16339
16340
16341 /**
16342  * g_credentials_is_same_user:
16343  * @credentials: A #GCredentials.
16344  * @other_credentials: A #GCredentials.
16345  * @error: Return location for error or %NULL.
16346  *
16347  * Checks if @credentials and @other_credentials is the same user.
16348  * This operation can fail if #GCredentials is not supported on the
16349  * the OS.
16350  * user, %FALSE otherwise or if @error is set.
16351  *
16352  * Returns: %TRUE if @credentials and @other_credentials has the same
16353  * Since: 2.26
16354  */
16355
16356
16357 /**
16358  * g_credentials_new:
16359  *
16360  * Creates a new #GCredentials object with credentials matching the
16361  * the current process.
16362  *
16363  * Returns: A #GCredentials. Free with g_object_unref().
16364  * Since: 2.26
16365  */
16366
16367
16368 /**
16369  * g_credentials_set_native:
16370  * @credentials: A #GCredentials.
16371  * @native_type: The type of native credentials to set.
16372  * @native: A pointer to native credentials.
16373  *
16374  * Copies the native credentials of type @native_type from @native
16375  * into @credentials.
16376  * It is a programming error (which will cause an warning to be
16377  * logged) to use this method if there is no #GCredentials support for
16378  * the OS or if @native_type isn't supported by the OS.
16379  *
16380  * Since: 2.26
16381  */
16382
16383
16384 /**
16385  * g_credentials_set_unix_user:
16386  * @credentials: A #GCredentials.
16387  * @uid: The UNIX user identifier to set.
16388  * @error: Return location for error or %NULL.
16389  *
16390  * Tries to set the UNIX user identifier on @credentials. This method
16391  * is only available on UNIX platforms.
16392  * This operation can fail if #GCredentials is not supported on the
16393  * OS or if the native credentials type does not contain information
16394  * about the UNIX user.
16395  *
16396  * Returns: %TRUE if @uid was set, %FALSE if error is set.
16397  * Since: 2.26
16398  */
16399
16400
16401 /**
16402  * g_credentials_to_string:
16403  * @credentials: A #GCredentials object.
16404  *
16405  * Creates a human-readable textual representation of @credentials
16406  * that can be used in logging and debug messages. The format of the
16407  * returned string may change in future GLib release.
16408  *
16409  * Returns: A string that should be freed with g_free().
16410  * Since: 2.26
16411  */
16412
16413
16414 /**
16415  * g_data_input_stream_get_byte_order:
16416  * @stream: a given #GDataInputStream.
16417  *
16418  * Gets the byte order for the data input stream.
16419  *
16420  * Returns: the @stream's current #GDataStreamByteOrder.
16421  */
16422
16423
16424 /**
16425  * g_data_input_stream_get_newline_type:
16426  * @stream: a given #GDataInputStream.
16427  *
16428  * Gets the current newline type for the @stream.
16429  *
16430  * Returns: #GDataStreamNewlineType for the given @stream.
16431  */
16432
16433
16434 /**
16435  * g_data_input_stream_new:
16436  * @base_stream: a #GInputStream.
16437  *
16438  * Creates a new data input stream for the @base_stream.
16439  *
16440  * Returns: a new #GDataInputStream.
16441  */
16442
16443
16444 /**
16445  * g_data_input_stream_read_byte:
16446  * @stream: a given #GDataInputStream.
16447  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16448  * @error: #GError for error reporting.
16449  *
16450  * Reads an unsigned 8-bit/1-byte value from @stream.
16451  * if an error occurred.
16452  *
16453  * Returns: an unsigned 8-bit/1-byte value read from the @stream or %0
16454  */
16455
16456
16457 /**
16458  * g_data_input_stream_read_int16:
16459  * @stream: a given #GDataInputStream.
16460  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16461  * @error: #GError for error reporting.
16462  *
16463  * Reads a 16-bit/2-byte value from @stream.
16464  * In order to get the correct byte order for this read operation,
16465  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
16466  * an error occurred.
16467  *
16468  * Returns: a signed 16-bit/2-byte value read from @stream or %0 if
16469  */
16470
16471
16472 /**
16473  * g_data_input_stream_read_int32:
16474  * @stream: a given #GDataInputStream.
16475  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16476  * @error: #GError for error reporting.
16477  *
16478  * Reads a signed 32-bit/4-byte value from @stream.
16479  * In order to get the correct byte order for this read operation,
16480  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
16481  * If @cancellable is not %NULL, then the operation can be cancelled by
16482  * triggering the cancellable object from another thread. If the operation
16483  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
16484  * an error occurred.
16485  *
16486  * Returns: a signed 32-bit/4-byte value read from the @stream or %0 if
16487  */
16488
16489
16490 /**
16491  * g_data_input_stream_read_int64:
16492  * @stream: a given #GDataInputStream.
16493  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16494  * @error: #GError for error reporting.
16495  *
16496  * Reads a 64-bit/8-byte value from @stream.
16497  * In order to get the correct byte order for this read operation,
16498  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
16499  * If @cancellable is not %NULL, then the operation can be cancelled by
16500  * triggering the cancellable object from another thread. If the operation
16501  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
16502  * an error occurred.
16503  *
16504  * Returns: a signed 64-bit/8-byte value read from @stream or %0 if
16505  */
16506
16507
16508 /**
16509  * g_data_input_stream_read_line:
16510  * @stream: a given #GDataInputStream.
16511  * @length: (out): a #gsize to get the length of the data read in.
16512  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16513  * @error: #GError for error reporting.
16514  *
16515  * Reads a line from the data input stream.
16516  * If @cancellable is not %NULL, then the operation can be cancelled by
16517  * triggering the cancellable object from another thread. If the operation
16518  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
16519  * (without the newlines).  Set @length to a #gsize to get the
16520  * length of the read line.  On an error, it will return %NULL and
16521  * still return %NULL, but @error won't be set.
16522  *
16523  * Returns: (transfer full): a string with the line that was read in
16524  */
16525
16526
16527 /**
16528  * g_data_input_stream_read_line_async:
16529  * @stream: a given #GDataInputStream.
16530  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
16531  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16532  * @callback: (scope async): callback to call when the request is satisfied.
16533  * @user_data: (closure): the data to pass to callback function.
16534  *
16535  * The asynchronous version of g_data_input_stream_read_line().  It is
16536  * an error to have two outstanding calls to this function.
16537  * When the operation is finished, @callback will be called. You
16538  * can then call g_data_input_stream_read_line_finish() to get
16539  * the result of the operation.
16540  *
16541  * Since: 2.20
16542  */
16543
16544
16545 /**
16546  * g_data_input_stream_read_line_finish:
16547  * @stream: a given #GDataInputStream.
16548  * @result: the #GAsyncResult that was provided to the callback.
16549  * @length: (out): a #gsize to get the length of the data read in.
16550  * @error: #GError for error reporting.
16551  *
16552  * Finish an asynchronous call started by
16553  * g_data_input_stream_read_line_async().
16554  * (without the newlines).  Set @length to a #gsize to get the
16555  * length of the read line.  On an error, it will return %NULL and
16556  * still return %NULL, but @error won't be set.
16557  *
16558  * Returns: (transfer full): a string with the line that was read in
16559  * Since: 2.20
16560  */
16561
16562
16563 /**
16564  * g_data_input_stream_read_uint16:
16565  * @stream: a given #GDataInputStream.
16566  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16567  * @error: #GError for error reporting.
16568  *
16569  * Reads an unsigned 16-bit/2-byte value from @stream.
16570  * In order to get the correct byte order for this read operation,
16571  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
16572  * an error occurred.
16573  *
16574  * Returns: an unsigned 16-bit/2-byte value read from the @stream or %0 if
16575  */
16576
16577
16578 /**
16579  * g_data_input_stream_read_uint32:
16580  * @stream: a given #GDataInputStream.
16581  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16582  * @error: #GError for error reporting.
16583  *
16584  * Reads an unsigned 32-bit/4-byte value from @stream.
16585  * In order to get the correct byte order for this read operation,
16586  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
16587  * If @cancellable is not %NULL, then the operation can be cancelled by
16588  * triggering the cancellable object from another thread. If the operation
16589  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
16590  * an error occurred.
16591  *
16592  * Returns: an unsigned 32-bit/4-byte value read from the @stream or %0 if
16593  */
16594
16595
16596 /**
16597  * g_data_input_stream_read_uint64:
16598  * @stream: a given #GDataInputStream.
16599  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16600  * @error: #GError for error reporting.
16601  *
16602  * Reads an unsigned 64-bit/8-byte value from @stream.
16603  * In order to get the correct byte order for this read operation,
16604  * see g_data_input_stream_get_byte_order().
16605  * If @cancellable is not %NULL, then the operation can be cancelled by
16606  * triggering the cancellable object from another thread. If the operation
16607  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
16608  * an error occurred.
16609  *
16610  * Returns: an unsigned 64-bit/8-byte read from @stream or %0 if
16611  */
16612
16613
16614 /**
16615  * g_data_input_stream_read_until:
16616  * @stream: a given #GDataInputStream.
16617  * @stop_chars: characters to terminate the read.
16618  * @length: (out): a #gsize to get the length of the data read in.
16619  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16620  * @error: #GError for error reporting.
16621  *
16622  * Reads a string from the data input stream, up to the first
16623  * occurrence of any of the stop characters.
16624  * Note that, in contrast to g_data_input_stream_read_until_async(),
16625  * this function consumes the stop character that it finds.
16626  * Don't use this function in new code.  Its functionality is
16627  * inconsistent with g_data_input_stream_read_until_async().  Both
16628  * functions will be marked as deprecated in a future release.  Use
16629  * g_data_input_stream_read_upto() instead, but note that that function
16630  * does not consume the stop character.
16631  * before encountering any of the stop characters. Set @length to
16632  * a #gsize to get the length of the string. This function will
16633  * return %NULL on an error.
16634  *
16635  * Returns: (transfer full): a string with the data that was read
16636  */
16637
16638
16639 /**
16640  * g_data_input_stream_read_until_async:
16641  * @stream: a given #GDataInputStream.
16642  * @stop_chars: characters to terminate the read.
16643  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
16644  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16645  * @callback: (scope async): callback to call when the request is satisfied.
16646  * @user_data: (closure): the data to pass to callback function.
16647  *
16648  * The asynchronous version of g_data_input_stream_read_until().
16649  * It is an error to have two outstanding calls to this function.
16650  * Note that, in contrast to g_data_input_stream_read_until(),
16651  * this function does not consume the stop character that it finds.  You
16652  * must read it for yourself.
16653  * When the operation is finished, @callback will be called. You
16654  * can then call g_data_input_stream_read_until_finish() to get
16655  * the result of the operation.
16656  * Don't use this function in new code.  Its functionality is
16657  * inconsistent with g_data_input_stream_read_until().  Both functions
16658  * will be marked as deprecated in a future release.  Use
16659  * g_data_input_stream_read_upto_async() instead.
16660  *
16661  * Since: 2.20
16662  */
16663
16664
16665 /**
16666  * g_data_input_stream_read_until_finish:
16667  * @stream: a given #GDataInputStream.
16668  * @result: the #GAsyncResult that was provided to the callback.
16669  * @length: (out): a #gsize to get the length of the data read in.
16670  * @error: #GError for error reporting.
16671  *
16672  * Finish an asynchronous call started by
16673  * g_data_input_stream_read_until_async().
16674  * before encountering any of the stop characters. Set @length to
16675  * a #gsize to get the length of the string. This function will
16676  * return %NULL on an error.
16677  *
16678  * Since: 2.20
16679  * Returns: (transfer full): a string with the data that was read
16680  */
16681
16682
16683 /**
16684  * g_data_input_stream_read_upto:
16685  * @stream: a #GDataInputStream
16686  * @stop_chars: characters to terminate the read
16687  * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
16688  * @length: (out): a #gsize to get the length of the data read in
16689  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
16690  * @error: #GError for error reporting
16691  *
16692  * Reads a string from the data input stream, up to the first
16693  * occurrence of any of the stop characters.
16694  * In contrast to g_data_input_stream_read_until(), this function
16695  * does <emphasis>not</emphasis> consume the stop character. You have
16696  * to use g_data_input_stream_read_byte() to get it before calling
16697  * g_data_input_stream_read_upto() again.
16698  * Note that @stop_chars may contain '\0' if @stop_chars_len is
16699  * specified.
16700  * before encountering any of the stop characters. Set @length to
16701  * a #gsize to get the length of the string. This function will
16702  * return %NULL on an error
16703  *
16704  * Returns: (transfer full): a string with the data that was read
16705  * Since: 2.26
16706  */
16707
16708
16709 /**
16710  * g_data_input_stream_read_upto_async:
16711  * @stream: a #GDataInputStream
16712  * @stop_chars: characters to terminate the read
16713  * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
16714  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
16715  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
16716  * @callback: (scope async): callback to call when the request is satisfied
16717  * @user_data: (closure): the data to pass to callback function
16718  *
16719  * The asynchronous version of g_data_input_stream_read_upto().
16720  * It is an error to have two outstanding calls to this function.
16721  * In contrast to g_data_input_stream_read_until(), this function
16722  * does <emphasis>not</emphasis> consume the stop character. You have
16723  * to use g_data_input_stream_read_byte() to get it before calling
16724  * g_data_input_stream_read_upto() again.
16725  * Note that @stop_chars may contain '\0' if @stop_chars_len is
16726  * specified.
16727  * When the operation is finished, @callback will be called. You
16728  * can then call g_data_input_stream_read_upto_finish() to get
16729  * the result of the operation.
16730  *
16731  * Since: 2.26
16732  */
16733
16734
16735 /**
16736  * g_data_input_stream_read_upto_finish:
16737  * @stream: a #GDataInputStream
16738  * @result: the #GAsyncResult that was provided to the callback
16739  * @length: (out): a #gsize to get the length of the data read in
16740  * @error: #GError for error reporting
16741  *
16742  * Finish an asynchronous call started by
16743  * g_data_input_stream_read_upto_async().
16744  * Note that this function does <emphasis>not</emphasis> consume the
16745  * stop character. You have to use g_data_input_stream_read_byte() to
16746  * get it before calling g_data_input_stream_read_upto_async() again.
16747  * before encountering any of the stop characters. Set @length to
16748  * a #gsize to get the length of the string. This function will
16749  * return %NULL on an error.
16750  *
16751  * Returns: (transfer full): a string with the data that was read
16752  * Since: 2.24
16753  */
16754
16755
16756 /**
16757  * g_data_input_stream_set_byte_order:
16758  * @stream: a given #GDataInputStream.
16759  * @order: a #GDataStreamByteOrder to set.
16760  *
16761  * This function sets the byte order for the given @stream. All subsequent
16762  * reads from the @stream will be read in the given @order.
16763  */
16764
16765
16766 /**
16767  * g_data_input_stream_set_newline_type:
16768  * @stream: a #GDataInputStream.
16769  * @type: the type of new line return as #GDataStreamNewlineType.
16770  *
16771  * Sets the newline type for the @stream.
16772  * Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read
16773  * chunk ends in "CR" we must read an additional byte to know if this is "CR" or
16774  * "CR LF", and this might block if there is no more data availible.
16775  */
16776
16777
16778 /**
16779  * g_data_output_stream_get_byte_order:
16780  * @stream: a #GDataOutputStream.
16781  *
16782  * Gets the byte order for the stream.
16783  *
16784  * Returns: the #GDataStreamByteOrder for the @stream.
16785  */
16786
16787
16788 /**
16789  * g_data_output_stream_new:
16790  * @base_stream: a #GOutputStream.
16791  *
16792  * Creates a new data output stream for @base_stream.
16793  *
16794  * Returns: #GDataOutputStream.
16795  */
16796
16797
16798 /**
16799  * g_data_output_stream_put_byte:
16800  * @stream: a #GDataOutputStream.
16801  * @data: a #guchar.
16802  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16803  * @error: a #GError, %NULL to ignore.
16804  *
16805  * Puts a byte into the output stream.
16806  *
16807  * Returns: %TRUE if @data was successfully added to the @stream.
16808  */
16809
16810
16811 /**
16812  * g_data_output_stream_put_int16:
16813  * @stream: a #GDataOutputStream.
16814  * @data: a #gint16.
16815  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16816  * @error: a #GError, %NULL to ignore.
16817  *
16818  * Puts a signed 16-bit integer into the output stream.
16819  *
16820  * Returns: %TRUE if @data was successfully added to the @stream.
16821  */
16822
16823
16824 /**
16825  * g_data_output_stream_put_int32:
16826  * @stream: a #GDataOutputStream.
16827  * @data: a #gint32.
16828  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16829  * @error: a #GError, %NULL to ignore.
16830  *
16831  * Puts a signed 32-bit integer into the output stream.
16832  *
16833  * Returns: %TRUE if @data was successfully added to the @stream.
16834  */
16835
16836
16837 /**
16838  * g_data_output_stream_put_int64:
16839  * @stream: a #GDataOutputStream.
16840  * @data: a #gint64.
16841  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16842  * @error: a #GError, %NULL to ignore.
16843  *
16844  * Puts a signed 64-bit integer into the stream.
16845  *
16846  * Returns: %TRUE if @data was successfully added to the @stream.
16847  */
16848
16849
16850 /**
16851  * g_data_output_stream_put_string:
16852  * @stream: a #GDataOutputStream.
16853  * @str: a string.
16854  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16855  * @error: a #GError, %NULL to ignore.
16856  *
16857  * Puts a string into the output stream.
16858  *
16859  * Returns: %TRUE if @string was successfully added to the @stream.
16860  */
16861
16862
16863 /**
16864  * g_data_output_stream_put_uint16:
16865  * @stream: a #GDataOutputStream.
16866  * @data: a #guint16.
16867  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16868  * @error: a #GError, %NULL to ignore.
16869  *
16870  * Puts an unsigned 16-bit integer into the output stream.
16871  *
16872  * Returns: %TRUE if @data was successfully added to the @stream.
16873  */
16874
16875
16876 /**
16877  * g_data_output_stream_put_uint32:
16878  * @stream: a #GDataOutputStream.
16879  * @data: a #guint32.
16880  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16881  * @error: a #GError, %NULL to ignore.
16882  *
16883  * Puts an unsigned 32-bit integer into the stream.
16884  *
16885  * Returns: %TRUE if @data was successfully added to the @stream.
16886  */
16887
16888
16889 /**
16890  * g_data_output_stream_put_uint64:
16891  * @stream: a #GDataOutputStream.
16892  * @data: a #guint64.
16893  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16894  * @error: a #GError, %NULL to ignore.
16895  *
16896  * Puts an unsigned 64-bit integer into the stream.
16897  *
16898  * Returns: %TRUE if @data was successfully added to the @stream.
16899  */
16900
16901
16902 /**
16903  * g_data_output_stream_set_byte_order:
16904  * @stream: a #GDataOutputStream.
16905  * @order: a %GDataStreamByteOrder.
16906  *
16907  * Sets the byte order of the data output stream to @order.
16908  */
16909
16910
16911 /**
16912  * g_dbus_address_get_for_bus_sync:
16913  * @bus_type: A #GBusType.
16914  * @cancellable: A #GCancellable or %NULL.
16915  * @error: Return location for error or %NULL.
16916  *
16917  * Synchronously looks up the D-Bus address for the well-known message
16918  * bus instance specified by @bus_type. This may involve using various
16919  * platform specific mechanisms.
16920  *
16921  * Returns: A valid D-Bus address string for @bus_type or %NULL if @error is set.
16922  * Since: 2.26
16923  */
16924
16925
16926 /**
16927  * g_dbus_address_get_stream:
16928  * @address: A valid D-Bus address.
16929  * @cancellable: A #GCancellable or %NULL.
16930  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
16931  * @user_data: Data to pass to @callback.
16932  *
16933  * Asynchronously connects to an endpoint specified by @address and
16934  * sets up the connection so it is in a state to run the client-side
16935  * of the D-Bus authentication conversation.
16936  * When the operation is finished, @callback will be invoked. You can
16937  * then call g_dbus_address_get_stream_finish() to get the result of
16938  * the operation.
16939  * This is an asynchronous failable function. See
16940  * g_dbus_address_get_stream_sync() for the synchronous version.
16941  *
16942  * Since: 2.26
16943  */
16944
16945
16946 /**
16947  * g_dbus_address_get_stream_finish:
16948  * @res: A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().
16949  * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
16950  * @error: Return location for error or %NULL.
16951  *
16952  * Finishes an operation started with g_dbus_address_get_stream().
16953  *
16954  * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
16955  * Since: 2.26
16956  */
16957
16958
16959 /**
16960  * g_dbus_address_get_stream_sync:
16961  * @address: A valid D-Bus address.
16962  * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
16963  * @cancellable: A #GCancellable or %NULL.
16964  * @error: Return location for error or %NULL.
16965  *
16966  * Synchronously connects to an endpoint specified by @address and
16967  * sets up the connection so it is in a state to run the client-side
16968  * of the D-Bus authentication conversation.
16969  * This is a synchronous failable function. See
16970  * g_dbus_address_get_stream() for the asynchronous version.
16971  *
16972  * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
16973  * Since: 2.26
16974  */
16975
16976
16977 /**
16978  * g_dbus_annotation_info_lookup:
16979  * @annotations: A %NULL-terminated array of annotations or %NULL.
16980  * @name: The name of the annotation to look up.
16981  *
16982  * Looks up the value of an annotation.
16983  * This cost of this function is O(n) in number of annotations.
16984  *
16985  * Returns: The value or %NULL if not found. Do not free, it is owned by @annotations.
16986  * Since: 2.26
16987  */
16988
16989
16990 /**
16991  * g_dbus_annotation_info_ref:
16992  * @info: A #GDBusNodeInfo
16993  *
16994  * If @info is statically allocated does nothing. Otherwise increases
16995  * the reference count.
16996  *
16997  * Returns: The same @info.
16998  * Since: 2.26
16999  */
17000
17001
17002 /**
17003  * g_dbus_annotation_info_unref:
17004  * @info: A #GDBusAnnotationInfo.
17005  *
17006  * If @info is statically allocated, does nothing. Otherwise decreases
17007  * the reference count of @info. When its reference count drops to 0,
17008  * the memory used is freed.
17009  *
17010  * Since: 2.26
17011  */
17012
17013
17014 /**
17015  * g_dbus_arg_info_ref:
17016  * @info: A #GDBusArgInfo
17017  *
17018  * If @info is statically allocated does nothing. Otherwise increases
17019  * the reference count.
17020  *
17021  * Returns: The same @info.
17022  * Since: 2.26
17023  */
17024
17025
17026 /**
17027  * g_dbus_arg_info_unref:
17028  * @info: A #GDBusArgInfo.
17029  *
17030  * If @info is statically allocated, does nothing. Otherwise decreases
17031  * the reference count of @info. When its reference count drops to 0,
17032  * the memory used is freed.
17033  *
17034  * Since: 2.26
17035  */
17036
17037
17038 /**
17039  * g_dbus_auth_observer_authorize_authenticated_peer:
17040  * @observer: A #GDBusAuthObserver.
17041  * @stream: A #GIOStream for the #GDBusConnection.
17042  * @credentials: Credentials received from the peer or %NULL.
17043  *
17044  * Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.
17045  *
17046  * Returns: %TRUE if the peer is authorized, %FALSE if not.
17047  * Since: 2.26
17048  */
17049
17050
17051 /**
17052  * g_dbus_auth_observer_new:
17053  *
17054  * Creates a new #GDBusAuthObserver object.
17055  *
17056  * Returns: A #GDBusAuthObserver. Free with g_object_unref().
17057  * Since: 2.26
17058  */
17059
17060
17061 /**
17062  * g_dbus_connection_add_filter:
17063  * @connection: A #GDBusConnection.
17064  * @filter_function: A filter function.
17065  * @user_data: User data to pass to @filter_function.
17066  * @user_data_free_func: Function to free @user_data with when filter is removed or %NULL.
17067  *
17068  * Adds a message filter. Filters are handlers that are run on all
17069  * incoming and outgoing messages, prior to standard dispatch. Filters
17070  * are run in the order that they were added.  The same handler can be
17071  * added as a filter more than once, in which case it will be run more
17072  * than once.  Filters added during a filter callback won't be run on
17073  * the message being processed. Filter functions are allowed to modify
17074  * and even drop messages.
17075  * Note that filters are run in a dedicated message handling thread so
17076  * they can't block and, generally, can't do anything but signal a
17077  * worker thread. Also note that filters are rarely needed - use API
17078  * such as g_dbus_connection_send_message_with_reply(),
17079  * g_dbus_connection_signal_subscribe() or g_dbus_connection_call() instead.
17080  * If a filter consumes an incoming message the message is not
17081  * dispatched anywhere else - not even the standard dispatch machinery
17082  * (that API such as g_dbus_connection_signal_subscribe() and
17083  * g_dbus_connection_send_message_with_reply() relies on) will see the
17084  * message. Similary, if a filter consumes an outgoing message, the
17085  * message will not be sent to the other peer.
17086  * g_dbus_connection_remove_filter().
17087  *
17088  * Returns: A filter identifier that can be used with
17089  * Since: 2.26
17090  */
17091
17092
17093 /**
17094  * g_dbus_connection_call:
17095  * @connection: A #GDBusConnection.
17096  * @bus_name: (allow-none): A unique or well-known bus name or %NULL if
17097  * @object_path: Path of remote object.
17098  * @interface_name: D-Bus interface to invoke method on.
17099  * @method_name: The name of the method to invoke.
17100  * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
17101  * @reply_type: (allow-none): The expected type of the reply, or %NULL.
17102  * @flags: Flags from the #GDBusCallFlags enumeration.
17103  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
17104  * @cancellable: A #GCancellable or %NULL.
17105  * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation.
17106  * @user_data: The data to pass to @callback.
17107  *
17108  * Asynchronously invokes the @method_name method on the
17109  * If @connection is closed then the operation will fail with
17110  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
17111  * fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value
17112  * not compatible with the D-Bus protocol, the operation fails with
17113  * %G_IO_ERROR_INVALID_ARGUMENT.
17114  * If @reply_type is non-%NULL then the reply will be checked for having this type and an
17115  * error will be raised if it does not match.  Said another way, if you give a @reply_type
17116  * then any non-%NULL return value will be of this type.
17117  * If the @parameters #GVariant is floating, it is consumed. This allows
17118  * convenient 'inline' use of g_variant_new(), e.g.:
17119  * |[
17120  * g_dbus_connection_call (connection,
17121  * "org.freedesktop.StringThings",
17122  * "/org/freedesktop/StringThings",
17123  * "org.freedesktop.StringThings",
17124  * "TwoStrings",
17125  * g_variant_new ("(ss)",
17126  * "Thing One",
17127  * "Thing Two"),
17128  * NULL,
17129  * G_DBUS_CALL_FLAGS_NONE,
17130  * -1,
17131  * NULL,
17132  * (GAsyncReadyCallback) two_strings_done,
17133  * NULL);
17134  * ]|
17135  * This is an asynchronous method. When the operation is finished, @callback will be invoked
17136  * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
17137  * of the thread you are calling this method from. You can then call
17138  * g_dbus_connection_call_finish() to get the result of the operation.
17139  * See g_dbus_connection_call_sync() for the synchronous version of this
17140  * function.
17141  *
17142  * Since: 2.26
17143  */
17144
17145
17146 /**
17147  * g_dbus_connection_call_finish:
17148  * @connection: A #GDBusConnection.
17149  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call().
17150  * @error: Return location for error or %NULL.
17151  *
17152  * Finishes an operation started with g_dbus_connection_call().
17153  * return values. Free with g_variant_unref().
17154  *
17155  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
17156  * Since: 2.26
17157  */
17158
17159
17160 /**
17161  * g_dbus_connection_call_sync:
17162  * @connection: A #GDBusConnection.
17163  * @bus_name: A unique or well-known bus name.
17164  * @object_path: Path of remote object.
17165  * @interface_name: D-Bus interface to invoke method on.
17166  * @method_name: The name of the method to invoke.
17167  * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
17168  * @reply_type: (allow-none): The expected type of the reply, or %NULL.
17169  * @flags: Flags from the #GDBusCallFlags enumeration.
17170  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
17171  * @cancellable: A #GCancellable or %NULL.
17172  * @error: Return location for error or %NULL.
17173  *
17174  * Synchronously invokes the @method_name method on the
17175  * If @connection is closed then the operation will fail with
17176  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the
17177  * operation will fail with %G_IO_ERROR_CANCELLED. If @parameters
17178  * contains a value not compatible with the D-Bus protocol, the operation
17179  * fails with %G_IO_ERROR_INVALID_ARGUMENT.
17180  * If @reply_type is non-%NULL then the reply will be checked for having
17181  * this type and an error will be raised if it does not match.  Said
17182  * another way, if you give a @reply_type then any non-%NULL return
17183  * value will be of this type.
17184  * If the @parameters #GVariant is floating, it is consumed.
17185  * This allows convenient 'inline' use of g_variant_new(), e.g.:
17186  * |[
17187  * g_dbus_connection_call_sync (connection,
17188  * "org.freedesktop.StringThings",
17189  * "/org/freedesktop/StringThings",
17190  * "org.freedesktop.StringThings",
17191  * "TwoStrings",
17192  * g_variant_new ("(ss)",
17193  * "Thing One",
17194  * "Thing Two"),
17195  * NULL,
17196  * G_DBUS_CALL_FLAGS_NONE,
17197  * -1,
17198  * NULL,
17199  * &amp;error);
17200  * ]|
17201  * The calling thread is blocked until a reply is received. See
17202  * g_dbus_connection_call() for the asynchronous version of
17203  * this method.
17204  * return values. Free with g_variant_unref().
17205  *
17206  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
17207  * Since: 2.26
17208  */
17209
17210
17211 /**
17212  * g_dbus_connection_close:
17213  * @connection: A #GDBusConnection.
17214  * @cancellable: A #GCancellable or %NULL.
17215  * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
17216  * @user_data: The data to pass to @callback.
17217  *
17218  * Closes @connection. Note that this never causes the process to
17219  * exit (this might only happen if the other end of a shared message
17220  * bus connection disconnects, see #GDBusConnection:exit-on-close).
17221  * Once the connection is closed, operations such as sending a message
17222  * will return with the error %G_IO_ERROR_CLOSED. Closing a connection
17223  * will not automatically flush the connection so queued messages may
17224  * be lost. Use g_dbus_connection_flush() if you need such guarantees.
17225  * If @connection is already closed, this method fails with
17226  * %G_IO_ERROR_CLOSED.
17227  * When @connection has been closed, the #GDBusConnection::closed
17228  * signal is emitted in the <link
17229  * linkend="g-main-context-push-thread-default">thread-default main
17230  * loop</link> of the thread that @connection was constructed in.
17231  * This is an asynchronous method. When the operation is finished,
17232  * linkend="g-main-context-push-thread-default">thread-default main
17233  * loop</link> of the thread you are calling this method from. You can
17234  * then call g_dbus_connection_close_finish() to get the result of the
17235  * operation.  See g_dbus_connection_close_sync() for the synchronous
17236  * version.
17237  *
17238  * Since: 2.26
17239  */
17240
17241
17242 /**
17243  * g_dbus_connection_close_finish:
17244  * @connection: A #GDBusConnection.
17245  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_close().
17246  * @error: Return location for error or %NULL.
17247  *
17248  * Finishes an operation started with g_dbus_connection_close().
17249  *
17250  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
17251  * Since: 2.26
17252  */
17253
17254
17255 /**
17256  * g_dbus_connection_close_sync:
17257  * @connection: A #GDBusConnection.
17258  * @cancellable: A #GCancellable or %NULL.
17259  * @error: Return location for error or %NULL.
17260  *
17261  * Synchronously closees @connection. The calling thread is blocked
17262  * until this is done. See g_dbus_connection_close() for the
17263  * asynchronous version of this method and more details about what it
17264  * does.
17265  *
17266  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
17267  * Since: 2.26
17268  */
17269
17270
17271 /**
17272  * g_dbus_connection_emit_signal:
17273  * @connection: A #GDBusConnection.
17274  * @destination_bus_name: (allow-none): The unique bus name for the destination for the signal or %NULL to emit to all listeners.
17275  * @object_path: Path of remote object.
17276  * @interface_name: D-Bus interface to emit a signal on.
17277  * @signal_name: The name of the signal to emit.
17278  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
17279  * @error: Return location for error or %NULL.
17280  *
17281  * Emits a signal.
17282  * If the parameters GVariant is floating, it is consumed.
17283  * This can only fail if @parameters is not compatible with the D-Bus protocol.
17284  *
17285  * Returns: %TRUE unless @error is set.
17286  * Since: 2.26
17287  */
17288
17289
17290 /**
17291  * g_dbus_connection_flush:
17292  * @connection: A #GDBusConnection.
17293  * @cancellable: A #GCancellable or %NULL.
17294  * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
17295  * @user_data: The data to pass to @callback.
17296  *
17297  * Asynchronously flushes @connection, that is, writes all queued
17298  * outgoing message to the transport and then flushes the transport
17299  * (using g_output_stream_flush_async()). This is useful in programs
17300  * that wants to emit a D-Bus signal and then exit
17301  * immediately. Without flushing the connection, there is no guarantee
17302  * that the message has been sent to the networking buffers in the OS
17303  * kernel.
17304  * This is an asynchronous method. When the operation is finished,
17305  * linkend="g-main-context-push-thread-default">thread-default main
17306  * loop</link> of the thread you are calling this method from. You can
17307  * then call g_dbus_connection_flush_finish() to get the result of the
17308  * operation.  See g_dbus_connection_flush_sync() for the synchronous
17309  * version.
17310  *
17311  * Since: 2.26
17312  */
17313
17314
17315 /**
17316  * g_dbus_connection_flush_finish:
17317  * @connection: A #GDBusConnection.
17318  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_flush().
17319  * @error: Return location for error or %NULL.
17320  *
17321  * Finishes an operation started with g_dbus_connection_flush().
17322  *
17323  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
17324  * Since: 2.26
17325  */
17326
17327
17328 /**
17329  * g_dbus_connection_flush_sync:
17330  * @connection: A #GDBusConnection.
17331  * @cancellable: A #GCancellable or %NULL.
17332  * @error: Return location for error or %NULL.
17333  *
17334  * Synchronously flushes @connection. The calling thread is blocked
17335  * until this is done. See g_dbus_connection_flush() for the
17336  * asynchronous version of this method and more details about what it
17337  * does.
17338  *
17339  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
17340  * Since: 2.26
17341  */
17342
17343
17344 /**
17345  * g_dbus_connection_get_capabilities:
17346  * @connection: A #GDBusConnection.
17347  *
17348  * Gets the capabilities negotiated with the remote peer
17349  *
17350  * Returns: Zero or more flags from the #GDBusCapabilityFlags enumeration.
17351  * Since: 2.26
17352  */
17353
17354
17355 /**
17356  * g_dbus_connection_get_exit_on_close:
17357  * @connection: A #GDBusConnection.
17358  *
17359  * Gets whether the process is terminated when @connection is
17360  * closed by the remote peer. See
17361  * #GDBusConnection:exit-on-close for more details.
17362  * closed by the remote peer.
17363  *
17364  * Returns: Whether the process is terminated when @connection is
17365  * Since: 2.26
17366  */
17367
17368
17369 /**
17370  * g_dbus_connection_get_guid:
17371  * @connection: A #GDBusConnection.
17372  *
17373  * The GUID of the peer performing the role of server when
17374  * authenticating. See #GDBusConnection:guid for more details.
17375  *
17376  * Returns: The GUID. Do not free this string, it is owned by
17377  * Since: 2.26
17378  */
17379
17380
17381 /**
17382  * g_dbus_connection_get_peer_credentials:
17383  * @connection: A #GDBusConnection.
17384  *
17385  * Gets the credentials of the authenticated peer. This will always
17386  * return %NULL unless @connection acted as a server
17387  * (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed)
17388  * when set up and the client passed credentials as part of the
17389  * authentication process.
17390  * In a message bus setup, the message bus is always the server and
17391  * each application is a client. So this method will always return
17392  * %NULL for message bus clients.
17393  * this object, it is owned by @connection.
17394  *
17395  * Returns: (transfer none): A #GCredentials or %NULL if not available. Do not free
17396  * Since: 2.26
17397  */
17398
17399
17400 /**
17401  * g_dbus_connection_get_stream:
17402  * @connection: a #GDBusConnection
17403  *
17404  * Gets the underlying stream used for IO.
17405  *
17406  * Returns: (transfer none): the stream used for IO
17407  * Since: 2.26
17408  */
17409
17410
17411 /**
17412  * g_dbus_connection_get_unique_name:
17413  * @connection: A #GDBusConnection.
17414  *
17415  * Gets the unique name of @connection as assigned by the message
17416  * bus. This can also be used to figure out if @connection is a
17417  * message bus connection.
17418  * bus connection. Do not free this string, it is owned by
17419  *
17420  * Returns: The unique name or %NULL if @connection is not a message
17421  * Since: 2.26
17422  */
17423
17424
17425 /**
17426  * g_dbus_connection_is_closed:
17427  * @connection: A #GDBusConnection.
17428  *
17429  * Gets whether @connection is closed.
17430  *
17431  * Returns: %TRUE if the connection is closed, %FALSE otherwise.
17432  * Since: 2.26
17433  */
17434
17435
17436 /**
17437  * g_dbus_connection_new:
17438  * @stream: A #GIOStream.
17439  * @guid: (allow-none): The GUID to use if a authenticating as a server or %NULL.
17440  * @flags: Flags describing how to make the connection.
17441  * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
17442  * @cancellable: A #GCancellable or %NULL.
17443  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
17444  * @user_data: The data to pass to @callback.
17445  *
17446  * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
17447  * with the end represented by @stream.
17448  * If @stream is a #GSocketConnection, then the corresponding #GSocket
17449  * will be put into non-blocking mode.
17450  * If @observer is not %NULL it may be used to control the
17451  * authentication process.
17452  * When the operation is finished, @callback will be invoked. You can
17453  * then call g_dbus_connection_new_finish() to get the result of the
17454  * operation.
17455  * This is a asynchronous failable constructor. See
17456  * g_dbus_connection_new_sync() for the synchronous
17457  * version.
17458  *
17459  * Since: 2.26
17460  */
17461
17462
17463 /**
17464  * g_dbus_connection_new_finish:
17465  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
17466  * @error: Return location for error or %NULL.
17467  *
17468  * Finishes an operation started with g_dbus_connection_new().
17469  *
17470  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
17471  * Since: 2.26
17472  */
17473
17474
17475 /**
17476  * g_dbus_connection_new_for_address:
17477  * @address: A D-Bus address.
17478  * @flags: Flags describing how to make the connection.
17479  * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
17480  * @cancellable: A #GCancellable or %NULL.
17481  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
17482  * @user_data: The data to pass to @callback.
17483  *
17484  * Asynchronously connects and sets up a D-Bus client connection for
17485  * exchanging D-Bus messages with an endpoint specified by @address
17486  * which must be in the D-Bus address format.
17487  * This constructor can only be used to initiate client-side
17488  * connections - use g_dbus_connection_new() if you need to act as the
17489  * server. In particular, @flags cannot contain the
17490  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
17491  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
17492  * When the operation is finished, @callback will be invoked. You can
17493  * then call g_dbus_connection_new_finish() to get the result of the
17494  * operation.
17495  * If @observer is not %NULL it may be used to control the
17496  * authentication process.
17497  * This is a asynchronous failable constructor. See
17498  * g_dbus_connection_new_for_address_sync() for the synchronous
17499  * version.
17500  *
17501  * Since: 2.26
17502  */
17503
17504
17505 /**
17506  * g_dbus_connection_new_for_address_finish:
17507  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
17508  * @error: Return location for error or %NULL.
17509  *
17510  * Finishes an operation started with g_dbus_connection_new_for_address().
17511  *
17512  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
17513  * Since: 2.26
17514  */
17515
17516
17517 /**
17518  * g_dbus_connection_new_for_address_sync:
17519  * @address: A D-Bus address.
17520  * @flags: Flags describing how to make the connection.
17521  * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
17522  * @cancellable: A #GCancellable or %NULL.
17523  * @error: Return location for error or %NULL.
17524  *
17525  * Synchronously connects and sets up a D-Bus client connection for
17526  * exchanging D-Bus messages with an endpoint specified by @address
17527  * which must be in the D-Bus address format.
17528  * This constructor can only be used to initiate client-side
17529  * connections - use g_dbus_connection_new_sync() if you need to act
17530  * as the server. In particular, @flags cannot contain the
17531  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
17532  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
17533  * This is a synchronous failable constructor. See
17534  * g_dbus_connection_new_for_address() for the asynchronous version.
17535  * If @observer is not %NULL it may be used to control the
17536  * authentication process.
17537  *
17538  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
17539  * Since: 2.26
17540  */
17541
17542
17543 /**
17544  * g_dbus_connection_new_sync:
17545  * @stream: A #GIOStream.
17546  * @guid: (allow-none): The GUID to use if a authenticating as a server or %NULL.
17547  * @flags: Flags describing how to make the connection.
17548  * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
17549  * @cancellable: A #GCancellable or %NULL.
17550  * @error: Return location for error or %NULL.
17551  *
17552  * Synchronously sets up a D-Bus connection for exchanging D-Bus messages
17553  * with the end represented by @stream.
17554  * If @stream is a #GSocketConnection, then the corresponding #GSocket
17555  * will be put into non-blocking mode.
17556  * If @observer is not %NULL it may be used to control the
17557  * authentication process.
17558  * This is a synchronous failable constructor. See
17559  * g_dbus_connection_new() for the asynchronous version.
17560  *
17561  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
17562  * Since: 2.26
17563  */
17564
17565
17566 /**
17567  * g_dbus_connection_register_object:
17568  * @connection: A #GDBusConnection.
17569  * @object_path: The object path to register at.
17570  * @interface_info: Introspection data for the interface.
17571  * @vtable: (allow-none): A #GDBusInterfaceVTable to call into or %NULL.
17572  * @user_data: Data to pass to functions in @vtable.
17573  * @user_data_free_func: Function to call when the object path is unregistered.
17574  * @error: Return location for error or %NULL.
17575  *
17576  * Registers callbacks for exported objects at @object_path with the
17577  * D-Bus interface that is described in @interface_info.
17578  * Calls to functions in @vtable (and @user_data_free_func) will
17579  * happen in the <link linkend="g-main-context-push-thread-default">thread-default main
17580  * loop</link> of the thread you are calling this method from.
17581  * Note that all #GVariant values passed to functions in @vtable will match
17582  * the signature given in @interface_info - if a remote caller passes
17583  * incorrect values, the <literal>org.freedesktop.DBus.Error.InvalidArgs</literal>
17584  * is returned to the remote caller.
17585  * Additionally, if the remote caller attempts to invoke methods or
17586  * access properties not mentioned in @interface_info the
17587  * <literal>org.freedesktop.DBus.Error.UnknownMethod</literal> resp.
17588  * <literal>org.freedesktop.DBus.Error.InvalidArgs</literal> errors
17589  * are returned to the caller.
17590  * It is considered a programming error if the
17591  * #GDBusInterfaceGetPropertyFunc function in @vtable returns a
17592  * #GVariant of incorrect type.
17593  * If an existing callback is already registered at @object_path and
17594  * GDBus automatically implements the standard D-Bus interfaces
17595  * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
17596  * and org.freedesktop.Peer, so you don't have to implement those for
17597  * the objects you export. You <emphasis>can</emphasis> implement
17598  * org.freedesktop.DBus.Properties yourself, e.g. to handle getting
17599  * and setting of properties asynchronously.
17600  * Note that the reference count on @interface_info will be
17601  * incremented by 1 (unless allocated statically, e.g. if the
17602  * reference count is -1, see g_dbus_interface_info_ref()) for as long
17603  * as the object is exported. Also note that @vtable will be copied.
17604  * See <xref linkend="gdbus-server"/> for an example of how to use this method.
17605  * that can be used with g_dbus_connection_unregister_object() .
17606  *
17607  * Returns: 0 if @error is set, otherwise a registration id (never 0)
17608  * Since: 2.26
17609  */
17610
17611
17612 /**
17613  * g_dbus_connection_register_subtree:
17614  * @connection: A #GDBusConnection.
17615  * @object_path: The object path to register the subtree at.
17616  * @vtable: A #GDBusSubtreeVTable to enumerate, introspect and dispatch nodes in the subtree.
17617  * @flags: Flags used to fine tune the behavior of the subtree.
17618  * @user_data: Data to pass to functions in @vtable.
17619  * @user_data_free_func: Function to call when the subtree is unregistered.
17620  * @error: Return location for error or %NULL.
17621  *
17622  * Registers a whole subtree of <quote>dynamic</quote> objects.
17623  * The @enumerate and @introspection functions in @vtable are used to
17624  * convey, to remote callers, what nodes exist in the subtree rooted
17625  * by @object_path.
17626  * When handling remote calls into any node in the subtree, first the
17627  * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set
17628  * the @introspection function is used to check if the node supports the
17629  * requested method. If so, the @dispatch function is used to determine
17630  * where to dispatch the call. The collected #GDBusInterfaceVTable and
17631  * #gpointer will be used to call into the interface vtable for processing
17632  * the request.
17633  * All calls into user-provided code will be invoked in the <link
17634  * linkend="g-main-context-push-thread-default">thread-default main
17635  * loop</link> of the thread you are calling this method from.
17636  * If an existing subtree is already registered at @object_path or
17637  * then @error is set to #G_IO_ERROR_EXISTS.
17638  * Note that it is valid to register regular objects (using
17639  * g_dbus_connection_register_object()) in a subtree registered with
17640  * g_dbus_connection_register_subtree() - if so, the subtree handler
17641  * is tried as the last resort. One way to think about a subtree
17642  * handler is to consider it a <quote>fallback handler</quote>
17643  * for object paths not registered via g_dbus_connection_register_object()
17644  * or other bindings.
17645  * Note that @vtable will be copied so you cannot change it after
17646  * registration.
17647  * See <xref linkend="gdbus-subtree-server"/> for an example of how to use this method.
17648  * that can be used with g_dbus_connection_unregister_subtree() .
17649  *
17650  * Returns: 0 if @error is set, otherwise a subtree registration id (never 0)
17651  * Since: 2.26
17652  */
17653
17654
17655 /**
17656  * g_dbus_connection_remove_filter:
17657  * @connection: a #GDBusConnection
17658  * @filter_id: an identifier obtained from g_dbus_connection_add_filter()
17659  *
17660  * Removes a filter.
17661  *
17662  * Since: 2.26
17663  */
17664
17665
17666 /**
17667  * g_dbus_connection_send_message:
17668  * @connection: A #GDBusConnection.
17669  * @message: A #GDBusMessage
17670  * @flags: Flags affecting how the message is sent.
17671  * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
17672  * @error: Return location for error or %NULL.
17673  *
17674  * Asynchronously sends @message to the peer represented by @connection.
17675  * Unless @flags contain the
17676  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
17677  * will be assigned by @connection and set on @message via
17678  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
17679  * serial number used will be written to this location prior to
17680  * submitting the message to the underlying transport.
17681  * If @connection is closed then the operation will fail with
17682  * %G_IO_ERROR_CLOSED. If @message is not well-formed,
17683  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
17684  * See <xref linkend="gdbus-server"/> and <xref
17685  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17686  * low-level API to send and receive UNIX file descriptors.
17687  * Note that @message must be unlocked, unless @flags contain the
17688  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
17689  * transmission, %FALSE if @error is set.
17690  *
17691  * Returns: %TRUE if the message was well-formed and queued for
17692  * Since: 2.26
17693  */
17694
17695
17696 /**
17697  * g_dbus_connection_send_message_with_reply:
17698  * @connection: A #GDBusConnection.
17699  * @message: A #GDBusMessage.
17700  * @flags: Flags affecting how the message is sent.
17701  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
17702  * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
17703  * @cancellable: A #GCancellable or %NULL.
17704  * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
17705  * @user_data: The data to pass to @callback.
17706  *
17707  * Asynchronously sends @message to the peer represented by @connection.
17708  * Unless @flags contain the
17709  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
17710  * will be assigned by @connection and set on @message via
17711  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
17712  * serial number used will be written to this location prior to
17713  * submitting the message to the underlying transport.
17714  * If @connection is closed then the operation will fail with
17715  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
17716  * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
17717  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
17718  * This is an asynchronous method. When the operation is finished, @callback will be invoked
17719  * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
17720  * of the thread you are calling this method from. You can then call
17721  * g_dbus_connection_send_message_with_reply_finish() to get the result of the operation.
17722  * See g_dbus_connection_send_message_with_reply_sync() for the synchronous version.
17723  * Note that @message must be unlocked, unless @flags contain the
17724  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
17725  * See <xref linkend="gdbus-server"/> and <xref
17726  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17727  * low-level API to send and receive UNIX file descriptors.
17728  *
17729  * Since: 2.26
17730  */
17731
17732
17733 /**
17734  * g_dbus_connection_send_message_with_reply_finish:
17735  * @connection: a #GDBusConnection
17736  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_send_message_with_reply().
17737  * @error: Return location for error or %NULL.
17738  *
17739  * Finishes an operation started with g_dbus_connection_send_message_with_reply().
17740  * Note that @error is only set if a local in-process error
17741  * occured. That is to say that the returned #GDBusMessage object may
17742  * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
17743  * g_dbus_message_to_gerror() to transcode this to a #GError.
17744  * See <xref linkend="gdbus-server"/> and <xref
17745  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17746  * low-level API to send and receive UNIX file descriptors.
17747  *
17748  * Returns: (transfer full): A locked #GDBusMessage or %NULL if @error is set.
17749  * Since: 2.26
17750  */
17751
17752
17753 /**
17754  * g_dbus_connection_send_message_with_reply_sync:
17755  * @connection: A #GDBusConnection.
17756  * @message: A #GDBusMessage.
17757  * @flags: Flags affecting how the message is sent.
17758  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
17759  * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
17760  * @cancellable: A #GCancellable or %NULL.
17761  * @error: Return location for error or %NULL.
17762  *
17763  * Synchronously sends @message to the peer represented by @connection
17764  * and blocks the calling thread until a reply is received or the
17765  * timeout is reached. See g_dbus_connection_send_message_with_reply()
17766  * for the asynchronous version of this method.
17767  * Unless @flags contain the
17768  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
17769  * will be assigned by @connection and set on @message via
17770  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
17771  * serial number used will be written to this location prior to
17772  * submitting the message to the underlying transport.
17773  * If @connection is closed then the operation will fail with
17774  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
17775  * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
17776  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
17777  * Note that @error is only set if a local in-process error
17778  * occured. That is to say that the returned #GDBusMessage object may
17779  * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
17780  * g_dbus_message_to_gerror() to transcode this to a #GError.
17781  * See <xref linkend="gdbus-server"/> and <xref
17782  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17783  * low-level API to send and receive UNIX file descriptors.
17784  * Note that @message must be unlocked, unless @flags contain the
17785  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
17786  *
17787  * Returns: (transfer full): A locked #GDBusMessage that is the reply to @message or %NULL if @error is set.
17788  * Since: 2.26
17789  */
17790
17791
17792 /**
17793  * g_dbus_connection_set_exit_on_close:
17794  * @connection: A #GDBusConnection.
17795  * @exit_on_close: Whether the process should be terminated when @connection is closed by the remote peer.
17796  *
17797  * Sets whether the process should be terminated when @connection is
17798  * closed by the remote peer. See #GDBusConnection:exit-on-close for
17799  * more details.
17800  * Note that this function should be used with care. Most modern UNIX
17801  * desktops tie the notion of a user session the session bus, and expect
17802  * all of a users applications to quit when their bus connection goes away.
17803  * If you are setting @exit_on_close to %FALSE for the shared session
17804  * bus connection, you should make sure that your application exits
17805  * when the user session ends.
17806  *
17807  * Since: 2.26
17808  */
17809
17810
17811 /**
17812  * g_dbus_connection_signal_subscribe:
17813  * @connection: A #GDBusConnection.
17814  * @sender: (allow-none): Sender name to match on (unique or well-known name) or %NULL to listen from all senders.
17815  * @interface_name: (allow-none): D-Bus interface name to match on or %NULL to match on all interfaces.
17816  * @member: (allow-none): D-Bus signal name to match on or %NULL to match on all signals.
17817  * @object_path: (allow-none): Object path to match on or %NULL to match on all object paths.
17818  * @arg0: (allow-none): Contents of first string argument to match on or %NULL to match on all kinds of arguments.
17819  * @flags: Flags describing how to subscribe to the signal (currently unused).
17820  * @callback: Callback to invoke when there is a signal matching the requested data.
17821  * @user_data: User data to pass to @callback.
17822  * @user_data_free_func: Function to free @user_data with when subscription is removed or %NULL.
17823  *
17824  * Subscribes to signals on @connection and invokes @callback with a
17825  * whenever the signal is received. Note that @callback
17826  * will be invoked in the <link
17827  * linkend="g-main-context-push-thread-default">thread-default main
17828  * loop</link> of the thread you are calling this method from.
17829  * If @connection is not a message bus connection, @sender must be
17830  * %NULL.
17831  * If @sender is a well-known name note that @callback is invoked with
17832  * the unique name for the owner of @sender, not the well-known name
17833  * as one would expect. This is because the message bus rewrites the
17834  * name. As such, to avoid certain race conditions, users should be
17835  * tracking the name owner of the well-known name and use that when
17836  * processing the received signal.
17837  *
17838  * Returns: A subscription identifier that can be used with g_dbus_connection_signal_unsubscribe().
17839  * Since: 2.26
17840  */
17841
17842
17843 /**
17844  * g_dbus_connection_signal_unsubscribe:
17845  * @connection: A #GDBusConnection.
17846  * @subscription_id: A subscription id obtained from g_dbus_connection_signal_subscribe().
17847  *
17848  * Unsubscribes from signals.
17849  *
17850  * Since: 2.26
17851  */
17852
17853
17854 /**
17855  * g_dbus_connection_start_message_processing:
17856  * @connection: A #GDBusConnection.
17857  *
17858  * If @connection was created with
17859  * %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method
17860  * starts processing messages. Does nothing on if @connection wasn't
17861  * created with this flag or if the method has already been called.
17862  *
17863  * Since: 2.26
17864  */
17865
17866
17867 /**
17868  * g_dbus_connection_unregister_object:
17869  * @connection: A #GDBusConnection.
17870  * @registration_id: A registration id obtained from g_dbus_connection_register_object().
17871  *
17872  * Unregisters an object.
17873  *
17874  * Returns: %TRUE if the object was unregistered, %FALSE otherwise.
17875  * Since: 2.26
17876  */
17877
17878
17879 /**
17880  * g_dbus_connection_unregister_subtree:
17881  * @connection: A #GDBusConnection.
17882  * @registration_id: A subtree registration id obtained from g_dbus_connection_register_subtree().
17883  *
17884  * Unregisters a subtree.
17885  *
17886  * Returns: %TRUE if the subtree was unregistered, %FALSE otherwise.
17887  * Since: 2.26
17888  */
17889
17890
17891 /**
17892  * g_dbus_error_encode_gerror:
17893  * @error: A #GError.
17894  *
17895  * Creates a D-Bus error name to use for @error. If @error matches
17896  * a registered error (cf. g_dbus_error_register_error()), the corresponding
17897  * D-Bus error name will be returned.
17898  * Otherwise the a name of the form
17899  * <literal>org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE</literal>
17900  * will be used. This allows other GDBus applications to map the error
17901  * on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
17902  * This function is typically only used in object mappings to put a
17903  * #GError on the wire. Regular applications should not use it.
17904  *
17905  * Returns: A D-Bus error name (never %NULL). Free with g_free().
17906  * Since: 2.26
17907  */
17908
17909
17910 /**
17911  * g_dbus_error_get_remote_error:
17912  * @error: A #GError.
17913  *
17914  * Gets the D-Bus error name used for @error, if any.
17915  * This function is guaranteed to return a D-Bus error name for all
17916  * #GError<!-- -->s returned from functions handling remote method
17917  * calls (e.g. g_dbus_connection_call_finish()) unless
17918  * g_dbus_error_strip_remote_error() has been used on @error.
17919  *
17920  * Returns: An allocated string or %NULL if the D-Bus error name could not be found. Free with g_free().
17921  * Since: 2.26
17922  */
17923
17924
17925 /**
17926  * g_dbus_error_is_remote_error:
17927  * @error: A #GError.
17928  *
17929  * Checks if @error represents an error received via D-Bus from a remote peer. If so,
17930  * use g_dbus_error_get_remote_error() to get the name of the error.
17931  * %FALSE otherwise.
17932  *
17933  * Returns: %TRUE if @error represents an error from a remote peer,
17934  * Since: 2.26
17935  */
17936
17937
17938 /**
17939  * g_dbus_error_new_for_dbus_error:
17940  * @dbus_error_name: D-Bus error name.
17941  * @dbus_error_message: D-Bus error message.
17942  *
17943  * Creates a #GError based on the contents of @dbus_error_name and
17944  * Errors registered with g_dbus_error_register_error() will be looked
17945  * up using @dbus_error_name and if a match is found, the error domain
17946  * and code is used. Applications can use g_dbus_error_get_remote_error()
17947  * to recover @dbus_error_name.
17948  * If a match against a registered error is not found and the D-Bus
17949  * error name is in a form as returned by g_dbus_error_encode_gerror()
17950  * the error domain and code encoded in the name is used to
17951  * create the #GError. Also, @dbus_error_name is added to the error message
17952  * such that it can be recovered with g_dbus_error_get_remote_error().
17953  * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR
17954  * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is
17955  * added to the error message such that it can be recovered with
17956  * g_dbus_error_get_remote_error().
17957  * In all three cases, @dbus_error_name can always be recovered from the
17958  * returned #GError using the g_dbus_error_get_remote_error() function
17959  * (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
17960  * This function is typically only used in object mappings to prepare
17961  * #GError instances for applications. Regular applications should not use
17962  * it.
17963  *
17964  * Returns: An allocated #GError. Free with g_error_free().
17965  * Since: 2.26
17966  */
17967
17968
17969 /**
17970  * g_dbus_error_register_error:
17971  * @error_domain: A #GQuark for a error domain.
17972  * @error_code: An error code.
17973  * @dbus_error_name: A D-Bus error name.
17974  *
17975  * Creates an association to map between @dbus_error_name and
17976  * #GError<!-- -->s specified by @error_domain and @error_code.
17977  * This is typically done in the routine that returns the #GQuark for
17978  * an error domain.
17979  * exists.
17980  *
17981  * Returns: %TRUE if the association was created, %FALSE if it already
17982  * Since: 2.26
17983  */
17984
17985
17986 /**
17987  * g_dbus_error_register_error_domain:
17988  * @error_domain_quark_name: The error domain name.
17989  * @quark_volatile: A pointer where to store the #GQuark.
17990  * @entries: A pointer to @num_entries #GDBusErrorEntry struct items.
17991  * @num_entries: Number of items to register.
17992  *
17993  * Helper function for associating a #GError error domain with D-Bus error names.
17994  *
17995  * Since: 2.26
17996  */
17997
17998
17999 /**
18000  * g_dbus_error_set_dbus_error:
18001  * @error: A pointer to a #GError or %NULL.
18002  * @dbus_error_name: D-Bus error name.
18003  * @dbus_error_message: D-Bus error message.
18004  * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
18005  * @...: Arguments for @format.
18006  *
18007  * Does nothing if @error is %NULL. Otherwise sets *@error to
18008  * a new #GError created with g_dbus_error_new_for_dbus_error()
18009  * with @dbus_error_message prepend with @format (unless %NULL).
18010  *
18011  * Since: 2.26
18012  */
18013
18014
18015 /**
18016  * g_dbus_error_set_dbus_error_valist:
18017  * @error: A pointer to a #GError or %NULL.
18018  * @dbus_error_name: D-Bus error name.
18019  * @dbus_error_message: D-Bus error message.
18020  * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
18021  * @var_args: Arguments for @format.
18022  *
18023  * Like g_dbus_error_set_dbus_error() but intended for language bindings.
18024  *
18025  * Since: 2.26
18026  */
18027
18028
18029 /**
18030  * g_dbus_error_strip_remote_error:
18031  * @error: A #GError.
18032  *
18033  * Looks for extra information in the error message used to recover
18034  * the D-Bus error name and strips it if found. If stripped, the
18035  * message field in @error will correspond exactly to what was
18036  * received on the wire.
18037  * This is typically used when presenting errors to the end user.
18038  *
18039  * Returns: %TRUE if information was stripped, %FALSE otherwise.
18040  * Since: 2.26
18041  */
18042
18043
18044 /**
18045  * g_dbus_error_unregister_error:
18046  * @error_domain: A #GQuark for a error domain.
18047  * @error_code: An error code.
18048  * @dbus_error_name: A D-Bus error name.
18049  *
18050  * Destroys an association previously set up with g_dbus_error_register_error().
18051  *
18052  * Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found.
18053  * Since: 2.26
18054  */
18055
18056
18057 /**
18058  * g_dbus_generate_guid:
18059  *
18060  * Generate a D-Bus GUID that can be used with
18061  * e.g. g_dbus_connection_new().
18062  * See the D-Bus specification regarding what strings are valid D-Bus
18063  * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
18064  *
18065  * Returns: A valid D-Bus GUID. Free with g_free().
18066  * Since: 2.26
18067  */
18068
18069
18070 /**
18071  * g_dbus_gvalue_to_gvariant:
18072  * @gvalue: A #GValue to convert to a #GVariant.
18073  * @type: A #GVariantType.
18074  *
18075  * Converts a #GValue to a #GVariant of the type indicated by the @type parameter.
18076  * The conversion is using the following rules:
18077  * <table frame='all'>
18078  * <title>#GValue / #GVariant conversion rules</title>
18079  * <tgroup cols='2' align='left' colsep='1' rowsep='1'>
18080  * <thead>
18081  * <row>
18082  * <entry>If the #GType for @gvalue is...</entry>
18083  * <entry>... then @type must be</entry>
18084  * </row>
18085  * </thead>
18086  * <tbody>
18087  * <row>
18088  * <entry>#G_TYPE_STRING</entry>
18089  * <entry><link linkend="G-VARIANT-TYPE-STRING:CAPS">'s'</link>, <link linkend="G-VARIANT-TYPE-OBJECT-PATH:CAPS">'o'</link>, <link linkend="G-VARIANT-TYPE-SIGNATURE:CAPS">'g'</link> or <link linkend="G-VARIANT-TYPE-BYTESTRING:CAPS">'ay'</link></entry>
18090  * </row>
18091  * <row>
18092  * <entry>#G_TYPE_STRV</entry>
18093  * <entry><link linkend="G-VARIANT-TYPE-STRING-ARRAY:CAPS">'as'</link> or <link linkend="G-VARIANT-TYPE-BYTESTRING-ARRAY:CAPS">'aay'</link></entry>
18094  * </row>
18095  * <row>
18096  * <entry>#G_TYPE_BOOLEAN</entry>
18097  * <entry><link linkend="G-VARIANT-TYPE-BOOLEAN:CAPS">'b'</link></entry>
18098  * </row>
18099  * <row>
18100  * <entry>#G_TYPE_UCHAR</entry>
18101  * <entry><link linkend="G-VARIANT-TYPE-BYTE:CAPS">'y'</link></entry>
18102  * </row>
18103  * <row>
18104  * <entry>#G_TYPE_INT</entry>
18105  * <entry><link linkend="G-VARIANT-TYPE-INT32:CAPS">'i'</link> or <link linkend="G-VARIANT-TYPE-INT16:CAPS">'n'</link></entry>
18106  * </row>
18107  * <row>
18108  * <entry>#G_TYPE_UINT</entry>
18109  * <entry><link linkend="G-VARIANT-TYPE-UINT32:CAPS">'u'</link> or <link linkend="G-VARIANT-TYPE-UINT16:CAPS">'q'</link></entry>
18110  * </row>
18111  * <row>
18112  * <entry>#G_TYPE_INT64</entry>
18113  * <entry><link linkend="G-VARIANT-TYPE-INT64:CAPS">'x'</link></entry>
18114  * </row>
18115  * <row>
18116  * <entry>#G_TYPE_UINT64</entry>
18117  * <entry><link linkend="G-VARIANT-TYPE-UINT64:CAPS">'t'</link></entry>
18118  * </row>
18119  * <row>
18120  * <entry>#G_TYPE_INT</entry>
18121  * <entry><link linkend="G-VARIANT-TYPE-HANDLE:CAPS">'h'</link></entry>
18122  * </row>
18123  * <row>
18124  * <entry>#G_TYPE_DOUBLE</entry>
18125  * <entry><link linkend="G-VARIANT-TYPE-DOUBLE:CAPS">'d'</link></entry>
18126  * </row>
18127  * <row>
18128  * <entry>#G_TYPE_VARIANT</entry>
18129  * <entry>Any #GVariantType</entry>
18130  * </row>
18131  * </tbody>
18132  * </tgroup>
18133  * </table>
18134  * This can fail if e.g. @gvalue is of type #G_TYPE_STRING and @type
18135  * is <link linkend="G-VARIANT-TYPE-INT32:CAPS">'i'</link>. It will
18136  * also fail for any #GType (including e.g. #G_TYPE_OBJECT and
18137  * #G_TYPE_BOXED derived-types) not in the table above.
18138  * Note that if @gvalue is of type #G_TYPE_VARIANT and its value is
18139  * %NULL, the <emphasis>empty</emphasis> #GVariant instance (never
18140  * %NULL) for @type is returned (e.g. 0 for scalar types, the empty
18141  * string for string types, <literal>'/'</literal> for object path
18142  * types, the empty array for any array type and so on).
18143  * See the g_dbus_gvariant_to_gvalue() function for how to convert a
18144  * #GVariant to a #GValue.
18145  * failure. Free with g_variant_unref().
18146  *
18147  * Returns: A #GVariant (never floating) of #GVariantType
18148  * Since: 2.30
18149  */
18150
18151
18152 /**
18153  * g_dbus_gvariant_to_gvalue:
18154  * @value: A #GVariant.
18155  * @out_gvalue: Return location pointing to a zero-filled (uninitialized) #GValue.
18156  *
18157  * Converts a #GVariant to a #GValue. If @value is floating, it is consumed.
18158  * The rules specified in the g_dbus_gvalue_to_gvariant() function are
18159  * used - this function is essentially its reverse form.
18160  * The conversion never fails - a valid #GValue is always returned in
18161  *
18162  * Since: 2.30
18163  */
18164
18165
18166 /**
18167  * g_dbus_interface_get_info:
18168  * @interface_: An exported D-Bus interface.
18169  *
18170  * Gets D-Bus introspection information for the D-Bus interface
18171  * implemented by @interface_.
18172  *
18173  * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
18174  * Since: 2.30
18175  */
18176
18177
18178 /**
18179  * g_dbus_interface_get_object:
18180  * @interface_: An exported D-Bus interface.
18181  *
18182  * Gets the #GDBusObject that @interface_ belongs to, if any.
18183  * reference belongs to @interface_ and should not be freed.
18184  *
18185  * Returns: (transfer none): A #GDBusObject or %NULL. The returned
18186  * Since: 2.30
18187  */
18188
18189
18190 /**
18191  * g_dbus_interface_info_cache_build:
18192  * @info: A #GDBusInterfaceInfo.
18193  *
18194  * Builds a lookup-cache to speed up
18195  * g_dbus_interface_info_lookup_method(),
18196  * g_dbus_interface_info_lookup_signal() and
18197  * g_dbus_interface_info_lookup_property().
18198  * If this has already been called with @info, the existing cache is
18199  * used and its use count is increased.
18200  * Note that @info cannot be modified until
18201  * g_dbus_interface_info_cache_release() is called.
18202  *
18203  * Since: 2.30
18204  */
18205
18206
18207 /**
18208  * g_dbus_interface_info_cache_release:
18209  * @info: A GDBusInterfaceInfo
18210  *
18211  * Decrements the usage count for the cache for @info built by
18212  * g_dbus_interface_info_cache_build() (if any) and frees the
18213  * resources used by the cache if the usage count drops to zero.
18214  *
18215  * Since: 2.30
18216  */
18217
18218
18219 /**
18220  * g_dbus_interface_info_generate_xml:
18221  * @info: A #GDBusNodeInfo
18222  * @indent: Indentation level.
18223  * @string_builder: A #GString to to append XML data to.
18224  *
18225  * Appends an XML representation of @info (and its children) to @string_builder.
18226  * This function is typically used for generating introspection XML
18227  * documents at run-time for handling the
18228  * <literal>org.freedesktop.DBus.Introspectable.Introspect</literal>
18229  * method.
18230  *
18231  * Since: 2.26
18232  */
18233
18234
18235 /**
18236  * g_dbus_interface_info_lookup_method:
18237  * @info: A #GDBusInterfaceInfo.
18238  * @name: A D-Bus method name (typically in CamelCase)
18239  *
18240  * Looks up information about a method.
18241  * This cost of this function is O(n) in number of methods unless
18242  * g_dbus_interface_info_cache_build() has been used on @info.
18243  *
18244  * Returns: A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info.
18245  * Since: 2.26
18246  */
18247
18248
18249 /**
18250  * g_dbus_interface_info_lookup_property:
18251  * @info: A #GDBusInterfaceInfo.
18252  * @name: A D-Bus property name (typically in CamelCase).
18253  *
18254  * Looks up information about a property.
18255  * This cost of this function is O(n) in number of properties unless
18256  * g_dbus_interface_info_cache_build() has been used on @info.
18257  *
18258  * Returns: A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info.
18259  * Since: 2.26
18260  */
18261
18262
18263 /**
18264  * g_dbus_interface_info_lookup_signal:
18265  * @info: A #GDBusInterfaceInfo.
18266  * @name: A D-Bus signal name (typically in CamelCase)
18267  *
18268  * Looks up information about a signal.
18269  * This cost of this function is O(n) in number of signals unless
18270  * g_dbus_interface_info_cache_build() has been used on @info.
18271  *
18272  * Returns: A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info.
18273  * Since: 2.26
18274  */
18275
18276
18277 /**
18278  * g_dbus_interface_info_ref:
18279  * @info: A #GDBusInterfaceInfo
18280  *
18281  * If @info is statically allocated does nothing. Otherwise increases
18282  * the reference count.
18283  *
18284  * Returns: The same @info.
18285  * Since: 2.26
18286  */
18287
18288
18289 /**
18290  * g_dbus_interface_info_unref:
18291  * @info: A #GDBusInterfaceInfo.
18292  *
18293  * If @info is statically allocated, does nothing. Otherwise decreases
18294  * the reference count of @info. When its reference count drops to 0,
18295  * the memory used is freed.
18296  *
18297  * Since: 2.26
18298  */
18299
18300
18301 /**
18302  * g_dbus_interface_set_object:
18303  * @interface_: An exported D-Bus interface.
18304  * @object: A #GDBusObject or %NULL.
18305  *
18306  * Sets the #GDBusObject for @interface_ to @object.
18307  * Note that @interface_ will hold a weak reference to @object.
18308  *
18309  * Since: 2.30
18310  */
18311
18312
18313 /**
18314  * g_dbus_interface_skeleton_export:
18315  * @interface_: The D-Bus interface to export.
18316  * @connection: A #GDBusConnection to export @interface_ on.
18317  * @object_path: The path to export the interface at.
18318  * @error: Return location for error or %NULL.
18319  *
18320  * Exports @interface_ at @object_path on @connection.
18321  * Use g_dbus_interface_skeleton_unexport() to unexport the object.
18322  *
18323  * Returns: %TRUE if the interface was exported, other %FALSE with
18324  * Since: 2.30
18325  */
18326
18327
18328 /**
18329  * g_dbus_interface_skeleton_flush:
18330  * @interface_: A #GDBusInterfaceSkeleton.
18331  *
18332  * If @interface_ has outstanding changes, request for these changes to be
18333  * emitted immediately.
18334  * For example, an exported D-Bus interface may queue up property
18335  * changes and emit the
18336  * <literal>org.freedesktop.DBus.Properties::PropertiesChanged</literal>
18337  * signal later (e.g. in an idle handler). This technique is useful
18338  * for collapsing multiple property changes into one.
18339  *
18340  * Since: 2.30
18341  */
18342
18343
18344 /**
18345  * g_dbus_interface_skeleton_get_connection:
18346  * @interface_: A #GDBusInterfaceSkeleton.
18347  *
18348  * Gets the connection that @interface_ is exported on, if any.
18349  * not exported anywhere. Do not free, the object belongs to @interface_.
18350  *
18351  * Returns: (transfer none): A #GDBusConnection or %NULL if @interface_ is
18352  * Since: 2.30
18353  */
18354
18355
18356 /**
18357  * g_dbus_interface_skeleton_get_flags:
18358  * @interface_: A #GDBusInterfaceSkeleton.
18359  *
18360  * Gets the #GDBusInterfaceSkeletonFlags that describes what the behavior
18361  * of @interface_
18362  *
18363  * Returns: One or more flags from the #GDBusInterfaceSkeletonFlags enumeration.
18364  * Since: 2.30
18365  */
18366
18367
18368 /**
18369  * g_dbus_interface_skeleton_get_info:
18370  * @interface_: A #GDBusInterfaceSkeleton.
18371  *
18372  * Gets D-Bus introspection information for the D-Bus interface
18373  * implemented by @interface_.
18374  *
18375  * Returns: (transfer none): A #GDBusInterfaceInfo (never %NULL). Do not free.
18376  * Since: 2.30
18377  */
18378
18379
18380 /**
18381  * g_dbus_interface_skeleton_get_object_path:
18382  * @interface_: A #GDBusInterfaceSkeleton.
18383  *
18384  * Gets the object path that @interface_ is exported on, if any.
18385  * anywhere. Do not free, the string belongs to @interface_.
18386  *
18387  * Returns: A string owned by @interface_ or %NULL if @interface_ is not exported
18388  * Since: 2.30
18389  */
18390
18391
18392 /**
18393  * g_dbus_interface_skeleton_get_properties:
18394  * @interface_: A #GDBusInterfaceSkeleton.
18395  *
18396  * Gets all D-Bus properties for @interface_.
18397  *
18398  * Returns: A new, floating, #GVariant of type <link linkend="G-VARIANT-TYPE-VARDICT:CAPS">'a{sv}'</link>. Free with g_variant_unref().
18399  * Since: 2.30
18400  */
18401
18402
18403 /**
18404  * g_dbus_interface_skeleton_get_vtable: (skip)
18405  * @interface_: A #GDBusInterfaceSkeleton.
18406  *
18407  * Gets the interface vtable for the D-Bus interface implemented by
18408  * itself to be passed as @user_data.
18409  *
18410  * Returns: A #GDBusInterfaceVTable (never %NULL).
18411  * Since: 2.30
18412  */
18413
18414
18415 /**
18416  * g_dbus_interface_skeleton_set_flags:
18417  * @interface_: A #GDBusInterfaceSkeleton.
18418  * @flags: Flags from the #GDBusInterfaceSkeletonFlags enumeration.
18419  *
18420  * Sets flags describing what the behavior of @skeleton should be.
18421  *
18422  * Since: 2.30
18423  */
18424
18425
18426 /**
18427  * g_dbus_interface_skeleton_unexport:
18428  * @interface_: A #GDBusInterfaceSkeleton.
18429  *
18430  * Stops exporting an interface previously exported with
18431  * g_dbus_interface_skeleton_export().
18432  *
18433  * Since: 2.30
18434  */
18435
18436
18437 /**
18438  * g_dbus_is_address:
18439  * @string: A string.
18440  *
18441  * Checks if @string is a D-Bus address.
18442  * This doesn't check if @string is actually supported by #GDBusServer
18443  * or #GDBusConnection - use g_dbus_is_supported_address() to do more
18444  * checks.
18445  *
18446  * Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise.
18447  * Since: 2.26
18448  */
18449
18450
18451 /**
18452  * g_dbus_is_guid:
18453  * @string: The string to check.
18454  *
18455  * Checks if @string is a D-Bus GUID.
18456  * See the D-Bus specification regarding what strings are valid D-Bus
18457  * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
18458  *
18459  * Returns: %TRUE if @string is a guid, %FALSE otherwise.
18460  * Since: 2.26
18461  */
18462
18463
18464 /**
18465  * g_dbus_is_interface_name:
18466  * @string: The string to check.
18467  *
18468  * Checks if @string is a valid D-Bus interface name.
18469  *
18470  * Returns: %TRUE if valid, %FALSE otherwise.
18471  * Since: 2.26
18472  */
18473
18474
18475 /**
18476  * g_dbus_is_member_name:
18477  * @string: The string to check.
18478  *
18479  * Checks if @string is a valid D-Bus member (e.g. signal or method) name.
18480  *
18481  * Returns: %TRUE if valid, %FALSE otherwise.
18482  * Since: 2.26
18483  */
18484
18485
18486 /**
18487  * g_dbus_is_name:
18488  * @string: The string to check.
18489  *
18490  * Checks if @string is a valid D-Bus bus name (either unique or well-known).
18491  *
18492  * Returns: %TRUE if valid, %FALSE otherwise.
18493  * Since: 2.26
18494  */
18495
18496
18497 /**
18498  * g_dbus_is_supported_address:
18499  * @string: A string.
18500  * @error: Return location for error or %NULL.
18501  *
18502  * Like g_dbus_is_address() but also checks if the library suppors the
18503  * transports in @string and that key/value pairs for each transport
18504  * are valid.
18505  * supported by this library, %FALSE if @error is set.
18506  *
18507  * Returns: %TRUE if @string is a valid D-Bus address that is
18508  * Since: 2.26
18509  */
18510
18511
18512 /**
18513  * g_dbus_is_unique_name:
18514  * @string: The string to check.
18515  *
18516  * Checks if @string is a valid D-Bus unique bus name.
18517  *
18518  * Returns: %TRUE if valid, %FALSE otherwise.
18519  * Since: 2.26
18520  */
18521
18522
18523 /**
18524  * g_dbus_message_bytes_needed:
18525  * @blob: A blob represent a binary D-Bus message.
18526  * @blob_len: The length of @blob (must be at least 16).
18527  * @error: Return location for error or %NULL.
18528  *
18529  * Utility function to calculate how many bytes are needed to
18530  * completely deserialize the D-Bus message stored at @blob.
18531  * determine the size).
18532  *
18533  * Returns: Number of bytes needed or -1 if @error is set (e.g. if
18534  * Since: 2.26
18535  */
18536
18537
18538 /**
18539  * g_dbus_message_copy:
18540  * @message: A #GDBusMessage.
18541  * @error: Return location for error or %NULL.
18542  *
18543  * Copies @message. The copy is a deep copy and the returned
18544  * #GDBusMessage is completely identical except that it is guaranteed
18545  * to not be locked.
18546  * This operation can fail if e.g. @message contains file descriptors
18547  * and the per-process or system-wide open files limit is reached.
18548  * Free with g_object_unref().
18549  *
18550  * Returns: (transfer full): A new #GDBusMessage or %NULL if @error is set.
18551  * Since: 2.26
18552  */
18553
18554
18555 /**
18556  * g_dbus_message_get_arg0:
18557  * @message: A #GDBusMessage.
18558  *
18559  * Convenience to get the first item in the body of @message.
18560  *
18561  * Returns: The string item or %NULL if the first item in the body of
18562  * Since: 2.26
18563  */
18564
18565
18566 /**
18567  * g_dbus_message_get_body:
18568  * @message: A #GDBusMessage.
18569  *
18570  * Gets the body of a message.
18571  *
18572  * Returns: A #GVariant or %NULL if the body is empty. Do not free, it is owned by @message.
18573  * Since: 2.26
18574  */
18575
18576
18577 /**
18578  * g_dbus_message_get_byte_order:
18579  * @message: A #GDBusMessage.
18580  *
18581  * Gets the byte order of @message.
18582  *
18583  * Returns: The byte order.
18584  */
18585
18586
18587 /**
18588  * g_dbus_message_get_destination:
18589  * @message: A #GDBusMessage.
18590  *
18591  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
18592  *
18593  * Returns: The value.
18594  * Since: 2.26
18595  */
18596
18597
18598 /**
18599  * g_dbus_message_get_error_name:
18600  * @message: A #GDBusMessage.
18601  *
18602  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
18603  *
18604  * Returns: The value.
18605  * Since: 2.26
18606  */
18607
18608
18609 /**
18610  * g_dbus_message_get_flags:
18611  * @message: A #GDBusMessage.
18612  *
18613  * Gets the flags for @message.
18614  *
18615  * Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
18616  * Since: 2.26
18617  */
18618
18619
18620 /**
18621  * g_dbus_message_get_header:
18622  * @message: A #GDBusMessage.
18623  * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
18624  *
18625  * Gets a header field on @message.
18626  * otherwise. Do not free, it is owned by @message.
18627  *
18628  * Returns: A #GVariant with the value if the header was found, %NULL
18629  * Since: 2.26
18630  */
18631
18632
18633 /**
18634  * g_dbus_message_get_header_fields:
18635  * @message: A #GDBusMessage.
18636  *
18637  * Gets an array of all header fields on @message that are set.
18638  * %G_DBUS_MESSAGE_HEADER_FIELD_INVALID.  Each element is a
18639  * #guchar. Free with g_free().
18640  *
18641  * Returns: An array of header fields terminated by
18642  * Since: 2.26
18643  */
18644
18645
18646 /**
18647  * g_dbus_message_get_interface:
18648  * @message: A #GDBusMessage.
18649  *
18650  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
18651  *
18652  * Returns: The value.
18653  * Since: 2.26
18654  */
18655
18656
18657 /**
18658  * g_dbus_message_get_locked:
18659  * @message: A #GDBusMessage.
18660  *
18661  * Checks whether @message is locked. To monitor changes to this
18662  * value, conncet to the #GObject::notify signal to listen for changes
18663  * on the #GDBusMessage:locked property.
18664  *
18665  * Returns: %TRUE if @message is locked, %FALSE otherwise.
18666  * Since: 2.26
18667  */
18668
18669
18670 /**
18671  * g_dbus_message_get_member:
18672  * @message: A #GDBusMessage.
18673  *
18674  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
18675  *
18676  * Returns: The value.
18677  * Since: 2.26
18678  */
18679
18680
18681 /**
18682  * g_dbus_message_get_message_type:
18683  * @message: A #GDBusMessage.
18684  *
18685  * Gets the type of @message.
18686  *
18687  * Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
18688  * Since: 2.26
18689  */
18690
18691
18692 /**
18693  * g_dbus_message_get_num_unix_fds:
18694  * @message: A #GDBusMessage.
18695  *
18696  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
18697  *
18698  * Returns: The value.
18699  * Since: 2.26
18700  */
18701
18702
18703 /**
18704  * g_dbus_message_get_path:
18705  * @message: A #GDBusMessage.
18706  *
18707  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
18708  *
18709  * Returns: The value.
18710  * Since: 2.26
18711  */
18712
18713
18714 /**
18715  * g_dbus_message_get_reply_serial:
18716  * @message: A #GDBusMessage.
18717  *
18718  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
18719  *
18720  * Returns: The value.
18721  * Since: 2.26
18722  */
18723
18724
18725 /**
18726  * g_dbus_message_get_sender:
18727  * @message: A #GDBusMessage.
18728  *
18729  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
18730  *
18731  * Returns: The value.
18732  * Since: 2.26
18733  */
18734
18735
18736 /**
18737  * g_dbus_message_get_serial:
18738  * @message: A #GDBusMessage.
18739  *
18740  * Gets the serial for @message.
18741  *
18742  * Returns: A #guint32.
18743  * Since: 2.26
18744  */
18745
18746
18747 /**
18748  * g_dbus_message_get_signature:
18749  * @message: A #GDBusMessage.
18750  *
18751  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
18752  *
18753  * Returns: The value.
18754  * Since: 2.26
18755  */
18756
18757
18758 /**
18759  * g_dbus_message_get_unix_fd_list:
18760  * @message: A #GDBusMessage.
18761  *
18762  * Gets the UNIX file descriptors associated with @message, if any.
18763  * This method is only available on UNIX.
18764  * associated. Do not free, this object is owned by @message.
18765  *
18766  * Returns: (transfer none): A #GUnixFDList or %NULL if no file descriptors are
18767  * Since: 2.26
18768  */
18769
18770
18771 /**
18772  * g_dbus_message_lock:
18773  * @message: A #GDBusMessage.
18774  *
18775  * If @message is locked, does nothing. Otherwise locks the message.
18776  *
18777  * Since: 2.26
18778  */
18779
18780
18781 /**
18782  * g_dbus_message_new:
18783  *
18784  * Creates a new empty #GDBusMessage.
18785  *
18786  * Returns: A #GDBusMessage. Free with g_object_unref().
18787  * Since: 2.26
18788  */
18789
18790
18791 /**
18792  * g_dbus_message_new_from_blob:
18793  * @blob: A blob represent a binary D-Bus message.
18794  * @blob_len: The length of @blob.
18795  * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
18796  * @error: Return location for error or %NULL.
18797  *
18798  * Creates a new #GDBusMessage from the data stored at @blob. The byte
18799  * order that the message was in can be retrieved using
18800  * g_dbus_message_get_byte_order().
18801  * g_object_unref().
18802  *
18803  * Returns: A new #GDBusMessage or %NULL if @error is set. Free with
18804  * Since: 2.26
18805  */
18806
18807
18808 /**
18809  * g_dbus_message_new_method_call:
18810  * @name: A valid D-Bus name or %NULL.
18811  * @path: A valid object path.
18812  * @interface_: A valid D-Bus interface name or %NULL.
18813  * @method: A valid method name.
18814  *
18815  * Creates a new #GDBusMessage for a method call.
18816  *
18817  * Returns: A #GDBusMessage. Free with g_object_unref().
18818  * Since: 2.26
18819  */
18820
18821
18822 /**
18823  * g_dbus_message_new_method_error:
18824  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
18825  * @error_name: A valid D-Bus error name.
18826  * @error_message_format: The D-Bus error message in a printf() format.
18827  * @...: Arguments for @error_message_format.
18828  *
18829  * Creates a new #GDBusMessage that is an error reply to @method_call_message.
18830  *
18831  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
18832  * Since: 2.26
18833  */
18834
18835
18836 /**
18837  * g_dbus_message_new_method_error_literal:
18838  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
18839  * @error_name: A valid D-Bus error name.
18840  * @error_message: The D-Bus error message.
18841  *
18842  * Creates a new #GDBusMessage that is an error reply to @method_call_message.
18843  *
18844  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
18845  * Since: 2.26
18846  */
18847
18848
18849 /**
18850  * g_dbus_message_new_method_error_valist:
18851  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
18852  * @error_name: A valid D-Bus error name.
18853  * @error_message_format: The D-Bus error message in a printf() format.
18854  * @var_args: Arguments for @error_message_format.
18855  *
18856  * Like g_dbus_message_new_method_error() but intended for language bindings.
18857  *
18858  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
18859  * Since: 2.26
18860  */
18861
18862
18863 /**
18864  * g_dbus_message_new_method_reply:
18865  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
18866  *
18867  * Creates a new #GDBusMessage that is a reply to @method_call_message.
18868  *
18869  * Returns: (transfer full): #GDBusMessage. Free with g_object_unref().
18870  * Since: 2.26
18871  */
18872
18873
18874 /**
18875  * g_dbus_message_new_signal:
18876  * @path: A valid object path.
18877  * @interface_: A valid D-Bus interface name.
18878  * @signal: A valid signal name.
18879  *
18880  * Creates a new #GDBusMessage for a signal emission.
18881  *
18882  * Returns: A #GDBusMessage. Free with g_object_unref().
18883  * Since: 2.26
18884  */
18885
18886
18887 /**
18888  * g_dbus_message_print:
18889  * @message: A #GDBusMessage.
18890  * @indent: Indentation level.
18891  *
18892  * Produces a human-readable multi-line description of @message.
18893  * The contents of the description has no ABI guarantees, the contents
18894  * and formatting is subject to change at any time. Typical output
18895  * looks something like this:
18896  * <programlisting>
18897  * Headers:
18898  * path -> objectpath '/org/gtk/GDBus/TestObject'
18899  * interface -> 'org.gtk.GDBus.TestInterface'
18900  * member -> 'GimmeStdout'
18901  * destination -> ':1.146'
18902  * UNIX File Descriptors:
18903  * (none)
18904  * </programlisting>
18905  * or
18906  * <programlisting>
18907  * Headers:
18908  * reply-serial -> uint32 4
18909  * destination -> ':1.159'
18910  * sender -> ':1.146'
18911  * num-unix-fds -> uint32 1
18912  * UNIX File Descriptors:
18913  * </programlisting>
18914  *
18915  * Type:    method-return
18916  * Flags:   no-reply-expected
18917  * Version: 0
18918  * Serial:  477
18919  * Body: ()
18920  * Fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
18921  * Returns: A string that should be freed with g_free().
18922  * Since: 2.26
18923  */
18924
18925
18926 /**
18927  * g_dbus_message_set_body:
18928  * @message: A #GDBusMessage.
18929  * @body: Either %NULL or a #GVariant that is a tuple.
18930  *
18931  * Sets the body @message. As a side-effect the
18932  * %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the
18933  * type string of @body (or cleared if @body is %NULL).
18934  * If @body is floating, @message assumes ownership of @body.
18935  *
18936  * Since: 2.26
18937  */
18938
18939
18940 /**
18941  * g_dbus_message_set_byte_order:
18942  * @message: A #GDBusMessage.
18943  * @byte_order: The byte order.
18944  *
18945  * Sets the byte order of @message.
18946  */
18947
18948
18949 /**
18950  * g_dbus_message_set_destination:
18951  * @message: A #GDBusMessage.
18952  * @value: The value to set.
18953  *
18954  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
18955  *
18956  * Since: 2.26
18957  */
18958
18959
18960 /**
18961  * g_dbus_message_set_error_name:
18962  * @message: A #GDBusMessage.
18963  * @value: The value to set.
18964  *
18965  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
18966  *
18967  * Since: 2.26
18968  */
18969
18970
18971 /**
18972  * g_dbus_message_set_flags:
18973  * @message: A #GDBusMessage.
18974  * @flags: Flags for @message that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
18975  *
18976  * Sets the flags to set on @message.
18977  *
18978  * Since: 2.26
18979  */
18980
18981
18982 /**
18983  * g_dbus_message_set_header:
18984  * @message: A #GDBusMessage.
18985  * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
18986  * @value: A #GVariant to set the header field or %NULL to clear the header field.
18987  *
18988  * Sets a header field on @message.
18989  * If @value is floating, @message assumes ownership of @value.
18990  *
18991  * Since: 2.26
18992  */
18993
18994
18995 /**
18996  * g_dbus_message_set_interface:
18997  * @message: A #GDBusMessage.
18998  * @value: The value to set.
18999  *
19000  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
19001  *
19002  * Since: 2.26
19003  */
19004
19005
19006 /**
19007  * g_dbus_message_set_member:
19008  * @message: A #GDBusMessage.
19009  * @value: The value to set.
19010  *
19011  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
19012  *
19013  * Since: 2.26
19014  */
19015
19016
19017 /**
19018  * g_dbus_message_set_message_type:
19019  * @message: A #GDBusMessage.
19020  * @type: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
19021  *
19022  * Sets @message to be of @type.
19023  *
19024  * Since: 2.26
19025  */
19026
19027
19028 /**
19029  * g_dbus_message_set_num_unix_fds:
19030  * @message: A #GDBusMessage.
19031  * @value: The value to set.
19032  *
19033  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
19034  *
19035  * Since: 2.26
19036  */
19037
19038
19039 /**
19040  * g_dbus_message_set_path:
19041  * @message: A #GDBusMessage.
19042  * @value: The value to set.
19043  *
19044  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
19045  *
19046  * Since: 2.26
19047  */
19048
19049
19050 /**
19051  * g_dbus_message_set_reply_serial:
19052  * @message: A #GDBusMessage.
19053  * @value: The value to set.
19054  *
19055  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
19056  *
19057  * Since: 2.26
19058  */
19059
19060
19061 /**
19062  * g_dbus_message_set_sender:
19063  * @message: A #GDBusMessage.
19064  * @value: The value to set.
19065  *
19066  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
19067  *
19068  * Since: 2.26
19069  */
19070
19071
19072 /**
19073  * g_dbus_message_set_serial:
19074  * @message: A #GDBusMessage.
19075  * @serial: A #guint32.
19076  *
19077  * Sets the serial for @message.
19078  *
19079  * Since: 2.26
19080  */
19081
19082
19083 /**
19084  * g_dbus_message_set_signature:
19085  * @message: A #GDBusMessage.
19086  * @value: The value to set.
19087  *
19088  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
19089  *
19090  * Since: 2.26
19091  */
19092
19093
19094 /**
19095  * g_dbus_message_set_unix_fd_list:
19096  * @message: A #GDBusMessage.
19097  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
19098  *
19099  * Sets the UNIX file descriptors associated with @message. As a
19100  * side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header
19101  * field is set to the number of fds in @fd_list (or cleared if
19102  * This method is only available on UNIX.
19103  *
19104  * Since: 2.26
19105  */
19106
19107
19108 /**
19109  * g_dbus_message_to_blob:
19110  * @message: A #GDBusMessage.
19111  * @out_size: Return location for size of generated blob.
19112  * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
19113  * @error: Return location for error.
19114  *
19115  * Serializes @message to a blob. The byte order returned by
19116  * g_dbus_message_get_byte_order() will be used.
19117  * generated by @message or %NULL if @error is set. Free with g_free().
19118  *
19119  * Returns: A pointer to a valid binary D-Bus message of @out_size bytes
19120  * Since: 2.26
19121  */
19122
19123
19124 /**
19125  * g_dbus_message_to_gerror:
19126  * @message: A #GDBusMessage.
19127  * @error: The #GError to set.
19128  *
19129  * If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does
19130  * nothing and returns %FALSE.
19131  * Otherwise this method encodes the error in @message as a #GError
19132  * using g_dbus_error_set_dbus_error() using the information in the
19133  * %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as
19134  * well as the first string item in @message's body.
19135  *
19136  * Returns: %TRUE if @error was set, %FALSE otherwise.
19137  * Since: 2.26
19138  */
19139
19140
19141 /**
19142  * g_dbus_method_info_ref:
19143  * @info: A #GDBusMethodInfo
19144  *
19145  * If @info is statically allocated does nothing. Otherwise increases
19146  * the reference count.
19147  *
19148  * Returns: The same @info.
19149  * Since: 2.26
19150  */
19151
19152
19153 /**
19154  * g_dbus_method_info_unref:
19155  * @info: A #GDBusMethodInfo.
19156  *
19157  * If @info is statically allocated, does nothing. Otherwise decreases
19158  * the reference count of @info. When its reference count drops to 0,
19159  * the memory used is freed.
19160  *
19161  * Since: 2.26
19162  */
19163
19164
19165 /**
19166  * g_dbus_method_invocation_get_connection:
19167  * @invocation: A #GDBusMethodInvocation.
19168  *
19169  * Gets the #GDBusConnection the method was invoked on.
19170  *
19171  * Returns: (transfer none): A #GDBusConnection. Do not free, it is owned by @invocation.
19172  * Since: 2.26
19173  */
19174
19175
19176 /**
19177  * g_dbus_method_invocation_get_interface_name:
19178  * @invocation: A #GDBusMethodInvocation.
19179  *
19180  * Gets the name of the D-Bus interface the method was invoked on.
19181  *
19182  * Returns: A string. Do not free, it is owned by @invocation.
19183  * Since: 2.26
19184  */
19185
19186
19187 /**
19188  * g_dbus_method_invocation_get_message:
19189  * @invocation: A #GDBusMethodInvocation.
19190  *
19191  * Gets the #GDBusMessage for the method invocation. This is useful if
19192  * you need to use low-level protocol features, such as UNIX file
19193  * descriptor passing, that cannot be properly expressed in the
19194  * #GVariant API.
19195  * See <xref linkend="gdbus-server"/> and <xref
19196  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
19197  * low-level API to send and receive UNIX file descriptors.
19198  *
19199  * Returns: (transfer none): #GDBusMessage. Do not free, it is owned by @invocation.
19200  * Since: 2.26
19201  */
19202
19203
19204 /**
19205  * g_dbus_method_invocation_get_method_info:
19206  * @invocation: A #GDBusMethodInvocation.
19207  *
19208  * Gets information about the method call, if any.
19209  *
19210  * Returns: A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation.
19211  * Since: 2.26
19212  */
19213
19214
19215 /**
19216  * g_dbus_method_invocation_get_method_name:
19217  * @invocation: A #GDBusMethodInvocation.
19218  *
19219  * Gets the name of the method that was invoked.
19220  *
19221  * Returns: A string. Do not free, it is owned by @invocation.
19222  * Since: 2.26
19223  */
19224
19225
19226 /**
19227  * g_dbus_method_invocation_get_object_path:
19228  * @invocation: A #GDBusMethodInvocation.
19229  *
19230  * Gets the object path the method was invoked on.
19231  *
19232  * Returns: A string. Do not free, it is owned by @invocation.
19233  * Since: 2.26
19234  */
19235
19236
19237 /**
19238  * g_dbus_method_invocation_get_parameters:
19239  * @invocation: A #GDBusMethodInvocation.
19240  *
19241  * Gets the parameters of the method invocation. If there are no input
19242  * parameters then this will return a GVariant with 0 children rather than NULL.
19243  *
19244  * Returns: (transfer none): A #GVariant tuple. Do not unref this because it is owned by @invocation.
19245  * Since: 2.26
19246  */
19247
19248
19249 /**
19250  * g_dbus_method_invocation_get_sender:
19251  * @invocation: A #GDBusMethodInvocation.
19252  *
19253  * Gets the bus name that invoked the method.
19254  *
19255  * Returns: A string. Do not free, it is owned by @invocation.
19256  * Since: 2.26
19257  */
19258
19259
19260 /**
19261  * g_dbus_method_invocation_get_user_data: (skip)
19262  * @invocation: A #GDBusMethodInvocation.
19263  *
19264  * Gets the @user_data #gpointer passed to g_dbus_connection_register_object().
19265  *
19266  * Returns: A #gpointer.
19267  * Since: 2.26
19268  */
19269
19270
19271 /**
19272  * g_dbus_method_invocation_return_dbus_error:
19273  * @invocation: (transfer full): A #GDBusMethodInvocation.
19274  * @error_name: A valid D-Bus error name.
19275  * @error_message: A valid D-Bus error message.
19276  *
19277  * Finishes handling a D-Bus method call by returning an error.
19278  * This method will free @invocation, you cannot use it afterwards.
19279  *
19280  * Since: 2.26
19281  */
19282
19283
19284 /**
19285  * g_dbus_method_invocation_return_error:
19286  * @invocation: (transfer full): A #GDBusMethodInvocation.
19287  * @domain: A #GQuark for the #GError error domain.
19288  * @code: The error code.
19289  * @format: printf()-style format.
19290  * @...: Parameters for @format.
19291  *
19292  * Finishes handling a D-Bus method call by returning an error.
19293  * See g_dbus_error_encode_gerror() for details about what error name
19294  * will be returned on the wire. In a nutshell, if the given error is
19295  * registered using g_dbus_error_register_error() the name given
19296  * during registration is used. Otherwise, a name of the form
19297  * <literal>org.gtk.GDBus.UnmappedGError.Quark...</literal> is
19298  * used. This provides transparent mapping of #GError between
19299  * applications using GDBus.
19300  * If you are writing an application intended to be portable,
19301  * <emphasis>always</emphasis> register errors with g_dbus_error_register_error()
19302  * or use g_dbus_method_invocation_return_dbus_error().
19303  * This method will free @invocation, you cannot use it afterwards.
19304  *
19305  * Since: 2.26
19306  */
19307
19308
19309 /**
19310  * g_dbus_method_invocation_return_error_literal:
19311  * @invocation: (transfer full): A #GDBusMethodInvocation.
19312  * @domain: A #GQuark for the #GError error domain.
19313  * @code: The error code.
19314  * @message: The error message.
19315  *
19316  * Like g_dbus_method_invocation_return_error() but without printf()-style formatting.
19317  * This method will free @invocation, you cannot use it afterwards.
19318  *
19319  * Since: 2.26
19320  */
19321
19322
19323 /**
19324  * g_dbus_method_invocation_return_error_valist:
19325  * @invocation: (transfer full): A #GDBusMethodInvocation.
19326  * @domain: A #GQuark for the #GError error domain.
19327  * @code: The error code.
19328  * @format: printf()-style format.
19329  * @var_args: #va_list of parameters for @format.
19330  *
19331  * Like g_dbus_method_invocation_return_error() but intended for
19332  * language bindings.
19333  * This method will free @invocation, you cannot use it afterwards.
19334  *
19335  * Since: 2.26
19336  */
19337
19338
19339 /**
19340  * g_dbus_method_invocation_return_gerror:
19341  * @invocation: (transfer full): A #GDBusMethodInvocation.
19342  * @error: A #GError.
19343  *
19344  * Like g_dbus_method_invocation_return_error() but takes a #GError
19345  * instead of the error domain, error code and message.
19346  * This method will free @invocation, you cannot use it afterwards.
19347  *
19348  * Since: 2.26
19349  */
19350
19351
19352 /**
19353  * g_dbus_method_invocation_return_value:
19354  * @invocation: (transfer full): A #GDBusMethodInvocation.
19355  * @parameters: (allow-none): A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
19356  *
19357  * Finishes handling a D-Bus method call by returning @parameters.
19358  * If the @parameters GVariant is floating, it is consumed.
19359  * It is an error if @parameters is not of the right format.
19360  * This method will free @invocation, you cannot use it afterwards.
19361  *
19362  * Since: 2.26
19363  */
19364
19365
19366 /**
19367  * g_dbus_method_invocation_take_error: (skip)
19368  * @invocation: (transfer full): A #GDBusMethodInvocation.
19369  * @error: (transfer full): A #GError.
19370  *
19371  * Like g_dbus_method_invocation_return_gerror() but takes ownership
19372  * of @error so the caller does not need to free it.
19373  * This method will free @invocation, you cannot use it afterwards.
19374  *
19375  * Since: 2.30
19376  */
19377
19378
19379 /**
19380  * g_dbus_node_info_generate_xml:
19381  * @info: A #GDBusNodeInfo.
19382  * @indent: Indentation level.
19383  * @string_builder: A #GString to to append XML data to.
19384  *
19385  * Appends an XML representation of @info (and its children) to @string_builder.
19386  * This function is typically used for generating introspection XML documents at run-time for
19387  * handling the <literal>org.freedesktop.DBus.Introspectable.Introspect</literal> method.
19388  *
19389  * Since: 2.26
19390  */
19391
19392
19393 /**
19394  * g_dbus_node_info_lookup_interface:
19395  * @info: A #GDBusNodeInfo.
19396  * @name: A D-Bus interface name.
19397  *
19398  * Looks up information about an interface.
19399  * This cost of this function is O(n) in number of interfaces.
19400  *
19401  * Returns: A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info.
19402  * Since: 2.26
19403  */
19404
19405
19406 /**
19407  * g_dbus_node_info_new_for_xml:
19408  * @xml_data: Valid D-Bus introspection XML.
19409  * @error: Return location for error.
19410  *
19411  * Parses @xml_data and returns a #GDBusNodeInfo representing the data.
19412  * with g_dbus_node_info_unref().
19413  *
19414  * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free
19415  * Since: 2.26
19416  */
19417
19418
19419 /**
19420  * g_dbus_node_info_ref:
19421  * @info: A #GDBusNodeInfo
19422  *
19423  * If @info is statically allocated does nothing. Otherwise increases
19424  * the reference count.
19425  *
19426  * Returns: The same @info.
19427  * Since: 2.26
19428  */
19429
19430
19431 /**
19432  * g_dbus_node_info_unref:
19433  * @info: A #GDBusNodeInfo.
19434  *
19435  * If @info is statically allocated, does nothing. Otherwise decreases
19436  * the reference count of @info. When its reference count drops to 0,
19437  * the memory used is freed.
19438  *
19439  * Since: 2.26
19440  */
19441
19442
19443 /**
19444  * g_dbus_object_get_interface:
19445  * @object: A #GDBusObject.
19446  * @interface_name: A D-Bus interface name.
19447  *
19448  * Gets the D-Bus interface with name @interface_name associated with
19449  * #GDBusInterface that must be freed with g_object_unref().
19450  *
19451  * Returns: (transfer full): %NULL if not found, otherwise a
19452  * Since: 2.30
19453  */
19454
19455
19456 /**
19457  * g_dbus_object_get_interfaces:
19458  * @object: A #GDBusObject.
19459  *
19460  * Gets the D-Bus interfaces associated with @object.
19461  * The returned list must be freed by g_list_free() after each element has been freed
19462  * with g_object_unref().
19463  *
19464  * Returns: (element-type GDBusInterface) (transfer full): A list of #GDBusInterface instances.
19465  * Since: 2.30
19466  */
19467
19468
19469 /**
19470  * g_dbus_object_get_object_path:
19471  * @object: A #GDBusObject.
19472  *
19473  * Gets the object path for @object.
19474  *
19475  * Returns: A string owned by @object. Do not free.
19476  * Since: 2.30
19477  */
19478
19479
19480 /**
19481  * g_dbus_object_manager_client_get_connection:
19482  * @manager: A #GDBusObjectManagerClient
19483  *
19484  * Gets the #GDBusConnection used by @manager.
19485  * the object belongs to @manager.
19486  *
19487  * Returns: (transfer none): A #GDBusConnection object. Do not free,
19488  * Since: 2.30
19489  */
19490
19491
19492 /**
19493  * g_dbus_object_manager_client_get_flags:
19494  * @manager: A #GDBusObjectManagerClient
19495  *
19496  * Gets the flags that @manager was constructed with.
19497  * enumeration.
19498  *
19499  * Returns: Zero of more flags from the #GDBusObjectManagerClientFlags
19500  * Since: 2.30
19501  */
19502
19503
19504 /**
19505  * g_dbus_object_manager_client_get_name:
19506  * @manager: A #GDBusObjectManagerClient
19507  *
19508  * Gets the name that @manager is for.
19509  * belongs to @manager.
19510  *
19511  * Returns: A unique or well-known name. Do not free, the string
19512  * Since: 2.30
19513  */
19514
19515
19516 /**
19517  * g_dbus_object_manager_client_get_name_owner:
19518  * @manager: A #GDBusObjectManagerClient.
19519  *
19520  * The unique name that owns the name that @manager is for or %NULL if
19521  * no-one currently owns that name. You can connect to the
19522  * #GObject::notify signal to track changes to the
19523  * #GDBusObjectManagerClient:name-owner property.
19524  * g_free().
19525  *
19526  * Returns: The name owner or %NULL if no name owner exists. Free with
19527  * Since: 2.30
19528  */
19529
19530
19531 /**
19532  * g_dbus_object_manager_client_new:
19533  * @connection: A #GDBusConnection.
19534  * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
19535  * @name: The owner of the control object (unique or well-known name).
19536  * @object_path: The object path of the control object.
19537  * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
19538  * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
19539  * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
19540  * @cancellable: A #GCancellable or %NULL
19541  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
19542  * @user_data: The data to pass to @callback.
19543  *
19544  * Asynchronously creates a new #GDBusObjectManagerClient object.
19545  * This is an asynchronous failable constructor. When the result is
19546  * ready, @callback will be invoked in the
19547  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
19548  * of the thread you are calling this method from. You can
19549  * then call g_dbus_object_manager_client_new_finish() to get the result. See
19550  * g_dbus_object_manager_client_new_sync() for the synchronous version.
19551  *
19552  * Since: 2.30
19553  */
19554
19555
19556 /**
19557  * g_dbus_object_manager_client_new_finish:
19558  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new().
19559  * @error: Return location for error or %NULL.
19560  *
19561  * Finishes an operation started with g_dbus_object_manager_client_new().
19562  * #GDBusObjectManagerClient object or %NULL if @error is set. Free
19563  * with g_object_unref().
19564  *
19565  * Returns: (transfer full) (type GDBusObjectManagerClient): A
19566  * Since: 2.30
19567  */
19568
19569
19570 /**
19571  * g_dbus_object_manager_client_new_for_bus:
19572  * @bus_type: A #GBusType.
19573  * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
19574  * @name: The owner of the control object (unique or well-known name).
19575  * @object_path: The object path of the control object.
19576  * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
19577  * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
19578  * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
19579  * @cancellable: A #GCancellable or %NULL
19580  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
19581  * @user_data: The data to pass to @callback.
19582  *
19583  * Like g_dbus_object_manager_client_new() but takes a #GBusType instead of a
19584  * #GDBusConnection.
19585  * This is an asynchronous failable constructor. When the result is
19586  * ready, @callback will be invoked in the
19587  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
19588  * of the thread you are calling this method from. You can
19589  * then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See
19590  * g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version.
19591  *
19592  * Since: 2.30
19593  */
19594
19595
19596 /**
19597  * g_dbus_object_manager_client_new_for_bus_finish:
19598  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new_for_bus().
19599  * @error: Return location for error or %NULL.
19600  *
19601  * Finishes an operation started with g_dbus_object_manager_client_new_for_bus().
19602  * #GDBusObjectManagerClient object or %NULL if @error is set. Free
19603  * with g_object_unref().
19604  *
19605  * Returns: (transfer full) (type GDBusObjectManagerClient): A
19606  * Since: 2.30
19607  */
19608
19609
19610 /**
19611  * g_dbus_object_manager_client_new_for_bus_sync:
19612  * @bus_type: A #GBusType.
19613  * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
19614  * @name: The owner of the control object (unique or well-known name).
19615  * @object_path: The object path of the control object.
19616  * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
19617  * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
19618  * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
19619  * @cancellable: A #GCancellable or %NULL
19620  * @error: Return location for error or %NULL.
19621  *
19622  * Like g_dbus_object_manager_client_new_sync() but takes a #GBusType instead
19623  * of a #GDBusConnection.
19624  * This is a synchronous failable constructor - the calling thread is
19625  * blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus()
19626  * for the asynchronous version.
19627  * #GDBusObjectManagerClient object or %NULL if @error is set. Free
19628  * with g_object_unref().
19629  *
19630  * Returns: (transfer full) (type GDBusObjectManagerClient): A
19631  * Since: 2.30
19632  */
19633
19634
19635 /**
19636  * g_dbus_object_manager_client_new_sync:
19637  * @connection: A #GDBusConnection.
19638  * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
19639  * @name: The owner of the control object (unique or well-known name).
19640  * @object_path: The object path of the control object.
19641  * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
19642  * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
19643  * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
19644  * @cancellable: A #GCancellable or %NULL
19645  * @error: Return location for error or %NULL.
19646  *
19647  * Creates a new #GDBusObjectManagerClient object.
19648  * This is a synchronous failable constructor - the calling thread is
19649  * blocked until a reply is received. See g_dbus_object_manager_client_new()
19650  * for the asynchronous version.
19651  * #GDBusObjectManagerClient object or %NULL if @error is set. Free
19652  * with g_object_unref().
19653  *
19654  * Returns: (transfer full) (type GDBusObjectManagerClient): A
19655  * Since: 2.30
19656  */
19657
19658
19659 /**
19660  * g_dbus_object_manager_get_interface:
19661  * @manager: A #GDBusObjectManager.
19662  * @object_path: Object path to lookup.
19663  * @interface_name: D-Bus interface name to lookup.
19664  *
19665  * Gets the interface proxy for @interface_name at @object_path, if
19666  * any.
19667  * with g_object_unref().
19668  *
19669  * Returns: (transfer full): A #GDBusInterface instance or %NULL. Free
19670  * Since: 2.30
19671  */
19672
19673
19674 /**
19675  * g_dbus_object_manager_get_object:
19676  * @manager: A #GDBusObjectManager.
19677  * @object_path: Object path to lookup.
19678  *
19679  * Gets the #GDBusObjectProxy at @object_path, if any.
19680  * g_object_unref().
19681  *
19682  * Returns: (transfer full): A #GDBusObject or %NULL. Free with
19683  * Since: 2.30
19684  */
19685
19686
19687 /**
19688  * g_dbus_object_manager_get_object_path:
19689  * @manager: A #GDBusObjectManager.
19690  *
19691  * Gets the object path that @manager is for.
19692  *
19693  * Returns: A string owned by @manager. Do not free.
19694  * Since: 2.30
19695  */
19696
19697
19698 /**
19699  * g_dbus_object_manager_get_objects:
19700  * @manager: A #GDBusObjectManager.
19701  *
19702  * Gets all #GDBusObject objects known to @manager.
19703  * #GDBusObject objects. The returned list should be freed with
19704  * g_list_free() after each element has been freed with
19705  * g_object_unref().
19706  *
19707  * Returns: (transfer full) (element-type GDBusObject): A list of
19708  * Since: 2.30
19709  */
19710
19711
19712 /**
19713  * g_dbus_object_manager_server_export:
19714  * @manager: A #GDBusObjectManagerServer.
19715  * @object: A #GDBusObjectSkeleton.
19716  *
19717  * Exports @object on @manager.
19718  * If there is already a #GDBusObject exported at the object path,
19719  * then the old object is removed.
19720  * The object path for @object must be in the hierarchy rooted by the
19721  * object path for @manager.
19722  * Note that @manager will take a reference on @object for as long as
19723  * it is exported.
19724  *
19725  * Since: 2.30
19726  */
19727
19728
19729 /**
19730  * g_dbus_object_manager_server_export_uniquely:
19731  * @manager: A #GDBusObjectManagerServer.
19732  * @object: An object.
19733  *
19734  * Like g_dbus_object_manager_server_export() but appends a string of
19735  * the form <literal>_N</literal> (with N being a natural number) to
19736  * already exists. As such, the #GDBusObjectProxy:object-path property
19737  * of @object may be modified.
19738  *
19739  * Since: 2.30
19740  */
19741
19742
19743 /**
19744  * g_dbus_object_manager_server_get_connection:
19745  * @manager: A #GDBusObjectManagerServer
19746  *
19747  * Gets the #GDBusConnection used by @manager.
19748  * be freed with g_object_unref().
19749  *
19750  * Returns: (transfer full): A #GDBusConnection object or %NULL if
19751  * Since: 2.30
19752  */
19753
19754
19755 /**
19756  * g_dbus_object_manager_server_new:
19757  * @object_path: The object path to export the manager object at.
19758  *
19759  * Creates a new #GDBusObjectManagerServer object.
19760  * The returned server isn't yet exported on any connection. To do so,
19761  * use g_dbus_object_manager_server_set_connection(). Normally you
19762  * want to export all of your objects before doing so to avoid <ulink
19763  * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">InterfacesAdded</ulink>
19764  * signals being emitted.
19765  *
19766  * Returns: A #GDBusObjectManagerServer object. Free with g_object_unref().
19767  * Since: 2.30
19768  */
19769
19770
19771 /**
19772  * g_dbus_object_manager_server_set_connection:
19773  * @manager: A #GDBusObjectManagerServer.
19774  * @connection: (allow-none): A #GDBusConnection or %NULL.
19775  *
19776  * Exports all objects managed by @manager on @connection. If
19777  */
19778
19779
19780 /**
19781  * g_dbus_object_manager_server_unexport:
19782  * @manager: A #GDBusObjectManagerServer.
19783  * @object_path: An object path.
19784  *
19785  * If @manager has an object at @path, removes the object. Otherwise
19786  * does nothing.
19787  * Note that @object_path must be in the hierarchy rooted by the
19788  * object path for @manager.
19789  *
19790  * Returns: %TRUE if object at @object_path was removed, %FALSE otherwise.
19791  * Since: 2.30
19792  */
19793
19794
19795 /**
19796  * g_dbus_object_proxy_get_connection:
19797  * @proxy: a #GDBusObjectProxy
19798  *
19799  * Gets the connection that @proxy is for.
19800  * object is owned by @proxy.
19801  *
19802  * Returns: (transfer none): A #GDBusConnection. Do not free, the
19803  * Since: 2.30
19804  */
19805
19806
19807 /**
19808  * g_dbus_object_proxy_new:
19809  * @connection: a #GDBusConnection
19810  * @object_path: the object path
19811  *
19812  * Creates a new #GDBusObjectProxy for the given connection and
19813  * object path.
19814  *
19815  * Returns: a new #GDBusObjectProxy
19816  * Since: 2.30
19817  */
19818
19819
19820 /**
19821  * g_dbus_object_skeleton_add_interface:
19822  * @object: A #GDBusObjectSkeleton.
19823  * @interface_: A #GDBusInterfaceSkeleton.
19824  *
19825  * Adds @interface_ to @object.
19826  * If @object already contains a #GDBusInterfaceSkeleton with the same
19827  * interface name, it is removed before @interface_ is added.
19828  * Note that @object takes its own reference on @interface_ and holds
19829  * it until removed.
19830  *
19831  * Since: 2.30
19832  */
19833
19834
19835 /**
19836  * g_dbus_object_skeleton_flush:
19837  * @object: A #GDBusObjectSkeleton.
19838  *
19839  * This method simply calls g_dbus_interface_skeleton_flush() on all
19840  * interfaces belonging to @object. See that method for when flushing
19841  * is useful.
19842  *
19843  * Since: 2.30
19844  */
19845
19846
19847 /**
19848  * g_dbus_object_skeleton_new:
19849  * @object_path: An object path.
19850  *
19851  * Creates a new #GDBusObjectSkeleton.
19852  *
19853  * Returns: A #GDBusObjectSkeleton. Free with g_object_unref().
19854  * Since: 2.30
19855  */
19856
19857
19858 /**
19859  * g_dbus_object_skeleton_remove_interface:
19860  * @object: A #GDBusObjectSkeleton.
19861  * @interface_: A #GDBusInterfaceSkeleton.
19862  *
19863  * Removes @interface_ from @object.
19864  *
19865  * Since: 2.30
19866  */
19867
19868
19869 /**
19870  * g_dbus_object_skeleton_remove_interface_by_name:
19871  * @object: A #GDBusObjectSkeleton.
19872  * @interface_name: A D-Bus interface name.
19873  *
19874  * Removes the #GDBusInterface with @interface_name from @object.
19875  * If no D-Bus interface of the given interface exists, this function
19876  * does nothing.
19877  *
19878  * Since: 2.30
19879  */
19880
19881
19882 /**
19883  * g_dbus_object_skeleton_set_object_path:
19884  * @object: A #GDBusObjectSkeleton.
19885  * @object_path: A valid D-Bus object path.
19886  *
19887  * Sets the object path for @object.
19888  *
19889  * Since: 2.30
19890  */
19891
19892
19893 /**
19894  * g_dbus_property_info_ref:
19895  * @info: A #GDBusPropertyInfo
19896  *
19897  * If @info is statically allocated does nothing. Otherwise increases
19898  * the reference count.
19899  *
19900  * Returns: The same @info.
19901  * Since: 2.26
19902  */
19903
19904
19905 /**
19906  * g_dbus_property_info_unref:
19907  * @info: A #GDBusPropertyInfo.
19908  *
19909  * If @info is statically allocated, does nothing. Otherwise decreases
19910  * the reference count of @info. When its reference count drops to 0,
19911  * the memory used is freed.
19912  *
19913  * Since: 2.26
19914  */
19915
19916
19917 /**
19918  * g_dbus_proxy_call:
19919  * @proxy: A #GDBusProxy.
19920  * @method_name: Name of method to invoke.
19921  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
19922  * @flags: Flags from the #GDBusCallFlags enumeration.
19923  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
19924  * @cancellable: A #GCancellable or %NULL.
19925  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
19926  * @user_data: The data to pass to @callback.
19927  *
19928  * Asynchronously invokes the @method_name method on @proxy.
19929  * If @method_name contains any dots, then @name is split into interface and
19930  * method name parts. This allows using @proxy for invoking methods on
19931  * other interfaces.
19932  * If the #GDBusConnection associated with @proxy is closed then
19933  * the operation will fail with %G_IO_ERROR_CLOSED. If
19934  * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
19935  * compatible with the D-Bus protocol, the operation fails with
19936  * %G_IO_ERROR_INVALID_ARGUMENT.
19937  * If the @parameters #GVariant is floating, it is consumed. This allows
19938  * convenient 'inline' use of g_variant_new(), e.g.:
19939  * |[
19940  * g_dbus_proxy_call (proxy,
19941  * "TwoStrings",
19942  * g_variant_new ("(ss)",
19943  * "Thing One",
19944  * "Thing Two"),
19945  * G_DBUS_CALL_FLAGS_NONE,
19946  * -1,
19947  * NULL,
19948  * (GAsyncReadyCallback) two_strings_done,
19949  * &amp;data);
19950  * ]|
19951  * This is an asynchronous method. When the operation is finished,
19952  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
19953  * of the thread you are calling this method from.
19954  * You can then call g_dbus_proxy_call_finish() to get the result of
19955  * the operation. See g_dbus_proxy_call_sync() for the synchronous
19956  * version of this method.
19957  *
19958  * Since: 2.26
19959  */
19960
19961
19962 /**
19963  * g_dbus_proxy_call_finish:
19964  * @proxy: A #GDBusProxy.
19965  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call().
19966  * @error: Return location for error or %NULL.
19967  *
19968  * Finishes an operation started with g_dbus_proxy_call().
19969  * return values. Free with g_variant_unref().
19970  *
19971  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
19972  * Since: 2.26
19973  */
19974
19975
19976 /**
19977  * g_dbus_proxy_call_sync:
19978  * @proxy: A #GDBusProxy.
19979  * @method_name: Name of method to invoke.
19980  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
19981  * @flags: Flags from the #GDBusCallFlags enumeration.
19982  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
19983  * @cancellable: A #GCancellable or %NULL.
19984  * @error: Return location for error or %NULL.
19985  *
19986  * Synchronously invokes the @method_name method on @proxy.
19987  * If @method_name contains any dots, then @name is split into interface and
19988  * method name parts. This allows using @proxy for invoking methods on
19989  * other interfaces.
19990  * If the #GDBusConnection associated with @proxy is disconnected then
19991  * the operation will fail with %G_IO_ERROR_CLOSED. If
19992  * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
19993  * compatible with the D-Bus protocol, the operation fails with
19994  * %G_IO_ERROR_INVALID_ARGUMENT.
19995  * If the @parameters #GVariant is floating, it is consumed. This allows
19996  * convenient 'inline' use of g_variant_new(), e.g.:
19997  * |[
19998  * g_dbus_proxy_call_sync (proxy,
19999  * "TwoStrings",
20000  * g_variant_new ("(ss)",
20001  * "Thing One",
20002  * "Thing Two"),
20003  * G_DBUS_CALL_FLAGS_NONE,
20004  * -1,
20005  * NULL,
20006  * &amp;error);
20007  * ]|
20008  * The calling thread is blocked until a reply is received. See
20009  * g_dbus_proxy_call() for the asynchronous version of this
20010  * method.
20011  * return values. Free with g_variant_unref().
20012  *
20013  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
20014  * Since: 2.26
20015  */
20016
20017
20018 /**
20019  * g_dbus_proxy_get_cached_property:
20020  * @proxy: A #GDBusProxy.
20021  * @property_name: Property name.
20022  *
20023  * Looks up the value for a property from the cache. This call does no
20024  * blocking IO.
20025  * If @proxy has an expected interface (see
20026  * #GDBusProxy:g-interface-info), then @property_name (for existence)
20027  * is checked against it.
20028  * for @property_name or %NULL if the value is not in the cache. The
20029  * returned reference must be freed with g_variant_unref().
20030  *
20031  * Returns: A reference to the #GVariant instance that holds the value
20032  * Since: 2.26
20033  */
20034
20035
20036 /**
20037  * g_dbus_proxy_get_cached_property_names:
20038  * @proxy: A #GDBusProxy.
20039  *
20040  * Gets the names of all cached properties on @proxy.
20041  * no cached properties. Free the returned array with g_strfreev().
20042  *
20043  * Returns: A %NULL-terminated array of strings or %NULL if @proxy has
20044  * Since: 2.26
20045  */
20046
20047
20048 /**
20049  * g_dbus_proxy_get_connection:
20050  * @proxy: A #GDBusProxy.
20051  *
20052  * Gets the connection @proxy is for.
20053  *
20054  * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free.
20055  * Since: 2.26
20056  */
20057
20058
20059 /**
20060  * g_dbus_proxy_get_default_timeout:
20061  * @proxy: A #GDBusProxy.
20062  *
20063  * Gets the timeout to use if -1 (specifying default timeout) is
20064  * passed as @timeout_msec in the g_dbus_proxy_call() and
20065  * g_dbus_proxy_call_sync() functions.
20066  * See the #GDBusProxy:g-default-timeout property for more details.
20067  *
20068  * Returns: Timeout to use for @proxy.
20069  * Since: 2.26
20070  */
20071
20072
20073 /**
20074  * g_dbus_proxy_get_flags:
20075  * @proxy: A #GDBusProxy.
20076  *
20077  * Gets the flags that @proxy was constructed with.
20078  *
20079  * Returns: Flags from the #GDBusProxyFlags enumeration.
20080  * Since: 2.26
20081  */
20082
20083
20084 /**
20085  * g_dbus_proxy_get_interface_info:
20086  * @proxy: A #GDBusProxy
20087  *
20088  * Returns the #GDBusInterfaceInfo, if any, specifying the minimal
20089  * interface that @proxy conforms to.
20090  * See the #GDBusProxy:g-interface-info property for more details.
20091  * object, it is owned by @proxy.
20092  *
20093  * Returns: A #GDBusInterfaceInfo or %NULL. Do not unref the returned
20094  * Since: 2.26
20095  */
20096
20097
20098 /**
20099  * g_dbus_proxy_get_interface_name:
20100  * @proxy: A #GDBusProxy.
20101  *
20102  * Gets the D-Bus interface name @proxy is for.
20103  *
20104  * Returns: A string owned by @proxy. Do not free.
20105  * Since: 2.26
20106  */
20107
20108
20109 /**
20110  * g_dbus_proxy_get_name:
20111  * @proxy: A #GDBusProxy.
20112  *
20113  * Gets the name that @proxy was constructed for.
20114  *
20115  * Returns: A string owned by @proxy. Do not free.
20116  * Since: 2.26
20117  */
20118
20119
20120 /**
20121  * g_dbus_proxy_get_name_owner:
20122  * @proxy: A #GDBusProxy.
20123  *
20124  * The unique name that owns the name that @proxy is for or %NULL if
20125  * no-one currently owns that name. You may connect to the
20126  * #GObject::notify signal to track changes to the
20127  * #GDBusProxy:g-name-owner property.
20128  *
20129  * Returns: The name owner or %NULL if no name owner exists. Free with g_free().
20130  * Since: 2.26
20131  */
20132
20133
20134 /**
20135  * g_dbus_proxy_get_object_path:
20136  * @proxy: A #GDBusProxy.
20137  *
20138  * Gets the object path @proxy is for.
20139  *
20140  * Returns: A string owned by @proxy. Do not free.
20141  * Since: 2.26
20142  */
20143
20144
20145 /**
20146  * g_dbus_proxy_new:
20147  * @connection: A #GDBusConnection.
20148  * @flags: Flags used when constructing the proxy.
20149  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
20150  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
20151  * @object_path: An object path.
20152  * @interface_name: A D-Bus interface name.
20153  * @cancellable: A #GCancellable or %NULL.
20154  * @callback: Callback function to invoke when the proxy is ready.
20155  * @user_data: User data to pass to @callback.
20156  *
20157  * Creates a proxy for accessing @interface_name on the remote object
20158  * at @object_path owned by @name at @connection and asynchronously
20159  * loads D-Bus properties unless the
20160  * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to
20161  * the #GDBusProxy::g-properties-changed signal to get notified about
20162  * property changes.
20163  * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
20164  * match rules for signals. Connect to the #GDBusProxy::g-signal signal
20165  * to handle signals from the remote object.
20166  * If @name is a well-known name and the
20167  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
20168  * owner currently exists, the message bus will be requested to launch
20169  * a name owner for the name.
20170  * This is a failable asynchronous constructor - when the proxy is
20171  * ready, @callback will be invoked and you can use
20172  * g_dbus_proxy_new_finish() to get the result.
20173  * See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.
20174  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
20175  *
20176  * Since: 2.26
20177  */
20178
20179
20180 /**
20181  * g_dbus_proxy_new_finish:
20182  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new().
20183  * @error: Return location for error or %NULL.
20184  *
20185  * Finishes creating a #GDBusProxy.
20186  *
20187  * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
20188  * Since: 2.26
20189  */
20190
20191
20192 /**
20193  * g_dbus_proxy_new_for_bus:
20194  * @bus_type: A #GBusType.
20195  * @flags: Flags used when constructing the proxy.
20196  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
20197  * @name: A bus name (well-known or unique).
20198  * @object_path: An object path.
20199  * @interface_name: A D-Bus interface name.
20200  * @cancellable: A #GCancellable or %NULL.
20201  * @callback: Callback function to invoke when the proxy is ready.
20202  * @user_data: User data to pass to @callback.
20203  *
20204  * Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
20205  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
20206  *
20207  * Since: 2.26
20208  */
20209
20210
20211 /**
20212  * g_dbus_proxy_new_for_bus_finish:
20213  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus().
20214  * @error: Return location for error or %NULL.
20215  *
20216  * Finishes creating a #GDBusProxy.
20217  *
20218  * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
20219  * Since: 2.26
20220  */
20221
20222
20223 /**
20224  * g_dbus_proxy_new_for_bus_sync:
20225  * @bus_type: A #GBusType.
20226  * @flags: Flags used when constructing the proxy.
20227  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
20228  * @name: A bus name (well-known or unique).
20229  * @object_path: An object path.
20230  * @interface_name: A D-Bus interface name.
20231  * @cancellable: A #GCancellable or %NULL.
20232  * @error: Return location for error or %NULL.
20233  *
20234  * Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
20235  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
20236  *
20237  * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
20238  * Since: 2.26
20239  */
20240
20241
20242 /**
20243  * g_dbus_proxy_new_sync:
20244  * @connection: A #GDBusConnection.
20245  * @flags: Flags used when constructing the proxy.
20246  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
20247  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
20248  * @object_path: An object path.
20249  * @interface_name: A D-Bus interface name.
20250  * @cancellable: (allow-none): A #GCancellable or %NULL.
20251  * @error: (allow-none): Return location for error or %NULL.
20252  *
20253  * Creates a proxy for accessing @interface_name on the remote object
20254  * at @object_path owned by @name at @connection and synchronously
20255  * loads D-Bus properties unless the
20256  * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.
20257  * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
20258  * match rules for signals. Connect to the #GDBusProxy::g-signal signal
20259  * to handle signals from the remote object.
20260  * If @name is a well-known name and the
20261  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
20262  * owner currently exists, the message bus will be requested to launch
20263  * a name owner for the name.
20264  * This is a synchronous failable constructor. See g_dbus_proxy_new()
20265  * and g_dbus_proxy_new_finish() for the asynchronous version.
20266  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
20267  *
20268  * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
20269  * Since: 2.26
20270  */
20271
20272
20273 /**
20274  * g_dbus_proxy_set_cached_property:
20275  * @proxy: A #GDBusProxy
20276  * @property_name: Property name.
20277  * @value: (allow-none): Value for the property or %NULL to remove it from the cache.
20278  *
20279  * If @value is not %NULL, sets the cached value for the property with
20280  * name @property_name to the value in @value.
20281  * If @value is %NULL, then the cached value is removed from the
20282  * property cache.
20283  * If @proxy has an expected interface (see
20284  * #GDBusProxy:g-interface-info), then @property_name (for existence)
20285  * and @value (for the type) is checked against it.
20286  * If the @value #GVariant is floating, it is consumed. This allows
20287  * convenient 'inline' use of g_variant_new(), e.g.
20288  * |[
20289  * g_dbus_proxy_set_cached_property (proxy,
20290  * "SomeProperty",
20291  * g_variant_new ("(si)",
20292  * "A String",
20293  * 42));
20294  * ]|
20295  * Normally you will not need to use this method since @proxy is
20296  * tracking changes using the
20297  * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
20298  * D-Bus signal. However, for performance reasons an object may decide
20299  * to not use this signal for some properties and instead use a
20300  * proprietary out-of-band mechanism to transmit changes.
20301  * As a concrete example, consider an object with a property
20302  * <literal>ChatroomParticipants</literal> which is an array of
20303  * strings. Instead of transmitting the same (long) array every time
20304  * the property changes, it is more efficient to only transmit the
20305  * delta using e.g. signals <literal>ChatroomParticipantJoined(String
20306  * name)</literal> and <literal>ChatroomParticipantParted(String
20307  * name)</literal>.
20308  *
20309  * Since: 2.26
20310  */
20311
20312
20313 /**
20314  * g_dbus_proxy_set_default_timeout:
20315  * @proxy: A #GDBusProxy.
20316  * @timeout_msec: Timeout in milliseconds.
20317  *
20318  * Sets the timeout to use if -1 (specifying default timeout) is
20319  * passed as @timeout_msec in the g_dbus_proxy_call() and
20320  * g_dbus_proxy_call_sync() functions.
20321  * See the #GDBusProxy:g-default-timeout property for more details.
20322  *
20323  * Since: 2.26
20324  */
20325
20326
20327 /**
20328  * g_dbus_proxy_set_interface_info:
20329  * @proxy: A #GDBusProxy
20330  * @info: (allow-none): Minimum interface this proxy conforms to or %NULL to unset.
20331  *
20332  * Ensure that interactions with @proxy conform to the given
20333  * interface.  For example, when completing a method call, if the type
20334  * signature of the message isn't what's expected, the given #GError
20335  * is set.  Signals that have a type signature mismatch are simply
20336  * dropped.
20337  * See the #GDBusProxy:g-interface-info property for more details.
20338  *
20339  * Since: 2.26
20340  */
20341
20342
20343 /**
20344  * g_dbus_server_get_client_address:
20345  * @server: A #GDBusServer.
20346  *
20347  * Gets a D-Bus address string that can be used by clients to connect
20348  * to @server.
20349  * by @server.
20350  *
20351  * Returns: A D-Bus address string. Do not free, the string is owned
20352  * Since: 2.26
20353  */
20354
20355
20356 /**
20357  * g_dbus_server_get_flags:
20358  * @server: A #GDBusServer.
20359  *
20360  * Gets the flags for @server.
20361  *
20362  * Returns: A set of flags from the #GDBusServerFlags enumeration.
20363  * Since: 2.26
20364  */
20365
20366
20367 /**
20368  * g_dbus_server_get_guid:
20369  * @server: A #GDBusServer.
20370  *
20371  * Gets the GUID for @server.
20372  *
20373  * Returns: A D-Bus GUID. Do not free this string, it is owned by @server.
20374  * Since: 2.26
20375  */
20376
20377
20378 /**
20379  * g_dbus_server_is_active:
20380  * @server: A #GDBusServer.
20381  *
20382  * Gets whether @server is active.
20383  *
20384  * Returns: %TRUE if server is active, %FALSE otherwise.
20385  * Since: 2.26
20386  */
20387
20388
20389 /**
20390  * g_dbus_server_new_sync:
20391  * @address: A D-Bus address.
20392  * @flags: Flags from the #GDBusServerFlags enumeration.
20393  * @guid: A D-Bus GUID.
20394  * @observer: A #GDBusAuthObserver or %NULL.
20395  * @cancellable: A #GCancellable or %NULL.
20396  * @error: Return location for server or %NULL.
20397  *
20398  * Creates a new D-Bus server that listens on the first address in
20399  * Once constructed, you can use g_dbus_server_get_client_address() to
20400  * get a D-Bus address string that clients can use to connect.
20401  * Connect to the #GDBusServer::new-connection signal to handle
20402  * incoming connections.
20403  * The returned #GDBusServer isn't active - you have to start it with
20404  * g_dbus_server_start().
20405  * See <xref linkend="gdbus-peer-to-peer"/> for how #GDBusServer can
20406  * be used.
20407  * This is a synchronous failable constructor. See
20408  * g_dbus_server_new() for the asynchronous version.
20409  * g_object_unref().
20410  *
20411  * Returns: A #GDBusServer or %NULL if @error is set. Free with
20412  * Since: 2.26
20413  */
20414
20415
20416 /**
20417  * g_dbus_server_start:
20418  * @server: A #GDBusServer.
20419  *
20420  * Starts @server.
20421  *
20422  * Since: 2.26
20423  */
20424
20425
20426 /**
20427  * g_dbus_server_stop:
20428  * @server: A #GDBusServer.
20429  *
20430  * Stops @server.
20431  *
20432  * Since: 2.26
20433  */
20434
20435
20436 /**
20437  * g_dbus_signal_info_ref:
20438  * @info: A #GDBusSignalInfo
20439  *
20440  * If @info is statically allocated does nothing. Otherwise increases
20441  * the reference count.
20442  *
20443  * Returns: The same @info.
20444  * Since: 2.26
20445  */
20446
20447
20448 /**
20449  * g_dbus_signal_info_unref:
20450  * @info: A #GDBusSignalInfo.
20451  *
20452  * If @info is statically allocated, does nothing. Otherwise decreases
20453  * the reference count of @info. When its reference count drops to 0,
20454  * the memory used is freed.
20455  *
20456  * Since: 2.26
20457  */
20458
20459
20460 /**
20461  * g_desktop_app_info_get_categories:
20462  * @info: a #GDesktopAppInfo
20463  *
20464  * Gets the categories from the desktop file.
20465  * i.e. no attempt is made to split it by ';' or validate it.
20466  *
20467  * Returns: The unparsed Categories key from the desktop file;
20468  */
20469
20470
20471 /**
20472  * g_desktop_app_info_get_filename:
20473  * @info: a #GDesktopAppInfo
20474  *
20475  * When @info was created from a known filename, return it.  In some
20476  * situations such as the #GDesktopAppInfo returned from
20477  * g_desktop_app_info_new_from_keyfile(), this function will return %NULL.
20478  *
20479  * Returns: The full path to the file for @info, or %NULL if not known.
20480  * Since: 2.24
20481  */
20482
20483
20484 /**
20485  * g_desktop_app_info_get_generic_name:
20486  * @info: a #GDesktopAppInfo
20487  *
20488  * Gets the generic name from the destkop file.
20489  *
20490  * Returns: The value of the GenericName key
20491  */
20492
20493
20494 /**
20495  * g_desktop_app_info_get_is_hidden:
20496  * @info: a #GDesktopAppInfo.
20497  *
20498  * A desktop file is hidden if the Hidden key in it is
20499  * set to True.
20500  *
20501  * Returns: %TRUE if hidden, %FALSE otherwise.
20502  */
20503
20504
20505 /**
20506  * g_desktop_app_info_launch_uris_as_manager:
20507  * @appinfo: a #GDesktopAppInfo
20508  * @uris: (element-type utf8): List of URIs
20509  * @launch_context: a #GAppLaunchContext
20510  * @spawn_flags: #GSpawnFlags, used for each process
20511  * @user_setup: (scope call): a #GSpawnChildSetupFunc, used once for each process.
20512  * @user_setup_data: (closure user_setup): User data for @user_setup
20513  * @pid_callback: (scope call): Callback for child processes
20514  * @pid_callback_data: (closure pid_callback): User data for @callback
20515  * @error: return location for a #GError, or %NULL
20516  *
20517  * This function performs the equivalent of g_app_info_launch_uris(),
20518  * but is intended primarily for operating system components that
20519  * launch applications.  Ordinary applications should use
20520  * g_app_info_launch_uris().
20521  * In contrast to g_app_info_launch_uris(), all processes created will
20522  * always be run directly as children as if by the UNIX fork()/exec()
20523  * calls.
20524  * This guarantee allows additional control over the exact environment
20525  * of the child processes, which is provided via a setup function
20526  * semantics of the @setup function.
20527  *
20528  * Returns: %TRUE on successful launch, %FALSE otherwise.
20529  */
20530
20531
20532 /**
20533  * g_desktop_app_info_lookup_get_default_for_uri_scheme:
20534  * @lookup: a #GDesktopAppInfoLookup
20535  * @uri_scheme: a string containing a URI scheme.
20536  *
20537  * Gets the default application for launching applications
20538  * using this URI scheme for a particular GDesktopAppInfoLookup
20539  * implementation.
20540  * The GDesktopAppInfoLookup interface and this function is used
20541  * to implement g_app_info_get_default_for_uri_scheme() backends
20542  * in a GIO module. There is no reason for applications to use it
20543  * directly. Applications should use g_app_info_get_default_for_uri_scheme().
20544  *
20545  * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
20546  * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
20547  */
20548
20549
20550 /**
20551  * g_desktop_app_info_new:
20552  * @desktop_id: the desktop file id
20553  *
20554  * Creates a new #GDesktopAppInfo based on a desktop file id.
20555  * A desktop file id is the basename of the desktop file, including the
20556  * .desktop extension. GIO is looking for a desktop file with this name
20557  * in the <filename>applications</filename> subdirectories of the XDG data
20558  * directories (i.e. the directories specified in the
20559  * <envar>XDG_DATA_HOME</envar> and <envar>XDG_DATA_DIRS</envar> environment
20560  * variables). GIO also supports the prefix-to-subdirectory mapping that is
20561  * described in the <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Menu Spec</ulink>
20562  * (i.e. a desktop id of kde-foo.desktop will match
20563  * <filename>/usr/share/applications/kde/foo.desktop</filename>).
20564  *
20565  * Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id
20566  */
20567
20568
20569 /**
20570  * g_desktop_app_info_new_from_filename:
20571  * @filename: the path of a desktop file, in the GLib filename encoding
20572  *
20573  * Creates a new #GDesktopAppInfo.
20574  *
20575  * Returns: a new #GDesktopAppInfo or %NULL on error.
20576  */
20577
20578
20579 /**
20580  * g_desktop_app_info_new_from_keyfile:
20581  * @key_file: an opened #GKeyFile
20582  *
20583  * Creates a new #GDesktopAppInfo.
20584  *
20585  * Returns: a new #GDesktopAppInfo or %NULL on error.
20586  * Since: 2.18
20587  */
20588
20589
20590 /**
20591  * g_desktop_app_info_set_desktop_env:
20592  * @desktop_env: a string specifying what desktop this is
20593  *
20594  * Sets the name of the desktop that the application is running in.
20595  * This is used by g_app_info_should_show() to evaluate the
20596  * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal>
20597  * desktop entry fields.
20598  * The <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Desktop
20599  * Menu specification</ulink> recognizes the following:
20600  * <simplelist>
20601  * <member>GNOME</member>
20602  * <member>KDE</member>
20603  * <member>ROX</member>
20604  * <member>XFCE</member>
20605  * <member>Old</member>
20606  * </simplelist>
20607  * Should be called only once; subsequent calls are ignored.
20608  */
20609
20610
20611 /**
20612  * g_drive_can_eject:
20613  * @drive: a #GDrive.
20614  *
20615  * Checks if a drive can be ejected.
20616  *
20617  * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise.
20618  */
20619
20620
20621 /**
20622  * g_drive_can_poll_for_media:
20623  * @drive: a #GDrive.
20624  *
20625  * Checks if a drive can be polled for media changes.
20626  * %FALSE otherwise.
20627  *
20628  * Returns: %TRUE if the @drive can be polled for media changes,
20629  */
20630
20631
20632 /**
20633  * g_drive_can_start:
20634  * @drive: a #GDrive.
20635  *
20636  * Checks if a drive can be started.
20637  *
20638  * Returns: %TRUE if the @drive can be started, %FALSE otherwise.
20639  * Since: 2.22
20640  */
20641
20642
20643 /**
20644  * g_drive_can_start_degraded:
20645  * @drive: a #GDrive.
20646  *
20647  * Checks if a drive can be started degraded.
20648  *
20649  * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise.
20650  * Since: 2.22
20651  */
20652
20653
20654 /**
20655  * g_drive_can_stop:
20656  * @drive: a #GDrive.
20657  *
20658  * Checks if a drive can be stopped.
20659  *
20660  * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise.
20661  * Since: 2.22
20662  */
20663
20664
20665 /**
20666  * g_drive_eject:
20667  * @drive: a #GDrive.
20668  * @flags: flags affecting the unmount if required for eject
20669  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20670  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
20671  * @user_data: user data to pass to @callback
20672  *
20673  * Asynchronously ejects a drive.
20674  * When the operation is finished, @callback will be called.
20675  * You can then call g_drive_eject_finish() to obtain the
20676  * result of the operation.
20677  *
20678  * Deprecated: 2.22: Use g_drive_eject_with_operation() instead.
20679  */
20680
20681
20682 /**
20683  * g_drive_eject_finish:
20684  * @drive: a #GDrive.
20685  * @result: a #GAsyncResult.
20686  * @error: a #GError, or %NULL
20687  *
20688  * Finishes ejecting a drive.
20689  * %FALSE otherwise.
20690  *
20691  * Returns: %TRUE if the drive has been ejected successfully,
20692  * Deprecated: 2.22: Use g_drive_eject_with_operation_finish() instead.
20693  */
20694
20695
20696 /**
20697  * g_drive_eject_with_operation:
20698  * @drive: a #GDrive.
20699  * @flags: flags affecting the unmount if required for eject
20700  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
20701  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20702  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
20703  * @user_data: user data passed to @callback.
20704  *
20705  * Ejects a drive. This is an asynchronous operation, and is
20706  * finished by calling g_drive_eject_with_operation_finish() with the @drive
20707  * and #GAsyncResult data returned in the @callback.
20708  *
20709  * Since: 2.22
20710  */
20711
20712
20713 /**
20714  * g_drive_eject_with_operation_finish:
20715  * @drive: a #GDrive.
20716  * @result: a #GAsyncResult.
20717  * @error: a #GError location to store the error occuring, or %NULL to ignore.
20718  *
20719  * Finishes ejecting a drive. If any errors occurred during the operation,
20720  *
20721  * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise.
20722  * Since: 2.22
20723  */
20724
20725
20726 /**
20727  * g_drive_enumerate_identifiers:
20728  * @drive: a #GDrive
20729  *
20730  * Gets the kinds of identifiers that @drive has.
20731  * Use g_drive_get_identifer() to obtain the identifiers
20732  * themselves.
20733  * array of strings containing kinds of identifiers. Use g_strfreev()
20734  * to free.
20735  *
20736  * Returns: (transfer full) (array zero-terminated=1): a %NULL-terminated
20737  */
20738
20739
20740 /**
20741  * g_drive_get_icon:
20742  * @drive: a #GDrive.
20743  *
20744  * Gets the icon for @drive.
20745  * Free the returned object with g_object_unref().
20746  *
20747  * Returns: (transfer full): #GIcon for the @drive.
20748  */
20749
20750
20751 /**
20752  * g_drive_get_identifier:
20753  * @drive: a #GDrive
20754  * @kind: the kind of identifier to return
20755  *
20756  * Gets the identifier of the given kind for @drive.
20757  * requested identfier, or %NULL if the #GDrive
20758  * doesn't have this kind of identifier.
20759  *
20760  * Returns: a newly allocated string containing the
20761  */
20762
20763
20764 /**
20765  * g_drive_get_name:
20766  * @drive: a #GDrive.
20767  *
20768  * Gets the name of @drive.
20769  * string should be freed when no longer needed.
20770  *
20771  * Returns: a string containing @drive's name. The returned
20772  */
20773
20774
20775 /**
20776  * g_drive_get_start_stop_type:
20777  * @drive: a #GDrive.
20778  *
20779  * Gets a hint about how a drive can be started/stopped.
20780  *
20781  * Returns: A value from the #GDriveStartStopType enumeration.
20782  * Since: 2.22
20783  */
20784
20785
20786 /**
20787  * g_drive_get_volumes:
20788  * @drive: a #GDrive.
20789  *
20790  * Get a list of mountable volumes for @drive.
20791  * The returned list should be freed with g_list_free(), after
20792  * its elements have been unreffed with g_object_unref().
20793  *
20794  * Returns: (element-type GVolume) (transfer full): #GList containing any #GVolume objects on the given @drive.
20795  */
20796
20797
20798 /**
20799  * g_drive_has_media:
20800  * @drive: a #GDrive.
20801  *
20802  * Checks if the @drive has media. Note that the OS may not be polling
20803  * the drive for media changes; see g_drive_is_media_check_automatic()
20804  * for more details.
20805  *
20806  * Returns: %TRUE if @drive has media, %FALSE otherwise.
20807  */
20808
20809
20810 /**
20811  * g_drive_has_volumes:
20812  * @drive: a #GDrive.
20813  *
20814  * Check if @drive has any mountable volumes.
20815  *
20816  * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise.
20817  */
20818
20819
20820 /**
20821  * g_drive_is_media_check_automatic:
20822  * @drive: a #GDrive.
20823  *
20824  * Checks if @drive is capabable of automatically detecting media changes.
20825  * media changes, %FALSE otherwise.
20826  *
20827  * Returns: %TRUE if the @drive is capabable of automatically detecting
20828  */
20829
20830
20831 /**
20832  * g_drive_is_media_removable:
20833  * @drive: a #GDrive.
20834  *
20835  * Checks if the @drive supports removable media.
20836  *
20837  * Returns: %TRUE if @drive supports removable media, %FALSE otherwise.
20838  */
20839
20840
20841 /**
20842  * g_drive_poll_for_media:
20843  * @drive: a #GDrive.
20844  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20845  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
20846  * @user_data: user data to pass to @callback
20847  *
20848  * Asynchronously polls @drive to see if media has been inserted or removed.
20849  * When the operation is finished, @callback will be called.
20850  * You can then call g_drive_poll_for_media_finish() to obtain the
20851  * result of the operation.
20852  */
20853
20854
20855 /**
20856  * g_drive_poll_for_media_finish:
20857  * @drive: a #GDrive.
20858  * @result: a #GAsyncResult.
20859  * @error: a #GError, or %NULL
20860  *
20861  * Finishes an operation started with g_drive_poll_for_media() on a drive.
20862  * %FALSE otherwise.
20863  *
20864  * Returns: %TRUE if the drive has been poll_for_mediaed successfully,
20865  */
20866
20867
20868 /**
20869  * g_drive_start:
20870  * @drive: a #GDrive.
20871  * @flags: flags affecting the start operation.
20872  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
20873  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20874  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
20875  * @user_data: user data to pass to @callback
20876  *
20877  * Asynchronously starts a drive.
20878  * When the operation is finished, @callback will be called.
20879  * You can then call g_drive_start_finish() to obtain the
20880  * result of the operation.
20881  *
20882  * Since: 2.22
20883  */
20884
20885
20886 /**
20887  * g_drive_start_finish:
20888  * @drive: a #GDrive.
20889  * @result: a #GAsyncResult.
20890  * @error: a #GError, or %NULL
20891  *
20892  * Finishes starting a drive.
20893  * %FALSE otherwise.
20894  *
20895  * Returns: %TRUE if the drive has been started successfully,
20896  * Since: 2.22
20897  */
20898
20899
20900 /**
20901  * g_drive_stop:
20902  * @drive: a #GDrive.
20903  * @flags: flags affecting the unmount if required for stopping.
20904  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
20905  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20906  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
20907  * @user_data: user data to pass to @callback
20908  *
20909  * Asynchronously stops a drive.
20910  * When the operation is finished, @callback will be called.
20911  * You can then call g_drive_stop_finish() to obtain the
20912  * result of the operation.
20913  *
20914  * Since: 2.22
20915  */
20916
20917
20918 /**
20919  * g_drive_stop_finish:
20920  * @drive: a #GDrive.
20921  * @result: a #GAsyncResult.
20922  * @error: a #GError, or %NULL
20923  *
20924  * Finishes stopping a drive.
20925  * %FALSE otherwise.
20926  *
20927  * Returns: %TRUE if the drive has been stopped successfully,
20928  * Since: 2.22
20929  */
20930
20931
20932 /**
20933  * g_emblem_get_icon:
20934  * @emblem: a #GEmblem from which the icon should be extracted.
20935  *
20936  * Gives back the icon from @emblem.
20937  * the emblem and should not be modified or freed.
20938  *
20939  * Returns: (transfer none): a #GIcon. The returned object belongs to
20940  * Since: 2.18
20941  */
20942
20943
20944 /**
20945  * g_emblem_get_origin:
20946  * @emblem: a #GEmblem
20947  *
20948  * Gets the origin of the emblem.
20949  *
20950  * Returns: (transfer none): the origin of the emblem
20951  * Since: 2.18
20952  */
20953
20954
20955 /**
20956  * g_emblem_new:
20957  * @icon: a GIcon containing the icon.
20958  *
20959  * Creates a new emblem for @icon.
20960  *
20961  * Returns: a new #GEmblem.
20962  * Since: 2.18
20963  */
20964
20965
20966 /**
20967  * g_emblem_new_with_origin:
20968  * @icon: a GIcon containing the icon.
20969  * @origin: a GEmblemOrigin enum defining the emblem's origin
20970  *
20971  * Creates a new emblem for @icon.
20972  *
20973  * Returns: a new #GEmblem.
20974  * Since: 2.18
20975  */
20976
20977
20978 /**
20979  * g_emblemed_icon_add_emblem:
20980  * @emblemed: a #GEmblemedIcon
20981  * @emblem: a #GEmblem
20982  *
20983  * Adds @emblem to the #GList of #GEmblem <!-- -->s.
20984  *
20985  * Since: 2.18
20986  */
20987
20988
20989 /**
20990  * g_emblemed_icon_clear_emblems:
20991  * @emblemed: a #GEmblemedIcon
20992  *
20993  * Removes all the emblems from @icon.
20994  *
20995  * Since: 2.28
20996  */
20997
20998
20999 /**
21000  * g_emblemed_icon_get_emblems:
21001  * @emblemed: a #GEmblemedIcon
21002  *
21003  * Gets the list of emblems for the @icon.
21004  * #GEmblem <!-- -->s that is owned by @emblemed
21005  *
21006  * Returns: (element-type Gio.Emblem) (transfer none): a #GList of
21007  * Since: 2.18
21008  */
21009
21010
21011 /**
21012  * g_emblemed_icon_get_icon:
21013  * @emblemed: a #GEmblemedIcon
21014  *
21015  * Gets the main icon for @emblemed.
21016  *
21017  * Returns: (transfer none): a #GIcon that is owned by @emblemed
21018  * Since: 2.18
21019  */
21020
21021
21022 /**
21023  * g_emblemed_icon_new:
21024  * @icon: a #GIcon
21025  * @emblem: (allow-none): a #GEmblem, or %NULL
21026  *
21027  * Creates a new emblemed icon for @icon with the emblem @emblem.
21028  *
21029  * Returns: (transfer full): a new #GIcon
21030  * Since: 2.18
21031  */
21032
21033
21034 /**
21035  * g_file_append_to:
21036  * @file: input #GFile.
21037  * @flags: a set of #GFileCreateFlags.
21038  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21039  * @error: a #GError, or %NULL
21040  *
21041  * Gets an output stream for appending data to the file. If
21042  * the file doesn't already exist it is created.
21043  * By default files created are generally readable by everyone,
21044  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
21045  * will be made readable only to the current user, to the level that
21046  * is supported on the target filesystem.
21047  * If @cancellable is not %NULL, then the operation can be cancelled by
21048  * triggering the cancellable object from another thread. If the operation
21049  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21050  * Some file systems don't allow all file names, and may
21051  * return an %G_IO_ERROR_INVALID_FILENAME error.
21052  * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will be
21053  * returned. Other errors are possible too, and depend on what kind of
21054  * filesystem the file is on.
21055  * Free the returned object with g_object_unref().
21056  *
21057  * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
21058  */
21059
21060
21061 /**
21062  * g_file_append_to_async:
21063  * @file: input #GFile.
21064  * @flags: a set of #GFileCreateFlags.
21065  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21066  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21067  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21068  * @user_data: (closure): the data to pass to callback function
21069  *
21070  * Asynchronously opens @file for appending.
21071  * For more details, see g_file_append_to() which is
21072  * the synchronous version of this call.
21073  * When the operation is finished, @callback will be called. You can then call
21074  * g_file_append_to_finish() to get the result of the operation.
21075  */
21076
21077
21078 /**
21079  * g_file_append_to_finish:
21080  * @file: input #GFile.
21081  * @res: #GAsyncResult
21082  * @error: a #GError, or %NULL
21083  *
21084  * Finishes an asynchronous file append operation started with
21085  * g_file_append_to_async().
21086  * Free the returned object with g_object_unref().
21087  *
21088  * Returns: (transfer full): a valid #GFileOutputStream or %NULL on error.
21089  */
21090
21091
21092 /**
21093  * g_file_attribute_info_list_add:
21094  * @list: a #GFileAttributeInfoList.
21095  * @name: the name of the attribute to add.
21096  * @type: the #GFileAttributeType for the attribute.
21097  * @flags: #GFileAttributeInfoFlags for the attribute.
21098  *
21099  * Adds a new attribute with @name to the @list, setting
21100  * its @type and @flags.
21101  */
21102
21103
21104 /**
21105  * g_file_attribute_info_list_dup:
21106  * @list: a #GFileAttributeInfoList to duplicate.
21107  *
21108  * Makes a duplicate of a file attribute info list.
21109  *
21110  * Returns: a copy of the given @list.
21111  */
21112
21113
21114 /**
21115  * g_file_attribute_info_list_lookup:
21116  * @list: a #GFileAttributeInfoList.
21117  * @name: the name of the attribute to lookup.
21118  *
21119  * Gets the file attribute with the name @name from @list.
21120  * attribute isn't found.
21121  *
21122  * Returns: a #GFileAttributeInfo for the @name, or %NULL if an
21123  */
21124
21125
21126 /**
21127  * g_file_attribute_info_list_new:
21128  *
21129  * Creates a new file attribute info list.
21130  *
21131  * Returns: a #GFileAttributeInfoList.
21132  */
21133
21134
21135 /**
21136  * g_file_attribute_info_list_ref:
21137  * @list: a #GFileAttributeInfoList to reference.
21138  *
21139  * References a file attribute info list.
21140  *
21141  * Returns: #GFileAttributeInfoList or %NULL on error.
21142  */
21143
21144
21145 /**
21146  * g_file_attribute_info_list_unref:
21147  * @list: The #GFileAttributeInfoList to unreference.
21148  *
21149  * Removes a reference from the given @list. If the reference count
21150  * falls to zero, the @list is deleted.
21151  */
21152
21153
21154 /**
21155  * g_file_attribute_matcher_enumerate_namespace:
21156  * @matcher: a #GFileAttributeMatcher.
21157  * @ns: a string containing a file attribute namespace.
21158  *
21159  * Checks if the matcher will match all of the keys in a given namespace.
21160  * This will always return %TRUE if a wildcard character is in use (e.g. if
21161  * matcher was created with "standard::*" and @ns is "standard", or if matcher was created
21162  * using "*" and namespace is anything.)
21163  * in the given @ns, %FALSE otherwise.
21164  *
21165  * Todo: this is awkwardly worded.
21166  * Returns: %TRUE if the matcher matches all of the entries
21167  */
21168
21169
21170 /**
21171  * g_file_attribute_matcher_enumerate_next:
21172  * @matcher: a #GFileAttributeMatcher.
21173  *
21174  * Gets the next matched attribute from a #GFileAttributeMatcher.
21175  * no more attribute exist.
21176  *
21177  * Returns: a string containing the next attribute or %NULL if
21178  */
21179
21180
21181 /**
21182  * g_file_attribute_matcher_matches:
21183  * @matcher: a #GFileAttributeMatcher.
21184  * @attribute: a file attribute key.
21185  *
21186  * Checks if an attribute will be matched by an attribute matcher. If
21187  * the matcher was created with the "*" matching string, this function
21188  * will always return %TRUE.
21189  *
21190  * Returns: %TRUE if @attribute matches @matcher. %FALSE otherwise.
21191  */
21192
21193
21194 /**
21195  * g_file_attribute_matcher_matches_only:
21196  * @matcher: a #GFileAttributeMatcher.
21197  * @attribute: a file attribute key.
21198  *
21199  * Checks if a attribute matcher only matches a given attribute. Always
21200  * returns %FALSE if "*" was used when creating the matcher.
21201  *
21202  * Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise.
21203  */
21204
21205
21206 /**
21207  * g_file_attribute_matcher_new:
21208  * @attributes: an attribute string to match.
21209  *
21210  * Creates a new file attribute matcher, which matches attributes
21211  * against a given string. #GFileAttributeMatcher<!-- -->s are reference
21212  * counted structures, and are created with a reference count of 1. If
21213  * the number of references falls to 0, the #GFileAttributeMatcher is
21214  * automatically destroyed.
21215  * The @attribute string should be formatted with specific keys separated
21216  * from namespaces with a double colon. Several "namespace::key" strings may be
21217  * concatenated with a single comma (e.g. "standard::type,standard::is-hidden").
21218  * The wildcard "*" may be used to match all keys and namespaces, or
21219  * "namespace::*" will match all keys in a given namespace.
21220  * Examples of strings to use:
21221  * <table>
21222  * <title>File Attribute Matcher strings and results</title>
21223  * <tgroup cols='2' align='left'><thead>
21224  * <row><entry> Matcher String </entry><entry> Matches </entry></row></thead>
21225  * <tbody>
21226  * <row><entry>"*"</entry><entry>matches all attributes.</entry></row>
21227  * <row><entry>"standard::is-hidden"</entry><entry>matches only the key is-hidden in the standard namespace.</entry></row>
21228  * <row><entry>"standard::type,unix::*"</entry><entry>matches the type key in the standard namespace and
21229  * all keys in the unix namespace.</entry></row>
21230  * </tbody></tgroup>
21231  * </table>
21232  *
21233  * Returns: a #GFileAttributeMatcher.
21234  */
21235
21236
21237 /**
21238  * g_file_attribute_matcher_ref:
21239  * @matcher: a #GFileAttributeMatcher.
21240  *
21241  * References a file attribute matcher.
21242  *
21243  * Returns: a #GFileAttributeMatcher.
21244  */
21245
21246
21247 /**
21248  * g_file_attribute_matcher_unref:
21249  * @matcher: a #GFileAttributeMatcher.
21250  *
21251  * Unreferences @matcher. If the reference count falls below 1,
21252  * the @matcher is automatically freed.
21253  */
21254
21255
21256 /**
21257  * g_file_copy:
21258  * @source: input #GFile.
21259  * @destination: destination #GFile
21260  * @flags: set of #GFileCopyFlags
21261  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21262  * @progress_callback: (scope call): function to callback with progress information
21263  * @progress_callback_data: (closure): user data to pass to @progress_callback
21264  * @error: #GError to set on error, or %NULL
21265  *
21266  * Copies the file @source to the location specified by @destination.
21267  * Can not handle recursive copies of directories.
21268  * If the flag #G_FILE_COPY_OVERWRITE is specified an already
21269  * existing @destination file is overwritten.
21270  * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
21271  * will be copied as symlinks, otherwise the target of the
21272  * If @cancellable is not %NULL, then the operation can be cancelled by
21273  * triggering the cancellable object from another thread. If the operation
21274  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21275  * If @progress_callback is not %NULL, then the operation can be monitored by
21276  * setting this to a #GFileProgressCallback function. @progress_callback_data
21277  * will be passed to this function. It is guaranteed that this callback will
21278  * be called after all data has been transferred with the total number of bytes
21279  * copied during the operation.
21280  * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
21281  * error is returned, independent on the status of the @destination.
21282  * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
21283  * error G_IO_ERROR_EXISTS is returned.
21284  * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
21285  * error is returned. If trying to overwrite a directory with a directory the
21286  * G_IO_ERROR_WOULD_MERGE error is returned.
21287  * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
21288  * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
21289  * is returned.
21290  * If you are interested in copying the #GFile object itself (not the on-disk
21291  * file), see g_file_dup().
21292  *
21293  * Returns: %TRUE on success, %FALSE otherwise.
21294  */
21295
21296
21297 /**
21298  * g_file_copy_async: (skip)
21299  * @source: input #GFile.
21300  * @destination: destination #GFile
21301  * @flags: set of #GFileCopyFlags
21302  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21303  * @cancellable: optional #GCancellable object, %NULL to ignore.
21304  * @progress_callback: function to callback with progress information
21305  * @progress_callback_data: user data to pass to @progress_callback
21306  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
21307  * @user_data: the data to pass to callback function
21308  *
21309  * Copies the file @source to the location specified by @destination
21310  * asynchronously. For details of the behaviour, see g_file_copy().
21311  * If @progress_callback is not %NULL, then that function that will be called
21312  * just like in g_file_copy(), however the callback will run in the main loop,
21313  * not in the thread that is doing the I/O operation.
21314  * When the operation is finished, @callback will be called. You can then call
21315  * g_file_copy_finish() to get the result of the operation.
21316  */
21317
21318
21319 /**
21320  * g_file_copy_attributes:
21321  * @source: a #GFile with attributes.
21322  * @destination: a #GFile to copy attributes to.
21323  * @flags: a set of #GFileCopyFlags.
21324  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21325  * @error: a #GError, %NULL to ignore.
21326  *
21327  * Copies the file attributes from @source to @destination.
21328  * Normally only a subset of the file attributes are copied,
21329  * those that are copies in a normal file copy operation
21330  * (which for instance does not include e.g. owner). However
21331  * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then
21332  * all the metadata that is possible to copy is copied. This
21333  * is useful when implementing move by copy + delete source.
21334  *
21335  * Returns: %TRUE if the attributes were copied successfully, %FALSE otherwise.
21336  */
21337
21338
21339 /**
21340  * g_file_copy_finish:
21341  * @file: input #GFile.
21342  * @res: a #GAsyncResult.
21343  * @error: a #GError, or %NULL
21344  *
21345  * Finishes copying the file started with
21346  * g_file_copy_async().
21347  *
21348  * Returns: a %TRUE on success, %FALSE on error.
21349  */
21350
21351
21352 /**
21353  * g_file_create:
21354  * @file: input #GFile.
21355  * @flags: a set of #GFileCreateFlags.
21356  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21357  * @error: a #GError, or %NULL
21358  *
21359  * Creates a new file and returns an output stream for writing to it.
21360  * The file must not already exist.
21361  * By default files created are generally readable by everyone,
21362  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
21363  * will be made readable only to the current user, to the level that
21364  * is supported on the target filesystem.
21365  * If @cancellable is not %NULL, then the operation can be cancelled by
21366  * triggering the cancellable object from another thread. If the operation
21367  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21368  * If a file or directory with this name already exists the G_IO_ERROR_EXISTS
21369  * error will be returned.
21370  * Some file systems don't allow all file names, and may
21371  * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
21372  * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
21373  * Other errors are possible too, and depend on what kind of
21374  * filesystem the file is on.
21375  * %NULL on error.
21376  * Free the returned object with g_object_unref().
21377  *
21378  * Returns: (transfer full): a #GFileOutputStream for the newly created file, or
21379  */
21380
21381
21382 /**
21383  * g_file_create_async:
21384  * @file: input #GFile.
21385  * @flags: a set of #GFileCreateFlags.
21386  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21387  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21388  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21389  * @user_data: (closure): the data to pass to callback function
21390  *
21391  * Asynchronously creates a new file and returns an output stream for writing to it.
21392  * The file must not already exist.
21393  * For more details, see g_file_create() which is
21394  * the synchronous version of this call.
21395  * When the operation is finished, @callback will be called. You can then call
21396  * g_file_create_finish() to get the result of the operation.
21397  */
21398
21399
21400 /**
21401  * g_file_create_finish:
21402  * @file: input #GFile.
21403  * @res: a #GAsyncResult.
21404  * @error: a #GError, or %NULL
21405  *
21406  * Finishes an asynchronous file create operation started with
21407  * g_file_create_async().
21408  * Free the returned object with g_object_unref().
21409  *
21410  * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
21411  */
21412
21413
21414 /**
21415  * g_file_create_readwrite:
21416  * @file: a #GFile
21417  * @flags: a set of #GFileCreateFlags
21418  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
21419  * @error: return location for a #GError, or %NULL
21420  *
21421  * Creates a new file and returns a stream for reading and writing to it.
21422  * The file must not already exist.
21423  * By default files created are generally readable by everyone,
21424  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
21425  * will be made readable only to the current user, to the level that
21426  * is supported on the target filesystem.
21427  * If @cancellable is not %NULL, then the operation can be cancelled by
21428  * triggering the cancellable object from another thread. If the operation
21429  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21430  * If a file or directory with this name already exists the %G_IO_ERROR_EXISTS
21431  * error will be returned. Some file systems don't allow all file names,
21432  * and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name
21433  * is too long, %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors
21434  * are possible too, and depend on what kind of filesystem the file is on.
21435  * Note that in many non-local file cases read and write streams are not
21436  * supported, so make sure you really need to do read and write streaming,
21437  * rather than just opening for reading or writing.
21438  * Free the returned object with g_object_unref().
21439  *
21440  * Returns: (transfer full): a #GFileIOStream for the newly created file, or %NULL on error.
21441  * Since: 2.22
21442  */
21443
21444
21445 /**
21446  * g_file_create_readwrite_async:
21447  * @file: input #GFile
21448  * @flags: a set of #GFileCreateFlags
21449  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
21450  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
21451  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21452  * @user_data: (closure): the data to pass to callback function
21453  *
21454  * Asynchronously creates a new file and returns a stream for reading and
21455  * writing to it. The file must not already exist.
21456  * For more details, see g_file_create_readwrite() which is
21457  * the synchronous version of this call.
21458  * When the operation is finished, @callback will be called. You can then
21459  * call g_file_create_readwrite_finish() to get the result of the operation.
21460  *
21461  * Since: 2.22
21462  */
21463
21464
21465 /**
21466  * g_file_create_readwrite_finish:
21467  * @file: input #GFile
21468  * @res: a #GAsyncResult
21469  * @error: a #GError, or %NULL
21470  *
21471  * Finishes an asynchronous file create operation started with
21472  * g_file_create_readwrite_async().
21473  * Free the returned object with g_object_unref().
21474  *
21475  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
21476  * Since: 2.22
21477  */
21478
21479
21480 /**
21481  * g_file_delete:
21482  * @file: input #GFile.
21483  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21484  * @error: a #GError, or %NULL
21485  *
21486  * Deletes a file. If the @file is a directory, it will only be deleted if it
21487  * is empty.
21488  * If @cancellable is not %NULL, then the operation can be cancelled by
21489  * triggering the cancellable object from another thread. If the operation
21490  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21491  *
21492  * Virtual: delete_file
21493  * Returns: %TRUE if the file was deleted. %FALSE otherwise.
21494  */
21495
21496
21497 /**
21498  * g_file_descriptor_based_get_fd:
21499  * @fd_based: a #GFileDescriptorBased.
21500  *
21501  * Gets the underlying file descriptor.
21502  *
21503  * Returns: The file descriptor
21504  * Since: 2.24
21505  */
21506
21507
21508 /**
21509  * g_file_dup:
21510  * @file: input #GFile.
21511  *
21512  * Duplicates a #GFile handle. This operation does not duplicate
21513  * the actual file or directory represented by the #GFile; see
21514  * g_file_copy() if attempting to copy a file.
21515  * This call does no blocking i/o.
21516  *
21517  * Returns: (transfer full): a new #GFile that is a duplicate of the given #GFile.
21518  */
21519
21520
21521 /**
21522  * g_file_eject_mountable:
21523  * @file: input #GFile.
21524  * @flags: flags affecting the operation
21525  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21526  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
21527  * @user_data: (closure): the data to pass to callback function
21528  *
21529  * Starts an asynchronous eject on a mountable.
21530  * When this operation has completed, @callback will be called with
21531  * g_file_eject_mountable_finish().
21532  * If @cancellable is not %NULL, then the operation can be cancelled by
21533  * triggering the cancellable object from another thread. If the operation
21534  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21535  *
21536  * Deprecated: 2.22: Use g_file_eject_mountable_with_operation() instead.
21537  */
21538
21539
21540 /**
21541  * g_file_eject_mountable_finish:
21542  * @file: input #GFile.
21543  * @result: a #GAsyncResult.
21544  * @error: a #GError, or %NULL
21545  *
21546  * Finishes an asynchronous eject operation started by
21547  * g_file_eject_mountable().
21548  * otherwise.
21549  *
21550  * Returns: %TRUE if the @file was ejected successfully. %FALSE
21551  * Deprecated: 2.22: Use g_file_eject_mountable_with_operation_finish() instead.
21552  */
21553
21554
21555 /**
21556  * g_file_eject_mountable_with_operation:
21557  * @file: input #GFile.
21558  * @flags: flags affecting the operation
21559  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
21560  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21561  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
21562  * @user_data: (closure): the data to pass to callback function
21563  *
21564  * Starts an asynchronous eject on a mountable.
21565  * When this operation has completed, @callback will be called with
21566  * g_file_eject_mountable_with_operation_finish().
21567  * If @cancellable is not %NULL, then the operation can be cancelled by
21568  * triggering the cancellable object from another thread. If the operation
21569  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21570  *
21571  * Since: 2.22
21572  */
21573
21574
21575 /**
21576  * g_file_eject_mountable_with_operation_finish:
21577  * @file: input #GFile.
21578  * @result: a #GAsyncResult.
21579  * @error: a #GError, or %NULL
21580  *
21581  * Finishes an asynchronous eject operation started by
21582  * g_file_eject_mountable_with_operation().
21583  * otherwise.
21584  *
21585  * Returns: %TRUE if the @file was ejected successfully. %FALSE
21586  * Since: 2.22
21587  */
21588
21589
21590 /**
21591  * g_file_enumerate_children:
21592  * @file: input #GFile.
21593  * @attributes: an attribute query string.
21594  * @flags: a set of #GFileQueryInfoFlags.
21595  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21596  * @error: #GError for error reporting.
21597  *
21598  * Gets the requested information about the files in a directory. The result
21599  * is a #GFileEnumerator object that will give out #GFileInfo objects for
21600  * all the files in the directory.
21601  * The @attributes value is a string that specifies the file attributes that
21602  * should be gathered. It is not an error if it's not possible to read a particular
21603  * requested attribute from a file - it just won't be set. @attributes should
21604  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
21605  * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
21606  * namespace. An example attribute query be "standard::*,owner::user".
21607  * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
21608  * If @cancellable is not %NULL, then the operation can be cancelled by
21609  * triggering the cancellable object from another thread. If the operation
21610  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21611  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
21612  * If the file is not a directory, the G_FILE_ERROR_NOTDIR error will be returned.
21613  * Other errors are possible too.
21614  * Free the returned object with g_object_unref().
21615  *
21616  * Returns: (transfer full): A #GFileEnumerator if successful, %NULL on error.
21617  */
21618
21619
21620 /**
21621  * g_file_enumerate_children_async:
21622  * @file: input #GFile.
21623  * @attributes: an attribute query string.
21624  * @flags: a set of #GFileQueryInfoFlags.
21625  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21626  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21627  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21628  * @user_data: (closure): the data to pass to callback function
21629  *
21630  * Asynchronously gets the requested information about the files in a directory. The result
21631  * is a #GFileEnumerator object that will give out #GFileInfo objects for
21632  * all the files in the directory.
21633  * For more details, see g_file_enumerate_children() which is
21634  * the synchronous version of this call.
21635  * When the operation is finished, @callback will be called. You can then call
21636  * g_file_enumerate_children_finish() to get the result of the operation.
21637  */
21638
21639
21640 /**
21641  * g_file_enumerate_children_finish:
21642  * @file: input #GFile.
21643  * @res: a #GAsyncResult.
21644  * @error: a #GError.
21645  *
21646  * Finishes an async enumerate children operation.
21647  * See g_file_enumerate_children_async().
21648  * Free the returned object with g_object_unref().
21649  *
21650  * Returns: (transfer full): a #GFileEnumerator or %NULL if an error occurred.
21651  */
21652
21653
21654 /**
21655  * g_file_enumerator_close:
21656  * @enumerator: a #GFileEnumerator.
21657  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21658  * @error: location to store the error occuring, or %NULL to ignore
21659  *
21660  * Releases all resources used by this enumerator, making the
21661  * enumerator return %G_IO_ERROR_CLOSED on all calls.
21662  * This will be automatically called when the last reference
21663  * is dropped, but you might want to call this function to make
21664  * sure resources are released as early as possible.
21665  *
21666  * Returns: #TRUE on success or #FALSE on error.
21667  */
21668
21669
21670 /**
21671  * g_file_enumerator_close_async:
21672  * @enumerator: a #GFileEnumerator.
21673  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21674  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21675  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21676  * @user_data: (closure): the data to pass to callback function
21677  *
21678  * Asynchronously closes the file enumerator.
21679  * If @cancellable is not %NULL, then the operation can be cancelled by
21680  * triggering the cancellable object from another thread. If the operation
21681  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in
21682  * g_file_enumerator_close_finish().
21683  */
21684
21685
21686 /**
21687  * g_file_enumerator_close_finish:
21688  * @enumerator: a #GFileEnumerator.
21689  * @result: a #GAsyncResult.
21690  * @error: a #GError location to store the error occuring, or %NULL to ignore.
21691  *
21692  * Finishes closing a file enumerator, started from g_file_enumerator_close_async().
21693  * If the file enumerator was already closed when g_file_enumerator_close_async()
21694  * was called, then this function will report %G_IO_ERROR_CLOSED in @error, and
21695  * return %FALSE. If the file enumerator had pending operation when the close
21696  * operation was started, then this function will report %G_IO_ERROR_PENDING, and
21697  * return %FALSE.  If @cancellable was not %NULL, then the operation may have been
21698  * cancelled by triggering the cancellable object from another thread. If the operation
21699  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
21700  * returned.
21701  *
21702  * Returns: %TRUE if the close operation has finished successfully.
21703  */
21704
21705
21706 /**
21707  * g_file_enumerator_get_container:
21708  * @enumerator: a #GFileEnumerator
21709  *
21710  * Get the #GFile container which is being enumerated.
21711  *
21712  * Returns: (transfer none): the #GFile which is being enumerated.
21713  * Since: 2.18
21714  */
21715
21716
21717 /**
21718  * g_file_enumerator_has_pending:
21719  * @enumerator: a #GFileEnumerator.
21720  *
21721  * Checks if the file enumerator has pending operations.
21722  *
21723  * Returns: %TRUE if the @enumerator has pending operations.
21724  */
21725
21726
21727 /**
21728  * g_file_enumerator_is_closed:
21729  * @enumerator: a #GFileEnumerator.
21730  *
21731  * Checks if the file enumerator has been closed.
21732  *
21733  * Returns: %TRUE if the @enumerator is closed.
21734  */
21735
21736
21737 /**
21738  * g_file_enumerator_next_file:
21739  * @enumerator: a #GFileEnumerator.
21740  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21741  * @error: location to store the error occuring, or %NULL to ignore
21742  *
21743  * Returns information for the next file in the enumerated object.
21744  * Will block until the information is available. The #GFileInfo
21745  * returned from this function will contain attributes that match the
21746  * attribute string that was passed when the #GFileEnumerator was created.
21747  * On error, returns %NULL and sets @error to the error. If the
21748  * enumerator is at the end, %NULL will be returned and @error will
21749  * be unset.
21750  * Free the returned object with g_object_unref() when no longer needed.
21751  *
21752  * Returns: (transfer full): A #GFileInfo or %NULL on error or end of enumerator.
21753  */
21754
21755
21756 /**
21757  * g_file_enumerator_next_files_async:
21758  * @enumerator: a #GFileEnumerator.
21759  * @num_files: the number of file info objects to request
21760  * @io_priority: the <link linkend="gioscheduler">io priority</link> of the request.
21761  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21762  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21763  * @user_data: (closure): the data to pass to callback function
21764  *
21765  * Request information for a number of files from the enumerator asynchronously.
21766  * When all i/o for the operation is finished the @callback will be called with
21767  * the requested information.
21768  * The callback can be called with less than @num_files files in case of error
21769  * or at the end of the enumerator. In case of a partial error the callback will
21770  * be called with any succeeding items and no error, and on the next request the
21771  * error will be reported. If a request is cancelled the callback will be called
21772  * with %G_IO_ERROR_CANCELLED.
21773  * During an async request no other sync and async calls are allowed, and will
21774  * result in %G_IO_ERROR_PENDING errors.
21775  * Any outstanding i/o request with higher priority (lower numerical value) will
21776  * be executed before an outstanding request with lower priority. Default
21777  * priority is %G_PRIORITY_DEFAULT.
21778  */
21779
21780
21781 /**
21782  * g_file_enumerator_next_files_finish:
21783  * @enumerator: a #GFileEnumerator.
21784  * @result: a #GAsyncResult.
21785  * @error: a #GError location to store the error occuring, or %NULL to ignore.
21786  *
21787  * Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
21788  * g_list_free() and unref the infos with g_object_unref() when you're
21789  * done with them.
21790  *
21791  * Returns: (transfer full) (element-type Gio.FileInfo): a #GList of #GFileInfo<!---->s. You must free the list with
21792  */
21793
21794
21795 /**
21796  * g_file_enumerator_set_pending:
21797  * @enumerator: a #GFileEnumerator.
21798  * @pending: a boolean value.
21799  *
21800  * Sets the file enumerator as having pending operations.
21801  */
21802
21803
21804 /**
21805  * g_file_equal:
21806  * @file1: the first #GFile.
21807  * @file2: the second #GFile.
21808  *
21809  * Checks equality of two given #GFile<!-- -->s. Note that two
21810  * #GFile<!-- -->s that differ can still refer to the same
21811  * file on the filesystem due to various forms of filename
21812  * aliasing.
21813  * This call does no blocking i/o.
21814  * %FALSE if either is not a #GFile.
21815  *
21816  * Returns: %TRUE if @file1 and @file2 are equal.
21817  */
21818
21819
21820 /**
21821  * g_file_find_enclosing_mount:
21822  * @file: input #GFile.
21823  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21824  * @error: a #GError.
21825  *
21826  * Gets a #GMount for the #GFile.
21827  * If the #GFileIface for @file does not have a mount (e.g. possibly a
21828  * remote share), @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL
21829  * will be returned.
21830  * If @cancellable is not %NULL, then the operation can be cancelled by
21831  * triggering the cancellable object from another thread. If the operation
21832  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21833  * Free the returned object with g_object_unref().
21834  *
21835  * Returns: (transfer full): a #GMount where the @file is located or %NULL on error.
21836  */
21837
21838
21839 /**
21840  * g_file_find_enclosing_mount_async:
21841  * @file: a #GFile
21842  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21843  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21844  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21845  * @user_data: (closure): the data to pass to callback function
21846  *
21847  * Asynchronously gets the mount for the file.
21848  * For more details, see g_file_find_enclosing_mount() which is
21849  * the synchronous version of this call.
21850  * When the operation is finished, @callback will be called. You can then call
21851  * g_file_find_enclosing_mount_finish() to get the result of the operation.
21852  */
21853
21854
21855 /**
21856  * g_file_find_enclosing_mount_finish:
21857  * @file: a #GFile
21858  * @res: a #GAsyncResult
21859  * @error: a #GError
21860  *
21861  * Finishes an asynchronous find mount request.
21862  * See g_file_find_enclosing_mount_async().
21863  * Free the returned object with g_object_unref().
21864  *
21865  * Returns: (transfer full): #GMount for given @file or %NULL on error.
21866  */
21867
21868
21869 /**
21870  * g_file_get_basename:
21871  * @file: input #GFile.
21872  *
21873  * Gets the base name (the last component of the path) for a given #GFile.
21874  * If called for the top level of a system (such as the filesystem root
21875  * or a uri like sftp://host/) it will return a single directory separator
21876  * (and on Windows, possibly a drive letter).
21877  * The base name is a byte string (*not* UTF-8). It has no defined encoding
21878  * or rules other than it may not contain zero bytes.  If you want to use
21879  * filenames in a user interface you should use the display name that you
21880  * can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
21881  * attribute with g_file_query_info().
21882  * This call does no blocking i/o.
21883  * if given #GFile is invalid. The returned string should be
21884  * freed with g_free() when no longer needed.
21885  *
21886  * Returns: string containing the #GFile's base name, or %NULL
21887  */
21888
21889
21890 /**
21891  * g_file_get_child:
21892  * @file: input #GFile.
21893  * @name: string containing the child's basename.
21894  *
21895  * Gets a child of @file with basename equal to @name.
21896  * Note that the file with that specific name might not exist, but
21897  * you can still have a #GFile that points to it. You can use this
21898  * for instance to create that file.
21899  * This call does no blocking i/o.
21900  * Free the returned object with g_object_unref().
21901  *
21902  * Returns: (transfer full): a #GFile to a child specified by @name.
21903  */
21904
21905
21906 /**
21907  * g_file_get_child_for_display_name:
21908  * @file: input #GFile.
21909  * @display_name: string to a possible child.
21910  * @error: #GError.
21911  *
21912  * Gets the child of @file for a given @display_name (i.e. a UTF8
21913  * version of the name). If this function fails, it returns %NULL and @error will be
21914  * set. This is very useful when constructing a GFile for a new file
21915  * and the user entered the filename in the user interface, for instance
21916  * when you select a directory and type a filename in the file selector.
21917  * This call does no blocking i/o.
21918  * %NULL if the display name couldn't be converted.
21919  * Free the returned object with g_object_unref().
21920  *
21921  * Returns: (transfer full): a #GFile to the specified child, or
21922  */
21923
21924
21925 /**
21926  * g_file_get_parent:
21927  * @file: input #GFile.
21928  *
21929  * Gets the parent directory for the @file.
21930  * If the @file represents the root directory of the
21931  * file system, then %NULL will be returned.
21932  * This call does no blocking i/o.
21933  * #GFile or %NULL if there is no parent.
21934  * Free the returned object with g_object_unref().
21935  *
21936  * Returns: (transfer full): a #GFile structure to the parent of the given
21937  */
21938
21939
21940 /**
21941  * g_file_get_parse_name:
21942  * @file: input #GFile.
21943  *
21944  * Gets the parse name of the @file.
21945  * A parse name is a UTF-8 string that describes the
21946  * file such that one can get the #GFile back using
21947  * g_file_parse_name().
21948  * This is generally used to show the #GFile as a nice
21949  * full-pathname kind of string in a user interface,
21950  * like in a location entry.
21951  * For local files with names that can safely be converted
21952  * to UTF8 the pathname is used, otherwise the IRI is used
21953  * (a form of URI that allows UTF8 characters unescaped).
21954  * This call does no blocking i/o.
21955  * string should be freed with g_free() when no longer needed.
21956  *
21957  * Returns: a string containing the #GFile's parse name. The returned
21958  */
21959
21960
21961 /**
21962  * g_file_get_path:
21963  * @file: input #GFile.
21964  *
21965  * Gets the local pathname for #GFile, if one exists.
21966  * This call does no blocking i/o.
21967  * no such path exists. The returned string should be
21968  * freed with g_free() when no longer needed.
21969  *
21970  * Returns: string containing the #GFile's path, or %NULL if
21971  */
21972
21973
21974 /**
21975  * g_file_get_relative_path:
21976  * @parent: input #GFile.
21977  * @descendant: input #GFile.
21978  *
21979  * Gets the path for @descendant relative to @parent.
21980  * This call does no blocking i/o.
21981  * to @parent, or %NULL if @descendant doesn't have @parent as prefix.
21982  * The returned string should be freed with g_free() when no longer needed.
21983  *
21984  * Returns: string with the relative path from @descendant
21985  */
21986
21987
21988 /**
21989  * g_file_get_uri:
21990  * @file: input #GFile.
21991  *
21992  * Gets the URI for the @file.
21993  * This call does no blocking i/o.
21994  * The returned string should be freed with g_free() when no longer needed.
21995  *
21996  * Returns: a string containing the #GFile's URI.
21997  */
21998
21999
22000 /**
22001  * g_file_get_uri_scheme:
22002  * @file: input #GFile.
22003  *
22004  * Gets the URI scheme for a #GFile.
22005  * RFC 3986 decodes the scheme as:
22006  * <programlisting>
22007  * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
22008  * </programlisting>
22009  * Common schemes include "file", "http", "ftp", etc.
22010  * This call does no blocking i/o.
22011  * #GFile. The returned string should be freed with g_free()
22012  * when no longer needed.
22013  *
22014  * Returns: a string containing the URI scheme for the given
22015  */
22016
22017
22018 /**
22019  * g_file_has_parent:
22020  * @file: input #GFile
22021  * @parent: the parent to check for, or %NULL
22022  *
22023  * Checks if @file has a parent, and optionally, if it is @parent.
22024  * If @parent is %NULL then this function returns %TRUE if @file has any
22025  * parent at all.  If @parent is non-%NULL then %TRUE is only returned
22026  * if @file is a child of @parent.
22027  * case that @parent is %NULL).
22028  *
22029  * Returns: %TRUE if @file is a child of @parent (or any parent in the
22030  * Since: 2.24
22031  */
22032
22033
22034 /**
22035  * g_file_has_prefix:
22036  * @file: input #GFile.
22037  * @prefix: input #GFile.
22038  *
22039  * Checks whether @file has the prefix specified by @prefix. In other word,
22040  * if the names of inital elements of @file<!-- -->s pathname match @prefix.
22041  * Only full pathname elements are matched, so a path like /foo is not
22042  * considered a prefix of /foobar, only of /foo/bar.
22043  * This call does no i/o, as it works purely on names. As such it can
22044  * sometimes return %FALSE even if @file is inside a @prefix (from a
22045  * filesystem point of view), because the prefix of @file is an alias
22046  * of @prefix.
22047  * %FALSE otherwise.
22048  *
22049  * Virtual: prefix_matches
22050  * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix.
22051  */
22052
22053
22054 /**
22055  * g_file_has_uri_scheme:
22056  * @file: input #GFile.
22057  * @uri_scheme: a string containing a URI scheme.
22058  *
22059  * Checks to see if a #GFile has a given URI scheme.
22060  * This call does no blocking i/o.
22061  * given URI scheme, %FALSE if URI scheme is %NULL,
22062  * not supported, or #GFile is invalid.
22063  *
22064  * Returns: %TRUE if #GFile's backend supports the
22065  */
22066
22067
22068 /**
22069  * g_file_hash:
22070  * @file: #gconstpointer to a #GFile.
22071  *
22072  * Creates a hash value for a #GFile.
22073  * This call does no blocking i/o.
22074  * integer that can be used as hash value for the #GFile.
22075  * This function is intended for easily hashing a #GFile to
22076  * add to a #GHashTable or similar data structure.
22077  *
22078  * Virtual: hash
22079  * Returns: 0 if @file is not a valid #GFile, otherwise an
22080  */
22081
22082
22083 /**
22084  * g_file_icon_get_file:
22085  * @icon: a #GIcon.
22086  *
22087  * Gets the #GFile associated with the given @icon.
22088  *
22089  * Returns: (transfer none): a #GFile, or %NULL.
22090  */
22091
22092
22093 /**
22094  * g_file_icon_new:
22095  * @file: a #GFile.
22096  *
22097  * Creates a new icon for a file.
22098  *
22099  * Returns: (transfer full): a #GIcon for the given @file, or %NULL on error.
22100  */
22101
22102
22103 /**
22104  * g_file_info_clear_status:
22105  * @info: a #GFileInfo.
22106  *
22107  * Clears the status information from @info.
22108  */
22109
22110
22111 /**
22112  * g_file_info_copy_into:
22113  * @src_info: source to copy attributes from.
22114  * @dest_info: destination to copy attributes to.
22115  *
22116  * Copies all of the #GFileAttribute<!-- -->s from @src_info to @dest_info.
22117  */
22118
22119
22120 /**
22121  * g_file_info_dup:
22122  * @other: a #GFileInfo.
22123  *
22124  * Duplicates a file info structure.
22125  *
22126  * Returns: (transfer full): a duplicate #GFileInfo of @other.
22127  */
22128
22129
22130 /**
22131  * g_file_info_get_attribute_as_string:
22132  * @info: a #GFileInfo.
22133  * @attribute: a file attribute key.
22134  *
22135  * Gets the value of a attribute, formated as a string.
22136  * This escapes things as needed to make the string valid
22137  * utf8.
22138  * When you're done with the string it must be freed with g_free().
22139  *
22140  * Returns: a UTF-8 string associated with the given @attribute.
22141  */
22142
22143
22144 /**
22145  * g_file_info_get_attribute_boolean:
22146  * @info: a #GFileInfo.
22147  * @attribute: a file attribute key.
22148  *
22149  * Gets the value of a boolean attribute. If the attribute does not
22150  * contain a boolean value, %FALSE will be returned.
22151  *
22152  * Returns: the boolean value contained within the attribute.
22153  */
22154
22155
22156 /**
22157  * g_file_info_get_attribute_byte_string:
22158  * @info: a #GFileInfo.
22159  * @attribute: a file attribute key.
22160  *
22161  * Gets the value of a byte string attribute. If the attribute does
22162  * not contain a byte string, %NULL will be returned.
22163  * %NULL otherwise.
22164  *
22165  * Returns: the contents of the @attribute value as a byte string, or
22166  */
22167
22168
22169 /**
22170  * g_file_info_get_attribute_data:
22171  * @info: a #GFileInfo
22172  * @attribute: a file attribute key
22173  * @type: (out) (allow-none): return location for the attribute type, or %NULL
22174  * @value_pp: (out) (allow-none): return location for the attribute value, or %NULL
22175  * @status: (out) (allow-none): return location for the attribute status, or %NULL
22176  *
22177  * Gets the attribute type, value and status for an attribute key.
22178  * %FALSE otherwise.
22179  *
22180  * Returns: (transfer none): %TRUE if @info has an attribute named @attribute,
22181  */
22182
22183
22184 /**
22185  * g_file_info_get_attribute_int32:
22186  * @info: a #GFileInfo.
22187  * @attribute: a file attribute key.
22188  *
22189  * Gets a signed 32-bit integer contained within the attribute. If the
22190  * attribute does not contain a signed 32-bit integer, or is invalid,
22191  * 0 will be returned.
22192  *
22193  * Returns: a signed 32-bit integer from the attribute.
22194  */
22195
22196
22197 /**
22198  * g_file_info_get_attribute_int64:
22199  * @info: a #GFileInfo.
22200  * @attribute: a file attribute key.
22201  *
22202  * Gets a signed 64-bit integer contained within the attribute. If the
22203  * attribute does not contain an signed 64-bit integer, or is invalid,
22204  * 0 will be returned.
22205  *
22206  * Returns: a signed 64-bit integer from the attribute.
22207  */
22208
22209
22210 /**
22211  * g_file_info_get_attribute_object:
22212  * @info: a #GFileInfo.
22213  * @attribute: a file attribute key.
22214  *
22215  * Gets the value of a #GObject attribute. If the attribute does
22216  * not contain a #GObject, %NULL will be returned.
22217  * %NULL otherwise.
22218  *
22219  * Returns: (transfer none): a #GObject associated with the given @attribute, or
22220  */
22221
22222
22223 /**
22224  * g_file_info_get_attribute_status:
22225  * @info: a #GFileInfo
22226  * @attribute: a file attribute key
22227  *
22228  * Gets the attribute status for an attribute key.
22229  * %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.
22230  *
22231  * Returns: a #GFileAttributeStatus for the given @attribute, or
22232  */
22233
22234
22235 /**
22236  * g_file_info_get_attribute_string:
22237  * @info: a #GFileInfo.
22238  * @attribute: a file attribute key.
22239  *
22240  * Gets the value of a string attribute. If the attribute does
22241  * not contain a string, %NULL will be returned.
22242  * %NULL otherwise.
22243  *
22244  * Returns: the contents of the @attribute value as a UTF-8 string, or
22245  */
22246
22247
22248 /**
22249  * g_file_info_get_attribute_stringv:
22250  * @info: a #GFileInfo.
22251  * @attribute: a file attribute key.
22252  *
22253  * Gets the value of a stringv attribute. If the attribute does
22254  * not contain a stringv, %NULL will be returned.
22255  * %NULL otherwise. Do not free. These returned strings are UTF-8.
22256  *
22257  * Returns: (transfer none): the contents of the @attribute value as a stringv, or
22258  * Since: 2.22
22259  */
22260
22261
22262 /**
22263  * g_file_info_get_attribute_type:
22264  * @info: a #GFileInfo.
22265  * @attribute: a file attribute key.
22266  *
22267  * Gets the attribute type for an attribute key.
22268  * %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.
22269  *
22270  * Returns: a #GFileAttributeType for the given @attribute, or
22271  */
22272
22273
22274 /**
22275  * g_file_info_get_attribute_uint32:
22276  * @info: a #GFileInfo.
22277  * @attribute: a file attribute key.
22278  *
22279  * Gets an unsigned 32-bit integer contained within the attribute. If the
22280  * attribute does not contain an unsigned 32-bit integer, or is invalid,
22281  * 0 will be returned.
22282  *
22283  * Returns: an unsigned 32-bit integer from the attribute.
22284  */
22285
22286
22287 /**
22288  * g_file_info_get_attribute_uint64:
22289  * @info: a #GFileInfo.
22290  * @attribute: a file attribute key.
22291  *
22292  * Gets a unsigned 64-bit integer contained within the attribute. If the
22293  * attribute does not contain an unsigned 64-bit integer, or is invalid,
22294  * 0 will be returned.
22295  *
22296  * Returns: a unsigned 64-bit integer from the attribute.
22297  */
22298
22299
22300 /**
22301  * g_file_info_get_content_type:
22302  * @info: a #GFileInfo.
22303  *
22304  * Gets the file's content type.
22305  *
22306  * Returns: a string containing the file's content type.
22307  */
22308
22309
22310 /**
22311  * g_file_info_get_display_name:
22312  * @info: a #GFileInfo.
22313  *
22314  * Gets a display name for a file.
22315  *
22316  * Returns: a string containing the display name.
22317  */
22318
22319
22320 /**
22321  * g_file_info_get_edit_name:
22322  * @info: a #GFileInfo.
22323  *
22324  * Gets the edit name for a file.
22325  *
22326  * Returns: a string containing the edit name.
22327  */
22328
22329
22330 /**
22331  * g_file_info_get_etag:
22332  * @info: a #GFileInfo.
22333  *
22334  * Gets the <link linkend="gfile-etag">entity tag</link> for a given
22335  * #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.
22336  *
22337  * Returns: a string containing the value of the "etag:value" attribute.
22338  */
22339
22340
22341 /**
22342  * g_file_info_get_file_type:
22343  * @info: a #GFileInfo.
22344  *
22345  * Gets a file's type (whether it is a regular file, symlink, etc).
22346  * This is different from the file's content type, see g_file_info_get_content_type().
22347  *
22348  * Returns: a #GFileType for the given file.
22349  */
22350
22351
22352 /**
22353  * g_file_info_get_icon:
22354  * @info: a #GFileInfo.
22355  *
22356  * Gets the icon for a file.
22357  *
22358  * Returns: (transfer none): #GIcon for the given @info.
22359  */
22360
22361
22362 /**
22363  * g_file_info_get_is_backup:
22364  * @info: a #GFileInfo.
22365  *
22366  * Checks if a file is a backup file.
22367  *
22368  * Returns: %TRUE if file is a backup file, %FALSE otherwise.
22369  */
22370
22371
22372 /**
22373  * g_file_info_get_is_hidden:
22374  * @info: a #GFileInfo.
22375  *
22376  * Checks if a file is hidden.
22377  *
22378  * Returns: %TRUE if the file is a hidden file, %FALSE otherwise.
22379  */
22380
22381
22382 /**
22383  * g_file_info_get_is_symlink:
22384  * @info: a #GFileInfo.
22385  *
22386  * Checks if a file is a symlink.
22387  *
22388  * Returns: %TRUE if the given @info is a symlink.
22389  */
22390
22391
22392 /**
22393  * g_file_info_get_modification_time:
22394  * @info: a #GFileInfo.
22395  * @result: a #GTimeVal.
22396  *
22397  * Gets the modification time of the current @info and sets it
22398  * in @result.
22399  */
22400
22401
22402 /**
22403  * g_file_info_get_name:
22404  * @info: a #GFileInfo.
22405  *
22406  * Gets the name for a file.
22407  *
22408  * Returns: a string containing the file name.
22409  */
22410
22411
22412 /**
22413  * g_file_info_get_size:
22414  * @info: a #GFileInfo.
22415  *
22416  * Gets the file's size.
22417  *
22418  * Returns: a #goffset containing the file's size.
22419  */
22420
22421
22422 /**
22423  * g_file_info_get_sort_order:
22424  * @info: a #GFileInfo.
22425  *
22426  * Gets the value of the sort_order attribute from the #GFileInfo.
22427  * See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
22428  *
22429  * Returns: a #gint32 containing the value of the "standard::sort_order" attribute.
22430  */
22431
22432
22433 /**
22434  * g_file_info_get_symlink_target:
22435  * @info: a #GFileInfo.
22436  *
22437  * Gets the symlink target for a given #GFileInfo.
22438  *
22439  * Returns: a string containing the symlink target.
22440  */
22441
22442
22443 /**
22444  * g_file_info_has_attribute:
22445  * @info: a #GFileInfo.
22446  * @attribute: a file attribute key.
22447  *
22448  * Checks if a file info structure has an attribute named @attribute.
22449  * %FALSE otherwise.
22450  *
22451  * Returns: %TRUE if @Ginfo has an attribute named @attribute,
22452  */
22453
22454
22455 /**
22456  * g_file_info_has_namespace:
22457  * @info: a #GFileInfo.
22458  * @name_space: a file attribute namespace.
22459  *
22460  * Checks if a file info structure has an attribute in the
22461  * specified @name_space.
22462  * %FALSE otherwise.
22463  *
22464  * Returns: %TRUE if @Ginfo has an attribute in @name_space,
22465  * Since: 2.22
22466  */
22467
22468
22469 /**
22470  * g_file_info_list_attributes:
22471  * @info: a #GFileInfo.
22472  * @name_space: a file attribute key's namespace.
22473  *
22474  * Lists the file info structure's attributes.
22475  * possible attribute types for the given @name_space, or
22476  * %NULL on error.
22477  *
22478  * Returns: (array zero-terminated=1) (transfer full): a null-terminated array of strings of all of the
22479  */
22480
22481
22482 /**
22483  * g_file_info_new:
22484  *
22485  * Creates a new file info structure.
22486  *
22487  * Returns: a #GFileInfo.
22488  */
22489
22490
22491 /**
22492  * g_file_info_remove_attribute:
22493  * @info: a #GFileInfo.
22494  * @attribute: a file attribute key.
22495  *
22496  * Removes all cases of @attribute from @info if it exists.
22497  */
22498
22499
22500 /**
22501  * g_file_info_set_attribute:
22502  * @info: a #GFileInfo.
22503  * @attribute: a file attribute key.
22504  * @type: a #GFileAttributeType
22505  * @value_p: pointer to the value
22506  *
22507  * Sets the @attribute to contain the given value, if possible.
22508  */
22509
22510
22511 /**
22512  * g_file_info_set_attribute_boolean:
22513  * @info: a #GFileInfo.
22514  * @attribute: a file attribute key.
22515  * @attr_value: a boolean value.
22516  *
22517  * Sets the @attribute to contain the given @attr_value,
22518  * if possible.
22519  */
22520
22521
22522 /**
22523  * g_file_info_set_attribute_byte_string:
22524  * @info: a #GFileInfo.
22525  * @attribute: a file attribute key.
22526  * @attr_value: a byte string.
22527  *
22528  * Sets the @attribute to contain the given @attr_value,
22529  * if possible.
22530  */
22531
22532
22533 /**
22534  * g_file_info_set_attribute_int32:
22535  * @info: a #GFileInfo.
22536  * @attribute: a file attribute key.
22537  * @attr_value: a signed 32-bit integer
22538  *
22539  * Sets the @attribute to contain the given @attr_value,
22540  * if possible.
22541  */
22542
22543
22544 /**
22545  * g_file_info_set_attribute_int64:
22546  * @info: a #GFileInfo.
22547  * @attribute: attribute name to set.
22548  * @attr_value: int64 value to set attribute to.
22549  *
22550  * Sets the @attribute to contain the given @attr_value,
22551  * if possible.
22552  */
22553
22554
22555 /**
22556  * g_file_info_set_attribute_mask:
22557  * @info: a #GFileInfo.
22558  * @mask: a #GFileAttributeMatcher.
22559  *
22560  * Sets @mask on @info to match specific attribute types.
22561  */
22562
22563
22564 /**
22565  * g_file_info_set_attribute_object:
22566  * @info: a #GFileInfo.
22567  * @attribute: a file attribute key.
22568  * @attr_value: a #GObject.
22569  *
22570  * Sets the @attribute to contain the given @attr_value,
22571  * if possible.
22572  */
22573
22574
22575 /**
22576  * g_file_info_set_attribute_status:
22577  * @info: a #GFileInfo
22578  * @attribute: a file attribute key
22579  * @status: a #GFileAttributeStatus
22580  *
22581  * Sets the attribute status for an attribute key. This is only
22582  * needed by external code that implement g_file_set_attributes_from_info()
22583  * or similar functions.
22584  * The attribute must exist in @info for this to work. Otherwise %FALSE
22585  * is returned and @info is unchanged.
22586  *
22587  * Returns: %TRUE if the status was changed, %FALSE if the key was not set.
22588  * Since: 2.22
22589  */
22590
22591
22592 /**
22593  * g_file_info_set_attribute_string:
22594  * @info: a #GFileInfo.
22595  * @attribute: a file attribute key.
22596  * @attr_value: a UTF-8 string.
22597  *
22598  * Sets the @attribute to contain the given @attr_value,
22599  * if possible.
22600  */
22601
22602
22603 /**
22604  * g_file_info_set_attribute_stringv:
22605  * @info: a #GFileInfo.
22606  * @attribute: a file attribute key
22607  * @attr_value: a %NULL terminated array of UTF-8 strings.
22608  *
22609  * Sets the @attribute to contain the given @attr_value,
22610  * if possible.
22611  *
22612  * Sinze: 2.22
22613  */
22614
22615
22616 /**
22617  * g_file_info_set_attribute_uint32:
22618  * @info: a #GFileInfo.
22619  * @attribute: a file attribute key.
22620  * @attr_value: an unsigned 32-bit integer.
22621  *
22622  * Sets the @attribute to contain the given @attr_value,
22623  * if possible.
22624  */
22625
22626
22627 /**
22628  * g_file_info_set_attribute_uint64:
22629  * @info: a #GFileInfo.
22630  * @attribute: a file attribute key.
22631  * @attr_value: an unsigned 64-bit integer.
22632  *
22633  * Sets the @attribute to contain the given @attr_value,
22634  * if possible.
22635  */
22636
22637
22638 /**
22639  * g_file_info_set_content_type:
22640  * @info: a #GFileInfo.
22641  * @content_type: a content type. See <link linkend="gio-GContentType">GContentType</link>.
22642  *
22643  * Sets the content type attribute for a given #GFileInfo.
22644  * See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
22645  */
22646
22647
22648 /**
22649  * g_file_info_set_display_name:
22650  * @info: a #GFileInfo.
22651  * @display_name: a string containing a display name.
22652  *
22653  * Sets the display name for the current #GFileInfo.
22654  * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
22655  */
22656
22657
22658 /**
22659  * g_file_info_set_edit_name:
22660  * @info: a #GFileInfo.
22661  * @edit_name: a string containing an edit name.
22662  *
22663  * Sets the edit name for the current file.
22664  * See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
22665  */
22666
22667
22668 /**
22669  * g_file_info_set_file_type:
22670  * @info: a #GFileInfo.
22671  * @type: a #GFileType.
22672  *
22673  * Sets the file type in a #GFileInfo to @type.
22674  * See %G_FILE_ATTRIBUTE_STANDARD_TYPE.
22675  */
22676
22677
22678 /**
22679  * g_file_info_set_icon:
22680  * @info: a #GFileInfo.
22681  * @icon: a #GIcon.
22682  *
22683  * Sets the icon for a given #GFileInfo.
22684  * See %G_FILE_ATTRIBUTE_STANDARD_ICON.
22685  */
22686
22687
22688 /**
22689  * g_file_info_set_is_hidden:
22690  * @info: a #GFileInfo.
22691  * @is_hidden: a #gboolean.
22692  *
22693  * Sets the "is_hidden" attribute in a #GFileInfo according to @is_symlink.
22694  * See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
22695  */
22696
22697
22698 /**
22699  * g_file_info_set_is_symlink:
22700  * @info: a #GFileInfo.
22701  * @is_symlink: a #gboolean.
22702  *
22703  * Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
22704  * See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
22705  */
22706
22707
22708 /**
22709  * g_file_info_set_modification_time:
22710  * @info: a #GFileInfo.
22711  * @mtime: a #GTimeVal.
22712  *
22713  * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
22714  * info to the given time value.
22715  */
22716
22717
22718 /**
22719  * g_file_info_set_name:
22720  * @info: a #GFileInfo.
22721  * @name: a string containing a name.
22722  *
22723  * Sets the name attribute for the current #GFileInfo.
22724  * See %G_FILE_ATTRIBUTE_STANDARD_NAME.
22725  */
22726
22727
22728 /**
22729  * g_file_info_set_size:
22730  * @info: a #GFileInfo.
22731  * @size: a #goffset containing the file's size.
22732  *
22733  * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
22734  * to the given size.
22735  */
22736
22737
22738 /**
22739  * g_file_info_set_sort_order:
22740  * @info: a #GFileInfo.
22741  * @sort_order: a sort order integer.
22742  *
22743  * Sets the sort order attribute in the file info structure. See
22744  * %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
22745  */
22746
22747
22748 /**
22749  * g_file_info_set_symlink_target:
22750  * @info: a #GFileInfo.
22751  * @symlink_target: a static string containing a path to a symlink target.
22752  *
22753  * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
22754  * to the given symlink target.
22755  */
22756
22757
22758 /**
22759  * g_file_info_unset_attribute_mask:
22760  * @info: #GFileInfo.
22761  *
22762  * Unsets a mask set by g_file_info_set_attribute_mask(), if one
22763  * is set.
22764  */
22765
22766
22767 /**
22768  * g_file_input_stream_query_info:
22769  * @stream: a #GFileInputStream.
22770  * @attributes: a file attribute query string.
22771  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22772  * @error: a #GError location to store the error occuring, or %NULL to ignore.
22773  *
22774  * Queries a file input stream the given @attributes. This function blocks
22775  * while querying the stream. For the asynchronous (non-blocking) version
22776  * of this function, see g_file_input_stream_query_info_async(). While the
22777  * stream is blocked, the stream will set the pending flag internally, and
22778  * any other operations on the stream will fail with %G_IO_ERROR_PENDING.
22779  *
22780  * Returns: (transfer full): a #GFileInfo, or %NULL on error.
22781  */
22782
22783
22784 /**
22785  * g_file_input_stream_query_info_async:
22786  * @stream: a #GFileInputStream.
22787  * @attributes: a file attribute query string.
22788  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22789  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22790  * @callback: (scope async): callback to call when the request is satisfied
22791  * @user_data: (closure): the data to pass to callback function
22792  *
22793  * Queries the stream information asynchronously.
22794  * When the operation is finished @callback will be called.
22795  * You can then call g_file_input_stream_query_info_finish()
22796  * to get the result of the operation.
22797  * For the synchronous version of this function,
22798  * see g_file_input_stream_query_info().
22799  * If @cancellable is not %NULL, then the operation can be cancelled by
22800  * triggering the cancellable object from another thread. If the operation
22801  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set
22802  */
22803
22804
22805 /**
22806  * g_file_input_stream_query_info_finish:
22807  * @stream: a #GFileInputStream.
22808  * @result: a #GAsyncResult.
22809  * @error: a #GError location to store the error occuring, or %NULL to ignore.
22810  *
22811  * Finishes an asynchronous info query operation.
22812  *
22813  * Returns: (transfer full): #GFileInfo.
22814  */
22815
22816
22817 /**
22818  * g_file_io_stream_get_etag:
22819  * @stream: a #GFileIOStream.
22820  *
22821  * Gets the entity tag for the file when it has been written.
22822  * This must be called after the stream has been written
22823  * and closed, as the etag can change while writing.
22824  *
22825  * Returns: the entity tag for the stream.
22826  * Since: 2.22
22827  */
22828
22829
22830 /**
22831  * g_file_io_stream_query_info:
22832  * @stream: a #GFileIOStream.
22833  * @attributes: a file attribute query string.
22834  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22835  * @error: a #GError, %NULL to ignore.
22836  *
22837  * Queries a file io stream for the given @attributes.
22838  * This function blocks while querying the stream. For the asynchronous
22839  * version of this function, see g_file_io_stream_query_info_async().
22840  * While the stream is blocked, the stream will set the pending flag
22841  * internally, and any other operations on the stream will fail with
22842  * %G_IO_ERROR_PENDING.
22843  * Can fail if the stream was already closed (with @error being set to
22844  * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
22845  * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
22846  * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I
22847  * all cases of failure, %NULL will be returned.
22848  * If @cancellable is not %NULL, then the operation can be cancelled by
22849  * triggering the cancellable object from another thread. If the operation
22850  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
22851  * be returned.
22852  *
22853  * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
22854  * Since: 2.22
22855  */
22856
22857
22858 /**
22859  * g_file_io_stream_query_info_async:
22860  * @stream: a #GFileIOStream.
22861  * @attributes: a file attribute query string.
22862  * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
22863  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22864  * @callback: (scope async): callback to call when the request is satisfied
22865  * @user_data: (closure): the data to pass to callback function
22866  *
22867  * Asynchronously queries the @stream for a #GFileInfo. When completed,
22868  * finish the operation with g_file_io_stream_query_info_finish().
22869  * For the synchronous version of this function, see
22870  * g_file_io_stream_query_info().
22871  *
22872  * Since: 2.22
22873  */
22874
22875
22876 /**
22877  * g_file_io_stream_query_info_finish:
22878  * @stream: a #GFileIOStream.
22879  * @result: a #GAsyncResult.
22880  * @error: a #GError, %NULL to ignore.
22881  *
22882  * Finalizes the asynchronous query started
22883  * by g_file_io_stream_query_info_async().
22884  *
22885  * Returns: (transfer full): A #GFileInfo for the finished query.
22886  * Since: 2.22
22887  */
22888
22889
22890 /**
22891  * g_file_is_native:
22892  * @file: input #GFile.
22893  *
22894  * Checks to see if a file is native to the platform.
22895  * A native file s one expressed in the platform-native filename format,
22896  * e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
22897  * as it might be on a locally mounted remote filesystem.
22898  * On some systems non-native files may be available using
22899  * the native filesystem via a userspace filesystem (FUSE), in
22900  * these cases this call will return %FALSE, but g_file_get_path()
22901  * will still return a native path.
22902  * This call does no blocking i/o.
22903  *
22904  * Returns: %TRUE if file is native.
22905  */
22906
22907
22908 /**
22909  * g_file_load_contents:
22910  * @file: input #GFile.
22911  * @cancellable: optional #GCancellable object, %NULL to ignore.
22912  * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
22913  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
22914  * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
22915  * @error: a #GError, or %NULL
22916  *
22917  * Loads the content of the file into memory. The data is always
22918  * zero-terminated, but this is not included in the resultant @length.
22919  * The returned @content should be freed with g_free() when no longer
22920  * needed.
22921  * If @cancellable is not %NULL, then the operation can be cancelled by
22922  * triggering the cancellable object from another thread. If the operation
22923  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22924  * %FALSE if there were errors.
22925  *
22926  * Returns: %TRUE if the @file's contents were successfully loaded.
22927  */
22928
22929
22930 /**
22931  * g_file_load_contents_async:
22932  * @file: input #GFile.
22933  * @cancellable: optional #GCancellable object, %NULL to ignore.
22934  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
22935  * @user_data: the data to pass to callback function
22936  *
22937  * Starts an asynchronous load of the @file's contents.
22938  * For more details, see g_file_load_contents() which is
22939  * the synchronous version of this call.
22940  * When the load operation has completed, @callback will be called
22941  * with @user data. To finish the operation, call
22942  * g_file_load_contents_finish() with the #GAsyncResult returned by
22943  * the @callback.
22944  * If @cancellable is not %NULL, then the operation can be cancelled by
22945  * triggering the cancellable object from another thread. If the operation
22946  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22947  */
22948
22949
22950 /**
22951  * g_file_load_contents_finish:
22952  * @file: input #GFile.
22953  * @res: a #GAsyncResult.
22954  * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
22955  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
22956  * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
22957  * @error: a #GError, or %NULL
22958  *
22959  * Finishes an asynchronous load of the @file's contents.
22960  * The contents are placed in @contents, and @length is set to the
22961  * size of the @contents string. The @content should be freed with
22962  * g_free() when no longer needed. If @etag_out is present, it will be
22963  * set to the new entity tag for the @file.
22964  * present, it will be set appropriately.
22965  *
22966  * Returns: %TRUE if the load was successful. If %FALSE and @error is
22967  */
22968
22969
22970 /**
22971  * g_file_load_partial_contents_async: (skip)
22972  * @file: input #GFile.
22973  * @cancellable: optional #GCancellable object, %NULL to ignore.
22974  * @read_more_callback: a #GFileReadMoreCallback to receive partial data and to specify whether further data should be read.
22975  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
22976  * @user_data: the data to pass to the callback functions.
22977  *
22978  * Reads the partial contents of a file. A #GFileReadMoreCallback should be
22979  * used to stop reading from the file when appropriate, else this function
22980  * will behave exactly as g_file_load_contents_async(). This operation
22981  * can be finished by g_file_load_partial_contents_finish().
22982  * Users of this function should be aware that @user_data is passed to
22983  * both the @read_more_callback and the @callback.
22984  * If @cancellable is not %NULL, then the operation can be cancelled by
22985  * triggering the cancellable object from another thread. If the operation
22986  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22987  */
22988
22989
22990 /**
22991  * g_file_load_partial_contents_finish:
22992  * @file: input #GFile.
22993  * @res: a #GAsyncResult.
22994  * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
22995  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
22996  * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
22997  * @error: a #GError, or %NULL
22998  *
22999  * Finishes an asynchronous partial load operation that was started
23000  * with g_file_load_partial_contents_async(). The data is always
23001  * zero-terminated, but this is not included in the resultant @length.
23002  * The returned @content should be freed with g_free() when no longer
23003  * needed.
23004  * present, it will be set appropriately.
23005  *
23006  * Returns: %TRUE if the load was successful. If %FALSE and @error is
23007  */
23008
23009
23010 /**
23011  * g_file_make_directory:
23012  * @file: input #GFile.
23013  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23014  * @error: a #GError, or %NULL
23015  *
23016  * Creates a directory. Note that this will only create a child directory of
23017  * the immediate parent directory of the path or URI given by the #GFile. To
23018  * recursively create directories, see g_file_make_directory_with_parents().
23019  * This function will fail if the parent directory does not exist, setting
23020  * directories, this function will fail, setting @error to
23021  * %G_IO_ERROR_NOT_SUPPORTED.
23022  * For a local #GFile the newly created directory will have the default
23023  * (current) ownership and permissions of the current process.
23024  * If @cancellable is not %NULL, then the operation can be cancelled by
23025  * triggering the cancellable object from another thread. If the operation
23026  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23027  *
23028  * Returns: %TRUE on successful creation, %FALSE otherwise.
23029  */
23030
23031
23032 /**
23033  * g_file_make_directory_with_parents:
23034  * @file: input #GFile.
23035  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23036  * @error: a #GError, or %NULL
23037  *
23038  * Creates a directory and any parent directories that may not exist similar to
23039  * 'mkdir -p'. If the file system does not support creating directories, this
23040  * function will fail, setting @error to %G_IO_ERROR_NOT_SUPPORTED.
23041  * For a local #GFile the newly created directories will have the default
23042  * (current) ownership and permissions of the current process.
23043  * If @cancellable is not %NULL, then the operation can be cancelled by
23044  * triggering the cancellable object from another thread. If the operation
23045  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23046  * otherwise.
23047  *
23048  * Returns: %TRUE if all directories have been successfully created, %FALSE
23049  * Since: 2.18
23050  */
23051
23052
23053 /**
23054  * g_file_make_symbolic_link:
23055  * @file: a #GFile with the name of the symlink to create
23056  * @symlink_value: a string with the path for the target of the new symlink
23057  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23058  * @error: a #GError.
23059  *
23060  * Creates a symbolic link named @file which contains the string
23061  * If @cancellable is not %NULL, then the operation can be cancelled by
23062  * triggering the cancellable object from another thread. If the operation
23063  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23064  *
23065  * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise.
23066  */
23067
23068
23069 /**
23070  * g_file_monitor:
23071  * @file: input #GFile
23072  * @flags: a set of #GFileMonitorFlags
23073  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
23074  * @error: a #GError, or %NULL
23075  *
23076  * Obtains a file or directory monitor for the given file, depending
23077  * on the type of the file.
23078  * If @cancellable is not %NULL, then the operation can be cancelled by
23079  * triggering the cancellable object from another thread. If the operation
23080  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23081  * Free the returned object with g_object_unref().
23082  *
23083  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
23084  * Since: 2.18
23085  */
23086
23087
23088 /**
23089  * g_file_monitor_cancel:
23090  * @monitor: a #GFileMonitor.
23091  *
23092  * Cancels a file monitor.
23093  *
23094  * Returns: %TRUE if monitor was cancelled.
23095  */
23096
23097
23098 /**
23099  * g_file_monitor_directory:
23100  * @file: input #GFile.
23101  * @flags: a set of #GFileMonitorFlags.
23102  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23103  * @error: a #GError, or %NULL.
23104  *
23105  * Obtains a directory monitor for the given file.
23106  * This may fail if directory monitoring is not supported.
23107  * If @cancellable is not %NULL, then the operation can be cancelled by
23108  * triggering the cancellable object from another thread. If the operation
23109  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23110  * Free the returned object with g_object_unref().
23111  *
23112  * Virtual: monitor_dir
23113  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
23114  */
23115
23116
23117 /**
23118  * g_file_monitor_emit_event:
23119  * @monitor: a #GFileMonitor.
23120  * @child: a #GFile.
23121  * @other_file: a #GFile.
23122  * @event_type: a set of #GFileMonitorEvent flags.
23123  *
23124  * Emits the #GFileMonitor::changed signal if a change
23125  * has taken place. Should be called from file monitor
23126  * implementations only.
23127  * The signal will be emitted from an idle handler (in the <link
23128  * linkend="g-main-context-push-thread-default">thread-default main
23129  * context</link>).
23130  */
23131
23132
23133 /**
23134  * g_file_monitor_file:
23135  * @file: input #GFile.
23136  * @flags: a set of #GFileMonitorFlags.
23137  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23138  * @error: a #GError, or %NULL.
23139  *
23140  * Obtains a file monitor for the given file. If no file notification
23141  * mechanism exists, then regular polling of the file is used.
23142  * If @cancellable is not %NULL, then the operation can be cancelled by
23143  * triggering the cancellable object from another thread. If the operation
23144  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23145  * Free the returned object with g_object_unref().
23146  *
23147  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
23148  */
23149
23150
23151 /**
23152  * g_file_monitor_is_cancelled:
23153  * @monitor: a #GFileMonitor
23154  *
23155  * Returns whether the monitor is canceled.
23156  *
23157  * Returns: %TRUE if monitor is canceled. %FALSE otherwise.
23158  */
23159
23160
23161 /**
23162  * g_file_monitor_set_rate_limit:
23163  * @monitor: a #GFileMonitor.
23164  * @limit_msecs: a non-negative integer with the limit in milliseconds to poll for changes
23165  *
23166  * Sets the rate limit to which the @monitor will report
23167  * consecutive change events to the same file.
23168  */
23169
23170
23171 /**
23172  * g_file_mount_enclosing_volume:
23173  * @location: input #GFile.
23174  * @flags: flags affecting the operation
23175  * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
23176  * @cancellable: optional #GCancellable object, %NULL to ignore.
23177  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
23178  * @user_data: the data to pass to callback function
23179  *
23180  * Starts a @mount_operation, mounting the volume that contains the file @location.
23181  * When this operation has completed, @callback will be called with
23182  * g_file_mount_enclosing_volume_finish().
23183  * If @cancellable is not %NULL, then the operation can be cancelled by
23184  * triggering the cancellable object from another thread. If the operation
23185  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23186  */
23187
23188
23189 /**
23190  * g_file_mount_enclosing_volume_finish:
23191  * @location: input #GFile.
23192  * @result: a #GAsyncResult.
23193  * @error: a #GError, or %NULL
23194  *
23195  * Finishes a mount operation started by g_file_mount_enclosing_volume().
23196  * has occurred, this function will return %FALSE and set @error
23197  * appropriately if present.
23198  *
23199  * Returns: %TRUE if successful. If an error
23200  */
23201
23202
23203 /**
23204  * g_file_mount_mountable:
23205  * @file: input #GFile.
23206  * @flags: flags affecting the operation
23207  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
23208  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23209  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
23210  * @user_data: (closure): the data to pass to callback function
23211  *
23212  * Mounts a file of type G_FILE_TYPE_MOUNTABLE.
23213  * Using @mount_operation, you can request callbacks when, for instance,
23214  * passwords are needed during authentication.
23215  * If @cancellable is not %NULL, then the operation can be cancelled by
23216  * triggering the cancellable object from another thread. If the operation
23217  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23218  * When the operation is finished, @callback will be called. You can then call
23219  * g_file_mount_mountable_finish() to get the result of the operation.
23220  */
23221
23222
23223 /**
23224  * g_file_mount_mountable_finish:
23225  * @file: input #GFile.
23226  * @result: a #GAsyncResult.
23227  * @error: a #GError, or %NULL
23228  *
23229  * Finishes a mount operation. See g_file_mount_mountable() for details.
23230  * Finish an asynchronous mount operation that was started
23231  * with g_file_mount_mountable().
23232  * Free the returned object with g_object_unref().
23233  *
23234  * Returns: (transfer full): a #GFile or %NULL on error.
23235  */
23236
23237
23238 /**
23239  * g_file_move:
23240  * @source: #GFile pointing to the source location.
23241  * @destination: #GFile pointing to the destination location.
23242  * @flags: set of #GFileCopyFlags.
23243  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23244  * @progress_callback: (scope call): #GFileProgressCallback function for updates.
23245  * @progress_callback_data: (closure): gpointer to user data for the callback function.
23246  * @error: #GError for returning error conditions, or %NULL
23247  *
23248  * Tries to move the file or directory @source to the location specified by @destination.
23249  * If native move operations are supported then this is used, otherwise a copy + delete
23250  * fallback is used. The native implementation may support moving directories (for instance
23251  * on moves inside the same filesystem), but the fallback code does not.
23252  * If the flag #G_FILE_COPY_OVERWRITE is specified an already
23253  * existing @destination file is overwritten.
23254  * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
23255  * will be copied as symlinks, otherwise the target of the
23256  * If @cancellable is not %NULL, then the operation can be cancelled by
23257  * triggering the cancellable object from another thread. If the operation
23258  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23259  * If @progress_callback is not %NULL, then the operation can be monitored by
23260  * setting this to a #GFileProgressCallback function. @progress_callback_data
23261  * will be passed to this function. It is guaranteed that this callback will
23262  * be called after all data has been transferred with the total number of bytes
23263  * copied during the operation.
23264  * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
23265  * error is returned, independent on the status of the @destination.
23266  * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
23267  * error G_IO_ERROR_EXISTS is returned.
23268  * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
23269  * error is returned. If trying to overwrite a directory with a directory the
23270  * G_IO_ERROR_WOULD_MERGE error is returned.
23271  * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
23272  * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
23273  * may be returned (if the native move operation isn't available).
23274  *
23275  * Returns: %TRUE on successful move, %FALSE otherwise.
23276  */
23277
23278
23279 /**
23280  * g_file_new_for_commandline_arg:
23281  * @arg: a command line string.
23282  *
23283  * Creates a #GFile with the given argument from the command line. The value of
23284  * relative to the current working directory.
23285  * This operation never fails, but the returned object might not support any
23286  * I/O operation if @arg points to a malformed path.
23287  *
23288  * Returns: (transfer full): a new #GFile.
23289  */
23290
23291
23292 /**
23293  * g_file_new_for_path:
23294  * @path: a string containing a relative or absolute path. The string must be encoded in the glib filename encoding.
23295  *
23296  * Constructs a #GFile for a given path. This operation never
23297  * fails, but the returned object might not support any I/O
23298  * operation if @path is malformed.
23299  *
23300  * Returns: (transfer full): a new #GFile for the given @path.
23301  */
23302
23303
23304 /**
23305  * g_file_new_for_uri:
23306  * @uri: a UTF8 string containing a URI.
23307  *
23308  * Constructs a #GFile for a given URI. This operation never
23309  * fails, but the returned object might not support any I/O
23310  * operation if @uri is malformed or if the uri type is
23311  * not supported.
23312  *
23313  * Returns: (transfer full): a #GFile for the given @uri.
23314  */
23315
23316
23317 /**
23318  * g_file_open_readwrite:
23319  * @file: #GFile to open
23320  * @cancellable: (allow-none): a #GCancellable
23321  * @error: a #GError, or %NULL
23322  *
23323  * Opens an existing file for reading and writing. The result is
23324  * a #GFileIOStream that can be used to read and write the contents of the file.
23325  * If @cancellable is not %NULL, then the operation can be cancelled by
23326  * triggering the cancellable object from another thread. If the operation
23327  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23328  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
23329  * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
23330  * Other errors are possible too, and depend on what kind of filesystem the file is on.
23331  * Note that in many non-local file cases read and write streams are not supported,
23332  * so make sure you really need to do read and write streaming, rather than
23333  * just opening for reading or writing.
23334  * Free the returned object with g_object_unref().
23335  *
23336  * Returns: (transfer full): #GFileIOStream or %NULL on error.
23337  * Since: 2.22
23338  */
23339
23340
23341 /**
23342  * g_file_open_readwrite_async:
23343  * @file: input #GFile.
23344  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23345  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23346  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
23347  * @user_data: (closure): the data to pass to callback function
23348  *
23349  * Asynchronously opens @file for reading and writing.
23350  * For more details, see g_file_open_readwrite() which is
23351  * the synchronous version of this call.
23352  * When the operation is finished, @callback will be called. You can then call
23353  * g_file_open_readwrite_finish() to get the result of the operation.
23354  *
23355  * Since: 2.22
23356  */
23357
23358
23359 /**
23360  * g_file_open_readwrite_finish:
23361  * @file: input #GFile.
23362  * @res: a #GAsyncResult.
23363  * @error: a #GError, or %NULL
23364  *
23365  * Finishes an asynchronous file read operation started with
23366  * g_file_open_readwrite_async().
23367  * Free the returned object with g_object_unref().
23368  *
23369  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
23370  * Since: 2.22
23371  */
23372
23373
23374 /**
23375  * g_file_output_stream_get_etag:
23376  * @stream: a #GFileOutputStream.
23377  *
23378  * Gets the entity tag for the file when it has been written.
23379  * This must be called after the stream has been written
23380  * and closed, as the etag can change while writing.
23381  *
23382  * Returns: the entity tag for the stream.
23383  */
23384
23385
23386 /**
23387  * g_file_output_stream_query_info:
23388  * @stream: a #GFileOutputStream.
23389  * @attributes: a file attribute query string.
23390  * @cancellable: optional #GCancellable object, %NULL to ignore.
23391  * @error: a #GError, %NULL to ignore.
23392  *
23393  * Queries a file output stream for the given @attributes.
23394  * This function blocks while querying the stream. For the asynchronous
23395  * version of this function, see g_file_output_stream_query_info_async().
23396  * While the stream is blocked, the stream will set the pending flag
23397  * internally, and any other operations on the stream will fail with
23398  * %G_IO_ERROR_PENDING.
23399  * Can fail if the stream was already closed (with @error being set to
23400  * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
23401  * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
23402  * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
23403  * all cases of failure, %NULL will be returned.
23404  * If @cancellable is not %NULL, then the operation can be cancelled by
23405  * triggering the cancellable object from another thread. If the operation
23406  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
23407  * be returned.
23408  *
23409  * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
23410  */
23411
23412
23413 /**
23414  * g_file_output_stream_query_info_async:
23415  * @stream: a #GFileOutputStream.
23416  * @attributes: a file attribute query string.
23417  * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
23418  * @cancellable: optional #GCancellable object, %NULL to ignore.
23419  * @callback: callback to call when the request is satisfied
23420  * @user_data: the data to pass to callback function
23421  *
23422  * Asynchronously queries the @stream for a #GFileInfo. When completed,
23423  * finish the operation with g_file_output_stream_query_info_finish().
23424  * For the synchronous version of this function, see
23425  * g_file_output_stream_query_info().
23426  */
23427
23428
23429 /**
23430  * g_file_output_stream_query_info_finish:
23431  * @stream: a #GFileOutputStream.
23432  * @result: a #GAsyncResult.
23433  * @error: a #GError, %NULL to ignore.
23434  *
23435  * Finalizes the asynchronous query started
23436  * by g_file_output_stream_query_info_async().
23437  *
23438  * Returns: (transfer full): A #GFileInfo for the finished query.
23439  */
23440
23441
23442 /**
23443  * g_file_parse_name:
23444  * @parse_name: a file name or path to be parsed.
23445  *
23446  * Constructs a #GFile with the given @parse_name (i.e. something given by g_file_get_parse_name()).
23447  * This operation never fails, but the returned object might not support any I/O
23448  * operation if the @parse_name cannot be parsed.
23449  *
23450  * Returns: (transfer full): a new #GFile.
23451  */
23452
23453
23454 /**
23455  * g_file_poll_mountable:
23456  * @file: input #GFile.
23457  * @cancellable: optional #GCancellable object, %NULL to ignore.
23458  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
23459  * @user_data: the data to pass to callback function
23460  *
23461  * Polls a file of type G_FILE_TYPE_MOUNTABLE.
23462  * If @cancellable is not %NULL, then the operation can be cancelled by
23463  * triggering the cancellable object from another thread. If the operation
23464  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23465  * When the operation is finished, @callback will be called. You can then call
23466  * g_file_mount_mountable_finish() to get the result of the operation.
23467  *
23468  * Since: 2.22
23469  */
23470
23471
23472 /**
23473  * g_file_poll_mountable_finish:
23474  * @file: input #GFile.
23475  * @result: a #GAsyncResult.
23476  * @error: a #GError, or %NULL
23477  *
23478  * Finishes a poll operation. See g_file_poll_mountable() for details.
23479  * Finish an asynchronous poll operation that was polled
23480  * with g_file_poll_mountable().
23481  * otherwise.
23482  *
23483  * Returns: %TRUE if the operation finished successfully. %FALSE
23484  * Since: 2.22
23485  */
23486
23487
23488 /**
23489  * g_file_query_default_handler:
23490  * @file: a #GFile to open.
23491  * @cancellable: optional #GCancellable object, %NULL to ignore.
23492  * @error: a #GError, or %NULL
23493  *
23494  * Returns the #GAppInfo that is registered as the default
23495  * application to handle the file specified by @file.
23496  * If @cancellable is not %NULL, then the operation can be cancelled by
23497  * triggering the cancellable object from another thread. If the operation
23498  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23499  * When you are done with it, release it with g_object_unref()
23500  *
23501  * Returns: (transfer full): a #GAppInfo if the handle was found, %NULL if there were errors.
23502  */
23503
23504
23505 /**
23506  * g_file_query_exists:
23507  * @file: input #GFile.
23508  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23509  *
23510  * Utility function to check if a particular file exists. This is
23511  * implemented using g_file_query_info() and as such does blocking I/O.
23512  * Note that in many cases it is racy to first check for file existence
23513  * and then execute something based on the outcome of that, because the
23514  * file might have been created or removed in between the operations. The
23515  * general approach to handling that is to not check, but just do the
23516  * operation and handle the errors as they come.
23517  * As an example of race-free checking, take the case of reading a file, and
23518  * can both result in two processes creating the file (with perhaps a partially
23519  * written file as the result). The correct approach is to always try to create
23520  * the file with g_file_create() which will either atomically create the file
23521  * or fail with a G_IO_ERROR_EXISTS error.
23522  * However, in many cases an existence check is useful in a user
23523  * interface, for instance to make a menu item sensitive/insensitive, so that
23524  * you don't have to fool users that something is possible and then just show
23525  * and error dialog. If you do this, you should make sure to also handle the
23526  * errors that can happen due to races when you execute the operation.
23527  *
23528  * If it doesn't exist, creating it. there are two racy versions: read it, and
23529  * On error create it; and: check if it exists, if not create it. These
23530  * Returns: %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled).
23531  */
23532
23533
23534 /**
23535  * g_file_query_file_type:
23536  * @file: input #GFile.
23537  * @flags: a set of #GFileQueryInfoFlags passed to g_file_query_info().
23538  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23539  *
23540  * Utility function to inspect the #GFileType of a file. This is
23541  * implemented using g_file_query_info() and as such does blocking I/O.
23542  * The primary use case of this method is to check if a file is a regular file,
23543  * directory, or symlink.
23544  * does not exist
23545  *
23546  * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN if the file
23547  * Since: 2.18
23548  */
23549
23550
23551 /**
23552  * g_file_query_filesystem_info:
23553  * @file: input #GFile.
23554  * @attributes: an attribute query string.
23555  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23556  * @error: a #GError.
23557  *
23558  * Similar to g_file_query_info(), but obtains information
23559  * about the filesystem the @file is on, rather than the file itself.
23560  * For instance the amount of space available and the type of
23561  * the filesystem.
23562  * The @attributes value is a string that specifies the file attributes that
23563  * should be gathered. It is not an error if it's not possible to read a particular
23564  * requested attribute from a file - it just won't be set. @attributes should
23565  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
23566  * means all attributes, and a wildcard like "fs:*" means all attributes in the fs
23567  * namespace. The standard namespace for filesystem attributes is "fs".
23568  * Common attributes of interest are #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE
23569  * (the total size of the filesystem in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of
23570  * bytes available), and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
23571  * If @cancellable is not %NULL, then the operation can be cancelled by
23572  * triggering the cancellable object from another thread. If the operation
23573  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23574  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
23575  * Other errors are possible too, and depend on what kind of filesystem the file is on.
23576  * Free the returned object with g_object_unref().
23577  *
23578  * Returns: (transfer full): a #GFileInfo or %NULL if there was an error.
23579  */
23580
23581
23582 /**
23583  * g_file_query_filesystem_info_async:
23584  * @file: input #GFile.
23585  * @attributes: an attribute query string.
23586  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23587  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23588  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
23589  * @user_data: (closure): the data to pass to callback function
23590  *
23591  * Asynchronously gets the requested information about the filesystem
23592  * that the specified @file is on. The result is a #GFileInfo object
23593  * that contains key-value attributes (such as type or size for the
23594  * file).
23595  * For more details, see g_file_query_filesystem_info() which is the
23596  * synchronous version of this call.
23597  * When the operation is finished, @callback will be called. You can
23598  * then call g_file_query_info_finish() to get the result of the
23599  * operation.
23600  */
23601
23602
23603 /**
23604  * g_file_query_filesystem_info_finish:
23605  * @file: input #GFile.
23606  * @res: a #GAsyncResult.
23607  * @error: a #GError.
23608  *
23609  * Finishes an asynchronous filesystem info query.  See
23610  * g_file_query_filesystem_info_async().
23611  * Free the returned object with g_object_unref().
23612  *
23613  * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
23614  */
23615
23616
23617 /**
23618  * g_file_query_info:
23619  * @file: input #GFile.
23620  * @attributes: an attribute query string.
23621  * @flags: a set of #GFileQueryInfoFlags.
23622  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23623  * @error: a #GError.
23624  *
23625  * Gets the requested information about specified @file. The result
23626  * is a #GFileInfo object that contains key-value attributes (such as
23627  * the type or size of the file).
23628  * The @attributes value is a string that specifies the file attributes that
23629  * should be gathered. It is not an error if it's not possible to read a particular
23630  * requested attribute from a file - it just won't be set. @attributes should
23631  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
23632  * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
23633  * namespace. An example attribute query be "standard::*,owner::user".
23634  * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
23635  * If @cancellable is not %NULL, then the operation can be cancelled by
23636  * triggering the cancellable object from another thread. If the operation
23637  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23638  * For symlinks, normally the information about the target of the
23639  * symlink is returned, rather than information about the symlink itself.
23640  * However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in @flags the
23641  * information about the symlink itself will be returned. Also, for symlinks
23642  * that point to non-existing files the information about the symlink itself
23643  * will be returned.
23644  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
23645  * Other errors are possible too, and depend on what kind of filesystem the file is on.
23646  * Free the returned object with g_object_unref().
23647  *
23648  * Returns: (transfer full): a #GFileInfo for the given @file, or %NULL on error.
23649  */
23650
23651
23652 /**
23653  * g_file_query_info_async:
23654  * @file: input #GFile.
23655  * @attributes: an attribute query string.
23656  * @flags: a set of #GFileQueryInfoFlags.
23657  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23658  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23659  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
23660  * @user_data: (closure): the data to pass to callback function
23661  *
23662  * Asynchronously gets the requested information about specified @file. The result
23663  * is a #GFileInfo object that contains key-value attributes (such as type or size
23664  * for the file).
23665  * For more details, see g_file_query_info() which is
23666  * the synchronous version of this call.
23667  * When the operation is finished, @callback will be called. You can then call
23668  * g_file_query_info_finish() to get the result of the operation.
23669  */
23670
23671
23672 /**
23673  * g_file_query_info_finish:
23674  * @file: input #GFile.
23675  * @res: a #GAsyncResult.
23676  * @error: a #GError.
23677  *
23678  * Finishes an asynchronous file info query.
23679  * See g_file_query_info_async().
23680  * Free the returned object with g_object_unref().
23681  *
23682  * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
23683  */
23684
23685
23686 /**
23687  * g_file_query_settable_attributes:
23688  * @file: input #GFile.
23689  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23690  * @error: a #GError, or %NULL
23691  *
23692  * Obtain the list of settable attributes for the file.
23693  * Returns the type and full attribute name of all the attributes
23694  * that can be set on this file. This doesn't mean setting it will always
23695  * succeed though, you might get an access failure, or some specific
23696  * file may not support a specific attribute.
23697  * If @cancellable is not %NULL, then the operation can be cancelled by
23698  * triggering the cancellable object from another thread. If the operation
23699  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23700  * When you are done with it, release it with g_file_attribute_info_list_unref()
23701  *
23702  * Returns: a #GFileAttributeInfoList describing the settable attributes.
23703  */
23704
23705
23706 /**
23707  * g_file_query_writable_namespaces:
23708  * @file: input #GFile.
23709  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23710  * @error: a #GError, or %NULL
23711  *
23712  * Obtain the list of attribute namespaces where new attributes
23713  * can be created by a user. An example of this is extended
23714  * attributes (in the "xattr" namespace).
23715  * If @cancellable is not %NULL, then the operation can be cancelled by
23716  * triggering the cancellable object from another thread. If the operation
23717  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23718  * When you are done with it, release it with g_file_attribute_info_list_unref()
23719  *
23720  * Returns: a #GFileAttributeInfoList describing the writable namespaces.
23721  */
23722
23723
23724 /**
23725  * g_file_read:
23726  * @file: #GFile to read.
23727  * @cancellable: (allow-none): a #GCancellable
23728  * @error: a #GError, or %NULL
23729  *
23730  * Opens a file for reading. The result is a #GFileInputStream that
23731  * can be used to read the contents of the file.
23732  * If @cancellable is not %NULL, then the operation can be cancelled by
23733  * triggering the cancellable object from another thread. If the operation
23734  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23735  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
23736  * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
23737  * Other errors are possible too, and depend on what kind of filesystem the file is on.
23738  * Free the returned object with g_object_unref().
23739  *
23740  * Virtual: read_fn
23741  * Returns: (transfer full): #GFileInputStream or %NULL on error.
23742  */
23743
23744
23745 /**
23746  * g_file_read_async:
23747  * @file: input #GFile
23748  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23749  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23750  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
23751  * @user_data: (closure): the data to pass to callback function
23752  *
23753  * Asynchronously opens @file for reading.
23754  * For more details, see g_file_read() which is
23755  * the synchronous version of this call.
23756  * When the operation is finished, @callback will be called. You can then call
23757  * g_file_read_finish() to get the result of the operation.
23758  */
23759
23760
23761 /**
23762  * g_file_read_finish:
23763  * @file: input #GFile.
23764  * @res: a #GAsyncResult.
23765  * @error: a #GError, or %NULL
23766  *
23767  * Finishes an asynchronous file read operation started with
23768  * g_file_read_async().
23769  * Free the returned object with g_object_unref().
23770  *
23771  * Returns: (transfer full): a #GFileInputStream or %NULL on error.
23772  */
23773
23774
23775 /**
23776  * g_file_replace:
23777  * @file: input #GFile.
23778  * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore.
23779  * @make_backup: %TRUE if a backup should be created.
23780  * @flags: a set of #GFileCreateFlags.
23781  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23782  * @error: a #GError, or %NULL
23783  *
23784  * Returns an output stream for overwriting the file, possibly
23785  * creating a backup copy of the file first. If the file doesn't exist,
23786  * it will be created.
23787  * This will try to replace the file in the safest way possible so
23788  * that any errors during the writing will not affect an already
23789  * existing copy of the file. For instance, for local files it
23790  * may write to a temporary file and then atomically rename over
23791  * the destination when the stream is closed.
23792  * By default files created are generally readable by everyone,
23793  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
23794  * will be made readable only to the current user, to the level that
23795  * is supported on the target filesystem.
23796  * If @cancellable is not %NULL, then the operation can be cancelled by
23797  * triggering the cancellable object from another thread. If the operation
23798  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23799  * If you pass in a non-#NULL @etag value, then this value is
23800  * compared to the current entity tag of the file, and if they differ
23801  * an G_IO_ERROR_WRONG_ETAG error is returned. This generally means
23802  * that the file has been changed since you last read it. You can get
23803  * the new etag from g_file_output_stream_get_etag() after you've
23804  * finished writing and closed the #GFileOutputStream. When you load
23805  * a new file you can use g_file_input_stream_query_info() to get
23806  * the etag of the file.
23807  * If @make_backup is %TRUE, this function will attempt to make a backup
23808  * of the current file before overwriting it. If this fails a G_IO_ERROR_CANT_CREATE_BACKUP
23809  * error will be returned. If you want to replace anyway, try again with
23810  * If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned,
23811  * and if the file is some other form of non-regular file then a
23812  * G_IO_ERROR_NOT_REGULAR_FILE error will be returned.
23813  * Some file systems don't allow all file names, and may
23814  * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
23815  * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
23816  * Other errors are possible too, and depend on what kind of
23817  * filesystem the file is on.
23818  * Free the returned object with g_object_unref().
23819  *
23820  * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
23821  */
23822
23823
23824 /**
23825  * g_file_replace_async:
23826  * @file: input #GFile.
23827  * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
23828  * @make_backup: %TRUE if a backup should be created.
23829  * @flags: a set of #GFileCreateFlags.
23830  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23831  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23832  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
23833  * @user_data: (closure): the data to pass to callback function
23834  *
23835  * Asynchronously overwrites the file, replacing the contents, possibly
23836  * creating a backup copy of the file first.
23837  * For more details, see g_file_replace() which is
23838  * the synchronous version of this call.
23839  * When the operation is finished, @callback will be called. You can then call
23840  * g_file_replace_finish() to get the result of the operation.
23841  */
23842
23843
23844 /**
23845  * g_file_replace_contents:
23846  * @file: input #GFile.
23847  * @contents: (element-type guint8) (array length=length): a string containing the new contents for @file.
23848  * @length: the length of @contents in bytes.
23849  * @etag: (allow-none): the old <link linkend="gfile-etag">entity tag</link> for the document, or %NULL
23850  * @make_backup: %TRUE if a backup should be created.
23851  * @flags: a set of #GFileCreateFlags.
23852  * @new_etag: (allow-none) (out): a location to a new <link linkend="gfile-etag">entity tag</link> for the document. This should be freed with g_free() when no longer needed, or %NULL
23853  * @cancellable: optional #GCancellable object, %NULL to ignore.
23854  * @error: a #GError, or %NULL
23855  *
23856  * Replaces the contents of @file with @contents of @length bytes.
23857  * If @etag is specified (not %NULL) any existing file must have that etag, or
23858  * the error %G_IO_ERROR_WRONG_ETAG will be returned.
23859  * If @make_backup is %TRUE, this function will attempt to make a backup of @file.
23860  * If @cancellable is not %NULL, then the operation can be cancelled by
23861  * triggering the cancellable object from another thread. If the operation
23862  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23863  * The returned @new_etag can be used to verify that the file hasn't changed the
23864  * next time it is saved over.
23865  * has occurred, this function will return %FALSE and set @error
23866  * appropriately if present.
23867  *
23868  * Returns: %TRUE if successful. If an error
23869  */
23870
23871
23872 /**
23873  * g_file_replace_contents_async:
23874  * @file: input #GFile.
23875  * @contents: (element-type guint8) (array length=length): string of contents to replace the file with.
23876  * @length: the length of @contents in bytes.
23877  * @etag: (allow-none): a new <link linkend="gfile-etag">entity tag</link> for the @file, or %NULL
23878  * @make_backup: %TRUE if a backup should be created.
23879  * @flags: a set of #GFileCreateFlags.
23880  * @cancellable: optional #GCancellable object, %NULL to ignore.
23881  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
23882  * @user_data: the data to pass to callback function
23883  *
23884  * Starts an asynchronous replacement of @file with the given
23885  * current entity tag.
23886  * When this operation has completed, @callback will be called with
23887  * g_file_replace_contents_finish().
23888  * If @cancellable is not %NULL, then the operation can be cancelled by
23889  * triggering the cancellable object from another thread. If the operation
23890  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23891  * If @make_backup is %TRUE, this function will attempt to
23892  * make a backup of @file.
23893  */
23894
23895
23896 /**
23897  * g_file_replace_contents_finish:
23898  * @file: input #GFile.
23899  * @res: a #GAsyncResult.
23900  * @new_etag: (out) (allow-none): a location of a new <link linkend="gfile-etag">entity tag</link> for the document. This should be freed with g_free() when it is no longer needed, or %NULL
23901  * @error: a #GError, or %NULL
23902  *
23903  * Finishes an asynchronous replace of the given @file. See
23904  * g_file_replace_contents_async(). Sets @new_etag to the new entity
23905  * tag for the document, if present.
23906  *
23907  * Returns: %TRUE on success, %FALSE on failure.
23908  */
23909
23910
23911 /**
23912  * g_file_replace_finish:
23913  * @file: input #GFile.
23914  * @res: a #GAsyncResult.
23915  * @error: a #GError, or %NULL
23916  *
23917  * Finishes an asynchronous file replace operation started with
23918  * g_file_replace_async().
23919  * Free the returned object with g_object_unref().
23920  *
23921  * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
23922  */
23923
23924
23925 /**
23926  * g_file_replace_readwrite:
23927  * @file: a #GFile
23928  * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore
23929  * @make_backup: %TRUE if a backup should be created
23930  * @flags: a set of #GFileCreateFlags
23931  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
23932  * @error: return location for a #GError, or %NULL
23933  *
23934  * Returns an output stream for overwriting the file in readwrite mode,
23935  * possibly creating a backup copy of the file first. If the file doesn't
23936  * exist, it will be created.
23937  * For details about the behaviour, see g_file_replace() which does the same
23938  * thing but returns an output stream only.
23939  * Note that in many non-local file cases read and write streams are not
23940  * supported, so make sure you really need to do read and write streaming,
23941  * rather than just opening for reading or writing.
23942  * Free the returned object with g_object_unref().
23943  *
23944  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
23945  * Since: 2.22
23946  */
23947
23948
23949 /**
23950  * g_file_replace_readwrite_async:
23951  * @file: input #GFile.
23952  * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
23953  * @make_backup: %TRUE if a backup should be created.
23954  * @flags: a set of #GFileCreateFlags.
23955  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23956  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23957  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
23958  * @user_data: (closure): the data to pass to callback function
23959  *
23960  * Asynchronously overwrites the file in read-write mode, replacing the
23961  * contents, possibly creating a backup copy of the file first.
23962  * For more details, see g_file_replace_readwrite() which is
23963  * the synchronous version of this call.
23964  * When the operation is finished, @callback will be called. You can then
23965  * call g_file_replace_readwrite_finish() to get the result of the operation.
23966  *
23967  * Since: 2.22
23968  */
23969
23970
23971 /**
23972  * g_file_replace_readwrite_finish:
23973  * @file: input #GFile.
23974  * @res: a #GAsyncResult.
23975  * @error: a #GError, or %NULL
23976  *
23977  * Finishes an asynchronous file replace operation started with
23978  * g_file_replace_readwrite_async().
23979  * Free the returned object with g_object_unref().
23980  *
23981  * Returns: (transfer full): a #GFileIOStream, or %NULL on error.
23982  * Since: 2.22
23983  */
23984
23985
23986 /**
23987  * g_file_resolve_relative_path:
23988  * @file: input #GFile.
23989  * @relative_path: a given relative path string.
23990  *
23991  * Resolves a relative path for @file to an absolute path.
23992  * This call does no blocking i/o.
23993  * is %NULL or if @file is invalid.
23994  * Free the returned object with g_object_unref().
23995  *
23996  * Returns: (transfer full): #GFile to the resolved path. %NULL if @relative_path
23997  */
23998
23999
24000 /**
24001  * g_file_set_attribute:
24002  * @file: input #GFile.
24003  * @attribute: a string containing the attribute's name.
24004  * @type: The type of the attribute
24005  * @value_p: a pointer to the value (or the pointer itself if the type is a pointer type)
24006  * @flags: a set of #GFileQueryInfoFlags.
24007  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24008  * @error: a #GError, or %NULL
24009  *
24010  * Sets an attribute in the file with attribute name @attribute to @value.
24011  * If @cancellable is not %NULL, then the operation can be cancelled by
24012  * triggering the cancellable object from another thread. If the operation
24013  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24014  *
24015  * Returns: %TRUE if the attribute was set, %FALSE otherwise.
24016  */
24017
24018
24019 /**
24020  * g_file_set_attribute_byte_string:
24021  * @file: input #GFile.
24022  * @attribute: a string containing the attribute's name.
24023  * @value: a string containing the attribute's new value.
24024  * @flags: a #GFileQueryInfoFlags.
24025  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24026  * @error: a #GError, or %NULL
24027  *
24028  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value.
24029  * If @attribute is of a different type, this operation will fail,
24030  * returning %FALSE.
24031  * If @cancellable is not %NULL, then the operation can be cancelled by
24032  * triggering the cancellable object from another thread. If the operation
24033  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24034  * in the @file, %FALSE otherwise.
24035  *
24036  * Returns: %TRUE if the @attribute was successfully set to @value
24037  */
24038
24039
24040 /**
24041  * g_file_set_attribute_int32:
24042  * @file: input #GFile.
24043  * @attribute: a string containing the attribute's name.
24044  * @value: a #gint32 containing the attribute's new value.
24045  * @flags: a #GFileQueryInfoFlags.
24046  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24047  * @error: a #GError, or %NULL
24048  *
24049  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value.
24050  * If @attribute is of a different type, this operation will fail.
24051  * If @cancellable is not %NULL, then the operation can be cancelled by
24052  * triggering the cancellable object from another thread. If the operation
24053  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24054  * in the @file, %FALSE otherwise.
24055  *
24056  * Returns: %TRUE if the @attribute was successfully set to @value
24057  */
24058
24059
24060 /**
24061  * g_file_set_attribute_int64:
24062  * @file: input #GFile.
24063  * @attribute: a string containing the attribute's name.
24064  * @value: a #guint64 containing the attribute's new value.
24065  * @flags: a #GFileQueryInfoFlags.
24066  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24067  * @error: a #GError, or %NULL
24068  *
24069  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value.
24070  * If @attribute is of a different type, this operation will fail.
24071  * If @cancellable is not %NULL, then the operation can be cancelled by
24072  * triggering the cancellable object from another thread. If the operation
24073  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24074  *
24075  * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
24076  */
24077
24078
24079 /**
24080  * g_file_set_attribute_string:
24081  * @file: input #GFile.
24082  * @attribute: a string containing the attribute's name.
24083  * @value: a string containing the attribute's value.
24084  * @flags: #GFileQueryInfoFlags.
24085  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24086  * @error: a #GError, or %NULL
24087  *
24088  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value.
24089  * If @attribute is of a different type, this operation will fail.
24090  * If @cancellable is not %NULL, then the operation can be cancelled by
24091  * triggering the cancellable object from another thread. If the operation
24092  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24093  *
24094  * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
24095  */
24096
24097
24098 /**
24099  * g_file_set_attribute_uint32:
24100  * @file: input #GFile.
24101  * @attribute: a string containing the attribute's name.
24102  * @value: a #guint32 containing the attribute's new value.
24103  * @flags: a #GFileQueryInfoFlags.
24104  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24105  * @error: a #GError, or %NULL
24106  *
24107  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value.
24108  * If @attribute is of a different type, this operation will fail.
24109  * If @cancellable is not %NULL, then the operation can be cancelled by
24110  * triggering the cancellable object from another thread. If the operation
24111  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24112  * in the @file, %FALSE otherwise.
24113  *
24114  * Returns: %TRUE if the @attribute was successfully set to @value
24115  */
24116
24117
24118 /**
24119  * g_file_set_attribute_uint64:
24120  * @file: input #GFile.
24121  * @attribute: a string containing the attribute's name.
24122  * @value: a #guint64 containing the attribute's new value.
24123  * @flags: a #GFileQueryInfoFlags.
24124  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24125  * @error: a #GError, or %NULL
24126  *
24127  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value.
24128  * If @attribute is of a different type, this operation will fail.
24129  * If @cancellable is not %NULL, then the operation can be cancelled by
24130  * triggering the cancellable object from another thread. If the operation
24131  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24132  * in the @file, %FALSE otherwise.
24133  *
24134  * Returns: %TRUE if the @attribute was successfully set to @value
24135  */
24136
24137
24138 /**
24139  * g_file_set_attributes_async:
24140  * @file: input #GFile.
24141  * @info: a #GFileInfo.
24142  * @flags: a #GFileQueryInfoFlags.
24143  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
24144  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24145  * @callback: (scope async): a #GAsyncReadyCallback.
24146  * @user_data: (closure): a #gpointer.
24147  *
24148  * Asynchronously sets the attributes of @file with @info.
24149  * For more details, see g_file_set_attributes_from_info() which is
24150  * the synchronous version of this call.
24151  * When the operation is finished, @callback will be called. You can then call
24152  * g_file_set_attributes_finish() to get the result of the operation.
24153  */
24154
24155
24156 /**
24157  * g_file_set_attributes_finish:
24158  * @file: input #GFile.
24159  * @result: a #GAsyncResult.
24160  * @info: (out) (transfer full): a #GFileInfo.
24161  * @error: a #GError, or %NULL
24162  *
24163  * Finishes setting an attribute started in g_file_set_attributes_async().
24164  *
24165  * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise.
24166  */
24167
24168
24169 /**
24170  * g_file_set_attributes_from_info:
24171  * @file: input #GFile.
24172  * @info: a #GFileInfo.
24173  * @flags: #GFileQueryInfoFlags
24174  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24175  * @error: a #GError, or %NULL
24176  *
24177  * Tries to set all attributes in the #GFileInfo on the target values,
24178  * not stopping on the first error.
24179  * If there is any error during this operation then @error will be set to
24180  * the first error. Error on particular fields are flagged by setting
24181  * the "status" field in the attribute value to
24182  * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can also detect
24183  * further errors.
24184  * If @cancellable is not %NULL, then the operation can be cancelled by
24185  * triggering the cancellable object from another thread. If the operation
24186  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24187  *
24188  * Returns: %TRUE if there was any error, %FALSE otherwise.
24189  */
24190
24191
24192 /**
24193  * g_file_set_display_name:
24194  * @file: input #GFile.
24195  * @display_name: a string.
24196  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24197  * @error: a #GError, or %NULL
24198  *
24199  * Renames @file to the specified display name.
24200  * The display name is converted from UTF8 to the correct encoding for the target
24201  * filesystem if possible and the @file is renamed to this.
24202  * If you want to implement a rename operation in the user interface the edit name
24203  * (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the initial value in the rename
24204  * widget, and then the result after editing should be passed to g_file_set_display_name().
24205  * On success the resulting converted filename is returned.
24206  * If @cancellable is not %NULL, then the operation can be cancelled by
24207  * triggering the cancellable object from another thread. If the operation
24208  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24209  * if there was an error.
24210  * Free the returned object with g_object_unref().
24211  *
24212  * Returns: (transfer full): a #GFile specifying what @file was renamed to, or %NULL
24213  */
24214
24215
24216 /**
24217  * g_file_set_display_name_async:
24218  * @file: input #GFile.
24219  * @display_name: a string.
24220  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
24221  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24222  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
24223  * @user_data: (closure): the data to pass to callback function
24224  *
24225  * Asynchronously sets the display name for a given #GFile.
24226  * For more details, see g_file_set_display_name() which is
24227  * the synchronous version of this call.
24228  * When the operation is finished, @callback will be called. You can then call
24229  * g_file_set_display_name_finish() to get the result of the operation.
24230  */
24231
24232
24233 /**
24234  * g_file_set_display_name_finish:
24235  * @file: input #GFile.
24236  * @res: a #GAsyncResult.
24237  * @error: a #GError, or %NULL
24238  *
24239  * Finishes setting a display name started with
24240  * g_file_set_display_name_async().
24241  * Free the returned object with g_object_unref().
24242  *
24243  * Returns: (transfer full): a #GFile or %NULL on error.
24244  */
24245
24246
24247 /**
24248  * g_file_start_mountable:
24249  * @file: input #GFile.
24250  * @flags: flags affecting the operation
24251  * @start_operation: a #GMountOperation, or %NULL to avoid user interaction.
24252  * @cancellable: optional #GCancellable object, %NULL to ignore.
24253  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
24254  * @user_data: the data to pass to callback function
24255  *
24256  * Starts a file of type G_FILE_TYPE_MOUNTABLE.
24257  * Using @start_operation, you can request callbacks when, for instance,
24258  * passwords are needed during authentication.
24259  * If @cancellable is not %NULL, then the operation can be cancelled by
24260  * triggering the cancellable object from another thread. If the operation
24261  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24262  * When the operation is finished, @callback will be called. You can then call
24263  * g_file_mount_mountable_finish() to get the result of the operation.
24264  *
24265  * Since: 2.22
24266  */
24267
24268
24269 /**
24270  * g_file_start_mountable_finish:
24271  * @file: input #GFile.
24272  * @result: a #GAsyncResult.
24273  * @error: a #GError, or %NULL
24274  *
24275  * Finishes a start operation. See g_file_start_mountable() for details.
24276  * Finish an asynchronous start operation that was started
24277  * with g_file_start_mountable().
24278  * otherwise.
24279  *
24280  * Returns: %TRUE if the operation finished successfully. %FALSE
24281  * Since: 2.22
24282  */
24283
24284
24285 /**
24286  * g_file_stop_mountable:
24287  * @file: input #GFile.
24288  * @flags: flags affecting the operation
24289  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
24290  * @cancellable: optional #GCancellable object, %NULL to ignore.
24291  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
24292  * @user_data: the data to pass to callback function
24293  *
24294  * Stops a file of type G_FILE_TYPE_MOUNTABLE.
24295  * If @cancellable is not %NULL, then the operation can be cancelled by
24296  * triggering the cancellable object from another thread. If the operation
24297  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24298  * When the operation is finished, @callback will be called. You can then call
24299  * g_file_stop_mountable_finish() to get the result of the operation.
24300  *
24301  * Since: 2.22
24302  */
24303
24304
24305 /**
24306  * g_file_stop_mountable_finish:
24307  * @file: input #GFile.
24308  * @result: a #GAsyncResult.
24309  * @error: a #GError, or %NULL
24310  *
24311  * Finishes an stop operation, see g_file_stop_mountable() for details.
24312  * Finish an asynchronous stop operation that was started
24313  * with g_file_stop_mountable().
24314  * otherwise.
24315  *
24316  * Returns: %TRUE if the operation finished successfully. %FALSE
24317  * Since: 2.22
24318  */
24319
24320
24321 /**
24322  * g_file_supports_thread_contexts:
24323  * @file: a #GFile.
24324  *
24325  * Checks if @file supports <link
24326  * linkend="g-main-context-push-thread-default-context">thread-default
24327  * contexts</link>. If this returns %FALSE, you cannot perform
24328  * asynchronous operations on @file in a thread that has a
24329  * thread-default context.
24330  *
24331  * Returns: Whether or not @file supports thread-default contexts.
24332  * Since: 2.22
24333  */
24334
24335
24336 /**
24337  * g_file_trash:
24338  * @file: #GFile to send to trash.
24339  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24340  * @error: a #GError, or %NULL
24341  *
24342  * Sends @file to the "Trashcan", if possible. This is similar to
24343  * deleting it, but the user can recover it before emptying the trashcan.
24344  * Not all file systems support trashing, so this call can return the
24345  * %G_IO_ERROR_NOT_SUPPORTED error.
24346  * If @cancellable is not %NULL, then the operation can be cancelled by
24347  * triggering the cancellable object from another thread. If the operation
24348  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24349  *
24350  * Returns: %TRUE on successful trash, %FALSE otherwise.
24351  */
24352
24353
24354 /**
24355  * g_file_unmount_mountable:
24356  * @file: input #GFile.
24357  * @flags: flags affecting the operation
24358  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24359  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
24360  * @user_data: (closure): the data to pass to callback function
24361  *
24362  * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
24363  * If @cancellable is not %NULL, then the operation can be cancelled by
24364  * triggering the cancellable object from another thread. If the operation
24365  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24366  * When the operation is finished, @callback will be called. You can then call
24367  * g_file_unmount_mountable_finish() to get the result of the operation.
24368  *
24369  * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation() instead.
24370  */
24371
24372
24373 /**
24374  * g_file_unmount_mountable_finish:
24375  * @file: input #GFile.
24376  * @result: a #GAsyncResult.
24377  * @error: a #GError, or %NULL
24378  *
24379  * Finishes an unmount operation, see g_file_unmount_mountable() for details.
24380  * Finish an asynchronous unmount operation that was started
24381  * with g_file_unmount_mountable().
24382  * otherwise.
24383  *
24384  * Returns: %TRUE if the operation finished successfully. %FALSE
24385  * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation_finish() instead.
24386  */
24387
24388
24389 /**
24390  * g_file_unmount_mountable_with_operation:
24391  * @file: input #GFile.
24392  * @flags: flags affecting the operation
24393  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
24394  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24395  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
24396  * @user_data: (closure): the data to pass to callback function
24397  *
24398  * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
24399  * If @cancellable is not %NULL, then the operation can be cancelled by
24400  * triggering the cancellable object from another thread. If the operation
24401  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24402  * When the operation is finished, @callback will be called. You can then call
24403  * g_file_unmount_mountable_finish() to get the result of the operation.
24404  *
24405  * Since: 2.22
24406  */
24407
24408
24409 /**
24410  * g_file_unmount_mountable_with_operation_finish:
24411  * @file: input #GFile.
24412  * @result: a #GAsyncResult.
24413  * @error: a #GError, or %NULL
24414  *
24415  * Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.
24416  * Finish an asynchronous unmount operation that was started
24417  * with g_file_unmount_mountable_with_operation().
24418  * otherwise.
24419  *
24420  * Returns: %TRUE if the operation finished successfully. %FALSE
24421  * Since: 2.22
24422  */
24423
24424
24425 /**
24426  * g_filename_completer_get_completion_suffix:
24427  * @completer: the filename completer.
24428  * @initial_text: text to be completed.
24429  *
24430  * Obtains a completion for @initial_text from @completer.
24431  * This string is not owned by GIO, so remember to g_free() it
24432  * when finished.
24433  *
24434  * Returns: a completed string, or %NULL if no completion exists.
24435  */
24436
24437
24438 /**
24439  * g_filename_completer_get_completions:
24440  * @completer: the filename completer.
24441  * @initial_text: text to be completed.
24442  *
24443  * Gets an array of completion strings for a given initial text.
24444  * This array must be freed by g_strfreev() when finished.
24445  *
24446  * Returns: (array zero-terminated=1) (transfer full): array of strings with possible completions for @initial_text.
24447  */
24448
24449
24450 /**
24451  * g_filename_completer_new:
24452  *
24453  * Creates a new filename completer.
24454  *
24455  * Returns: a #GFilenameCompleter.
24456  */
24457
24458
24459 /**
24460  * g_filename_completer_set_dirs_only:
24461  * @completer: the filename completer.
24462  * @dirs_only: a #gboolean.
24463  *
24464  * If @dirs_only is %TRUE, @completer will only
24465  * complete directory names, and not file names.
24466  */
24467
24468
24469 /**
24470  * g_filter_input_stream_get_base_stream:
24471  * @stream: a #GFilterInputStream.
24472  *
24473  * Gets the base stream for the filter stream.
24474  *
24475  * Returns: (transfer none): a #GInputStream.
24476  */
24477
24478
24479 /**
24480  * g_filter_input_stream_get_close_base_stream:
24481  * @stream: a #GFilterInputStream.
24482  *
24483  * Returns whether the base stream will be closed when @stream is
24484  * closed.
24485  *
24486  * Returns: %TRUE if the base stream will be closed.
24487  */
24488
24489
24490 /**
24491  * g_filter_input_stream_set_close_base_stream:
24492  * @stream: a #GFilterInputStream.
24493  * @close_base: %TRUE to close the base stream.
24494  *
24495  * Sets whether the base stream will be closed when @stream is closed.
24496  */
24497
24498
24499 /**
24500  * g_filter_output_stream_get_base_stream:
24501  * @stream: a #GFilterOutputStream.
24502  *
24503  * Gets the base stream for the filter stream.
24504  *
24505  * Returns: (transfer none): a #GOutputStream.
24506  */
24507
24508
24509 /**
24510  * g_filter_output_stream_get_close_base_stream:
24511  * @stream: a #GFilterOutputStream.
24512  *
24513  * Returns whether the base stream will be closed when @stream is
24514  * closed.
24515  *
24516  * Returns: %TRUE if the base stream will be closed.
24517  */
24518
24519
24520 /**
24521  * g_filter_output_stream_set_close_base_stream:
24522  * @stream: a #GFilterOutputStream.
24523  * @close_base: %TRUE to close the base stream.
24524  *
24525  * Sets whether the base stream will be closed when @stream is closed.
24526  */
24527
24528
24529 /**
24530  * g_hash_table_freeze:
24531  * @hash_table: a #GHashTable
24532  *
24533  * This function is deprecated and will be removed in the next major
24534  * release of GLib. It does nothing.
24535  */
24536
24537
24538 /**
24539  * g_hash_table_thaw:
24540  * @hash_table: a #GHashTable
24541  *
24542  * This function is deprecated and will be removed in the next major
24543  * release of GLib. It does nothing.
24544  */
24545
24546
24547 /**
24548  * g_icon_equal:
24549  * @icon1: pointer to the first #GIcon.
24550  * @icon2: pointer to the second #GIcon.
24551  *
24552  * Checks if two icons are equal.
24553  *
24554  * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise.
24555  */
24556
24557
24558 /**
24559  * g_icon_hash:
24560  * @icon: #gconstpointer to an icon object.
24561  *
24562  * Gets a hash for an icon.
24563  * use in a #GHashTable or similar data structure.
24564  *
24565  * Virtual: hash
24566  * Returns: a #guint containing a hash for the @icon, suitable for
24567  */
24568
24569
24570 /**
24571  * g_icon_new_for_string:
24572  * @str: A string obtained via g_icon_to_string().
24573  * @error: Return location for error.
24574  *
24575  * Generate a #GIcon instance from @str. This function can fail if
24576  * If your application or library provides one or more #GIcon
24577  * implementations you need to ensure that each #GType is registered
24578  * with the type system prior to calling g_icon_new_for_string().
24579  * interface or %NULL if @error is set.
24580  *
24581  * Returns: (transfer full): An object implementing the #GIcon
24582  * Since: 2.20
24583  */
24584
24585
24586 /**
24587  * g_icon_to_string:
24588  * @icon: a #GIcon.
24589  *
24590  * Generates a textual representation of @icon that can be used for
24591  * serialization such as when passing @icon to a different process or
24592  * saving it to persistent storage. Use g_icon_new_for_string() to
24593  * get @icon back from the returned string.
24594  * The encoding of the returned string is proprietary to #GIcon except
24595  * in the following two cases
24596  * <itemizedlist>
24597  * <listitem><para>
24598  * If @icon is a #GFileIcon, the returned string is a native path
24599  * (such as <literal>/path/to/my icon.png</literal>) without escaping
24600  * if the #GFile for @icon is a native file.  If the file is not
24601  * native, the returned string is the result of g_file_get_uri()
24602  * (such as <literal>sftp://path/to/my&percnt;20icon.png</literal>).
24603  * </para></listitem>
24604  * <listitem><para>
24605  * If @icon is a #GThemedIcon with exactly one name, the encoding is
24606  * simply the name (such as <literal>network-server</literal>).
24607  * </para></listitem>
24608  * </itemizedlist>
24609  * be serialized. Use g_free() to free.
24610  *
24611  * Virtual: to_tokens
24612  * Returns: An allocated NUL-terminated UTF8 string or %NULL if @icon can't
24613  * Since: 2.20
24614  */
24615
24616
24617 /**
24618  * g_inet_address_equal:
24619  * @address: A #GInetAddress.
24620  * @other_address: Another #GInetAddress.
24621  *
24622  * Checks if two #GInetAddress instances are equal, e.g. the same address.
24623  *
24624  * Returns: %TRUE if @address and @other_address are equal, %FALSE otherwise.
24625  * Since: 2.30
24626  */
24627
24628
24629 /**
24630  * g_inet_address_get_family:
24631  * @address: a #GInetAddress
24632  *
24633  * Gets @address's family
24634  *
24635  * Returns: @address's family
24636  * Since: 2.22
24637  */
24638
24639
24640 /**
24641  * g_inet_address_get_is_any:
24642  * @address: a #GInetAddress
24643  *
24644  * Tests whether @address is the "any" address for its family.
24645  *
24646  * Returns: %TRUE if @address is the "any" address for its family.
24647  * Since: 2.22
24648  */
24649
24650
24651 /**
24652  * g_inet_address_get_is_link_local:
24653  * @address: a #GInetAddress
24654  *
24655  * Tests whether @address is a link-local address (that is, if it
24656  * identifies a host on a local network that is not connected to the
24657  * Internet).
24658  *
24659  * Returns: %TRUE if @address is a link-local address.
24660  * Since: 2.22
24661  */
24662
24663
24664 /**
24665  * g_inet_address_get_is_loopback:
24666  * @address: a #GInetAddress
24667  *
24668  * Tests whether @address is the loopback address for its family.
24669  *
24670  * Returns: %TRUE if @address is the loopback address for its family.
24671  * Since: 2.22
24672  */
24673
24674
24675 /**
24676  * g_inet_address_get_is_mc_global:
24677  * @address: a #GInetAddress
24678  *
24679  * Tests whether @address is a global multicast address.
24680  *
24681  * Returns: %TRUE if @address is a global multicast address.
24682  * Since: 2.22
24683  */
24684
24685
24686 /**
24687  * g_inet_address_get_is_mc_link_local:
24688  * @address: a #GInetAddress
24689  *
24690  * Tests whether @address is a link-local multicast address.
24691  *
24692  * Returns: %TRUE if @address is a link-local multicast address.
24693  * Since: 2.22
24694  */
24695
24696
24697 /**
24698  * g_inet_address_get_is_mc_node_local:
24699  * @address: a #GInetAddress
24700  *
24701  * Tests whether @address is a node-local multicast address.
24702  *
24703  * Returns: %TRUE if @address is a node-local multicast address.
24704  * Since: 2.22
24705  */
24706
24707
24708 /**
24709  * g_inet_address_get_is_mc_org_local:
24710  * @address: a #GInetAddress
24711  *
24712  * Tests whether @address is an organization-local multicast address.
24713  *
24714  * Returns: %TRUE if @address is an organization-local multicast address.
24715  * Since: 2.22
24716  */
24717
24718
24719 /**
24720  * g_inet_address_get_is_mc_site_local:
24721  * @address: a #GInetAddress
24722  *
24723  * Tests whether @address is a site-local multicast address.
24724  *
24725  * Returns: %TRUE if @address is a site-local multicast address.
24726  * Since: 2.22
24727  */
24728
24729
24730 /**
24731  * g_inet_address_get_is_multicast:
24732  * @address: a #GInetAddress
24733  *
24734  * Tests whether @address is a multicast address.
24735  *
24736  * Returns: %TRUE if @address is a multicast address.
24737  * Since: 2.22
24738  */
24739
24740
24741 /**
24742  * g_inet_address_get_is_site_local:
24743  * @address: a #GInetAddress
24744  *
24745  * Tests whether @address is a site-local address such as 10.0.0.1
24746  * (that is, the address identifies a host on a local network that can
24747  * not be reached directly from the Internet, but which may have
24748  * outgoing Internet connectivity via a NAT or firewall).
24749  *
24750  * Returns: %TRUE if @address is a site-local address.
24751  * Since: 2.22
24752  */
24753
24754
24755 /**
24756  * g_inet_address_get_native_size:
24757  * @address: a #GInetAddress
24758  *
24759  * Gets the size of the native raw binary address for @address. This
24760  * is the size of the data that you get from g_inet_address_to_bytes().
24761  *
24762  * Returns: the number of bytes used for the native version of @address.
24763  * Since: 2.22
24764  */
24765
24766
24767 /**
24768  * g_inet_address_new_any:
24769  * @family: the address family
24770  *
24771  * Creates a #GInetAddress for the "any" address (unassigned/"don't
24772  * care") for @family.
24773  * for @family.
24774  *
24775  * Returns: a new #GInetAddress corresponding to the "any" address
24776  * Since: 2.22
24777  */
24778
24779
24780 /**
24781  * g_inet_address_new_from_bytes:
24782  * @bytes: raw address data
24783  * @family: the address family of @bytes
24784  *
24785  * Creates a new #GInetAddress from the given @family and @bytes.
24786  * %G_INET_ADDRESS_IPV6.
24787  *
24788  * Returns: a new #GInetAddress corresponding to @family and @bytes.
24789  * Since: 2.22
24790  */
24791
24792
24793 /**
24794  * g_inet_address_new_from_string:
24795  * @string: a string representation of an IP address
24796  *
24797  * Parses @string as an IP address and creates a new #GInetAddress.
24798  *
24799  * Returns: a new #GInetAddress corresponding to @string, or %NULL if
24800  * Since: 2.22
24801  */
24802
24803
24804 /**
24805  * g_inet_address_new_loopback:
24806  * @family: the address family
24807  *
24808  * Creates a #GInetAddress for the loopback address for @family.
24809  * for @family.
24810  *
24811  * Returns: a new #GInetAddress corresponding to the loopback address
24812  * Since: 2.22
24813  */
24814
24815
24816 /**
24817  * g_inet_address_to_bytes: (skip)
24818  * @address: a #GInetAddress
24819  *
24820  * Gets the raw binary address data from @address.
24821  * which should not be modified, stored, or freed. The size of this
24822  * array can be gotten with g_inet_address_get_native_size().
24823  *
24824  * Returns: a pointer to an internal array of the bytes in @address,
24825  * Since: 2.22
24826  */
24827
24828
24829 /**
24830  * g_inet_address_to_string:
24831  * @address: a #GInetAddress
24832  *
24833  * Converts @address to string form.
24834  * freed after use.
24835  *
24836  * Returns: a representation of @address as a string, which should be
24837  * Since: 2.22
24838  */
24839
24840
24841 /**
24842  * g_inet_socket_address_get_address:
24843  * @address: a #GInetSocketAddress
24844  *
24845  * Gets @address's #GInetAddress.
24846  * g_object_ref()'d if it will be stored
24847  *
24848  * Returns: (transfer none): the #GInetAddress for @address, which must be
24849  * Since: 2.22
24850  */
24851
24852
24853 /**
24854  * g_inet_socket_address_get_port:
24855  * @address: a #GInetSocketAddress
24856  *
24857  * Gets @address's port.
24858  *
24859  * Returns: the port for @address
24860  * Since: 2.22
24861  */
24862
24863
24864 /**
24865  * g_inet_socket_address_new:
24866  * @address: a #GInetAddress
24867  * @port: a port number
24868  *
24869  * Creates a new #GInetSocketAddress for @address and @port.
24870  *
24871  * Returns: a new #GInetSocketAddress
24872  * Since: 2.22
24873  */
24874
24875
24876 /**
24877  * g_initable_init:
24878  * @initable: a #GInitable.
24879  * @cancellable: optional #GCancellable object, %NULL to ignore.
24880  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24881  *
24882  * Initializes the object implementing the interface. This must be
24883  * done before any real use of the object after initial construction.
24884  * Implementations may also support cancellation. If @cancellable is not %NULL,
24885  * then initialization can be cancelled by triggering the cancellable object
24886  * from another thread. If the operation was cancelled, the error
24887  * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
24888  * the object doesn't support cancellable initialization the error
24889  * %G_IO_ERROR_NOT_SUPPORTED will be returned.
24890  * If this function is not called, or returns with an error then all
24891  * operations on the object should fail, generally returning the
24892  * error %G_IO_ERROR_NOT_INITIALIZED.
24893  * Implementations of this method must be idempotent, i.e. multiple calls
24894  * to this function with the same argument should return the same results.
24895  * Only the first call initializes the object, further calls return the result
24896  * of the first call. This is so that its safe to implement the singleton
24897  * pattern in the GObject constructor function.
24898  * return %FALSE and set @error appropriately if present.
24899  *
24900  * Returns: %TRUE if successful. If an error has occurred, this function will
24901  * Since: 2.22
24902  */
24903
24904
24905 /**
24906  * g_initable_new:
24907  * @object_type: a #GType supporting #GInitable.
24908  * @cancellable: optional #GCancellable object, %NULL to ignore.
24909  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24910  * @first_property_name: the name of the first property, or %NULL if no properties
24911  * @...: the value if the first property, followed by and other property value pairs, and ended by %NULL.
24912  *
24913  * Helper function for constructing #GInitiable object. This is
24914  * similar to g_object_new() but also initializes the object
24915  * and returns %NULL, setting an error on failure.
24916  *
24917  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
24918  * Since: 2.22
24919  */
24920
24921
24922 /**
24923  * g_initable_new_valist:
24924  * @object_type: a #GType supporting #GInitable.
24925  * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
24926  * @var_args: The var args list generated from @first_property_name.
24927  * @cancellable: optional #GCancellable object, %NULL to ignore.
24928  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24929  *
24930  * Helper function for constructing #GInitiable object. This is
24931  * similar to g_object_new_valist() but also initializes the object
24932  * and returns %NULL, setting an error on failure.
24933  *
24934  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
24935  * Since: 2.22
24936  */
24937
24938
24939 /**
24940  * g_initable_newv:
24941  * @object_type: a #GType supporting #GInitable.
24942  * @n_parameters: the number of parameters in @parameters
24943  * @parameters: the parameters to use to construct the object
24944  * @cancellable: optional #GCancellable object, %NULL to ignore.
24945  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24946  *
24947  * Helper function for constructing #GInitiable object. This is
24948  * similar to g_object_newv() but also initializes the object
24949  * and returns %NULL, setting an error on failure.
24950  *
24951  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
24952  * Since: 2.22
24953  */
24954
24955
24956 /**
24957  * g_input_stream_clear_pending:
24958  * @stream: input stream
24959  *
24960  * Clears the pending flag on @stream.
24961  */
24962
24963
24964 /**
24965  * g_input_stream_close:
24966  * @stream: A #GInputStream.
24967  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24968  * @error: location to store the error occuring, or %NULL to ignore
24969  *
24970  * Closes the stream, releasing resources related to it.
24971  * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
24972  * Closing a stream multiple times will not return an error.
24973  * Streams will be automatically closed when the last reference
24974  * is dropped, but you might want to call this function to make sure
24975  * resources are released as early as possible.
24976  * Some streams might keep the backing store of the stream (e.g. a file descriptor)
24977  * open after the stream is closed. See the documentation for the individual
24978  * stream for details.
24979  * On failure the first error that happened will be reported, but the close
24980  * operation will finish as much as possible. A stream that failed to
24981  * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
24982  * is important to check and report the error to the user.
24983  * If @cancellable is not NULL, then the operation can be cancelled by
24984  * triggering the cancellable object from another thread. If the operation
24985  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24986  * Cancelling a close will still leave the stream closed, but some streams
24987  * can use a faster close that doesn't block to e.g. check errors.
24988  *
24989  * Returns: %TRUE on success, %FALSE on failure
24990  */
24991
24992
24993 /**
24994  * g_input_stream_close_async:
24995  * @stream: A #GInputStream.
24996  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
24997  * @cancellable: (allow-none): optional cancellable object
24998  * @callback: (scope async): callback to call when the request is satisfied
24999  * @user_data: (closure): the data to pass to callback function
25000  *
25001  * Requests an asynchronous closes of the stream, releasing resources related to it.
25002  * When the operation is finished @callback will be called.
25003  * You can then call g_input_stream_close_finish() to get the result of the
25004  * operation.
25005  * For behaviour details see g_input_stream_close().
25006  * The asyncronous methods have a default fallback that uses threads to implement
25007  * asynchronicity, so they are optional for inheriting classes. However, if you
25008  * override one you must override all.
25009  */
25010
25011
25012 /**
25013  * g_input_stream_close_finish:
25014  * @stream: a #GInputStream.
25015  * @result: a #GAsyncResult.
25016  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25017  *
25018  * Finishes closing a stream asynchronously, started from g_input_stream_close_async().
25019  *
25020  * Returns: %TRUE if the stream was closed successfully.
25021  */
25022
25023
25024 /**
25025  * g_input_stream_has_pending:
25026  * @stream: input stream.
25027  *
25028  * Checks if an input stream has pending actions.
25029  *
25030  * Returns: %TRUE if @stream has pending actions.
25031  */
25032
25033
25034 /**
25035  * g_input_stream_is_closed:
25036  * @stream: input stream.
25037  *
25038  * Checks if an input stream is closed.
25039  *
25040  * Returns: %TRUE if the stream is closed.
25041  */
25042
25043
25044 /**
25045  * g_input_stream_read:
25046  * @stream: a #GInputStream.
25047  * @buffer: a buffer to read data into (which should be at least count bytes long).
25048  * @count: the number of bytes that will be read from the stream
25049  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25050  * @error: location to store the error occuring, or %NULL to ignore
25051  *
25052  * Tries to read @count bytes from the stream into the buffer starting at
25053  * If count is zero returns zero and does nothing. A value of @count
25054  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
25055  * On success, the number of bytes read into the buffer is returned.
25056  * It is not an error if this is not the same as the requested size, as it
25057  * can happen e.g. near the end of a file. Zero is returned on end of file
25058  * (or if @count is zero),  but never otherwise.
25059  * If @cancellable is not NULL, then the operation can be cancelled by
25060  * triggering the cancellable object from another thread. If the operation
25061  * was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an
25062  * operation was partially finished when the operation was cancelled the
25063  * partial result will be returned, without an error.
25064  * On error -1 is returned and @error is set accordingly.
25065  *
25066  * Returns: Number of bytes read, or -1 on error
25067  */
25068
25069
25070 /**
25071  * g_input_stream_read_all:
25072  * @stream: a #GInputStream.
25073  * @buffer: a buffer to read data into (which should be at least count bytes long).
25074  * @count: the number of bytes that will be read from the stream
25075  * @bytes_read: (out): location to store the number of bytes that was read from the stream
25076  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25077  * @error: location to store the error occuring, or %NULL to ignore
25078  *
25079  * Tries to read @count bytes from the stream into the buffer starting at
25080  * This function is similar to g_input_stream_read(), except it tries to
25081  * read as many bytes as requested, only stopping on an error or end of stream.
25082  * On a successful read of @count bytes, or if we reached the end of the
25083  * stream,  %TRUE is returned, and @bytes_read is set to the number of bytes
25084  * read into @buffer.
25085  * If there is an error during the operation %FALSE is returned and @error
25086  * is set to indicate the error status, @bytes_read is updated to contain
25087  * the number of bytes read into @buffer before the error occurred.
25088  *
25089  * Returns: %TRUE on success, %FALSE if there was an error
25090  */
25091
25092
25093 /**
25094  * g_input_stream_read_async:
25095  * @stream: A #GInputStream.
25096  * @buffer: a buffer to read data into (which should be at least count bytes long).
25097  * @count: the number of bytes that will be read from the stream
25098  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
25099  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25100  * @callback: (scope async): callback to call when the request is satisfied
25101  * @user_data: (closure): the data to pass to callback function
25102  *
25103  * Request an asynchronous read of @count bytes from the stream into the buffer
25104  * starting at @buffer. When the operation is finished @callback will be called.
25105  * You can then call g_input_stream_read_finish() to get the result of the
25106  * operation.
25107  * During an async request no other sync and async calls are allowed on @stream, and will
25108  * result in %G_IO_ERROR_PENDING errors.
25109  * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
25110  * On success, the number of bytes read into the buffer will be passed to the
25111  * callback. It is not an error if this is not the same as the requested size, as it
25112  * can happen e.g. near the end of a file, but generally we try to read
25113  * as many bytes as requested. Zero is returned on end of file
25114  * (or if @count is zero),  but never otherwise.
25115  * Any outstanding i/o request with higher priority (lower numerical value) will
25116  * be executed before an outstanding request with lower priority. Default
25117  * priority is %G_PRIORITY_DEFAULT.
25118  * The asyncronous methods have a default fallback that uses threads to implement
25119  * asynchronicity, so they are optional for inheriting classes. However, if you
25120  * override one you must override all.
25121  */
25122
25123
25124 /**
25125  * g_input_stream_read_finish:
25126  * @stream: a #GInputStream.
25127  * @result: a #GAsyncResult.
25128  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25129  *
25130  * Finishes an asynchronous stream read operation.
25131  *
25132  * Returns: number of bytes read in, or -1 on error.
25133  */
25134
25135
25136 /**
25137  * g_input_stream_set_pending:
25138  * @stream: input stream
25139  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25140  *
25141  * Sets @stream to have actions pending. If the pending flag is
25142  * already set or @stream is closed, it will return %FALSE and set
25143  *
25144  * Returns: %TRUE if pending was previously unset and is now set.
25145  */
25146
25147
25148 /**
25149  * g_input_stream_skip:
25150  * @stream: a #GInputStream.
25151  * @count: the number of bytes that will be skipped from the stream
25152  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25153  * @error: location to store the error occuring, or %NULL to ignore
25154  *
25155  * Tries to skip @count bytes from the stream. Will block during the operation.
25156  * This is identical to g_input_stream_read(), from a behaviour standpoint,
25157  * but the bytes that are skipped are not returned to the user. Some
25158  * streams have an implementation that is more efficient than reading the data.
25159  * This function is optional for inherited classes, as the default implementation
25160  * emulates it using read.
25161  * If @cancellable is not %NULL, then the operation can be cancelled by
25162  * triggering the cancellable object from another thread. If the operation
25163  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
25164  * operation was partially finished when the operation was cancelled the
25165  * partial result will be returned, without an error.
25166  *
25167  * Returns: Number of bytes skipped, or -1 on error
25168  */
25169
25170
25171 /**
25172  * g_input_stream_skip_async:
25173  * @stream: A #GInputStream.
25174  * @count: the number of bytes that will be skipped from the stream
25175  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
25176  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25177  * @callback: (scope async): callback to call when the request is satisfied
25178  * @user_data: (closure): the data to pass to callback function
25179  *
25180  * Request an asynchronous skip of @count bytes from the stream.
25181  * When the operation is finished @callback will be called.
25182  * You can then call g_input_stream_skip_finish() to get the result
25183  * of the operation.
25184  * During an async request no other sync and async calls are allowed,
25185  * and will result in %G_IO_ERROR_PENDING errors.
25186  * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
25187  * On success, the number of bytes skipped will be passed to the callback.
25188  * It is not an error if this is not the same as the requested size, as it
25189  * can happen e.g. near the end of a file, but generally we try to skip
25190  * as many bytes as requested. Zero is returned on end of file
25191  * (or if @count is zero), but never otherwise.
25192  * Any outstanding i/o request with higher priority (lower numerical value)
25193  * will be executed before an outstanding request with lower priority.
25194  * Default priority is %G_PRIORITY_DEFAULT.
25195  * The asynchronous methods have a default fallback that uses threads to
25196  * implement asynchronicity, so they are optional for inheriting classes.
25197  * However, if you override one, you must override all.
25198  */
25199
25200
25201 /**
25202  * g_input_stream_skip_finish:
25203  * @stream: a #GInputStream.
25204  * @result: a #GAsyncResult.
25205  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25206  *
25207  * Finishes a stream skip operation.
25208  *
25209  * Returns: the size of the bytes skipped, or %-1 on error.
25210  */
25211
25212
25213 /**
25214  * g_io_error_from_errno:
25215  * @err_no: Error number as defined in errno.h.
25216  *
25217  * Converts errno.h error codes into GIO error codes.
25218  *
25219  * Returns: #GIOErrorEnum value for the given errno.h error number.
25220  */
25221
25222
25223 /**
25224  * g_io_error_from_win32_error:
25225  * @error_code: Windows error number.
25226  *
25227  * Converts some common error codes into GIO error codes. The
25228  * fallback value G_IO_ERROR_FAILED is returned for error codes not
25229  * handled.
25230  *
25231  * Returns: #GIOErrorEnum value for the given error number.
25232  * Since: 2.26
25233  */
25234
25235
25236 /**
25237  * g_io_error_quark:
25238  *
25239  * Gets the GIO Error Quark.
25240  *
25241  * Returns: a #GQuark.
25242  */
25243
25244
25245 /**
25246  * g_io_extension_get_name:
25247  * @extension: a #GIOExtension
25248  *
25249  * Gets the name under which @extension was registered.
25250  * Note that the same type may be registered as extension
25251  * for multiple extension points, under different names.
25252  *
25253  * Returns: the name of @extension.
25254  */
25255
25256
25257 /**
25258  * g_io_extension_get_priority:
25259  * @extension: a #GIOExtension
25260  *
25261  * Gets the priority with which @extension was registered.
25262  *
25263  * Returns: the priority of @extension
25264  */
25265
25266
25267 /**
25268  * g_io_extension_get_type:
25269  * @extension: a #GIOExtension
25270  *
25271  * Gets the type associated with @extension.
25272  *
25273  * Returns: the type of @extension
25274  */
25275
25276
25277 /**
25278  * g_io_extension_point_get_extension_by_name:
25279  * @extension_point: a #GIOExtensionPoint
25280  * @name: the name of the extension to get
25281  *
25282  * Finds a #GIOExtension for an extension point by name.
25283  * given name, or %NULL if there is no extension with that name
25284  *
25285  * Returns: (transfer none): the #GIOExtension for @extension_point that has the
25286  */
25287
25288
25289 /**
25290  * g_io_extension_point_get_extensions:
25291  * @extension_point: a #GIOExtensionPoint
25292  *
25293  * Gets a list of all extensions that implement this extension point.
25294  * The list is sorted by priority, beginning with the highest priority.
25295  * #GIOExtension<!-- -->s. The list is owned by GIO and should not be
25296  * modified.
25297  *
25298  * Returns: (element-type GIOExtension) (transfer none): a #GList of
25299  */
25300
25301
25302 /**
25303  * g_io_extension_point_get_required_type:
25304  * @extension_point: a #GIOExtensionPoint
25305  *
25306  * Gets the required type for @extension_point.
25307  * or #G_TYPE_INVALID if the extension point has no required type
25308  *
25309  * Returns: the #GType that all implementations must have,
25310  */
25311
25312
25313 /**
25314  * g_io_extension_point_implement:
25315  * @extension_point_name: the name of the extension point
25316  * @type: the #GType to register as extension
25317  * @extension_name: the name for the extension
25318  * @priority: the priority for the extension
25319  *
25320  * Registers @type as extension for the extension point with name
25321  * If @type has already been registered as an extension for this
25322  * extension point, the existing #GIOExtension object is returned.
25323  *
25324  * Returns: a #GIOExtension object for #GType
25325  */
25326
25327
25328 /**
25329  * g_io_extension_point_lookup:
25330  * @name: the name of the extension point
25331  *
25332  * Looks up an existing extension point.
25333  * registered extension point with the given name
25334  *
25335  * Returns: the #GIOExtensionPoint, or %NULL if there is no
25336  */
25337
25338
25339 /**
25340  * g_io_extension_point_register:
25341  * @name: The name of the extension point
25342  *
25343  * Registers an extension point.
25344  * and should not be freed
25345  *
25346  * Returns: the new #GIOExtensionPoint. This object is owned by GIO
25347  */
25348
25349
25350 /**
25351  * g_io_extension_point_set_required_type:
25352  * @extension_point: a #GIOExtensionPoint
25353  * @type: the #GType to require
25354  *
25355  * Sets the required type for @extension_point to @type.
25356  * All implementations must henceforth have this type.
25357  */
25358
25359
25360 /**
25361  * g_io_extension_ref_class:
25362  * @extension: a #GIOExtension
25363  *
25364  * Gets a reference to the class for the type that is
25365  * associated with @extension.
25366  *
25367  * Returns: (transfer full): the #GTypeClass for the type of @extension
25368  */
25369
25370
25371 /**
25372  * g_io_module_load:
25373  * @module: a #GIOModule.
25374  *
25375  * Required API for GIO modules to implement.
25376  * This function is ran after the module has been loaded into GIO,
25377  * to initialize the module.
25378  */
25379
25380
25381 /**
25382  * g_io_module_new:
25383  * @filename: filename of the shared library module.
25384  *
25385  * Creates a new GIOModule that will load the specific
25386  * shared library when in use.
25387  * or %NULL on error.
25388  *
25389  * Returns: a #GIOModule from given @filename,
25390  */
25391
25392
25393 /**
25394  * g_io_module_query:
25395  *
25396  * Optional API for GIO modules to implement.
25397  * Should return a list of all the extension points that may be
25398  * implemented in this module.
25399  * This method will not be called in normal use, however it may be
25400  * called when probing existing modules and recording which extension
25401  * points that this modle is used for. This means we won't have to
25402  * load and initialze this module unless its needed.
25403  * If this function is not implemented by the module the module will
25404  * always be loaded, initialized and then unloaded on application startup
25405  * so that it can register its extension points during init.
25406  * Note that a module need not actually implement all the extension points
25407  * that g_io_module_query returns, since the exact list of extension may
25408  * depend on runtime issues. However all extension points actually implemented
25409  * must be returned by g_io_module_query() (if defined).
25410  * When installing a module that implements g_io_module_query you must
25411  * run gio-querymodules in order to build the cache files required for
25412  * lazy loading.
25413  * extension points of the module. The array must be suitable for
25414  * freeing with g_strfreev().
25415  *
25416  * Returns: (transfer full): A %NULL-terminated array of strings, listing the supported
25417  * Since: 2.24
25418  */
25419
25420
25421 /**
25422  * g_io_module_unload:
25423  * @module: a #GIOModule.
25424  *
25425  * Required API for GIO modules to implement.
25426  * This function is ran when the module is being unloaded from GIO,
25427  * to finalize the module.
25428  */
25429
25430
25431 /**
25432  * g_io_modules_load_all_in_directory:
25433  * @dirname: pathname for a directory containing modules to load.
25434  *
25435  * Loads all the modules in the specified directory.
25436  * If don't require all modules to be initialized (and thus registering
25437  * all gtypes) then you can use g_io_modules_scan_all_in_directory()
25438  * which allows delayed/lazy loading of modules.
25439  * from the directory,
25440  * All the modules are loaded into memory, if you want to
25441  * unload them (enabling on-demand loading) you must call
25442  * g_type_module_unuse() on all the modules. Free the list
25443  * with g_list_free().
25444  *
25445  * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded
25446  */
25447
25448
25449 /**
25450  * g_io_modules_scan_all_in_directory:
25451  * @dirname: pathname for a directory containing modules to scan.
25452  *
25453  * Scans all the modules in the specified directory, ensuring that
25454  * any extension point implemented by a module is registered.
25455  * This may not actually load and initialize all the types in each
25456  * module, some modules may be lazily loaded and initialized when
25457  * an extension point it implementes is used with e.g.
25458  * g_io_extension_point_get_extensions() or
25459  * g_io_extension_point_get_extension_by_name().
25460  * If you need to guarantee that all types are loaded in all the modules,
25461  * use g_io_modules_load_all_in_directory().
25462  *
25463  * Since: 2.24
25464  */
25465
25466
25467 /**
25468  * g_io_scheduler_cancel_all_jobs:
25469  *
25470  * Cancels all cancellable I/O jobs.
25471  * A job is cancellable if a #GCancellable was passed into
25472  * g_io_scheduler_push_job().
25473  */
25474
25475
25476 /**
25477  * g_io_scheduler_job_send_to_mainloop:
25478  * @job: a #GIOSchedulerJob
25479  * @func: a #GSourceFunc callback that will be called in the original thread
25480  * @user_data: data to pass to @func
25481  * @notify: a #GDestroyNotify for @user_data, or %NULL
25482  *
25483  * Used from an I/O job to send a callback to be run in the thread
25484  * that the job was started from, waiting for the result (and thus
25485  * blocking the I/O job).
25486  *
25487  * Returns: The return value of @func
25488  */
25489
25490
25491 /**
25492  * g_io_scheduler_job_send_to_mainloop_async:
25493  * @job: a #GIOSchedulerJob
25494  * @func: a #GSourceFunc callback that will be called in the original thread
25495  * @user_data: data to pass to @func
25496  * @notify: a #GDestroyNotify for @user_data, or %NULL
25497  *
25498  * Used from an I/O job to send a callback to be run asynchronously in
25499  * the thread that the job was started from. The callback will be run
25500  * when the main loop is available, but at that time the I/O job might
25501  * have finished. The return value from the callback is ignored.
25502  * Note that if you are passing the @user_data from g_io_scheduler_push_job()
25503  * on to this function you have to ensure that it is not freed before
25504  * g_io_scheduler_push_job() or by using refcounting for @user_data.
25505  */
25506
25507
25508 /**
25509  * g_io_scheduler_push_job:
25510  * @job_func: a #GIOSchedulerJobFunc.
25511  * @user_data: data to pass to @job_func
25512  * @notify: a #GDestroyNotify for @user_data, or %NULL
25513  * @io_priority: the <link linkend="gioscheduler">I/O priority</link> of the request.
25514  * @cancellable: optional #GCancellable object, %NULL to ignore.
25515  *
25516  * Schedules the I/O job to run.
25517  * regardless whether the job was cancelled or has run to completion.
25518  * If @cancellable is not %NULL, it can be used to cancel the I/O job
25519  * by calling g_cancellable_cancel() or by calling
25520  * g_io_scheduler_cancel_all_jobs().
25521  */
25522
25523
25524 /**
25525  * g_io_stream_clear_pending:
25526  * @stream: a #GIOStream
25527  *
25528  * Clears the pending flag on @stream.
25529  *
25530  * Since: 2.22
25531  */
25532
25533
25534 /**
25535  * g_io_stream_close:
25536  * @stream: a #GIOStream
25537  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
25538  * @error: location to store the error occuring, or %NULL to ignore
25539  *
25540  * Closes the stream, releasing resources related to it. This will also
25541  * closes the individual input and output streams, if they are not already
25542  * closed.
25543  * Once the stream is closed, all other operations will return
25544  * %G_IO_ERROR_CLOSED. Closing a stream multiple times will not
25545  * return an error.
25546  * Closing a stream will automatically flush any outstanding buffers
25547  * in the stream.
25548  * Streams will be automatically closed when the last reference
25549  * is dropped, but you might want to call this function to make sure
25550  * resources are released as early as possible.
25551  * Some streams might keep the backing store of the stream (e.g. a file
25552  * descriptor) open after the stream is closed. See the documentation for
25553  * the individual stream for details.
25554  * On failure the first error that happened will be reported, but the
25555  * close operation will finish as much as possible. A stream that failed
25556  * to close will still return %G_IO_ERROR_CLOSED for all operations.
25557  * Still, it is important to check and report the error to the user,
25558  * otherwise there might be a loss of data as all data might not be written.
25559  * If @cancellable is not NULL, then the operation can be cancelled by
25560  * triggering the cancellable object from another thread. If the operation
25561  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25562  * Cancelling a close will still leave the stream closed, but some streams
25563  * can use a faster close that doesn't block to e.g. check errors.
25564  * The default implementation of this method just calls close on the
25565  * individual input/output streams.
25566  *
25567  * Returns: %TRUE on success, %FALSE on failure
25568  * Since: 2.22
25569  */
25570
25571
25572 /**
25573  * g_io_stream_close_async:
25574  * @stream: a #GIOStream
25575  * @io_priority: the io priority of the request
25576  * @cancellable: (allow-none): optional cancellable object
25577  * @callback: (scope async): callback to call when the request is satisfied
25578  * @user_data: (closure): the data to pass to callback function
25579  *
25580  * Requests an asynchronous close of the stream, releasing resources
25581  * related to it. When the operation is finished @callback will be
25582  * called. You can then call g_io_stream_close_finish() to get
25583  * the result of the operation.
25584  * For behaviour details see g_io_stream_close().
25585  * The asynchronous methods have a default fallback that uses threads
25586  * to implement asynchronicity, so they are optional for inheriting
25587  * classes. However, if you override one you must override all.
25588  *
25589  * Since: 2.22
25590  */
25591
25592
25593 /**
25594  * g_io_stream_close_finish:
25595  * @stream: a #GIOStream
25596  * @result: a #GAsyncResult
25597  * @error: a #GError location to store the error occuring, or %NULL to ignore
25598  *
25599  * Closes a stream.
25600  *
25601  * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
25602  * Since: 2.22
25603  */
25604
25605
25606 /**
25607  * g_io_stream_get_input_stream:
25608  * @stream: a #GIOStream
25609  *
25610  * Gets the input stream for this object. This is used
25611  * for reading.
25612  * Do not free.
25613  *
25614  * Returns: (transfer none): a #GInputStream, owned by the #GIOStream.
25615  * Since: 2.22
25616  */
25617
25618
25619 /**
25620  * g_io_stream_get_output_stream:
25621  * @stream: a #GIOStream
25622  *
25623  * Gets the output stream for this object. This is used for
25624  * writing.
25625  * Do not free.
25626  *
25627  * Returns: (transfer none): a #GOutputStream, owned by the #GIOStream.
25628  * Since: 2.22
25629  */
25630
25631
25632 /**
25633  * g_io_stream_has_pending:
25634  * @stream: a #GIOStream
25635  *
25636  * Checks if a stream has pending actions.
25637  *
25638  * Returns: %TRUE if @stream has pending actions.
25639  * Since: 2.22
25640  */
25641
25642
25643 /**
25644  * g_io_stream_is_closed:
25645  * @stream: a #GIOStream
25646  *
25647  * Checks if a stream is closed.
25648  *
25649  * Returns: %TRUE if the stream is closed.
25650  * Since: 2.22
25651  */
25652
25653
25654 /**
25655  * g_io_stream_set_pending:
25656  * @stream: a #GIOStream
25657  * @error: a #GError location to store the error occuring, or %NULL to ignore
25658  *
25659  * Sets @stream to have actions pending. If the pending flag is
25660  * already set or @stream is closed, it will return %FALSE and set
25661  *
25662  * Returns: %TRUE if pending was previously unset and is now set.
25663  * Since: 2.22
25664  */
25665
25666
25667 /**
25668  * g_io_stream_splice_async:
25669  * @stream1: a #GIOStream.
25670  * @stream2: a #GIOStream.
25671  * @flags: a set of #GIOStreamSpliceFlags.
25672  * @io_priority: the io priority of the request.
25673  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25674  * @callback: (scope async): a #GAsyncReadyCallback.
25675  * @user_data: (closure): user data passed to @callback.
25676  *
25677  * Asyncronously splice the output stream of @stream1 to the input stream of
25678  * When the operation is finished @callback will be called.
25679  * You can then call g_io_stream_splice_finish() to get the
25680  * result of the operation.
25681  *
25682  * Since: 2.28
25683  */
25684
25685
25686 /**
25687  * g_io_stream_splice_finish:
25688  * @result: a #GAsyncResult.
25689  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25690  *
25691  * Finishes an asynchronous io stream splice operation.
25692  *
25693  * Returns: %TRUE on success, %FALSE otherwise.
25694  * Since: 2.28
25695  */
25696
25697
25698 /**
25699  * g_keyfile_settings_backend_new:
25700  * @filename: the filename of the keyfile
25701  * @root_path: the path under which all settings keys appear
25702  * @root_group: (allow-none): the group name corresponding to
25703  * @returns: (transfer full): a keyfile-backed #GSettingsBackend
25704  *
25705  * Creates a keyfile-backed #GSettingsBackend.
25706  * The filename of the keyfile to use is given by @filename.
25707  * All settings read to or written from the backend must fall under the
25708  * path given in @root_path (which must start and end with a slash and
25709  * not contain two consecutive slashes).  @root_path may be "/".
25710  * If @root_group is non-%NULL then it specifies the name of the keyfile
25711  * group used for keys that are written directly below @root_path.  For
25712  * example, if @root_path is "/apps/example/" and @root_group is
25713  * "toplevel", then settings the key "/apps/example/enabled" to a value
25714  * of %TRUE will cause the following to appear in the keyfile:
25715  * |[
25716  * [toplevel]
25717  * enabled=true
25718  * ]|
25719  * If @root_group is %NULL then it is not permitted to store keys
25720  * directly below the @root_path.
25721  * the name of the subpath (with the final slash stripped) is used as
25722  * the name of the keyfile group.  To continue the example, if
25723  * "/apps/example/profiles/default/font-size" were set to
25724  * 12 then the following would appear in the keyfile:
25725  * |[
25726  * [profiles/default]
25727  * font-size=12
25728  * ]|
25729  * The backend will refuse writes (and return writability as being
25730  * %FALSE) for keys outside of @root_path and, in the event that
25731  * Writes will also be refused if the backend detects that it has the
25732  * writable).
25733  * There is no checking done for your key namespace clashing with the
25734  * syntax of the key file format.  For example, if you have '[' or ']'
25735  * characters in your path names or '=' in your key names you may be in
25736  * trouble.
25737  *
25738  * For keys not stored directly below @root_path (ie: in a sub-path),
25739  * Inability to rewrite the keyfile (ie: the containing directory is not
25740  */
25741
25742
25743 /**
25744  * g_loadable_icon_load:
25745  * @icon: a #GLoadableIcon.
25746  * @size: an integer.
25747  * @type: (out) (allow-none): a location to store the type of the loaded icon, %NULL to ignore.
25748  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25749  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25750  *
25751  * Loads a loadable icon. For the asynchronous version of this function,
25752  * see g_loadable_icon_load_async().
25753  *
25754  * Returns: (transfer full): a #GInputStream to read the icon from.
25755  */
25756
25757
25758 /**
25759  * g_loadable_icon_load_async:
25760  * @icon: a #GLoadableIcon.
25761  * @size: an integer.
25762  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25763  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25764  * @user_data: (closure): the data to pass to callback function
25765  *
25766  * Loads an icon asynchronously. To finish this function, see
25767  * g_loadable_icon_load_finish(). For the synchronous, blocking
25768  * version of this function, see g_loadable_icon_load().
25769  */
25770
25771
25772 /**
25773  * g_loadable_icon_load_finish:
25774  * @icon: a #GLoadableIcon.
25775  * @res: a #GAsyncResult.
25776  * @type: a location to store the type of the loaded icon, %NULL to ignore.
25777  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25778  *
25779  * Finishes an asynchronous icon load started in g_loadable_icon_load_async().
25780  *
25781  * Returns: (transfer full): a #GInputStream to read the icon from.
25782  */
25783
25784
25785 /**
25786  * g_local_vfs_new:
25787  *
25788  * Returns a new #GVfs handle for a local vfs.
25789  *
25790  * Returns: a new #GVfs handle.
25791  */
25792
25793
25794 /**
25795  * g_main_destroy:
25796  * @loop: a #GMainLoop
25797  *
25798  * Frees the memory allocated for the #GMainLoop.
25799  *
25800  * Deprecated: 2.2: Use g_main_loop_unref() instead
25801  */
25802
25803
25804 /**
25805  * g_main_is_running:
25806  * @loop: a #GMainLoop
25807  *
25808  * Checks if the main loop is running.
25809  *
25810  * Returns: %TRUE if the main loop is running
25811  * Deprecated: 2.2: Use g_main_loop_is_running() instead
25812  */
25813
25814
25815 /**
25816  * g_main_iteration:
25817  * @may_block: set to %TRUE if it should block (i.e. wait) until an event source becomes ready. It will return after an event source has been processed. If set to %FALSE it will return immediately if no event source is ready to be processed.
25818  *
25819  * Runs a single iteration for the default #GMainContext.
25820  *
25821  * Returns: %TRUE if more events are pending.
25822  * Deprecated: 2.2: Use g_main_context_iteration() instead.
25823  */
25824
25825
25826 /**
25827  * g_main_new:
25828  * @is_running: set to %TRUE to indicate that the loop is running. This is not very important since calling g_main_run() will set this to %TRUE anyway.
25829  *
25830  * Creates a new #GMainLoop for th default main context.
25831  *
25832  * Returns: a new #GMainLoop
25833  * Deprecated: 2.2: Use g_main_loop_new() instead
25834  */
25835
25836
25837 /**
25838  * g_main_pending:
25839  *
25840  * Checks if any events are pending for the default #GMainContext
25841  * (i.e. ready to be processed).
25842  *
25843  * Returns: %TRUE if any events are pending.
25844  * Deprected: 2.2: Use g_main_context_pending() instead.
25845  */
25846
25847
25848 /**
25849  * g_main_quit:
25850  * @loop: a #GMainLoop
25851  *
25852  * Stops the #GMainLoop.
25853  * If g_main_run() was called to run the #GMainLoop, it will now return.
25854  *
25855  * Deprecated: 2.2: Use g_main_loop_quit() instead
25856  */
25857
25858
25859 /**
25860  * g_main_run:
25861  * @loop: a #GMainLoop
25862  *
25863  * Runs a main loop until it stops running.
25864  *
25865  * Deprecated: 2.2: Use g_main_loop_run() instead
25866  */
25867
25868
25869 /**
25870  * g_main_set_poll_func:
25871  * @func: the function to call to poll all file descriptors
25872  *
25873  * Sets the function to use for the handle polling of file descriptors
25874  * for the default main context.
25875  *
25876  * Deprecated: 2.2: Use g_main_context_set_poll_func() again
25877  */
25878
25879
25880 /**
25881  * g_memory_input_stream_add_data:
25882  * @stream: a #GMemoryInputStream
25883  * @data: (array length=len) (element-type guint8): input data
25884  * @len: length of the data, may be -1 if @data is a nul-terminated string
25885  * @destroy: (allow-none): function that is called to free @data, or %NULL
25886  *
25887  * Appends @data to data that can be read from the input stream
25888  */
25889
25890
25891 /**
25892  * g_memory_input_stream_new:
25893  *
25894  * Creates a new empty #GMemoryInputStream.
25895  *
25896  * Returns: a new #GInputStream
25897  */
25898
25899
25900 /**
25901  * g_memory_input_stream_new_from_data:
25902  * @data: (array length=len) (element-type guint8): input data
25903  * @len: length of the data, may be -1 if @data is a nul-terminated string
25904  * @destroy: (allow-none): function that is called to free @data, or %NULL
25905  *
25906  * Creates a new #GMemoryInputStream with data in memory of a given size.
25907  *
25908  * Returns: new #GInputStream read from @data of @len bytes.
25909  */
25910
25911
25912 /**
25913  * g_memory_output_stream_get_data:
25914  * @ostream: a #GMemoryOutputStream
25915  *
25916  * Gets any loaded data from the @ostream.
25917  * Note that the returned pointer may become invalid on the next
25918  * write or truncate operation on the stream.
25919  *
25920  * Returns: (transfer none): pointer to the stream's data
25921  */
25922
25923
25924 /**
25925  * g_memory_output_stream_get_data_size:
25926  * @ostream: a #GMemoryOutputStream
25927  *
25928  * Returns the number of bytes from the start up
25929  * to including the last byte written in the stream
25930  * that has not been truncated away.
25931  *
25932  * Returns: the number of bytes written to the stream
25933  * Since: 2.18
25934  */
25935
25936
25937 /**
25938  * g_memory_output_stream_get_size:
25939  * @ostream: a #GMemoryOutputStream
25940  *
25941  * Gets the size of the currently allocated data area (available from
25942  * g_memory_output_stream_get_data()). If the stream isn't
25943  * growable (no realloc was passed to g_memory_output_stream_new()) then
25944  * this is the maximum size of the stream and further writes
25945  * will return %G_IO_ERROR_NO_SPACE.
25946  * Note that for growable streams the returned size may become invalid on
25947  * the next write or truncate operation on the stream.
25948  * If you want the number of bytes currently written to the stream, use
25949  * g_memory_output_stream_get_data_size().
25950  *
25951  * Returns: the number of bytes allocated for the data buffer
25952  */
25953
25954
25955 /**
25956  * g_memory_output_stream_new: (skip)
25957  * @data: pointer to a chunk of memory to use, or %NULL
25958  * @size: the size of @data
25959  * @realloc_function: a function with realloc() semantics (like g_realloc()) to be called when @data needs to be grown, or %NULL
25960  * @destroy_function: a function to be called on @data when the stream is finalized, or %NULL
25961  *
25962  * Creates a new #GMemoryOutputStream.
25963  * If @data is non-%NULL, the stream  will use that for its internal storage.
25964  * If @realloc_fn is non-%NULL, it will be used for resizing the internal
25965  * storage when necessary. To construct a fixed-size output stream,
25966  * pass %NULL as @realloc_fn.
25967  * |[
25968  * /&ast; a stream that can grow &ast;/
25969  * stream = g_memory_output_stream_new (NULL, 0, realloc, free);
25970  * /&ast; another stream that can grow &ast;/
25971  * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
25972  * /&ast; a fixed-size stream &ast;/
25973  * data = malloc (200);
25974  * stream3 = g_memory_output_stream_new (data, 200, NULL, free);
25975  * ]|
25976  *
25977  * Returns: A newly created #GMemoryOutputStream object.
25978  */
25979
25980
25981 /**
25982  * g_memory_output_stream_steal_data:
25983  * @ostream: a #GMemoryOutputStream
25984  *
25985  * Gets any loaded data from the @ostream. Ownership of the data
25986  * is transferred to the caller; when no longer needed it must be
25987  * freed using the free function set in @ostream's
25988  * #GMemoryOutputStream:destroy-function property.
25989  *
25990  * Returns: (transfer full): the stream's data
25991  * Since: 2.26
25992  */
25993
25994
25995 /**
25996  * g_memory_settings_backend_new:
25997  *
25998  * Creates a memory-backed #GSettingsBackend.
25999  * This backend allows changes to settings, but does not write them
26000  * to any backing storage, so the next time you run your application,
26001  * the memory backend will start out with the default values again.
26002  *
26003  * Returns: (transfer full): a newly created #GSettingsBackend
26004  * Since: 2.28
26005  */
26006
26007
26008 /**
26009  * g_mount_can_eject:
26010  * @mount: a #GMount.
26011  *
26012  * Checks if @mount can be eject.
26013  *
26014  * Returns: %TRUE if the @mount can be ejected.
26015  */
26016
26017
26018 /**
26019  * g_mount_can_unmount:
26020  * @mount: a #GMount.
26021  *
26022  * Checks if @mount can be mounted.
26023  *
26024  * Returns: %TRUE if the @mount can be unmounted.
26025  */
26026
26027
26028 /**
26029  * g_mount_eject:
26030  * @mount: a #GMount.
26031  * @flags: flags affecting the unmount if required for eject
26032  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26033  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
26034  * @user_data: user data passed to @callback.
26035  *
26036  * Ejects a mount. This is an asynchronous operation, and is
26037  * finished by calling g_mount_eject_finish() with the @mount
26038  * and #GAsyncResult data returned in the @callback.
26039  *
26040  * Deprecated: 2.22: Use g_mount_eject_with_operation() instead.
26041  */
26042
26043
26044 /**
26045  * g_mount_eject_finish:
26046  * @mount: a #GMount.
26047  * @result: a #GAsyncResult.
26048  * @error: a #GError location to store the error occuring, or %NULL to ignore.
26049  *
26050  * Finishes ejecting a mount. If any errors occurred during the operation,
26051  *
26052  * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
26053  * Deprecated: 2.22: Use g_mount_eject_with_operation_finish() instead.
26054  */
26055
26056
26057 /**
26058  * g_mount_eject_with_operation:
26059  * @mount: a #GMount.
26060  * @flags: flags affecting the unmount if required for eject
26061  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
26062  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26063  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
26064  * @user_data: user data passed to @callback.
26065  *
26066  * Ejects a mount. This is an asynchronous operation, and is
26067  * finished by calling g_mount_eject_with_operation_finish() with the @mount
26068  * and #GAsyncResult data returned in the @callback.
26069  *
26070  * Since: 2.22
26071  */
26072
26073
26074 /**
26075  * g_mount_eject_with_operation_finish:
26076  * @mount: a #GMount.
26077  * @result: a #GAsyncResult.
26078  * @error: a #GError location to store the error occuring, or %NULL to ignore.
26079  *
26080  * Finishes ejecting a mount. If any errors occurred during the operation,
26081  *
26082  * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
26083  * Since: 2.22
26084  */
26085
26086
26087 /**
26088  * g_mount_get_default_location:
26089  * @mount: a #GMount.
26090  *
26091  * Gets the default location of @mount. The default location of the given
26092  * the home directory, or the root of the volume).
26093  * The returned object should be unreffed with
26094  * g_object_unref() when no longer needed.
26095  *
26096  * Returns: (transfer full): a #GFile.
26097  */
26098
26099
26100 /**
26101  * g_mount_get_drive:
26102  * @mount: a #GMount.
26103  *
26104  * Gets the drive for the @mount.
26105  * This is a convenience method for getting the #GVolume and then
26106  * using that object to get the #GDrive.
26107  * The returned object should be unreffed with
26108  * g_object_unref() when no longer needed.
26109  *
26110  * Returns: (transfer full): a #GDrive or %NULL if @mount is not associated with a volume or a drive.
26111  */
26112
26113
26114 /**
26115  * g_mount_get_icon:
26116  * @mount: a #GMount.
26117  *
26118  * Gets the icon for @mount.
26119  * The returned object should be unreffed with
26120  * g_object_unref() when no longer needed.
26121  *
26122  * Returns: (transfer full): a #GIcon.
26123  */
26124
26125
26126 /**
26127  * g_mount_get_name:
26128  * @mount: a #GMount.
26129  *
26130  * Gets the name of @mount.
26131  * The returned string should be freed with g_free()
26132  * when no longer needed.
26133  *
26134  * Returns: the name for the given @mount.
26135  */
26136
26137
26138 /**
26139  * g_mount_get_root:
26140  * @mount: a #GMount.
26141  *
26142  * Gets the root directory on @mount.
26143  * The returned object should be unreffed with
26144  * g_object_unref() when no longer needed.
26145  *
26146  * Returns: (transfer full): a #GFile.
26147  */
26148
26149
26150 /**
26151  * g_mount_get_uuid:
26152  * @mount: a #GMount.
26153  *
26154  * Gets the UUID for the @mount. The reference is typically based on
26155  * the file system UUID for the mount in question and should be
26156  * considered an opaque string. Returns %NULL if there is no UUID
26157  * available.
26158  * The returned string should be freed with g_free()
26159  * when no longer needed.
26160  *
26161  * Returns: the UUID for @mount or %NULL if no UUID can be computed.
26162  */
26163
26164
26165 /**
26166  * g_mount_get_volume:
26167  * @mount: a #GMount.
26168  *
26169  * Gets the volume for the @mount.
26170  * The returned object should be unreffed with
26171  * g_object_unref() when no longer needed.
26172  *
26173  * Returns: (transfer full): a #GVolume or %NULL if @mount is not associated with a volume.
26174  */
26175
26176
26177 /**
26178  * g_mount_guess_content_type:
26179  * @mount: a #GMount
26180  * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
26181  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
26182  * @callback: a #GAsyncReadyCallback
26183  * @user_data: user data passed to @callback
26184  *
26185  * Tries to guess the type of content stored on @mount. Returns one or
26186  * more textual identifiers of well-known content types (typically
26187  * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
26188  * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
26189  * specification for more on x-content types.
26190  * This is an asynchronous operation (see
26191  * g_mount_guess_content_type_sync() for the synchronous version), and
26192  * is finished by calling g_mount_guess_content_type_finish() with the
26193  *
26194  * Since: 2.18
26195  */
26196
26197
26198 /**
26199  * g_mount_guess_content_type_finish:
26200  * @mount: a #GMount
26201  * @result: a #GAsyncResult
26202  * @error: a #GError location to store the error occuring, or %NULL to ignore
26203  *
26204  * Finishes guessing content types of @mount. If any errors occured
26205  * during the operation, @error will be set to contain the errors and
26206  * %FALSE will be returned. In particular, you may get an
26207  * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
26208  * guessing.
26209  * Caller should free this array with g_strfreev() when done with it.
26210  *
26211  * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
26212  * Since: 2.18
26213  */
26214
26215
26216 /**
26217  * g_mount_guess_content_type_sync:
26218  * @mount: a #GMount
26219  * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
26220  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
26221  * @error: a #GError location to store the error occuring, or %NULL to ignore
26222  *
26223  * Tries to guess the type of content stored on @mount. Returns one or
26224  * more textual identifiers of well-known content types (typically
26225  * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
26226  * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
26227  * specification for more on x-content types.
26228  * This is an synchronous operation and as such may block doing IO;
26229  * see g_mount_guess_content_type() for the asynchronous version.
26230  * Caller should free this array with g_strfreev() when done with it.
26231  *
26232  * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
26233  * Since: 2.18
26234  */
26235
26236
26237 /**
26238  * g_mount_is_shadowed:
26239  * @mount: A #GMount.
26240  *
26241  * Determines if @mount is shadowed. Applications or libraries should
26242  * avoid displaying @mount in the user interface if it is shadowed.
26243  * A mount is said to be shadowed if there exists one or more user
26244  * visible objects (currently #GMount objects) with a root that is
26245  * inside the root of @mount.
26246  * One application of shadow mounts is when exposing a single file
26247  * system that is used to address several logical volumes. In this
26248  * situation, a #GVolumeMonitor implementation would create two
26249  * #GVolume objects (for example, one for the camera functionality of
26250  * the device and one for a SD card reader on the device) with
26251  * activation URIs <literal>gphoto2://[usb:001,002]/store1/</literal>
26252  * and <literal>gphoto2://[usb:001,002]/store2/</literal>. When the
26253  * underlying mount (with root
26254  * <literal>gphoto2://[usb:001,002]/</literal>) is mounted, said
26255  * #GVolumeMonitor implementation would create two #GMount objects
26256  * (each with their root matching the corresponding volume activation
26257  * root) that would shadow the original mount.
26258  * The proxy monitor in GVfs 2.26 and later, automatically creates and
26259  * manage shadow mounts (and shadows the underlying mount) if the
26260  * activation root on a #GVolume is set.
26261  *
26262  * Returns: %TRUE if @mount is shadowed.
26263  * Since: 2.20
26264  */
26265
26266
26267 /**
26268  * g_mount_operation_get_anonymous:
26269  * @op: a #GMountOperation.
26270  *
26271  * Check to see whether the mount operation is being used
26272  * for an anonymous user.
26273  *
26274  * Returns: %TRUE if mount operation is anonymous.
26275  */
26276
26277
26278 /**
26279  * g_mount_operation_get_choice:
26280  * @op: a #GMountOperation.
26281  *
26282  * Gets a choice from the mount operation.
26283  * the choice's list, or %0.
26284  *
26285  * Returns: an integer containing an index of the user's choice from
26286  */
26287
26288
26289 /**
26290  * g_mount_operation_get_domain:
26291  * @op: a #GMountOperation.
26292  *
26293  * Gets the domain of the mount operation.
26294  *
26295  * Returns: a string set to the domain.
26296  */
26297
26298
26299 /**
26300  * g_mount_operation_get_password:
26301  * @op: a #GMountOperation.
26302  *
26303  * Gets a password from the mount operation.
26304  *
26305  * Returns: a string containing the password within @op.
26306  */
26307
26308
26309 /**
26310  * g_mount_operation_get_password_save:
26311  * @op: a #GMountOperation.
26312  *
26313  * Gets the state of saving passwords for the mount operation.
26314  *
26315  * Returns: a #GPasswordSave flag.
26316  */
26317
26318
26319 /**
26320  * g_mount_operation_get_username:
26321  * @op: a #GMountOperation.
26322  *
26323  * Get the user name from the mount operation.
26324  *
26325  * Returns: a string containing the user name.
26326  */
26327
26328
26329 /**
26330  * g_mount_operation_new:
26331  *
26332  * Creates a new mount operation.
26333  *
26334  * Returns: a #GMountOperation.
26335  */
26336
26337
26338 /**
26339  * g_mount_operation_reply:
26340  * @op: a #GMountOperation
26341  * @result: a #GMountOperationResult
26342  *
26343  * Emits the #GMountOperation::reply signal.
26344  */
26345
26346
26347 /**
26348  * g_mount_operation_set_anonymous:
26349  * @op: a #GMountOperation.
26350  * @anonymous: boolean value.
26351  *
26352  * Sets the mount operation to use an anonymous user if @anonymous is %TRUE.
26353  */
26354
26355
26356 /**
26357  * g_mount_operation_set_choice:
26358  * @op: a #GMountOperation.
26359  * @choice: an integer.
26360  *
26361  * Sets a default choice for the mount operation.
26362  */
26363
26364
26365 /**
26366  * g_mount_operation_set_domain:
26367  * @op: a #GMountOperation.
26368  * @domain: the domain to set.
26369  *
26370  * Sets the mount operation's domain.
26371  */
26372
26373
26374 /**
26375  * g_mount_operation_set_password:
26376  * @op: a #GMountOperation.
26377  * @password: password to set.
26378  *
26379  * Sets the mount operation's password to @password.
26380  */
26381
26382
26383 /**
26384  * g_mount_operation_set_password_save:
26385  * @op: a #GMountOperation.
26386  * @save: a set of #GPasswordSave flags.
26387  *
26388  * Sets the state of saving passwords for the mount operation.
26389  */
26390
26391
26392 /**
26393  * g_mount_operation_set_username:
26394  * @op: a #GMountOperation.
26395  * @username: input username.
26396  *
26397  * Sets the user name within @op to @username.
26398  */
26399
26400
26401 /**
26402  * g_mount_remount:
26403  * @mount: a #GMount.
26404  * @flags: flags affecting the operation
26405  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
26406  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26407  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
26408  * @user_data: user data passed to @callback.
26409  *
26410  * Remounts a mount. This is an asynchronous operation, and is
26411  * finished by calling g_mount_remount_finish() with the @mount
26412  * and #GAsyncResults data returned in the @callback.
26413  * Remounting is useful when some setting affecting the operation
26414  * of the volume has been changed, as these may need a remount to
26415  * take affect. While this is semantically equivalent with unmounting
26416  * and then remounting not all backends might need to actually be
26417  * unmounted.
26418  */
26419
26420
26421 /**
26422  * g_mount_remount_finish:
26423  * @mount: a #GMount.
26424  * @result: a #GAsyncResult.
26425  * @error: a #GError location to store the error occuring, or %NULL to ignore.
26426  *
26427  * Finishes remounting a mount. If any errors occurred during the operation,
26428  *
26429  * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise.
26430  */
26431
26432
26433 /**
26434  * g_mount_shadow:
26435  * @mount: A #GMount.
26436  *
26437  * Increments the shadow count on @mount. Usually used by
26438  * #GVolumeMonitor implementations when creating a shadow mount for
26439  * will need to emit the #GMount::changed signal on @mount manually.
26440  *
26441  * Since: 2.20
26442  */
26443
26444
26445 /**
26446  * g_mount_unmount:
26447  * @mount: a #GMount.
26448  * @flags: flags affecting the operation
26449  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26450  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
26451  * @user_data: user data passed to @callback.
26452  *
26453  * Unmounts a mount. This is an asynchronous operation, and is
26454  * finished by calling g_mount_unmount_finish() with the @mount
26455  * and #GAsyncResult data returned in the @callback.
26456  *
26457  * Deprecated: 2.22: Use g_mount_unmount_with_operation() instead.
26458  */
26459
26460
26461 /**
26462  * g_mount_unmount_finish:
26463  * @mount: a #GMount.
26464  * @result: a #GAsyncResult.
26465  * @error: a #GError location to store the error occuring, or %NULL to ignore.
26466  *
26467  * Finishes unmounting a mount. If any errors occurred during the operation,
26468  *
26469  * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
26470  * Deprecated: 2.22: Use g_mount_unmount_with_operation_finish() instead.
26471  */
26472
26473
26474 /**
26475  * g_mount_unmount_with_operation:
26476  * @mount: a #GMount.
26477  * @flags: flags affecting the operation
26478  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
26479  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26480  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
26481  * @user_data: user data passed to @callback.
26482  *
26483  * Unmounts a mount. This is an asynchronous operation, and is
26484  * finished by calling g_mount_unmount_with_operation_finish() with the @mount
26485  * and #GAsyncResult data returned in the @callback.
26486  *
26487  * Since: 2.22
26488  */
26489
26490
26491 /**
26492  * g_mount_unmount_with_operation_finish:
26493  * @mount: a #GMount.
26494  * @result: a #GAsyncResult.
26495  * @error: a #GError location to store the error occuring, or %NULL to ignore.
26496  *
26497  * Finishes unmounting a mount. If any errors occurred during the operation,
26498  *
26499  * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
26500  * Since: 2.22
26501  */
26502
26503
26504 /**
26505  * g_mount_unshadow:
26506  * @mount: A #GMount.
26507  *
26508  * Decrements the shadow count on @mount. Usually used by
26509  * #GVolumeMonitor implementations when destroying a shadow mount for
26510  * will need to emit the #GMount::changed signal on @mount manually.
26511  *
26512  * Since: 2.20
26513  */
26514
26515
26516 /**
26517  * g_network_address_get_hostname:
26518  * @addr: a #GNetworkAddress
26519  *
26520  * Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded,
26521  * depending on what @addr was created with.
26522  *
26523  * Returns: @addr's hostname
26524  * Since: 2.22
26525  */
26526
26527
26528 /**
26529  * g_network_address_get_port:
26530  * @addr: a #GNetworkAddress
26531  *
26532  * Gets @addr's port number
26533  *
26534  * Returns: @addr's port (which may be 0)
26535  * Since: 2.22
26536  */
26537
26538
26539 /**
26540  * g_network_address_get_scheme:
26541  * @addr: a #GNetworkAddress
26542  *
26543  * Gets @addr's scheme
26544  *
26545  * Returns: @addr's scheme (%NULL if not built from URI)
26546  * Since: 2.26
26547  */
26548
26549
26550 /**
26551  * g_network_address_new:
26552  * @hostname: the hostname
26553  * @port: the port
26554  *
26555  * Creates a new #GSocketConnectable for connecting to the given
26556  *
26557  * Returns: (transfer full): the new #GNetworkAddress
26558  * Since: 2.22
26559  */
26560
26561
26562 /**
26563  * g_network_address_parse:
26564  * @host_and_port: the hostname and optionally a port
26565  * @default_port: the default port if not in @host_and_port
26566  * @error: a pointer to a #GError, or %NULL
26567  *
26568  * Creates a new #GSocketConnectable for connecting to the given
26569  * parsing @host_and_port fails.
26570  * address, an IPv4 address, or a domain name (in which case a DNS
26571  * lookup is performed). Quoting with [] is supported for all address
26572  * types. A port override may be specified in the usual way with a
26573  * colon. Ports may be given as decimal numbers or symbolic names (in
26574  * which case an /etc/services lookup is performed).
26575  * If no port is specified in @host_and_port then @default_port will be
26576  * used as the port number to connect to.
26577  * In general, @host_and_port is expected to be provided by the user
26578  * (allowing them to give the hostname, and a port overide if necessary)
26579  * and @default_port is expected to be provided by the application.
26580  *
26581  * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
26582  * Since: 2.22
26583  */
26584
26585
26586 /**
26587  * g_network_address_parse_uri:
26588  * @uri: the hostname and optionally a port
26589  * @default_port: The default port if none is found in the URI
26590  * @error: a pointer to a #GError, or %NULL
26591  *
26592  * Creates a new #GSocketConnectable for connecting to the given
26593  * Using this rather than g_network_address_new() or
26594  * g_network_address_parse_host() allows #GSocketClient to determine
26595  * when to use application-specific proxy protocols.
26596  *
26597  * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
26598  * Since: 2.26
26599  */
26600
26601
26602 /**
26603  * g_network_service_get_domain:
26604  * @srv: a #GNetworkService
26605  *
26606  * Gets the domain that @srv serves. This might be either UTF-8 or
26607  * ASCII-encoded, depending on what @srv was created with.
26608  *
26609  * Returns: @srv's domain name
26610  * Since: 2.22
26611  */
26612
26613
26614 /**
26615  * g_network_service_get_protocol:
26616  * @srv: a #GNetworkService
26617  *
26618  * Gets @srv's protocol name (eg, "tcp").
26619  *
26620  * Returns: @srv's protocol name
26621  * Since: 2.22
26622  */
26623
26624
26625 /**
26626  * g_network_service_get_scheme:
26627  * @srv: a #GNetworkService
26628  *
26629  * Get's the URI scheme used to resolve proxies. By default, the service name
26630  * is used as scheme.
26631  *
26632  * Returns: @srv's scheme name
26633  * Since: 2.26
26634  */
26635
26636
26637 /**
26638  * g_network_service_get_service:
26639  * @srv: a #GNetworkService
26640  *
26641  * Gets @srv's service name (eg, "ldap").
26642  *
26643  * Returns: @srv's service name
26644  * Since: 2.22
26645  */
26646
26647
26648 /**
26649  * g_network_service_new:
26650  * @service: the service type to look up (eg, "ldap")
26651  * @protocol: the networking protocol to use for @service (eg, "tcp")
26652  * @domain: the DNS domain to look up the service in
26653  *
26654  * Creates a new #GNetworkService representing the given @service,
26655  * #GSocketConnectable interface to resolve it.
26656  *
26657  * Returns: (transfer full): a new #GNetworkService
26658  * Since: 2.22
26659  */
26660
26661
26662 /**
26663  * g_network_service_set_scheme:
26664  * @srv: a #GNetworkService
26665  * @scheme: a URI scheme
26666  *
26667  * Set's the URI scheme used to resolve proxies. By default, the service name
26668  * is used as scheme.
26669  *
26670  * Since: 2.26
26671  */
26672
26673
26674 /**
26675  * g_new:
26676  * @struct_type: the type of the elements to allocate
26677  * @n_structs: the number of elements to allocate
26678  *
26679  * Allocates @n_structs elements of type @struct_type.
26680  * The returned pointer is cast to a pointer to the given type.
26681  * If @n_structs is 0 it returns %NULL.
26682  * Care is taken to avoid overflow when calculating the size of the allocated block.
26683  * Since the returned pointer is already casted to the right type,
26684  * it is normally unnecessary to cast it explicitly, and doing
26685  * so might hide memory allocation errors.
26686  *
26687  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
26688  */
26689
26690
26691 /**
26692  * g_new0:
26693  * @struct_type: the type of the elements to allocate.
26694  * @n_structs: the number of elements to allocate.
26695  *
26696  * Allocates @n_structs elements of type @struct_type, initialized to 0's.
26697  * The returned pointer is cast to a pointer to the given type.
26698  * If @n_structs is 0 it returns %NULL.
26699  * Care is taken to avoid overflow when calculating the size of the allocated block.
26700  * Since the returned pointer is already casted to the right type,
26701  * it is normally unnecessary to cast it explicitly, and doing
26702  * so might hide memory allocation errors.
26703  *
26704  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
26705  */
26706
26707
26708 /**
26709  * g_newa:
26710  * @struct_type: Type of memory chunks to be allocated
26711  * @n_structs: Number of chunks to be allocated
26712  *
26713  * Wraps g_alloca() in a more typesafe manner.
26714  *
26715  * Returns: Pointer to stack space for @n_structs chunks of type @struct_type
26716  */
26717
26718
26719 /**
26720  * g_node_append:
26721  * @parent: the #GNode to place the new #GNode under
26722  * @node: the #GNode to insert
26723  *
26724  * Inserts a #GNode as the last child of the given parent.
26725  *
26726  * Returns: the inserted #GNode
26727  */
26728
26729
26730 /**
26731  * g_node_append_data:
26732  * @parent: the #GNode to place the new #GNode under
26733  * @data: the data for the new #GNode
26734  *
26735  * Inserts a new #GNode as the last child of the given parent.
26736  *
26737  * Returns: the new #GNode
26738  */
26739
26740
26741 /**
26742  * g_node_first_child:
26743  * @node: a #GNode
26744  *
26745  * Gets the first child of a #GNode.
26746  * or has no children
26747  *
26748  * Returns: the first child of @node, or %NULL if @node is %NULL
26749  */
26750
26751
26752 /**
26753  * g_node_insert_data:
26754  * @parent: the #GNode to place the new #GNode under
26755  * @position: the position to place the new #GNode at. If position is -1, the new #GNode is inserted as the last child of @parent
26756  * @data: the data for the new #GNode
26757  *
26758  * Inserts a new #GNode at the given position.
26759  *
26760  * Returns: the new #GNode
26761  */
26762
26763
26764 /**
26765  * g_node_insert_data_before:
26766  * @parent: the #GNode to place the new #GNode under
26767  * @sibling: the sibling #GNode to place the new #GNode before
26768  * @data: the data for the new #GNode
26769  *
26770  * Inserts a new #GNode before the given sibling.
26771  *
26772  * Returns: the new #GNode
26773  */
26774
26775
26776 /**
26777  * g_node_next_sibling:
26778  * @node: a #GNode
26779  *
26780  * Gets the next sibling of a #GNode.
26781  * or %NULL
26782  *
26783  * Returns: the next sibling of @node, or %NULL if @node is the last node
26784  */
26785
26786
26787 /**
26788  * g_node_prepend_data:
26789  * @parent: the #GNode to place the new #GNode under
26790  * @data: the data for the new #GNode
26791  *
26792  * Inserts a new #GNode as the first child of the given parent.
26793  *
26794  * Returns: the new #GNode
26795  */
26796
26797
26798 /**
26799  * g_node_prev_sibling:
26800  * @node: a #GNode
26801  *
26802  * Gets the previous sibling of a #GNode.
26803  * node or %NULL
26804  *
26805  * Returns: the previous sibling of @node, or %NULL if @node is the first
26806  */
26807
26808
26809 /**
26810  * g_null_settings_backend_new:
26811  *
26812  * Creates a readonly #GSettingsBackend.
26813  * This backend does not allow changes to settings, so all settings
26814  * will always have their default values.
26815  *
26816  * Returns: (transfer full): a newly created #GSettingsBackend
26817  * Since: 2.28
26818  */
26819
26820
26821 /**
26822  * g_output_stream_clear_pending:
26823  * @stream: output stream
26824  *
26825  * Clears the pending flag on @stream.
26826  */
26827
26828
26829 /**
26830  * g_output_stream_close:
26831  * @stream: A #GOutputStream.
26832  * @cancellable: (allow-none): optional cancellable object
26833  * @error: location to store the error occuring, or %NULL to ignore
26834  *
26835  * Closes the stream, releasing resources related to it.
26836  * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
26837  * Closing a stream multiple times will not return an error.
26838  * Closing a stream will automatically flush any outstanding buffers in the
26839  * stream.
26840  * Streams will be automatically closed when the last reference
26841  * is dropped, but you might want to call this function to make sure
26842  * resources are released as early as possible.
26843  * Some streams might keep the backing store of the stream (e.g. a file descriptor)
26844  * open after the stream is closed. See the documentation for the individual
26845  * stream for details.
26846  * On failure the first error that happened will be reported, but the close
26847  * operation will finish as much as possible. A stream that failed to
26848  * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
26849  * is important to check and report the error to the user, otherwise
26850  * there might be a loss of data as all data might not be written.
26851  * If @cancellable is not NULL, then the operation can be cancelled by
26852  * triggering the cancellable object from another thread. If the operation
26853  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26854  * Cancelling a close will still leave the stream closed, but there some streams
26855  * can use a faster close that doesn't block to e.g. check errors. On
26856  * cancellation (as with any error) there is no guarantee that all written
26857  * data will reach the target.
26858  *
26859  * Returns: %TRUE on success, %FALSE on failure
26860  */
26861
26862
26863 /**
26864  * g_output_stream_close_async:
26865  * @stream: A #GOutputStream.
26866  * @io_priority: the io priority of the request.
26867  * @cancellable: (allow-none): optional cancellable object
26868  * @callback: (scope async): callback to call when the request is satisfied
26869  * @user_data: (closure): the data to pass to callback function
26870  *
26871  * Requests an asynchronous close of the stream, releasing resources
26872  * related to it. When the operation is finished @callback will be
26873  * called. You can then call g_output_stream_close_finish() to get
26874  * the result of the operation.
26875  * For behaviour details see g_output_stream_close().
26876  * The asyncronous methods have a default fallback that uses threads
26877  * to implement asynchronicity, so they are optional for inheriting
26878  * classes. However, if you override one you must override all.
26879  */
26880
26881
26882 /**
26883  * g_output_stream_close_finish:
26884  * @stream: a #GOutputStream.
26885  * @result: a #GAsyncResult.
26886  * @error: a #GError location to store the error occuring, or %NULL to ignore.
26887  *
26888  * Closes an output stream.
26889  *
26890  * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
26891  */
26892
26893
26894 /**
26895  * g_output_stream_flush:
26896  * @stream: a #GOutputStream.
26897  * @cancellable: (allow-none): optional cancellable object
26898  * @error: location to store the error occuring, or %NULL to ignore
26899  *
26900  * Flushed any outstanding buffers in the stream. Will block during
26901  * the operation. Closing the stream will implicitly cause a flush.
26902  * This function is optional for inherited classes.
26903  * If @cancellable is not %NULL, then the operation can be cancelled by
26904  * triggering the cancellable object from another thread. If the operation
26905  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26906  *
26907  * Returns: %TRUE on success, %FALSE on error
26908  */
26909
26910
26911 /**
26912  * g_output_stream_flush_async:
26913  * @stream: a #GOutputStream.
26914  * @io_priority: the io priority of the request.
26915  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26916  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
26917  * @user_data: (closure): the data to pass to callback function
26918  *
26919  * Flushes a stream asynchronously.
26920  * For behaviour details see g_output_stream_flush().
26921  * When the operation is finished @callback will be
26922  * called. You can then call g_output_stream_flush_finish() to get the
26923  * result of the operation.
26924  */
26925
26926
26927 /**
26928  * g_output_stream_flush_finish:
26929  * @stream: a #GOutputStream.
26930  * @result: a GAsyncResult.
26931  * @error: a #GError location to store the error occuring, or %NULL to ignore.
26932  *
26933  * Finishes flushing an output stream.
26934  *
26935  * Returns: %TRUE if flush operation suceeded, %FALSE otherwise.
26936  */
26937
26938
26939 /**
26940  * g_output_stream_has_pending:
26941  * @stream: a #GOutputStream.
26942  *
26943  * Checks if an ouput stream has pending actions.
26944  *
26945  * Returns: %TRUE if @stream has pending actions.
26946  */
26947
26948
26949 /**
26950  * g_output_stream_is_closed:
26951  * @stream: a #GOutputStream.
26952  *
26953  * Checks if an output stream has already been closed.
26954  *
26955  * Returns: %TRUE if @stream is closed. %FALSE otherwise.
26956  */
26957
26958
26959 /**
26960  * g_output_stream_is_closing:
26961  * @stream: a #GOutputStream.
26962  *
26963  * Checks if an output stream is being closed. This can be
26964  * used inside e.g. a flush implementation to see if the
26965  * flush (or other i/o operation) is called from within
26966  * the closing operation.
26967  *
26968  * Returns: %TRUE if @stream is being closed. %FALSE otherwise.
26969  * Since: 2.24
26970  */
26971
26972
26973 /**
26974  * g_output_stream_set_pending:
26975  * @stream: a #GOutputStream.
26976  * @error: a #GError location to store the error occuring, or %NULL to ignore.
26977  *
26978  * Sets @stream to have actions pending. If the pending flag is
26979  * already set or @stream is closed, it will return %FALSE and set
26980  *
26981  * Returns: %TRUE if pending was previously unset and is now set.
26982  */
26983
26984
26985 /**
26986  * g_output_stream_splice:
26987  * @stream: a #GOutputStream.
26988  * @source: a #GInputStream.
26989  * @flags: a set of #GOutputStreamSpliceFlags.
26990  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26991  * @error: a #GError location to store the error occuring, or %NULL to ignore.
26992  *
26993  * Splices an input stream into an output stream.
26994  * -1 if an error occurred.
26995  *
26996  * Returns: a #gssize containing the size of the data spliced, or
26997  */
26998
26999
27000 /**
27001  * g_output_stream_splice_async:
27002  * @stream: a #GOutputStream.
27003  * @source: a #GInputStream.
27004  * @flags: a set of #GOutputStreamSpliceFlags.
27005  * @io_priority: the io priority of the request.
27006  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27007  * @callback: (scope async): a #GAsyncReadyCallback.
27008  * @user_data: (closure): user data passed to @callback.
27009  *
27010  * Splices a stream asynchronously.
27011  * When the operation is finished @callback will be called.
27012  * You can then call g_output_stream_splice_finish() to get the
27013  * result of the operation.
27014  * For the synchronous, blocking version of this function, see
27015  * g_output_stream_splice().
27016  */
27017
27018
27019 /**
27020  * g_output_stream_splice_finish:
27021  * @stream: a #GOutputStream.
27022  * @result: a #GAsyncResult.
27023  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27024  *
27025  * Finishes an asynchronous stream splice operation.
27026  *
27027  * Returns: a #gssize of the number of bytes spliced.
27028  */
27029
27030
27031 /**
27032  * g_output_stream_write:
27033  * @stream: a #GOutputStream.
27034  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
27035  * @count: the number of bytes to write
27036  * @cancellable: (allow-none): optional cancellable object
27037  * @error: location to store the error occuring, or %NULL to ignore
27038  *
27039  * Tries to write @count bytes from @buffer into the stream. Will block
27040  * during the operation.
27041  * If count is 0, returns 0 and does nothing. A value of @count
27042  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
27043  * On success, the number of bytes written to the stream is returned.
27044  * It is not an error if this is not the same as the requested size, as it
27045  * can happen e.g. on a partial I/O error, or if there is not enough
27046  * storage in the stream. All writes block until at least one byte
27047  * is written or an error occurs; 0 is never returned (unless
27048  * If @cancellable is not NULL, then the operation can be cancelled by
27049  * triggering the cancellable object from another thread. If the operation
27050  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
27051  * operation was partially finished when the operation was cancelled the
27052  * partial result will be returned, without an error.
27053  * On error -1 is returned and @error is set accordingly.
27054  *
27055  * Returns: Number of bytes written, or -1 on error
27056  */
27057
27058
27059 /**
27060  * g_output_stream_write_all:
27061  * @stream: a #GOutputStream.
27062  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
27063  * @count: the number of bytes to write
27064  * @bytes_written: (out): location to store the number of bytes that was written to the stream
27065  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27066  * @error: location to store the error occuring, or %NULL to ignore
27067  *
27068  * Tries to write @count bytes from @buffer into the stream. Will block
27069  * during the operation.
27070  * This function is similar to g_output_stream_write(), except it tries to
27071  * write as many bytes as requested, only stopping on an error.
27072  * On a successful write of @count bytes, %TRUE is returned, and @bytes_written
27073  * is set to @count.
27074  * If there is an error during the operation FALSE is returned and @error
27075  * is set to indicate the error status, @bytes_written is updated to contain
27076  * the number of bytes written into the stream before the error occurred.
27077  *
27078  * Returns: %TRUE on success, %FALSE if there was an error
27079  */
27080
27081
27082 /**
27083  * g_output_stream_write_async:
27084  * @stream: A #GOutputStream.
27085  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
27086  * @count: the number of bytes to write
27087  * @io_priority: the io priority of the request.
27088  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27089  * @callback: (scope async): callback to call when the request is satisfied
27090  * @user_data: (closure): the data to pass to callback function
27091  *
27092  * Request an asynchronous write of @count bytes from @buffer into
27093  * the stream. When the operation is finished @callback will be called.
27094  * You can then call g_output_stream_write_finish() to get the result of the
27095  * operation.
27096  * During an async request no other sync and async calls are allowed,
27097  * and will result in %G_IO_ERROR_PENDING errors.
27098  * A value of @count larger than %G_MAXSSIZE will cause a
27099  * %G_IO_ERROR_INVALID_ARGUMENT error.
27100  * On success, the number of bytes written will be passed to the
27101  * requested size, as it can happen e.g. on a partial I/O error,
27102  * but generally we try to write as many bytes as requested.
27103  * You are guaranteed that this method will never fail with
27104  * %G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the
27105  * method will just wait until this changes.
27106  * Any outstanding I/O request with higher priority (lower numerical
27107  * value) will be executed before an outstanding request with lower
27108  * priority. Default priority is %G_PRIORITY_DEFAULT.
27109  * The asyncronous methods have a default fallback that uses threads
27110  * to implement asynchronicity, so they are optional for inheriting
27111  * classes. However, if you override one you must override all.
27112  * For the synchronous, blocking version of this function, see
27113  * g_output_stream_write().
27114  */
27115
27116
27117 /**
27118  * g_output_stream_write_finish:
27119  * @stream: a #GOutputStream.
27120  * @result: a #GAsyncResult.
27121  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27122  *
27123  * Finishes a stream write operation.
27124  *
27125  * Returns: a #gssize containing the number of bytes written to the stream.
27126  */
27127
27128
27129 /**
27130  * g_permission_acquire:
27131  * @permission: a #GPermission instance
27132  * @cancellable: a #GCancellable, or %NULL
27133  * @error: a pointer to a %NULL #GError, or %NULL
27134  * @returns: %TRUE if the permission was successfully acquired
27135  *
27136  * Attempts to acquire the permission represented by @permission.
27137  * The precise method by which this happens depends on the permission
27138  * and the underlying authentication mechanism.  A simple example is
27139  * that a dialog may appear asking the user to enter their password.
27140  * You should check with g_permission_get_can_acquire() before calling
27141  * this function.
27142  * If the permission is acquired then %TRUE is returned.  Otherwise,
27143  * %FALSE is returned and @error is set appropriately.
27144  * This call is blocking, likely for a very long time (in the case that
27145  * user interaction is required).  See g_permission_acquire_async() for
27146  * the non-blocking version.
27147  *
27148  * Since: 2.26
27149  */
27150
27151
27152 /**
27153  * g_permission_acquire_async:
27154  * @permission: a #GPermission instance
27155  * @cancellable: a #GCancellable, or %NULL
27156  * @callback: the #GAsyncReadyCallback to call when done
27157  * @user_data: the user data to pass to @callback
27158  *
27159  * Attempts to acquire the permission represented by @permission.
27160  * This is the first half of the asynchronous version of
27161  * g_permission_acquire().
27162  *
27163  * Since: 2.26
27164  */
27165
27166
27167 /**
27168  * g_permission_acquire_finish:
27169  * @permission: a #GPermission instance
27170  * @result: the #GAsyncResult given to the #GAsyncReadyCallback
27171  * @error: a pointer to a %NULL #GError, or %NULL
27172  * @returns: %TRUE if the permission was successfully acquired
27173  *
27174  * Collects the result of attempting to acquire the permission
27175  * represented by @permission.
27176  * This is the second half of the asynchronous version of
27177  * g_permission_acquire().
27178  *
27179  * Since: 2.26
27180  */
27181
27182
27183 /**
27184  * g_permission_get_allowed:
27185  * @permission: a #GPermission instance
27186  * @returns: the value of the 'allowed' property
27187  *
27188  * Gets the value of the 'allowed' property.  This property is %TRUE if
27189  * the caller currently has permission to perform the action that
27190  *
27191  * Since: 2.26
27192  */
27193
27194
27195 /**
27196  * g_permission_get_can_acquire:
27197  * @permission: a #GPermission instance
27198  * @returns: the value of the 'can-acquire' property
27199  *
27200  * Gets the value of the 'can-acquire' property.  This property is %TRUE
27201  * if it is generally possible to acquire the permission by calling
27202  * g_permission_acquire().
27203  *
27204  * Since: 2.26
27205  */
27206
27207
27208 /**
27209  * g_permission_get_can_release:
27210  * @permission: a #GPermission instance
27211  * @returns: the value of the 'can-release' property
27212  *
27213  * Gets the value of the 'can-release' property.  This property is %TRUE
27214  * if it is generally possible to release the permission by calling
27215  * g_permission_release().
27216  *
27217  * Since: 2.26
27218  */
27219
27220
27221 /**
27222  * g_permission_impl_update:
27223  * @permission: a #GPermission instance
27224  * @allowed: the new value for the 'allowed' property
27225  * @can_acquire: the new value for the 'can-acquire' property
27226  * @can_release: the new value for the 'can-release' property
27227  *
27228  * This function is called by the #GPermission implementation to update
27229  * the properties of the permission.  You should never call this
27230  * function except from a #GPermission implementation.
27231  * GObject notify signals are generated, as appropriate.
27232  *
27233  * Since: 2.26
27234  */
27235
27236
27237 /**
27238  * g_permission_release:
27239  * @permission: a #GPermission instance
27240  * @cancellable: a #GCancellable, or %NULL
27241  * @error: a pointer to a %NULL #GError, or %NULL
27242  * @returns: %TRUE if the permission was successfully released
27243  *
27244  * Attempts to release the permission represented by @permission.
27245  * The precise method by which this happens depends on the permission
27246  * and the underlying authentication mechanism.  In most cases the
27247  * permission will be dropped immediately without further action.
27248  * You should check with g_permission_get_can_release() before calling
27249  * this function.
27250  * If the permission is released then %TRUE is returned.  Otherwise,
27251  * %FALSE is returned and @error is set appropriately.
27252  * This call is blocking, likely for a very long time (in the case that
27253  * user interaction is required).  See g_permission_release_async() for
27254  * the non-blocking version.
27255  *
27256  * Since: 2.26
27257  */
27258
27259
27260 /**
27261  * g_permission_release_async:
27262  * @permission: a #GPermission instance
27263  * @cancellable: a #GCancellable, or %NULL
27264  * @callback: the #GAsyncReadyCallback to call when done
27265  * @user_data: the user data to pass to @callback
27266  *
27267  * Attempts to release the permission represented by @permission.
27268  * This is the first half of the asynchronous version of
27269  * g_permission_release().
27270  *
27271  * Since: 2.26
27272  */
27273
27274
27275 /**
27276  * g_permission_release_finish:
27277  * @permission: a #GPermission instance
27278  * @result: the #GAsyncResult given to the #GAsyncReadyCallback
27279  * @error: a pointer to a %NULL #GError, or %NULL
27280  * @returns: %TRUE if the permission was successfully released
27281  *
27282  * Collects the result of attempting to release the permission
27283  * represented by @permission.
27284  * This is the second half of the asynchronous version of
27285  * g_permission_release().
27286  *
27287  * Since: 2.26
27288  */
27289
27290
27291 /**
27292  * g_poll_file_monitor_new:
27293  * @file: a #GFile.
27294  *
27295  * Polls @file for changes.
27296  *
27297  * Returns: a new #GFileMonitor for the given #GFile.
27298  */
27299
27300
27301 /**
27302  * g_pollable_input_stream_can_poll:
27303  * @stream: a #GPollableInputStream.
27304  *
27305  * Checks if @stream is actually pollable. Some classes may implement
27306  * #GPollableInputStream but have only certain instances of that class
27307  * be pollable. If this method returns %FALSE, then the behavior of
27308  * other #GPollableInputStream methods is undefined.
27309  * For any given stream, the value returned by this method is constant;
27310  * a stream cannot switch from pollable to non-pollable or vice versa.
27311  *
27312  * Returns: %TRUE if @stream is pollable, %FALSE if not.
27313  * Since: 2.28
27314  */
27315
27316
27317 /**
27318  * g_pollable_input_stream_create_source: (skip)
27319  * @stream: a #GPollableInputStream.
27320  * @cancellable: (allow-none): a #GCancellable, or %NULL
27321  *
27322  * Creates a #GSource that triggers when @stream can be read, or
27323  * source is of the #GPollableSourceFunc type.
27324  * As with g_pollable_input_stream_is_readable(), it is possible that
27325  * the stream may not actually be readable even after the source
27326  * triggers, so you should use g_pollable_input_stream_read_nonblocking()
27327  * rather than g_input_stream_read() from the callback.
27328  *
27329  * Returns: (transfer full): a new #GSource
27330  * Since: 2.28
27331  */
27332
27333
27334 /**
27335  * g_pollable_input_stream_is_readable:
27336  * @stream: a #GPollableInputStream.
27337  *
27338  * Checks if @stream can be read.
27339  * Note that some stream types may not be able to implement this 100%
27340  * reliably, and it is possible that a call to g_input_stream_read()
27341  * after this returns %TRUE would still block. To guarantee
27342  * non-blocking behavior, you should always use
27343  * g_pollable_input_stream_read_nonblocking(), which will return a
27344  * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
27345  * has occurred on @stream, this will result in
27346  * g_pollable_input_stream_is_readable() returning %TRUE, and the
27347  * next attempt to read will return the error.
27348  *
27349  * Returns: %TRUE if @stream is readable, %FALSE if not. If an error
27350  * Since: 2.28
27351  */
27352
27353
27354 /**
27355  * g_pollable_input_stream_read_nonblocking:
27356  * @stream: a #GPollableInputStream
27357  * @buffer: a buffer to read data into (which should be at least @size bytes long).
27358  * @size: the number of bytes you want to read
27359  * @cancellable: (allow-none): a #GCancellable, or %NULL
27360  * @error: #GError for error reporting, or %NULL to ignore.
27361  *
27362  * Attempts to read up to @size bytes from @stream into @buffer, as
27363  * with g_input_stream_read(). If @stream is not currently readable,
27364  * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
27365  * use g_pollable_input_stream_create_source() to create a #GSource
27366  * that will be triggered when @stream is readable.
27367  * Note that since this method never blocks, you cannot actually
27368  * use @cancellable to cancel it. However, it will return an error
27369  * if @cancellable has already been cancelled when you call, which
27370  * may happen if you call this method after a source triggers due
27371  * to having been cancelled.
27372  * %G_IO_ERROR_WOULD_BLOCK).
27373  *
27374  * Virtual: read_nonblocking
27375  * Returns: the number of bytes read, or -1 on error (including
27376  */
27377
27378
27379 /**
27380  * g_pollable_output_stream_can_poll:
27381  * @stream: a #GPollableOutputStream.
27382  *
27383  * Checks if @stream is actually pollable. Some classes may implement
27384  * #GPollableOutputStream but have only certain instances of that
27385  * class be pollable. If this method returns %FALSE, then the behavior
27386  * of other #GPollableOutputStream methods is undefined.
27387  * For any given stream, the value returned by this method is constant;
27388  * a stream cannot switch from pollable to non-pollable or vice versa.
27389  *
27390  * Returns: %TRUE if @stream is pollable, %FALSE if not.
27391  * Since: 2.28
27392  */
27393
27394
27395 /**
27396  * g_pollable_output_stream_create_source: (skip)
27397  * @stream: a #GPollableOutputStream.
27398  * @cancellable: (allow-none): a #GCancellable, or %NULL
27399  *
27400  * Creates a #GSource that triggers when @stream can be written, or
27401  * source is of the #GPollableSourceFunc type.
27402  * As with g_pollable_output_stream_is_writable(), it is possible that
27403  * the stream may not actually be writable even after the source
27404  * triggers, so you should use g_pollable_output_stream_write_nonblocking()
27405  * rather than g_output_stream_write() from the callback.
27406  *
27407  * Returns: (transfer full): a new #GSource
27408  * Since: 2.28
27409  */
27410
27411
27412 /**
27413  * g_pollable_output_stream_is_writable:
27414  * @stream: a #GPollableOutputStream.
27415  *
27416  * Checks if @stream can be written.
27417  * Note that some stream types may not be able to implement this 100%
27418  * reliably, and it is possible that a call to g_output_stream_write()
27419  * after this returns %TRUE would still block. To guarantee
27420  * non-blocking behavior, you should always use
27421  * g_pollable_output_stream_write_nonblocking(), which will return a
27422  * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
27423  * has occurred on @stream, this will result in
27424  * g_pollable_output_stream_is_writable() returning %TRUE, and the
27425  * next attempt to write will return the error.
27426  *
27427  * Returns: %TRUE if @stream is writable, %FALSE if not. If an error
27428  * Since: 2.28
27429  */
27430
27431
27432 /**
27433  * g_pollable_output_stream_write_nonblocking:
27434  * @stream: a #GPollableOutputStream
27435  * @buffer: (array length=size) (element-type guint8): a buffer to write data from
27436  * @size: the number of bytes you want to write
27437  * @cancellable: (allow-none): a #GCancellable, or %NULL
27438  * @error: #GError for error reporting, or %NULL to ignore.
27439  *
27440  * Attempts to write up to @size bytes from @buffer to @stream, as
27441  * with g_output_stream_write(). If @stream is not currently writable,
27442  * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
27443  * use g_pollable_output_stream_create_source() to create a #GSource
27444  * that will be triggered when @stream is writable.
27445  * Note that since this method never blocks, you cannot actually
27446  * use @cancellable to cancel it. However, it will return an error
27447  * if @cancellable has already been cancelled when you call, which
27448  * may happen if you call this method after a source triggers due
27449  * to having been cancelled.
27450  * %G_IO_ERROR_WOULD_BLOCK).
27451  *
27452  * Virtual: write_nonblocking
27453  * Returns: the number of bytes written, or -1 on error (including
27454  */
27455
27456
27457 /**
27458  * g_pollable_source_new: (skip)
27459  * @pollable_stream: the stream associated with the new source
27460  *
27461  * Utility method for #GPollableInputStream and #GPollableOutputStream
27462  * implementations. Creates a new #GSource that expects a callback of
27463  * type #GPollableSourceFunc. The new source does not actually do
27464  * anything on its own; use g_source_add_child_source() to add other
27465  * sources to it to cause it to trigger.
27466  *
27467  * Returns: (transfer full): the new #GSource.
27468  * Since: 2.28
27469  */
27470
27471
27472 /**
27473  * g_proxy_address_get_destination_hostname:
27474  * @proxy: a #GProxyAddress
27475  *
27476  * Gets @proxy's destination hostname.
27477  *
27478  * Returns: the @proxy's destination hostname
27479  * Since: 2.26
27480  */
27481
27482
27483 /**
27484  * g_proxy_address_get_destination_port:
27485  * @proxy: a #GProxyAddress
27486  *
27487  * Gets @proxy's destination port.
27488  *
27489  * Returns: the @proxy's destination port
27490  * Since: 2.26
27491  */
27492
27493
27494 /**
27495  * g_proxy_address_get_password:
27496  * @proxy: a #GProxyAddress
27497  *
27498  * Gets @proxy's password.
27499  *
27500  * Returns: the @proxy's password
27501  * Since: 2.26
27502  */
27503
27504
27505 /**
27506  * g_proxy_address_get_protocol:
27507  * @proxy: a #GProxyAddress
27508  *
27509  * Gets @proxy's protocol.
27510  *
27511  * Returns: the @proxy's protocol
27512  * Since: 2.26
27513  */
27514
27515
27516 /**
27517  * g_proxy_address_get_username:
27518  * @proxy: a #GProxyAddress
27519  *
27520  * Gets @proxy's username.
27521  *
27522  * Returns: the @proxy's username
27523  * Since: 2.26
27524  */
27525
27526
27527 /**
27528  * g_proxy_address_new:
27529  * @inetaddr: The proxy server #GInetAddress.
27530  * @port: The proxy server port.
27531  * @protocol: The proxy protocol to support, in lower case (e.g. socks, http).
27532  * @dest_hostname: The destination hostname the the proxy should tunnel to.
27533  * @dest_port: The destination port to tunnel to.
27534  * @username: (allow-none): The username to authenticate to the proxy server (or %NULL).
27535  * @password: (allow-none): The password to authenticate to the proxy server (or %NULL).
27536  *
27537  * Creates a new #GProxyAddress for @inetaddr with @protocol that should
27538  * tunnel through @dest_hostname and @dest_port.
27539  *
27540  * Returns: a new #GProxyAddress
27541  * Since: 2.26
27542  */
27543
27544
27545 /**
27546  * g_proxy_connect:
27547  * @proxy: a #GProxy
27548  * @connection: a #GIOStream
27549  * @proxy_address: a #GProxyAddress
27550  * @cancellable: (allow-none): a #GCancellable
27551  * @error: return #GError
27552  *
27553  * Given @connection to communicate with a proxy (eg, a
27554  * #GSocketConnection that is connected to the proxy server), this
27555  * does the necessary handshake to connect to @proxy_address, and if
27556  * required, wraps the #GIOStream to handle proxy payload.
27557  * be the same as @connection, in which case a reference
27558  * will be added.
27559  *
27560  * Returns: (transfer full): a #GIOStream that will replace @connection. This might
27561  * Since: 2.26
27562  */
27563
27564
27565 /**
27566  * g_proxy_connect_async:
27567  * @proxy: a #GProxy
27568  * @connection: a #GIOStream
27569  * @proxy_address: a #GProxyAddress
27570  * @cancellable: (allow-none): a #GCancellable
27571  * @callback: (scope async): a #GAsyncReadyCallback
27572  * @user_data: (closure): callback data
27573  *
27574  * Asynchronous version of g_proxy_connect().
27575  *
27576  * Since: 2.26
27577  */
27578
27579
27580 /**
27581  * g_proxy_connect_finish:
27582  * @proxy: a #GProxy
27583  * @result: a #GAsyncResult
27584  * @error: return #GError
27585  *
27586  * See g_proxy_connect().
27587  *
27588  * Returns: (transfer full): a #GIOStream.
27589  * Since: 2.26
27590  */
27591
27592
27593 /**
27594  * g_proxy_get_default_for_protocol:
27595  * @protocol: the proxy protocol name (e.g. http, socks, etc)
27596  *
27597  * Lookup "gio-proxy" extension point for a proxy implementation that supports
27598  * specified protocol.
27599  * is not supported.
27600  *
27601  * Returns: (transfer full): return a #GProxy or NULL if protocol
27602  * Since: 2.26
27603  */
27604
27605
27606 /**
27607  * g_proxy_resolver_get_default:
27608  *
27609  * Gets the default #GProxyResolver for the system.
27610  *
27611  * Returns: (transfer none): the default #GProxyResolver.
27612  * Since: 2.26
27613  */
27614
27615
27616 /**
27617  * g_proxy_resolver_is_supported:
27618  * @resolver: a #GProxyResolver
27619  *
27620  * Checks if @resolver can be used on this system. (This is used
27621  * internally; g_proxy_resolver_get_default() will only return a proxy
27622  * resolver that returns %TRUE for this method.)
27623  *
27624  * Returns: %TRUE if @resolver is supported.
27625  * Since: 2.26
27626  */
27627
27628
27629 /**
27630  * g_proxy_resolver_lookup:
27631  * @resolver: a #GProxyResolver
27632  * @uri: a URI representing the destination to connect to
27633  * @cancellable: (allow-none): a #GCancellable, or %NULL
27634  * @error: return location for a #GError, or %NULL
27635  *
27636  * Looks into the system proxy configuration to determine what proxy,
27637  * if any, to use to connect to @uri. The returned proxy URIs are of the
27638  * form <literal>&lt;protocol&gt;://[user[:password]@]host:port</literal>
27639  * or <literal>direct://</literal>, where &lt;protocol&gt; could be
27640  * http, rtsp, socks or other proxying protocol.
27641  * If you don't know what network protocol is being used on the
27642  * socket, you should use <literal>none</literal> as the URI protocol.
27643  * In this case, the resolver might still return a generic proxy type
27644  * (such as SOCKS), but would not return protocol-specific proxy types
27645  * (such as http).
27646  * <literal>direct://</literal> is used when no proxy is needed.
27647  * Direct connection should not be attempted unless it is part of the
27648  * returned array of proxies.
27649  * NULL-terminated array of proxy URIs. Must be freed
27650  * with g_strfreev().
27651  *
27652  * Returns: (transfer full) (array zero-terminated=1): A
27653  * Since: 2.26
27654  */
27655
27656
27657 /**
27658  * g_proxy_resolver_lookup_async:
27659  * @resolver: a #GProxyResolver
27660  * @uri: a URI representing the destination to connect to
27661  * @cancellable: (allow-none): a #GCancellable, or %NULL
27662  * @callback: (scope async): callback to call after resolution completes
27663  * @user_data: (closure): data for @callback
27664  *
27665  * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
27666  * details.
27667  *
27668  * Since: 2.26
27669  */
27670
27671
27672 /**
27673  * g_proxy_resolver_lookup_finish:
27674  * @resolver: a #GProxyResolver
27675  * @result: the result passed to your #GAsyncReadyCallback
27676  * @error: return location for a #GError, or %NULL
27677  *
27678  * Call this function to obtain the array of proxy URIs when
27679  * g_proxy_resolver_lookup_async() is complete. See
27680  * g_proxy_resolver_lookup() for more details.
27681  * NULL-terminated array of proxy URIs. Must be freed
27682  * with g_strfreev().
27683  *
27684  * Returns: (transfer full) (array zero-terminated=1): A
27685  * Since: 2.26
27686  */
27687
27688
27689 /**
27690  * g_proxy_supports_hostname:
27691  * @proxy: a #GProxy
27692  *
27693  * Some proxy protocols expect to be passed a hostname, which they
27694  * will resolve to an IP address themselves. Others, like SOCKS4, do
27695  * not allow this. This function will return %FALSE if @proxy is
27696  * implementing such a protocol. When %FALSE is returned, the caller
27697  * should resolve the destination hostname first, and then pass a
27698  * #GProxyAddress containing the stringified IP address to
27699  * g_proxy_connect() or g_proxy_connect_async().
27700  *
27701  * Returns: %TRUE if hostname resolution is supported.
27702  * Since: 2.26
27703  */
27704
27705
27706 /**
27707  * g_renew:
27708  * @struct_type: the type of the elements to allocate
27709  * @mem: the currently allocated memory
27710  * @n_structs: the number of elements to allocate
27711  *
27712  * Reallocates the memory pointed to by @mem, so that it now has space for
27713  * the memory, which may have been moved.
27714  * Care is taken to avoid overflow when calculating the size of the allocated block.
27715  *
27716  * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
27717  */
27718
27719
27720 /**
27721  * g_resolver_error_quark:
27722  *
27723  * Gets the #GResolver Error Quark.
27724  *
27725  * Returns: a #GQuark.
27726  * Since: 2.22
27727  */
27728
27729
27730 /**
27731  * g_resolver_free_addresses: (skip)
27732  * @addresses: a #GList of #GInetAddress
27733  *
27734  * Frees @addresses (which should be the return value from
27735  * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()).
27736  * (This is a convenience method; you can also simply free the results
27737  * by hand.)
27738  *
27739  * Since: 2.22
27740  */
27741
27742
27743 /**
27744  * g_resolver_free_targets: (skip)
27745  * @targets: a #GList of #GSrvTarget
27746  *
27747  * Frees @targets (which should be the return value from
27748  * g_resolver_lookup_service() or g_resolver_lookup_service_finish()).
27749  * (This is a convenience method; you can also simply free the
27750  * results by hand.)
27751  *
27752  * Since: 2.22
27753  */
27754
27755
27756 /**
27757  * g_resolver_get_default:
27758  *
27759  * Gets the default #GResolver. You should unref it when you are done
27760  * with it. #GResolver may use its reference count as a hint about how
27761  * many threads/processes, etc it should allocate for concurrent DNS
27762  * resolutions.
27763  *
27764  * Returns: (transfer full): the default #GResolver.
27765  * Since: 2.22
27766  */
27767
27768
27769 /**
27770  * g_resolver_lookup_by_address:
27771  * @resolver: a #GResolver
27772  * @address: the address to reverse-resolve
27773  * @cancellable: (allow-none): a #GCancellable, or %NULL
27774  * @error: return location for a #GError, or %NULL
27775  *
27776  * Synchronously reverse-resolves @address to determine its
27777  * associated hostname.
27778  * If the DNS resolution fails, @error (if non-%NULL) will be set to
27779  * a value from #GResolverError.
27780  * If @cancellable is non-%NULL, it can be used to cancel the
27781  * operation, in which case @error (if non-%NULL) will be set to
27782  * %G_IO_ERROR_CANCELLED.
27783  * form), or %NULL on error.
27784  *
27785  * Returns: a hostname (either ASCII-only, or in ASCII-encoded
27786  * Since: 2.22
27787  */
27788
27789
27790 /**
27791  * g_resolver_lookup_by_address_async:
27792  * @resolver: a #GResolver
27793  * @address: the address to reverse-resolve
27794  * @cancellable: (allow-none): a #GCancellable, or %NULL
27795  * @callback: (scope async): callback to call after resolution completes
27796  * @user_data: (closure): data for @callback
27797  *
27798  * Begins asynchronously reverse-resolving @address to determine its
27799  * associated hostname, and eventually calls @callback, which must
27800  * call g_resolver_lookup_by_address_finish() to get the final result.
27801  *
27802  * Since: 2.22
27803  */
27804
27805
27806 /**
27807  * g_resolver_lookup_by_address_finish:
27808  * @resolver: a #GResolver
27809  * @result: the result passed to your #GAsyncReadyCallback
27810  * @error: return location for a #GError, or %NULL
27811  *
27812  * Retrieves the result of a previous call to
27813  * g_resolver_lookup_by_address_async().
27814  * If the DNS resolution failed, @error (if non-%NULL) will be set to
27815  * a value from #GResolverError. If the operation was cancelled,
27816  * form), or %NULL on error.
27817  *
27818  * Returns: a hostname (either ASCII-only, or in ASCII-encoded
27819  * Since: 2.22
27820  */
27821
27822
27823 /**
27824  * g_resolver_lookup_by_name:
27825  * @resolver: a #GResolver
27826  * @hostname: the hostname to look up
27827  * @cancellable: (allow-none): a #GCancellable, or %NULL
27828  * @error: return location for a #GError, or %NULL
27829  *
27830  * Synchronously resolves @hostname to determine its associated IP
27831  * address(es). @hostname may be an ASCII-only or UTF-8 hostname, or
27832  * the textual form of an IP address (in which case this just becomes
27833  * a wrapper around g_inet_address_new_from_string()).
27834  * On success, g_resolver_lookup_by_name() will return a #GList of
27835  * #GInetAddress, sorted in order of preference and guaranteed to not
27836  * contain duplicates. That is, if using the result to connect to
27837  * first, then the second if the first fails, etc. If you are using
27838  * the result to listen on a socket, it is appropriate to add each
27839  * result using e.g. g_socket_listener_add_address().
27840  * If the DNS resolution fails, @error (if non-%NULL) will be set to a
27841  * value from #GResolverError.
27842  * If @cancellable is non-%NULL, it can be used to cancel the
27843  * operation, in which case @error (if non-%NULL) will be set to
27844  * %G_IO_ERROR_CANCELLED.
27845  * If you are planning to connect to a socket on the resolved IP
27846  * address, it may be easier to create a #GNetworkAddress and use its
27847  * #GSocketConnectable interface.
27848  * of #GInetAddress, or %NULL on error. You
27849  * must unref each of the addresses and free the list when you are
27850  * done with it. (You can use g_resolver_free_addresses() to do this.)
27851  *
27852  * Returns: (element-type GInetAddress) (transfer full): a #GList
27853  * Since: 2.22
27854  */
27855
27856
27857 /**
27858  * g_resolver_lookup_by_name_async:
27859  * @resolver: a #GResolver
27860  * @hostname: the hostname to look up the address of
27861  * @cancellable: (allow-none): a #GCancellable, or %NULL
27862  * @callback: (scope async): callback to call after resolution completes
27863  * @user_data: (closure): data for @callback
27864  *
27865  * Begins asynchronously resolving @hostname to determine its
27866  * associated IP address(es), and eventually calls @callback, which
27867  * must call g_resolver_lookup_by_name_finish() to get the result.
27868  * See g_resolver_lookup_by_name() for more details.
27869  *
27870  * Since: 2.22
27871  */
27872
27873
27874 /**
27875  * g_resolver_lookup_by_name_finish:
27876  * @resolver: a #GResolver
27877  * @result: the result passed to your #GAsyncReadyCallback
27878  * @error: return location for a #GError, or %NULL
27879  *
27880  * Retrieves the result of a call to
27881  * g_resolver_lookup_by_name_async().
27882  * If the DNS resolution failed, @error (if non-%NULL) will be set to
27883  * a value from #GResolverError. If the operation was cancelled,
27884  * of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name()
27885  * for more details.
27886  *
27887  * Returns: (element-type GInetAddress) (transfer full): a #GList
27888  * Since: 2.22
27889  */
27890
27891
27892 /**
27893  * g_resolver_lookup_service:
27894  * @resolver: a #GResolver
27895  * @service: the service type to look up (eg, "ldap")
27896  * @protocol: the networking protocol to use for @service (eg, "tcp")
27897  * @domain: the DNS domain to look up the service in
27898  * @cancellable: (allow-none): a #GCancellable, or %NULL
27899  * @error: return location for a #GError, or %NULL
27900  *
27901  * Synchronously performs a DNS SRV lookup for the given @service and
27902  * include the leading underscore that appears in the actual DNS
27903  * entry.
27904  * On success, g_resolver_lookup_service() will return a #GList of
27905  * #GSrvTarget, sorted in order of preference. (That is, you should
27906  * attempt to connect to the first target first, then the second if
27907  * the first fails, etc.)
27908  * If the DNS resolution fails, @error (if non-%NULL) will be set to
27909  * a value from #GResolverError.
27910  * If @cancellable is non-%NULL, it can be used to cancel the
27911  * operation, in which case @error (if non-%NULL) will be set to
27912  * %G_IO_ERROR_CANCELLED.
27913  * If you are planning to connect to the service, it is usually easier
27914  * to create a #GNetworkService and use its #GSocketConnectable
27915  * interface.
27916  * or %NULL on error. You must free each of the targets and the list when you are
27917  * done with it. (You can use g_resolver_free_targets() to do this.)
27918  *
27919  * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
27920  * Since: 2.22
27921  */
27922
27923
27924 /**
27925  * g_resolver_lookup_service_async:
27926  * @resolver: a #GResolver
27927  * @service: the service type to look up (eg, "ldap")
27928  * @protocol: the networking protocol to use for @service (eg, "tcp")
27929  * @domain: the DNS domain to look up the service in
27930  * @cancellable: (allow-none): a #GCancellable, or %NULL
27931  * @callback: (scope async): callback to call after resolution completes
27932  * @user_data: (closure): data for @callback
27933  *
27934  * Begins asynchronously performing a DNS SRV lookup for the given
27935  * get the final result. See g_resolver_lookup_service() for more
27936  * details.
27937  *
27938  * Since: 2.22
27939  */
27940
27941
27942 /**
27943  * g_resolver_lookup_service_finish:
27944  * @resolver: a #GResolver
27945  * @result: the result passed to your #GAsyncReadyCallback
27946  * @error: return location for a #GError, or %NULL
27947  *
27948  * Retrieves the result of a previous call to
27949  * g_resolver_lookup_service_async().
27950  * If the DNS resolution failed, @error (if non-%NULL) will be set to
27951  * a value from #GResolverError. If the operation was cancelled,
27952  * or %NULL on error. See g_resolver_lookup_service() for more details.
27953  *
27954  * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
27955  * Since: 2.22
27956  */
27957
27958
27959 /**
27960  * g_resolver_set_default:
27961  * @resolver: the new default #GResolver
27962  *
27963  * Sets @resolver to be the application's default resolver (reffing
27964  * Future calls to g_resolver_get_default() will return this resolver.
27965  * This can be used if an application wants to perform any sort of DNS
27966  * caching or "pinning"; it can implement its own #GResolver that
27967  * calls the original default resolver for DNS operations, and
27968  * implements its own cache policies on top of that, and then set
27969  * itself as the default resolver for all later code to use.
27970  *
27971  * Since: 2.22
27972  */
27973
27974
27975 /**
27976  * g_seekable_can_seek:
27977  * @seekable: a #GSeekable.
27978  *
27979  * Tests if the stream supports the #GSeekableIface.
27980  *
27981  * Returns: %TRUE if @seekable can be seeked. %FALSE otherwise.
27982  */
27983
27984
27985 /**
27986  * g_seekable_can_truncate:
27987  * @seekable: a #GSeekable.
27988  *
27989  * Tests if the stream can be truncated.
27990  *
27991  * Returns: %TRUE if the stream can be truncated, %FALSE otherwise.
27992  */
27993
27994
27995 /**
27996  * g_seekable_seek:
27997  * @seekable: a #GSeekable.
27998  * @offset: a #goffset.
27999  * @type: a #GSeekType.
28000  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28001  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28002  *
28003  * Seeks in the stream by the given @offset, modified by @type.
28004  * If @cancellable is not %NULL, then the operation can be cancelled by
28005  * triggering the cancellable object from another thread. If the operation
28006  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28007  * has occurred, this function will return %FALSE and set @error
28008  * appropriately if present.
28009  *
28010  * Returns: %TRUE if successful. If an error
28011  */
28012
28013
28014 /**
28015  * g_seekable_tell:
28016  * @seekable: a #GSeekable.
28017  *
28018  * Tells the current position within the stream.
28019  *
28020  * Returns: the offset from the beginning of the buffer.
28021  */
28022
28023
28024 /**
28025  * g_seekable_truncate:
28026  * @seekable: a #GSeekable.
28027  * @offset: a #goffset.
28028  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28029  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28030  *
28031  * Truncates a stream with a given #offset.
28032  * If @cancellable is not %NULL, then the operation can be cancelled by
28033  * triggering the cancellable object from another thread. If the operation
28034  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
28035  * operation was partially finished when the operation was cancelled the
28036  * partial result will be returned, without an error.
28037  * has occurred, this function will return %FALSE and set @error
28038  * appropriately if present.
28039  *
28040  * Virtual: truncate_fn
28041  * Returns: %TRUE if successful. If an error
28042  */
28043
28044
28045 /**
28046  * g_settings_apply:
28047  * @settings: a #GSettings instance
28048  *
28049  * Applies any changes that have been made to the settings.  This
28050  * function does nothing unless @settings is in 'delay-apply' mode;
28051  * see g_settings_delay().  In the normal case settings are always
28052  * applied immediately.
28053  */
28054
28055
28056 /**
28057  * g_settings_backend_changed:
28058  * @backend: a #GSettingsBackend implementation
28059  * @key: the name of the key
28060  * @origin_tag: the origin tag
28061  *
28062  * Signals that a single key has possibly changed.  Backend
28063  * implementations should call this if a key has possibly changed its
28064  * value.
28065  * '//', and not ending with a slash).
28066  * The implementation must call this function during any call to
28067  * g_settings_backend_write(), before the call returns (except in the
28068  * case that no keys are actually changed and it cares to detect this
28069  * fact).  It may not rely on the existence of a mainloop for
28070  * dispatching the signal later.
28071  * The implementation may call this function at any other time it likes
28072  * in response to other events (such as changes occuring outside of the
28073  * program).  These calls may originate from a mainloop or may originate
28074  * in response to any other action (including from calls to
28075  * g_settings_backend_write()).
28076  * In the case that this call is in response to a call to
28077  * g_settings_backend_write() then @origin_tag must be set to the same
28078  * value that was passed to that call.
28079  *
28080  * Since: 2.26
28081  */
28082
28083
28084 /**
28085  * g_settings_backend_changed_tree:
28086  * @backend: a #GSettingsBackend implementation
28087  * @tree: a #GTree containing the changes
28088  * @origin_tag: the origin tag
28089  *
28090  * This call is a convenience wrapper.  It gets the list of changes from
28091  * g_settings_backend_changed().
28092  *
28093  * Since: 2.26
28094  */
28095
28096
28097 /**
28098  * g_settings_backend_flatten_tree:
28099  * @tree: a #GTree containing the changes
28100  * @path: (out): the location to save the path
28101  * @keys: (out) (transfer container) (array zero-terminated=1): the location to save the relative keys
28102  * @values: (out) (allow-none) (transfer container) (array zero-terminated=1):  the location to save the values, or %NULL
28103  *
28104  * Calculate the longest common prefix of all keys in a tree and write
28105  * out an array of the key names relative to that prefix and,
28106  * optionally, the value to store at each of those keys.
28107  * You must free the value returned in @path, @keys and @values using
28108  * g_free().  You should not attempt to free or unref the contents of
28109  *
28110  * Since: 2.26
28111  */
28112
28113
28114 /**
28115  * g_settings_backend_get_default:
28116  * @returns: (transfer full): the default #GSettingsBackend
28117  *
28118  * Returns the default #GSettingsBackend. It is possible to override
28119  * the default by setting the <envar>GSETTINGS_BACKEND</envar>
28120  * environment variable to the name of a settings backend.
28121  * The user gets a reference to the backend.
28122  *
28123  * Since: 2.28
28124  */
28125
28126
28127 /**
28128  * g_settings_backend_keys_changed:
28129  * @backend: a #GSettingsBackend implementation
28130  * @path: the path containing the changes
28131  * @items: (array zero-terminated=1): the %NULL-terminated list of changed keys
28132  * @origin_tag: the origin tag
28133  *
28134  * Signals that a list of keys have possibly changed.  Backend
28135  * implementations should call this if keys have possibly changed their
28136  * values.
28137  * not containing '//').  Each string in @items must form a valid key
28138  * end with '/' and must not contain '//').
28139  * The meaning of this signal is that any of the key names resulting
28140  * from the contatenation of @path with each item in @items may have
28141  * changed.
28142  * The same rules for when notifications must occur apply as per
28143  * g_settings_backend_changed().  These two calls can be used
28144  * interchangeably if exactly one item has changed (although in that
28145  * case g_settings_backend_changed() is definitely preferred).
28146  * For efficiency reasons, the implementation should strive for @path to
28147  * keys that were changed) but this is not strictly required.
28148  *
28149  * Name when @path is prefixed to it (ie: each item must not start or
28150  * Be as long as possible (ie: the longest common prefix of all of the
28151  * Since: 2.26
28152  */
28153
28154
28155 /**
28156  * g_settings_backend_path_changed:
28157  * @backend: a #GSettingsBackend implementation
28158  * @path: the path containing the changes
28159  * @origin_tag: the origin tag
28160  *
28161  * Signals that all keys below a given path may have possibly changed.
28162  * Backend implementations should call this if an entire path of keys
28163  * have possibly changed their values.
28164  * not containing '//').
28165  * The meaning of this signal is that any of the key which has a name
28166  * starting with @path may have changed.
28167  * The same rules for when notifications must occur apply as per
28168  * g_settings_backend_changed().  This call might be an appropriate
28169  * reasponse to a 'reset' call but implementations are also free to
28170  * explicitly list the keys that were affected by that call if they can
28171  * easily do so.
28172  * For efficiency reasons, the implementation should strive for @path to
28173  * keys that were changed) but this is not strictly required.  As an
28174  * example, if this function is called with the path of "/" then every
28175  * single key in the application will be notified of a possible change.
28176  *
28177  * Be as long as possible (ie: the longest common prefix of all of the
28178  * Since: 2.26
28179  */
28180
28181
28182 /**
28183  * g_settings_backend_path_writable_changed:
28184  * @backend: a #GSettingsBackend implementation
28185  * @path: the name of the path
28186  *
28187  * Signals that the writability of all keys below a given path may have
28188  * changed.
28189  * Since GSettings performs no locking operations for itself, this call
28190  * will always be made in response to external events.
28191  *
28192  * Since: 2.26
28193  */
28194
28195
28196 /**
28197  * g_settings_backend_writable_changed:
28198  * @backend: a #GSettingsBackend implementation
28199  * @key: the name of the key
28200  *
28201  * Signals that the writability of a single key has possibly changed.
28202  * Since GSettings performs no locking operations for itself, this call
28203  * will always be made in response to external events.
28204  *
28205  * Since: 2.26
28206  */
28207
28208
28209 /**
28210  * g_settings_bind:
28211  * @settings: a #GSettings object
28212  * @key: the key to bind
28213  * @object: (type GObject.Object): a #GObject
28214  * @property: the name of the property to bind
28215  * @flags: flags for the binding
28216  *
28217  * Create a binding between the @key in the @settings object
28218  * and the property @property of @object.
28219  * The binding uses the default GIO mapping functions to map
28220  * between the settings and property values. These functions
28221  * handle booleans, numeric types and string types in a
28222  * straightforward way. Use g_settings_bind_with_mapping() if
28223  * you need a custom mapping, or map between types that are not
28224  * supported by the default mapping functions.
28225  * Unless the @flags include %G_SETTINGS_BIND_NO_SENSITIVITY, this
28226  * function also establishes a binding between the writability of
28227  * a boolean property by that name). See g_settings_bind_writable()
28228  * for more details about writable bindings.
28229  * Note that the lifecycle of the binding is tied to the object,
28230  * and that you can have only one binding per object property.
28231  * If you bind the same property twice on the same object, the second
28232  * binding overrides the first one.
28233  *
28234  * Since: 2.26
28235  */
28236
28237
28238 /**
28239  * g_settings_bind_with_mapping: (skip)
28240  * @settings: a #GSettings object
28241  * @key: the key to bind
28242  * @object: (type GObject.Object): a #GObject
28243  * @property: the name of the property to bind
28244  * @flags: flags for the binding
28245  * @get_mapping: a function that gets called to convert values from @settings to @object, or %NULL to use the default GIO mapping
28246  * @set_mapping: a function that gets called to convert values from @object to @settings, or %NULL to use the default GIO mapping
28247  * @user_data: data that gets passed to @get_mapping and @set_mapping
28248  * @destroy: #GDestroyNotify function for @user_data
28249  *
28250  * Create a binding between the @key in the @settings object
28251  * and the property @property of @object.
28252  * The binding uses the provided mapping functions to map between
28253  * settings and property values.
28254  * Note that the lifecycle of the binding is tied to the object,
28255  * and that you can have only one binding per object property.
28256  * If you bind the same property twice on the same object, the second
28257  * binding overrides the first one.
28258  *
28259  * Since: 2.26
28260  */
28261
28262
28263 /**
28264  * g_settings_bind_writable:
28265  * @settings: a #GSettings object
28266  * @key: the key to bind
28267  * @object: (type GObject.Object): a #GObject
28268  * @property: the name of a boolean property to bind
28269  * @inverted: whether to 'invert' the value
28270  *
28271  * Create a binding between the writability of @key in the
28272  * The property must be boolean; "sensitive" or "visible"
28273  * properties of widgets are the most likely candidates.
28274  * Writable bindings are always uni-directional; changes of the
28275  * writability of the setting will be propagated to the object
28276  * property, not the other way.
28277  * When the @inverted argument is %TRUE, the binding inverts the
28278  * value as it passes from the setting to the object, i.e. @property
28279  * will be set to %TRUE if the key is <emphasis>not</emphasis>
28280  * writable.
28281  * Note that the lifecycle of the binding is tied to the object,
28282  * and that you can have only one binding per object property.
28283  * If you bind the same property twice on the same object, the second
28284  * binding overrides the first one.
28285  *
28286  * Since: 2.26
28287  */
28288
28289
28290 /**
28291  * g_settings_delay:
28292  * @settings: a #GSettings object
28293  *
28294  * Changes the #GSettings object into 'delay-apply' mode. In this
28295  * mode, changes to @settings are not immediately propagated to the
28296  * backend, but kept locally until g_settings_apply() is called.
28297  *
28298  * Since: 2.26
28299  */
28300
28301
28302 /**
28303  * g_settings_get:
28304  * @settings: a #GSettings object
28305  * @key: the key to get the value for
28306  * @format: a #GVariant format string
28307  * @...: arguments as per @format
28308  *
28309  * Gets the value that is stored at @key in @settings.
28310  * A convenience function that combines g_settings_get_value() with
28311  * g_variant_get().
28312  * It is a programmer error to give a @key that isn't contained in the
28313  * schema for @settings or for the #GVariantType of @format to mismatch
28314  * the type given in the schema.
28315  *
28316  * Since: 2.26
28317  */
28318
28319
28320 /**
28321  * g_settings_get_boolean:
28322  * @settings: a #GSettings object
28323  * @key: the key to get the value for
28324  * @returns: a boolean
28325  *
28326  * Gets the value that is stored at @key in @settings.
28327  * A convenience variant of g_settings_get() for booleans.
28328  * It is a programmer error to give a @key that isn't specified as
28329  * having a boolean type in the schema for @settings.
28330  *
28331  * Since: 2.26
28332  */
28333
28334
28335 /**
28336  * g_settings_get_child:
28337  * @settings: a #GSettings object
28338  * @name: the name of the 'child' schema
28339  * @returns: (transfer full): a 'child' settings object
28340  *
28341  * Creates a 'child' settings object which has a base path of
28342  * <replaceable>base-path</replaceable>/@name, where
28343  * <replaceable>base-path</replaceable> is the base path of @settings.
28344  * The schema for the child settings object must have been declared
28345  * in the schema of @settings using a <tag class="starttag">child</tag> element.
28346  *
28347  * Since: 2.26
28348  */
28349
28350
28351 /**
28352  * g_settings_get_double:
28353  * @settings: a #GSettings object
28354  * @key: the key to get the value for
28355  * @returns: a double
28356  *
28357  * Gets the value that is stored at @key in @settings.
28358  * A convenience variant of g_settings_get() for doubles.
28359  * It is a programmer error to give a @key that isn't specified as
28360  * having a 'double' type in the schema for @settings.
28361  *
28362  * Since: 2.26
28363  */
28364
28365
28366 /**
28367  * g_settings_get_enum:
28368  * @settings: a #GSettings object
28369  * @key: the key to get the value for
28370  * @returns: the enum value
28371  *
28372  * Gets the value that is stored in @settings for @key and converts it
28373  * to the enum value that it represents.
28374  * In order to use this function the type of the value must be a string
28375  * and it must be marked in the schema file as an enumerated type.
28376  * It is a programmer error to give a @key that isn't contained in the
28377  * schema for @settings or is not marked as an enumerated type.
28378  * If the value stored in the configuration database is not a valid
28379  * value for the enumerated type then this function will return the
28380  * default value.
28381  *
28382  * Since: 2.26
28383  */
28384
28385
28386 /**
28387  * g_settings_get_flags:
28388  * @settings: a #GSettings object
28389  * @key: the key to get the value for
28390  * @returns: the flags value
28391  *
28392  * Gets the value that is stored in @settings for @key and converts it
28393  * to the flags value that it represents.
28394  * In order to use this function the type of the value must be an array
28395  * of strings and it must be marked in the schema file as an flags type.
28396  * It is a programmer error to give a @key that isn't contained in the
28397  * schema for @settings or is not marked as a flags type.
28398  * If the value stored in the configuration database is not a valid
28399  * value for the flags type then this function will return the default
28400  * value.
28401  *
28402  * Since: 2.26
28403  */
28404
28405
28406 /**
28407  * g_settings_get_has_unapplied:
28408  * @settings: a #GSettings object
28409  * @returns: %TRUE if @settings has unapplied changes
28410  *
28411  * Returns whether the #GSettings object has any unapplied
28412  * changes.  This can only be the case if it is in 'delayed-apply' mode.
28413  *
28414  * Since: 2.26
28415  */
28416
28417
28418 /**
28419  * g_settings_get_int:
28420  * @settings: a #GSettings object
28421  * @key: the key to get the value for
28422  * @returns: an integer
28423  *
28424  * Gets the value that is stored at @key in @settings.
28425  * A convenience variant of g_settings_get() for 32-bit integers.
28426  * It is a programmer error to give a @key that isn't specified as
28427  * having a int32 type in the schema for @settings.
28428  *
28429  * Since: 2.26
28430  */
28431
28432
28433 /**
28434  * g_settings_get_mapped:
28435  * @settings: a #GSettings object
28436  * @key: the key to get the value for
28437  * @mapping: (scope call): the function to map the value in the settings database to the value used by the application
28438  * @user_data: user data for @mapping
28439  * @returns: (transfer full): the result, which may be %NULL
28440  *
28441  * Gets the value that is stored at @key in @settings, subject to
28442  * application-level validation/mapping.
28443  * You should use this function when the application needs to perform
28444  * some processing on the value of the key (for example, parsing).  The
28445  * indicates that the processing was unsuccessful (due to a parse error,
28446  * for example) then the mapping is tried again with another value.
28447  * This allows a robust 'fall back to defaults' behaviour to be
28448  * implemented somewhat automatically.
28449  * The first value that is tried is the user's setting for the key.  If
28450  * the mapping function fails to map this value, other values may be
28451  * tried in an unspecified order (system or site defaults, translated
28452  * schema default values, untranslated schema default values, etc).
28453  * If the mapping function fails for all possible values, one additional
28454  * If the mapping function still indicates failure at this point then
28455  * the application will be aborted.
28456  * The result parameter for the @mapping function is pointed to a
28457  * #gpointer which is initially set to %NULL.  The same pointer is given
28458  * to each invocation of @mapping.  The final value of that #gpointer is
28459  * what is returned by this function.  %NULL is valid; it is returned
28460  * just as any other value would be.
28461  *
28462  * Attempt is made: the mapping function is called with a %NULL value.
28463  */
28464
28465
28466 /**
28467  * g_settings_get_range:
28468  * @settings: a #GSettings
28469  * @key: the key to query the range of
28470  * @returns: a #GVariant describing the range
28471  *
28472  * Queries the range of a key.
28473  * This function will return a #GVariant that fully describes the range
28474  * of values that are valid for @key.
28475  * The type of #GVariant returned is <literal>(sv)</literal>.  The
28476  * string describes the type of range restriction in effect.  The type
28477  * and meaning of the value contained in the variant depends on the
28478  * string.
28479  * If the string is <literal>'type'</literal> then the variant contains
28480  * an empty array.  The element type of that empty array is the expected
28481  * type of value and all values of that type are valid.
28482  * If the string is <literal>'enum'</literal> then the variant contains
28483  * an array enumerating the possible values.  Each item in the array is
28484  * a possible valid value and no other values are valid.
28485  * If the string is <literal>'flags'</literal> then the variant contains
28486  * an array.  Each item in the array is a value that may appear zero or
28487  * one times in an array to be used as the value for this key.  For
28488  * example, if the variant contained the array <literal>['x',
28489  * 'y']</literal> then the valid values for the key would be
28490  * <literal>[]</literal>, <literal>['x']</literal>,
28491  * <literal>['y']</literal>, <literal>['x', 'y']</literal> and
28492  * <literal>['y', 'x']</literal>.
28493  * Finally, if the string is <literal>'range'</literal> then the variant
28494  * contains a pair of like-typed values -- the minimum and maximum
28495  * permissible values for this key.
28496  * This information should not be used by normal programs.  It is
28497  * considered to be a hint for introspection purposes.  Normal programs
28498  * should already know what is permitted by their own schema.  The
28499  * format may change in any way in the future -- but particularly, new
28500  * forms may be added to the possibilities described above.
28501  * It is a programmer error to give a @key that isn't contained in the
28502  * schema for @settings.
28503  * You should free the returned value with g_variant_unref() when it is
28504  * no longer needed.
28505  *
28506  * Since: 2.28
28507  */
28508
28509
28510 /**
28511  * g_settings_get_string:
28512  * @settings: a #GSettings object
28513  * @key: the key to get the value for
28514  * @returns: a newly-allocated string
28515  *
28516  * Gets the value that is stored at @key in @settings.
28517  * A convenience variant of g_settings_get() for strings.
28518  * It is a programmer error to give a @key that isn't specified as
28519  * having a string type in the schema for @settings.
28520  *
28521  * Since: 2.26
28522  */
28523
28524
28525 /**
28526  * g_settings_get_strv:
28527  * @settings: a #GSettings object
28528  * @key: the key to get the value for
28529  * @returns: (array zero-terminated=1) (transfer full): a newly-allocated, %NULL-terminated array of strings, the value that is stored at @key in @settings.
28530  *
28531  * A convenience variant of g_settings_get() for string arrays.
28532  * It is a programmer error to give a @key that isn't specified as
28533  * having an array of strings type in the schema for @settings.
28534  *
28535  * Since: 2.26
28536  */
28537
28538
28539 /**
28540  * g_settings_get_uint:
28541  * @settings: a #GSettings object
28542  * @key: the key to get the value for
28543  * @returns: an unsigned integer
28544  *
28545  * Gets the value that is stored at @key in @settings.
28546  * A convenience variant of g_settings_get() for 32-bit unsigned
28547  * integers.
28548  * It is a programmer error to give a @key that isn't specified as
28549  * having a uint32 type in the schema for @settings.
28550  *
28551  * Since: 2.30
28552  */
28553
28554
28555 /**
28556  * g_settings_get_value:
28557  * @settings: a #GSettings object
28558  * @key: the key to get the value for
28559  * @returns: a new #GVariant
28560  *
28561  * Gets the value that is stored in @settings for @key.
28562  * It is a programmer error to give a @key that isn't contained in the
28563  * schema for @settings.
28564  *
28565  * Since: 2.26
28566  */
28567
28568
28569 /**
28570  * g_settings_is_writable:
28571  * @settings: a #GSettings object
28572  * @name: the name of a key
28573  * @returns: %TRUE if the key @name is writable
28574  *
28575  * Finds out if a key can be written or not
28576  *
28577  * Since: 2.26
28578  */
28579
28580
28581 /**
28582  * g_settings_list_children:
28583  * @settings: a #GSettings object
28584  * @returns: (transfer full) (element-type utf8): a list of the children on @settings
28585  *
28586  * Gets the list of children on @settings.
28587  * The list is exactly the list of strings for which it is not an error
28588  * to call g_settings_get_child().
28589  * For GSettings objects that are lists, this value can change at any
28590  * time and you should connect to the "children-changed" signal to watch
28591  * request a child after listing it only for it to have been destroyed
28592  * in the meantime.  For this reason, g_settings_get_child() may return
28593  * %NULL even for a child that was listed by this function.
28594  * For GSettings objects that are not lists, you should probably not be
28595  * calling this function from "normal" code (since you should already
28596  * know what children are in your schema).  This function may still be
28597  * useful there for introspection reasons, however.
28598  * You should free the return value with g_strfreev() when you are done
28599  * with it.
28600  *
28601  * For those changes.  note that there is a race condition here: you may
28602  */
28603
28604
28605 /**
28606  * g_settings_list_keys:
28607  * @settings: a #GSettings object
28608  * @returns: (transfer full) (element-type utf8): a list of the keys on @settings
28609  *
28610  * Introspects the list of keys on @settings.
28611  * You should probably not be calling this function from "normal" code
28612  * (since you should already know what keys are in your schema).  This
28613  * function is intended for introspection reasons.
28614  * You should free the return value with g_strfreev() when you are done
28615  * with it.
28616  */
28617
28618
28619 /**
28620  * g_settings_list_relocatable_schemas:
28621  *
28622  * Gets a list of the relocatable #GSettings schemas installed on the
28623  * system.  These are schemas that do not provide their own path.  It is
28624  * usual to instantiate these schemas directly, but if you want to you
28625  * can use g_settings_new_with_path() to specify the path.
28626  * The output of this function, tTaken together with the output of
28627  * g_settings_list_schemas() represents the complete list of all
28628  * installed schemas.
28629  * #GSettings schemas that are available.  The list must not be
28630  * modified or freed.
28631  *
28632  * Returns: (element-type utf8) (transfer none): a list of relocatable
28633  * Since: 2.28
28634  */
28635
28636
28637 /**
28638  * g_settings_list_schemas:
28639  *
28640  * Gets a list of the #GSettings schemas installed on the system.  The
28641  * returned list is exactly the list of schemas for which you may call
28642  * g_settings_new() without adverse effects.
28643  * This function does not list the schemas that do not provide their own
28644  * g_settings_new_with_path()).  See
28645  * g_settings_list_relocatable_schemas() for that.
28646  * schemas that are available.  The list must not be modified or
28647  * freed.
28648  *
28649  * Paths (ie: schemas for which you must use
28650  * Returns: (element-type utf8) (transfer none): a list of #GSettings
28651  * Since: 2.26
28652  */
28653
28654
28655 /**
28656  * g_settings_new:
28657  * @schema: the name of the schema
28658  * @returns: a new #GSettings object
28659  *
28660  * Creates a new #GSettings object with a given schema.
28661  * Signals on the newly created #GSettings object will be dispatched
28662  * via the thread-default #GMainContext in effect at the time of the
28663  * call to g_settings_new().  The new #GSettings will hold a reference
28664  * on the context.  See g_main_context_push_thread_default().
28665  *
28666  * Since: 2.26
28667  */
28668
28669
28670 /**
28671  * g_settings_new_with_backend:
28672  * @schema: the name of the schema
28673  * @backend: the #GSettingsBackend to use
28674  * @returns: a new #GSettings object
28675  *
28676  * Creates a new #GSettings object with a given schema and backend.
28677  * Creating a #GSettings object with a different backend allows accessing
28678  * settings from a database other than the usual one. For example, it may make
28679  * sense to pass a backend corresponding to the "defaults" settings database on
28680  * the system to get a settings object that modifies the system default
28681  * settings instead of the settings for this user.
28682  *
28683  * Since: 2.26
28684  */
28685
28686
28687 /**
28688  * g_settings_new_with_backend_and_path:
28689  * @schema: the name of the schema
28690  * @backend: the #GSettingsBackend to use
28691  * @path: the path to use
28692  * @returns: a new #GSettings object
28693  *
28694  * Creates a new #GSettings object with a given schema, backend and
28695  * path.
28696  * This is a mix of g_settings_new_with_backend() and
28697  * g_settings_new_with_path().
28698  *
28699  * Since: 2.26
28700  */
28701
28702
28703 /**
28704  * g_settings_new_with_path:
28705  * @schema: the name of the schema
28706  * @path: the path to use
28707  * @returns: a new #GSettings object
28708  *
28709  * Creates a new #GSettings object with a given schema and path.
28710  * You only need to do this if you want to directly create a settings
28711  * object with a schema that doesn't have a specified path of its own.
28712  * That's quite rare.
28713  * It is a programmer error to call this function for a schema that
28714  * has an explicitly specified path.
28715  *
28716  * Since: 2.26
28717  */
28718
28719
28720 /**
28721  * g_settings_range_check:
28722  * @settings: a #GSettings
28723  * @key: the key to check
28724  * @value: the value to check
28725  * @returns: %TRUE if @value is valid for @key
28726  *
28727  * Checks if the given @value is of the correct type and within the
28728  * permitted range for @key.
28729  * This API is not intended to be used by normal programs -- they should
28730  * already know what is permitted by their own schemas.  This API is
28731  * meant to be used by programs such as editors or commandline tools.
28732  * It is a programmer error to give a @key that isn't contained in the
28733  * schema for @settings.
28734  *
28735  * Since: 2.28
28736  */
28737
28738
28739 /**
28740  * g_settings_reset:
28741  * @settings: a #GSettings object
28742  * @key: the name of a key
28743  *
28744  * Resets @key to its default value.
28745  * This call resets the key, as much as possible, to its default value.
28746  * That might the value specified in the schema or the one set by the
28747  * administrator.
28748  */
28749
28750
28751 /**
28752  * g_settings_revert:
28753  * @settings: a #GSettings instance
28754  *
28755  * Reverts all non-applied changes to the settings.  This function
28756  * does nothing unless @settings is in 'delay-apply' mode; see
28757  * g_settings_delay().  In the normal case settings are always applied
28758  * immediately.
28759  * Change notifications will be emitted for affected keys.
28760  */
28761
28762
28763 /**
28764  * g_settings_set:
28765  * @settings: a #GSettings object
28766  * @key: the name of the key to set
28767  * @format: a #GVariant format string
28768  * @...: arguments as per @format
28769  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
28770  *
28771  * Sets @key in @settings to @value.
28772  * A convenience function that combines g_settings_set_value() with
28773  * g_variant_new().
28774  * It is a programmer error to give a @key that isn't contained in the
28775  * schema for @settings or for the #GVariantType of @format to mismatch
28776  * the type given in the schema.
28777  *
28778  * Since: 2.26
28779  */
28780
28781
28782 /**
28783  * g_settings_set_boolean:
28784  * @settings: a #GSettings object
28785  * @key: the name of the key to set
28786  * @value: the value to set it to
28787  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
28788  *
28789  * Sets @key in @settings to @value.
28790  * A convenience variant of g_settings_set() for booleans.
28791  * It is a programmer error to give a @key that isn't specified as
28792  * having a boolean type in the schema for @settings.
28793  *
28794  * Since: 2.26
28795  */
28796
28797
28798 /**
28799  * g_settings_set_double:
28800  * @settings: a #GSettings object
28801  * @key: the name of the key to set
28802  * @value: the value to set it to
28803  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
28804  *
28805  * Sets @key in @settings to @value.
28806  * A convenience variant of g_settings_set() for doubles.
28807  * It is a programmer error to give a @key that isn't specified as
28808  * having a 'double' type in the schema for @settings.
28809  *
28810  * Since: 2.26
28811  */
28812
28813
28814 /**
28815  * g_settings_set_enum:
28816  * @settings: a #GSettings object
28817  * @key: a key, within @settings
28818  * @value: an enumerated value
28819  * @returns: %TRUE, if the set succeeds
28820  *
28821  * Looks up the enumerated type nick for @value and writes it to @key,
28822  * within @settings.
28823  * It is a programmer error to give a @key that isn't contained in the
28824  * schema for @settings or is not marked as an enumerated type, or for
28825  * After performing the write, accessing @key directly with
28826  * g_settings_get_string() will return the 'nick' associated with
28827  */
28828
28829
28830 /**
28831  * g_settings_set_flags:
28832  * @settings: a #GSettings object
28833  * @key: a key, within @settings
28834  * @value: a flags value
28835  * @returns: %TRUE, if the set succeeds
28836  *
28837  * Looks up the flags type nicks for the bits specified by @value, puts
28838  * them in an array of strings and writes the array to @key, withing
28839  * It is a programmer error to give a @key that isn't contained in the
28840  * schema for @settings or is not marked as a flags type, or for @value
28841  * to contain any bits that are not value for the named type.
28842  * After performing the write, accessing @key directly with
28843  * g_settings_get_strv() will return an array of 'nicks'; one for each
28844  * bit in @value.
28845  */
28846
28847
28848 /**
28849  * g_settings_set_int:
28850  * @settings: a #GSettings object
28851  * @key: the name of the key to set
28852  * @value: the value to set it to
28853  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
28854  *
28855  * Sets @key in @settings to @value.
28856  * A convenience variant of g_settings_set() for 32-bit integers.
28857  * It is a programmer error to give a @key that isn't specified as
28858  * having a int32 type in the schema for @settings.
28859  *
28860  * Since: 2.26
28861  */
28862
28863
28864 /**
28865  * g_settings_set_string:
28866  * @settings: a #GSettings object
28867  * @key: the name of the key to set
28868  * @value: the value to set it to
28869  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
28870  *
28871  * Sets @key in @settings to @value.
28872  * A convenience variant of g_settings_set() for strings.
28873  * It is a programmer error to give a @key that isn't specified as
28874  * having a string type in the schema for @settings.
28875  *
28876  * Since: 2.26
28877  */
28878
28879
28880 /**
28881  * g_settings_set_strv:
28882  * @settings: a #GSettings object
28883  * @key: the name of the key to set
28884  * @value: (allow-none) (array zero-terminated=1): the value to set it to, or %NULL
28885  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
28886  *
28887  * Sets @key in @settings to @value.
28888  * A convenience variant of g_settings_set() for string arrays.  If
28889  * It is a programmer error to give a @key that isn't specified as
28890  * having an array of strings type in the schema for @settings.
28891  *
28892  * Since: 2.26
28893  */
28894
28895
28896 /**
28897  * g_settings_set_uint:
28898  * @settings: a #GSettings object
28899  * @key: the name of the key to set
28900  * @value: the value to set it to
28901  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
28902  *
28903  * Sets @key in @settings to @value.
28904  * A convenience variant of g_settings_set() for 32-bit unsigned
28905  * integers.
28906  * It is a programmer error to give a @key that isn't specified as
28907  * having a uint32 type in the schema for @settings.
28908  *
28909  * Since: 2.30
28910  */
28911
28912
28913 /**
28914  * g_settings_set_value:
28915  * @settings: a #GSettings object
28916  * @key: the name of the key to set
28917  * @value: a #GVariant of the correct type
28918  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
28919  *
28920  * Sets @key in @settings to @value.
28921  * It is a programmer error to give a @key that isn't contained in the
28922  * schema for @settings or for @value to have the incorrect type, per
28923  * the schema.
28924  * If @value is floating then this function consumes the reference.
28925  *
28926  * Since: 2.26
28927  */
28928
28929
28930 /**
28931  * g_settings_sync:
28932  *
28933  * Ensures that all pending operations for the given are complete for
28934  * the default backend.
28935  * Writes made to a #GSettings are handled asynchronously.  For this
28936  * reason, it is very unlikely that the changes have it to disk by the
28937  * time g_settings_set() returns.
28938  * This call will block until all of the writes have made it to the
28939  * backend.  Since the mainloop is not running, no change notifications
28940  * will be dispatched during this call (but some may be queued by the
28941  * time the call is done).
28942  */
28943
28944
28945 /**
28946  * g_settings_unbind:
28947  * @object: the object
28948  * @property: the property whose binding is removed
28949  *
28950  * Removes an existing binding for @property on @object.
28951  * Note that bindings are automatically removed when the
28952  * object is finalized, so it is rarely necessary to call this
28953  * function.
28954  *
28955  * Since: 2.26
28956  */
28957
28958
28959 /**
28960  * g_signal_connect:
28961  * @instance: the instance to connect to.
28962  * @detailed_signal: a string of the form "signal-name::detail".
28963  * @c_handler: the #GCallback to connect.
28964  * @data: data to pass to @c_handler calls.
28965  *
28966  * Connects a #GCallback function to a signal for a particular object.
28967  * The handler will be called before the default handler of the signal.
28968  *
28969  * Returns: the handler id
28970  */
28971
28972
28973 /**
28974  * g_signal_connect_after:
28975  * @instance: the instance to connect to.
28976  * @detailed_signal: a string of the form "signal-name::detail".
28977  * @c_handler: the #GCallback to connect.
28978  * @data: data to pass to @c_handler calls.
28979  *
28980  * Connects a #GCallback function to a signal for a particular object.
28981  * The handler will be called after the default handler of the signal.
28982  *
28983  * Returns: the handler id
28984  */
28985
28986
28987 /**
28988  * g_signal_connect_swapped:
28989  * @instance: the instance to connect to.
28990  * @detailed_signal: a string of the form "signal-name::detail".
28991  * @c_handler: the #GCallback to connect.
28992  * @data: data to pass to @c_handler calls.
28993  *
28994  * Connects a #GCallback function to a signal for a particular object.
28995  * The instance on which the signal is emitted and @data will be swapped when
28996  * calling the handler.
28997  *
28998  * Returns: the handler id
28999  */
29000
29001
29002 /**
29003  * g_signal_handlers_block_by_func:
29004  * @instance: The instance to block handlers from.
29005  * @func: The C closure callback of the handlers (useless for non-C closures).
29006  * @data: The closure data of the handlers' closures.
29007  *
29008  * Blocks all handlers on an instance that match @func and @data.
29009  *
29010  * Returns: The number of handlers that matched.
29011  */
29012
29013
29014 /**
29015  * g_signal_handlers_disconnect_by_func:
29016  * @instance: The instance to remove handlers from.
29017  * @func: The C closure callback of the handlers (useless for non-C closures).
29018  * @data: The closure data of the handlers' closures.
29019  *
29020  * Disconnects all handlers on an instance that match @func and @data.
29021  *
29022  * Returns: The number of handlers that matched.
29023  */
29024
29025
29026 /**
29027  * g_signal_handlers_unblock_by_func:
29028  * @instance: The instance to unblock handlers from.
29029  * @func: The C closure callback of the handlers (useless for non-C closures).
29030  * @data: The closure data of the handlers' closures.
29031  *
29032  * Unblocks all handlers on an instance that match @func and @data.
29033  *
29034  * Returns: The number of handlers that matched.
29035  */
29036
29037
29038 /**
29039  * g_simple_action_group_insert:
29040  * @simple: a #GSimpleActionGroup
29041  * @action: a #GAction
29042  *
29043  * Adds an action to the action group.
29044  * If the action group already contains an action with the same name as
29045  * The action group takes its own reference on @action.
29046  *
29047  * Since: 2.28
29048  */
29049
29050
29051 /**
29052  * g_simple_action_group_lookup:
29053  * @simple: a #GSimpleActionGroup
29054  * @action_name: the name of an action
29055  *
29056  * Looks up the action with the name @action_name in the group.
29057  * If no such action exists, returns %NULL.
29058  *
29059  * Returns: (transfer none): a #GAction, or %NULL
29060  * Since: 2.28
29061  */
29062
29063
29064 /**
29065  * g_simple_action_group_new:
29066  *
29067  * Creates a new, empty, #GSimpleActionGroup.
29068  *
29069  * Returns: a new #GSimpleActionGroup
29070  * Since: 2.28
29071  */
29072
29073
29074 /**
29075  * g_simple_action_group_remove:
29076  * @simple: a #GSimpleActionGroup
29077  * @action_name: the name of the action
29078  *
29079  * Removes the named action from the action group.
29080  * If no action of this name is in the group then nothing happens.
29081  *
29082  * Since: 2.28
29083  */
29084
29085
29086 /**
29087  * g_simple_action_new:
29088  * @name: the name of the action
29089  * @parameter_type: (allow-none): the type of parameter to the activate function
29090  *
29091  * Creates a new action.
29092  * The created action is stateless.  See g_simple_action_new_stateful().
29093  *
29094  * Returns: a new #GSimpleAction
29095  * Since: 2.28
29096  */
29097
29098
29099 /**
29100  * g_simple_action_new_stateful:
29101  * @name: the name of the action
29102  * @parameter_type: (allow-none): the type of the parameter to the activate function
29103  * @state: the initial state of the action
29104  *
29105  * Creates a new stateful action.
29106  * must have the same #GVariantType as the initial state.
29107  * If the @state GVariant is floating, it is consumed.
29108  *
29109  * Returns: a new #GSimpleAction
29110  * Since: 2.28
29111  */
29112
29113
29114 /**
29115  * g_simple_action_set_enabled:
29116  * @simple: a #GSimpleAction
29117  * @enabled: whether the action is enabled
29118  *
29119  * Sets the action as enabled or not.
29120  * An action must be enabled in order to be activated or in order to
29121  * have its state changed from outside callers.
29122  *
29123  * Since: 2.28
29124  */
29125
29126
29127 /**
29128  * g_simple_async_report_error_in_idle: (skip)
29129  * @object: (allow-none): a #GObject, or %NULL.
29130  * @callback: a #GAsyncReadyCallback.
29131  * @user_data: user data passed to @callback.
29132  * @domain: a #GQuark containing the error domain (usually #G_IO_ERROR).
29133  * @code: a specific error code.
29134  * @format: a formatted error reporting string.
29135  * @...: a list of variables to fill in @format.
29136  *
29137  * Reports an error in an asynchronous function in an idle function by
29138  * directly setting the contents of the #GAsyncResult with the given error
29139  * information.
29140  */
29141
29142
29143 /**
29144  * g_simple_async_report_gerror_in_idle:
29145  * @object: (allow-none): a #GObject, or %NULL
29146  * @callback: (scope async): a #GAsyncReadyCallback.
29147  * @user_data: (closure): user data passed to @callback.
29148  * @error: the #GError to report
29149  *
29150  * Reports an error in an idle function. Similar to
29151  * g_simple_async_report_error_in_idle(), but takes a #GError rather
29152  * than building a new one.
29153  */
29154
29155
29156 /**
29157  * g_simple_async_report_take_gerror_in_idle: (skip)
29158  * @object: (allow-none): a #GObject, or %NULL
29159  * @callback: a #GAsyncReadyCallback.
29160  * @user_data: user data passed to @callback.
29161  * @error: the #GError to report
29162  *
29163  * Reports an error in an idle function. Similar to
29164  * g_simple_async_report_gerror_in_idle(), but takes over the caller's
29165  * ownership of @error, so the caller does not have to free it any more.
29166  *
29167  * Since: 2.28
29168  */
29169
29170
29171 /**
29172  * g_simple_async_result_complete:
29173  * @simple: a #GSimpleAsyncResult.
29174  *
29175  * Completes an asynchronous I/O job immediately. Must be called in
29176  * the thread where the asynchronous result was to be delivered, as it
29177  * invokes the callback directly. If you are in a different thread use
29178  * g_simple_async_result_complete_in_idle().
29179  * Calling this function takes a reference to @simple for as long as
29180  * is needed to complete the call.
29181  */
29182
29183
29184 /**
29185  * g_simple_async_result_complete_in_idle:
29186  * @simple: a #GSimpleAsyncResult.
29187  *
29188  * Completes an asynchronous function in an idle handler in the <link
29189  * linkend="g-main-context-push-thread-default">thread-default main
29190  * loop</link> of the thread that @simple was initially created in.
29191  * Calling this function takes a reference to @simple for as long as
29192  * is needed to complete the call.
29193  */
29194
29195
29196 /**
29197  * g_simple_async_result_get_op_res_gboolean:
29198  * @simple: a #GSimpleAsyncResult.
29199  *
29200  * Gets the operation result boolean from within the asynchronous result.
29201  * if the operation's result was %FALSE.
29202  *
29203  * Returns: %TRUE if the operation's result was %TRUE, %FALSE
29204  */
29205
29206
29207 /**
29208  * g_simple_async_result_get_op_res_gpointer: (skip)
29209  * @simple: a #GSimpleAsyncResult.
29210  *
29211  * Gets a pointer result as returned by the asynchronous function.
29212  *
29213  * Returns: a pointer from the result.
29214  */
29215
29216
29217 /**
29218  * g_simple_async_result_get_op_res_gssize:
29219  * @simple: a #GSimpleAsyncResult.
29220  *
29221  * Gets a gssize from the asynchronous result.
29222  *
29223  * Returns: a gssize returned from the asynchronous function.
29224  */
29225
29226
29227 /**
29228  * g_simple_async_result_get_source_tag: (skip)
29229  * @simple: a #GSimpleAsyncResult.
29230  *
29231  * Gets the source tag for the #GSimpleAsyncResult.
29232  *
29233  * Returns: a #gpointer to the source object for the #GSimpleAsyncResult.
29234  */
29235
29236
29237 /**
29238  * g_simple_async_result_is_valid:
29239  * @result: the #GAsyncResult passed to the _finish function.
29240  * @source: the #GObject passed to the _finish function.
29241  * @source_tag: the asynchronous function.
29242  *
29243  * Ensures that the data passed to the _finish function of an async
29244  * operation is consistent.  Three checks are performed.
29245  * First, @result is checked to ensure that it is really a
29246  * #GSimpleAsyncResult.  Second, @source is checked to ensure that it
29247  * matches the source object of @result.  Third, @source_tag is
29248  * checked to ensure that it is either %NULL (as it is when the result was
29249  * created by g_simple_async_report_error_in_idle() or
29250  * g_simple_async_report_gerror_in_idle()) or equal to the
29251  * convention, is a pointer to the _async function corresponding to the
29252  * _finish function from which this function is called).
29253  *
29254  * Returns: #TRUE if all checks passed or #FALSE if any failed.
29255  * Since: 2.20
29256  */
29257
29258
29259 /**
29260  * g_simple_async_result_new:
29261  * @source_object: (allow-none): a #GObject, or %NULL.
29262  * @callback: (scope async): a #GAsyncReadyCallback.
29263  * @user_data: (closure): user data passed to @callback.
29264  * @source_tag: the asynchronous function.
29265  *
29266  * Creates a #GSimpleAsyncResult.
29267  *
29268  * Returns: a #GSimpleAsyncResult.
29269  */
29270
29271
29272 /**
29273  * g_simple_async_result_new_error:
29274  * @source_object: (allow-none): a #GObject, or %NULL.
29275  * @callback: (scope async): a #GAsyncReadyCallback.
29276  * @user_data: (closure): user data passed to @callback.
29277  * @domain: a #GQuark.
29278  * @code: an error code.
29279  * @format: a string with format characters.
29280  * @...: a list of values to insert into @format.
29281  *
29282  * Creates a new #GSimpleAsyncResult with a set error.
29283  *
29284  * Returns: a #GSimpleAsyncResult.
29285  */
29286
29287
29288 /**
29289  * g_simple_async_result_new_from_error:
29290  * @source_object: (allow-none): a #GObject, or %NULL.
29291  * @callback: (scope async): a #GAsyncReadyCallback.
29292  * @user_data: (closure): user data passed to @callback.
29293  * @error: a #GError
29294  *
29295  * Creates a #GSimpleAsyncResult from an error condition.
29296  *
29297  * Returns: a #GSimpleAsyncResult.
29298  */
29299
29300
29301 /**
29302  * g_simple_async_result_new_take_error: (skip)
29303  * @source_object: (allow-none): a #GObject, or %NULL
29304  * @callback: (scope async): a #GAsyncReadyCallback
29305  * @user_data: (closure): user data passed to @callback
29306  * @error: a #GError
29307  *
29308  * Creates a #GSimpleAsyncResult from an error condition, and takes over the
29309  * caller's ownership of @error, so the caller does not need to free it anymore.
29310  *
29311  * Returns: a #GSimpleAsyncResult
29312  * Since: 2.28
29313  */
29314
29315
29316 /**
29317  * g_simple_async_result_propagate_error:
29318  * @simple: a #GSimpleAsyncResult.
29319  * @dest: (out): a location to propagate the error to.
29320  *
29321  * Propagates an error from within the simple asynchronous result to
29322  * a given destination.
29323  *
29324  * Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise.
29325  */
29326
29327
29328 /**
29329  * g_simple_async_result_run_in_thread: (skip)
29330  * @simple: a #GSimpleAsyncResult.
29331  * @func: a #GSimpleAsyncThreadFunc.
29332  * @io_priority: the io priority of the request.
29333  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29334  *
29335  * Runs the asynchronous job in a separate thread and then calls
29336  * g_simple_async_result_complete_in_idle() on @simple to return
29337  * the result to the appropriate main loop.
29338  * Calling this function takes a reference to @simple for as long as
29339  * is needed to run the job and report its completion.
29340  */
29341
29342
29343 /**
29344  * g_simple_async_result_set_error: (skip)
29345  * @simple: a #GSimpleAsyncResult.
29346  * @domain: a #GQuark (usually #G_IO_ERROR).
29347  * @code: an error code.
29348  * @format: a formatted error reporting string.
29349  * @...: a list of variables to fill in @format.
29350  *
29351  * Sets an error within the asynchronous result without a #GError.
29352  */
29353
29354
29355 /**
29356  * g_simple_async_result_set_error_va: (skip)
29357  * @simple: a #GSimpleAsyncResult.
29358  * @domain: a #GQuark (usually #G_IO_ERROR).
29359  * @code: an error code.
29360  * @format: a formatted error reporting string.
29361  * @args: va_list of arguments.
29362  *
29363  * Sets an error within the asynchronous result without a #GError.
29364  * Unless writing a binding, see g_simple_async_result_set_error().
29365  */
29366
29367
29368 /**
29369  * g_simple_async_result_set_from_error:
29370  * @simple: a #GSimpleAsyncResult.
29371  * @error: #GError.
29372  *
29373  * Sets the result from a #GError.
29374  */
29375
29376
29377 /**
29378  * g_simple_async_result_set_handle_cancellation:
29379  * @simple: a #GSimpleAsyncResult.
29380  * @handle_cancellation: a #gboolean.
29381  *
29382  * Sets whether to handle cancellation within the asynchronous operation.
29383  */
29384
29385
29386 /**
29387  * g_simple_async_result_set_op_res_gboolean:
29388  * @simple: a #GSimpleAsyncResult.
29389  * @op_res: a #gboolean.
29390  *
29391  * Sets the operation result to a boolean within the asynchronous result.
29392  */
29393
29394
29395 /**
29396  * g_simple_async_result_set_op_res_gpointer: (skip)
29397  * @simple: a #GSimpleAsyncResult.
29398  * @op_res: a pointer result from an asynchronous function.
29399  * @destroy_op_res: a #GDestroyNotify function.
29400  *
29401  * Sets the operation result within the asynchronous result to a pointer.
29402  */
29403
29404
29405 /**
29406  * g_simple_async_result_set_op_res_gssize:
29407  * @simple: a #GSimpleAsyncResult.
29408  * @op_res: a #gssize.
29409  *
29410  * Sets the operation result within the asynchronous result to
29411  * the given @op_res.
29412  */
29413
29414
29415 /**
29416  * g_simple_async_result_take_error: (skip)
29417  * @simple: a #GSimpleAsyncResult
29418  * @error: a #GError
29419  *
29420  * Sets the result from @error, and takes over the caller's ownership
29421  * of @error, so the caller does not need to free it any more.
29422  *
29423  * Since: 2.28
29424  */
29425
29426
29427 /**
29428  * g_simple_permission_new:
29429  * @allowed: %TRUE if the action is allowed
29430  * @returns: the #GSimplePermission, as a #GPermission
29431  *
29432  * Creates a new #GPermission instance that represents an action that is
29433  * either always or never allowed.
29434  *
29435  * Since: 2.26
29436  */
29437
29438
29439 /**
29440  * g_socket_accept:
29441  * @socket: a #GSocket.
29442  * @cancellable: (allow-none): a %GCancellable or %NULL
29443  * @error: #GError for error reporting, or %NULL to ignore.
29444  *
29445  * Accept incoming connections on a connection-based socket. This removes
29446  * the first outstanding connection request from the listening socket and
29447  * creates a #GSocket object for it.
29448  * The @socket must be bound to a local address with g_socket_bind() and
29449  * must be listening for incoming connections (g_socket_listen()).
29450  * If there are no outstanding connections then the operation will block
29451  * or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.
29452  * To be notified of an incoming connection, wait for the %G_IO_IN condition.
29453  * Free the returned object with g_object_unref().
29454  *
29455  * Returns: (transfer full): a new #GSocket, or %NULL on error.
29456  * Since: 2.22
29457  */
29458
29459
29460 /**
29461  * g_socket_address_enumerator_next:
29462  * @enumerator: a #GSocketAddressEnumerator
29463  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29464  * @error: a #GError.
29465  *
29466  * Retrieves the next #GSocketAddress from @enumerator. Note that this
29467  * may block for some amount of time. (Eg, a #GNetworkAddress may need
29468  * to do a DNS lookup before it can return an address.) Use
29469  * g_socket_address_enumerator_next_async() if you need to avoid
29470  * blocking.
29471  * If @enumerator is expected to yield addresses, but for some reason
29472  * is unable to (eg, because of a DNS error), then the first call to
29473  * g_socket_address_enumerator_next() will return an appropriate error
29474  * in *@error. However, if the first call to
29475  * g_socket_address_enumerator_next() succeeds, then any further
29476  * internal errors (other than @cancellable being triggered) will be
29477  * ignored.
29478  * error (in which case *@error will be set) or if there are no
29479  * more addresses.
29480  *
29481  * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
29482  */
29483
29484
29485 /**
29486  * g_socket_address_enumerator_next_async:
29487  * @enumerator: a #GSocketAddressEnumerator
29488  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29489  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
29490  * @user_data: (closure): the data to pass to callback function
29491  *
29492  * Asynchronously retrieves the next #GSocketAddress from @enumerator
29493  * and then calls @callback, which must call
29494  * g_socket_address_enumerator_next_finish() to get the result.
29495  */
29496
29497
29498 /**
29499  * g_socket_address_enumerator_next_finish:
29500  * @enumerator: a #GSocketAddressEnumerator
29501  * @result: a #GAsyncResult
29502  * @error: a #GError
29503  *
29504  * Retrieves the result of a completed call to
29505  * g_socket_address_enumerator_next_async(). See
29506  * g_socket_address_enumerator_next() for more information about
29507  * error handling.
29508  * error (in which case *@error will be set) or if there are no
29509  * more addresses.
29510  *
29511  * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
29512  */
29513
29514
29515 /**
29516  * g_socket_address_get_family:
29517  * @address: a #GSocketAddress
29518  *
29519  * Gets the socket family type of @address.
29520  *
29521  * Returns: the socket family type of @address.
29522  * Since: 2.22
29523  */
29524
29525
29526 /**
29527  * g_socket_address_get_native_size:
29528  * @address: a #GSocketAddress
29529  *
29530  * Gets the size of @address's native <type>struct sockaddr</type>.
29531  * You can use this to allocate memory to pass to
29532  * g_socket_address_to_native().
29533  *
29534  * Returns: the size of the native <type>struct sockaddr</type> that
29535  * Since: 2.22
29536  */
29537
29538
29539 /**
29540  * g_socket_address_new_from_native:
29541  * @native: a pointer to a <type>struct sockaddr</type>
29542  * @len: the size of the memory location pointed to by @native
29543  *
29544  * Creates a #GSocketAddress subclass corresponding to the native
29545  * <type>struct sockaddr</type> @native.
29546  * otherwise %NULL.
29547  *
29548  * Returns: a new #GSocketAddress if @native could successfully be converted,
29549  * Since: 2.22
29550  */
29551
29552
29553 /**
29554  * g_socket_address_to_native:
29555  * @address: a #GSocketAddress
29556  * @dest: a pointer to a memory location that will contain the native <type>struct sockaddr</type>.
29557  * @destlen: the size of @dest. Must be at least as large as g_socket_address_get_native_size().
29558  * @error: #GError for error reporting, or %NULL to ignore.
29559  *
29560  * Converts a #GSocketAddress to a native <type>struct
29561  * sockaddr</type>, which can be passed to low-level functions like
29562  * connect() or bind().
29563  * If not enough space is availible, a %G_IO_ERROR_NO_SPACE error is
29564  * returned. If the address type is not known on the system
29565  * then a %G_IO_ERROR_NOT_SUPPORTED error is returned.
29566  *
29567  * Returns: %TRUE if @dest was filled in, %FALSE on error
29568  * Since: 2.22
29569  */
29570
29571
29572 /**
29573  * g_socket_bind:
29574  * @socket: a #GSocket.
29575  * @address: a #GSocketAddress specifying the local address.
29576  * @allow_reuse: whether to allow reusing this address
29577  * @error: #GError for error reporting, or %NULL to ignore.
29578  *
29579  * When a socket is created it is attached to an address family, but it
29580  * doesn't have an address in this family. g_socket_bind() assigns the
29581  * address (sometimes called name) of the socket.
29582  * It is generally required to bind to a local address before you can
29583  * receive connections. (See g_socket_listen() and g_socket_accept() ).
29584  * In certain situations, you may also want to bind a socket that will be
29585  * used to initiate connections, though this is not normally required.
29586  * eventually call g_socket_accept() on), and %FALSE for client sockets.
29587  * (Specifically, if it is %TRUE, then g_socket_bind() will set the
29588  * %SO_REUSEADDR flag on the socket, allowing it to bind @address even if
29589  * that address was previously used by another socket that has not yet been
29590  * fully cleaned-up by the kernel. Failing to set this flag on a server
29591  * socket may cause the bind call to return %G_IO_ERROR_ADDRESS_IN_USE if
29592  * the server program is stopped and then immediately restarted.)
29593  *
29594  * Returns: %TRUE on success, %FALSE on error.
29595  * Since: 2.22
29596  */
29597
29598
29599 /**
29600  * g_socket_check_connect_result:
29601  * @socket: a #GSocket
29602  * @error: #GError for error reporting, or %NULL to ignore.
29603  *
29604  * Checks and resets the pending connect error for the socket.
29605  * This is used to check for errors when g_socket_connect() is
29606  * used in non-blocking mode.
29607  *
29608  * Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error
29609  * Since: 2.22
29610  */
29611
29612
29613 /**
29614  * g_socket_client_add_application_proxy:
29615  * @client: a #GSocketClient
29616  * @protocol: The proxy protocol
29617  *
29618  * Enable proxy protocols to be handled by the application. When the
29619  * indicated proxy protocol is returned by the #GProxyResolver,
29620  * #GSocketClient will consider this protocol as supported but will
29621  * not try to find a #GProxy instance to handle handshaking. The
29622  * application must check for this case by calling
29623  * g_socket_connection_get_remote_address() on the returned
29624  * #GSocketConnection, and seeing if it's a #GProxyAddress of the
29625  * appropriate type, to determine whether or not it needs to handle
29626  * the proxy handshaking itself.
29627  * This should be used for proxy protocols that are dialects of
29628  * another protocol such as HTTP proxy. It also allows cohabitation of
29629  * proxy protocols that are reused between protocols. A good example
29630  * is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also
29631  * be use as generic socket proxy through the HTTP CONNECT method.
29632  */
29633
29634
29635 /**
29636  * g_socket_client_connect:
29637  * @client: a #GSocketClient.
29638  * @connectable: a #GSocketConnectable specifying the remote address.
29639  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29640  * @error: #GError for error reporting, or %NULL to ignore.
29641  *
29642  * Tries to resolve the @connectable and make a network connection to it.
29643  * Upon a successful connection, a new #GSocketConnection is constructed
29644  * and returned.  The caller owns this new object and must drop their
29645  * reference to it when finished with it.
29646  * The type of the #GSocketConnection object returned depends on the type of
29647  * the underlying socket that is used. For instance, for a TCP/IP connection
29648  * it will be a #GTcpConnection.
29649  * The socket created will be the same family as the address that the
29650  * or indirectly via g_socket_client_set_local_address(). The socket type
29651  * defaults to %G_SOCKET_TYPE_STREAM but can be set with
29652  * g_socket_client_set_socket_type().
29653  * If a local address is specified with g_socket_client_set_local_address() the
29654  * socket will be bound to this address before connecting.
29655  *
29656  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
29657  * Since: 2.22
29658  */
29659
29660
29661 /**
29662  * g_socket_client_connect_async:
29663  * @client: a #GSocketClient
29664  * @connectable: a #GSocketConnectable specifying the remote address.
29665  * @cancellable: (allow-none): a #GCancellable, or %NULL
29666  * @callback: (scope async): a #GAsyncReadyCallback
29667  * @user_data: (closure): user data for the callback
29668  *
29669  * This is the asynchronous version of g_socket_client_connect().
29670  * When the operation is finished @callback will be
29671  * called. You can then call g_socket_client_connect_finish() to get
29672  * the result of the operation.
29673  *
29674  * Since: 2.22
29675  */
29676
29677
29678 /**
29679  * g_socket_client_connect_finish:
29680  * @client: a #GSocketClient.
29681  * @result: a #GAsyncResult.
29682  * @error: a #GError location to store the error occurring, or %NULL to ignore.
29683  *
29684  * Finishes an async connect operation. See g_socket_client_connect_async()
29685  *
29686  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
29687  * Since: 2.22
29688  */
29689
29690
29691 /**
29692  * g_socket_client_connect_to_host:
29693  * @client: a #GSocketClient
29694  * @host_and_port: the name and optionally port of the host to connect to
29695  * @default_port: the default port to connect to
29696  * @cancellable: (allow-none): a #GCancellable, or %NULL
29697  * @error: a pointer to a #GError, or %NULL
29698  *
29699  * This is a helper function for g_socket_client_connect().
29700  * Attempts to create a TCP connection to the named host.
29701  * address, an IPv4 address, or a domain name (in which case a DNS
29702  * lookup is performed).  Quoting with [] is supported for all address
29703  * types.  A port override may be specified in the usual way with a
29704  * colon.  Ports may be given as decimal numbers or symbolic names (in
29705  * which case an /etc/services lookup is performed).
29706  * If no port override is given in @host_and_port then @default_port will be
29707  * used as the port number to connect to.
29708  * In general, @host_and_port is expected to be provided by the user (allowing
29709  * them to give the hostname, and a port override if necessary) and
29710  * In the case that an IP address is given, a single connection
29711  * attempt is made.  In the case that a name is given, multiple
29712  * connection attempts may be made, in turn and according to the
29713  * number of address records in DNS, until a connection succeeds.
29714  * Upon a successful connection, a new #GSocketConnection is constructed
29715  * and returned.  The caller owns this new object and must drop their
29716  * reference to it when finished with it.
29717  * In the event of any failure (DNS error, service not found, no hosts
29718  * connectable) %NULL is returned and @error (if non-%NULL) is set
29719  * accordingly.
29720  *
29721  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
29722  * Since: 2.22
29723  */
29724
29725
29726 /**
29727  * g_socket_client_connect_to_host_async:
29728  * @client: a #GSocketClient
29729  * @host_and_port: the name and optionally the port of the host to connect to
29730  * @default_port: the default port to connect to
29731  * @cancellable: (allow-none): a #GCancellable, or %NULL
29732  * @callback: (scope async): a #GAsyncReadyCallback
29733  * @user_data: (closure): user data for the callback
29734  *
29735  * This is the asynchronous version of g_socket_client_connect_to_host().
29736  * When the operation is finished @callback will be
29737  * called. You can then call g_socket_client_connect_to_host_finish() to get
29738  * the result of the operation.
29739  *
29740  * Since: 2.22
29741  */
29742
29743
29744 /**
29745  * g_socket_client_connect_to_host_finish:
29746  * @client: a #GSocketClient.
29747  * @result: a #GAsyncResult.
29748  * @error: a #GError location to store the error occurring, or %NULL to ignore.
29749  *
29750  * Finishes an async connect operation. See g_socket_client_connect_to_host_async()
29751  *
29752  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
29753  * Since: 2.22
29754  */
29755
29756
29757 /**
29758  * g_socket_client_connect_to_service:
29759  * @client: a #GSocketConnection
29760  * @domain: a domain name
29761  * @service: the name of the service to connect to
29762  * @cancellable: (allow-none): a #GCancellable, or %NULL
29763  * @error: a pointer to a #GError, or %NULL
29764  * @returns: (transfer full): a #GSocketConnection if successful, or %NULL on error
29765  *
29766  * Attempts to create a TCP connection to a service.
29767  * This call looks up the SRV record for @service at @domain for the
29768  * "tcp" protocol.  It then attempts to connect, in turn, to each of
29769  * the hosts providing the service until either a connection succeeds
29770  * or there are no hosts remaining.
29771  * Upon a successful connection, a new #GSocketConnection is constructed
29772  * and returned.  The caller owns this new object and must drop their
29773  * reference to it when finished with it.
29774  * In the event of any failure (DNS error, service not found, no hosts
29775  * connectable) %NULL is returned and @error (if non-%NULL) is set
29776  * accordingly.
29777  */
29778
29779
29780 /**
29781  * g_socket_client_connect_to_service_async:
29782  * @client: a #GSocketClient
29783  * @domain: a domain name
29784  * @service: the name of the service to connect to
29785  * @cancellable: (allow-none): a #GCancellable, or %NULL
29786  * @callback: (scope async): a #GAsyncReadyCallback
29787  * @user_data: (closure): user data for the callback
29788  *
29789  * This is the asynchronous version of
29790  * g_socket_client_connect_to_service().
29791  *
29792  * Since: 2.22
29793  */
29794
29795
29796 /**
29797  * g_socket_client_connect_to_service_finish:
29798  * @client: a #GSocketClient.
29799  * @result: a #GAsyncResult.
29800  * @error: a #GError location to store the error occurring, or %NULL to ignore.
29801  *
29802  * Finishes an async connect operation. See g_socket_client_connect_to_service_async()
29803  *
29804  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
29805  * Since: 2.22
29806  */
29807
29808
29809 /**
29810  * g_socket_client_connect_to_uri:
29811  * @client: a #GSocketClient
29812  * @uri: A network URI
29813  * @default_port: the default port to connect to
29814  * @cancellable: (allow-none): a #GCancellable, or %NULL
29815  * @error: a pointer to a #GError, or %NULL
29816  *
29817  * This is a helper function for g_socket_client_connect().
29818  * Attempts to create a TCP connection with a network URI.
29819  * component. If a port is not specified in the URI, @default_port
29820  * will be used. TLS will be negotiated if #GSocketClient:tls is %TRUE.
29821  * (#GSocketClient does not know to automatically assume TLS for
29822  * certain URI schemes.)
29823  * Using this rather than g_socket_client_connect() or
29824  * g_socket_client_connect_to_host() allows #GSocketClient to
29825  * determine when to use application-specific proxy protocols.
29826  * Upon a successful connection, a new #GSocketConnection is constructed
29827  * and returned.  The caller owns this new object and must drop their
29828  * reference to it when finished with it.
29829  * In the event of any failure (DNS error, service not found, no hosts
29830  * connectable) %NULL is returned and @error (if non-%NULL) is set
29831  * accordingly.
29832  *
29833  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
29834  * Since: 2.26
29835  */
29836
29837
29838 /**
29839  * g_socket_client_connect_to_uri_async:
29840  * @client: a #GSocketClient
29841  * @uri: a network uri
29842  * @default_port: the default port to connect to
29843  * @cancellable: (allow-none): a #GCancellable, or %NULL
29844  * @callback: (scope async): a #GAsyncReadyCallback
29845  * @user_data: (closure): user data for the callback
29846  *
29847  * This is the asynchronous version of g_socket_client_connect_to_uri().
29848  * When the operation is finished @callback will be
29849  * called. You can then call g_socket_client_connect_to_uri_finish() to get
29850  * the result of the operation.
29851  *
29852  * Since: 2.26
29853  */
29854
29855
29856 /**
29857  * g_socket_client_connect_to_uri_finish:
29858  * @client: a #GSocketClient.
29859  * @result: a #GAsyncResult.
29860  * @error: a #GError location to store the error occurring, or %NULL to ignore.
29861  *
29862  * Finishes an async connect operation. See g_socket_client_connect_to_uri_async()
29863  *
29864  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
29865  * Since: 2.26
29866  */
29867
29868
29869 /**
29870  * g_socket_client_get_enable_proxy:
29871  * @client: a #GSocketClient.
29872  *
29873  * Gets the proxy enable state; see g_socket_client_set_enable_proxy()
29874  *
29875  * Returns: whether proxying is enabled
29876  * Since: 2.26
29877  */
29878
29879
29880 /**
29881  * g_socket_client_get_family:
29882  * @client: a #GSocketClient.
29883  *
29884  * Gets the socket family of the socket client.
29885  * See g_socket_client_set_family() for details.
29886  *
29887  * Returns: a #GSocketFamily
29888  * Since: 2.22
29889  */
29890
29891
29892 /**
29893  * g_socket_client_get_local_address:
29894  * @client: a #GSocketClient.
29895  *
29896  * Gets the local address of the socket client.
29897  * See g_socket_client_set_local_address() for details.
29898  *
29899  * Returns: (transfer none): a #GSocketAddress or %NULL. Do not free.
29900  * Since: 2.22
29901  */
29902
29903
29904 /**
29905  * g_socket_client_get_protocol:
29906  * @client: a #GSocketClient
29907  *
29908  * Gets the protocol name type of the socket client.
29909  * See g_socket_client_set_protocol() for details.
29910  *
29911  * Returns: a #GSocketProtocol
29912  * Since: 2.22
29913  */
29914
29915
29916 /**
29917  * g_socket_client_get_socket_type:
29918  * @client: a #GSocketClient.
29919  *
29920  * Gets the socket type of the socket client.
29921  * See g_socket_client_set_socket_type() for details.
29922  *
29923  * Returns: a #GSocketFamily
29924  * Since: 2.22
29925  */
29926
29927
29928 /**
29929  * g_socket_client_get_timeout:
29930  * @client: a #GSocketClient
29931  *
29932  * Gets the I/O timeout time for sockets created by @client.
29933  * See g_socket_client_set_timeout() for details.
29934  *
29935  * Returns: the timeout in seconds
29936  * Since: 2.26
29937  */
29938
29939
29940 /**
29941  * g_socket_client_get_tls:
29942  * @client: a #GSocketClient.
29943  *
29944  * Gets whether @client creates TLS connections. See
29945  * g_socket_client_set_tls() for details.
29946  *
29947  * Returns: whether @client uses TLS
29948  * Since: 2.28
29949  */
29950
29951
29952 /**
29953  * g_socket_client_get_tls_validation_flags:
29954  * @client: a #GSocketClient.
29955  *
29956  * Gets the TLS validation flags used creating TLS connections via
29957  *
29958  * Returns: the TLS validation flags
29959  * Since: 2.28
29960  */
29961
29962
29963 /**
29964  * g_socket_client_new:
29965  *
29966  * Creates a new #GSocketClient with the default options.
29967  * Free the returned object with g_object_unref().
29968  *
29969  * Returns: a #GSocketClient.
29970  * Since: 2.22
29971  */
29972
29973
29974 /**
29975  * g_socket_client_set_enable_proxy:
29976  * @client: a #GSocketClient.
29977  * @enable: whether to enable proxies
29978  *
29979  * Sets whether or not @client attempts to make connections via a
29980  * proxy server. When enabled (the default), #GSocketClient will use a
29981  * #GProxyResolver to determine if a proxy protocol such as SOCKS is
29982  * needed, and automatically do the necessary proxy negotiation.
29983  *
29984  * Since: 2.26
29985  */
29986
29987
29988 /**
29989  * g_socket_client_set_family:
29990  * @client: a #GSocketClient.
29991  * @family: a #GSocketFamily
29992  *
29993  * Sets the socket family of the socket client.
29994  * If this is set to something other than %G_SOCKET_FAMILY_INVALID
29995  * then the sockets created by this object will be of the specified
29996  * family.
29997  * This might be useful for instance if you want to force the local
29998  * connection to be an ipv4 socket, even though the address might
29999  * be an ipv6 mapped to ipv4 address.
30000  *
30001  * Since: 2.22
30002  */
30003
30004
30005 /**
30006  * g_socket_client_set_local_address:
30007  * @client: a #GSocketClient.
30008  * @address: a #GSocketAddress, or %NULL
30009  *
30010  * Sets the local address of the socket client.
30011  * The sockets created by this object will bound to the
30012  * specified address (if not %NULL) before connecting.
30013  * This is useful if you want to ensure that the local
30014  * side of the connection is on a specific port, or on
30015  * a specific interface.
30016  *
30017  * Since: 2.22
30018  */
30019
30020
30021 /**
30022  * g_socket_client_set_protocol:
30023  * @client: a #GSocketClient.
30024  * @protocol: a #GSocketProtocol
30025  *
30026  * Sets the protocol of the socket client.
30027  * The sockets created by this object will use of the specified
30028  * protocol.
30029  * If @protocol is %0 that means to use the default
30030  * protocol for the socket family and type.
30031  *
30032  * Since: 2.22
30033  */
30034
30035
30036 /**
30037  * g_socket_client_set_socket_type:
30038  * @client: a #GSocketClient.
30039  * @type: a #GSocketType
30040  *
30041  * Sets the socket type of the socket client.
30042  * The sockets created by this object will be of the specified
30043  * type.
30044  * It doesn't make sense to specify a type of %G_SOCKET_TYPE_DATAGRAM,
30045  * as GSocketClient is used for connection oriented services.
30046  *
30047  * Since: 2.22
30048  */
30049
30050
30051 /**
30052  * g_socket_client_set_timeout:
30053  * @client: a #GSocketClient.
30054  * @timeout: the timeout
30055  *
30056  * Sets the I/O timeout for sockets created by @client. @timeout is a
30057  * time in seconds, or 0 for no timeout (the default).
30058  * The timeout value affects the initial connection attempt as well,
30059  * so setting this may cause calls to g_socket_client_connect(), etc,
30060  * to fail with %G_IO_ERROR_TIMED_OUT.
30061  *
30062  * Since: 2.26
30063  */
30064
30065
30066 /**
30067  * g_socket_client_set_tls:
30068  * @client: a #GSocketClient.
30069  * @tls: whether to use TLS
30070  *
30071  * Sets whether @client creates TLS (aka SSL) connections. If @tls is
30072  * %TRUE, @client will wrap its connections in a #GTlsClientConnection
30073  * and perform a TLS handshake when connecting.
30074  * Note that since #GSocketClient must return a #GSocketConnection,
30075  * but #GTlsClientConnection is not a #GSocketConnection, this
30076  * actually wraps the resulting #GTlsClientConnection in a
30077  * #GTcpWrapperConnection when returning it. You can use
30078  * g_tcp_wrapper_connection_get_base_io_stream() on the return value
30079  * to extract the #GTlsClientConnection.
30080  *
30081  * Since: 2.28
30082  */
30083
30084
30085 /**
30086  * g_socket_client_set_tls_validation_flags:
30087  * @client: a #GSocketClient.
30088  * @flags: the validation flags
30089  *
30090  * Sets the TLS validation flags used when creating TLS connections
30091  * via @client. The default value is %G_TLS_CERTIFICATE_VALIDATE_ALL.
30092  *
30093  * Since: 2.28
30094  */
30095
30096
30097 /**
30098  * g_socket_close:
30099  * @socket: a #GSocket
30100  * @error: #GError for error reporting, or %NULL to ignore.
30101  *
30102  * Closes the socket, shutting down any active connection.
30103  * Closing a socket does not wait for all outstanding I/O operations
30104  * to finish, so the caller should not rely on them to be guaranteed
30105  * to complete even if the close returns with no error.
30106  * Once the socket is closed, all other operations will return
30107  * %G_IO_ERROR_CLOSED. Closing a socket multiple times will not
30108  * return an error.
30109  * Sockets will be automatically closed when the last reference
30110  * is dropped, but you might want to call this function to make sure
30111  * resources are released as early as possible.
30112  * Beware that due to the way that TCP works, it is possible for
30113  * recently-sent data to be lost if either you close a socket while the
30114  * %G_IO_IN condition is set, or else if the remote connection tries to
30115  * send something to you after you close the socket but before it has
30116  * finished reading all of the data you sent. There is no easy generic
30117  * way to avoid this problem; the easiest fix is to design the network
30118  * protocol such that the client will never send data "out of turn".
30119  * Another solution is for the server to half-close the connection by
30120  * calling g_socket_shutdown() with only the @shutdown_write flag set,
30121  * and then wait for the client to notice this and close its side of the
30122  * connection, after which the server can safely call g_socket_close().
30123  * (This is what #GTcpConnection does if you call
30124  * g_tcp_connection_set_graceful_disconnect(). But of course, this
30125  * only works if the client will close its connection after the server
30126  * does.)
30127  *
30128  * Returns: %TRUE on success, %FALSE on error
30129  * Since: 2.22
30130  */
30131
30132
30133 /**
30134  * g_socket_condition_check:
30135  * @socket: a #GSocket
30136  * @condition: a #GIOCondition mask to check
30137  *
30138  * Checks on the readiness of @socket to perform operations.
30139  * The operations specified in @condition are checked for and masked
30140  * against the currently-satisfied conditions on @socket. The result
30141  * is returned.
30142  * Note that on Windows, it is possible for an operation to return
30143  * %G_IO_ERROR_WOULD_BLOCK even immediately after
30144  * g_socket_condition_check() has claimed that the socket is ready for
30145  * writing. Rather than calling g_socket_condition_check() and then
30146  * writing to the socket if it succeeds, it is generally better to
30147  * simply try writing to the socket right away, and try again later if
30148  * the initial attempt returns %G_IO_ERROR_WOULD_BLOCK.
30149  * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition;
30150  * these conditions will always be set in the output if they are true.
30151  * This call never blocks.
30152  *
30153  * Returns: the @GIOCondition mask of the current state
30154  * Since: 2.22
30155  */
30156
30157
30158 /**
30159  * g_socket_condition_wait:
30160  * @socket: a #GSocket
30161  * @condition: a #GIOCondition mask to wait for
30162  * @cancellable: (allow-none): a #GCancellable, or %NULL
30163  * @error: a #GError pointer, or %NULL
30164  *
30165  * Waits for @condition to become true on @socket. When the condition
30166  * is met, %TRUE is returned.
30167  * If @cancellable is cancelled before the condition is met, or if the
30168  * socket has a timeout set and it is reached before the condition is
30169  * met, then %FALSE is returned and @error, if non-%NULL, is set to
30170  * the appropriate value (%G_IO_ERROR_CANCELLED or
30171  * %G_IO_ERROR_TIMED_OUT).
30172  *
30173  * Returns: %TRUE if the condition was met, %FALSE otherwise
30174  * Since: 2.22
30175  */
30176
30177
30178 /**
30179  * g_socket_connect:
30180  * @socket: a #GSocket.
30181  * @address: a #GSocketAddress specifying the remote address.
30182  * @cancellable: (allow-none): a %GCancellable or %NULL
30183  * @error: #GError for error reporting, or %NULL to ignore.
30184  *
30185  * Connect the socket to the specified remote address.
30186  * For connection oriented socket this generally means we attempt to make
30187  * a connection to the @address. For a connection-less socket it sets
30188  * the default address for g_socket_send() and discards all incoming datagrams
30189  * from other sources.
30190  * Generally connection oriented sockets can only connect once, but
30191  * connection-less sockets can connect multiple times to change the
30192  * default address.
30193  * If the connect call needs to do network I/O it will block, unless
30194  * non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
30195  * and the user can be notified of the connection finishing by waiting
30196  * for the G_IO_OUT condition. The result of the connection can then be
30197  * checked with g_socket_check_connect_result().
30198  *
30199  * Returns: %TRUE if connected, %FALSE on error.
30200  * Since: 2.22
30201  */
30202
30203
30204 /**
30205  * g_socket_connectable_enumerate:
30206  * @connectable: a #GSocketConnectable
30207  *
30208  * Creates a #GSocketAddressEnumerator for @connectable.
30209  *
30210  * Returns: (transfer full): a new #GSocketAddressEnumerator.
30211  * Since: 2.22
30212  */
30213
30214
30215 /**
30216  * g_socket_connectable_proxy_enumerate:
30217  * @connectable: a #GSocketConnectable
30218  *
30219  * Creates a #GSocketAddressEnumerator for @connectable that will
30220  * return #GProxyAddress<!-- -->es for addresses that you must connect
30221  * to via a proxy.
30222  * If @connectable does not implement
30223  * g_socket_connectable_proxy_enumerate(), this will fall back to
30224  * calling g_socket_connectable_enumerate().
30225  *
30226  * Returns: (transfer full): a new #GSocketAddressEnumerator.
30227  * Since: 2.26
30228  */
30229
30230
30231 /**
30232  * g_socket_connection_factory_create_connection:
30233  * @socket: a #GSocket
30234  *
30235  * Creates a #GSocketConnection subclass of the right type for
30236  *
30237  * Returns: (transfer full): a #GSocketConnection
30238  * Since: 2.22
30239  */
30240
30241
30242 /**
30243  * g_socket_connection_factory_lookup_type:
30244  * @family: a #GSocketFamily
30245  * @type: a #GSocketType
30246  * @protocol_id: a protocol id
30247  *
30248  * Looks up the #GType to be used when creating socket connections on
30249  * sockets with the specified @family, @type and @protocol_id.
30250  * If no type is registered, the #GSocketConnection base type is returned.
30251  *
30252  * Returns: a #GType
30253  * Since: 2.22
30254  */
30255
30256
30257 /**
30258  * g_socket_connection_factory_register_type:
30259  * @g_type: a #GType, inheriting from %G_TYPE_SOCKET_CONNECTION
30260  * @family: a #GSocketFamily
30261  * @type: a #GSocketType
30262  * @protocol: a protocol id
30263  *
30264  * Looks up the #GType to be used when creating socket connections on
30265  * sockets with the specified @family, @type and @protocol.
30266  * If no type is registered, the #GSocketConnection base type is returned.
30267  *
30268  * Since: 2.22
30269  */
30270
30271
30272 /**
30273  * g_socket_connection_get_local_address:
30274  * @connection: a #GSocketConnection
30275  * @error: #GError for error reporting, or %NULL to ignore.
30276  *
30277  * Try to get the local address of a socket connection.
30278  * Free the returned object with g_object_unref().
30279  *
30280  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
30281  * Since: 2.22
30282  */
30283
30284
30285 /**
30286  * g_socket_connection_get_remote_address:
30287  * @connection: a #GSocketConnection
30288  * @error: #GError for error reporting, or %NULL to ignore.
30289  *
30290  * Try to get the remote address of a socket connection.
30291  * Free the returned object with g_object_unref().
30292  *
30293  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
30294  * Since: 2.22
30295  */
30296
30297
30298 /**
30299  * g_socket_connection_get_socket:
30300  * @connection: a #GSocketConnection
30301  *
30302  * Gets the underlying #GSocket object of the connection.
30303  * This can be useful if you want to do something unusual on it
30304  * not supported by the #GSocketConnection APIs.
30305  *
30306  * Returns: (transfer none): a #GSocketAddress or %NULL on error.
30307  * Since: 2.22
30308  */
30309
30310
30311 /**
30312  * g_socket_control_message_deserialize:
30313  * @level: a socket level
30314  * @type: a socket control message type for the given @level
30315  * @size: the size of the data in bytes
30316  * @data: (array length=size) (element-type guint8): pointer to the message data
30317  *
30318  * Tries to deserialize a socket control message of a given
30319  * of #GSocketControlMessage if they can understand this kind
30320  * of message and if so deserialize it into a #GSocketControlMessage.
30321  * If there is no implementation for this kind of control message, %NULL
30322  * will be returned.
30323  *
30324  * Returns: (transfer full): the deserialized message or %NULL
30325  * Since: 2.22
30326  */
30327
30328
30329 /**
30330  * g_socket_control_message_get_level:
30331  * @message: a #GSocketControlMessage
30332  *
30333  * Returns the "level" (i.e. the originating protocol) of the control message.
30334  * This is often SOL_SOCKET.
30335  *
30336  * Returns: an integer describing the level
30337  * Since: 2.22
30338  */
30339
30340
30341 /**
30342  * g_socket_control_message_get_msg_type:
30343  * @message: a #GSocketControlMessage
30344  *
30345  * Returns the protocol specific type of the control message.
30346  * For instance, for UNIX fd passing this would be SCM_RIGHTS.
30347  *
30348  * Returns: an integer describing the type of control message
30349  * Since: 2.22
30350  */
30351
30352
30353 /**
30354  * g_socket_control_message_get_size:
30355  * @message: a #GSocketControlMessage
30356  *
30357  * Returns the space required for the control message, not including
30358  * headers or alignment.
30359  *
30360  * Returns: The number of bytes required.
30361  * Since: 2.22
30362  */
30363
30364
30365 /**
30366  * g_socket_control_message_serialize:
30367  * @message: a #GSocketControlMessage
30368  * @data: A buffer to write data to
30369  *
30370  * Converts the data in the message to bytes placed in the
30371  * message.
30372  * returned by g_socket_control_message_get_size() on this
30373  * object.
30374  *
30375  * Since: 2.22
30376  */
30377
30378
30379 /**
30380  * g_socket_create_source: (skip)
30381  * @socket: a #GSocket
30382  * @condition: a #GIOCondition mask to monitor
30383  * @cancellable: (allow-none): a %GCancellable or %NULL
30384  *
30385  * Creates a %GSource that can be attached to a %GMainContext to monitor
30386  * for the availibility of the specified @condition on the socket.
30387  * The callback on the source is of the #GSocketSourceFunc type.
30388  * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition;
30389  * these conditions will always be reported output if they are true.
30390  * cause the source to trigger, reporting the current condition (which
30391  * is likely 0 unless cancellation happened at the same time as a
30392  * condition change). You can check for this in the callback using
30393  * g_cancellable_is_cancelled().
30394  * If @socket has a timeout set, and it is reached before @condition
30395  * occurs, the source will then trigger anyway, reporting %G_IO_IN or
30396  * %G_IO_OUT depending on @condition. However, @socket will have been
30397  * marked as having had a timeout, and so the next #GSocket I/O method
30398  * you call will then fail with a %G_IO_ERROR_TIMED_OUT.
30399  *
30400  * Returns: (transfer full): a newly allocated %GSource, free with g_source_unref().
30401  * Since: 2.22
30402  */
30403
30404
30405 /**
30406  * g_socket_get_blocking:
30407  * @socket: a #GSocket.
30408  *
30409  * Gets the blocking mode of the socket. For details on blocking I/O,
30410  * see g_socket_set_blocking().
30411  *
30412  * Returns: %TRUE if blocking I/O is used, %FALSE otherwise.
30413  * Since: 2.22
30414  */
30415
30416
30417 /**
30418  * g_socket_get_credentials:
30419  * @socket: a #GSocket.
30420  * @error: #GError for error reporting, or %NULL to ignore.
30421  *
30422  * Returns the credentials of the foreign process connected to this
30423  * socket, if any (e.g. it is only supported for %G_SOCKET_FAMILY_UNIX
30424  * sockets).
30425  * If this operation isn't supported on the OS, the method fails with
30426  * the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented
30427  * by reading the %SO_PEERCRED option on the underlying socket.
30428  * Other ways to obtain credentials from a foreign peer includes the
30429  * #GUnixCredentialsMessage type and
30430  * g_unix_connection_send_credentials() /
30431  * g_unix_connection_receive_credentials() functions.
30432  * that must be freed with g_object_unref().
30433  *
30434  * Returns: (transfer full): %NULL if @error is set, otherwise a #GCredentials object
30435  * Since: 2.26
30436  */
30437
30438
30439 /**
30440  * g_socket_get_family:
30441  * @socket: a #GSocket.
30442  *
30443  * Gets the socket family of the socket.
30444  *
30445  * Returns: a #GSocketFamily
30446  * Since: 2.22
30447  */
30448
30449
30450 /**
30451  * g_socket_get_fd:
30452  * @socket: a #GSocket.
30453  *
30454  * Returns the underlying OS socket object. On unix this
30455  * is a socket file descriptor, and on windows this is
30456  * a Winsock2 SOCKET handle. This may be useful for
30457  * doing platform specific or otherwise unusual operations
30458  * on the socket.
30459  *
30460  * Returns: the file descriptor of the socket.
30461  * Since: 2.22
30462  */
30463
30464
30465 /**
30466  * g_socket_get_keepalive:
30467  * @socket: a #GSocket.
30468  *
30469  * Gets the keepalive mode of the socket. For details on this,
30470  * see g_socket_set_keepalive().
30471  *
30472  * Returns: %TRUE if keepalive is active, %FALSE otherwise.
30473  * Since: 2.22
30474  */
30475
30476
30477 /**
30478  * g_socket_get_listen_backlog:
30479  * @socket: a #GSocket.
30480  *
30481  * Gets the listen backlog setting of the socket. For details on this,
30482  * see g_socket_set_listen_backlog().
30483  *
30484  * Returns: the maximum number of pending connections.
30485  * Since: 2.22
30486  */
30487
30488
30489 /**
30490  * g_socket_get_local_address:
30491  * @socket: a #GSocket.
30492  * @error: #GError for error reporting, or %NULL to ignore.
30493  *
30494  * Try to get the local address of a bound socket. This is only
30495  * useful if the socket has been bound to a local address,
30496  * either explicitly or implicitly when connecting.
30497  * Free the returned object with g_object_unref().
30498  *
30499  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
30500  * Since: 2.22
30501  */
30502
30503
30504 /**
30505  * g_socket_get_protocol:
30506  * @socket: a #GSocket.
30507  *
30508  * Gets the socket protocol id the socket was created with.
30509  * In case the protocol is unknown, -1 is returned.
30510  *
30511  * Returns: a protocol id, or -1 if unknown
30512  * Since: 2.22
30513  */
30514
30515
30516 /**
30517  * g_socket_get_remote_address:
30518  * @socket: a #GSocket.
30519  * @error: #GError for error reporting, or %NULL to ignore.
30520  *
30521  * Try to get the remove address of a connected socket. This is only
30522  * useful for connection oriented sockets that have been connected.
30523  * Free the returned object with g_object_unref().
30524  *
30525  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
30526  * Since: 2.22
30527  */
30528
30529
30530 /**
30531  * g_socket_get_socket_type:
30532  * @socket: a #GSocket.
30533  *
30534  * Gets the socket type of the socket.
30535  *
30536  * Returns: a #GSocketType
30537  * Since: 2.22
30538  */
30539
30540
30541 /**
30542  * g_socket_get_timeout:
30543  * @socket: a #GSocket.
30544  *
30545  * Gets the timeout setting of the socket. For details on this, see
30546  * g_socket_set_timeout().
30547  *
30548  * Returns: the timeout in seconds
30549  * Since: 2.26
30550  */
30551
30552
30553 /**
30554  * g_socket_is_closed:
30555  * @socket: a #GSocket
30556  *
30557  * Checks whether a socket is closed.
30558  *
30559  * Returns: %TRUE if socket is closed, %FALSE otherwise
30560  * Since: 2.22
30561  */
30562
30563
30564 /**
30565  * g_socket_is_connected:
30566  * @socket: a #GSocket.
30567  *
30568  * Check whether the socket is connected. This is only useful for
30569  * connection-oriented sockets.
30570  *
30571  * Returns: %TRUE if socket is connected, %FALSE otherwise.
30572  * Since: 2.22
30573  */
30574
30575
30576 /**
30577  * g_socket_listen:
30578  * @socket: a #GSocket.
30579  * @error: #GError for error reporting, or %NULL to ignore.
30580  *
30581  * Marks the socket as a server socket, i.e. a socket that is used
30582  * to accept incoming requests using g_socket_accept().
30583  * Before calling this the socket must be bound to a local address using
30584  * g_socket_bind().
30585  * To set the maximum amount of outstanding clients, use
30586  * g_socket_set_listen_backlog().
30587  *
30588  * Returns: %TRUE on success, %FALSE on error.
30589  * Since: 2.22
30590  */
30591
30592
30593 /**
30594  * g_socket_listener_accept:
30595  * @listener: a #GSocketListener
30596  * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL
30597  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
30598  * @error: #GError for error reporting, or %NULL to ignore.
30599  *
30600  * Blocks waiting for a client to connect to any of the sockets added
30601  * to the listener. Returns a #GSocketConnection for the socket that was
30602  * accepted.
30603  * If @source_object is not %NULL it will be filled out with the source
30604  * object specified when the corresponding socket or address was added
30605  * to the listener.
30606  * If @cancellable is not %NULL, then the operation can be cancelled by
30607  * triggering the cancellable object from another thread. If the operation
30608  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
30609  *
30610  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
30611  * Since: 2.22
30612  */
30613
30614
30615 /**
30616  * g_socket_listener_accept_async:
30617  * @listener: a #GSocketListener
30618  * @cancellable: (allow-none): a #GCancellable, or %NULL
30619  * @callback: (scope async): a #GAsyncReadyCallback
30620  * @user_data: (closure): user data for the callback
30621  *
30622  * This is the asynchronous version of g_socket_listener_accept().
30623  * When the operation is finished @callback will be
30624  * called. You can then call g_socket_listener_accept_socket()
30625  * to get the result of the operation.
30626  *
30627  * Since: 2.22
30628  */
30629
30630
30631 /**
30632  * g_socket_listener_accept_finish:
30633  * @listener: a #GSocketListener
30634  * @result: a #GAsyncResult.
30635  * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
30636  * @error: a #GError location to store the error occurring, or %NULL to ignore.
30637  *
30638  * Finishes an async accept operation. See g_socket_listener_accept_async()
30639  *
30640  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
30641  * Since: 2.22
30642  */
30643
30644
30645 /**
30646  * g_socket_listener_accept_socket:
30647  * @listener: a #GSocketListener
30648  * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL.
30649  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
30650  * @error: #GError for error reporting, or %NULL to ignore.
30651  *
30652  * Blocks waiting for a client to connect to any of the sockets added
30653  * to the listener. Returns the #GSocket that was accepted.
30654  * If you want to accept the high-level #GSocketConnection, not a #GSocket,
30655  * which is often the case, then you should use g_socket_listener_accept()
30656  * instead.
30657  * If @source_object is not %NULL it will be filled out with the source
30658  * object specified when the corresponding socket or address was added
30659  * to the listener.
30660  * If @cancellable is not %NULL, then the operation can be cancelled by
30661  * triggering the cancellable object from another thread. If the operation
30662  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
30663  *
30664  * Returns: (transfer full): a #GSocket on success, %NULL on error.
30665  * Since: 2.22
30666  */
30667
30668
30669 /**
30670  * g_socket_listener_accept_socket_async:
30671  * @listener: a #GSocketListener
30672  * @cancellable: (allow-none): a #GCancellable, or %NULL
30673  * @callback: (scope async): a #GAsyncReadyCallback
30674  * @user_data: (closure): user data for the callback
30675  *
30676  * This is the asynchronous version of g_socket_listener_accept_socket().
30677  * When the operation is finished @callback will be
30678  * called. You can then call g_socket_listener_accept_socket_finish()
30679  * to get the result of the operation.
30680  *
30681  * Since: 2.22
30682  */
30683
30684
30685 /**
30686  * g_socket_listener_accept_socket_finish:
30687  * @listener: a #GSocketListener
30688  * @result: a #GAsyncResult.
30689  * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
30690  * @error: a #GError location to store the error occurring, or %NULL to ignore.
30691  *
30692  * Finishes an async accept operation. See g_socket_listener_accept_socket_async()
30693  *
30694  * Returns: (transfer full): a #GSocket on success, %NULL on error.
30695  * Since: 2.22
30696  */
30697
30698
30699 /**
30700  * g_socket_listener_add_address:
30701  * @listener: a #GSocketListener
30702  * @address: a #GSocketAddress
30703  * @type: a #GSocketType
30704  * @protocol: a #GSocketProtocol
30705  * @source_object: (allow-none): Optional #GObject identifying this source
30706  * @effective_address: (out) (allow-none): location to store the address that was bound to, or %NULL.
30707  * @error: #GError for error reporting, or %NULL to ignore.
30708  *
30709  * Creates a socket of type @type and protocol @protocol, binds
30710  * it to @address and adds it to the set of sockets we're accepting
30711  * sockets from.
30712  * Note that adding an IPv6 address, depending on the platform,
30713  * may or may not result in a listener that also accepts IPv4
30714  * connections.  For more deterministic behavior, see
30715  * g_socket_listener_add_inet_port().
30716  * to accept to identify this particular source, which is
30717  * useful if you're listening on multiple addresses and do
30718  * different things depending on what address is connected to.
30719  * If successful and @effective_address is non-%NULL then it will
30720  * be set to the address that the binding actually occurred at.  This
30721  * is helpful for determining the port number that was used for when
30722  * requested, belongs to the caller and must be freed.
30723  *
30724  * Requesting a binding to port 0 (ie: "any port").  This address, if
30725  * Returns: %TRUE on success, %FALSE on error.
30726  * Since: 2.22
30727  */
30728
30729
30730 /**
30731  * g_socket_listener_add_any_inet_port:
30732  * @listener: a #GSocketListener
30733  * @source_object: (allow-none): Optional #GObject identifying this source
30734  * @error: a #GError location to store the error occurring, or %NULL to ignore.
30735  *
30736  * Listens for TCP connections on any available port number for both
30737  * IPv6 and IPv4 (if each is available).
30738  * This is useful if you need to have a socket for incoming connections
30739  * but don't care about the specific port number.
30740  * to accept to identify this particular source, which is
30741  * useful if you're listening on multiple addresses and do
30742  * different things depending on what address is connected to.
30743  *
30744  * Returns: the port number, or 0 in case of failure.
30745  * Since: 2.24
30746  */
30747
30748
30749 /**
30750  * g_socket_listener_add_inet_port:
30751  * @listener: a #GSocketListener
30752  * @port: an IP port number (non-zero)
30753  * @source_object: (allow-none): Optional #GObject identifying this source
30754  * @error: #GError for error reporting, or %NULL to ignore.
30755  *
30756  * Helper function for g_socket_listener_add_address() that
30757  * creates a TCP/IP socket listening on IPv4 and IPv6 (if
30758  * supported) on the specified port on all interfaces.
30759  * to accept to identify this particular source, which is
30760  * useful if you're listening on multiple addresses and do
30761  * different things depending on what address is connected to.
30762  *
30763  * Returns: %TRUE on success, %FALSE on error.
30764  * Since: 2.22
30765  */
30766
30767
30768 /**
30769  * g_socket_listener_add_socket:
30770  * @listener: a #GSocketListener
30771  * @socket: a listening #GSocket
30772  * @source_object: (allow-none): Optional #GObject identifying this source
30773  * @error: #GError for error reporting, or %NULL to ignore.
30774  *
30775  * Adds @socket to the set of sockets that we try to accept
30776  * new clients from. The socket must be bound to a local
30777  * address and listened to.
30778  * to accept to identify this particular source, which is
30779  * useful if you're listening on multiple addresses and do
30780  * different things depending on what address is connected to.
30781  *
30782  * Returns: %TRUE on success, %FALSE on error.
30783  * Since: 2.22
30784  */
30785
30786
30787 /**
30788  * g_socket_listener_close:
30789  * @listener: a #GSocketListener
30790  *
30791  * Closes all the sockets in the listener.
30792  *
30793  * Since: 2.22
30794  */
30795
30796
30797 /**
30798  * g_socket_listener_new:
30799  *
30800  * Creates a new #GSocketListener with no sockets to listen for.
30801  * New listeners can be added with e.g. g_socket_listener_add_address()
30802  * or g_socket_listener_add_inet_port().
30803  *
30804  * Returns: a new #GSocketListener.
30805  * Since: 2.22
30806  */
30807
30808
30809 /**
30810  * g_socket_listener_set_backlog:
30811  * @listener: a #GSocketListener
30812  * @listen_backlog: an integer
30813  *
30814  * Sets the listen backlog on the sockets in the listener.
30815  * See g_socket_set_listen_backlog() for details
30816  *
30817  * Since: 2.22
30818  */
30819
30820
30821 /**
30822  * g_socket_new:
30823  * @family: the socket family to use, e.g. %G_SOCKET_FAMILY_IPV4.
30824  * @type: the socket type to use.
30825  * @protocol: the id of the protocol to use, or 0 for default.
30826  * @error: #GError for error reporting, or %NULL to ignore.
30827  *
30828  * Creates a new #GSocket with the defined family, type and protocol.
30829  * If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type
30830  * for the family and type is used.
30831  * The @protocol is a family and type specific int that specifies what
30832  * kind of protocol to use. #GSocketProtocol lists several common ones.
30833  * Many families only support one protocol, and use 0 for this, others
30834  * support several and using 0 means to use the default protocol for
30835  * the family and type.
30836  * The protocol id is passed directly to the operating
30837  * system, so you can use protocols not listed in #GSocketProtocol if you
30838  * know the protocol number used for it.
30839  * Free the returned object with g_object_unref().
30840  *
30841  * Returns: a #GSocket or %NULL on error.
30842  * Since: 2.22
30843  */
30844
30845
30846 /**
30847  * g_socket_new_from_fd:
30848  * @fd: a native socket file descriptor.
30849  * @error: #GError for error reporting, or %NULL to ignore.
30850  *
30851  * Creates a new #GSocket from a native file descriptor
30852  * or winsock SOCKET handle.
30853  * This reads all the settings from the file descriptor so that
30854  * all properties should work. Note that the file descriptor
30855  * will be set to non-blocking mode, independent on the blocking
30856  * mode of the #GSocket.
30857  * Free the returned object with g_object_unref().
30858  *
30859  * Returns: a #GSocket or %NULL on error.
30860  * Since: 2.22
30861  */
30862
30863
30864 /**
30865  * g_socket_receive:
30866  * @socket: a #GSocket
30867  * @buffer: a buffer to read data into (which should be at least @size bytes long).
30868  * @size: the number of bytes you want to read from the socket
30869  * @cancellable: (allow-none): a %GCancellable or %NULL
30870  * @error: #GError for error reporting, or %NULL to ignore.
30871  *
30872  * Receive data (up to @size bytes) from a socket. This is mainly used by
30873  * connection-oriented sockets; it is identical to g_socket_receive_from()
30874  * with @address set to %NULL.
30875  * For %G_SOCKET_TYPE_DATAGRAM and %G_SOCKET_TYPE_SEQPACKET sockets,
30876  * g_socket_receive() will always read either 0 or 1 complete messages from
30877  * the socket. If the received message is too large to fit in @buffer, then
30878  * the data beyond @size bytes will be discarded, without any explicit
30879  * indication that this has occurred.
30880  * For %G_SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any
30881  * number of bytes, up to @size. If more than @size bytes have been
30882  * received, the additional data will be returned in future calls to
30883  * g_socket_receive().
30884  * If the socket is in blocking mode the call will block until there
30885  * is some data to receive, the connection is closed, or there is an
30886  * error. If there is no data available and the socket is in
30887  * non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error will be
30888  * returned. To be notified when data is available, wait for the
30889  * %G_IO_IN condition.
30890  * On error -1 is returned and @error is set accordingly.
30891  * the peer, or -1 on error
30892  *
30893  * Returns: Number of bytes read, or 0 if the connection was closed by
30894  * Since: 2.22
30895  */
30896
30897
30898 /**
30899  * g_socket_receive_from:
30900  * @socket: a #GSocket
30901  * @address: a pointer to a #GSocketAddress pointer, or %NULL
30902  * @buffer: a buffer to read data into (which should be at least @size bytes long).
30903  * @size: the number of bytes you want to read from the socket
30904  * @cancellable: (allow-none): a %GCancellable or %NULL
30905  * @error: #GError for error reporting, or %NULL to ignore.
30906  *
30907  * Receive data (up to @size bytes) from a socket.
30908  * If @address is non-%NULL then @address will be set equal to the
30909  * source address of the received packet.
30910  * See g_socket_receive() for additional information.
30911  * the peer, or -1 on error
30912  *
30913  * Returns: Number of bytes read, or 0 if the connection was closed by
30914  * Since: 2.22
30915  */
30916
30917
30918 /**
30919  * g_socket_receive_message:
30920  * @socket: a #GSocket
30921  * @address: a pointer to a #GSocketAddress pointer, or %NULL
30922  * @vectors: (array length=num_vectors): an array of #GInputVector structs
30923  * @num_vectors: the number of elements in @vectors, or -1
30924  * @messages: (array length=num_messages) (allow-none): a pointer which may be filled with an array of #GSocketControlMessages, or %NULL
30925  * @num_messages: a pointer which will be filled with the number of elements in @messages, or %NULL
30926  * @flags: a pointer to an int containing #GSocketMsgFlags flags
30927  * @cancellable: (allow-none): a %GCancellable or %NULL
30928  * @error: a #GError pointer, or %NULL
30929  *
30930  * Receive data from a socket.  This is the most complicated and
30931  * fully-featured version of this call. For easier use, see
30932  * g_socket_receive() and g_socket_receive_from().
30933  * If @address is non-%NULL then @address will be set equal to the
30934  * source address of the received packet.
30935  * describe the buffers that received data will be scattered into.
30936  * If @num_vectors is -1, then @vectors is assumed to be terminated
30937  * by a #GInputVector with a %NULL buffer pointer.
30938  * As a special case, if @num_vectors is 0 (in which case, @vectors
30939  * may of course be %NULL), then a single byte is received and
30940  * discarded. This is to facilitate the common practice of sending a
30941  * single '\0' byte for the purposes of transferring ancillary data.
30942  * array of #GSocketControlMessage instances or %NULL if no such
30943  * messages was received. These correspond to the control messages
30944  * received from the kernel, one #GSocketControlMessage per message
30945  * from the kernel. This array is %NULL-terminated and must be freed
30946  * by the caller using g_free() after calling g_object_unref() on each
30947  * element. If @messages is %NULL, any control messages received will
30948  * be discarded.
30949  * messages received.
30950  * If both @messages and @num_messages are non-%NULL, then
30951  * for this are available in the #GSocketMsgFlags enum, but the
30952  * values there are the same as the system values, and the flags
30953  * are passed in as-is, so you can pass in system-specific flags too
30954  * (and g_socket_receive_message() may pass system-specific flags out).
30955  * As with g_socket_receive(), data may be discarded if @socket is
30956  * %G_SOCKET_TYPE_DATAGRAM or %G_SOCKET_TYPE_SEQPACKET and you do not
30957  * provide enough buffer space to read a complete message. You can pass
30958  * %G_SOCKET_MSG_PEEK in @flags to peek at the current message without
30959  * removing it from the receive queue, but there is no portable way to find
30960  * out the length of the message other than by reading it into a
30961  * sufficiently-large buffer.
30962  * If the socket is in blocking mode the call will block until there
30963  * is some data to receive, the connection is closed, or there is an
30964  * error. If there is no data available and the socket is in
30965  * non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error will be
30966  * returned. To be notified when data is available, wait for the
30967  * %G_IO_IN condition.
30968  * On error -1 is returned and @error is set accordingly.
30969  * the peer, or -1 on error
30970  *
30971  * In @messages (ie: not including the %NULL terminator).
30972  * Returns: Number of bytes read, or 0 if the connection was closed by
30973  * Since: 2.22
30974  */
30975
30976
30977 /**
30978  * g_socket_receive_with_blocking:
30979  * @socket: a #GSocket
30980  * @buffer: a buffer to read data into (which should be at least @size bytes long).
30981  * @size: the number of bytes you want to read from the socket
30982  * @blocking: whether to do blocking or non-blocking I/O
30983  * @cancellable: (allow-none): a %GCancellable or %NULL
30984  * @error: #GError for error reporting, or %NULL to ignore.
30985  *
30986  * This behaves exactly the same as g_socket_receive(), except that
30987  * the choice of blocking or non-blocking behavior is determined by
30988  * the @blocking argument rather than by @socket's properties.
30989  * the peer, or -1 on error
30990  *
30991  * Returns: Number of bytes read, or 0 if the connection was closed by
30992  * Since: 2.26
30993  */
30994
30995
30996 /**
30997  * g_socket_send:
30998  * @socket: a #GSocket
30999  * @buffer: (array length=size): the buffer containing the data to send.
31000  * @size: the number of bytes to send
31001  * @cancellable: (allow-none): a %GCancellable or %NULL
31002  * @error: #GError for error reporting, or %NULL to ignore.
31003  *
31004  * Tries to send @size bytes from @buffer on the socket. This is
31005  * mainly used by connection-oriented sockets; it is identical to
31006  * g_socket_send_to() with @address set to %NULL.
31007  * If the socket is in blocking mode the call will block until there is
31008  * space for the data in the socket queue. If there is no space available
31009  * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
31010  * will be returned. To be notified when space is available, wait for the
31011  * %G_IO_OUT condition. Note though that you may still receive
31012  * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
31013  * notified of a %G_IO_OUT condition. (On Windows in particular, this is
31014  * very common due to the way the underlying APIs work.)
31015  * On error -1 is returned and @error is set accordingly.
31016  * on error
31017  *
31018  * Returns: Number of bytes written (which may be less than @size), or -1
31019  * Since: 2.22
31020  */
31021
31022
31023 /**
31024  * g_socket_send_message:
31025  * @socket: a #GSocket
31026  * @address: a #GSocketAddress, or %NULL
31027  * @vectors: (array length=num_vectors): an array of #GOutputVector structs
31028  * @num_vectors: the number of elements in @vectors, or -1
31029  * @messages: (array length=num_messages) (allow-none): a pointer to an array of #GSocketControlMessages, or %NULL.
31030  * @num_messages: number of elements in @messages, or -1.
31031  * @flags: an int containing #GSocketMsgFlags flags
31032  * @cancellable: (allow-none): a %GCancellable or %NULL
31033  * @error: #GError for error reporting, or %NULL to ignore.
31034  *
31035  * Send data to @address on @socket.  This is the most complicated and
31036  * fully-featured version of this call. For easier use, see
31037  * g_socket_send() and g_socket_send_to().
31038  * If @address is %NULL then the message is sent to the default receiver
31039  * (set by g_socket_connect()).
31040  * then @vectors is assumed to be terminated by a #GOutputVector with a
31041  * %NULL buffer pointer.) The #GOutputVector structs describe the buffers
31042  * that the sent data will be gathered from. Using multiple
31043  * #GOutputVector<!-- -->s is more memory-efficient than manually copying
31044  * data from multiple sources into a single buffer, and more
31045  * network-efficient than making multiple calls to g_socket_send().
31046  * #GSocketControlMessage instances. These correspond to the control
31047  * messages to be sent on the socket.
31048  * If @num_messages is -1 then @messages is treated as a %NULL-terminated
31049  * array.
31050  * for this are available in the #GSocketMsgFlags enum, but the
31051  * values there are the same as the system values, and the flags
31052  * are passed in as-is, so you can pass in system-specific flags too.
31053  * If the socket is in blocking mode the call will block until there is
31054  * space for the data in the socket queue. If there is no space available
31055  * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
31056  * will be returned. To be notified when space is available, wait for the
31057  * %G_IO_OUT condition. Note though that you may still receive
31058  * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
31059  * notified of a %G_IO_OUT condition. (On Windows in particular, this is
31060  * very common due to the way the underlying APIs work.)
31061  * On error -1 is returned and @error is set accordingly.
31062  * on error
31063  *
31064  * Returns: Number of bytes written (which may be less than @size), or -1
31065  * Since: 2.22
31066  */
31067
31068
31069 /**
31070  * g_socket_send_to:
31071  * @socket: a #GSocket
31072  * @address: a #GSocketAddress, or %NULL
31073  * @buffer: (array length=size): the buffer containing the data to send.
31074  * @size: the number of bytes to send
31075  * @cancellable: (allow-none): a %GCancellable or %NULL
31076  * @error: #GError for error reporting, or %NULL to ignore.
31077  *
31078  * Tries to send @size bytes from @buffer to @address. If @address is
31079  * %NULL then the message is sent to the default receiver (set by
31080  * g_socket_connect()).
31081  * See g_socket_send() for additional information.
31082  * on error
31083  *
31084  * Returns: Number of bytes written (which may be less than @size), or -1
31085  * Since: 2.22
31086  */
31087
31088
31089 /**
31090  * g_socket_send_with_blocking:
31091  * @socket: a #GSocket
31092  * @buffer: (array length=size): the buffer containing the data to send.
31093  * @size: the number of bytes to send
31094  * @blocking: whether to do blocking or non-blocking I/O
31095  * @cancellable: (allow-none): a %GCancellable or %NULL
31096  * @error: #GError for error reporting, or %NULL to ignore.
31097  *
31098  * This behaves exactly the same as g_socket_send(), except that
31099  * the choice of blocking or non-blocking behavior is determined by
31100  * the @blocking argument rather than by @socket's properties.
31101  * on error
31102  *
31103  * Returns: Number of bytes written (which may be less than @size), or -1
31104  * Since: 2.26
31105  */
31106
31107
31108 /**
31109  * g_socket_service_is_active:
31110  * @service: a #GSocketService
31111  *
31112  * Check whether the service is active or not. An active
31113  * service will accept new clients that connect, while
31114  * a non-active service will let connecting clients queue
31115  * up until the service is started.
31116  *
31117  * Returns: %TRUE if the service is active, %FALSE otherwise
31118  * Since: 2.22
31119  */
31120
31121
31122 /**
31123  * g_socket_service_new:
31124  *
31125  * Creates a new #GSocketService with no sockets to listen for.
31126  * New listeners can be added with e.g. g_socket_listener_add_address()
31127  * or g_socket_listener_add_inet_port().
31128  *
31129  * Returns: a new #GSocketService.
31130  * Since: 2.22
31131  */
31132
31133
31134 /**
31135  * g_socket_service_start:
31136  * @service: a #GSocketService
31137  *
31138  * Starts the service, i.e. start accepting connections
31139  * from the added sockets when the mainloop runs.
31140  * This call is threadsafe, so it may be called from a thread
31141  * handling an incoming client request.
31142  *
31143  * Since: 2.22
31144  */
31145
31146
31147 /**
31148  * g_socket_service_stop:
31149  * @service: a #GSocketService
31150  *
31151  * Stops the service, i.e. stops accepting connections
31152  * from the added sockets when the mainloop runs.
31153  * This call is threadsafe, so it may be called from a thread
31154  * handling an incoming client request.
31155  *
31156  * Since: 2.22
31157  */
31158
31159
31160 /**
31161  * g_socket_set_blocking:
31162  * @socket: a #GSocket.
31163  * @blocking: Whether to use blocking I/O or not.
31164  *
31165  * Sets the blocking mode of the socket. In blocking mode
31166  * all operations block until they succeed or there is an error. In
31167  * non-blocking mode all functions return results immediately or
31168  * with a %G_IO_ERROR_WOULD_BLOCK error.
31169  * All sockets are created in blocking mode. However, note that the
31170  * platform level socket is always non-blocking, and blocking mode
31171  * is a GSocket level feature.
31172  *
31173  * Since: 2.22
31174  */
31175
31176
31177 /**
31178  * g_socket_set_keepalive:
31179  * @socket: a #GSocket.
31180  * @keepalive: Value for the keepalive flag
31181  *
31182  * Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When
31183  * this flag is set on a socket, the system will attempt to verify that the
31184  * remote socket endpoint is still present if a sufficiently long period of
31185  * time passes with no data being exchanged. If the system is unable to
31186  * verify the presence of the remote endpoint, it will automatically close
31187  * the connection.
31188  * This option is only functional on certain kinds of sockets. (Notably,
31189  * %G_SOCKET_PROTOCOL_TCP sockets.)
31190  * The exact time between pings is system- and protocol-dependent, but will
31191  * normally be at least two hours. Most commonly, you would set this flag
31192  * on a server socket if you want to allow clients to remain idle for long
31193  * periods of time, but also want to ensure that connections are eventually
31194  * garbage-collected if clients crash or become unreachable.
31195  *
31196  * Since: 2.22
31197  */
31198
31199
31200 /**
31201  * g_socket_set_listen_backlog:
31202  * @socket: a #GSocket.
31203  * @backlog: the maximum number of pending connections.
31204  *
31205  * Sets the maximum number of outstanding connections allowed
31206  * when listening on this socket. If more clients than this are
31207  * connecting to the socket and the application is not handling them
31208  * on time then the new connections will be refused.
31209  * Note that this must be called before g_socket_listen() and has no
31210  * effect if called after that.
31211  *
31212  * Since: 2.22
31213  */
31214
31215
31216 /**
31217  * g_socket_set_timeout:
31218  * @socket: a #GSocket.
31219  * @timeout: the timeout for @socket, in seconds, or 0 for none
31220  *
31221  * Sets the time in seconds after which I/O operations on @socket will
31222  * time out if they have not yet completed.
31223  * On a blocking socket, this means that any blocking #GSocket
31224  * operation will time out after @timeout seconds of inactivity,
31225  * returning %G_IO_ERROR_TIMED_OUT.
31226  * On a non-blocking socket, calls to g_socket_condition_wait() will
31227  * also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources
31228  * created with g_socket_create_source() will trigger after
31229  * set, at which point calling g_socket_receive(), g_socket_send(),
31230  * g_socket_check_connect_result(), etc, will fail with
31231  * %G_IO_ERROR_TIMED_OUT.
31232  * If @timeout is 0 (the default), operations will never time out
31233  * on their own.
31234  * Note that if an I/O operation is interrupted by a signal, this may
31235  * cause the timeout to be reset.
31236  *
31237  * Since: 2.26
31238  */
31239
31240
31241 /**
31242  * g_socket_shutdown:
31243  * @socket: a #GSocket
31244  * @shutdown_read: whether to shut down the read side
31245  * @shutdown_write: whether to shut down the write side
31246  * @error: #GError for error reporting, or %NULL to ignore.
31247  *
31248  * Shut down part of a full-duplex connection.
31249  * If @shutdown_read is %TRUE then the recieving side of the connection
31250  * is shut down, and further reading is disallowed.
31251  * If @shutdown_write is %TRUE then the sending side of the connection
31252  * is shut down, and further writing is disallowed.
31253  * It is allowed for both @shutdown_read and @shutdown_write to be %TRUE.
31254  * One example where this is used is graceful disconnect for TCP connections
31255  * where you close the sending side, then wait for the other side to close
31256  * the connection, thus ensuring that the other side saw all sent data.
31257  *
31258  * Returns: %TRUE on success, %FALSE on error
31259  * Since: 2.22
31260  */
31261
31262
31263 /**
31264  * g_socket_speaks_ipv4:
31265  * @socket: a #GSocket
31266  *
31267  * Checks if a socket is capable of speaking IPv4.
31268  * IPv4 sockets are capable of speaking IPv4.  On some operating systems
31269  * and under some combinations of circumstances IPv6 sockets are also
31270  * capable of speaking IPv4.  See RFC 3493 section 3.7 for more
31271  * information.
31272  * No other types of sockets are currently considered as being capable
31273  * of speaking IPv4.
31274  *
31275  * Returns: %TRUE if this socket can be used with IPv4.
31276  * Since: 2.22
31277  */
31278
31279
31280 /**
31281  * g_srv_target_copy:
31282  * @target: a #GSrvTarget
31283  *
31284  * Copies @target
31285  *
31286  * Returns: a copy of @target
31287  * Since: 2.22
31288  */
31289
31290
31291 /**
31292  * g_srv_target_free:
31293  * @target: a #GSrvTarget
31294  *
31295  * Frees @target
31296  *
31297  * Since: 2.22
31298  */
31299
31300
31301 /**
31302  * g_srv_target_get_hostname:
31303  * @target: a #GSrvTarget
31304  *
31305  * Gets @target's hostname (in ASCII form; if you are going to present
31306  * this to the user, you should use g_hostname_is_ascii_encoded() to
31307  * check if it contains encoded Unicode segments, and use
31308  * g_hostname_to_unicode() to convert it if it does.)
31309  *
31310  * Returns: @target's hostname
31311  * Since: 2.22
31312  */
31313
31314
31315 /**
31316  * g_srv_target_get_port:
31317  * @target: a #GSrvTarget
31318  *
31319  * Gets @target's port
31320  *
31321  * Returns: @target's port
31322  * Since: 2.22
31323  */
31324
31325
31326 /**
31327  * g_srv_target_get_priority:
31328  * @target: a #GSrvTarget
31329  *
31330  * Gets @target's priority. You should not need to look at this;
31331  * #GResolver already sorts the targets according to the algorithm in
31332  * RFC 2782.
31333  *
31334  * Returns: @target's priority
31335  * Since: 2.22
31336  */
31337
31338
31339 /**
31340  * g_srv_target_get_weight:
31341  * @target: a #GSrvTarget
31342  *
31343  * Gets @target's weight. You should not need to look at this;
31344  * #GResolver already sorts the targets according to the algorithm in
31345  * RFC 2782.
31346  *
31347  * Returns: @target's weight
31348  * Since: 2.22
31349  */
31350
31351
31352 /**
31353  * g_srv_target_list_sort: (skip)
31354  * @targets: a #GList of #GSrvTarget
31355  *
31356  * Sorts @targets in place according to the algorithm in RFC 2782.
31357  *
31358  * Returns: (transfer full): the head of the sorted list.
31359  * Since: 2.22
31360  */
31361
31362
31363 /**
31364  * g_srv_target_new:
31365  * @hostname: the host that the service is running on
31366  * @port: the port that the service is running on
31367  * @priority: the target's priority
31368  * @weight: the target's weight
31369  *
31370  * Creates a new #GSrvTarget with the given parameters.
31371  * You should not need to use this; normally #GSrvTarget<!-- -->s are
31372  * created by #GResolver.
31373  *
31374  * Returns: a new #GSrvTarget.
31375  * Since: 2.22
31376  */
31377
31378
31379 /**
31380  * g_tcp_connection_get_graceful_disconnect:
31381  * @connection: a #GTcpConnection
31382  *
31383  * Checks if graceful disconnects are used. See
31384  * g_tcp_connection_set_graceful_disconnect().
31385  *
31386  * Returns: %TRUE if graceful disconnect is used on close, %FALSE otherwise
31387  * Since: 2.22
31388  */
31389
31390
31391 /**
31392  * g_tcp_connection_set_graceful_disconnect:
31393  * @connection: a #GTcpConnection
31394  * @graceful_disconnect: Whether to do graceful disconnects or not
31395  *
31396  * This enabled graceful disconnects on close. A graceful disconnect
31397  * means that we signal the receiving end that the connection is terminated
31398  * and wait for it to close the connection before closing the connection.
31399  * A graceful disconnect means that we can be sure that we successfully sent
31400  * all the outstanding data to the other end, or get an error reported.
31401  * However, it also means we have to wait for all the data to reach the
31402  * other side and for it to acknowledge this by closing the socket, which may
31403  * take a while. For this reason it is disabled by default.
31404  *
31405  * Since: 2.22
31406  */
31407
31408
31409 /**
31410  * g_tcp_wrapper_connection_get_base_io_stream:
31411  * @conn: a #GTcpWrapperConnection
31412  *
31413  * Get's @conn's base #GIOStream
31414  *
31415  * Returns: (transfer none): @conn's base #GIOStream
31416  */
31417
31418
31419 /**
31420  * g_tcp_wrapper_connection_new:
31421  * @base_io_stream: the #GIOStream to wrap
31422  * @socket: the #GSocket associated with @base_io_stream
31423  *
31424  * Wraps @base_io_stream and @socket together as a #GSocketConnection.
31425  *
31426  * Returns: the new #GSocketConnection.
31427  * Since: 2.28
31428  */
31429
31430
31431 /**
31432  * g_themed_icon_append_name:
31433  * @icon: a #GThemedIcon
31434  * @iconname: name of icon to append to list of icons from within @icon.
31435  *
31436  * Append a name to the list of icons from within @icon.
31437  * <note><para>
31438  * Note that doing so invalidates the hash computed by prior calls
31439  * to g_icon_hash().
31440  * </para></note>
31441  */
31442
31443
31444 /**
31445  * g_themed_icon_get_names:
31446  * @icon: a #GThemedIcon.
31447  *
31448  * Gets the names of icons from within @icon.
31449  *
31450  * Returns: (transfer none): a list of icon names.
31451  */
31452
31453
31454 /**
31455  * g_themed_icon_new:
31456  * @iconname: a string containing an icon name.
31457  *
31458  * Creates a new themed icon for @iconname.
31459  *
31460  * Returns: (transfer full): a new #GThemedIcon.
31461  */
31462
31463
31464 /**
31465  * g_themed_icon_new_from_names:
31466  * @iconnames: (array length=len): an array of strings containing icon names.
31467  * @len: the length of the @iconnames array, or -1 if @iconnames is %NULL-terminated
31468  *
31469  * Creates a new themed icon for @iconnames.
31470  *
31471  * Returns: (transfer full): a new #GThemedIcon
31472  */
31473
31474
31475 /**
31476  * g_themed_icon_new_with_default_fallbacks:
31477  * @iconname: a string containing an icon name
31478  *
31479  * Creates a new themed icon for @iconname, and all the names
31480  * that can be created by shortening @iconname at '-' characters.
31481  * In the following example, @icon1 and @icon2 are equivalent:
31482  * |[
31483  * const char *names[] = {
31484  * "gnome-dev-cdrom-audio",
31485  * "gnome-dev-cdrom",
31486  * "gnome-dev",
31487  * "gnome"
31488  * };
31489  * icon1 = g_themed_icon_new_from_names (names, 4);
31490  * icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
31491  * ]|
31492  *
31493  * Returns: (transfer full): a new #GThemedIcon.
31494  */
31495
31496
31497 /**
31498  * g_themed_icon_prepend_name:
31499  * @icon: a #GThemedIcon
31500  * @iconname: name of icon to prepend to list of icons from within @icon.
31501  *
31502  * Prepend a name to the list of icons from within @icon.
31503  * <note><para>
31504  * Note that doing so invalidates the hash computed by prior calls
31505  * to g_icon_hash().
31506  * </para></note>
31507  *
31508  * Since: 2.18
31509  */
31510
31511
31512 /**
31513  * g_threaded_socket_service_new:
31514  * @max_threads: the maximal number of threads to execute concurrently handling incoming clients, -1 means no limit
31515  *
31516  * Creates a new #GThreadedSocketService with no listeners. Listeners
31517  * must be added with one of the #GSocketListener "add" methods.
31518  *
31519  * Returns: a new #GSocketService.
31520  * Since: 2.22
31521  */
31522
31523
31524 /**
31525  * g_time_zone_monitor_get:
31526  *
31527  * Gets the singleton instance of the #GTimeZoneMonitor class, creating
31528  * it if required.
31529  * You should call g_object_unref() on the result when you no longer
31530  * need it.  Be aware, though, that this will not destroy the instance,
31531  * so if you connected to the changed signal, you are required to
31532  * disconnect from it for yourself.
31533  * There is only one instance of #GTimeZoneMonitor and it dispatches its
31534  * signals via the default #GMainContext.  There is no way to create an
31535  * instance that will dispatch signals using a different context.
31536  *
31537  * Returns: a reference to the #GTimeZoneMonitor.
31538  */
31539
31540
31541 /**
31542  * g_tls_backend_get_certificate_type:
31543  * @backend: the #GTlsBackend
31544  *
31545  * Gets the #GType of @backend's #GTlsCertificate implementation.
31546  * implementation.
31547  *
31548  * Returns: the #GType of @backend's #GTlsCertificate
31549  * Since: 2.28
31550  */
31551
31552
31553 /**
31554  * g_tls_backend_get_client_connection_type:
31555  * @backend: the #GTlsBackend
31556  *
31557  * Gets the #GType of @backend's #GTlsClientConnection implementation.
31558  * implementation.
31559  *
31560  * Returns: the #GType of @backend's #GTlsClientConnection
31561  * Since: 2.28
31562  */
31563
31564
31565 /**
31566  * g_tls_backend_get_default:
31567  *
31568  * Gets the default #GTlsBackend for the system.
31569  *
31570  * Returns: (transfer none): a #GTlsBackend
31571  * Since: 2.28
31572  */
31573
31574
31575 /**
31576  * g_tls_backend_get_server_connection_type:
31577  * @backend: the #GTlsBackend
31578  *
31579  * Gets the #GType of @backend's #GTlsServerConnection implementation.
31580  * implementation.
31581  *
31582  * Returns: the #GType of @backend's #GTlsServerConnection
31583  * Since: 2.28
31584  */
31585
31586
31587 /**
31588  * g_tls_backend_supports_tls:
31589  * @backend: the #GTlsBackend
31590  *
31591  * Checks if TLS is supported; if this returns %FALSE for the default
31592  * #GTlsBackend, it means no "real" TLS backend is available.
31593  *
31594  * Returns: whether or not TLS is supported
31595  * Since: 2.28
31596  */
31597
31598
31599 /**
31600  * g_tls_certificate_get_issuer:
31601  * @cert: a #GTlsCertificate
31602  *
31603  * Gets the #GTlsCertificate representing @cert's issuer, if known
31604  * or %NULL if @cert is self-signed or signed with an unknown
31605  * certificate.
31606  *
31607  * Returns: (transfer none): The certificate of @cert's issuer,
31608  * Since: 2.28
31609  */
31610
31611
31612 /**
31613  * g_tls_certificate_list_new_from_file:
31614  * @file: file containing PEM-encoded certificates to import
31615  * @error: #GError for error reporting, or %NULL to ignore.
31616  *
31617  * Creates one or more #GTlsCertificate<!-- -->s from the PEM-encoded
31618  * data in @file. If @file cannot be read or parsed, the function will
31619  * return %NULL and set @error. If @file does not contain any
31620  * PEM-encoded certificates, this will return an empty list and not
31621  * set @error.
31622  * #GList containing #GTlsCertificate objects. You must free the list
31623  * and its contents when you are done with it.
31624  *
31625  * Returns: (element-type Gio.TlsCertificate) (transfer full): a
31626  * Since: 2.28
31627  */
31628
31629
31630 /**
31631  * g_tls_certificate_new_from_file:
31632  * @file: file containing a PEM-encoded certificate to import
31633  * @error: #GError for error reporting, or %NULL to ignore.
31634  *
31635  * Creates a #GTlsCertificate from the PEM-encoded data in @file. If
31636  * set @error. Otherwise, this behaves like g_tls_certificate_new().
31637  *
31638  * Returns: the new certificate, or %NULL on error
31639  * Since: 2.28
31640  */
31641
31642
31643 /**
31644  * g_tls_certificate_new_from_files:
31645  * @cert_file: file containing a PEM-encoded certificate to import
31646  * @key_file: file containing a PEM-encoded private key to import
31647  * @error: #GError for error reporting, or %NULL to ignore.
31648  *
31649  * Creates a #GTlsCertificate from the PEM-encoded data in @cert_file
31650  * and @key_file. If either file cannot be read or parsed, the
31651  * function will return %NULL and set @error. Otherwise, this behaves
31652  * like g_tls_certificate_new().
31653  *
31654  * Returns: the new certificate, or %NULL on error
31655  * Since: 2.28
31656  */
31657
31658
31659 /**
31660  * g_tls_certificate_new_from_pem:
31661  * @data: PEM-encoded certificate data
31662  * @length: the length of @data, or -1 if it's 0-terminated.
31663  * @error: #GError for error reporting, or %NULL to ignore.
31664  *
31665  * Creates a new #GTlsCertificate from the PEM-encoded data in @data.
31666  * If @data includes both a certificate and a private key, then the
31667  * returned certificate will include the private key data as well.
31668  * If @data includes multiple certificates, only the first one will be
31669  * parsed.
31670  *
31671  * Returns: the new certificate, or %NULL if @data is invalid
31672  * Since: 2.28
31673  */
31674
31675
31676 /**
31677  * g_tls_certificate_verify:
31678  * @cert: a #GTlsCertificate
31679  * @identity: (allow-none): the expected peer identity
31680  * @trusted_ca: (allow-none): the certificate of a trusted authority
31681  *
31682  * This verifies @cert and returns a set of #GTlsCertificateFlags
31683  * indicating any problems found with it. This can be used to verify a
31684  * certificate outside the context of making a connection, or to
31685  * check a certificate against a CA that is not part of the system
31686  * CA database.
31687  * If @identity is not %NULL, @cert's name(s) will be compared against
31688  * it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return
31689  * value if it does not match. If @identity is %NULL, that bit will
31690  * never be set in the return value.
31691  * If @trusted_ca is not %NULL, then @cert (or one of the certificates
31692  * in its chain) must be signed by it, or else
31693  * %G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If
31694  * value.
31695  * (All other #GTlsCertificateFlags values will always be set or unset
31696  * as appropriate.)
31697  *
31698  * Returns: the appropriate #GTlsCertificateFlags
31699  * Since: 2.28
31700  */
31701
31702
31703 /**
31704  * g_tls_client_connection_get_accepted_cas:
31705  * @conn: the #GTlsClientConnection
31706  *
31707  * Gets the list of distinguished names of the Certificate Authorities
31708  * that the server will accept certificates from. This will be set
31709  * during the TLS handshake if the server requests a certificate.
31710  * Otherwise, it will be %NULL.
31711  * Each item in the list is a #GByteArray which contains the complete
31712  * subject DN of the certificate authority.
31713  * CA DNs. You should unref each element with g_byte_array_unref() and then
31714  * the free the list with g_list_free().
31715  *
31716  * Returns: (element-type GByteArray) (transfer full): the list of
31717  * Since: 2.28
31718  */
31719
31720
31721 /**
31722  * g_tls_client_connection_get_server_identity:
31723  * @conn: the #GTlsClientConnection
31724  *
31725  * Gets @conn's expected server identity
31726  * expected server identity, or %NULL if the expected identity is not
31727  * known.
31728  *
31729  * Returns: (transfer none): a #GSocketConnectable describing the
31730  * Since: 2.28
31731  */
31732
31733
31734 /**
31735  * g_tls_client_connection_get_use_ssl3:
31736  * @conn: the #GTlsClientConnection
31737  *
31738  * Gets whether @conn will use SSL 3.0 rather than the
31739  * highest-supported version of TLS; see
31740  * g_tls_client_connection_set_use_ssl3().
31741  *
31742  * Returns: whether @conn will use SSL 3.0
31743  * Since: 2.28
31744  */
31745
31746
31747 /**
31748  * g_tls_client_connection_get_validation_flags:
31749  * @conn: the #GTlsClientConnection
31750  *
31751  * Gets @conn's validation flags
31752  *
31753  * Returns: the validation flags
31754  * Since: 2.28
31755  */
31756
31757
31758 /**
31759  * g_tls_client_connection_new:
31760  * @base_io_stream: the #GIOStream to wrap
31761  * @server_identity: (allow-none): the expected identity of the server
31762  * @error: #GError for error reporting, or %NULL to ignore.
31763  *
31764  * Creates a new #GTlsClientConnection wrapping @base_io_stream (which
31765  * must have pollable input and output streams) which is assumed to
31766  * communicate with the server identified by @server_identity.
31767  *
31768  * Returns: the new #GTlsClientConnection, or %NULL on error
31769  * Since: 2.28
31770  */
31771
31772
31773 /**
31774  * g_tls_client_connection_set_server_identity:
31775  * @conn: the #GTlsClientConnection
31776  * @identity: a #GSocketConnectable describing the expected server identity
31777  *
31778  * Sets @conn's expected server identity, which is used both to tell
31779  * servers on virtual hosts which certificate to present, and also
31780  * to let @conn know what name to look for in the certificate when
31781  * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.
31782  *
31783  * Since: 2.28
31784  */
31785
31786
31787 /**
31788  * g_tls_client_connection_set_use_ssl3:
31789  * @conn: the #GTlsClientConnection
31790  * @use_ssl3: whether to use SSL 3.0
31791  *
31792  * If @use_ssl3 is %TRUE, this forces @conn to use SSL 3.0 rather than
31793  * trying to properly negotiate the right version of TLS or SSL to use.
31794  * This can be used when talking to servers that do not implement the
31795  * fallbacks correctly and which will therefore fail to handshake with
31796  * a "modern" TLS handshake attempt.
31797  *
31798  * Since: 2.28
31799  */
31800
31801
31802 /**
31803  * g_tls_client_connection_set_validation_flags:
31804  * @conn: the #GTlsClientConnection
31805  * @flags: the #GTlsCertificateFlags to use
31806  *
31807  * Sets @conn's validation flags, to override the default set of
31808  * checks performed when validating a server certificate. By default,
31809  * %G_TLS_CERTIFICATE_VALIDATE_ALL is used.
31810  *
31811  * Since: 2.28
31812  */
31813
31814
31815 /**
31816  * g_tls_connection_emit_accept_certificate:
31817  * @conn: a #GTlsConnection
31818  * @peer_cert: the peer's #GTlsCertificate
31819  * @errors: the problems with @peer_cert
31820  *
31821  * Used by #GTlsConnection implementations to emit the
31822  * #GTlsConnection::accept-certificate signal.
31823  * %TRUE to accept @peer_cert
31824  *
31825  * Returns: %TRUE if one of the signal handlers has returned
31826  * Since: 2.28
31827  */
31828
31829
31830 /**
31831  * g_tls_connection_get_certificate:
31832  * @conn: a #GTlsConnection
31833  *
31834  * Gets @conn's certificate, as set by
31835  * g_tls_connection_set_certificate().
31836  *
31837  * Returns: (transfer none): @conn's certificate, or %NULL
31838  * Since: 2.28
31839  */
31840
31841
31842 /**
31843  * g_tls_connection_get_peer_certificate:
31844  * @conn: a #GTlsConnection
31845  *
31846  * Gets @conn's peer's certificate after the handshake has completed.
31847  * (It is not set during the emission of
31848  * #GTlsConnection::accept-certificate.)
31849  *
31850  * Returns: (transfer none): @conn's peer's certificate, or %NULL
31851  * Since: 2.28
31852  */
31853
31854
31855 /**
31856  * g_tls_connection_get_peer_certificate_errors:
31857  * @conn: a #GTlsConnection
31858  *
31859  * Gets the errors associated with validating @conn's peer's
31860  * certificate, after the handshake has completed. (It is not set
31861  * during the emission of #GTlsConnection::accept-certificate.)
31862  *
31863  * Returns: @conn's peer's certificate errors
31864  * Since: 2.28
31865  */
31866
31867
31868 /**
31869  * g_tls_connection_get_rehandshake_mode:
31870  * @conn: a #GTlsConnection
31871  *
31872  * Gets @conn rehandshaking mode. See
31873  * g_tls_connection_set_rehandshake_mode() for details.
31874  *
31875  * Returns: @conn's rehandshaking mode
31876  * Since: 2.28
31877  */
31878
31879
31880 /**
31881  * g_tls_connection_get_require_close_notify:
31882  * @conn: a #GTlsConnection
31883  *
31884  * Tests whether or not @conn expects a proper TLS close notification
31885  * when the connection is closed. See
31886  * g_tls_connection_set_require_close_notify() for details.
31887  * notification.
31888  *
31889  * Returns: %TRUE if @conn requires a proper TLS close
31890  * Since: 2.28
31891  */
31892
31893
31894 /**
31895  * g_tls_connection_get_use_system_certdb:
31896  * @conn: a #GTlsConnection
31897  *
31898  * Gets whether @conn uses the system certificate database to verify
31899  * peer certificates. See g_tls_connection_set_use_system_certdb().
31900  *
31901  * Returns: whether @conn uses the system certificate database
31902  * Since: 2.28
31903  */
31904
31905
31906 /**
31907  * g_tls_connection_handshake:
31908  * @conn: a #GTlsConnection
31909  * @cancellable: a #GCancellable, or %NULL
31910  * @error: a #GError, or %NULL
31911  *
31912  * Attempts a TLS handshake on @conn.
31913  * On the client side, it is never necessary to call this method;
31914  * although the connection needs to perform a handshake after
31915  * connecting (or after sending a "STARTTLS"-type command) and may
31916  * need to rehandshake later if the server requests it,
31917  * #GTlsConnection will handle this for you automatically when you try
31918  * to send or receive data on the connection. However, you can call
31919  * g_tls_connection_handshake() manually if you want to know for sure
31920  * whether the initial handshake succeeded or failed (as opposed to
31921  * just immediately trying to write to @conn's output stream, in which
31922  * case if it fails, it may not be possible to tell if it failed
31923  * before or after completing the handshake).
31924  * Likewise, on the server side, although a handshake is necessary at
31925  * the beginning of the communication, you do not need to call this
31926  * function explicitly unless you want clearer error reporting.
31927  * However, you may call g_tls_connection_handshake() later on to
31928  * renegotiate parameters (encryption methods, etc) with the client.
31929  * #GTlsConnection::accept_certificate may be emitted during the
31930  * handshake.
31931  *
31932  * Returns: success or failure
31933  * Since: 2.28
31934  */
31935
31936
31937 /**
31938  * g_tls_connection_handshake_async:
31939  * @conn: a #GTlsConnection
31940  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
31941  * @cancellable: a #GCancellable, or %NULL
31942  * @callback: callback to call when the handshake is complete
31943  * @user_data: the data to pass to the callback function
31944  *
31945  * Asynchronously performs a TLS handshake on @conn. See
31946  * g_tls_connection_handshake() for more information.
31947  *
31948  * Since: 2.28
31949  */
31950
31951
31952 /**
31953  * g_tls_connection_handshake_finish:
31954  * @conn: a #GTlsConnection
31955  * @result: a #GAsyncResult.
31956  * @error: a #GError pointer, or %NULL
31957  *
31958  * Finish an asynchronous TLS handshake operation. See
31959  * g_tls_connection_handshake() for more information.
31960  * case @error will be set.
31961  *
31962  * Returns: %TRUE on success, %FALSE on failure, in which
31963  * Since: 2.28
31964  */
31965
31966
31967 /**
31968  * g_tls_connection_set_certificate:
31969  * @conn: a #GTlsConnection
31970  * @certificate: the certificate to use for @conn
31971  *
31972  * This sets the certificate that @conn will present to its peer
31973  * during the TLS handshake. For a #GTlsServerConnection, it is
31974  * mandatory to set this, and that will normally be done at construct
31975  * time.
31976  * For a #GTlsClientConnection, this is optional. If a handshake fails
31977  * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server
31978  * requires a certificate, and if you try connecting again, you should
31979  * call this method first. You can call
31980  * g_tls_client_connection_get_accepted_cas() on the failed connection
31981  * to get a list of Certificate Authorities that the server will
31982  * accept certificates from.
31983  * (It is also possible that a server will allow the connection with
31984  * or without a certificate; in that case, if you don't provide a
31985  * certificate, you can tell that the server requested one by the fact
31986  * that g_tls_client_connection_get_accepted_cas() will return
31987  * non-%NULL.)
31988  *
31989  * Since: 2.28
31990  */
31991
31992
31993 /**
31994  * g_tls_connection_set_rehandshake_mode:
31995  * @conn: a #GTlsConnection
31996  * @mode: the rehandshaking mode
31997  *
31998  * Sets how @conn behaves with respect to rehandshaking requests.
31999  * %G_TLS_REHANDSHAKE_NEVER means that it will never agree to
32000  * rehandshake after the initial handshake is complete. (For a client,
32001  * this means it will refuse rehandshake requests from the server, and
32002  * for a server, this means it will close the connection with an error
32003  * if the client attempts to rehandshake.)
32004  * %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a
32005  * rehandshake only if the other end of the connection supports the
32006  * TLS <literal>renegotiation_info</literal> extension. This is the
32007  * default behavior, but means that rehandshaking will not work
32008  * against older implementations that do not support that extension.
32009  * %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow
32010  * rehandshaking even without the
32011  * <literal>renegotiation_info</literal> extension. On the server side
32012  * in particular, this is not recommended, since it leaves the server
32013  * open to certain attacks. However, this mode is necessary if you
32014  * need to allow renegotiation with older client software.
32015  *
32016  * Since: 2.28
32017  */
32018
32019
32020 /**
32021  * g_tls_connection_set_require_close_notify:
32022  * @conn: a #GTlsConnection
32023  * @require_close_notify: whether or not to require close notification
32024  *
32025  * Sets whether or not @conn expects a proper TLS close notification
32026  * before the connection is closed. If this is %TRUE (the default),
32027  * then @conn will expect to receive a TLS close notification from its
32028  * peer before the connection is closed, and will return a
32029  * %G_TLS_ERROR_EOF error if the connection is closed without proper
32030  * notification (since this may indicate a network error, or
32031  * man-in-the-middle attack).
32032  * In some protocols, the application will know whether or not the
32033  * connection was closed cleanly based on application-level data
32034  * (because the application-level data includes a length field, or is
32035  * somehow self-delimiting); in this case, the close notify is
32036  * redundant and sometimes omitted. (TLS 1.1 explicitly allows this;
32037  * in TLS 1.0 it is technically an error, but often done anyway.) You
32038  * can use g_tls_connection_set_require_close_notify() to tell @conn
32039  * to allow an "unannounced" connection close, in which case the close
32040  * will show up as a 0-length read, as in a non-TLS
32041  * #GSocketConnection, and it is up to the application to check that
32042  * the data has been fully received.
32043  * Note that this only affects the behavior when the peer closes the
32044  * connection; when the application calls g_io_stream_close() itself
32045  * on @conn, this will send a close notification regardless of the
32046  * setting of this property. If you explicitly want to do an unclean
32047  * close, you can close @conn's #GTlsConnection:base-io-stream rather
32048  * than closing @conn itself.
32049  *
32050  * Since: 2.28
32051  */
32052
32053
32054 /**
32055  * g_tls_connection_set_use_system_certdb:
32056  * @conn: a #GTlsConnection
32057  * @use_system_certdb: whether to use the system certificate database
32058  *
32059  * Sets whether @conn uses the system certificate database to verify
32060  * peer certificates. This is %TRUE by default. If set to %FALSE, then
32061  * peer certificate validation will always set the
32062  * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
32063  * #GTlsConnection::accept-certificate will always be emitted on
32064  * client-side connections, unless that bit is not set in
32065  * #GTlsClientConnection:validation-flags).
32066  *
32067  * Since: 2.28
32068  */
32069
32070
32071 /**
32072  * g_tls_error_quark:
32073  *
32074  * Gets the TLS error quark.
32075  *
32076  * Returns: a #GQuark.
32077  * Since: 2.28
32078  */
32079
32080
32081 /**
32082  * g_tls_server_connection_new:
32083  * @base_io_stream: the #GIOStream to wrap
32084  * @certificate: (allow-none): the default server certificate, or %NULL
32085  * @error: #GError for error reporting, or %NULL to ignore.
32086  *
32087  * Creates a new #GTlsServerConnection wrapping @base_io_stream (which
32088  * must have pollable input and output streams).
32089  *
32090  * Returns: the new #GTlsServerConnection, or %NULL on error
32091  * Since: 2.28
32092  */
32093
32094
32095 /**
32096  * g_try_new:
32097  * @struct_type: the type of the elements to allocate
32098  * @n_structs: the number of elements to allocate
32099  *
32100  * Attempts to allocate @n_structs elements of type @struct_type, and returns
32101  * %NULL on failure. Contrast with g_new(), which aborts the program on failure.
32102  * The returned pointer is cast to a pointer to the given type.
32103  * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
32104  *
32105  * Since: 2.8
32106  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
32107  */
32108
32109
32110 /**
32111  * g_try_new0:
32112  * @struct_type: the type of the elements to allocate
32113  * @n_structs: the number of elements to allocate
32114  *
32115  * Attempts to allocate @n_structs elements of type @struct_type, initialized
32116  * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts
32117  * the program on failure.
32118  * The returned pointer is cast to a pointer to the given type.
32119  * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
32120  *
32121  * Since: 2.8
32122  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
32123  */
32124
32125
32126 /**
32127  * g_try_renew:
32128  * @struct_type: the type of the elements to allocate
32129  * @mem: the currently allocated memory
32130  * @n_structs: the number of elements to allocate
32131  *
32132  * Attempts to reallocate the memory pointed to by @mem, so that it now has
32133  * space for @n_structs elements of type @struct_type, and returns %NULL on
32134  * failure. Contrast with g_renew(), which aborts the program on failure.
32135  * It returns the new address of the memory, which may have been moved.
32136  * The function returns %NULL if an overflow occurs.
32137  *
32138  * Since: 2.8
32139  * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
32140  */
32141
32142
32143 /**
32144  * g_unix_connection_receive_credentials:
32145  * @connection: A #GUnixConnection.
32146  * @cancellable: (allow-none): A #GCancellable or %NULL.
32147  * @error: Return location for error or %NULL.
32148  *
32149  * Receives credentials from the sending end of the connection.  The
32150  * sending end has to call g_unix_connection_send_credentials() (or
32151  * similar) for this to work.
32152  * As well as reading the credentials this also reads (and discards) a
32153  * single byte from the stream, as this is required for credentials
32154  * passing to work on some implementations.
32155  * Other ways to exchange credentials with a foreign peer includes the
32156  * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
32157  * g_object_unref()), %NULL if @error is set.
32158  *
32159  * Returns: (transfer full): Received credentials on success (free with
32160  * Since: 2.26
32161  */
32162
32163
32164 /**
32165  * g_unix_connection_receive_fd:
32166  * @connection: a #GUnixConnection
32167  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
32168  * @error: (allow-none): #GError for error reporting, or %NULL to ignore
32169  *
32170  * Receives a file descriptor from the sending end of the connection.
32171  * The sending end has to call g_unix_connection_send_fd() for this
32172  * to work.
32173  * As well as reading the fd this also reads a single byte from the
32174  * stream, as this is required for fd passing to work on some
32175  * implementations.
32176  *
32177  * Returns: a file descriptor on success, -1 on error.
32178  * Since: 2.22
32179  */
32180
32181
32182 /**
32183  * g_unix_connection_send_credentials:
32184  * @connection: A #GUnixConnection.
32185  * @cancellable: (allow-none): A #GCancellable or %NULL.
32186  * @error: Return location for error or %NULL.
32187  *
32188  * Passes the credentials of the current user the receiving side
32189  * of the connection. The receiving end has to call
32190  * g_unix_connection_receive_credentials() (or similar) to accept the
32191  * credentials.
32192  * As well as sending the credentials this also writes a single NUL
32193  * byte to the stream, as this is required for credentials passing to
32194  * work on some implementations.
32195  * Other ways to exchange credentials with a foreign peer includes the
32196  * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
32197  *
32198  * Returns: %TRUE on success, %FALSE if @error is set.
32199  * Since: 2.26
32200  */
32201
32202
32203 /**
32204  * g_unix_connection_send_fd:
32205  * @connection: a #GUnixConnection
32206  * @fd: a file descriptor
32207  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32208  * @error: (allow-none): #GError for error reporting, or %NULL to ignore.
32209  *
32210  * Passes a file descriptor to the receiving side of the
32211  * connection. The receiving end has to call g_unix_connection_receive_fd()
32212  * to accept the file descriptor.
32213  * As well as sending the fd this also writes a single byte to the
32214  * stream, as this is required for fd passing to work on some
32215  * implementations.
32216  *
32217  * Returns: a %TRUE on success, %NULL on error.
32218  * Since: 2.22
32219  */
32220
32221
32222 /**
32223  * g_unix_credentials_message_get_credentials:
32224  * @message: A #GUnixCredentialsMessage.
32225  *
32226  * Gets the credentials stored in @message.
32227  *
32228  * Returns: (transfer none): A #GCredentials instance. Do not free, it is owned by @message.
32229  * Since: 2.26
32230  */
32231
32232
32233 /**
32234  * g_unix_credentials_message_is_supported:
32235  *
32236  * Checks if passing #GCredentials on a #GSocket is supported on this platform.
32237  *
32238  * Returns: %TRUE if supported, %FALSE otherwise
32239  * Since: 2.26
32240  */
32241
32242
32243 /**
32244  * g_unix_credentials_message_new:
32245  *
32246  * Creates a new #GUnixCredentialsMessage with credentials matching the current processes.
32247  *
32248  * Returns: a new #GUnixCredentialsMessage
32249  * Since: 2.26
32250  */
32251
32252
32253 /**
32254  * g_unix_credentials_message_new_with_credentials:
32255  * @credentials: A #GCredentials object.
32256  *
32257  * Creates a new #GUnixCredentialsMessage holding @credentials.
32258  *
32259  * Returns: a new #GUnixCredentialsMessage
32260  * Since: 2.26
32261  */
32262
32263
32264 /**
32265  * g_unix_fd_list_append:
32266  * @list: a #GUnixFDList
32267  * @fd: a valid open file descriptor
32268  * @error: a #GError pointer
32269  *
32270  * Adds a file descriptor to @list.
32271  * The file descriptor is duplicated using dup(). You keep your copy
32272  * of the descriptor and the copy contained in @list will be closed
32273  * when @list is finalized.
32274  * A possible cause of failure is exceeding the per-process or
32275  * system-wide file descriptor limit.
32276  * The index of the file descriptor in the list is returned.  If you use
32277  * this index with g_unix_fd_list_get() then you will receive back a
32278  * duplicated copy of the same file descriptor.
32279  * (and @error is set)
32280  *
32281  * Returns: the index of the appended fd in case of success, else -1
32282  * Since: 2.24
32283  */
32284
32285
32286 /**
32287  * g_unix_fd_list_get:
32288  * @list: a #GUnixFDList
32289  * @index_: the index into the list
32290  * @error: a #GError pointer
32291  *
32292  * Gets a file descriptor out of @list.
32293  * programmer error for @index_ to be out of range; see
32294  * g_unix_fd_list_get_length().
32295  * The file descriptor is duplicated using dup() and set as
32296  * close-on-exec before being returned.  You must call close() on it
32297  * when you are done.
32298  * A possible cause of failure is exceeding the per-process or
32299  * system-wide file descriptor limit.
32300  *
32301  * Returns: the file descriptor, or -1 in case of error
32302  * Since: 2.24
32303  */
32304
32305
32306 /**
32307  * g_unix_fd_list_get_length:
32308  * @list: a #GUnixFDList
32309  *
32310  * contained within).
32311  *
32312  * Gets the length of @list (ie: the number of file descriptors
32313  * Returns: the length of @list
32314  * Since: 2.24
32315  */
32316
32317
32318 /**
32319  * g_unix_fd_list_new:
32320  *
32321  * Creates a new #GUnixFDList containing no file descriptors.
32322  *
32323  * Returns: a new #GUnixFDList
32324  * Since: 2.24
32325  */
32326
32327
32328 /**
32329  * g_unix_fd_list_new_from_array:
32330  * @fds: (array length=n_fds): the initial list of file descriptors
32331  * @n_fds: the length of #fds, or -1
32332  *
32333  * Creates a new #GUnixFDList containing the file descriptors given in
32334  * may no longer be used by the caller.  The array itself is owned by
32335  * the caller.
32336  * Each file descriptor in the array should be set to close-on-exec.
32337  * If @n_fds is -1 then @fds must be terminated with -1.
32338  *
32339  * Returns: a new #GUnixFDList
32340  * Since: 2.24
32341  */
32342
32343
32344 /**
32345  * g_unix_fd_list_peek_fds:
32346  * @list: a #GUnixFDList
32347  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
32348  *
32349  * Returns the array of file descriptors that is contained in this
32350  * object.
32351  * After this call, the descriptors remain the property of @list.  The
32352  * caller must not close them and must not free the array.  The array is
32353  * valid only until @list is changed in any way.
32354  * If @length is non-%NULL then it is set to the number of file
32355  * descriptors in the returned array. The returned array is also
32356  * terminated with -1.
32357  * This function never returns %NULL. In case there are no file
32358  * descriptors contained in @list, an empty array is returned.
32359  * descriptors
32360  *
32361  * Returns: (array length=length) (transfer none): an array of file
32362  * Since: 2.24
32363  */
32364
32365
32366 /**
32367  * g_unix_fd_list_steal_fds:
32368  * @list: a #GUnixFDList
32369  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
32370  *
32371  * Returns the array of file descriptors that is contained in this
32372  * object.
32373  * After this call, the descriptors are no longer contained in
32374  * descriptors have been added).
32375  * The return result of this function must be freed with g_free().
32376  * The caller is also responsible for closing all of the file
32377  * descriptors.  The file descriptors in the array are set to
32378  * close-on-exec.
32379  * If @length is non-%NULL then it is set to the number of file
32380  * descriptors in the returned array. The returned array is also
32381  * terminated with -1.
32382  * This function never returns %NULL. In case there are no file
32383  * descriptors contained in @list, an empty array is returned.
32384  * descriptors
32385  *
32386  * Returns: (array length=length) (transfer full): an array of file
32387  * Since: 2.24
32388  */
32389
32390
32391 /**
32392  * g_unix_fd_message_append_fd:
32393  * @message: a #GUnixFDMessage
32394  * @fd: a valid open file descriptor
32395  * @error: a #GError pointer
32396  *
32397  * Adds a file descriptor to @message.
32398  * The file descriptor is duplicated using dup(). You keep your copy
32399  * of the descriptor and the copy contained in @message will be closed
32400  * when @message is finalized.
32401  * A possible cause of failure is exceeding the per-process or
32402  * system-wide file descriptor limit.
32403  *
32404  * Returns: %TRUE in case of success, else %FALSE (and @error is set)
32405  * Since: 2.22
32406  */
32407
32408
32409 /**
32410  * g_unix_fd_message_get_fd_list:
32411  * @message: a #GUnixFDMessage
32412  *
32413  * Gets the #GUnixFDList contained in @message.  This function does not
32414  * return a reference to the caller, but the returned list is valid for
32415  * the lifetime of @message.
32416  *
32417  * Returns: (transfer none): the #GUnixFDList from @message
32418  * Since: 2.24
32419  */
32420
32421
32422 /**
32423  * g_unix_fd_message_new:
32424  *
32425  * Creates a new #GUnixFDMessage containing an empty file descriptor
32426  * list.
32427  *
32428  * Returns: a new #GUnixFDMessage
32429  * Since: 2.22
32430  */
32431
32432
32433 /**
32434  * g_unix_fd_message_new_with_fd_list:
32435  * @fd_list: a #GUnixFDList
32436  *
32437  * Creates a new #GUnixFDMessage containing @list.
32438  *
32439  * Returns: a new #GUnixFDMessage
32440  * Since: 2.24
32441  */
32442
32443
32444 /**
32445  * g_unix_fd_message_steal_fds:
32446  * @message: a #GUnixFDMessage
32447  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
32448  *
32449  * Returns the array of file descriptors that is contained in this
32450  * object.
32451  * After this call, the descriptors are no longer contained in
32452  * descriptors have been added).
32453  * The return result of this function must be freed with g_free().
32454  * The caller is also responsible for closing all of the file
32455  * descriptors.
32456  * If @length is non-%NULL then it is set to the number of file
32457  * descriptors in the returned array. The returned array is also
32458  * terminated with -1.
32459  * This function never returns %NULL. In case there are no file
32460  * descriptors contained in @message, an empty array is returned.
32461  * descriptors
32462  *
32463  * Returns: (array length=length) (transfer full): an array of file
32464  * Since: 2.22
32465  */
32466
32467
32468 /**
32469  * g_unix_input_stream_get_close_fd:
32470  * @stream: a #GUnixInputStream
32471  *
32472  * Returns whether the file descriptor of @stream will be
32473  * closed when the stream is closed.
32474  *
32475  * Returns: %TRUE if the file descriptor is closed when done
32476  * Since: 2.20
32477  */
32478
32479
32480 /**
32481  * g_unix_input_stream_get_fd:
32482  * @stream: a #GUnixInputStream
32483  *
32484  * Return the UNIX file descriptor that the stream reads from.
32485  *
32486  * Returns: The file descriptor of @stream
32487  * Since: 2.20
32488  */
32489
32490
32491 /**
32492  * g_unix_input_stream_new:
32493  * @fd: a UNIX file descriptor
32494  * @close_fd: %TRUE to close the file descriptor when done
32495  *
32496  * Creates a new #GUnixInputStream for the given @fd.
32497  * If @close_fd is %TRUE, the file descriptor will be closed
32498  * when the stream is closed.
32499  *
32500  * Returns: a new #GUnixInputStream
32501  */
32502
32503
32504 /**
32505  * g_unix_input_stream_set_close_fd:
32506  * @stream: a #GUnixInputStream
32507  * @close_fd: %TRUE to close the file descriptor when done
32508  *
32509  * Sets whether the file descriptor of @stream shall be closed
32510  * when the stream is closed.
32511  *
32512  * Since: 2.20
32513  */
32514
32515
32516 /**
32517  * g_unix_is_mount_path_system_internal:
32518  * @mount_path: a mount path, e.g. <filename>/media/disk</filename> or <filename>/usr</filename>
32519  *
32520  * Determines if @mount_path is considered an implementation of the
32521  * OS. This is primarily used for hiding mountable and mounted volumes
32522  * that only are used in the OS and has little to no relevance to the
32523  * casual user.
32524  * of the OS.
32525  *
32526  * Returns: %TRUE if @mount_path is considered an implementation detail
32527  */
32528
32529
32530 /**
32531  * g_unix_mount_at: (skip)
32532  * @mount_path: path for a possible unix mount.
32533  * @time_read: (out) (allow-none): guint64 to contain a timestamp.
32534  *
32535  * Gets a #GUnixMountEntry for a given mount path. If @time_read
32536  * is set, it will be filled with a unix timestamp for checking
32537  * if the mounts have changed since with g_unix_mounts_changed_since().
32538  *
32539  * Returns: (transfer full): a #GUnixMountEntry.
32540  */
32541
32542
32543 /**
32544  * g_unix_mount_compare:
32545  * @mount1: first #GUnixMountEntry to compare.
32546  * @mount2: second #GUnixMountEntry to compare.
32547  *
32548  * Compares two unix mounts.
32549  * or less than @mount2, respectively.
32550  *
32551  * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
32552  */
32553
32554
32555 /**
32556  * g_unix_mount_free:
32557  * @mount_entry: a #GUnixMount.
32558  *
32559  * Frees a unix mount.
32560  */
32561
32562
32563 /**
32564  * g_unix_mount_get_device_path:
32565  * @mount_entry: a #GUnixMount.
32566  *
32567  * Gets the device path for a unix mount.
32568  *
32569  * Returns: a string containing the device path.
32570  */
32571
32572
32573 /**
32574  * g_unix_mount_get_fs_type:
32575  * @mount_entry: a #GUnixMount.
32576  *
32577  * Gets the filesystem type for the unix mount.
32578  *
32579  * Returns: a string containing the file system type.
32580  */
32581
32582
32583 /**
32584  * g_unix_mount_get_mount_path:
32585  * @mount_entry: input #GUnixMountEntry to get the mount path for.
32586  *
32587  * Gets the mount path for a unix mount.
32588  *
32589  * Returns: the mount path for @mount_entry.
32590  */
32591
32592
32593 /**
32594  * g_unix_mount_guess_can_eject:
32595  * @mount_entry: a #GUnixMountEntry
32596  *
32597  * Guesses whether a Unix mount can be ejected.
32598  *
32599  * Returns: %TRUE if @mount_entry is deemed to be ejectable.
32600  */
32601
32602
32603 /**
32604  * g_unix_mount_guess_icon:
32605  * @mount_entry: a #GUnixMountEntry
32606  *
32607  * Guesses the icon of a Unix mount.
32608  *
32609  * Returns: (transfer full): a #GIcon
32610  */
32611
32612
32613 /**
32614  * g_unix_mount_guess_name:
32615  * @mount_entry: a #GUnixMountEntry
32616  *
32617  * Guesses the name of a Unix mount.
32618  * The result is a translated string.
32619  * be freed with g_free()
32620  *
32621  * Returns: A newly allocated string that must
32622  */
32623
32624
32625 /**
32626  * g_unix_mount_guess_should_display:
32627  * @mount_entry: a #GUnixMountEntry
32628  *
32629  * Guesses whether a Unix mount should be displayed in the UI.
32630  *
32631  * Returns: %TRUE if @mount_entry is deemed to be displayable.
32632  */
32633
32634
32635 /**
32636  * g_unix_mount_is_readonly:
32637  * @mount_entry: a #GUnixMount.
32638  *
32639  * Checks if a unix mount is mounted read only.
32640  *
32641  * Returns: %TRUE if @mount_entry is read only.
32642  */
32643
32644
32645 /**
32646  * g_unix_mount_is_system_internal:
32647  * @mount_entry: a #GUnixMount.
32648  *
32649  * Checks if a unix mount is a system path.
32650  *
32651  * Returns: %TRUE if the unix mount is for a system path.
32652  */
32653
32654
32655 /**
32656  * g_unix_mount_monitor_new:
32657  *
32658  * Gets a new #GUnixMountMonitor. The default rate limit for which the
32659  * monitor will report consecutive changes for the mount and mount
32660  * point entry files is the default for a #GFileMonitor. Use
32661  * g_unix_mount_monitor_set_rate_limit() to change this.
32662  *
32663  * Returns: a #GUnixMountMonitor.
32664  */
32665
32666
32667 /**
32668  * g_unix_mount_monitor_set_rate_limit:
32669  * @mount_monitor: a #GUnixMountMonitor
32670  * @limit_msec: a integer with the limit in milliseconds to poll for changes.
32671  *
32672  * Sets the rate limit to which the @mount_monitor will report
32673  * consecutive change events to the mount and mount point entry files.
32674  *
32675  * Since: 2.18
32676  */
32677
32678
32679 /**
32680  * g_unix_mount_point_compare:
32681  * @mount1: a #GUnixMount.
32682  * @mount2: a #GUnixMount.
32683  *
32684  * Compares two unix mount points.
32685  * or less than @mount2, respectively.
32686  *
32687  * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
32688  */
32689
32690
32691 /**
32692  * g_unix_mount_point_free:
32693  * @mount_point: unix mount point to free.
32694  *
32695  * Frees a unix mount point.
32696  */
32697
32698
32699 /**
32700  * g_unix_mount_point_get_device_path:
32701  * @mount_point: a #GUnixMountPoint.
32702  *
32703  * Gets the device path for a unix mount point.
32704  *
32705  * Returns: a string containing the device path.
32706  */
32707
32708
32709 /**
32710  * g_unix_mount_point_get_fs_type:
32711  * @mount_point: a #GUnixMountPoint.
32712  *
32713  * Gets the file system type for the mount point.
32714  *
32715  * Returns: a string containing the file system type.
32716  */
32717
32718
32719 /**
32720  * g_unix_mount_point_get_mount_path:
32721  * @mount_point: a #GUnixMountPoint.
32722  *
32723  * Gets the mount path for a unix mount point.
32724  *
32725  * Returns: a string containing the mount path.
32726  */
32727
32728
32729 /**
32730  * g_unix_mount_point_guess_can_eject:
32731  * @mount_point: a #GUnixMountPoint
32732  *
32733  * Guesses whether a Unix mount point can be ejected.
32734  *
32735  * Returns: %TRUE if @mount_point is deemed to be ejectable.
32736  */
32737
32738
32739 /**
32740  * g_unix_mount_point_guess_icon:
32741  * @mount_point: a #GUnixMountPoint
32742  *
32743  * Guesses the icon of a Unix mount point.
32744  *
32745  * Returns: (transfer full): a #GIcon
32746  */
32747
32748
32749 /**
32750  * g_unix_mount_point_guess_name:
32751  * @mount_point: a #GUnixMountPoint
32752  *
32753  * Guesses the name of a Unix mount point.
32754  * The result is a translated string.
32755  * be freed with g_free()
32756  *
32757  * Returns: A newly allocated string that must
32758  */
32759
32760
32761 /**
32762  * g_unix_mount_point_is_loopback:
32763  * @mount_point: a #GUnixMountPoint.
32764  *
32765  * Checks if a unix mount point is a loopback device.
32766  *
32767  * Returns: %TRUE if the mount point is a loopback. %FALSE otherwise.
32768  */
32769
32770
32771 /**
32772  * g_unix_mount_point_is_readonly:
32773  * @mount_point: a #GUnixMountPoint.
32774  *
32775  * Checks if a unix mount point is read only.
32776  *
32777  * Returns: %TRUE if a mount point is read only.
32778  */
32779
32780
32781 /**
32782  * g_unix_mount_point_is_user_mountable:
32783  * @mount_point: a #GUnixMountPoint.
32784  *
32785  * Checks if a unix mount point is mountable by the user.
32786  *
32787  * Returns: %TRUE if the mount point is user mountable.
32788  */
32789
32790
32791 /**
32792  * g_unix_mount_points_changed_since:
32793  * @time: guint64 to contain a timestamp.
32794  *
32795  * Checks if the unix mount points have changed since a given unix time.
32796  *
32797  * Returns: %TRUE if the mount points have changed since @time.
32798  */
32799
32800
32801 /**
32802  * g_unix_mount_points_get: (skip)
32803  * @time_read: (out) (allow-none): guint64 to contain a timestamp.
32804  *
32805  * Gets a #GList of #GUnixMountPoint containing the unix mount points.
32806  * If @time_read is set, it will be filled with the mount timestamp,
32807  * allowing for checking if the mounts have changed with
32808  * g_unix_mount_points_changed_since().
32809  * a #GList of the UNIX mountpoints.
32810  *
32811  * Returns: (element-type GUnixMountPoint) (transfer full):
32812  */
32813
32814
32815 /**
32816  * g_unix_mounts_changed_since:
32817  * @time: guint64 to contain a timestamp.
32818  *
32819  * Checks if the unix mounts have changed since a given unix time.
32820  *
32821  * Returns: %TRUE if the mounts have changed since @time.
32822  */
32823
32824
32825 /**
32826  * g_unix_mounts_get: (skip)
32827  * @time_read: (out) (allow-none): guint64 to contain a timestamp, or %NULL
32828  *
32829  * Gets a #GList of #GUnixMountEntry containing the unix mounts.
32830  * If @time_read is set, it will be filled with the mount
32831  * timestamp, allowing for checking if the mounts have changed
32832  * with g_unix_mounts_changed_since().
32833  * a #GList of the UNIX mounts.
32834  *
32835  * Returns: (element-type GUnixMountEntry) (transfer full):
32836  */
32837
32838
32839 /**
32840  * g_unix_output_stream_get_close_fd:
32841  * @stream: a #GUnixOutputStream
32842  *
32843  * Returns whether the file descriptor of @stream will be
32844  * closed when the stream is closed.
32845  *
32846  * Returns: %TRUE if the file descriptor is closed when done
32847  * Since: 2.20
32848  */
32849
32850
32851 /**
32852  * g_unix_output_stream_get_fd:
32853  * @stream: a #GUnixOutputStream
32854  *
32855  * Return the UNIX file descriptor that the stream writes to.
32856  *
32857  * Returns: The file descriptor of @stream
32858  * Since: 2.20
32859  */
32860
32861
32862 /**
32863  * g_unix_output_stream_new:
32864  * @fd: a UNIX file descriptor
32865  * @close_fd: %TRUE to close the file descriptor when done
32866  *
32867  * Creates a new #GUnixOutputStream for the given @fd.
32868  * If @close_fd, is %TRUE, the file descriptor will be closed when
32869  * the output stream is destroyed.
32870  *
32871  * Returns: a new #GOutputStream
32872  */
32873
32874
32875 /**
32876  * g_unix_output_stream_set_close_fd:
32877  * @stream: a #GUnixOutputStream
32878  * @close_fd: %TRUE to close the file descriptor when done
32879  *
32880  * Sets whether the file descriptor of @stream shall be closed
32881  * when the stream is closed.
32882  *
32883  * Since: 2.20
32884  */
32885
32886
32887 /**
32888  * g_unix_socket_address_abstract_names_supported:
32889  *
32890  * Checks if abstract unix domain socket names are supported.
32891  *
32892  * Returns: %TRUE if supported, %FALSE otherwise
32893  * Since: 2.22
32894  */
32895
32896
32897 /**
32898  * g_unix_socket_address_get_address_type:
32899  * @address: a #GInetSocketAddress
32900  *
32901  * Gets @address's type.
32902  *
32903  * Returns: a #GUnixSocketAddressType
32904  * Since: 2.26
32905  */
32906
32907
32908 /**
32909  * g_unix_socket_address_get_is_abstract:
32910  * @address: a #GInetSocketAddress
32911  *
32912  * Tests if @address is abstract.
32913  *
32914  * Returns: %TRUE if the address is abstract, %FALSE otherwise
32915  * Since: 2.22
32916  * Deprecated: Use g_unix_socket_address_get_address_type()
32917  */
32918
32919
32920 /**
32921  * g_unix_socket_address_get_path:
32922  * @address: a #GInetSocketAddress
32923  *
32924  * Gets @address's path, or for abstract sockets the "name".
32925  * Guaranteed to be zero-terminated, but an abstract socket
32926  * may contain embedded zeros, and thus you should use
32927  * g_unix_socket_address_get_path_len() to get the true length
32928  * of this string.
32929  *
32930  * Returns: the path for @address
32931  * Since: 2.22
32932  */
32933
32934
32935 /**
32936  * g_unix_socket_address_get_path_len:
32937  * @address: a #GInetSocketAddress
32938  *
32939  * Gets the length of @address's path.
32940  * For details, see g_unix_socket_address_get_path().
32941  *
32942  * Returns: the length of the path
32943  * Since: 2.22
32944  */
32945
32946
32947 /**
32948  * g_unix_socket_address_new:
32949  * @path: the socket path
32950  *
32951  * Creates a new #GUnixSocketAddress for @path.
32952  * To create abstract socket addresses, on systems that support that,
32953  * use g_unix_socket_address_new_abstract().
32954  *
32955  * Returns: a new #GUnixSocketAddress
32956  * Since: 2.22
32957  */
32958
32959
32960 /**
32961  * g_unix_socket_address_new_abstract:
32962  * @path: (array length=path_len) (element-type gchar): the abstract name
32963  * @path_len: the length of @path, or -1
32964  *
32965  * Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
32966  * #GUnixSocketAddress for @path.
32967  *
32968  * Returns: a new #GUnixSocketAddress
32969  * Deprecated: Use g_unix_socket_address_new_with_type().
32970  */
32971
32972
32973 /**
32974  * g_unix_socket_address_new_with_type:
32975  * @path: (array length=path_len) (element-type gchar): the name
32976  * @path_len: the length of @path, or -1
32977  * @type: a #GUnixSocketAddressType
32978  *
32979  * Creates a new #GUnixSocketAddress of type @type with name @path.
32980  * If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to
32981  * calling g_unix_socket_address_new().
32982  * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len
32983  * bytes of @path will be copied to the socket's path, and only those
32984  * bytes will be considered part of the name. (If @path_len is -1,
32985  * then @path is assumed to be NUL-terminated.) For example, if @path
32986  * was "test", then calling g_socket_address_get_native_size() on the
32987  * returned socket would return 7 (2 bytes of overhead, 1 byte for the
32988  * abstract-socket indicator byte, and 4 bytes for the name "test").
32989  * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then
32990  * rest of the path will be padded with 0 bytes, and the entire
32991  * zero-padded buffer will be considered the name. (As above, if
32992  * this case, g_socket_address_get_native_size() will always return
32993  * the full size of a <literal>struct sockaddr_un</literal>, although
32994  * g_unix_socket_address_get_path_len() will still return just the
32995  * length of @path.
32996  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over
32997  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course,
32998  * when connecting to a server created by another process, you must
32999  * use the appropriate type corresponding to how that process created
33000  * its listening socket.
33001  *
33002  * Returns: a new #GUnixSocketAddress
33003  * Since: 2.26
33004  */
33005
33006
33007 /**
33008  * g_vfs_get_default:
33009  *
33010  * Gets the default #GVfs for the system.
33011  *
33012  * Returns: (transfer none): a #GVfs.
33013  */
33014
33015
33016 /**
33017  * g_vfs_get_file_for_path:
33018  * @vfs: a #GVfs.
33019  * @path: a string containing a VFS path.
33020  *
33021  * Gets a #GFile for @path.
33022  * Free the returned object with g_object_unref().
33023  *
33024  * Returns: (transfer full): a #GFile.
33025  */
33026
33027
33028 /**
33029  * g_vfs_get_file_for_uri:
33030  * @vfs: a#GVfs.
33031  * @uri: a string containing a URI
33032  *
33033  * Gets a #GFile for @uri.
33034  * This operation never fails, but the returned object
33035  * might not support any I/O operation if the URI
33036  * is malformed or if the URI scheme is not supported.
33037  * Free the returned object with g_object_unref().
33038  *
33039  * Returns: (transfer full): a #GFile.
33040  */
33041
33042
33043 /**
33044  * g_vfs_get_local:
33045  *
33046  * Gets the local #GVfs for the system.
33047  *
33048  * Returns: (transfer none): a #GVfs.
33049  */
33050
33051
33052 /**
33053  * g_vfs_get_supported_uri_schemes:
33054  * @vfs: a #GVfs.
33055  *
33056  * Gets a list of URI schemes supported by @vfs.
33057  * The returned array belongs to GIO and must
33058  * not be freed or modified.
33059  *
33060  * Returns: (transfer none): a %NULL-terminated array of strings.
33061  */
33062
33063
33064 /**
33065  * g_vfs_is_active:
33066  * @vfs: a #GVfs.
33067  *
33068  * Checks if the VFS is active.
33069  *
33070  * Returns: %TRUE if construction of the @vfs was successful and it is now active.
33071  */
33072
33073
33074 /**
33075  * g_vfs_parse_name:
33076  * @vfs: a #GVfs.
33077  * @parse_name: a string to be parsed by the VFS module.
33078  *
33079  * This operation never fails, but the returned object might
33080  * not support any I/O operations if the @parse_name cannot
33081  * be parsed by the #GVfs module.
33082  * Free the returned object with g_object_unref().
33083  *
33084  * Returns: (transfer full): a #GFile for the given @parse_name.
33085  */
33086
33087
33088 /**
33089  * g_volume_can_eject:
33090  * @volume: a #GVolume.
33091  *
33092  * Checks if a volume can be ejected.
33093  *
33094  * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise.
33095  */
33096
33097
33098 /**
33099  * g_volume_can_mount:
33100  * @volume: a #GVolume.
33101  *
33102  * Checks if a volume can be mounted.
33103  *
33104  * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise.
33105  */
33106
33107
33108 /**
33109  * g_volume_eject:
33110  * @volume: a #GVolume.
33111  * @flags: flags affecting the unmount if required for eject
33112  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
33113  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
33114  * @user_data: user data that gets passed to @callback
33115  *
33116  * Ejects a volume. This is an asynchronous operation, and is
33117  * finished by calling g_volume_eject_finish() with the @volume
33118  * and #GAsyncResult returned in the @callback.
33119  *
33120  * Deprecated: 2.22: Use g_volume_eject_with_operation() instead.
33121  */
33122
33123
33124 /**
33125  * g_volume_eject_finish:
33126  * @volume: pointer to a #GVolume.
33127  * @result: a #GAsyncResult.
33128  * @error: a #GError location to store an error, or %NULL to ignore
33129  *
33130  * Finishes ejecting a volume. If any errors occured during the operation,
33131  *
33132  * Returns: %TRUE, %FALSE if operation failed.
33133  * Deprecated: 2.22: Use g_volume_eject_with_operation_finish() instead.
33134  */
33135
33136
33137 /**
33138  * g_volume_eject_with_operation:
33139  * @volume: a #GVolume.
33140  * @flags: flags affecting the unmount if required for eject
33141  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
33142  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
33143  * @callback: a #GAsyncReadyCallback, or %NULL.
33144  * @user_data: user data passed to @callback.
33145  *
33146  * Ejects a volume. This is an asynchronous operation, and is
33147  * finished by calling g_volume_eject_with_operation_finish() with the @volume
33148  * and #GAsyncResult data returned in the @callback.
33149  *
33150  * Since: 2.22
33151  */
33152
33153
33154 /**
33155  * g_volume_eject_with_operation_finish:
33156  * @volume: a #GVolume.
33157  * @result: a #GAsyncResult.
33158  * @error: a #GError location to store the error occuring, or %NULL to ignore.
33159  *
33160  * Finishes ejecting a volume. If any errors occurred during the operation,
33161  *
33162  * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise.
33163  * Since: 2.22
33164  */
33165
33166
33167 /**
33168  * g_volume_enumerate_identifiers:
33169  * @volume: a #GVolume
33170  *
33171  * Gets the kinds of <link linkend="volume-identifier">identifiers</link>
33172  * that @volume has. Use g_volume_get_identifer() to obtain
33173  * the identifiers themselves.
33174  * of strings containing kinds of identifiers. Use g_strfreev() to free.
33175  *
33176  * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated array
33177  */
33178
33179
33180 /**
33181  * g_volume_get_activation_root:
33182  * @volume: a #GVolume
33183  *
33184  * Gets the activation root for a #GVolume if it is known ahead of
33185  * mount time. Returns %NULL otherwise. If not %NULL and if @volume
33186  * is mounted, then the result of g_mount_get_root() on the
33187  * #GMount object obtained from g_volume_get_mount() will always
33188  * either be equal or a prefix of what this function returns. In
33189  * other words, in code
33190  * <programlisting>
33191  * GMount *mount;
33192  * GFile *mount_root
33193  * GFile *volume_activation_root;
33194  * mount = g_volume_get_mount (volume); /&ast; mounted, so never NULL &ast;/
33195  * mount_root = g_mount_get_root (mount);
33196  * volume_activation_root = g_volume_get_activation_root(volume); /&ast; assume not NULL &ast;/
33197  * </programlisting>
33198  * then the expression
33199  * <programlisting>
33200  * (g_file_has_prefix (volume_activation_root, mount_root) ||
33201  * </programlisting>
33202  * will always be %TRUE.
33203  * Activation roots are typically used in #GVolumeMonitor
33204  * implementations to find the underlying mount to shadow, see
33205  * g_mount_is_shadowed() for more details.
33206  * g_object_unref() to free.
33207  *
33208  * Returns: (transfer full): the activation root of @volume or %NULL. Use
33209  * Since: 2.18
33210  */
33211
33212
33213 /**
33214  * g_volume_get_drive:
33215  * @volume: a #GVolume.
33216  *
33217  * Gets the drive for the @volume.
33218  * The returned object should be unreffed with g_object_unref()
33219  * when no longer needed.
33220  *
33221  * Returns: (transfer full): a #GDrive or %NULL if @volume is not associated with a drive.
33222  */
33223
33224
33225 /**
33226  * g_volume_get_icon:
33227  * @volume: a #GVolume.
33228  *
33229  * Gets the icon for @volume.
33230  * The returned object should be unreffed with g_object_unref()
33231  * when no longer needed.
33232  *
33233  * Returns: (transfer full): a #GIcon.
33234  */
33235
33236
33237 /**
33238  * g_volume_get_identifier:
33239  * @volume: a #GVolume
33240  * @kind: the kind of identifier to return
33241  *
33242  * Gets the identifier of the given kind for @volume.
33243  * See the <link linkend="volume-identifier">introduction</link>
33244  * for more information about volume identifiers.
33245  * requested identfier, or %NULL if the #GVolume
33246  * doesn't have this kind of identifier
33247  *
33248  * Returns: a newly allocated string containing the
33249  */
33250
33251
33252 /**
33253  * g_volume_get_mount:
33254  * @volume: a #GVolume.
33255  *
33256  * Gets the mount for the @volume.
33257  * The returned object should be unreffed with g_object_unref()
33258  * when no longer needed.
33259  *
33260  * Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted.
33261  */
33262
33263
33264 /**
33265  * g_volume_get_name:
33266  * @volume: a #GVolume.
33267  *
33268  * Gets the name of @volume.
33269  * be freed with g_free() when no longer needed.
33270  *
33271  * Returns: the name for the given @volume. The returned string should
33272  */
33273
33274
33275 /**
33276  * g_volume_get_uuid:
33277  * @volume: a #GVolume.
33278  *
33279  * Gets the UUID for the @volume. The reference is typically based on
33280  * the file system UUID for the volume in question and should be
33281  * considered an opaque string. Returns %NULL if there is no UUID
33282  * available.
33283  * The returned string should be freed with g_free()
33284  * when no longer needed.
33285  *
33286  * Returns: the UUID for @volume or %NULL if no UUID can be computed.
33287  */
33288
33289
33290 /**
33291  * g_volume_monitor_adopt_orphan_mount:
33292  * @mount: a #GMount object to find a parent for
33293  *
33294  * This function should be called by any #GVolumeMonitor
33295  * implementation when a new #GMount object is created that is not
33296  * associated with a #GVolume object. It must be called just before
33297  * emitting the @mount_added signal.
33298  * If the return value is not %NULL, the caller must associate the
33299  * returned #GVolume object with the #GMount. This involves returning
33300  * it in its g_mount_get_volume() implementation. The caller must
33301  * also listen for the "removed" signal on the returned object
33302  * and give up its reference when handling that signal
33303  * Similary, if implementing g_volume_monitor_adopt_orphan_mount(),
33304  * the implementor must take a reference to @mount and return it in
33305  * its g_volume_get_mount() implemented. Also, the implementor must
33306  * listen for the "unmounted" signal on @mount and give up its
33307  * reference upon handling that signal.
33308  * There are two main use cases for this function.
33309  * One is when implementing a user space file system driver that reads
33310  * blocks of a block device that is already represented by the native
33311  * volume monitor (for example a CD Audio file system driver). Such
33312  * a driver will generate its own #GMount object that needs to be
33313  * assoicated with the #GVolume object that represents the volume.
33314  * The other is for implementing a #GVolumeMonitor whose sole purpose
33315  * is to return #GVolume objects representing entries in the users
33316  * "favorite servers" list or similar.
33317  * if no wants to adopt the #GMount.
33318  * implementations should instead create shadow mounts with the URI of
33319  * the mount they intend to adopt. See the proxy volume monitor in
33320  * gvfs for an example of this. Also see g_mount_is_shadowed(),
33321  * g_mount_shadow() and g_mount_unshadow() functions.
33322  *
33323  * Returns: (transfer full): the #GVolume object that is the parent for @mount or %NULL
33324  * Deprecated: 2.20: Instead of using this function, #GVolumeMonitor
33325  */
33326
33327
33328 /**
33329  * g_volume_monitor_get:
33330  *
33331  * Gets the volume monitor used by gio.
33332  * g_object_unref() when done with it.
33333  *
33334  * Returns: (transfer full): a reference to the #GVolumeMonitor used by gio. Call
33335  */
33336
33337
33338 /**
33339  * g_volume_monitor_get_connected_drives:
33340  * @volume_monitor: a #GVolumeMonitor.
33341  *
33342  * Gets a list of drives connected to the system.
33343  * The returned list should be freed with g_list_free(), after
33344  * its elements have been unreffed with g_object_unref().
33345  *
33346  * Returns: (element-type GDrive) (transfer full): a #GList of connected #GDrive objects.
33347  */
33348
33349
33350 /**
33351  * g_volume_monitor_get_mount_for_uuid:
33352  * @volume_monitor: a #GVolumeMonitor.
33353  * @uuid: the UUID to look for
33354  *
33355  * Finds a #GMount object by its UUID (see g_mount_get_uuid())
33356  * Free the returned object with g_object_unref().
33357  *
33358  * Returns: (transfer full): a #GMount or %NULL if no such mount is available.
33359  */
33360
33361
33362 /**
33363  * g_volume_monitor_get_mounts:
33364  * @volume_monitor: a #GVolumeMonitor.
33365  *
33366  * Gets a list of the mounts on the system.
33367  * The returned list should be freed with g_list_free(), after
33368  * its elements have been unreffed with g_object_unref().
33369  *
33370  * Returns: (element-type GMount) (transfer full): a #GList of #GMount objects.
33371  */
33372
33373
33374 /**
33375  * g_volume_monitor_get_volume_for_uuid:
33376  * @volume_monitor: a #GVolumeMonitor.
33377  * @uuid: the UUID to look for
33378  *
33379  * Finds a #GVolume object by its UUID (see g_volume_get_uuid())
33380  * Free the returned object with g_object_unref().
33381  *
33382  * Returns: (transfer full): a #GVolume or %NULL if no such volume is available.
33383  */
33384
33385
33386 /**
33387  * g_volume_monitor_get_volumes:
33388  * @volume_monitor: a #GVolumeMonitor.
33389  *
33390  * Gets a list of the volumes on the system.
33391  * The returned list should be freed with g_list_free(), after
33392  * its elements have been unreffed with g_object_unref().
33393  *
33394  * Returns: (element-type GVolume) (transfer full): a #GList of #GVolume objects.
33395  */
33396
33397
33398 /**
33399  * g_volume_mount:
33400  * @volume: a #GVolume.
33401  * @flags: flags affecting the operation
33402  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
33403  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
33404  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
33405  * @user_data: user data that gets passed to @callback
33406  *
33407  * Mounts a volume. This is an asynchronous operation, and is
33408  * finished by calling g_volume_mount_finish() with the @volume
33409  * and #GAsyncResult returned in the @callback.
33410  *
33411  * Virtual: mount_fn
33412  */
33413
33414
33415 /**
33416  * g_volume_mount_finish:
33417  * @volume: a #GVolume
33418  * @result: a #GAsyncResult
33419  * @error: a #GError location to store an error, or %NULL to ignore
33420  *
33421  * Finishes mounting a volume. If any errors occured during the operation,
33422  * If the mount operation succeeded, g_volume_get_mount() on @volume
33423  * is guaranteed to return the mount right after calling this
33424  * function; there's no need to listen for the 'mount-added' signal on
33425  * #GVolumeMonitor.
33426  *
33427  * Returns: %TRUE, %FALSE if operation failed.
33428  */
33429
33430
33431 /**
33432  * g_volume_should_automount:
33433  * @volume: a #GVolume
33434  *
33435  * Returns whether the volume should be automatically mounted.
33436  *
33437  * Returns: %TRUE if the volume should be automatically mounted.
33438  */
33439
33440
33441 /**
33442  * g_win32_input_stream_get_close_handle:
33443  * @stream: a #GWin32InputStream
33444  *
33445  * Returns whether the handle of @stream will be
33446  * closed when the stream is closed.
33447  *
33448  * Returns: %TRUE if the handle is closed when done
33449  * Since: 2.26
33450  */
33451
33452
33453 /**
33454  * g_win32_input_stream_get_handle:
33455  * @stream: a #GWin32InputStream
33456  *
33457  * Return the Windows file handle that the stream reads from.
33458  *
33459  * Returns: The file handle of @stream
33460  * Since: 2.26
33461  */
33462
33463
33464 /**
33465  * g_win32_input_stream_new:
33466  * @handle: a Win32 file handle
33467  * @close_fd: %TRUE to close the handle when done
33468  *
33469  * Creates a new #GWin32InputStream for the given @fd.
33470  * If @close_handle is %TRUE, the handle will be closed
33471  * when the stream is closed.
33472  * Note that "handle" here means a Win32 HANDLE, not a "file descriptor"
33473  * as used in the Windows C libraries.
33474  *
33475  * Returns: a new #GWin32InputStream
33476  */
33477
33478
33479 /**
33480  * g_win32_input_stream_set_close_handle:
33481  * @stream: a #GWin32InputStream
33482  * @close_handle: %TRUE to close the handle when done
33483  *
33484  * Sets whether the handle of @stream shall be closed
33485  * when the stream is closed.
33486  *
33487  * Since: 2.26
33488  */
33489
33490
33491 /**
33492  * g_win32_output_stream_get_close_handle:
33493  * @stream: a #GWin32OutputStream
33494  *
33495  * Returns whether the handle of @stream will be closed when the
33496  * stream is closed.
33497  *
33498  * Returns: %TRUE if the handle is closed when done
33499  * Since: 2.26
33500  */
33501
33502
33503 /**
33504  * g_win32_output_stream_get_handle:
33505  * @stream: a #GWin32OutputStream
33506  *
33507  * Return the Windows handle that the stream writes to.
33508  *
33509  * Returns: The handle descriptor of @stream
33510  * Since: 2.26
33511  */
33512
33513
33514 /**
33515  * g_win32_output_stream_new:
33516  * @handle: a Win32 file handle
33517  * @close_handle: %TRUE to close the handle when done
33518  *
33519  * Creates a new #GWin32OutputStream for the given @handle.
33520  * If @close_handle, is %TRUE, the handle will be closed when the
33521  * output stream is destroyed.
33522  *
33523  * Returns: a new #GOutputStream
33524  * Since: 2.26
33525  */
33526
33527
33528 /**
33529  * g_win32_output_stream_set_close_handle:
33530  * @stream: a #GWin32OutputStream
33531  * @close_handle: %TRUE to close the handle when done
33532  *
33533  * Sets whether the handle of @stream shall be closed when the stream
33534  * is closed.
33535  *
33536  * Since: 2.26
33537  */
33538
33539
33540 /**
33541  * g_zlib_compressor_get_file_info:
33542  * @compressor: a #GZlibCompressor
33543  *
33544  * Returns the #GZlibCompressor:file-info property.
33545  *
33546  * Returns: (transfer none): a #GFileInfo, or %NULL
33547  * Since: 2.26
33548  */
33549
33550
33551 /**
33552  * g_zlib_compressor_new:
33553  * @format: The format to use for the compressed data
33554  * @level: compression level (0-9), -1 for default
33555  *
33556  * Creates a new #GZlibCompressor.
33557  *
33558  * Returns: a new #GZlibCompressor
33559  * Since: 2.24
33560  */
33561
33562
33563 /**
33564  * g_zlib_compressor_set_file_info:
33565  * @compressor: a #GZlibCompressor
33566  * @file_info: (allow-none): a #GFileInfo
33567  *
33568  * Sets @file_info in @compressor. If non-%NULL, and @compressor's
33569  * #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
33570  * it will be used to set the file name and modification time in
33571  * the GZIP header of the compressed data.
33572  * progress; it may only be called immediately after creation of @compressor,
33573  * or after resetting it with g_converter_reset().
33574  *
33575  * Note: it is an error to call this function while a compression is in
33576  * Since: 2.26
33577  */
33578
33579
33580 /**
33581  * g_zlib_decompressor_get_file_info:
33582  * @decompressor: a #GZlibDecompressor
33583  *
33584  * Retrieves the #GFileInfo constructed from the GZIP header data
33585  * of compressed data processed by @compressor, or %NULL if @decompressor's
33586  * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
33587  * or the header data was not fully processed yet, or it not present in the
33588  * data stream at all.
33589  *
33590  * Returns: (transfer none): a #GFileInfo, or %NULL
33591  * Since: 2.26
33592  */
33593
33594
33595 /**
33596  * g_zlib_decompressor_new:
33597  * @format: The format to use for the compressed data
33598  *
33599  * Creates a new #GZlibDecompressor.
33600  *
33601  * Returns: a new #GZlibDecompressor
33602  * Since: 2.24
33603  */
33604
33605
33606 /**
33607  * gchararray:
33608  *
33609  * A C representable type name for #G_TYPE_STRING.
33610  */
33611
33612
33613 /**
33614  * get_all_desktop_entries_for_mime_type:
33615  * @mime_type: a mime type.
33616  * @except: NULL or a strv list
33617  *
33618  * Returns all the desktop ids for @mime_type. The desktop files
33619  * are listed in an order so that default applications are listed before
33620  * non-default ones, and handlers for inherited mimetypes are listed
33621  * after the base ones.
33622  * Optionally doesn't list the desktop ids given in the @except
33623  * to handle @mime_type.
33624  *
33625  * Returns: a #GList containing the desktop ids which claim
33626  */
33627
33628
33629 /**
33630  * mime_info_cache_reload:
33631  * @dir: directory path which needs reloading.
33632  *
33633  * Reload the mime information for the @dir.
33634  */
33635
33636
33637
33638 /************************************************************/
33639 /* THIS FILE IS GENERATED DO NOT EDIT */
33640 /************************************************************/