Regenerate Gio/GLib/GObject annotations
[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  *
10  * If the action is disabled then calls to g_action_activate() and
11  * g_action_change_state() have no effect.
12  *
13  * Since: 2.28
14  */
15
16
17 /**
18  * GAction:name:
19  *
20  * The name of the action.  This is mostly meaningful for identifying
21  * the action once it has been added to a #GActionGroup.
22  *
23  * Since: 2.28
24  */
25
26
27 /**
28  * GAction:parameter-type:
29  *
30  * The type of the parameter that must be given when activating the
31  * action.
32  *
33  * Since: 2.28
34  */
35
36
37 /**
38  * GAction:state:
39  *
40  * The state of the action, or %NULL if the action is stateless.
41  *
42  * Since: 2.28
43  */
44
45
46 /**
47  * GAction:state-type:
48  *
49  * The #GVariantType of the state that the action has, or %NULL if the
50  * action is stateless.
51  *
52  * Since: 2.28
53  */
54
55
56 /**
57  * GActionEntry:
58  * @name: the name of the action
59  * @activate: the callback to connect to the "activate" signal of the action
60  * @parameter_type: the type of the parameter that must be passed to the activate function for this action, given as a single GVariant type string (or %NULL for no parameter)
61  * @state: the initial state for this action, given in GVariant text format.  The state is parsed with no extra type information, so type tags must be added to the string if they are necessary.
62  * @change_state: the callback to connect to the "change-state" signal of the action
63  *
64  * This struct defines a single action.  It is for use with
65  * g_simple_action_group_add_entries().
66  *
67  * The order of the items in the structure are intended to reflect
68  * frequency of use.  It is permissible to use an incomplete initialiser
69  * in order to leave some of the later values as %NULL.  All values
70  * after @name are optional.  Additional optional fields may be added in
71  * the future.
72  *
73  * See g_simple_action_group_add_entries() for an example.
74  */
75
76
77 /**
78  * GActionGroup::action-added:
79  * @action_group: the #GActionGroup that changed
80  * @action_name: the name of the action in @action_group
81  *
82  * Signals that a new action was just added to the group.
83  * This signal is emitted after the action has been added
84  * and is now visible.
85  *
86  * Since: 2.28
87  */
88
89
90 /**
91  * GActionGroup::action-enabled-changed:
92  * @action_group: the #GActionGroup that changed
93  * @action_name: the name of the action in @action_group
94  * @enabled: whether the action is enabled or not
95  *
96  * Signals that the enabled status of the named action has changed.
97  *
98  * Since: 2.28
99  */
100
101
102 /**
103  * GActionGroup::action-removed:
104  * @action_group: the #GActionGroup that changed
105  * @action_name: the name of the action in @action_group
106  *
107  * Signals that an action is just about to be removed from the group.
108  * This signal is emitted before the action is removed, so the action
109  * is still visible and can be queried from the signal handler.
110  *
111  * Since: 2.28
112  */
113
114
115 /**
116  * GActionGroup::action-state-changed:
117  * @action_group: the #GActionGroup that changed
118  * @action_name: the name of the action in @action_group
119  * @value: the new value of the state
120  *
121  * Signals that the state of the named action has changed.
122  *
123  * Since: 2.28
124  */
125
126
127 /**
128  * GActionGroupInterface:
129  * @has_action: the virtual function pointer for g_action_group_has_action()
130  * @list_actions: the virtual function pointer for g_action_group_list_actions()
131  * @get_action_parameter_type: the virtual function pointer for g_action_group_get_action_parameter_type()
132  * @get_action_state_type: the virtual function pointer for g_action_group_get_action_state_type()
133  * @get_action_state_hint: the virtual function pointer for g_action_group_get_action_state_hint()
134  * @get_action_enabled: the virtual function pointer for g_action_group_get_action_enabled()
135  * @get_action_state: the virtual function pointer for g_action_group_get_action_state()
136  * @set_action_state: the virtual function pointer for g_action_group_set_action_state()
137  * @activate_action: the virtual function pointer for g_action_group_activate_action()
138  * @action_added: the class closure for the #GActionGroup::action-added signal
139  * @action_removed: the class closure for the #GActionGroup::action-removed signal
140  * @action_enabled_changed: the class closure for the #GActionGroup::action-enabled-changed signal
141  * @action_state_changed: the class closure for the #GActionGroup::action-enabled-changed signal
142  *
143  * The virtual function table for #GActionGroup.
144  *
145  * Since: 2.28
146  */
147
148
149 /**
150  * GActionInterface:
151  * @get_name: the virtual function pointer for g_action_get_name()
152  * @get_parameter_type: the virtual function pointer for g_action_get_parameter_type()
153  * @get_state_type: the virtual function pointer for g_action_get_state_type()
154  * @get_state_hint: the virtual function pointer for g_action_get_state_hint()
155  * @get_enabled: the virtual function pointer for g_action_get_enabled()
156  * @get_state: the virtual function pointer for g_action_get_state()
157  * @change_state: the virtual function pointer for g_action_change_state()
158  * @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.
159  *
160  *
161  *
162  * Since: 2.28
163  */
164
165
166 /**
167  * GAppInfo:
168  *
169  * Information about an installed application and methods to launch
170  * it (with file arguments).
171  */
172
173
174 /**
175  * GAppInfoCreateFlags:
176  * @G_APP_INFO_CREATE_NONE: No flags.
177  * @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window.
178  * @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments.
179  * @G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION: Application supports startup notification. Since 2.26
180  *
181  * Flags used when creating a #GAppInfo.
182  */
183
184
185 /**
186  * GAppInfoIface:
187  * @g_iface: The parent interface.
188  * @dup: Copies a #GAppInfo.
189  * @equal: Checks two #GAppInfo<!-- -->s for equality.
190  * @get_id: Gets a string identifier for a #GAppInfo.
191  * @get_name: Gets the name of the application for a #GAppInfo.
192  * @get_description: Gets a short description for the application described by the #GAppInfo.
193  * @get_executable: Gets the executable name for the #GAppInfo.
194  * @get_icon: Gets the #GIcon for the #GAppInfo.
195  * @launch: Launches an application specified by the #GAppInfo.
196  * @supports_uris: Indicates whether the application specified supports launching URIs.
197  * @supports_files: Indicates whether the application specified accepts filename arguments.
198  * @launch_uris: Launches an application with a list of URIs.
199  * @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>.
200  * @set_as_default_for_type: Sets an application as default for a given content type.
201  * @set_as_default_for_extension: Sets an application as default for a given file extension.
202  * @add_supports_type: Adds to the #GAppInfo information about supported file types.
203  * @can_remove_supports_type: Checks for support for removing supported file types from a #GAppInfo.
204  * @remove_supports_type: Removes a supported application type from a #GAppInfo.
205  * @can_delete: Checks if a #GAppInfo can be deleted. Since 2.20
206  * @do_delete: Deletes a #GAppInfo. Since 2.20
207  * @get_commandline: Gets the commandline for the #GAppInfo. Since 2.20
208  * @get_display_name: Gets the display name for the #GAppInfo. Since 2.24
209  *
210  * Application Information interface, for operating system portability.
211  */
212
213
214 /**
215  * GAppLaunchContext:
216  *
217  * Integrating the launch with the launching application. This is used to
218  * handle for instance startup notification and launching the new application
219  * on the same screen as the launching window.
220  */
221
222
223 /**
224  * GApplication:
225  *
226  * The <structname>GApplication</structname> structure contains private
227  * data and should only be accessed using the provided API
228  *
229  * Since: 2.28
230  */
231
232
233 /**
234  * GApplication::activate:
235  * @application: the application
236  *
237  * The ::activate signal is emitted on the primary instance when an
238  * activation occurs. See g_application_activate().
239  */
240
241
242 /**
243  * GApplication::command-line:
244  * @application: the application
245  * @command_line: a #GApplicationCommandLine representing the passed commandline
246  *
247  * The ::command-line signal is emitted on the primary instance when
248  * a commandline is not handled locally. See g_application_run() and
249  * the #GApplicationCommandline documentation for more information.
250  *
251  * process. See g_application_command_line_set_exit_status().
252  *
253  * Returns: An integer that is set as the exit status for the calling
254  */
255
256
257 /**
258  * GApplication::open:
259  * @application: the application
260  * @files: (array length=n_files) (element-type GFile): an array of #GFiles
261  * @n_files: the length of @files
262  * @hint: a hint provided by the calling instance
263  *
264  * The ::open signal is emitted on the primary instance when there are
265  * files to open. See g_application_open() for more information.
266  */
267
268
269 /**
270  * GApplication::startup:
271  * @application: the application
272  *
273  * The ::startup signal is emitted on the primary instance immediately
274  * after registration. See g_application_register().
275  */
276
277
278 /**
279  * GApplicationClass:
280  * @startup: invoked on the primary instance immediately after registration
281  * @activate: invoked on the primary instance when an activation occurs
282  * @open: invoked on the primary instance when there are files to open
283  * @command_line: invoked on the primary instance when a command-line is not handled locally
284  * @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.
285  * @before_emit: invoked on the primary instance before 'activate', 'open', 'command-line' or any action invocation, gets the 'platform data' from the calling instance
286  * @after_emit: invoked on the primary instance after 'activate', 'open', 'command-line' or any action invocation, gets the 'platform data' from the calling instance
287  * @add_platform_data: invoked (locally) to add 'platform data' to be sent to the primary instance when activating, opening or invoking actions
288  * @quit_mainloop: invoked on the primary instance when the use count of the application drops to zero (and after any inactivity timeout, if requested)
289  * @run_mainloop: invoked on the primary instance from g_application_run() if the use-count is non-zero
290  *
291  *
292  *
293  * Since: 2.28
294  */
295
296
297 /**
298  * GApplicationCommandLine:
299  *
300  * The <structname>GApplicationCommandLine</structname> structure contains private
301  * data and should only be accessed using the provided API
302  *
303  * Since: 2.28
304  */
305
306
307 /**
308  * GApplicationCommandLineClass:
309  *
310  * The <structname>GApplicationCommandLineClass</structname> structure contains
311  * private data only
312  *
313  * Since: 2.28
314  */
315
316
317 /**
318  * GApplicationFlags:
319  * @G_APPLICATION_FLAGS_NONE: Default
320  * @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.
321  * @G_APPLICATION_IS_LAUNCHER: Don't try to become the primary instance.
322  * @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.
323  * @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.
324  * @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().
325  * @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.
326  *
327  * Flags used to define the behaviour of a #GApplication.
328  *
329  * Since: 2.28
330  */
331
332
333 /**
334  * GAskPasswordFlags:
335  * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password.
336  * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username.
337  * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain.
338  * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings.
339  * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users.
340  *
341  * #GAskPasswordFlags are used to request specific information from the
342  * user, or to notify the user of their choices in an authentication
343  * situation.
344  */
345
346
347 /**
348  * GAsyncInitable:
349  *
350  * Interface for asynchronously initializable objects.
351  *
352  * Since: 2.22
353  */
354
355
356 /**
357  * GAsyncInitableIface:
358  * @g_iface: The parent interface.
359  * @init_async: Starts initialization of the object.
360  * @init_finish: Finishes initialization of the object.
361  *
362  * Provides an interface for asynchronous initializing object such that
363  * initialization may fail.
364  *
365  * Since: 2.22
366  */
367
368
369 /**
370  * GAsyncReadyCallback:
371  * @source_object: the object the asynchronous operation was started with.
372  * @res: a #GAsyncResult.
373  * @user_data: user data passed to the callback.
374  *
375  * Type definition for a function that will be called back when an asynchronous
376  * operation within GIO has been completed.
377  */
378
379
380 /**
381  * GAsyncResult:
382  *
383  * Holds results information for an asynchronous operation,
384  * usually passed directly to a asynchronous _finish() operation.
385  */
386
387
388 /**
389  * GAsyncResultIface:
390  * @g_iface: The parent interface.
391  * @get_user_data: Gets the user data passed to the callback.
392  * @get_source_object: Gets the source object that issued the asynchronous operation.
393  *
394  * Interface definition for #GAsyncResult.
395  */
396
397
398 /**
399  * GBaseFinalizeFunc:
400  * @g_class: The #GTypeClass structure to finalize.
401  *
402  * A callback function used by the type system to finalize those portions
403  * of a derived types class structure that were setup from the corresponding
404  * GBaseInitFunc() function. Class finalization basically works the inverse
405  * way in which class intialization is performed.
406  * See GClassInitFunc() for a discussion of the class intialization process.
407  */
408
409
410 /**
411  * GBaseInitFunc:
412  * @g_class: The #GTypeClass structure to initialize.
413  *
414  * A callback function used by the type system to do base initialization
415  * of the class structures of derived types. It is called as part of the
416  * initialization process of all derived classes and should reallocate
417  * or reset all dynamic class members copied over from the parent class.
418  * For example, class members (such as strings) that are not sufficiently
419  * handled by a plain memory copy of the parent class into the derived class
420  * have to be altered. See GClassInitFunc() for a discussion of the class
421  * intialization process.
422  */
423
424
425 /**
426  * GBinding:
427  *
428  * <structname>GBinding</structname> is an opaque structure whose members
429  * cannot be accessed directly.
430  *
431  * Since: 2.26
432  */
433
434
435 /**
436  * GBindingFlags:
437  * @G_BINDING_DEFAULT: The default binding; if the source property changes, the target property is updated with its value.
438  * @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the property of the source or the property of the target changes, the other is updated.
439  * @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.
440  * @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().
441  *
442  * Flags to be passed to g_object_bind_property() or
443  * g_object_bind_property_full().
444  *
445  * This enumeration can be extended at later date.
446  *
447  * Since: 2.26
448  */
449
450
451 /**
452  * GBindingTransformFunc:
453  * @binding: a #GBinding
454  * @source_value: the value of the source property
455  * @target_value: the value of the target property
456  * @user_data: data passed to the transform function
457  *
458  * A function to be called to transform the source property of @source
459  * from @source_value into the target property of @target
460  * using @target_value.
461  *
462  * otherwise
463  *
464  * Returns: %TRUE if the transformation was successful, and %FALSE
465  * Since: 2.26
466  */
467
468
469 /**
470  * GBookmarkFile:
471  *
472  * The <structname>GBookmarkFile</structname> struct contains only
473  * private data and should not be directly accessed.
474  */
475
476
477 /**
478  * GBookmarkFileError:
479  * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed
480  * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found
481  * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did not register a bookmark
482  * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found
483  * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed
484  * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an unknown encoding
485  * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing
486  * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found
487  *
488  * Error codes returned by bookmark file parsing.
489  */
490
491
492 /**
493  * GBoxedCopyFunc:
494  * @boxed: The boxed structure to be copied.
495  *
496  * This function is provided by the user and should produce a copy
497  * of the passed in boxed structure.
498  *
499  * Returns: The newly created copy of the boxed structure.
500  */
501
502
503 /**
504  * GBoxedFreeFunc:
505  * @boxed: The boxed structure to be freed.
506  *
507  * This function is provided by the user and should free the boxed
508  * structure passed.
509  */
510
511
512 /**
513  * GBufferedInputStream:
514  *
515  * Implements #GFilterInputStream with a sized input buffer.
516  */
517
518
519 /**
520  * GBufferedOutputStream:
521  *
522  * An implementation of #GFilterOutputStream with a sized buffer.
523  */
524
525
526 /**
527  * GBusAcquiredCallback:
528  * @connection: The #GDBusConnection to a message bus.
529  * @name: The name that is requested to be owned.
530  * @user_data: User data passed to g_bus_own_name().
531  *
532  * Invoked when a connection to a message bus has been obtained.
533  *
534  * Since: 2.26
535  */
536
537
538 /**
539  * GBusNameAcquiredCallback:
540  * @connection: The #GDBusConnection on which to acquired the name.
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 acquired.
545  *
546  * Since: 2.26
547  */
548
549
550 /**
551  * GBusNameAppearedCallback:
552  * @connection: The #GDBusConnection the name is being watched on.
553  * @name: The name being watched.
554  * @name_owner: Unique name of the owner of the name being watched.
555  * @user_data: User data passed to g_bus_watch_name().
556  *
557  * Invoked when the name being watched is known to have to have a owner.
558  *
559  * Since: 2.26
560  */
561
562
563 /**
564  * GBusNameLostCallback:
565  * @connection: The #GDBusConnection on which to acquire the name or %NULL if the connection was disconnected.
566  * @name: The name being owned.
567  * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
568  *
569  * Invoked when the name is lost or @connection has been closed.
570  *
571  * Since: 2.26
572  */
573
574
575 /**
576  * GBusNameOwnerFlags:
577  * @G_BUS_NAME_OWNER_FLAGS_NONE: No flags set.
578  * @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the the name.
579  * @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.
580  *
581  * Flags used in g_bus_own_name().
582  *
583  * Since: 2.26
584  */
585
586
587 /**
588  * GBusNameVanishedCallback:
589  * @connection: The #GDBusConnection the name is being watched on.
590  * @name: The name being watched.
591  * @user_data: User data passed to g_bus_watch_name().
592  *
593  * Invoked when the name being watched is known not to have to have a owner.
594  *
595  * Since: 2.26
596  */
597
598
599 /**
600  * GBusNameWatcherFlags:
601  * @G_BUS_NAME_WATCHER_FLAGS_NONE: No flags set.
602  * @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.
603  *
604  * Flags used in g_bus_watch_name().
605  *
606  * Since: 2.26
607  */
608
609
610 /**
611  * GBusType:
612  * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any.
613  * @G_BUS_TYPE_NONE: Not a message bus.
614  * @G_BUS_TYPE_SYSTEM: The system-wide message bus.
615  * @G_BUS_TYPE_SESSION: The login session message bus.
616  *
617  * An enumeration for well-known message buses.
618  *
619  * Since: 2.26
620  */
621
622
623 /**
624  * GCClosure:
625  * @closure: the #GClosure
626  * @callback: the callback function
627  *
628  * A #GCClosure is a specialization of #GClosure for C function callbacks.
629  */
630
631
632 /**
633  * GCallback:
634  *
635  * The type used for callback functions in structure definitions and function
636  * signatures. This doesn't mean that all callback functions must take no
637  * parameters and return void. The required signature of a callback function
638  * is determined by the context in which is used (e.g. the signal to which it
639  * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
640  */
641
642
643 /**
644  * GCancellable:
645  *
646  * Allows actions to be cancelled.
647  */
648
649
650 /**
651  * GCancellable::cancelled:
652  * @cancellable: a #GCancellable.
653  *
654  * Emitted when the operation has been cancelled.
655  *
656  * Can be used by implementations of cancellable operations. If the
657  * operation is cancelled from another thread, the signal will be
658  * emitted in the thread that cancelled the operation, not the
659  * thread that is running the operation.
660  *
661  * Note that disconnecting from this signal (or any signal) in a
662  * multi-threaded program is prone to race conditions. For instance
663  * it is possible that a signal handler may be invoked even
664  * <emphasis>after</emphasis> a call to
665  * g_signal_handler_disconnect() for that handler has already
666  * returned.
667  *
668  * There is also a problem when cancellation happen
669  * right before connecting to the signal. If this happens the
670  * signal will unexpectedly not be emitted, and checking before
671  * connecting to the signal leaves a race condition where this is
672  * still happening.
673  *
674  * In order to make it safe and easy to connect handlers there
675  * are two helper functions: g_cancellable_connect() and
676  * g_cancellable_disconnect() which protect against problems
677  * like this.
678  *
679  * An example of how to us this:
680  * |[
681  * /<!-- -->* Make sure we don't do any unnecessary work if already cancelled *<!-- -->/
682  * if (g_cancellable_set_error_if_cancelled (cancellable))
683  * return;
684  *
685  * /<!-- -->* Set up all the data needed to be able to
686  * * handle cancellation of the operation *<!-- -->/
687  * my_data = my_data_new (...);
688  *
689  * id = 0;
690  * if (cancellable)
691  * id = g_cancellable_connect (cancellable,
692  * G_CALLBACK (cancelled_handler)
693  * data, NULL);
694  *
695  * /<!-- -->* cancellable operation here... *<!-- -->/
696  *
697  * g_cancellable_disconnect (cancellable, id);
698  *
699  * /<!-- -->* cancelled_handler is never called after this, it
700  * * is now safe to free the data *<!-- -->/
701  * my_data_free (my_data);
702  * ]|
703  *
704  * Note that the cancelled signal is emitted in the thread that
705  * the user cancelled from, which may be the main thread. So, the
706  * cancellable signal should not do something that can block.
707  */
708
709
710 /**
711  * GCancellableSourceFunc:
712  * @cancellable: the #GCancellable
713  * @user_data: data passed in by the user.
714  *
715  * This is the function type of the callback used for the #GSource
716  * returned by g_cancellable_source_new().
717  *
718  * Returns: it should return %FALSE if the source should be removed.
719  * Since: 2.28
720  */
721
722
723 /**
724  * GCharsetConverter:
725  *
726  * Conversions between character sets.
727  */
728
729
730 /**
731  * GChecksum:
732  *
733  * An opaque structure representing a checksumming operation.
734  * To create a new GChecksum, use g_checksum_new(). To free
735  * a GChecksum, use g_checksum_free().
736  *
737  * Since: 2.16
738  */
739
740
741 /**
742  * GChecksumType:
743  * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
744  * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
745  * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
746  *
747  * The hashing algorithm to be used by #GChecksum when performing the
748  * digest of some data.
749  *
750  * Note that the #GChecksumType enumeration may be extended at a later
751  * date to include new hashing algorithm types.
752  *
753  * Since: 2.16
754  */
755
756
757 /**
758  * GChildWatchFunc:
759  * @pid: the process id of the child process
760  * @status: Status information about the child process, see waitpid(2) for more information about this field
761  * @data: user data passed to g_child_watch_add()
762  *
763  * The type of functions to be called when a child exists.
764  */
765
766
767 /**
768  * GClassFinalizeFunc:
769  * @g_class: The #GTypeClass structure to finalize.
770  * @class_data: The @class_data member supplied via the #GTypeInfo structure.
771  *
772  * A callback function used by the type system to finalize a class.
773  * This function is rarely needed, as dynamically allocated class resources
774  * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
775  * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
776  * structure of a static type is invalid, because classes of static types
777  * will never be finalized (they are artificially kept alive when their
778  * reference count drops to zero).
779  */
780
781
782 /**
783  * GClassInitFunc:
784  * @g_class: The #GTypeClass structure to initialize.
785  * @class_data: The @class_data member supplied via the #GTypeInfo structure.
786  *
787  * A callback function used by the type system to initialize the class
788  * of a specific type. This function should initialize all static class
789  * members.
790  * The initialization process of a class involves:
791  * <itemizedlist>
792  * <listitem><para>
793  * 1 - Copying common members from the parent class over to the
794  * derived class structure.
795  * </para></listitem>
796  * <listitem><para>
797  * 2 -  Zero initialization of the remaining members not copied
798  * over from the parent class.
799  * </para></listitem>
800  * <listitem><para>
801  * 3 - Invocation of the GBaseInitFunc() initializers of all parent
802  * types and the class' type.
803  * </para></listitem>
804  * <listitem><para>
805  * 4 - Invocation of the class' GClassInitFunc() initializer.
806  * </para></listitem>
807  * </itemizedlist>
808  * Since derived classes are partially initialized through a memory copy
809  * of the parent class, the general rule is that GBaseInitFunc() and
810  * GBaseFinalizeFunc() should take care of necessary reinitialization
811  * and release of those class members that were introduced by the type
812  * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
813  * GClassInitFunc() should only care about initializing static
814  * class members, while dynamic class members (such as allocated strings
815  * or reference counted resources) are better handled by a GBaseInitFunc()
816  * for this type, so proper initialization of the dynamic class members
817  * is performed for class initialization of derived types as well.
818  * An example may help to correspond the intend of the different class
819  * initializers:
820  *
821  * |[
822  * typedef struct {
823  * GObjectClass parent_class;
824  * gint         static_integer;
825  * gchar       *dynamic_string;
826  * } TypeAClass;
827  * static void
828  * type_a_base_class_init (TypeAClass *class)
829  * {
830  * class->dynamic_string = g_strdup ("some string");
831  * }
832  * static void
833  * type_a_base_class_finalize (TypeAClass *class)
834  * {
835  * g_free (class->dynamic_string);
836  * }
837  * static void
838  * type_a_class_init (TypeAClass *class)
839  * {
840  * class->static_integer = 42;
841  * }
842  *
843  * typedef struct {
844  * TypeAClass   parent_class;
845  * gfloat       static_float;
846  * GString     *dynamic_gstring;
847  * } TypeBClass;
848  * static void
849  * type_b_base_class_init (TypeBClass *class)
850  * {
851  * class->dynamic_gstring = g_string_new ("some other string");
852  * }
853  * static void
854  * type_b_base_class_finalize (TypeBClass *class)
855  * {
856  * g_string_free (class->dynamic_gstring);
857  * }
858  * static void
859  * type_b_class_init (TypeBClass *class)
860  * {
861  * class->static_float = 3.14159265358979323846;
862  * }
863  * ]|
864  * Initialization of TypeBClass will first cause initialization of
865  * TypeAClass (derived classes reference their parent classes, see
866  * g_type_class_ref() on this).
867  * Initialization of TypeAClass roughly involves zero-initializing its fields,
868  * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
869  * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
870  * type_a_class_init() to initialize its static members (static_integer).
871  * The first step in the initialization process of TypeBClass is then
872  * a plain memory copy of the contents of TypeAClass into TypeBClass and
873  * zero-initialization of the remaining fields in TypeBClass.
874  * The dynamic members of TypeAClass within TypeBClass now need
875  * reinitialization which is performed by calling type_a_base_class_init()
876  * with an argument of TypeBClass.
877  * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
878  * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
879  * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
880  * is called to complete the initialization process with the static members
881  * (static_float).
882  * Corresponding finalization counter parts to the GBaseInitFunc() functions
883  * have to be provided to release allocated resources at class finalization
884  * time.
885  */
886
887
888 /**
889  * GClosure:
890  * @in_marshal: Indicates whether the closure is currently being invoked with g_closure_invoke()
891  * @is_invalid: Indicates whether the closure has been invalidated by g_closure_invalidate()
892  *
893  * A #GClosure represents a callback supplied by the programmer.
894  */
895
896
897 /**
898  * GClosureMarshal:
899  * @closure: the #GClosure to which the marshaller belongs
900  * @return_value: a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
901  * @n_param_values: the length of the @param_values array
902  * @param_values: an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
903  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
904  * @marshal_data: additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
905  *
906  * The type used for marshaller functions.
907  */
908
909
910 /**
911  * GClosureNotify:
912  * @data: data specified when registering the notification callback
913  * @closure: the #GClosure on which the notification is emitted
914  *
915  * The type used for the various notification callbacks which can be registered
916  * on closures.
917  */
918
919
920 /**
921  * GConnectFlags:
922  * @G_CONNECT_AFTER: whether the handler should be called before or after the default handler of the signal.
923  * @G_CONNECT_SWAPPED: whether the instance and data should be swapped when calling the handler.
924  *
925  * The connection flags are used to specify the behaviour of a signal's
926  * connection.
927  */
928
929
930 /**
931  * GConvertError:
932  * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character sets is not supported.
933  * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input.
934  * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason.
935  * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input.
936  * @G_CONVERT_ERROR_BAD_URI: URI is invalid.
937  * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path.
938  *
939  * Error codes returned by character set conversion routines.
940  */
941
942
943 /**
944  * GConverter:
945  *
946  * Seek object for streaming operations.
947  *
948  * Since: 2.24
949  */
950
951
952 /**
953  * GConverterFlags:
954  * @G_CONVERTER_NO_FLAGS: No flags.
955  * @G_CONVERTER_INPUT_AT_END: At end of input data
956  * @G_CONVERTER_FLUSH: Flush data
957  *
958  * Flags used when calling a g_converter_convert().
959  *
960  * Since: 2.24
961  */
962
963
964 /**
965  * GConverterIface:
966  * @g_iface: The parent interface.
967  * @convert: Converts data.
968  * @reset: Reverts the internal state of the converter to its initial state.
969  *
970  * Provides an interface for converting data from one type
971  * to another type. The conversion can be stateful
972  * and may fail at any place.
973  *
974  * Since: 2.24
975  */
976
977
978 /**
979  * GConverterInputStream:
980  *
981  * An implementation of #GFilterInputStream that allows data
982  * conversion.
983  */
984
985
986 /**
987  * GConverterOutputStream:
988  *
989  * An implementation of #GFilterOutputStream that allows data
990  * conversion.
991  */
992
993
994 /**
995  * GConverterResult:
996  * @G_CONVERTER_ERROR: There was an error during conversion.
997  * @G_CONVERTER_CONVERTED: Some data was consumed or produced
998  * @G_CONVERTER_FINISHED: The conversion is finished
999  * @G_CONVERTER_FLUSHED: Flushing is finished
1000  *
1001  * Results returned from g_converter_convert().
1002  *
1003  * Since: 2.24
1004  */
1005
1006
1007 /**
1008  * GCopyFunc:
1009  * @src: A pointer to the data which should be copied
1010  * @data: Additional data
1011  *
1012  * A function of this signature is used to copy the node data
1013  * when doing a deep-copy of a tree.
1014  *
1015  * Returns: A pointer to the copy
1016  * Since: 2.4
1017  */
1018
1019
1020 /**
1021  * GCredentials:
1022  *
1023  * The #GCredentials structure contains only private data and
1024  * should only be accessed using the provided API.
1025  *
1026  * Since: 2.26
1027  */
1028
1029
1030 /**
1031  * GCredentialsClass:
1032  *
1033  * Class structure for #GCredentials.
1034  *
1035  * Since: 2.26
1036  */
1037
1038
1039 /**
1040  * GCredentialsType:
1041  * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type.
1042  * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a <type>struct ucred</type>.
1043  * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a <type>struct cmsgcred</type>.
1044  * @G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED: The native credentials type is a <type>struct sockpeercred</type>. Added in 2.30.
1045  *
1046  * Enumeration describing different kinds of native credential types.
1047  *
1048  * Since: 2.26
1049  */
1050
1051
1052 /**
1053  * GDBusAnnotationInfo:
1054  * @ref_count: The reference count or -1 if statically allocated.
1055  * @key: The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".
1056  * @value: The value of the annotation.
1057  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1058  *
1059  * Information about an annotation.
1060  *
1061  * Since: 2.26
1062  */
1063
1064
1065 /**
1066  * GDBusArgInfo:
1067  * @ref_count: The reference count or -1 if statically allocated.
1068  * @name: Name of the argument, e.g. @unix_user_id.
1069  * @signature: D-Bus signature of the argument (a single complete type).
1070  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1071  *
1072  * Information about an argument for a method or a signal.
1073  *
1074  * Since: 2.26
1075  */
1076
1077
1078 /**
1079  * GDBusAuthMechanism:credentials:
1080  *
1081  * If authenticating as a server, this property contains the
1082  * received credentials, if any.
1083  *
1084  * If authenticating as a client, the property contains the
1085  * credentials that were sent, if any.
1086  */
1087
1088
1089 /**
1090  * GDBusAuthObserver:
1091  *
1092  * The #GDBusAuthObserver structure contains only private data and
1093  * should only be accessed using the provided API.
1094  *
1095  * Since: 2.26
1096  */
1097
1098
1099 /**
1100  * GDBusAuthObserver::authorize-authenticated-peer:
1101  * @observer: The #GDBusAuthObserver emitting the signal.
1102  * @stream: A #GIOStream for the #GDBusConnection.
1103  * @credentials: Credentials received from the peer or %NULL.
1104  *
1105  * Emitted to check if a peer that is successfully authenticated
1106  * is authorized.
1107  *
1108  * Returns: %TRUE if the peer is authorized, %FALSE if not.
1109  * Since: 2.26
1110  */
1111
1112
1113 /**
1114  * GDBusAuthObserverClass:
1115  * @authorize_authenticated_peer: Signal class handler for the #GDBusAuthObserver::authorize-authenticated-peer signal.
1116  *
1117  * Class structure for #GDBusAuthObserverClass.
1118  *
1119  * Since: 2.26
1120  */
1121
1122
1123 /**
1124  * GDBusCallFlags:
1125  * @G_DBUS_CALL_FLAGS_NONE: No flags set.
1126  * @G_DBUS_CALL_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this method invocation.
1127  *
1128  * Flags used in g_dbus_connection_call() and similar APIs.
1129  *
1130  * Since: 2.26
1131  */
1132
1133
1134 /**
1135  * GDBusCapabilityFlags:
1136  * @G_DBUS_CAPABILITY_FLAGS_NONE: No flags set.
1137  * @G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING: The connection supports exchanging UNIX file descriptors with the remote peer.
1138  *
1139  * Capabilities negotiated with the remote peer.
1140  *
1141  * Since: 2.26
1142  */
1143
1144
1145 /**
1146  * GDBusConnection:
1147  *
1148  * The #GDBusConnection structure contains only private data and
1149  * should only be accessed using the provided API.
1150  *
1151  * Since: 2.26
1152  */
1153
1154
1155 /**
1156  * GDBusConnection::closed:
1157  * @connection: The #GDBusConnection emitting the signal.
1158  * @remote_peer_vanished: %TRUE if @connection is closed because the remote peer closed its end of the connection.
1159  * @error: A #GError with more details about the event or %NULL.
1160  *
1161  * Emitted when the connection is closed.
1162  *
1163  * The cause of this event can be
1164  * <itemizedlist>
1165  * <listitem><para>
1166  * If g_dbus_connection_close() is called. In this case
1167  * @remote_peer_vanished is set to %FALSE and @error is %NULL.
1168  * </para></listitem>
1169  * <listitem><para>
1170  * If the remote peer closes the connection. In this case
1171  * @remote_peer_vanished is set to %TRUE and @error is set.
1172  * </para></listitem>
1173  * <listitem><para>
1174  * If the remote peer sends invalid or malformed data. In this
1175  * case @remote_peer_vanished is set to %FALSE and @error
1176  * is set.
1177  * </para></listitem>
1178  * </itemizedlist>
1179  *
1180  * Upon receiving this signal, you should give up your reference to
1181  * @connection. You are guaranteed that this signal is emitted only
1182  * once.
1183  *
1184  * Since: 2.26
1185  */
1186
1187
1188 /**
1189  * GDBusConnection:address:
1190  *
1191  * A D-Bus address specifying potential endpoints that can be used
1192  * when establishing the connection.
1193  *
1194  * Since: 2.26
1195  */
1196
1197
1198 /**
1199  * GDBusConnection:authentication-observer:
1200  *
1201  * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
1202  *
1203  * Since: 2.26
1204  */
1205
1206
1207 /**
1208  * GDBusConnection:capabilities:
1209  *
1210  * Flags from the #GDBusCapabilityFlags enumeration
1211  * representing connection features negotiated with the other peer.
1212  *
1213  * Since: 2.26
1214  */
1215
1216
1217 /**
1218  * GDBusConnection:closed:
1219  *
1220  * A boolean specifying whether the connection has been closed.
1221  *
1222  * Since: 2.26
1223  */
1224
1225
1226 /**
1227  * GDBusConnection:exit-on-close:
1228  *
1229  * A boolean specifying whether the process will be terminated (by
1230  * calling <literal>raise(SIGTERM)</literal>) if the connection
1231  * is closed by the remote peer.
1232  *
1233  * Since: 2.26
1234  */
1235
1236
1237 /**
1238  * GDBusConnection:flags:
1239  *
1240  * Flags from the #GDBusConnectionFlags enumeration.
1241  *
1242  * Since: 2.26
1243  */
1244
1245
1246 /**
1247  * GDBusConnection:guid:
1248  *
1249  * The GUID of the peer performing the role of server when
1250  * authenticating.
1251  *
1252  * If you are constructing a #GDBusConnection and pass
1253  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the
1254  * #GDBusConnection:flags property then you MUST also set this
1255  * property to a valid guid.
1256  *
1257  * If you are constructing a #GDBusConnection and pass
1258  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
1259  * #GDBusConnection:flags property you will be able to read the GUID
1260  * of the other peer here after the connection has been successfully
1261  * initialized.
1262  *
1263  * Since: 2.26
1264  */
1265
1266
1267 /**
1268  * GDBusConnection:locked:
1269  *
1270  * A boolean specifying whether the message is locked.
1271  *
1272  * Since: 2.26
1273  */
1274
1275
1276 /**
1277  * GDBusConnection:stream:
1278  *
1279  * The underlying #GIOStream used for I/O.
1280  *
1281  * If this is passed on construction and is a #GSocketConnection,
1282  * then the corresponding #GSocket will be put into non-blocking mode.
1283  *
1284  * Since: 2.26
1285  */
1286
1287
1288 /**
1289  * GDBusConnection:unique-name:
1290  *
1291  * The unique name as assigned by the message bus or %NULL if the
1292  * connection is not open or not a message bus connection.
1293  *
1294  * Since: 2.26
1295  */
1296
1297
1298 /**
1299  * GDBusConnectionClass:
1300  * @closed: Signal class handler for the #GDBusConnection::closed signal.
1301  *
1302  * Class structure for #GDBusConnection.
1303  *
1304  * Since: 2.26
1305  */
1306
1307
1308 /**
1309  * GDBusConnectionFlags:
1310  * @G_DBUS_CONNECTION_FLAGS_NONE: No flags set.
1311  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT: Perform authentication against server.
1312  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER: Perform authentication against client.
1313  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: When authenticating as a server, allow the anonymous authentication method.
1314  * @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.
1315  * @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.
1316  *
1317  * Flags used when creating a new #GDBusConnection.
1318  *
1319  * Since: 2.26
1320  */
1321
1322
1323 /**
1324  * GDBusError:
1325  *
1326  * Certain timeout errors, e.g. while starting a service. Warning: this is
1327  * Error codes for the %G_DBUS_ERROR error domain.
1328  *
1329  * Since: 2.26
1330  */
1331
1332
1333 /**
1334  * GDBusErrorEntry:
1335  * @error_code: An error code.
1336  * @dbus_error_name: The D-Bus error name to associate with @error_code.
1337  *
1338  * Struct used in g_dbus_error_register_error_domain().
1339  *
1340  * Since: 2.26
1341  */
1342
1343
1344 /**
1345  * GDBusInterface:
1346  *
1347  * Base type for D-Bus interfaces.
1348  *
1349  * Since: 2.30
1350  */
1351
1352
1353 /**
1354  * GDBusInterfaceGetPropertyFunc:
1355  * @connection: A #GDBusConnection.
1356  * @sender: The unique bus name of the remote caller.
1357  * @object_path: The object path that the method was invoked on.
1358  * @interface_name: The D-Bus interface name for the property.
1359  * @property_name: The name of the property to get the value of.
1360  * @error: Return location for error.
1361  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1362  *
1363  * The type of the @get_property function in #GDBusInterfaceVTable.
1364  *
1365  * @error is set. If the returned #GVariant is floating, it is
1366  * consumed - otherwise its reference count is decreased by one.
1367  *
1368  * Returns: A #GVariant with the value for @property_name or %NULL if
1369  * Since: 2.26
1370  */
1371
1372
1373 /**
1374  * GDBusInterfaceIface:
1375  * @parent_iface: The parent interface.
1376  * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_get_info().
1377  * @get_object: Gets the enclosing #GDBusObject. See g_dbus_interface_get_object().
1378  * @set_object: Sets the enclosing #GDBusObject. See g_dbus_interface_set_object().
1379  *
1380  * Base type for D-Bus interfaces.
1381  *
1382  * Since: 2.30
1383  */
1384
1385
1386 /**
1387  * GDBusInterfaceInfo:
1388  * @ref_count: The reference count or -1 if statically allocated.
1389  * @name: The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".
1390  * @methods: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods.
1391  * @signals: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals.
1392  * @properties: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties.
1393  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1394  *
1395  * Information about a D-Bus interface.
1396  *
1397  * Since: 2.26
1398  */
1399
1400
1401 /**
1402  * GDBusInterfaceMethodCallFunc:
1403  * @connection: A #GDBusConnection.
1404  * @sender: The unique bus name of the remote caller.
1405  * @object_path: The object path that the method was invoked on.
1406  * @interface_name: The D-Bus interface name the method was invoked on.
1407  * @method_name: The name of the method that was invoked.
1408  * @parameters: A #GVariant tuple with parameters.
1409  * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
1410  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1411  *
1412  * The type of the @method_call function in #GDBusInterfaceVTable.
1413  *
1414  * Since: 2.26
1415  */
1416
1417
1418 /**
1419  * GDBusInterfaceSetPropertyFunc:
1420  * @connection: A #GDBusConnection.
1421  * @sender: The unique bus name of the remote caller.
1422  * @object_path: The object path that the method was invoked on.
1423  * @interface_name: The D-Bus interface name for the property.
1424  * @property_name: The name of the property to get the value of.
1425  * @value: The value to set the property to.
1426  * @error: Return location for error.
1427  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1428  *
1429  * The type of the @set_property function in #GDBusInterfaceVTable.
1430  *
1431  * Returns: %TRUE if the property was set to @value, %FALSE if @error is set.
1432  * Since: 2.26
1433  */
1434
1435
1436 /**
1437  * GDBusInterfaceSkeleton:
1438  *
1439  * The #GDBusInterfaceSkeleton structure contains private data and should
1440  * only be accessed using the provided API.
1441  *
1442  * Since: 2.30
1443  */
1444
1445
1446 /**
1447  * GDBusInterfaceSkeleton::g-authorize-method:
1448  * @interface: The #GDBusInterfaceSkeleton emitting the signal.
1449  * @invocation: A #GDBusMethodInvocation.
1450  *
1451  * Emitted when a method is invoked by a remote caller and used to
1452  * determine if the method call is authorized.
1453  *
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  *
1462  * If %FALSE is returned then no further handlers are run and the
1463  * signal handler must take a reference to @invocation and finish
1464  * handling the call (e.g. return an error via
1465  * g_dbus_method_invocation_return_error()).
1466  *
1467  * Otherwise, if %TRUE is returned, signal emission continues. If no
1468  * handlers return %FALSE, then the method is dispatched. If
1469  * @interface has an enclosing #GDBusObjectSkeleton, then the
1470  * #GDBusObjectSkeleton::authorize-method signal handlers run before
1471  * the handlers for this signal.
1472  *
1473  * The default class handler just returns %TRUE.
1474  *
1475  * Please note that the common case is optimized: if no signals
1476  * handlers are connected and the default class handler isn't
1477  * overridden (for both @interface and the enclosing
1478  * #GDBusObjectSkeleton, if any) and #GDBusInterfaceSkeleton:g-flags does
1479  * not have the
1480  * %G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD
1481  * flags set, no dedicated thread is ever used and the call will be
1482  * handled in the same thread as the object that @interface belongs
1483  * to was exported in.
1484  *
1485  * Returns: %TRUE if the call is authorized, %FALSE otherwise.
1486  * Since: 2.30
1487  */
1488
1489
1490 /**
1491  * GDBusInterfaceSkeleton:g-flags:
1492  *
1493  * Flags from the #GDBusInterfaceSkeletonFlags enumeration.
1494  *
1495  * Since: 2.30
1496  */
1497
1498
1499 /**
1500  * GDBusInterfaceSkeletonClass:
1501  * @parent_class: The parent class.
1502  * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details.
1503  * @get_vtable: Returns a #GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details.
1504  * @get_properties: Returns a #GVariant with all properties. See g_dbus_interface_skeleton_get_properties().
1505  * @flush: Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush().
1506  * @g_authorize_method: Signal class handler for the #GDBusInterfaceSkeleton::g-authorize-method signal.
1507  *
1508  * Class structure for #GDBusInterfaceSkeleton.
1509  *
1510  * Since: 2.30
1511  */
1512
1513
1514 /**
1515  * GDBusInterfaceSkeletonFlags:
1516  * @G_DBUS_INTERFACE_SKELETON_FLAGS_NONE: No flags set.
1517  * @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.
1518  *
1519  * Flags describing the behavior of a #GDBusInterfaceSkeleton instance.
1520  *
1521  * Since: 2.30
1522  */
1523
1524
1525 /**
1526  * GDBusInterfaceVTable:
1527  * @method_call: Function for handling incoming method calls.
1528  * @get_property: Function for getting a property.
1529  * @set_property: Function for setting a property.
1530  *
1531  * Virtual table for handling properties and method calls for a D-Bus
1532  * interface.
1533  *
1534  * If you want to handle getting/setting D-Bus properties asynchronously, simply
1535  * register an object with the <literal>org.freedesktop.DBus.Properties</literal>
1536  * D-Bus interface using g_dbus_connection_register_object().
1537  *
1538  * Since: 2.26
1539  */
1540
1541
1542 /**
1543  * GDBusMessage:
1544  *
1545  * The #GDBusMessage structure contains only private data and should
1546  * only be accessed using the provided API.
1547  *
1548  * Since: 2.26
1549  */
1550
1551
1552 /**
1553  * GDBusMessageByteOrder:
1554  * @G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN: The byte order is big endian.
1555  * @G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN: The byte order is little endian.
1556  *
1557  * Enumeration used to describe the byte order of a D-Bus message.
1558  *
1559  * Since: 2.26
1560  */
1561
1562
1563 /**
1564  * GDBusMessageClass:
1565  *
1566  * Class structure for #GDBusMessage.
1567  *
1568  * Since: 2.26
1569  */
1570
1571
1572 /**
1573  * GDBusMessageFilterFunction:
1574  * @connection: (transfer none): A #GDBusConnection.
1575  * @message: (transfer full): A locked #GDBusMessage that the filter function takes ownership of.
1576  * @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.
1577  * @user_data: User data passed when adding the filter.
1578  *
1579  * Signature for function used in g_dbus_connection_add_filter().
1580  *
1581  * A filter function is passed a #GDBusMessage and expected to return
1582  * a #GDBusMessage too. Passive filter functions that don't modify the
1583  * message can simply return the @message object:
1584  * |[
1585  * static GDBusMessage *
1586  * passive_filter (GDBusConnection *connection
1587  * GDBusMessage    *message,
1588  * gboolean         incoming,
1589  * gpointer         user_data)
1590  * {
1591  * /<!-- -->* inspect @message *<!-- -->/
1592  * return message;
1593  * }
1594  * ]|
1595  * Filter functions that wants to drop a message can simply return %NULL:
1596  * |[
1597  * static GDBusMessage *
1598  * drop_filter (GDBusConnection *connection
1599  * GDBusMessage    *message,
1600  * gboolean         incoming,
1601  * gpointer         user_data)
1602  * {
1603  * if (should_drop_message)
1604  * {
1605  * g_object_unref (message);
1606  * message = NULL;
1607  * }
1608  * return message;
1609  * }
1610  * ]|
1611  * Finally, a filter function may modify a message by copying it:
1612  * |[
1613  * static GDBusMessage *
1614  * modifying_filter (GDBusConnection *connection
1615  * GDBusMessage    *message,
1616  * gboolean         incoming,
1617  * gpointer         user_data)
1618  * {
1619  * GDBusMessage *copy;
1620  * GError *error;
1621  *
1622  * error = NULL;
1623  * copy = g_dbus_message_copy (message, &error);
1624  * /<!-- -->* handle @error being is set *<!-- -->/
1625  * g_object_unref (message);
1626  *
1627  * /<!-- -->* modify @copy *<!-- -->/
1628  *
1629  * return copy;
1630  * }
1631  * ]|
1632  * If the returned #GDBusMessage is different from @message and cannot
1633  * be sent on @connection (it could use features, such as file
1634  * descriptors, not compatible with @connection), then a warning is
1635  * logged to <emphasis>standard error</emphasis>. Applications can
1636  * check this ahead of time using g_dbus_message_to_blob() passing a
1637  * #GDBusCapabilityFlags value obtained from @connection.
1638  *
1639  * g_object_unref() or %NULL to drop the message. Passive filter
1640  * functions can simply return the passed @message object.
1641  *
1642  * Returns: (transfer full) (allow-none): A #GDBusMessage that will be freed with
1643  * Since: 2.26
1644  */
1645
1646
1647 /**
1648  * GDBusMessageFlags:
1649  * @G_DBUS_MESSAGE_FLAGS_NONE: No flags set.
1650  * @G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED: A reply is not expected.
1651  * @G_DBUS_MESSAGE_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this message.
1652  *
1653  * Message flags used in #GDBusMessage.
1654  *
1655  * Since: 2.26
1656  */
1657
1658
1659 /**
1660  * GDBusMessageHeaderField:
1661  * @G_DBUS_MESSAGE_HEADER_FIELD_INVALID: Not a valid header field.
1662  * @G_DBUS_MESSAGE_HEADER_FIELD_PATH: The object path.
1663  * @G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE: The interface name.
1664  * @G_DBUS_MESSAGE_HEADER_FIELD_MEMBER: The method or signal name.
1665  * @G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME: The name of the error that occurred.
1666  * @G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL: The serial number the message is a reply to.
1667  * @G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION: The name the message is intended for.
1668  * @G_DBUS_MESSAGE_HEADER_FIELD_SENDER: Unique name of the sender of the message (filled in by the bus).
1669  * @G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE: The signature of the message body.
1670  * @G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS: The number of UNIX file descriptors that accompany the message.
1671  *
1672  * Header fields used in #GDBusMessage.
1673  *
1674  * Since: 2.26
1675  */
1676
1677
1678 /**
1679  * GDBusMessageType:
1680  * @G_DBUS_MESSAGE_TYPE_INVALID: Message is of invalid type.
1681  * @G_DBUS_MESSAGE_TYPE_METHOD_CALL: Method call.
1682  * @G_DBUS_MESSAGE_TYPE_METHOD_RETURN: Method reply.
1683  * @G_DBUS_MESSAGE_TYPE_ERROR: Error reply.
1684  * @G_DBUS_MESSAGE_TYPE_SIGNAL: Signal emission.
1685  *
1686  * Message types used in #GDBusMessage.
1687  *
1688  * Since: 2.26
1689  */
1690
1691
1692 /**
1693  * GDBusMethodInfo:
1694  * @ref_count: The reference count or -1 if statically allocated.
1695  * @name: The name of the D-Bus method, e.g. @RequestName.
1696  * @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.
1697  * @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.
1698  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1699  *
1700  * Information about a method on an D-Bus interface.
1701  *
1702  * Since: 2.26
1703  */
1704
1705
1706 /**
1707  * GDBusMethodInvocation:
1708  *
1709  * The #GDBusMethodInvocation structure contains only private data and
1710  * should only be accessed using the provided API.
1711  *
1712  * Since: 2.26
1713  */
1714
1715
1716 /**
1717  * GDBusMethodInvocationClass:
1718  *
1719  * Class structure for #GDBusMethodInvocation.
1720  *
1721  * Since: 2.26
1722  */
1723
1724
1725 /**
1726  * GDBusNodeInfo:
1727  * @ref_count: The reference count or -1 if statically allocated.
1728  * @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.
1729  * @interfaces: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces.
1730  * @nodes: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes.
1731  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1732  *
1733  * Information about nodes in a remote object hierarchy.
1734  *
1735  * Since: 2.26
1736  */
1737
1738
1739 /**
1740  * GDBusObject::interface-added:
1741  * @object: The #GDBusObject emitting the signal.
1742  * @interface: The #GDBusInterface that was added.
1743  *
1744  * Emitted when @interface is added to @object.
1745  *
1746  * Since: 2.30
1747  */
1748
1749
1750 /**
1751  * GDBusObject::interface-removed:
1752  * @object: The #GDBusObject emitting the signal.
1753  * @interface: The #GDBusInterface that was removed.
1754  *
1755  * Emitted when @interface is removed from @object.
1756  *
1757  * Since: 2.30
1758  */
1759
1760
1761 /**
1762  * GDBusObjectIface:
1763  * @parent_iface: The parent interface.
1764  * @get_object_path: Returns the object path. See g_dbus_object_get_object_path().
1765  * @get_interfaces: Returns all interfaces. See g_dbus_object_get_interfaces().
1766  * @get_interface: Returns an interface by name. See g_dbus_object_get_interface().
1767  * @interface_added: Signal handler for the #GDBusObject::interface-added signal.
1768  * @interface_removed: Signal handler for the #GDBusObject::interface-removed signal.
1769  *
1770  * Base object type for D-Bus objects.
1771  *
1772  * Since: 2.30
1773  */
1774
1775
1776 /**
1777  * GDBusObjectManager::interface-added:
1778  * @manager: The #GDBusObjectManager emitting the signal.
1779  * @object: The #GDBusObject on which an interface was added.
1780  * @interface: The #GDBusInterface that was added.
1781  *
1782  * Emitted when @interface is added to @object.
1783  *
1784  * This signal exists purely as a convenience to avoid having to
1785  * connect signals to all objects managed by @manager.
1786  *
1787  * Since: 2.30
1788  */
1789
1790
1791 /**
1792  * GDBusObjectManager::interface-removed:
1793  * @manager: The #GDBusObjectManager emitting the signal.
1794  * @object: The #GDBusObject on which an interface was removed.
1795  * @interface: The #GDBusInterface that was removed.
1796  *
1797  * Emitted when @interface has been removed from @object.
1798  *
1799  * This signal exists purely as a convenience to avoid having to
1800  * connect signals to all objects managed by @manager.
1801  *
1802  * Since: 2.30
1803  */
1804
1805
1806 /**
1807  * GDBusObjectManager::object-added:
1808  * @manager: The #GDBusObjectManager emitting the signal.
1809  * @object: The #GDBusObject that was added.
1810  *
1811  * Emitted when @object is added to @manager.
1812  *
1813  * Since: 2.30
1814  */
1815
1816
1817 /**
1818  * GDBusObjectManager::object-removed:
1819  * @manager: The #GDBusObjectManager emitting the signal.
1820  * @object: The #GDBusObject that was removed.
1821  *
1822  * Emitted when @object is removed from @manager.
1823  *
1824  * Since: 2.30
1825  */
1826
1827
1828 /**
1829  * GDBusObjectManagerClient:
1830  *
1831  * The #GDBusObjectManagerClient structure contains private data and should
1832  * only be accessed using the provided API.
1833  *
1834  * Since: 2.30
1835  */
1836
1837
1838 /**
1839  * GDBusObjectManagerClient::interface-proxy-properties-changed:
1840  * @manager: The #GDBusObjectManagerClient emitting the signal.
1841  * @object_proxy: The #GDBusObjectProxy on which an interface has properties that are changing.
1842  * @interface_proxy: The #GDBusProxy that has properties that are changing.
1843  * @changed_properties: A #GVariant containing the properties that changed.
1844  * @invalidated_properties: A %NULL terminated array of properties that was invalidated.
1845  *
1846  * Emitted when one or more D-Bus properties on proxy changes. The
1847  * local cache has already been updated when this signal fires. Note
1848  * that both @changed_properties and @invalidated_properties are
1849  * guaranteed to never be %NULL (either may be empty though).
1850  *
1851  * This signal exists purely as a convenience to avoid having to
1852  * connect signals to all interface proxies managed by @manager.
1853  *
1854  * This signal is emitted in the
1855  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
1856  * that @manager was constructed in.
1857  *
1858  * Since: 2.30
1859  */
1860
1861
1862 /**
1863  * GDBusObjectManagerClient::interface-proxy-signal:
1864  * @manager: The #GDBusObjectManagerClient emitting the signal.
1865  * @object_proxy: The #GDBusObjectProxy on which an interface is emitting a D-Bus signal.
1866  * @interface_proxy: The #GDBusProxy that is emitting a D-Bus signal.
1867  * @sender_name: The sender of the signal or NULL if the connection is not a bus connection.
1868  * @signal_name: The signal name.
1869  * @parameters: A #GVariant tuple with parameters for the signal.
1870  *
1871  * Emitted when a D-Bus signal is received on @interface_proxy.
1872  *
1873  * This signal exists purely as a convenience to avoid having to
1874  * connect signals to all interface proxies managed by @manager.
1875  *
1876  * This signal is emitted in the
1877  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
1878  * that @manager was constructed in.
1879  *
1880  * Since: 2.30
1881  */
1882
1883
1884 /**
1885  * GDBusObjectManagerClient:bus-type:
1886  *
1887  * If this property is not %G_BUS_TYPE_NONE, then
1888  * #GDBusObjectManagerClient:connection must be %NULL and will be set to the
1889  * #GDBusConnection obtained by calling g_bus_get() with the value
1890  * of this property.
1891  *
1892  * Since: 2.30
1893  */
1894
1895
1896 /**
1897  * GDBusObjectManagerClient:connection:
1898  *
1899  * The #GDBusConnection to use.
1900  *
1901  * Since: 2.30
1902  */
1903
1904
1905 /**
1906  * GDBusObjectManagerClient:flags:
1907  *
1908  * Flags from the #GDBusObjectManagerClientFlags enumeration.
1909  *
1910  * Since: 2.30
1911  */
1912
1913
1914 /**
1915  * GDBusObjectManagerClient:get-proxy-type-destroy-notify:
1916  *
1917  * A #GDestroyNotify for the #gpointer user_data in #GDBusObjectManagerClient:get-proxy-type-user-data.
1918  *
1919  * Since: 2.30
1920  */
1921
1922
1923 /**
1924  * GDBusObjectManagerClient:get-proxy-type-func:
1925  *
1926  * The #GDBusProxyTypeFunc to use when determining what #GType to
1927  * use for interface proxies or %NULL.
1928  *
1929  * Since: 2.30
1930  */
1931
1932
1933 /**
1934  * GDBusObjectManagerClient:get-proxy-type-user-data:
1935  *
1936  * The #gpointer user_data to pass to #GDBusObjectManagerClient:get-proxy-type-func.
1937  *
1938  * Since: 2.30
1939  */
1940
1941
1942 /**
1943  * GDBusObjectManagerClient:name:
1944  *
1945  * The well-known name or unique name that the manager is for.
1946  *
1947  * Since: 2.30
1948  */
1949
1950
1951 /**
1952  * GDBusObjectManagerClient:name-owner:
1953  *
1954  * The unique name that owns #GDBusObjectManagerClient:name or %NULL if
1955  * no-one is currently owning the name. Connect to the
1956  * #GObject::notify signal to track changes to this property.
1957  *
1958  * Since: 2.30
1959  */
1960
1961
1962 /**
1963  * GDBusObjectManagerClient:object-path:
1964  *
1965  * The object path the manager is for.
1966  *
1967  * Since: 2.30
1968  */
1969
1970
1971 /**
1972  * GDBusObjectManagerClientClass:
1973  * @parent_class: The parent class.
1974  * @interface_proxy_signal: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-signal signal.
1975  * @interface_proxy_properties_changed: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-properties-changed signal.
1976  *
1977  * Class structure for #GDBusObjectManagerClient.
1978  *
1979  * Since: 2.30
1980  */
1981
1982
1983 /**
1984  * GDBusObjectManagerClientFlags:
1985  * @G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE: No flags set.
1986  * @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.
1987  *
1988  * Flags used when constructing a #GDBusObjectManagerClient.
1989  *
1990  * Since: 2.30
1991  */
1992
1993
1994 /**
1995  * GDBusObjectManagerIface:
1996  * @parent_iface: The parent interface.
1997  * @get_object_path: Virtual function for g_dbus_object_manager_get_object_path().
1998  * @get_objects: Virtual function for g_dbus_object_manager_get_objects().
1999  * @get_object: Virtual function for g_dbus_object_manager_get_object().
2000  * @get_interface: Virtual function for g_dbus_object_manager_get_interface().
2001  * @object_added: Signal handler for the #GDBusObjectManager::object-added signal.
2002  * @object_removed: Signal handler for the #GDBusObjectManager::object-removed signal.
2003  * @interface_added: Signal handler for the #GDBusObjectManager::interface-added signal.
2004  * @interface_removed: Signal handler for the #GDBusObjectManager::interface-removed signal.
2005  *
2006  * Base type for D-Bus object managers.
2007  *
2008  * Since: 2.30
2009  */
2010
2011
2012 /**
2013  * GDBusObjectManagerServer:
2014  *
2015  * The #GDBusObjectManagerServer structure contains private data and should
2016  * only be accessed using the provided API.
2017  *
2018  * Since: 2.30
2019  */
2020
2021
2022 /**
2023  * GDBusObjectManagerServer:connection:
2024  *
2025  * The #GDBusConnection to export objects on.
2026  *
2027  * Since: 2.30
2028  */
2029
2030
2031 /**
2032  * GDBusObjectManagerServer:object-path:
2033  *
2034  * The object path to register the manager object at.
2035  *
2036  * Since: 2.30
2037  */
2038
2039
2040 /**
2041  * GDBusObjectManagerServerClass:
2042  * @parent_class: The parent class.
2043  *
2044  * Class structure for #GDBusObjectManagerServer.
2045  *
2046  * Since: 2.30
2047  */
2048
2049
2050 /**
2051  * GDBusObjectProxy:
2052  *
2053  * The #GDBusObjectProxy structure contains private data and should
2054  * only be accessed using the provided API.
2055  *
2056  * Since: 2.30
2057  */
2058
2059
2060 /**
2061  * GDBusObjectProxy:connection:
2062  *
2063  * The connection of the proxy.
2064  *
2065  * Since: 2.30
2066  */
2067
2068
2069 /**
2070  * GDBusObjectProxy:object-path:
2071  *
2072  * The object path of the proxy.
2073  *
2074  * Since: 2.30
2075  */
2076
2077
2078 /**
2079  * GDBusObjectProxyClass:
2080  * @parent_class: The parent class.
2081  *
2082  * Class structure for #GDBusObjectProxy.
2083  *
2084  * Since: 2.30
2085  */
2086
2087
2088 /**
2089  * GDBusObjectSkeleton:
2090  *
2091  * The #GDBusObjectSkeleton structure contains private data and should only be
2092  * accessed using the provided API.
2093  *
2094  * Since: 2.30
2095  */
2096
2097
2098 /**
2099  * GDBusObjectSkeleton::authorize-method:
2100  * @object: The #GDBusObjectSkeleton emitting the signal.
2101  * @interface: The #GDBusInterfaceSkeleton that @invocation is for.
2102  * @invocation: A #GDBusMethodInvocation.
2103  *
2104  * Emitted when a method is invoked by a remote caller and used to
2105  * determine if the method call is authorized.
2106  *
2107  * This signal is like #GDBusInterfaceSkeleton<!-- -->'s
2108  * #GDBusInterfaceSkeleton::g-authorize-method signal, except that it is
2109  * for the enclosing object.
2110  *
2111  * The default class handler just returns %TRUE.
2112  *
2113  * Returns: %TRUE if the call is authorized, %FALSE otherwise.
2114  * Since: 2.30
2115  */
2116
2117
2118 /**
2119  * GDBusObjectSkeleton:object-path:
2120  *
2121  * The object path where the object is exported.
2122  *
2123  * Since: 2.30
2124  */
2125
2126
2127 /**
2128  * GDBusObjectSkeletonClass:
2129  * @parent_class: The parent class.
2130  * @authorize_method: Signal class handler for the #GDBusObjectSkeleton::authorize-method signal.
2131  *
2132  * Class structure for #GDBusObjectSkeleton.
2133  *
2134  * Since: 2.30
2135  */
2136
2137
2138 /**
2139  * GDBusPropertyInfo:
2140  * @ref_count: The reference count or -1 if statically allocated.
2141  * @name: The name of the D-Bus property, e.g. "SupportedFilesystems".
2142  * @signature: The D-Bus signature of the property (a single complete type).
2143  * @flags: Access control flags for the property.
2144  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
2145  *
2146  * Information about a D-Bus property on a D-Bus interface.
2147  *
2148  * Since: 2.26
2149  */
2150
2151
2152 /**
2153  * GDBusPropertyInfoFlags:
2154  * @G_DBUS_PROPERTY_INFO_FLAGS_NONE: No flags set.
2155  * @G_DBUS_PROPERTY_INFO_FLAGS_READABLE: Property is readable.
2156  * @G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE: Property is writable.
2157  *
2158  * Flags describing the access control of a D-Bus property.
2159  *
2160  * Since: 2.26
2161  */
2162
2163
2164 /**
2165  * GDBusProxy:
2166  *
2167  * The #GDBusProxy structure contains only private data and
2168  * should only be accessed using the provided API.
2169  *
2170  * Since: 2.26
2171  */
2172
2173
2174 /**
2175  * GDBusProxy::g-properties-changed:
2176  * @proxy: The #GDBusProxy emitting the signal.
2177  * @changed_properties: A #GVariant containing the properties that changed
2178  * @invalidated_properties: A %NULL terminated array of properties that was invalidated
2179  *
2180  * Emitted when one or more D-Bus properties on @proxy changes. The
2181  * local cache has already been updated when this signal fires. Note
2182  * that both @changed_properties and @invalidated_properties are
2183  * guaranteed to never be %NULL (either may be empty though).
2184  *
2185  * This signal corresponds to the
2186  * <literal>PropertiesChanged</literal> D-Bus signal on the
2187  * <literal>org.freedesktop.DBus.Properties</literal> interface.
2188  *
2189  * Since: 2.26
2190  */
2191
2192
2193 /**
2194  * GDBusProxy::g-signal:
2195  * @proxy: The #GDBusProxy emitting the signal.
2196  * @sender_name: The sender of the signal or %NULL if the connection is not a bus connection.
2197  * @signal_name: The name of the signal.
2198  * @parameters: A #GVariant tuple with parameters for the signal.
2199  *
2200  * Emitted when a signal from the remote object and interface that @proxy is for, has been received.
2201  *
2202  * Since: 2.26
2203  */
2204
2205
2206 /**
2207  * GDBusProxy:g-bus-type:
2208  *
2209  * If this property is not %G_BUS_TYPE_NONE, then
2210  * #GDBusProxy:g-connection must be %NULL and will be set to the
2211  * #GDBusConnection obtained by calling g_bus_get() with the value
2212  * of this property.
2213  *
2214  * Since: 2.26
2215  */
2216
2217
2218 /**
2219  * GDBusProxy:g-connection:
2220  *
2221  * The #GDBusConnection the proxy is for.
2222  *
2223  * Since: 2.26
2224  */
2225
2226
2227 /**
2228  * GDBusProxy:g-default-timeout:
2229  *
2230  * The timeout to use if -1 (specifying default timeout) is passed
2231  * as @timeout_msec in the g_dbus_proxy_call() and
2232  * g_dbus_proxy_call_sync() functions.
2233  *
2234  * This allows applications to set a proxy-wide timeout for all
2235  * remote method invocations on the proxy. If this property is -1,
2236  * the default timeout (typically 25 seconds) is used. If set to
2237  * %G_MAXINT, then no timeout is used.
2238  *
2239  * Since: 2.26
2240  */
2241
2242
2243 /**
2244  * GDBusProxy:g-flags:
2245  *
2246  * Flags from the #GDBusProxyFlags enumeration.
2247  *
2248  * Since: 2.26
2249  */
2250
2251
2252 /**
2253  * GDBusProxy:g-interface-info:
2254  *
2255  * Ensure that interactions with this proxy conform to the given
2256  * interface.  For example, when completing a method call, if the
2257  * type signature of the message isn't what's expected, the given
2258  * #GError is set.  Signals that have a type signature mismatch are
2259  * simply dropped.
2260  *
2261  * Since: 2.26
2262  */
2263
2264
2265 /**
2266  * GDBusProxy:g-interface-name:
2267  *
2268  * The D-Bus interface name the proxy is for.
2269  *
2270  * Since: 2.26
2271  */
2272
2273
2274 /**
2275  * GDBusProxy:g-name:
2276  *
2277  * The well-known or unique name that the proxy is for.
2278  *
2279  * Since: 2.26
2280  */
2281
2282
2283 /**
2284  * GDBusProxy:g-name-owner:
2285  *
2286  * The unique name that owns #GDBusProxy:name or %NULL if no-one
2287  * currently owns that name. You may connect to #GObject::notify signal to
2288  * track changes to this property.
2289  *
2290  * Since: 2.26
2291  */
2292
2293
2294 /**
2295  * GDBusProxy:g-object-path:
2296  *
2297  * The object path the proxy is for.
2298  *
2299  * Since: 2.26
2300  */
2301
2302
2303 /**
2304  * GDBusProxyClass:
2305  * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal.
2306  * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal.
2307  *
2308  * Class structure for #GDBusProxy.
2309  *
2310  * Since: 2.26
2311  */
2312
2313
2314 /**
2315  * GDBusProxyFlags:
2316  * @G_DBUS_PROXY_FLAGS_NONE: No flags set.
2317  * @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties.
2318  * @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object.
2319  * @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.
2320  *
2321  * Flags used when constructing an instance of a #GDBusProxy derived class.
2322  *
2323  * Since: 2.26
2324  */
2325
2326
2327 /**
2328  * GDBusProxyTypeFunc:
2329  * @manager: A #GDBusObjectManagerClient.
2330  * @object_path: The object path of the remote object.
2331  * @interface_name: (allow-none): The interface name of the remote object or %NULL if a #GDBusObjectProxy #GType is requested.
2332  * @user_data: User data.
2333  *
2334  * Function signature for a function used to determine the #GType to
2335  * use for an interface proxy (if @interface_name is not %NULL) or
2336  * object proxy (if @interface_name is %NULL).
2337  *
2338  * This function is called in the
2339  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
2340  * that @manager was constructed in.
2341  *
2342  * must be a #GDBusProxy<!-- -->- or #GDBusObjectProxy<!-- -->-derived
2343  * type.
2344  *
2345  * Returns: A #GType to use for the remote object. The returned type
2346  * Since: 2.30
2347  */
2348
2349
2350 /**
2351  * GDBusSendMessageFlags:
2352  * @G_DBUS_SEND_MESSAGE_FLAGS_NONE: No flags set.
2353  * @G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL: Do not automatically assign a serial number from the #GDBusConnection object when sending a message.
2354  *
2355  * Flags used when sending #GDBusMessage<!-- -->s on a #GDBusConnection.
2356  *
2357  * Since: 2.26
2358  */
2359
2360
2361 /**
2362  * GDBusServer:
2363  *
2364  * The #GDBusServer structure contains only private data and
2365  * should only be accessed using the provided API.
2366  *
2367  * Since: 2.26
2368  */
2369
2370
2371 /**
2372  * GDBusServer::new-connection:
2373  * @server: The #GDBusServer emitting the signal.
2374  * @connection: A #GDBusConnection for the new connection.
2375  *
2376  * Emitted when a new authenticated connection has been made. Use
2377  * g_dbus_connection_get_peer_credentials() to figure out what
2378  * identity (if any), was authenticated.
2379  *
2380  * If you want to accept the connection, take a reference to the
2381  * @connection object and return %TRUE. When you are done with the
2382  * connection call g_dbus_connection_close() and give up your
2383  * reference. Note that the other peer may disconnect at any time -
2384  * a typical thing to do when accepting a connection is to listen to
2385  * the #GDBusConnection::closed signal.
2386  *
2387  * If #GDBusServer:flags contains %G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
2388  * then the signal is emitted in a new thread dedicated to the
2389  * connection. Otherwise the signal is emitted in the <link
2390  * linkend="g-main-context-push-thread-default">thread-default main
2391  * loop</link> of the thread that @server was constructed in.
2392  *
2393  * You are guaranteed that signal handlers for this signal runs
2394  * before incoming messages on @connection are processed. This means
2395  * that it's suitable to call g_dbus_connection_register_object() or
2396  * similar from the signal handler.
2397  *
2398  * run.
2399  *
2400  * Returns: %TRUE to claim @connection, %FALSE to let other handlers
2401  * Since: 2.26
2402  */
2403
2404
2405 /**
2406  * GDBusServer:active:
2407  *
2408  * Whether the server is currently active.
2409  *
2410  * Since: 2.26
2411  */
2412
2413
2414 /**
2415  * GDBusServer:address:
2416  *
2417  * The D-Bus address to listen on.
2418  *
2419  * Since: 2.26
2420  */
2421
2422
2423 /**
2424  * GDBusServer:authentication-observer:
2425  *
2426  * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
2427  *
2428  * Since: 2.26
2429  */
2430
2431
2432 /**
2433  * GDBusServer:client-address:
2434  *
2435  * The D-Bus address that clients can use.
2436  *
2437  * Since: 2.26
2438  */
2439
2440
2441 /**
2442  * GDBusServer:flags:
2443  *
2444  * Flags from the #GDBusServerFlags enumeration.
2445  *
2446  * Since: 2.26
2447  */
2448
2449
2450 /**
2451  * GDBusServer:guid:
2452  *
2453  * The guid of the server.
2454  *
2455  * Since: 2.26
2456  */
2457
2458
2459 /**
2460  * GDBusServerClass:
2461  * @new_connection: Signal class handler for the #GDBusServer::new-connection signal.
2462  *
2463  * Class structure for #GDBusServer.
2464  *
2465  * Since: 2.26
2466  */
2467
2468
2469 /**
2470  * GDBusServerFlags:
2471  * @G_DBUS_SERVER_FLAGS_NONE: No flags set.
2472  * @G_DBUS_SERVER_FLAGS_RUN_IN_THREAD: All #GDBusServer::new-connection signals will run in separated dedicated threads (see signal for details).
2473  * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: Allow the anonymous authentication method.
2474  *
2475  * Flags used when creating a #GDBusServer.
2476  *
2477  * Since: 2.26
2478  */
2479
2480
2481 /**
2482  * GDBusSignalCallback:
2483  * @connection: A #GDBusConnection.
2484  * @sender_name: The unique bus name of the sender of the signal.
2485  * @object_path: The object path that the signal was emitted on.
2486  * @interface_name: The name of the interface.
2487  * @signal_name: The name of the signal.
2488  * @parameters: A #GVariant tuple with parameters for the signal.
2489  * @user_data: User data passed when subscribing to the signal.
2490  *
2491  * Signature for callback function used in g_dbus_connection_signal_subscribe().
2492  *
2493  * Since: 2.26
2494  */
2495
2496
2497 /**
2498  * GDBusSignalFlags:
2499  * @G_DBUS_SIGNAL_FLAGS_NONE: No flags set.
2500  * @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).
2501  *
2502  * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe().
2503  *
2504  * Since: 2.26
2505  */
2506
2507
2508 /**
2509  * GDBusSignalInfo:
2510  * @ref_count: The reference count or -1 if statically allocated.
2511  * @name: The name of the D-Bus signal, e.g. "NameOwnerChanged".
2512  * @args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments.
2513  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
2514  *
2515  * Information about a signal on a D-Bus interface.
2516  *
2517  * Since: 2.26
2518  */
2519
2520
2521 /**
2522  * GDBusSubtreeDispatchFunc:
2523  * @connection: A #GDBusConnection.
2524  * @sender: The unique bus name of the remote caller.
2525  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2526  * @interface_name: The D-Bus interface name that the method call or property access is for.
2527  * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
2528  * @out_user_data: Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL).
2529  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2530  *
2531  * The type of the @dispatch function in #GDBusSubtreeVTable.
2532  *
2533  * Subtrees are flat.  @node, if non-%NULL, is always exactly one
2534  * segment of the object path (ie: it never contains a slash).
2535  *
2536  * Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.
2537  * Since: 2.26
2538  */
2539
2540
2541 /**
2542  * GDBusSubtreeEnumerateFunc:
2543  * @connection: A #GDBusConnection.
2544  * @sender: The unique bus name of the remote caller.
2545  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2546  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2547  *
2548  * The type of the @enumerate function in #GDBusSubtreeVTable.
2549  *
2550  * This function is called when generating introspection data and also
2551  * when preparing to dispatch incoming messages in the event that the
2552  * %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not
2553  * specified (ie: to verify that the object path is valid).
2554  *
2555  * Hierarchies are not supported; the items that you return should not
2556  * contain the '/' character.
2557  *
2558  * The return value will be freed with g_strfreev().
2559  *
2560  * Returns: A newly allocated array of strings for node names that are children of @object_path.
2561  * Since: 2.26
2562  */
2563
2564
2565 /**
2566  * GDBusSubtreeFlags:
2567  * @G_DBUS_SUBTREE_FLAGS_NONE: No flags set.
2568  * @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.
2569  *
2570  * Flags passed to g_dbus_connection_register_subtree().
2571  *
2572  * Since: 2.26
2573  */
2574
2575
2576 /**
2577  * GDBusSubtreeIntrospectFunc:
2578  * @connection: A #GDBusConnection.
2579  * @sender: The unique bus name of the remote caller.
2580  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2581  * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
2582  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2583  *
2584  * The type of the @introspect function in #GDBusSubtreeVTable.
2585  *
2586  * Subtrees are flat.  @node, if non-%NULL, is always exactly one
2587  * segment of the object path (ie: it never contains a slash).
2588  *
2589  * This function should return %NULL to indicate that there is no object
2590  * at this node.
2591  *
2592  * If this function returns non-%NULL, the return value is expected to
2593  * be a %NULL-terminated array of pointers to #GDBusInterfaceInfo
2594  * structures describing the interfaces implemented by @node.  This
2595  * array will have g_dbus_interface_info_unref() called on each item
2596  * before being freed with g_free().
2597  *
2598  * The difference between returning %NULL and an array containing zero
2599  * items is that the standard DBus interfaces will returned to the
2600  * remote introspector in the empty array case, but not in the %NULL
2601  * case.
2602  *
2603  * Returns: A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL.
2604  * Since: 2.26
2605  */
2606
2607
2608 /**
2609  * GDBusSubtreeVTable:
2610  * @enumerate: Function for enumerating child nodes.
2611  * @introspect: Function for introspecting a child node.
2612  * @dispatch: Function for dispatching a remote call on a child node.
2613  *
2614  * Virtual table for handling subtrees registered with g_dbus_connection_register_subtree().
2615  *
2616  * Since: 2.26
2617  */
2618
2619
2620 /**
2621  * GDataInputStream:
2622  *
2623  * An implementation of #GBufferedInputStream that allows for high-level
2624  * data manipulation of arbitrary data (including binary operations).
2625  */
2626
2627
2628 /**
2629  * GDataOutputStream:
2630  *
2631  * An implementation of #GBufferedOutputStream that allows for high-level
2632  * data manipulation of arbitrary data (including binary operations).
2633  */
2634
2635
2636 /**
2637  * GDataOutputStream:byte-order:
2638  *
2639  * Determines the byte ordering that is used when writing
2640  * multi-byte entities (such as integers) to the stream.
2641  */
2642
2643
2644 /**
2645  * GDataStream:byte-order:
2646  *
2647  * The ::byte-order property determines the byte ordering that
2648  * is used when reading multi-byte entities (such as integers)
2649  * from the stream.
2650  */
2651
2652
2653 /**
2654  * GDataStream:newline-type:
2655  *
2656  * The :newline-type property determines what is considered
2657  * as a line ending when reading complete lines from the stream.
2658  */
2659
2660
2661 /**
2662  * GDataStreamByteOrder:
2663  * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order.
2664  * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order.
2665  * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture.
2666  *
2667  * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources
2668  * across various machine architectures.
2669  */
2670
2671
2672 /**
2673  * GDataStreamNewlineType:
2674  * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms.
2675  * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings.
2676  * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows.
2677  * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type.
2678  *
2679  * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file.
2680  */
2681
2682
2683 /**
2684  * GDateTime:
2685  *
2686  * <structname>GDateTime</structname> is an opaque structure whose members
2687  * cannot be accessed directly.
2688  *
2689  * Since: 2.26
2690  */
2691
2692
2693 /**
2694  * GDebugKey:
2695  * @key: the string
2696  * @value: the flag
2697  *
2698  * Associates a string with a bit flag.
2699  * Used in g_parse_debug_string().
2700  */
2701
2702
2703 /**
2704  * GDesktopAppInfo:
2705  *
2706  * Information about an installed application from a desktop file.
2707  */
2708
2709
2710 /**
2711  * GDesktopAppInfo:filename:
2712  *
2713  * The origin filename of this #GDesktopAppInfo
2714  */
2715
2716
2717 /**
2718  * GDrive:
2719  *
2720  * Opaque drive object.
2721  */
2722
2723
2724 /**
2725  * GDrive::changed:
2726  * @drive: a #GDrive.
2727  *
2728  * Emitted when the drive's state has changed.
2729  */
2730
2731
2732 /**
2733  * GDrive::disconnected:
2734  * @drive: a #GDrive.
2735  *
2736  * This signal is emitted when the #GDrive have been
2737  * disconnected. If the recipient is holding references to the
2738  * object they should release them so the object can be
2739  * finalized.
2740  */
2741
2742
2743 /**
2744  * GDrive::eject-button:
2745  * @drive: a #GDrive.
2746  *
2747  * Emitted when the physical eject button (if any) of a drive has
2748  * been pressed.
2749  */
2750
2751
2752 /**
2753  * GDrive::stop-button:
2754  * @drive: a #GDrive.
2755  *
2756  * Emitted when the physical stop button (if any) of a drive has
2757  * been pressed.
2758  *
2759  * Since: 2.22
2760  */
2761
2762
2763 /**
2764  * GDriveIface:
2765  * @g_iface: The parent interface.
2766  * @changed: Signal emitted when the drive is changed.
2767  * @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.
2768  * @eject_button: Signal emitted when the physical eject button (if any) of a drive have been pressed.
2769  * @get_name: Returns the name for the given #GDrive.
2770  * @get_icon: Returns a #GIcon for the given #GDrive.
2771  * @has_volumes: Returns %TRUE if the #GDrive has mountable volumes.
2772  * @get_volumes: Returns a list #GList of #GVolume for the #GDrive.
2773  * @is_media_removable: Returns %TRUE if the #GDrive supports removal and insertion of media.
2774  * @has_media: Returns %TRUE if the #GDrive has media inserted.
2775  * @is_media_check_automatic: Returns %TRUE if the #GDrive is capabable of automatically detecting media changes.
2776  * @can_poll_for_media: Returns %TRUE if the #GDrive is capable of manually polling for media change.
2777  * @can_eject: Returns %TRUE if the #GDrive can eject media.
2778  * @eject: Ejects a #GDrive.
2779  * @eject_finish: Finishes an eject operation.
2780  * @poll_for_media: Poll for media insertion/removal on a #GDrive.
2781  * @poll_for_media_finish: Finishes a media poll operation.
2782  * @get_identifier: Returns the identifier of the given kind, or %NULL if the #GDrive doesn't have one.
2783  * @enumerate_identifiers: Returns an array strings listing the kinds of identifiers which the #GDrive has.
2784  * @get_start_stop_type: Gets a #GDriveStartStopType with details about starting/stopping the drive. Since 2.22.
2785  * @can_stop: Returns %TRUE if a #GDrive can be stopped. Since 2.22.
2786  * @stop: Stops a #GDrive. Since 2.22.
2787  * @stop_finish: Finishes a stop operation. Since 2.22.
2788  * @can_start: Returns %TRUE if a #GDrive can be started. Since 2.22.
2789  * @can_start_degraded: Returns %TRUE if a #GDrive can be started degraded. Since 2.22.
2790  * @start: Starts a #GDrive. Since 2.22.
2791  * @start_finish: Finishes a start operation. Since 2.22.
2792  * @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.
2793  * @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22.
2794  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
2795  *
2796  * Interface for creating #GDrive implementations.
2797  */
2798
2799
2800 /**
2801  * GDriveStartFlags:
2802  * @G_DRIVE_START_NONE: No flags set.
2803  *
2804  * Flags used when starting a drive.
2805  *
2806  * Since: 2.22
2807  */
2808
2809
2810 /**
2811  * GDriveStartStopType:
2812  * @G_DRIVE_START_STOP_TYPE_UNKNOWN: Unknown or drive doesn't support start/stop.
2813  * @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.
2814  * @G_DRIVE_START_STOP_TYPE_NETWORK: The start/stop methods are used for connecting/disconnect to the drive over the network.
2815  * @G_DRIVE_START_STOP_TYPE_MULTIDISK: The start/stop methods will assemble/disassemble a virtual drive from several physical drives.
2816  * @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)
2817  *
2818  * Enumeration describing how a drive can be started/stopped.
2819  *
2820  * Since: 2.22
2821  */
2822
2823
2824 /**
2825  * GEmblem:
2826  *
2827  * An object for Emblems
2828  */
2829
2830
2831 /**
2832  * GEmblemOrigin:
2833  * @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin
2834  * @G_EMBLEM_ORIGIN_DEVICE: Emblem adds device-specific information
2835  * @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly"
2836  * @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)
2837  *
2838  * GEmblemOrigin is used to add information about the origin of the emblem
2839  * to #GEmblem.
2840  *
2841  * Since: 2.18
2842  */
2843
2844
2845 /**
2846  * GEmblemedIcon:
2847  *
2848  * An implementation of #GIcon for icons with emblems.
2849  */
2850
2851
2852 /**
2853  * GEnumClass:
2854  * @g_type_class: the parent class
2855  * @minimum: the smallest possible value.
2856  * @maximum: the largest possible value.
2857  * @n_values: the number of possible values.
2858  * @values: an array of #GEnumValue structs describing the individual values.
2859  *
2860  * The class of an enumeration type holds information about its
2861  * possible values.
2862  */
2863
2864
2865 /**
2866  * GEnumValue:
2867  * @value: the enum value
2868  * @value_name: the name of the value
2869  * @value_nick: the nickname of the value
2870  *
2871  * A structure which contains a single enum value, its name, and its
2872  * nickname.
2873  */
2874
2875
2876 /**
2877  * GError:
2878  * @domain: error domain, e.g. #G_FILE_ERROR
2879  * @code: error code, e.g. %G_FILE_ERROR_NOENT
2880  * @message: human-readable informative error message
2881  *
2882  * The <structname>GError</structname> structure contains
2883  * information about an error that has occurred.
2884  */
2885
2886
2887 /**
2888  * GFile:
2889  *
2890  * A handle to an object implementing the #GFileIface interface.
2891  * Generally stores a location within the file system. Handles do not
2892  * necessarily represent files or directories that currently exist.
2893  */
2894
2895
2896 /**
2897  * GFileAttributeInfo:
2898  * @name: the name of the attribute.
2899  * @type: the #GFileAttributeType type of the attribute.
2900  * @flags: a set of #GFileAttributeInfoFlags.
2901  *
2902  * Information about a specific attribute.
2903  */
2904
2905
2906 /**
2907  * GFileAttributeInfoFlags:
2908  * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set.
2909  * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied.
2910  * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved.
2911  *
2912  * Flags specifying the behaviour of an attribute.
2913  */
2914
2915
2916 /**
2917  * GFileAttributeInfoList:
2918  * @infos: an array of #GFileAttributeInfo<!-- -->s.
2919  * @n_infos: the number of values in the array.
2920  *
2921  * Acts as a lightweight registry for possible valid file attributes.
2922  * The registry stores Key-Value pair formats as #GFileAttributeInfo<!-- -->s.
2923  */
2924
2925
2926 /**
2927  * GFileAttributeMatcher:
2928  *
2929  * Determines if a string matches a file attribute.
2930  */
2931
2932
2933 /**
2934  * GFileAttributeStatus:
2935  * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty).
2936  * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set.
2937  * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value.
2938  *
2939  * Used by g_file_set_attributes_from_info() when setting file attributes.
2940  */
2941
2942
2943 /**
2944  * GFileAttributeType:
2945  * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitalized type.
2946  * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string.
2947  * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes.
2948  * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value.
2949  * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer.
2950  * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer.
2951  * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer.
2952  * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer.
2953  * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject.
2954  * @G_FILE_ATTRIBUTE_TYPE_STRINGV: a %NULL terminated char **. Since 2.22
2955  *
2956  * The data types for file attributes.
2957  */
2958
2959
2960 /**
2961  * GFileCopyFlags:
2962  * @G_FILE_COPY_NONE: No flags set.
2963  * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
2964  * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
2965  * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
2966  * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
2967  * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
2968  * @G_FILE_COPY_TARGET_DEFAULT_PERMS: Leaves target file with default perms, instead of setting the source file perms.
2969  *
2970  * Flags used when copying or moving files.
2971  */
2972
2973
2974 /**
2975  * GFileCreateFlags:
2976  * @G_FILE_CREATE_NONE: No flags set.
2977  * @G_FILE_CREATE_PRIVATE: Create a file that can only be accessed by the current user.
2978  * @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
2979  *
2980  * Flags used when an operation may create a file.
2981  */
2982
2983
2984 /**
2985  * GFileEnumerator:
2986  *
2987  * A per matched file iterator.
2988  */
2989
2990
2991 /**
2992  * GFileIOStream:
2993  *
2994  * A subclass of GIOStream for opened files. This adds
2995  * a few file-specific operations and seeking and truncating.
2996  *
2997  * #GFileIOStream implements GSeekable.
2998  */
2999
3000
3001 /**
3002  * GFileIcon:
3003  *
3004  * Gets an icon for a #GFile. Implements #GLoadableIcon.
3005  */
3006
3007
3008 /**
3009  * GFileIcon:file:
3010  *
3011  * The file containing the icon.
3012  */
3013
3014
3015 /**
3016  * GFileIface:
3017  * @g_iface: The parent interface.
3018  * @dup: Duplicates a #GFile.
3019  * @hash: Creates a hash of a #GFile.
3020  * @equal: Checks equality of two given #GFile<!-- -->s.
3021  * @is_native: Checks to see if a file is native to the system.
3022  * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
3023  * @get_uri_scheme: Gets the URI scheme for a #GFile.
3024  * @get_basename: Gets the basename for a given #GFile.
3025  * @get_path: Gets the current path within a #GFile.
3026  * @get_uri: Gets a URI for the path within a #GFile.
3027  * @get_parse_name: Gets the parsed name for the #GFile.
3028  * @get_parent: Gets the parent directory for the #GFile.
3029  * @prefix_matches: Checks whether a #GFile contains a specified file.
3030  * @get_relative_path: Gets the path for a #GFile relative to a given path.
3031  * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
3032  * @get_child_for_display_name: Gets the child #GFile for a given display name.
3033  * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
3034  * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
3035  * @enumerate_children_finish: Finishes asynchronously enumerating the children.
3036  * @query_info: Gets the #GFileInfo for a #GFile.
3037  * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
3038  * @query_info_finish: Finishes an asynchronous query info operation.
3039  * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
3040  * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
3041  * @query_filesystem_info_finish: Finishes asynchronously getting the file system info.
3042  * @find_enclosing_mount: Gets a #GMount for the #GFile.
3043  * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
3044  * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
3045  * @set_display_name: Sets the display name for a #GFile.
3046  * @set_display_name_async: Asynchronously sets a #GFile's display name.
3047  * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
3048  * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
3049  * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
3050  * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
3051  * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
3052  * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
3053  * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
3054  * @set_attribute: Sets a #GFileAttribute.
3055  * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
3056  * @set_attributes_async: Asynchronously sets a file's attributes.
3057  * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
3058  * @read_fn: Reads a file asynchronously.
3059  * @read_async: Asynchronously reads a file.
3060  * @read_finish: Finishes asynchronously reading a file.
3061  * @append_to: Writes to the end of a file.
3062  * @append_to_async: Asynchronously writes to the end of a file.
3063  * @append_to_finish: Finishes an asynchronous file append operation.
3064  * @create: Creates a new file.
3065  * @create_async: Asynchronously creates a file.
3066  * @create_finish: Finishes asynchronously creating a file.
3067  * @replace: Replaces the contents of a file.
3068  * @replace_async: Asynchronously replaces the contents of a file.
3069  * @replace_finish: Finishes asynchronously replacing a file.
3070  * @delete_file: Deletes a file.
3071  * @_delete_file_async: Asynchronously deletes a file.
3072  * @_delete_file_finish: Finishes an asynchronous delete.
3073  * @trash: Sends a #GFile to the Trash location.
3074  * @_trash_async: Asynchronously sends a #GFile to the Trash location.
3075  * @_trash_finish: Finishes an asynchronous file trashing operation.
3076  * @make_directory: Makes a directory.
3077  * @_make_directory_async: Asynchronously makes a directory.
3078  * @_make_directory_finish: Finishes making a directory asynchronously.
3079  * @make_symbolic_link: Makes a symbolic link.
3080  * @_make_symbolic_link_async: Asynchronously makes a symbolic link
3081  * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
3082  * @copy: Copies a file.
3083  * @copy_async: Asynchronously copies a file.
3084  * @copy_finish: Finishes an asynchronous copy operation.
3085  * @move: Moves a file.
3086  * @_move_async: Asynchronously moves a file.
3087  * @_move_finish: Finishes an asynchronous move operation.
3088  * @mount_mountable: Mounts a mountable object.
3089  * @mount_mountable_finish: Finishes a mounting operation.
3090  * @unmount_mountable: Unmounts a mountable object.
3091  * @unmount_mountable_finish: Finishes an unmount operation.
3092  * @eject_mountable: Ejects a mountable.
3093  * @eject_mountable_finish: Finishes an eject operation.
3094  * @mount_enclosing_volume: Mounts a specified location.
3095  * @mount_enclosing_volume_finish: Finishes mounting a specified location.
3096  * @monitor_dir: Creates a #GFileMonitor for the location.
3097  * @monitor_file: Creates a #GFileMonitor for the location.
3098  * @open_readwrite: Open file read/write. Since 2.22.
3099  * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22.
3100  * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22.
3101  * @create_readwrite: Creates file read/write. Since 2.22.
3102  * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22.
3103  * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22.
3104  * @replace_readwrite: Replaces file read/write. Since 2.22.
3105  * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22.
3106  * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22.
3107  * @start_mountable: Starts a mountable object. Since 2.22.
3108  * @start_mountable_finish: Finishes an start operation. Since 2.22.
3109  * @stop_mountable: Stops a mountable. Since 2.22.
3110  * @stop_mountable_finish: Finishes an stop operation. Since 2.22.
3111  * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22.
3112  * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22.
3113  * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22.
3114  * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22.
3115  * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
3116  * @poll_mountable: Polls a mountable object for media changes. Since 2.22.
3117  * @poll_mountable_finish: Finishes an poll operation for media changes. Since 2.22.
3118  *
3119  * An interface for writing VFS file handles.
3120  */
3121
3122
3123 /**
3124  * GFileInfo:
3125  *
3126  * Stores information about a file system object referenced by a #GFile.
3127  */
3128
3129
3130 /**
3131  * GFileInputStream:
3132  *
3133  * A subclass of GInputStream for opened files. This adds
3134  * a few file-specific operations and seeking.
3135  *
3136  * #GFileInputStream implements #GSeekable.
3137  */
3138
3139
3140 /**
3141  * GFileMonitor:
3142  *
3143  * Watches for changes to a file.
3144  */
3145
3146
3147 /**
3148  * GFileMonitor::changed:
3149  * @monitor: a #GFileMonitor.
3150  * @file: a #GFile.
3151  * @other_file: a #GFile or #NULL.
3152  * @event_type: a #GFileMonitorEvent.
3153  *
3154  * Emitted when @file has been changed.
3155  *
3156  * If using #G_FILE_MONITOR_SEND_MOVED flag and @event_type is
3157  * #G_FILE_MONITOR_SEND_MOVED, @file will be set to a #GFile containing the
3158  * old path, and @other_file will be set to a #GFile containing the new path.
3159  *
3160  * In all the other cases, @other_file will be set to #NULL.
3161  */
3162
3163
3164 /**
3165  * GFileMonitorEvent:
3166  * @G_FILE_MONITOR_EVENT_CHANGED: a file changed.
3167  * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes.
3168  * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted.
3169  * @G_FILE_MONITOR_EVENT_CREATED: a file was created.
3170  * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed.
3171  * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted.
3172  * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted.
3173  * @G_FILE_MONITOR_EVENT_MOVED: the file was moved.
3174  *
3175  * Specifies what type of event a monitor event is.
3176  */
3177
3178
3179 /**
3180  * GFileMonitorFlags:
3181  * @G_FILE_MONITOR_NONE: No flags set.
3182  * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
3183  * @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).
3184  *
3185  * Flags used to set what a #GFileMonitor will watch for.
3186  */
3187
3188
3189 /**
3190  * GFileOutputStream:
3191  *
3192  * A subclass of GOutputStream for opened files. This adds
3193  * a few file-specific operations and seeking and truncating.
3194  *
3195  * #GFileOutputStream implements GSeekable.
3196  */
3197
3198
3199 /**
3200  * GFileProgressCallback:
3201  * @current_num_bytes: the current number of bytes in the operation.
3202  * @total_num_bytes: the total number of bytes in the operation.
3203  * @user_data: user data passed to the callback.
3204  *
3205  * When doing file operations that may take a while, such as moving
3206  * a file or copying a file, a progress callback is used to pass how
3207  * far along that operation is to the application.
3208  */
3209
3210
3211 /**
3212  * GFileQueryInfoFlags:
3213  * @G_FILE_QUERY_INFO_NONE: No flags set.
3214  * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
3215  *
3216  * Flags used when querying a #GFileInfo.
3217  */
3218
3219
3220 /**
3221  * GFileReadMoreCallback:
3222  * @file_contents: the data as currently read.
3223  * @file_size: the size of the data currently read.
3224  * @callback_data: data passed to the callback.
3225  *
3226  * When loading the partial contents of a file with g_file_load_partial_contents_async(),
3227  * it may become necessary to determine if any more data from the file should be loaded.
3228  * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
3229  * should be read, or %FALSE otherwise.
3230  *
3231  * Returns: %TRUE if more data should be read back. %FALSE otherwise.
3232  */
3233
3234
3235 /**
3236  * GFileType:
3237  * @G_FILE_TYPE_UNKNOWN: File's type is unknown.
3238  * @G_FILE_TYPE_REGULAR: File handle represents a regular file.
3239  * @G_FILE_TYPE_DIRECTORY: File handle represents a directory.
3240  * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link (Unix systems).
3241  * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo, block device, or character device.
3242  * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems).
3243  * @G_FILE_TYPE_MOUNTABLE: File is a mountable location.
3244  *
3245  * Indicates the file's on-disk type.
3246  */
3247
3248
3249 /**
3250  * GFilenameCompleter:
3251  *
3252  * Completes filenames based on files that exist within the file system.
3253  */
3254
3255
3256 /**
3257  * GFilenameCompleter::got-completion-data:
3258  *
3259  * Emitted when the file name completion information comes available.
3260  */
3261
3262
3263 /**
3264  * GFilesystemPreviewType:
3265  * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it.
3266  * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files.
3267  * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files.
3268  *
3269  * Indicates a hint from the file system whether files should be
3270  * previewed in a file manager. Returned as the value of the key
3271  * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW.
3272  */
3273
3274
3275 /**
3276  * GFilterInputStream:
3277  *
3278  * A base class for all input streams that work on an underlying stream.
3279  */
3280
3281
3282 /**
3283  * GFilterOutputStream:
3284  *
3285  * A base class for all output streams that work on an underlying stream.
3286  */
3287
3288
3289 /**
3290  * GFlagsClass:
3291  * @g_type_class: the parent class
3292  * @mask: a mask covering all possible values.
3293  * @n_values: the number of possible values.
3294  * @values: an array of #GFlagsValue structs describing the individual values.
3295  *
3296  * The class of a flags type holds information about its
3297  * possible values.
3298  */
3299
3300
3301 /**
3302  * GFlagsValue:
3303  * @value: the flags value
3304  * @value_name: the name of the value
3305  * @value_nick: the nickname of the value
3306  *
3307  * A structure which contains a single flags value, its name, and its
3308  * nickname.
3309  */
3310
3311
3312 /**
3313  * GFreeFunc:
3314  * @data: a data pointer
3315  *
3316  * Declares a type of function which takes an arbitrary
3317  * data pointer argument and has no return value. It is
3318  * not currently used in GLib or GTK+.
3319  */
3320
3321
3322 /**
3323  * GHmac:
3324  *
3325  * An opaque structure representing a HMAC operation.
3326  * To create a new GHmac, use g_hmac_new(). To free
3327  * a GHmac, use g_hmac_unref().
3328  *
3329  * Since: 2.30
3330  */
3331
3332
3333 /**
3334  * GIOErrorEnum:
3335  * @G_IO_ERROR_FAILED: Generic error condition for when any operation fails.
3336  * @G_IO_ERROR_NOT_FOUND: File not found error.
3337  * @G_IO_ERROR_EXISTS: File already exists error.
3338  * @G_IO_ERROR_IS_DIRECTORY: File is a directory error.
3339  * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory.
3340  * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty.
3341  * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file.
3342  * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link.
3343  * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted.
3344  * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters.
3345  * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters.
3346  * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links.
3347  * @G_IO_ERROR_NO_SPACE: No space left on drive.
3348  * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument.
3349  * @G_IO_ERROR_PERMISSION_DENIED: Permission denied.
3350  * @G_IO_ERROR_NOT_SUPPORTED: Operation not supported for the current backend.
3351  * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted.
3352  * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted.
3353  * @G_IO_ERROR_CLOSED: File was closed.
3354  * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable.
3355  * @G_IO_ERROR_PENDING: Operations are still pending.
3356  * @G_IO_ERROR_READ_ONLY: File is read only.
3357  * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created.
3358  * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect.
3359  * @G_IO_ERROR_TIMED_OUT: Operation timed out.
3360  * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive.
3361  * @G_IO_ERROR_BUSY: File is busy.
3362  * @G_IO_ERROR_WOULD_BLOCK: Operation would block.
3363  * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
3364  * @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
3365  * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has already interacted with the user. Do not display any error dialog.
3366  * @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
3367  * @G_IO_ERROR_NOT_INITIALIZED: The object has not been initialized. Since 2.22
3368  * @G_IO_ERROR_ADDRESS_IN_USE: The requested address is already in use. Since 2.22
3369  * @G_IO_ERROR_PARTIAL_INPUT: Need more input to finish operation. Since 2.24
3370  * @G_IO_ERROR_INVALID_DATA: There input data was invalid. Since 2.24
3371  * @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.
3372  * @G_IO_ERROR_HOST_UNREACHABLE: Host unreachable. Since 2.26
3373  * @G_IO_ERROR_NETWORK_UNREACHABLE: Network unreachable. Since 2.26
3374  * @G_IO_ERROR_CONNECTION_REFUSED: Connection refused. Since 2.26
3375  * @G_IO_ERROR_PROXY_FAILED: Connection to proxy server failed. Since 2.26
3376  * @G_IO_ERROR_PROXY_AUTH_FAILED: Proxy authentication failed. Since 2.26
3377  * @G_IO_ERROR_PROXY_NEED_AUTH: Proxy server needs authentication. Since 2.26
3378  * @G_IO_ERROR_PROXY_NOT_ALLOWED: Proxy connection is not allowed by ruleset. Since 2.26
3379  *
3380  * Error codes returned by GIO functions.
3381  */
3382
3383
3384 /**
3385  * GIOModule:
3386  *
3387  * Opaque module base class for extending GIO.
3388  */
3389
3390
3391 /**
3392  * GIOSchedulerJob:
3393  *
3394  * Opaque class for definining and scheduling IO jobs.
3395  */
3396
3397
3398 /**
3399  * GIOSchedulerJobFunc:
3400  * @job: a #GIOSchedulerJob.
3401  * @cancellable: optional #GCancellable object, %NULL to ignore.
3402  * @user_data: the data to pass to callback function
3403  *
3404  * I/O Job function.
3405  *
3406  * Note that depending on whether threads are available, the
3407  * #GIOScheduler may run jobs in separate threads or in an idle
3408  * in the mainloop.
3409  *
3410  * Long-running jobs should periodically check the @cancellable
3411  * to see if they have been cancelled.
3412  *
3413  * complete the job, %FALSE if the job is complete (or cancelled)
3414  *
3415  * Returns: %TRUE if this function should be called again to
3416  */
3417
3418
3419 /**
3420  * GIOStream:
3421  *
3422  * Base class for read-write streams.
3423  */
3424
3425
3426 /**
3427  * GIOStreamSpliceFlags:
3428  * @G_IO_STREAM_SPLICE_NONE: Do not close either stream.
3429  * @G_IO_STREAM_SPLICE_CLOSE_STREAM1: Close the first stream after the splice.
3430  * @G_IO_STREAM_SPLICE_CLOSE_STREAM2: Close the second stream after the splice.
3431  * @G_IO_STREAM_SPLICE_WAIT_FOR_BOTH: Wait for both splice operations to finish before calling the callback.
3432  *
3433  * GIOStreamSpliceFlags determine how streams should be spliced.
3434  *
3435  * Since: 2.28
3436  */
3437
3438
3439 /**
3440  * GIcon:
3441  *
3442  * An abstract type that specifies an icon.
3443  */
3444
3445
3446 /**
3447  * GIconIface:
3448  * @g_iface: The parent interface.
3449  * @hash: A hash for a given #GIcon.
3450  * @equal: Checks if two #GIcon<!-- -->s are equal.
3451  * @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).
3452  * @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).
3453  *
3454  * GIconIface is used to implement GIcon types for various
3455  * different systems. See #GThemedIcon and #GLoadableIcon for
3456  * examples of how to implement this interface.
3457  */
3458
3459
3460 /**
3461  * GIconv:
3462  *
3463  * The <structname>GIConv</structname> struct wraps an
3464  * iconv() conversion descriptor. It contains private data
3465  * and should only be accessed using the following functions.
3466  */
3467
3468
3469 /**
3470  * GInetAddress:
3471  *
3472  * An IPv4 or IPv6 internet address.
3473  */
3474
3475
3476 /**
3477  * GInetAddress:is-any:
3478  *
3479  * Whether this is the "any" address for its family.
3480  * See g_inet_address_get_is_any().
3481  *
3482  * Since: 2.22
3483  */
3484
3485
3486 /**
3487  * GInetAddress:is-link-local:
3488  *
3489  * Whether this is a link-local address.
3490  * See g_inet_address_get_is_link_local().
3491  *
3492  * Since: 2.22
3493  */
3494
3495
3496 /**
3497  * GInetAddress:is-loopback:
3498  *
3499  * Whether this is the loopback address for its family.
3500  * See g_inet_address_get_is_loopback().
3501  *
3502  * Since: 2.22
3503  */
3504
3505
3506 /**
3507  * GInetAddress:is-mc-global:
3508  *
3509  * Whether this is a global multicast address.
3510  * See g_inet_address_get_is_mc_global().
3511  *
3512  * Since: 2.22
3513  */
3514
3515
3516 /**
3517  * GInetAddress:is-mc-link-local:
3518  *
3519  * Whether this is a link-local multicast address.
3520  * See g_inet_address_get_is_mc_link_local().
3521  *
3522  * Since: 2.22
3523  */
3524
3525
3526 /**
3527  * GInetAddress:is-mc-node-local:
3528  *
3529  * Whether this is a node-local multicast address.
3530  * See g_inet_address_get_is_mc_node_local().
3531  *
3532  * Since: 2.22
3533  */
3534
3535
3536 /**
3537  * GInetAddress:is-mc-org-local:
3538  *
3539  * Whether this is an organization-local multicast address.
3540  * See g_inet_address_get_is_mc_org_local().
3541  *
3542  * Since: 2.22
3543  */
3544
3545
3546 /**
3547  * GInetAddress:is-mc-site-local:
3548  *
3549  * Whether this is a site-local multicast address.
3550  * See g_inet_address_get_is_mc_site_local().
3551  *
3552  * Since: 2.22
3553  */
3554
3555
3556 /**
3557  * GInetAddress:is-multicast:
3558  *
3559  * Whether this is a multicast address.
3560  * See g_inet_address_get_is_multicast().
3561  *
3562  * Since: 2.22
3563  */
3564
3565
3566 /**
3567  * GInetAddress:is-site-local:
3568  *
3569  * Whether this is a site-local address.
3570  * See g_inet_address_get_is_loopback().
3571  *
3572  * Since: 2.22
3573  */
3574
3575
3576 /**
3577  * GInetSocketAddress:
3578  *
3579  * An IPv4 or IPv6 socket address, corresponding to a <type>struct
3580  * sockaddr_in</type> or <type>struct sockaddr_in6</type>.
3581  */
3582
3583
3584 /**
3585  * GInitable:
3586  *
3587  * Interface for initializable objects.
3588  *
3589  * Since: 2.22
3590  */
3591
3592
3593 /**
3594  * GInitableIface:
3595  * @g_iface: The parent interface.
3596  * @init: Initializes the object.
3597  *
3598  * Provides an interface for initializing object such that initialization
3599  * may fail.
3600  *
3601  * Since: 2.22
3602  */
3603
3604
3605 /**
3606  * GInitiallyUnowned:
3607  *
3608  * All the fields in the <structname>GInitiallyUnowned</structname> structure
3609  * are private to the #GInitiallyUnowned implementation and should never be
3610  * accessed directly.
3611  */
3612
3613
3614 /**
3615  * GInitiallyUnownedClass:
3616  *
3617  * The class structure for the <structname>GInitiallyUnowned</structname> type.
3618  */
3619
3620
3621 /**
3622  * GInputStream:
3623  *
3624  * Base class for streaming input operations.
3625  */
3626
3627
3628 /**
3629  * GInputVector:
3630  * @buffer: Pointer to a buffer where data will be written.
3631  * @size: the available size in @buffer.
3632  *
3633  * Structure used for scatter/gather data input.
3634  * You generally pass in an array of #GInputVector<!-- -->s
3635  * and the operation will store the read data starting in the
3636  * first buffer, switching to the next as needed.
3637  *
3638  * Since: 2.22
3639  */
3640
3641
3642 /**
3643  * GInstanceInitFunc:
3644  * @instance: The instance to initialize.
3645  * @g_class: The class of the type the instance is created for.
3646  *
3647  * A callback function used by the type system to initialize a new
3648  * instance of a type. This function initializes all instance members and
3649  * allocates any resources required by it.
3650  * Initialization of a derived instance involves calling all its parent
3651  * types instance initializers, so the class member of the instance
3652  * is altered during its initialization to always point to the class that
3653  * belongs to the type the current initializer was introduced for.
3654  */
3655
3656
3657 /**
3658  * GInterfaceFinalizeFunc:
3659  * @g_iface: The interface structure to finalize.
3660  * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3661  *
3662  * A callback function used by the type system to finalize an interface.
3663  * This function should destroy any internal data and release any resources
3664  * allocated by the corresponding GInterfaceInitFunc() function.
3665  */
3666
3667
3668 /**
3669  * GInterfaceInfo:
3670  * @interface_init: location of the interface initialization function
3671  * @interface_finalize: location of the interface finalization function
3672  * @interface_data: user-supplied data passed to the interface init/finalize functions
3673  *
3674  * A structure that provides information to the type system which is
3675  * used specifically for managing interface types.
3676  */
3677
3678
3679 /**
3680  * GInterfaceInitFunc:
3681  * @g_iface: The interface structure to initialize.
3682  * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3683  *
3684  * A callback function used by the type system to initialize a new
3685  * interface.  This function should initialize all internal data and
3686  * allocate any resources required by the interface.
3687  */
3688
3689
3690 /**
3691  * GLIB_CHECK_VERSION:
3692  * @major: the major version to check for
3693  * @minor: the minor version to check for
3694  * @micro: the micro version to check for
3695  *
3696  * Checks the version of the GLib library that is being compiled
3697  * against.
3698  *
3699  * <example>
3700  * <title>Checking the version of the GLib library</title>
3701  * <programlisting>
3702  * if (!GLIB_CHECK_VERSION (1, 2, 0))
3703  * g_error ("GLib version 1.2.0 or above is needed");
3704  * </programlisting>
3705  * </example>
3706  *
3707  * See glib_check_version() for a runtime check.
3708  *
3709  * is the same as or newer than the passed-in version.
3710  *
3711  * Returns: %TRUE if the version of the GLib header files
3712  */
3713
3714
3715 /**
3716  * GLoadableIcon:
3717  *
3718  * Generic type for all kinds of icons that can be loaded
3719  * as a stream.
3720  */
3721
3722
3723 /**
3724  * GLoadableIconIface:
3725  * @g_iface: The parent interface.
3726  * @load: Loads an icon.
3727  * @load_async: Loads an icon asynchronously.
3728  * @load_finish: Finishes an asynchronous icon load.
3729  *
3730  * Interface for icons that can be loaded as a stream.
3731  */
3732
3733
3734 /**
3735  * GMainContext:
3736  *
3737  * The <structname>GMainContext</structname> struct is an opaque data
3738  * type representing a set of sources to be handled in a main loop.
3739  */
3740
3741
3742 /**
3743  * GMainLoop:
3744  *
3745  * The <structname>GMainLoop</structname> struct is an opaque data type
3746  * representing the main event loop of a GLib or GTK+ application.
3747  */
3748
3749
3750 /**
3751  * GMarkupError:
3752  * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8
3753  * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace
3754  * @G_MARKUP_ERROR_PARSE: document was ill-formed
3755  * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser functions; element wasn't known
3756  * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser functions; attribute wasn't known
3757  * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser functions; content was invalid
3758  * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser functions; a required attribute was missing
3759  *
3760  * Error codes returned by markup parsing.
3761  */
3762
3763
3764 /**
3765  * GMarkupParseContext:
3766  *
3767  * A parse context is used to parse a stream of bytes that
3768  * you expect to contain marked-up text.
3769  *
3770  * See g_markup_parse_context_new(), #GMarkupParser, and so
3771  * on for more details.
3772  */
3773
3774
3775 /**
3776  * GMarkupParseFlags:
3777  * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use
3778  * @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
3779  * @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
3780  *
3781  * Flags that affect the behaviour of the parser.
3782  */
3783
3784
3785 /**
3786  * GMarkupParser:
3787  * @start_element: Callback to invoke when the opening tag of an element is seen.
3788  * @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>.
3789  * @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.
3790  * @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.
3791  * @error: Callback to invoke when an error occurs.
3792  *
3793  * Any of the fields in #GMarkupParser can be %NULL, in which case they
3794  * will be ignored. Except for the @error function, any of these callbacks
3795  * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT,
3796  * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT
3797  * errors are intended to be set from these callbacks. If you set an error
3798  * from a callback, g_markup_parse_context_parse() will report that error
3799  * back to its caller.
3800  */
3801
3802
3803 /**
3804  * GMemVTable:
3805  * @malloc: function to use for allocating memory.
3806  * @realloc: function to use for reallocating memory.
3807  * @free: function to use to free memory.
3808  * @calloc: function to use for allocating zero-filled memory.
3809  * @try_malloc: function to use for allocating memory without a default error handler.
3810  * @try_realloc: function to use for reallocating memory without a default error handler.
3811  *
3812  * A set of functions used to perform memory allocation. The same #GMemVTable must
3813  * be used for all allocations in the same program; a call to g_mem_set_vtable(),
3814  * if it exists, should be prior to any use of GLib.
3815  */
3816
3817
3818 /**
3819  * GMemoryInputStream:
3820  *
3821  * Implements #GInputStream for arbitrary memory chunks.
3822  */
3823
3824
3825 /**
3826  * GMemoryOutputStream:
3827  *
3828  * Implements #GOutputStream for arbitrary memory chunks.
3829  */
3830
3831
3832 /**
3833  * GMemoryOutputStream:data:
3834  *
3835  * Pointer to buffer where data will be written.
3836  *
3837  * Since: 2.24
3838  */
3839
3840
3841 /**
3842  * GMemoryOutputStream:data-size:
3843  *
3844  * Size of data written to the buffer.
3845  *
3846  * Since: 2.24
3847  */
3848
3849
3850 /**
3851  * GMemoryOutputStream:destroy-function: (skip)
3852  *
3853  * Function called with the buffer as argument when the stream is destroyed.
3854  *
3855  * Since: 2.24
3856  */
3857
3858
3859 /**
3860  * GMemoryOutputStream:realloc-function: (skip)
3861  *
3862  * Function with realloc semantics called to enlarge the buffer.
3863  *
3864  * Since: 2.24
3865  */
3866
3867
3868 /**
3869  * GMemoryOutputStream:size:
3870  *
3871  * Current size of the data buffer.
3872  *
3873  * Since: 2.24
3874  */
3875
3876
3877 /**
3878  * GMount:
3879  *
3880  * A handle to an object implementing the #GMountIface interface.
3881  */
3882
3883
3884 /**
3885  * GMount::changed:
3886  * @mount: the object on which the signal is emitted
3887  *
3888  * Emitted when the mount has been changed.
3889  */
3890
3891
3892 /**
3893  * GMount::pre-unmount:
3894  * @mount: the object on which the signal is emitted
3895  *
3896  * This signal is emitted when the #GMount is about to be
3897  * unmounted.
3898  *
3899  * Since: 2.22
3900  */
3901
3902
3903 /**
3904  * GMount::unmounted:
3905  * @mount: the object on which the signal is emitted
3906  *
3907  * This signal is emitted when the #GMount have been
3908  * unmounted. If the recipient is holding references to the
3909  * object they should release them so the object can be
3910  * finalized.
3911  */
3912
3913
3914 /**
3915  * GMountIface:
3916  * @g_iface: The parent interface.
3917  * @changed: Changed signal that is emitted when the mount's state has changed.
3918  * @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.
3919  * @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.
3920  * @get_root: Gets a #GFile to the root directory of the #GMount.
3921  * @get_name: Gets a string containing the name of the #GMount.
3922  * @get_icon: Gets a #GIcon for the #GMount.
3923  * @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.
3924  * @get_volume: Gets a #GVolume the mount is located on. Returns %NULL if the #GMount is not associated with a #GVolume.
3925  * @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.
3926  * @can_unmount: Checks if a #GMount can be unmounted.
3927  * @can_eject: Checks if a #GMount can be ejected.
3928  * @unmount: Starts unmounting a #GMount.
3929  * @unmount_finish: Finishes an unmounting operation.
3930  * @eject: Starts ejecting a #GMount.
3931  * @eject_finish: Finishes an eject operation.
3932  * @remount: Starts remounting a #GMount.
3933  * @remount_finish: Finishes a remounting operation.
3934  * @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.
3935  * @guess_content_type_finish: Finishes a contenet type guessing operation. Added in 2.18.
3936  * @guess_content_type_sync: Synchronous variant of @guess_content_type. Added in 2.18
3937  * @unmount_with_operation: Starts unmounting a #GMount using a #GMountOperation. Since 2.22.
3938  * @unmount_with_operation_finish: Finishes an unmounting operation using a #GMountOperation. Since 2.22.
3939  * @eject_with_operation: Starts ejecting a #GMount using a #GMountOperation. Since 2.22.
3940  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
3941  * @get_default_location: Gets a #GFile indication a start location that can be use as the entry point for this mount. Since 2.24.
3942  *
3943  * Interface for implementing operations for mounts.
3944  */
3945
3946
3947 /**
3948  * GMountMountFlags:
3949  * @G_MOUNT_MOUNT_NONE: No flags set.
3950  *
3951  * Flags used when mounting a mount.
3952  */
3953
3954
3955 /**
3956  * GMountOperation:
3957  *
3958  * Class for providing authentication methods for mounting operations,
3959  * such as mounting a file locally, or authenticating with a server.
3960  */
3961
3962
3963 /**
3964  * GMountOperation::aborted:
3965  *
3966  * Emitted by the backend when e.g. a device becomes unavailable
3967  * while a mount operation is in progress.
3968  *
3969  * Implementations of GMountOperation should handle this signal
3970  * by dismissing open password dialogs.
3971  *
3972  * Since: 2.20
3973  */
3974
3975
3976 /**
3977  * GMountOperation::ask-password:
3978  * @op: a #GMountOperation requesting a password.
3979  * @message: string containing a message to display to the user.
3980  * @default_user: string containing the default user name.
3981  * @default_domain: string containing the default domain.
3982  * @flags: a set of #GAskPasswordFlags.
3983  *
3984  * Emitted when a mount operation asks the user for a password.
3985  *
3986  * If the message contains a line break, the first line should be
3987  * presented as a heading. For example, it may be used as the
3988  * primary text in a #GtkMessageDialog.
3989  */
3990
3991
3992 /**
3993  * GMountOperation::ask-question:
3994  * @op: a #GMountOperation asking a question.
3995  * @message: string containing a message to display to the user.
3996  * @choices: an array of strings for each possible choice.
3997  *
3998  * Emitted when asking the user a question and gives a list of
3999  * choices for the user to choose from.
4000  *
4001  * If the message contains a line break, the first line should be
4002  * presented as a heading. For example, it may be used as the
4003  * primary text in a #GtkMessageDialog.
4004  */
4005
4006
4007 /**
4008  * GMountOperation::reply:
4009  * @op: a #GMountOperation.
4010  * @result: a #GMountOperationResult indicating how the request was handled
4011  *
4012  * Emitted when the user has replied to the mount operation.
4013  */
4014
4015
4016 /**
4017  * GMountOperation::show-processes:
4018  * @op: a #GMountOperation.
4019  * @message: string containing a message to display to the user.
4020  * @processes: an array of #GPid for processes blocking the operation.
4021  * @choices: an array of strings for each possible choice.
4022  *
4023  * Emitted when one or more processes are blocking an operation
4024  * e.g. unmounting/ejecting a #GMount or stopping a #GDrive.
4025  *
4026  * Note that this signal may be emitted several times to update the
4027  * list of blocking processes as processes close files. The
4028  * application should only respond with g_mount_operation_reply() to
4029  * the latest signal (setting #GMountOperation:choice to the choice
4030  * the user made).
4031  *
4032  * If the message contains a line break, the first line should be
4033  * presented as a heading. For example, it may be used as the
4034  * primary text in a #GtkMessageDialog.
4035  *
4036  * Since: 2.22
4037  */
4038
4039
4040 /**
4041  * GMountOperation:anonymous:
4042  *
4043  * Whether to use an anonymous user when authenticating.
4044  */
4045
4046
4047 /**
4048  * GMountOperation:choice:
4049  *
4050  * The index of the user's choice when a question is asked during the
4051  * mount operation. See the #GMountOperation::ask-question signal.
4052  */
4053
4054
4055 /**
4056  * GMountOperation:domain:
4057  *
4058  * The domain to use for the mount operation.
4059  */
4060
4061
4062 /**
4063  * GMountOperation:password:
4064  *
4065  * The password that is used for authentication when carrying out
4066  * the mount operation.
4067  */
4068
4069
4070 /**
4071  * GMountOperation:password-save:
4072  *
4073  * Determines if and how the password information should be saved.
4074  */
4075
4076
4077 /**
4078  * GMountOperation:username:
4079  *
4080  * The user name that is used for authentication when carrying out
4081  * the mount operation.
4082  */
4083
4084
4085 /**
4086  * GMountOperationResult:
4087  * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the user specified data is now available
4088  * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation to be aborted
4089  * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not implemented)
4090  *
4091  * #GMountOperationResult is returned as a result when a request for
4092  * information is send by the mounting operation.
4093  */
4094
4095
4096 /**
4097  * GMountUnmountFlags:
4098  * @G_MOUNT_UNMOUNT_NONE: No flags set.
4099  * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding file operations on the mount.
4100  *
4101  * Flags used when an unmounting a mount.
4102  */
4103
4104
4105 /**
4106  * GNetworkAddress:
4107  *
4108  * A #GSocketConnectable for resolving a hostname and connecting to
4109  * that host.
4110  */
4111
4112
4113 /**
4114  * GNetworkService:
4115  *
4116  * A #GSocketConnectable for resolving a SRV record and connecting to
4117  * that service.
4118  */
4119
4120
4121 /**
4122  * GNormalizeMode:
4123  * @G_NORMALIZE_DEFAULT: standardize differences that do not affect the text content, such as the above-mentioned accent representation
4124  * @G_NORMALIZE_NFD: another name for %G_NORMALIZE_DEFAULT
4125  * @G_NORMALIZE_DEFAULT_COMPOSE: like %G_NORMALIZE_DEFAULT, but with composed forms rather than a maximally decomposed form
4126  * @G_NORMALIZE_NFC: another name for %G_NORMALIZE_DEFAULT_COMPOSE
4127  * @G_NORMALIZE_ALL: beyond %G_NORMALIZE_DEFAULT also standardize the "compatibility" characters in Unicode, such as SUPERSCRIPT THREE to the standard forms (in this case DIGIT THREE). Formatting information may be lost but for most text operations such characters should be considered the same
4128  * @G_NORMALIZE_NFKD: another name for %G_NORMALIZE_ALL
4129  * @G_NORMALIZE_ALL_COMPOSE: like %G_NORMALIZE_ALL, but with composed forms rather than a maximally decomposed form
4130  * @G_NORMALIZE_NFKC: another name for %G_NORMALIZE_ALL_COMPOSE
4131  *
4132  * Defines how a Unicode string is transformed in a canonical
4133  * form, standardizing such issues as whether a character with
4134  * an accent is represented as a base character and combining
4135  * accent or as a single precomposed character. Unicode strings
4136  * should generally be normalized before comparing them.
4137  */
4138
4139
4140 /**
4141  * GObject:
4142  *
4143  * All the fields in the <structname>GObject</structname> structure are private
4144  * to the #GObject implementation and should never be accessed directly.
4145  */
4146
4147
4148 /**
4149  * GObjectClass:
4150  * @g_type_class: the parent class
4151  * @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 @constructor of the parent class. Overriding @constructor should be rarely needed, e.g. to handle construct properties, or to implement singletons.
4152  * @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.
4153  * @get_property: the generic getter for all properties of this type. Should be overridden for every type with properties.
4154  * @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.
4155  * @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.
4156  * @dispatch_properties_changed: emits property change notification for a bunch of properties. Overriding @dispatch_properties_changed should be rarely needed.
4157  * @notify: the class closure for the notify signal
4158  * @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.
4159  *
4160  * The class structure for the <structname>GObject</structname> type.
4161  *
4162  * <example>
4163  * <title>Implementing singletons using a constructor</title>
4164  * <programlisting>
4165  * static MySingleton *the_singleton = NULL;
4166  *
4167  * static GObject*
4168  * my_singleton_constructor (GType                  type,
4169  * guint                  n_construct_params,
4170  * GObjectConstructParam *construct_params)
4171  * {
4172  * GObject *object;
4173  *
4174  * if (!the_singleton)
4175  * {
4176  * object = G_OBJECT_CLASS (parent_class)->constructor (type,
4177  * n_construct_params,
4178  * construct_params);
4179  * the_singleton = MY_SINGLETON (object);
4180  * }
4181  * else
4182  * object = g_object_ref (G_OBJECT (the_singleton));
4183  *
4184  * return object;
4185  * }
4186  * </programlisting></example>
4187  */
4188
4189
4190 /**
4191  * GObjectConstructParam:
4192  * @pspec: the #GParamSpec of the construct parameter
4193  * @value: the value to set the parameter to
4194  *
4195  * The <structname>GObjectConstructParam</structname> struct is an auxiliary
4196  * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
4197  * a #GObjectClass.
4198  */
4199
4200
4201 /**
4202  * GObjectFinalizeFunc:
4203  * @object: the #GObject being finalized
4204  *
4205  * The type of the @finalize function of #GObjectClass.
4206  */
4207
4208
4209 /**
4210  * GObjectGetPropertyFunc:
4211  * @object: a #GObject
4212  * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
4213  * @value: a #GValue to return the property value in
4214  * @pspec: the #GParamSpec describing the property
4215  *
4216  * The type of the @get_property function of #GObjectClass.
4217  */
4218
4219
4220 /**
4221  * GObjectSetPropertyFunc:
4222  * @object: a #GObject
4223  * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
4224  * @value: the new value for the property
4225  * @pspec: the #GParamSpec describing the property
4226  *
4227  * The type of the @set_property function of #GObjectClass.
4228  */
4229
4230
4231 /**
4232  * GOptionArg:
4233  * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags.
4234  * @G_OPTION_ARG_STRING: The option takes a string argument.
4235  * @G_OPTION_ARG_INT: The option takes an integer argument.
4236  * @G_OPTION_ARG_CALLBACK: The option provides a callback to parse the extra argument.
4237  * @G_OPTION_ARG_FILENAME: The option takes a filename as argument.
4238  * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple uses of the option are collected into an array of strings.
4239  * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, multiple uses of the option are collected into an array of strings.
4240  * @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
4241  * @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
4242  *
4243  * The #GOptionArg enum values determine which type of extra argument the
4244  * options expect to find. If an option expects an extra argument, it
4245  * can be specified in several ways; with a short option:
4246  * <option>-x arg</option>, with a long option: <option>--name arg</option>
4247  * or combined in a single argument: <option>--name=arg</option>.
4248  */
4249
4250
4251 /**
4252  * GOptionArgFunc:
4253  * @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.
4254  * @value: The value to be parsed.
4255  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
4256  * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED is intended to be used for errors in #GOptionArgFunc callbacks.
4257  *
4258  * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK
4259  * options.
4260  *
4261  * occurred, in which case @error should be set with g_set_error()
4262  *
4263  * Returns: %TRUE if the option was successfully parsed, %FALSE if an error
4264  */
4265
4266
4267 /**
4268  * GOptionContext:
4269  *
4270  * A <structname>GOptionContext</structname> struct defines which options
4271  * are accepted by the commandline option parser. The struct has only private
4272  * fields and should not be directly accessed.
4273  */
4274
4275
4276 /**
4277  * GOptionEntry:
4278  * @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>.
4279  * @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.
4280  * @flags: Flags from #GOptionFlags.
4281  * @arg: The type of the option, as a #GOptionArg.
4282  * @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().
4283  * @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().
4284  * @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().
4285  *
4286  * A <structname>GOptionEntry</structname> defines a single option.
4287  * To have an effect, they must be added to a #GOptionGroup with
4288  * g_option_context_add_main_entries() or g_option_group_add_entries().
4289  */
4290
4291
4292 /**
4293  * GOptionError:
4294  * @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().
4295  * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed.
4296  * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed.
4297  *
4298  * Error codes returned by option parsing.
4299  */
4300
4301
4302 /**
4303  * GOptionErrorFunc:
4304  * @context: The active #GOptionContext
4305  * @group: The group to which the function belongs
4306  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
4307  * @error: The #GError containing details about the parse error
4308  *
4309  * The type of function to be used as callback when a parse error occurs.
4310  */
4311
4312
4313 /**
4314  * GOptionFlags:
4315  * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in <option>--help</option> output.
4316  * @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.
4317  * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this flag indicates that the sense of the option is reversed.
4318  * @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
4319  * @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
4320  * @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
4321  * @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.
4322  *
4323  * Flags which modify individual options.
4324  */
4325
4326
4327 /**
4328  * GOptionGroup:
4329  *
4330  * A <structname>GOptionGroup</structname> struct defines the options in a single
4331  * group. The struct has only private fields and should not be directly accessed.
4332  *
4333  * All options in a group share the same translation function. Libraries which
4334  * need to parse commandline options are expected to provide a function for
4335  * getting a <structname>GOptionGroup</structname> holding their options, which
4336  * the application can then add to its #GOptionContext.
4337  */
4338
4339
4340 /**
4341  * GOptionParseFunc:
4342  * @context: The active #GOptionContext
4343  * @group: The group to which the function belongs
4344  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
4345  * @error: A return location for error details
4346  *
4347  * The type of function that can be called before and after parsing.
4348  *
4349  * occurred, in which case @error should be set with g_set_error()
4350  *
4351  * Returns: %TRUE if the function completed successfully, %FALSE if an error
4352  */
4353
4354
4355 /**
4356  * GOutputStream:
4357  *
4358  * Base class for writing output.
4359  *
4360  * All classes derived from GOutputStream should implement synchronous
4361  * writing, splicing, flushing and closing streams, but may implement
4362  * asynchronous versions.
4363  */
4364
4365
4366 /**
4367  * GOutputStreamSpliceFlags:
4368  * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream.
4369  * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after the splice.
4370  * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after the splice.
4371  *
4372  * GOutputStreamSpliceFlags determine how streams should be spliced.
4373  */
4374
4375
4376 /**
4377  * GOutputVector:
4378  * @buffer: Pointer to a buffer of data to read.
4379  * @size: the size of @buffer.
4380  *
4381  * Structure used for scatter/gather data output.
4382  * You generally pass in an array of #GOutputVector<!-- -->s
4383  * and the operation will use all the buffers as if they were
4384  * one buffer.
4385  *
4386  * Since: 2.22
4387  */
4388
4389
4390 /**
4391  * GParamFlags:
4392  * @G_PARAM_READABLE: the parameter is readable
4393  * @G_PARAM_WRITABLE: the parameter is writable
4394  * @G_PARAM_CONSTRUCT: the parameter will be set upon object construction
4395  * @G_PARAM_CONSTRUCT_ONLY: the parameter will only be set upon object construction
4396  * @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) strict validation is not required
4397  * @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
4398  * @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
4399  * @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
4400  * @G_PARAM_PRIVATE: internal
4401  * @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
4402  *
4403  * Through the #GParamFlags flag values, certain aspects of parameters
4404  * can be configured.
4405  */
4406
4407
4408 /**
4409  * GParamSpec:
4410  * @g_type_instance: private #GTypeInstance portion
4411  * @name: name of this parameter: always an interned string
4412  * @flags: #GParamFlags flags for this parameter
4413  * @value_type: the #GValue type for this parameter
4414  * @owner_type: #GType type that uses (introduces) this parameter
4415  *
4416  * All other fields of the <structname>GParamSpec</structname> struct are private and
4417  * should not be used directly.
4418  */
4419
4420
4421 /**
4422  * GParamSpecBoolean:
4423  * @parent_instance: private #GParamSpec portion
4424  * @default_value: default value for the property specified
4425  *
4426  * A #GParamSpec derived structure that contains the meta data for boolean properties.
4427  */
4428
4429
4430 /**
4431  * GParamSpecBoxed:
4432  * @parent_instance: private #GParamSpec portion
4433  *
4434  * A #GParamSpec derived structure that contains the meta data for boxed properties.
4435  */
4436
4437
4438 /**
4439  * GParamSpecChar:
4440  * @parent_instance: private #GParamSpec portion
4441  * @minimum: minimum value for the property specified
4442  * @maximum: maximum value for the property specified
4443  * @default_value: default value for the property specified
4444  *
4445  * A #GParamSpec derived structure that contains the meta data for character properties.
4446  */
4447
4448
4449 /**
4450  * GParamSpecClass:
4451  * @g_type_class: the parent class
4452  * @value_type: the #GValue type for this parameter
4453  * @finalize: The instance finalization function (optional), should chain up to the finalize method of the parent class.
4454  * @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().
4455  * @value_validate: Ensures that the contents of @value comply with the specifications set out by this type (optional), see g_param_value_set_validate().
4456  * @values_cmp: Compares @value1 with @value2 according to this type (recommended, the default is memcmp()), see g_param_values_cmp().
4457  *
4458  * The class structure for the <structname>GParamSpec</structname> type.
4459  * Normally, <structname>GParamSpec</structname> classes are filled by
4460  * g_param_type_register_static().
4461  */
4462
4463
4464 /**
4465  * GParamSpecDouble:
4466  * @parent_instance: private #GParamSpec portion
4467  * @minimum: minimum value for the property specified
4468  * @maximum: maximum value for the property specified
4469  * @default_value: default value for the property specified
4470  * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-90.
4471  *
4472  * A #GParamSpec derived structure that contains the meta data for double properties.
4473  */
4474
4475
4476 /**
4477  * GParamSpecEnum:
4478  * @parent_instance: private #GParamSpec portion
4479  * @enum_class: the #GEnumClass for the enum
4480  * @default_value: default value for the property specified
4481  *
4482  * A #GParamSpec derived structure that contains the meta data for enum
4483  * properties.
4484  */
4485
4486
4487 /**
4488  * GParamSpecFlags:
4489  * @parent_instance: private #GParamSpec portion
4490  * @flags_class: the #GFlagsClass for the flags
4491  * @default_value: default value for the property specified
4492  *
4493  * A #GParamSpec derived structure that contains the meta data for flags
4494  * properties.
4495  */
4496
4497
4498 /**
4499  * GParamSpecFloat:
4500  * @parent_instance: private #GParamSpec portion
4501  * @minimum: minimum value for the property specified
4502  * @maximum: maximum value for the property specified
4503  * @default_value: default value for the property specified
4504  * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-30.
4505  *
4506  * A #GParamSpec derived structure that contains the meta data for float properties.
4507  */
4508
4509
4510 /**
4511  * GParamSpecGType:
4512  * @parent_instance: private #GParamSpec portion
4513  * @is_a_type: a #GType whose subtypes can occur as values
4514  *
4515  * A #GParamSpec derived structure that contains the meta data for #GType properties.
4516  *
4517  * Since: 2.10
4518  */
4519
4520
4521 /**
4522  * GParamSpecInt:
4523  * @parent_instance: private #GParamSpec portion
4524  * @minimum: minimum value for the property specified
4525  * @maximum: maximum value for the property specified
4526  * @default_value: default value for the property specified
4527  *
4528  * A #GParamSpec derived structure that contains the meta data for integer properties.
4529  */
4530
4531
4532 /**
4533  * GParamSpecInt64:
4534  * @parent_instance: private #GParamSpec portion
4535  * @minimum: minimum value for the property specified
4536  * @maximum: maximum value for the property specified
4537  * @default_value: default value for the property specified
4538  *
4539  * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
4540  */
4541
4542
4543 /**
4544  * GParamSpecLong:
4545  * @parent_instance: private #GParamSpec portion
4546  * @minimum: minimum value for the property specified
4547  * @maximum: maximum value for the property specified
4548  * @default_value: default value for the property specified
4549  *
4550  * A #GParamSpec derived structure that contains the meta data for long integer properties.
4551  */
4552
4553
4554 /**
4555  * GParamSpecObject:
4556  * @parent_instance: private #GParamSpec portion
4557  *
4558  * A #GParamSpec derived structure that contains the meta data for object properties.
4559  */
4560
4561
4562 /**
4563  * GParamSpecOverride:
4564  *
4565  * This is a type of #GParamSpec type that simply redirects operations to
4566  * another paramspec.  All operations other than getting or
4567  * setting the value are redirected, including accessing the nick and
4568  * blurb, validating a value, and so forth. See
4569  * g_param_spec_get_redirect_target() for retrieving the overidden
4570  * property. #GParamSpecOverride is used in implementing
4571  * g_object_class_override_property(), and will not be directly useful
4572  * unless you are implementing a new base type similar to GObject.
4573  *
4574  * Since: 2.4
4575  */
4576
4577
4578 /**
4579  * GParamSpecParam:
4580  * @parent_instance: private #GParamSpec portion
4581  *
4582  * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
4583  * properties.
4584  */
4585
4586
4587 /**
4588  * GParamSpecPointer:
4589  * @parent_instance: private #GParamSpec portion
4590  *
4591  * A #GParamSpec derived structure that contains the meta data for pointer properties.
4592  */
4593
4594
4595 /**
4596  * GParamSpecString:
4597  * @parent_instance: private #GParamSpec portion
4598  * @default_value: default value for the property specified
4599  * @cset_first: a string containing the allowed values for the first byte
4600  * @cset_nth: a string containing the allowed values for the subsequent bytes
4601  * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
4602  * @null_fold_if_empty: replace empty string by %NULL
4603  * @ensure_non_null: replace %NULL strings by an empty string
4604  *
4605  * A #GParamSpec derived structure that contains the meta data for string
4606  * properties.
4607  */
4608
4609
4610 /**
4611  * GParamSpecTypeInfo:
4612  * @instance_size: Size of the instance (object) structure.
4613  * @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.
4614  * @instance_init: Location of the instance initialization function (optional).
4615  * @value_type: The #GType of values conforming to this #GParamSpec
4616  * @finalize: The instance finalization function (optional).
4617  * @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().
4618  * @value_validate: Ensures that the contents of @value comply with the specifications set out by @pspec (optional), see g_param_value_set_validate().
4619  * @values_cmp: Compares @value1 with @value2 according to @pspec (recommended, the default is memcmp()), see g_param_values_cmp().
4620  *
4621  * This structure is used to provide the type system with the information
4622  * required to initialize and destruct (finalize) a parameter's class and
4623  * instances thereof.
4624  * The initialized structure is passed to the g_param_type_register_static()
4625  * The type system will perform a deep copy of this structure, so its memory
4626  * does not need to be persistent across invocation of
4627  * g_param_type_register_static().
4628  */
4629
4630
4631 /**
4632  * GParamSpecUChar:
4633  * @parent_instance: private #GParamSpec portion
4634  * @minimum: minimum value for the property specified
4635  * @maximum: maximum value for the property specified
4636  * @default_value: default value for the property specified
4637  *
4638  * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
4639  */
4640
4641
4642 /**
4643  * GParamSpecUInt:
4644  * @parent_instance: private #GParamSpec portion
4645  * @minimum: minimum value for the property specified
4646  * @maximum: maximum value for the property specified
4647  * @default_value: default value for the property specified
4648  *
4649  * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
4650  */
4651
4652
4653 /**
4654  * GParamSpecUInt64:
4655  * @parent_instance: private #GParamSpec portion
4656  * @minimum: minimum value for the property specified
4657  * @maximum: maximum value for the property specified
4658  * @default_value: default value for the property specified
4659  *
4660  * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
4661  */
4662
4663
4664 /**
4665  * GParamSpecULong:
4666  * @parent_instance: private #GParamSpec portion
4667  * @minimum: minimum value for the property specified
4668  * @maximum: maximum value for the property specified
4669  * @default_value: default value for the property specified
4670  *
4671  * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
4672  */
4673
4674
4675 /**
4676  * GParamSpecUnichar:
4677  * @parent_instance: private #GParamSpec portion
4678  * @default_value: default value for the property specified
4679  *
4680  * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
4681  */
4682
4683
4684 /**
4685  * GParamSpecValueArray:
4686  * @parent_instance: private #GParamSpec portion
4687  * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
4688  * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
4689  *
4690  * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
4691  */
4692
4693
4694 /**
4695  * GParamSpecVariant:
4696  * @parent_instance: private #GParamSpec portion
4697  * @type: a #GVariantType, or %NULL
4698  * @default_value: a #GVariant, or %NULL
4699  *
4700  * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
4701  *
4702  * Since: 2.26
4703  */
4704
4705
4706 /**
4707  * GParameter:
4708  * @name: the parameter name
4709  * @value: the parameter value
4710  *
4711  * The <structname>GParameter</structname> struct is an auxiliary structure used
4712  * to hand parameter name/value pairs to g_object_newv().
4713  */
4714
4715
4716 /**
4717  * GPasswordSave:
4718  * @G_PASSWORD_SAVE_NEVER: never save a password.
4719  * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session.
4720  * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently.
4721  *
4722  * #GPasswordSave is used to indicate the lifespan of a saved password.
4723  *
4724  * #Gvfs stores passwords in the Gnome keyring when this flag allows it
4725  * to, and later retrieves it again from there.
4726  */
4727
4728
4729 /**
4730  * GPermission:
4731  *
4732  * #GPermission is an opaque data structure and can only be accessed
4733  * using the following functions.
4734  */
4735
4736
4737 /**
4738  * GPermission:allowed:
4739  *
4740  * %TRUE if the caller currently has permission to perform the action that
4741  * @permission represents the permission to perform.
4742  */
4743
4744
4745 /**
4746  * GPermission:can-acquire:
4747  *
4748  * %TRUE if it is generally possible to acquire the permission by calling
4749  * g_permission_acquire().
4750  */
4751
4752
4753 /**
4754  * GPermission:can-release:
4755  *
4756  * %TRUE if it is generally possible to release the permission by calling
4757  * g_permission_release().
4758  */
4759
4760
4761 /**
4762  * GPid:
4763  *
4764  * A type which is used to hold a process identification.
4765  *
4766  * On UNIX, processes are identified by a process id (an integer),
4767  * while Windows uses process handles (which are pointers).
4768  */
4769
4770
4771 /**
4772  * GPollFD:
4773  * @fd: the file descriptor to poll (or a <type>HANDLE</type> on Win32)
4774  * @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.
4775  * @revents: a bitwise combination of flags from #GIOCondition, returned from the poll() function to indicate which events occurred.
4776  *
4777  *
4778  */
4779
4780
4781 /**
4782  * GPollFunc:
4783  * @ufds: an array of #GPollFD elements
4784  * @nfsd: the number of elements in @ufds
4785  * @timeout_: the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout.
4786  *
4787  * Specifies the type of function passed to g_main_context_set_poll_func().
4788  * The semantics of the function should match those of the poll() system call.
4789  *
4790  * reported, or -1 if an error occurred.
4791  *
4792  * Returns: the number of #GPollFD elements which have events or errors
4793  */
4794
4795
4796 /**
4797  * GPollableInputStream:
4798  *
4799  * An interface for a #GInputStream that can be polled for readability.
4800  *
4801  * Since: 2.28
4802  */
4803
4804
4805 /**
4806  * GPollableInputStreamInterface:
4807  * @g_iface: The parent interface.
4808  * @can_poll: Checks if the #GPollableInputStream instance is actually pollable
4809  * @is_readable: Checks if the stream is readable
4810  * @create_source: Creates a #GSource to poll the stream
4811  * @read_nonblocking: Does a non-blocking read or returns %G_IO_ERROR_WOULD_BLOCK
4812  *
4813  * The interface for pollable input streams.
4814  *
4815  * The default implementation of @can_poll always returns %TRUE.
4816  *
4817  * The default implementation of @read_nonblocking calls
4818  * g_pollable_input_stream_is_readable(), and then calls
4819  * g_input_stream_read() if it returns %TRUE. This means you only need
4820  * to override it if it is possible that your @is_readable
4821  * implementation may return %TRUE when the stream is not actually
4822  * readable.
4823  *
4824  * Since: 2.28
4825  */
4826
4827
4828 /**
4829  * GPollableOutputStream:
4830  *
4831  * An interface for a #GOutputStream that can be polled for readability.
4832  *
4833  * Since: 2.28
4834  */
4835
4836
4837 /**
4838  * GPollableOutputStreamInterface:
4839  * @g_iface: The parent interface.
4840  * @can_poll: Checks if the #GPollableOutputStream instance is actually pollable
4841  * @is_writable: Checks if the stream is writable
4842  * @create_source: Creates a #GSource to poll the stream
4843  * @write_nonblocking: Does a non-blocking write or returns %G_IO_ERROR_WOULD_BLOCK
4844  *
4845  * The interface for pollable output streams.
4846  *
4847  * The default implementation of @can_poll always returns %TRUE.
4848  *
4849  * The default implementation of @write_nonblocking calls
4850  * g_pollable_output_stream_is_writable(), and then calls
4851  * g_output_stream_write() if it returns %TRUE. This means you only
4852  * need to override it if it is possible that your @is_writable
4853  * implementation may return %TRUE when the stream is not actually
4854  * writable.
4855  *
4856  * Since: 2.28
4857  */
4858
4859
4860 /**
4861  * GPollableSourceFunc:
4862  * @pollable_stream: the #GPollableInputStream or #GPollableOutputStream
4863  * @user_data: data passed in by the user.
4864  *
4865  * This is the function type of the callback used for the #GSource
4866  * returned by g_pollable_input_stream_create_source() and
4867  * g_pollable_output_stream_create_source().
4868  *
4869  * Returns: it should return %FALSE if the source should be removed.
4870  * Since: 2.28
4871  */
4872
4873
4874 /**
4875  * GPrintFunc:
4876  * @string: the message to output
4877  *
4878  * Specifies the type of the print handler functions.
4879  * These are called with the complete formatted string to output.
4880  */
4881
4882
4883 /**
4884  * GProxy:
4885  *
4886  * Interface that handles proxy connection and payload.
4887  *
4888  * Since: 2.26
4889  */
4890
4891
4892 /**
4893  * GProxyAddress:
4894  *
4895  * A #GInetSocketAddress representing a connection via a proxy server
4896  *
4897  * Since: 2.26
4898  */
4899
4900
4901 /**
4902  * GProxyAddressEnumerator:
4903  *
4904  * A subclass of #GSocketAddressEnumerator that takes another address
4905  * enumerator and wraps its results in #GProxyAddress<!-- -->es as
4906  * directed by the default #GProxyResolver.
4907  */
4908
4909
4910 /**
4911  * GProxyInterface:
4912  * @g_iface: The parent interface.
4913  * @connect: Connect to proxy server and wrap (if required) the #connection to handle payload.
4914  * @connect_async: Same has connect() but asynchronous.
4915  * @connect_finish: Returns the result of connect_async()
4916  *
4917  * Provides an interface for handling proxy connection and payload.
4918  *
4919  * Since: 2.26
4920  */
4921
4922
4923 /**
4924  * GProxyResolver:
4925  *
4926  * Interface that can be used to resolve proxy address.
4927  */
4928
4929
4930 /**
4931  * GQueue:
4932  * @head: a pointer to the first element of the queue
4933  * @tail: a pointer to the last element of the queue
4934  * @length: the number of elements in the queue
4935  *
4936  * Contains the public fields of a
4937  * <link linkend="glib-Double-ended-Queues">Queue</link>.
4938  */
4939
4940
4941 /**
4942  * GReallocFunc:
4943  * @data: memory block to reallocate
4944  * @size: size to reallocate @data to
4945  *
4946  * Changes the size of the memory block pointed to by @data to
4947  * @size bytes.
4948  *
4949  * The function should have the same semantics as realloc().
4950  *
4951  * Returns: a pointer to the reallocated memory
4952  */
4953
4954
4955 /**
4956  * GRegex:
4957  *
4958  * A GRegex is the "compiled" form of a regular expression pattern. This
4959  * structure is opaque and its fields cannot be accessed directly.
4960  *
4961  * Since: 2.14
4962  */
4963
4964
4965 /**
4966  * GRegexCompileFlags:
4967  * @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.
4968  * @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.
4969  * @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.
4970  * @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.
4971  * @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.
4972  * @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.
4973  * @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.
4974  * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this flag they are considered as a raw sequence of bytes. @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).
4975  * @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.
4976  * @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.
4977  * @G_REGEX_NEWLINE_CR: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\r'.
4978  * @G_REGEX_NEWLINE_LF: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\n'.
4979  * @G_REGEX_NEWLINE_CRLF: Usually any newline character is recognized, if this option is set, the only recognized newline character sequence is '\r\n'.
4980  *
4981  * Flags specifying compile-time options.
4982  *
4983  * Since: 2.14
4984  */
4985
4986
4987 /**
4988  * GRegexError:
4989  * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed.
4990  * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed.
4991  * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement string.
4992  * @G_REGEX_ERROR_MATCH: The match process failed.
4993  * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. Since 2.16
4994  * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16
4995  * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16
4996  * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". Since 2.16
4997  * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" quantifier. Since 2.16
4998  * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. Since 2.16
4999  * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for character class. Since 2.16
5000  * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence in character class. Since 2.16
5001  * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. Since 2.16
5002  * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16
5003  * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", "(?&lt;" or "(?P". Since 2.16
5004  * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are supported only within a class. Since 2.16
5005  * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" without opening "(". Since 2.16
5006  * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent subpattern. Since 2.16
5007  * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. Since 2.16
5008  * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. Since 2.16
5009  * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16
5010  * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not fixed length. Since 2.16
5011  * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". Since 2.16
5012  * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains more than two branches. Since 2.16
5013  * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". Since 2.16
5014  * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. Since 2.16
5015  * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating elements are not supported. Since 2.16
5016  * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence is too large. Since 2.16
5017  * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16
5018  * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in lookbehind assertion. Since 2.16
5019  * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. Since 2.16
5020  * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator in subpattern name. Since 2.16
5021  * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have the same name. Since 2.16
5022  * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. Since 2.16
5023  * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or "\\p". Since 2.16
5024  * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long (maximum 32 characters). Since 2.16
5025  * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum 10,000). Since 2.16
5026  * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". Since 2.16
5027  * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more than one branch. Since 2.16
5028  * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. Since 2.16
5029  * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. Since 2.16
5030  * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced name or an optionally braced non-zero number. Since 2.16
5031  *
5032  * Error codes returned by regular expressions functions.
5033  *
5034  * Since: 2.14
5035  */
5036
5037
5038 /**
5039  * GRegexEvalCallback:
5040  * @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.
5041  * @result: a #GString containing the new string
5042  * @user_data: user data passed to g_regex_replace_eval()
5043  *
5044  * Specifies the type of the function passed to g_regex_replace_eval().
5045  * It is called for each occurance of the pattern in the string passed
5046  * to g_regex_replace_eval(), and it should append the replacement to
5047  * @result.
5048  *
5049  * Returns: %FALSE to continue the replacement process, %TRUE to stop it
5050  * Since: 2.14
5051  */
5052
5053
5054 /**
5055  * GRegexMatchFlags:
5056  * @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.
5057  * @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".
5058  * @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".
5059  * @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".
5060  * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().
5061  * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when creating a new #GRegex, setting the '\r' character as line terminator.
5062  * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when creating a new #GRegex, setting the '\n' character as line terminator.
5063  * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when creating a new #GRegex, setting the '\r\n' characters as line terminator.
5064  * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when creating a new #GRegex, any newline character or character sequence is recognized.
5065  *
5066  * Flags specifying match-time options.
5067  *
5068  * Since: 2.14
5069  */
5070
5071
5072 /**
5073  * GResolver:
5074  *
5075  * The object that handles DNS resolution. Use g_resolver_get_default()
5076  * to get the default resolver.
5077  */
5078
5079
5080 /**
5081  * GResolver::reload:
5082  * @resolver: a #GResolver
5083  *
5084  * Emitted when the resolver notices that the system resolver
5085  * configuration has changed.
5086  */
5087
5088
5089 /**
5090  * GResolverError:
5091  * @G_RESOLVER_ERROR_NOT_FOUND: the requested name/address/service was not found
5092  * @G_RESOLVER_ERROR_TEMPORARY_FAILURE: the requested information could not be looked up due to a network error or similar problem
5093  * @G_RESOLVER_ERROR_INTERNAL: unknown error
5094  *
5095  * An error code used with %G_RESOLVER_ERROR in a #GError returned
5096  * from a #GResolver routine.
5097  *
5098  * Since: 2.22
5099  */
5100
5101
5102 /**
5103  * GSeekable:
5104  *
5105  * Seek object for streaming operations.
5106  */
5107
5108
5109 /**
5110  * GSeekableIface:
5111  * @g_iface: The parent interface.
5112  * @tell: Tells the current location within a stream.
5113  * @can_seek: Checks if seeking is supported by the stream.
5114  * @seek: Seeks to a location within a stream.
5115  * @can_truncate: Chekcs if truncation is suppored by the stream.
5116  * @truncate_fn: Truncates a stream.
5117  *
5118  * Provides an interface for implementing seekable functionality on I/O Streams.
5119  */
5120
5121
5122 /**
5123  * GSettings::change-event:
5124  * @settings: the object on which the signal was emitted
5125  * @keys: (array length=n_keys) (element-type GQuark) (allow-none):  an array of #GQuark<!-- -->s for the changed keys, or %NULL
5126  * @n_keys: the length of the @keys array, or 0
5127  * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
5128  *
5129  * The "change-event" signal is emitted once per change event that
5130  * affects this settings object.  You should connect to this signal
5131  * only if you are interested in viewing groups of changes before they
5132  * are split out into multiple emissions of the "changed" signal.
5133  * For most use cases it is more appropriate to use the "changed" signal.
5134  *
5135  * In the event that the change event applies to one or more specified
5136  * keys, @keys will be an array of #GQuark of length @n_keys.  In the
5137  * event that the change event applies to the #GSettings object as a
5138  * whole (ie: potentially every key has been changed) then @keys will
5139  * be %NULL and @n_keys will be 0.
5140  *
5141  * The default handler for this signal invokes the "changed" signal
5142  * for each affected key.  If any other connected handler returns
5143  * %TRUE then this default functionality will be supressed.
5144  */
5145
5146
5147 /**
5148  * GSettings::changed:
5149  * @settings: the object on which the signal was emitted
5150  * @key: the name of the key that changed
5151  *
5152  * The "changed" signal is emitted when a key has potentially changed.
5153  * You should call one of the g_settings_get() calls to check the new
5154  * value.
5155  *
5156  * This signal supports detailed connections.  You can connect to the
5157  * detailed signal "changed::x" in order to only receive callbacks
5158  * when key "x" changes.
5159  */
5160
5161
5162 /**
5163  * GSettings::writable-change-event:
5164  * @settings: the object on which the signal was emitted
5165  * @key: the quark of the key, or 0
5166  * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
5167  *
5168  * The "writable-change-event" signal is emitted once per writability
5169  * change event that affects this settings object.  You should connect
5170  * to this signal if you are interested in viewing groups of changes
5171  * before they are split out into multiple emissions of the
5172  * "writable-changed" signal.  For most use cases it is more
5173  * appropriate to use the "writable-changed" signal.
5174  *
5175  * In the event that the writability change applies only to a single
5176  * key, @key will be set to the #GQuark for that key.  In the event
5177  * that the writability change affects the entire settings object,
5178  * @key will be 0.
5179  *
5180  * The default handler for this signal invokes the "writable-changed"
5181  * and "changed" signals for each affected key.  This is done because
5182  * changes in writability might also imply changes in value (if for
5183  * example, a new mandatory setting is introduced).  If any other
5184  * connected handler returns %TRUE then this default functionality
5185  * will be supressed.
5186  */
5187
5188
5189 /**
5190  * GSettings::writable-changed:
5191  * @settings: the object on which the signal was emitted
5192  * @key: the key
5193  *
5194  * The "writable-changed" signal is emitted when the writability of a
5195  * key has potentially changed.  You should call
5196  * g_settings_is_writable() in order to determine the new status.
5197  *
5198  * This signal supports detailed connections.  You can connect to the
5199  * detailed signal "writable-changed::x" in order to only receive
5200  * callbacks when the writability of "x" changes.
5201  */
5202
5203
5204 /**
5205  * GSettings:context:
5206  *
5207  * The name of the context that the settings are stored in.
5208  */
5209
5210
5211 /**
5212  * GSettings:delay-apply:
5213  *
5214  * Whether the #GSettings object is in 'delay-apply' mode. See
5215  * g_settings_delay() for details.
5216  *
5217  * Since: 2.28
5218  */
5219
5220
5221 /**
5222  * GSettings:has-unapplied:
5223  *
5224  * If this property is %TRUE, the #GSettings object has outstanding
5225  * changes that will be applied when g_settings_apply() is called.
5226  */
5227
5228
5229 /**
5230  * GSettings:path:
5231  *
5232  * The path within the backend where the settings are stored.
5233  */
5234
5235
5236 /**
5237  * GSettings:schema:
5238  *
5239  * The name of the schema that describes the types of keys
5240  * for this #GSettings object.
5241  */
5242
5243
5244 /**
5245  * GSettingsBackend:
5246  *
5247  * An implementation of a settings storage repository.
5248  */
5249
5250
5251 /**
5252  * GSettingsBindFlags:
5253  * @G_SETTINGS_BIND_DEFAULT: Equivalent to <literal>G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET</literal>
5254  * @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.
5255  * @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.
5256  * @G_SETTINGS_BIND_NO_SENSITIVITY: Do not try to bind a "sensitivity" property to the writability of the setting
5257  * @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
5258  * @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().
5259  *
5260  * Flags used when creating a binding. These flags determine in which
5261  * direction the binding works. The default is to synchronize in both
5262  * directions.
5263  */
5264
5265
5266 /**
5267  * GSettingsBindGetMapping:
5268  * @value: return location for the property value
5269  * @variant: the #GVariant
5270  * @user_data: user data that was specified when the binding was created
5271  * @returns: %TRUE if the conversion succeeded, %FALSE in case of an error
5272  *
5273  * The type for the function that is used to convert from #GSettings to
5274  * an object property. The @value is already initialized to hold values
5275  * of the appropriate type.
5276  */
5277
5278
5279 /**
5280  * GSettingsBindSetMapping:
5281  * @value: a #GValue containing the property value to map
5282  * @expected_type: the #GVariantType to create
5283  * @user_data: user data that was specified when the binding was created
5284  * @returns: a new #GVariant holding the data from @value, or %NULL in case of an error
5285  *
5286  * The type for the function that is used to convert an object property
5287  * value to a #GVariant for storing it in #GSettings.
5288  */
5289
5290
5291 /**
5292  * GSettingsGetMapping:
5293  * @value: the #GVariant to map, or %NULL
5294  * @result: (out): the result of the mapping
5295  * @user_data: (closure): the user data that was passed to g_settings_get_mapped()
5296  * @returns: %TRUE if the conversion succeeded, %FALSE in case of an error
5297  *
5298  * The type of the function that is used to convert from a value stored
5299  * in a #GSettings to a value that is useful to the application.
5300  *
5301  * If the value is successfully mapped, the result should be stored at
5302  * @result and %TRUE returned.  If mapping fails (for example, if @value
5303  * is not in the right format) then %FALSE should be returned.
5304  *
5305  * If @value is %NULL then it means that the mapping function is being
5306  * given a "last chance" to successfully return a valid value.  %TRUE
5307  * must be returned in this case.
5308  */
5309
5310
5311 /**
5312  * GSignalAccumulator:
5313  * @ihint: Signal invocation hint, see #GSignalInvocationHint.
5314  * @return_accu: Accumulator to collect callback return values in, this is the return value of the current signal emission.
5315  * @handler_return: A #GValue holding the return value of the signal handler.
5316  * @data: Callback data that was specified when creating the signal.
5317  *
5318  * The signal accumulator is a special callback function that can be used
5319  * to collect return values of the various callbacks that are called
5320  * during a signal emission. The signal accumulator is specified at signal
5321  * creation time, if it is left %NULL, no accumulation of callback return
5322  * values is performed. The return value of signal emissions is then the
5323  * value returned by the last callback.
5324  *
5325  * should be aborted. Returning %FALSE means to abort the
5326  * current emission and %TRUE is returned for continuation.
5327  *
5328  * Returns: The accumulator function returns whether the signal emission
5329  */
5330
5331
5332 /**
5333  * GSignalCMarshaller:
5334  *
5335  * This is the signature of marshaller functions, required to marshall
5336  * arrays of parameter values to signal emissions into C language callback
5337  * invocations. It is merely an alias to #GClosureMarshal since the #GClosure
5338  * mechanism takes over responsibility of actual function invocation for the
5339  * signal system.
5340  */
5341
5342
5343 /**
5344  * GSignalEmissionHook:
5345  * @ihint: Signal invocation hint, see #GSignalInvocationHint.
5346  * @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
5347  * @param_values: the instance on which the signal was emitted, followed by the parameters of the emission.
5348  * @data: user data associated with the hook.
5349  *
5350  * A simple function pointer to get invoked when the signal is emitted. This
5351  * allows you to tie a hook to the signal type, so that it will trap all
5352  * emissions of that signal, from any object.
5353  *
5354  * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
5355  *
5356  * hook is disconnected (and destroyed).
5357  *
5358  * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
5359  */
5360
5361
5362 /**
5363  * GSignalFlags:
5364  * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage.
5365  * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage.
5366  * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage.
5367  * @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.
5368  * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name upon handler connections and emissions.
5369  * @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.
5370  * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
5371  * @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the arguments, even if there are no signal handlers connected.  Since 2.30.
5372  *
5373  * The signal flags are used to specify a signal's behaviour, the overall
5374  * signal description outlines how especially the RUN flags control the
5375  * stages of a signal emission.
5376  */
5377
5378
5379 /**
5380  * GSignalInvocationHint:
5381  * @signal_id: The signal id of the signal invoking the callback
5382  * @detail: The detail passed on for this emission
5383  * @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.
5384  *
5385  * The #GSignalInvocationHint structure is used to pass on additional information
5386  * to callbacks during a signal emission.
5387  */
5388
5389
5390 /**
5391  * GSignalMatchType:
5392  * @G_SIGNAL_MATCH_ID: The signal id must be equal.
5393  * @G_SIGNAL_MATCH_DETAIL: The signal detail be equal.
5394  * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same.
5395  * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same.
5396  * @G_SIGNAL_MATCH_DATA: The closure data must be the same.
5397  * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may matched.
5398  *
5399  * The match types specify what g_signal_handlers_block_matched(),
5400  * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
5401  * match signals by.
5402  */
5403
5404
5405 /**
5406  * GSignalQuery:
5407  * @signal_id: The signal id of the signal being queried, or 0 if the signal to be queried was unknown.
5408  * @signal_name: The signal name.
5409  * @itype: The interface/instance type that this signal can be emitted for.
5410  * @signal_flags: The signal flags as passed in to g_signal_new().
5411  * @return_type: The return type for user callbacks.
5412  * @n_params: The number of parameters that user callbacks take.
5413  * @param_types: The individual parameter types for user callbacks, note that the effective callback signature is: <programlisting> @return_type callback (#gpointer     data1, [#param_types param_names,] #gpointer     data2); </programlisting>
5414  *
5415  * A structure holding in-depth information for a specific signal. It is
5416  * filled in by the g_signal_query() function.
5417  */
5418
5419
5420 /**
5421  * GSimpleAction::activate:
5422  * @simple: the #GSimpleAction
5423  * @parameter: (allow-none): the parameter to the activation
5424  *
5425  * Indicates that the action was just activated.
5426  *
5427  * @parameter will always be of the expected type.  In the event that
5428  * an incorrect type was given, no signal will be emitted.
5429  *
5430  * Since: 2.28
5431  */
5432
5433
5434 /**
5435  * GSimpleAction::change-state:
5436  * @simple: the #GSimpleAction
5437  * @value: (allow-none): the requested value for the state
5438  *
5439  * Indicates that the action just received a request to change its
5440  * state.
5441  *
5442  * @value will always be of the correct state type.  In the event that
5443  * an incorrect type was given, no signal will be emitted.
5444  *
5445  * If no handler is connected to this signal then the default
5446  * behaviour is to call g_simple_action_set_state() to set the state
5447  * to the requested value.  If you connect a signal handler then no
5448  * default action is taken.  If the state should change then you must
5449  * call g_simple_action_set_state() from the handler.
5450  *
5451  * <example>
5452  * <title>Example 'change-state' handler</title>
5453  * <programlisting>
5454  * static void
5455  * change_volume_state (GSimpleAction *action,
5456  * GVariant      *value,
5457  * gpointer       user_data)
5458  * {
5459  * gint requested;
5460  *
5461  * requested = g_variant_get_int32 (value);
5462  *
5463  * // Volume only goes from 0 to 10
5464  * if (0 <= requested && requested <= 10)
5465  * g_simple_action_set_state (action, value);
5466  * }
5467  * </programlisting>
5468  * </example>
5469  *
5470  * The handler need not set the state to the requested value.  It
5471  * could set it to any value at all, or take some other action.
5472  *
5473  * Since: 2.30
5474  */
5475
5476
5477 /**
5478  * GSimpleAction:enabled:
5479  *
5480  * If @action is currently enabled.
5481  *
5482  * If the action is disabled then calls to g_simple_action_activate() and
5483  * g_simple_action_change_state() have no effect.
5484  *
5485  * Since: 2.28
5486  */
5487
5488
5489 /**
5490  * GSimpleAction:name:
5491  *
5492  * The name of the action.  This is mostly meaningful for identifying
5493  * the action once it has been added to a #GSimpleActionGroup.
5494  *
5495  * Since: 2.28
5496  */
5497
5498
5499 /**
5500  * GSimpleAction:parameter-type:
5501  *
5502  * The type of the parameter that must be given when activating the
5503  * action.
5504  *
5505  * Since: 2.28
5506  */
5507
5508
5509 /**
5510  * GSimpleAction:state:
5511  *
5512  * The state of the action, or %NULL if the action is stateless.
5513  *
5514  * Since: 2.28
5515  */
5516
5517
5518 /**
5519  * GSimpleAction:state-type:
5520  *
5521  * The #GVariantType of the state that the action has, or %NULL if the
5522  * action is stateless.
5523  *
5524  * Since: 2.28
5525  */
5526
5527
5528 /**
5529  * GSimpleActionGroup:
5530  *
5531  * The #GSimpleActionGroup structure contains private data and should only be accessed using the provided API.
5532  *
5533  * Since: 2.28
5534  */
5535
5536
5537 /**
5538  * GSimpleAsyncResult:
5539  *
5540  * A simple implementation of #GAsyncResult.
5541  */
5542
5543
5544 /**
5545  * GSimpleAsyncThreadFunc:
5546  * @res: a #GSimpleAsyncResult.
5547  * @object: a #GObject.
5548  * @cancellable: optional #GCancellable object, %NULL to ignore.
5549  *
5550  * Simple thread function that runs an asynchronous operation and
5551  * checks for cancellation.
5552  */
5553
5554
5555 /**
5556  * GSimplePermission:
5557  *
5558  * #GSimplePermission is an opaque data structure.  There are no methods
5559  * except for those defined by #GPermission.
5560  */
5561
5562
5563 /**
5564  * GSocket:
5565  *
5566  * A lowlevel network socket object.
5567  *
5568  * Since: 2.22
5569  */
5570
5571
5572 /**
5573  * GSocket:timeout:
5574  *
5575  * The timeout in seconds on socket I/O
5576  *
5577  * Since: 2.26
5578  */
5579
5580
5581 /**
5582  * GSocketAddress:
5583  *
5584  * A socket endpoint address, corresponding to <type>struct sockaddr</type>
5585  * or one of its subtypes.
5586  */
5587
5588
5589 /**
5590  * GSocketAddressEnumerator:
5591  *
5592  * Enumerator type for objects that contain or generate
5593  * #GSocketAddress<!-- -->es.
5594  */
5595
5596
5597 /**
5598  * GSocketClient:
5599  *
5600  * A helper class for network servers to listen for and accept connections.
5601  *
5602  * Since: 2.22
5603  */
5604
5605
5606 /**
5607  * GSocketConnectable:
5608  *
5609  * Interface for objects that contain or generate #GSocketAddress<!-- -->es.
5610  */
5611
5612
5613 /**
5614  * GSocketConnectableIface:
5615  * @g_iface: The parent interface.
5616  * @enumerate: Creates a #GSocketAddressEnumerator
5617  * @proxy_enumerate: Creates a #GProxyAddressEnumerator
5618  *
5619  * Provides an interface for returning a #GSocketAddressEnumerator
5620  * and #GProxyAddressEnumerator
5621  */
5622
5623
5624 /**
5625  * GSocketConnection:
5626  *
5627  * A socket connection GIOStream object for connection-oriented sockets.
5628  *
5629  * Since: 2.22
5630  */
5631
5632
5633 /**
5634  * GSocketControlMessage:
5635  *
5636  * Base class for socket-type specific control messages that can be sent and
5637  * received over #GSocket.
5638  */
5639
5640
5641 /**
5642  * GSocketControlMessageClass:
5643  * @get_size: gets the size of the message.
5644  * @get_level: gets the protocol of the message.
5645  * @get_type: gets the protocol specific type of the message.
5646  * @serialize: Writes out the message data.
5647  * @deserialize: Tries to deserialize a message.
5648  *
5649  *
5650  */
5651
5652
5653 /**
5654  * GSocketFamily:
5655  * @G_SOCKET_FAMILY_INVALID: no address family
5656  * @G_SOCKET_FAMILY_IPV4: the IPv4 family
5657  * @G_SOCKET_FAMILY_IPV6: the IPv6 family
5658  * @G_SOCKET_FAMILY_UNIX: the UNIX domain family
5659  *
5660  * The protocol family of a #GSocketAddress. (These values are
5661  * identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX,
5662  * if available.)
5663  *
5664  * Since: 2.22
5665  */
5666
5667
5668 /**
5669  * GSocketListenerClass:
5670  * @changed: virtual method called when the set of socket listened to changes
5671  *
5672  *
5673  */
5674
5675
5676 /**
5677  * GSocketMsgFlags:
5678  * @G_SOCKET_MSG_NONE: No flags.
5679  * @G_SOCKET_MSG_OOB: Request to send/receive out of band data.
5680  * @G_SOCKET_MSG_PEEK: Read data from the socket without removing it from the queue.
5681  * @G_SOCKET_MSG_DONTROUTE: Don't use a gateway to send out the packet, only send to hosts on directly connected networks.
5682  *
5683  * Flags used in g_socket_receive_message() and g_socket_send_message().
5684  * The flags listed in the enum are some commonly available flags, but the
5685  * values used for them are the same as on the platform, and any other flags
5686  * are passed in/out as is. So to use a platform specific flag, just include
5687  * the right system header and pass in the flag.
5688  *
5689  * Since: 2.22
5690  */
5691
5692
5693 /**
5694  * GSocketProtocol:
5695  * @G_SOCKET_PROTOCOL_UNKNOWN: The protocol type is unknown
5696  * @G_SOCKET_PROTOCOL_DEFAULT: The default protocol for the family/type
5697  * @G_SOCKET_PROTOCOL_TCP: TCP over IP
5698  * @G_SOCKET_PROTOCOL_UDP: UDP over IP
5699  * @G_SOCKET_PROTOCOL_SCTP: SCTP over IP
5700  *
5701  * A protocol identifier is specified when creating a #GSocket, which is a
5702  * family/type specific identifier, where 0 means the default protocol for
5703  * the particular family/type.
5704  *
5705  * This enum contains a set of commonly available and used protocols. You
5706  * can also pass any other identifiers handled by the platform in order to
5707  * use protocols not listed here.
5708  *
5709  * Since: 2.22
5710  */
5711
5712
5713 /**
5714  * GSocketService:
5715  *
5716  * A helper class for handling accepting incomming connections in the
5717  * glib mainloop.
5718  *
5719  * Since: 2.22
5720  */
5721
5722
5723 /**
5724  * GSocketService::incoming:
5725  * @service: the #GSocketService
5726  * @connection: a new #GSocketConnection object
5727  * @source_object: the source_object passed to g_socket_listener_add_address()
5728  *
5729  * The ::incoming signal is emitted when a new incoming connection
5730  * to @service needs to be handled. The handler must initiate the
5731  * handling of @connection, but may not block; in essence,
5732  * asynchronous operations must be used.
5733  *
5734  * @connection will be unreffed once the signal handler returns,
5735  * so you need to ref it yourself if you are planning to use it.
5736  *
5737  * Returns: %TRUE to stop other handlers from being called
5738  * Since: 2.22
5739  */
5740
5741
5742 /**
5743  * GSocketServiceClass:
5744  * @incomming: signal emitted when new connections are accepted
5745  *
5746  *
5747  */
5748
5749
5750 /**
5751  * GSocketSourceFunc:
5752  * @socket: the #GSocket
5753  * @condition: the current condition at the source fired.
5754  * @user_data: data passed in by the user.
5755  *
5756  * This is the function type of the callback used for the #GSource
5757  * returned by g_socket_create_source().
5758  *
5759  * Returns: it should return %FALSE if the source should be removed.
5760  * Since: 2.22
5761  */
5762
5763
5764 /**
5765  * GSocketType:
5766  * @G_SOCKET_TYPE_INVALID: Type unknown or wrong
5767  * @G_SOCKET_TYPE_STREAM: Reliable connection-based byte streams (e.g. TCP).
5768  * @G_SOCKET_TYPE_DATAGRAM: Connectionless, unreliable datagram passing. (e.g. UDP)
5769  * @G_SOCKET_TYPE_SEQPACKET: Reliable connection-based passing of datagrams of fixed maximum length (e.g. SCTP).
5770  *
5771  * Flags used when creating a #GSocket. Some protocols may not implement
5772  * all the socket types.
5773  *
5774  * Since: 2.22
5775  */
5776
5777
5778 /**
5779  * GSource:
5780  *
5781  * The <structname>GSource</structname> struct is an opaque data type
5782  * representing an event source.
5783  */
5784
5785
5786 /**
5787  * GSourceCallbackFuncs:
5788  * @ref: Called when a reference is added to the callback object
5789  * @unref: Called when a reference to the callback object is dropped
5790  * @get: Called to extract the callback function and data from the callback object. The <structname>GSourceCallbackFuncs</structname> struct contains functions for managing callback objects.
5791  *
5792  *
5793  */
5794
5795
5796 /**
5797  * GSourceDummyMarshal:
5798  *
5799  * This is just a placeholder for #GClosureMarshal,
5800  * which cannot be used here for dependency reasons.
5801  */
5802
5803
5804 /**
5805  * GSourceFunc:
5806  * @data: data passed to the function, set when the source was created with one of the above functions
5807  *
5808  * Specifies the type of function passed to g_timeout_add(),
5809  * g_timeout_add_full(), g_idle_add(), and g_idle_add_full().
5810  *
5811  * Returns: %FALSE if the source should be removed
5812  */
5813
5814
5815 /**
5816  * GSourceFuncs:
5817  * @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 @timeout_ values returned which were >= 0.
5818  * @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.
5819  * @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.
5820  * @finalize: Called when the source is finalized.
5821  *
5822  * The <structname>GSourceFuncs</structname> struct contains a table of
5823  * functions used to handle event sources in a generic manner.
5824  *
5825  * For idle sources, the prepare and check functions always return %TRUE
5826  * to indicate that the source is always ready to be processed. The prepare
5827  * function also returns a timeout value of 0 to ensure that the poll() call
5828  * doesn't block (since that would be time wasted which could have been spent
5829  * running the idle function).
5830  *
5831  * For timeout sources, the prepare and check functions both return %TRUE
5832  * if the timeout interval has expired. The prepare function also returns
5833  * a timeout value to ensure that the poll() call doesn't block too long
5834  * and miss the next timeout.
5835  *
5836  * For file descriptor sources, the prepare function typically returns %FALSE,
5837  * since it must wait until poll() has been called before it knows whether
5838  * any events need to be processed. It sets the returned timeout to -1 to
5839  * indicate that it doesn't mind how long the poll() call blocks. In the
5840  * check function, it tests the results of the poll() call to see if the
5841  * required condition has been met, and returns %TRUE if so.
5842  */
5843
5844
5845 /**
5846  * GSpawnChildSetupFunc:
5847  * @user_data: user data to pass to the function.
5848  *
5849  * Specifies the type of the setup function passed to g_spawn_async(),
5850  * g_spawn_sync() and g_spawn_async_with_pipes(). On POSIX platforms it
5851  * is called in the child after GLib has performed all the setup it plans
5852  * to perform but before calling exec(). On POSIX actions taken in this
5853  * function will thus only affect the child, not the parent.
5854  *
5855  * Note that POSIX allows only async-signal-safe functions (see signal(7))
5856  * to be called in the child between fork() and exec(), which drastically
5857  * limits the usefulness of child setup functions.
5858  *
5859  * Also note that modifying the environment from the child setup function
5860  * may not have the intended effect, since it will get overridden by
5861  * a non-%NULL @env argument to the <literal>g_spawn...</literal> functions.
5862  *
5863  * On Windows the function is called in the parent. Its usefulness on
5864  * Windows is thus questionable. In many cases executing the child setup
5865  * function in the parent can have ill effects, and you should be very
5866  * careful when porting software to Windows that uses child setup
5867  * functions.
5868  */
5869
5870
5871 /**
5872  * GSpawnError:
5873  * @G_SPAWN_ERROR_FORK: Fork failed due to lack of memory.
5874  * @G_SPAWN_ERROR_READ: Read or select on pipes failed.
5875  * @G_SPAWN_ERROR_CHDIR: Changing to working directory failed.
5876  * @G_SPAWN_ERROR_ACCES: execv() returned %EACCES.
5877  * @G_SPAWN_ERROR_PERM: execv() returned %EPERM.
5878  * @G_SPAWN_ERROR_2BIG: execv() returned %E2BIG.
5879  * @G_SPAWN_ERROR_NOEXEC: execv() returned %ENOEXEC.
5880  * @G_SPAWN_ERROR_NAMETOOLONG: execv() returned %ENAMETOOLONG.
5881  * @G_SPAWN_ERROR_NOENT: execv() returned %ENOENT.
5882  * @G_SPAWN_ERROR_NOMEM: execv() returned %ENOMEM.
5883  * @G_SPAWN_ERROR_NOTDIR: execv() returned %ENOTDIR.
5884  * @G_SPAWN_ERROR_LOOP: execv() returned %ELOOP.
5885  * @G_SPAWN_ERROR_TXTBUSY: execv() returned %ETXTBUSY.
5886  * @G_SPAWN_ERROR_IO: execv() returned %EIO.
5887  * @G_SPAWN_ERROR_NFILE: execv() returned %ENFILE.
5888  * @G_SPAWN_ERROR_MFILE: execv() returned %EMFILE.
5889  * @G_SPAWN_ERROR_INVAL: execv() returned %EINVAL.
5890  * @G_SPAWN_ERROR_ISDIR: execv() returned %EISDIR.
5891  * @G_SPAWN_ERROR_LIBBAD: execv() returned %ELIBBAD.
5892  * @G_SPAWN_ERROR_FAILED: Some other fatal failure, <literal>error-&gt;message</literal> should explain.
5893  *
5894  * Error codes returned by spawning processes.
5895  */
5896
5897
5898 /**
5899  * GSpawnFlags:
5900  * @G_SPAWN_LEAVE_DESCRIPTORS_OPEN: the parent's open file descriptors will be inherited by the child; otherwise all descriptors except stdin/stdout/stderr will be closed before calling exec() in the child.
5901  * @G_SPAWN_DO_NOT_REAP_CHILD: the child will not be automatically reaped; you must use g_child_watch_add() yourself (or call waitpid() or handle <literal>SIGCHLD</literal> yourself), or the child will become a zombie.
5902  * @G_SPAWN_SEARCH_PATH: <literal>argv[0]</literal> need not be an absolute path, it will be looked for in the user's <envar>PATH</envar>.
5903  * @G_SPAWN_STDOUT_TO_DEV_NULL: the child's standard output will be discarded, instead of going to the same location as the parent's standard output.
5904  * @G_SPAWN_STDERR_TO_DEV_NULL: the child's standard error will be discarded.
5905  * @G_SPAWN_CHILD_INHERITS_STDIN: the child will inherit the parent's standard input (by default, the child's standard input is attached to <filename>/dev/null</filename>).
5906  * @G_SPAWN_FILE_AND_ARGV_ZERO: the first element of <literal>argv</literal> is the file to execute, while the remaining elements are the actual argument vector to pass to the file. Normally g_spawn_async_with_pipes() uses <literal>argv[0]</literal> as the file to execute, and passes all of <literal>argv</literal> to the child.
5907  *
5908  * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes().
5909  */
5910
5911
5912 /**
5913  * GSrvTarget:
5914  *
5915  * A single target host/port that a network service is running on.
5916  */
5917
5918
5919 /**
5920  * GString:
5921  * @str: points to the character data. It may move as text is added. The @str field is null-terminated and so can be used as an ordinary C string.
5922  * @len: contains the length of the string, not including the terminating nul byte.
5923  * @allocated_len: the number of bytes that can be stored in the string before it needs to be reallocated. May be larger than @len.
5924  *
5925  * The #GString struct contains the public fields of a #GString.
5926  */
5927
5928
5929 /**
5930  * GStrv:
5931  *
5932  * A C representable type name for #G_TYPE_STRV.
5933  */
5934
5935
5936 /**
5937  * GTcpConnection:
5938  *
5939  * A #GSocketConnection for TCP/IP connections.
5940  *
5941  * Since: 2.22
5942  */
5943
5944
5945 /**
5946  * GTestLogFatalFunc:
5947  * @log_domain: the log domain of the message
5948  * @log_level: the log level of the message (including the fatal and recursion flags)
5949  * @message: the message to process
5950  * @user_data: user data, set in g_test_log_set_fatal_handler()
5951  *
5952  * Specifies the prototype of fatal log handler functions.
5953  *
5954  * Returns: %TRUE if the program should abort, %FALSE otherwise
5955  * Since: 2.22
5956  */
5957
5958
5959 /**
5960  * GThemedIcon:
5961  *
5962  * An implementation of #GIcon for themed icons.
5963  */
5964
5965
5966 /**
5967  * GThemedIcon:name:
5968  *
5969  * The icon name.
5970  */
5971
5972
5973 /**
5974  * GThemedIcon:names:
5975  *
5976  * A %NULL-terminated array of icon names.
5977  */
5978
5979
5980 /**
5981  * GThemedIcon:use-default-fallbacks:
5982  *
5983  * Whether to use the default fallbacks found by shortening the icon name
5984  * at '-' characters. If the "names" array has more than one element,
5985  * ignores any past the first.
5986  *
5987  * For example, if the icon name was "gnome-dev-cdrom-audio", the array
5988  * would become
5989  * |[
5990  * {
5991  * "gnome-dev-cdrom-audio",
5992  * "gnome-dev-cdrom",
5993  * "gnome-dev",
5994  * "gnome",
5995  * NULL
5996  * };
5997  * ]|
5998  */
5999
6000
6001 /**
6002  * GThreadedSocketService:
6003  *
6004  * A helper class for handling accepting incomming connections in the
6005  * glib mainloop and handling them in a thread.
6006  *
6007  * Since: 2.22
6008  */
6009
6010
6011 /**
6012  * GThreadedSocketService::run:
6013  * @service: the #GThreadedSocketService.
6014  * @connection: a new #GSocketConnection object.
6015  * @source_object: the source_object passed to g_socket_listener_add_address().
6016  *
6017  * The ::run signal is emitted in a worker thread in response to an
6018  * incoming connection. This thread is dedicated to handling
6019  * @connection and may perform blocking IO. The signal handler need
6020  * not return until the connection is closed.
6021  *
6022  * Returns: %TRUE to stop further signal handlers from being called
6023  */
6024
6025
6026 /**
6027  * GTimeSpan:
6028  *
6029  * A value representing an interval of time, in microseconds.
6030  *
6031  * Since: 2.26
6032  */
6033
6034
6035 /**
6036  * GTimeType:
6037  * @G_TIME_TYPE_STANDARD: the time is in local standard time
6038  * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time
6039  * @G_TIME_TYPE_UNIVERSAL: the time is in UTC
6040  *
6041  * Disambiguates a given time in two ways.
6042  *
6043  * First, specifies if the given time is in universal or local time.
6044  *
6045  * Second, if the time is in local time, specifies if it is local
6046  * standard time or local daylight time.  This is important for the case
6047  * where the same local time occurs twice (during daylight savings time
6048  * transitions, for example).
6049  */
6050
6051
6052 /**
6053  * GTimeZoneMonitor:
6054  *
6055  * This is an opaque structure type.
6056  */
6057
6058
6059 /**
6060  * GTimeZoneMonitor::changed:
6061  * @monitor: the #GTimeZoneMonitor
6062  *
6063  * Indicates that the local timezone has changed.
6064  *
6065  * The g_time_zone_refresh_local() function is called just before this
6066  * signal is emitted, so any new #GTimeZone or #GDateTime instances
6067  * created from signal handlers will be as per the new timezone.
6068  *
6069  * Note that this signal is not emitted in response to entering or
6070  * exiting daylight savings time within a given timezone.  It's only
6071  * for when the user has changed the timezone to that of a different
6072  * location.
6073  */
6074
6075
6076 /**
6077  * GTlsAuthenticationMode:
6078  * @G_TLS_AUTHENTICATION_NONE: client authentication not required
6079  * @G_TLS_AUTHENTICATION_REQUESTED: client authentication is requested
6080  * @G_TLS_AUTHENTICATION_REQUIRED: client authentication is required
6081  *
6082  * The client authentication mode for a #GTlsServerConnection.
6083  *
6084  * Since: 2.28
6085  */
6086
6087
6088 /**
6089  * GTlsBackend:
6090  *
6091  * TLS (Transport Layer Security, aka SSL) backend. This is an
6092  * internal type used to coordinate the different classes implemented
6093  * by a TLS backend.
6094  *
6095  * Since: 2.28
6096  */
6097
6098
6099 /**
6100  * GTlsBackendInterface:
6101  * @g_iface: The parent interface.
6102  * @supports_tls: returns whether the backend supports TLS.
6103  * @get_default_database: returns a default #GTlsDatabase instance.
6104  * @get_certificate_type: returns the #GTlsCertificate implementation type
6105  * @get_client_connection_type: returns the #GTlsClientConnection implementation type
6106  * @get_server_connection_type: returns the #GTlsServerConnection implementation type
6107  * @get_file_database_type: returns the #GTlsFileDatabase implementation type.
6108  *
6109  * Provides an interface for describing TLS-related types.
6110  *
6111  * Since: 2.28
6112  */
6113
6114
6115 /**
6116  * GTlsCertificate:
6117  *
6118  * Abstract base class for TLS certificate types.
6119  *
6120  * Since: 2.28
6121  */
6122
6123
6124 /**
6125  * GTlsCertificate:certificate:
6126  *
6127  * The DER (binary) encoded representation of the certificate's
6128  * public key. This property and the
6129  * #GTlsCertificate:certificate-pem property represent the same
6130  * data, just in different forms.
6131  *
6132  * Since: 2.28
6133  */
6134
6135
6136 /**
6137  * GTlsCertificate:certificate-pem:
6138  *
6139  * The PEM (ASCII) encoded representation of the certificate's
6140  * public key. This property and the #GTlsCertificate:certificate
6141  * property represent the same data, just in different forms.
6142  *
6143  * Since: 2.28
6144  */
6145
6146
6147 /**
6148  * GTlsCertificate:issuer:
6149  *
6150  * A #GTlsCertificate representing the entity that issued this
6151  * certificate. If %NULL, this means that the certificate is either
6152  * self-signed, or else the certificate of the issuer is not
6153  * available.
6154  *
6155  * Since: 2.28
6156  */
6157
6158
6159 /**
6160  * GTlsCertificate:private-key:
6161  *
6162  * The DER (binary) encoded representation of the certificate's
6163  * private key. This property (or the
6164  * #GTlsCertificate:private-key-pem property) can be set when
6165  * constructing a key (eg, from a file), but cannot be read.
6166  *
6167  * Since: 2.28
6168  */
6169
6170
6171 /**
6172  * GTlsCertificate:private-key-pem:
6173  *
6174  * The PEM (ASCII) encoded representation of the certificate's
6175  * private key. This property (or the #GTlsCertificate:private-key
6176  * property) can be set when constructing a key (eg, from a file),
6177  * but cannot be read.
6178  *
6179  * Since: 2.28
6180  */
6181
6182
6183 /**
6184  * GTlsCertificateFlags:
6185  * @G_TLS_CERTIFICATE_UNKNOWN_CA: The signing certificate authority is not known.
6186  * @G_TLS_CERTIFICATE_BAD_IDENTITY: The certificate does not match the expected identity of the site that it was retrieved from.
6187  * @G_TLS_CERTIFICATE_NOT_ACTIVATED: The certificate's activation time is still in the future
6188  * @G_TLS_CERTIFICATE_EXPIRED: The certificate has expired
6189  * @G_TLS_CERTIFICATE_REVOKED: The certificate has been revoked according to the #GTlsConnection's certificate revocation list.
6190  * @G_TLS_CERTIFICATE_INSECURE: The certificate's algorithm is considered insecure.
6191  * @G_TLS_CERTIFICATE_GENERIC_ERROR: Some other error occurred validating the certificate
6192  * @G_TLS_CERTIFICATE_VALIDATE_ALL: the combination of all of the above flags
6193  *
6194  * A set of flags describing TLS certification validation. This can be
6195  * used to set which validation steps to perform (eg, with
6196  * g_tls_client_connection_set_validation_flags()), or to describe why
6197  * a particular certificate was rejected (eg, in
6198  * #GTlsConnection::accept-certificate).
6199  *
6200  * Since: 2.28
6201  */
6202
6203
6204 /**
6205  * GTlsClientConnection:
6206  *
6207  * TLS client-side connection; the client-side implementation of a
6208  * #GTlsConnection
6209  *
6210  * Since: 2.28
6211  */
6212
6213
6214 /**
6215  * GTlsClientConnection:accepted-cas:
6216  *
6217  * A list of the distinguished names of the Certificate Authorities
6218  * that the server will accept client certificates signed by. If the
6219  * server requests a client certificate during the handshake, then
6220  * this property will be set after the handshake completes.
6221  *
6222  * Each item in the list is a #GByteArray which contains the complete
6223  * subject DN of the certificate authority.
6224  *
6225  * Since: 2.28
6226  */
6227
6228
6229 /**
6230  * GTlsClientConnection:server-identity:
6231  *
6232  * A #GSocketConnectable describing the identity of the server that
6233  * is expected on the other end of the connection.
6234  *
6235  * If the %G_TLS_CERTIFICATE_BAD_IDENTITY flag is set in
6236  * #GTlsClientConnection:validation-flags, this object will be used
6237  * to determine the expected identify of the remote end of the
6238  * connection; if #GTlsClientConnection:server-identity is not set,
6239  * or does not match the identity presented by the server, then the
6240  * %G_TLS_CERTIFICATE_BAD_IDENTITY validation will fail.
6241  *
6242  * In addition to its use in verifying the server certificate,
6243  * this is also used to give a hint to the server about what
6244  * certificate we expect, which is useful for servers that serve
6245  * virtual hosts.
6246  *
6247  * Since: 2.28
6248  */
6249
6250
6251 /**
6252  * GTlsClientConnection:use-ssl3:
6253  *
6254  * If %TRUE, tells the connection to use SSL 3.0 rather than trying
6255  * to negotiate the best version of TLS or SSL to use. This can be
6256  * used when talking to servers that don't implement version
6257  * negotiation correctly and therefore refuse to handshake at all with
6258  * a "modern" TLS handshake.
6259  *
6260  * Since: 2.28
6261  */
6262
6263
6264 /**
6265  * GTlsClientConnection:validation-flags:
6266  *
6267  * What steps to perform when validating a certificate received from
6268  * a server. Server certificates that fail to validate in all of the
6269  * ways indicated here will be rejected unless the application
6270  * overrides the default via #GTlsConnection::accept-certificate.
6271  *
6272  * Since: 2.28
6273  */
6274
6275
6276 /**
6277  * GTlsConnection:
6278  *
6279  * TLS connection. This is an abstract type that will be subclassed by
6280  * a TLS-library-specific subtype.
6281  *
6282  * Since: 2.28
6283  */
6284
6285
6286 /**
6287  * GTlsConnection::accept-certificate:
6288  * @conn: a #GTlsConnection
6289  * @peer_cert: the peer's #GTlsCertificate
6290  * @errors: the problems with @peer_cert.
6291  *
6292  * Emitted during the TLS handshake after the peer certificate has
6293  * been received. You can examine @peer_cert's certification path by
6294  * calling g_tls_certificate_get_issuer() on it.
6295  *
6296  * For a client-side connection, @peer_cert is the server's
6297  * certificate, and the signal will only be emitted if the
6298  * certificate was not acceptable according to @conn's
6299  * #GTlsClientConnection:validation_flags. If you would like the
6300  * certificate to be accepted despite @errors, return %TRUE from the
6301  * signal handler. Otherwise, if no handler accepts the certificate,
6302  * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE.
6303  *
6304  * For a server-side connection, @peer_cert is the certificate
6305  * presented by the client, if this was requested via the server's
6306  * #GTlsServerConnection:authentication_mode. On the server side,
6307  * the signal is always emitted when the client presents a
6308  * certificate, and the certificate will only be accepted if a
6309  * handler returns %TRUE.
6310  *
6311  * Note that if this signal is emitted as part of asynchronous I/O
6312  * in the main thread, then you should not attempt to interact with
6313  * the user before returning from the signal handler. If you want to
6314  * let the user decide whether or not to accept the certificate, you
6315  * would have to return %FALSE from the signal handler on the first
6316  * attempt, and then after the connection attempt returns a
6317  * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if
6318  * the user decides to accept the certificate, remember that fact,
6319  * create a new connection, and return %TRUE from the signal handler
6320  * the next time.
6321  *
6322  * If you are doing I/O in another thread, you do not
6323  * need to worry about this, and can simply block in the signal
6324  * handler until the UI thread returns an answer.
6325  *
6326  * immediately end the signal emission). %FALSE to allow the signal
6327  * emission to continue, which will cause the handshake to fail if
6328  * no one else overrides it.
6329  *
6330  * Returns: %TRUE to accept @peer_cert (which will also
6331  * Since: 2.28
6332  */
6333
6334
6335 /**
6336  * GTlsConnection:base-io-stream:
6337  *
6338  * The #GIOStream that the connection wraps
6339  *
6340  * Since: 2.28
6341  */
6342
6343
6344 /**
6345  * GTlsConnection:certificate:
6346  *
6347  * The connection's certificate; see
6348  * g_tls_connection_set_certificate().
6349  *
6350  * Since: 2.28
6351  */
6352
6353
6354 /**
6355  * GTlsConnection:database:
6356  *
6357  * The certificate database to use when verifying this TLS connection.
6358  * If no cerificate database is set, then the default database will be
6359  * used. See g_tls_backend_get_default_database().
6360  *
6361  * Since: 2.30
6362  */
6363
6364
6365 /**
6366  * GTlsConnection:interaction:
6367  *
6368  * A #GTlsInteraction object to be used when the connection or certificate
6369  * database need to interact with the user. This will be used to prompt the
6370  * user for passwords where necessary.
6371  *
6372  * Since: 2.30
6373  */
6374
6375
6376 /**
6377  * GTlsConnection:peer-certificate:
6378  *
6379  * The connection's peer's certificate, after the TLS handshake has
6380  * completed and the certificate has been accepted. Note in
6381  * particular that this is not yet set during the emission of
6382  * #GTlsConnection::accept-certificate.
6383  *
6384  * (You can watch for a #GObject::notify signal on this property to
6385  * detect when a handshake has occurred.)
6386  *
6387  * Since: 2.28
6388  */
6389
6390
6391 /**
6392  * GTlsConnection:peer-certificate-errors:
6393  *
6394  * The errors noticed-and-ignored while verifying
6395  * #GTlsConnection:peer-certificate. Normally this should be 0, but
6396  * it may not be if #GTlsClientConnection:validation-flags is not
6397  * %G_TLS_CERTIFICATE_VALIDATE_ALL, or if
6398  * #GTlsConnection::accept-certificate overrode the default
6399  * behavior.
6400  *
6401  * Since: 2.28
6402  */
6403
6404
6405 /**
6406  * GTlsConnection:rehandshake-mode:
6407  *
6408  * The rehandshaking mode. See
6409  * g_tls_connection_set_rehandshake_mode().
6410  *
6411  * Since: 2.28
6412  */
6413
6414
6415 /**
6416  * GTlsConnection:require-close-notify:
6417  *
6418  * Whether or not proper TLS close notification is required.
6419  * See g_tls_connection_set_require_close_notify().
6420  *
6421  * Since: 2.28
6422  */
6423
6424
6425 /**
6426  * GTlsConnection:use-system-certdb:
6427  *
6428  * Whether or not the system certificate database will be used to
6429  * verify peer certificates. See
6430  * g_tls_connection_set_use_system_certdb().
6431  *
6432  * Deprecated: 2.30: Use GTlsConnection:database instead
6433  */
6434
6435
6436 /**
6437  * GTlsDatabase:
6438  *
6439  * Abstract base class for the backend-specific database types.
6440  *
6441  * Since: 2.30
6442  */
6443
6444
6445 /**
6446  * GTlsDatabaseLookupFlags:
6447  * @G_TLS_DATABASE_LOOKUP_NONE: No lookup flags
6448  * @G_TLS_DATABASE_LOOKUP_KEYPAIR: Restrict lookup to certificates that have a private key.
6449  *
6450  * Flags for g_tls_database_lookup_handle(), g_tls_database_lookup_issuer(),
6451  * and g_tls_database_lookup_issued().
6452  *
6453  * Since: 2.30
6454  */
6455
6456
6457 /**
6458  * GTlsDatabaseVerifyFlags:
6459  * @G_TLS_DATABASE_VERIFY_NONE: No verification flags
6460  *
6461  * Flags for g_tls_database_verify_chain().
6462  *
6463  * Since: 2.30
6464  */
6465
6466
6467 /**
6468  * GTlsError:
6469  * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available
6470  * @G_TLS_ERROR_MISC: Miscellaneous TLS error
6471  * @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed
6472  * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the peer does not seem to be a TLS server.
6473  * @G_TLS_ERROR_HANDSHAKE: The TLS handshake failed because the peer's certificate was not acceptable.
6474  * @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().
6475  * @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().
6476  *
6477  * An error code used with %G_TLS_ERROR in a #GError returned from a
6478  * TLS-related routine.
6479  *
6480  * Since: 2.28
6481  */
6482
6483
6484 /**
6485  * GTlsFileDatabase:
6486  *
6487  * Implemented by a #GTlsDatabase which allows you to load certificates
6488  * from a file.
6489  *
6490  * Since: 2.30
6491  */
6492
6493
6494 /**
6495  * GTlsFileDatabase:anchors:
6496  *
6497  * The path to a file containing PEM encoded certificate authority
6498  * root anchors. The certificates in this file will be treated as
6499  * root authorities for the purpose of verifying other certificates
6500  * via the g_tls_database_verify_chain() operation.
6501  *
6502  * Since: 2.30
6503  */
6504
6505
6506 /**
6507  * GTlsFileDatabaseInterface:
6508  * @g_iface: The parent interface.
6509  *
6510  * Provides an interface for #GTlsFileDatabase implementations.
6511  */
6512
6513
6514 /**
6515  * GTlsInteraction:
6516  *
6517  * An object representing interaction that the TLS connection and database
6518  * might have with the user.
6519  *
6520  * Since: 2.30
6521  */
6522
6523
6524 /**
6525  * GTlsInteractionClass:
6526  *
6527  * The class for #GTlsInteraction.
6528  *
6529  * Since: 2.30
6530  */
6531
6532
6533 /**
6534  * GTlsInteractionResult:
6535  * @G_TLS_INTERACTION_HANDLED: The interaction completed, and resulting data is available.
6536  * @G_TLS_INTERACTION_ABORTED: The user cancelled the interaction, and requested the operation to be aborted.
6537  * @G_TLS_INTERACTION_UNHANDLED: The interaction was unhandled (i.e. not implemented).
6538  *
6539  * #GTlsInteractionResult is returned by various functions in #GTlsInteraction
6540  * when finishing an interaction request.
6541  *
6542  * Since: 2.30
6543  */
6544
6545
6546 /**
6547  * GTlsPassword:
6548  *
6549  * An abstract interface representing a password used in TLS. Often used in
6550  * user interaction such as unlocking a key storage token.
6551  *
6552  * Since: 2.30
6553  */
6554
6555
6556 /**
6557  * GTlsPasswordFlags:
6558  * @G_TLS_PASSWORD_NONE: No flags
6559  * @G_TLS_PASSWORD_RETRY: The password was wrong, and the user should retry.
6560  * @G_TLS_PASSWORD_MANY_TRIES: Hint to the user that the password has been wrong many times, and the user may not have many chances left.
6561  * @G_TLS_PASSWORD_FINAL_TRY: Hint to the user that this is the last try to get this password right.
6562  *
6563  * Various flags for the password.
6564  *
6565  * Since: 2.30
6566  */
6567
6568
6569 /**
6570  * GTlsRehandshakeMode:
6571  * @G_TLS_REHANDSHAKE_NEVER: Never allow rehandshaking
6572  * @G_TLS_REHANDSHAKE_SAFELY: Allow safe rehandshaking only
6573  * @G_TLS_REHANDSHAKE_UNSAFELY: Allow unsafe rehandshaking
6574  *
6575  * When to allow rehandshaking. See
6576  * g_tls_connection_set_rehandshake_mode().
6577  *
6578  * Since: 2.28
6579  */
6580
6581
6582 /**
6583  * GTlsServerConnection:
6584  *
6585  * TLS server-side connection. This is the server-side implementation
6586  * of a #GTlsConnection.
6587  *
6588  * Since: 2.28
6589  */
6590
6591
6592 /**
6593  * GTlsServerConnection:authentication-mode:
6594  *
6595  * The #GTlsAuthenticationMode for the server. This can be changed
6596  * before calling g_tls_connection_handshake() if you want to
6597  * rehandshake with a different mode from the initial handshake.
6598  *
6599  * Since: 2.28
6600  */
6601
6602
6603 /**
6604  * GToggleNotify:
6605  * @data: Callback data passed to g_object_add_toggle_ref()
6606  * @object: The object on which g_object_add_toggle_ref() was called.
6607  * @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.
6608  *
6609  * A callback function used for notification when the state
6610  * of a toggle reference changes. See g_object_add_toggle_ref().
6611  */
6612
6613
6614 /**
6615  * GTranslateFunc:
6616  * @str: the untranslated string
6617  * @data: user data specified when installing the function, e.g. in g_option_group_set_translate_func()
6618  *
6619  * The type of functions which are used to translate user-visible
6620  * strings, for <option>--help</option> output.
6621  *
6622  * The returned string is owned by GLib and must not be freed.
6623  *
6624  * Returns: a translation of the string for the current locale.
6625  */
6626
6627
6628 /**
6629  * GType:
6630  *
6631  * A numerical value which represents the unique identifier of a registered
6632  * type.
6633  */
6634
6635
6636 /**
6637  * GTypeClass:
6638  *
6639  * An opaque structure used as the base of all classes.
6640  */
6641
6642
6643 /**
6644  * GTypeClassCacheFunc:
6645  * @cache_data: data that was given to the g_type_add_class_cache_func() call
6646  * @g_class: The #GTypeClass structure which is unreferenced
6647  *
6648  * A callback function which is called when the reference count of a class
6649  * drops to zero. It may use g_type_class_ref() to prevent the class from
6650  * being freed. You should not call g_type_class_unref() from a
6651  * #GTypeClassCacheFunc function to prevent infinite recursion, use
6652  * g_type_class_unref_uncached() instead.
6653  *
6654  * The functions have to check the class id passed in to figure
6655  * whether they actually want to cache the class of this type, since all
6656  * classes are routed through the same #GTypeClassCacheFunc chain.
6657  *
6658  * called, %FALSE to continue.
6659  *
6660  * Returns: %TRUE to stop further #GTypeClassCacheFunc<!-- -->s from being
6661  */
6662
6663
6664 /**
6665  * GTypeDebugFlags:
6666  * @G_TYPE_DEBUG_NONE: Print no messages.
6667  * @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping.
6668  * @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions.
6669  * @G_TYPE_DEBUG_MASK: Mask covering all debug flags.
6670  *
6671  * The <type>GTypeDebugFlags</type> enumeration values can be passed to
6672  * g_type_init_with_debug_flags() to trigger debugging messages during runtime.
6673  * Note that the messages can also be triggered by setting the
6674  * <envar>GOBJECT_DEBUG</envar> environment variable to a ':'-separated list of
6675  * "objects" and "signals".
6676  */
6677
6678
6679 /**
6680  * GTypeFlags:
6681  * @G_TYPE_FLAG_ABSTRACT: Indicates an abstract type. No instances can be created for an abstract type.
6682  * @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().
6683  *
6684  * Bit masks used to check or determine characteristics of a type.
6685  */
6686
6687
6688 /**
6689  * GTypeFundamentalFlags:
6690  * @G_TYPE_FLAG_CLASSED: Indicates a classed type.
6691  * @G_TYPE_FLAG_INSTANTIATABLE: Indicates an instantiable type (implies classed).
6692  * @G_TYPE_FLAG_DERIVABLE: Indicates a flat derivable type.
6693  * @G_TYPE_FLAG_DEEP_DERIVABLE: Indicates a deep derivable type (implies derivable).
6694  *
6695  * Bit masks used to check or determine specific characteristics of a
6696  * fundamental type.
6697  */
6698
6699
6700 /**
6701  * GTypeFundamentalInfo:
6702  * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type
6703  *
6704  * A structure that provides information to the type system which is
6705  * used specifically for managing fundamental types.
6706  */
6707
6708
6709 /**
6710  * GTypeInfo:
6711  * @class_size: Size of the class structure (required for interface, classed and instantiatable types).
6712  * @base_init: Location of the base initialization function (optional).
6713  * @base_finalize: Location of the base finalization function (optional).
6714  * @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.
6715  * @class_finalize: Location of the class finalization function for classed and instantiatable types. Location fo the default vtable finalization function for interface types. (optional)
6716  * @class_data: User-supplied data passed to the class init/finalize functions.
6717  * @instance_size: Size of the instance (object) structure (required for instantiatable types only).
6718  * @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.
6719  * @instance_init: Location of the instance initialization function (optional, for instantiatable types only).
6720  * @value_table: A #GTypeValueTable function table for generic handling of GValues of this type (usually only useful for fundamental types).
6721  *
6722  * This structure is used to provide the type system with the information
6723  * required to initialize and destruct (finalize) a type's class and
6724  * its instances.
6725  * The initialized structure is passed to the g_type_register_static() function
6726  * (or is copied into the provided #GTypeInfo structure in the
6727  * g_type_plugin_complete_type_info()). The type system will perform a deep
6728  * copy of this structure, so its memory does not need to be persistent
6729  * across invocation of g_type_register_static().
6730  */
6731
6732
6733 /**
6734  * GTypeInstance:
6735  *
6736  * An opaque structure used as the base of all type instances.
6737  */
6738
6739
6740 /**
6741  * GTypeInterface:
6742  *
6743  * An opaque structure used as the base of all interface types.
6744  */
6745
6746
6747 /**
6748  * GTypeInterfaceCheckFunc:
6749  * @check_data: data passed to g_type_add_interface_check().
6750  * @g_iface: the interface that has been initialized
6751  *
6752  * A callback called after an interface vtable is initialized.
6753  * See g_type_add_interface_check().
6754  *
6755  * Since: 2.4
6756  */
6757
6758
6759 /**
6760  * GTypeModule:
6761  * @name: the name of the module
6762  *
6763  * The members of the <structname>GTypeModule</structname> structure should not
6764  * be accessed directly, except for the @name field.
6765  */
6766
6767
6768 /**
6769  * GTypeModuleClass:
6770  * @parent_class: the parent class
6771  * @load: loads the module and registers one or more types using g_type_module_register_type().
6772  * @unload: unloads the module
6773  *
6774  * In order to implement dynamic loading of types based on #GTypeModule,
6775  * the @load and @unload functions in #GTypeModuleClass must be implemented.
6776  */
6777
6778
6779 /**
6780  * GTypePlugin:
6781  *
6782  * The <structname>GTypePlugin</structname> typedef is used as a placeholder
6783  * for objects that implement the <structname>GTypePlugin</structname>
6784  * interface.
6785  */
6786
6787
6788 /**
6789  * GTypePluginClass:
6790  * @use_plugin: Increases the use count of the plugin.
6791  * @unuse_plugin: Decreases the use count of the plugin.
6792  * @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.
6793  * @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.
6794  *
6795  * The #GTypePlugin interface is used by the type system in order to handle
6796  * the lifecycle of dynamically loaded types.
6797  */
6798
6799
6800 /**
6801  * GTypePluginCompleteInterfaceInfo:
6802  * @plugin: the #GTypePlugin
6803  * @instance_type: the #GType of an instantiable type to which the interface is added
6804  * @interface_type: the #GType of the interface whose info is completed
6805  * @info: the #GInterfaceInfo to fill in
6806  *
6807  * The type of the @complete_interface_info function of #GTypePluginClass.
6808  */
6809
6810
6811 /**
6812  * GTypePluginCompleteTypeInfo:
6813  * @plugin: the #GTypePlugin
6814  * @g_type: the #GType whose info is completed
6815  * @info: the #GTypeInfo struct to fill in
6816  * @value_table: the #GTypeValueTable to fill in
6817  *
6818  * The type of the @complete_type_info function of #GTypePluginClass.
6819  */
6820
6821
6822 /**
6823  * GTypePluginUnuse:
6824  * @plugin: the #GTypePlugin whose use count should be decreased
6825  *
6826  * The type of the @unuse_plugin function of #GTypePluginClass.
6827  */
6828
6829
6830 /**
6831  * GTypePluginUse:
6832  * @plugin: the #GTypePlugin whose use count should be increased
6833  *
6834  * The type of the @use_plugin function of #GTypePluginClass, which gets called
6835  * to increase the use count of @plugin.
6836  */
6837
6838
6839 /**
6840  * GTypeQuery:
6841  * @type: the #GType value of the type.
6842  * @type_name: the name of the type.
6843  * @class_size: the size of the class structure.
6844  * @instance_size: the size of the instance structure.
6845  *
6846  * A structure holding information for a specific type. It is
6847  * filled in by the g_type_query() function.
6848  */
6849
6850
6851 /**
6852  * GTypeValueTable:
6853  * @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 (""); ]|
6854  * @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); ]|
6855  * @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 @src_value into @dest_value in a way, that even after @src_value has been freed, the contents of @dest_value remain valid. String type example: |[ dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); ]|
6856  * @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; ]|
6857  * @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'.
6858  * @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 @value similar to value_init(); e.g. for a string value that 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. @n_collect_values is exactly the string length of @collect_format, and @collect_values is an array of unions #GTypeCValue with length @n_collect_values, containing the collected values according to @collect_format. @collect_flags is an argument provided as a hint by the caller. 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.
6859  * @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.
6860  * @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. @n_collect_values equals the string length of @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; ]|
6861  *
6862  * The #GTypeValueTable provides the functions required by the #GValue implementation,
6863  * to serve as a container for values of a type.
6864  */
6865
6866
6867 /**
6868  * GUnicodeBreakType:
6869  * @G_UNICODE_BREAK_MANDATORY: Mandatory Break (BK)
6870  * @G_UNICODE_BREAK_CARRIAGE_RETURN: Carriage Return (CR)
6871  * @G_UNICODE_BREAK_LINE_FEED: Line Feed (LF)
6872  * @G_UNICODE_BREAK_COMBINING_MARK: Attached Characters and Combining Marks (CM)
6873  * @G_UNICODE_BREAK_SURROGATE: Surrogates (SG)
6874  * @G_UNICODE_BREAK_ZERO_WIDTH_SPACE: Zero Width Space (ZW)
6875  * @G_UNICODE_BREAK_INSEPARABLE: Inseparable (IN)
6876  * @G_UNICODE_BREAK_NON_BREAKING_GLUE: Non-breaking ("Glue") (GL)
6877  * @G_UNICODE_BREAK_CONTINGENT: Contingent Break Opportunity (CB)
6878  * @G_UNICODE_BREAK_SPACE: Space (SP)
6879  * @G_UNICODE_BREAK_AFTER: Break Opportunity After (BA)
6880  * @G_UNICODE_BREAK_BEFORE: Break Opportunity Before (BB)
6881  * @G_UNICODE_BREAK_BEFORE_AND_AFTER: Break Opportunity Before and After (B2)
6882  * @G_UNICODE_BREAK_HYPHEN: Hyphen (HY)
6883  * @G_UNICODE_BREAK_NON_STARTER: Nonstarter (NS)
6884  * @G_UNICODE_BREAK_OPEN_PUNCTUATION: Opening Punctuation (OP)
6885  * @G_UNICODE_BREAK_CLOSE_PUNCTUATION: Closing Punctuation (CL)
6886  * @G_UNICODE_BREAK_QUOTATION: Ambiguous Quotation (QU)
6887  * @G_UNICODE_BREAK_EXCLAMATION: Exclamation/Interrogation (EX)
6888  * @G_UNICODE_BREAK_IDEOGRAPHIC: Ideographic (ID)
6889  * @G_UNICODE_BREAK_NUMERIC: Numeric (NU)
6890  * @G_UNICODE_BREAK_INFIX_SEPARATOR: Infix Separator (Numeric) (IS)
6891  * @G_UNICODE_BREAK_SYMBOL: Symbols Allowing Break After (SY)
6892  * @G_UNICODE_BREAK_ALPHABETIC: Ordinary Alphabetic and Symbol Characters (AL)
6893  * @G_UNICODE_BREAK_PREFIX: Prefix (Numeric) (PR)
6894  * @G_UNICODE_BREAK_POSTFIX: Postfix (Numeric) (PO)
6895  * @G_UNICODE_BREAK_COMPLEX_CONTEXT: Complex Content Dependent (South East Asian) (SA)
6896  * @G_UNICODE_BREAK_AMBIGUOUS: Ambiguous (Alphabetic or Ideographic) (AI)
6897  * @G_UNICODE_BREAK_UNKNOWN: Unknown (XX)
6898  * @G_UNICODE_BREAK_NEXT_LINE: Next Line (NL)
6899  * @G_UNICODE_BREAK_WORD_JOINER: Word Joiner (WJ)
6900  * @G_UNICODE_BREAK_HANGUL_L_JAMO: Hangul L Jamo (JL)
6901  * @G_UNICODE_BREAK_HANGUL_V_JAMO: Hangul V Jamo (JV)
6902  * @G_UNICODE_BREAK_HANGUL_T_JAMO: Hangul T Jamo (JT)
6903  * @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2)
6904  * @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3)
6905  * @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28
6906  *
6907  * These are the possible line break classifications.
6908  *
6909  * The five Hangul types were added in Unicode 4.1, so, has been
6910  * introduced in GLib 2.10. Note that new types may be added in the future.
6911  * Applications should be ready to handle unknown values.
6912  * They may be regarded as %G_UNICODE_BREAK_UNKNOWN.
6913  *
6914  * See <ulink url="http://www.unicode.org/unicode/reports/tr14/">http://www.unicode.org/unicode/reports/tr14/</ulink>.
6915  */
6916
6917
6918 /**
6919  * GUnicodeScript:
6920  * @G_UNICODE_SCRIPT_COMMON: a character used by multiple different scripts
6921  * @G_UNICODE_SCRIPT_INHERITED: a mark glyph that takes its script from the i                             base glyph to which it is attached
6922  * @G_UNICODE_SCRIPT_ARABIC: Arabic
6923  * @G_UNICODE_SCRIPT_ARMENIAN: Armenian
6924  * @G_UNICODE_SCRIPT_BENGALI: Bengali
6925  * @G_UNICODE_SCRIPT_BOPOMOFO: Bopomofo
6926  * @G_UNICODE_SCRIPT_CHEROKEE: Cherokee
6927  * @G_UNICODE_SCRIPT_COPTIC: Coptic
6928  * @G_UNICODE_SCRIPT_CYRILLIC: Cyrillic
6929  * @G_UNICODE_SCRIPT_DESERET: Deseret
6930  * @G_UNICODE_SCRIPT_DEVANAGARI: Devanagari
6931  * @G_UNICODE_SCRIPT_ETHIOPIC: Ethiopic
6932  * @G_UNICODE_SCRIPT_GEORGIAN: Georgian
6933  * @G_UNICODE_SCRIPT_GOTHIC: Gothic
6934  * @G_UNICODE_SCRIPT_GREEK: Greek
6935  * @G_UNICODE_SCRIPT_GUJARATI: Gujarati
6936  * @G_UNICODE_SCRIPT_GURMUKHI: Gurmukhi
6937  * @G_UNICODE_SCRIPT_HAN: Han
6938  * @G_UNICODE_SCRIPT_HANGUL: Hangul
6939  * @G_UNICODE_SCRIPT_HEBREW: Hebrew
6940  * @G_UNICODE_SCRIPT_HIRAGANA: Hiragana
6941  * @G_UNICODE_SCRIPT_KANNADA: Kannada
6942  * @G_UNICODE_SCRIPT_KATAKANA: Katakana
6943  * @G_UNICODE_SCRIPT_KHMER: Khmer
6944  * @G_UNICODE_SCRIPT_LAO: Lao
6945  * @G_UNICODE_SCRIPT_LATIN: Latin
6946  * @G_UNICODE_SCRIPT_MALAYALAM: Malayalam
6947  * @G_UNICODE_SCRIPT_MONGOLIAN: Mongolian
6948  * @G_UNICODE_SCRIPT_MYANMAR: Myanmar
6949  * @G_UNICODE_SCRIPT_OGHAM: Ogham
6950  * @G_UNICODE_SCRIPT_OLD_ITALIC: Old Italic
6951  * @G_UNICODE_SCRIPT_ORIYA: Oriya
6952  * @G_UNICODE_SCRIPT_RUNIC: Runic
6953  * @G_UNICODE_SCRIPT_SINHALA: Sinhala
6954  * @G_UNICODE_SCRIPT_SYRIAC: Syriac
6955  * @G_UNICODE_SCRIPT_TAMIL: Tamil
6956  * @G_UNICODE_SCRIPT_TELUGU: Telugu
6957  * @G_UNICODE_SCRIPT_THAANA: Thaana
6958  * @G_UNICODE_SCRIPT_THAI: Thai
6959  * @G_UNICODE_SCRIPT_TIBETAN: Tibetan Canadian Aboriginal
6960  * @G_UNICODE_SCRIPT_YI: Yi
6961  * @G_UNICODE_SCRIPT_TAGALOG: Tagalog
6962  * @G_UNICODE_SCRIPT_HANUNOO: Hanunoo
6963  * @G_UNICODE_SCRIPT_BUHID: Buhid
6964  * @G_UNICODE_SCRIPT_TAGBANWA: Tagbanwa
6965  * @G_UNICODE_SCRIPT_BRAILLE: Braille
6966  * @G_UNICODE_SCRIPT_CYPRIOT: Cypriot
6967  * @G_UNICODE_SCRIPT_LIMBU: Limbu
6968  * @G_UNICODE_SCRIPT_OSMANYA: Osmanya
6969  * @G_UNICODE_SCRIPT_SHAVIAN: Shavian
6970  * @G_UNICODE_SCRIPT_LINEAR_B: Linear B
6971  * @G_UNICODE_SCRIPT_TAI_LE: Tai Le
6972  * @G_UNICODE_SCRIPT_UGARITIC: Ugaritic New Tai Lue
6973  * @G_UNICODE_SCRIPT_BUGINESE: Buginese
6974  * @G_UNICODE_SCRIPT_GLAGOLITIC: Glagolitic
6975  * @G_UNICODE_SCRIPT_TIFINAGH: Tifinagh Syloti Nagri Old Persian
6976  * @G_UNICODE_SCRIPT_KHAROSHTHI: Kharoshthi
6977  * @G_UNICODE_SCRIPT_UNKNOWN: an unassigned code point
6978  * @G_UNICODE_SCRIPT_BALINESE: Balinese
6979  * @G_UNICODE_SCRIPT_CUNEIFORM: Cuneiform
6980  * @G_UNICODE_SCRIPT_PHOENICIAN: Phoenician
6981  * @G_UNICODE_SCRIPT_PHAGS_PA: Phags-pa
6982  * @G_UNICODE_SCRIPT_NKO: N'Ko
6983  * @G_UNICODE_SCRIPT_KAYAH_LI: Kayah Li. Since 2.16.3
6984  * @G_UNICODE_SCRIPT_LEPCHA: Lepcha. Since 2.16.3
6985  * @G_UNICODE_SCRIPT_REJANG: Rejang. Since 2.16.3
6986  * @G_UNICODE_SCRIPT_SUNDANESE: Sundanese. Since 2.16.3
6987  * @G_UNICODE_SCRIPT_SAURASHTRA: Saurashtra. Since 2.16.3
6988  * @G_UNICODE_SCRIPT_CHAM: Cham. Since 2.16.3
6989  * @G_UNICODE_SCRIPT_OL_CHIKI: Ol Chiki. Since 2.16.3
6990  * @G_UNICODE_SCRIPT_VAI: Vai. Since 2.16.3
6991  * @G_UNICODE_SCRIPT_CARIAN: Carian. Since 2.16.3
6992  * @G_UNICODE_SCRIPT_LYCIAN: Lycian. Since 2.16.3
6993  * @G_UNICODE_SCRIPT_LYDIAN: Lydian. Since 2.16.3
6994  * @G_UNICODE_SCRIPT_AVESTAN: Avestan. Since 2.26
6995  * @G_UNICODE_SCRIPT_BAMUM: Bamum. Since 2.26 Egyptian Hieroglpyhs. Since 2.26 Imperial Aramaic. Since 2.26 Inscriptional Pahlavi. Since 2.26 Inscriptional Parthian. Since 2.26
6996  * @G_UNICODE_SCRIPT_JAVANESE: Javanese. Since 2.26
6997  * @G_UNICODE_SCRIPT_KAITHI: Kaithi. Since 2.26
6998  * @G_UNICODE_SCRIPT_LISU: Lisu. Since 2.26 Meetei Mayek. Since 2.26 Old South Arabian. Since 2.26
6999  * @G_UNICODE_SCRIPT_OLD_TURKIC: Old Turkic. Since 2.28
7000  * @G_UNICODE_SCRIPT_SAMARITAN: Samaritan. Since 2.26
7001  * @G_UNICODE_SCRIPT_TAI_THAM: Tai Tham. Since 2.26
7002  * @G_UNICODE_SCRIPT_TAI_VIET: Tai Viet. Since 2.26
7003  * @G_UNICODE_SCRIPT_BATAK: Batak. Since 2.28
7004  * @G_UNICODE_SCRIPT_BRAHMI: Brahmi. Since 2.28
7005  * @G_UNICODE_SCRIPT_MANDAIC: Mandaic. Since 2.28
7006  *
7007  * The #GUnicodeScript enumeration identifies different writing
7008  * systems. The values correspond to the names as defined in the
7009  * Unicode standard. The enumeration has been added in GLib 2.14,
7010  * and is interchangeable with #PangoScript.
7011  *
7012  * Note that new types may be added in the future. Applications
7013  * should be ready to handle unknown values.
7014  * See <ulink
7015  * url="http://www.unicode.org/reports/tr24/">Unicode Standard Annex
7016  * #24: Script names</ulink>.
7017  */
7018
7019
7020 /**
7021  * GUnicodeType:
7022  * @G_UNICODE_CONTROL: General category "Other, Control" (Cc)
7023  * @G_UNICODE_FORMAT: General category "Other, Format" (Cf)
7024  * @G_UNICODE_UNASSIGNED: General category "Other, Not Assigned" (Cn)
7025  * @G_UNICODE_PRIVATE_USE: General category "Other, Private Use" (Co)
7026  * @G_UNICODE_SURROGATE: General category "Other, Surrogate" (Cs)
7027  * @G_UNICODE_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll)
7028  * @G_UNICODE_MODIFIER_LETTER: General category "Letter, Modifier" (Lm)
7029  * @G_UNICODE_OTHER_LETTER: General category "Letter, Other" (Lo)
7030  * @G_UNICODE_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt)
7031  * @G_UNICODE_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu)
7032  * @G_UNICODE_SPACING_MARK: General category "Mark, Spacing" (Mc)
7033  * @G_UNICODE_ENCLOSING_MARK: General category "Mark, Enclosing" (Me)
7034  * @G_UNICODE_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn)
7035  * @G_UNICODE_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd)
7036  * @G_UNICODE_LETTER_NUMBER: General category "Number, Letter" (Nl)
7037  * @G_UNICODE_OTHER_NUMBER: General category "Number, Other" (No)
7038  * @G_UNICODE_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc)
7039  * @G_UNICODE_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd)
7040  * @G_UNICODE_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe)
7041  * @G_UNICODE_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf)
7042  * @G_UNICODE_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi)
7043  * @G_UNICODE_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po)
7044  * @G_UNICODE_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps)
7045  * @G_UNICODE_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc)
7046  * @G_UNICODE_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk)
7047  * @G_UNICODE_MATH_SYMBOL: General category "Symbol, Math" (Sm)
7048  * @G_UNICODE_OTHER_SYMBOL: General category "Symbol, Other" (So)
7049  * @G_UNICODE_LINE_SEPARATOR: General category "Separator, Line" (Zl)
7050  * @G_UNICODE_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp)
7051  * @G_UNICODE_SPACE_SEPARATOR: General category "Separator, Space" (Zs)
7052  *
7053  * These are the possible character classifications from the
7054  * Unicode specification.
7055  * See <ulink url="http://www.unicode.org/Public/UNIDATA/UnicodeData.html">http://www.unicode.org/Public/UNIDATA/UnicodeData.html</ulink>.
7056  */
7057
7058
7059 /**
7060  * GUnixCredentialsMessage:credentials:
7061  *
7062  * The credentials stored in the message.
7063  *
7064  * Since: 2.26
7065  */
7066
7067
7068 /**
7069  * GUnixInputStream:close-fd:
7070  *
7071  * Whether to close the file descriptor when the stream is closed.
7072  *
7073  * Since: 2.20
7074  */
7075
7076
7077 /**
7078  * GUnixInputStream:fd:
7079  *
7080  * The file descriptor that the stream reads from.
7081  *
7082  * Since: 2.20
7083  */
7084
7085
7086 /**
7087  * GUnixMountMonitor::mountpoints-changed:
7088  * @monitor: the object on which the signal is emitted
7089  *
7090  * Emitted when the unix mount points have changed.
7091  */
7092
7093
7094 /**
7095  * GUnixMountMonitor::mounts-changed:
7096  * @monitor: the object on which the signal is emitted
7097  *
7098  * Emitted when the unix mounts have changed.
7099  */
7100
7101
7102 /**
7103  * GUnixOutputStream:close-fd:
7104  *
7105  * Whether to close the file descriptor when the stream is closed.
7106  *
7107  * Since: 2.20
7108  */
7109
7110
7111 /**
7112  * GUnixOutputStream:fd:
7113  *
7114  * The file descriptor that the stream writes to.
7115  *
7116  * Since: 2.20
7117  */
7118
7119
7120 /**
7121  * GUnixSocketAddress:
7122  *
7123  * A UNIX-domain (local) socket address, corresponding to a
7124  * <type>struct sockaddr_un</type>.
7125  */
7126
7127
7128 /**
7129  * GUnixSocketAddress:abstract:
7130  *
7131  * Whether or not this is an abstract address
7132  *
7133  * distinguishes between zero-padded and non-zero-padded
7134  * abstract addresses.
7135  *
7136  * Deprecated: Use #GUnixSocketAddress:address-type, which
7137  */
7138
7139
7140 /**
7141  * GUnixSocketAddressType:
7142  * @G_UNIX_SOCKET_ADDRESS_INVALID: invalid
7143  * @G_UNIX_SOCKET_ADDRESS_ANONYMOUS: anonymous
7144  * @G_UNIX_SOCKET_ADDRESS_PATH: a filesystem path
7145  * @G_UNIX_SOCKET_ADDRESS_ABSTRACT: an abstract name
7146  * @G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED: an abstract name, 0-padded to the full length of a unix socket name
7147  *
7148  * The type of name used by a #GUnixSocketAddress.
7149  * %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain
7150  * socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS
7151  * indicates a socket not bound to any name (eg, a client-side socket,
7152  * or a socket created with socketpair()).
7153  *
7154  * For abstract sockets, there are two incompatible ways of naming
7155  * them; the man pages suggest using the entire <literal>struct
7156  * sockaddr_un</literal> as the name, padding the unused parts of the
7157  * %sun_path field with zeroes; this corresponds to
7158  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED. However, many programs
7159  * instead just use a portion of %sun_path, and pass an appropriate
7160  * smaller length to bind() or connect(). This is
7161  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT.
7162  *
7163  * Since: 2.26
7164  */
7165
7166
7167 /**
7168  * GUserDirectory:
7169  * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory
7170  * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory
7171  * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory
7172  * @G_USER_DIRECTORY_MUSIC: the user's Music directory
7173  * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory
7174  * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory
7175  * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory
7176  * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory
7177  * @G_USER_N_DIRECTORIES: the number of enum values
7178  *
7179  * These are logical ids for special directories which are defined
7180  * depending on the platform used. You should use g_get_user_special_dir()
7181  * to retrieve the full path associated to the logical id.
7182  *
7183  * The #GUserDirectory enumeration can be extended at later date. Not
7184  * every platform has a directory for every logical id in this
7185  * enumeration.
7186  *
7187  * Since: 2.14
7188  */
7189
7190
7191 /**
7192  * GValue:
7193  *
7194  * An opaque structure used to hold different types of values.
7195  * The data within the structure has protected scope: it is accessible only
7196  * to functions within a #GTypeValueTable structure, or implementations of
7197  * the g_value_*() API. That is, code portions which implement new fundamental
7198  * types.
7199  * #GValue users cannot make any assumptions about how data is stored
7200  * within the 2 element @data union, and the @g_type member should
7201  * only be accessed through the G_VALUE_TYPE() macro.
7202  */
7203
7204
7205 /**
7206  * GValueArray:
7207  * @n_values: number of values contained in the array
7208  * @values: array of values
7209  *
7210  * A #GValueArray contains an array of #GValue elements.
7211  */
7212
7213
7214 /**
7215  * GValueTransform:
7216  * @src_value: Source value.
7217  * @dest_value: Target value.
7218  *
7219  * The type of value transformation functions which can be registered with
7220  * g_value_register_transform_func().
7221  */
7222
7223
7224 /**
7225  * GVariantType:
7226  *
7227  * A type in the GVariant type system.
7228  *
7229  * Two types may not be compared by value; use g_variant_type_equal() or
7230  * g_variant_type_is_subtype_of().  May be copied using
7231  * g_variant_type_copy() and freed using g_variant_type_free().
7232  */
7233
7234
7235 /**
7236  * GVfs:
7237  *
7238  * Virtual File System object.
7239  */
7240
7241
7242 /**
7243  * GVoidFunc:
7244  *
7245  * Declares a type of function which takes no arguments
7246  * and has no return value. It is used to specify the type
7247  * function passed to g_atexit().
7248  */
7249
7250
7251 /**
7252  * GVolume:
7253  *
7254  * Opaque mountable volume object.
7255  */
7256
7257
7258 /**
7259  * GVolume::changed:
7260  *
7261  * Emitted when the volume has been changed.
7262  */
7263
7264
7265 /**
7266  * GVolume::removed:
7267  *
7268  * This signal is emitted when the #GVolume have been removed. If
7269  * the recipient is holding references to the object they should
7270  * release them so the object can be finalized.
7271  */
7272
7273
7274 /**
7275  * GVolumeIface:
7276  * @g_iface: The parent interface.
7277  * @changed: Changed signal that is emitted when the volume's state has changed.
7278  * @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.
7279  * @get_name: Gets a string containing the name of the #GVolume.
7280  * @get_icon: Gets a #GIcon for the #GVolume.
7281  * @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.
7282  * @get_drive: Gets a #GDrive the volume is located on. Returns %NULL if the #GVolume is not associated with a #GDrive.
7283  * @get_mount: Gets a #GMount representing the mounted volume. Returns %NULL if the #GVolume is not mounted.
7284  * @can_mount: Returns %TRUE if the #GVolume can be mounted.
7285  * @can_eject: Checks if a #GVolume can be ejected.
7286  * @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.
7287  * @mount_finish: Finishes a mount operation.
7288  * @eject: Ejects a given #GVolume.
7289  * @eject_finish: Finishes an eject operation.
7290  * @get_identifier: Returns the <link linkend="volume-identifier">identifier</link> of the given kind, or %NULL if the #GVolume doesn't have one.
7291  * @enumerate_identifiers: Returns an array strings listing the kinds of <link linkend="volume-identifier">identifiers</link> which the #GVolume has.
7292  * @should_automount: Returns %TRUE if the #GVolume should be automatically mounted.
7293  * @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if it is not known.
7294  * @eject_with_operation: Starts ejecting a #GVolume using a #GMountOperation. Since 2.22.
7295  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
7296  *
7297  * Interface for implementing operations for mountable volumes.
7298  */
7299
7300
7301 /**
7302  * GVolumeMonitor:
7303  *
7304  * A Volume Monitor that watches for volume events.
7305  */
7306
7307
7308 /**
7309  * GVolumeMonitor::drive-changed:
7310  * @volume_monitor: The volume monitor emitting the signal.
7311  * @drive: the drive that changed
7312  *
7313  * Emitted when a drive changes.
7314  */
7315
7316
7317 /**
7318  * GVolumeMonitor::drive-connected:
7319  * @volume_monitor: The volume monitor emitting the signal.
7320  * @drive: a #GDrive that was connected.
7321  *
7322  * Emitted when a drive is connected to the system.
7323  */
7324
7325
7326 /**
7327  * GVolumeMonitor::drive-disconnected:
7328  * @volume_monitor: The volume monitor emitting the signal.
7329  * @drive: a #GDrive that was disconnected.
7330  *
7331  * Emitted when a drive is disconnected from the system.
7332  */
7333
7334
7335 /**
7336  * GVolumeMonitor::drive-eject-button:
7337  * @volume_monitor: The volume monitor emitting the signal.
7338  * @drive: the drive where the eject button was pressed
7339  *
7340  * Emitted when the eject button is pressed on @drive.
7341  *
7342  * Since: 2.18
7343  */
7344
7345
7346 /**
7347  * GVolumeMonitor::drive-stop-button:
7348  * @volume_monitor: The volume monitor emitting the signal.
7349  * @drive: the drive where the stop button was pressed
7350  *
7351  * Emitted when the stop button is pressed on @drive.
7352  *
7353  * Since: 2.22
7354  */
7355
7356
7357 /**
7358  * GVolumeMonitor::mount-added:
7359  * @volume_monitor: The volume monitor emitting the signal.
7360  * @mount: a #GMount that was added.
7361  *
7362  * Emitted when a mount is added.
7363  */
7364
7365
7366 /**
7367  * GVolumeMonitor::mount-changed:
7368  * @volume_monitor: The volume monitor emitting the signal.
7369  * @mount: a #GMount that changed.
7370  *
7371  * Emitted when a mount changes.
7372  */
7373
7374
7375 /**
7376  * GVolumeMonitor::mount-pre-unmount:
7377  * @volume_monitor: The volume monitor emitting the signal.
7378  * @mount: a #GMount that is being unmounted.
7379  *
7380  * Emitted when a mount is about to be removed.
7381  */
7382
7383
7384 /**
7385  * GVolumeMonitor::mount-removed:
7386  * @volume_monitor: The volume monitor emitting the signal.
7387  * @mount: a #GMount that was removed.
7388  *
7389  * Emitted when a mount is removed.
7390  */
7391
7392
7393 /**
7394  * GVolumeMonitor::volume-added:
7395  * @volume_monitor: The volume monitor emitting the signal.
7396  * @volume: a #GVolume that was added.
7397  *
7398  * Emitted when a mountable volume is added to the system.
7399  */
7400
7401
7402 /**
7403  * GVolumeMonitor::volume-changed:
7404  * @volume_monitor: The volume monitor emitting the signal.
7405  * @volume: a #GVolume that changed.
7406  *
7407  * Emitted when mountable volume is changed.
7408  */
7409
7410
7411 /**
7412  * GVolumeMonitor::volume-removed:
7413  * @volume_monitor: The volume monitor emitting the signal.
7414  * @volume: a #GVolume that was removed.
7415  *
7416  * Emitted when a mountable volume is removed from the system.
7417  */
7418
7419
7420 /**
7421  * GWeakNotify:
7422  * @data: data that was provided when the weak reference was established
7423  * @where_the_object_was: the object being finalized
7424  *
7425  * A #GWeakNotify function can be added to an object as a callback that gets
7426  * triggered when the object is finalized. Since the object is already being
7427  * finalized when the #GWeakNotify is called, there's not much you could do
7428  * with the object, apart from e.g. using its adress as hash-index or the like.
7429  */
7430
7431
7432 /**
7433  * GWin32InputStream:close-handle:
7434  *
7435  * Whether to close the file handle when the stream is closed.
7436  *
7437  * Since: 2.26
7438  */
7439
7440
7441 /**
7442  * GWin32InputStream:handle:
7443  *
7444  * The handle that the stream reads from.
7445  *
7446  * Since: 2.26
7447  */
7448
7449
7450 /**
7451  * GWin32OutputStream:close-handle:
7452  *
7453  * Whether to close the file handle when the stream is closed.
7454  *
7455  * Since: 2.26
7456  */
7457
7458
7459 /**
7460  * GWin32OutputStream:handle:
7461  *
7462  * The file handle that the stream writes to.
7463  *
7464  * Since: 2.26
7465  */
7466
7467
7468 /**
7469  * GZlibCompressor:
7470  *
7471  * Zlib decompression
7472  */
7473
7474
7475 /**
7476  * GZlibCompressor:file-info:
7477  *
7478  * If set to a non-%NULL #GFileInfo object, and #GZlibCompressor:format is
7479  * %G_ZLIB_COMPRESSOR_FORMAT_GZIP, the compressor will write the file name
7480  * and modification time from the file info to the the GZIP header.
7481  *
7482  * Since: 2.26
7483  */
7484
7485
7486 /**
7487  * GZlibCompressorFormat:
7488  * @G_ZLIB_COMPRESSOR_FORMAT_ZLIB: deflate compression with zlib header
7489  * @G_ZLIB_COMPRESSOR_FORMAT_GZIP: gzip file format
7490  * @G_ZLIB_COMPRESSOR_FORMAT_RAW: deflate compression with no header
7491  *
7492  * Used to select the type of data format to use for #GZlibDecompressor
7493  * and #GZlibCompressor.
7494  *
7495  * Since: 2.24
7496  */
7497
7498
7499 /**
7500  * GZlibDecompressor:
7501  *
7502  * Zlib decompression
7503  */
7504
7505
7506 /**
7507  * GZlibDecompressor:file-info:
7508  *
7509  * A #GFileInfo containing the information found in the GZIP header
7510  * of the data stream processed, or %NULL if the header was not yet
7511  * fully processed, is not present at all, or the compressor's
7512  * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP.
7513  *
7514  * Since: 2.26
7515  */
7516
7517
7518 /**
7519  * G_BOOKMARK_FILE_ERROR:
7520  *
7521  * Error domain for bookmark file parsing.
7522  * Errors in this domain will be from the #GBookmarkFileError
7523  * enumeration. See #GError for information on error domains.
7524  */
7525
7526
7527 /**
7528  * G_BREAKPOINT:
7529  *
7530  * Inserts a breakpoint instruction into the code.
7531  *
7532  * On x86 and alpha systems this is implemented as a soft interrupt
7533  * and on other architectures it raises a %SIGTRAP signal.
7534  */
7535
7536
7537 /**
7538  * G_CALLBACK:
7539  * @f: a function pointer.
7540  *
7541  * Cast a function pointer to a #GCallback.
7542  */
7543
7544
7545 /**
7546  * G_CCLOSURE_SWAP_DATA:
7547  * @cclosure: a #GCClosure
7548  *
7549  * Checks whether the user data of the #GCClosure should be passed as the
7550  * first parameter to the callback. See g_cclosure_new_swap().
7551  *
7552  * Returns: %TRUE if data has to be swapped.
7553  */
7554
7555
7556 /**
7557  * G_CLOSURE_NEEDS_MARSHAL:
7558  * @closure: a #GClosure
7559  *
7560  * Check if the closure still needs a marshaller. See g_closure_set_marshal().
7561  *
7562  * @closure.
7563  *
7564  * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on
7565  */
7566
7567
7568 /**
7569  * G_CLOSURE_N_NOTIFIERS:
7570  * @cl: a #GClosure
7571  *
7572  * Get the total number of notifiers connected with the closure @cl.
7573  * The count includes the meta marshaller, the finalize and invalidate notifiers
7574  * and the marshal guards. Note that each guard counts as two notifiers.
7575  * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
7576  * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
7577  *
7578  * Returns: number of notifiers
7579  */
7580
7581
7582 /**
7583  * G_CONVERT_ERROR:
7584  *
7585  * Error domain for character set conversions. Errors in this domain will
7586  * be from the #GConvertError enumeration. See #GError for information on
7587  * error domains.
7588  */
7589
7590
7591 /**
7592  * G_DATALIST_FLAGS_MASK:
7593  *
7594  * A bitmask that restricts the possible flags passed to
7595  * g_datalist_set_flags(). Passing a flags value where
7596  * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.
7597  */
7598
7599
7600 /**
7601  * G_DBUS_ERROR:
7602  *
7603  * Error domain for errors generated by a remote message bus. Errors
7604  * in this domain will be from the #GDBusError enumeration.  See
7605  * #GError for more information on error domains.
7606  *
7607  * Note that errors in this error domain is intended only for
7608  * returning errors from a remote message bus process. Errors
7609  * generated locally in-process by e.g. #GDBusConnection is from the
7610  * %G_IO_ERROR domain.
7611  *
7612  * Since: 2.26
7613  */
7614
7615
7616 /**
7617  * G_DEFINE_ABSTRACT_TYPE:
7618  * @TN: The name of the new type, in Camel case.
7619  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
7620  * @T_P: The #GType of the parent type.
7621  *
7622  * A convenience macro for type implementations.
7623  * Similar to G_DEFINE_TYPE(), but defines an abstract type.
7624  * See G_DEFINE_TYPE_EXTENDED() for an example.
7625  *
7626  * Since: 2.4
7627  */
7628
7629
7630 /**
7631  * G_DEFINE_ABSTRACT_TYPE_WITH_CODE:
7632  * @TN: The name of the new type, in Camel case.
7633  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
7634  * @T_P: The #GType of the parent type.
7635  * @_C_: Custom code that gets inserted in the @type_name_get_type() function.
7636  *
7637  * A convenience macro for type implementations.
7638  * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows you to
7639  * insert custom code into the *_get_type() function, e.g. interface implementations
7640  * via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
7641  *
7642  * Since: 2.4
7643  */
7644
7645
7646 /**
7647  * G_DEFINE_BOXED_TYPE:
7648  * @TypeName: The name of the new type, in Camel case.
7649  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
7650  * @copy_func: the #GBoxedCopyFunc for the new type
7651  * @free_func: the #GBoxedFreeFunc for the new type
7652  *
7653  * A convenience macro for boxed type implementations, which defines a
7654  * type_name_get_type() function registering the boxed type.
7655  *
7656  * Since: 2.26
7657  */
7658
7659
7660 /**
7661  * G_DEFINE_BOXED_TYPE_WITH_CODE:
7662  * @TypeName: The name of the new type, in Camel case.
7663  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
7664  * @copy_func: the #GBoxedCopyFunc for the new type
7665  * @free_func: the #GBoxedFreeFunc for the new type
7666  * @_C_: Custom code that gets inserted in the *_get_type() function.
7667  *
7668  * A convenience macro for boxed type implementations.
7669  * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the
7670  * type_name_get_type() function, e.g. to register value transformations with
7671  * g_value_register_transform_func().
7672  *
7673  * Since: 2.26
7674  */
7675
7676
7677 /**
7678  * G_DEFINE_DYNAMIC_TYPE:
7679  * @TN: The name of the new type, in Camel case.
7680  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
7681  * @T_P: The #GType of the parent type.
7682  *
7683  * A convenience macro for dynamic type implementations, which declares a
7684  * class initialization function, an instance initialization function (see
7685  * #GTypeInfo for information about these) and a static variable named
7686  * @t_n<!-- -->_parent_class pointing to the parent class. Furthermore,
7687  * it defines a <function>*_get_type()</function> and a static
7688  * <function>*_register_type()</function> function for use in your
7689  * <function>module_init()</function>.
7690  * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.
7691  *
7692  * Since: 2.14
7693  */
7694
7695
7696 /**
7697  * G_DEFINE_DYNAMIC_TYPE_EXTENDED:
7698  * @TypeName: The name of the new type, in Camel case.
7699  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
7700  * @TYPE_PARENT: The #GType of the parent type.
7701  * @flags: #GTypeFlags to pass to g_type_module_register_type()
7702  * @CODE: Custom code that gets inserted in the *_get_type() function.
7703  *
7704  * A more general version of G_DEFINE_DYNAMIC_TYPE() which
7705  * allows to specify #GTypeFlags and custom code.
7706  *
7707  * |[
7708  * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
7709  * gtk_gadget,
7710  * GTK_TYPE_THING,
7711  * 0,
7712  * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO,
7713  * gtk_gadget_gizmo_init));
7714  * ]|
7715  * expands to
7716  * |[
7717  * static void     gtk_gadget_init              (GtkGadget      *self);
7718  * static void     gtk_gadget_class_init        (GtkGadgetClass *klass);
7719  * static void     gtk_gadget_class_finalize    (GtkGadgetClass *klass);
7720  *
7721  * static gpointer gtk_gadget_parent_class = NULL;
7722  * static GType    gtk_gadget_type_id = 0;
7723  *
7724  * static void     gtk_gadget_class_intern_init (gpointer klass)
7725  * {
7726  * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
7727  * gtk_gadget_class_init ((GtkGadgetClass*) klass);
7728  * }
7729  *
7730  * GType
7731  * gtk_gadget_get_type (void)
7732  * {
7733  * return gtk_gadget_type_id;
7734  * }
7735  *
7736  * static void
7737  * gtk_gadget_register_type (GTypeModule *type_module)
7738  * {
7739  * const GTypeInfo g_define_type_info = {
7740  * sizeof (GtkGadgetClass),
7741  * (GBaseInitFunc) NULL,
7742  * (GBaseFinalizeFunc) NULL,
7743  * (GClassInitFunc) gtk_gadget_class_intern_init,
7744  * (GClassFinalizeFunc) gtk_gadget_class_finalize,
7745  * NULL,   // class_data
7746  * sizeof (GtkGadget),
7747  * 0,      // n_preallocs
7748  * (GInstanceInitFunc) gtk_gadget_init,
7749  * NULL    // value_table
7750  * };
7751  * gtk_gadget_type_id = g_type_module_register_type (type_module,
7752  * GTK_TYPE_THING,
7753  * GtkGadget,
7754  * &g_define_type_info,
7755  * (GTypeFlags) flags);
7756  * {
7757  * const GInterfaceInfo g_implement_interface_info = {
7758  * (GInterfaceInitFunc) gtk_gadget_gizmo_init
7759  * };
7760  * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
7761  * }
7762  * }
7763  * ]|
7764  *
7765  * Since: 2.14
7766  */
7767
7768
7769 /**
7770  * G_DEFINE_INTERFACE:
7771  * @TN: The name of the new type, in Camel case.
7772  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
7773  * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
7774  *
7775  * A convenience macro for #GTypeInterface definitions, which declares
7776  * a default vtable initialization function and defines a *_get_type()
7777  * function.
7778  *
7779  * The macro expects the interface initialization function to have the
7780  * name <literal>t_n ## _default_init</literal>, and the interface
7781  * structure to have the name <literal>TN ## Interface</literal>.
7782  *
7783  * Since: 2.24
7784  */
7785
7786
7787 /**
7788  * G_DEFINE_INTERFACE_WITH_CODE:
7789  * @TN: The name of the new type, in Camel case.
7790  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
7791  * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
7792  * @_C_: Custom code that gets inserted in the *_get_type() function.
7793  *
7794  * A convenience macro for #GTypeInterface definitions. Similar to
7795  * G_DEFINE_INTERFACE(), but allows you to insert custom code into the
7796  * *_get_type() function, e.g. additional interface implementations
7797  * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See
7798  * G_DEFINE_TYPE_EXTENDED() for a similar example using
7799  * G_DEFINE_TYPE_WITH_CODE().
7800  *
7801  * Since: 2.24
7802  */
7803
7804
7805 /**
7806  * G_DEFINE_POINTER_TYPE:
7807  * @TypeName: The name of the new type, in Camel case.
7808  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
7809  *
7810  * A convenience macro for pointer type implementations, which defines a
7811  * type_name_get_type() function registering the pointer type.
7812  *
7813  * Since: 2.26
7814  */
7815
7816
7817 /**
7818  * G_DEFINE_POINTER_TYPE_WITH_CODE:
7819  * @TypeName: The name of the new type, in Camel case.
7820  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
7821  * @_C_: Custom code that gets inserted in the *_get_type() function.
7822  *
7823  * A convenience macro for pointer type implementations.
7824  * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert custom code into the
7825  * type_name_get_type() function.
7826  *
7827  * Since: 2.26
7828  */
7829
7830
7831 /**
7832  * G_DEFINE_TYPE:
7833  * @TN: The name of the new type, in Camel case.
7834  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
7835  * @T_P: The #GType of the parent type.
7836  *
7837  * A convenience macro for type implementations, which declares a
7838  * class initialization function, an instance initialization function (see #GTypeInfo for information about
7839  * these) and a static variable named @t_n<!-- -->_parent_class pointing to the parent class. Furthermore, it defines
7840  * a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() for an example.
7841  *
7842  * Since: 2.4
7843  */
7844
7845
7846 /**
7847  * G_DEFINE_TYPE_EXTENDED:
7848  * @TN: The name of the new type, in Camel case.
7849  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
7850  * @T_P: The #GType of the parent type.
7851  * @_f_: #GTypeFlags to pass to g_type_register_static()
7852  * @_C_: Custom code that gets inserted in the *_get_type() function.
7853  *
7854  * The most general convenience macro for type implementations, on which
7855  * G_DEFINE_TYPE(), etc are based.
7856  *
7857  * |[
7858  * G_DEFINE_TYPE_EXTENDED (GtkGadget,
7859  * gtk_gadget,
7860  * GTK_TYPE_WIDGET,
7861  * 0,
7862  * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
7863  * gtk_gadget_gizmo_init));
7864  * ]|
7865  * expands to
7866  * |[
7867  * static void     gtk_gadget_init       (GtkGadget      *self);
7868  * static void     gtk_gadget_class_init (GtkGadgetClass *klass);
7869  * static gpointer gtk_gadget_parent_class = NULL;
7870  * static void     gtk_gadget_class_intern_init (gpointer klass)
7871  * {
7872  * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
7873  * gtk_gadget_class_init ((GtkGadgetClass*) klass);
7874  * }
7875  *
7876  * GType
7877  * gtk_gadget_get_type (void)
7878  * {
7879  * static volatile gsize g_define_type_id__volatile = 0;
7880  * if (g_once_init_enter (&g_define_type_id__volatile))
7881  * {
7882  * GType g_define_type_id =
7883  * g_type_register_static_simple (GTK_TYPE_WIDGET,
7884  * g_intern_static_string ("GtkGadget"),
7885  * sizeof (GtkGadgetClass),
7886  * (GClassInitFunc) gtk_gadget_class_intern_init,
7887  * sizeof (GtkGadget),
7888  * (GInstanceInitFunc) gtk_gadget_init,
7889  * (GTypeFlags) flags);
7890  * {
7891  * static const GInterfaceInfo g_implement_interface_info = {
7892  * (GInterfaceInitFunc) gtk_gadget_gizmo_init
7893  * };
7894  * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
7895  * }
7896  * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
7897  * }
7898  * return g_define_type_id__volatile;
7899  * }
7900  * ]|
7901  * The only pieces which have to be manually provided are the definitions of
7902  * the instance and class structure and the definitions of the instance and
7903  * class init functions.
7904  *
7905  * Since: 2.4
7906  */
7907
7908
7909 /**
7910  * G_DEFINE_TYPE_WITH_CODE:
7911  * @TN: The name of the new type, in Camel case.
7912  * @t_n: The name of the new type in lowercase, with words separated by '_'.
7913  * @T_P: The #GType of the parent type.
7914  * @_C_: Custom code that gets inserted in the *_get_type() function.
7915  *
7916  * A convenience macro for type implementations.
7917  * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the
7918  * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
7919  * See G_DEFINE_TYPE_EXTENDED() for an example.
7920  *
7921  * Since: 2.4
7922  */
7923
7924
7925 /**
7926  * G_ENUM_CLASS:
7927  * @class: a valid #GEnumClass
7928  *
7929  * Casts a derived #GEnumClass structure into a #GEnumClass structure.
7930  */
7931
7932
7933 /**
7934  * G_ENUM_CLASS_TYPE:
7935  * @class: a #GEnumClass
7936  *
7937  * Get the type identifier from a given #GEnumClass structure.
7938  *
7939  * Returns: the #GType
7940  */
7941
7942
7943 /**
7944  * G_ENUM_CLASS_TYPE_NAME:
7945  * @class: a #GEnumClass
7946  *
7947  * Get the static type name from a given #GEnumClass structure.
7948  *
7949  * Returns: the type name.
7950  */
7951
7952
7953 /**
7954  * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE:
7955  *
7956  * A key in the "access" namespace for checking deletion privileges.
7957  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7958  * This attribute will be %TRUE if the user is able to delete the file.
7959  */
7960
7961
7962 /**
7963  * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE:
7964  *
7965  * A key in the "access" namespace for getting execution privileges.
7966  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7967  * This attribute will be %TRUE if the user is able to execute the file.
7968  */
7969
7970
7971 /**
7972  * G_FILE_ATTRIBUTE_ACCESS_CAN_READ:
7973  *
7974  * A key in the "access" namespace for getting read privileges.
7975  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7976  * This attribute will be %TRUE if the user is able to read the file.
7977  */
7978
7979
7980 /**
7981  * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME:
7982  *
7983  * A key in the "access" namespace for checking renaming privileges.
7984  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7985  * This attribute will be %TRUE if the user is able to rename the file.
7986  */
7987
7988
7989 /**
7990  * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH:
7991  *
7992  * A key in the "access" namespace for checking trashing privileges.
7993  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7994  * This attribute will be %TRUE if the user is able to move the file to
7995  * the trash.
7996  */
7997
7998
7999 /**
8000  * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE:
8001  *
8002  * A key in the "access" namespace for getting write privileges.
8003  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8004  * This attribute will be %TRUE if the user is able to write to the file.
8005  */
8006
8007
8008 /**
8009  * G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE:
8010  *
8011  * A key in the "dos" namespace for checking if the file's archive flag
8012  * is set. This attribute is %TRUE if the archive flag is set. This attribute
8013  * is only available for DOS file systems. Corresponding #GFileAttributeType
8014  * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8015  */
8016
8017
8018 /**
8019  * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM:
8020  *
8021  * A key in the "dos" namespace for checking if the file's backup flag
8022  * is set. This attribute is %TRUE if the backup flag is set. This attribute
8023  * is only available for DOS file systems. Corresponding #GFileAttributeType
8024  * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8025  */
8026
8027
8028 /**
8029  * G_FILE_ATTRIBUTE_ETAG_VALUE:
8030  *
8031  * A key in the "etag" namespace for getting the value of the file's
8032  * entity tag. Corresponding #GFileAttributeType is
8033  * %G_FILE_ATTRIBUTE_TYPE_STRING.
8034  */
8035
8036
8037 /**
8038  * G_FILE_ATTRIBUTE_FILESYSTEM_FREE:
8039  *
8040  * A key in the "filesystem" namespace for getting the number of bytes of free space left on the
8041  * file system. Corresponding #GFileAttributeType is
8042  * %G_FILE_ATTRIBUTE_TYPE_UINT64.
8043  */
8044
8045
8046 /**
8047  * G_FILE_ATTRIBUTE_FILESYSTEM_READONLY:
8048  *
8049  * A key in the "filesystem" namespace for checking if the file system
8050  * is read only. Is set to %TRUE if the file system is read only.
8051  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8052  */
8053
8054
8055 /**
8056  * G_FILE_ATTRIBUTE_FILESYSTEM_SIZE:
8057  *
8058  * A key in the "filesystem" namespace for getting the total size (in bytes) of the file system,
8059  * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType
8060  * is %G_FILE_ATTRIBUTE_TYPE_UINT64.
8061  */
8062
8063
8064 /**
8065  * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE:
8066  *
8067  * A key in the "filesystem" namespace for getting the file system's type.
8068  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8069  */
8070
8071
8072 /**
8073  * G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW:
8074  *
8075  * A key in the "filesystem" namespace for hinting a file manager
8076  * application whether it should preview (e.g. thumbnail) files on the
8077  * file system. The value for this key contain a
8078  * #GFilesystemPreviewType.
8079  */
8080
8081
8082 /**
8083  * G_FILE_ATTRIBUTE_GVFS_BACKEND:
8084  *
8085  * A key in the "gvfs" namespace that gets the name of the current
8086  * GVFS backend in use. Corresponding #GFileAttributeType is
8087  * %G_FILE_ATTRIBUTE_TYPE_STRING.
8088  */
8089
8090
8091 /**
8092  * G_FILE_ATTRIBUTE_ID_FILE:
8093  *
8094  * A key in the "id" namespace for getting a file identifier.
8095  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8096  * An example use would be during listing files, to avoid recursive
8097  * directory scanning.
8098  */
8099
8100
8101 /**
8102  * G_FILE_ATTRIBUTE_ID_FILESYSTEM:
8103  *
8104  * A key in the "id" namespace for getting the file system identifier.
8105  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8106  * An example use would be during drag and drop to see if the source
8107  * and target are on the same filesystem (default to move) or not (default
8108  * to copy).
8109  */
8110
8111
8112 /**
8113  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT:
8114  *
8115  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
8116  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8117  */
8118
8119
8120 /**
8121  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT:
8122  *
8123  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
8124  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8125  */
8126
8127
8128 /**
8129  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL:
8130  *
8131  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
8132  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8133  *
8134  * Since: 2.22
8135  */
8136
8137
8138 /**
8139  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START:
8140  *
8141  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
8142  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8143  *
8144  * Since: 2.22
8145  */
8146
8147
8148 /**
8149  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED:
8150  *
8151  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started
8152  * degraded.
8153  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8154  *
8155  * Since: 2.22
8156  */
8157
8158
8159 /**
8160  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP:
8161  *
8162  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
8163  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8164  *
8165  * Since: 2.22
8166  */
8167
8168
8169 /**
8170  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT:
8171  *
8172  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)  is unmountable.
8173  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8174  */
8175
8176
8177 /**
8178  * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI:
8179  *
8180  * A key in the "mountable" namespace for getting the HAL UDI for the mountable
8181  * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8182  */
8183
8184
8185 /**
8186  * G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC:
8187  *
8188  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)
8189  * is automatically polled for media.
8190  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8191  *
8192  * Since: 2.22
8193  */
8194
8195
8196 /**
8197  * G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE:
8198  *
8199  * A key in the "mountable" namespace for getting the #GDriveStartStopType.
8200  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8201  *
8202  * Since: 2.22
8203  */
8204
8205
8206 /**
8207  * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE:
8208  *
8209  * A key in the "mountable" namespace for getting the unix device.
8210  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8211  */
8212
8213
8214 /**
8215  * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE:
8216  *
8217  * A key in the "mountable" namespace for getting the unix device file.
8218  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8219  *
8220  * Since: 2.22
8221  */
8222
8223
8224 /**
8225  * G_FILE_ATTRIBUTE_OWNER_GROUP:
8226  *
8227  * A key in the "owner" namespace for getting the file owner's group.
8228  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8229  */
8230
8231
8232 /**
8233  * G_FILE_ATTRIBUTE_OWNER_USER:
8234  *
8235  * A key in the "owner" namespace for getting the user name of the
8236  * file's owner. Corresponding #GFileAttributeType is
8237  * %G_FILE_ATTRIBUTE_TYPE_STRING.
8238  */
8239
8240
8241 /**
8242  * G_FILE_ATTRIBUTE_OWNER_USER_REAL:
8243  *
8244  * A key in the "owner" namespace for getting the real name of the
8245  * user that owns the file. Corresponding #GFileAttributeType is
8246  * %G_FILE_ATTRIBUTE_TYPE_STRING.
8247  */
8248
8249
8250 /**
8251  * G_FILE_ATTRIBUTE_PREVIEW_ICON:
8252  *
8253  * A key in the "preview" namespace for getting a #GIcon that can be
8254  * used to get preview of the file. For example, it may be a low
8255  * resolution thumbnail without metadata. Corresponding
8256  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.  The value
8257  * for this key should contain a #GIcon.
8258  *
8259  * Since: 2.20
8260  */
8261
8262
8263 /**
8264  * G_FILE_ATTRIBUTE_SELINUX_CONTEXT:
8265  *
8266  * A key in the "selinux" namespace for getting the file's SELinux
8267  * context. Corresponding #GFileAttributeType is
8268  * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only
8269  * available if GLib has been built with SELinux support.
8270  */
8271
8272
8273 /**
8274  * G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE:
8275  *
8276  * A key in the "standard" namespace for getting the amount of disk space
8277  * that is consumed by the file (in bytes).  This will generally be larger
8278  * than the file size (due to block size overhead) but can occasionally be
8279  * smaller (for example, for sparse files).
8280  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
8281  *
8282  * Since: 2.20
8283  */
8284
8285
8286 /**
8287  * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE:
8288  *
8289  * A key in the "standard" namespace for getting the content type of the file.
8290  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8291  * The value for this key should contain a valid content type.
8292  */
8293
8294
8295 /**
8296  * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME:
8297  *
8298  * A key in the "standard" namespace for getting the copy name of the file.
8299  * The copy name is an optional version of the name. If available it's always
8300  * in UTF8, and corresponds directly to the original filename (only transcoded to
8301  * UTF8). This is useful if you want to copy the file to another filesystem that
8302  * might have a different encoding. If the filename is not a valid string in the
8303  * encoding selected for the filesystem it is in then the copy name will not be set.
8304  *
8305  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8306  */
8307
8308
8309 /**
8310  * G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION:
8311  *
8312  * A key in the "standard" namespace for getting the description of the file.
8313  * The description is a utf8 string that describes the file, generally containing
8314  * the filename, but can also contain furter information. Example descriptions
8315  * could be "filename (on hostname)" for a remote file or "filename (in trash)"
8316  * for a file in the trash. This is useful for instance as the window title
8317  * when displaying a directory or for a bookmarks menu.
8318  *
8319  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8320  */
8321
8322
8323 /**
8324  * G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME:
8325  *
8326  * A key in the "standard" namespace for getting the display name of the file.
8327  * A display name is guaranteed to be in UTF8 and can thus be displayed in
8328  * the UI.
8329  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8330  */
8331
8332
8333 /**
8334  * G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME:
8335  *
8336  * A key in the "standard" namespace for edit name of the file.
8337  * An edit name is similar to the display name, but it is meant to be
8338  * used when you want to rename the file in the UI. The display name
8339  * might contain information you don't want in the new filename (such as
8340  * "(invalid unicode)" if the filename was in an invalid encoding).
8341  *
8342  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8343  */
8344
8345
8346 /**
8347  * G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE:
8348  *
8349  * A key in the "standard" namespace for getting the fast content type.
8350  * The fast content type isn't as reliable as the regular one, as it
8351  * only uses the filename to guess it, but it is faster to calculate than the
8352  * regular content type.
8353  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8354  */
8355
8356
8357 /**
8358  * G_FILE_ATTRIBUTE_STANDARD_ICON:
8359  *
8360  * A key in the "standard" namespace for getting the icon for the file.
8361  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
8362  * The value for this key should contain a #GIcon.
8363  */
8364
8365
8366 /**
8367  * G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP:
8368  *
8369  * A key in the "standard" namespace for checking if a file is a backup file.
8370  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8371  */
8372
8373
8374 /**
8375  * G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN:
8376  *
8377  * A key in the "standard" namespace for checking if a file is hidden.
8378  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8379  */
8380
8381
8382 /**
8383  * G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK:
8384  *
8385  * A key in the "standard" namespace for checking if the file is a symlink.
8386  * Typically the actual type is something else, if we followed the symlink
8387  * to get the type.
8388  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8389  */
8390
8391
8392 /**
8393  * G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL:
8394  *
8395  * A key in the "standard" namespace for checking if a file is virtual.
8396  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8397  */
8398
8399
8400 /**
8401  * G_FILE_ATTRIBUTE_STANDARD_NAME:
8402  *
8403  * A key in the "standard" namespace for getting the name of the file.
8404  * The name is the on-disk filename which may not be in any known encoding,
8405  * and can thus not be generally displayed as is.
8406  * Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
8407  * name in a user interface.
8408  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
8409  */
8410
8411
8412 /**
8413  * G_FILE_ATTRIBUTE_STANDARD_SIZE:
8414  *
8415  * A key in the "standard" namespace for getting the file's size (in bytes).
8416  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
8417  */
8418
8419
8420 /**
8421  * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER:
8422  *
8423  * A key in the "standard" namespace for setting the sort order of a file.
8424  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
8425  * An example use would be in file managers, which would use this key
8426  * to set the order files are displayed. Files with smaller sort order
8427  * should be sorted first, and files without sort order as if sort order
8428  * was zero.
8429  */
8430
8431
8432 /**
8433  * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET:
8434  *
8435  * A key in the "standard" namespace for getting the symlink target, if the file
8436  * is a symlink. Corresponding #GFileAttributeType is
8437  * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
8438  */
8439
8440
8441 /**
8442  * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI:
8443  *
8444  * A key in the "standard" namespace for getting the target URI for the file, in
8445  * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
8446  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8447  */
8448
8449
8450 /**
8451  * G_FILE_ATTRIBUTE_STANDARD_TYPE:
8452  *
8453  * A key in the "standard" namespace for storing file types.
8454  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8455  * The value for this key should contain a #GFileType.
8456  */
8457
8458
8459 /**
8460  * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED:
8461  *
8462  * A key in the "thumbnail" namespace for checking if thumbnailing failed.
8463  * This attribute is %TRUE if thumbnailing failed. Corresponding
8464  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8465  */
8466
8467
8468 /**
8469  * G_FILE_ATTRIBUTE_THUMBNAIL_PATH:
8470  *
8471  * A key in the "thumbnail" namespace for getting the path to the thumbnail
8472  * image. Corresponding #GFileAttributeType is
8473  * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
8474  */
8475
8476
8477 /**
8478  * G_FILE_ATTRIBUTE_TIME_ACCESS:
8479  *
8480  * A key in the "time" namespace for getting the time the file was last
8481  * accessed. Corresponding #GFileAttributeType is
8482  * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
8483  * file was last accessed.
8484  */
8485
8486
8487 /**
8488  * G_FILE_ATTRIBUTE_TIME_ACCESS_USEC:
8489  *
8490  * A key in the "time" namespace for getting the microseconds of the time
8491  * the file was last accessed. This should be used in conjunction with
8492  * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is
8493  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
8494  */
8495
8496
8497 /**
8498  * G_FILE_ATTRIBUTE_TIME_CHANGED:
8499  *
8500  * A key in the "time" namespace for getting the time the file was last
8501  * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
8502  * and contains the UNIX time since the file was last changed.
8503  *
8504  * This corresponds to the traditional UNIX ctime.
8505  */
8506
8507
8508 /**
8509  * G_FILE_ATTRIBUTE_TIME_CHANGED_USEC:
8510  *
8511  * A key in the "time" namespace for getting the microseconds of the time
8512  * the file was last changed. This should be used in conjunction with
8513  * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is
8514  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
8515  */
8516
8517
8518 /**
8519  * G_FILE_ATTRIBUTE_TIME_CREATED:
8520  *
8521  * A key in the "time" namespace for getting the time the file was created.
8522  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
8523  * and contains the UNIX time since the file was created.
8524  *
8525  * This corresponds to the NTFS ctime.
8526  */
8527
8528
8529 /**
8530  * G_FILE_ATTRIBUTE_TIME_CREATED_USEC:
8531  *
8532  * A key in the "time" namespace for getting the microseconds of the time
8533  * the file was created. This should be used in conjunction with
8534  * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is
8535  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
8536  */
8537
8538
8539 /**
8540  * G_FILE_ATTRIBUTE_TIME_MODIFIED:
8541  *
8542  * A key in the "time" namespace for getting the time the file was last
8543  * modified. Corresponding #GFileAttributeType is
8544  * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
8545  * file was modified.
8546  */
8547
8548
8549 /**
8550  * G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC:
8551  *
8552  * A key in the "time" namespace for getting the miliseconds of the time
8553  * the file was last modified. This should be used in conjunction with
8554  * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is
8555  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
8556  */
8557
8558
8559 /**
8560  * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE:
8561  *
8562  * A key in the "trash" namespace.  When requested against
8563  * items in "trash:///", will return the date and time when the file
8564  * was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss.
8565  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8566  *
8567  * Since: 2.24.
8568  */
8569
8570
8571 /**
8572  * G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT:
8573  *
8574  * A key in the "trash" namespace.  When requested against
8575  * "trash:///" returns the number of (toplevel) items in the trash folder.
8576  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8577  */
8578
8579
8580 /**
8581  * G_FILE_ATTRIBUTE_TRASH_ORIG_PATH:
8582  *
8583  * A key in the "trash" namespace.  When requested against
8584  * items in "trash:///", will return the original path to the file before it
8585  * was trashed. Corresponding #GFileAttributeType is
8586  * %G_FILE_ATTRIBUTE_TYPE_STRING.
8587  *
8588  * Since: 2.24.
8589  */
8590
8591
8592 /**
8593  * G_FILE_ATTRIBUTE_UNIX_BLOCKS:
8594  *
8595  * A key in the "unix" namespace for getting the number of blocks allocated
8596  * for the file. This attribute is only available for UNIX file systems.
8597  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
8598  */
8599
8600
8601 /**
8602  * G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE:
8603  *
8604  * A key in the "unix" namespace for getting the block size for the file
8605  * system. This attribute is only available for UNIX file systems.
8606  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8607  */
8608
8609
8610 /**
8611  * G_FILE_ATTRIBUTE_UNIX_DEVICE:
8612  *
8613  * A key in the "unix" namespace for getting the device id of the device the
8614  * file is located on (see stat() documentation). This attribute is only
8615  * available for UNIX file systems. Corresponding #GFileAttributeType is
8616  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
8617  */
8618
8619
8620 /**
8621  * G_FILE_ATTRIBUTE_UNIX_GID:
8622  *
8623  * A key in the "unix" namespace for getting the group ID for the file.
8624  * This attribute is only available for UNIX file systems.
8625  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8626  */
8627
8628
8629 /**
8630  * G_FILE_ATTRIBUTE_UNIX_INODE:
8631  *
8632  * A key in the "unix" namespace for getting the inode of the file.
8633  * This attribute is only available for UNIX file systems. Corresponding
8634  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
8635  */
8636
8637
8638 /**
8639  * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT:
8640  *
8641  * A key in the "unix" namespace for checking if the file represents a
8642  * UNIX mount point. This attribute is %TRUE if the file is a UNIX mount
8643  * point. This attribute is only available for UNIX file systems.
8644  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8645  */
8646
8647
8648 /**
8649  * G_FILE_ATTRIBUTE_UNIX_MODE:
8650  *
8651  * A key in the "unix" namespace for getting the mode of the file
8652  * (e.g. whether the file is a regular file, symlink, etc). See lstat()
8653  * documentation. This attribute is only available for UNIX file systems.
8654  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8655  */
8656
8657
8658 /**
8659  * G_FILE_ATTRIBUTE_UNIX_NLINK:
8660  *
8661  * A key in the "unix" namespace for getting the number of hard links
8662  * for a file. See lstat() documentation. This attribute is only available
8663  * for UNIX file systems. Corresponding #GFileAttributeType is
8664  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
8665  */
8666
8667
8668 /**
8669  * G_FILE_ATTRIBUTE_UNIX_RDEV:
8670  *
8671  * A key in the "unix" namespace for getting the device ID for the file
8672  * (if it is a special file). See lstat() documentation. This attribute
8673  * is only available for UNIX file systems. Corresponding #GFileAttributeType
8674  * is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8675  */
8676
8677
8678 /**
8679  * G_FILE_ATTRIBUTE_UNIX_UID:
8680  *
8681  * A key in the "unix" namespace for getting the user ID for the file.
8682  * This attribute is only available for UNIX file systems.
8683  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8684  */
8685
8686
8687 /**
8688  * G_FLAGS_CLASS:
8689  * @class: a valid #GFlagsClass
8690  *
8691  * Casts a derived #GFlagsClass structure into a #GFlagsClass structure.
8692  */
8693
8694
8695 /**
8696  * G_FLAGS_CLASS_TYPE:
8697  * @class: a #GFlagsClass
8698  *
8699  * Get the type identifier from a given #GFlagsClass structure.
8700  *
8701  * Returns: the #GType
8702  */
8703
8704
8705 /**
8706  * G_FLAGS_CLASS_TYPE_NAME:
8707  * @class: a #GFlagsClass
8708  *
8709  * Get the static type name from a given #GFlagsClass structure.
8710  *
8711  * Returns: the type name.
8712  */
8713
8714
8715 /**
8716  * G_IMPLEMENT_INTERFACE:
8717  * @TYPE_IFACE: The #GType of the interface to add
8718  * @iface_init: The interface init function
8719  *
8720  * A convenience macro to ease interface addition in the @_C_ section
8721  * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE().
8722  * See G_DEFINE_TYPE_EXTENDED() for an example.
8723  *
8724  * Note that this macro can only be used together with the G_DEFINE_TYPE_*
8725  * macros, since it depends on variable names from those macros.
8726  *
8727  * Since: 2.4
8728  */
8729
8730
8731 /**
8732  * G_IMPLEMENT_INTERFACE_DYNAMIC:
8733  * @TYPE_IFACE: The #GType of the interface to add
8734  * @iface_init: The interface init function
8735  *
8736  * A convenience macro to ease interface addition in the @_C_ section
8737  * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED()
8738  * for an example.
8739  *
8740  * Note that this macro can only be used together with the
8741  * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable
8742  * names from that macro.
8743  *
8744  * Since: 2.24
8745  */
8746
8747
8748 /**
8749  * G_INITIALLY_UNOWNED:
8750  * @object: Object which is subject to casting.
8751  *
8752  * Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*)
8753  * pointer. Depending on the current debugging level, this function may invoke
8754  * certain runtime checks to identify invalid casts.
8755  */
8756
8757
8758 /**
8759  * G_INITIALLY_UNOWNED_CLASS:
8760  * @class: a valid #GInitiallyUnownedClass
8761  *
8762  * Casts a derived #GInitiallyUnownedClass structure into a
8763  * #GInitiallyUnownedClass structure.
8764  */
8765
8766
8767 /**
8768  * G_INITIALLY_UNOWNED_GET_CLASS:
8769  * @object: a #GInitiallyUnowned instance.
8770  *
8771  * Get the class structure associated to a #GInitiallyUnowned instance.
8772  *
8773  * Returns: pointer to object class structure.
8774  */
8775
8776
8777 /**
8778  * G_IO_ERROR:
8779  *
8780  * Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration.
8781  * See #GError for more information on error domains.
8782  */
8783
8784
8785 /**
8786  * G_IS_ENUM_CLASS:
8787  * @class: a #GEnumClass
8788  *
8789  * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM
8790  * or derived.
8791  */
8792
8793
8794 /**
8795  * G_IS_FLAGS_CLASS:
8796  * @class: a #GFlagsClass
8797  *
8798  * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS
8799  * or derived.
8800  */
8801
8802
8803 /**
8804  * G_IS_INITIALLY_UNOWNED:
8805  * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED.
8806  *
8807  * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED.
8808  */
8809
8810
8811 /**
8812  * G_IS_INITIALLY_UNOWNED_CLASS:
8813  * @class: a #GInitiallyUnownedClass
8814  *
8815  * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type
8816  * %G_TYPE_INITIALLY_UNOWNED or derived.
8817  */
8818
8819
8820 /**
8821  * G_IS_OBJECT:
8822  * @object: Instance to check for being a %G_TYPE_OBJECT.
8823  *
8824  * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT.
8825  */
8826
8827
8828 /**
8829  * G_IS_OBJECT_CLASS:
8830  * @class: a #GObjectClass
8831  *
8832  * Checks whether @class "is a" valid #GObjectClass structure of type
8833  * %G_TYPE_OBJECT or derived.
8834  */
8835
8836
8837 /**
8838  * G_IS_PARAM_SPEC:
8839  * @pspec: a #GParamSpec
8840  *
8841  * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM
8842  * or derived.
8843  */
8844
8845
8846 /**
8847  * G_IS_PARAM_SPEC_BOOLEAN:
8848  * @pspec: a valid #GParamSpec instance
8849  *
8850  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
8851  *
8852  * Returns: %TRUE on success.
8853  */
8854
8855
8856 /**
8857  * G_IS_PARAM_SPEC_BOXED:
8858  * @pspec: a valid #GParamSpec instance
8859  *
8860  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
8861  *
8862  * Returns: %TRUE on success.
8863  */
8864
8865
8866 /**
8867  * G_IS_PARAM_SPEC_CHAR:
8868  * @pspec: a valid #GParamSpec instance
8869  *
8870  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
8871  *
8872  * Returns: %TRUE on success.
8873  */
8874
8875
8876 /**
8877  * G_IS_PARAM_SPEC_CLASS:
8878  * @pclass: a #GParamSpecClass
8879  *
8880  * Checks whether @pclass "is a" valid #GParamSpecClass structure of type
8881  * %G_TYPE_PARAM or derived.
8882  */
8883
8884
8885 /**
8886  * G_IS_PARAM_SPEC_DOUBLE:
8887  * @pspec: a valid #GParamSpec instance
8888  *
8889  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
8890  *
8891  * Returns: %TRUE on success.
8892  */
8893
8894
8895 /**
8896  * G_IS_PARAM_SPEC_ENUM:
8897  * @pspec: a valid #GParamSpec instance
8898  *
8899  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
8900  *
8901  * Returns: %TRUE on success.
8902  */
8903
8904
8905 /**
8906  * G_IS_PARAM_SPEC_FLAGS:
8907  * @pspec: a valid #GParamSpec instance
8908  *
8909  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
8910  *
8911  * Returns: %TRUE on success.
8912  */
8913
8914
8915 /**
8916  * G_IS_PARAM_SPEC_FLOAT:
8917  * @pspec: a valid #GParamSpec instance
8918  *
8919  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
8920  *
8921  * Returns: %TRUE on success.
8922  */
8923
8924
8925 /**
8926  * G_IS_PARAM_SPEC_GTYPE:
8927  * @pspec: a #GParamSpec
8928  *
8929  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
8930  *
8931  * Since: 2.10
8932  * Returns: %TRUE on success.
8933  */
8934
8935
8936 /**
8937  * G_IS_PARAM_SPEC_INT:
8938  * @pspec: a valid #GParamSpec instance
8939  *
8940  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
8941  *
8942  * Returns: %TRUE on success.
8943  */
8944
8945
8946 /**
8947  * G_IS_PARAM_SPEC_INT64:
8948  * @pspec: a valid #GParamSpec instance
8949  *
8950  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
8951  *
8952  * Returns: %TRUE on success.
8953  */
8954
8955
8956 /**
8957  * G_IS_PARAM_SPEC_LONG:
8958  * @pspec: a valid #GParamSpec instance
8959  *
8960  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
8961  *
8962  * Returns: %TRUE on success.
8963  */
8964
8965
8966 /**
8967  * G_IS_PARAM_SPEC_OBJECT:
8968  * @pspec: a valid #GParamSpec instance
8969  *
8970  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
8971  *
8972  * Returns: %TRUE on success.
8973  */
8974
8975
8976 /**
8977  * G_IS_PARAM_SPEC_OVERRIDE:
8978  * @pspec: a #GParamSpec
8979  *
8980  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
8981  *
8982  * Since: 2.4
8983  * Returns: %TRUE on success.
8984  */
8985
8986
8987 /**
8988  * G_IS_PARAM_SPEC_PARAM:
8989  * @pspec: a valid #GParamSpec instance
8990  *
8991  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
8992  *
8993  * Returns: %TRUE on success.
8994  */
8995
8996
8997 /**
8998  * G_IS_PARAM_SPEC_POINTER:
8999  * @pspec: a valid #GParamSpec instance
9000  *
9001  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
9002  *
9003  * Returns: %TRUE on success.
9004  */
9005
9006
9007 /**
9008  * G_IS_PARAM_SPEC_STRING:
9009  * @pspec: a valid #GParamSpec instance
9010  *
9011  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
9012  *
9013  * Returns: %TRUE on success.
9014  */
9015
9016
9017 /**
9018  * G_IS_PARAM_SPEC_UCHAR:
9019  * @pspec: a valid #GParamSpec instance
9020  *
9021  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
9022  *
9023  * Returns: %TRUE on success.
9024  */
9025
9026
9027 /**
9028  * G_IS_PARAM_SPEC_UINT:
9029  * @pspec: a valid #GParamSpec instance
9030  *
9031  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
9032  *
9033  * Returns: %TRUE on success.
9034  */
9035
9036
9037 /**
9038  * G_IS_PARAM_SPEC_UINT64:
9039  * @pspec: a valid #GParamSpec instance
9040  *
9041  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
9042  *
9043  * Returns: %TRUE on success.
9044  */
9045
9046
9047 /**
9048  * G_IS_PARAM_SPEC_ULONG:
9049  * @pspec: a valid #GParamSpec instance
9050  *
9051  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
9052  *
9053  * Returns: %TRUE on success.
9054  */
9055
9056
9057 /**
9058  * G_IS_PARAM_SPEC_UNICHAR:
9059  * @pspec: a valid #GParamSpec instance
9060  *
9061  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
9062  *
9063  * Returns: %TRUE on success.
9064  */
9065
9066
9067 /**
9068  * G_IS_PARAM_SPEC_VALUE_ARRAY:
9069  * @pspec: a valid #GParamSpec instance
9070  *
9071  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
9072  *
9073  * Returns: %TRUE on success.
9074  */
9075
9076
9077 /**
9078  * G_IS_PARAM_SPEC_VARIANT:
9079  * @pspec: a #GParamSpec
9080  *
9081  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
9082  *
9083  * Returns: %TRUE on success
9084  * Since: 2.26
9085  */
9086
9087
9088 /**
9089  * G_IS_VALUE:
9090  * @value: A #GValue structure.
9091  *
9092  * Checks if @value is a valid and initialized #GValue structure.
9093  *
9094  * Returns: %TRUE on success.
9095  */
9096
9097
9098 /**
9099  * G_MARKUP_ERROR:
9100  *
9101  * Error domain for markup parsing.
9102  * Errors in this domain will be from the #GMarkupError enumeration.
9103  * See #GError for information on error domains.
9104  */
9105
9106
9107 /**
9108  * G_NODE_IS_LEAF:
9109  * @node: a #GNode
9110  *
9111  * Returns %TRUE if a #GNode is a leaf node.
9112  *
9113  * (i.e. it has no children)
9114  *
9115  * Returns: %TRUE if the #GNode is a leaf node
9116  */
9117
9118
9119 /**
9120  * G_NODE_IS_ROOT:
9121  * @node: a #GNode
9122  *
9123  * Returns %TRUE if a #GNode is the root of a tree.
9124  *
9125  * (i.e. it has no parent or siblings)
9126  *
9127  * Returns: %TRUE if the #GNode is the root of a tree
9128  */
9129
9130
9131 /**
9132  * G_OBJECT:
9133  * @object: Object which is subject to casting.
9134  *
9135  * Casts a #GObject or derived pointer into a (GObject*) pointer.
9136  * Depending on the current debugging level, this function may invoke
9137  * certain runtime checks to identify invalid casts.
9138  */
9139
9140
9141 /**
9142  * G_OBJECT_CLASS:
9143  * @class: a valid #GObjectClass
9144  *
9145  * Casts a derived #GObjectClass structure into a #GObjectClass structure.
9146  */
9147
9148
9149 /**
9150  * G_OBJECT_CLASS_NAME:
9151  * @class: a valid #GObjectClass
9152  *
9153  * Return the name of a class structure's type.
9154  *
9155  * should not be freed.
9156  *
9157  * Returns: Type name of @class. The string is owned by the type system and
9158  */
9159
9160
9161 /**
9162  * G_OBJECT_CLASS_TYPE:
9163  * @class: a valid #GObjectClass
9164  *
9165  * Get the type id of a class structure.
9166  *
9167  * Returns: Type id of @class.
9168  */
9169
9170
9171 /**
9172  * G_OBJECT_GET_CLASS:
9173  * @object: a #GObject instance.
9174  *
9175  * Get the class structure associated to a #GObject instance.
9176  *
9177  * Returns: pointer to object class structure.
9178  */
9179
9180
9181 /**
9182  * G_OBJECT_TYPE:
9183  * @object: Object to return the type id for.
9184  *
9185  * Get the type id of an object.
9186  *
9187  * Returns: Type id of @object.
9188  */
9189
9190
9191 /**
9192  * G_OBJECT_TYPE_NAME:
9193  * @object: Object to return the type name for.
9194  *
9195  * Get the name of an object's type.
9196  *
9197  * should not be freed.
9198  *
9199  * Returns: Type name of @object. The string is owned by the type system and
9200  */
9201
9202
9203 /**
9204  * G_OBJECT_WARN_INVALID_PROPERTY_ID:
9205  * @object: the #GObject on which set_property() or get_property() was called
9206  * @property_id: the numeric id of the property
9207  * @pspec: the #GParamSpec of the property
9208  *
9209  * This macro should be used to emit a standard warning about unexpected
9210  * properties in set_property() and get_property() implementations.
9211  */
9212
9213
9214 /**
9215  * G_OPTION_ERROR:
9216  *
9217  * Error domain for option parsing. Errors in this domain will
9218  * be from the #GOptionError enumeration. See #GError for information on
9219  * error domains.
9220  */
9221
9222
9223 /**
9224  * G_OPTION_REMAINING:
9225  *
9226  * If a long option in the main group has this name, it is not treated as a
9227  * regular option. Instead it collects all non-option arguments which would
9228  * otherwise be left in <literal>argv</literal>. The option must be of type
9229  * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY
9230  * or %G_OPTION_ARG_FILENAME_ARRAY.
9231  *
9232  *
9233  * Using #G_OPTION_REMAINING instead of simply scanning <literal>argv</literal>
9234  * for leftover arguments has the advantage that GOption takes care of
9235  * necessary encoding conversions for strings or filenames.
9236  *
9237  * Since: 2.6
9238  */
9239
9240
9241 /**
9242  * G_PARAM_MASK:
9243  *
9244  * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
9245  */
9246
9247
9248 /**
9249  * G_PARAM_READWRITE:
9250  *
9251  * #GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.
9252  */
9253
9254
9255 /**
9256  * G_PARAM_SPEC:
9257  * @pspec: a valid #GParamSpec
9258  *
9259  * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into
9260  * a #GParamSpec object.
9261  */
9262
9263
9264 /**
9265  * G_PARAM_SPEC_BOOLEAN:
9266  * @pspec: a valid #GParamSpec instance
9267  *
9268  * Cast a #GParamSpec instance into a #GParamSpecBoolean.
9269  */
9270
9271
9272 /**
9273  * G_PARAM_SPEC_BOXED:
9274  * @pspec: a valid #GParamSpec instance
9275  *
9276  * Cast a #GParamSpec instance into a #GParamSpecBoxed.
9277  */
9278
9279
9280 /**
9281  * G_PARAM_SPEC_CHAR:
9282  * @pspec: a valid #GParamSpec instance
9283  *
9284  * Cast a #GParamSpec instance into a #GParamSpecChar.
9285  */
9286
9287
9288 /**
9289  * G_PARAM_SPEC_CLASS:
9290  * @pclass: a valid #GParamSpecClass
9291  *
9292  * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure.
9293  */
9294
9295
9296 /**
9297  * G_PARAM_SPEC_DOUBLE:
9298  * @pspec: a valid #GParamSpec instance
9299  *
9300  * Cast a #GParamSpec instance into a #GParamSpecDouble.
9301  */
9302
9303
9304 /**
9305  * G_PARAM_SPEC_ENUM:
9306  * @pspec: a valid #GParamSpec instance
9307  *
9308  * Cast a #GParamSpec instance into a #GParamSpecEnum.
9309  */
9310
9311
9312 /**
9313  * G_PARAM_SPEC_FLAGS:
9314  * @pspec: a valid #GParamSpec instance
9315  *
9316  * Cast a #GParamSpec instance into a #GParamSpecFlags.
9317  */
9318
9319
9320 /**
9321  * G_PARAM_SPEC_FLOAT:
9322  * @pspec: a valid #GParamSpec instance
9323  *
9324  * Cast a #GParamSpec instance into a #GParamSpecFloat.
9325  */
9326
9327
9328 /**
9329  * G_PARAM_SPEC_GET_CLASS:
9330  * @pspec: a valid #GParamSpec
9331  *
9332  * Retrieves the #GParamSpecClass of a #GParamSpec.
9333  */
9334
9335
9336 /**
9337  * G_PARAM_SPEC_GTYPE:
9338  * @pspec: a #GParamSpec
9339  *
9340  * Casts a #GParamSpec into a #GParamSpecGType.
9341  *
9342  * Since: 2.10
9343  */
9344
9345
9346 /**
9347  * G_PARAM_SPEC_INT:
9348  * @pspec: a valid #GParamSpec instance
9349  *
9350  * Cast a #GParamSpec instance into a #GParamSpecInt.
9351  */
9352
9353
9354 /**
9355  * G_PARAM_SPEC_INT64:
9356  * @pspec: a valid #GParamSpec instance
9357  *
9358  * Cast a #GParamSpec instance into a #GParamSpecInt64.
9359  */
9360
9361
9362 /**
9363  * G_PARAM_SPEC_LONG:
9364  * @pspec: a valid #GParamSpec instance
9365  *
9366  * Cast a #GParamSpec instance into a #GParamSpecLong.
9367  */
9368
9369
9370 /**
9371  * G_PARAM_SPEC_OBJECT:
9372  * @pspec: a valid #GParamSpec instance
9373  *
9374  * Casts a #GParamSpec instance into a #GParamSpecObject.
9375  */
9376
9377
9378 /**
9379  * G_PARAM_SPEC_OVERRIDE:
9380  * @pspec: a #GParamSpec
9381  *
9382  * Casts a #GParamSpec into a #GParamSpecOverride.
9383  *
9384  * Since: 2.4
9385  */
9386
9387
9388 /**
9389  * G_PARAM_SPEC_PARAM:
9390  * @pspec: a valid #GParamSpec instance
9391  *
9392  * Casts a #GParamSpec instance into a #GParamSpecParam.
9393  */
9394
9395
9396 /**
9397  * G_PARAM_SPEC_POINTER:
9398  * @pspec: a valid #GParamSpec instance
9399  *
9400  * Casts a #GParamSpec instance into a #GParamSpecPointer.
9401  */
9402
9403
9404 /**
9405  * G_PARAM_SPEC_STRING:
9406  * @pspec: a valid #GParamSpec instance
9407  *
9408  * Casts a #GParamSpec instance into a #GParamSpecString.
9409  */
9410
9411
9412 /**
9413  * G_PARAM_SPEC_TYPE:
9414  * @pspec: a valid #GParamSpec
9415  *
9416  * Retrieves the #GType of this @pspec.
9417  */
9418
9419
9420 /**
9421  * G_PARAM_SPEC_TYPE_NAME:
9422  * @pspec: a valid #GParamSpec
9423  *
9424  * Retrieves the #GType name of this @pspec.
9425  */
9426
9427
9428 /**
9429  * G_PARAM_SPEC_UCHAR:
9430  * @pspec: a valid #GParamSpec instance
9431  *
9432  * Cast a #GParamSpec instance into a #GParamSpecUChar.
9433  */
9434
9435
9436 /**
9437  * G_PARAM_SPEC_UINT:
9438  * @pspec: a valid #GParamSpec instance
9439  *
9440  * Cast a #GParamSpec instance into a #GParamSpecUInt.
9441  */
9442
9443
9444 /**
9445  * G_PARAM_SPEC_UINT64:
9446  * @pspec: a valid #GParamSpec instance
9447  *
9448  * Cast a #GParamSpec instance into a #GParamSpecUInt64.
9449  */
9450
9451
9452 /**
9453  * G_PARAM_SPEC_ULONG:
9454  * @pspec: a valid #GParamSpec instance
9455  *
9456  * Cast a #GParamSpec instance into a #GParamSpecULong.
9457  */
9458
9459
9460 /**
9461  * G_PARAM_SPEC_UNICHAR:
9462  * @pspec: a valid #GParamSpec instance
9463  *
9464  * Cast a #GParamSpec instance into a #GParamSpecUnichar.
9465  */
9466
9467
9468 /**
9469  * G_PARAM_SPEC_VALUE_ARRAY:
9470  * @pspec: a valid #GParamSpec instance
9471  *
9472  * Cast a #GParamSpec instance into a #GParamSpecValueArray.
9473  */
9474
9475
9476 /**
9477  * G_PARAM_SPEC_VALUE_TYPE:
9478  * @pspec: a valid #GParamSpec
9479  *
9480  * Retrieves the #GType to initialize a #GValue for this parameter.
9481  */
9482
9483
9484 /**
9485  * G_PARAM_SPEC_VARIANT:
9486  * @pspec: a #GParamSpec
9487  *
9488  * Casts a #GParamSpec into a #GParamSpecVariant.
9489  *
9490  * Since: 2.26
9491  */
9492
9493
9494 /**
9495  * G_PARAM_STATIC_STRINGS:
9496  *
9497  * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
9498  *
9499  * Since 2.13.0
9500  */
9501
9502
9503 /**
9504  * G_PARAM_USER_SHIFT:
9505  *
9506  * Minimum shift count to be used for user defined flags, to be stored in
9507  * #GParamSpec.flags. The maximum allowed is 30 + G_PARAM_USER_SHIFT.
9508  */
9509
9510
9511 /**
9512  * G_PRIORITY_DEFAULT:
9513  *
9514  * Use this for default priority event sources.
9515  *
9516  * In GLib this priority is used when adding timeout functions
9517  * with g_timeout_add(). In GDK this priority is used for events
9518  * from the X server.
9519  */
9520
9521
9522 /**
9523  * G_PRIORITY_DEFAULT_IDLE:
9524  *
9525  * Use this for default priority idle functions.
9526  *
9527  * In GLib this priority is used when adding idle functions with
9528  * g_idle_add().
9529  */
9530
9531
9532 /**
9533  * G_PRIORITY_HIGH:
9534  *
9535  * Use this for high priority event sources.
9536  *
9537  * It is not used within GLib or GTK+.
9538  */
9539
9540
9541 /**
9542  * G_PRIORITY_HIGH_IDLE:
9543  *
9544  * Use this for high priority idle functions.
9545  *
9546  * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations,
9547  * and #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is
9548  * done to ensure that any pending resizes are processed before any
9549  * pending redraws, so that widgets are not redrawn twice unnecessarily.)
9550  */
9551
9552
9553 /**
9554  * G_PRIORITY_LOW:
9555  *
9556  * Use this for very low priority background tasks.
9557  *
9558  * It is not used within GLib or GTK+.
9559  */
9560
9561
9562 /**
9563  * G_PROXY_EXTENSION_POINT_NAME:
9564  *
9565  * Extension point for proxy functionality.
9566  * See <link linkend="extending-gio">Extending GIO</link>.
9567  *
9568  * Since: 2.26
9569  */
9570
9571
9572 /**
9573  * G_PROXY_RESOLVER_EXTENSION_POINT_NAME:
9574  *
9575  * Extension point for proxy resolving functionality.
9576  * See <link linkend="extending-gio">Extending GIO</link>.
9577  */
9578
9579
9580 /**
9581  * G_QUEUE_INIT:
9582  *
9583  * A statically-allocated #GQueue must be initialized with this
9584  * macro before it can be used. This macro can be used to initialize
9585  * a variable, but it cannot be assigned to a variable. In that case
9586  * you have to use g_queue_init().
9587  *
9588  * |[
9589  * GQueue my_queue = G_QUEUE_INIT;
9590  * ]|
9591  *
9592  * Since: 2.14
9593  */
9594
9595
9596 /**
9597  * G_REGEX_ERROR:
9598  *
9599  * Error domain for regular expressions. Errors in this domain will be
9600  * from the #GRegexError enumeration. See #GError for information on
9601  * error domains.
9602  *
9603  * Since: 2.14
9604  */
9605
9606
9607 /**
9608  * G_RESOLVER_ERROR:
9609  *
9610  * Error domain for #GResolver. Errors in this domain will be from the
9611  * #GResolverError enumeration. See #GError for more information on
9612  * error domains.
9613  */
9614
9615
9616 /**
9617  * G_SETTINGS_BACKEND_EXTENSION_POINT_NAME:
9618  *
9619  * Extension point for #GSettingsBackend functionality.
9620  */
9621
9622
9623 /**
9624  * G_SIGNAL_FLAGS_MASK:
9625  *
9626  * A mask for all #GSignalFlags bits.
9627  */
9628
9629
9630 /**
9631  * G_SIGNAL_MATCH_MASK:
9632  *
9633  * A mask for all #GSignalMatchType bits.
9634  */
9635
9636
9637 /**
9638  * G_SIGNAL_TYPE_STATIC_SCOPE:
9639  *
9640  * This macro flags signal argument types for which the signal system may
9641  * assume that instances thereof remain persistent across all signal emissions
9642  * they are used in. This is only useful for non ref-counted, value-copy types.
9643  *
9644  * To flag a signal argument in this way, add
9645  * <literal>| G_SIGNAL_TYPE_STATIC_SCOPE</literal> to the corresponding argument
9646  * of g_signal_new().
9647  * |[
9648  * g_signal_new ("size_request",
9649  * G_TYPE_FROM_CLASS (gobject_class),
9650  * G_SIGNAL_RUN_FIRST,
9651  * G_STRUCT_OFFSET (GtkWidgetClass, size_request),
9652  * NULL, NULL,
9653  * _gtk_marshal_VOID__BOXED,
9654  * G_TYPE_NONE, 1,
9655  * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
9656  * ]|
9657  */
9658
9659
9660 /**
9661  * G_SPAWN_ERROR:
9662  *
9663  * Error domain for spawning processes. Errors in this domain will
9664  * be from the #GSpawnError enumeration. See #GError for information on
9665  * error domains.
9666  */
9667
9668
9669 /**
9670  * G_TIME_SPAN_DAY:
9671  *
9672  * Evaluates to a time span of one day.
9673  *
9674  * Since: 2.26
9675  */
9676
9677
9678 /**
9679  * G_TIME_SPAN_HOUR:
9680  *
9681  * Evaluates to a time span of one hour.
9682  *
9683  * Since: 2.26
9684  */
9685
9686
9687 /**
9688  * G_TIME_SPAN_MILLISECOND:
9689  *
9690  * Evaluates to a time span of one millisecond.
9691  *
9692  * Since: 2.26
9693  */
9694
9695
9696 /**
9697  * G_TIME_SPAN_MINUTE:
9698  *
9699  * Evaluates to a time span of one minute.
9700  *
9701  * Since: 2.26
9702  */
9703
9704
9705 /**
9706  * G_TIME_SPAN_SECOND:
9707  *
9708  * Evaluates to a time span of one second.
9709  *
9710  * Since: 2.26
9711  */
9712
9713
9714 /**
9715  * G_TLS_BACKEND_EXTENSION_POINT_NAME:
9716  *
9717  * Extension point for TLS functionality via #GTlsBackend.
9718  * See <link linkend="extending-gio">Extending GIO</link>.
9719  */
9720
9721
9722 /**
9723  * G_TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT:
9724  *
9725  * The purpose used to verify the client certificate in a TLS connection.
9726  * Used by TLS servers.
9727  */
9728
9729
9730 /**
9731  * G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER:
9732  *
9733  * The purpose used to verify the server certificate in a TLS connection. This
9734  * is the most common purpose in use. Used by TLS clients.
9735  */
9736
9737
9738 /**
9739  * G_TLS_ERROR:
9740  *
9741  * Error domain for TLS. Errors in this domain will be from the
9742  * #GTlsError enumeration. See #GError for more information on error
9743  * domains.
9744  */
9745
9746
9747 /**
9748  * G_TYPE_ARRAY:
9749  *
9750  * The #GType for a boxed type holding a #GArray reference.
9751  *
9752  * Since: 2.22
9753  */
9754
9755
9756 /**
9757  * G_TYPE_BOOLEAN:
9758  *
9759  * The fundamental type corresponding to #gboolean.
9760  */
9761
9762
9763 /**
9764  * G_TYPE_BOXED:
9765  *
9766  * The fundamental type from which all boxed types are derived.
9767  */
9768
9769
9770 /**
9771  * G_TYPE_BYTE_ARRAY:
9772  *
9773  * The #GType for a boxed type holding a #GByteArray reference.
9774  *
9775  * Since: 2.22
9776  */
9777
9778
9779 /**
9780  * G_TYPE_CHAR:
9781  *
9782  * The fundamental type corresponding to #gchar.
9783  * The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
9784  * This may or may not be the same type a the C type "gchar".
9785  */
9786
9787
9788 /**
9789  * G_TYPE_CHECK_CLASS_CAST:
9790  * @g_class: Location of a #GTypeClass structure.
9791  * @g_type: The type to be returned.
9792  * @c_type: The corresponding C type of class structure of @g_type.
9793  *
9794  * Checks that @g_class is a class structure of the type identified by @g_type
9795  * and issues a warning if this is not the case. Returns @g_class casted
9796  * to a pointer to @c_type.
9797  *
9798  * This macro should only be used in type implementations.
9799  */
9800
9801
9802 /**
9803  * G_TYPE_CHECK_CLASS_TYPE:
9804  * @g_class: Location of a #GTypeClass structure.
9805  * @g_type: The type to be checked.
9806  *
9807  * Checks if @g_class is a class structure of the type identified by
9808  * @g_type.
9809  *
9810  * This macro should only be used in type implementations.
9811  *
9812  * Returns: %TRUE on success.
9813  */
9814
9815
9816 /**
9817  * G_TYPE_CHECK_INSTANCE:
9818  * @instance: Location of a #GTypeInstance structure.
9819  *
9820  * Checks if @instance is a valid #GTypeInstance structure,
9821  * otherwise issues a warning and returns %FALSE.
9822  *
9823  * This macro should only be used in type implementations.
9824  *
9825  * Returns: %TRUE on success.
9826  */
9827
9828
9829 /**
9830  * G_TYPE_CHECK_INSTANCE_CAST:
9831  * @instance: Location of a #GTypeInstance structure.
9832  * @g_type: The type to be returned.
9833  * @c_type: The corresponding C type of @g_type.
9834  *
9835  * Checks that @instance is an instance of the type identified by @g_type
9836  * and issues a warning if this is not the case. Returns @instance casted
9837  * to a pointer to @c_type.
9838  *
9839  * This macro should only be used in type implementations.
9840  */
9841
9842
9843 /**
9844  * G_TYPE_CHECK_INSTANCE_TYPE:
9845  * @instance: Location of a #GTypeInstance structure.
9846  * @g_type: The type to be checked
9847  *
9848  * Checks if @instance is an instance of the type identified by @g_type.
9849  *
9850  * This macro should only be used in type implementations.
9851  *
9852  * Returns: %TRUE on success.
9853  */
9854
9855
9856 /**
9857  * G_TYPE_CHECK_VALUE:
9858  * @value: a #GValue
9859  *
9860  * Checks if @value has been initialized to hold values
9861  * of a value type.
9862  *
9863  * This macro should only be used in type implementations.
9864  *
9865  * Returns: %TRUE on success.
9866  */
9867
9868
9869 /**
9870  * G_TYPE_CHECK_VALUE_TYPE:
9871  * @value: a #GValue
9872  * @g_type: The type to be checked.
9873  *
9874  * Checks if @value has been initialized to hold values
9875  * of type @g_type.
9876  *
9877  * This macro should only be used in type implementations.
9878  *
9879  * Returns: %TRUE on success.
9880  */
9881
9882
9883 /**
9884  * G_TYPE_CLASS_GET_PRIVATE:
9885  * @klass: the class of a type deriving from @private_type.
9886  * @g_type: the type identifying which private data to retrieve.
9887  * @c_type: The C type for the private structure.
9888  *
9889  * Gets the private class structure for a particular type.
9890  * The private structure must have been registered in the
9891  * get_type() function with g_type_add_class_private().
9892  *
9893  * This macro should only be used in type implementations.
9894  *
9895  * Since: 2.24
9896  * Returns: a pointer to the private data structure.
9897  */
9898
9899
9900 /**
9901  * G_TYPE_CLOSURE:
9902  *
9903  * The #GType for #GClosure.
9904  */
9905
9906
9907 /**
9908  * G_TYPE_DATE:
9909  *
9910  * The #GType for #GDate.
9911  */
9912
9913
9914 /**
9915  * G_TYPE_DATE_TIME:
9916  *
9917  * The #GType for a boxed type holding a #GDateTime.
9918  *
9919  * Since: 2.26
9920  */
9921
9922
9923 /**
9924  * G_TYPE_DBUS_ANNOTATION_INFO:
9925  *
9926  * The #GType for a boxed type holding a #GDBusAnnotationInfo.
9927  *
9928  * Since: 2.26
9929  */
9930
9931
9932 /**
9933  * G_TYPE_DBUS_ARG_INFO:
9934  *
9935  * The #GType for a boxed type holding a #GDBusArgInfo.
9936  *
9937  * Since: 2.26
9938  */
9939
9940
9941 /**
9942  * G_TYPE_DBUS_INTERFACE_INFO:
9943  *
9944  * The #GType for a boxed type holding a #GDBusInterfaceInfo.
9945  *
9946  * Since: 2.26
9947  */
9948
9949
9950 /**
9951  * G_TYPE_DBUS_METHOD_INFO:
9952  *
9953  * The #GType for a boxed type holding a #GDBusMethodInfo.
9954  *
9955  * Since: 2.26
9956  */
9957
9958
9959 /**
9960  * G_TYPE_DBUS_NODE_INFO:
9961  *
9962  * The #GType for a boxed type holding a #GDBusNodeInfo.
9963  *
9964  * Since: 2.26
9965  */
9966
9967
9968 /**
9969  * G_TYPE_DBUS_PROPERTY_INFO:
9970  *
9971  * The #GType for a boxed type holding a #GDBusPropertyInfo.
9972  *
9973  * Since: 2.26
9974  */
9975
9976
9977 /**
9978  * G_TYPE_DBUS_SIGNAL_INFO:
9979  *
9980  * The #GType for a boxed type holding a #GDBusSignalInfo.
9981  *
9982  * Since: 2.26
9983  */
9984
9985
9986 /**
9987  * G_TYPE_DOUBLE:
9988  *
9989  * The fundamental type corresponding to #gdouble.
9990  */
9991
9992
9993 /**
9994  * G_TYPE_ENUM:
9995  *
9996  * The fundamental type from which all enumeration types are derived.
9997  */
9998
9999
10000 /**
10001  * G_TYPE_ERROR:
10002  *
10003  * The #GType for a boxed type holding a #GError.
10004  *
10005  * Since: 2.26
10006  */
10007
10008
10009 /**
10010  * G_TYPE_FLAGS:
10011  *
10012  * The fundamental type from which all flags types are derived.
10013  */
10014
10015
10016 /**
10017  * G_TYPE_FLAG_RESERVED_ID_BIT:
10018  *
10019  * A bit in the type number that's supposed to be left untouched.
10020  */
10021
10022
10023 /**
10024  * G_TYPE_FLOAT:
10025  *
10026  * The fundamental type corresponding to #gfloat.
10027  */
10028
10029
10030 /**
10031  * G_TYPE_FROM_CLASS:
10032  * @g_class: Location of a valid #GTypeClass structure.
10033  *
10034  * Get the type identifier from a given @class structure.
10035  *
10036  * This macro should only be used in type implementations.
10037  *
10038  * Returns: the #GType
10039  */
10040
10041
10042 /**
10043  * G_TYPE_FROM_INSTANCE:
10044  * @instance: Location of a valid #GTypeInstance structure.
10045  *
10046  * Get the type identifier from a given @instance structure.
10047  *
10048  * This macro should only be used in type implementations.
10049  *
10050  * Returns: the #GType
10051  */
10052
10053
10054 /**
10055  * G_TYPE_FROM_INTERFACE:
10056  * @g_iface: Location of a valid #GTypeInterface structure.
10057  *
10058  * Get the type identifier from a given @interface structure.
10059  *
10060  * This macro should only be used in type implementations.
10061  *
10062  * Returns: the #GType
10063  */
10064
10065
10066 /**
10067  * G_TYPE_FUNDAMENTAL:
10068  * @type: A #GType value.
10069  *
10070  * The fundamental type which is the ancestor of @type.
10071  * Fundamental types are types that serve as ultimate bases for the derived types,
10072  * thus they are the roots of distinct inheritance hierarchies.
10073  */
10074
10075
10076 /**
10077  * G_TYPE_FUNDAMENTAL_MAX:
10078  *
10079  * An integer constant that represents the number of identifiers reserved
10080  * for types that are assigned at compile-time.
10081  */
10082
10083
10084 /**
10085  * G_TYPE_FUNDAMENTAL_SHIFT:
10086  *
10087  * Shift value used in converting numbers to type IDs.
10088  */
10089
10090
10091 /**
10092  * G_TYPE_GSTRING:
10093  *
10094  * The #GType for #GString.
10095  */
10096
10097
10098 /**
10099  * G_TYPE_GTYPE:
10100  *
10101  * The type for #GType.
10102  */
10103
10104
10105 /**
10106  * G_TYPE_HASH_TABLE:
10107  *
10108  * The #GType for a boxed type holding a #GHashTable reference.
10109  *
10110  * Since: 2.10
10111  */
10112
10113
10114 /**
10115  * G_TYPE_HAS_VALUE_TABLE:
10116  * @type: A #GType value.
10117  *
10118  * Checks if @type has a #GTypeValueTable.
10119  *
10120  * Returns: %TRUE on success.
10121  */
10122
10123
10124 /**
10125  * G_TYPE_INITIALLY_UNOWNED:
10126  *
10127  * The type for #GInitiallyUnowned.
10128  */
10129
10130
10131 /**
10132  * G_TYPE_INSTANCE_GET_CLASS:
10133  * @instance: Location of the #GTypeInstance structure.
10134  * @g_type: The #GType of the class to be returned.
10135  * @c_type: The C type of the class structure.
10136  *
10137  * Get the class structure of a given @instance, casted
10138  * to a specified ancestor type @g_type of the instance.
10139  *
10140  * Note that while calling a GInstanceInitFunc(), the class pointer gets
10141  * modified, so it might not always return the expected pointer.
10142  *
10143  * This macro should only be used in type implementations.
10144  *
10145  * Returns: a pointer to the class structure
10146  */
10147
10148
10149 /**
10150  * G_TYPE_INSTANCE_GET_INTERFACE:
10151  * @instance: Location of the #GTypeInstance structure.
10152  * @g_type: The #GType of the interface to be returned.
10153  * @c_type: The C type of the interface structure.
10154  *
10155  * Get the interface structure for interface @g_type of a given @instance.
10156  *
10157  * This macro should only be used in type implementations.
10158  *
10159  * Returns: a pointer to the interface structure
10160  */
10161
10162
10163 /**
10164  * G_TYPE_INSTANCE_GET_PRIVATE:
10165  * @instance: the instance of a type deriving from @private_type.
10166  * @g_type: the type identifying which private data to retrieve.
10167  * @c_type: The C type for the private structure.
10168  *
10169  * Gets the private structure for a particular type.
10170  * The private structure must have been registered in the
10171  * class_init function with g_type_class_add_private().
10172  *
10173  * This macro should only be used in type implementations.
10174  *
10175  * Since: 2.4
10176  * Returns: a pointer to the private data structure.
10177  */
10178
10179
10180 /**
10181  * G_TYPE_INT:
10182  *
10183  * The fundamental type corresponding to #gint.
10184  */
10185
10186
10187 /**
10188  * G_TYPE_INT64:
10189  *
10190  * The fundamental type corresponding to #gint64.
10191  */
10192
10193
10194 /**
10195  * G_TYPE_INTERFACE:
10196  *
10197  * The fundamental type from which all interfaces are derived.
10198  */
10199
10200
10201 /**
10202  * G_TYPE_INVALID:
10203  *
10204  * An invalid #GType used as error return value in some functions which return
10205  * a #GType.
10206  */
10207
10208
10209 /**
10210  * G_TYPE_IO_CHANNEL:
10211  *
10212  * The #GType for #GIOChannel.
10213  */
10214
10215
10216 /**
10217  * G_TYPE_IO_CONDITION:
10218  *
10219  * The #GType for #GIOCondition.
10220  */
10221
10222
10223 /**
10224  * G_TYPE_IS_ABSTRACT:
10225  * @type: A #GType value.
10226  *
10227  * Checks if @type is an abstract type.  An abstract type cannot be
10228  * instantiated and is normally used as an abstract base class for
10229  * derived classes.
10230  *
10231  * Returns: %TRUE on success.
10232  */
10233
10234
10235 /**
10236  * G_TYPE_IS_CLASSED:
10237  * @type: A #GType value.
10238  *
10239  * Checks if @type is a classed type.
10240  *
10241  * Returns: %TRUE on success.
10242  */
10243
10244
10245 /**
10246  * G_TYPE_IS_DEEP_DERIVABLE:
10247  * @type: A #GType value.
10248  *
10249  * Checks if @type is a deep derivable type.  A deep derivable type
10250  * can be used as the base class of a deep (multi-level) class hierarchy.
10251  *
10252  * Returns: %TRUE on success.
10253  */
10254
10255
10256 /**
10257  * G_TYPE_IS_DERIVABLE:
10258  * @type: A #GType value.
10259  *
10260  * Checks if @type is a derivable type.  A derivable type can
10261  * be used as the base class of a flat (single-level) class hierarchy.
10262  *
10263  * Returns: %TRUE on success.
10264  */
10265
10266
10267 /**
10268  * G_TYPE_IS_DERIVED:
10269  * @type: A #GType value.
10270  *
10271  * Checks if @type is derived (or in object-oriented terminology:
10272  * inherited) from another type (this holds true for all non-fundamental
10273  * types).
10274  *
10275  * Returns: %TRUE on success.
10276  */
10277
10278
10279 /**
10280  * G_TYPE_IS_ENUM:
10281  * @type: a #GType ID.
10282  *
10283  * Checks whether @type "is a" %G_TYPE_ENUM.
10284  *
10285  * Returns: %TRUE if @type "is a" %G_TYPE_ENUM.
10286  */
10287
10288
10289 /**
10290  * G_TYPE_IS_FLAGS:
10291  * @type: a #GType ID.
10292  *
10293  * Checks whether @type "is a" %G_TYPE_FLAGS.
10294  *
10295  * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS.
10296  */
10297
10298
10299 /**
10300  * G_TYPE_IS_FUNDAMENTAL:
10301  * @type: A #GType value.
10302  *
10303  * Checks if @type is a fundamental type.
10304  *
10305  * Returns: %TRUE on success.
10306  */
10307
10308
10309 /**
10310  * G_TYPE_IS_INSTANTIATABLE:
10311  * @type: A #GType value.
10312  *
10313  * Checks if @type can be instantiated.  Instantiation is the
10314  * process of creating an instance (object) of this type.
10315  *
10316  * Returns: %TRUE on success.
10317  */
10318
10319
10320 /**
10321  * G_TYPE_IS_INTERFACE:
10322  * @type: A #GType value.
10323  *
10324  * Checks if @type is an interface type.
10325  * An interface type provides a pure API, the implementation
10326  * of which is provided by another type (which is then said to conform
10327  * to the interface).  GLib interfaces are somewhat analogous to Java
10328  * interfaces and C++ classes containing only pure virtual functions,
10329  * with the difference that GType interfaces are not derivable (but see
10330  * g_type_interface_add_prerequisite() for an alternative).
10331  *
10332  * Returns: %TRUE on success.
10333  */
10334
10335
10336 /**
10337  * G_TYPE_IS_OBJECT:
10338  * @type: Type id to check
10339  *
10340  * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it.
10341  *
10342  * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT.
10343  */
10344
10345
10346 /**
10347  * G_TYPE_IS_PARAM:
10348  * @type: a #GType ID
10349  *
10350  * Checks whether @type "is a" %G_TYPE_PARAM.
10351  */
10352
10353
10354 /**
10355  * G_TYPE_IS_VALUE:
10356  * @type: A #GType value.
10357  *
10358  * Checks whether the passed in type ID can be used for g_value_init().
10359  * That is, this macro checks whether this type provides an implementation
10360  * of the #GTypeValueTable functions required for a type to create a #GValue of.
10361  *
10362  * Returns: Whether @type is suitable as a #GValue type.
10363  */
10364
10365
10366 /**
10367  * G_TYPE_IS_VALUE_ABSTRACT:
10368  * @type: A #GType value.
10369  *
10370  * Checks if @type is an abstract value type.  An abstract value type introduces
10371  * a value table, but can't be used for g_value_init() and is normally used as
10372  * an abstract base type for derived value types.
10373  *
10374  * Returns: %TRUE on success.
10375  */
10376
10377
10378 /**
10379  * G_TYPE_IS_VALUE_TYPE:
10380  * @type: A #GType value.
10381  *
10382  * Checks if @type is a value type and can be used with g_value_init().
10383  *
10384  * Returns: %TRUE on success.
10385  */
10386
10387
10388 /**
10389  * G_TYPE_LONG:
10390  *
10391  * The fundamental type corresponding to #glong.
10392  */
10393
10394
10395 /**
10396  * G_TYPE_MAKE_FUNDAMENTAL:
10397  * @x: the fundamental type number.
10398  *
10399  * Get the type ID for the fundamental type number @x.
10400  * Use g_type_fundamental_next() instead of this macro to create new fundamental
10401  * types.
10402  *
10403  * Returns: the GType
10404  */
10405
10406
10407 /**
10408  * G_TYPE_MATCH_INFO:
10409  *
10410  * The #GType for a boxed type holding a #GMatchInfo reference.
10411  *
10412  * Since: 2.30
10413  */
10414
10415
10416 /**
10417  * G_TYPE_NONE:
10418  *
10419  * A fundamental type which is used as a replacement for the C
10420  * <literal>void</literal> return type.
10421  */
10422
10423
10424 /**
10425  * G_TYPE_OBJECT:
10426  *
10427  * The fundamental type for #GObject.
10428  */
10429
10430
10431 /**
10432  * G_TYPE_PARAM:
10433  *
10434  * The fundamental type from which all #GParamSpec types are derived.
10435  */
10436
10437
10438 /**
10439  * G_TYPE_PARAM_BOOLEAN:
10440  *
10441  * The #GType of #GParamSpecBoolean.
10442  */
10443
10444
10445 /**
10446  * G_TYPE_PARAM_BOXED:
10447  *
10448  * The #GType of #GParamSpecBoxed.
10449  */
10450
10451
10452 /**
10453  * G_TYPE_PARAM_CHAR:
10454  *
10455  * The #GType of #GParamSpecChar.
10456  */
10457
10458
10459 /**
10460  * G_TYPE_PARAM_DOUBLE:
10461  *
10462  * The #GType of #GParamSpecDouble.
10463  */
10464
10465
10466 /**
10467  * G_TYPE_PARAM_ENUM:
10468  *
10469  * The #GType of #GParamSpecEnum.
10470  */
10471
10472
10473 /**
10474  * G_TYPE_PARAM_FLAGS:
10475  *
10476  * The #GType of #GParamSpecFlags.
10477  */
10478
10479
10480 /**
10481  * G_TYPE_PARAM_FLOAT:
10482  *
10483  * The #GType of #GParamSpecFloat.
10484  */
10485
10486
10487 /**
10488  * G_TYPE_PARAM_GTYPE:
10489  *
10490  * The #GType of #GParamSpecGType.
10491  *
10492  * Since: 2.10
10493  */
10494
10495
10496 /**
10497  * G_TYPE_PARAM_INT:
10498  *
10499  * The #GType of #GParamSpecInt.
10500  */
10501
10502
10503 /**
10504  * G_TYPE_PARAM_INT64:
10505  *
10506  * The #GType of #GParamSpecInt64.
10507  */
10508
10509
10510 /**
10511  * G_TYPE_PARAM_LONG:
10512  *
10513  * The #GType of #GParamSpecLong.
10514  */
10515
10516
10517 /**
10518  * G_TYPE_PARAM_OBJECT:
10519  *
10520  * The #GType of #GParamSpecObject.
10521  */
10522
10523
10524 /**
10525  * G_TYPE_PARAM_OVERRIDE:
10526  *
10527  * The #GType of #GParamSpecOverride.
10528  *
10529  * Since: 2.4
10530  */
10531
10532
10533 /**
10534  * G_TYPE_PARAM_PARAM:
10535  *
10536  * The #GType of #GParamSpecParam.
10537  */
10538
10539
10540 /**
10541  * G_TYPE_PARAM_POINTER:
10542  *
10543  * The #GType of #GParamSpecPointer.
10544  */
10545
10546
10547 /**
10548  * G_TYPE_PARAM_STRING:
10549  *
10550  * The #GType of #GParamSpecString.
10551  */
10552
10553
10554 /**
10555  * G_TYPE_PARAM_UCHAR:
10556  *
10557  * The #GType of #GParamSpecUChar.
10558  */
10559
10560
10561 /**
10562  * G_TYPE_PARAM_UINT:
10563  *
10564  * The #GType of #GParamSpecUInt.
10565  */
10566
10567
10568 /**
10569  * G_TYPE_PARAM_UINT64:
10570  *
10571  * The #GType of #GParamSpecUInt64.
10572  */
10573
10574
10575 /**
10576  * G_TYPE_PARAM_ULONG:
10577  *
10578  * The #GType of #GParamSpecULong.
10579  */
10580
10581
10582 /**
10583  * G_TYPE_PARAM_UNICHAR:
10584  *
10585  * The #GType of #GParamSpecUnichar.
10586  */
10587
10588
10589 /**
10590  * G_TYPE_PARAM_VALUE_ARRAY:
10591  *
10592  * The #GType of #GParamSpecValueArray.
10593  */
10594
10595
10596 /**
10597  * G_TYPE_PARAM_VARIANT:
10598  *
10599  * The #GType of #GParamSpecVariant.
10600  *
10601  * Since: 2.26
10602  */
10603
10604
10605 /**
10606  * G_TYPE_POINTER:
10607  *
10608  * The fundamental type corresponding to #gpointer.
10609  */
10610
10611
10612 /**
10613  * G_TYPE_PTR_ARRAY:
10614  *
10615  * The #GType for a boxed type holding a #GPtrArray reference.
10616  *
10617  * Since: 2.22
10618  */
10619
10620
10621 /**
10622  * G_TYPE_REGEX:
10623  *
10624  * The #GType for a boxed type holding a #GRegex reference.
10625  *
10626  * Since: 2.14
10627  */
10628
10629
10630 /**
10631  * G_TYPE_RESERVED_BSE_FIRST:
10632  *
10633  * First fundamental type number to create a new fundamental type id with
10634  * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
10635  */
10636
10637
10638 /**
10639  * G_TYPE_RESERVED_BSE_LAST:
10640  *
10641  * Last fundamental type number reserved for BSE.
10642  */
10643
10644
10645 /**
10646  * G_TYPE_RESERVED_GLIB_FIRST:
10647  *
10648  * First fundamental type number to create a new fundamental type id with
10649  * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
10650  */
10651
10652
10653 /**
10654  * G_TYPE_RESERVED_GLIB_LAST:
10655  *
10656  * Last fundamental type number reserved for GLib.
10657  */
10658
10659
10660 /**
10661  * G_TYPE_RESERVED_USER_FIRST:
10662  *
10663  * First available fundamental type number to create new fundamental
10664  * type id with G_TYPE_MAKE_FUNDAMENTAL().
10665  */
10666
10667
10668 /**
10669  * G_TYPE_STRING:
10670  *
10671  * The fundamental type corresponding to nul-terminated C strings.
10672  */
10673
10674
10675 /**
10676  * G_TYPE_STRV:
10677  *
10678  * The #GType for a boxed type holding a %NULL-terminated array of strings.
10679  *
10680  * The code fragments in the following example show the use of a property of
10681  * type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
10682  * and g_object_get().
10683  *
10684  * |[
10685  * g_object_class_install_property (object_class,
10686  * PROP_AUTHORS,
10687  * g_param_spec_boxed ("authors",
10688  * _("Authors"),
10689  * _("List of authors"),
10690  * G_TYPE_STRV,
10691  * G_PARAM_READWRITE));
10692  *
10693  * gchar *authors[] = { "Owen", "Tim", NULL };
10694  * g_object_set (obj, "authors", authors, NULL);
10695  *
10696  * gchar *writers[];
10697  * g_object_get (obj, "authors", &writers, NULL);
10698  * /&ast; do something with writers &ast;/
10699  * g_strfreev (writers);
10700  * ]|
10701  *
10702  * Since: 2.4
10703  */
10704
10705
10706 /**
10707  * G_TYPE_UCHAR:
10708  *
10709  * The fundamental type corresponding to #guchar.
10710  */
10711
10712
10713 /**
10714  * G_TYPE_UINT:
10715  *
10716  * The fundamental type corresponding to #guint.
10717  */
10718
10719
10720 /**
10721  * G_TYPE_UINT64:
10722  *
10723  * The fundamental type corresponding to #guint64.
10724  */
10725
10726
10727 /**
10728  * G_TYPE_ULONG:
10729  *
10730  * The fundamental type corresponding to #gulong.
10731  */
10732
10733
10734 /**
10735  * G_TYPE_VALUE:
10736  *
10737  * The type ID of the "GValue" type which is a boxed type,
10738  * used to pass around pointers to GValues.
10739  */
10740
10741
10742 /**
10743  * G_TYPE_VALUE_ARRAY:
10744  *
10745  * The type ID of the "GValueArray" type which is a boxed type,
10746  * used to pass around pointers to GValueArrays.
10747  */
10748
10749
10750 /**
10751  * G_TYPE_VARIANT:
10752  *
10753  * The fundamental type corresponding to #GVariant.
10754  *
10755  * All floating #GVariant instances passed through the #GType system are
10756  * consumed.
10757  *
10758  * Note that callbacks in closures, and signal handlers
10759  * for signals of return type %G_TYPE_VARIANT, must never return floating
10760  * variants.
10761  *
10762  * Note: GLib 2.24 did include a boxed type with this name. It was replaced
10763  * with this fundamental type in 2.26.
10764  *
10765  * Since: 2.26
10766  */
10767
10768
10769 /**
10770  * G_TYPE_VARIANT_BUILDER:
10771  *
10772  * The #GType for a boxed type holding a #GVariantBuilder.
10773  *
10774  * Since: 2.30
10775  */
10776
10777
10778 /**
10779  * G_TYPE_VARIANT_TYPE:
10780  *
10781  * The #GType for a boxed type holding a #GVariantType.
10782  *
10783  * Since: 2.24
10784  */
10785
10786
10787 /**
10788  * G_UNICODE_COMBINING_MARK:
10789  *
10790  * Older name for %G_UNICODE_SPACING_MARK.
10791  *
10792  * Deprecated: 2.30: Use %G_UNICODE_SPACING_MARK.
10793  */
10794
10795
10796 /**
10797  * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH:
10798  *
10799  * Allowed characters in a path. Includes "!$&'()*+,;=:@/".
10800  */
10801
10802
10803 /**
10804  * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT:
10805  *
10806  * Allowed characters in path elements. Includes "!$&'()*+,;=:@".
10807  */
10808
10809
10810 /**
10811  * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO:
10812  *
10813  * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".
10814  */
10815
10816
10817 /**
10818  * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS:
10819  *
10820  * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".
10821  */
10822
10823
10824 /**
10825  * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS:
10826  *
10827  * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
10828  */
10829
10830
10831 /**
10832  * G_VALUE_HOLDS:
10833  * @value: A #GValue structure.
10834  * @type: A #GType value.
10835  *
10836  * Checks if @value holds (or contains) a value of @type.
10837  * This macro will also check for @value != %NULL and issue a
10838  * warning if the check fails.
10839  *
10840  * Returns: %TRUE if @value holds the @type.
10841  */
10842
10843
10844 /**
10845  * G_VALUE_HOLDS_BOOLEAN:
10846  * @value: a valid #GValue structure
10847  *
10848  * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN.
10849  *
10850  * Returns: %TRUE on success.
10851  */
10852
10853
10854 /**
10855  * G_VALUE_HOLDS_BOXED:
10856  * @value: a valid #GValue structure
10857  *
10858  * Checks whether the given #GValue can hold values derived
10859  * from type %G_TYPE_BOXED.
10860  *
10861  * Returns: %TRUE on success.
10862  */
10863
10864
10865 /**
10866  * G_VALUE_HOLDS_CHAR:
10867  * @value: a valid #GValue structure
10868  *
10869  * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR.
10870  *
10871  * Returns: %TRUE on success.
10872  */
10873
10874
10875 /**
10876  * G_VALUE_HOLDS_DOUBLE:
10877  * @value: a valid #GValue structure
10878  *
10879  * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE.
10880  *
10881  * Returns: %TRUE on success.
10882  */
10883
10884
10885 /**
10886  * G_VALUE_HOLDS_ENUM:
10887  * @value: a valid #GValue structure
10888  *
10889  * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM.
10890  *
10891  * Returns: %TRUE on success.
10892  */
10893
10894
10895 /**
10896  * G_VALUE_HOLDS_FLAGS:
10897  * @value: a valid #GValue structure
10898  *
10899  * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS.
10900  *
10901  * Returns: %TRUE on success.
10902  */
10903
10904
10905 /**
10906  * G_VALUE_HOLDS_FLOAT:
10907  * @value: a valid #GValue structure
10908  *
10909  * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT.
10910  *
10911  * Returns: %TRUE on success.
10912  */
10913
10914
10915 /**
10916  * G_VALUE_HOLDS_GTYPE:
10917  * @value: a valid #GValue structure
10918  *
10919  * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE.
10920  *
10921  * Since: 2.12
10922  * Returns: %TRUE on success.
10923  */
10924
10925
10926 /**
10927  * G_VALUE_HOLDS_INT:
10928  * @value: a valid #GValue structure
10929  *
10930  * Checks whether the given #GValue can hold values of type %G_TYPE_INT.
10931  *
10932  * Returns: %TRUE on success.
10933  */
10934
10935
10936 /**
10937  * G_VALUE_HOLDS_INT64:
10938  * @value: a valid #GValue structure
10939  *
10940  * Checks whether the given #GValue can hold values of type %G_TYPE_INT64.
10941  *
10942  * Returns: %TRUE on success.
10943  */
10944
10945
10946 /**
10947  * G_VALUE_HOLDS_LONG:
10948  * @value: a valid #GValue structure
10949  *
10950  * Checks whether the given #GValue can hold values of type %G_TYPE_LONG.
10951  *
10952  * Returns: %TRUE on success.
10953  */
10954
10955
10956 /**
10957  * G_VALUE_HOLDS_OBJECT:
10958  * @value: a valid #GValue structure
10959  *
10960  * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT.
10961  *
10962  * Returns: %TRUE on success.
10963  */
10964
10965
10966 /**
10967  * G_VALUE_HOLDS_PARAM:
10968  * @value: a valid #GValue structure
10969  *
10970  * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM.
10971  *
10972  * Returns: %TRUE on success.
10973  */
10974
10975
10976 /**
10977  * G_VALUE_HOLDS_POINTER:
10978  * @value: a valid #GValue structure
10979  *
10980  * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER.
10981  *
10982  * Returns: %TRUE on success.
10983  */
10984
10985
10986 /**
10987  * G_VALUE_HOLDS_STRING:
10988  * @value: a valid #GValue structure
10989  *
10990  * Checks whether the given #GValue can hold values of type %G_TYPE_STRING.
10991  *
10992  * Returns: %TRUE on success.
10993  */
10994
10995
10996 /**
10997  * G_VALUE_HOLDS_UCHAR:
10998  * @value: a valid #GValue structure
10999  *
11000  * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR.
11001  *
11002  * Returns: %TRUE on success.
11003  */
11004
11005
11006 /**
11007  * G_VALUE_HOLDS_UINT:
11008  * @value: a valid #GValue structure
11009  *
11010  * Checks whether the given #GValue can hold values of type %G_TYPE_UINT.
11011  *
11012  * Returns: %TRUE on success.
11013  */
11014
11015
11016 /**
11017  * G_VALUE_HOLDS_UINT64:
11018  * @value: a valid #GValue structure
11019  *
11020  * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64.
11021  *
11022  * Returns: %TRUE on success.
11023  */
11024
11025
11026 /**
11027  * G_VALUE_HOLDS_ULONG:
11028  * @value: a valid #GValue structure
11029  *
11030  * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG.
11031  *
11032  * Returns: %TRUE on success.
11033  */
11034
11035
11036 /**
11037  * G_VALUE_HOLDS_VARIANT:
11038  * @value: a valid #GValue structure
11039  *
11040  * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT.
11041  *
11042  * Returns: %TRUE on success.
11043  * Since: 2.26
11044  */
11045
11046
11047 /**
11048  * G_VALUE_INIT:
11049  *
11050  * A #GValue must be initialized before it can be used.
11051  * This macro can be used as initializer instead of an explicit
11052  * <literal>{ 0 }</literal> when declaring a variable,
11053  * but it cannot be assigned to a variable.
11054  *
11055  * |[
11056  * GValue value = G_VALUE_INIT;
11057  * ]|
11058  *
11059  * Since: 2.30
11060  */
11061
11062
11063 /**
11064  * G_VALUE_NOCOPY_CONTENTS:
11065  *
11066  * If passed to G_VALUE_COLLECT(), allocated data won't be copied
11067  * but used verbatim. This does not affect ref-counted types like
11068  * objects. For more details, see the #GValueTable documentation.
11069  */
11070
11071
11072 /**
11073  * G_VALUE_TYPE:
11074  * @value: A #GValue structure.
11075  *
11076  * Get the type identifier of @value.
11077  *
11078  * Returns: the #GType.
11079  */
11080
11081
11082 /**
11083  * G_VALUE_TYPE_NAME:
11084  * @value: A #GValue structure.
11085  *
11086  * Gets the the type name of @value.
11087  *
11088  * Returns: the type name.
11089  */
11090
11091
11092 /**
11093  * G_VARIANT_TYPE:
11094  * @type_string: a well-formed #GVariantType type string
11095  *
11096  * Converts a string to a const #GVariantType.  Depending on the
11097  * current debugging level, this function may perform a runtime check
11098  * to ensure that @string is a valid GVariant type string.
11099  *
11100  * It is always a programmer error to use this macro with an invalid
11101  * type string.
11102  *
11103  * Since 2.24
11104  */
11105
11106
11107 /**
11108  * G_VARIANT_TYPE_ANY:
11109  *
11110  * An indefinite type that is a supertype of every type (including
11111  * itself).
11112  */
11113
11114
11115 /**
11116  * G_VARIANT_TYPE_ARRAY:
11117  *
11118  * An indefinite type that is a supertype of every array type.
11119  */
11120
11121
11122 /**
11123  * G_VARIANT_TYPE_BASIC:
11124  *
11125  * An indefinite type that is a supertype of every basic (ie:
11126  * non-container) type.
11127  */
11128
11129
11130 /**
11131  * G_VARIANT_TYPE_BOOLEAN:
11132  *
11133  * The type of a value that can be either %TRUE or %FALSE.
11134  */
11135
11136
11137 /**
11138  * G_VARIANT_TYPE_BYTE:
11139  *
11140  * The type of an integer value that can range from 0 to 255.
11141  */
11142
11143
11144 /**
11145  * G_VARIANT_TYPE_BYTESTRING:
11146  *
11147  * The type of an array of bytes.  This type is commonly used to pass
11148  * around strings that may not be valid utf8.  In that case, the
11149  * convention is that the nul terminator character should be included as
11150  * the last character in the array.
11151  */
11152
11153
11154 /**
11155  * G_VARIANT_TYPE_BYTESTRING_ARRAY:
11156  *
11157  * The type of an array of byte strings (an array of arrays of bytes).
11158  */
11159
11160
11161 /**
11162  * G_VARIANT_TYPE_DICTIONARY:
11163  *
11164  * An indefinite type that is a supertype of every dictionary type --
11165  * that is, any array type that has an element type equal to any
11166  * dictionary entry type.
11167  */
11168
11169
11170 /**
11171  * G_VARIANT_TYPE_DICT_ENTRY:
11172  *
11173  * An indefinite type that is a supertype of every dictionary entry
11174  * type.
11175  */
11176
11177
11178 /**
11179  * G_VARIANT_TYPE_DOUBLE:
11180  *
11181  * The type of a double precision IEEE754 floating point number.
11182  * These guys go up to about 1.80e308 (plus and minus) but miss out on
11183  * some numbers in between.  In any case, that's far greater than the
11184  * estimated number of fundamental particles in the observable
11185  * universe.
11186  */
11187
11188
11189 /**
11190  * G_VARIANT_TYPE_HANDLE:
11191  *
11192  * The type of a 32bit signed integer value, that by convention, is used
11193  * as an index into an array of file descriptors that are sent alongside
11194  * a D-Bus message.
11195  *
11196  * If you are not interacting with D-Bus, then there is no reason to make
11197  * use of this type.
11198  */
11199
11200
11201 /**
11202  * G_VARIANT_TYPE_INT16:
11203  *
11204  * The type of an integer value that can range from -32768 to 32767.
11205  */
11206
11207
11208 /**
11209  * G_VARIANT_TYPE_INT32:
11210  *
11211  * The type of an integer value that can range from -2147483648 to
11212  * 2147483647.
11213  */
11214
11215
11216 /**
11217  * G_VARIANT_TYPE_INT64:
11218  *
11219  * The type of an integer value that can range from
11220  * -9223372036854775808 to 9223372036854775807.
11221  */
11222
11223
11224 /**
11225  * G_VARIANT_TYPE_MAYBE:
11226  *
11227  * An indefinite type that is a supertype of every maybe type.
11228  */
11229
11230
11231 /**
11232  * G_VARIANT_TYPE_OBJECT_PATH:
11233  *
11234  * The type of a D-Bus object reference.  These are strings of a
11235  * specific format used to identify objects at a given destination on
11236  * the bus.
11237  *
11238  * If you are not interacting with D-Bus, then there is no reason to make
11239  * use of this type.  If you are, then the D-Bus specification contains a
11240  * precise description of valid object paths.
11241  */
11242
11243
11244 /**
11245  * G_VARIANT_TYPE_OBJECT_PATH_ARRAY:
11246  *
11247  * The type of an array of object paths.
11248  */
11249
11250
11251 /**
11252  * G_VARIANT_TYPE_SIGNATURE:
11253  *
11254  * The type of a D-Bus type signature.  These are strings of a specific
11255  * format used as type signatures for D-Bus methods and messages.
11256  *
11257  * If you are not interacting with D-Bus, then there is no reason to make
11258  * use of this type.  If you are, then the D-Bus specification contains a
11259  * precise description of valid signature strings.
11260  */
11261
11262
11263 /**
11264  * G_VARIANT_TYPE_STRING:
11265  *
11266  * The type of a string.  "" is a string.  %NULL is not a string.
11267  */
11268
11269
11270 /**
11271  * G_VARIANT_TYPE_STRING_ARRAY:
11272  *
11273  * The type of an array of strings.
11274  */
11275
11276
11277 /**
11278  * G_VARIANT_TYPE_TUPLE:
11279  *
11280  * An indefinite type that is a supertype of every tuple type,
11281  * regardless of the number of items in the tuple.
11282  */
11283
11284
11285 /**
11286  * G_VARIANT_TYPE_UINT16:
11287  *
11288  * The type of an integer value that can range from 0 to 65535.
11289  * There were about this many people living in Toronto in the 1870s.
11290  */
11291
11292
11293 /**
11294  * G_VARIANT_TYPE_UINT32:
11295  *
11296  * The type of an integer value that can range from 0 to 4294967295.
11297  * That's one number for everyone who was around in the late 1970s.
11298  */
11299
11300
11301 /**
11302  * G_VARIANT_TYPE_UINT64:
11303  *
11304  * The type of an integer value that can range from 0 to
11305  * 18446744073709551616.  That's a really big number, but a Rubik's
11306  * cube can have a bit more than twice as many possible positions.
11307  */
11308
11309
11310 /**
11311  * G_VARIANT_TYPE_UNIT:
11312  *
11313  * The empty tuple type.  Has only one instance.  Known also as "triv"
11314  * or "void".
11315  */
11316
11317
11318 /**
11319  * G_VARIANT_TYPE_VARDICT:
11320  *
11321  * The type of a dictionary mapping strings to variants (the ubiquitous
11322  * "a{sv}" type).
11323  *
11324  * Since: 2.30
11325  */
11326
11327
11328 /**
11329  * G_VARIANT_TYPE_VARIANT:
11330  *
11331  * The type of a box that contains any other value (including another
11332  * variant).
11333  */
11334
11335
11336 /**
11337  * G_VFS_EXTENSION_POINT_NAME:
11338  *
11339  * Extension point for #GVfs functionality.
11340  * See <link linkend="extending-gio">Extending GIO</link>.
11341  */
11342
11343
11344 /**
11345  * G_VOLUME_IDENTIFIER_KIND_HAL_UDI:
11346  *
11347  * The string used to obtain a Hal UDI with g_volume_get_identifier().
11348  */
11349
11350
11351 /**
11352  * G_VOLUME_IDENTIFIER_KIND_LABEL:
11353  *
11354  * The string used to obtain a filesystem label with g_volume_get_identifier().
11355  */
11356
11357
11358 /**
11359  * G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT:
11360  *
11361  * The string used to obtain a NFS mount with g_volume_get_identifier().
11362  */
11363
11364
11365 /**
11366  * G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE:
11367  *
11368  * The string used to obtain a Unix device path with g_volume_get_identifier().
11369  */
11370
11371
11372 /**
11373  * G_VOLUME_IDENTIFIER_KIND_UUID:
11374  *
11375  * The string used to obtain a UUID with g_volume_get_identifier().
11376  */
11377
11378
11379 /**
11380  * G_VOLUME_MONITOR_EXTENSION_POINT_NAME:
11381  *
11382  * Extension point for volume monitor functionality.
11383  * See <link linkend="extending-gio">Extending GIO</link>.
11384  */
11385
11386
11387 /**
11388  * SECTION:extensionpoints
11389  * @short_description: Extension Points
11390  * @include: gio.h
11391  * @see_also: <link linkend="extending-gio">Extending GIO</link>
11392  *
11393  * #GIOExtensionPoint provides a mechanism for modules to extend the
11394  * functionality of the library or application that loaded it in an
11395  * organized fashion.
11396  *
11397  * An extension point is identified by a name, and it may optionally
11398  * require that any implementation must by of a certain type (or derived
11399  * thereof). Use g_io_extension_point_register() to register an
11400  * extension point, and g_io_extension_point_set_required_type() to
11401  * set a required type.
11402  *
11403  * A module can implement an extension point by specifying the #GType
11404  * that implements the functionality. Additionally, each implementation
11405  * of an extension point has a name, and a priority. Use
11406  * g_io_extension_point_implement() to implement an extension point.
11407  *
11408  * |[
11409  * GIOExtensionPoint *ep;
11410  *
11411  * /&ast; Register an extension point &ast;/
11412  * ep = g_io_extension_point_register ("my-extension-point");
11413  * g_io_extension_point_set_required_type (ep, MY_TYPE_EXAMPLE);
11414  * ]|
11415  *
11416  * |[
11417  * /&ast; Implement an extension point &ast;/
11418  * G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE);
11419  * g_io_extension_point_implement ("my-extension-point",
11420  * my_example_impl_get_type (),
11421  * "my-example",
11422  * 10);
11423  * ]|
11424  *
11425  * It is up to the code that registered the extension point how
11426  * it uses the implementations that have been associated with it.
11427  * Depending on the use case, it may use all implementations, or
11428  * only the one with the highest priority, or pick a specific
11429  * one by name.
11430  *
11431  * To avoid opening all modules just to find out what extension
11432  * points they implement, GIO makes use of a caching mechanism,
11433  * see <link linkend="gio-querymodules">gio-querymodules</link>.
11434  * You are expected to run this command after installing a
11435  * GIO module.
11436  */
11437
11438
11439 /**
11440  * SECTION:gaction
11441  * @title: GAction
11442  * @short_description: An action
11443  *
11444  * #GAction represents a single named action.
11445  *
11446  * The main interface to an action is that it can be activated with
11447  * g_action_activate().  This results in the 'activate' signal being
11448  * emitted.  An activation has a #GVariant parameter (which may be
11449  * %NULL).  The correct type for the parameter is determined by a static
11450  * parameter type (which is given at construction time).
11451  *
11452  * An action may optionally have a state, in which case the state may be
11453  * set with g_action_change_state().  This call takes a #GVariant.  The
11454  * correct type for the state is determined by a static state type
11455  * (which is given at construction time).
11456  *
11457  * The state may have a hint associated with it, specifying its valid
11458  * range.
11459  *
11460  * #GAction is merely the interface to the concept of an action, as
11461  * described above.  Various implementations of actions exist, including
11462  * #GSimpleAction and #GtkAction.
11463  *
11464  * In all cases, the implementing class is responsible for storing the
11465  * name of the action, the parameter type, the enabled state, the
11466  * optional state type and the state and emitting the appropriate
11467  * signals when these change.  The implementor responsible for filtering
11468  * calls to g_action_activate() and g_action_change_state() for type
11469  * safety and for the state being enabled.
11470  *
11471  * Probably the only useful thing to do with a #GAction is to put it
11472  * inside of a #GSimpleActionGroup.
11473  */
11474
11475
11476 /**
11477  * SECTION:gactiongroup
11478  * @title: GActionGroup
11479  * @short_description: A group of actions
11480  *
11481  * #GActionGroup represents a group of actions.
11482  *
11483  * Each action in the group has a unique name (which is a string).  All
11484  * method calls, except g_action_group_list_actions() take the name of
11485  * an action as an argument.
11486  *
11487  * The #GActionGroup API is meant to be the 'public' API to the action
11488  * group.  The calls here are exactly the interaction that 'external
11489  * forces' (eg: UI, incoming D-Bus messages, etc.) are supposed to have
11490  * with actions.  'Internal' APIs (ie: ones meant only to be accessed by
11491  * the action group implementation) are found on subclasses.  This is
11492  * why you will find -- for example -- g_action_group_get_action_enabled()
11493  * but not an equivalent <function>set()</function> call.
11494  *
11495  * Signals are emitted on the action group in response to state changes
11496  * on individual actions.
11497  */
11498
11499
11500 /**
11501  * SECTION:gappinfo
11502  * @short_description: Application information and launch contexts
11503  * @include: gio/gio.h
11504  *
11505  * #GAppInfo and #GAppLaunchContext are used for describing and launching
11506  * applications installed on the system.
11507  *
11508  * As of GLib 2.20, URIs will always be converted to POSIX paths
11509  * (using g_file_get_path()) when using g_app_info_launch() even if
11510  * the application requested an URI and not a POSIX path. For example
11511  * for an desktop-file based application with Exec key <literal>totem
11512  * &percnt;U</literal> and a single URI,
11513  * <literal>sftp://foo/file.avi</literal>, then
11514  * <literal>/home/user/.gvfs/sftp on foo/file.avi</literal> will be
11515  * passed. This will only work if a set of suitable GIO extensions
11516  * (such as gvfs 2.26 compiled with FUSE support), is available and
11517  * operational; if this is not the case, the URI will be passed
11518  * unmodified to the application. Some URIs, such as
11519  * <literal>mailto:</literal>, of course cannot be mapped to a POSIX
11520  * path (in gvfs there's no FUSE mount for it); such URIs will be
11521  * passed unmodified to the application.
11522  *
11523  * Specifically for gvfs 2.26 and later, the POSIX URI will be mapped
11524  * back to the GIO URI in the #GFile constructors (since gvfs
11525  * implements the #GVfs extension point). As such, if the application
11526  * needs to examine the URI, it needs to use g_file_get_uri() or
11527  * similar on #GFile. In other words, an application cannot assume
11528  * that the URI passed to e.g. g_file_new_for_commandline_arg() is
11529  * equal to the result of g_file_get_uri(). The following snippet
11530  * illustrates this:
11531  *
11532  * <programlisting>
11533  * GFile *f;
11534  * char *uri;
11535  *
11536  * file = g_file_new_for_commandline_arg (uri_from_commandline);
11537  *
11538  * uri = g_file_get_uri (file);
11539  * strcmp (uri, uri_from_commandline) == 0; // FALSE
11540  * g_free (uri);
11541  *
11542  * if (g_file_has_uri_scheme (file, "cdda"))
11543  * {
11544  * // do something special with uri
11545  * }
11546  * g_object_unref (file);
11547  * </programlisting>
11548  *
11549  * This code will work when both <literal>cdda://sr0/Track
11550  * 1.wav</literal> and <literal>/home/user/.gvfs/cdda on sr0/Track
11551  * 1.wav</literal> is passed to the application. It should be noted
11552  * that it's generally not safe for applications to rely on the format
11553  * of a particular URIs. Different launcher applications (e.g. file
11554  * managers) may have different ideas of what a given URI means.
11555  */
11556
11557
11558 /**
11559  * SECTION:gapplication
11560  * @title: GApplication
11561  * @short_description: Core application class
11562  *
11563  * A #GApplication is the foundation of an application, unique for a
11564  * given application identifier.  The GApplication class wraps some
11565  * low-level platform-specific services and is intended to act as the
11566  * foundation for higher-level application classes such as
11567  * #GtkApplication or #MxApplication.  In general, you should not use
11568  * this class outside of a higher level framework.
11569  *
11570  * One of the core features that GApplication provides is process
11571  * uniqueness, in the context of a "session".  The session concept is
11572  * platform-dependent, but corresponds roughly to a graphical desktop
11573  * login.  When your application is launched again, its arguments
11574  * are passed through platform communication to the already running
11575  * program. The already running instance of the program is called the
11576  * <firstterm>primary instance</firstterm>.
11577  *
11578  * Before using GApplication, you must choose an "application identifier".
11579  * The expected form of an application identifier is very close to that of
11580  * of a <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-interface">DBus bus name</ulink>.
11581  * Examples include: "com.example.MyApp", "org.example.internal-apps.Calculator".
11582  * For details on valid application identifiers, see
11583  * g_application_id_is_valid().
11584  *
11585  * The application identifier is claimed by the application as a
11586  * well-known bus name on the user's session bus.  This means that the
11587  * uniqueness of your application is scoped to the current session.  It
11588  * also means that your application may provide additional services
11589  * (through registration of other object paths) at that bus name.
11590  *
11591  * The registration of these object paths should be done with the shared
11592  * GDBus session bus.  Note that due to the internal architecture of
11593  * GDBus, method calls can be dispatched at any time (even if a main
11594  * loop is not running).  For this reason, you must ensure that any
11595  * object paths that you wish to register are registered before
11596  * #GApplication attempts to acquire the bus name of your application
11597  * (which happens in g_application_register()).  Unfortunately, this
11598  * means that you cannot use g_application_get_is_remote() to decide if
11599  * you want to register object paths.
11600  *
11601  * GApplication provides convenient life cycle management by maintaining
11602  * a <firstterm>use count</firstterm> for the primary application instance.
11603  * The use count can be changed using g_application_hold() and
11604  * g_application_release(). If it drops to zero, the application exits.
11605  *
11606  * GApplication also implements the #GActionGroup interface and lets you
11607  * easily export actions by adding them with g_application_set_action_group().
11608  * When invoking an action by calling g_action_group_activate_action() on
11609  * the application, it is always invoked in the primary instance.
11610  *
11611  * There is a number of different entry points into a #GApplication:
11612  * <itemizedlist>
11613  * <listitem>via 'Activate' (i.e. just starting the application)</listitem>
11614  * <listitem>via 'Open' (i.e. opening some files)</listitem>
11615  * <listitem>by handling a command-line</listitem>
11616  * <listitem>via activating an action</listitem>
11617  * </itemizedlist>
11618  * The #GApplication::startup signal lets you handle the application
11619  * initialization for all of these in a single place.
11620  *
11621  * Regardless of which of these entry points is used to start the application,
11622  * GApplication passes some <firstterm id="platform-data">platform
11623  * data</firstterm> from the launching instance to the primary instance,
11624  * in the form of a #GVariant dictionary mapping strings to variants.
11625  * To use platform data, override the @before_emit or @after_emit virtual
11626  * functions in your #GApplication subclass. When dealing with
11627  * #GApplicationCommandline objects, the platform data is directly
11628  * available via g_application_command_line_get_cwd(),
11629  * g_application_command_line_get_environ() and
11630  * g_application_command_line_get_platform_data().
11631  *
11632  * As the name indicates, the platform data may vary depending on the
11633  * operating system, but it always includes the current directory (key
11634  * "cwd"), and optionally the environment (ie the set of environment
11635  * variables and their values) of the calling process (key "environ").
11636  * The environment is only added to the platform data if the
11637  * #G_APPLICATION_SEND_ENVIONMENT flag is set. GApplication subclasses
11638  * can add their own platform data by overriding the @add_platform_data
11639  * virtual function. For instance, #GtkApplication adds startup notification
11640  * data in this way.
11641  *
11642  * To parse commandline arguments you may handle the
11643  * #GApplication::command-line signal or override the local_command_line()
11644  * vfunc, to parse them in either the primary instance or the local instance,
11645  * respectively.
11646  *
11647  * <example id="gapplication-example-open"><title>Opening files with a GApplication</title>
11648  * <programlisting>
11649  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-open.c">
11650  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
11651  * </xi:include>
11652  * </programlisting>
11653  * </example>
11654  *
11655  * <example id="gapplication-example-actions"><title>A GApplication with actions</title>
11656  * <programlisting>
11657  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-actions.c">
11658  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
11659  * </xi:include>
11660  * </programlisting>
11661  * </example>
11662  */
11663
11664
11665 /**
11666  * SECTION:gapplicationcommandline
11667  * @title: GApplicationCommandLine
11668  * @short_description: A command-line invocation of an application
11669  * @see_also: #GApplication
11670  *
11671  * #GApplicationCommandLine represents a command-line invocation of
11672  * an application.  It is created by #GApplication and emitted
11673  * in the #GApplication::command-line signal and virtual function.
11674  *
11675  * The class contains the list of arguments that the program was invoked
11676  * with.  It is also possible to query if the commandline invocation was
11677  * local (ie: the current process is running in direct response to the
11678  * invocation) or remote (ie: some other process forwarded the
11679  * commandline to this process).
11680  *
11681  * The GApplicationCommandLine object can provide the @argc and @argv
11682  * parameters for use with the #GOptionContext command-line parsing API,
11683  * with the g_application_command_line_get_arguments() function. See
11684  * <xref linkend="gapplication-example-cmdline3"/> for an example.
11685  *
11686  * The exit status of the originally-invoked process may be set and
11687  * messages can be printed to stdout or stderr of that process.  The
11688  * lifecycle of the originally-invoked process is tied to the lifecycle
11689  * of this object (ie: the process exits when the last reference is
11690  * dropped).
11691  *
11692  * The main use for #GApplicationCommandline (and the
11693  * #GApplication::command-line signal) is 'Emacs server' like use cases:
11694  * You can set the <envar>EDITOR</envar> environment variable to have
11695  * e.g. git use your favourite editor to edit commit messages, and if you
11696  * already have an instance of the editor running, the editing will happen
11697  * in the running instance, instead of opening a new one. An important
11698  * aspect of this use case is that the process that gets started by git
11699  * does not return until the editing is done.
11700  *
11701  * <example id="gapplication-example-cmdline"><title>Handling commandline arguments with GApplication</title>
11702  * <para>
11703  * A simple example where the commandline is completely handled
11704  * in the #GApplication::command-line handler. The launching instance exits
11705  * once the signal handler in the primary instance has returned, and the
11706  * return value of the signal handler becomes the exit status of the launching
11707  * instance.
11708  * </para>
11709  * <programlisting>
11710  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline.c">
11711  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
11712  * </xi:include>
11713  * </programlisting>
11714  * </example>
11715  *
11716  * <example id="gapplication-example-cmdline2"><title>Split commandline handling</title>
11717  * <para>
11718  * An example of split commandline handling. Options that start with
11719  * <literal>--local-</literal> are handled locally, all other options are
11720  * passed to the #GApplication::command-line handler which runs in the primary
11721  * instance.
11722  * </para>
11723  * <programlisting>
11724  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline2.c">
11725  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
11726  * </xi:include>
11727  * </programlisting>
11728  * </example>
11729  *
11730  * <example id="gapplication-example-cmdline3"><title>Deferred commandline handling</title>
11731  * <para>
11732  * An example of deferred commandline handling. Here, the commandline is
11733  * not completely handled before the #GApplication::command-line handler
11734  * returns. Instead, we keep a reference to the GApplicationCommandline
11735  * object and handle it later(in this example, in an idle). Note that it
11736  * is necessary to hold the application until you are done with the
11737  * commandline.
11738  * </para>
11739  * <para>
11740  * This example also shows how to use #GOptionContext for parsing the
11741  * commandline arguments. Note that it is necessary to disable the
11742  * built-in help-handling of #GOptionContext, since it calls exit()
11743  * after printing help, which is not what you want to happen in
11744  * the primary instance.
11745  * </para>
11746  * <programlisting>
11747  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline3.c">
11748  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
11749  * </xi:include>
11750  * </programlisting>
11751  * </example>
11752  */
11753
11754
11755 /**
11756  * SECTION:gasynchelper
11757  * @short_description: Asynchronous Helper Functions
11758  * @include: gio/gio.h
11759  * @see_also: #GAsyncReady
11760  *
11761  * Provides helper functions for asynchronous operations.
11762  */
11763
11764
11765 /**
11766  * SECTION:gasyncinitable
11767  * @short_description: Asynchronously failable object initialization interface
11768  * @include: gio/gio.h
11769  * @see_also: #GInitable
11770  *
11771  * This is the asynchronous version of #GInitable; it behaves the same
11772  * in all ways except that initialization is asynchronous. For more details
11773  * see the descriptions on #GInitable.
11774  *
11775  * A class may implement both the #GInitable and #GAsyncInitable interfaces.
11776  *
11777  * Users of objects implementing this are not intended to use the interface
11778  * method directly; instead it will be used automatically in various ways.
11779  * For C applications you generally just call g_async_initable_new_async()
11780  * directly, or indirectly via a foo_thing_new_async() wrapper. This will call
11781  * g_async_initable_init_async() under the cover, calling back with %NULL and
11782  * a set %GError on failure.
11783  *
11784  * A typical implementation might look something like this:
11785  *
11786  * |[
11787  * enum {
11788  * NOT_INITIALIZED,
11789  * INITIALIZING,
11790  * INITIALIZED
11791  * };
11792  *
11793  * static void
11794  * _foo_ready_cb (Foo *self)
11795  * {
11796  * GList *l;
11797  *
11798  * self->priv->state = INITIALIZED;
11799  *
11800  * for (l = self->priv->init_results; l != NULL; l = l->next)
11801  * {
11802  * GSimpleAsyncResult *simple = l->data;
11803  *
11804  * if (!self->priv->success)
11805  * g_simple_async_result_set_error (simple, ...);
11806  *
11807  * g_simple_async_result_complete (simple);
11808  * g_object_unref (simple);
11809  * }
11810  *
11811  * g_list_free (self->priv->init_results);
11812  * self->priv->init_results = NULL;
11813  * }
11814  *
11815  * static void
11816  * foo_init_async (GAsyncInitable       *initable,
11817  * int                   io_priority,
11818  * GCancellable         *cancellable,
11819  * GAsyncReadyCallback   callback,
11820  * gpointer              user_data)
11821  * {
11822  * Foo *self = FOO (initable);
11823  * GSimpleAsyncResult *simple;
11824  *
11825  * simple = g_simple_async_result_new (G_OBJECT (initable)
11826  * callback,
11827  * user_data,
11828  * foo_init_async);
11829  *
11830  * switch (self->priv->state)
11831  * {
11832  * case NOT_INITIALIZED:
11833  * _foo_get_ready (self);
11834  * self->priv->init_results = g_list_append (self->priv->init_results,
11835  * simple);
11836  * self->priv->state = INITIALIZING;
11837  * break;
11838  * case INITIALIZING:
11839  * self->priv->init_results = g_list_append (self->priv->init_results,
11840  * simple);
11841  * break;
11842  * case INITIALIZED:
11843  * if (!self->priv->success)
11844  * g_simple_async_result_set_error (simple, ...);
11845  *
11846  * g_simple_async_result_complete_in_idle (simple);
11847  * g_object_unref (simple);
11848  * break;
11849  * }
11850  * }
11851  *
11852  * static gboolean
11853  * foo_init_finish (GAsyncInitable       *initable,
11854  * GAsyncResult         *result,
11855  * GError              **error)
11856  * {
11857  * g_return_val_if_fail (g_simple_async_result_is_valid (result,
11858  * G_OBJECT (initable), foo_init_async), FALSE);
11859  *
11860  * if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
11861  * error))
11862  * return FALSE;
11863  *
11864  * return TRUE;
11865  * }
11866  *
11867  * static void
11868  * foo_async_initable_iface_init (gpointer g_iface,
11869  * gpointer data)
11870  * {
11871  * GAsyncInitableIface *iface = g_iface;
11872  *
11873  * iface->init_async = foo_init_async;
11874  * iface->init_finish = foo_init_finish;
11875  * }
11876  * ]|
11877  */
11878
11879
11880 /**
11881  * SECTION:gasyncresult
11882  * @short_description: Asynchronous Function Results
11883  * @include: gio/gio.h
11884  * @see_also: #GSimpleAsyncResult
11885  *
11886  * Provides a base class for implementing asynchronous function results.
11887  *
11888  * Asynchronous operations are broken up into two separate operations
11889  * which are chained together by a #GAsyncReadyCallback. To begin
11890  * an asynchronous operation, provide a #GAsyncReadyCallback to the
11891  * asynchronous function. This callback will be triggered when the
11892  * operation has completed, and will be passed a #GAsyncResult instance
11893  * filled with the details of the operation's success or failure, the
11894  * object the asynchronous function was started for and any error codes
11895  * returned. The asynchronous callback function is then expected to call
11896  * the corresponding "_finish()" function, passing the object the
11897  * function was called for, the #GAsyncResult instance, and (optionally)
11898  * an @error to grab any error conditions that may have occurred.
11899  *
11900  * The "_finish()" function for an operation takes the generic result
11901  * (of type #GAsyncResult) and returns the specific result that the
11902  * operation in question yields (e.g. a #GFileEnumerator for a
11903  * "enumerate children" operation). If the result or error status of the
11904  * operation is not needed, there is no need to call the "_finish()"
11905  * function; GIO will take care of cleaning up the result and error
11906  * information after the #GAsyncReadyCallback returns. You can pass
11907  * %NULL for the #GAsyncReadyCallback if you don't need to take any
11908  * action at all after the operation completes. Applications may also
11909  * take a reference to the #GAsyncResult and call "_finish()" later;
11910  * however, the "_finish()" function may be called at most once.
11911  *
11912  * Example of a typical asynchronous operation flow:
11913  * |[
11914  * void _theoretical_frobnitz_async (Theoretical         *t,
11915  * GCancellable        *c,
11916  * GAsyncReadyCallback *cb,
11917  * gpointer             u);
11918  *
11919  * gboolean _theoretical_frobnitz_finish (Theoretical   *t,
11920  * GAsyncResult  *res,
11921  * GError       **e);
11922  *
11923  * static void
11924  * frobnitz_result_func (GObject      *source_object,
11925  * GAsyncResult *res,
11926  * gpointer      user_data)
11927  * {
11928  * gboolean success = FALSE;
11929  *
11930  * success = _theoretical_frobnitz_finish (source_object, res, NULL);
11931  *
11932  * if (success)
11933  * g_printf ("Hurray!\n");
11934  * else
11935  * g_printf ("Uh oh!\n");
11936  *
11937  * /<!-- -->* ... *<!-- -->/
11938  *
11939  * }
11940  *
11941  * int main (int argc, void *argv[])
11942  * {
11943  * /<!-- -->* ... *<!-- -->/
11944  *
11945  * _theoretical_frobnitz_async (theoretical_data,
11946  * NULL,
11947  * frobnitz_result_func,
11948  * NULL);
11949  *
11950  * /<!-- -->* ... *<!-- -->/
11951  * }
11952  * ]|
11953  *
11954  * The callback for an asynchronous operation is called only once, and is
11955  * always called, even in the case of a cancelled operation. On cancellation
11956  * the result is a %G_IO_ERROR_CANCELLED error.
11957  *
11958  * Some asynchronous operations are implemented using synchronous calls.
11959  * These are run in a separate thread, if #GThread has been initialized, but
11960  * otherwise they are sent to the Main Event Loop and processed in an idle
11961  * function. So, if you truly need asynchronous operations, make sure to
11962  * initialize #GThread.
11963  */
11964
11965
11966 /**
11967  * SECTION:gbufferedinputstream
11968  * @short_description: Buffered Input Stream
11969  * @include: gio/gio.h
11970  * @see_also: #GFilterInputStream, #GInputStream
11971  *
11972  * Buffered input stream implements #GFilterInputStream and provides
11973  * for buffered reads.
11974  *
11975  * By default, #GBufferedInputStream's buffer size is set at 4 kilobytes.
11976  *
11977  * To create a buffered input stream, use g_buffered_input_stream_new(),
11978  * or g_buffered_input_stream_new_sized() to specify the buffer's size at
11979  * construction.
11980  *
11981  * To get the size of a buffer within a buffered input stream, use
11982  * g_buffered_input_stream_get_buffer_size(). To change the size of a
11983  * buffered input stream's buffer, use
11984  * g_buffered_input_stream_set_buffer_size(). Note that the buffer's size
11985  * cannot be reduced below the size of the data within the buffer.
11986  */
11987
11988
11989 /**
11990  * SECTION:gbufferedoutputstream
11991  * @short_description: Buffered Output Stream
11992  * @include: gio/gio.h
11993  * @see_also: #GFilterOutputStream, #GOutputStream
11994  *
11995  * Buffered output stream implements #GFilterOutputStream and provides
11996  * for buffered writes.
11997  *
11998  * By default, #GBufferedOutputStream's buffer size is set at 4 kilobytes.
11999  *
12000  * To create a buffered output stream, use g_buffered_output_stream_new(),
12001  * or g_buffered_output_stream_new_sized() to specify the buffer's size
12002  * at construction.
12003  *
12004  * To get the size of a buffer within a buffered input stream, use
12005  * g_buffered_output_stream_get_buffer_size(). To change the size of a
12006  * buffered output stream's buffer, use
12007  * g_buffered_output_stream_set_buffer_size(). Note that the buffer's
12008  * size cannot be reduced below the size of the data within the buffer.
12009  */
12010
12011
12012 /**
12013  * SECTION:gcancellable
12014  * @short_description: Thread-safe Operation Cancellation Stack
12015  * @include: gio/gio.h
12016  *
12017  * GCancellable is a thread-safe operation cancellation stack used
12018  * throughout GIO to allow for cancellation of synchronous and
12019  * asynchronous operations.
12020  */
12021
12022
12023 /**
12024  * SECTION:gcharsetconverter
12025  * @short_description: Convert between charsets
12026  * @include: gio/gio.h
12027  *
12028  * #GCharsetConverter is an implementation of #GConverter based on
12029  * GIConv.
12030  */
12031
12032
12033 /**
12034  * SECTION:gcontenttype
12035  * @short_description: Platform-specific content typing
12036  * @include: gio/gio.h
12037  *
12038  * A content type is a platform specific string that defines the type
12039  * 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".
12040  * On Win32 it is an extension string like ".doc", ".txt" or a perceived
12041  * string like "audio". Such strings can be looked up in the registry at
12042  * HKEY_CLASSES_ROOT.
12043  */
12044
12045
12046 /**
12047  * SECTION:gconverter
12048  * @short_description: Data conversion interface
12049  * @include: gio/gio.h
12050  * @see_also: #GInputStream, #GOutputStream
12051  *
12052  * #GConverter is implemented by objects that convert
12053  * binary data in various ways. The conversion can be
12054  * stateful and may fail at any place.
12055  *
12056  * Some example conversions are: character set conversion,
12057  * compression, decompression and regular expression
12058  * replace.
12059  *
12060  * Since: 2.24
12061  */
12062
12063
12064 /**
12065  * SECTION:gconverterinputstream
12066  * @short_description: Converter Input Stream
12067  * @include: gio/gio.h
12068  * @see_also: #GInputStream, #GConverter
12069  *
12070  * Converter input stream implements #GInputStream and allows
12071  * conversion of data of various types during reading.
12072  */
12073
12074
12075 /**
12076  * SECTION:gconverteroutputstream
12077  * @short_description: Converter Output Stream
12078  * @include: gio/gio.h
12079  * @see_also: #GOutputStream, #GConverter
12080  *
12081  * Converter output stream implements #GOutputStream and allows
12082  * conversion of data of various types during reading.
12083  */
12084
12085
12086 /**
12087  * SECTION:gcredentials
12088  * @short_description: An object containing credentials
12089  * @include: gio/gio.h
12090  *
12091  * The #GCredentials type is a reference-counted wrapper for native
12092  * credentials. This information is typically used for identifying,
12093  * authenticating and authorizing other processes.
12094  *
12095  * Some operating systems supports looking up the credentials of the
12096  * remote peer of a communication endpoint - see e.g.
12097  * g_socket_get_credentials().
12098  *
12099  * Some operating systems supports securely sending and receiving
12100  * credentials over a Unix Domain Socket, see
12101  * #GUnixCredentialsMessage, g_unix_connection_send_credentials() and
12102  * g_unix_connection_receive_credentials() for details.
12103  *
12104  * On Linux, the native credential type is a <type>struct ucred</type>
12105  * - see the
12106  * <citerefentry><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>
12107  * man page for details. This corresponds to
12108  * %G_CREDENTIALS_TYPE_LINUX_UCRED.
12109  *
12110  * On FreeBSD, the native credential type is a <type>struct cmsgcred</type>.
12111  * This corresponds to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED.
12112  *
12113  * On OpenBSD, the native credential type is a <type>struct sockpeercred</type>.
12114  * This corresponds to %G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED.
12115  */
12116
12117
12118 /**
12119  * SECTION:gdatainputstream
12120  * @short_description: Data Input Stream
12121  * @include: gio/gio.h
12122  * @see_also: #GInputStream
12123  *
12124  * Data input stream implements #GInputStream and includes functions for
12125  * reading structured data directly from a binary input stream.
12126  */
12127
12128
12129 /**
12130  * SECTION:gdataoutputstream
12131  * @short_description: Data Output Stream
12132  * @include: gio/gio.h
12133  * @see_also: #GOutputStream
12134  *
12135  * Data output stream implements #GOutputStream and includes functions for
12136  * writing data directly to an output stream.
12137  */
12138
12139
12140 /**
12141  * SECTION:gdbusaddress
12142  * @title: D-Bus Addresses
12143  * @short_description: D-Bus connection endpoints
12144  * @include: gio/gio.h
12145  *
12146  * Routines for working with D-Bus addresses. A D-Bus address is a string
12147  * like "unix:tmpdir=/tmp/my-app-name". The exact format of addresses
12148  * is explained in detail in the <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html&num;addresses">D-Bus specification</link>.
12149  */
12150
12151
12152 /**
12153  * SECTION:gdbusauthobserver
12154  * @short_description: Object used for authenticating connections
12155  * @include: gio/gio.h
12156  *
12157  * The #GDBusAuthObserver type provides a mechanism for participating
12158  * in how a #GDBusServer (or a #GDBusConnection) authenticates remote
12159  * peers. Simply instantiate a #GDBusAuthObserver and connect to the
12160  * signals you are interested in. Note that new signals may be added
12161  * in the future
12162  *
12163  * For example, if you only want to allow D-Bus connections from
12164  * processes owned by the same uid as the server, you would use a
12165  * signal handler like the following:
12166  * <example id="auth-observer"><title>Controlling Authentication</title><programlisting>
12167  * static gboolean
12168  * on_authorize_authenticated_peer (GDBusAuthObserver *observer,
12169  * GIOStream         *stream,
12170  * GCredentials      *credentials,
12171  * gpointer           user_data)
12172  * {
12173  * gboolean authorized;
12174  *
12175  * authorized = FALSE;
12176  * if (credentials != NULL)
12177  * {
12178  * GCredentials *own_credentials;
12179  * own_credentials = g_credentials_new ();
12180  * if (g_credentials_is_same_user (credentials, own_credentials, NULL))
12181  * authorized = TRUE;
12182  * g_object_unref (own_credentials);
12183  * }
12184  *
12185  * return authorized;
12186  * }
12187  * </programlisting></example>
12188  */
12189
12190
12191 /**
12192  * SECTION:gdbusconnection
12193  * @short_description: D-Bus Connections
12194  * @include: gio/gio.h
12195  *
12196  * The #GDBusConnection type is used for D-Bus connections to remote
12197  * peers such as a message buses. It is a low-level API that offers a
12198  * lot of flexibility. For instance, it lets you establish a connection
12199  * over any transport that can by represented as an #GIOStream.
12200  *
12201  * This class is rarely used directly in D-Bus clients. If you are writing
12202  * an D-Bus client, it is often easier to use the g_bus_own_name(),
12203  * g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs.
12204  *
12205  * <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>
12206  *
12207  * <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>
12208  *
12209  * <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>
12210  *
12211  * <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>
12212  */
12213
12214
12215 /**
12216  * SECTION:gdbuserror
12217  * @title: GDBusError
12218  * @short_description: Mapping D-Bus errors to and from GError
12219  * @include: gio/gio.h
12220  *
12221  * All facilities that return errors from remote methods (such as
12222  * g_dbus_connection_call_sync()) use #GError to represent both D-Bus
12223  * errors (e.g. errors returned from the other peer) and locally
12224  * in-process generated errors.
12225  *
12226  * To check if a returned #GError is an error from a remote peer, use
12227  * g_dbus_error_is_remote_error(). To get the actual D-Bus error name,
12228  * use g_dbus_error_get_remote_error(). Before presenting an error,
12229  * always use g_dbus_error_strip_remote_error().
12230  *
12231  * In addition, facilities used to return errors to a remote peer also
12232  * use #GError. See g_dbus_method_invocation_return_error() for
12233  * discussion about how the D-Bus error name is set.
12234  *
12235  * Applications can associate a #GError error domain with a set of D-Bus errors in order to
12236  * automatically map from D-Bus errors to #GError and back. This
12237  * is typically done in the function returning the #GQuark for the
12238  * error domain:
12239  * <example id="error-registration"><title>Error Registration</title><programlisting>
12240  * /<!-- -->* foo-bar-error.h: *<!-- -->/
12241  *
12242  * #define FOO_BAR_ERROR (foo_bar_error_quark ())
12243  * GQuark foo_bar_error_quark (void);
12244  *
12245  * typedef enum
12246  * {
12247  * FOO_BAR_ERROR_FAILED,
12248  * FOO_BAR_ERROR_ANOTHER_ERROR,
12249  * FOO_BAR_ERROR_SOME_THIRD_ERROR,
12250  * } FooBarError;
12251  *
12252  * /<!-- -->* foo-bar-error.c: *<!-- -->/
12253  *
12254  * static const GDBusErrorEntry foo_bar_error_entries[] =
12255  * {
12256  * {FOO_BAR_ERROR_FAILED,           "org.project.Foo.Bar.Error.Failed"},
12257  * {FOO_BAR_ERROR_ANOTHER_ERROR,    "org.project.Foo.Bar.Error.AnotherError"},
12258  * {FOO_BAR_ERROR_SOME_THIRD_ERROR, "org.project.Foo.Bar.Error.SomeThirdError"},
12259  * };
12260  *
12261  * GQuark
12262  * foo_bar_error_quark (void)
12263  * {
12264  * static volatile gsize quark_volatile = 0;
12265  * g_dbus_error_register_error_domain ("foo-bar-error-quark",
12266  * &quark_volatile,
12267  * foo_bar_error_entries,
12268  * G_N_ELEMENTS (foo_bar_error_entries));
12269  * G_STATIC_ASSERT (G_N_ELEMENTS (foo_bar_error_entries) - 1 == FOO_BAR_ERROR_SOME_THIRD_ERROR);
12270  * return (GQuark) quark_volatile;
12271  * }
12272  * </programlisting></example>
12273  * With this setup, a D-Bus peer can transparently pass e.g. %FOO_BAR_ERROR_ANOTHER_ERROR and
12274  * other peers will see the D-Bus error name <literal>org.project.Foo.Bar.Error.AnotherError</literal>.
12275  * If the other peer is using GDBus, the peer will see also %FOO_BAR_ERROR_ANOTHER_ERROR instead
12276  * of %G_IO_ERROR_DBUS_ERROR. Note that GDBus clients can still recover
12277  * <literal>org.project.Foo.Bar.Error.AnotherError</literal> using g_dbus_error_get_remote_error().
12278  *
12279  * Note that errors in the %G_DBUS_ERROR error domain is intended only
12280  * for returning errors from a remote message bus process. Errors
12281  * generated locally in-process by e.g. #GDBusConnection is from the
12282  * %G_IO_ERROR domain.
12283  */
12284
12285
12286 /**
12287  * SECTION:gdbusinterface
12288  * @short_description: Base type for D-Bus interfaces
12289  * @include: gio/gio.h
12290  *
12291  * The #GDBusInterface type is the base type for D-Bus interfaces both
12292  * on the service side (see #GDBusInterfaceSkeleton) and client side
12293  * (see #GDBusProxy).
12294  */
12295
12296
12297 /**
12298  * SECTION:gdbusinterfaceskeleton
12299  * @short_description: Service-side D-Bus interface
12300  * @include: gio/gio.h
12301  *
12302  * Abstract base class for D-Bus interfaces on the service side.
12303  */
12304
12305
12306 /**
12307  * SECTION:gdbusintrospection
12308  * @title: D-Bus Introspection Data
12309  * @short_description: Node and interface description data structures
12310  * @include: gio/gio.h
12311  *
12312  * Various data structures and convenience routines to parse and
12313  * generate D-Bus introspection XML. Introspection information is
12314  * used when registering objects with g_dbus_connection_register_object().
12315  *
12316  * The format of D-Bus introspection XML is specified in the
12317  * <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html&num;introspection-format">D-Bus specification</link>.
12318  */
12319
12320
12321 /**
12322  * SECTION:gdbusmessage
12323  * @short_description: D-Bus Message
12324  * @include: gio/gio.h
12325  *
12326  * A type for representing D-Bus messages that can be sent or received
12327  * on a #GDBusConnection.
12328  */
12329
12330
12331 /**
12332  * SECTION:gdbusmethodinvocation
12333  * @short_description: Object for handling remote calls
12334  * @include: gio/gio.h
12335  *
12336  * Instances of the #GDBusMethodInvocation class are used when
12337  * handling D-Bus method calls. It provides a way to asynchronously
12338  * return results and errors.
12339  *
12340  * The normal way to obtain a #GDBusMethodInvocation object is to receive
12341  * it as an argument to the handle_method_call() function in a
12342  * #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object().
12343  */
12344
12345
12346 /**
12347  * SECTION:gdbusnameowning
12348  * @title: Owning Bus Names
12349  * @short_description: Simple API for owning bus names
12350  * @include: gio/gio.h
12351  *
12352  * Convenience API for owning bus names.
12353  *
12354  * <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>
12355  */
12356
12357
12358 /**
12359  * SECTION:gdbusnamewatching
12360  * @title: Watching Bus Names
12361  * @short_description: Simple API for watching bus names
12362  * @include: gio/gio.h
12363  *
12364  * Convenience API for watching bus names.
12365  *
12366  * <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>
12367  */
12368
12369
12370 /**
12371  * SECTION:gdbusobject
12372  * @short_description: Base type for D-Bus objects
12373  * @include: gio/gio.h
12374  *
12375  * The #GDBusObject type is the base type for D-Bus objects on both
12376  * the service side (see #GDBusObjectSkeleton) and the client side
12377  * (see #GDBusObjectProxy). It is essentially just a container of
12378  * interfaces.
12379  */
12380
12381
12382 /**
12383  * SECTION:gdbusobjectmanager
12384  * @short_description: Base type for D-Bus object managers
12385  * @include: gio/gio.h
12386  *
12387  * The #GDBusObjectManager type is the base type for service- and
12388  * client-side implementations of the standardized <ulink
12389  * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
12390  * interface.
12391  *
12392  * See #GDBusObjectManagerClient for the client-side implementation
12393  * and #GDBusObjectManagerServer for the service-side implementation.
12394  */
12395
12396
12397 /**
12398  * SECTION:gdbusobjectmanagerclient
12399  * @short_description: Client-side object manager
12400  * @include: gio/gio.h
12401  *
12402  * #GDBusObjectManagerClient is used to create, monitor and delete object
12403  * proxies for remote objects exported by a #GDBusObjectManagerServer (or any
12404  * code implementing the <ulink
12405  * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
12406  * interface).
12407  *
12408  * Once an instance of this type has been created, you can connect to
12409  * the #GDBusObjectManager::object-added and
12410  * #GDBusObjectManager::object-removed signals and inspect the
12411  * #GDBusObjectProxy objects returned by
12412  * g_dbus_object_manager_get_objects().
12413  *
12414  * If the name for a #GDBusObjectManagerClient is not owned by anyone at
12415  * object construction time, the default behavior is to request the
12416  * message bus to launch an owner for the name. This behavior can be
12417  * disabled using the %G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START
12418  * flag. It's also worth noting that this only works if the name of
12419  * interest is activatable in the first place. E.g. in some cases it
12420  * is not possible to launch an owner for the requested name. In this
12421  * case, #GDBusObjectManagerClient object construction still succeeds but
12422  * there will be no object proxies
12423  * (e.g. g_dbus_object_manager_get_objects() returns the empty list) and
12424  * the #GDBusObjectManagerClient:name-owner property is %NULL.
12425  *
12426  * The owner of the requested name can come and go (for example
12427  * consider a system service being restarted) â€“ #GDBusObjectManagerClient
12428  * handles this case too; simply connect to the #GObject::notify
12429  * signal to watch for changes on the #GDBusObjectManagerClient:name-owner
12430  * property. When the name owner vanishes, the behavior is that
12431  * #GDBusObjectManagerClient:name-owner is set to %NULL (this includes
12432  * emission of the #GObject::notify signal) and then
12433  * #GDBusObjectManager::object-removed signals are synthesized
12434  * for all currently existing object proxies. Since
12435  * #GDBusObjectManagerClient:name-owner is %NULL when this happens, you can
12436  * use this information to disambiguate a synthesized signal from a
12437  * genuine signal caused by object removal on the remote
12438  * #GDBusObjectManager. Similarly, when a new name owner appears,
12439  * #GDBusObjectManager::object-added signals are synthesized
12440  * while #GDBusObjectManagerClient:name-owner is still %NULL. Only when all
12441  * object proxies have been added, the #GDBusObjectManagerClient:name-owner
12442  * is set to the new name owner (this includes emission of the
12443  * #GObject::notify signal).  Furthermore, you are guaranteed that
12444  * #GDBusObjectManagerClient:name-owner will alternate between a name owner
12445  * (e.g. <literal>:1.42</literal>) and %NULL even in the case where
12446  * the name of interest is atomically replaced
12447  *
12448  * Ultimately, #GDBusObjectManagerClient is used to obtain #GDBusProxy
12449  * instances. All signals (including the
12450  * <literal>org.freedesktop.DBus.Properties::PropertiesChanged</literal>
12451  * signal) delivered to #GDBusProxy instances are guaranteed to
12452  * originate from the name owner. This guarantee along with the
12453  * behavior described above, means that certain race conditions
12454  * including the <emphasis><quote>half the proxy is from the old owner
12455  * and the other half is from the new owner</quote></emphasis> problem
12456  * cannot happen.
12457  *
12458  * To avoid having the application connect to signals on the returned
12459  * #GDBusObjectProxy and #GDBusProxy objects, the
12460  * #GDBusObject::interface-added,
12461  * #GDBusObject::interface-removed,
12462  * #GDBusProxy::g-properties-changed and
12463  * #GDBusProxy::g-signal signals
12464  * are also emitted on the #GDBusObjectManagerClient instance managing these
12465  * objects. The signals emitted are
12466  * #GDBusObjectManager::interface-added,
12467  * #GDBusObjectManager::interface-removed,
12468  * #GDBusObjectManagerClient::interface-proxy-properties-changed and
12469  * #GDBusObjectManagerClient::interface-proxy-signal.
12470  *
12471  * Note that all callbacks and signals are emitted in the
12472  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
12473  * that the #GDBusObjectManagerClient object was constructed
12474  * in. Additionally, the #GDBusObjectProxy and #GDBusProxy objects
12475  * originating from the #GDBusObjectManagerClient object will be created in
12476  * the same context and, consequently, will deliver signals in the
12477  * same main loop.
12478  */
12479
12480
12481 /**
12482  * SECTION:gdbusobjectmanagerserver
12483  * @short_description: Service-side object manager
12484  * @include: gio/gio.h
12485  *
12486  * #GDBusObjectManagerServer is used to export #GDBusObject instances using
12487  * the standardized <ulink
12488  * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
12489  * interface. For example, remote D-Bus clients can get all objects
12490  * and properties in a single call. Additionally, any change in the
12491  * object hierarchy is broadcast using signals. This means that D-Bus
12492  * clients can keep caches up to date by only listening to D-Bus
12493  * signals.
12494  *
12495  * See #GDBusObjectManagerClient for the client-side code that is
12496  * intended to be used with #GDBusObjectManagerServer or any D-Bus
12497  * object implementing the org.freedesktop.DBus.ObjectManager
12498  * interface.
12499  */
12500
12501
12502 /**
12503  * SECTION:gdbusobjectproxy
12504  * @short_description: Client-side D-Bus object
12505  * @include: gio/gio.h
12506  *
12507  * A #GDBusObjectProxy is an object used to represent a remote object
12508  * with one or more D-Bus interfaces. Normally, you don't instantiate
12509  * a #GDBusObjectProxy yourself - typically #GDBusObjectManagerClient
12510  * is used to obtain it.
12511  *
12512  * Since: 2.30
12513  */
12514
12515
12516 /**
12517  * SECTION:gdbusobjectskeleton
12518  * @short_description: Service-side D-Bus object
12519  * @include: gio/gio.h
12520  *
12521  * A #GDBusObjectSkeleton instance is essentially a group of D-Bus
12522  * interfaces. The set of exported interfaces on the object may be
12523  * dynamic and change at runtime.
12524  *
12525  * This type is intended to be used with #GDBusObjectManager.
12526  */
12527
12528
12529 /**
12530  * SECTION:gdbusproxy
12531  * @short_description: Client-side D-Bus interface proxy
12532  * @include: gio/gio.h
12533  *
12534  * #GDBusProxy is a base class used for proxies to access a D-Bus
12535  * interface on a remote object. A #GDBusProxy can be constructed for
12536  * both well-known and unique names.
12537  *
12538  * By default, #GDBusProxy will cache all properties (and listen to
12539  * changes) of the remote object, and proxy all signals that gets
12540  * emitted. This behaviour can be changed by passing suitable
12541  * #GDBusProxyFlags when the proxy is created. If the proxy is for a
12542  * well-known name, the property cache is flushed when the name owner
12543  * vanishes and reloaded when a name owner appears.
12544  *
12545  * If a #GDBusProxy is used for a well-known name, the owner of the
12546  * name is tracked and can be read from
12547  * #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to
12548  * get notified of changes. Additionally, only signals and property
12549  * changes emitted from the current name owner are considered and
12550  * calls are always sent to the current name owner. This avoids a
12551  * number of race conditions when the name is lost by one owner and
12552  * claimed by another. However, if no name owner currently exists,
12553  * then calls will be sent to the well-known name which may result in
12554  * the message bus launching an owner (unless
12555  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set).
12556  *
12557  * The generic #GDBusProxy::g-properties-changed and
12558  * #GDBusProxy::g-signal signals are not very convenient to work
12559  * with. Therefore, the recommended way of working with proxies is to
12560  * subclass #GDBusProxy, and have more natural properties and signals
12561  * in your derived class. See <xref linkend="gdbus-example-gdbus-codegen"/>
12562  * for how this can easily be done using the
12563  * <command><link linkend="gdbus-codegen">gdbus-codegen</link></command>
12564  * tool.
12565  *
12566  * A #GDBusProxy instance can be used from multiple threads but note
12567  * that all signals (e.g. #GDBusProxy::g-signal, #GDBusProxy::g-properties-changed
12568  * and #GObject::notify) are emitted in the
12569  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
12570  * of the thread where the instance was constructed.
12571  *
12572  * <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>
12573  */
12574
12575
12576 /**
12577  * SECTION:gdbusserver
12578  * @short_description: Helper for accepting connections
12579  * @include: gio/gio.h
12580  *
12581  * #GDBusServer is a helper for listening to and accepting D-Bus
12582  * connections. This can be used to create a new D-Bus server, allowing two
12583  * peers to use the D-Bus protocol for their own specialized communication.
12584  * A server instance provided in this way will not perform message routing or
12585  * implement the org.freedesktop.DBus interface.
12586  *
12587  * To just export an object on a well-known name on a message bus, such as the
12588  * session or system bus, you should instead use g_bus_own_name().
12589  *
12590  * <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>
12591  */
12592
12593
12594 /**
12595  * SECTION:gdbusutils
12596  * @title: D-Bus Utilities
12597  * @short_description: Various utilities related to D-Bus.
12598  * @include: gio/gio.h
12599  *
12600  * Various utility routines related to D-Bus.
12601  */
12602
12603
12604 /**
12605  * SECTION:gdesktopappinfo
12606  * @title: GDesktopAppInfo
12607  * @short_description: Application information from desktop files
12608  * @include: gio/gdesktopappinfo.h
12609  *
12610  * #GDesktopAppInfo is an implementation of #GAppInfo based on
12611  * desktop files.
12612  *
12613  * Note that <filename>&lt;gio/gdesktopappinfo.h&gt;</filename> belongs to
12614  * the UNIX-specific GIO interfaces, thus you have to use the
12615  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12616  */
12617
12618
12619 /**
12620  * SECTION:gdrive
12621  * @short_description: Drive management
12622  * @include: gio/gio.h
12623  *
12624  * #GDrive - this represent a piece of hardware connected to the machine.
12625  * It's generally only created for removable hardware or hardware with
12626  * removable media.
12627  *
12628  * #GDrive is a container class for #GVolume objects that stem from
12629  * the same piece of media. As such, #GDrive abstracts a drive with
12630  * (or without) removable media and provides operations for querying
12631  * whether media is available, determing whether media change is
12632  * automatically detected and ejecting the media.
12633  *
12634  * If the #GDrive reports that media isn't automatically detected, one
12635  * can poll for media; typically one should not do this periodically
12636  * as a poll for media operation is potententially expensive and may
12637  * spin up the drive creating noise.
12638  *
12639  * #GDrive supports starting and stopping drives with authentication
12640  * support for the former. This can be used to support a diverse set
12641  * of use cases including connecting/disconnecting iSCSI devices,
12642  * powering down external disk enclosures and starting/stopping
12643  * multi-disk devices such as RAID devices. Note that the actual
12644  * semantics and side-effects of starting/stopping a #GDrive may vary
12645  * according to implementation. To choose the correct verbs in e.g. a
12646  * file manager, use g_drive_get_start_stop_type().
12647  *
12648  * For porting from GnomeVFS note that there is no equivalent of
12649  * #GDrive in that API.
12650  */
12651
12652
12653 /**
12654  * SECTION:gemblem
12655  * @short_description: An object for emblems
12656  * @include: gio/gio.h
12657  * @see_also: #GIcon, #GEmblemedIcon, #GLoadableIcon, #GThemedIcon
12658  *
12659  * #GEmblem is an implementation of #GIcon that supports
12660  * having an emblem, which is an icon with additional properties.
12661  * It can than be added to a #GEmblemedIcon.
12662  *
12663  * Currently, only metainformation about the emblem's origin is
12664  * supported. More may be added in the future.
12665  */
12666
12667
12668 /**
12669  * SECTION:gemblemedicon
12670  * @short_description: Icon with emblems
12671  * @include: gio/gio.h
12672  * @see_also: #GIcon, #GLoadableIcon, #GThemedIcon, #GEmblem
12673  *
12674  * #GEmblemedIcon is an implementation of #GIcon that supports
12675  * adding an emblem to an icon. Adding multiple emblems to an
12676  * icon is ensured via g_emblemed_icon_add_emblem().
12677  *
12678  * Note that #GEmblemedIcon allows no control over the position
12679  * of the emblems. See also #GEmblem for more information.
12680  */
12681
12682
12683 /**
12684  * SECTION:gfile
12685  * @short_description: File and Directory Handling
12686  * @include: gio/gio.h
12687  * @see_also: #GFileInfo, #GFileEnumerator
12688  *
12689  * #GFile is a high level abstraction for manipulating files on a
12690  * virtual file system. #GFile<!-- -->s are lightweight, immutable
12691  * objects that do no I/O upon creation. It is necessary to understand that
12692  * #GFile objects do not represent files, merely an identifier for a file. All
12693  * file content I/O is implemented as streaming operations (see #GInputStream and
12694  * #GOutputStream).
12695  *
12696  * To construct a #GFile, you can use:
12697  * g_file_new_for_path() if you have a path.
12698  * g_file_new_for_uri() if you have a URI.
12699  * g_file_new_for_commandline_arg() for a command line argument.
12700  * g_file_parse_name() from a utf8 string gotten from g_file_get_parse_name().
12701  *
12702  * One way to think of a #GFile is as an abstraction of a pathname. For normal
12703  * files the system pathname is what is stored internally, but as #GFile<!-- -->s
12704  * are extensible it could also be something else that corresponds to a pathname
12705  * in a userspace implementation of a filesystem.
12706  *
12707  * #GFile<!-- -->s make up hierarchies of directories and files that correspond to the
12708  * files on a filesystem. You can move through the file system with #GFile using
12709  * g_file_get_parent() to get an identifier for the parent directory, g_file_get_child()
12710  * to get a child within a directory, g_file_resolve_relative_path() to resolve a relative
12711  * path between two #GFile<!-- -->s. There can be multiple hierarchies, so you may not
12712  * end up at the same root if you repeatedly call g_file_get_parent() on two different
12713  * files.
12714  *
12715  * All #GFile<!-- -->s have a basename (get with g_file_get_basename()). These names
12716  * are byte strings that are used to identify the file on the filesystem (relative to
12717  * its parent directory) and there is no guarantees that they have any particular charset
12718  * encoding or even make any sense at all. If you want to use filenames in a user
12719  * interface you should use the display name that you can get by requesting the
12720  * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info().
12721  * This is guaranteed to be in utf8 and can be used in a user interface. But always
12722  * store the real basename or the #GFile to use to actually access the file, because
12723  * there is no way to go from a display name to the actual name.
12724  *
12725  * Using #GFile as an identifier has the same weaknesses as using a path in that
12726  * there may be multiple aliases for the same file. For instance, hard or
12727  * soft links may cause two different #GFile<!-- -->s to refer to the same file.
12728  * Other possible causes for aliases are: case insensitive filesystems, short
12729  * and long names on Fat/NTFS, or bind mounts in Linux. If you want to check if
12730  * two #GFile<!-- -->s point to the same file you can query for the
12731  * %G_FILE_ATTRIBUTE_ID_FILE attribute. Note that #GFile does some trivial
12732  * canonicalization of pathnames passed in, so that trivial differences in the
12733  * path string used at creation (duplicated slashes, slash at end of path, "."
12734  * or ".." path segments, etc) does not create different #GFile<!-- -->s.
12735  *
12736  * Many #GFile operations have both synchronous and asynchronous versions
12737  * to suit your application. Asynchronous versions of synchronous functions
12738  * simply have _async() appended to their function names. The asynchronous
12739  * I/O functions call a #GAsyncReadyCallback which is then used to finalize
12740  * the operation, producing a GAsyncResult which is then passed to the
12741  * function's matching _finish() operation.
12742  *
12743  * Some #GFile operations do not have synchronous analogs, as they may
12744  * take a very long time to finish, and blocking may leave an application
12745  * unusable. Notable cases include:
12746  * g_file_mount_mountable() to mount a mountable file.
12747  * g_file_unmount_mountable_with_operation() to unmount a mountable file.
12748  * g_file_eject_mountable_with_operation() to eject a mountable file.
12749  *
12750  * <para id="gfile-etag"><indexterm><primary>entity tag</primary></indexterm>
12751  * One notable feature of #GFile<!-- -->s are entity tags, or "etags" for
12752  * short. Entity tags are somewhat like a more abstract version of the
12753  * traditional mtime, and can be used to quickly determine if the file has
12754  * been modified from the version on the file system. See the HTTP 1.1
12755  * <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">specification</ulink>
12756  * for HTTP Etag headers, which are a very similar concept.
12757  * </para>
12758  */
12759
12760
12761 /**
12762  * SECTION:gfileattribute
12763  * @short_description: Key-Value Paired File Attributes
12764  * @include: gio/gio.h
12765  * @see_also: #GFile, #GFileInfo
12766  *
12767  * File attributes in GIO consist of a list of key-value pairs.
12768  *
12769  * Keys are strings that contain a key namespace and a key name, separated
12770  * by a colon, e.g. "namespace:keyname". Namespaces are included to sort
12771  * key-value pairs by namespaces for relevance. Keys can be retrived
12772  * using wildcards, e.g. "standard::*" will return all of the keys in the
12773  * "standard" namespace.
12774  *
12775  * Values are stored within the list in #GFileAttributeValue structures.
12776  * Values can store different types, listed in the enum #GFileAttributeType.
12777  * Upon creation of a #GFileAttributeValue, the type will be set to
12778  * %G_FILE_ATTRIBUTE_TYPE_INVALID.
12779  *
12780  * The list of possible attributes for a filesystem (pointed to by a #GFile) is
12781  * availible as a #GFileAttributeInfoList. This list is queryable by key names
12782  * as indicated earlier.
12783  *
12784  * Classes that implement #GFileIface will create a #GFileAttributeInfoList and
12785  * install default keys and values for their given file system, architecture,
12786  * and other possible implementation details (e.g., on a UNIX system, a file
12787  * attribute key will be registered for the user id for a given file).
12788  *
12789  * <para>
12790  * <table>
12791  * <title>GFileAttributes Default Namespaces</title>
12792  * <tgroup cols='2' align='left'><thead>
12793  * <row><entry>Namspace</entry><entry>Description</entry></row>
12794  * </thead>
12795  * <tbody>
12796  * <row><entry>"standard"</entry><entry>The "Standard" namespace. General file
12797  * information that any application may need should be put in this namespace.
12798  * Examples include the file's name, type, and size.</entry></row>
12799  * <row><entry>"etag"</entry><entry>The <link linkend="gfile-etag">"Entity Tag"</link>
12800  * namespace. Currently, the only key in this namespace is "value", which contains
12801  * the value of the current entity tag.</entry></row>
12802  * <row><entry>"id"</entry><entry>The "Identification" namespace. This
12803  * namespace is used by file managers and applications that list directories
12804  * to check for loops and to uniquely identify files.</entry></row>
12805  * <row><entry>"access"</entry><entry>The "Access" namespace. Used to check
12806  * if a user has the proper privilidges to access files and perform
12807  * file operations. Keys in this namespace are made to be generic
12808  * and easily understood, e.g. the "can_read" key is %TRUE if
12809  * the current user has permission to read the file. UNIX permissions and
12810  * NTFS ACLs in Windows should be mapped to these values.</entry></row>
12811  * <row><entry>"mountable"</entry><entry>The "Mountable" namespace. Includes
12812  * simple boolean keys for checking if a file or path supports mount operations, e.g.
12813  * mount, unmount, eject. These are used for files of type %G_FILE_TYPE_MOUNTABLE.</entry></row>
12814  * <row><entry>"time"</entry><entry>The "Time" namespace. Includes file
12815  * access, changed, created times. </entry></row>
12816  * <row><entry>"unix"</entry><entry>The "Unix" namespace. Includes UNIX-specific
12817  * information and may not be available for all files. Examples include
12818  * the UNIX "UID", "GID", etc.</entry></row>
12819  * <row><entry>"dos"</entry><entry>The "DOS" namespace. Includes DOS-specific
12820  * information and may not be available for all files. Examples include
12821  * "is_system" for checking if a file is marked as a system file, and "is_archive"
12822  * for checking if a file is marked as an archive file.</entry></row>
12823  * <row><entry>"owner"</entry><entry>The "Owner" namespace. Includes information
12824  * about who owns a file. May not be available for all file systems. Examples include
12825  * "user" for getting the user name of the file owner. This information is often mapped from
12826  * some backend specific data such as a unix UID.</entry></row>
12827  * <row><entry>"thumbnail"</entry><entry>The "Thumbnail" namespace. Includes
12828  * information about file thumbnails and their location within the file system. Examples of
12829  * keys in this namespace include "path" to get the location of a thumbnail, and "failed"
12830  * to check if thumbnailing of the file failed.</entry></row>
12831  * <row><entry>"filesystem"</entry><entry>The "Filesystem" namespace. Gets information
12832  * about the file system where a file is located, such as its type, how much
12833  * space is left available, and the overall size of the file system.</entry></row>
12834  * <row><entry>"gvfs"</entry><entry>The "GVFS" namespace. Keys in this namespace
12835  * contain information about the current GVFS backend in use. </entry></row>
12836  * <row><entry>"xattr"</entry><entry>The "xattr" namespace. Gets information
12837  * about extended user attributes. See attr(5). The "user." prefix of the
12838  * extended user attribute name is stripped away when constructing keys in
12839  * this namespace, e.g. "xattr::mime_type" for the extended attribute with
12840  * the name "user.mime_type". Note that this information is only available
12841  * if GLib has been built with extended attribute support.</entry></row>
12842  * <row><entry>"xattr-sys"</entry><entry>The "xattr-sys" namespace.
12843  * Gets information about extended attributes which are not user-specific.
12844  * See attr(5). Note that this information is only available if GLib
12845  * has been built with extended attribute support.</entry></row>
12846  * <row><entry>"selinux"</entry><entry>The "SELinux" namespace. Includes
12847  * information about the SELinux context of files. Note that this information
12848  * is only available if GLib has been built with SELinux support.</entry></row>
12849  * </tbody>
12850  * </tgroup>
12851  * </table>
12852  * </para>
12853  *
12854  * Please note that these are not all of the possible namespaces.
12855  * More namespaces can be added from GIO modules or by individual applications.
12856  * For more information about writing GIO modules, see #GIOModule.
12857  *
12858  * <!-- TODO: Implementation note about using extended attributes on supported
12859  * file systems -->
12860  *
12861  * <para><table>
12862  * <title>GFileAttributes Built-in Keys and Value Types</title>
12863  * <tgroup cols='3' align='left'><thead>
12864  * <row><entry>Enum Value</entry><entry>Namespace:Key</entry><entry>Value Type</entry></row>
12865  * </thead><tbody>
12866  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TYPE</entry><entry>standard::type</entry><entry>uint32 (#GFileType)</entry></row>
12867  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</entry><entry>standard::is-hidden</entry><entry>boolean</entry></row>
12868  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP</entry><entry>standard::is-backup</entry><entry>boolean</entry></row>
12869  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</entry><entry>standard::is-symlink</entry><entry>boolean</entry></row>
12870  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</entry><entry>standard::is-virtual</entry><entry>boolean</entry></row>
12871  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_NAME</entry><entry>standard::name</entry><entry>byte string</entry></row>
12872  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</entry><entry>standard::display-name</entry><entry>string</entry></row>
12873  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</entry><entry>standard::edit-name</entry><entry>string</entry></row>
12874  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ICON</entry><entry>standard::icon</entry><entry>object (#GIcon)</entry></row>
12875  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</entry><entry>standard::content-type</entry><entry>string</entry></row>
12876  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</entry><entry>standard::fast-content-type</entry><entry>string</entry></row>
12877  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SIZE</entry><entry>standard::size</entry><entry>uint64</entry></row>
12878  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE</entry><entry>standard::allocated-size</entry><entry>uint64</entry></row>
12879  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</entry><entry>standard::symlink-target</entry><entry>byte string</entry></row>
12880  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TARGET_URI</entry><entry>standard::target-uri</entry><entry>string</entry></row>
12881  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER</entry><entry>standard::sort-order</entry><entry>int32</entry></row>
12882  * <row><entry>%G_FILE_ATTRIBUTE_ETAG_VALUE</entry><entry>etag::value</entry><entry>string</entry></row>
12883  * <row><entry>%G_FILE_ATTRIBUTE_ID_FILE</entry><entry>id::file</entry><entry>string</entry></row>
12884  * <row><entry>%G_FILE_ATTRIBUTE_ID_FILESYSTEM</entry><entry>id::filesystem</entry><entry>string</entry></row>
12885  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_READ</entry><entry>access::can-read</entry><entry>boolean</entry></row>
12886  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE</entry><entry>access::can-write</entry><entry>boolean</entry></row>
12887  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</entry><entry>access::can-execute</entry><entry>boolean</entry></row>
12888  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE</entry><entry>access::can-delete</entry><entry>boolean</entry></row>
12889  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH</entry><entry>access::can-trash</entry><entry>boolean</entry></row>
12890  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME</entry><entry>access::can-rename</entry><entry>boolean</entry></row>
12891  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</entry><entry>mountable::can-mount</entry><entry>boolean</entry></row>
12892  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</entry><entry>mountable::can-unmount</entry><entry>boolean</entry></row>
12893  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</entry><entry>mountable::can-eject</entry><entry>boolean</entry></row>
12894  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</entry><entry>mountable::unix-device</entry><entry>uint32</entry></row>
12895  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE</entry><entry>mountable::unix-device-file</entry><entry>string</entry></row>
12896  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</entry><entry>mountable::hal-udi</entry><entry>string</entry></row>
12897  * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED</entry><entry>time::modified</entry><entry>uint64</entry></row>
12898  * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC</entry><entry>time::modified-usec</entry><entry>uint32</entry></row>
12899  * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS</entry><entry>time::access</entry><entry>uint64</entry></row>
12900  * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS_USEC</entry><entry>time::access-usec</entry><entry>uint32</entry></row>
12901  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED</entry><entry>time::changed</entry><entry>uint64</entry></row>
12902  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED_USEC</entry><entry>time::changed-usec</entry><entry>uint32</entry></row>
12903  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED</entry><entry>time::created</entry><entry>uint64</entry></row>
12904  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED_USEC</entry><entry>time::created-usec</entry><entry>uint32</entry></row>
12905  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_DEVICE</entry><entry>unix::device</entry><entry>uint32</entry></row>
12906  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_INODE</entry><entry>unix::inode</entry><entry>uint64</entry></row>
12907  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_MODE</entry><entry>unix::mode</entry><entry>uint32</entry></row>
12908  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_NLINK</entry><entry>unix::nlink</entry><entry>uint32</entry></row>
12909  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_UID</entry><entry>unix::uid</entry><entry>uint32</entry></row>
12910  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_GID</entry><entry>unix::gid</entry><entry>uint32</entry></row>
12911  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_RDEV</entry><entry>unix::rdev</entry><entry>uint32</entry></row>
12912  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</entry><entry>unix::block-size</entry><entry>uint32</entry></row>
12913  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCKS</entry><entry>unix::blocks</entry><entry>uint64</entry></row>
12914  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</entry><entry>unix::is-mountpoint</entry><entry>boolean</entry></row>
12915  * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE</entry><entry>dos::is-archive</entry><entry>boolean</entry></row>
12916  * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_SYSTEM</entry><entry>dos::is-system</entry><entry>boolean</entry></row>
12917  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER</entry><entry>owner::user</entry><entry>string</entry></row>
12918  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER_REAL</entry><entry>owner::user-real</entry><entry>string</entry></row>
12919  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_GROUP</entry><entry>owner::group</entry><entry>string</entry></row>
12920  * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAIL_PATH</entry><entry>thumbnail::path</entry><entry>bytestring</entry></row>
12921  * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAILING_FAILED</entry><entry>thumbnail::failed</entry><entry>boolean</entry></row>
12922  * <row><entry>%G_FILE_ATTRIBUTE_PREVIEW_ICON</entry><entry>preview::icon</entry><entry>object (#GIcon)</entry></row>
12923  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_SIZE</entry><entry>filesystem::size</entry><entry>uint64</entry></row>
12924  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_FREE</entry><entry>filesystem::free</entry><entry>uint64</entry></row>
12925  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_TYPE</entry><entry>filesystem::type</entry><entry>string</entry></row>
12926  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_READONLY</entry><entry>filesystem::readonly</entry><entry>boolean</entry></row>
12927  * <row><entry>%G_FILE_ATTRIBUTE_GVFS_BACKEND</entry><entry>gvfs::backend</entry><entry>string</entry></row>
12928  * <row><entry>%G_FILE_ATTRIBUTE_SELINUX_CONTEXT</entry><entry>selinux::context</entry><entry>string</entry></row>
12929  * </tbody></tgroup></table></para>
12930  *
12931  * Note that there are no predefined keys in the "xattr" and "xattr-sys"
12932  * namespaces. Keys for the "xattr" namespace are constructed by stripping
12933  * away the "user." prefix from the extended user attribute, and prepending
12934  * "xattr::". Keys for the "xattr-sys" namespace are constructed by
12935  * concatenating "xattr-sys::" with the extended attribute name. All extended
12936  * attribute values are returned as hex-encoded strings in which bytes outside
12937  * the ASCII range are encoded as hexadecimal escape sequences of the form
12938  * \x<replaceable>nn</replaceable>.
12939  */
12940
12941
12942 /**
12943  * SECTION:gfiledescriptorbased
12944  * @short_description: Interface for file descriptor based IO
12945  * @include: gio/gfiledescriptorbased.h
12946  * @see_also: #GInputStream, #GOutputStream
12947  *
12948  * #GFileDescriptorBased is implemented by streams (implementations of
12949  * #GInputStream or #GOutputStream) that are based on file descriptors.
12950  *
12951  * Note that <filename>&lt;gio/gfiledescriptorbased.h&gt;</filename> belongs to
12952  * the UNIX-specific GIO interfaces, thus you have to use the
12953  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12954  *
12955  * Since: 2.24
12956  */
12957
12958
12959 /**
12960  * SECTION:gfileenumerator
12961  * @short_description: Enumerated Files Routines
12962  * @include: gio/gio.h
12963  *
12964  * #GFileEnumerator allows you to operate on a set of #GFile<!-- -->s,
12965  * returning a #GFileInfo structure for each file enumerated (e.g.
12966  * g_file_enumerate_children() will return a #GFileEnumerator for each
12967  * of the children within a directory).
12968  *
12969  * To get the next file's information from a #GFileEnumerator, use
12970  * g_file_enumerator_next_file() or its asynchronous version,
12971  * g_file_enumerator_next_files_async(). Note that the asynchronous
12972  * version will return a list of #GFileInfo<!---->s, whereas the
12973  * synchronous will only return the next file in the enumerator.
12974  *
12975  * To close a #GFileEnumerator, use g_file_enumerator_close(), or
12976  * its asynchronous version, g_file_enumerator_close_async(). Once
12977  * a #GFileEnumerator is closed, no further actions may be performed
12978  * on it, and it should be freed with g_object_unref().
12979  */
12980
12981
12982 /**
12983  * SECTION:gfileicon
12984  * @short_description: Icons pointing to an image file
12985  * @include: gio/gio.h
12986  * @see_also: #GIcon, #GLoadableIcon
12987  *
12988  * #GFileIcon specifies an icon by pointing to an image file
12989  * to be used as icon.
12990  */
12991
12992
12993 /**
12994  * SECTION:gfileinfo
12995  * @short_description: File Information and Attributes
12996  * @include: gio/gio.h
12997  * @see_also: #GFile, <link linkend="gio-GFileAttribute">GFileAttribute</link>
12998  *
12999  * Functionality for manipulating basic metadata for files. #GFileInfo
13000  * implements methods for getting information that all files should
13001  * contain, and allows for manipulation of extended attributes.
13002  *
13003  * See <link linkend="gio-GFileAttribute">GFileAttribute</link> for more
13004  * information on how GIO handles file attributes.
13005  *
13006  * To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its
13007  * async variant). To obtain a #GFileInfo for a file input or output
13008  * stream, use g_file_input_stream_query_info() or
13009  * g_file_output_stream_query_info() (or their async variants).
13010  *
13011  * To change the actual attributes of a file, you should then set the
13012  * attribute in the #GFileInfo and call g_file_set_attributes_from_info()
13013  * or g_file_set_attributes_async() on a GFile.
13014  *
13015  * However, not all attributes can be changed in the file. For instance,
13016  * the actual size of a file cannot be changed via g_file_info_set_size().
13017  * You may call g_file_query_settable_attributes() and
13018  * g_file_query_writable_namespaces() to discover the settable attributes
13019  * of a particular file at runtime.
13020  *
13021  * #GFileAttributeMatcher allows for searching through a #GFileInfo for
13022  * attributes.
13023  */
13024
13025
13026 /**
13027  * SECTION:gfileinputstream
13028  * @short_description: File input streaming operations
13029  * @include: gio/gio.h
13030  * @see_also: #GInputStream, #GDataInputStream, #GSeekable
13031  *
13032  * GFileInputStream provides input streams that take their
13033  * content from a file.
13034  *
13035  * GFileInputStream implements #GSeekable, which allows the input
13036  * stream to jump to arbitrary positions in the file, provided the
13037  * filesystem of the file allows it. To find the position of a file
13038  * input stream, use g_seekable_tell(). To find out if a file input
13039  * stream supports seeking, use g_seekable_stream_can_seek().
13040  * To position a file input stream, use g_seekable_seek().
13041  */
13042
13043
13044 /**
13045  * SECTION:gfileiostream
13046  * @short_description: File read and write streaming operations
13047  * @include: gio/gio.h
13048  * @see_also: #GIOStream, #GFileInputStream, #GFileOutputStream, #GSeekable
13049  *
13050  * GFileIOStream provides io streams that both read and write to the same
13051  * file handle.
13052  *
13053  * GFileIOStream implements #GSeekable, which allows the io
13054  * stream to jump to arbitrary positions in the file and to truncate
13055  * the file, provided the filesystem of the file supports these
13056  * operations.
13057  *
13058  * To find the position of a file io stream, use
13059  * g_seekable_tell().
13060  *
13061  * To find out if a file io stream supports seeking, use g_seekable_can_seek().
13062  * To position a file io stream, use g_seekable_seek().
13063  * To find out if a file io stream supports truncating, use
13064  * g_seekable_can_truncate(). To truncate a file io
13065  * stream, use g_seekable_truncate().
13066  *
13067  * The default implementation of all the #GFileIOStream operations
13068  * and the implementation of #GSeekable just call into the same operations
13069  * on the output stream.
13070  *
13071  * Since: 2.22
13072  */
13073
13074
13075 /**
13076  * SECTION:gfilemonitor
13077  * @short_description: File Monitor
13078  * @include: gio/gio.h
13079  *
13080  * Monitors a file or directory for changes.
13081  *
13082  * To obtain a #GFileMonitor for a file or directory, use
13083  * g_file_monitor(), g_file_monitor_file(), or
13084  * g_file_monitor_directory().
13085  *
13086  * To get informed about changes to the file or directory you are
13087  * monitoring, connect to the #GFileMonitor::changed signal. The
13088  * signal will be emitted in the <link
13089  * linkend="g-main-context-push-thread-default">thread-default main
13090  * context</link> of the thread that the monitor was created in
13091  * (though if the global default main context is blocked, this may
13092  * cause notifications to be blocked even if the thread-default
13093  * context is still running).
13094  */
13095
13096
13097 /**
13098  * SECTION:gfilenamecompleter
13099  * @short_description: Filename Completer
13100  * @include: gio/gio.h
13101  *
13102  * Completes partial file and directory names given a partial string by
13103  * looking in the file system for clues. Can return a list of possible
13104  * completion strings for widget implementations.
13105  */
13106
13107
13108 /**
13109  * SECTION:gfileoutputstream
13110  * @short_description: File output streaming operations
13111  * @include: gio/gio.h
13112  * @see_also: #GOutputStream, #GDataOutputStream, #GSeekable
13113  *
13114  * GFileOutputStream provides output streams that write their
13115  * content to a file.
13116  *
13117  * GFileOutputStream implements #GSeekable, which allows the output
13118  * stream to jump to arbitrary positions in the file and to truncate
13119  * the file, provided the filesystem of the file supports these
13120  * operations.
13121  *
13122  * To find the position of a file output stream, use g_seekable_tell().
13123  * To find out if a file output stream supports seeking, use
13124  * g_seekable_can_seek().To position a file output stream, use
13125  * g_seekable_seek(). To find out if a file output stream supports
13126  * truncating, use g_seekable_can_truncate(). To truncate a file output
13127  * stream, use g_seekable_truncate().
13128  */
13129
13130
13131 /**
13132  * SECTION:gfilterinputstream
13133  * @short_description: Filter Input Stream
13134  * @include: gio/gio.h
13135  *
13136  * Base class for input stream implementations that perform some
13137  * kind of filtering operation on a base stream. Typical examples
13138  * of filtering operations are character set conversion, compression
13139  * and byte order flipping.
13140  */
13141
13142
13143 /**
13144  * SECTION:gfilteroutputstream
13145  * @short_description: Filter Output Stream
13146  * @include: gio/gio.h
13147  *
13148  * Base class for output stream implementations that perform some
13149  * kind of filtering operation on a base stream. Typical examples
13150  * of filtering operations are character set conversion, compression
13151  * and byte order flipping.
13152  */
13153
13154
13155 /**
13156  * SECTION:gicon
13157  * @short_description: Interface for icons
13158  * @include: gio/gio.h
13159  *
13160  * #GIcon is a very minimal interface for icons. It provides functions
13161  * for checking the equality of two icons, hashing of icons and
13162  * serializing an icon to and from strings.
13163  *
13164  * #GIcon does not provide the actual pixmap for the icon as this is out
13165  * of GIO's scope, however implementations of #GIcon may contain the name
13166  * of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon).
13167  *
13168  * To obtain a hash of a #GIcon, see g_icon_hash().
13169  *
13170  * To check if two #GIcons are equal, see g_icon_equal().
13171  *
13172  * For serializing a #GIcon, use g_icon_to_string() and
13173  * g_icon_new_for_string().
13174  *
13175  * If your application or library provides one or more #GIcon
13176  * implementations you need to ensure that each #GType is registered
13177  * with the type system prior to calling g_icon_new_for_string().
13178  */
13179
13180
13181 /**
13182  * SECTION:ginetaddress
13183  * @short_description: An IPv4/IPv6 address
13184  *
13185  * #GInetAddress represents an IPv4 or IPv6 internet address. Use
13186  * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_async() to
13187  * look up the #GInetAddress for a hostname. Use
13188  * g_resolver_lookup_by_address() or
13189  * g_resolver_lookup_by_address_async() to look up the hostname for a
13190  * #GInetAddress.
13191  *
13192  * To actually connect to a remote host, you will need a
13193  * #GInetSocketAddress (which includes a #GInetAddress as well as a
13194  * port number).
13195  */
13196
13197
13198 /**
13199  * SECTION:ginetsocketaddress
13200  * @short_description: Internet GSocketAddress
13201  *
13202  * An IPv4 or IPv6 socket address; that is, the combination of a
13203  * #GInetAddress and a port number.
13204  */
13205
13206
13207 /**
13208  * SECTION:ginitable
13209  * @short_description: Failable object initialization interface
13210  * @include: gio/gio.h
13211  * @see_also: #GAsyncInitable
13212  *
13213  * #GInitable is implemented by objects that can fail during
13214  * initialization. If an object implements this interface the
13215  * g_initable_init() function must be called as the first thing
13216  * after construction. If g_initable_init() is not called, or if
13217  * it returns an error, all further operations on the object
13218  * should fail, generally with a %G_IO_ERROR_NOT_INITIALIZED error.
13219  *
13220  * Users of objects implementing this are not intended to use
13221  * the interface method directly, instead it will be used automatically
13222  * in various ways. For C applications you generally just call
13223  * g_initable_new() directly, or indirectly via a foo_thing_new() wrapper.
13224  * This will call g_initable_init() under the cover, returning %NULL and
13225  * setting a #GError on failure (at which point the instance is
13226  * unreferenced).
13227  *
13228  * For bindings in languages where the native constructor supports
13229  * exceptions the binding could check for objects implemention %GInitable
13230  * during normal construction and automatically initialize them, throwing
13231  * an exception on failure.
13232  */
13233
13234
13235 /**
13236  * SECTION:ginputstream
13237  * @short_description: Base class for implementing streaming input
13238  * @include: gio/gio.h
13239  *
13240  * GInputStream has functions to read from a stream (g_input_stream_read()),
13241  * to close a stream (g_input_stream_close()) and to skip some content
13242  * (g_input_stream_skip()).
13243  *
13244  * To copy the content of an input stream to an output stream without
13245  * manually handling the reads and writes, use g_output_stream_splice().
13246  *
13247  * All of these functions have async variants too.
13248  */
13249
13250
13251 /**
13252  * SECTION:gioerror
13253  * @short_description: Error helper functions
13254  * @include: gio/gio.h
13255  *
13256  * Contains helper functions for reporting errors to the user.
13257  */
13258
13259
13260 /**
13261  * SECTION:giomodule
13262  * @short_description: Loadable GIO Modules
13263  * @include: gio/gio.h
13264  *
13265  * Provides an interface and default functions for loading and unloading
13266  * modules. This is used internally to make GIO extensible, but can also
13267  * be used by others to implement module loading.
13268  */
13269
13270
13271 /**
13272  * SECTION:gioscheduler
13273  * @short_description: I/O Scheduler
13274  * @include: gio/gio.h
13275  *
13276  * Schedules asynchronous I/O operations. #GIOScheduler integrates
13277  * into the main event loop (#GMainLoop) and may use threads if they
13278  * are available.
13279  *
13280  * <para id="io-priority"><indexterm><primary>I/O priority</primary></indexterm>
13281  * Each I/O operation has a priority, and the scheduler uses the priorities
13282  * to determine the order in which operations are executed. They are
13283  * <emphasis>not</emphasis> used to determine system-wide I/O scheduling.
13284  * Priorities are integers, with lower numbers indicating higher priority.
13285  * It is recommended to choose priorities between %G_PRIORITY_LOW and
13286  * %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT as a default.
13287  * </para>
13288  */
13289
13290
13291 /**
13292  * SECTION:giostream
13293  * @short_description: Base class for implementing read/write streams
13294  * @include: gio/gio.h
13295  * @see_also: #GInputStream, #GOutputStream
13296  *
13297  * GIOStream represents an object that has both read and write streams.
13298  * Generally the two streams acts as separate input and output streams,
13299  * but they share some common resources and state. For instance, for
13300  * seekable streams they may use the same position in both streams.
13301  *
13302  * Examples of #GIOStream objects are #GSocketConnection which represents
13303  * a two-way network connection, and #GFileIOStream which represent a
13304  * file handle opened in read-write mode.
13305  *
13306  * To do the actual reading and writing you need to get the substreams
13307  * with g_io_stream_get_input_stream() and g_io_stream_get_output_stream().
13308  *
13309  * The #GIOStream object owns the input and the output streams, not the other
13310  * way around, so keeping the substreams alive will not keep the #GIOStream
13311  * object alive. If the #GIOStream object is freed it will be closed, thus
13312  * closing the substream, so even if the substreams stay alive they will
13313  * always just return a %G_IO_ERROR_CLOSED for all operations.
13314  *
13315  * To close a stream use g_io_stream_close() which will close the common
13316  * stream object and also the individual substreams. You can also close
13317  * the substreams themselves. In most cases this only marks the
13318  * substream as closed, so further I/O on it fails. However, some streams
13319  * may support "half-closed" states where one direction of the stream
13320  * is actually shut down.
13321  *
13322  * Since: 2.22
13323  */
13324
13325
13326 /**
13327  * SECTION:gloadableicon
13328  * @short_description: Loadable Icons
13329  * @include: gio/gio.h
13330  * @see_also: #GIcon, #GThemedIcon
13331  *
13332  * Extends the #GIcon interface and adds the ability to
13333  * load icons from streams.
13334  */
13335
13336
13337 /**
13338  * SECTION:gmemoryinputstream
13339  * @short_description: Streaming input operations on memory chunks
13340  * @include: gio/gio.h
13341  * @see_also: #GMemoryOutputStream
13342  *
13343  * #GMemoryInputStream is a class for using arbitrary
13344  * memory chunks as input for GIO streaming input operations.
13345  */
13346
13347
13348 /**
13349  * SECTION:gmemoryoutputstream
13350  * @short_description: Streaming output operations on memory chunks
13351  * @include: gio/gio.h
13352  * @see_also: #GMemoryInputStream
13353  *
13354  * #GMemoryOutputStream is a class for using arbitrary
13355  * memory chunks as output for GIO streaming output operations.
13356  */
13357
13358
13359 /**
13360  * SECTION:gmount
13361  * @short_description: Mount management
13362  * @include: gio/gio.h
13363  * @see_also: GVolume, GUnixMount
13364  *
13365  * The #GMount interface represents user-visible mounts. Note, when
13366  * porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.
13367  *
13368  * #GMount is a "mounted" filesystem that you can access. Mounted is in
13369  * quotes because it's not the same as a unix mount, it might be a gvfs
13370  * mount, but you can still access the files on it if you use GIO. Might or
13371  * might not be related to a volume object.
13372  *
13373  * Unmounting a #GMount instance is an asynchronous operation. For
13374  * more information about asynchronous operations, see #GAsyncReady
13375  * and #GSimpleAsyncReady. To unmount a #GMount instance, first call
13376  * g_mount_unmount_with_operation() with (at least) the #GMount instance and a
13377  * #GAsyncReadyCallback.  The callback will be fired when the
13378  * operation has resolved (either with success or failure), and a
13379  * #GAsyncReady structure will be passed to the callback.  That
13380  * callback should then call g_mount_unmount_with_operation_finish() with the #GMount
13381  * and the #GAsyncReady data to see if the operation was completed
13382  * successfully.  If an @error is present when g_mount_unmount_with_operation_finish()
13383  * is called, then it will be filled with any error information.
13384  */
13385
13386
13387 /**
13388  * SECTION:gmountoperation
13389  * @short_description: Object used for authentication and user interaction
13390  * @include: gio/gio.h
13391  *
13392  * #GMountOperation provides a mechanism for interacting with the user.
13393  * It can be used for authenticating mountable operations, such as loop
13394  * mounting files, hard drive partitions or server locations. It can
13395  * also be used to ask the user questions or show a list of applications
13396  * preventing unmount or eject operations from completing.
13397  *
13398  * Note that #GMountOperation is used for more than just #GMount
13399  * objects â€“ for example it is also used in g_drive_start() and
13400  * g_drive_stop().
13401  *
13402  * Users should instantiate a subclass of this that implements all the
13403  * various callbacks to show the required dialogs, such as
13404  * #GtkMountOperation. If no user interaction is desired (for example
13405  * when automounting filesystems at login time), usually %NULL can be
13406  * passed, see each method taking a #GMountOperation for details.
13407  */
13408
13409
13410 /**
13411  * SECTION:gnetworkaddress
13412  * @short_description: A GSocketConnectable for resolving hostnames
13413  * @include: gio/gio.h
13414  *
13415  * #GNetworkAddress provides an easy way to resolve a hostname and
13416  * then attempt to connect to that host, handling the possibility of
13417  * multiple IP addresses and multiple address families.
13418  *
13419  * See #GSocketConnectable for and example of using the connectable
13420  * interface.
13421  */
13422
13423
13424 /**
13425  * SECTION:gnetworkservice
13426  * @short_description: A GSocketConnectable for resolving SRV records
13427  * @include: gio/gio.h
13428  *
13429  * Like #GNetworkAddress does with hostnames, #GNetworkService
13430  * provides an easy way to resolve a SRV record, and then attempt to
13431  * connect to one of the hosts that implements that service, handling
13432  * service priority/weighting, multiple IP addresses, and multiple
13433  * address families.
13434  *
13435  * See #GSrvTarget for more information about SRV records, and see
13436  * #GSocketConnectable for and example of using the connectable
13437  * interface.
13438  */
13439
13440
13441 /**
13442  * SECTION:goutputstream
13443  * @short_description: Base class for implementing streaming output
13444  * @include: gio/gio.h
13445  *
13446  * GOutputStream has functions to write to a stream (g_output_stream_write()),
13447  * to close a stream (g_output_stream_close()) and to flush pending writes
13448  * (g_output_stream_flush()).
13449  *
13450  * To copy the content of an input stream to an output stream without
13451  * manually handling the reads and writes, use g_output_stream_splice().
13452  *
13453  * All of these functions have async variants too.
13454  */
13455
13456
13457 /**
13458  * SECTION:gpermission
13459  * @title: GPermission
13460  * @short_description: An object representing the permission to perform a certain action
13461  *
13462  * A #GPermission represents the status of the caller's permission to
13463  * perform a certain action.
13464  *
13465  * You can query if the action is currently allowed and if it is
13466  * possible to acquire the permission so that the action will be allowed
13467  * in the future.
13468  *
13469  * There is also an API to actually acquire the permission and one to
13470  * release it.
13471  *
13472  * As an example, a #GPermission might represent the ability for the
13473  * user to write to a #GSettings object.  This #GPermission object could
13474  * then be used to decide if it is appropriate to show a "Click here to
13475  * unlock" button in a dialog and to provide the mechanism to invoke
13476  * when that button is clicked.
13477  */
13478
13479
13480 /**
13481  * SECTION:gpollableinputstream
13482  * @short_description: Interface for pollable input streams
13483  * @include: gio/gio.h
13484  * @see_also: #GInputStream, #GPollableOutputStream, #GFileDescriptorBased
13485  *
13486  * #GPollableInputStream is implemented by #GInputStream<!-- -->s that
13487  * can be polled for readiness to read. This can be used when
13488  * interfacing with a non-GIO API that expects
13489  * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
13490  *
13491  * Since: 2.28
13492  */
13493
13494
13495 /**
13496  * SECTION:gpollableoutputstream
13497  * @short_description: Interface for pollable output streams
13498  * @include: gio/gio.h
13499  * @see_also: #GOutputStream, #GFileDescriptorBased, #GPollableInputStream
13500  *
13501  * #GPollableOutputStream is implemented by #GOutputStream<!-- -->s that
13502  * can be polled for readiness to write. This can be used when
13503  * interfacing with a non-GIO API that expects
13504  * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
13505  *
13506  * Since: 2.28
13507  */
13508
13509
13510 /**
13511  * SECTION:gproxy
13512  * @short_description: Interface for proxy handling
13513  *
13514  * A #GProxy handles connecting to a remote host via a given type of
13515  * proxy server. It is implemented by the 'gio-proxy' extension point.
13516  * The extensions are named after their proxy protocol name. As an
13517  * example, a SOCKS5 proxy implementation can be retrieved with the
13518  * name 'socks5' using the function
13519  * g_io_extension_point_get_extension_by_name().
13520  *
13521  * Since: 2.26
13522  */
13523
13524
13525 /**
13526  * SECTION:gproxyaddress
13527  * @short_description: An internet address with proxy information
13528  *
13529  * Support for proxied #GInetSocketAddress.
13530  */
13531
13532
13533 /**
13534  * SECTION:gproxyresolver
13535  * @short_description: Asynchronous and cancellable network proxy resolver
13536  * @include: gio/gio.h
13537  *
13538  * #GProxyResolver provides synchronous and asynchronous network proxy
13539  * resolution. #GProxyResolver is used within #GSocketClient through
13540  * the method g_socket_connectable_proxy_enumerate().
13541  */
13542
13543
13544 /**
13545  * SECTION:gresolver
13546  * @short_description: Asynchronous and cancellable DNS resolver
13547  * @include: gio/gio.h
13548  *
13549  * #GResolver provides cancellable synchronous and asynchronous DNS
13550  * resolution, for hostnames (g_resolver_lookup_by_address(),
13551  * g_resolver_lookup_by_name() and their async variants) and SRV
13552  * (service) records (g_resolver_lookup_service()).
13553  *
13554  * #GNetworkAddress and #GNetworkService provide wrappers around
13555  * #GResolver functionality that also implement #GSocketConnectable,
13556  * making it easy to connect to a remote host/service.
13557  */
13558
13559
13560 /**
13561  * SECTION:gseekable
13562  * @short_description: Stream seeking interface
13563  * @include: gio/gio.h
13564  * @see_also: #GInputStream, #GOutputStream
13565  *
13566  * #GSeekable is implemented by streams (implementations of
13567  * #GInputStream or #GOutputStream) that support seeking.
13568  */
13569
13570
13571 /**
13572  * SECTION:gsettings
13573  * @short_description: High-level API for application settings
13574  *
13575  * The #GSettings class provides a convenient API for storing and retrieving
13576  * application settings.
13577  *
13578  * Reads and writes can be considered to be non-blocking.  Reading
13579  * settings with #GSettings is typically extremely fast: on
13580  * approximately the same order of magnitude (but slower than) a
13581  * #GHashTable lookup.  Writing settings is also extremely fast in terms
13582  * of time to return to your application, but can be extremely expensive
13583  * for other threads and other processes.  Many settings backends
13584  * (including dconf) have lazy initialisation which means in the common
13585  * case of the user using their computer without modifying any settings
13586  * a lot of work can be avoided.  For dconf, the D-Bus service doesn't
13587  * even need to be started in this case.  For this reason, you should
13588  * only ever modify #GSettings keys in response to explicit user action.
13589  * Particular care should be paid to ensure that modifications are not
13590  * made during startup -- for example, when setting the initial value
13591  * of preferences widgets.  The built-in g_settings_bind() functionality
13592  * is careful not to write settings in response to notify signals as a
13593  * result of modifications that it makes to widgets.
13594  *
13595  * When creating a GSettings instance, you have to specify a schema
13596  * that describes the keys in your settings and their types and default
13597  * values, as well as some other information.
13598  *
13599  * Normally, a schema has as fixed path that determines where the settings
13600  * are stored in the conceptual global tree of settings. However, schemas
13601  * can also be 'relocatable', i.e. not equipped with a fixed path. This is
13602  * useful e.g. when the schema describes an 'account', and you want to be
13603  * able to store a arbitrary number of accounts.
13604  *
13605  * Unlike other configuration systems (like GConf), GSettings does not
13606  * restrict keys to basic types like strings and numbers. GSettings stores
13607  * values as #GVariant, and allows any #GVariantType for keys. Key names
13608  * are restricted to lowercase characters, numbers and '-'. Furthermore,
13609  * the names must begin with a lowercase character, must not end
13610  * with a '-', and must not contain consecutive dashes.
13611  *
13612  * Similar to GConf, the default values in GSettings schemas can be
13613  * localized, but the localized values are stored in gettext catalogs
13614  * and looked up with the domain that is specified in the
13615  * <tag class="attribute">gettext-domain</tag> attribute of the
13616  * <tag class="starttag">schemalist</tag> or <tag class="starttag">schema</tag>
13617  * elements and the category that is specified in the l10n attribute of the
13618  * <tag class="starttag">key</tag> element.
13619  *
13620  * GSettings uses schemas in a compact binary form that is created
13621  * by the <link linkend="glib-compile-schemas">glib-compile-schemas</link>
13622  * utility. The input is a schema description in an XML format that can be
13623  * described by the following DTD:
13624  * |[<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>]|
13625  *
13626  * glib-compile-schemas expects schema files to have the extension <filename>.gschema.xml</filename>
13627  *
13628  * At runtime, schemas are identified by their id (as specified
13629  * in the <tag class="attribute">id</tag> attribute of the
13630  * <tag class="starttag">schema</tag> element). The
13631  * convention for schema ids is to use a dotted name, similar in
13632  * style to a D-Bus bus name, e.g. "org.gnome.SessionManager". In particular,
13633  * if the settings are for a specific service that owns a D-Bus bus name,
13634  * the D-Bus bus name and schema id should match. For schemas which deal
13635  * with settings not associated with one named application, the id should
13636  * not use StudlyCaps, e.g. "org.gnome.font-rendering".
13637  *
13638  * In addition to #GVariant types, keys can have types that have enumerated
13639  * types. These can be described by a <tag class="starttag">choice</tag>,
13640  * <tag class="starttag">enum</tag> or <tag class="starttag">flags</tag> element, see
13641  * <xref linkend="schema-enumerated"/>. The underlying type of
13642  * such a key is string, but you can use g_settings_get_enum(),
13643  * g_settings_set_enum(), g_settings_get_flags(), g_settings_set_flags()
13644  * access the numeric values corresponding to the string value of enum
13645  * and flags keys.
13646  *
13647  * <example id="schema-default-values"><title>Default values</title>
13648  * <programlisting><![CDATA[
13649  * <schemalist>
13650  * <schema id="org.gtk.Test" path="/tests/" gettext-domain="test">
13651  *
13652  * <key name="greeting" type="s">
13653  * <default l10n="messages">"Hello, earthlings"</default>
13654  * <summary>A greeting</summary>
13655  * <description>
13656  * Greeting of the invading martians
13657  * </description>
13658  * </key>
13659  *
13660  * <key name="box" type="(ii)">
13661  * <default>(20,30)</default>
13662  * </key>
13663  *
13664  * </schema>
13665  * </schemalist>
13666  * ]]></programlisting></example>
13667  *
13668  * <example id="schema-enumerated"><title>Ranges, choices and enumerated types</title>
13669  * <programlisting><![CDATA[
13670  * <schemalist>
13671  *
13672  * <enum id="org.gtk.Test.myenum">
13673  * <value nick="first" value="1"/>
13674  * <value nick="second" value="2"/>
13675  * </enum>
13676  *
13677  * <flags id="org.gtk.Test.myflags">
13678  * <value nick="flag1" value="1"/>
13679  * <value nick="flag2" value="2"/>
13680  * <value nick="flag3" value="4"/>
13681  * </flags>
13682  *
13683  * <schema id="org.gtk.Test">
13684  *
13685  * <key name="key-with-range" type="i">
13686  * <range min="1" max="100"/>
13687  * <default>10</default>
13688  * </key>
13689  *
13690  * <key name="key-with-choices" type="s">
13691  * <choices>
13692  * <choice value='Elisabeth'/>
13693  * <choice value='Annabeth'/>
13694  * <choice value='Joe'/>
13695  * </choices>
13696  * <aliases>
13697  * <alias value='Anna' target='Annabeth'/>
13698  * <alias value='Beth' target='Elisabeth'/>
13699  * </aliases>
13700  * <default>'Joe'</default>
13701  * </key>
13702  *
13703  * <key name='enumerated-key' enum='org.gtk.Test.myenum'>
13704  * <default>'first'</default>
13705  * </key>
13706  *
13707  * <key name='flags-key' flags='org.gtk.Test.myflags'>
13708  * <default>["flag1",flag2"]</default>
13709  * </key>
13710  * </schema>
13711  * </schemalist>
13712  * ]]></programlisting></example>
13713  *
13714  * <refsect2>
13715  * <title>Vendor overrides</title>
13716  * <para>
13717  * Default values are defined in the schemas that get installed by
13718  * an application. Sometimes, it is necessary for a vendor or distributor
13719  * to adjust these defaults. Since patching the XML source for the schema
13720  * is inconvenient and error-prone,
13721  * <link linkend="glib-compile-schemas">glib-compile-schemas</link> reads
13722  * so-called 'vendor override' files. These are keyfiles in the same
13723  * directory as the XML schema sources which can override default values.
13724  * The schema id serves as the group name in the key file, and the values
13725  * are expected in serialized GVariant form, as in the following example:
13726  * <informalexample><programlisting>
13727  * [org.gtk.Example]
13728  * key1='string'
13729  * key2=1.5
13730  * </programlisting></informalexample>
13731  * </para>
13732  * <para>
13733  * glib-compile-schemas expects schema files to have the extension
13734  * <filename>.gschema.override</filename>
13735  * </para>
13736  * </refsect2>
13737  *
13738  * <refsect2>
13739  * <title>Binding</title>
13740  * <para>
13741  * A very convenient feature of GSettings lets you bind #GObject properties
13742  * directly to settings, using g_settings_bind(). Once a GObject property
13743  * has been bound to a setting, changes on either side are automatically
13744  * propagated to the other side. GSettings handles details like
13745  * mapping between GObject and GVariant types, and preventing infinite
13746  * cycles.
13747  * </para>
13748  * <para>
13749  * This makes it very easy to hook up a preferences dialog to the
13750  * underlying settings. To make this even more convenient, GSettings
13751  * looks for a boolean property with the name "sensitivity" and
13752  * automatically binds it to the writability of the bound setting.
13753  * If this 'magic' gets in the way, it can be suppressed with the
13754  * #G_SETTINGS_BIND_NO_SENSITIVITY flag.
13755  * </para>
13756  * </refsect2>
13757  */
13758
13759
13760 /**
13761  * SECTION:gsettingsbackend
13762  * @title: GSettingsBackend
13763  * @short_description: Interface for settings backend implementations
13764  * @include: gio/gsettingsbackend.h
13765  * @see_also: #GSettings, #GIOExtensionPoint
13766  *
13767  * The #GSettingsBackend interface defines a generic interface for
13768  * non-strictly-typed data that is stored in a hierarchy. To implement
13769  * an alternative storage backend for #GSettings, you need to implement
13770  * the #GSettingsBackend interface and then make it implement the
13771  * extension point #G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.
13772  *
13773  * The interface defines methods for reading and writing values, a
13774  * method for determining if writing of certain values will fail
13775  * (lockdown) and a change notification mechanism.
13776  *
13777  * The semantics of the interface are very precisely defined and
13778  * implementations must carefully adhere to the expectations of
13779  * callers that are documented on each of the interface methods.
13780  *
13781  * Some of the GSettingsBackend functions accept or return a #GTree.
13782  * These trees always have strings as keys and #GVariant as values.
13783  * g_settings_backend_create_tree() is a convenience function to create
13784  * suitable trees.
13785  *
13786  * <note><para>
13787  * The #GSettingsBackend API is exported to allow third-party
13788  * implementations, but does not carry the same stability guarantees
13789  * as the public GIO API. For this reason, you have to define the
13790  * C preprocessor symbol #G_SETTINGS_ENABLE_BACKEND before including
13791  * <filename>gio/gsettingsbackend.h</filename>
13792  * </para></note>
13793  */
13794
13795
13796 /**
13797  * SECTION:gsimpleaction
13798  * @title: GSimpleAction
13799  * @short_description: A simple GSimpleAction
13800  *
13801  * A #GSimpleAction is the obvious simple implementation of the #GAction
13802  * interface.  This is the easiest way to create an action for purposes of
13803  * adding it to a #GSimpleActionGroup.
13804  *
13805  * See also #GtkAction.
13806  */
13807
13808
13809 /**
13810  * SECTION:gsimpleactiongroup
13811  * @title: GSimpleActionGroup
13812  * @short_description: A simple GActionGroup implementation
13813  *
13814  * #GSimpleActionGroup is a hash table filled with #GAction objects,
13815  * implementing the #GActionGroup interface.
13816  */
13817
13818
13819 /**
13820  * SECTION:gsimpleasyncresult
13821  * @short_description: Simple asynchronous results implementation
13822  * @include: gio/gio.h
13823  * @see_also: #GAsyncResult
13824  *
13825  * Implements #GAsyncResult for simple cases. Most of the time, this
13826  * will be all an application needs, and will be used transparently.
13827  * Because of this, #GSimpleAsyncResult is used throughout GIO for
13828  * handling asynchronous functions.
13829  *
13830  * GSimpleAsyncResult handles #GAsyncReadyCallback<!-- -->s, error
13831  * reporting, operation cancellation and the final state of an operation,
13832  * completely transparent to the application. Results can be returned
13833  * as a pointer e.g. for functions that return data that is collected
13834  * asynchronously, a boolean value for checking the success or failure
13835  * of an operation, or a #gssize for operations which return the number
13836  * of bytes modified by the operation; all of the simple return cases
13837  * are covered.
13838  *
13839  * Most of the time, an application will not need to know of the details
13840  * of this API; it is handled transparently, and any necessary operations
13841  * are handled by #GAsyncResult's interface. However, if implementing a
13842  * new GIO module, for writing language bindings, or for complex
13843  * applications that need better control of how asynchronous operations
13844  * are completed, it is important to understand this functionality.
13845  *
13846  * GSimpleAsyncResults are tagged with the calling function to ensure
13847  * that asynchronous functions and their finishing functions are used
13848  * together correctly.
13849  *
13850  * To create a new #GSimpleAsyncResult, call g_simple_async_result_new().
13851  * If the result needs to be created for a #GError, use
13852  * g_simple_async_result_new_from_error() or
13853  * g_simple_async_result_new_take_error(). If a #GError is not available
13854  * (e.g. the asynchronous operation's doesn't take a #GError argument),
13855  * but the result still needs to be created for an error condition, use
13856  * g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
13857  * if your application or binding requires passing a variable argument list
13858  * directly), and the error can then be propagated through the use of
13859  * g_simple_async_result_propagate_error().
13860  *
13861  * An asynchronous operation can be made to ignore a cancellation event by
13862  * calling g_simple_async_result_set_handle_cancellation() with a
13863  * #GSimpleAsyncResult for the operation and %FALSE. This is useful for
13864  * operations that are dangerous to cancel, such as close (which would
13865  * cause a leak if cancelled before being run).
13866  *
13867  * GSimpleAsyncResult can integrate into GLib's event loop, #GMainLoop,
13868  * or it can use #GThread<!-- -->s if available.
13869  * g_simple_async_result_complete() will finish an I/O task directly
13870  * from the point where it is called. g_simple_async_result_complete_in_idle()
13871  * will finish it from an idle handler in the <link
13872  * linkend="g-main-context-push-thread-default">thread-default main
13873  * context</link>. g_simple_async_result_run_in_thread() will run the
13874  * job in a separate thread and then deliver the result to the
13875  * thread-default main context.
13876  *
13877  * To set the results of an asynchronous function,
13878  * g_simple_async_result_set_op_res_gpointer(),
13879  * g_simple_async_result_set_op_res_gboolean(), and
13880  * g_simple_async_result_set_op_res_gssize()
13881  * are provided, setting the operation's result to a gpointer, gboolean, or
13882  * gssize, respectively.
13883  *
13884  * Likewise, to get the result of an asynchronous function,
13885  * g_simple_async_result_get_op_res_gpointer(),
13886  * g_simple_async_result_get_op_res_gboolean(), and
13887  * g_simple_async_result_get_op_res_gssize() are
13888  * provided, getting the operation's result as a gpointer, gboolean, and
13889  * gssize, respectively.
13890  *
13891  * For the details of the requirements implementations must respect, see
13892  * #GAsyncResult.  A typical implementation of an asynchronous operation
13893  * using GSimpleAsyncResult looks something like this:
13894  *
13895  * |[
13896  * static void
13897  * baked_cb (Cake    *cake,
13898  * gpointer user_data)
13899  * {
13900  * /&ast; In this example, this callback is not given a reference to the cake, so
13901  * &ast; the GSimpleAsyncResult has to take a reference to it.
13902  * &ast;/
13903  * GSimpleAsyncResult *result = user_data;
13904  *
13905  * if (cake == NULL)
13906  * g_simple_async_result_set_error (result,
13907  * BAKER_ERRORS,
13908  * BAKER_ERROR_NO_FLOUR,
13909  * "Go to the supermarket");
13910  * else
13911  * g_simple_async_result_set_op_res_gpointer (result,
13912  * g_object_ref (cake),
13913  * g_object_unref);
13914  *
13915  *
13916  * /&ast; In this example, we assume that baked_cb is called as a callback from
13917  * &ast; the mainloop, so it's safe to complete the operation synchronously here.
13918  * &ast; If, however, _baker_prepare_cake () might call its callback without
13919  * &ast; first returning to the mainloop â€” inadvisable, but some APIs do so â€”
13920  * &ast; we would need to use g_simple_async_result_complete_in_idle().
13921  * &ast;/
13922  * g_simple_async_result_complete (result);
13923  * g_object_unref (result);
13924  * }
13925  *
13926  * void
13927  * baker_bake_cake_async (Baker              *self,
13928  * guint               radius,
13929  * GAsyncReadyCallback callback,
13930  * gpointer            user_data)
13931  * {
13932  * GSimpleAsyncResult *simple;
13933  * Cake               *cake;
13934  *
13935  * if (radius < 3)
13936  * {
13937  * g_simple_async_report_error_in_idle (G_OBJECT (self),
13938  * callback,
13939  * user_data,
13940  * BAKER_ERRORS,
13941  * BAKER_ERROR_TOO_SMALL,
13942  * "%ucm radius cakes are silly",
13943  * radius);
13944  * return;
13945  * }
13946  *
13947  * simple = g_simple_async_result_new (G_OBJECT (self),
13948  * callback,
13949  * user_data,
13950  * baker_bake_cake_async);
13951  * cake = _baker_get_cached_cake (self, radius);
13952  *
13953  * if (cake != NULL)
13954  * {
13955  * g_simple_async_result_set_op_res_gpointer (simple,
13956  * g_object_ref (cake),
13957  * g_object_unref);
13958  * g_simple_async_result_complete_in_idle (simple);
13959  * g_object_unref (simple);
13960  * /&ast; Drop the reference returned by _baker_get_cached_cake(); the
13961  * &ast; GSimpleAsyncResult has taken its own reference.
13962  * &ast;/
13963  * g_object_unref (cake);
13964  * return;
13965  * }
13966  *
13967  * _baker_prepare_cake (self, radius, baked_cb, simple);
13968  * }
13969  *
13970  * Cake *
13971  * baker_bake_cake_finish (Baker        *self,
13972  * GAsyncResult *result,
13973  * GError      **error)
13974  * {
13975  * GSimpleAsyncResult *simple;
13976  * Cake               *cake;
13977  *
13978  * g_return_val_if_fail (g_simple_async_result_is_valid (result,
13979  * G_OBJECT (self),
13980  * baker_bake_cake_async),
13981  * NULL);
13982  *
13983  * simple = (GSimpleAsyncResult *) result;
13984  *
13985  * if (g_simple_async_result_propagate_error (simple, error))
13986  * return NULL;
13987  *
13988  * cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple));
13989  * return g_object_ref (cake);
13990  * }
13991  * ]|
13992  */
13993
13994
13995 /**
13996  * SECTION:gsimplepermission
13997  * @title: GSimplePermission
13998  * @short_description: A GPermission that doesn't change value
13999  *
14000  * #GSimplePermission is a trivial implementation of #GPermission that
14001  * represents a permission that is either always or never allowed.  The
14002  * value is given at constuction and doesn't change.
14003  *
14004  * Calling request or release will result in errors.
14005  */
14006
14007
14008 /**
14009  * SECTION:gsocket
14010  * @short_description: Low-level socket object
14011  * @include: gio/gio.h
14012  * @see_also: #GInitable
14013  *
14014  * A #GSocket is a low-level networking primitive. It is a more or less
14015  * direct mapping of the BSD socket API in a portable GObject based API.
14016  * It supports both the UNIX socket implementations and winsock2 on Windows.
14017  *
14018  * #GSocket is the platform independent base upon which the higher level
14019  * network primitives are based. Applications are not typically meant to
14020  * use it directly, but rather through classes like #GSocketClient,
14021  * #GSocketService and #GSocketConnection. However there may be cases where
14022  * direct use of #GSocket is useful.
14023  *
14024  * #GSocket implements the #GInitable interface, so if it is manually constructed
14025  * by e.g. g_object_new() you must call g_initable_init() and check the
14026  * results before using the object. This is done automatically in
14027  * g_socket_new() and g_socket_new_from_fd(), so these functions can return
14028  * %NULL.
14029  *
14030  * Sockets operate in two general modes, blocking or non-blocking. When
14031  * in blocking mode all operations block until the requested operation
14032  * is finished or there is an error. In non-blocking mode all calls that
14033  * would block return immediately with a %G_IO_ERROR_WOULD_BLOCK error.
14034  * To know when a call would successfully run you can call g_socket_condition_check(),
14035  * or g_socket_condition_wait(). You can also use g_socket_create_source() and
14036  * attach it to a #GMainContext to get callbacks when I/O is possible.
14037  * Note that all sockets are always set to non blocking mode in the system, and
14038  * blocking mode is emulated in GSocket.
14039  *
14040  * When working in non-blocking mode applications should always be able to
14041  * handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other
14042  * function said that I/O was possible. This can easily happen in case
14043  * of a race condition in the application, but it can also happen for other
14044  * reasons. For instance, on Windows a socket is always seen as writable
14045  * until a write returns %G_IO_ERROR_WOULD_BLOCK.
14046  *
14047  * #GSocket<!-- -->s can be either connection oriented or datagram based.
14048  * For connection oriented types you must first establish a connection by
14049  * either connecting to an address or accepting a connection from another
14050  * address. For connectionless socket types the target/source address is
14051  * specified or received in each I/O operation.
14052  *
14053  * All socket file descriptors are set to be close-on-exec.
14054  *
14055  * Note that creating a #GSocket causes the signal %SIGPIPE to be
14056  * ignored for the remainder of the program. If you are writing a
14057  * command-line utility that uses #GSocket, you may need to take into
14058  * account the fact that your program will not automatically be killed
14059  * if it tries to write to %stdout after it has been closed.
14060  *
14061  * Since: 2.22
14062  */
14063
14064
14065 /**
14066  * SECTION:gsocketaddress
14067  * @short_description: Abstract base class representing endpoints for socket communication
14068  *
14069  * #GSocketAddress is the equivalent of <type>struct sockaddr</type>
14070  * in the BSD sockets API. This is an abstract class; use
14071  * #GInetSocketAddress for internet sockets, or #GUnixSocketAddress
14072  * for UNIX domain sockets.
14073  */
14074
14075
14076 /**
14077  * SECTION:gsocketclient
14078  * @short_description: Helper for connecting to a network service
14079  * @include: gio/gio.h
14080  * @see_also: #GSocketConnection, #GSocketListener
14081  *
14082  * #GSocketClient is a high-level utility class for connecting to a
14083  * network host using a connection oriented socket type.
14084  *
14085  * You create a #GSocketClient object, set any options you want, and then
14086  * call a sync or async connect operation, which returns a #GSocketConnection
14087  * subclass on success.
14088  *
14089  * The type of the #GSocketConnection object returned depends on the type of
14090  * the underlying socket that is in use. For instance, for a TCP/IP connection
14091  * it will be a #GTcpConnection.
14092  *
14093  * Since: 2.22
14094  */
14095
14096
14097 /**
14098  * SECTION:gsocketconnectable
14099  * @short_description: Interface for potential socket endpoints
14100  *
14101  * Objects that describe one or more potential socket endpoints
14102  * implement #GSocketConnectable. Callers can then use
14103  * g_socket_connectable_enumerate() to get a #GSocketAddressEnumerator
14104  * to try out each socket address in turn until one succeeds, as shown
14105  * in the sample code below.
14106  *
14107  * |[
14108  * MyConnectionType *
14109  * connect_to_host (const char    *hostname,
14110  * guint16        port,
14111  * GCancellable  *cancellable,
14112  * GError       **error)
14113  * {
14114  * MyConnection *conn = NULL;
14115  * GSocketConnectable *addr;
14116  * GSocketAddressEnumerator *enumerator;
14117  * GSocketAddress *sockaddr;
14118  * GError *conn_error = NULL;
14119  *
14120  * addr = g_network_address_new ("www.gnome.org", 80);
14121  * enumerator = g_socket_connectable_enumerate (addr);
14122  * g_object_unref (addr);
14123  *
14124  * /<!-- -->* Try each sockaddr until we succeed. Record the first
14125  * * connection error, but not any further ones (since they'll probably
14126  * * be basically the same as the first).
14127  * *<!-- -->/
14128  * while (!conn && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
14129  * {
14130  * conn = connect_to_sockaddr (sockaddr, conn_error ? NULL : &conn_error);
14131  * g_object_unref (sockaddr);
14132  * }
14133  * g_object_unref (enumerator);
14134  *
14135  * if (conn)
14136  * {
14137  * if (conn_error)
14138  * {
14139  * /<!-- -->* We couldn't connect to the first address, but we succeeded
14140  * * in connecting to a later address.
14141  * *<!-- -->/
14142  * g_error_free (conn_error);
14143  * }
14144  * return conn;
14145  * }
14146  * else if (error)
14147  * {
14148  * /<!-- -->* Either the initial lookup failed, or else the caller
14149  * * cancelled us.
14150  * *<!-- -->/
14151  * if (conn_error)
14152  * g_error_free (conn_error);
14153  * return NULL;
14154  * }
14155  * else
14156  * {
14157  * g_error_propagate (error, conn_error);
14158  * return NULL;
14159  * }
14160  * }
14161  * ]|
14162  */
14163
14164
14165 /**
14166  * SECTION:gsocketconnection
14167  * @short_description: A socket connection
14168  * @include: gio/gio.h
14169  * @see_also: #GIOStream, #GSocketClient, #GSocketListener
14170  *
14171  * #GSocketConnection is a #GIOStream for a connected socket. They
14172  * can be created either by #GSocketClient when connecting to a host,
14173  * or by #GSocketListener when accepting a new client.
14174  *
14175  * The type of the #GSocketConnection object returned from these calls
14176  * depends on the type of the underlying socket that is in use. For
14177  * instance, for a TCP/IP connection it will be a #GTcpConnection.
14178  *
14179  * Choosing what type of object to construct is done with the socket
14180  * connection factory, and it is possible for 3rd parties to register
14181  * custom socket connection types for specific combination of socket
14182  * family/type/protocol using g_socket_connection_factory_register_type().
14183  *
14184  * Since: 2.22
14185  */
14186
14187
14188 /**
14189  * SECTION:gsocketcontrolmessage
14190  * @title: GSocketControlMessage
14191  * @short_description: A GSocket control message
14192  * @see_also: #GSocket.
14193  *
14194  * A #GSocketControlMessage is a special-purpose utility message that
14195  * can be sent to or received from a #GSocket. These types of
14196  * messages are often called "ancillary data".
14197  *
14198  * The message can represent some sort of special instruction to or
14199  * information from the socket or can represent a special kind of
14200  * transfer to the peer (for example, sending a file description over
14201  * a UNIX socket).
14202  *
14203  * These messages are sent with g_socket_send_message() and received
14204  * with g_socket_receive_message().
14205  *
14206  * To extend the set of control message that can be sent, subclass this
14207  * class and override the get_size, get_level, get_type and serialize
14208  * methods.
14209  *
14210  * To extend the set of control messages that can be received, subclass
14211  * this class and implement the deserialize method. Also, make sure your
14212  * class is registered with the GType typesystem before calling
14213  * g_socket_receive_message() to read such a message.
14214  *
14215  * Since: 2.22
14216  */
14217
14218
14219 /**
14220  * SECTION:gsocketlistener
14221  * @title: GSocketListener
14222  * @short_description: Helper for accepting network client connections
14223  * @see_also: #GThreadedSocketService, #GSocketService.
14224  *
14225  * A #GSocketListener is an object that keeps track of a set
14226  * of server sockets and helps you accept sockets from any of the
14227  * socket, either sync or async.
14228  *
14229  * If you want to implement a network server, also look at #GSocketService
14230  * and #GThreadedSocketService which are subclass of #GSocketListener
14231  * that makes this even easier.
14232  *
14233  * Since: 2.22
14234  */
14235
14236
14237 /**
14238  * SECTION:gsocketservice
14239  * @title: GSocketService
14240  * @short_description: Make it easy to implement a network service
14241  * @see_also: #GThreadedSocketService, #GSocketListener.
14242  *
14243  * A #GSocketService is an object that represents a service that
14244  * is provided to the network or over local sockets.  When a new
14245  * connection is made to the service the #GSocketService::incoming
14246  * signal is emitted.
14247  *
14248  * A #GSocketService is a subclass of #GSocketListener and you need
14249  * to add the addresses you want to accept connections on with the
14250  * #GSocketListener APIs.
14251  *
14252  * There are two options for implementing a network service based on
14253  * #GSocketService. The first is to create the service using
14254  * g_socket_service_new() and to connect to the #GSocketService::incoming
14255  * signal. The second is to subclass #GSocketService and override the
14256  * default signal handler implementation.
14257  *
14258  * In either case, the handler must immediately return, or else it
14259  * will block additional incoming connections from being serviced.
14260  * If you are interested in writing connection handlers that contain
14261  * blocking code then see #GThreadedSocketService.
14262  *
14263  * The socket service runs on the main loop in the main thread, and is
14264  * not threadsafe in general. However, the calls to start and stop
14265  * the service are threadsafe so these can be used from threads that
14266  * handle incoming clients.
14267  *
14268  * Since: 2.22
14269  */
14270
14271
14272 /**
14273  * SECTION:gsrvtarget
14274  * @short_description: DNS SRV record target
14275  * @include: gio/gio.h
14276  *
14277  * SRV (service) records are used by some network protocols to provide
14278  * service-specific aliasing and load-balancing. For example, XMPP
14279  * (Jabber) uses SRV records to locate the XMPP server for a domain;
14280  * rather than connecting directly to "example.com" or assuming a
14281  * specific server hostname like "xmpp.example.com", an XMPP client
14282  * would look up the "xmpp-client" SRV record for "example.com", and
14283  * then connect to whatever host was pointed to by that record.
14284  *
14285  * You can use g_resolver_lookup_service() or
14286  * g_resolver_lookup_service_async() to find the #GSrvTarget<!-- -->s
14287  * for a given service. However, if you are simply planning to connect
14288  * to the remote service, you can use #GNetworkService's
14289  * #GSocketConnectable interface and not need to worry about
14290  * #GSrvTarget at all.
14291  */
14292
14293
14294 /**
14295  * SECTION:gtcpconnection
14296  * @title: GTcpConnection
14297  * @short_description: A TCP GSocketConnection
14298  * @see_also: #GSocketConnection.
14299  *
14300  * This is the subclass of #GSocketConnection that is created
14301  * for TCP/IP sockets.
14302  *
14303  * Since: 2.22
14304  */
14305
14306
14307 /**
14308  * SECTION:gtcpwrapperconnection
14309  * @title: GTcpWrapperConnection
14310  * @short_description: wrapper for non-GSocketConnection-based, GSocket-based GIOStreams
14311  * @see_also: #GSocketConnection.
14312  *
14313  * A #GTcpWrapperConnection can be used to wrap a #GIOStream that is
14314  * based on a #GSocket, but which is not actually a
14315  * #GSocketConnection. This is used by #GSocketClient so that it can
14316  * always return a #GSocketConnection, even when the connection it has
14317  * actually created is not directly a #GSocketConnection.
14318  *
14319  * Since: 2.28
14320  */
14321
14322
14323 /**
14324  * SECTION:gthemedicon
14325  * @short_description: Icon theming support
14326  * @include: gio/gio.h
14327  * @see_also: #GIcon, #GLoadableIcon
14328  *
14329  * #GThemedIcon is an implementation of #GIcon that supports icon themes.
14330  * #GThemedIcon contains a list of all of the icons present in an icon
14331  * theme, so that icons can be looked up quickly. #GThemedIcon does
14332  * not provide actual pixmaps for icons, just the icon names.
14333  * Ideally something like gtk_icon_theme_choose_icon() should be used to
14334  * resolve the list of names so that fallback icons work nicely with
14335  * themes that inherit other themes.
14336  */
14337
14338
14339 /**
14340  * SECTION:gthreadedsocketservice
14341  * @title: GThreadedSocketService
14342  * @short_description: A threaded GSocketService
14343  * @see_also: #GSocketService.
14344  *
14345  * A #GThreadedSocketService is a simple subclass of #GSocketService
14346  * that handles incoming connections by creating a worker thread and
14347  * dispatching the connection to it by emitting the
14348  * #GThreadedSocketService::run signal in the new thread.
14349  *
14350  * The signal handler may perform blocking IO and need not return
14351  * until the connection is closed.
14352  *
14353  * The service is implemented using a thread pool, so there is a
14354  * limited amount of threads available to serve incoming requests.
14355  * The service automatically stops the #GSocketService from accepting
14356  * new connections when all threads are busy.
14357  *
14358  * As with #GSocketService, you may connect to #GThreadedSocketService::run,
14359  * or subclass and override the default handler.
14360  */
14361
14362
14363 /**
14364  * SECTION:gtimezonemonitor
14365  * @title: GTimeZoneMonitor
14366  * @short_description: Monitor the local timezone
14367  *
14368  * #GTimeZoneMonitor is a utility class to monitor the local timezone for
14369  * changes (ie: in response to the user manually changing the timezone
14370  * to that of a different locale).
14371  *
14372  * You must use this class in order for your program to notice changes
14373  * to the local timezone.  It works by monitoring the /etc/localtime
14374  * file.  When the timezone is found to have changed,
14375  * g_time_zone_refresh_local() is called and the "changed" signal is
14376  * emitted on the #GTimeZoneMonitor (in that order).
14377  *
14378  * Windows support is not presently working.
14379  */
14380
14381
14382 /**
14383  * SECTION:gtls
14384  * @title: TLS Overview
14385  * @short_description: TLS (aka SSL) support for GSocketConnection
14386  * @include: gio/gio.h
14387  *
14388  * #GTlsConnection and related classes provide TLS (Transport Layer
14389  * Security, previously known as SSL, Secure Sockets Layer) support for
14390  * gio-based network streams.
14391  *
14392  * In the simplest case, for a client connection, you can just set the
14393  * #GSocketClient:tls flag on a #GSocketClient, and then any
14394  * connections created by that client will have TLS negotiated
14395  * automatically, using appropriate default settings, and rejecting
14396  * any invalid or self-signed certificates (unless you change that
14397  * default by setting the #GSocketClient:tls-validation-flags
14398  * property). The returned object will be a #GTcpWrapperConnection,
14399  * which wraps the underlying #GTlsClientConnection.
14400  *
14401  * For greater control, you can create your own #GTlsClientConnection,
14402  * wrapping a #GSocketConnection (or an arbitrary #GIOStream with
14403  * pollable input and output streams) and then connect to its signals,
14404  * such as #GTlsConnection::accept-certificate, before starting the
14405  * handshake.
14406  *
14407  * Server-side TLS is similar, using #GTlsServerConnection. At the
14408  * moment, there is no support for automatically wrapping server-side
14409  * connections in the way #GSocketClient does for client-side
14410  * connections.
14411  */
14412
14413
14414 /**
14415  * SECTION:gtlsbackend
14416  * @title: GTlsBackend
14417  * @short_description: TLS backend implementation
14418  * @include: gio/gio.h
14419  *
14420  *
14421  */
14422
14423
14424 /**
14425  * SECTION:gtlscertificate
14426  * @title: GTlsCertificate
14427  * @short_description: TLS certificate
14428  * @see_also: #GTlsConnection
14429  *
14430  * A certificate used for TLS authentication and encryption.
14431  * This can represent either a public key only (eg, the certificate
14432  * received by a client from a server), or the combination of
14433  * a public key and a private key (which is needed when acting as a
14434  * #GTlsServerConnection).
14435  *
14436  * Since: 2.28
14437  */
14438
14439
14440 /**
14441  * SECTION:gtlsclientconnection
14442  * @short_description: TLS client-side connection
14443  * @include: gio/gio.h
14444  *
14445  * #GTlsClientConnection is the client-side subclass of
14446  * #GTlsConnection, representing a client-side TLS connection.
14447  */
14448
14449
14450 /**
14451  * SECTION:gtlsconnection
14452  * @short_description: TLS connection type
14453  * @include: gio/gio.h
14454  *
14455  * #GTlsConnection is the base TLS connection class type, which wraps
14456  * a #GIOStream and provides TLS encryption on top of it. Its
14457  * subclasses, #GTlsClientConnection and #GTlsServerConnection,
14458  * implement client-side and server-side TLS, respectively.
14459  *
14460  * Since: 2.28
14461  */
14462
14463
14464 /**
14465  * SECTION:gtlsdatabase
14466  * @short_description: TLS database type
14467  * @include: gio/gio.h
14468  *
14469  * #GTlsDatabase is used to lookup certificates and other information
14470  * from a certificate or key store. It is an abstract base class which
14471  * TLS library specific subtypes override.
14472  *
14473  * Most common client applications will not directly interact with
14474  * #GTlsDatabase. It is used internally by #GTlsConnection.
14475  *
14476  * Since: 2.30
14477  */
14478
14479
14480 /**
14481  * SECTION:gtlsfiledatabase
14482  * @short_description: TLS file based database type
14483  * @include: gio/gio.h
14484  *
14485  * #GTlsFileDatabase is implemented by #GTlsDatabase objects which load
14486  * their certificate information from a file. It is in interface which
14487  * TLS library specific subtypes implement.
14488  *
14489  * Since: 2.30
14490  */
14491
14492
14493 /**
14494  * SECTION:gtlsinteraction
14495  * @short_description: Interaction with the user during TLS operations.
14496  * @include: gio/gio.h
14497  *
14498  * #GTlsInteraction provides a mechanism for the TLS connection and database
14499  * code to interact with the user. It can be used to ask the user for passwords.
14500  *
14501  * To use a #GTlsInteraction with a TLS connection use
14502  * g_tls_connection_set_interaction().
14503  *
14504  * Callers should instantiate a subclass of this that implements all the
14505  * various callbacks to show the required dialogs, such as
14506  * #GtkTlsInteraction. If no interaction is desired, usually %NULL can be
14507  * passed, see each method taking a #GTlsInteraction for details.
14508  */
14509
14510
14511 /**
14512  * SECTION:gtlspassword
14513  * @title: GTlsPassword
14514  * @short_description: TLS Passwords for prompting
14515  * @include: gio/gio.h
14516  *
14517  * Holds a password used in TLS.
14518  */
14519
14520
14521 /**
14522  * SECTION:gtlsserverconnection
14523  * @short_description: TLS server-side connection
14524  * @include: gio/gio.h
14525  *
14526  * #GTlsServerConnection is the server-side subclass of #GTlsConnection,
14527  * representing a server-side TLS connection.
14528  *
14529  * Since: 2.28
14530  */
14531
14532
14533 /**
14534  * SECTION:gunixconnection
14535  * @title: GUnixConnection
14536  * @short_description: A UNIX domain GSocketConnection
14537  * @include: gio/gunixconnection.h
14538  * @see_also: #GSocketConnection.
14539  *
14540  * This is the subclass of #GSocketConnection that is created
14541  * for UNIX domain sockets.
14542  *
14543  * It contains functions to do some of the UNIX socket specific
14544  * functionality like passing file descriptors.
14545  *
14546  * Note that <filename>&lt;gio/gunixconnection.h&gt;</filename> belongs to
14547  * the UNIX-specific GIO interfaces, thus you have to use the
14548  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
14549  *
14550  * Since: 2.22
14551  */
14552
14553
14554 /**
14555  * SECTION:gunixcredentialsmessage
14556  * @title: GUnixCredentialsMessage
14557  * @short_description: A GSocketControlMessage containing credentials
14558  * @include: gio/gunixcredentialsmessage.h
14559  * @see_also: #GUnixConnection, #GSocketControlMessage
14560  *
14561  * This #GSocketControlMessage contains a #GCredentials instance.  It
14562  * may be sent using g_socket_send_message() and received using
14563  * g_socket_receive_message() over UNIX sockets (ie: sockets in the
14564  * %G_SOCKET_FAMILY_UNIX family).
14565  *
14566  * For an easier way to send and receive credentials over
14567  * stream-oriented UNIX sockets, see
14568  * g_unix_connection_send_credentials() and
14569  * g_unix_connection_receive_credentials(). To receive credentials of
14570  * a foreign process connected to a socket, use
14571  * g_socket_get_credentials().
14572  */
14573
14574
14575 /**
14576  * SECTION:gunixfdlist
14577  * @title: GUnixFDList
14578  * @short_description: An object containing a set of UNIX file descriptors
14579  * @include: gio/gunixfdlist.h
14580  * @see_also: #GUnixFDMessage
14581  *
14582  * A #GUnixFDList contains a list of file descriptors.  It owns the file
14583  * descriptors that it contains, closing them when finalized.
14584  *
14585  * It may be wrapped in a #GUnixFDMessage and sent over a #GSocket in
14586  * the %G_SOCKET_ADDRESS_UNIX family by using g_socket_send_message()
14587  * and received using g_socket_receive_message().
14588  *
14589  * Note that <filename>&lt;gio/gunixfdlist.h&gt;</filename> belongs to
14590  * the UNIX-specific GIO interfaces, thus you have to use the
14591  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
14592  */
14593
14594
14595 /**
14596  * SECTION:gunixfdmessage
14597  * @title: GUnixFDMessage
14598  * @short_description: A GSocketControlMessage containing a GUnixFDList
14599  * @include: gio/gunixfdmessage.h
14600  * @see_also: #GUnixConnection, #GUnixFDList, #GSocketControlMessage
14601  *
14602  * This #GSocketControlMessage contains a #GUnixFDList.
14603  * It may be sent using g_socket_send_message() and received using
14604  * g_socket_receive_message() over UNIX sockets (ie: sockets in the
14605  * %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied
14606  * between processes by the kernel.
14607  *
14608  * For an easier way to send and receive file descriptors over
14609  * stream-oriented UNIX sockets, see g_unix_connection_send_fd() and
14610  * g_unix_connection_receive_fd().
14611  *
14612  * Note that <filename>&lt;gio/gunixfdmessage.h&gt;</filename> belongs to
14613  * the UNIX-specific GIO interfaces, thus you have to use the
14614  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
14615  */
14616
14617
14618 /**
14619  * SECTION:gunixinputstream
14620  * @short_description: Streaming input operations for UNIX file descriptors
14621  * @include: gio/gunixinputstream.h
14622  * @see_also: #GInputStream
14623  *
14624  * #GUnixInputStream implements #GInputStream for reading from a
14625  * UNIX file descriptor, including asynchronous operations. The file
14626  * descriptor must be selectable, so it doesn't work with opened files.
14627  *
14628  * Note that <filename>&lt;gio/gunixinputstream.h&gt;</filename> belongs
14629  * to the UNIX-specific GIO interfaces, thus you have to use the
14630  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
14631  */
14632
14633
14634 /**
14635  * SECTION:gunixmounts
14636  * @include: gio/gunixmounts.h
14637  * @short_description: UNIX mounts
14638  *
14639  * Routines for managing mounted UNIX mount points and paths.
14640  *
14641  * Note that <filename>&lt;gio/gunixmounts.h&gt;</filename> belongs to the
14642  * UNIX-specific GIO interfaces, thus you have to use the
14643  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
14644  */
14645
14646
14647 /**
14648  * SECTION:gunixoutputstream
14649  * @short_description: Streaming output operations for UNIX file descriptors
14650  * @include: gio/gunixoutputstream.h
14651  * @see_also: #GOutputStream
14652  *
14653  * #GUnixOutputStream implements #GOutputStream for writing to a
14654  * UNIX file descriptor, including asynchronous operations. The file
14655  * descriptor must be selectable, so it doesn't work with opened files.
14656  *
14657  * Note that <filename>&lt;gio/gunixoutputstream.h&gt;</filename> belongs
14658  * to the UNIX-specific GIO interfaces, thus you have to use the
14659  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
14660  */
14661
14662
14663 /**
14664  * SECTION:gunixsocketaddress
14665  * @short_description: UNIX GSocketAddress
14666  * @include: gio/gunixsocketaddress.h
14667  *
14668  * Support for UNIX-domain (also known as local) sockets.
14669  *
14670  * UNIX domain sockets are generally visible in the filesystem.
14671  * However, some systems support abstract socket names which are not
14672  * visible in the filesystem and not affected by the filesystem
14673  * permissions, visibility, etc. Currently this is only supported
14674  * under Linux. If you attempt to use abstract sockets on other
14675  * systems, function calls may return %G_IO_ERROR_NOT_SUPPORTED
14676  * errors. You can use g_unix_socket_address_abstract_names_supported()
14677  * to see if abstract names are supported.
14678  *
14679  * Note that <filename>&lt;gio/gunixsocketaddress.h&gt;</filename> belongs to
14680  * the UNIX-specific GIO interfaces, thus you have to use the
14681  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
14682  */
14683
14684
14685 /**
14686  * SECTION:gvfs
14687  * @short_description: Virtual File System
14688  * @include: gio/gio.h
14689  *
14690  * Entry point for using GIO functionality.
14691  */
14692
14693
14694 /**
14695  * SECTION:gvolume
14696  * @short_description: Volume management
14697  * @include: gio/gio.h
14698  *
14699  * The #GVolume interface represents user-visible objects that can be
14700  * mounted. Note, when porting from GnomeVFS, #GVolume is the moral
14701  * equivalent of #GnomeVFSDrive.
14702  *
14703  * Mounting a #GVolume instance is an asynchronous operation. For more
14704  * information about asynchronous operations, see #GAsyncReady and
14705  * #GSimpleAsyncReady. To mount a #GVolume, first call
14706  * g_volume_mount() with (at least) the #GVolume instance, optionally
14707  * a #GMountOperation object and a #GAsyncReadyCallback.
14708  *
14709  * Typically, one will only want to pass %NULL for the
14710  * #GMountOperation if automounting all volumes when a desktop session
14711  * starts since it's not desirable to put up a lot of dialogs asking
14712  * for credentials.
14713  *
14714  * The callback will be fired when the operation has resolved (either
14715  * with success or failure), and a #GAsyncReady structure will be
14716  * passed to the callback.  That callback should then call
14717  * g_volume_mount_finish() with the #GVolume instance and the
14718  * #GAsyncReady data to see if the operation was completed
14719  * successfully.  If an @error is present when g_volume_mount_finish()
14720  * is called, then it will be filled with any error information.
14721  *
14722  * <para id="volume-identifier">
14723  * It is sometimes necessary to directly access the underlying
14724  * operating system object behind a volume (e.g. for passing a volume
14725  * to an application via the commandline). For this purpose, GIO
14726  * allows to obtain an 'identifier' for the volume. There can be
14727  * different kinds of identifiers, such as Hal UDIs, filesystem labels,
14728  * traditional Unix devices (e.g. <filename>/dev/sda2</filename>),
14729  * uuids. GIO uses predefind strings as names for the different kinds
14730  * of identifiers: #G_VOLUME_IDENTIFIER_KIND_HAL_UDI,
14731  * #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. Use g_volume_get_identifier()
14732  * to obtain an identifier for a volume.
14733  * </para>
14734  *
14735  * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available
14736  * when the gvfs hal volume monitor is in use. Other volume monitors
14737  * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
14738  * identifier, which can be used to obtain a hal device by means of
14739  * libhal_manger_find_device_string_match().
14740  */
14741
14742
14743 /**
14744  * SECTION:gvolumemonitor
14745  * @short_description: Volume Monitor
14746  * @include: gio/gio.h
14747  * @see_also: #GFileMonitor
14748  *
14749  * #GVolumeMonitor is for listing the user interesting devices and volumes
14750  * on the computer. In other words, what a file selector or file manager
14751  * would show in a sidebar.
14752  *
14753  * #GVolumeMonitor is not <link
14754  * linkend="g-main-context-push-thread-default">thread-default-context
14755  * aware</link>, and so should not be used other than from the main
14756  * thread, with no thread-default-context active.
14757  */
14758
14759
14760 /**
14761  * SECTION:gwin32inputstream
14762  * @short_description: Streaming input operations for Windows file handles
14763  * @include: gio/gwin32inputstream.h
14764  * @see_also: #GInputStream
14765  *
14766  * #GWin32InputStream implements #GInputStream for reading from a
14767  * Windows file handle.
14768  *
14769  * Note that <filename>&lt;gio/gwin32inputstream.h&gt;</filename> belongs
14770  * to the Windows-specific GIO interfaces, thus you have to use the
14771  * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
14772  */
14773
14774
14775 /**
14776  * SECTION:gwin32outputstream
14777  * @short_description: Streaming output operations for Windows file handles
14778  * @include: gio/gwin32outputstream.h
14779  * @see_also: #GOutputStream
14780  *
14781  * #GWin32OutputStream implements #GOutputStream for writing to a
14782  * Windows file handle.
14783  *
14784  * Note that <filename>&lt;gio/gwin32outputstream.h&gt;</filename> belongs
14785  * to the Windows-specific GIO interfaces, thus you have to use the
14786  * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
14787  */
14788
14789
14790 /**
14791  * SECTION:gzcompressor
14792  * @short_description: Zlib compressor
14793  * @include: gio/gio.h
14794  *
14795  * #GZlibCompressor is an implementation of #GConverter that
14796  * compresses data using zlib.
14797  */
14798
14799
14800 /**
14801  * SECTION:gzdecompressor
14802  * @short_description: Zlib decompressor
14803  * @include: gio/gio.h
14804  *
14805  * #GZlibDecompressor is an implementation of #GConverter that
14806  * decompresses data compressed with zlib.
14807  */
14808
14809
14810 /**
14811  * The string info map is an efficient data structure designed to be:
14812  *
14813  * 1) Implement <choices> with a list of valid strings
14814  *
14815  * 2) Implement <alias> by mapping one string to another
14816  *
14817  * 3) Implement enumerated types by mapping strings to integer values
14818  * (and back).
14819  *
14820  * The map is made out of an array of uint32s.  Each entry in the array
14821  * is an integer value, followed by a specially formatted string value:
14822  *
14823  * The string starts with the byte 0xff or 0xfe, followed by the
14824  * content of the string, followed by a nul byte, followed by
14825  * additional nul bytes for padding, followed by a 0xff byte.
14826  *
14827  * Padding is added so that the entire formatted string takes up a
14828  * multiple of 4 bytes, and not less than 8 bytes.  The requirement
14829  * for a string to take up 8 bytes is so that the scanner doesn't lose
14830  * synch and mistake a string for an integer value.
14831  *
14832  * The first byte of the formatted string depends on if the integer is
14833  * an enum value (0xff) or an alias (0xfe).  If it is an alias then the
14834  * number refers to the word offset within the info map at which the
14835  * integer corresponding to the "target" value is stored.
14836  *
14837  * For example, consider the case of the string info map representing an
14838  * enumerated type of 'foo' (value 1) and 'bar' (value 2) and 'baz'
14839  * (alias for 'bar').  Note that string info maps are always little
14840  * endian.
14841  *
14842  * x01 x00 x00 x00   xff 'f' 'o' 'o'   x00 x00 x00 xff   x02 x00 x00 x00
14843  * xff 'b' 'a' 'r'   x00 x00 x00 xff   x03 x00 x00 x00   xfe 'b' 'a' 'z'
14844  * x00 x00 x00 xff
14845  *
14846  *
14847  * The operations that someone may want to perform with the map:
14848  *
14849  * - lookup if a string is valid (and not an alias)
14850  * - lookup the integer value for a enum 'nick'
14851  * - lookup the integer value for the target of an alias
14852  * - lookup an alias and convert it to its target string
14853  * - lookup the enum nick for a given value
14854  *
14855  * In order to lookup if a string is valid, it is padded on either side
14856  * (as described) and scanned for in the array.  For example, you might
14857  * look for "foo":
14858  *
14859  * xff 'f' 'o' 'o'   x00 x00 x00 xff
14860  *
14861  * In order to lookup the integer value for a nick, the string is padded
14862  * on either side and scanned for in the array, as above.  Instead of
14863  * merely succeeding, we look at the integer value to the left of the
14864  * match.  This is the enum value.
14865  *
14866  * In order to lookup an alias and convert it to its target enum value,
14867  * the string is padded on either side (as described, with 0xfe) and
14868  * scanned for.  For example, you might look for "baz":
14869  *
14870  * xfe 'b' 'a' 'z'  x00 x00 x00 xff
14871  *
14872  * The integer immediately preceeding the match then contains the offset
14873  * of the integer value of the target.  In our example, that's '3'.
14874  * This index is dereferenced to find the enum value of '2'.
14875  *
14876  * To convert the alias to its target string, 5 bytes just need to be
14877  * added past the start of the integer value to find the start of the
14878  * string.
14879  *
14880  * To lookup the enum nick for a given value, the value is searched for
14881  * in the array.  To ensure that the value isn't matching the inside of a
14882  * string, we must check that it is either the first item in the array or
14883  * immediately preceeded by the byte 0xff.  It must also be immediately
14884  * followed by the byte 0xff.
14885  *
14886  * Because strings always take up a minimum of 2 words, because 0xff or
14887  * 0xfe never appear inside of a utf-8 string and because no two integer
14888  * values ever appear in sequence, the only way we can have the
14889  * sequence:
14890  *
14891  * xff __ __ __ __ xff (or 0xfe)
14892  *
14893  * is in the event of an integer nested between two strings.
14894  *
14895  * For implementation simplicity/efficiency, strings may not be more
14896  * than 65 characters in length (ie: 17 32bit words after padding).
14897  *
14898  * In the event that we are doing <choices> (ie: not an enum type) then
14899  * the value of each choice is set to zero and ignored.
14900  */
14901
14902
14903 /**
14904  * g_action_activate:
14905  * @action: a #GAction
14906  * @parameter: (allow-none): the parameter to the activation
14907  *
14908  * Activates the action.
14909  *
14910  * @parameter must be the correct type of parameter for the action (ie:
14911  * the parameter type given at construction time).  If the parameter
14912  * type was %NULL then @parameter must also be %NULL.
14913  *
14914  * Since: 2.28
14915  */
14916
14917
14918 /**
14919  * g_action_change_state:
14920  * @action: a #GAction
14921  * @value: the new state
14922  *
14923  * Request for the state of @action to be changed to @value.
14924  *
14925  * The action must be stateful and @value must be of the correct type.
14926  * See g_action_get_state_type().
14927  *
14928  * This call merely requests a change.  The action may refuse to change
14929  * its state or may change its state to something other than @value.
14930  * See g_action_get_state_hint().
14931  *
14932  * If the @value GVariant is floating, it is consumed.
14933  *
14934  * Since: 2.30
14935  */
14936
14937
14938 /**
14939  * g_action_get_enabled:
14940  * @action: a #GAction
14941  *
14942  * Checks if @action is currently enabled.
14943  *
14944  * An action must be enabled in order to be activated or in order to
14945  * have its state changed from outside callers.
14946  *
14947  * Returns: whether the action is enabled
14948  * Since: 2.28
14949  */
14950
14951
14952 /**
14953  * g_action_get_name:
14954  * @action: a #GAction
14955  *
14956  * Queries the name of @action.
14957  *
14958  * Returns: the name of the action
14959  * Since: 2.28
14960  */
14961
14962
14963 /**
14964  * g_action_get_parameter_type:
14965  * @action: a #GAction
14966  *
14967  * Queries the type of the parameter that must be given when activating
14968  * @action.
14969  *
14970  * When activating the action using g_action_activate(), the #GVariant
14971  * given to that function must be of the type returned by this function.
14972  *
14973  * In the case that this function returns %NULL, you must not give any
14974  * #GVariant, but %NULL instead.
14975  *
14976  * Returns: (allow-none): the parameter type
14977  * Since: 2.28
14978  */
14979
14980
14981 /**
14982  * g_action_get_state:
14983  * @action: a #GAction
14984  *
14985  * Queries the current state of @action.
14986  *
14987  * If the action is not stateful then %NULL will be returned.  If the
14988  * action is stateful then the type of the return value is the type
14989  * given by g_action_get_state_type().
14990  *
14991  * The return value (if non-%NULL) should be freed with
14992  * g_variant_unref() when it is no longer required.
14993  *
14994  * Returns: (transfer full): the current state of the action
14995  * Since: 2.28
14996  */
14997
14998
14999 /**
15000  * g_action_get_state_hint:
15001  * @action: a #GAction
15002  *
15003  * Requests a hint about the valid range of values for the state of
15004  * @action.
15005  *
15006  * If %NULL is returned it either means that the action is not stateful
15007  * or that there is no hint about the valid range of values for the
15008  * state of the action.
15009  *
15010  * If a #GVariant array is returned then each item in the array is a
15011  * possible value for the state.  If a #GVariant pair (ie: two-tuple) is
15012  * returned then the tuple specifies the inclusive lower and upper bound
15013  * of valid values for the state.
15014  *
15015  * In any case, the information is merely a hint.  It may be possible to
15016  * have a state value outside of the hinted range and setting a value
15017  * within the range may fail.
15018  *
15019  * The return value (if non-%NULL) should be freed with
15020  * g_variant_unref() when it is no longer required.
15021  *
15022  * Returns: (transfer full): the state range hint
15023  * Since: 2.28
15024  */
15025
15026
15027 /**
15028  * g_action_get_state_type:
15029  * @action: a #GAction
15030  *
15031  * Queries the type of the state of @action.
15032  *
15033  * If the action is stateful (e.g. created with
15034  * g_simple_action_new_stateful()) then this function returns the
15035  * #GVariantType of the state.  This is the type of the initial value
15036  * given as the state. All calls to g_action_change_state() must give a
15037  * #GVariant of this type and g_action_get_state() will return a
15038  * #GVariant of the same type.
15039  *
15040  * If the action is not stateful (e.g. created with g_simple_action_new())
15041  * then this function will return %NULL. In that case, g_action_get_state()
15042  * will return %NULL and you must not call g_action_change_state().
15043  *
15044  * Returns: (allow-none): the state type, if the action is stateful
15045  * Since: 2.28
15046  */
15047
15048
15049 /**
15050  * g_action_group_action_added:
15051  * @action_group: a #GActionGroup
15052  * @action_name: the name of an action in the group
15053  *
15054  * Emits the #GActionGroup::action-added signal on @action_group.
15055  *
15056  * This function should only be called by #GActionGroup implementations.
15057  *
15058  * Since: 2.28
15059  */
15060
15061
15062 /**
15063  * g_action_group_action_enabled_changed:
15064  * @action_group: a #GActionGroup
15065  * @action_name: the name of an action in the group
15066  * @enabled: whether or not the action is now enabled
15067  *
15068  * Emits the #GActionGroup::action-enabled-changed signal on @action_group.
15069  *
15070  * This function should only be called by #GActionGroup implementations.
15071  *
15072  * Since: 2.28
15073  */
15074
15075
15076 /**
15077  * g_action_group_action_removed:
15078  * @action_group: a #GActionGroup
15079  * @action_name: the name of an action in the group
15080  *
15081  * Emits the #GActionGroup::action-removed signal on @action_group.
15082  *
15083  * This function should only be called by #GActionGroup implementations.
15084  *
15085  * Since: 2.28
15086  */
15087
15088
15089 /**
15090  * g_action_group_action_state_changed:
15091  * @action_group: a #GActionGroup
15092  * @action_name: the name of an action in the group
15093  * @state: the new state of the named action
15094  *
15095  * Emits the #GActionGroup::action-state-changed signal on @action_group.
15096  *
15097  * This function should only be called by #GActionGroup implementations.
15098  *
15099  * Since: 2.28
15100  */
15101
15102
15103 /**
15104  * g_action_group_activate_action:
15105  * @action_group: a #GActionGroup
15106  * @action_name: the name of the action to activate
15107  * @parameter: (allow-none): parameters to the activation
15108  *
15109  * Activate the named action within @action_group.
15110  *
15111  * If the action is expecting a parameter, then the correct type of
15112  * parameter must be given as @parameter.  If the action is expecting no
15113  * parameters then @parameter must be %NULL.  See
15114  * g_action_group_get_action_parameter_type().
15115  *
15116  * Since: 2.28
15117  */
15118
15119
15120 /**
15121  * g_action_group_change_action_state:
15122  * @action_group: a #GActionGroup
15123  * @action_name: the name of the action to request the change on
15124  * @value: the new state
15125  *
15126  * Request for the state of the named action within @action_group to be
15127  * changed to @value.
15128  *
15129  * The action must be stateful and @value must be of the correct type.
15130  * See g_action_group_get_action_state_type().
15131  *
15132  * This call merely requests a change.  The action may refuse to change
15133  * its state or may change its state to something other than @value.
15134  * See g_action_group_get_action_state_hint().
15135  *
15136  * If the @value GVariant is floating, it is consumed.
15137  *
15138  * Since: 2.28
15139  */
15140
15141
15142 /**
15143  * g_action_group_get_action_enabled:
15144  * @action_group: a #GActionGroup
15145  * @action_name: the name of the action to query
15146  *
15147  * Checks if the named action within @action_group is currently enabled.
15148  *
15149  * An action must be enabled in order to be activated or in order to
15150  * have its state changed from outside callers.
15151  *
15152  * Returns: whether or not the action is currently enabled
15153  * Since: 2.28
15154  */
15155
15156
15157 /**
15158  * g_action_group_get_action_parameter_type:
15159  * @action_group: a #GActionGroup
15160  * @action_name: the name of the action to query
15161  *
15162  * Queries the type of the parameter that must be given when activating
15163  * the named action within @action_group.
15164  *
15165  * When activating the action using g_action_group_activate_action(),
15166  * the #GVariant given to that function must be of the type returned
15167  * by this function.
15168  *
15169  * In the case that this function returns %NULL, you must not give any
15170  * #GVariant, but %NULL instead.
15171  *
15172  * The parameter type of a particular action will never change but it is
15173  * possible for an action to be removed and for a new action to be added
15174  * with the same name but a different parameter type.
15175  *
15176  * Returns: the parameter type
15177  * Since: 2.28
15178  */
15179
15180
15181 /**
15182  * g_action_group_get_action_state:
15183  * @action_group: a #GActionGroup
15184  * @action_name: the name of the action to query
15185  *
15186  * Queries the current state of the named action within @action_group.
15187  *
15188  * If the action is not stateful then %NULL will be returned.  If the
15189  * action is stateful then the type of the return value is the type
15190  * given by g_action_group_get_action_state_type().
15191  *
15192  * The return value (if non-%NULL) should be freed with
15193  * g_variant_unref() when it is no longer required.
15194  *
15195  * Returns: (allow-none): the current state of the action
15196  * Since: 2.28
15197  */
15198
15199
15200 /**
15201  * g_action_group_get_action_state_hint:
15202  * @action_group: a #GActionGroup
15203  * @action_name: the name of the action to query
15204  *
15205  * Requests a hint about the valid range of values for the state of the
15206  * named action within @action_group.
15207  *
15208  * If %NULL is returned it either means that the action is not stateful
15209  * or that there is no hint about the valid range of values for the
15210  * state of the action.
15211  *
15212  * If a #GVariant array is returned then each item in the array is a
15213  * possible value for the state.  If a #GVariant pair (ie: two-tuple) is
15214  * returned then the tuple specifies the inclusive lower and upper bound
15215  * of valid values for the state.
15216  *
15217  * In any case, the information is merely a hint.  It may be possible to
15218  * have a state value outside of the hinted range and setting a value
15219  * within the range may fail.
15220  *
15221  * The return value (if non-%NULL) should be freed with
15222  * g_variant_unref() when it is no longer required.
15223  *
15224  * Returns: (transfer full): the state range hint
15225  * Since: 2.28
15226  */
15227
15228
15229 /**
15230  * g_action_group_get_action_state_type:
15231  * @action_group: a #GActionGroup
15232  * @action_name: the name of the action to query
15233  *
15234  * Queries the type of the state of the named action within
15235  * @action_group.
15236  *
15237  * If the action is stateful then this function returns the
15238  * #GVariantType of the state.  All calls to
15239  * g_action_group_change_action_state() must give a #GVariant of this
15240  * type and g_action_group_get_action_state() will return a #GVariant
15241  * of the same type.
15242  *
15243  * If the action is not stateful then this function will return %NULL.
15244  * In that case, g_action_group_get_action_state() will return %NULL
15245  * and you must not call g_action_group_change_action_state().
15246  *
15247  * The state type of a particular action will never change but it is
15248  * possible for an action to be removed and for a new action to be added
15249  * with the same name but a different state type.
15250  *
15251  * Returns: (transfer full): the state type, if the action is stateful
15252  * Since: 2.28
15253  */
15254
15255
15256 /**
15257  * g_action_group_has_action:
15258  * @action_group: a #GActionGroup
15259  * @action_name: the name of the action to check for
15260  *
15261  * Checks if the named action exists within @action_group.
15262  *
15263  * Returns: whether the named action exists
15264  * Since: 2.28
15265  */
15266
15267
15268 /**
15269  * g_action_group_list_actions:
15270  * @action_group: a #GActionGroup
15271  *
15272  * Lists the actions contained within @action_group.
15273  *
15274  * The caller is responsible for freeing the list with g_strfreev() when
15275  * it is no longer required.
15276  *
15277  * actions in the groupb
15278  *
15279  * Returns: (transfer full): a %NULL-terminated array of the names of the
15280  * Since: 2.28
15281  */
15282
15283
15284 /**
15285  * g_alloca:
15286  * @size: number of bytes to allocate.
15287  *
15288  * Allocates @size bytes on the stack; these bytes will be freed when the current
15289  * stack frame is cleaned up. This macro essentially just wraps the alloca()
15290  * function present on most UNIX variants.
15291  * Thus it provides the same advantages and pitfalls as alloca():
15292  * <variablelist>
15293  * <varlistentry><term></term><listitem><para>
15294  * + alloca() is very fast, as on most systems it's implemented by just adjusting
15295  * the stack pointer register.
15296  * </para></listitem></varlistentry>
15297  * <varlistentry><term></term><listitem><para>
15298  * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
15299  * blocks just build up and are released together at function end.
15300  * </para></listitem></varlistentry>
15301  * <varlistentry><term></term><listitem><para>
15302  * - Allocation sizes have to fit into the current stack frame. For instance in a
15303  * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
15304  * so be sparse with alloca() uses.
15305  * </para></listitem></varlistentry>
15306  * <varlistentry><term></term><listitem><para>
15307  * - Allocation failure due to insufficient stack space is not indicated with a %NULL
15308  * return like e.g. with malloc(). Instead, most systems probably handle it the same
15309  * way as out of stack space situations from infinite function recursion, i.e.
15310  * with a segmentation fault.
15311  * </para></listitem></varlistentry>
15312  * <varlistentry><term></term><listitem><para>
15313  * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
15314  * Stack space allocated with alloca() in the same scope as a variable sized array
15315  * will be freed together with the variable sized array upon exit of that scope, and
15316  * not upon exit of the enclosing function scope.
15317  * </para></listitem></varlistentry>
15318  * </variablelist>
15319  *
15320  * Returns: space for @size bytes, allocated on the stack
15321  */
15322
15323
15324 /**
15325  * g_app_info_add_supports_type:
15326  * @appinfo: a #GAppInfo.
15327  * @content_type: a string.
15328  * @error: a #GError.
15329  *
15330  * Adds a content type to the application information to indicate the
15331  * application is capable of opening files with the given content type.
15332  *
15333  * Returns: %TRUE on success, %FALSE on error.
15334  */
15335
15336
15337 /**
15338  * g_app_info_can_delete:
15339  * @appinfo: a #GAppInfo
15340  *
15341  * Obtains the information whether the #GAppInfo can be deleted.
15342  * See g_app_info_delete().
15343  *
15344  * Returns: %TRUE if @appinfo can be deleted
15345  * Since: 2.20
15346  */
15347
15348
15349 /**
15350  * g_app_info_can_remove_supports_type:
15351  * @appinfo: a #GAppInfo.
15352  *
15353  * Checks if a supported content type can be removed from an application.
15354  *
15355  * content types from a given @appinfo, %FALSE if not.
15356  *
15357  * Returns: %TRUE if it is possible to remove supported
15358  */
15359
15360
15361 /**
15362  * g_app_info_create_from_commandline:
15363  * @commandline: the commandline to use
15364  * @application_name: (allow-none): the application name, or %NULL to use @commandline
15365  * @flags: flags that can specify details of the created #GAppInfo
15366  * @error: a #GError location to store the error occuring, %NULL to ignore.
15367  *
15368  * Creates a new #GAppInfo from the given information.
15369  *
15370  * Returns: (transfer full): new #GAppInfo for given command.
15371  */
15372
15373
15374 /**
15375  * g_app_info_delete:
15376  * @appinfo: a #GAppInfo
15377  *
15378  * Tries to delete a #GAppInfo.
15379  *
15380  * On some platforms, there may be a difference between user-defined
15381  * #GAppInfo<!-- -->s which can be deleted, and system-wide ones which
15382  * cannot. See g_app_info_can_delete().
15383  *
15384  * Virtual: do_delete
15385  * Returns: %TRUE if @appinfo has been deleted
15386  * Since: 2.20
15387  */
15388
15389
15390 /**
15391  * g_app_info_dup:
15392  * @appinfo: a #GAppInfo.
15393  *
15394  * Creates a duplicate of a #GAppInfo.
15395  *
15396  * Returns: (transfer full): a duplicate of @appinfo.
15397  */
15398
15399
15400 /**
15401  * g_app_info_equal:
15402  * @appinfo1: the first #GAppInfo.
15403  * @appinfo2: the second #GAppInfo.
15404  *
15405  * Checks if two #GAppInfo<!-- -->s are equal.
15406  *
15407  * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.
15408  */
15409
15410
15411 /**
15412  * g_app_info_get_all:
15413  *
15414  * Gets a list of all of the applications currently registered
15415  * on this system.
15416  *
15417  * For desktop files, this includes applications that have
15418  * <literal>NoDisplay=true</literal> set or are excluded from
15419  * display by means of <literal>OnlyShowIn</literal> or
15420  * <literal>NotShowIn</literal>. See g_app_info_should_show().
15421  * The returned list does not include applications which have
15422  * the <literal>Hidden</literal> key set.
15423  *
15424  * Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfo<!---->s.
15425  */
15426
15427
15428 /**
15429  * g_app_info_get_all_for_type:
15430  * @content_type: the content type to find a #GAppInfo for
15431  *
15432  * Gets a list of all #GAppInfos for a given content type.
15433  *
15434  * for given @content_type or %NULL on error.
15435  *
15436  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
15437  */
15438
15439
15440 /**
15441  * g_app_info_get_commandline:
15442  * @appinfo: a #GAppInfo
15443  *
15444  * Gets the commandline with which the application will be
15445  * started.
15446  *
15447  * or %NULL if this information is not available
15448  *
15449  * Returns: a string containing the @appinfo's commandline,
15450  * Since: 2.20
15451  */
15452
15453
15454 /**
15455  * g_app_info_get_default_for_type:
15456  * @content_type: the content type to find a #GAppInfo for
15457  * @must_support_uris: if %TRUE, the #GAppInfo is expected to support URIs
15458  *
15459  * Gets the #GAppInfo that corresponds to a given content type.
15460  *
15461  * %NULL on error.
15462  *
15463  * Returns: (transfer full): #GAppInfo for given @content_type or
15464  */
15465
15466
15467 /**
15468  * g_app_info_get_default_for_uri_scheme:
15469  * @uri_scheme: a string containing a URI scheme.
15470  *
15471  * Gets the default application for launching applications
15472  * using this URI scheme. A URI scheme is the initial part
15473  * of the URI, up to but not including the ':', e.g. "http",
15474  * "ftp" or "sip".
15475  *
15476  * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
15477  */
15478
15479
15480 /**
15481  * g_app_info_get_description:
15482  * @appinfo: a #GAppInfo.
15483  *
15484  * Gets a human-readable description of an installed application.
15485  *
15486  * application @appinfo, or %NULL if none.
15487  *
15488  * Returns: a string containing a description of the
15489  */
15490
15491
15492 /**
15493  * g_app_info_get_display_name:
15494  * @appinfo: a #GAppInfo.
15495  *
15496  * Gets the display name of the application. The display name is often more
15497  * descriptive to the user than the name itself.
15498  *
15499  * no display name is available.
15500  *
15501  * Returns: the display name of the application for @appinfo, or the name if
15502  * Since: 2.24
15503  */
15504
15505
15506 /**
15507  * g_app_info_get_executable:
15508  * @appinfo: a #GAppInfo
15509  *
15510  * Gets the executable's name for the installed application.
15511  *
15512  * binaries name
15513  *
15514  * Returns: a string containing the @appinfo's application
15515  */
15516
15517
15518 /**
15519  * g_app_info_get_fallback_for_type:
15520  * @content_type: the content type to find a #GAppInfo for
15521  *
15522  * Gets a list of fallback #GAppInfos for a given content type, i.e.
15523  * those applications which claim to support the given content type
15524  * by MIME type subclassing and not directly.
15525  *
15526  * for given @content_type or %NULL on error.
15527  *
15528  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
15529  * Since: 2.28
15530  */
15531
15532
15533 /**
15534  * g_app_info_get_icon:
15535  * @appinfo: a #GAppInfo.
15536  *
15537  * Gets the icon for the application.
15538  *
15539  * Returns: (transfer none): the default #GIcon for @appinfo.
15540  */
15541
15542
15543 /**
15544  * g_app_info_get_id:
15545  * @appinfo: a #GAppInfo.
15546  *
15547  * Gets the ID of an application. An id is a string that
15548  * identifies the application. The exact format of the id is
15549  * platform dependent. For instance, on Unix this is the
15550  * desktop file id from the xdg menu specification.
15551  *
15552  * Note that the returned ID may be %NULL, depending on how
15553  * the @appinfo has been constructed.
15554  *
15555  * Returns: a string containing the application's ID.
15556  */
15557
15558
15559 /**
15560  * g_app_info_get_name:
15561  * @appinfo: a #GAppInfo.
15562  *
15563  * Gets the installed name of the application.
15564  *
15565  * Returns: the name of the application for @appinfo.
15566  */
15567
15568
15569 /**
15570  * g_app_info_get_recommended_for_type:
15571  * @content_type: the content type to find a #GAppInfo for
15572  *
15573  * Gets a list of recommended #GAppInfos for a given content type, i.e.
15574  * those applications which claim to support the given content type exactly,
15575  * and not by MIME type subclassing.
15576  * Note that the first application of the list is the last used one, i.e.
15577  * the last one for which #g_app_info_set_as_last_used_for_type has been
15578  * called.
15579  *
15580  * for given @content_type or %NULL on error.
15581  *
15582  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
15583  * Since: 2.28
15584  */
15585
15586
15587 /**
15588  * g_app_info_launch:
15589  * @appinfo: a #GAppInfo
15590  * @files: (element-type GFile): a #GList of #GFile objects
15591  * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
15592  * @error: a #GError
15593  *
15594  * Launches the application. Passes @files to the launched application
15595  * as arguments, using the optional @launch_context to get information
15596  * about the details of the launcher (like what screen it is on).
15597  * On error, @error will be set accordingly.
15598  *
15599  * To launch the application without arguments pass a %NULL @files list.
15600  *
15601  * Note that even if the launch is successful the application launched
15602  * can fail to start if it runs into problems during startup. There is
15603  * no way to detect this.
15604  *
15605  * Some URIs can be changed when passed through a GFile (for instance
15606  * unsupported uris with strange formats like mailto:), so if you have
15607  * a textual uri you want to pass in as argument, consider using
15608  * g_app_info_launch_uris() instead.
15609  *
15610  * On UNIX, this function sets the <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>
15611  * environment variable with the path of the launched desktop file and
15612  * <envar>GIO_LAUNCHED_DESKTOP_FILE_PID</envar> to the process
15613  * id of the launched process. This can be used to ignore
15614  * <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>, should it be inherited
15615  * by further processes. The <envar>DISPLAY</envar> and
15616  * <envar>DESKTOP_STARTUP_ID</envar> environment variables are also
15617  * set, based on information provided in @launch_context.
15618  *
15619  * Returns: %TRUE on successful launch, %FALSE otherwise.
15620  */
15621
15622
15623 /**
15624  * g_app_info_launch_default_for_uri:
15625  * @uri: the uri to show
15626  * @launch_context: (allow-none): an optional #GAppLaunchContext.
15627  * @error: a #GError.
15628  *
15629  * Utility function that launches the default application
15630  * registered to handle the specified uri. Synchronous I/O
15631  * is done on the uri to detect the type of the file if
15632  * required.
15633  *
15634  * Returns: %TRUE on success, %FALSE on error.
15635  */
15636
15637
15638 /**
15639  * g_app_info_launch_uris:
15640  * @appinfo: a #GAppInfo
15641  * @uris: (element-type utf8): a #GList containing URIs to launch.
15642  * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
15643  * @error: a #GError
15644  *
15645  * Launches the application. This passes the @uris to the launched application
15646  * as arguments, using the optional @launch_context to get information
15647  * about the details of the launcher (like what screen it is on).
15648  * On error, @error will be set accordingly.
15649  *
15650  * To launch the application without arguments pass a %NULL @uris list.
15651  *
15652  * Note that even if the launch is successful the application launched
15653  * can fail to start if it runs into problems during startup. There is
15654  * no way to detect this.
15655  *
15656  * Returns: %TRUE on successful launch, %FALSE otherwise.
15657  */
15658
15659
15660 /**
15661  * g_app_info_remove_supports_type:
15662  * @appinfo: a #GAppInfo.
15663  * @content_type: a string.
15664  * @error: a #GError.
15665  *
15666  * Removes a supported type from an application, if possible.
15667  *
15668  * Returns: %TRUE on success, %FALSE on error.
15669  */
15670
15671
15672 /**
15673  * g_app_info_reset_type_associations:
15674  * @content_type: a content type
15675  *
15676  * Removes all changes to the type associations done by
15677  * g_app_info_set_as_default_for_type(),
15678  * g_app_info_set_as_default_for_extension(),
15679  * g_app_info_add_supports_type() or g_app_info_remove_supports_type().
15680  *
15681  * Since: 2.20
15682  */
15683
15684
15685 /**
15686  * g_app_info_set_as_default_for_extension:
15687  * @appinfo: a #GAppInfo.
15688  * @extension: a string containing the file extension (without the dot).
15689  * @error: a #GError.
15690  *
15691  * Sets the application as the default handler for the given file extension.
15692  *
15693  * Returns: %TRUE on success, %FALSE on error.
15694  */
15695
15696
15697 /**
15698  * g_app_info_set_as_default_for_type:
15699  * @appinfo: a #GAppInfo.
15700  * @content_type: the content type.
15701  * @error: a #GError.
15702  *
15703  * Sets the application as the default handler for a given type.
15704  *
15705  * Returns: %TRUE on success, %FALSE on error.
15706  */
15707
15708
15709 /**
15710  * g_app_info_set_as_last_used_for_type:
15711  * @appinfo: a #GAppInfo.
15712  * @content_type: the content type.
15713  * @error: a #GError.
15714  *
15715  * Sets the application as the last used application for a given type.
15716  * This will make the application appear as first in the list returned
15717  * by g_app_info_get_recommended_for_type(), regardless of the default
15718  * application for that content type.
15719  *
15720  * Returns: %TRUE on success, %FALSE on error.
15721  */
15722
15723
15724 /**
15725  * g_app_info_should_show:
15726  * @appinfo: a #GAppInfo.
15727  *
15728  * Checks if the application info should be shown in menus that
15729  * list available applications.
15730  *
15731  * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise.
15732  */
15733
15734
15735 /**
15736  * g_app_info_supports_files:
15737  * @appinfo: a #GAppInfo.
15738  *
15739  * Checks if the application accepts files as arguments.
15740  *
15741  * Returns: %TRUE if the @appinfo supports files.
15742  */
15743
15744
15745 /**
15746  * g_app_info_supports_uris:
15747  * @appinfo: a #GAppInfo.
15748  *
15749  * Checks if the application supports reading files and directories from URIs.
15750  *
15751  * Returns: %TRUE if the @appinfo supports URIs.
15752  */
15753
15754
15755 /**
15756  * g_app_launch_context_get_display:
15757  * @context: a #GAppLaunchContext
15758  * @info: a #GAppInfo
15759  * @files: (element-type GFile): a #GList of #GFile objects
15760  *
15761  * Gets the display string for the @context. This is used to ensure new
15762  * applications are started on the same display as the launching
15763  * application, by setting the <envar>DISPLAY</envar> environment variable.
15764  *
15765  * Returns: a display string for the display.
15766  */
15767
15768
15769 /**
15770  * g_app_launch_context_get_startup_notify_id:
15771  * @context: a #GAppLaunchContext
15772  * @info: a #GAppInfo
15773  * @files: (element-type GFile): a #GList of of #GFile objects
15774  *
15775  * Initiates startup notification for the application and returns the
15776  * <envar>DESKTOP_STARTUP_ID</envar> for the launched operation,
15777  * if supported.
15778  *
15779  * Startup notification IDs are defined in the <ulink
15780  * url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">
15781  * FreeDesktop.Org Startup Notifications standard</ulink>.
15782  *
15783  * not supported.
15784  *
15785  * Returns: a startup notification ID for the application, or %NULL if
15786  */
15787
15788
15789 /**
15790  * g_app_launch_context_launch_failed:
15791  * @context: a #GAppLaunchContext.
15792  * @startup_notify_id: the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
15793  *
15794  * Called when an application has failed to launch, so that it can cancel
15795  * the application startup notification started in g_app_launch_context_get_startup_notify_id().
15796  */
15797
15798
15799 /**
15800  * g_app_launch_context_new:
15801  *
15802  * Creates a new application launch context. This is not normally used,
15803  * instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
15804  *
15805  * Returns: a #GAppLaunchContext.
15806  */
15807
15808
15809 /**
15810  * g_application_activate:
15811  * @application: a #GApplication
15812  *
15813  * Activates the application.
15814  *
15815  * In essence, this results in the #GApplication::activate() signal being
15816  * emitted in the primary instance.
15817  *
15818  * The application must be registered before calling this function.
15819  *
15820  * Since: 2.28
15821  */
15822
15823
15824 /**
15825  * g_application_command_line_get_arguments:
15826  * @cmdline: a #GApplicationCommandLine
15827  * @argc: (out): the length of the arguments array, or %NULL
15828  *
15829  * Gets the list of arguments that was passed on the command line.
15830  *
15831  * The strings in the array may contain non-utf8 data.
15832  *
15833  * The return value is %NULL-terminated and should be freed using
15834  * g_strfreev().
15835  *
15836  * containing the arguments (the argv)
15837  *
15838  * Returns: (array length=argc) (transfer full): the string array
15839  * Since: 2.28
15840  */
15841
15842
15843 /**
15844  * g_application_command_line_get_cwd:
15845  * @cmdline: a #GApplicationCommandLine
15846  *
15847  * Gets the working directory of the command line invocation.
15848  * The string may contain non-utf8 data.
15849  *
15850  * It is possible that the remote application did not send a working
15851  * directory, so this may be %NULL.
15852  *
15853  * The return value should not be modified or freed and is valid for as
15854  * long as @cmdline exists.
15855  *
15856  * Returns: the current directory, or %NULL
15857  * Since: 2.28
15858  */
15859
15860
15861 /**
15862  * g_application_command_line_get_environ:
15863  * @cmdline: a #GApplicationCommandLine
15864  *
15865  * Gets the contents of the 'environ' variable of the command line
15866  * invocation, as would be returned by g_get_environ(), ie as a
15867  * %NULL-terminated list of strings in the form 'NAME=VALUE'.
15868  * The strings may contain non-utf8 data.
15869  *
15870  * The remote application usually does not send an environment.  Use
15871  * %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
15872  * set it is possible that the environment is still not available (due
15873  * to invocation messages from other applications).
15874  *
15875  * The return value should not be modified or freed and is valid for as
15876  * long as @cmdline exists.
15877  *
15878  * See g_application_command_line_getenv() if you are only interested
15879  * in the value of a single environment variable.
15880  *
15881  * strings, or %NULL if they were not sent
15882  *
15883  * Returns: (array zero-terminated=1) (transfer none): the environment
15884  * Since: 2.28
15885  */
15886
15887
15888 /**
15889  * g_application_command_line_get_exit_status:
15890  * @cmdline: a #GApplicationCommandLine
15891  *
15892  * Gets the exit status of @cmdline.  See
15893  * g_application_command_line_set_exit_status() for more information.
15894  *
15895  * Returns: the exit status
15896  * Since: 2.28
15897  */
15898
15899
15900 /**
15901  * g_application_command_line_get_is_remote:
15902  * @cmdline: a #GApplicationCommandLine
15903  *
15904  * Determines if @cmdline represents a remote invocation.
15905  *
15906  * Returns: %TRUE if the invocation was remote
15907  * Since: 2.28
15908  */
15909
15910
15911 /**
15912  * g_application_command_line_get_platform_data:
15913  * @cmdline: #GApplicationCommandLine
15914  *
15915  * Gets the platform data associated with the invocation of @cmdline.
15916  *
15917  * This is a #GVariant dictionary containing information about the
15918  * context in which the invocation occured.  It typically contains
15919  * information like the current working directory and the startup
15920  * notification ID.
15921  *
15922  * For local invocation, it will be %NULL.
15923  *
15924  * Returns: the platform data, or %NULL
15925  * Since: 2.28
15926  */
15927
15928
15929 /**
15930  * g_application_command_line_getenv:
15931  * @cmdline: a #GApplicationCommandLine
15932  * @name: the environment variable to get
15933  *
15934  * Gets the value of a particular environment variable of the command
15935  * line invocation, as would be returned by g_getenv().  The strings may
15936  * contain non-utf8 data.
15937  *
15938  * The remote application usually does not send an environment.  Use
15939  * %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
15940  * set it is possible that the environment is still not available (due
15941  * to invocation messages from other applications).
15942  *
15943  * The return value should not be modified or freed and is valid for as
15944  * long as @cmdline exists.
15945  *
15946  * Returns: the value of the variable, or %NULL if unset or unsent
15947  * Since: 2.28
15948  */
15949
15950
15951 /**
15952  * g_application_command_line_print:
15953  * @cmdline: a #GApplicationCommandLine
15954  * @format: a printf-style format string
15955  * @...: arguments, as per @format
15956  *
15957  * Formats a message and prints it using the stdout print handler in the
15958  * invoking process.
15959  *
15960  * If @cmdline is a local invocation then this is exactly equivalent to
15961  * g_print().  If @cmdline is remote then this is equivalent to calling
15962  * g_print() in the invoking process.
15963  *
15964  * Since: 2.28
15965  */
15966
15967
15968 /**
15969  * g_application_command_line_printerr:
15970  * @cmdline: a #GApplicationCommandLine
15971  * @format: a printf-style format string
15972  * @...: arguments, as per @format
15973  *
15974  * Formats a message and prints it using the stderr print handler in the
15975  * invoking process.
15976  *
15977  * If @cmdline is a local invocation then this is exactly equivalent to
15978  * g_printerr().  If @cmdline is remote then this is equivalent to
15979  * calling g_printerr() in the invoking process.
15980  *
15981  * Since: 2.28
15982  */
15983
15984
15985 /**
15986  * g_application_command_line_set_exit_status:
15987  * @cmdline: a #GApplicationCommandLine
15988  * @exit_status: the exit status
15989  *
15990  * Sets the exit status that will be used when the invoking process
15991  * exits.
15992  *
15993  * The return value of the #GApplication::command-line signal is
15994  * passed to this function when the handler returns.  This is the usual
15995  * way of setting the exit status.
15996  *
15997  * In the event that you want the remote invocation to continue running
15998  * and want to decide on the exit status in the future, you can use this
15999  * call.  For the case of a remote invocation, the remote process will
16000  * typically exit when the last reference is dropped on @cmdline.  The
16001  * exit status of the remote process will be equal to the last value
16002  * that was set with this function.
16003  *
16004  * In the case that the commandline invocation is local, the situation
16005  * is slightly more complicated.  If the commandline invocation results
16006  * in the mainloop running (ie: because the use-count of the application
16007  * increased to a non-zero value) then the application is considered to
16008  * have been 'successful' in a certain sense, and the exit status is
16009  * always zero.  If the application use count is zero, though, the exit
16010  * status of the local #GApplicationCommandLine is used.
16011  *
16012  * Since: 2.28
16013  */
16014
16015
16016 /**
16017  * g_application_get_application_id:
16018  * @application: a #GApplication
16019  * @returns: the identifier for @application, owned by @application
16020  *
16021  * Gets the unique identifier for @application.
16022  *
16023  * Since: 2.28
16024  */
16025
16026
16027 /**
16028  * g_application_get_flags:
16029  * @application: a #GApplication
16030  * @returns: the flags for @application
16031  *
16032  * Gets the flags for @application.
16033  *
16034  * See #GApplicationFlags.
16035  *
16036  * Since: 2.28
16037  */
16038
16039
16040 /**
16041  * g_application_get_inactivity_timeout:
16042  * @application: a #GApplication
16043  *
16044  * Gets the current inactivity timeout for the application.
16045  *
16046  * This is the amount of time (in milliseconds) after the last call to
16047  * g_application_release() before the application stops running.
16048  *
16049  * Returns: the timeout, in milliseconds
16050  * Since: 2.28
16051  */
16052
16053
16054 /**
16055  * g_application_get_is_registered:
16056  * @application: a #GApplication
16057  * @returns: %TRUE if @application is registered
16058  *
16059  * Checks if @application is registered.
16060  *
16061  * An application is registered if g_application_register() has been
16062  * successfully called.
16063  *
16064  * Since: 2.28
16065  */
16066
16067
16068 /**
16069  * g_application_get_is_remote:
16070  * @application: a #GApplication
16071  * @returns: %TRUE if @application is remote
16072  *
16073  * Checks if @application is remote.
16074  *
16075  * If @application is remote then it means that another instance of
16076  * application already exists (the 'primary' instance).  Calls to
16077  * perform actions on @application will result in the actions being
16078  * performed by the primary instance.
16079  *
16080  * The value of this property cannot be accessed before
16081  * g_application_register() has been called.  See
16082  * g_application_get_is_registered().
16083  *
16084  * Since: 2.28
16085  */
16086
16087
16088 /**
16089  * g_application_hold:
16090  * @application: a #GApplication
16091  *
16092  * Increases the use count of @application.
16093  *
16094  * Use this function to indicate that the application has a reason to
16095  * continue to run.  For example, g_application_hold() is called by GTK+
16096  * when a toplevel window is on the screen.
16097  *
16098  * To cancel the hold, call g_application_release().
16099  */
16100
16101
16102 /**
16103  * g_application_id_is_valid:
16104  * @application_id: a potential application identifier
16105  * @returns: %TRUE if @application_id is valid
16106  *
16107  * Checks if @application_id is a valid application identifier.
16108  *
16109  * A valid ID is required for calls to g_application_new() and
16110  * g_application_set_application_id().
16111  *
16112  * For convenience, the restrictions on application identifiers are
16113  * reproduced here:
16114  * <itemizedlist>
16115  * <listitem>Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-." and must not begin with a digit.</listitem>
16116  * <listitem>Application identifiers must contain at least one '.' (period) character (and thus at least three elements).</listitem>
16117  * <listitem>Application identifiers must not begin or end with a '.' (period) character.</listitem>
16118  * <listitem>Application identifiers must not contain consecutive '.' (period) characters.</listitem>
16119  * <listitem>Application identifiers must not exceed 255 characters.</listitem>
16120  * </itemizedlist>
16121  */
16122
16123
16124 /**
16125  * g_application_new:
16126  * @application_id: the application id
16127  * @flags: the application flags
16128  * @returns: a new #GApplication instance
16129  *
16130  * Creates a new #GApplication instance.
16131  *
16132  * This function calls g_type_init() for you.
16133  *
16134  * The application id must be valid.  See g_application_id_is_valid().
16135  */
16136
16137
16138 /**
16139  * g_application_open:
16140  * @application: a #GApplication
16141  * @files: (array length=n_files): an array of #GFiles to open
16142  * @n_files: the length of the @files array
16143  * @hint: a hint (or ""), but never %NULL
16144  *
16145  * Opens the given files.
16146  *
16147  * In essence, this results in the #GApplication::open signal being emitted
16148  * in the primary instance.
16149  *
16150  * @n_files must be greater than zero.
16151  *
16152  * @hint is simply passed through to the ::open signal.  It is
16153  * intended to be used by applications that have multiple modes for
16154  * opening files (eg: "view" vs "edit", etc).  Unless you have a need
16155  * for this functionality, you should use "".
16156  *
16157  * The application must be registered before calling this function
16158  * and it must have the %G_APPLICATION_HANDLES_OPEN flag set.
16159  *
16160  * Since: 2.28
16161  */
16162
16163
16164 /**
16165  * g_application_register:
16166  * @application: a #GApplication
16167  * @cancellable: a #GCancellable, or %NULL
16168  * @error: a pointer to a NULL #GError, or %NULL
16169  * @returns: %TRUE if registration succeeded
16170  *
16171  * Attempts registration of the application.
16172  *
16173  * This is the point at which the application discovers if it is the
16174  * primary instance or merely acting as a remote for an already-existing
16175  * primary instance.  This is implemented by attempting to acquire the
16176  * application identifier as a unique bus name on the session bus using
16177  * GDBus.
16178  *
16179  * Due to the internal architecture of GDBus, method calls can be
16180  * dispatched at any time (even if a main loop is not running).  For
16181  * this reason, you must ensure that any object paths that you wish to
16182  * register are registered before calling this function.
16183  *
16184  * If the application has already been registered then %TRUE is
16185  * returned with no work performed.
16186  *
16187  * The #GApplication::startup signal is emitted if registration succeeds
16188  * and @application is the primary instance.
16189  *
16190  * In the event of an error (such as @cancellable being cancelled, or a
16191  * failure to connect to the session bus), %FALSE is returned and @error
16192  * is set appropriately.
16193  *
16194  * Note: the return value of this function is not an indicator that this
16195  * instance is or is not the primary instance of the application.  See
16196  * g_application_get_is_remote() for that.
16197  *
16198  * Since: 2.28
16199  */
16200
16201
16202 /**
16203  * g_application_release:
16204  * @application: a #GApplication
16205  *
16206  * Decrease the use count of @application.
16207  *
16208  * When the use count reaches zero, the application will stop running.
16209  *
16210  * Never call this function except to cancel the effect of a previous
16211  * call to g_application_hold().
16212  */
16213
16214
16215 /**
16216  * g_application_run:
16217  * @application: a #GApplication
16218  * @argc: the argc from main() (or 0 if @argv is %NULL)
16219  * @argv: (array length=argc) (allow-none): the argv from main(), or %NULL
16220  * @returns: the exit status
16221  *
16222  * Runs the application.
16223  *
16224  * This function is intended to be run from main() and its return value
16225  * is intended to be returned by main(). Although you are expected to pass
16226  * the @argc, @argv parameters from main() to this function, it is possible
16227  * to pass %NULL if @argv is not available or commandline handling is not
16228  * required.
16229  *
16230  * First, the local_command_line() virtual function is invoked.
16231  * This function always runs on the local instance. It gets passed a pointer
16232  * to a %NULL-terminated copy of @argv and is expected to remove the arguments
16233  * that it handled (shifting up remaining arguments). See
16234  * <xref linkend="gapplication-example-cmdline2"/> for an example of
16235  * parsing @argv manually. Alternatively, you may use the #GOptionContext API,
16236  * after setting <literal>argc = g_strv_length (argv);</literal>.
16237  *
16238  * The last argument to local_command_line() is a pointer to the @status
16239  * variable which can used to set the exit status that is returned from
16240  * g_application_run().
16241  *
16242  * If local_command_line() returns %TRUE, the command line is expected
16243  * to be completely handled, including possibly registering as the primary
16244  * instance, calling g_application_activate() or g_application_open(), etc.
16245  *
16246  * If local_command_line() returns %FALSE then the application is registered
16247  * and the #GApplication::command-line signal is emitted in the primary
16248  * instance (which may or may not be this instance). The signal handler
16249  * gets passed a #GApplicationCommandline object that (among other things)
16250  * contains the remaining commandline arguments that have not been handled
16251  * by local_command_line().
16252  *
16253  * If the application has the %G_APPLICATION_HANDLES_COMMAND_LINE
16254  * flag set then the default implementation of local_command_line()
16255  * always returns %FALSE immediately, resulting in the commandline
16256  * always being handled in the primary instance.
16257  *
16258  * Otherwise, the default implementation of local_command_line() tries
16259  * to do a couple of things that are probably reasonable for most
16260  * applications.  First, g_application_register() is called to attempt
16261  * to register the application.  If that works, then the command line
16262  * arguments are inspected.  If no commandline arguments are given, then
16263  * g_application_activate() is called.  If commandline arguments are
16264  * given and the %G_APPLICATION_HANDLES_OPEN flag is set then they
16265  * are assumed to be filenames and g_application_open() is called.
16266  *
16267  * If you need to handle commandline arguments that are not filenames,
16268  * and you don't mind commandline handling to happen in the primary
16269  * instance, you should set %G_APPLICATION_HANDLED_COMMAND_LINE and
16270  * process the commandline arguments in your #GApplication::command-line
16271  * signal handler, either manually or using the #GOptionContext API.
16272  *
16273  * If you are interested in doing more complicated local handling of the
16274  * commandline then you should implement your own #GApplication subclass
16275  * and override local_command_line(). In this case, you most likely want
16276  * to return %TRUE from your local_command_line() implementation to
16277  * suppress the default handling. See
16278  * <xref linkend="gapplication-example-cmdline2"/> for an example.
16279  *
16280  * If, after the above is done, the use count of the application is zero
16281  * then the exit status is returned immediately.  If the use count is
16282  * non-zero then the mainloop is run until the use count falls to zero,
16283  * at which point 0 is returned.
16284  *
16285  * If the %G_APPLICATION_IS_SERVICE flag is set, then the exiting at
16286  * use count of zero is delayed for a while (ie: the instance stays
16287  * around to provide its <emphasis>service</emphasis> to others).
16288  *
16289  * Since: 2.28
16290  */
16291
16292
16293 /**
16294  * g_application_set_action_group:
16295  * @application: a #GApplication
16296  * @action_group: (allow-none): a #GActionGroup, or %NULL
16297  *
16298  * Sets or unsets the group of actions associated with the application.
16299  *
16300  * These actions are the actions that can be remotely invoked.
16301  *
16302  * It is an error to call this function after the application has been
16303  * registered.
16304  *
16305  * Since: 2.28
16306  */
16307
16308
16309 /**
16310  * g_application_set_application_id:
16311  * @application: a #GApplication
16312  * @application_id: the identifier for @application
16313  *
16314  * Sets the unique identifier for @application.
16315  *
16316  * The application id can only be modified if @application has not yet
16317  * been registered.
16318  *
16319  * The application id must be valid.  See g_application_id_is_valid().
16320  *
16321  * Since: 2.28
16322  */
16323
16324
16325 /**
16326  * g_application_set_flags:
16327  * @application: a #GApplication
16328  * @flags: the flags for @application
16329  *
16330  * Sets the flags for @application.
16331  *
16332  * The flags can only be modified if @application has not yet been
16333  * registered.
16334  *
16335  * See #GApplicationFlags.
16336  *
16337  * Since: 2.28
16338  */
16339
16340
16341 /**
16342  * g_application_set_inactivity_timeout:
16343  * @application: a #GApplication
16344  * @inactivity_timeout: the timeout, in milliseconds
16345  *
16346  * Sets the current inactivity timeout for the application.
16347  *
16348  * This is the amount of time (in milliseconds) after the last call to
16349  * g_application_release() before the application stops running.
16350  *
16351  * This call has no side effects of its own.  The value set here is only
16352  * used for next time g_application_release() drops the use count to
16353  * zero.  Any timeouts currently in progress are not impacted.
16354  *
16355  * Returns: the timeout, in milliseconds
16356  * Since: 2.28
16357  */
16358
16359
16360 /**
16361  * g_async_initable_init_async:
16362  * @initable: a #GAsyncInitable.
16363  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
16364  * @cancellable: optional #GCancellable object, %NULL to ignore.
16365  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
16366  * @user_data: the data to pass to callback function
16367  *
16368  * Starts asynchronous initialization of the object implementing the
16369  * interface. This must be done before any real use of the object after
16370  * initial construction. If the object also implements #GInitable you can
16371  * optionally call g_initable_init() instead.
16372  *
16373  * When the initialization is finished, @callback will be called. You can
16374  * then call g_async_initable_init_finish() to get the result of the
16375  * initialization.
16376  *
16377  * Implementations may also support cancellation. If @cancellable is not
16378  * %NULL, then initialization can be cancelled by triggering the cancellable
16379  * object from another thread. If the operation was cancelled, the error
16380  * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
16381  * the object doesn't support cancellable initialization, the error
16382  * %G_IO_ERROR_NOT_SUPPORTED will be returned.
16383  *
16384  * If this function is not called, or returns with an error, then all
16385  * operations on the object should fail, generally returning the
16386  * error %G_IO_ERROR_NOT_INITIALIZED.
16387  *
16388  * Implementations of this method must be idempotent: i.e. multiple calls
16389  * to this function with the same argument should return the same results.
16390  * Only the first call initializes the object; further calls return the result
16391  * of the first call. This is so that it's safe to implement the singleton
16392  * pattern in the GObject constructor function.
16393  *
16394  * For classes that also support the #GInitable interface, the default
16395  * implementation of this method will run the g_initable_init() function
16396  * in a thread, so if you want to support asynchronous initialization via
16397  * threads, just implement the #GAsyncInitable interface without overriding
16398  * any interface methods.
16399  *
16400  * Since: 2.22
16401  */
16402
16403
16404 /**
16405  * g_async_initable_init_finish:
16406  * @initable: a #GAsyncInitable.
16407  * @res: a #GAsyncResult.
16408  * @error: a #GError location to store the error occuring, or %NULL to ignore.
16409  *
16410  * Finishes asynchronous initialization and returns the result.
16411  * See g_async_initable_init_async().
16412  *
16413  * will return %FALSE and set @error appropriately if present.
16414  *
16415  * Returns: %TRUE if successful. If an error has occurred, this function
16416  * Since: 2.22
16417  */
16418
16419
16420 /**
16421  * g_async_initable_new_async:
16422  * @object_type: a #GType supporting #GAsyncInitable.
16423  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
16424  * @cancellable: optional #GCancellable object, %NULL to ignore.
16425  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
16426  * @user_data: the data to pass to callback function
16427  * @first_property_name: the name of the first property, or %NULL if no properties
16428  * @...: the value of the first property, followed by other property value pairs, and ended by %NULL.
16429  *
16430  * Helper function for constructing #GAsyncInitable object. This is
16431  * similar to g_object_new() but also initializes the object asynchronously.
16432  *
16433  * When the initialization is finished, @callback will be called. You can
16434  * then call g_async_initable_new_finish() to get the new object and check
16435  * for any errors.
16436  *
16437  * Since: 2.22
16438  */
16439
16440
16441 /**
16442  * g_async_initable_new_finish:
16443  * @initable: the #GAsyncInitable from the callback
16444  * @res: the #GAsyncResult from the callback
16445  * @error: return location for errors, or %NULL to ignore
16446  *
16447  * Finishes the async construction for the various g_async_initable_new
16448  * calls, returning the created object or %NULL on error.
16449  *
16450  * Free with g_object_unref().
16451  *
16452  * Returns: (transfer full): a newly created #GObject, or %NULL on error.
16453  * Since: 2.22
16454  */
16455
16456
16457 /**
16458  * g_async_initable_new_valist_async:
16459  * @object_type: a #GType supporting #GAsyncInitable.
16460  * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
16461  * @var_args: The var args list generated from @first_property_name.
16462  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
16463  * @cancellable: optional #GCancellable object, %NULL to ignore.
16464  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
16465  * @user_data: the data to pass to callback function
16466  *
16467  * Helper function for constructing #GAsyncInitable object. This is
16468  * similar to g_object_new_valist() but also initializes the object
16469  * asynchronously.
16470  *
16471  * When the initialization is finished, @callback will be called. You can
16472  * then call g_async_initable_new_finish() to get the new object and check
16473  * for any errors.
16474  *
16475  * Since: 2.22
16476  */
16477
16478
16479 /**
16480  * g_async_initable_newv_async:
16481  * @object_type: a #GType supporting #GAsyncInitable.
16482  * @n_parameters: the number of parameters in @parameters
16483  * @parameters: the parameters to use to construct the object
16484  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
16485  * @cancellable: optional #GCancellable object, %NULL to ignore.
16486  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
16487  * @user_data: the data to pass to callback function
16488  *
16489  * Helper function for constructing #GAsyncInitable object. This is
16490  * similar to g_object_newv() but also initializes the object asynchronously.
16491  *
16492  * When the initialization is finished, @callback will be called. You can
16493  * then call g_async_initable_new_finish() to get the new object and check
16494  * for any errors.
16495  *
16496  * Since: 2.22
16497  */
16498
16499
16500 /**
16501  * g_async_result_get_source_object:
16502  * @res: a #GAsyncResult
16503  *
16504  * Gets the source object from a #GAsyncResult.
16505  *
16506  * or %NULL if there is none.
16507  *
16508  * Returns: (transfer full): a new reference to the source object for the @res,
16509  */
16510
16511
16512 /**
16513  * g_async_result_get_user_data:
16514  * @res: a #GAsyncResult.
16515  *
16516  * Gets the user data from a #GAsyncResult.
16517  *
16518  * Returns: (transfer full): the user data for @res.
16519  */
16520
16521
16522 /**
16523  * g_buffered_input_stream_fill:
16524  * @stream: a #GBufferedInputStream
16525  * @count: the number of bytes that will be read from the stream
16526  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
16527  * @error: location to store the error occuring, or %NULL to ignore
16528  *
16529  * Tries to read @count bytes from the stream into the buffer.
16530  * Will block during this read.
16531  *
16532  * If @count is zero, returns zero and does nothing. A value of @count
16533  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
16534  *
16535  * On success, the number of bytes read into the buffer is returned.
16536  * It is not an error if this is not the same as the requested size, as it
16537  * can happen e.g. near the end of a file. Zero is returned on end of file
16538  * (or if @count is zero),  but never otherwise.
16539  *
16540  * If @count is -1 then the attempted read size is equal to the number of
16541  * bytes that are required to fill the buffer.
16542  *
16543  * If @cancellable is not %NULL, then the operation can be cancelled by
16544  * triggering the cancellable object from another thread. If the operation
16545  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
16546  * operation was partially finished when the operation was cancelled the
16547  * partial result will be returned, without an error.
16548  *
16549  * On error -1 is returned and @error is set accordingly.
16550  *
16551  * For the asynchronous, non-blocking, version of this function, see
16552  * g_buffered_input_stream_fill_async().
16553  *
16554  * or -1 on error.
16555  *
16556  * Returns: the number of bytes read into @stream's buffer, up to @count,
16557  */
16558
16559
16560 /**
16561  * g_buffered_input_stream_fill_async:
16562  * @stream: a #GBufferedInputStream
16563  * @count: the number of bytes that will be read from the stream
16564  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
16565  * @cancellable: (allow-none): optional #GCancellable object
16566  * @callback: (scope async): a #GAsyncReadyCallback
16567  * @user_data: (closure): a #gpointer
16568  *
16569  * Reads data into @stream's buffer asynchronously, up to @count size.
16570  * @io_priority can be used to prioritize reads. For the synchronous
16571  * version of this function, see g_buffered_input_stream_fill().
16572  *
16573  * If @count is -1 then the attempted read size is equal to the number
16574  * of bytes that are required to fill the buffer.
16575  */
16576
16577
16578 /**
16579  * g_buffered_input_stream_fill_finish:
16580  * @stream: a #GBufferedInputStream
16581  * @result: a #GAsyncResult
16582  * @error: a #GError
16583  *
16584  * Finishes an asynchronous read.
16585  *
16586  * Returns: a #gssize of the read stream, or %-1 on an error.
16587  */
16588
16589
16590 /**
16591  * g_buffered_input_stream_get_available:
16592  * @stream: #GBufferedInputStream
16593  *
16594  * Gets the size of the available data within the stream.
16595  *
16596  * Returns: size of the available stream.
16597  */
16598
16599
16600 /**
16601  * g_buffered_input_stream_get_buffer_size:
16602  * @stream: a #GBufferedInputStream
16603  *
16604  * Gets the size of the input buffer.
16605  *
16606  * Returns: the current buffer size.
16607  */
16608
16609
16610 /**
16611  * g_buffered_input_stream_new:
16612  * @base_stream: a #GInputStream
16613  *
16614  * Creates a new #GInputStream from the given @base_stream, with
16615  * a buffer set to the default size (4 kilobytes).
16616  *
16617  * Returns: a #GInputStream for the given @base_stream.
16618  */
16619
16620
16621 /**
16622  * g_buffered_input_stream_new_sized:
16623  * @base_stream: a #GInputStream
16624  * @size: a #gsize
16625  *
16626  * Creates a new #GBufferedInputStream from the given @base_stream,
16627  * with a buffer set to @size.
16628  *
16629  * Returns: a #GInputStream.
16630  */
16631
16632
16633 /**
16634  * g_buffered_input_stream_peek:
16635  * @stream: a #GBufferedInputStream
16636  * @buffer: a pointer to an allocated chunk of memory
16637  * @offset: a #gsize
16638  * @count: a #gsize
16639  *
16640  * Peeks in the buffer, copying data of size @count into @buffer,
16641  * offset @offset bytes.
16642  *
16643  * Returns: a #gsize of the number of bytes peeked, or -1 on error.
16644  */
16645
16646
16647 /**
16648  * g_buffered_input_stream_peek_buffer:
16649  * @stream: a #GBufferedInputStream
16650  * @count: (out): a #gsize to get the number of bytes available in the buffer
16651  *
16652  * Returns the buffer with the currently available bytes. The returned
16653  * buffer must not be modified and will become invalid when reading from
16654  * the stream or filling the buffer.
16655  *
16656  * read-only buffer
16657  *
16658  * Returns: (array length=count) (element-type guint8) (transfer none):
16659  */
16660
16661
16662 /**
16663  * g_buffered_input_stream_read_byte:
16664  * @stream: a #GBufferedInputStream
16665  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
16666  * @error: location to store the error occuring, or %NULL to ignore
16667  *
16668  * Tries to read a single byte from the stream or the buffer. Will block
16669  * during this read.
16670  *
16671  * On success, the byte read from the stream is returned. On end of stream
16672  * -1 is returned but it's not an exceptional error and @error is not set.
16673  *
16674  * If @cancellable is not %NULL, then the operation can be cancelled by
16675  * triggering the cancellable object from another thread. If the operation
16676  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
16677  * operation was partially finished when the operation was cancelled the
16678  * partial result will be returned, without an error.
16679  *
16680  * On error -1 is returned and @error is set accordingly.
16681  *
16682  * Returns: the byte read from the @stream, or -1 on end of stream or error.
16683  */
16684
16685
16686 /**
16687  * g_buffered_input_stream_set_buffer_size:
16688  * @stream: a #GBufferedInputStream
16689  * @size: a #gsize
16690  *
16691  * Sets the size of the internal buffer of @stream to @size, or to the
16692  * size of the contents of the buffer. The buffer can never be resized
16693  * smaller than its current contents.
16694  */
16695
16696
16697 /**
16698  * g_buffered_output_stream_get_auto_grow:
16699  * @stream: a #GBufferedOutputStream.
16700  *
16701  * Checks if the buffer automatically grows as data is added.
16702  *
16703  * %FALSE otherwise.
16704  *
16705  * Returns: %TRUE if the @stream's buffer automatically grows,
16706  */
16707
16708
16709 /**
16710  * g_buffered_output_stream_get_buffer_size:
16711  * @stream: a #GBufferedOutputStream.
16712  *
16713  * Gets the size of the buffer in the @stream.
16714  *
16715  * Returns: the current size of the buffer.
16716  */
16717
16718
16719 /**
16720  * g_buffered_output_stream_new:
16721  * @base_stream: a #GOutputStream.
16722  *
16723  * Creates a new buffered output stream for a base stream.
16724  *
16725  * Returns: a #GOutputStream for the given @base_stream.
16726  */
16727
16728
16729 /**
16730  * g_buffered_output_stream_new_sized:
16731  * @base_stream: a #GOutputStream.
16732  * @size: a #gsize.
16733  *
16734  * Creates a new buffered output stream with a given buffer size.
16735  *
16736  * Returns: a #GOutputStream with an internal buffer set to @size.
16737  */
16738
16739
16740 /**
16741  * g_buffered_output_stream_set_auto_grow:
16742  * @stream: a #GBufferedOutputStream.
16743  * @auto_grow: a #gboolean.
16744  *
16745  * Sets whether or not the @stream's buffer should automatically grow.
16746  * If @auto_grow is true, then each write will just make the buffer
16747  * larger, and you must manually flush the buffer to actually write out
16748  * the data to the underlying stream.
16749  */
16750
16751
16752 /**
16753  * g_buffered_output_stream_set_buffer_size:
16754  * @stream: a #GBufferedOutputStream.
16755  * @size: a #gsize.
16756  *
16757  * Sets the size of the internal buffer to @size.
16758  */
16759
16760
16761 /**
16762  * g_bus_get:
16763  * @bus_type: A #GBusType.
16764  * @cancellable: A #GCancellable or %NULL.
16765  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
16766  * @user_data: The data to pass to @callback.
16767  *
16768  * Asynchronously connects to the message bus specified by @bus_type.
16769  *
16770  * When the operation is finished, @callback will be invoked. You can
16771  * then call g_bus_get_finish() to get the result of the operation.
16772  *
16773  * This is a asynchronous failable function. See g_bus_get_sync() for
16774  * the synchronous version.
16775  *
16776  * Since: 2.26
16777  */
16778
16779
16780 /**
16781  * g_bus_get_finish:
16782  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_bus_get().
16783  * @error: Return location for error or %NULL.
16784  *
16785  * Finishes an operation started with g_bus_get().
16786  *
16787  * The returned object is a singleton, that is, shared with other
16788  * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
16789  * event that you need a private message bus connection, use
16790  * g_dbus_address_get_for_bus_sync() and
16791  * g_dbus_connection_new_for_address().
16792  *
16793  * Note that the returned #GDBusConnection object will (usually) have
16794  * the #GDBusConnection:exit-on-close property set to %TRUE.
16795  *
16796  * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16797  * Since: 2.26
16798  */
16799
16800
16801 /**
16802  * g_bus_get_sync:
16803  * @bus_type: A #GBusType.
16804  * @cancellable: A #GCancellable or %NULL.
16805  * @error: Return location for error or %NULL.
16806  *
16807  * Synchronously connects to the message bus specified by @bus_type.
16808  * Note that the returned object may shared with other callers,
16809  * e.g. if two separate parts of a process calls this function with
16810  * the same @bus_type, they will share the same object.
16811  *
16812  * This is a synchronous failable function. See g_bus_get() and
16813  * g_bus_get_finish() for the asynchronous version.
16814  *
16815  * The returned object is a singleton, that is, shared with other
16816  * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
16817  * event that you need a private message bus connection, use
16818  * g_dbus_address_get_for_bus_sync() and
16819  * g_dbus_connection_new_for_address().
16820  *
16821  * Note that the returned #GDBusConnection object will (usually) have
16822  * the #GDBusConnection:exit-on-close property set to %TRUE.
16823  *
16824  * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16825  * Since: 2.26
16826  */
16827
16828
16829 /**
16830  * g_bus_own_name:
16831  * @bus_type: The type of bus to own a name on.
16832  * @name: The well-known name to own.
16833  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
16834  * @bus_acquired_handler: Handler to invoke when connected to the bus of type @bus_type or %NULL.
16835  * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
16836  * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
16837  * @user_data: User data to pass to handlers.
16838  * @user_data_free_func: Function for freeing @user_data or %NULL.
16839  *
16840  * Starts acquiring @name on the bus specified by @bus_type and calls
16841  * @name_acquired_handler and @name_lost_handler when the name is
16842  * acquired respectively lost. Callbacks will be invoked in the <link
16843  * linkend="g-main-context-push-thread-default">thread-default main
16844  * loop</link> of the thread you are calling this function from.
16845  *
16846  * You are guaranteed that one of the @name_acquired_handler and @name_lost_handler
16847  * callbacks will be invoked after calling this function - there are three
16848  * possible cases:
16849  * <itemizedlist>
16850  * <listitem><para>
16851  * @name_lost_handler with a %NULL connection (if a connection to the bus can't be made).
16852  * </para></listitem>
16853  * <listitem><para>
16854  * @bus_acquired_handler then @name_lost_handler (if the name can't be obtained)
16855  * </para></listitem>
16856  * <listitem><para>
16857  * @bus_acquired_handler then @name_acquired_handler (if the name was obtained).
16858  * </para></listitem>
16859  * </itemizedlist>
16860  * When you are done owning the name, just call g_bus_unown_name()
16861  * with the owner id this function returns.
16862  *
16863  * If the name is acquired or lost (for example another application
16864  * could acquire the name if you allow replacement or the application
16865  * currently owning the name exits), the handlers are also invoked. If the
16866  * #GDBusConnection that is used for attempting to own the name
16867  * closes, then @name_lost_handler is invoked since it is no
16868  * longer possible for other processes to access the process.
16869  *
16870  * You cannot use g_bus_own_name() several times for the same name (unless
16871  * interleaved with calls to g_bus_unown_name()) - only the first call
16872  * will work.
16873  *
16874  * Another guarantee is that invocations of @name_acquired_handler
16875  * and @name_lost_handler are guaranteed to alternate; that
16876  * is, if @name_acquired_handler is invoked then you are
16877  * guaranteed that the next time one of the handlers is invoked, it
16878  * will be @name_lost_handler. The reverse is also true.
16879  *
16880  * If you plan on exporting objects (using e.g.
16881  * g_dbus_connection_register_object()), note that it is generally too late
16882  * to export the objects in @name_acquired_handler. Instead, you can do this
16883  * in @bus_acquired_handler since you are guaranteed that this will run
16884  * before @name is requested from the bus.
16885  *
16886  * This behavior makes it very simple to write applications that wants
16887  * to own names and export objects, see <xref linkend="gdbus-owning-names"/>.
16888  * Simply register objects to be exported in @bus_acquired_handler and
16889  * unregister the objects (if any) in @name_lost_handler.
16890  *
16891  * g_bus_unown_name() to stop owning the name.
16892  *
16893  * Returns: An identifier (never 0) that an be used with
16894  * Since: 2.26
16895  */
16896
16897
16898 /**
16899  * g_bus_own_name_on_connection:
16900  * @connection: A #GDBusConnection.
16901  * @name: The well-known name to own.
16902  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
16903  * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
16904  * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
16905  * @user_data: User data to pass to handlers.
16906  * @user_data_free_func: Function for freeing @user_data or %NULL.
16907  *
16908  * Like g_bus_own_name() but takes a #GDBusConnection instead of a
16909  * #GBusType.
16910  *
16911  * g_bus_unown_name() to stop owning the name.
16912  *
16913  * Returns: An identifier (never 0) that an be used with
16914  * Since: 2.26
16915  */
16916
16917
16918 /**
16919  * g_bus_own_name_on_connection_with_closures:
16920  * @connection: A #GDBusConnection.
16921  * @name: The well-known name to own.
16922  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
16923  * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
16924  * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
16925  *
16926  * Version of g_bus_own_name_on_connection() using closures instead of callbacks for
16927  * easier binding in other languages.
16928  *
16929  * g_bus_unown_name() to stop owning the name.
16930  *
16931  * Returns: An identifier (never 0) that an be used with
16932  * Rename to: g_bus_own_name_on_connection
16933  * Since: 2.26
16934  */
16935
16936
16937 /**
16938  * g_bus_own_name_with_closures:
16939  * @bus_type: The type of bus to own a name on.
16940  * @name: The well-known name to own.
16941  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
16942  * @bus_acquired_closure: (allow-none): #GClosure to invoke when connected to the bus of type @bus_type or %NULL.
16943  * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
16944  * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
16945  *
16946  * Version of g_bus_own_name() using closures instead of callbacks for
16947  * easier binding in other languages.
16948  *
16949  * g_bus_unown_name() to stop owning the name.
16950  *
16951  * Returns: An identifier (never 0) that an be used with
16952  * Rename to: g_bus_own_name
16953  * Since: 2.26
16954  */
16955
16956
16957 /**
16958  * g_bus_unown_name:
16959  * @owner_id: An identifier obtained from g_bus_own_name()
16960  *
16961  * Stops owning a name.
16962  *
16963  * Since: 2.26
16964  */
16965
16966
16967 /**
16968  * g_bus_unwatch_name:
16969  * @watcher_id: An identifier obtained from g_bus_watch_name()
16970  *
16971  * Stops watching a name.
16972  *
16973  * Since: 2.26
16974  */
16975
16976
16977 /**
16978  * g_bus_watch_name:
16979  * @bus_type: The type of bus to watch a name on.
16980  * @name: The name (well-known or unique) to watch.
16981  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
16982  * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
16983  * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
16984  * @user_data: User data to pass to handlers.
16985  * @user_data_free_func: Function for freeing @user_data or %NULL.
16986  *
16987  * Starts watching @name on the bus specified by @bus_type and calls
16988  * @name_appeared_handler and @name_vanished_handler when the name is
16989  * known to have a owner respectively known to lose its
16990  * owner. Callbacks will be invoked in the <link
16991  * linkend="g-main-context-push-thread-default">thread-default main
16992  * loop</link> of the thread you are calling this function from.
16993  *
16994  * You are guaranteed that one of the handlers will be invoked after
16995  * calling this function. When you are done watching the name, just
16996  * call g_bus_unwatch_name() with the watcher id this function
16997  * returns.
16998  *
16999  * If the name vanishes or appears (for example the application owning
17000  * the name could restart), the handlers are also invoked. If the
17001  * #GDBusConnection that is used for watching the name disconnects, then
17002  * @name_vanished_handler is invoked since it is no longer
17003  * possible to access the name.
17004  *
17005  * Another guarantee is that invocations of @name_appeared_handler
17006  * and @name_vanished_handler are guaranteed to alternate; that
17007  * is, if @name_appeared_handler is invoked then you are
17008  * guaranteed that the next time one of the handlers is invoked, it
17009  * will be @name_vanished_handler. The reverse is also true.
17010  *
17011  * This behavior makes it very simple to write applications that wants
17012  * to take action when a certain name exists, see <xref
17013  * linkend="gdbus-watching-names"/>. Basically, the application
17014  * should create object proxies in @name_appeared_handler and destroy
17015  * them again (if any) in @name_vanished_handler.
17016  *
17017  * g_bus_unwatch_name() to stop watching the name.
17018  *
17019  * Returns: An identifier (never 0) that an be used with
17020  * Since: 2.26
17021  */
17022
17023
17024 /**
17025  * g_bus_watch_name_on_connection:
17026  * @connection: A #GDBusConnection.
17027  * @name: The name (well-known or unique) to watch.
17028  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
17029  * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
17030  * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
17031  * @user_data: User data to pass to handlers.
17032  * @user_data_free_func: Function for freeing @user_data or %NULL.
17033  *
17034  * Like g_bus_watch_name() but takes a #GDBusConnection instead of a
17035  * #GBusType.
17036  *
17037  * g_bus_unwatch_name() to stop watching the name.
17038  *
17039  * Returns: An identifier (never 0) that an be used with
17040  * Since: 2.26
17041  */
17042
17043
17044 /**
17045  * g_bus_watch_name_on_connection_with_closures:
17046  * @connection: A #GDBusConnection.
17047  * @name: The name (well-known or unique) to watch.
17048  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
17049  * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
17050  * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
17051  *
17052  * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for
17053  * easier binding in other languages.
17054  *
17055  * g_bus_unwatch_name() to stop watching the name.
17056  *
17057  * Returns: An identifier (never 0) that an be used with
17058  * Rename to: g_bus_watch_name_on_connection
17059  * Since: 2.26
17060  */
17061
17062
17063 /**
17064  * g_bus_watch_name_with_closures:
17065  * @bus_type: The type of bus to watch a name on.
17066  * @name: The name (well-known or unique) to watch.
17067  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
17068  * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
17069  * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
17070  *
17071  * Version of g_bus_watch_name() using closures instead of callbacks for
17072  * easier binding in other languages.
17073  *
17074  * g_bus_unwatch_name() to stop watching the name.
17075  *
17076  * Returns: An identifier (never 0) that an be used with
17077  * Rename to: g_bus_watch_name
17078  * Since: 2.26
17079  */
17080
17081
17082 /**
17083  * g_cancellable_cancel:
17084  * @cancellable: a #GCancellable object.
17085  *
17086  * Will set @cancellable to cancelled, and will emit the
17087  * #GCancellable::cancelled signal. (However, see the warning about
17088  * race conditions in the documentation for that signal if you are
17089  * planning to connect to it.)
17090  *
17091  * This function is thread-safe. In other words, you can safely call
17092  * it from a thread other than the one running the operation that was
17093  * passed the @cancellable.
17094  *
17095  * The convention within gio is that cancelling an asynchronous
17096  * operation causes it to complete asynchronously. That is, if you
17097  * cancel the operation from the same thread in which it is running,
17098  * then the operation's #GAsyncReadyCallback will not be invoked until
17099  * the application returns to the main loop.
17100  */
17101
17102
17103 /**
17104  * g_cancellable_connect:
17105  * @cancellable: A #GCancellable.
17106  * @callback: The #GCallback to connect.
17107  * @data: Data to pass to @callback.
17108  * @data_destroy_func: Free function for @data or %NULL.
17109  *
17110  * Convenience function to connect to the #GCancellable::cancelled
17111  * signal. Also handles the race condition that may happen
17112  * if the cancellable is cancelled right before connecting.
17113  *
17114  * @callback is called at most once, either directly at the
17115  * time of the connect if @cancellable is already cancelled,
17116  * or when @cancellable is cancelled in some thread.
17117  *
17118  * @data_destroy_func will be called when the handler is
17119  * disconnected, or immediately if the cancellable is already
17120  * cancelled.
17121  *
17122  * See #GCancellable::cancelled for details on how to use this.
17123  *
17124  * been cancelled.
17125  *
17126  * Returns: The id of the signal handler or 0 if @cancellable has already
17127  * Since: 2.22
17128  */
17129
17130
17131 /**
17132  * g_cancellable_disconnect:
17133  * @cancellable: A #GCancellable or %NULL.
17134  * @handler_id: Handler id of the handler to be disconnected, or %0.
17135  *
17136  * Disconnects a handler from a cancellable instance similar to
17137  * g_signal_handler_disconnect().  Additionally, in the event that a
17138  * signal handler is currently running, this call will block until the
17139  * handler has finished.  Calling this function from a
17140  * #GCancellable::cancelled signal handler will therefore result in a
17141  * deadlock.
17142  *
17143  * This avoids a race condition where a thread cancels at the
17144  * same time as the cancellable operation is finished and the
17145  * signal handler is removed. See #GCancellable::cancelled for
17146  * details on how to use this.
17147  *
17148  * If @cancellable is %NULL or @handler_id is %0 this function does
17149  * nothing.
17150  *
17151  * Since: 2.22
17152  */
17153
17154
17155 /**
17156  * g_cancellable_get_current:
17157  *
17158  * Gets the top cancellable from the stack.
17159  *
17160  * if the stack is empty.
17161  *
17162  * Returns: (transfer none): a #GCancellable from the top of the stack, or %NULL
17163  */
17164
17165
17166 /**
17167  * g_cancellable_get_fd:
17168  * @cancellable: a #GCancellable.
17169  *
17170  * Gets the file descriptor for a cancellable job. This can be used to
17171  * implement cancellable operations on Unix systems. The returned fd will
17172  * turn readable when @cancellable is cancelled.
17173  *
17174  * You are not supposed to read from the fd yourself, just check for
17175  * readable status. Reading to unset the readable status is done
17176  * with g_cancellable_reset().
17177  *
17178  * After a successful return from this function, you should use
17179  * g_cancellable_release_fd() to free up resources allocated for
17180  * the returned file descriptor.
17181  *
17182  * See also g_cancellable_make_pollfd().
17183  *
17184  * is not supported, or on errors.
17185  *
17186  * Returns: A valid file descriptor. %-1 if the file descriptor
17187  */
17188
17189
17190 /**
17191  * g_cancellable_is_cancelled:
17192  * @cancellable: a #GCancellable or NULL.
17193  *
17194  * Checks if a cancellable job has been cancelled.
17195  *
17196  * FALSE if called with %NULL or if item is not cancelled.
17197  *
17198  * Returns: %TRUE if @cancellable is cancelled,
17199  */
17200
17201
17202 /**
17203  * g_cancellable_make_pollfd:
17204  * @cancellable: a #GCancellable or %NULL
17205  * @pollfd: a pointer to a #GPollFD
17206  *
17207  * Creates a #GPollFD corresponding to @cancellable; this can be passed
17208  * to g_poll() and used to poll for cancellation. This is useful both
17209  * for unix systems without a native poll and for portability to
17210  * windows.
17211  *
17212  * When this function returns %TRUE, you should use
17213  * g_cancellable_release_fd() to free up resources allocated for the
17214  * @pollfd. After a %FALSE return, do not call g_cancellable_release_fd().
17215  *
17216  * If this function returns %FALSE, either no @cancellable was given or
17217  * resource limits prevent this function from allocating the necessary
17218  * structures for polling. (On Linux, you will likely have reached
17219  * the maximum number of file descriptors.) The suggested way to handle
17220  * these cases is to ignore the @cancellable.
17221  *
17222  * You are not supposed to read from the fd yourself, just check for
17223  * readable status. Reading to unset the readable status is done
17224  * with g_cancellable_reset().
17225  *
17226  * failure to prepare the cancellable.
17227  *
17228  * Returns: %TRUE if @pollfd was successfully initialized, %FALSE on
17229  * Since: 2.22
17230  */
17231
17232
17233 /**
17234  * g_cancellable_new:
17235  *
17236  * Creates a new #GCancellable object.
17237  *
17238  * Applications that want to start one or more operations
17239  * that should be cancellable should create a #GCancellable
17240  * and pass it to the operations.
17241  *
17242  * One #GCancellable can be used in multiple consecutive
17243  * operations, but not in multiple concurrent operations.
17244  *
17245  * Returns: a #GCancellable.
17246  */
17247
17248
17249 /**
17250  * g_cancellable_pop_current:
17251  * @cancellable: a #GCancellable object
17252  *
17253  * Pops @cancellable off the cancellable stack (verifying that @cancellable
17254  * is on the top of the stack).
17255  */
17256
17257
17258 /**
17259  * g_cancellable_push_current:
17260  * @cancellable: a #GCancellable object
17261  *
17262  * Pushes @cancellable onto the cancellable stack. The current
17263  * cancellable can then be recieved using g_cancellable_get_current().
17264  *
17265  * This is useful when implementing cancellable operations in
17266  * code that does not allow you to pass down the cancellable object.
17267  *
17268  * This is typically called automatically by e.g. #GFile operations,
17269  * so you rarely have to call this yourself.
17270  */
17271
17272
17273 /**
17274  * g_cancellable_release_fd:
17275  * @cancellable: a #GCancellable
17276  *
17277  * Releases a resources previously allocated by g_cancellable_get_fd()
17278  * or g_cancellable_make_pollfd().
17279  *
17280  * For compatibility reasons with older releases, calling this function
17281  * is not strictly required, the resources will be automatically freed
17282  * when the @cancellable is finalized. However, the @cancellable will
17283  * block scarce file descriptors until it is finalized if this function
17284  * is not called. This can cause the application to run out of file
17285  * descriptors when many #GCancellables are used at the same time.
17286  *
17287  * Since: 2.22
17288  */
17289
17290
17291 /**
17292  * g_cancellable_reset:
17293  * @cancellable: a #GCancellable object.
17294  *
17295  * Resets @cancellable to its uncancelled state.
17296  */
17297
17298
17299 /**
17300  * g_cancellable_set_error_if_cancelled:
17301  * @cancellable: a #GCancellable object.
17302  * @error: #GError to append error state to.
17303  *
17304  * If the @cancellable is cancelled, sets the error to notify
17305  * that the operation was cancelled.
17306  *
17307  * Returns: %TRUE if @cancellable was cancelled, %FALSE if it was not.
17308  */
17309
17310
17311 /**
17312  * g_cancellable_source_new: (skip)
17313  * @cancellable: a #GCancellable, or %NULL
17314  *
17315  * Creates a source that triggers if @cancellable is cancelled and
17316  * calls its callback of type #GCancellableSourceFunc. This is
17317  * primarily useful for attaching to another (non-cancellable) source
17318  * with g_source_add_child_source() to add cancellability to it.
17319  *
17320  * For convenience, you can call this with a %NULL #GCancellable,
17321  * in which case the source will never trigger.
17322  *
17323  * Returns: (transfer full): the new #GSource.
17324  * Since: 2.28
17325  */
17326
17327
17328 /**
17329  * g_charset_converter_get_num_fallbacks:
17330  * @converter: a #GCharsetConverter
17331  *
17332  * Gets the number of fallbacks that @converter has applied so far.
17333  *
17334  * Returns: the number of fallbacks that @converter has applied
17335  * Since: 2.24
17336  */
17337
17338
17339 /**
17340  * g_charset_converter_get_use_fallback:
17341  * @converter: a #GCharsetConverter
17342  *
17343  * Gets the #GCharsetConverter:use-fallback property.
17344  *
17345  * Returns: %TRUE if fallbacks are used by @converter
17346  * Since: 2.24
17347  */
17348
17349
17350 /**
17351  * g_charset_converter_new:
17352  * @to_charset: destination charset
17353  * @from_charset: source charset
17354  * @error: #GError for error reporting, or %NULL to ignore.
17355  *
17356  * Creates a new #GCharsetConverter.
17357  *
17358  * Returns: a new #GCharsetConverter or %NULL on error.
17359  * Since: 2.24
17360  */
17361
17362
17363 /**
17364  * g_charset_converter_set_use_fallback:
17365  * @converter: a #GCharsetConverter
17366  * @use_fallback: %TRUE to use fallbacks
17367  *
17368  * Sets the #GCharsetConverter:use-fallback property.
17369  *
17370  * Since: 2.24
17371  */
17372
17373
17374 /**
17375  * g_content_type_can_be_executable:
17376  * @type: a content type string
17377  *
17378  * Checks if a content type can be executable. Note that for instance
17379  * things like text files can be executables (i.e. scripts and batch files).
17380  *
17381  * can be executable, %FALSE otherwise.
17382  *
17383  * Returns: %TRUE if the file type corresponds to a type that
17384  */
17385
17386
17387 /**
17388  * g_content_type_equals:
17389  * @type1: a content type string
17390  * @type2: a content type string
17391  *
17392  * Compares two content types for equality.
17393  *
17394  * %FALSE otherwise.
17395  *
17396  * Returns: %TRUE if the two strings are identical or equivalent,
17397  */
17398
17399
17400 /**
17401  * g_content_type_from_mime_type:
17402  * @mime_type: a mime type string
17403  *
17404  * Tries to find a content type based on the mime type name.
17405  *
17406  * or %NULL. Free with g_free()
17407  *
17408  * Returns: (allow-none): Newly allocated string with content type
17409  * Since: 2.18
17410  */
17411
17412
17413 /**
17414  * g_content_type_get_description:
17415  * @type: a content type string
17416  *
17417  * Gets the human readable description of the content type.
17418  *
17419  * returned string with g_free()
17420  *
17421  * Returns: a short description of the content type @type. Free the
17422  */
17423
17424
17425 /**
17426  * g_content_type_get_icon:
17427  * @type: a content type string
17428  *
17429  * Gets the icon for a content type.
17430  *
17431  * object with g_object_unref()
17432  *
17433  * Returns: (transfer full): #GIcon corresponding to the content type. Free the returned
17434  */
17435
17436
17437 /**
17438  * g_content_type_get_mime_type:
17439  * @type: a content type string
17440  *
17441  * Gets the mime type for the content type, if one is registered.
17442  *
17443  * or %NULL if unknown.
17444  *
17445  * Returns: (allow-none): the registered mime type for the given @type,
17446  */
17447
17448
17449 /**
17450  * g_content_type_guess:
17451  * @filename: (allow-none): a string, or %NULL
17452  * @data: (allow-none) (array length=data_size): a stream of data, or %NULL
17453  * @data_size: the size of @data
17454  * @result_uncertain: (allow-none) (out): return location for the certainty of the result, or %NULL
17455  *
17456  * Guesses the content type based on example data. If the function is
17457  * uncertain, @result_uncertain will be set to %TRUE. Either @filename
17458  * or @data may be %NULL, in which case the guess will be based solely
17459  * on the other argument.
17460  *
17461  * given data. Free with g_free()
17462  *
17463  * Returns: a string indicating a guessed content type for the
17464  */
17465
17466
17467 /**
17468  * g_content_type_guess_for_tree:
17469  * @root: the root of the tree to guess a type for
17470  *
17471  * Tries to guess the type of the tree with root @root, by
17472  * looking at the files it contains. The result is an array
17473  * of content types, with the best guess coming first.
17474  *
17475  * The types returned all have the form x-content/foo, e.g.
17476  * x-content/audio-cdda (for audio CDs) or x-content/image-dcf
17477  * (for a camera memory card). See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
17478  * specification for more on x-content types.
17479  *
17480  * This function is useful in the implementation of
17481  * g_mount_guess_content_type().
17482  *
17483  * array of zero or more content types, or %NULL. Free with g_strfreev()
17484  *
17485  * Returns: (transfer full) (array zero-terminated=1): an %NULL-terminated
17486  * Since: 2.18
17487  */
17488
17489
17490 /**
17491  * g_content_type_is_a:
17492  * @type: a content type string
17493  * @supertype: a content type string
17494  *
17495  * Determines if @type is a subset of @supertype.
17496  *
17497  * %FALSE otherwise.
17498  *
17499  * Returns: %TRUE if @type is a kind of @supertype,
17500  */
17501
17502
17503 /**
17504  * g_content_type_is_unknown:
17505  * @type: a content type string
17506  *
17507  * Checks if the content type is the generic "unknown" type.
17508  * On UNIX this is the "application/octet-stream" mimetype,
17509  * while on win32 it is "*".
17510  *
17511  * Returns: %TRUE if the type is the unknown type.
17512  */
17513
17514
17515 /**
17516  * g_content_types_get_registered:
17517  *
17518  * Gets a list of strings containing all the registered content types
17519  * known to the system. The list and its data should be freed using
17520  * <programlisting>
17521  * g_list_foreach (list, g_free, NULL);
17522  * g_list_free (list);
17523  * </programlisting>
17524  *
17525  * Returns: (element-type utf8) (transfer full): #GList of the registered content types
17526  */
17527
17528
17529 /**
17530  * g_converter_convert:
17531  * @converter: a #GConverter.
17532  * @inbuf: (array length=inbuf_size) (element-type guint8): the buffer containing the data to convert.
17533  * @inbuf_size: the number of bytes in @inbuf
17534  * @outbuf: a buffer to write converted data in.
17535  * @outbuf_size: the number of bytes in @outbuf, must be at least one
17536  * @flags: a #GConvertFlags controlling the conversion details
17537  * @bytes_read: (out): will be set to the number of bytes read from @inbuf on success
17538  * @bytes_written: (out): will be set to the number of bytes written to @outbuf on success
17539  * @error: location to store the error occuring, or %NULL to ignore
17540  *
17541  * This is the main operation used when converting data. It is to be called
17542  * multiple times in a loop, and each time it will do some work, i.e.
17543  * producing some output (in @outbuf) or consuming some input (from @inbuf) or
17544  * both. If its not possible to do any work an error is returned.
17545  *
17546  * Note that a single call may not consume all input (or any input at all).
17547  * Also a call may produce output even if given no input, due to state stored
17548  * in the converter producing output.
17549  *
17550  * If any data was either produced or consumed, and then an error happens, then
17551  * only the successful conversion is reported and the error is returned on the
17552  * next call.
17553  *
17554  * A full conversion loop involves calling this method repeatedly, each time
17555  * giving it new input and space output space. When there is no more input
17556  * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set.
17557  * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED
17558  * each time until all data is consumed and all output is produced, then
17559  * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED
17560  * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance
17561  * in a decompression converter where the end of data is detectable from the
17562  * data (and there might even be other data after the end of the compressed data).
17563  *
17564  * When some data has successfully been converted @bytes_read and is set to
17565  * the number of bytes read from @inbuf, and @bytes_written is set to indicate
17566  * how many bytes was written to @outbuf. If there are more data to output
17567  * or consume (i.e. unless the %G_CONVERTER_INPUT_AT_END is specified) then
17568  * %G_CONVERTER_CONVERTED is returned, and if no more data is to be output
17569  * then %G_CONVERTER_FINISHED is returned.
17570  *
17571  * On error %G_CONVERTER_ERROR is returned and @error is set accordingly.
17572  * Some errors need special handling:
17573  *
17574  * %G_IO_ERROR_NO_SPACE is returned if there is not enough space
17575  * to write the resulting converted data, the application should
17576  * call the function again with a larger @outbuf to continue.
17577  *
17578  * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough
17579  * input to fully determine what the conversion should produce,
17580  * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for
17581  * example with an incomplete multibyte sequence when converting text,
17582  * or when a regexp matches up to the end of the input (and may match
17583  * further input). It may also happen when @inbuf_size is zero and
17584  * there is no more data to produce.
17585  *
17586  * When this happens the application should read more input and then
17587  * call the function again. If further input shows that there is no
17588  * more data call the function again with the same data but with
17589  * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion
17590  * to finish as e.g. in the regexp match case (or, to fail again with
17591  * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the
17592  * input is actually partial).
17593  *
17594  * After g_converter_convert() has returned %G_CONVERTER_FINISHED the
17595  * converter object is in an invalid state where its not allowed
17596  * to call g_converter_convert() anymore. At this time you can only
17597  * free the object or call g_converter_reset() to reset it to the
17598  * initial state.
17599  *
17600  * If the flag %G_CONVERTER_FLUSH is set then conversion is modified
17601  * to try to write out all internal state to the output. The application
17602  * has to call the function multiple times with the flag set, and when
17603  * the availible input has been consumed and all internal state has
17604  * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if
17605  * really at the end) is returned instead of %G_CONVERTER_CONVERTED.
17606  * This is somewhat similar to what happens at the end of the input stream,
17607  * but done in the middle of the data.
17608  *
17609  * This has different meanings for different conversions. For instance
17610  * in a compression converter it would mean that we flush all the
17611  * compression state into output such that if you uncompress the
17612  * compressed data you get back all the input data. Doing this may
17613  * make the final file larger due to padding though. Another example
17614  * is a regexp conversion, where if you at the end of the flushed data
17615  * have a match, but there is also a potential longer match. In the
17616  * non-flushed case we would ask for more input, but when flushing we
17617  * treat this as the end of input and do the match.
17618  *
17619  * Flushing is not always possible (like if a charset converter flushes
17620  * at a partial multibyte sequence). Converters are supposed to try
17621  * to produce as much output as possible and then return an error
17622  * (typically %G_IO_ERROR_PARTIAL_INPUT).
17623  *
17624  * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error.
17625  * Since: 2.24
17626  */
17627
17628
17629 /**
17630  * g_converter_input_stream_get_converter:
17631  * @converter_stream: a #GConverterInputStream
17632  *
17633  * Gets the #GConverter that is used by @converter_stream.
17634  *
17635  * Returns: (transfer none): the converter of the converter input stream
17636  * Since: 2.24
17637  */
17638
17639
17640 /**
17641  * g_converter_input_stream_new:
17642  * @base_stream: a #GInputStream
17643  * @converter: a #GConverter
17644  *
17645  * Creates a new converter input stream for the @base_stream.
17646  *
17647  * Returns: a new #GInputStream.
17648  */
17649
17650
17651 /**
17652  * g_converter_output_stream_get_converter:
17653  * @converter_stream: a #GConverterOutputStream
17654  *
17655  * Gets the #GConverter that is used by @converter_stream.
17656  *
17657  * Returns: (transfer none): the converter of the converter output stream
17658  * Since: 2.24
17659  */
17660
17661
17662 /**
17663  * g_converter_output_stream_new:
17664  * @base_stream: a #GOutputStream
17665  * @converter: a #GConverter
17666  *
17667  * Creates a new converter output stream for the @base_stream.
17668  *
17669  * Returns: a new #GOutputStream.
17670  */
17671
17672
17673 /**
17674  * g_converter_reset:
17675  * @converter: a #GConverter.
17676  *
17677  * Resets all internal state in the converter, making it behave
17678  * as if it was just created. If the converter has any internal
17679  * state that would produce output then that output is lost.
17680  *
17681  * Since: 2.24
17682  */
17683
17684
17685 /**
17686  * g_credentials_get_native: (skip)
17687  * @credentials: A #GCredentials.
17688  * @native_type: The type of native credentials to get.
17689  *
17690  * Gets a pointer to native credentials of type @native_type from
17691  * @credentials.
17692  *
17693  * It is a programming error (which will cause an warning to be
17694  * logged) to use this method if there is no #GCredentials support for
17695  * the OS or if @native_type isn't supported by the OS.
17696  *
17697  * operation there is no #GCredentials support for the OS or if
17698  * @native_type isn't supported by the OS. Do not free the returned
17699  * data, it is owned by @credentials.
17700  *
17701  * Returns: The pointer to native credentials or %NULL if the
17702  * Since: 2.26
17703  */
17704
17705
17706 /**
17707  * g_credentials_get_unix_user:
17708  * @credentials: A #GCredentials
17709  * @error: Return location for error or %NULL.
17710  *
17711  * Tries to get the UNIX user identifier from @credentials. This
17712  * method is only available on UNIX platforms.
17713  *
17714  * This operation can fail if #GCredentials is not supported on the
17715  * OS or if the native credentials type does not contain information
17716  * about the UNIX user.
17717  *
17718  * Returns: The UNIX user identifier or -1 if @error is set.
17719  * Since: 2.26
17720  */
17721
17722
17723 /**
17724  * g_credentials_is_same_user:
17725  * @credentials: A #GCredentials.
17726  * @other_credentials: A #GCredentials.
17727  * @error: Return location for error or %NULL.
17728  *
17729  * Checks if @credentials and @other_credentials is the same user.
17730  *
17731  * This operation can fail if #GCredentials is not supported on the
17732  * the OS.
17733  *
17734  * user, %FALSE otherwise or if @error is set.
17735  *
17736  * Returns: %TRUE if @credentials and @other_credentials has the same
17737  * Since: 2.26
17738  */
17739
17740
17741 /**
17742  * g_credentials_new:
17743  *
17744  * Creates a new #GCredentials object with credentials matching the
17745  * the current process.
17746  *
17747  * Returns: A #GCredentials. Free with g_object_unref().
17748  * Since: 2.26
17749  */
17750
17751
17752 /**
17753  * g_credentials_set_native:
17754  * @credentials: A #GCredentials.
17755  * @native_type: The type of native credentials to set.
17756  * @native: A pointer to native credentials.
17757  *
17758  * Copies the native credentials of type @native_type from @native
17759  * into @credentials.
17760  *
17761  * It is a programming error (which will cause an warning to be
17762  * logged) to use this method if there is no #GCredentials support for
17763  * the OS or if @native_type isn't supported by the OS.
17764  *
17765  * Since: 2.26
17766  */
17767
17768
17769 /**
17770  * g_credentials_set_unix_user:
17771  * @credentials: A #GCredentials.
17772  * @uid: The UNIX user identifier to set.
17773  * @error: Return location for error or %NULL.
17774  *
17775  * Tries to set the UNIX user identifier on @credentials. This method
17776  * is only available on UNIX platforms.
17777  *
17778  * This operation can fail if #GCredentials is not supported on the
17779  * OS or if the native credentials type does not contain information
17780  * about the UNIX user.
17781  *
17782  * Returns: %TRUE if @uid was set, %FALSE if error is set.
17783  * Since: 2.26
17784  */
17785
17786
17787 /**
17788  * g_credentials_to_string:
17789  * @credentials: A #GCredentials object.
17790  *
17791  * Creates a human-readable textual representation of @credentials
17792  * that can be used in logging and debug messages. The format of the
17793  * returned string may change in future GLib release.
17794  *
17795  * Returns: A string that should be freed with g_free().
17796  * Since: 2.26
17797  */
17798
17799
17800 /**
17801  * g_data_input_stream_get_byte_order:
17802  * @stream: a given #GDataInputStream.
17803  *
17804  * Gets the byte order for the data input stream.
17805  *
17806  * Returns: the @stream's current #GDataStreamByteOrder.
17807  */
17808
17809
17810 /**
17811  * g_data_input_stream_get_newline_type:
17812  * @stream: a given #GDataInputStream.
17813  *
17814  * Gets the current newline type for the @stream.
17815  *
17816  * Returns: #GDataStreamNewlineType for the given @stream.
17817  */
17818
17819
17820 /**
17821  * g_data_input_stream_new:
17822  * @base_stream: a #GInputStream.
17823  *
17824  * Creates a new data input stream for the @base_stream.
17825  *
17826  * Returns: a new #GDataInputStream.
17827  */
17828
17829
17830 /**
17831  * g_data_input_stream_read_byte:
17832  * @stream: a given #GDataInputStream.
17833  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
17834  * @error: #GError for error reporting.
17835  *
17836  * Reads an unsigned 8-bit/1-byte value from @stream.
17837  *
17838  * if an error occurred.
17839  *
17840  * Returns: an unsigned 8-bit/1-byte value read from the @stream or %0
17841  */
17842
17843
17844 /**
17845  * g_data_input_stream_read_int16:
17846  * @stream: a given #GDataInputStream.
17847  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
17848  * @error: #GError for error reporting.
17849  *
17850  * Reads a 16-bit/2-byte value from @stream.
17851  *
17852  * In order to get the correct byte order for this read operation,
17853  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
17854  *
17855  * an error occurred.
17856  *
17857  * Returns: a signed 16-bit/2-byte value read from @stream or %0 if
17858  */
17859
17860
17861 /**
17862  * g_data_input_stream_read_int32:
17863  * @stream: a given #GDataInputStream.
17864  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
17865  * @error: #GError for error reporting.
17866  *
17867  * Reads a signed 32-bit/4-byte value from @stream.
17868  *
17869  * In order to get the correct byte order for this read operation,
17870  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
17871  *
17872  * If @cancellable is not %NULL, then the operation can be cancelled by
17873  * triggering the cancellable object from another thread. If the operation
17874  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
17875  *
17876  * an error occurred.
17877  *
17878  * Returns: a signed 32-bit/4-byte value read from the @stream or %0 if
17879  */
17880
17881
17882 /**
17883  * g_data_input_stream_read_int64:
17884  * @stream: a given #GDataInputStream.
17885  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
17886  * @error: #GError for error reporting.
17887  *
17888  * Reads a 64-bit/8-byte value from @stream.
17889  *
17890  * In order to get the correct byte order for this read operation,
17891  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
17892  *
17893  * If @cancellable is not %NULL, then the operation can be cancelled by
17894  * triggering the cancellable object from another thread. If the operation
17895  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
17896  *
17897  * an error occurred.
17898  *
17899  * Returns: a signed 64-bit/8-byte value read from @stream or %0 if
17900  */
17901
17902
17903 /**
17904  * g_data_input_stream_read_line:
17905  * @stream: a given #GDataInputStream.
17906  * @length: (out): a #gsize to get the length of the data read in.
17907  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
17908  * @error: #GError for error reporting.
17909  *
17910  * Reads a line from the data input stream.  Note that no encoding
17911  * checks or conversion is performed; the input is not guaranteed to
17912  * be UTF-8, and may in fact have embedded NUL characters.
17913  *
17914  * If @cancellable is not %NULL, then the operation can be cancelled by
17915  * triggering the cancellable object from another thread. If the operation
17916  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
17917  *
17918  * NUL terminated byte array with the line that was read in (without
17919  * the newlines).  Set @length to a #gsize to get the length of the
17920  * read line.  On an error, it will return %NULL and @error will be
17921  * set. If there's no content to read, it will still return %NULL,
17922  * but @error won't be set.
17923  *
17924  * Returns: (transfer full) (array zero-terminated=1) (element-type guint8): a
17925  */
17926
17927
17928 /**
17929  * g_data_input_stream_read_line_async:
17930  * @stream: a given #GDataInputStream.
17931  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
17932  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
17933  * @callback: (scope async): callback to call when the request is satisfied.
17934  * @user_data: (closure): the data to pass to callback function.
17935  *
17936  * The asynchronous version of g_data_input_stream_read_line().  It is
17937  * an error to have two outstanding calls to this function.
17938  *
17939  * When the operation is finished, @callback will be called. You
17940  * can then call g_data_input_stream_read_line_finish() to get
17941  * the result of the operation.
17942  *
17943  * Since: 2.20
17944  */
17945
17946
17947 /**
17948  * g_data_input_stream_read_line_finish:
17949  * @stream: a given #GDataInputStream.
17950  * @result: the #GAsyncResult that was provided to the callback.
17951  * @length: (out): a #gsize to get the length of the data read in.
17952  * @error: #GError for error reporting.
17953  *
17954  * Finish an asynchronous call started by
17955  * g_data_input_stream_read_line_async().  Note the warning about
17956  * string encoding in g_data_input_stream_read_line() applies here as
17957  * well.
17958  *
17959  * NUL-terminated byte array with the line that was read in
17960  * (without the newlines).  Set @length to a #gsize to get the
17961  * length of the read line.  On an error, it will return %NULL and
17962  * @error will be set. If there's no content to read, it will
17963  * still return %NULL, but @error won't be set.
17964  *
17965  * Returns: (transfer full) (array zero-terminated=1) (element-type guint8): a
17966  * Since: 2.20
17967  */
17968
17969
17970 /**
17971  * g_data_input_stream_read_line_finish_utf8:
17972  * @stream: a given #GDataInputStream.
17973  * @result: the #GAsyncResult that was provided to the callback.
17974  * @length: (out): a #gsize to get the length of the data read in.
17975  * @error: #GError for error reporting.
17976  *
17977  * Finish an asynchronous call started by
17978  * g_data_input_stream_read_line_async().
17979  *
17980  * (without the newlines).  Set @length to a #gsize to get the length
17981  * of the read line.  On an error, it will return %NULL and @error
17982  * will be set. For UTF-8 conversion errors, the set error domain is
17983  * %G_CONVERT_ERROR.  If there's no content to read, it will still
17984  * return %NULL, but @error won't be set.
17985  *
17986  * Returns: (transfer full): a string with the line that was read in
17987  * Since: 2.30
17988  */
17989
17990
17991 /**
17992  * g_data_input_stream_read_line_utf8:
17993  * @stream: a given #GDataInputStream.
17994  * @length: (out): a #gsize to get the length of the data read in.
17995  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
17996  * @error: #GError for error reporting.
17997  *
17998  * Reads a UTF-8 encoded line from the data input stream.
17999  *
18000  * If @cancellable is not %NULL, then the operation can be cancelled by
18001  * triggering the cancellable object from another thread. If the operation
18002  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
18003  *
18004  * line that was read in (without the newlines).  Set @length to a
18005  * #gsize to get the length of the read line.  On an error, it will
18006  * return %NULL and @error will be set.  For UTF-8 conversion errors,
18007  * the set error domain is %G_CONVERT_ERROR.  If there's no content to
18008  * read, it will still return %NULL, but @error won't be set.
18009  *
18010  * Returns: (transfer full): a NUL terminated UTF-8 string with the
18011  * Since: 2.30
18012  */
18013
18014
18015 /**
18016  * g_data_input_stream_read_uint16:
18017  * @stream: a given #GDataInputStream.
18018  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18019  * @error: #GError for error reporting.
18020  *
18021  * Reads an unsigned 16-bit/2-byte value from @stream.
18022  *
18023  * In order to get the correct byte order for this read operation,
18024  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
18025  *
18026  * an error occurred.
18027  *
18028  * Returns: an unsigned 16-bit/2-byte value read from the @stream or %0 if
18029  */
18030
18031
18032 /**
18033  * g_data_input_stream_read_uint32:
18034  * @stream: a given #GDataInputStream.
18035  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18036  * @error: #GError for error reporting.
18037  *
18038  * Reads an unsigned 32-bit/4-byte value from @stream.
18039  *
18040  * In order to get the correct byte order for this read operation,
18041  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
18042  *
18043  * If @cancellable is not %NULL, then the operation can be cancelled by
18044  * triggering the cancellable object from another thread. If the operation
18045  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
18046  *
18047  * an error occurred.
18048  *
18049  * Returns: an unsigned 32-bit/4-byte value read from the @stream or %0 if
18050  */
18051
18052
18053 /**
18054  * g_data_input_stream_read_uint64:
18055  * @stream: a given #GDataInputStream.
18056  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18057  * @error: #GError for error reporting.
18058  *
18059  * Reads an unsigned 64-bit/8-byte value from @stream.
18060  *
18061  * In order to get the correct byte order for this read operation,
18062  * see g_data_input_stream_get_byte_order().
18063  *
18064  * If @cancellable is not %NULL, then the operation can be cancelled by
18065  * triggering the cancellable object from another thread. If the operation
18066  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
18067  *
18068  * an error occurred.
18069  *
18070  * Returns: an unsigned 64-bit/8-byte read from @stream or %0 if
18071  */
18072
18073
18074 /**
18075  * g_data_input_stream_read_until:
18076  * @stream: a given #GDataInputStream.
18077  * @stop_chars: characters to terminate the read.
18078  * @length: (out): a #gsize to get the length of the data read in.
18079  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18080  * @error: #GError for error reporting.
18081  *
18082  * Reads a string from the data input stream, up to the first
18083  * occurrence of any of the stop characters.
18084  *
18085  * Note that, in contrast to g_data_input_stream_read_until_async(),
18086  * this function consumes the stop character that it finds.
18087  *
18088  * Don't use this function in new code.  Its functionality is
18089  * inconsistent with g_data_input_stream_read_until_async().  Both
18090  * functions will be marked as deprecated in a future release.  Use
18091  * g_data_input_stream_read_upto() instead, but note that that function
18092  * does not consume the stop character.
18093  *
18094  * before encountering any of the stop characters. Set @length to
18095  * a #gsize to get the length of the string. This function will
18096  * return %NULL on an error.
18097  *
18098  * Returns: (transfer full): a string with the data that was read
18099  */
18100
18101
18102 /**
18103  * g_data_input_stream_read_until_async:
18104  * @stream: a given #GDataInputStream.
18105  * @stop_chars: characters to terminate the read.
18106  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
18107  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18108  * @callback: (scope async): callback to call when the request is satisfied.
18109  * @user_data: (closure): the data to pass to callback function.
18110  *
18111  * The asynchronous version of g_data_input_stream_read_until().
18112  * It is an error to have two outstanding calls to this function.
18113  *
18114  * Note that, in contrast to g_data_input_stream_read_until(),
18115  * this function does not consume the stop character that it finds.  You
18116  * must read it for yourself.
18117  *
18118  * When the operation is finished, @callback will be called. You
18119  * can then call g_data_input_stream_read_until_finish() to get
18120  * the result of the operation.
18121  *
18122  * Don't use this function in new code.  Its functionality is
18123  * inconsistent with g_data_input_stream_read_until().  Both functions
18124  * will be marked as deprecated in a future release.  Use
18125  * g_data_input_stream_read_upto_async() instead.
18126  *
18127  * Since: 2.20
18128  */
18129
18130
18131 /**
18132  * g_data_input_stream_read_until_finish:
18133  * @stream: a given #GDataInputStream.
18134  * @result: the #GAsyncResult that was provided to the callback.
18135  * @length: (out): a #gsize to get the length of the data read in.
18136  * @error: #GError for error reporting.
18137  *
18138  * Finish an asynchronous call started by
18139  * g_data_input_stream_read_until_async().
18140  *
18141  *
18142  * before encountering any of the stop characters. Set @length to
18143  * a #gsize to get the length of the string. This function will
18144  * return %NULL on an error.
18145  *
18146  * Since: 2.20
18147  * Returns: (transfer full): a string with the data that was read
18148  */
18149
18150
18151 /**
18152  * g_data_input_stream_read_upto:
18153  * @stream: a #GDataInputStream
18154  * @stop_chars: characters to terminate the read
18155  * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
18156  * @length: (out): a #gsize to get the length of the data read in
18157  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
18158  * @error: #GError for error reporting
18159  *
18160  * Reads a string from the data input stream, up to the first
18161  * occurrence of any of the stop characters.
18162  *
18163  * In contrast to g_data_input_stream_read_until(), this function
18164  * does <emphasis>not</emphasis> consume the stop character. You have
18165  * to use g_data_input_stream_read_byte() to get it before calling
18166  * g_data_input_stream_read_upto() again.
18167  *
18168  * Note that @stop_chars may contain '\0' if @stop_chars_len is
18169  * specified.
18170  *
18171  * before encountering any of the stop characters. Set @length to
18172  * a #gsize to get the length of the string. This function will
18173  * return %NULL on an error
18174  *
18175  * Returns: (transfer full): a string with the data that was read
18176  * Since: 2.26
18177  */
18178
18179
18180 /**
18181  * g_data_input_stream_read_upto_async:
18182  * @stream: a #GDataInputStream
18183  * @stop_chars: characters to terminate the read
18184  * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
18185  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
18186  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
18187  * @callback: (scope async): callback to call when the request is satisfied
18188  * @user_data: (closure): the data to pass to callback function
18189  *
18190  * The asynchronous version of g_data_input_stream_read_upto().
18191  * It is an error to have two outstanding calls to this function.
18192  *
18193  * In contrast to g_data_input_stream_read_until(), this function
18194  * does <emphasis>not</emphasis> consume the stop character. You have
18195  * to use g_data_input_stream_read_byte() to get it before calling
18196  * g_data_input_stream_read_upto() again.
18197  *
18198  * Note that @stop_chars may contain '\0' if @stop_chars_len is
18199  * specified.
18200  *
18201  * When the operation is finished, @callback will be called. You
18202  * can then call g_data_input_stream_read_upto_finish() to get
18203  * the result of the operation.
18204  *
18205  * Since: 2.26
18206  */
18207
18208
18209 /**
18210  * g_data_input_stream_read_upto_finish:
18211  * @stream: a #GDataInputStream
18212  * @result: the #GAsyncResult that was provided to the callback
18213  * @length: (out): a #gsize to get the length of the data read in
18214  * @error: #GError for error reporting
18215  *
18216  * Finish an asynchronous call started by
18217  * g_data_input_stream_read_upto_async().
18218  *
18219  * Note that this function does <emphasis>not</emphasis> consume the
18220  * stop character. You have to use g_data_input_stream_read_byte() to
18221  * get it before calling g_data_input_stream_read_upto_async() again.
18222  *
18223  * before encountering any of the stop characters. Set @length to
18224  * a #gsize to get the length of the string. This function will
18225  * return %NULL on an error.
18226  *
18227  * Returns: (transfer full): a string with the data that was read
18228  * Since: 2.24
18229  */
18230
18231
18232 /**
18233  * g_data_input_stream_set_byte_order:
18234  * @stream: a given #GDataInputStream.
18235  * @order: a #GDataStreamByteOrder to set.
18236  *
18237  * This function sets the byte order for the given @stream. All subsequent
18238  * reads from the @stream will be read in the given @order.
18239  */
18240
18241
18242 /**
18243  * g_data_input_stream_set_newline_type:
18244  * @stream: a #GDataInputStream.
18245  * @type: the type of new line return as #GDataStreamNewlineType.
18246  *
18247  * Sets the newline type for the @stream.
18248  *
18249  * Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read
18250  * chunk ends in "CR" we must read an additional byte to know if this is "CR" or
18251  * "CR LF", and this might block if there is no more data availible.
18252  */
18253
18254
18255 /**
18256  * g_data_output_stream_get_byte_order:
18257  * @stream: a #GDataOutputStream.
18258  *
18259  * Gets the byte order for the stream.
18260  *
18261  * Returns: the #GDataStreamByteOrder for the @stream.
18262  */
18263
18264
18265 /**
18266  * g_data_output_stream_new:
18267  * @base_stream: a #GOutputStream.
18268  *
18269  * Creates a new data output stream for @base_stream.
18270  *
18271  * Returns: #GDataOutputStream.
18272  */
18273
18274
18275 /**
18276  * g_data_output_stream_put_byte:
18277  * @stream: a #GDataOutputStream.
18278  * @data: a #guchar.
18279  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18280  * @error: a #GError, %NULL to ignore.
18281  *
18282  * Puts a byte into the output stream.
18283  *
18284  * Returns: %TRUE if @data was successfully added to the @stream.
18285  */
18286
18287
18288 /**
18289  * g_data_output_stream_put_int16:
18290  * @stream: a #GDataOutputStream.
18291  * @data: a #gint16.
18292  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18293  * @error: a #GError, %NULL to ignore.
18294  *
18295  * Puts a signed 16-bit integer into the output stream.
18296  *
18297  * Returns: %TRUE if @data was successfully added to the @stream.
18298  */
18299
18300
18301 /**
18302  * g_data_output_stream_put_int32:
18303  * @stream: a #GDataOutputStream.
18304  * @data: a #gint32.
18305  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18306  * @error: a #GError, %NULL to ignore.
18307  *
18308  * Puts a signed 32-bit integer into the output stream.
18309  *
18310  * Returns: %TRUE if @data was successfully added to the @stream.
18311  */
18312
18313
18314 /**
18315  * g_data_output_stream_put_int64:
18316  * @stream: a #GDataOutputStream.
18317  * @data: a #gint64.
18318  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18319  * @error: a #GError, %NULL to ignore.
18320  *
18321  * Puts a signed 64-bit integer into the stream.
18322  *
18323  * Returns: %TRUE if @data was successfully added to the @stream.
18324  */
18325
18326
18327 /**
18328  * g_data_output_stream_put_string:
18329  * @stream: a #GDataOutputStream.
18330  * @str: a string.
18331  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18332  * @error: a #GError, %NULL to ignore.
18333  *
18334  * Puts a string into the output stream.
18335  *
18336  * Returns: %TRUE if @string was successfully added to the @stream.
18337  */
18338
18339
18340 /**
18341  * g_data_output_stream_put_uint16:
18342  * @stream: a #GDataOutputStream.
18343  * @data: a #guint16.
18344  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18345  * @error: a #GError, %NULL to ignore.
18346  *
18347  * Puts an unsigned 16-bit integer into the output stream.
18348  *
18349  * Returns: %TRUE if @data was successfully added to the @stream.
18350  */
18351
18352
18353 /**
18354  * g_data_output_stream_put_uint32:
18355  * @stream: a #GDataOutputStream.
18356  * @data: a #guint32.
18357  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18358  * @error: a #GError, %NULL to ignore.
18359  *
18360  * Puts an unsigned 32-bit integer into the stream.
18361  *
18362  * Returns: %TRUE if @data was successfully added to the @stream.
18363  */
18364
18365
18366 /**
18367  * g_data_output_stream_put_uint64:
18368  * @stream: a #GDataOutputStream.
18369  * @data: a #guint64.
18370  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18371  * @error: a #GError, %NULL to ignore.
18372  *
18373  * Puts an unsigned 64-bit integer into the stream.
18374  *
18375  * Returns: %TRUE if @data was successfully added to the @stream.
18376  */
18377
18378
18379 /**
18380  * g_data_output_stream_set_byte_order:
18381  * @stream: a #GDataOutputStream.
18382  * @order: a %GDataStreamByteOrder.
18383  *
18384  * Sets the byte order of the data output stream to @order.
18385  */
18386
18387
18388 /**
18389  * g_dbus_address_get_for_bus_sync:
18390  * @bus_type: A #GBusType.
18391  * @cancellable: A #GCancellable or %NULL.
18392  * @error: Return location for error or %NULL.
18393  *
18394  * Synchronously looks up the D-Bus address for the well-known message
18395  * bus instance specified by @bus_type. This may involve using various
18396  * platform specific mechanisms.
18397  *
18398  * Returns: A valid D-Bus address string for @bus_type or %NULL if @error is set.
18399  * Since: 2.26
18400  */
18401
18402
18403 /**
18404  * g_dbus_address_get_stream:
18405  * @address: A valid D-Bus address.
18406  * @cancellable: A #GCancellable or %NULL.
18407  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
18408  * @user_data: Data to pass to @callback.
18409  *
18410  * Asynchronously connects to an endpoint specified by @address and
18411  * sets up the connection so it is in a state to run the client-side
18412  * of the D-Bus authentication conversation.
18413  *
18414  * When the operation is finished, @callback will be invoked. You can
18415  * then call g_dbus_address_get_stream_finish() to get the result of
18416  * the operation.
18417  *
18418  * This is an asynchronous failable function. See
18419  * g_dbus_address_get_stream_sync() for the synchronous version.
18420  *
18421  * Since: 2.26
18422  */
18423
18424
18425 /**
18426  * g_dbus_address_get_stream_finish:
18427  * @res: A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().
18428  * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
18429  * @error: Return location for error or %NULL.
18430  *
18431  * Finishes an operation started with g_dbus_address_get_stream().
18432  *
18433  * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
18434  * Since: 2.26
18435  */
18436
18437
18438 /**
18439  * g_dbus_address_get_stream_sync:
18440  * @address: A valid D-Bus address.
18441  * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
18442  * @cancellable: A #GCancellable or %NULL.
18443  * @error: Return location for error or %NULL.
18444  *
18445  * Synchronously connects to an endpoint specified by @address and
18446  * sets up the connection so it is in a state to run the client-side
18447  * of the D-Bus authentication conversation.
18448  *
18449  * This is a synchronous failable function. See
18450  * g_dbus_address_get_stream() for the asynchronous version.
18451  *
18452  * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
18453  * Since: 2.26
18454  */
18455
18456
18457 /**
18458  * g_dbus_annotation_info_lookup:
18459  * @annotations: A %NULL-terminated array of annotations or %NULL.
18460  * @name: The name of the annotation to look up.
18461  *
18462  * Looks up the value of an annotation.
18463  *
18464  * This cost of this function is O(n) in number of annotations.
18465  *
18466  * Returns: The value or %NULL if not found. Do not free, it is owned by @annotations.
18467  * Since: 2.26
18468  */
18469
18470
18471 /**
18472  * g_dbus_annotation_info_ref:
18473  * @info: A #GDBusNodeInfo
18474  *
18475  * If @info is statically allocated does nothing. Otherwise increases
18476  * the reference count.
18477  *
18478  * Returns: The same @info.
18479  * Since: 2.26
18480  */
18481
18482
18483 /**
18484  * g_dbus_annotation_info_unref:
18485  * @info: A #GDBusAnnotationInfo.
18486  *
18487  * If @info is statically allocated, does nothing. Otherwise decreases
18488  * the reference count of @info. When its reference count drops to 0,
18489  * the memory used is freed.
18490  *
18491  * Since: 2.26
18492  */
18493
18494
18495 /**
18496  * g_dbus_arg_info_ref:
18497  * @info: A #GDBusArgInfo
18498  *
18499  * If @info is statically allocated does nothing. Otherwise increases
18500  * the reference count.
18501  *
18502  * Returns: The same @info.
18503  * Since: 2.26
18504  */
18505
18506
18507 /**
18508  * g_dbus_arg_info_unref:
18509  * @info: A #GDBusArgInfo.
18510  *
18511  * If @info is statically allocated, does nothing. Otherwise decreases
18512  * the reference count of @info. When its reference count drops to 0,
18513  * the memory used is freed.
18514  *
18515  * Since: 2.26
18516  */
18517
18518
18519 /**
18520  * g_dbus_auth_observer_authorize_authenticated_peer:
18521  * @observer: A #GDBusAuthObserver.
18522  * @stream: A #GIOStream for the #GDBusConnection.
18523  * @credentials: Credentials received from the peer or %NULL.
18524  *
18525  * Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.
18526  *
18527  * Returns: %TRUE if the peer is authorized, %FALSE if not.
18528  * Since: 2.26
18529  */
18530
18531
18532 /**
18533  * g_dbus_auth_observer_new:
18534  *
18535  * Creates a new #GDBusAuthObserver object.
18536  *
18537  * Returns: A #GDBusAuthObserver. Free with g_object_unref().
18538  * Since: 2.26
18539  */
18540
18541
18542 /**
18543  * g_dbus_connection_add_filter:
18544  * @connection: A #GDBusConnection.
18545  * @filter_function: A filter function.
18546  * @user_data: User data to pass to @filter_function.
18547  * @user_data_free_func: Function to free @user_data with when filter is removed or %NULL.
18548  *
18549  * Adds a message filter. Filters are handlers that are run on all
18550  * incoming and outgoing messages, prior to standard dispatch. Filters
18551  * are run in the order that they were added.  The same handler can be
18552  * added as a filter more than once, in which case it will be run more
18553  * than once.  Filters added during a filter callback won't be run on
18554  * the message being processed. Filter functions are allowed to modify
18555  * and even drop messages.
18556  *
18557  * Note that filters are run in a dedicated message handling thread so
18558  * they can't block and, generally, can't do anything but signal a
18559  * worker thread. Also note that filters are rarely needed - use API
18560  * such as g_dbus_connection_send_message_with_reply(),
18561  * g_dbus_connection_signal_subscribe() or g_dbus_connection_call() instead.
18562  *
18563  * If a filter consumes an incoming message the message is not
18564  * dispatched anywhere else - not even the standard dispatch machinery
18565  * (that API such as g_dbus_connection_signal_subscribe() and
18566  * g_dbus_connection_send_message_with_reply() relies on) will see the
18567  * message. Similary, if a filter consumes an outgoing message, the
18568  * message will not be sent to the other peer.
18569  *
18570  * g_dbus_connection_remove_filter().
18571  *
18572  * Returns: A filter identifier that can be used with
18573  * Since: 2.26
18574  */
18575
18576
18577 /**
18578  * g_dbus_connection_call:
18579  * @connection: A #GDBusConnection.
18580  * @bus_name: (allow-none): A unique or well-known bus name or %NULL if @connection is not a message bus connection.
18581  * @object_path: Path of remote object.
18582  * @interface_name: D-Bus interface to invoke method on.
18583  * @method_name: The name of the method to invoke.
18584  * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
18585  * @reply_type: (allow-none): The expected type of the reply, or %NULL.
18586  * @flags: Flags from the #GDBusCallFlags enumeration.
18587  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
18588  * @cancellable: A #GCancellable or %NULL.
18589  * @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.
18590  * @user_data: The data to pass to @callback.
18591  *
18592  * Asynchronously invokes the @method_name method on the
18593  * @interface_name D-Bus interface on the remote object at
18594  * @object_path owned by @bus_name.
18595  *
18596  * If @connection is closed then the operation will fail with
18597  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
18598  * fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value
18599  * not compatible with the D-Bus protocol, the operation fails with
18600  * %G_IO_ERROR_INVALID_ARGUMENT.
18601  *
18602  * If @reply_type is non-%NULL then the reply will be checked for having this type and an
18603  * error will be raised if it does not match.  Said another way, if you give a @reply_type
18604  * then any non-%NULL return value will be of this type.
18605  *
18606  * If the @parameters #GVariant is floating, it is consumed. This allows
18607  * convenient 'inline' use of g_variant_new(), e.g.:
18608  * |[
18609  * g_dbus_connection_call (connection,
18610  * "org.freedesktop.StringThings",
18611  * "/org/freedesktop/StringThings",
18612  * "org.freedesktop.StringThings",
18613  * "TwoStrings",
18614  * g_variant_new ("(ss)",
18615  * "Thing One",
18616  * "Thing Two"),
18617  * NULL,
18618  * G_DBUS_CALL_FLAGS_NONE,
18619  * -1,
18620  * NULL,
18621  * (GAsyncReadyCallback) two_strings_done,
18622  * NULL);
18623  * ]|
18624  *
18625  * This is an asynchronous method. When the operation is finished, @callback will be invoked
18626  * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
18627  * of the thread you are calling this method from. You can then call
18628  * g_dbus_connection_call_finish() to get the result of the operation.
18629  * See g_dbus_connection_call_sync() for the synchronous version of this
18630  * function.
18631  *
18632  * Since: 2.26
18633  */
18634
18635
18636 /**
18637  * g_dbus_connection_call_finish:
18638  * @connection: A #GDBusConnection.
18639  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call().
18640  * @error: Return location for error or %NULL.
18641  *
18642  * Finishes an operation started with g_dbus_connection_call().
18643  *
18644  * return values. Free with g_variant_unref().
18645  *
18646  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
18647  * Since: 2.26
18648  */
18649
18650
18651 /**
18652  * g_dbus_connection_call_sync:
18653  * @connection: A #GDBusConnection.
18654  * @bus_name: A unique or well-known bus name.
18655  * @object_path: Path of remote object.
18656  * @interface_name: D-Bus interface to invoke method on.
18657  * @method_name: The name of the method to invoke.
18658  * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
18659  * @reply_type: (allow-none): The expected type of the reply, or %NULL.
18660  * @flags: Flags from the #GDBusCallFlags enumeration.
18661  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
18662  * @cancellable: A #GCancellable or %NULL.
18663  * @error: Return location for error or %NULL.
18664  *
18665  * Synchronously invokes the @method_name method on the
18666  * @interface_name D-Bus interface on the remote object at
18667  * @object_path owned by @bus_name.
18668  *
18669  * If @connection is closed then the operation will fail with
18670  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the
18671  * operation will fail with %G_IO_ERROR_CANCELLED. If @parameters
18672  * contains a value not compatible with the D-Bus protocol, the operation
18673  * fails with %G_IO_ERROR_INVALID_ARGUMENT.
18674  * If @reply_type is non-%NULL then the reply will be checked for having
18675  * this type and an error will be raised if it does not match.  Said
18676  * another way, if you give a @reply_type then any non-%NULL return
18677  * value will be of this type.
18678  *
18679  * If the @parameters #GVariant is floating, it is consumed.
18680  * This allows convenient 'inline' use of g_variant_new(), e.g.:
18681  * |[
18682  * g_dbus_connection_call_sync (connection,
18683  * "org.freedesktop.StringThings",
18684  * "/org/freedesktop/StringThings",
18685  * "org.freedesktop.StringThings",
18686  * "TwoStrings",
18687  * g_variant_new ("(ss)",
18688  * "Thing One",
18689  * "Thing Two"),
18690  * NULL,
18691  * G_DBUS_CALL_FLAGS_NONE,
18692  * -1,
18693  * NULL,
18694  * &amp;error);
18695  * ]|
18696  *
18697  * The calling thread is blocked until a reply is received. See
18698  * g_dbus_connection_call() for the asynchronous version of
18699  * this method.
18700  *
18701  * return values. Free with g_variant_unref().
18702  *
18703  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
18704  * Since: 2.26
18705  */
18706
18707
18708 /**
18709  * g_dbus_connection_call_with_unix_fd_list:
18710  * @connection: A #GDBusConnection.
18711  * @bus_name: (allow-none): A unique or well-known bus name or %NULL if @connection is not a message bus connection.
18712  * @object_path: Path of remote object.
18713  * @interface_name: D-Bus interface to invoke method on.
18714  * @method_name: The name of the method to invoke.
18715  * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
18716  * @reply_type: (allow-none): The expected type of the reply, or %NULL.
18717  * @flags: Flags from the #GDBusCallFlags enumeration.
18718  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
18719  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
18720  * @cancellable: A #GCancellable or %NULL.
18721  * @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.
18722  * @user_data: The data to pass to @callback.
18723  *
18724  * Like g_dbus_connection_call() but also takes a #GUnixFDList object.
18725  *
18726  * This method is only available on UNIX.
18727  *
18728  * Since: 2.30
18729  */
18730
18731
18732 /**
18733  * g_dbus_connection_call_with_unix_fd_list_finish:
18734  * @connection: A #GDBusConnection.
18735  * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
18736  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call_with_unix_fd_list().
18737  * @error: Return location for error or %NULL.
18738  *
18739  * Finishes an operation started with g_dbus_connection_call_with_unix_fd_list().
18740  *
18741  * return values. Free with g_variant_unref().
18742  *
18743  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
18744  * Since: 2.30
18745  */
18746
18747
18748 /**
18749  * g_dbus_connection_call_with_unix_fd_list_sync:
18750  * @connection: A #GDBusConnection.
18751  * @bus_name: A unique or well-known bus name.
18752  * @object_path: Path of remote object.
18753  * @interface_name: D-Bus interface to invoke method on.
18754  * @method_name: The name of the method to invoke.
18755  * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
18756  * @reply_type: (allow-none): The expected type of the reply, or %NULL.
18757  * @flags: Flags from the #GDBusCallFlags enumeration.
18758  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
18759  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
18760  * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
18761  * @cancellable: A #GCancellable or %NULL.
18762  * @error: Return location for error or %NULL.
18763  *
18764  * Like g_dbus_connection_call_sync() but also takes and returns #GUnixFDList objects.
18765  *
18766  * This method is only available on UNIX.
18767  *
18768  * return values. Free with g_variant_unref().
18769  *
18770  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
18771  * Since: 2.30
18772  */
18773
18774
18775 /**
18776  * g_dbus_connection_close:
18777  * @connection: A #GDBusConnection.
18778  * @cancellable: A #GCancellable or %NULL.
18779  * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
18780  * @user_data: The data to pass to @callback.
18781  *
18782  * Closes @connection. Note that this never causes the process to
18783  * exit (this might only happen if the other end of a shared message
18784  * bus connection disconnects, see #GDBusConnection:exit-on-close).
18785  *
18786  * Once the connection is closed, operations such as sending a message
18787  * will return with the error %G_IO_ERROR_CLOSED. Closing a connection
18788  * will not automatically flush the connection so queued messages may
18789  * be lost. Use g_dbus_connection_flush() if you need such guarantees.
18790  *
18791  * If @connection is already closed, this method fails with
18792  * %G_IO_ERROR_CLOSED.
18793  *
18794  * When @connection has been closed, the #GDBusConnection::closed
18795  * signal is emitted in the <link
18796  * linkend="g-main-context-push-thread-default">thread-default main
18797  * loop</link> of the thread that @connection was constructed in.
18798  *
18799  * This is an asynchronous method. When the operation is finished,
18800  * @callback will be invoked in the <link
18801  * linkend="g-main-context-push-thread-default">thread-default main
18802  * loop</link> of the thread you are calling this method from. You can
18803  * then call g_dbus_connection_close_finish() to get the result of the
18804  * operation.  See g_dbus_connection_close_sync() for the synchronous
18805  * version.
18806  *
18807  * Since: 2.26
18808  */
18809
18810
18811 /**
18812  * g_dbus_connection_close_finish:
18813  * @connection: A #GDBusConnection.
18814  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_close().
18815  * @error: Return location for error or %NULL.
18816  *
18817  * Finishes an operation started with g_dbus_connection_close().
18818  *
18819  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
18820  * Since: 2.26
18821  */
18822
18823
18824 /**
18825  * g_dbus_connection_close_sync:
18826  * @connection: A #GDBusConnection.
18827  * @cancellable: A #GCancellable or %NULL.
18828  * @error: Return location for error or %NULL.
18829  *
18830  * Synchronously closees @connection. The calling thread is blocked
18831  * until this is done. See g_dbus_connection_close() for the
18832  * asynchronous version of this method and more details about what it
18833  * does.
18834  *
18835  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
18836  * Since: 2.26
18837  */
18838
18839
18840 /**
18841  * g_dbus_connection_emit_signal:
18842  * @connection: A #GDBusConnection.
18843  * @destination_bus_name: (allow-none): The unique bus name for the destination for the signal or %NULL to emit to all listeners.
18844  * @object_path: Path of remote object.
18845  * @interface_name: D-Bus interface to emit a signal on.
18846  * @signal_name: The name of the signal to emit.
18847  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
18848  * @error: Return location for error or %NULL.
18849  *
18850  * Emits a signal.
18851  *
18852  * If the parameters GVariant is floating, it is consumed.
18853  *
18854  * This can only fail if @parameters is not compatible with the D-Bus protocol.
18855  *
18856  * Returns: %TRUE unless @error is set.
18857  * Since: 2.26
18858  */
18859
18860
18861 /**
18862  * g_dbus_connection_flush:
18863  * @connection: A #GDBusConnection.
18864  * @cancellable: A #GCancellable or %NULL.
18865  * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
18866  * @user_data: The data to pass to @callback.
18867  *
18868  * Asynchronously flushes @connection, that is, writes all queued
18869  * outgoing message to the transport and then flushes the transport
18870  * (using g_output_stream_flush_async()). This is useful in programs
18871  * that wants to emit a D-Bus signal and then exit
18872  * immediately. Without flushing the connection, there is no guarantee
18873  * that the message has been sent to the networking buffers in the OS
18874  * kernel.
18875  *
18876  * This is an asynchronous method. When the operation is finished,
18877  * @callback will be invoked in the <link
18878  * linkend="g-main-context-push-thread-default">thread-default main
18879  * loop</link> of the thread you are calling this method from. You can
18880  * then call g_dbus_connection_flush_finish() to get the result of the
18881  * operation.  See g_dbus_connection_flush_sync() for the synchronous
18882  * version.
18883  *
18884  * Since: 2.26
18885  */
18886
18887
18888 /**
18889  * g_dbus_connection_flush_finish:
18890  * @connection: A #GDBusConnection.
18891  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_flush().
18892  * @error: Return location for error or %NULL.
18893  *
18894  * Finishes an operation started with g_dbus_connection_flush().
18895  *
18896  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
18897  * Since: 2.26
18898  */
18899
18900
18901 /**
18902  * g_dbus_connection_flush_sync:
18903  * @connection: A #GDBusConnection.
18904  * @cancellable: A #GCancellable or %NULL.
18905  * @error: Return location for error or %NULL.
18906  *
18907  * Synchronously flushes @connection. The calling thread is blocked
18908  * until this is done. See g_dbus_connection_flush() for the
18909  * asynchronous version of this method and more details about what it
18910  * does.
18911  *
18912  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
18913  * Since: 2.26
18914  */
18915
18916
18917 /**
18918  * g_dbus_connection_get_capabilities:
18919  * @connection: A #GDBusConnection.
18920  *
18921  * Gets the capabilities negotiated with the remote peer
18922  *
18923  * Returns: Zero or more flags from the #GDBusCapabilityFlags enumeration.
18924  * Since: 2.26
18925  */
18926
18927
18928 /**
18929  * g_dbus_connection_get_exit_on_close:
18930  * @connection: A #GDBusConnection.
18931  *
18932  * Gets whether the process is terminated when @connection is
18933  * closed by the remote peer. See
18934  * #GDBusConnection:exit-on-close for more details.
18935  *
18936  * closed by the remote peer.
18937  *
18938  * Returns: Whether the process is terminated when @connection is
18939  * Since: 2.26
18940  */
18941
18942
18943 /**
18944  * g_dbus_connection_get_guid:
18945  * @connection: A #GDBusConnection.
18946  *
18947  * The GUID of the peer performing the role of server when
18948  * authenticating. See #GDBusConnection:guid for more details.
18949  *
18950  * @connection.
18951  *
18952  * Returns: The GUID. Do not free this string, it is owned by
18953  * Since: 2.26
18954  */
18955
18956
18957 /**
18958  * g_dbus_connection_get_peer_credentials:
18959  * @connection: A #GDBusConnection.
18960  *
18961  * Gets the credentials of the authenticated peer. This will always
18962  * return %NULL unless @connection acted as a server
18963  * (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed)
18964  * when set up and the client passed credentials as part of the
18965  * authentication process.
18966  *
18967  * In a message bus setup, the message bus is always the server and
18968  * each application is a client. So this method will always return
18969  * %NULL for message bus clients.
18970  *
18971  * this object, it is owned by @connection.
18972  *
18973  * Returns: (transfer none): A #GCredentials or %NULL if not available. Do not free
18974  * Since: 2.26
18975  */
18976
18977
18978 /**
18979  * g_dbus_connection_get_stream:
18980  * @connection: a #GDBusConnection
18981  *
18982  * Gets the underlying stream used for IO.
18983  *
18984  * Returns: (transfer none): the stream used for IO
18985  * Since: 2.26
18986  */
18987
18988
18989 /**
18990  * g_dbus_connection_get_unique_name:
18991  * @connection: A #GDBusConnection.
18992  *
18993  * Gets the unique name of @connection as assigned by the message
18994  * bus. This can also be used to figure out if @connection is a
18995  * message bus connection.
18996  *
18997  * bus connection. Do not free this string, it is owned by
18998  * @connection.
18999  *
19000  * Returns: The unique name or %NULL if @connection is not a message
19001  * Since: 2.26
19002  */
19003
19004
19005 /**
19006  * g_dbus_connection_is_closed:
19007  * @connection: A #GDBusConnection.
19008  *
19009  * Gets whether @connection is closed.
19010  *
19011  * Returns: %TRUE if the connection is closed, %FALSE otherwise.
19012  * Since: 2.26
19013  */
19014
19015
19016 /**
19017  * g_dbus_connection_new:
19018  * @stream: A #GIOStream.
19019  * @guid: (allow-none): The GUID to use if a authenticating as a server or %NULL.
19020  * @flags: Flags describing how to make the connection.
19021  * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
19022  * @cancellable: A #GCancellable or %NULL.
19023  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
19024  * @user_data: The data to pass to @callback.
19025  *
19026  * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
19027  * with the end represented by @stream.
19028  *
19029  * If @stream is a #GSocketConnection, then the corresponding #GSocket
19030  * will be put into non-blocking mode.
19031  *
19032  * If @observer is not %NULL it may be used to control the
19033  * authentication process.
19034  *
19035  * When the operation is finished, @callback will be invoked. You can
19036  * then call g_dbus_connection_new_finish() to get the result of the
19037  * operation.
19038  *
19039  * This is a asynchronous failable constructor. See
19040  * g_dbus_connection_new_sync() for the synchronous
19041  * version.
19042  *
19043  * Since: 2.26
19044  */
19045
19046
19047 /**
19048  * g_dbus_connection_new_finish:
19049  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
19050  * @error: Return location for error or %NULL.
19051  *
19052  * Finishes an operation started with g_dbus_connection_new().
19053  *
19054  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
19055  * Since: 2.26
19056  */
19057
19058
19059 /**
19060  * g_dbus_connection_new_for_address:
19061  * @address: A D-Bus address.
19062  * @flags: Flags describing how to make the connection.
19063  * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
19064  * @cancellable: A #GCancellable or %NULL.
19065  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
19066  * @user_data: The data to pass to @callback.
19067  *
19068  * Asynchronously connects and sets up a D-Bus client connection for
19069  * exchanging D-Bus messages with an endpoint specified by @address
19070  * which must be in the D-Bus address format.
19071  *
19072  * This constructor can only be used to initiate client-side
19073  * connections - use g_dbus_connection_new() if you need to act as the
19074  * server. In particular, @flags cannot contain the
19075  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
19076  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
19077  *
19078  * When the operation is finished, @callback will be invoked. You can
19079  * then call g_dbus_connection_new_finish() to get the result of the
19080  * operation.
19081  *
19082  * If @observer is not %NULL it may be used to control the
19083  * authentication process.
19084  *
19085  * This is a asynchronous failable constructor. See
19086  * g_dbus_connection_new_for_address_sync() for the synchronous
19087  * version.
19088  *
19089  * Since: 2.26
19090  */
19091
19092
19093 /**
19094  * g_dbus_connection_new_for_address_finish:
19095  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
19096  * @error: Return location for error or %NULL.
19097  *
19098  * Finishes an operation started with g_dbus_connection_new_for_address().
19099  *
19100  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
19101  * Since: 2.26
19102  */
19103
19104
19105 /**
19106  * g_dbus_connection_new_for_address_sync:
19107  * @address: A D-Bus address.
19108  * @flags: Flags describing how to make the connection.
19109  * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
19110  * @cancellable: A #GCancellable or %NULL.
19111  * @error: Return location for error or %NULL.
19112  *
19113  * Synchronously connects and sets up a D-Bus client connection for
19114  * exchanging D-Bus messages with an endpoint specified by @address
19115  * which must be in the D-Bus address format.
19116  *
19117  * This constructor can only be used to initiate client-side
19118  * connections - use g_dbus_connection_new_sync() if you need to act
19119  * as the server. In particular, @flags cannot contain the
19120  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
19121  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
19122  *
19123  * This is a synchronous failable constructor. See
19124  * g_dbus_connection_new_for_address() for the asynchronous version.
19125  *
19126  * If @observer is not %NULL it may be used to control the
19127  * authentication process.
19128  *
19129  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
19130  * Since: 2.26
19131  */
19132
19133
19134 /**
19135  * g_dbus_connection_new_sync:
19136  * @stream: A #GIOStream.
19137  * @guid: (allow-none): The GUID to use if a authenticating as a server or %NULL.
19138  * @flags: Flags describing how to make the connection.
19139  * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
19140  * @cancellable: A #GCancellable or %NULL.
19141  * @error: Return location for error or %NULL.
19142  *
19143  * Synchronously sets up a D-Bus connection for exchanging D-Bus messages
19144  * with the end represented by @stream.
19145  *
19146  * If @stream is a #GSocketConnection, then the corresponding #GSocket
19147  * will be put into non-blocking mode.
19148  *
19149  * If @observer is not %NULL it may be used to control the
19150  * authentication process.
19151  *
19152  * This is a synchronous failable constructor. See
19153  * g_dbus_connection_new() for the asynchronous version.
19154  *
19155  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
19156  * Since: 2.26
19157  */
19158
19159
19160 /**
19161  * g_dbus_connection_register_object:
19162  * @connection: A #GDBusConnection.
19163  * @object_path: The object path to register at.
19164  * @interface_info: Introspection data for the interface.
19165  * @vtable: (allow-none): A #GDBusInterfaceVTable to call into or %NULL.
19166  * @user_data: (allow-none): Data to pass to functions in @vtable.
19167  * @user_data_free_func: Function to call when the object path is unregistered.
19168  * @error: Return location for error or %NULL.
19169  *
19170  * Registers callbacks for exported objects at @object_path with the
19171  * D-Bus interface that is described in @interface_info.
19172  *
19173  * Calls to functions in @vtable (and @user_data_free_func) will
19174  * happen in the <link linkend="g-main-context-push-thread-default">thread-default main
19175  * loop</link> of the thread you are calling this method from.
19176  *
19177  * Note that all #GVariant values passed to functions in @vtable will match
19178  * the signature given in @interface_info - if a remote caller passes
19179  * incorrect values, the <literal>org.freedesktop.DBus.Error.InvalidArgs</literal>
19180  * is returned to the remote caller.
19181  *
19182  * Additionally, if the remote caller attempts to invoke methods or
19183  * access properties not mentioned in @interface_info the
19184  * <literal>org.freedesktop.DBus.Error.UnknownMethod</literal> resp.
19185  * <literal>org.freedesktop.DBus.Error.InvalidArgs</literal> errors
19186  * are returned to the caller.
19187  *
19188  * It is considered a programming error if the
19189  * #GDBusInterfaceGetPropertyFunc function in @vtable returns a
19190  * #GVariant of incorrect type.
19191  *
19192  * If an existing callback is already registered at @object_path and
19193  * @interface_name, then @error is set to #G_IO_ERROR_EXISTS.
19194  *
19195  * GDBus automatically implements the standard D-Bus interfaces
19196  * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
19197  * and org.freedesktop.Peer, so you don't have to implement those for
19198  * the objects you export. You <emphasis>can</emphasis> implement
19199  * org.freedesktop.DBus.Properties yourself, e.g. to handle getting
19200  * and setting of properties asynchronously.
19201  *
19202  * Note that the reference count on @interface_info will be
19203  * incremented by 1 (unless allocated statically, e.g. if the
19204  * reference count is -1, see g_dbus_interface_info_ref()) for as long
19205  * as the object is exported. Also note that @vtable will be copied.
19206  *
19207  * See <xref linkend="gdbus-server"/> for an example of how to use this method.
19208  *
19209  * that can be used with g_dbus_connection_unregister_object() .
19210  *
19211  * Returns: 0 if @error is set, otherwise a registration id (never 0)
19212  * Since: 2.26
19213  */
19214
19215
19216 /**
19217  * g_dbus_connection_register_subtree:
19218  * @connection: A #GDBusConnection.
19219  * @object_path: The object path to register the subtree at.
19220  * @vtable: A #GDBusSubtreeVTable to enumerate, introspect and dispatch nodes in the subtree.
19221  * @flags: Flags used to fine tune the behavior of the subtree.
19222  * @user_data: Data to pass to functions in @vtable.
19223  * @user_data_free_func: Function to call when the subtree is unregistered.
19224  * @error: Return location for error or %NULL.
19225  *
19226  * Registers a whole subtree of <quote>dynamic</quote> objects.
19227  *
19228  * The @enumerate and @introspection functions in @vtable are used to
19229  * convey, to remote callers, what nodes exist in the subtree rooted
19230  * by @object_path.
19231  *
19232  * When handling remote calls into any node in the subtree, first the
19233  * @enumerate function is used to check if the node exists. If the node exists
19234  * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set
19235  * the @introspection function is used to check if the node supports the
19236  * requested method. If so, the @dispatch function is used to determine
19237  * where to dispatch the call. The collected #GDBusInterfaceVTable and
19238  * #gpointer will be used to call into the interface vtable for processing
19239  * the request.
19240  *
19241  * All calls into user-provided code will be invoked in the <link
19242  * linkend="g-main-context-push-thread-default">thread-default main
19243  * loop</link> of the thread you are calling this method from.
19244  *
19245  * If an existing subtree is already registered at @object_path or
19246  * then @error is set to #G_IO_ERROR_EXISTS.
19247  *
19248  * Note that it is valid to register regular objects (using
19249  * g_dbus_connection_register_object()) in a subtree registered with
19250  * g_dbus_connection_register_subtree() - if so, the subtree handler
19251  * is tried as the last resort. One way to think about a subtree
19252  * handler is to consider it a <quote>fallback handler</quote>
19253  * for object paths not registered via g_dbus_connection_register_object()
19254  * or other bindings.
19255  *
19256  * Note that @vtable will be copied so you cannot change it after
19257  * registration.
19258  *
19259  * See <xref linkend="gdbus-subtree-server"/> for an example of how to use this method.
19260  *
19261  * that can be used with g_dbus_connection_unregister_subtree() .
19262  *
19263  * Returns: 0 if @error is set, otherwise a subtree registration id (never 0)
19264  * Since: 2.26
19265  */
19266
19267
19268 /**
19269  * g_dbus_connection_remove_filter:
19270  * @connection: a #GDBusConnection
19271  * @filter_id: an identifier obtained from g_dbus_connection_add_filter()
19272  *
19273  * Removes a filter.
19274  *
19275  * Since: 2.26
19276  */
19277
19278
19279 /**
19280  * g_dbus_connection_send_message:
19281  * @connection: A #GDBusConnection.
19282  * @message: A #GDBusMessage
19283  * @flags: Flags affecting how the message is sent.
19284  * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
19285  * @error: Return location for error or %NULL.
19286  *
19287  * Asynchronously sends @message to the peer represented by @connection.
19288  *
19289  * Unless @flags contain the
19290  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
19291  * will be assigned by @connection and set on @message via
19292  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
19293  * serial number used will be written to this location prior to
19294  * submitting the message to the underlying transport.
19295  *
19296  * If @connection is closed then the operation will fail with
19297  * %G_IO_ERROR_CLOSED. If @message is not well-formed,
19298  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
19299  *
19300  * See <xref linkend="gdbus-server"/> and <xref
19301  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
19302  * low-level API to send and receive UNIX file descriptors.
19303  *
19304  * Note that @message must be unlocked, unless @flags contain the
19305  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
19306  *
19307  * transmission, %FALSE if @error is set.
19308  *
19309  * Returns: %TRUE if the message was well-formed and queued for
19310  * Since: 2.26
19311  */
19312
19313
19314 /**
19315  * g_dbus_connection_send_message_with_reply:
19316  * @connection: A #GDBusConnection.
19317  * @message: A #GDBusMessage.
19318  * @flags: Flags affecting how the message is sent.
19319  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
19320  * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
19321  * @cancellable: A #GCancellable or %NULL.
19322  * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
19323  * @user_data: The data to pass to @callback.
19324  *
19325  * Asynchronously sends @message to the peer represented by @connection.
19326  *
19327  * Unless @flags contain the
19328  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
19329  * will be assigned by @connection and set on @message via
19330  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
19331  * serial number used will be written to this location prior to
19332  * submitting the message to the underlying transport.
19333  *
19334  * If @connection is closed then the operation will fail with
19335  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
19336  * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
19337  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
19338  *
19339  * This is an asynchronous method. When the operation is finished, @callback will be invoked
19340  * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
19341  * of the thread you are calling this method from. You can then call
19342  * g_dbus_connection_send_message_with_reply_finish() to get the result of the operation.
19343  * See g_dbus_connection_send_message_with_reply_sync() for the synchronous version.
19344  *
19345  * Note that @message must be unlocked, unless @flags contain the
19346  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
19347  *
19348  * See <xref linkend="gdbus-server"/> and <xref
19349  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
19350  * low-level API to send and receive UNIX file descriptors.
19351  *
19352  * Since: 2.26
19353  */
19354
19355
19356 /**
19357  * g_dbus_connection_send_message_with_reply_finish:
19358  * @connection: a #GDBusConnection
19359  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_send_message_with_reply().
19360  * @error: Return location for error or %NULL.
19361  *
19362  * Finishes an operation started with g_dbus_connection_send_message_with_reply().
19363  *
19364  * Note that @error is only set if a local in-process error
19365  * occured. That is to say that the returned #GDBusMessage object may
19366  * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
19367  * g_dbus_message_to_gerror() to transcode this to a #GError.
19368  *
19369  * See <xref linkend="gdbus-server"/> and <xref
19370  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
19371  * low-level API to send and receive UNIX file descriptors.
19372  *
19373  * Returns: (transfer full): A locked #GDBusMessage or %NULL if @error is set.
19374  * Since: 2.26
19375  */
19376
19377
19378 /**
19379  * g_dbus_connection_send_message_with_reply_sync:
19380  * @connection: A #GDBusConnection.
19381  * @message: A #GDBusMessage.
19382  * @flags: Flags affecting how the message is sent.
19383  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
19384  * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
19385  * @cancellable: A #GCancellable or %NULL.
19386  * @error: Return location for error or %NULL.
19387  *
19388  * Synchronously sends @message to the peer represented by @connection
19389  * and blocks the calling thread until a reply is received or the
19390  * timeout is reached. See g_dbus_connection_send_message_with_reply()
19391  * for the asynchronous version of this method.
19392  *
19393  * Unless @flags contain the
19394  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
19395  * will be assigned by @connection and set on @message via
19396  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
19397  * serial number used will be written to this location prior to
19398  * submitting the message to the underlying transport.
19399  *
19400  * If @connection is closed then the operation will fail with
19401  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
19402  * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
19403  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
19404  *
19405  * Note that @error is only set if a local in-process error
19406  * occured. That is to say that the returned #GDBusMessage object may
19407  * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
19408  * g_dbus_message_to_gerror() to transcode this to a #GError.
19409  *
19410  * See <xref linkend="gdbus-server"/> and <xref
19411  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
19412  * low-level API to send and receive UNIX file descriptors.
19413  *
19414  * Note that @message must be unlocked, unless @flags contain the
19415  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
19416  *
19417  * Returns: (transfer full): A locked #GDBusMessage that is the reply to @message or %NULL if @error is set.
19418  * Since: 2.26
19419  */
19420
19421
19422 /**
19423  * g_dbus_connection_set_exit_on_close:
19424  * @connection: A #GDBusConnection.
19425  * @exit_on_close: Whether the process should be terminated when @connection is closed by the remote peer.
19426  *
19427  * Sets whether the process should be terminated when @connection is
19428  * closed by the remote peer. See #GDBusConnection:exit-on-close for
19429  * more details.
19430  *
19431  * Note that this function should be used with care. Most modern UNIX
19432  * desktops tie the notion of a user session the session bus, and expect
19433  * all of a users applications to quit when their bus connection goes away.
19434  * If you are setting @exit_on_close to %FALSE for the shared session
19435  * bus connection, you should make sure that your application exits
19436  * when the user session ends.
19437  *
19438  * Since: 2.26
19439  */
19440
19441
19442 /**
19443  * g_dbus_connection_signal_subscribe:
19444  * @connection: A #GDBusConnection.
19445  * @sender: (allow-none): Sender name to match on (unique or well-known name) or %NULL to listen from all senders.
19446  * @interface_name: (allow-none): D-Bus interface name to match on or %NULL to match on all interfaces.
19447  * @member: (allow-none): D-Bus signal name to match on or %NULL to match on all signals.
19448  * @object_path: (allow-none): Object path to match on or %NULL to match on all object paths.
19449  * @arg0: (allow-none): Contents of first string argument to match on or %NULL to match on all kinds of arguments.
19450  * @flags: Flags describing how to subscribe to the signal (currently unused).
19451  * @callback: Callback to invoke when there is a signal matching the requested data.
19452  * @user_data: User data to pass to @callback.
19453  * @user_data_free_func: (allow-none): Function to free @user_data with when subscription is removed or %NULL.
19454  *
19455  * Subscribes to signals on @connection and invokes @callback with a
19456  * whenever the signal is received. Note that @callback
19457  * will be invoked in the <link
19458  * linkend="g-main-context-push-thread-default">thread-default main
19459  * loop</link> of the thread you are calling this method from.
19460  *
19461  * If @connection is not a message bus connection, @sender must be
19462  * %NULL.
19463  *
19464  * If @sender is a well-known name note that @callback is invoked with
19465  * the unique name for the owner of @sender, not the well-known name
19466  * as one would expect. This is because the message bus rewrites the
19467  * name. As such, to avoid certain race conditions, users should be
19468  * tracking the name owner of the well-known name and use that when
19469  * processing the received signal.
19470  *
19471  * Returns: A subscription identifier that can be used with g_dbus_connection_signal_unsubscribe().
19472  * Since: 2.26
19473  */
19474
19475
19476 /**
19477  * g_dbus_connection_signal_unsubscribe:
19478  * @connection: A #GDBusConnection.
19479  * @subscription_id: A subscription id obtained from g_dbus_connection_signal_subscribe().
19480  *
19481  * Unsubscribes from signals.
19482  *
19483  * Since: 2.26
19484  */
19485
19486
19487 /**
19488  * g_dbus_connection_start_message_processing:
19489  * @connection: A #GDBusConnection.
19490  *
19491  * If @connection was created with
19492  * %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method
19493  * starts processing messages. Does nothing on if @connection wasn't
19494  * created with this flag or if the method has already been called.
19495  *
19496  * Since: 2.26
19497  */
19498
19499
19500 /**
19501  * g_dbus_connection_unregister_object:
19502  * @connection: A #GDBusConnection.
19503  * @registration_id: A registration id obtained from g_dbus_connection_register_object().
19504  *
19505  * Unregisters an object.
19506  *
19507  * Returns: %TRUE if the object was unregistered, %FALSE otherwise.
19508  * Since: 2.26
19509  */
19510
19511
19512 /**
19513  * g_dbus_connection_unregister_subtree:
19514  * @connection: A #GDBusConnection.
19515  * @registration_id: A subtree registration id obtained from g_dbus_connection_register_subtree().
19516  *
19517  * Unregisters a subtree.
19518  *
19519  * Returns: %TRUE if the subtree was unregistered, %FALSE otherwise.
19520  * Since: 2.26
19521  */
19522
19523
19524 /**
19525  * g_dbus_error_encode_gerror:
19526  * @error: A #GError.
19527  *
19528  * Creates a D-Bus error name to use for @error. If @error matches
19529  * a registered error (cf. g_dbus_error_register_error()), the corresponding
19530  * D-Bus error name will be returned.
19531  *
19532  * Otherwise the a name of the form
19533  * <literal>org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE</literal>
19534  * will be used. This allows other GDBus applications to map the error
19535  * on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
19536  *
19537  * This function is typically only used in object mappings to put a
19538  * #GError on the wire. Regular applications should not use it.
19539  *
19540  * Returns: A D-Bus error name (never %NULL). Free with g_free().
19541  * Since: 2.26
19542  */
19543
19544
19545 /**
19546  * g_dbus_error_get_remote_error:
19547  * @error: A #GError.
19548  *
19549  * Gets the D-Bus error name used for @error, if any.
19550  *
19551  * This function is guaranteed to return a D-Bus error name for all
19552  * #GError<!-- -->s returned from functions handling remote method
19553  * calls (e.g. g_dbus_connection_call_finish()) unless
19554  * g_dbus_error_strip_remote_error() has been used on @error.
19555  *
19556  * Returns: An allocated string or %NULL if the D-Bus error name could not be found. Free with g_free().
19557  * Since: 2.26
19558  */
19559
19560
19561 /**
19562  * g_dbus_error_is_remote_error:
19563  * @error: A #GError.
19564  *
19565  * Checks if @error represents an error received via D-Bus from a remote peer. If so,
19566  * use g_dbus_error_get_remote_error() to get the name of the error.
19567  *
19568  * %FALSE otherwise.
19569  *
19570  * Returns: %TRUE if @error represents an error from a remote peer,
19571  * Since: 2.26
19572  */
19573
19574
19575 /**
19576  * g_dbus_error_new_for_dbus_error:
19577  * @dbus_error_name: D-Bus error name.
19578  * @dbus_error_message: D-Bus error message.
19579  *
19580  * Creates a #GError based on the contents of @dbus_error_name and
19581  * @dbus_error_message.
19582  *
19583  * Errors registered with g_dbus_error_register_error() will be looked
19584  * up using @dbus_error_name and if a match is found, the error domain
19585  * and code is used. Applications can use g_dbus_error_get_remote_error()
19586  * to recover @dbus_error_name.
19587  *
19588  * If a match against a registered error is not found and the D-Bus
19589  * error name is in a form as returned by g_dbus_error_encode_gerror()
19590  * the error domain and code encoded in the name is used to
19591  * create the #GError. Also, @dbus_error_name is added to the error message
19592  * such that it can be recovered with g_dbus_error_get_remote_error().
19593  *
19594  * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR
19595  * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is
19596  * added to the error message such that it can be recovered with
19597  * g_dbus_error_get_remote_error().
19598  *
19599  * In all three cases, @dbus_error_name can always be recovered from the
19600  * returned #GError using the g_dbus_error_get_remote_error() function
19601  * (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
19602  *
19603  * This function is typically only used in object mappings to prepare
19604  * #GError instances for applications. Regular applications should not use
19605  * it.
19606  *
19607  * Returns: An allocated #GError. Free with g_error_free().
19608  * Since: 2.26
19609  */
19610
19611
19612 /**
19613  * g_dbus_error_register_error:
19614  * @error_domain: A #GQuark for a error domain.
19615  * @error_code: An error code.
19616  * @dbus_error_name: A D-Bus error name.
19617  *
19618  * Creates an association to map between @dbus_error_name and
19619  * #GError<!-- -->s specified by @error_domain and @error_code.
19620  *
19621  * This is typically done in the routine that returns the #GQuark for
19622  * an error domain.
19623  *
19624  * exists.
19625  *
19626  * Returns: %TRUE if the association was created, %FALSE if it already
19627  * Since: 2.26
19628  */
19629
19630
19631 /**
19632  * g_dbus_error_register_error_domain:
19633  * @error_domain_quark_name: The error domain name.
19634  * @quark_volatile: A pointer where to store the #GQuark.
19635  * @entries: A pointer to @num_entries #GDBusErrorEntry struct items.
19636  * @num_entries: Number of items to register.
19637  *
19638  * Helper function for associating a #GError error domain with D-Bus error names.
19639  *
19640  * Since: 2.26
19641  */
19642
19643
19644 /**
19645  * g_dbus_error_set_dbus_error:
19646  * @error: A pointer to a #GError or %NULL.
19647  * @dbus_error_name: D-Bus error name.
19648  * @dbus_error_message: D-Bus error message.
19649  * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
19650  * @...: Arguments for @format.
19651  *
19652  * Does nothing if @error is %NULL. Otherwise sets *@error to
19653  * a new #GError created with g_dbus_error_new_for_dbus_error()
19654  * with @dbus_error_message prepend with @format (unless %NULL).
19655  *
19656  * Since: 2.26
19657  */
19658
19659
19660 /**
19661  * g_dbus_error_set_dbus_error_valist:
19662  * @error: A pointer to a #GError or %NULL.
19663  * @dbus_error_name: D-Bus error name.
19664  * @dbus_error_message: D-Bus error message.
19665  * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
19666  * @var_args: Arguments for @format.
19667  *
19668  * Like g_dbus_error_set_dbus_error() but intended for language bindings.
19669  *
19670  * Since: 2.26
19671  */
19672
19673
19674 /**
19675  * g_dbus_error_strip_remote_error:
19676  * @error: A #GError.
19677  *
19678  * Looks for extra information in the error message used to recover
19679  * the D-Bus error name and strips it if found. If stripped, the
19680  * message field in @error will correspond exactly to what was
19681  * received on the wire.
19682  *
19683  * This is typically used when presenting errors to the end user.
19684  *
19685  * Returns: %TRUE if information was stripped, %FALSE otherwise.
19686  * Since: 2.26
19687  */
19688
19689
19690 /**
19691  * g_dbus_error_unregister_error:
19692  * @error_domain: A #GQuark for a error domain.
19693  * @error_code: An error code.
19694  * @dbus_error_name: A D-Bus error name.
19695  *
19696  * Destroys an association previously set up with g_dbus_error_register_error().
19697  *
19698  * Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found.
19699  * Since: 2.26
19700  */
19701
19702
19703 /**
19704  * g_dbus_generate_guid:
19705  *
19706  * Generate a D-Bus GUID that can be used with
19707  * e.g. g_dbus_connection_new().
19708  *
19709  * See the D-Bus specification regarding what strings are valid D-Bus
19710  * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
19711  *
19712  * Returns: A valid D-Bus GUID. Free with g_free().
19713  * Since: 2.26
19714  */
19715
19716
19717 /**
19718  * g_dbus_gvalue_to_gvariant:
19719  * @gvalue: A #GValue to convert to a #GVariant.
19720  * @type: A #GVariantType.
19721  *
19722  * Converts a #GValue to a #GVariant of the type indicated by the @type parameter.
19723  *
19724  * The conversion is using the following rules:
19725  * <table frame='all'>
19726  * <title>#GValue / #GVariant conversion rules</title>
19727  * <tgroup cols='2' align='left' colsep='1' rowsep='1'>
19728  * <thead>
19729  * <row>
19730  * <entry>If the #GType for @gvalue is...</entry>
19731  * <entry>... then @type must be</entry>
19732  * </row>
19733  * </thead>
19734  * <tbody>
19735  * <row>
19736  * <entry>#G_TYPE_STRING</entry>
19737  * <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>
19738  * </row>
19739  * <row>
19740  * <entry>#G_TYPE_STRV</entry>
19741  * <entry><link linkend="G-VARIANT-TYPE-STRING-ARRAY:CAPS">'as'</link>, <link linkend="G-VARIANT-TYPE-OBJECT-PATH-ARRAY:CAPS">'ao'</link> or <link linkend="G-VARIANT-TYPE-BYTESTRING-ARRAY:CAPS">'aay'</link></entry>
19742  * </row>
19743  * <row>
19744  * <entry>#G_TYPE_BOOLEAN</entry>
19745  * <entry><link linkend="G-VARIANT-TYPE-BOOLEAN:CAPS">'b'</link></entry>
19746  * </row>
19747  * <row>
19748  * <entry>#G_TYPE_UCHAR</entry>
19749  * <entry><link linkend="G-VARIANT-TYPE-BYTE:CAPS">'y'</link></entry>
19750  * </row>
19751  * <row>
19752  * <entry>#G_TYPE_INT</entry>
19753  * <entry><link linkend="G-VARIANT-TYPE-INT32:CAPS">'i'</link> or <link linkend="G-VARIANT-TYPE-INT16:CAPS">'n'</link></entry>
19754  * </row>
19755  * <row>
19756  * <entry>#G_TYPE_UINT</entry>
19757  * <entry><link linkend="G-VARIANT-TYPE-UINT32:CAPS">'u'</link> or <link linkend="G-VARIANT-TYPE-UINT16:CAPS">'q'</link></entry>
19758  * </row>
19759  * <row>
19760  * <entry>#G_TYPE_INT64</entry>
19761  * <entry><link linkend="G-VARIANT-TYPE-INT64:CAPS">'x'</link></entry>
19762  * </row>
19763  * <row>
19764  * <entry>#G_TYPE_UINT64</entry>
19765  * <entry><link linkend="G-VARIANT-TYPE-UINT64:CAPS">'t'</link></entry>
19766  * </row>
19767  * <row>
19768  * <entry>#G_TYPE_DOUBLE</entry>
19769  * <entry><link linkend="G-VARIANT-TYPE-DOUBLE:CAPS">'d'</link></entry>
19770  * </row>
19771  * <row>
19772  * <entry>#G_TYPE_VARIANT</entry>
19773  * <entry>Any #GVariantType</entry>
19774  * </row>
19775  * </tbody>
19776  * </tgroup>
19777  * </table>
19778  * This can fail if e.g. @gvalue is of type #G_TYPE_STRING and @type
19779  * is <link linkend="G-VARIANT-TYPE-INT32:CAPS">'i'</link>. It will
19780  * also fail for any #GType (including e.g. #G_TYPE_OBJECT and
19781  * #G_TYPE_BOXED derived-types) not in the table above.
19782  *
19783  * Note that if @gvalue is of type #G_TYPE_VARIANT and its value is
19784  * %NULL, the <emphasis>empty</emphasis> #GVariant instance (never
19785  * %NULL) for @type is returned (e.g. 0 for scalar types, the empty
19786  * string for string types, <literal>'/'</literal> for object path
19787  * types, the empty array for any array type and so on).
19788  *
19789  * See the g_dbus_gvariant_to_gvalue() function for how to convert a
19790  * #GVariant to a #GValue.
19791  *
19792  * @type holding the data from @gvalue or %NULL in case of
19793  * failure. Free with g_variant_unref().
19794  *
19795  * Returns: A #GVariant (never floating) of #GVariantType
19796  * Since: 2.30
19797  */
19798
19799
19800 /**
19801  * g_dbus_gvariant_to_gvalue:
19802  * @value: A #GVariant.
19803  * @out_gvalue: Return location pointing to a zero-filled (uninitialized) #GValue.
19804  *
19805  * Converts a #GVariant to a #GValue. If @value is floating, it is consumed.
19806  *
19807  * The rules specified in the g_dbus_gvalue_to_gvariant() function are
19808  * used - this function is essentially its reverse form.
19809  *
19810  * The conversion never fails - a valid #GValue is always returned in
19811  * @out_gvalue.
19812  *
19813  * Since: 2.30
19814  */
19815
19816
19817 /**
19818  * g_dbus_interface_get_info:
19819  * @interface_: An exported D-Bus interface.
19820  *
19821  * Gets D-Bus introspection information for the D-Bus interface
19822  * implemented by @interface_.
19823  *
19824  * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
19825  * Since: 2.30
19826  */
19827
19828
19829 /**
19830  * g_dbus_interface_get_object:
19831  * @interface_: An exported D-Bus interface.
19832  *
19833  * Gets the #GDBusObject that @interface_ belongs to, if any.
19834  *
19835  * reference belongs to @interface_ and should not be freed.
19836  *
19837  * Returns: (transfer none): A #GDBusObject or %NULL. The returned
19838  * Since: 2.30
19839  */
19840
19841
19842 /**
19843  * g_dbus_interface_info_cache_build:
19844  * @info: A #GDBusInterfaceInfo.
19845  *
19846  * Builds a lookup-cache to speed up
19847  * g_dbus_interface_info_lookup_method(),
19848  * g_dbus_interface_info_lookup_signal() and
19849  * g_dbus_interface_info_lookup_property().
19850  *
19851  * If this has already been called with @info, the existing cache is
19852  * used and its use count is increased.
19853  *
19854  * Note that @info cannot be modified until
19855  * g_dbus_interface_info_cache_release() is called.
19856  *
19857  * Since: 2.30
19858  */
19859
19860
19861 /**
19862  * g_dbus_interface_info_cache_release:
19863  * @info: A GDBusInterfaceInfo
19864  *
19865  * Decrements the usage count for the cache for @info built by
19866  * g_dbus_interface_info_cache_build() (if any) and frees the
19867  * resources used by the cache if the usage count drops to zero.
19868  *
19869  * Since: 2.30
19870  */
19871
19872
19873 /**
19874  * g_dbus_interface_info_generate_xml:
19875  * @info: A #GDBusNodeInfo
19876  * @indent: Indentation level.
19877  * @string_builder: (out): A #GString to to append XML data to.
19878  *
19879  * Appends an XML representation of @info (and its children) to @string_builder.
19880  *
19881  * This function is typically used for generating introspection XML
19882  * documents at run-time for handling the
19883  * <literal>org.freedesktop.DBus.Introspectable.Introspect</literal>
19884  * method.
19885  *
19886  * Since: 2.26
19887  */
19888
19889
19890 /**
19891  * g_dbus_interface_info_lookup_method:
19892  * @info: A #GDBusInterfaceInfo.
19893  * @name: A D-Bus method name (typically in CamelCase)
19894  *
19895  * Looks up information about a method.
19896  *
19897  * This cost of this function is O(n) in number of methods unless
19898  * g_dbus_interface_info_cache_build() has been used on @info.
19899  *
19900  * Returns: (transfer none): A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info.
19901  * Since: 2.26
19902  */
19903
19904
19905 /**
19906  * g_dbus_interface_info_lookup_property:
19907  * @info: A #GDBusInterfaceInfo.
19908  * @name: A D-Bus property name (typically in CamelCase).
19909  *
19910  * Looks up information about a property.
19911  *
19912  * This cost of this function is O(n) in number of properties unless
19913  * g_dbus_interface_info_cache_build() has been used on @info.
19914  *
19915  * Returns: (transfer none): A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info.
19916  * Since: 2.26
19917  */
19918
19919
19920 /**
19921  * g_dbus_interface_info_lookup_signal:
19922  * @info: A #GDBusInterfaceInfo.
19923  * @name: A D-Bus signal name (typically in CamelCase)
19924  *
19925  * Looks up information about a signal.
19926  *
19927  * This cost of this function is O(n) in number of signals unless
19928  * g_dbus_interface_info_cache_build() has been used on @info.
19929  *
19930  * Returns: (transfer none): A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info.
19931  * Since: 2.26
19932  */
19933
19934
19935 /**
19936  * g_dbus_interface_info_ref:
19937  * @info: A #GDBusInterfaceInfo
19938  *
19939  * If @info is statically allocated does nothing. Otherwise increases
19940  * the reference count.
19941  *
19942  * Returns: The same @info.
19943  * Since: 2.26
19944  */
19945
19946
19947 /**
19948  * g_dbus_interface_info_unref:
19949  * @info: A #GDBusInterfaceInfo.
19950  *
19951  * If @info is statically allocated, does nothing. Otherwise decreases
19952  * the reference count of @info. When its reference count drops to 0,
19953  * the memory used is freed.
19954  *
19955  * Since: 2.26
19956  */
19957
19958
19959 /**
19960  * g_dbus_interface_set_object:
19961  * @interface_: An exported D-Bus interface.
19962  * @object: A #GDBusObject or %NULL.
19963  *
19964  * Sets the #GDBusObject for @interface_ to @object.
19965  *
19966  * Note that @interface_ will hold a weak reference to @object.
19967  *
19968  * Since: 2.30
19969  */
19970
19971
19972 /**
19973  * g_dbus_interface_skeleton_export:
19974  * @interface_: The D-Bus interface to export.
19975  * @connection: A #GDBusConnection to export @interface_ on.
19976  * @object_path: The path to export the interface at.
19977  * @error: Return location for error or %NULL.
19978  *
19979  * Exports @interface_ at @object_path on @connection.
19980  *
19981  * Use g_dbus_interface_skeleton_unexport() to unexport the object.
19982  *
19983  * @error set.
19984  *
19985  * Returns: %TRUE if the interface was exported, other %FALSE with
19986  * Since: 2.30
19987  */
19988
19989
19990 /**
19991  * g_dbus_interface_skeleton_flush:
19992  * @interface_: A #GDBusInterfaceSkeleton.
19993  *
19994  * If @interface_ has outstanding changes, request for these changes to be
19995  * emitted immediately.
19996  *
19997  * For example, an exported D-Bus interface may queue up property
19998  * changes and emit the
19999  * <literal>org.freedesktop.DBus.Properties::PropertiesChanged</literal>
20000  * signal later (e.g. in an idle handler). This technique is useful
20001  * for collapsing multiple property changes into one.
20002  *
20003  * Since: 2.30
20004  */
20005
20006
20007 /**
20008  * g_dbus_interface_skeleton_get_connection:
20009  * @interface_: A #GDBusInterfaceSkeleton.
20010  *
20011  * Gets the connection that @interface_ is exported on, if any.
20012  *
20013  * not exported anywhere. Do not free, the object belongs to @interface_.
20014  *
20015  * Returns: (transfer none): A #GDBusConnection or %NULL if @interface_ is
20016  * Since: 2.30
20017  */
20018
20019
20020 /**
20021  * g_dbus_interface_skeleton_get_flags:
20022  * @interface_: A #GDBusInterfaceSkeleton.
20023  *
20024  * Gets the #GDBusInterfaceSkeletonFlags that describes what the behavior
20025  * of @interface_
20026  *
20027  * Returns: One or more flags from the #GDBusInterfaceSkeletonFlags enumeration.
20028  * Since: 2.30
20029  */
20030
20031
20032 /**
20033  * g_dbus_interface_skeleton_get_info:
20034  * @interface_: A #GDBusInterfaceSkeleton.
20035  *
20036  * Gets D-Bus introspection information for the D-Bus interface
20037  * implemented by @interface_.
20038  *
20039  * Returns: (transfer none): A #GDBusInterfaceInfo (never %NULL). Do not free.
20040  * Since: 2.30
20041  */
20042
20043
20044 /**
20045  * g_dbus_interface_skeleton_get_object_path:
20046  * @interface_: A #GDBusInterfaceSkeleton.
20047  *
20048  * Gets the object path that @interface_ is exported on, if any.
20049  *
20050  * anywhere. Do not free, the string belongs to @interface_.
20051  *
20052  * Returns: A string owned by @interface_ or %NULL if @interface_ is not exported
20053  * Since: 2.30
20054  */
20055
20056
20057 /**
20058  * g_dbus_interface_skeleton_get_properties:
20059  * @interface_: A #GDBusInterfaceSkeleton.
20060  *
20061  * Gets all D-Bus properties for @interface_.
20062  *
20063  * Returns: (transfer full): A #GVariant of type <link linkend="G-VARIANT-TYPE-VARDICT:CAPS">'a{sv}'</link>. Free with g_variant_unref().
20064  * Since: 2.30
20065  */
20066
20067
20068 /**
20069  * g_dbus_interface_skeleton_get_vtable: (skip)
20070  * @interface_: A #GDBusInterfaceSkeleton.
20071  *
20072  * Gets the interface vtable for the D-Bus interface implemented by
20073  * @interface_. The returned function pointers should expect @interface_
20074  * itself to be passed as @user_data.
20075  *
20076  * Returns: A #GDBusInterfaceVTable (never %NULL).
20077  * Since: 2.30
20078  */
20079
20080
20081 /**
20082  * g_dbus_interface_skeleton_set_flags:
20083  * @interface_: A #GDBusInterfaceSkeleton.
20084  * @flags: Flags from the #GDBusInterfaceSkeletonFlags enumeration.
20085  *
20086  * Sets flags describing what the behavior of @skeleton should be.
20087  *
20088  * Since: 2.30
20089  */
20090
20091
20092 /**
20093  * g_dbus_interface_skeleton_unexport:
20094  * @interface_: A #GDBusInterfaceSkeleton.
20095  *
20096  * Stops exporting an interface previously exported with
20097  * g_dbus_interface_skeleton_export().
20098  *
20099  * Since: 2.30
20100  */
20101
20102
20103 /**
20104  * g_dbus_is_address:
20105  * @string: A string.
20106  *
20107  * Checks if @string is a D-Bus address.
20108  *
20109  * This doesn't check if @string is actually supported by #GDBusServer
20110  * or #GDBusConnection - use g_dbus_is_supported_address() to do more
20111  * checks.
20112  *
20113  * Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise.
20114  * Since: 2.26
20115  */
20116
20117
20118 /**
20119  * g_dbus_is_guid:
20120  * @string: The string to check.
20121  *
20122  * Checks if @string is a D-Bus GUID.
20123  *
20124  * See the D-Bus specification regarding what strings are valid D-Bus
20125  * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
20126  *
20127  * Returns: %TRUE if @string is a guid, %FALSE otherwise.
20128  * Since: 2.26
20129  */
20130
20131
20132 /**
20133  * g_dbus_is_interface_name:
20134  * @string: The string to check.
20135  *
20136  * Checks if @string is a valid D-Bus interface name.
20137  *
20138  * Returns: %TRUE if valid, %FALSE otherwise.
20139  * Since: 2.26
20140  */
20141
20142
20143 /**
20144  * g_dbus_is_member_name:
20145  * @string: The string to check.
20146  *
20147  * Checks if @string is a valid D-Bus member (e.g. signal or method) name.
20148  *
20149  * Returns: %TRUE if valid, %FALSE otherwise.
20150  * Since: 2.26
20151  */
20152
20153
20154 /**
20155  * g_dbus_is_name:
20156  * @string: The string to check.
20157  *
20158  * Checks if @string is a valid D-Bus bus name (either unique or well-known).
20159  *
20160  * Returns: %TRUE if valid, %FALSE otherwise.
20161  * Since: 2.26
20162  */
20163
20164
20165 /**
20166  * g_dbus_is_supported_address:
20167  * @string: A string.
20168  * @error: Return location for error or %NULL.
20169  *
20170  * Like g_dbus_is_address() but also checks if the library suppors the
20171  * transports in @string and that key/value pairs for each transport
20172  * are valid.
20173  *
20174  * supported by this library, %FALSE if @error is set.
20175  *
20176  * Returns: %TRUE if @string is a valid D-Bus address that is
20177  * Since: 2.26
20178  */
20179
20180
20181 /**
20182  * g_dbus_is_unique_name:
20183  * @string: The string to check.
20184  *
20185  * Checks if @string is a valid D-Bus unique bus name.
20186  *
20187  * Returns: %TRUE if valid, %FALSE otherwise.
20188  * Since: 2.26
20189  */
20190
20191
20192 /**
20193  * g_dbus_message_bytes_needed:
20194  * @blob: A blob represent a binary D-Bus message.
20195  * @blob_len: The length of @blob (must be at least 16).
20196  * @error: Return location for error or %NULL.
20197  *
20198  * Utility function to calculate how many bytes are needed to
20199  * completely deserialize the D-Bus message stored at @blob.
20200  *
20201  * @blob contains invalid data or not enough data is available to
20202  * determine the size).
20203  *
20204  * Returns: Number of bytes needed or -1 if @error is set (e.g. if
20205  * Since: 2.26
20206  */
20207
20208
20209 /**
20210  * g_dbus_message_copy:
20211  * @message: A #GDBusMessage.
20212  * @error: Return location for error or %NULL.
20213  *
20214  * Copies @message. The copy is a deep copy and the returned
20215  * #GDBusMessage is completely identical except that it is guaranteed
20216  * to not be locked.
20217  *
20218  * This operation can fail if e.g. @message contains file descriptors
20219  * and the per-process or system-wide open files limit is reached.
20220  *
20221  * Free with g_object_unref().
20222  *
20223  * Returns: (transfer full): A new #GDBusMessage or %NULL if @error is set.
20224  * Since: 2.26
20225  */
20226
20227
20228 /**
20229  * g_dbus_message_get_arg0:
20230  * @message: A #GDBusMessage.
20231  *
20232  * Convenience to get the first item in the body of @message.
20233  *
20234  * @message is not a string.
20235  *
20236  * Returns: The string item or %NULL if the first item in the body of
20237  * Since: 2.26
20238  */
20239
20240
20241 /**
20242  * g_dbus_message_get_body:
20243  * @message: A #GDBusMessage.
20244  *
20245  * Gets the body of a message.
20246  *
20247  * Returns: A #GVariant or %NULL if the body is empty. Do not free, it is owned by @message.
20248  * Since: 2.26
20249  */
20250
20251
20252 /**
20253  * g_dbus_message_get_byte_order:
20254  * @message: A #GDBusMessage.
20255  *
20256  * Gets the byte order of @message.
20257  *
20258  * Returns: The byte order.
20259  */
20260
20261
20262 /**
20263  * g_dbus_message_get_destination:
20264  * @message: A #GDBusMessage.
20265  *
20266  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
20267  *
20268  * Returns: The value.
20269  * Since: 2.26
20270  */
20271
20272
20273 /**
20274  * g_dbus_message_get_error_name:
20275  * @message: A #GDBusMessage.
20276  *
20277  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
20278  *
20279  * Returns: The value.
20280  * Since: 2.26
20281  */
20282
20283
20284 /**
20285  * g_dbus_message_get_flags:
20286  * @message: A #GDBusMessage.
20287  *
20288  * Gets the flags for @message.
20289  *
20290  * Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
20291  * Since: 2.26
20292  */
20293
20294
20295 /**
20296  * g_dbus_message_get_header:
20297  * @message: A #GDBusMessage.
20298  * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
20299  *
20300  * Gets a header field on @message.
20301  *
20302  * otherwise. Do not free, it is owned by @message.
20303  *
20304  * Returns: A #GVariant with the value if the header was found, %NULL
20305  * Since: 2.26
20306  */
20307
20308
20309 /**
20310  * g_dbus_message_get_header_fields:
20311  * @message: A #GDBusMessage.
20312  *
20313  * Gets an array of all header fields on @message that are set.
20314  *
20315  * %G_DBUS_MESSAGE_HEADER_FIELD_INVALID.  Each element is a
20316  * #guchar. Free with g_free().
20317  *
20318  * Returns: An array of header fields terminated by
20319  * Since: 2.26
20320  */
20321
20322
20323 /**
20324  * g_dbus_message_get_interface:
20325  * @message: A #GDBusMessage.
20326  *
20327  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
20328  *
20329  * Returns: The value.
20330  * Since: 2.26
20331  */
20332
20333
20334 /**
20335  * g_dbus_message_get_locked:
20336  * @message: A #GDBusMessage.
20337  *
20338  * Checks whether @message is locked. To monitor changes to this
20339  * value, conncet to the #GObject::notify signal to listen for changes
20340  * on the #GDBusMessage:locked property.
20341  *
20342  * Returns: %TRUE if @message is locked, %FALSE otherwise.
20343  * Since: 2.26
20344  */
20345
20346
20347 /**
20348  * g_dbus_message_get_member:
20349  * @message: A #GDBusMessage.
20350  *
20351  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
20352  *
20353  * Returns: The value.
20354  * Since: 2.26
20355  */
20356
20357
20358 /**
20359  * g_dbus_message_get_message_type:
20360  * @message: A #GDBusMessage.
20361  *
20362  * Gets the type of @message.
20363  *
20364  * Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
20365  * Since: 2.26
20366  */
20367
20368
20369 /**
20370  * g_dbus_message_get_num_unix_fds:
20371  * @message: A #GDBusMessage.
20372  *
20373  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
20374  *
20375  * Returns: The value.
20376  * Since: 2.26
20377  */
20378
20379
20380 /**
20381  * g_dbus_message_get_path:
20382  * @message: A #GDBusMessage.
20383  *
20384  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
20385  *
20386  * Returns: The value.
20387  * Since: 2.26
20388  */
20389
20390
20391 /**
20392  * g_dbus_message_get_reply_serial:
20393  * @message: A #GDBusMessage.
20394  *
20395  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
20396  *
20397  * Returns: The value.
20398  * Since: 2.26
20399  */
20400
20401
20402 /**
20403  * g_dbus_message_get_sender:
20404  * @message: A #GDBusMessage.
20405  *
20406  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
20407  *
20408  * Returns: The value.
20409  * Since: 2.26
20410  */
20411
20412
20413 /**
20414  * g_dbus_message_get_serial:
20415  * @message: A #GDBusMessage.
20416  *
20417  * Gets the serial for @message.
20418  *
20419  * Returns: A #guint32.
20420  * Since: 2.26
20421  */
20422
20423
20424 /**
20425  * g_dbus_message_get_signature:
20426  * @message: A #GDBusMessage.
20427  *
20428  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
20429  *
20430  * Returns: The value.
20431  * Since: 2.26
20432  */
20433
20434
20435 /**
20436  * g_dbus_message_get_unix_fd_list:
20437  * @message: A #GDBusMessage.
20438  *
20439  * Gets the UNIX file descriptors associated with @message, if any.
20440  *
20441  * This method is only available on UNIX.
20442  *
20443  * associated. Do not free, this object is owned by @message.
20444  *
20445  * Returns: (transfer none): A #GUnixFDList or %NULL if no file descriptors are
20446  * Since: 2.26
20447  */
20448
20449
20450 /**
20451  * g_dbus_message_lock:
20452  * @message: A #GDBusMessage.
20453  *
20454  * If @message is locked, does nothing. Otherwise locks the message.
20455  *
20456  * Since: 2.26
20457  */
20458
20459
20460 /**
20461  * g_dbus_message_new:
20462  *
20463  * Creates a new empty #GDBusMessage.
20464  *
20465  * Returns: A #GDBusMessage. Free with g_object_unref().
20466  * Since: 2.26
20467  */
20468
20469
20470 /**
20471  * g_dbus_message_new_from_blob:
20472  * @blob: A blob represent a binary D-Bus message.
20473  * @blob_len: The length of @blob.
20474  * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
20475  * @error: Return location for error or %NULL.
20476  *
20477  * Creates a new #GDBusMessage from the data stored at @blob. The byte
20478  * order that the message was in can be retrieved using
20479  * g_dbus_message_get_byte_order().
20480  *
20481  * g_object_unref().
20482  *
20483  * Returns: A new #GDBusMessage or %NULL if @error is set. Free with
20484  * Since: 2.26
20485  */
20486
20487
20488 /**
20489  * g_dbus_message_new_method_call:
20490  * @name: A valid D-Bus name or %NULL.
20491  * @path: A valid object path.
20492  * @interface_: A valid D-Bus interface name or %NULL.
20493  * @method: A valid method name.
20494  *
20495  * Creates a new #GDBusMessage for a method call.
20496  *
20497  * Returns: A #GDBusMessage. Free with g_object_unref().
20498  * Since: 2.26
20499  */
20500
20501
20502 /**
20503  * g_dbus_message_new_method_error:
20504  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
20505  * @error_name: A valid D-Bus error name.
20506  * @error_message_format: The D-Bus error message in a printf() format.
20507  * @...: Arguments for @error_message_format.
20508  *
20509  * Creates a new #GDBusMessage that is an error reply to @method_call_message.
20510  *
20511  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
20512  * Since: 2.26
20513  */
20514
20515
20516 /**
20517  * g_dbus_message_new_method_error_literal:
20518  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
20519  * @error_name: A valid D-Bus error name.
20520  * @error_message: The D-Bus error message.
20521  *
20522  * Creates a new #GDBusMessage that is an error reply to @method_call_message.
20523  *
20524  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
20525  * Since: 2.26
20526  */
20527
20528
20529 /**
20530  * g_dbus_message_new_method_error_valist:
20531  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
20532  * @error_name: A valid D-Bus error name.
20533  * @error_message_format: The D-Bus error message in a printf() format.
20534  * @var_args: Arguments for @error_message_format.
20535  *
20536  * Like g_dbus_message_new_method_error() but intended for language bindings.
20537  *
20538  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
20539  * Since: 2.26
20540  */
20541
20542
20543 /**
20544  * g_dbus_message_new_method_reply:
20545  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
20546  *
20547  * Creates a new #GDBusMessage that is a reply to @method_call_message.
20548  *
20549  * Returns: (transfer full): #GDBusMessage. Free with g_object_unref().
20550  * Since: 2.26
20551  */
20552
20553
20554 /**
20555  * g_dbus_message_new_signal:
20556  * @path: A valid object path.
20557  * @interface_: A valid D-Bus interface name.
20558  * @signal: A valid signal name.
20559  *
20560  * Creates a new #GDBusMessage for a signal emission.
20561  *
20562  * Returns: A #GDBusMessage. Free with g_object_unref().
20563  * Since: 2.26
20564  */
20565
20566
20567 /**
20568  * g_dbus_message_print:
20569  * @message: A #GDBusMessage.
20570  * @indent: Indentation level.
20571  *
20572  * Produces a human-readable multi-line description of @message.
20573  *
20574  * The contents of the description has no ABI guarantees, the contents
20575  * and formatting is subject to change at any time. Typical output
20576  * looks something like this:
20577  * <programlisting>
20578  * Flags:   none
20579  * Version: 0
20580  * Serial:  4
20581  * Headers:
20582  * path -> objectpath '/org/gtk/GDBus/TestObject'
20583  * interface -> 'org.gtk.GDBus.TestInterface'
20584  * member -> 'GimmeStdout'
20585  * destination -> ':1.146'
20586  * Body: ()
20587  * UNIX File Descriptors:
20588  * (none)
20589  * </programlisting>
20590  * or
20591  * <programlisting>
20592  * Flags:   no-reply-expected
20593  * Version: 0
20594  * Serial:  477
20595  * Headers:
20596  * reply-serial -> uint32 4
20597  * destination -> ':1.159'
20598  * sender -> ':1.146'
20599  * num-unix-fds -> uint32 1
20600  * Body: ()
20601  * UNIX File Descriptors:
20602  * fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
20603  * </programlisting>
20604  *
20605  * Type:    method-return
20606  * Returns: A string that should be freed with g_free().
20607  * Since: 2.26
20608  */
20609
20610
20611 /**
20612  * g_dbus_message_set_body:
20613  * @message: A #GDBusMessage.
20614  * @body: Either %NULL or a #GVariant that is a tuple.
20615  *
20616  * Sets the body @message. As a side-effect the
20617  * %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the
20618  * type string of @body (or cleared if @body is %NULL).
20619  *
20620  * If @body is floating, @message assumes ownership of @body.
20621  *
20622  * Since: 2.26
20623  */
20624
20625
20626 /**
20627  * g_dbus_message_set_byte_order:
20628  * @message: A #GDBusMessage.
20629  * @byte_order: The byte order.
20630  *
20631  * Sets the byte order of @message.
20632  */
20633
20634
20635 /**
20636  * g_dbus_message_set_destination:
20637  * @message: A #GDBusMessage.
20638  * @value: The value to set.
20639  *
20640  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
20641  *
20642  * Since: 2.26
20643  */
20644
20645
20646 /**
20647  * g_dbus_message_set_error_name:
20648  * @message: A #GDBusMessage.
20649  * @value: The value to set.
20650  *
20651  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
20652  *
20653  * Since: 2.26
20654  */
20655
20656
20657 /**
20658  * g_dbus_message_set_flags:
20659  * @message: A #GDBusMessage.
20660  * @flags: Flags for @message that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
20661  *
20662  * Sets the flags to set on @message.
20663  *
20664  * Since: 2.26
20665  */
20666
20667
20668 /**
20669  * g_dbus_message_set_header:
20670  * @message: A #GDBusMessage.
20671  * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
20672  * @value: A #GVariant to set the header field or %NULL to clear the header field.
20673  *
20674  * Sets a header field on @message.
20675  *
20676  * If @value is floating, @message assumes ownership of @value.
20677  *
20678  * Since: 2.26
20679  */
20680
20681
20682 /**
20683  * g_dbus_message_set_interface:
20684  * @message: A #GDBusMessage.
20685  * @value: The value to set.
20686  *
20687  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
20688  *
20689  * Since: 2.26
20690  */
20691
20692
20693 /**
20694  * g_dbus_message_set_member:
20695  * @message: A #GDBusMessage.
20696  * @value: The value to set.
20697  *
20698  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
20699  *
20700  * Since: 2.26
20701  */
20702
20703
20704 /**
20705  * g_dbus_message_set_message_type:
20706  * @message: A #GDBusMessage.
20707  * @type: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
20708  *
20709  * Sets @message to be of @type.
20710  *
20711  * Since: 2.26
20712  */
20713
20714
20715 /**
20716  * g_dbus_message_set_num_unix_fds:
20717  * @message: A #GDBusMessage.
20718  * @value: The value to set.
20719  *
20720  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
20721  *
20722  * Since: 2.26
20723  */
20724
20725
20726 /**
20727  * g_dbus_message_set_path:
20728  * @message: A #GDBusMessage.
20729  * @value: The value to set.
20730  *
20731  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
20732  *
20733  * Since: 2.26
20734  */
20735
20736
20737 /**
20738  * g_dbus_message_set_reply_serial:
20739  * @message: A #GDBusMessage.
20740  * @value: The value to set.
20741  *
20742  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
20743  *
20744  * Since: 2.26
20745  */
20746
20747
20748 /**
20749  * g_dbus_message_set_sender:
20750  * @message: A #GDBusMessage.
20751  * @value: The value to set.
20752  *
20753  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
20754  *
20755  * Since: 2.26
20756  */
20757
20758
20759 /**
20760  * g_dbus_message_set_serial:
20761  * @message: A #GDBusMessage.
20762  * @serial: A #guint32.
20763  *
20764  * Sets the serial for @message.
20765  *
20766  * Since: 2.26
20767  */
20768
20769
20770 /**
20771  * g_dbus_message_set_signature:
20772  * @message: A #GDBusMessage.
20773  * @value: The value to set.
20774  *
20775  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
20776  *
20777  * Since: 2.26
20778  */
20779
20780
20781 /**
20782  * g_dbus_message_set_unix_fd_list:
20783  * @message: A #GDBusMessage.
20784  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
20785  *
20786  * Sets the UNIX file descriptors associated with @message. As a
20787  * side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header
20788  * field is set to the number of fds in @fd_list (or cleared if
20789  * @fd_list is %NULL).
20790  *
20791  * This method is only available on UNIX.
20792  *
20793  * Since: 2.26
20794  */
20795
20796
20797 /**
20798  * g_dbus_message_to_blob:
20799  * @message: A #GDBusMessage.
20800  * @out_size: Return location for size of generated blob.
20801  * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
20802  * @error: Return location for error.
20803  *
20804  * Serializes @message to a blob. The byte order returned by
20805  * g_dbus_message_get_byte_order() will be used.
20806  *
20807  * generated by @message or %NULL if @error is set. Free with g_free().
20808  *
20809  * Returns: A pointer to a valid binary D-Bus message of @out_size bytes
20810  * Since: 2.26
20811  */
20812
20813
20814 /**
20815  * g_dbus_message_to_gerror:
20816  * @message: A #GDBusMessage.
20817  * @error: The #GError to set.
20818  *
20819  * If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does
20820  * nothing and returns %FALSE.
20821  *
20822  * Otherwise this method encodes the error in @message as a #GError
20823  * using g_dbus_error_set_dbus_error() using the information in the
20824  * %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as
20825  * well as the first string item in @message's body.
20826  *
20827  * Returns: %TRUE if @error was set, %FALSE otherwise.
20828  * Since: 2.26
20829  */
20830
20831
20832 /**
20833  * g_dbus_method_info_ref:
20834  * @info: A #GDBusMethodInfo
20835  *
20836  * If @info is statically allocated does nothing. Otherwise increases
20837  * the reference count.
20838  *
20839  * Returns: The same @info.
20840  * Since: 2.26
20841  */
20842
20843
20844 /**
20845  * g_dbus_method_info_unref:
20846  * @info: A #GDBusMethodInfo.
20847  *
20848  * If @info is statically allocated, does nothing. Otherwise decreases
20849  * the reference count of @info. When its reference count drops to 0,
20850  * the memory used is freed.
20851  *
20852  * Since: 2.26
20853  */
20854
20855
20856 /**
20857  * g_dbus_method_invocation_get_connection:
20858  * @invocation: A #GDBusMethodInvocation.
20859  *
20860  * Gets the #GDBusConnection the method was invoked on.
20861  *
20862  * Returns: (transfer none): A #GDBusConnection. Do not free, it is owned by @invocation.
20863  * Since: 2.26
20864  */
20865
20866
20867 /**
20868  * g_dbus_method_invocation_get_interface_name:
20869  * @invocation: A #GDBusMethodInvocation.
20870  *
20871  * Gets the name of the D-Bus interface the method was invoked on.
20872  *
20873  * Returns: A string. Do not free, it is owned by @invocation.
20874  * Since: 2.26
20875  */
20876
20877
20878 /**
20879  * g_dbus_method_invocation_get_message:
20880  * @invocation: A #GDBusMethodInvocation.
20881  *
20882  * Gets the #GDBusMessage for the method invocation. This is useful if
20883  * you need to use low-level protocol features, such as UNIX file
20884  * descriptor passing, that cannot be properly expressed in the
20885  * #GVariant API.
20886  *
20887  * See <xref linkend="gdbus-server"/> and <xref
20888  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
20889  * low-level API to send and receive UNIX file descriptors.
20890  *
20891  * Returns: (transfer none): #GDBusMessage. Do not free, it is owned by @invocation.
20892  * Since: 2.26
20893  */
20894
20895
20896 /**
20897  * g_dbus_method_invocation_get_method_info:
20898  * @invocation: A #GDBusMethodInvocation.
20899  *
20900  * Gets information about the method call, if any.
20901  *
20902  * Returns: A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation.
20903  * Since: 2.26
20904  */
20905
20906
20907 /**
20908  * g_dbus_method_invocation_get_method_name:
20909  * @invocation: A #GDBusMethodInvocation.
20910  *
20911  * Gets the name of the method that was invoked.
20912  *
20913  * Returns: A string. Do not free, it is owned by @invocation.
20914  * Since: 2.26
20915  */
20916
20917
20918 /**
20919  * g_dbus_method_invocation_get_object_path:
20920  * @invocation: A #GDBusMethodInvocation.
20921  *
20922  * Gets the object path the method was invoked on.
20923  *
20924  * Returns: A string. Do not free, it is owned by @invocation.
20925  * Since: 2.26
20926  */
20927
20928
20929 /**
20930  * g_dbus_method_invocation_get_parameters:
20931  * @invocation: A #GDBusMethodInvocation.
20932  *
20933  * Gets the parameters of the method invocation. If there are no input
20934  * parameters then this will return a GVariant with 0 children rather than NULL.
20935  *
20936  * Returns: (transfer none): A #GVariant tuple. Do not unref this because it is owned by @invocation.
20937  * Since: 2.26
20938  */
20939
20940
20941 /**
20942  * g_dbus_method_invocation_get_sender:
20943  * @invocation: A #GDBusMethodInvocation.
20944  *
20945  * Gets the bus name that invoked the method.
20946  *
20947  * Returns: A string. Do not free, it is owned by @invocation.
20948  * Since: 2.26
20949  */
20950
20951
20952 /**
20953  * g_dbus_method_invocation_get_user_data: (skip)
20954  * @invocation: A #GDBusMethodInvocation.
20955  *
20956  * Gets the @user_data #gpointer passed to g_dbus_connection_register_object().
20957  *
20958  * Returns: A #gpointer.
20959  * Since: 2.26
20960  */
20961
20962
20963 /**
20964  * g_dbus_method_invocation_return_dbus_error:
20965  * @invocation: (transfer full): A #GDBusMethodInvocation.
20966  * @error_name: A valid D-Bus error name.
20967  * @error_message: A valid D-Bus error message.
20968  *
20969  * Finishes handling a D-Bus method call by returning an error.
20970  *
20971  * This method will free @invocation, you cannot use it afterwards.
20972  *
20973  * Since: 2.26
20974  */
20975
20976
20977 /**
20978  * g_dbus_method_invocation_return_error:
20979  * @invocation: (transfer full): A #GDBusMethodInvocation.
20980  * @domain: A #GQuark for the #GError error domain.
20981  * @code: The error code.
20982  * @format: printf()-style format.
20983  * @...: Parameters for @format.
20984  *
20985  * Finishes handling a D-Bus method call by returning an error.
20986  *
20987  * See g_dbus_error_encode_gerror() for details about what error name
20988  * will be returned on the wire. In a nutshell, if the given error is
20989  * registered using g_dbus_error_register_error() the name given
20990  * during registration is used. Otherwise, a name of the form
20991  * <literal>org.gtk.GDBus.UnmappedGError.Quark...</literal> is
20992  * used. This provides transparent mapping of #GError between
20993  * applications using GDBus.
20994  *
20995  * If you are writing an application intended to be portable,
20996  * <emphasis>always</emphasis> register errors with g_dbus_error_register_error()
20997  * or use g_dbus_method_invocation_return_dbus_error().
20998  *
20999  * This method will free @invocation, you cannot use it afterwards.
21000  *
21001  * Since: 2.26
21002  */
21003
21004
21005 /**
21006  * g_dbus_method_invocation_return_error_literal:
21007  * @invocation: (transfer full): A #GDBusMethodInvocation.
21008  * @domain: A #GQuark for the #GError error domain.
21009  * @code: The error code.
21010  * @message: The error message.
21011  *
21012  * Like g_dbus_method_invocation_return_error() but without printf()-style formatting.
21013  *
21014  * This method will free @invocation, you cannot use it afterwards.
21015  *
21016  * Since: 2.26
21017  */
21018
21019
21020 /**
21021  * g_dbus_method_invocation_return_error_valist:
21022  * @invocation: (transfer full): A #GDBusMethodInvocation.
21023  * @domain: A #GQuark for the #GError error domain.
21024  * @code: The error code.
21025  * @format: printf()-style format.
21026  * @var_args: #va_list of parameters for @format.
21027  *
21028  * Like g_dbus_method_invocation_return_error() but intended for
21029  * language bindings.
21030  *
21031  * This method will free @invocation, you cannot use it afterwards.
21032  *
21033  * Since: 2.26
21034  */
21035
21036
21037 /**
21038  * g_dbus_method_invocation_return_gerror:
21039  * @invocation: (transfer full): A #GDBusMethodInvocation.
21040  * @error: A #GError.
21041  *
21042  * Like g_dbus_method_invocation_return_error() but takes a #GError
21043  * instead of the error domain, error code and message.
21044  *
21045  * This method will free @invocation, you cannot use it afterwards.
21046  *
21047  * Since: 2.26
21048  */
21049
21050
21051 /**
21052  * g_dbus_method_invocation_return_value:
21053  * @invocation: (transfer full): A #GDBusMethodInvocation.
21054  * @parameters: (allow-none): A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
21055  *
21056  * Finishes handling a D-Bus method call by returning @parameters.
21057  * If the @parameters GVariant is floating, it is consumed.
21058  *
21059  * It is an error if @parameters is not of the right format.
21060  *
21061  * This method will free @invocation, you cannot use it afterwards.
21062  *
21063  * Since: 2.26
21064  */
21065
21066
21067 /**
21068  * g_dbus_method_invocation_return_value_with_unix_fd_list:
21069  * @invocation: (transfer full): A #GDBusMethodInvocation.
21070  * @parameters: (allow-none): A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
21071  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
21072  *
21073  * Like g_dbus_method_invocation_return_value() but also takes a #GUnixFDList.
21074  *
21075  * This method is only available on UNIX.
21076  *
21077  * This method will free @invocation, you cannot use it afterwards.
21078  *
21079  * Since: 2.30
21080  */
21081
21082
21083 /**
21084  * g_dbus_method_invocation_take_error: (skip)
21085  * @invocation: (transfer full): A #GDBusMethodInvocation.
21086  * @error: (transfer full): A #GError.
21087  *
21088  * Like g_dbus_method_invocation_return_gerror() but takes ownership
21089  * of @error so the caller does not need to free it.
21090  *
21091  * This method will free @invocation, you cannot use it afterwards.
21092  *
21093  * Since: 2.30
21094  */
21095
21096
21097 /**
21098  * g_dbus_node_info_generate_xml:
21099  * @info: A #GDBusNodeInfo.
21100  * @indent: Indentation level.
21101  * @string_builder: (out): A #GString to to append XML data to.
21102  *
21103  * Appends an XML representation of @info (and its children) to @string_builder.
21104  *
21105  * This function is typically used for generating introspection XML documents at run-time for
21106  * handling the <literal>org.freedesktop.DBus.Introspectable.Introspect</literal> method.
21107  *
21108  * Since: 2.26
21109  */
21110
21111
21112 /**
21113  * g_dbus_node_info_lookup_interface:
21114  * @info: A #GDBusNodeInfo.
21115  * @name: A D-Bus interface name.
21116  *
21117  * Looks up information about an interface.
21118  *
21119  * This cost of this function is O(n) in number of interfaces.
21120  *
21121  * Returns: (transfer none): A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info.
21122  * Since: 2.26
21123  */
21124
21125
21126 /**
21127  * g_dbus_node_info_new_for_xml:
21128  * @xml_data: Valid D-Bus introspection XML.
21129  * @error: Return location for error.
21130  *
21131  * Parses @xml_data and returns a #GDBusNodeInfo representing the data.
21132  *
21133  * with g_dbus_node_info_unref().
21134  *
21135  * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free
21136  * Since: 2.26
21137  */
21138
21139
21140 /**
21141  * g_dbus_node_info_ref:
21142  * @info: A #GDBusNodeInfo
21143  *
21144  * If @info is statically allocated does nothing. Otherwise increases
21145  * the reference count.
21146  *
21147  * Returns: The same @info.
21148  * Since: 2.26
21149  */
21150
21151
21152 /**
21153  * g_dbus_node_info_unref:
21154  * @info: A #GDBusNodeInfo.
21155  *
21156  * If @info is statically allocated, does nothing. Otherwise decreases
21157  * the reference count of @info. When its reference count drops to 0,
21158  * the memory used is freed.
21159  *
21160  * Since: 2.26
21161  */
21162
21163
21164 /**
21165  * g_dbus_object_get_interface:
21166  * @object: A #GDBusObject.
21167  * @interface_name: A D-Bus interface name.
21168  *
21169  * Gets the D-Bus interface with name @interface_name associated with
21170  * @object, if any.
21171  *
21172  * #GDBusInterface that must be freed with g_object_unref().
21173  *
21174  * Returns: (transfer full): %NULL if not found, otherwise a
21175  * Since: 2.30
21176  */
21177
21178
21179 /**
21180  * g_dbus_object_get_interfaces:
21181  * @object: A #GDBusObject.
21182  *
21183  * Gets the D-Bus interfaces associated with @object.
21184  *
21185  * The returned list must be freed by g_list_free() after each element has been freed
21186  * with g_object_unref().
21187  *
21188  * Returns: (element-type GDBusInterface) (transfer full): A list of #GDBusInterface instances.
21189  * Since: 2.30
21190  */
21191
21192
21193 /**
21194  * g_dbus_object_get_object_path:
21195  * @object: A #GDBusObject.
21196  *
21197  * Gets the object path for @object.
21198  *
21199  * Returns: A string owned by @object. Do not free.
21200  * Since: 2.30
21201  */
21202
21203
21204 /**
21205  * g_dbus_object_manager_client_get_connection:
21206  * @manager: A #GDBusObjectManagerClient
21207  *
21208  * Gets the #GDBusConnection used by @manager.
21209  *
21210  * the object belongs to @manager.
21211  *
21212  * Returns: (transfer none): A #GDBusConnection object. Do not free,
21213  * Since: 2.30
21214  */
21215
21216
21217 /**
21218  * g_dbus_object_manager_client_get_flags:
21219  * @manager: A #GDBusObjectManagerClient
21220  *
21221  * Gets the flags that @manager was constructed with.
21222  *
21223  * enumeration.
21224  *
21225  * Returns: Zero of more flags from the #GDBusObjectManagerClientFlags
21226  * Since: 2.30
21227  */
21228
21229
21230 /**
21231  * g_dbus_object_manager_client_get_name:
21232  * @manager: A #GDBusObjectManagerClient
21233  *
21234  * Gets the name that @manager is for.
21235  *
21236  * belongs to @manager.
21237  *
21238  * Returns: A unique or well-known name. Do not free, the string
21239  * Since: 2.30
21240  */
21241
21242
21243 /**
21244  * g_dbus_object_manager_client_get_name_owner:
21245  * @manager: A #GDBusObjectManagerClient.
21246  *
21247  * The unique name that owns the name that @manager is for or %NULL if
21248  * no-one currently owns that name. You can connect to the
21249  * #GObject::notify signal to track changes to the
21250  * #GDBusObjectManagerClient:name-owner property.
21251  *
21252  * g_free().
21253  *
21254  * Returns: The name owner or %NULL if no name owner exists. Free with
21255  * Since: 2.30
21256  */
21257
21258
21259 /**
21260  * g_dbus_object_manager_client_new:
21261  * @connection: A #GDBusConnection.
21262  * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
21263  * @name: The owner of the control object (unique or well-known name).
21264  * @object_path: The object path of the control object.
21265  * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
21266  * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
21267  * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
21268  * @cancellable: A #GCancellable or %NULL
21269  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
21270  * @user_data: The data to pass to @callback.
21271  *
21272  * Asynchronously creates a new #GDBusObjectManagerClient object.
21273  *
21274  * This is an asynchronous failable constructor. When the result is
21275  * ready, @callback will be invoked in the
21276  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
21277  * of the thread you are calling this method from. You can
21278  * then call g_dbus_object_manager_client_new_finish() to get the result. See
21279  * g_dbus_object_manager_client_new_sync() for the synchronous version.
21280  *
21281  * Since: 2.30
21282  */
21283
21284
21285 /**
21286  * g_dbus_object_manager_client_new_finish:
21287  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new().
21288  * @error: Return location for error or %NULL.
21289  *
21290  * Finishes an operation started with g_dbus_object_manager_client_new().
21291  *
21292  * #GDBusObjectManagerClient object or %NULL if @error is set. Free
21293  * with g_object_unref().
21294  *
21295  * Returns: (transfer full) (type GDBusObjectManagerClient): A
21296  * Since: 2.30
21297  */
21298
21299
21300 /**
21301  * g_dbus_object_manager_client_new_for_bus:
21302  * @bus_type: A #GBusType.
21303  * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
21304  * @name: The owner of the control object (unique or well-known name).
21305  * @object_path: The object path of the control object.
21306  * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
21307  * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
21308  * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
21309  * @cancellable: A #GCancellable or %NULL
21310  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
21311  * @user_data: The data to pass to @callback.
21312  *
21313  * Like g_dbus_object_manager_client_new() but takes a #GBusType instead of a
21314  * #GDBusConnection.
21315  *
21316  * This is an asynchronous failable constructor. When the result is
21317  * ready, @callback will be invoked in the
21318  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
21319  * of the thread you are calling this method from. You can
21320  * then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See
21321  * g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version.
21322  *
21323  * Since: 2.30
21324  */
21325
21326
21327 /**
21328  * g_dbus_object_manager_client_new_for_bus_finish:
21329  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new_for_bus().
21330  * @error: Return location for error or %NULL.
21331  *
21332  * Finishes an operation started with g_dbus_object_manager_client_new_for_bus().
21333  *
21334  * #GDBusObjectManagerClient object or %NULL if @error is set. Free
21335  * with g_object_unref().
21336  *
21337  * Returns: (transfer full) (type GDBusObjectManagerClient): A
21338  * Since: 2.30
21339  */
21340
21341
21342 /**
21343  * g_dbus_object_manager_client_new_for_bus_sync:
21344  * @bus_type: A #GBusType.
21345  * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
21346  * @name: The owner of the control object (unique or well-known name).
21347  * @object_path: The object path of the control object.
21348  * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
21349  * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
21350  * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
21351  * @cancellable: A #GCancellable or %NULL
21352  * @error: Return location for error or %NULL.
21353  *
21354  * Like g_dbus_object_manager_client_new_sync() but takes a #GBusType instead
21355  * of a #GDBusConnection.
21356  *
21357  * This is a synchronous failable constructor - the calling thread is
21358  * blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus()
21359  * for the asynchronous version.
21360  *
21361  * #GDBusObjectManagerClient object or %NULL if @error is set. Free
21362  * with g_object_unref().
21363  *
21364  * Returns: (transfer full) (type GDBusObjectManagerClient): A
21365  * Since: 2.30
21366  */
21367
21368
21369 /**
21370  * g_dbus_object_manager_client_new_sync:
21371  * @connection: A #GDBusConnection.
21372  * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
21373  * @name: The owner of the control object (unique or well-known name).
21374  * @object_path: The object path of the control object.
21375  * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
21376  * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
21377  * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
21378  * @cancellable: A #GCancellable or %NULL
21379  * @error: Return location for error or %NULL.
21380  *
21381  * Creates a new #GDBusObjectManagerClient object.
21382  *
21383  * This is a synchronous failable constructor - the calling thread is
21384  * blocked until a reply is received. See g_dbus_object_manager_client_new()
21385  * for the asynchronous version.
21386  *
21387  * #GDBusObjectManagerClient object or %NULL if @error is set. Free
21388  * with g_object_unref().
21389  *
21390  * Returns: (transfer full) (type GDBusObjectManagerClient): A
21391  * Since: 2.30
21392  */
21393
21394
21395 /**
21396  * g_dbus_object_manager_get_interface:
21397  * @manager: A #GDBusObjectManager.
21398  * @object_path: Object path to lookup.
21399  * @interface_name: D-Bus interface name to lookup.
21400  *
21401  * Gets the interface proxy for @interface_name at @object_path, if
21402  * any.
21403  *
21404  * with g_object_unref().
21405  *
21406  * Returns: (transfer full): A #GDBusInterface instance or %NULL. Free
21407  * Since: 2.30
21408  */
21409
21410
21411 /**
21412  * g_dbus_object_manager_get_object:
21413  * @manager: A #GDBusObjectManager.
21414  * @object_path: Object path to lookup.
21415  *
21416  * Gets the #GDBusObjectProxy at @object_path, if any.
21417  *
21418  * g_object_unref().
21419  *
21420  * Returns: (transfer full): A #GDBusObject or %NULL. Free with
21421  * Since: 2.30
21422  */
21423
21424
21425 /**
21426  * g_dbus_object_manager_get_object_path:
21427  * @manager: A #GDBusObjectManager.
21428  *
21429  * Gets the object path that @manager is for.
21430  *
21431  * Returns: A string owned by @manager. Do not free.
21432  * Since: 2.30
21433  */
21434
21435
21436 /**
21437  * g_dbus_object_manager_get_objects:
21438  * @manager: A #GDBusObjectManager.
21439  *
21440  * Gets all #GDBusObject objects known to @manager.
21441  *
21442  * #GDBusObject objects. The returned list should be freed with
21443  * g_list_free() after each element has been freed with
21444  * g_object_unref().
21445  *
21446  * Returns: (transfer full) (element-type GDBusObject): A list of
21447  * Since: 2.30
21448  */
21449
21450
21451 /**
21452  * g_dbus_object_manager_server_export:
21453  * @manager: A #GDBusObjectManagerServer.
21454  * @object: A #GDBusObjectSkeleton.
21455  *
21456  * Exports @object on @manager.
21457  *
21458  * If there is already a #GDBusObject exported at the object path,
21459  * then the old object is removed.
21460  *
21461  * The object path for @object must be in the hierarchy rooted by the
21462  * object path for @manager.
21463  *
21464  * Note that @manager will take a reference on @object for as long as
21465  * it is exported.
21466  *
21467  * Since: 2.30
21468  */
21469
21470
21471 /**
21472  * g_dbus_object_manager_server_export_uniquely:
21473  * @manager: A #GDBusObjectManagerServer.
21474  * @object: An object.
21475  *
21476  * Like g_dbus_object_manager_server_export() but appends a string of
21477  * the form <literal>_N</literal> (with N being a natural number) to
21478  * @object<!-- -->'s object path if an object with the given path
21479  * already exists. As such, the #GDBusObjectProxy:object-path property
21480  * of @object may be modified.
21481  *
21482  * Since: 2.30
21483  */
21484
21485
21486 /**
21487  * g_dbus_object_manager_server_get_connection:
21488  * @manager: A #GDBusObjectManagerServer
21489  *
21490  * Gets the #GDBusConnection used by @manager.
21491  *
21492  * @manager isn't exported on a connection. The returned object should
21493  * be freed with g_object_unref().
21494  *
21495  * Returns: (transfer full): A #GDBusConnection object or %NULL if
21496  * Since: 2.30
21497  */
21498
21499
21500 /**
21501  * g_dbus_object_manager_server_new:
21502  * @object_path: The object path to export the manager object at.
21503  *
21504  * Creates a new #GDBusObjectManagerServer object.
21505  *
21506  * The returned server isn't yet exported on any connection. To do so,
21507  * use g_dbus_object_manager_server_set_connection(). Normally you
21508  * want to export all of your objects before doing so to avoid <ulink
21509  * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">InterfacesAdded</ulink>
21510  * signals being emitted.
21511  *
21512  * Returns: A #GDBusObjectManagerServer object. Free with g_object_unref().
21513  * Since: 2.30
21514  */
21515
21516
21517 /**
21518  * g_dbus_object_manager_server_set_connection:
21519  * @manager: A #GDBusObjectManagerServer.
21520  * @connection: (allow-none): A #GDBusConnection or %NULL.
21521  *
21522  * Exports all objects managed by @manager on @connection. If
21523  * @connection is %NULL, stops exporting objects.
21524  */
21525
21526
21527 /**
21528  * g_dbus_object_manager_server_unexport:
21529  * @manager: A #GDBusObjectManagerServer.
21530  * @object_path: An object path.
21531  *
21532  * If @manager has an object at @path, removes the object. Otherwise
21533  * does nothing.
21534  *
21535  * Note that @object_path must be in the hierarchy rooted by the
21536  * object path for @manager.
21537  *
21538  * Returns: %TRUE if object at @object_path was removed, %FALSE otherwise.
21539  * Since: 2.30
21540  */
21541
21542
21543 /**
21544  * g_dbus_object_proxy_get_connection:
21545  * @proxy: a #GDBusObjectProxy
21546  *
21547  * Gets the connection that @proxy is for.
21548  *
21549  * object is owned by @proxy.
21550  *
21551  * Returns: (transfer none): A #GDBusConnection. Do not free, the
21552  * Since: 2.30
21553  */
21554
21555
21556 /**
21557  * g_dbus_object_proxy_new:
21558  * @connection: a #GDBusConnection
21559  * @object_path: the object path
21560  *
21561  * Creates a new #GDBusObjectProxy for the given connection and
21562  * object path.
21563  *
21564  * Returns: a new #GDBusObjectProxy
21565  * Since: 2.30
21566  */
21567
21568
21569 /**
21570  * g_dbus_object_skeleton_add_interface:
21571  * @object: A #GDBusObjectSkeleton.
21572  * @interface_: A #GDBusInterfaceSkeleton.
21573  *
21574  * Adds @interface_ to @object.
21575  *
21576  * If @object already contains a #GDBusInterfaceSkeleton with the same
21577  * interface name, it is removed before @interface_ is added.
21578  *
21579  * Note that @object takes its own reference on @interface_ and holds
21580  * it until removed.
21581  *
21582  * Since: 2.30
21583  */
21584
21585
21586 /**
21587  * g_dbus_object_skeleton_flush:
21588  * @object: A #GDBusObjectSkeleton.
21589  *
21590  * This method simply calls g_dbus_interface_skeleton_flush() on all
21591  * interfaces belonging to @object. See that method for when flushing
21592  * is useful.
21593  *
21594  * Since: 2.30
21595  */
21596
21597
21598 /**
21599  * g_dbus_object_skeleton_new:
21600  * @object_path: An object path.
21601  *
21602  * Creates a new #GDBusObjectSkeleton.
21603  *
21604  * Returns: A #GDBusObjectSkeleton. Free with g_object_unref().
21605  * Since: 2.30
21606  */
21607
21608
21609 /**
21610  * g_dbus_object_skeleton_remove_interface:
21611  * @object: A #GDBusObjectSkeleton.
21612  * @interface_: A #GDBusInterfaceSkeleton.
21613  *
21614  * Removes @interface_ from @object.
21615  *
21616  * Since: 2.30
21617  */
21618
21619
21620 /**
21621  * g_dbus_object_skeleton_remove_interface_by_name:
21622  * @object: A #GDBusObjectSkeleton.
21623  * @interface_name: A D-Bus interface name.
21624  *
21625  * Removes the #GDBusInterface with @interface_name from @object.
21626  *
21627  * If no D-Bus interface of the given interface exists, this function
21628  * does nothing.
21629  *
21630  * Since: 2.30
21631  */
21632
21633
21634 /**
21635  * g_dbus_object_skeleton_set_object_path:
21636  * @object: A #GDBusObjectSkeleton.
21637  * @object_path: A valid D-Bus object path.
21638  *
21639  * Sets the object path for @object.
21640  *
21641  * Since: 2.30
21642  */
21643
21644
21645 /**
21646  * g_dbus_property_info_ref:
21647  * @info: A #GDBusPropertyInfo
21648  *
21649  * If @info is statically allocated does nothing. Otherwise increases
21650  * the reference count.
21651  *
21652  * Returns: The same @info.
21653  * Since: 2.26
21654  */
21655
21656
21657 /**
21658  * g_dbus_property_info_unref:
21659  * @info: A #GDBusPropertyInfo.
21660  *
21661  * If @info is statically allocated, does nothing. Otherwise decreases
21662  * the reference count of @info. When its reference count drops to 0,
21663  * the memory used is freed.
21664  *
21665  * Since: 2.26
21666  */
21667
21668
21669 /**
21670  * g_dbus_proxy_call:
21671  * @proxy: A #GDBusProxy.
21672  * @method_name: Name of method to invoke.
21673  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
21674  * @flags: Flags from the #GDBusCallFlags enumeration.
21675  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
21676  * @cancellable: A #GCancellable or %NULL.
21677  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
21678  * @user_data: The data to pass to @callback.
21679  *
21680  * Asynchronously invokes the @method_name method on @proxy.
21681  *
21682  * If @method_name contains any dots, then @name is split into interface and
21683  * method name parts. This allows using @proxy for invoking methods on
21684  * other interfaces.
21685  *
21686  * If the #GDBusConnection associated with @proxy is closed then
21687  * the operation will fail with %G_IO_ERROR_CLOSED. If
21688  * @cancellable is canceled, the operation will fail with
21689  * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
21690  * compatible with the D-Bus protocol, the operation fails with
21691  * %G_IO_ERROR_INVALID_ARGUMENT.
21692  *
21693  * If the @parameters #GVariant is floating, it is consumed. This allows
21694  * convenient 'inline' use of g_variant_new(), e.g.:
21695  * |[
21696  * g_dbus_proxy_call (proxy,
21697  * "TwoStrings",
21698  * g_variant_new ("(ss)",
21699  * "Thing One",
21700  * "Thing Two"),
21701  * G_DBUS_CALL_FLAGS_NONE,
21702  * -1,
21703  * NULL,
21704  * (GAsyncReadyCallback) two_strings_done,
21705  * &amp;data);
21706  * ]|
21707  *
21708  * This is an asynchronous method. When the operation is finished,
21709  * @callback will be invoked in the
21710  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
21711  * of the thread you are calling this method from.
21712  * You can then call g_dbus_proxy_call_finish() to get the result of
21713  * the operation. See g_dbus_proxy_call_sync() for the synchronous
21714  * version of this method.
21715  *
21716  * Since: 2.26
21717  */
21718
21719
21720 /**
21721  * g_dbus_proxy_call_finish:
21722  * @proxy: A #GDBusProxy.
21723  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call().
21724  * @error: Return location for error or %NULL.
21725  *
21726  * Finishes an operation started with g_dbus_proxy_call().
21727  *
21728  * return values. Free with g_variant_unref().
21729  *
21730  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
21731  * Since: 2.26
21732  */
21733
21734
21735 /**
21736  * g_dbus_proxy_call_sync:
21737  * @proxy: A #GDBusProxy.
21738  * @method_name: Name of method to invoke.
21739  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
21740  * @flags: Flags from the #GDBusCallFlags enumeration.
21741  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
21742  * @cancellable: A #GCancellable or %NULL.
21743  * @error: Return location for error or %NULL.
21744  *
21745  * Synchronously invokes the @method_name method on @proxy.
21746  *
21747  * If @method_name contains any dots, then @name is split into interface and
21748  * method name parts. This allows using @proxy for invoking methods on
21749  * other interfaces.
21750  *
21751  * If the #GDBusConnection associated with @proxy is disconnected then
21752  * the operation will fail with %G_IO_ERROR_CLOSED. If
21753  * @cancellable is canceled, the operation will fail with
21754  * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
21755  * compatible with the D-Bus protocol, the operation fails with
21756  * %G_IO_ERROR_INVALID_ARGUMENT.
21757  *
21758  * If the @parameters #GVariant is floating, it is consumed. This allows
21759  * convenient 'inline' use of g_variant_new(), e.g.:
21760  * |[
21761  * g_dbus_proxy_call_sync (proxy,
21762  * "TwoStrings",
21763  * g_variant_new ("(ss)",
21764  * "Thing One",
21765  * "Thing Two"),
21766  * G_DBUS_CALL_FLAGS_NONE,
21767  * -1,
21768  * NULL,
21769  * &amp;error);
21770  * ]|
21771  *
21772  * The calling thread is blocked until a reply is received. See
21773  * g_dbus_proxy_call() for the asynchronous version of this
21774  * method.
21775  *
21776  * return values. Free with g_variant_unref().
21777  *
21778  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
21779  * Since: 2.26
21780  */
21781
21782
21783 /**
21784  * g_dbus_proxy_call_with_unix_fd_list:
21785  * @proxy: A #GDBusProxy.
21786  * @method_name: Name of method to invoke.
21787  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
21788  * @flags: Flags from the #GDBusCallFlags enumeration.
21789  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
21790  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
21791  * @cancellable: A #GCancellable or %NULL.
21792  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
21793  * @user_data: The data to pass to @callback.
21794  *
21795  * Like g_dbus_proxy_call() but also takes a #GUnixFDList object.
21796  *
21797  * This method is only available on UNIX.
21798  *
21799  * Since: 2.30
21800  */
21801
21802
21803 /**
21804  * g_dbus_proxy_call_with_unix_fd_list_finish:
21805  * @proxy: A #GDBusProxy.
21806  * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
21807  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call_with_unix_fd_list().
21808  * @error: Return location for error or %NULL.
21809  *
21810  * Finishes an operation started with g_dbus_proxy_call_with_unix_fd_list().
21811  *
21812  * return values. Free with g_variant_unref().
21813  *
21814  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
21815  * Since: 2.30
21816  */
21817
21818
21819 /**
21820  * g_dbus_proxy_call_with_unix_fd_list_sync:
21821  * @proxy: A #GDBusProxy.
21822  * @method_name: Name of method to invoke.
21823  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
21824  * @flags: Flags from the #GDBusCallFlags enumeration.
21825  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
21826  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
21827  * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
21828  * @cancellable: A #GCancellable or %NULL.
21829  * @error: Return location for error or %NULL.
21830  *
21831  * Like g_dbus_proxy_call_sync() but also takes and returns #GUnixFDList objects.
21832  *
21833  * This method is only available on UNIX.
21834  *
21835  * return values. Free with g_variant_unref().
21836  *
21837  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
21838  * Since: 2.30
21839  */
21840
21841
21842 /**
21843  * g_dbus_proxy_get_cached_property:
21844  * @proxy: A #GDBusProxy.
21845  * @property_name: Property name.
21846  *
21847  * Looks up the value for a property from the cache. This call does no
21848  * blocking IO.
21849  *
21850  * If @proxy has an expected interface (see
21851  * #GDBusProxy:g-interface-info), then @property_name (for existence)
21852  * is checked against it.
21853  *
21854  * for @property_name or %NULL if the value is not in the cache. The
21855  * returned reference must be freed with g_variant_unref().
21856  *
21857  * Returns: A reference to the #GVariant instance that holds the value
21858  * Since: 2.26
21859  */
21860
21861
21862 /**
21863  * g_dbus_proxy_get_cached_property_names:
21864  * @proxy: A #GDBusProxy.
21865  *
21866  * Gets the names of all cached properties on @proxy.
21867  *
21868  * @proxy has no cached properties. Free the returned array with
21869  * g_strfreev().
21870  *
21871  * Returns: (transfer full): A %NULL-terminated array of strings or %NULL if
21872  * Since: 2.26
21873  */
21874
21875
21876 /**
21877  * g_dbus_proxy_get_connection:
21878  * @proxy: A #GDBusProxy.
21879  *
21880  * Gets the connection @proxy is for.
21881  *
21882  * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free.
21883  * Since: 2.26
21884  */
21885
21886
21887 /**
21888  * g_dbus_proxy_get_default_timeout:
21889  * @proxy: A #GDBusProxy.
21890  *
21891  * Gets the timeout to use if -1 (specifying default timeout) is
21892  * passed as @timeout_msec in the g_dbus_proxy_call() and
21893  * g_dbus_proxy_call_sync() functions.
21894  *
21895  * See the #GDBusProxy:g-default-timeout property for more details.
21896  *
21897  * Returns: Timeout to use for @proxy.
21898  * Since: 2.26
21899  */
21900
21901
21902 /**
21903  * g_dbus_proxy_get_flags:
21904  * @proxy: A #GDBusProxy.
21905  *
21906  * Gets the flags that @proxy was constructed with.
21907  *
21908  * Returns: Flags from the #GDBusProxyFlags enumeration.
21909  * Since: 2.26
21910  */
21911
21912
21913 /**
21914  * g_dbus_proxy_get_interface_info:
21915  * @proxy: A #GDBusProxy
21916  *
21917  * Returns the #GDBusInterfaceInfo, if any, specifying the minimal
21918  * interface that @proxy conforms to.
21919  *
21920  * See the #GDBusProxy:g-interface-info property for more details.
21921  *
21922  * object, it is owned by @proxy.
21923  *
21924  * Returns: A #GDBusInterfaceInfo or %NULL. Do not unref the returned
21925  * Since: 2.26
21926  */
21927
21928
21929 /**
21930  * g_dbus_proxy_get_interface_name:
21931  * @proxy: A #GDBusProxy.
21932  *
21933  * Gets the D-Bus interface name @proxy is for.
21934  *
21935  * Returns: A string owned by @proxy. Do not free.
21936  * Since: 2.26
21937  */
21938
21939
21940 /**
21941  * g_dbus_proxy_get_name:
21942  * @proxy: A #GDBusProxy.
21943  *
21944  * Gets the name that @proxy was constructed for.
21945  *
21946  * Returns: A string owned by @proxy. Do not free.
21947  * Since: 2.26
21948  */
21949
21950
21951 /**
21952  * g_dbus_proxy_get_name_owner:
21953  * @proxy: A #GDBusProxy.
21954  *
21955  * The unique name that owns the name that @proxy is for or %NULL if
21956  * no-one currently owns that name. You may connect to the
21957  * #GObject::notify signal to track changes to the
21958  * #GDBusProxy:g-name-owner property.
21959  *
21960  * Returns: The name owner or %NULL if no name owner exists. Free with g_free().
21961  * Since: 2.26
21962  */
21963
21964
21965 /**
21966  * g_dbus_proxy_get_object_path:
21967  * @proxy: A #GDBusProxy.
21968  *
21969  * Gets the object path @proxy is for.
21970  *
21971  * Returns: A string owned by @proxy. Do not free.
21972  * Since: 2.26
21973  */
21974
21975
21976 /**
21977  * g_dbus_proxy_new:
21978  * @connection: A #GDBusConnection.
21979  * @flags: Flags used when constructing the proxy.
21980  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
21981  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
21982  * @object_path: An object path.
21983  * @interface_name: A D-Bus interface name.
21984  * @cancellable: A #GCancellable or %NULL.
21985  * @callback: Callback function to invoke when the proxy is ready.
21986  * @user_data: User data to pass to @callback.
21987  *
21988  * Creates a proxy for accessing @interface_name on the remote object
21989  * at @object_path owned by @name at @connection and asynchronously
21990  * loads D-Bus properties unless the
21991  * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to
21992  * the #GDBusProxy::g-properties-changed signal to get notified about
21993  * property changes.
21994  *
21995  * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
21996  * match rules for signals. Connect to the #GDBusProxy::g-signal signal
21997  * to handle signals from the remote object.
21998  *
21999  * If @name is a well-known name and the
22000  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
22001  * owner currently exists, the message bus will be requested to launch
22002  * a name owner for the name.
22003  *
22004  * This is a failable asynchronous constructor - when the proxy is
22005  * ready, @callback will be invoked and you can use
22006  * g_dbus_proxy_new_finish() to get the result.
22007  *
22008  * See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.
22009  *
22010  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
22011  *
22012  * Since: 2.26
22013  */
22014
22015
22016 /**
22017  * g_dbus_proxy_new_finish:
22018  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new().
22019  * @error: Return location for error or %NULL.
22020  *
22021  * Finishes creating a #GDBusProxy.
22022  *
22023  * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
22024  * Since: 2.26
22025  */
22026
22027
22028 /**
22029  * g_dbus_proxy_new_for_bus:
22030  * @bus_type: A #GBusType.
22031  * @flags: Flags used when constructing the proxy.
22032  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
22033  * @name: A bus name (well-known or unique).
22034  * @object_path: An object path.
22035  * @interface_name: A D-Bus interface name.
22036  * @cancellable: A #GCancellable or %NULL.
22037  * @callback: Callback function to invoke when the proxy is ready.
22038  * @user_data: User data to pass to @callback.
22039  *
22040  * Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
22041  *
22042  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
22043  *
22044  * Since: 2.26
22045  */
22046
22047
22048 /**
22049  * g_dbus_proxy_new_for_bus_finish:
22050  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus().
22051  * @error: Return location for error or %NULL.
22052  *
22053  * Finishes creating a #GDBusProxy.
22054  *
22055  * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
22056  * Since: 2.26
22057  */
22058
22059
22060 /**
22061  * g_dbus_proxy_new_for_bus_sync:
22062  * @bus_type: A #GBusType.
22063  * @flags: Flags used when constructing the proxy.
22064  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
22065  * @name: A bus name (well-known or unique).
22066  * @object_path: An object path.
22067  * @interface_name: A D-Bus interface name.
22068  * @cancellable: A #GCancellable or %NULL.
22069  * @error: Return location for error or %NULL.
22070  *
22071  * Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
22072  *
22073  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
22074  *
22075  * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
22076  * Since: 2.26
22077  */
22078
22079
22080 /**
22081  * g_dbus_proxy_new_sync:
22082  * @connection: A #GDBusConnection.
22083  * @flags: Flags used when constructing the proxy.
22084  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
22085  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
22086  * @object_path: An object path.
22087  * @interface_name: A D-Bus interface name.
22088  * @cancellable: (allow-none): A #GCancellable or %NULL.
22089  * @error: (allow-none): Return location for error or %NULL.
22090  *
22091  * Creates a proxy for accessing @interface_name on the remote object
22092  * at @object_path owned by @name at @connection and synchronously
22093  * loads D-Bus properties unless the
22094  * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.
22095  *
22096  * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
22097  * match rules for signals. Connect to the #GDBusProxy::g-signal signal
22098  * to handle signals from the remote object.
22099  *
22100  * If @name is a well-known name and the
22101  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
22102  * owner currently exists, the message bus will be requested to launch
22103  * a name owner for the name.
22104  *
22105  * This is a synchronous failable constructor. See g_dbus_proxy_new()
22106  * and g_dbus_proxy_new_finish() for the asynchronous version.
22107  *
22108  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
22109  *
22110  * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
22111  * Since: 2.26
22112  */
22113
22114
22115 /**
22116  * g_dbus_proxy_set_cached_property:
22117  * @proxy: A #GDBusProxy
22118  * @property_name: Property name.
22119  * @value: (allow-none): Value for the property or %NULL to remove it from the cache.
22120  *
22121  * If @value is not %NULL, sets the cached value for the property with
22122  * name @property_name to the value in @value.
22123  *
22124  * If @value is %NULL, then the cached value is removed from the
22125  * property cache.
22126  *
22127  * If @proxy has an expected interface (see
22128  * #GDBusProxy:g-interface-info), then @property_name (for existence)
22129  * and @value (for the type) is checked against it.
22130  *
22131  * If the @value #GVariant is floating, it is consumed. This allows
22132  * convenient 'inline' use of g_variant_new(), e.g.
22133  * |[
22134  * g_dbus_proxy_set_cached_property (proxy,
22135  * "SomeProperty",
22136  * g_variant_new ("(si)",
22137  * "A String",
22138  * 42));
22139  * ]|
22140  *
22141  * Normally you will not need to use this method since @proxy is
22142  * tracking changes using the
22143  * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
22144  * D-Bus signal. However, for performance reasons an object may decide
22145  * to not use this signal for some properties and instead use a
22146  * proprietary out-of-band mechanism to transmit changes.
22147  *
22148  * As a concrete example, consider an object with a property
22149  * <literal>ChatroomParticipants</literal> which is an array of
22150  * strings. Instead of transmitting the same (long) array every time
22151  * the property changes, it is more efficient to only transmit the
22152  * delta using e.g. signals <literal>ChatroomParticipantJoined(String
22153  * name)</literal> and <literal>ChatroomParticipantParted(String
22154  * name)</literal>.
22155  *
22156  * Since: 2.26
22157  */
22158
22159
22160 /**
22161  * g_dbus_proxy_set_default_timeout:
22162  * @proxy: A #GDBusProxy.
22163  * @timeout_msec: Timeout in milliseconds.
22164  *
22165  * Sets the timeout to use if -1 (specifying default timeout) is
22166  * passed as @timeout_msec in the g_dbus_proxy_call() and
22167  * g_dbus_proxy_call_sync() functions.
22168  *
22169  * See the #GDBusProxy:g-default-timeout property for more details.
22170  *
22171  * Since: 2.26
22172  */
22173
22174
22175 /**
22176  * g_dbus_proxy_set_interface_info:
22177  * @proxy: A #GDBusProxy
22178  * @info: (allow-none): Minimum interface this proxy conforms to or %NULL to unset.
22179  *
22180  * Ensure that interactions with @proxy conform to the given
22181  * interface.  For example, when completing a method call, if the type
22182  * signature of the message isn't what's expected, the given #GError
22183  * is set.  Signals that have a type signature mismatch are simply
22184  * dropped.
22185  *
22186  * See the #GDBusProxy:g-interface-info property for more details.
22187  *
22188  * Since: 2.26
22189  */
22190
22191
22192 /**
22193  * g_dbus_server_get_client_address:
22194  * @server: A #GDBusServer.
22195  *
22196  * Gets a D-Bus address string that can be used by clients to connect
22197  * to @server.
22198  *
22199  * by @server.
22200  *
22201  * Returns: A D-Bus address string. Do not free, the string is owned
22202  * Since: 2.26
22203  */
22204
22205
22206 /**
22207  * g_dbus_server_get_flags:
22208  * @server: A #GDBusServer.
22209  *
22210  * Gets the flags for @server.
22211  *
22212  * Returns: A set of flags from the #GDBusServerFlags enumeration.
22213  * Since: 2.26
22214  */
22215
22216
22217 /**
22218  * g_dbus_server_get_guid:
22219  * @server: A #GDBusServer.
22220  *
22221  * Gets the GUID for @server.
22222  *
22223  * Returns: A D-Bus GUID. Do not free this string, it is owned by @server.
22224  * Since: 2.26
22225  */
22226
22227
22228 /**
22229  * g_dbus_server_is_active:
22230  * @server: A #GDBusServer.
22231  *
22232  * Gets whether @server is active.
22233  *
22234  * Returns: %TRUE if server is active, %FALSE otherwise.
22235  * Since: 2.26
22236  */
22237
22238
22239 /**
22240  * g_dbus_server_new_sync:
22241  * @address: A D-Bus address.
22242  * @flags: Flags from the #GDBusServerFlags enumeration.
22243  * @guid: A D-Bus GUID.
22244  * @observer: A #GDBusAuthObserver or %NULL.
22245  * @cancellable: A #GCancellable or %NULL.
22246  * @error: Return location for server or %NULL.
22247  *
22248  * Creates a new D-Bus server that listens on the first address in
22249  * @address that works.
22250  *
22251  * Once constructed, you can use g_dbus_server_get_client_address() to
22252  * get a D-Bus address string that clients can use to connect.
22253  *
22254  * Connect to the #GDBusServer::new-connection signal to handle
22255  * incoming connections.
22256  *
22257  * The returned #GDBusServer isn't active - you have to start it with
22258  * g_dbus_server_start().
22259  *
22260  * See <xref linkend="gdbus-peer-to-peer"/> for how #GDBusServer can
22261  * be used.
22262  *
22263  * This is a synchronous failable constructor. See
22264  * g_dbus_server_new() for the asynchronous version.
22265  *
22266  * g_object_unref().
22267  *
22268  * Returns: A #GDBusServer or %NULL if @error is set. Free with
22269  * Since: 2.26
22270  */
22271
22272
22273 /**
22274  * g_dbus_server_start:
22275  * @server: A #GDBusServer.
22276  *
22277  * Starts @server.
22278  *
22279  * Since: 2.26
22280  */
22281
22282
22283 /**
22284  * g_dbus_server_stop:
22285  * @server: A #GDBusServer.
22286  *
22287  * Stops @server.
22288  *
22289  * Since: 2.26
22290  */
22291
22292
22293 /**
22294  * g_dbus_signal_info_ref:
22295  * @info: A #GDBusSignalInfo
22296  *
22297  * If @info is statically allocated does nothing. Otherwise increases
22298  * the reference count.
22299  *
22300  * Returns: The same @info.
22301  * Since: 2.26
22302  */
22303
22304
22305 /**
22306  * g_dbus_signal_info_unref:
22307  * @info: A #GDBusSignalInfo.
22308  *
22309  * If @info is statically allocated, does nothing. Otherwise decreases
22310  * the reference count of @info. When its reference count drops to 0,
22311  * the memory used is freed.
22312  *
22313  * Since: 2.26
22314  */
22315
22316
22317 /**
22318  * g_desktop_app_info_get_categories:
22319  * @info: a #GDesktopAppInfo
22320  *
22321  * Gets the categories from the desktop file.
22322  *
22323  * i.e. no attempt is made to split it by ';' or validate it.
22324  *
22325  * Returns: The unparsed Categories key from the desktop file;
22326  */
22327
22328
22329 /**
22330  * g_desktop_app_info_get_filename:
22331  * @info: a #GDesktopAppInfo
22332  *
22333  * When @info was created from a known filename, return it.  In some
22334  * situations such as the #GDesktopAppInfo returned from
22335  * g_desktop_app_info_new_from_keyfile(), this function will return %NULL.
22336  *
22337  * Returns: The full path to the file for @info, or %NULL if not known.
22338  * Since: 2.24
22339  */
22340
22341
22342 /**
22343  * g_desktop_app_info_get_generic_name:
22344  * @info: a #GDesktopAppInfo
22345  *
22346  * Gets the generic name from the destkop file.
22347  *
22348  * Returns: The value of the GenericName key
22349  */
22350
22351
22352 /**
22353  * g_desktop_app_info_get_is_hidden:
22354  * @info: a #GDesktopAppInfo.
22355  *
22356  * A desktop file is hidden if the Hidden key in it is
22357  * set to True.
22358  *
22359  * Returns: %TRUE if hidden, %FALSE otherwise.
22360  */
22361
22362
22363 /**
22364  * g_desktop_app_info_get_nodisplay:
22365  * @info: a #GDesktopAppInfo
22366  *
22367  * Gets the value of the NoDisplay key, which helps determine if the
22368  * application info should be shown in menus. See
22369  * #G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show().
22370  *
22371  * Returns: The value of the NoDisplay key
22372  * Since: 2.30
22373  */
22374
22375
22376 /**
22377  * g_desktop_app_info_get_show_in:
22378  * @info: a #GDesktopAppInfo
22379  * @desktop_env: a string specifying a desktop name
22380  *
22381  * Checks if the application info should be shown in menus that list available
22382  * applications for a specific name of the desktop, based on the
22383  * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal> keys.
22384  *
22385  * If @desktop_env is %NULL, then the name of the desktop set with
22386  * g_desktop_app_info_set_desktop_env() is used.
22387  *
22388  * Note that g_app_info_should_show() for @info will include this check (with
22389  * %NULL for @desktop_env) as well as additional checks.
22390  *
22391  * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal> keys, %FALSE
22392  * otherwise.
22393  *
22394  * Returns: %TRUE if the @info should be shown in @desktop_env according to the
22395  * Since: 2.30
22396  */
22397
22398
22399 /**
22400  * g_desktop_app_info_launch_uris_as_manager:
22401  * @appinfo: a #GDesktopAppInfo
22402  * @uris: (element-type utf8): List of URIs
22403  * @launch_context: a #GAppLaunchContext
22404  * @spawn_flags: #GSpawnFlags, used for each process
22405  * @user_setup: (scope call): a #GSpawnChildSetupFunc, used once for each process.
22406  * @user_setup_data: (closure user_setup): User data for @user_setup
22407  * @pid_callback: (scope call): Callback for child processes
22408  * @pid_callback_data: (closure pid_callback): User data for @callback
22409  * @error: return location for a #GError, or %NULL
22410  *
22411  * This function performs the equivalent of g_app_info_launch_uris(),
22412  * but is intended primarily for operating system components that
22413  * launch applications.  Ordinary applications should use
22414  * g_app_info_launch_uris().
22415  *
22416  * In contrast to g_app_info_launch_uris(), all processes created will
22417  * always be run directly as children as if by the UNIX fork()/exec()
22418  * calls.
22419  *
22420  * This guarantee allows additional control over the exact environment
22421  * of the child processes, which is provided via a setup function
22422  * @setup, as well as the process identifier of each child process via
22423  * @pid_callback.  See g_spawn_async() for more information about the
22424  * semantics of the @setup function.
22425  *
22426  * Returns: %TRUE on successful launch, %FALSE otherwise.
22427  */
22428
22429
22430 /**
22431  * g_desktop_app_info_lookup_get_default_for_uri_scheme:
22432  * @lookup: a #GDesktopAppInfoLookup
22433  * @uri_scheme: a string containing a URI scheme.
22434  *
22435  * Gets the default application for launching applications
22436  * using this URI scheme for a particular GDesktopAppInfoLookup
22437  * implementation.
22438  *
22439  * The GDesktopAppInfoLookup interface and this function is used
22440  * to implement g_app_info_get_default_for_uri_scheme() backends
22441  * in a GIO module. There is no reason for applications to use it
22442  * directly. Applications should use g_app_info_get_default_for_uri_scheme().
22443  *
22444  * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
22445  * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
22446  */
22447
22448
22449 /**
22450  * g_desktop_app_info_new:
22451  * @desktop_id: the desktop file id
22452  *
22453  * Creates a new #GDesktopAppInfo based on a desktop file id.
22454  *
22455  * A desktop file id is the basename of the desktop file, including the
22456  * .desktop extension. GIO is looking for a desktop file with this name
22457  * in the <filename>applications</filename> subdirectories of the XDG data
22458  * directories (i.e. the directories specified in the
22459  * <envar>XDG_DATA_HOME</envar> and <envar>XDG_DATA_DIRS</envar> environment
22460  * variables). GIO also supports the prefix-to-subdirectory mapping that is
22461  * described in the <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Menu Spec</ulink>
22462  * (i.e. a desktop id of kde-foo.desktop will match
22463  * <filename>/usr/share/applications/kde/foo.desktop</filename>).
22464  *
22465  * Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id
22466  */
22467
22468
22469 /**
22470  * g_desktop_app_info_new_from_filename:
22471  * @filename: the path of a desktop file, in the GLib filename encoding
22472  *
22473  * Creates a new #GDesktopAppInfo.
22474  *
22475  * Returns: a new #GDesktopAppInfo or %NULL on error.
22476  */
22477
22478
22479 /**
22480  * g_desktop_app_info_new_from_keyfile:
22481  * @key_file: an opened #GKeyFile
22482  *
22483  * Creates a new #GDesktopAppInfo.
22484  *
22485  * Returns: a new #GDesktopAppInfo or %NULL on error.
22486  * Since: 2.18
22487  */
22488
22489
22490 /**
22491  * g_desktop_app_info_set_desktop_env:
22492  * @desktop_env: a string specifying what desktop this is
22493  *
22494  * Sets the name of the desktop that the application is running in.
22495  * This is used by g_app_info_should_show() and
22496  * g_desktop_app_info_get_show_in() to evaluate the
22497  * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal>
22498  * desktop entry fields.
22499  *
22500  * The <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Desktop
22501  * Menu specification</ulink> recognizes the following:
22502  * <simplelist>
22503  * <member>GNOME</member>
22504  * <member>KDE</member>
22505  * <member>ROX</member>
22506  * <member>XFCE</member>
22507  * <member>Old</member>
22508  * </simplelist>
22509  *
22510  * Should be called only once; subsequent calls are ignored.
22511  */
22512
22513
22514 /**
22515  * g_drive_can_eject:
22516  * @drive: a #GDrive.
22517  *
22518  * Checks if a drive can be ejected.
22519  *
22520  * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise.
22521  */
22522
22523
22524 /**
22525  * g_drive_can_poll_for_media:
22526  * @drive: a #GDrive.
22527  *
22528  * Checks if a drive can be polled for media changes.
22529  *
22530  * %FALSE otherwise.
22531  *
22532  * Returns: %TRUE if the @drive can be polled for media changes,
22533  */
22534
22535
22536 /**
22537  * g_drive_can_start:
22538  * @drive: a #GDrive.
22539  *
22540  * Checks if a drive can be started.
22541  *
22542  * Returns: %TRUE if the @drive can be started, %FALSE otherwise.
22543  * Since: 2.22
22544  */
22545
22546
22547 /**
22548  * g_drive_can_start_degraded:
22549  * @drive: a #GDrive.
22550  *
22551  * Checks if a drive can be started degraded.
22552  *
22553  * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise.
22554  * Since: 2.22
22555  */
22556
22557
22558 /**
22559  * g_drive_can_stop:
22560  * @drive: a #GDrive.
22561  *
22562  * Checks if a drive can be stopped.
22563  *
22564  * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise.
22565  * Since: 2.22
22566  */
22567
22568
22569 /**
22570  * g_drive_eject:
22571  * @drive: a #GDrive.
22572  * @flags: flags affecting the unmount if required for eject
22573  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22574  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
22575  * @user_data: user data to pass to @callback
22576  *
22577  * Asynchronously ejects a drive.
22578  *
22579  * When the operation is finished, @callback will be called.
22580  * You can then call g_drive_eject_finish() to obtain the
22581  * result of the operation.
22582  *
22583  * Deprecated: 2.22: Use g_drive_eject_with_operation() instead.
22584  */
22585
22586
22587 /**
22588  * g_drive_eject_finish:
22589  * @drive: a #GDrive.
22590  * @result: a #GAsyncResult.
22591  * @error: a #GError, or %NULL
22592  *
22593  * Finishes ejecting a drive.
22594  *
22595  * %FALSE otherwise.
22596  *
22597  * Returns: %TRUE if the drive has been ejected successfully,
22598  * Deprecated: 2.22: Use g_drive_eject_with_operation_finish() instead.
22599  */
22600
22601
22602 /**
22603  * g_drive_eject_with_operation:
22604  * @drive: a #GDrive.
22605  * @flags: flags affecting the unmount if required for eject
22606  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
22607  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22608  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
22609  * @user_data: user data passed to @callback.
22610  *
22611  * Ejects a drive. This is an asynchronous operation, and is
22612  * finished by calling g_drive_eject_with_operation_finish() with the @drive
22613  * and #GAsyncResult data returned in the @callback.
22614  *
22615  * Since: 2.22
22616  */
22617
22618
22619 /**
22620  * g_drive_eject_with_operation_finish:
22621  * @drive: a #GDrive.
22622  * @result: a #GAsyncResult.
22623  * @error: a #GError location to store the error occuring, or %NULL to ignore.
22624  *
22625  * Finishes ejecting a drive. If any errors occurred during the operation,
22626  * @error will be set to contain the errors and %FALSE will be returned.
22627  *
22628  * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise.
22629  * Since: 2.22
22630  */
22631
22632
22633 /**
22634  * g_drive_enumerate_identifiers:
22635  * @drive: a #GDrive
22636  *
22637  * Gets the kinds of identifiers that @drive has.
22638  * Use g_drive_get_identifer() to obtain the identifiers
22639  * themselves.
22640  *
22641  * array of strings containing kinds of identifiers. Use g_strfreev()
22642  * to free.
22643  *
22644  * Returns: (transfer full) (array zero-terminated=1): a %NULL-terminated
22645  */
22646
22647
22648 /**
22649  * g_drive_get_icon:
22650  * @drive: a #GDrive.
22651  *
22652  * Gets the icon for @drive.
22653  *
22654  * Free the returned object with g_object_unref().
22655  *
22656  * Returns: (transfer full): #GIcon for the @drive.
22657  */
22658
22659
22660 /**
22661  * g_drive_get_identifier:
22662  * @drive: a #GDrive
22663  * @kind: the kind of identifier to return
22664  *
22665  * Gets the identifier of the given kind for @drive.
22666  *
22667  * requested identfier, or %NULL if the #GDrive
22668  * doesn't have this kind of identifier.
22669  *
22670  * Returns: a newly allocated string containing the
22671  */
22672
22673
22674 /**
22675  * g_drive_get_name:
22676  * @drive: a #GDrive.
22677  *
22678  * Gets the name of @drive.
22679  *
22680  * string should be freed when no longer needed.
22681  *
22682  * Returns: a string containing @drive's name. The returned
22683  */
22684
22685
22686 /**
22687  * g_drive_get_start_stop_type:
22688  * @drive: a #GDrive.
22689  *
22690  * Gets a hint about how a drive can be started/stopped.
22691  *
22692  * Returns: A value from the #GDriveStartStopType enumeration.
22693  * Since: 2.22
22694  */
22695
22696
22697 /**
22698  * g_drive_get_volumes:
22699  * @drive: a #GDrive.
22700  *
22701  * Get a list of mountable volumes for @drive.
22702  *
22703  * The returned list should be freed with g_list_free(), after
22704  * its elements have been unreffed with g_object_unref().
22705  *
22706  * Returns: (element-type GVolume) (transfer full): #GList containing any #GVolume objects on the given @drive.
22707  */
22708
22709
22710 /**
22711  * g_drive_has_media:
22712  * @drive: a #GDrive.
22713  *
22714  * Checks if the @drive has media. Note that the OS may not be polling
22715  * the drive for media changes; see g_drive_is_media_check_automatic()
22716  * for more details.
22717  *
22718  * Returns: %TRUE if @drive has media, %FALSE otherwise.
22719  */
22720
22721
22722 /**
22723  * g_drive_has_volumes:
22724  * @drive: a #GDrive.
22725  *
22726  * Check if @drive has any mountable volumes.
22727  *
22728  * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise.
22729  */
22730
22731
22732 /**
22733  * g_drive_is_media_check_automatic:
22734  * @drive: a #GDrive.
22735  *
22736  * Checks if @drive is capabable of automatically detecting media changes.
22737  *
22738  * media changes, %FALSE otherwise.
22739  *
22740  * Returns: %TRUE if the @drive is capabable of automatically detecting
22741  */
22742
22743
22744 /**
22745  * g_drive_is_media_removable:
22746  * @drive: a #GDrive.
22747  *
22748  * Checks if the @drive supports removable media.
22749  *
22750  * Returns: %TRUE if @drive supports removable media, %FALSE otherwise.
22751  */
22752
22753
22754 /**
22755  * g_drive_poll_for_media:
22756  * @drive: a #GDrive.
22757  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22758  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
22759  * @user_data: user data to pass to @callback
22760  *
22761  * Asynchronously polls @drive to see if media has been inserted or removed.
22762  *
22763  * When the operation is finished, @callback will be called.
22764  * You can then call g_drive_poll_for_media_finish() to obtain the
22765  * result of the operation.
22766  */
22767
22768
22769 /**
22770  * g_drive_poll_for_media_finish:
22771  * @drive: a #GDrive.
22772  * @result: a #GAsyncResult.
22773  * @error: a #GError, or %NULL
22774  *
22775  * Finishes an operation started with g_drive_poll_for_media() on a drive.
22776  *
22777  * %FALSE otherwise.
22778  *
22779  * Returns: %TRUE if the drive has been poll_for_mediaed successfully,
22780  */
22781
22782
22783 /**
22784  * g_drive_start:
22785  * @drive: a #GDrive.
22786  * @flags: flags affecting the start operation.
22787  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
22788  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22789  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
22790  * @user_data: user data to pass to @callback
22791  *
22792  * Asynchronously starts a drive.
22793  *
22794  * When the operation is finished, @callback will be called.
22795  * You can then call g_drive_start_finish() to obtain the
22796  * result of the operation.
22797  *
22798  * Since: 2.22
22799  */
22800
22801
22802 /**
22803  * g_drive_start_finish:
22804  * @drive: a #GDrive.
22805  * @result: a #GAsyncResult.
22806  * @error: a #GError, or %NULL
22807  *
22808  * Finishes starting a drive.
22809  *
22810  * %FALSE otherwise.
22811  *
22812  * Returns: %TRUE if the drive has been started successfully,
22813  * Since: 2.22
22814  */
22815
22816
22817 /**
22818  * g_drive_stop:
22819  * @drive: a #GDrive.
22820  * @flags: flags affecting the unmount if required for stopping.
22821  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
22822  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22823  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
22824  * @user_data: user data to pass to @callback
22825  *
22826  * Asynchronously stops a drive.
22827  *
22828  * When the operation is finished, @callback will be called.
22829  * You can then call g_drive_stop_finish() to obtain the
22830  * result of the operation.
22831  *
22832  * Since: 2.22
22833  */
22834
22835
22836 /**
22837  * g_drive_stop_finish:
22838  * @drive: a #GDrive.
22839  * @result: a #GAsyncResult.
22840  * @error: a #GError, or %NULL
22841  *
22842  * Finishes stopping a drive.
22843  *
22844  * %FALSE otherwise.
22845  *
22846  * Returns: %TRUE if the drive has been stopped successfully,
22847  * Since: 2.22
22848  */
22849
22850
22851 /**
22852  * g_emblem_get_icon:
22853  * @emblem: a #GEmblem from which the icon should be extracted.
22854  *
22855  * Gives back the icon from @emblem.
22856  *
22857  * the emblem and should not be modified or freed.
22858  *
22859  * Returns: (transfer none): a #GIcon. The returned object belongs to
22860  * Since: 2.18
22861  */
22862
22863
22864 /**
22865  * g_emblem_get_origin:
22866  * @emblem: a #GEmblem
22867  *
22868  * Gets the origin of the emblem.
22869  *
22870  * Returns: (transfer none): the origin of the emblem
22871  * Since: 2.18
22872  */
22873
22874
22875 /**
22876  * g_emblem_new:
22877  * @icon: a GIcon containing the icon.
22878  *
22879  * Creates a new emblem for @icon.
22880  *
22881  * Returns: a new #GEmblem.
22882  * Since: 2.18
22883  */
22884
22885
22886 /**
22887  * g_emblem_new_with_origin:
22888  * @icon: a GIcon containing the icon.
22889  * @origin: a GEmblemOrigin enum defining the emblem's origin
22890  *
22891  * Creates a new emblem for @icon.
22892  *
22893  * Returns: a new #GEmblem.
22894  * Since: 2.18
22895  */
22896
22897
22898 /**
22899  * g_emblemed_icon_add_emblem:
22900  * @emblemed: a #GEmblemedIcon
22901  * @emblem: a #GEmblem
22902  *
22903  * Adds @emblem to the #GList of #GEmblem <!-- -->s.
22904  *
22905  * Since: 2.18
22906  */
22907
22908
22909 /**
22910  * g_emblemed_icon_clear_emblems:
22911  * @emblemed: a #GEmblemedIcon
22912  *
22913  * Removes all the emblems from @icon.
22914  *
22915  * Since: 2.28
22916  */
22917
22918
22919 /**
22920  * g_emblemed_icon_get_emblems:
22921  * @emblemed: a #GEmblemedIcon
22922  *
22923  * Gets the list of emblems for the @icon.
22924  *
22925  * #GEmblem <!-- -->s that is owned by @emblemed
22926  *
22927  * Returns: (element-type Gio.Emblem) (transfer none): a #GList of
22928  * Since: 2.18
22929  */
22930
22931
22932 /**
22933  * g_emblemed_icon_get_icon:
22934  * @emblemed: a #GEmblemedIcon
22935  *
22936  * Gets the main icon for @emblemed.
22937  *
22938  * Returns: (transfer none): a #GIcon that is owned by @emblemed
22939  * Since: 2.18
22940  */
22941
22942
22943 /**
22944  * g_emblemed_icon_new:
22945  * @icon: a #GIcon
22946  * @emblem: (allow-none): a #GEmblem, or %NULL
22947  *
22948  * Creates a new emblemed icon for @icon with the emblem @emblem.
22949  *
22950  * Returns: (transfer full): a new #GIcon
22951  * Since: 2.18
22952  */
22953
22954
22955 /**
22956  * g_file_append_to:
22957  * @file: input #GFile.
22958  * @flags: a set of #GFileCreateFlags.
22959  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22960  * @error: a #GError, or %NULL
22961  *
22962  * Gets an output stream for appending data to the file. If
22963  * the file doesn't already exist it is created.
22964  *
22965  * By default files created are generally readable by everyone,
22966  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
22967  * will be made readable only to the current user, to the level that
22968  * is supported on the target filesystem.
22969  *
22970  * If @cancellable is not %NULL, then the operation can be cancelled by
22971  * triggering the cancellable object from another thread. If the operation
22972  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22973  *
22974  * Some file systems don't allow all file names, and may
22975  * return an %G_IO_ERROR_INVALID_FILENAME error.
22976  * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will be
22977  * returned. Other errors are possible too, and depend on what kind of
22978  * filesystem the file is on.
22979  *
22980  * Free the returned object with g_object_unref().
22981  *
22982  * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
22983  */
22984
22985
22986 /**
22987  * g_file_append_to_async:
22988  * @file: input #GFile.
22989  * @flags: a set of #GFileCreateFlags.
22990  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22991  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22992  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22993  * @user_data: (closure): the data to pass to callback function
22994  *
22995  * Asynchronously opens @file for appending.
22996  *
22997  * For more details, see g_file_append_to() which is
22998  * the synchronous version of this call.
22999  *
23000  * When the operation is finished, @callback will be called. You can then call
23001  * g_file_append_to_finish() to get the result of the operation.
23002  */
23003
23004
23005 /**
23006  * g_file_append_to_finish:
23007  * @file: input #GFile.
23008  * @res: #GAsyncResult
23009  * @error: a #GError, or %NULL
23010  *
23011  * Finishes an asynchronous file append operation started with
23012  * g_file_append_to_async().
23013  *
23014  * Free the returned object with g_object_unref().
23015  *
23016  * Returns: (transfer full): a valid #GFileOutputStream or %NULL on error.
23017  */
23018
23019
23020 /**
23021  * g_file_attribute_info_list_add:
23022  * @list: a #GFileAttributeInfoList.
23023  * @name: the name of the attribute to add.
23024  * @type: the #GFileAttributeType for the attribute.
23025  * @flags: #GFileAttributeInfoFlags for the attribute.
23026  *
23027  * Adds a new attribute with @name to the @list, setting
23028  * its @type and @flags.
23029  */
23030
23031
23032 /**
23033  * g_file_attribute_info_list_dup:
23034  * @list: a #GFileAttributeInfoList to duplicate.
23035  *
23036  * Makes a duplicate of a file attribute info list.
23037  *
23038  * Returns: a copy of the given @list.
23039  */
23040
23041
23042 /**
23043  * g_file_attribute_info_list_lookup:
23044  * @list: a #GFileAttributeInfoList.
23045  * @name: the name of the attribute to lookup.
23046  *
23047  * Gets the file attribute with the name @name from @list.
23048  *
23049  * attribute isn't found.
23050  *
23051  * Returns: a #GFileAttributeInfo for the @name, or %NULL if an
23052  */
23053
23054
23055 /**
23056  * g_file_attribute_info_list_new:
23057  *
23058  * Creates a new file attribute info list.
23059  *
23060  * Returns: a #GFileAttributeInfoList.
23061  */
23062
23063
23064 /**
23065  * g_file_attribute_info_list_ref:
23066  * @list: a #GFileAttributeInfoList to reference.
23067  *
23068  * References a file attribute info list.
23069  *
23070  * Returns: #GFileAttributeInfoList or %NULL on error.
23071  */
23072
23073
23074 /**
23075  * g_file_attribute_info_list_unref:
23076  * @list: The #GFileAttributeInfoList to unreference.
23077  *
23078  * Removes a reference from the given @list. If the reference count
23079  * falls to zero, the @list is deleted.
23080  */
23081
23082
23083 /**
23084  * g_file_attribute_matcher_enumerate_namespace:
23085  * @matcher: a #GFileAttributeMatcher.
23086  * @ns: a string containing a file attribute namespace.
23087  *
23088  * Checks if the matcher will match all of the keys in a given namespace.
23089  * This will always return %TRUE if a wildcard character is in use (e.g. if
23090  * matcher was created with "standard::*" and @ns is "standard", or if matcher was created
23091  * using "*" and namespace is anything.)
23092  *
23093  * TODO: this is awkwardly worded.
23094  *
23095  * in the given @ns, %FALSE otherwise.
23096  *
23097  * Returns: %TRUE if the matcher matches all of the entries
23098  */
23099
23100
23101 /**
23102  * g_file_attribute_matcher_enumerate_next:
23103  * @matcher: a #GFileAttributeMatcher.
23104  *
23105  * Gets the next matched attribute from a #GFileAttributeMatcher.
23106  *
23107  * no more attribute exist.
23108  *
23109  * Returns: a string containing the next attribute or %NULL if
23110  */
23111
23112
23113 /**
23114  * g_file_attribute_matcher_matches:
23115  * @matcher: a #GFileAttributeMatcher.
23116  * @attribute: a file attribute key.
23117  *
23118  * Checks if an attribute will be matched by an attribute matcher. If
23119  * the matcher was created with the "*" matching string, this function
23120  * will always return %TRUE.
23121  *
23122  * Returns: %TRUE if @attribute matches @matcher. %FALSE otherwise.
23123  */
23124
23125
23126 /**
23127  * g_file_attribute_matcher_matches_only:
23128  * @matcher: a #GFileAttributeMatcher.
23129  * @attribute: a file attribute key.
23130  *
23131  * Checks if a attribute matcher only matches a given attribute. Always
23132  * returns %FALSE if "*" was used when creating the matcher.
23133  *
23134  * Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise.
23135  */
23136
23137
23138 /**
23139  * g_file_attribute_matcher_new:
23140  * @attributes: an attribute string to match.
23141  *
23142  * Creates a new file attribute matcher, which matches attributes
23143  * against a given string. #GFileAttributeMatcher<!-- -->s are reference
23144  * counted structures, and are created with a reference count of 1. If
23145  * the number of references falls to 0, the #GFileAttributeMatcher is
23146  * automatically destroyed.
23147  *
23148  * The @attribute string should be formatted with specific keys separated
23149  * from namespaces with a double colon. Several "namespace::key" strings may be
23150  * concatenated with a single comma (e.g. "standard::type,standard::is-hidden").
23151  * The wildcard "*" may be used to match all keys and namespaces, or
23152  * "namespace::*" will match all keys in a given namespace.
23153  *
23154  * Examples of strings to use:
23155  * <table>
23156  * <title>File Attribute Matcher strings and results</title>
23157  * <tgroup cols='2' align='left'><thead>
23158  * <row><entry> Matcher String </entry><entry> Matches </entry></row></thead>
23159  * <tbody>
23160  * <row><entry>"*"</entry><entry>matches all attributes.</entry></row>
23161  * <row><entry>"standard::is-hidden"</entry><entry>matches only the key is-hidden in the standard namespace.</entry></row>
23162  * <row><entry>"standard::type,unix::*"</entry><entry>matches the type key in the standard namespace and
23163  * all keys in the unix namespace.</entry></row>
23164  * </tbody></tgroup>
23165  * </table>
23166  *
23167  * Returns: a #GFileAttributeMatcher.
23168  */
23169
23170
23171 /**
23172  * g_file_attribute_matcher_ref:
23173  * @matcher: a #GFileAttributeMatcher.
23174  *
23175  * References a file attribute matcher.
23176  *
23177  * Returns: a #GFileAttributeMatcher.
23178  */
23179
23180
23181 /**
23182  * g_file_attribute_matcher_unref:
23183  * @matcher: a #GFileAttributeMatcher.
23184  *
23185  * Unreferences @matcher. If the reference count falls below 1,
23186  * the @matcher is automatically freed.
23187  */
23188
23189
23190 /**
23191  * g_file_copy:
23192  * @source: input #GFile.
23193  * @destination: destination #GFile
23194  * @flags: set of #GFileCopyFlags
23195  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23196  * @progress_callback: (scope call): function to callback with progress information
23197  * @progress_callback_data: (closure): user data to pass to @progress_callback
23198  * @error: #GError to set on error, or %NULL
23199  *
23200  * Copies the file @source to the location specified by @destination.
23201  * Can not handle recursive copies of directories.
23202  *
23203  * If the flag #G_FILE_COPY_OVERWRITE is specified an already
23204  * existing @destination file is overwritten.
23205  *
23206  * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
23207  * will be copied as symlinks, otherwise the target of the
23208  * @source symlink will be copied.
23209  *
23210  * If @cancellable is not %NULL, then the operation can be cancelled by
23211  * triggering the cancellable object from another thread. If the operation
23212  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23213  *
23214  * If @progress_callback is not %NULL, then the operation can be monitored by
23215  * setting this to a #GFileProgressCallback function. @progress_callback_data
23216  * will be passed to this function. It is guaranteed that this callback will
23217  * be called after all data has been transferred with the total number of bytes
23218  * copied during the operation.
23219  *
23220  * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
23221  * error is returned, independent on the status of the @destination.
23222  *
23223  * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
23224  * error G_IO_ERROR_EXISTS is returned.
23225  *
23226  * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
23227  * error is returned. If trying to overwrite a directory with a directory the
23228  * G_IO_ERROR_WOULD_MERGE error is returned.
23229  *
23230  * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
23231  * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
23232  * is returned.
23233  *
23234  * If you are interested in copying the #GFile object itself (not the on-disk
23235  * file), see g_file_dup().
23236  *
23237  * Returns: %TRUE on success, %FALSE otherwise.
23238  */
23239
23240
23241 /**
23242  * g_file_copy_async: (skip)
23243  * @source: input #GFile.
23244  * @destination: destination #GFile
23245  * @flags: set of #GFileCopyFlags
23246  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23247  * @cancellable: optional #GCancellable object, %NULL to ignore.
23248  * @progress_callback: function to callback with progress information
23249  * @progress_callback_data: user data to pass to @progress_callback
23250  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
23251  * @user_data: the data to pass to callback function
23252  *
23253  * Copies the file @source to the location specified by @destination
23254  * asynchronously. For details of the behaviour, see g_file_copy().
23255  *
23256  * If @progress_callback is not %NULL, then that function that will be called
23257  * just like in g_file_copy(), however the callback will run in the main loop,
23258  * not in the thread that is doing the I/O operation.
23259  *
23260  * When the operation is finished, @callback will be called. You can then call
23261  * g_file_copy_finish() to get the result of the operation.
23262  */
23263
23264
23265 /**
23266  * g_file_copy_attributes:
23267  * @source: a #GFile with attributes.
23268  * @destination: a #GFile to copy attributes to.
23269  * @flags: a set of #GFileCopyFlags.
23270  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23271  * @error: a #GError, %NULL to ignore.
23272  *
23273  * Copies the file attributes from @source to @destination.
23274  *
23275  * Normally only a subset of the file attributes are copied,
23276  * those that are copies in a normal file copy operation
23277  * (which for instance does not include e.g. owner). However
23278  * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then
23279  * all the metadata that is possible to copy is copied. This
23280  * is useful when implementing move by copy + delete source.
23281  *
23282  * Returns: %TRUE if the attributes were copied successfully, %FALSE otherwise.
23283  */
23284
23285
23286 /**
23287  * g_file_copy_finish:
23288  * @file: input #GFile.
23289  * @res: a #GAsyncResult.
23290  * @error: a #GError, or %NULL
23291  *
23292  * Finishes copying the file started with
23293  * g_file_copy_async().
23294  *
23295  * Returns: a %TRUE on success, %FALSE on error.
23296  */
23297
23298
23299 /**
23300  * g_file_create:
23301  * @file: input #GFile.
23302  * @flags: a set of #GFileCreateFlags.
23303  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23304  * @error: a #GError, or %NULL
23305  *
23306  * Creates a new file and returns an output stream for writing to it.
23307  * The file must not already exist.
23308  *
23309  * By default files created are generally readable by everyone,
23310  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
23311  * will be made readable only to the current user, to the level that
23312  * is supported on the target filesystem.
23313  *
23314  * If @cancellable is not %NULL, then the operation can be cancelled by
23315  * triggering the cancellable object from another thread. If the operation
23316  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23317  *
23318  * If a file or directory with this name already exists the G_IO_ERROR_EXISTS
23319  * error will be returned.
23320  * Some file systems don't allow all file names, and may
23321  * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
23322  * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
23323  * Other errors are possible too, and depend on what kind of
23324  * filesystem the file is on.
23325  *
23326  * %NULL on error.
23327  * Free the returned object with g_object_unref().
23328  *
23329  * Returns: (transfer full): a #GFileOutputStream for the newly created file, or
23330  */
23331
23332
23333 /**
23334  * g_file_create_async:
23335  * @file: input #GFile.
23336  * @flags: a set of #GFileCreateFlags.
23337  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23338  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23339  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
23340  * @user_data: (closure): the data to pass to callback function
23341  *
23342  * Asynchronously creates a new file and returns an output stream for writing to it.
23343  * The file must not already exist.
23344  *
23345  * For more details, see g_file_create() which is
23346  * the synchronous version of this call.
23347  *
23348  * When the operation is finished, @callback will be called. You can then call
23349  * g_file_create_finish() to get the result of the operation.
23350  */
23351
23352
23353 /**
23354  * g_file_create_finish:
23355  * @file: input #GFile.
23356  * @res: a #GAsyncResult.
23357  * @error: a #GError, or %NULL
23358  *
23359  * Finishes an asynchronous file create operation started with
23360  * g_file_create_async().
23361  *
23362  * Free the returned object with g_object_unref().
23363  *
23364  * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
23365  */
23366
23367
23368 /**
23369  * g_file_create_readwrite:
23370  * @file: a #GFile
23371  * @flags: a set of #GFileCreateFlags
23372  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
23373  * @error: return location for a #GError, or %NULL
23374  *
23375  * Creates a new file and returns a stream for reading and writing to it.
23376  * The file must not already exist.
23377  *
23378  * By default files created are generally readable by everyone,
23379  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
23380  * will be made readable only to the current user, to the level that
23381  * is supported on the target filesystem.
23382  *
23383  * If @cancellable is not %NULL, then the operation can be cancelled by
23384  * triggering the cancellable object from another thread. If the operation
23385  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23386  *
23387  * If a file or directory with this name already exists the %G_IO_ERROR_EXISTS
23388  * error will be returned. Some file systems don't allow all file names,
23389  * and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name
23390  * is too long, %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors
23391  * are possible too, and depend on what kind of filesystem the file is on.
23392  *
23393  * Note that in many non-local file cases read and write streams are not
23394  * supported, so make sure you really need to do read and write streaming,
23395  * rather than just opening for reading or writing.
23396  *
23397  * Free the returned object with g_object_unref().
23398  *
23399  * Returns: (transfer full): a #GFileIOStream for the newly created file, or %NULL on error.
23400  * Since: 2.22
23401  */
23402
23403
23404 /**
23405  * g_file_create_readwrite_async:
23406  * @file: input #GFile
23407  * @flags: a set of #GFileCreateFlags
23408  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
23409  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
23410  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
23411  * @user_data: (closure): the data to pass to callback function
23412  *
23413  * Asynchronously creates a new file and returns a stream for reading and
23414  * writing to it. The file must not already exist.
23415  *
23416  * For more details, see g_file_create_readwrite() which is
23417  * the synchronous version of this call.
23418  *
23419  * When the operation is finished, @callback will be called. You can then
23420  * call g_file_create_readwrite_finish() to get the result of the operation.
23421  *
23422  * Since: 2.22
23423  */
23424
23425
23426 /**
23427  * g_file_create_readwrite_finish:
23428  * @file: input #GFile
23429  * @res: a #GAsyncResult
23430  * @error: a #GError, or %NULL
23431  *
23432  * Finishes an asynchronous file create operation started with
23433  * g_file_create_readwrite_async().
23434  *
23435  * Free the returned object with g_object_unref().
23436  *
23437  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
23438  * Since: 2.22
23439  */
23440
23441
23442 /**
23443  * g_file_delete:
23444  * @file: input #GFile.
23445  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23446  * @error: a #GError, or %NULL
23447  *
23448  * Deletes a file. If the @file is a directory, it will only be deleted if it
23449  * is empty.
23450  *
23451  * If @cancellable is not %NULL, then the operation can be cancelled by
23452  * triggering the cancellable object from another thread. If the operation
23453  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23454  *
23455  * Virtual: delete_file
23456  * Returns: %TRUE if the file was deleted. %FALSE otherwise.
23457  */
23458
23459
23460 /**
23461  * g_file_descriptor_based_get_fd:
23462  * @fd_based: a #GFileDescriptorBased.
23463  *
23464  * Gets the underlying file descriptor.
23465  *
23466  * Returns: The file descriptor
23467  * Since: 2.24
23468  */
23469
23470
23471 /**
23472  * g_file_dup:
23473  * @file: input #GFile.
23474  *
23475  * Duplicates a #GFile handle. This operation does not duplicate
23476  * the actual file or directory represented by the #GFile; see
23477  * g_file_copy() if attempting to copy a file.
23478  *
23479  * This call does no blocking i/o.
23480  *
23481  * Returns: (transfer full): a new #GFile that is a duplicate of the given #GFile.
23482  */
23483
23484
23485 /**
23486  * g_file_eject_mountable:
23487  * @file: input #GFile.
23488  * @flags: flags affecting the operation
23489  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23490  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
23491  * @user_data: (closure): the data to pass to callback function
23492  *
23493  * Starts an asynchronous eject on a mountable.
23494  * When this operation has completed, @callback will be called with
23495  * @user_user data, and the operation can be finalized with
23496  * g_file_eject_mountable_finish().
23497  *
23498  * If @cancellable is not %NULL, then the operation can be cancelled by
23499  * triggering the cancellable object from another thread. If the operation
23500  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23501  *
23502  * Deprecated: 2.22: Use g_file_eject_mountable_with_operation() instead.
23503  */
23504
23505
23506 /**
23507  * g_file_eject_mountable_finish:
23508  * @file: input #GFile.
23509  * @result: a #GAsyncResult.
23510  * @error: a #GError, or %NULL
23511  *
23512  * Finishes an asynchronous eject operation started by
23513  * g_file_eject_mountable().
23514  *
23515  * otherwise.
23516  *
23517  * Returns: %TRUE if the @file was ejected successfully. %FALSE
23518  * Deprecated: 2.22: Use g_file_eject_mountable_with_operation_finish() instead.
23519  */
23520
23521
23522 /**
23523  * g_file_eject_mountable_with_operation:
23524  * @file: input #GFile.
23525  * @flags: flags affecting the operation
23526  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
23527  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23528  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
23529  * @user_data: (closure): the data to pass to callback function
23530  *
23531  * Starts an asynchronous eject on a mountable.
23532  * When this operation has completed, @callback will be called with
23533  * @user_user data, and the operation can be finalized with
23534  * g_file_eject_mountable_with_operation_finish().
23535  *
23536  * If @cancellable is not %NULL, then the operation can be cancelled by
23537  * triggering the cancellable object from another thread. If the operation
23538  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23539  *
23540  * Since: 2.22
23541  */
23542
23543
23544 /**
23545  * g_file_eject_mountable_with_operation_finish:
23546  * @file: input #GFile.
23547  * @result: a #GAsyncResult.
23548  * @error: a #GError, or %NULL
23549  *
23550  * Finishes an asynchronous eject operation started by
23551  * g_file_eject_mountable_with_operation().
23552  *
23553  * otherwise.
23554  *
23555  * Returns: %TRUE if the @file was ejected successfully. %FALSE
23556  * Since: 2.22
23557  */
23558
23559
23560 /**
23561  * g_file_enumerate_children:
23562  * @file: input #GFile.
23563  * @attributes: an attribute query string.
23564  * @flags: a set of #GFileQueryInfoFlags.
23565  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23566  * @error: #GError for error reporting.
23567  *
23568  * Gets the requested information about the files in a directory. The result
23569  * is a #GFileEnumerator object that will give out #GFileInfo objects for
23570  * all the files in the directory.
23571  *
23572  * The @attributes value is a string that specifies the file attributes that
23573  * should be gathered. It is not an error if it's not possible to read a particular
23574  * requested attribute from a file - it just won't be set. @attributes should
23575  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
23576  * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
23577  * namespace. An example attribute query be "standard::*,owner::user".
23578  * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
23579  *
23580  * If @cancellable is not %NULL, then the operation can be cancelled by
23581  * triggering the cancellable object from another thread. If the operation
23582  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23583  *
23584  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
23585  * If the file is not a directory, the G_FILE_ERROR_NOTDIR error will be returned.
23586  * Other errors are possible too.
23587  *
23588  * Free the returned object with g_object_unref().
23589  *
23590  * Returns: (transfer full): A #GFileEnumerator if successful, %NULL on error.
23591  */
23592
23593
23594 /**
23595  * g_file_enumerate_children_async:
23596  * @file: input #GFile.
23597  * @attributes: an attribute query string.
23598  * @flags: a set of #GFileQueryInfoFlags.
23599  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23600  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23601  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
23602  * @user_data: (closure): the data to pass to callback function
23603  *
23604  * Asynchronously gets the requested information about the files in a directory. The result
23605  * is a #GFileEnumerator object that will give out #GFileInfo objects for
23606  * all the files in the directory.
23607  *
23608  * For more details, see g_file_enumerate_children() which is
23609  * the synchronous version of this call.
23610  *
23611  * When the operation is finished, @callback will be called. You can then call
23612  * g_file_enumerate_children_finish() to get the result of the operation.
23613  */
23614
23615
23616 /**
23617  * g_file_enumerate_children_finish:
23618  * @file: input #GFile.
23619  * @res: a #GAsyncResult.
23620  * @error: a #GError.
23621  *
23622  * Finishes an async enumerate children operation.
23623  * See g_file_enumerate_children_async().
23624  *
23625  * Free the returned object with g_object_unref().
23626  *
23627  * Returns: (transfer full): a #GFileEnumerator or %NULL if an error occurred.
23628  */
23629
23630
23631 /**
23632  * g_file_enumerator_close:
23633  * @enumerator: a #GFileEnumerator.
23634  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23635  * @error: location to store the error occuring, or %NULL to ignore
23636  *
23637  * Releases all resources used by this enumerator, making the
23638  * enumerator return %G_IO_ERROR_CLOSED on all calls.
23639  *
23640  * This will be automatically called when the last reference
23641  * is dropped, but you might want to call this function to make
23642  * sure resources are released as early as possible.
23643  *
23644  * Returns: #TRUE on success or #FALSE on error.
23645  */
23646
23647
23648 /**
23649  * g_file_enumerator_close_async:
23650  * @enumerator: a #GFileEnumerator.
23651  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23652  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23653  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
23654  * @user_data: (closure): the data to pass to callback function
23655  *
23656  * Asynchronously closes the file enumerator.
23657  *
23658  * If @cancellable is not %NULL, then the operation can be cancelled by
23659  * triggering the cancellable object from another thread. If the operation
23660  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in
23661  * g_file_enumerator_close_finish().
23662  */
23663
23664
23665 /**
23666  * g_file_enumerator_close_finish:
23667  * @enumerator: a #GFileEnumerator.
23668  * @result: a #GAsyncResult.
23669  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23670  *
23671  * Finishes closing a file enumerator, started from g_file_enumerator_close_async().
23672  *
23673  * If the file enumerator was already closed when g_file_enumerator_close_async()
23674  * was called, then this function will report %G_IO_ERROR_CLOSED in @error, and
23675  * return %FALSE. If the file enumerator had pending operation when the close
23676  * operation was started, then this function will report %G_IO_ERROR_PENDING, and
23677  * return %FALSE.  If @cancellable was not %NULL, then the operation may have been
23678  * cancelled by triggering the cancellable object from another thread. If the operation
23679  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
23680  * returned.
23681  *
23682  * Returns: %TRUE if the close operation has finished successfully.
23683  */
23684
23685
23686 /**
23687  * g_file_enumerator_get_container:
23688  * @enumerator: a #GFileEnumerator
23689  *
23690  * Get the #GFile container which is being enumerated.
23691  *
23692  * Returns: (transfer none): the #GFile which is being enumerated.
23693  * Since: 2.18
23694  */
23695
23696
23697 /**
23698  * g_file_enumerator_has_pending:
23699  * @enumerator: a #GFileEnumerator.
23700  *
23701  * Checks if the file enumerator has pending operations.
23702  *
23703  * Returns: %TRUE if the @enumerator has pending operations.
23704  */
23705
23706
23707 /**
23708  * g_file_enumerator_is_closed:
23709  * @enumerator: a #GFileEnumerator.
23710  *
23711  * Checks if the file enumerator has been closed.
23712  *
23713  * Returns: %TRUE if the @enumerator is closed.
23714  */
23715
23716
23717 /**
23718  * g_file_enumerator_next_file:
23719  * @enumerator: a #GFileEnumerator.
23720  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23721  * @error: location to store the error occuring, or %NULL to ignore
23722  *
23723  * Returns information for the next file in the enumerated object.
23724  * Will block until the information is available. The #GFileInfo
23725  * returned from this function will contain attributes that match the
23726  * attribute string that was passed when the #GFileEnumerator was created.
23727  *
23728  * On error, returns %NULL and sets @error to the error. If the
23729  * enumerator is at the end, %NULL will be returned and @error will
23730  * be unset.
23731  *
23732  * Free the returned object with g_object_unref() when no longer needed.
23733  *
23734  * Returns: (transfer full): A #GFileInfo or %NULL on error or end of enumerator.
23735  */
23736
23737
23738 /**
23739  * g_file_enumerator_next_files_async:
23740  * @enumerator: a #GFileEnumerator.
23741  * @num_files: the number of file info objects to request
23742  * @io_priority: the <link linkend="gioscheduler">io priority</link> of the request.
23743  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23744  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
23745  * @user_data: (closure): the data to pass to callback function
23746  *
23747  * Request information for a number of files from the enumerator asynchronously.
23748  * When all i/o for the operation is finished the @callback will be called with
23749  * the requested information.
23750  *
23751  * The callback can be called with less than @num_files files in case of error
23752  * or at the end of the enumerator. In case of a partial error the callback will
23753  * be called with any succeeding items and no error, and on the next request the
23754  * error will be reported. If a request is cancelled the callback will be called
23755  * with %G_IO_ERROR_CANCELLED.
23756  *
23757  * During an async request no other sync and async calls are allowed, and will
23758  * result in %G_IO_ERROR_PENDING errors.
23759  *
23760  * Any outstanding i/o request with higher priority (lower numerical value) will
23761  * be executed before an outstanding request with lower priority. Default
23762  * priority is %G_PRIORITY_DEFAULT.
23763  */
23764
23765
23766 /**
23767  * g_file_enumerator_next_files_finish:
23768  * @enumerator: a #GFileEnumerator.
23769  * @result: a #GAsyncResult.
23770  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23771  *
23772  * Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
23773  *
23774  * g_list_free() and unref the infos with g_object_unref() when you're
23775  * done with them.
23776  *
23777  * Returns: (transfer full) (element-type Gio.FileInfo): a #GList of #GFileInfo<!---->s. You must free the list with
23778  */
23779
23780
23781 /**
23782  * g_file_enumerator_set_pending:
23783  * @enumerator: a #GFileEnumerator.
23784  * @pending: a boolean value.
23785  *
23786  * Sets the file enumerator as having pending operations.
23787  */
23788
23789
23790 /**
23791  * g_file_equal:
23792  * @file1: the first #GFile.
23793  * @file2: the second #GFile.
23794  *
23795  * Checks equality of two given #GFile<!-- -->s. Note that two
23796  * #GFile<!-- -->s that differ can still refer to the same
23797  * file on the filesystem due to various forms of filename
23798  * aliasing.
23799  *
23800  * This call does no blocking i/o.
23801  *
23802  * %FALSE if either is not a #GFile.
23803  *
23804  * Returns: %TRUE if @file1 and @file2 are equal.
23805  */
23806
23807
23808 /**
23809  * g_file_find_enclosing_mount:
23810  * @file: input #GFile.
23811  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23812  * @error: a #GError.
23813  *
23814  * Gets a #GMount for the #GFile.
23815  *
23816  * If the #GFileIface for @file does not have a mount (e.g. possibly a
23817  * remote share), @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL
23818  * will be returned.
23819  *
23820  * If @cancellable is not %NULL, then the operation can be cancelled by
23821  * triggering the cancellable object from another thread. If the operation
23822  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23823  *
23824  * Free the returned object with g_object_unref().
23825  *
23826  * Returns: (transfer full): a #GMount where the @file is located or %NULL on error.
23827  */
23828
23829
23830 /**
23831  * g_file_find_enclosing_mount_async:
23832  * @file: a #GFile
23833  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23834  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23835  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
23836  * @user_data: (closure): the data to pass to callback function
23837  *
23838  * Asynchronously gets the mount for the file.
23839  *
23840  * For more details, see g_file_find_enclosing_mount() which is
23841  * the synchronous version of this call.
23842  *
23843  * When the operation is finished, @callback will be called. You can then call
23844  * g_file_find_enclosing_mount_finish() to get the result of the operation.
23845  */
23846
23847
23848 /**
23849  * g_file_find_enclosing_mount_finish:
23850  * @file: a #GFile
23851  * @res: a #GAsyncResult
23852  * @error: a #GError
23853  *
23854  * Finishes an asynchronous find mount request.
23855  * See g_file_find_enclosing_mount_async().
23856  *
23857  * Free the returned object with g_object_unref().
23858  *
23859  * Returns: (transfer full): #GMount for given @file or %NULL on error.
23860  */
23861
23862
23863 /**
23864  * g_file_get_basename:
23865  * @file: input #GFile.
23866  *
23867  * Gets the base name (the last component of the path) for a given #GFile.
23868  *
23869  * If called for the top level of a system (such as the filesystem root
23870  * or a uri like sftp://host/) it will return a single directory separator
23871  * (and on Windows, possibly a drive letter).
23872  *
23873  * The base name is a byte string (*not* UTF-8). It has no defined encoding
23874  * or rules other than it may not contain zero bytes.  If you want to use
23875  * filenames in a user interface you should use the display name that you
23876  * can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
23877  * attribute with g_file_query_info().
23878  *
23879  * This call does no blocking i/o.
23880  *
23881  * if given #GFile is invalid. The returned string should be
23882  * freed with g_free() when no longer needed.
23883  *
23884  * Returns: string containing the #GFile's base name, or %NULL
23885  */
23886
23887
23888 /**
23889  * g_file_get_child:
23890  * @file: input #GFile.
23891  * @name: string containing the child's basename.
23892  *
23893  * Gets a child of @file with basename equal to @name.
23894  *
23895  * Note that the file with that specific name might not exist, but
23896  * you can still have a #GFile that points to it. You can use this
23897  * for instance to create that file.
23898  *
23899  * This call does no blocking i/o.
23900  *
23901  * Free the returned object with g_object_unref().
23902  *
23903  * Returns: (transfer full): a #GFile to a child specified by @name.
23904  */
23905
23906
23907 /**
23908  * g_file_get_child_for_display_name:
23909  * @file: input #GFile.
23910  * @display_name: string to a possible child.
23911  * @error: #GError.
23912  *
23913  * Gets the child of @file for a given @display_name (i.e. a UTF8
23914  * version of the name). If this function fails, it returns %NULL and @error will be
23915  * set. This is very useful when constructing a GFile for a new file
23916  * and the user entered the filename in the user interface, for instance
23917  * when you select a directory and type a filename in the file selector.
23918  *
23919  * This call does no blocking i/o.
23920  *
23921  * %NULL if the display name couldn't be converted.
23922  * Free the returned object with g_object_unref().
23923  *
23924  * Returns: (transfer full): a #GFile to the specified child, or
23925  */
23926
23927
23928 /**
23929  * g_file_get_parent:
23930  * @file: input #GFile.
23931  *
23932  * Gets the parent directory for the @file.
23933  * If the @file represents the root directory of the
23934  * file system, then %NULL will be returned.
23935  *
23936  * This call does no blocking i/o.
23937  *
23938  * #GFile or %NULL if there is no parent.
23939  * Free the returned object with g_object_unref().
23940  *
23941  * Returns: (transfer full): a #GFile structure to the parent of the given
23942  */
23943
23944
23945 /**
23946  * g_file_get_parse_name:
23947  * @file: input #GFile.
23948  *
23949  * Gets the parse name of the @file.
23950  * A parse name is a UTF-8 string that describes the
23951  * file such that one can get the #GFile back using
23952  * g_file_parse_name().
23953  *
23954  * This is generally used to show the #GFile as a nice
23955  * full-pathname kind of string in a user interface,
23956  * like in a location entry.
23957  *
23958  * For local files with names that can safely be converted
23959  * to UTF8 the pathname is used, otherwise the IRI is used
23960  * (a form of URI that allows UTF8 characters unescaped).
23961  *
23962  * This call does no blocking i/o.
23963  *
23964  * string should be freed with g_free() when no longer needed.
23965  *
23966  * Returns: a string containing the #GFile's parse name. The returned
23967  */
23968
23969
23970 /**
23971  * g_file_get_path:
23972  * @file: input #GFile.
23973  *
23974  * Gets the local pathname for #GFile, if one exists.
23975  *
23976  * This call does no blocking i/o.
23977  *
23978  * no such path exists. The returned string should be
23979  * freed with g_free() when no longer needed.
23980  *
23981  * Returns: string containing the #GFile's path, or %NULL if
23982  */
23983
23984
23985 /**
23986  * g_file_get_relative_path:
23987  * @parent: input #GFile.
23988  * @descendant: input #GFile.
23989  *
23990  * Gets the path for @descendant relative to @parent.
23991  *
23992  * This call does no blocking i/o.
23993  *
23994  * to @parent, or %NULL if @descendant doesn't have @parent as prefix.
23995  * The returned string should be freed with g_free() when no longer needed.
23996  *
23997  * Returns: string with the relative path from @descendant
23998  */
23999
24000
24001 /**
24002  * g_file_get_uri:
24003  * @file: input #GFile.
24004  *
24005  * Gets the URI for the @file.
24006  *
24007  * This call does no blocking i/o.
24008  *
24009  * The returned string should be freed with g_free() when no longer needed.
24010  *
24011  * Returns: a string containing the #GFile's URI.
24012  */
24013
24014
24015 /**
24016  * g_file_get_uri_scheme:
24017  * @file: input #GFile.
24018  *
24019  * Gets the URI scheme for a #GFile.
24020  * RFC 3986 decodes the scheme as:
24021  * <programlisting>
24022  * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
24023  * </programlisting>
24024  * Common schemes include "file", "http", "ftp", etc.
24025  *
24026  * This call does no blocking i/o.
24027  *
24028  * #GFile. The returned string should be freed with g_free()
24029  * when no longer needed.
24030  *
24031  * Returns: a string containing the URI scheme for the given
24032  */
24033
24034
24035 /**
24036  * g_file_has_parent:
24037  * @file: input #GFile
24038  * @parent: the parent to check for, or %NULL
24039  *
24040  * Checks if @file has a parent, and optionally, if it is @parent.
24041  *
24042  * If @parent is %NULL then this function returns %TRUE if @file has any
24043  * parent at all.  If @parent is non-%NULL then %TRUE is only returned
24044  * if @file is a child of @parent.
24045  *
24046  * case that @parent is %NULL).
24047  *
24048  * Returns: %TRUE if @file is a child of @parent (or any parent in the
24049  * Since: 2.24
24050  */
24051
24052
24053 /**
24054  * g_file_has_prefix:
24055  * @file: input #GFile.
24056  * @prefix: input #GFile.
24057  *
24058  * Checks whether @file has the prefix specified by @prefix. In other word,
24059  * if the names of inital elements of @file<!-- -->s pathname match @prefix.
24060  * Only full pathname elements are matched, so a path like /foo is not
24061  * considered a prefix of /foobar, only of /foo/bar.
24062  *
24063  * This call does no i/o, as it works purely on names. As such it can
24064  * sometimes return %FALSE even if @file is inside a @prefix (from a
24065  * filesystem point of view), because the prefix of @file is an alias
24066  * of @prefix.
24067  *
24068  * %FALSE otherwise.
24069  *
24070  * Virtual: prefix_matches
24071  * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix.
24072  */
24073
24074
24075 /**
24076  * g_file_has_uri_scheme:
24077  * @file: input #GFile.
24078  * @uri_scheme: a string containing a URI scheme.
24079  *
24080  * Checks to see if a #GFile has a given URI scheme.
24081  *
24082  * This call does no blocking i/o.
24083  *
24084  * given URI scheme, %FALSE if URI scheme is %NULL,
24085  * not supported, or #GFile is invalid.
24086  *
24087  * Returns: %TRUE if #GFile's backend supports the
24088  */
24089
24090
24091 /**
24092  * g_file_hash:
24093  * @file: #gconstpointer to a #GFile.
24094  *
24095  * Creates a hash value for a #GFile.
24096  *
24097  * This call does no blocking i/o.
24098  *
24099  * integer that can be used as hash value for the #GFile.
24100  * This function is intended for easily hashing a #GFile to
24101  * add to a #GHashTable or similar data structure.
24102  *
24103  * Virtual: hash
24104  * Returns: 0 if @file is not a valid #GFile, otherwise an
24105  */
24106
24107
24108 /**
24109  * g_file_icon_get_file:
24110  * @icon: a #GIcon.
24111  *
24112  * Gets the #GFile associated with the given @icon.
24113  *
24114  * Returns: (transfer none): a #GFile, or %NULL.
24115  */
24116
24117
24118 /**
24119  * g_file_icon_new:
24120  * @file: a #GFile.
24121  *
24122  * Creates a new icon for a file.
24123  *
24124  * Returns: (transfer full): a #GIcon for the given @file, or %NULL on error.
24125  */
24126
24127
24128 /**
24129  * g_file_info_clear_status:
24130  * @info: a #GFileInfo.
24131  *
24132  * Clears the status information from @info.
24133  */
24134
24135
24136 /**
24137  * g_file_info_copy_into:
24138  * @src_info: source to copy attributes from.
24139  * @dest_info: destination to copy attributes to.
24140  *
24141  * Copies all of the #GFileAttribute<!-- -->s from @src_info to @dest_info.
24142  */
24143
24144
24145 /**
24146  * g_file_info_dup:
24147  * @other: a #GFileInfo.
24148  *
24149  * Duplicates a file info structure.
24150  *
24151  * Returns: (transfer full): a duplicate #GFileInfo of @other.
24152  */
24153
24154
24155 /**
24156  * g_file_info_get_attribute_as_string:
24157  * @info: a #GFileInfo.
24158  * @attribute: a file attribute key.
24159  *
24160  * Gets the value of a attribute, formated as a string.
24161  * This escapes things as needed to make the string valid
24162  * utf8.
24163  *
24164  * When you're done with the string it must be freed with g_free().
24165  *
24166  * Returns: a UTF-8 string associated with the given @attribute.
24167  */
24168
24169
24170 /**
24171  * g_file_info_get_attribute_boolean:
24172  * @info: a #GFileInfo.
24173  * @attribute: a file attribute key.
24174  *
24175  * Gets the value of a boolean attribute. If the attribute does not
24176  * contain a boolean value, %FALSE will be returned.
24177  *
24178  * Returns: the boolean value contained within the attribute.
24179  */
24180
24181
24182 /**
24183  * g_file_info_get_attribute_byte_string:
24184  * @info: a #GFileInfo.
24185  * @attribute: a file attribute key.
24186  *
24187  * Gets the value of a byte string attribute. If the attribute does
24188  * not contain a byte string, %NULL will be returned.
24189  *
24190  * %NULL otherwise.
24191  *
24192  * Returns: the contents of the @attribute value as a byte string, or
24193  */
24194
24195
24196 /**
24197  * g_file_info_get_attribute_data:
24198  * @info: a #GFileInfo
24199  * @attribute: a file attribute key
24200  * @type: (out) (allow-none): return location for the attribute type, or %NULL
24201  * @value_pp: (out) (allow-none): return location for the attribute value, or %NULL
24202  * @status: (out) (allow-none): return location for the attribute status, or %NULL
24203  *
24204  * Gets the attribute type, value and status for an attribute key.
24205  *
24206  * %FALSE otherwise.
24207  *
24208  * Returns: (transfer none): %TRUE if @info has an attribute named @attribute,
24209  */
24210
24211
24212 /**
24213  * g_file_info_get_attribute_int32:
24214  * @info: a #GFileInfo.
24215  * @attribute: a file attribute key.
24216  *
24217  * Gets a signed 32-bit integer contained within the attribute. If the
24218  * attribute does not contain a signed 32-bit integer, or is invalid,
24219  * 0 will be returned.
24220  *
24221  * Returns: a signed 32-bit integer from the attribute.
24222  */
24223
24224
24225 /**
24226  * g_file_info_get_attribute_int64:
24227  * @info: a #GFileInfo.
24228  * @attribute: a file attribute key.
24229  *
24230  * Gets a signed 64-bit integer contained within the attribute. If the
24231  * attribute does not contain an signed 64-bit integer, or is invalid,
24232  * 0 will be returned.
24233  *
24234  * Returns: a signed 64-bit integer from the attribute.
24235  */
24236
24237
24238 /**
24239  * g_file_info_get_attribute_object:
24240  * @info: a #GFileInfo.
24241  * @attribute: a file attribute key.
24242  *
24243  * Gets the value of a #GObject attribute. If the attribute does
24244  * not contain a #GObject, %NULL will be returned.
24245  *
24246  * %NULL otherwise.
24247  *
24248  * Returns: (transfer none): a #GObject associated with the given @attribute, or
24249  */
24250
24251
24252 /**
24253  * g_file_info_get_attribute_status:
24254  * @info: a #GFileInfo
24255  * @attribute: a file attribute key
24256  *
24257  * Gets the attribute status for an attribute key.
24258  *
24259  * %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.
24260  *
24261  * Returns: a #GFileAttributeStatus for the given @attribute, or
24262  */
24263
24264
24265 /**
24266  * g_file_info_get_attribute_string:
24267  * @info: a #GFileInfo.
24268  * @attribute: a file attribute key.
24269  *
24270  * Gets the value of a string attribute. If the attribute does
24271  * not contain a string, %NULL will be returned.
24272  *
24273  * %NULL otherwise.
24274  *
24275  * Returns: the contents of the @attribute value as a UTF-8 string, or
24276  */
24277
24278
24279 /**
24280  * g_file_info_get_attribute_stringv:
24281  * @info: a #GFileInfo.
24282  * @attribute: a file attribute key.
24283  *
24284  * Gets the value of a stringv attribute. If the attribute does
24285  * not contain a stringv, %NULL will be returned.
24286  *
24287  * %NULL otherwise. Do not free. These returned strings are UTF-8.
24288  *
24289  * Returns: (transfer none): the contents of the @attribute value as a stringv, or
24290  * Since: 2.22
24291  */
24292
24293
24294 /**
24295  * g_file_info_get_attribute_type:
24296  * @info: a #GFileInfo.
24297  * @attribute: a file attribute key.
24298  *
24299  * Gets the attribute type for an attribute key.
24300  *
24301  * %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.
24302  *
24303  * Returns: a #GFileAttributeType for the given @attribute, or
24304  */
24305
24306
24307 /**
24308  * g_file_info_get_attribute_uint32:
24309  * @info: a #GFileInfo.
24310  * @attribute: a file attribute key.
24311  *
24312  * Gets an unsigned 32-bit integer contained within the attribute. If the
24313  * attribute does not contain an unsigned 32-bit integer, or is invalid,
24314  * 0 will be returned.
24315  *
24316  * Returns: an unsigned 32-bit integer from the attribute.
24317  */
24318
24319
24320 /**
24321  * g_file_info_get_attribute_uint64:
24322  * @info: a #GFileInfo.
24323  * @attribute: a file attribute key.
24324  *
24325  * Gets a unsigned 64-bit integer contained within the attribute. If the
24326  * attribute does not contain an unsigned 64-bit integer, or is invalid,
24327  * 0 will be returned.
24328  *
24329  * Returns: a unsigned 64-bit integer from the attribute.
24330  */
24331
24332
24333 /**
24334  * g_file_info_get_content_type:
24335  * @info: a #GFileInfo.
24336  *
24337  * Gets the file's content type.
24338  *
24339  * Returns: a string containing the file's content type.
24340  */
24341
24342
24343 /**
24344  * g_file_info_get_display_name:
24345  * @info: a #GFileInfo.
24346  *
24347  * Gets a display name for a file.
24348  *
24349  * Returns: a string containing the display name.
24350  */
24351
24352
24353 /**
24354  * g_file_info_get_edit_name:
24355  * @info: a #GFileInfo.
24356  *
24357  * Gets the edit name for a file.
24358  *
24359  * Returns: a string containing the edit name.
24360  */
24361
24362
24363 /**
24364  * g_file_info_get_etag:
24365  * @info: a #GFileInfo.
24366  *
24367  * Gets the <link linkend="gfile-etag">entity tag</link> for a given
24368  * #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.
24369  *
24370  * Returns: a string containing the value of the "etag:value" attribute.
24371  */
24372
24373
24374 /**
24375  * g_file_info_get_file_type:
24376  * @info: a #GFileInfo.
24377  *
24378  * Gets a file's type (whether it is a regular file, symlink, etc).
24379  * This is different from the file's content type, see g_file_info_get_content_type().
24380  *
24381  * Returns: a #GFileType for the given file.
24382  */
24383
24384
24385 /**
24386  * g_file_info_get_icon:
24387  * @info: a #GFileInfo.
24388  *
24389  * Gets the icon for a file.
24390  *
24391  * Returns: (transfer none): #GIcon for the given @info.
24392  */
24393
24394
24395 /**
24396  * g_file_info_get_is_backup:
24397  * @info: a #GFileInfo.
24398  *
24399  * Checks if a file is a backup file.
24400  *
24401  * Returns: %TRUE if file is a backup file, %FALSE otherwise.
24402  */
24403
24404
24405 /**
24406  * g_file_info_get_is_hidden:
24407  * @info: a #GFileInfo.
24408  *
24409  * Checks if a file is hidden.
24410  *
24411  * Returns: %TRUE if the file is a hidden file, %FALSE otherwise.
24412  */
24413
24414
24415 /**
24416  * g_file_info_get_is_symlink:
24417  * @info: a #GFileInfo.
24418  *
24419  * Checks if a file is a symlink.
24420  *
24421  * Returns: %TRUE if the given @info is a symlink.
24422  */
24423
24424
24425 /**
24426  * g_file_info_get_modification_time:
24427  * @info: a #GFileInfo.
24428  * @result: a #GTimeVal.
24429  *
24430  * Gets the modification time of the current @info and sets it
24431  * in @result.
24432  */
24433
24434
24435 /**
24436  * g_file_info_get_name:
24437  * @info: a #GFileInfo.
24438  *
24439  * Gets the name for a file.
24440  *
24441  * Returns: a string containing the file name.
24442  */
24443
24444
24445 /**
24446  * g_file_info_get_size:
24447  * @info: a #GFileInfo.
24448  *
24449  * Gets the file's size.
24450  *
24451  * Returns: a #goffset containing the file's size.
24452  */
24453
24454
24455 /**
24456  * g_file_info_get_sort_order:
24457  * @info: a #GFileInfo.
24458  *
24459  * Gets the value of the sort_order attribute from the #GFileInfo.
24460  * See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
24461  *
24462  * Returns: a #gint32 containing the value of the "standard::sort_order" attribute.
24463  */
24464
24465
24466 /**
24467  * g_file_info_get_symlink_target:
24468  * @info: a #GFileInfo.
24469  *
24470  * Gets the symlink target for a given #GFileInfo.
24471  *
24472  * Returns: a string containing the symlink target.
24473  */
24474
24475
24476 /**
24477  * g_file_info_has_attribute:
24478  * @info: a #GFileInfo.
24479  * @attribute: a file attribute key.
24480  *
24481  * Checks if a file info structure has an attribute named @attribute.
24482  *
24483  * %FALSE otherwise.
24484  *
24485  * Returns: %TRUE if @Ginfo has an attribute named @attribute,
24486  */
24487
24488
24489 /**
24490  * g_file_info_has_namespace:
24491  * @info: a #GFileInfo.
24492  * @name_space: a file attribute namespace.
24493  *
24494  * Checks if a file info structure has an attribute in the
24495  * specified @name_space.
24496  *
24497  * %FALSE otherwise.
24498  *
24499  * Returns: %TRUE if @Ginfo has an attribute in @name_space,
24500  * Since: 2.22
24501  */
24502
24503
24504 /**
24505  * g_file_info_list_attributes:
24506  * @info: a #GFileInfo.
24507  * @name_space: a file attribute key's namespace.
24508  *
24509  * Lists the file info structure's attributes.
24510  *
24511  * possible attribute types for the given @name_space, or
24512  * %NULL on error.
24513  *
24514  * Returns: (array zero-terminated=1) (transfer full): a null-terminated array of strings of all of the
24515  */
24516
24517
24518 /**
24519  * g_file_info_new:
24520  *
24521  * Creates a new file info structure.
24522  *
24523  * Returns: a #GFileInfo.
24524  */
24525
24526
24527 /**
24528  * g_file_info_remove_attribute:
24529  * @info: a #GFileInfo.
24530  * @attribute: a file attribute key.
24531  *
24532  * Removes all cases of @attribute from @info if it exists.
24533  */
24534
24535
24536 /**
24537  * g_file_info_set_attribute:
24538  * @info: a #GFileInfo.
24539  * @attribute: a file attribute key.
24540  * @type: a #GFileAttributeType
24541  * @value_p: pointer to the value
24542  *
24543  * Sets the @attribute to contain the given value, if possible.
24544  */
24545
24546
24547 /**
24548  * g_file_info_set_attribute_boolean:
24549  * @info: a #GFileInfo.
24550  * @attribute: a file attribute key.
24551  * @attr_value: a boolean value.
24552  *
24553  * Sets the @attribute to contain the given @attr_value,
24554  * if possible.
24555  */
24556
24557
24558 /**
24559  * g_file_info_set_attribute_byte_string:
24560  * @info: a #GFileInfo.
24561  * @attribute: a file attribute key.
24562  * @attr_value: a byte string.
24563  *
24564  * Sets the @attribute to contain the given @attr_value,
24565  * if possible.
24566  */
24567
24568
24569 /**
24570  * g_file_info_set_attribute_int32:
24571  * @info: a #GFileInfo.
24572  * @attribute: a file attribute key.
24573  * @attr_value: a signed 32-bit integer
24574  *
24575  * Sets the @attribute to contain the given @attr_value,
24576  * if possible.
24577  */
24578
24579
24580 /**
24581  * g_file_info_set_attribute_int64:
24582  * @info: a #GFileInfo.
24583  * @attribute: attribute name to set.
24584  * @attr_value: int64 value to set attribute to.
24585  *
24586  * Sets the @attribute to contain the given @attr_value,
24587  * if possible.
24588  */
24589
24590
24591 /**
24592  * g_file_info_set_attribute_mask:
24593  * @info: a #GFileInfo.
24594  * @mask: a #GFileAttributeMatcher.
24595  *
24596  * Sets @mask on @info to match specific attribute types.
24597  */
24598
24599
24600 /**
24601  * g_file_info_set_attribute_object:
24602  * @info: a #GFileInfo.
24603  * @attribute: a file attribute key.
24604  * @attr_value: a #GObject.
24605  *
24606  * Sets the @attribute to contain the given @attr_value,
24607  * if possible.
24608  */
24609
24610
24611 /**
24612  * g_file_info_set_attribute_status:
24613  * @info: a #GFileInfo
24614  * @attribute: a file attribute key
24615  * @status: a #GFileAttributeStatus
24616  *
24617  * Sets the attribute status for an attribute key. This is only
24618  * needed by external code that implement g_file_set_attributes_from_info()
24619  * or similar functions.
24620  *
24621  * The attribute must exist in @info for this to work. Otherwise %FALSE
24622  * is returned and @info is unchanged.
24623  *
24624  * Returns: %TRUE if the status was changed, %FALSE if the key was not set.
24625  * Since: 2.22
24626  */
24627
24628
24629 /**
24630  * g_file_info_set_attribute_string:
24631  * @info: a #GFileInfo.
24632  * @attribute: a file attribute key.
24633  * @attr_value: a UTF-8 string.
24634  *
24635  * Sets the @attribute to contain the given @attr_value,
24636  * if possible.
24637  */
24638
24639
24640 /**
24641  * g_file_info_set_attribute_stringv:
24642  * @info: a #GFileInfo.
24643  * @attribute: a file attribute key
24644  * @attr_value: a %NULL terminated array of UTF-8 strings.
24645  *
24646  * Sets the @attribute to contain the given @attr_value,
24647  * if possible.
24648  *
24649  * Sinze: 2.22
24650  */
24651
24652
24653 /**
24654  * g_file_info_set_attribute_uint32:
24655  * @info: a #GFileInfo.
24656  * @attribute: a file attribute key.
24657  * @attr_value: an unsigned 32-bit integer.
24658  *
24659  * Sets the @attribute to contain the given @attr_value,
24660  * if possible.
24661  */
24662
24663
24664 /**
24665  * g_file_info_set_attribute_uint64:
24666  * @info: a #GFileInfo.
24667  * @attribute: a file attribute key.
24668  * @attr_value: an unsigned 64-bit integer.
24669  *
24670  * Sets the @attribute to contain the given @attr_value,
24671  * if possible.
24672  */
24673
24674
24675 /**
24676  * g_file_info_set_content_type:
24677  * @info: a #GFileInfo.
24678  * @content_type: a content type. See <link linkend="gio-GContentType">GContentType</link>.
24679  *
24680  * Sets the content type attribute for a given #GFileInfo.
24681  * See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
24682  */
24683
24684
24685 /**
24686  * g_file_info_set_display_name:
24687  * @info: a #GFileInfo.
24688  * @display_name: a string containing a display name.
24689  *
24690  * Sets the display name for the current #GFileInfo.
24691  * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
24692  */
24693
24694
24695 /**
24696  * g_file_info_set_edit_name:
24697  * @info: a #GFileInfo.
24698  * @edit_name: a string containing an edit name.
24699  *
24700  * Sets the edit name for the current file.
24701  * See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
24702  */
24703
24704
24705 /**
24706  * g_file_info_set_file_type:
24707  * @info: a #GFileInfo.
24708  * @type: a #GFileType.
24709  *
24710  * Sets the file type in a #GFileInfo to @type.
24711  * See %G_FILE_ATTRIBUTE_STANDARD_TYPE.
24712  */
24713
24714
24715 /**
24716  * g_file_info_set_icon:
24717  * @info: a #GFileInfo.
24718  * @icon: a #GIcon.
24719  *
24720  * Sets the icon for a given #GFileInfo.
24721  * See %G_FILE_ATTRIBUTE_STANDARD_ICON.
24722  */
24723
24724
24725 /**
24726  * g_file_info_set_is_hidden:
24727  * @info: a #GFileInfo.
24728  * @is_hidden: a #gboolean.
24729  *
24730  * Sets the "is_hidden" attribute in a #GFileInfo according to @is_symlink.
24731  * See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
24732  */
24733
24734
24735 /**
24736  * g_file_info_set_is_symlink:
24737  * @info: a #GFileInfo.
24738  * @is_symlink: a #gboolean.
24739  *
24740  * Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
24741  * See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
24742  */
24743
24744
24745 /**
24746  * g_file_info_set_modification_time:
24747  * @info: a #GFileInfo.
24748  * @mtime: a #GTimeVal.
24749  *
24750  * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
24751  * info to the given time value.
24752  */
24753
24754
24755 /**
24756  * g_file_info_set_name:
24757  * @info: a #GFileInfo.
24758  * @name: a string containing a name.
24759  *
24760  * Sets the name attribute for the current #GFileInfo.
24761  * See %G_FILE_ATTRIBUTE_STANDARD_NAME.
24762  */
24763
24764
24765 /**
24766  * g_file_info_set_size:
24767  * @info: a #GFileInfo.
24768  * @size: a #goffset containing the file's size.
24769  *
24770  * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
24771  * to the given size.
24772  */
24773
24774
24775 /**
24776  * g_file_info_set_sort_order:
24777  * @info: a #GFileInfo.
24778  * @sort_order: a sort order integer.
24779  *
24780  * Sets the sort order attribute in the file info structure. See
24781  * %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
24782  */
24783
24784
24785 /**
24786  * g_file_info_set_symlink_target:
24787  * @info: a #GFileInfo.
24788  * @symlink_target: a static string containing a path to a symlink target.
24789  *
24790  * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
24791  * to the given symlink target.
24792  */
24793
24794
24795 /**
24796  * g_file_info_unset_attribute_mask:
24797  * @info: #GFileInfo.
24798  *
24799  * Unsets a mask set by g_file_info_set_attribute_mask(), if one
24800  * is set.
24801  */
24802
24803
24804 /**
24805  * g_file_input_stream_query_info:
24806  * @stream: a #GFileInputStream.
24807  * @attributes: a file attribute query string.
24808  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24809  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24810  *
24811  * Queries a file input stream the given @attributes. This function blocks
24812  * while querying the stream. For the asynchronous (non-blocking) version
24813  * of this function, see g_file_input_stream_query_info_async(). While the
24814  * stream is blocked, the stream will set the pending flag internally, and
24815  * any other operations on the stream will fail with %G_IO_ERROR_PENDING.
24816  *
24817  * Returns: (transfer full): a #GFileInfo, or %NULL on error.
24818  */
24819
24820
24821 /**
24822  * g_file_input_stream_query_info_async:
24823  * @stream: a #GFileInputStream.
24824  * @attributes: a file attribute query string.
24825  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
24826  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24827  * @callback: (scope async): callback to call when the request is satisfied
24828  * @user_data: (closure): the data to pass to callback function
24829  *
24830  * Queries the stream information asynchronously.
24831  * When the operation is finished @callback will be called.
24832  * You can then call g_file_input_stream_query_info_finish()
24833  * to get the result of the operation.
24834  *
24835  * For the synchronous version of this function,
24836  * see g_file_input_stream_query_info().
24837  *
24838  * If @cancellable is not %NULL, then the operation can be cancelled by
24839  * triggering the cancellable object from another thread. If the operation
24840  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set
24841  */
24842
24843
24844 /**
24845  * g_file_input_stream_query_info_finish:
24846  * @stream: a #GFileInputStream.
24847  * @result: a #GAsyncResult.
24848  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24849  *
24850  * Finishes an asynchronous info query operation.
24851  *
24852  * Returns: (transfer full): #GFileInfo.
24853  */
24854
24855
24856 /**
24857  * g_file_io_stream_get_etag:
24858  * @stream: a #GFileIOStream.
24859  *
24860  * Gets the entity tag for the file when it has been written.
24861  * This must be called after the stream has been written
24862  * and closed, as the etag can change while writing.
24863  *
24864  * Returns: the entity tag for the stream.
24865  * Since: 2.22
24866  */
24867
24868
24869 /**
24870  * g_file_io_stream_query_info:
24871  * @stream: a #GFileIOStream.
24872  * @attributes: a file attribute query string.
24873  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24874  * @error: a #GError, %NULL to ignore.
24875  *
24876  * Queries a file io stream for the given @attributes.
24877  * This function blocks while querying the stream. For the asynchronous
24878  * version of this function, see g_file_io_stream_query_info_async().
24879  * While the stream is blocked, the stream will set the pending flag
24880  * internally, and any other operations on the stream will fail with
24881  * %G_IO_ERROR_PENDING.
24882  *
24883  * Can fail if the stream was already closed (with @error being set to
24884  * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
24885  * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
24886  * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I
24887  * all cases of failure, %NULL will be returned.
24888  *
24889  * If @cancellable is not %NULL, then the operation can be cancelled by
24890  * triggering the cancellable object from another thread. If the operation
24891  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
24892  * be returned.
24893  *
24894  * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
24895  * Since: 2.22
24896  */
24897
24898
24899 /**
24900  * g_file_io_stream_query_info_async:
24901  * @stream: a #GFileIOStream.
24902  * @attributes: a file attribute query string.
24903  * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
24904  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24905  * @callback: (scope async): callback to call when the request is satisfied
24906  * @user_data: (closure): the data to pass to callback function
24907  *
24908  * Asynchronously queries the @stream for a #GFileInfo. When completed,
24909  * @callback will be called with a #GAsyncResult which can be used to
24910  * finish the operation with g_file_io_stream_query_info_finish().
24911  *
24912  * For the synchronous version of this function, see
24913  * g_file_io_stream_query_info().
24914  *
24915  * Since: 2.22
24916  */
24917
24918
24919 /**
24920  * g_file_io_stream_query_info_finish:
24921  * @stream: a #GFileIOStream.
24922  * @result: a #GAsyncResult.
24923  * @error: a #GError, %NULL to ignore.
24924  *
24925  * Finalizes the asynchronous query started
24926  * by g_file_io_stream_query_info_async().
24927  *
24928  * Returns: (transfer full): A #GFileInfo for the finished query.
24929  * Since: 2.22
24930  */
24931
24932
24933 /**
24934  * g_file_is_native:
24935  * @file: input #GFile.
24936  *
24937  * Checks to see if a file is native to the platform.
24938  *
24939  * A native file s one expressed in the platform-native filename format,
24940  * e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
24941  * as it might be on a locally mounted remote filesystem.
24942  *
24943  * On some systems non-native files may be available using
24944  * the native filesystem via a userspace filesystem (FUSE), in
24945  * these cases this call will return %FALSE, but g_file_get_path()
24946  * will still return a native path.
24947  *
24948  * This call does no blocking i/o.
24949  *
24950  * Returns: %TRUE if file is native.
24951  */
24952
24953
24954 /**
24955  * g_file_load_contents:
24956  * @file: input #GFile.
24957  * @cancellable: optional #GCancellable object, %NULL to ignore.
24958  * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
24959  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
24960  * @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
24961  * @error: a #GError, or %NULL
24962  *
24963  * Loads the content of the file into memory. The data is always
24964  * zero-terminated, but this is not included in the resultant @length.
24965  * The returned @content should be freed with g_free() when no longer
24966  * needed.
24967  *
24968  * If @cancellable is not %NULL, then the operation can be cancelled by
24969  * triggering the cancellable object from another thread. If the operation
24970  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24971  *
24972  * %FALSE if there were errors.
24973  *
24974  * Returns: %TRUE if the @file's contents were successfully loaded.
24975  */
24976
24977
24978 /**
24979  * g_file_load_contents_async:
24980  * @file: input #GFile.
24981  * @cancellable: optional #GCancellable object, %NULL to ignore.
24982  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
24983  * @user_data: the data to pass to callback function
24984  *
24985  * Starts an asynchronous load of the @file's contents.
24986  *
24987  * For more details, see g_file_load_contents() which is
24988  * the synchronous version of this call.
24989  *
24990  * When the load operation has completed, @callback will be called
24991  * with @user data. To finish the operation, call
24992  * g_file_load_contents_finish() with the #GAsyncResult returned by
24993  * the @callback.
24994  *
24995  * If @cancellable is not %NULL, then the operation can be cancelled by
24996  * triggering the cancellable object from another thread. If the operation
24997  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24998  */
24999
25000
25001 /**
25002  * g_file_load_contents_finish:
25003  * @file: input #GFile.
25004  * @res: a #GAsyncResult.
25005  * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
25006  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
25007  * @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
25008  * @error: a #GError, or %NULL
25009  *
25010  * Finishes an asynchronous load of the @file's contents.
25011  * The contents are placed in @contents, and @length is set to the
25012  * size of the @contents string. The @content should be freed with
25013  * g_free() when no longer needed. If @etag_out is present, it will be
25014  * set to the new entity tag for the @file.
25015  *
25016  * present, it will be set appropriately.
25017  *
25018  * Returns: %TRUE if the load was successful. If %FALSE and @error is
25019  */
25020
25021
25022 /**
25023  * g_file_load_partial_contents_async: (skip)
25024  * @file: input #GFile.
25025  * @cancellable: optional #GCancellable object, %NULL to ignore.
25026  * @read_more_callback: a #GFileReadMoreCallback to receive partial data and to specify whether further data should be read.
25027  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
25028  * @user_data: the data to pass to the callback functions.
25029  *
25030  * Reads the partial contents of a file. A #GFileReadMoreCallback should be
25031  * used to stop reading from the file when appropriate, else this function
25032  * will behave exactly as g_file_load_contents_async(). This operation
25033  * can be finished by g_file_load_partial_contents_finish().
25034  *
25035  * Users of this function should be aware that @user_data is passed to
25036  * both the @read_more_callback and the @callback.
25037  *
25038  * If @cancellable is not %NULL, then the operation can be cancelled by
25039  * triggering the cancellable object from another thread. If the operation
25040  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25041  */
25042
25043
25044 /**
25045  * g_file_load_partial_contents_finish:
25046  * @file: input #GFile.
25047  * @res: a #GAsyncResult.
25048  * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
25049  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
25050  * @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
25051  * @error: a #GError, or %NULL
25052  *
25053  * Finishes an asynchronous partial load operation that was started
25054  * with g_file_load_partial_contents_async(). The data is always
25055  * zero-terminated, but this is not included in the resultant @length.
25056  * The returned @content should be freed with g_free() when no longer
25057  * needed.
25058  *
25059  * present, it will be set appropriately.
25060  *
25061  * Returns: %TRUE if the load was successful. If %FALSE and @error is
25062  */
25063
25064
25065 /**
25066  * g_file_make_directory:
25067  * @file: input #GFile.
25068  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25069  * @error: a #GError, or %NULL
25070  *
25071  * Creates a directory. Note that this will only create a child directory of
25072  * the immediate parent directory of the path or URI given by the #GFile. To
25073  * recursively create directories, see g_file_make_directory_with_parents().
25074  * This function will fail if the parent directory does not exist, setting
25075  * @error to %G_IO_ERROR_NOT_FOUND. If the file system doesn't support creating
25076  * directories, this function will fail, setting @error to
25077  * %G_IO_ERROR_NOT_SUPPORTED.
25078  *
25079  * For a local #GFile the newly created directory will have the default
25080  * (current) ownership and permissions of the current process.
25081  *
25082  * If @cancellable is not %NULL, then the operation can be cancelled by
25083  * triggering the cancellable object from another thread. If the operation
25084  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25085  *
25086  * Returns: %TRUE on successful creation, %FALSE otherwise.
25087  */
25088
25089
25090 /**
25091  * g_file_make_directory_with_parents:
25092  * @file: input #GFile.
25093  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25094  * @error: a #GError, or %NULL
25095  *
25096  * Creates a directory and any parent directories that may not exist similar to
25097  * 'mkdir -p'. If the file system does not support creating directories, this
25098  * function will fail, setting @error to %G_IO_ERROR_NOT_SUPPORTED.
25099  *
25100  * For a local #GFile the newly created directories will have the default
25101  * (current) ownership and permissions of the current process.
25102  *
25103  * If @cancellable is not %NULL, then the operation can be cancelled by
25104  * triggering the cancellable object from another thread. If the operation
25105  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25106  *
25107  * otherwise.
25108  *
25109  * Returns: %TRUE if all directories have been successfully created, %FALSE
25110  * Since: 2.18
25111  */
25112
25113
25114 /**
25115  * g_file_make_symbolic_link:
25116  * @file: a #GFile with the name of the symlink to create
25117  * @symlink_value: a string with the path for the target of the new symlink
25118  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25119  * @error: a #GError.
25120  *
25121  * Creates a symbolic link named @file which contains the string
25122  * @symlink_value.
25123  *
25124  * If @cancellable is not %NULL, then the operation can be cancelled by
25125  * triggering the cancellable object from another thread. If the operation
25126  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25127  *
25128  * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise.
25129  */
25130
25131
25132 /**
25133  * g_file_monitor:
25134  * @file: input #GFile
25135  * @flags: a set of #GFileMonitorFlags
25136  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
25137  * @error: a #GError, or %NULL
25138  *
25139  * Obtains a file or directory monitor for the given file, depending
25140  * on the type of the file.
25141  *
25142  * If @cancellable is not %NULL, then the operation can be cancelled by
25143  * triggering the cancellable object from another thread. If the operation
25144  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25145  *
25146  * Free the returned object with g_object_unref().
25147  *
25148  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
25149  * Since: 2.18
25150  */
25151
25152
25153 /**
25154  * g_file_monitor_cancel:
25155  * @monitor: a #GFileMonitor.
25156  *
25157  * Cancels a file monitor.
25158  *
25159  * Returns: %TRUE if monitor was cancelled.
25160  */
25161
25162
25163 /**
25164  * g_file_monitor_directory:
25165  * @file: input #GFile.
25166  * @flags: a set of #GFileMonitorFlags.
25167  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25168  * @error: a #GError, or %NULL.
25169  *
25170  * Obtains a directory monitor for the given file.
25171  * This may fail if directory monitoring is not supported.
25172  *
25173  * If @cancellable is not %NULL, then the operation can be cancelled by
25174  * triggering the cancellable object from another thread. If the operation
25175  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25176  *
25177  * Free the returned object with g_object_unref().
25178  *
25179  * Virtual: monitor_dir
25180  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
25181  */
25182
25183
25184 /**
25185  * g_file_monitor_emit_event:
25186  * @monitor: a #GFileMonitor.
25187  * @child: a #GFile.
25188  * @other_file: a #GFile.
25189  * @event_type: a set of #GFileMonitorEvent flags.
25190  *
25191  * Emits the #GFileMonitor::changed signal if a change
25192  * has taken place. Should be called from file monitor
25193  * implementations only.
25194  *
25195  * The signal will be emitted from an idle handler (in the <link
25196  * linkend="g-main-context-push-thread-default">thread-default main
25197  * context</link>).
25198  */
25199
25200
25201 /**
25202  * g_file_monitor_file:
25203  * @file: input #GFile.
25204  * @flags: a set of #GFileMonitorFlags.
25205  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25206  * @error: a #GError, or %NULL.
25207  *
25208  * Obtains a file monitor for the given file. If no file notification
25209  * mechanism exists, then regular polling of the file is used.
25210  *
25211  * If @cancellable is not %NULL, then the operation can be cancelled by
25212  * triggering the cancellable object from another thread. If the operation
25213  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25214  *
25215  * Free the returned object with g_object_unref().
25216  *
25217  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
25218  */
25219
25220
25221 /**
25222  * g_file_monitor_is_cancelled:
25223  * @monitor: a #GFileMonitor
25224  *
25225  * Returns whether the monitor is canceled.
25226  *
25227  * Returns: %TRUE if monitor is canceled. %FALSE otherwise.
25228  */
25229
25230
25231 /**
25232  * g_file_monitor_set_rate_limit:
25233  * @monitor: a #GFileMonitor.
25234  * @limit_msecs: a non-negative integer with the limit in milliseconds to poll for changes
25235  *
25236  * Sets the rate limit to which the @monitor will report
25237  * consecutive change events to the same file.
25238  */
25239
25240
25241 /**
25242  * g_file_mount_enclosing_volume:
25243  * @location: input #GFile.
25244  * @flags: flags affecting the operation
25245  * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
25246  * @cancellable: optional #GCancellable object, %NULL to ignore.
25247  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
25248  * @user_data: the data to pass to callback function
25249  *
25250  * Starts a @mount_operation, mounting the volume that contains the file @location.
25251  *
25252  * When this operation has completed, @callback will be called with
25253  * @user_user data, and the operation can be finalized with
25254  * g_file_mount_enclosing_volume_finish().
25255  *
25256  * If @cancellable is not %NULL, then the operation can be cancelled by
25257  * triggering the cancellable object from another thread. If the operation
25258  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25259  */
25260
25261
25262 /**
25263  * g_file_mount_enclosing_volume_finish:
25264  * @location: input #GFile.
25265  * @result: a #GAsyncResult.
25266  * @error: a #GError, or %NULL
25267  *
25268  * Finishes a mount operation started by g_file_mount_enclosing_volume().
25269  *
25270  * has occurred, this function will return %FALSE and set @error
25271  * appropriately if present.
25272  *
25273  * Returns: %TRUE if successful. If an error
25274  */
25275
25276
25277 /**
25278  * g_file_mount_mountable:
25279  * @file: input #GFile.
25280  * @flags: flags affecting the operation
25281  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
25282  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25283  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
25284  * @user_data: (closure): the data to pass to callback function
25285  *
25286  * Mounts a file of type G_FILE_TYPE_MOUNTABLE.
25287  * Using @mount_operation, you can request callbacks when, for instance,
25288  * passwords are needed during authentication.
25289  *
25290  * If @cancellable is not %NULL, then the operation can be cancelled by
25291  * triggering the cancellable object from another thread. If the operation
25292  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25293  *
25294  * When the operation is finished, @callback will be called. You can then call
25295  * g_file_mount_mountable_finish() to get the result of the operation.
25296  */
25297
25298
25299 /**
25300  * g_file_mount_mountable_finish:
25301  * @file: input #GFile.
25302  * @result: a #GAsyncResult.
25303  * @error: a #GError, or %NULL
25304  *
25305  * Finishes a mount operation. See g_file_mount_mountable() for details.
25306  *
25307  * Finish an asynchronous mount operation that was started
25308  * with g_file_mount_mountable().
25309  *
25310  * Free the returned object with g_object_unref().
25311  *
25312  * Returns: (transfer full): a #GFile or %NULL on error.
25313  */
25314
25315
25316 /**
25317  * g_file_move:
25318  * @source: #GFile pointing to the source location.
25319  * @destination: #GFile pointing to the destination location.
25320  * @flags: set of #GFileCopyFlags.
25321  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25322  * @progress_callback: (scope call): #GFileProgressCallback function for updates.
25323  * @progress_callback_data: (closure): gpointer to user data for the callback function.
25324  * @error: #GError for returning error conditions, or %NULL
25325  *
25326  * Tries to move the file or directory @source to the location specified by @destination.
25327  * If native move operations are supported then this is used, otherwise a copy + delete
25328  * fallback is used. The native implementation may support moving directories (for instance
25329  * on moves inside the same filesystem), but the fallback code does not.
25330  *
25331  * If the flag #G_FILE_COPY_OVERWRITE is specified an already
25332  * existing @destination file is overwritten.
25333  *
25334  * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
25335  * will be copied as symlinks, otherwise the target of the
25336  * @source symlink will be copied.
25337  *
25338  * If @cancellable is not %NULL, then the operation can be cancelled by
25339  * triggering the cancellable object from another thread. If the operation
25340  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25341  *
25342  * If @progress_callback is not %NULL, then the operation can be monitored by
25343  * setting this to a #GFileProgressCallback function. @progress_callback_data
25344  * will be passed to this function. It is guaranteed that this callback will
25345  * be called after all data has been transferred with the total number of bytes
25346  * copied during the operation.
25347  *
25348  * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
25349  * error is returned, independent on the status of the @destination.
25350  *
25351  * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
25352  * error G_IO_ERROR_EXISTS is returned.
25353  *
25354  * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
25355  * error is returned. If trying to overwrite a directory with a directory the
25356  * G_IO_ERROR_WOULD_MERGE error is returned.
25357  *
25358  * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
25359  * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
25360  * may be returned (if the native move operation isn't available).
25361  *
25362  * Returns: %TRUE on successful move, %FALSE otherwise.
25363  */
25364
25365
25366 /**
25367  * g_file_new_for_commandline_arg:
25368  * @arg: a command line string.
25369  *
25370  * Creates a #GFile with the given argument from the command line. The value of
25371  * @arg can be either a URI, an absolute path or a relative path resolved
25372  * relative to the current working directory.
25373  * This operation never fails, but the returned object might not support any
25374  * I/O operation if @arg points to a malformed path.
25375  *
25376  * Returns: (transfer full): a new #GFile.
25377  */
25378
25379
25380 /**
25381  * g_file_new_for_path:
25382  * @path: a string containing a relative or absolute path. The string must be encoded in the glib filename encoding.
25383  *
25384  * Constructs a #GFile for a given path. This operation never
25385  * fails, but the returned object might not support any I/O
25386  * operation if @path is malformed.
25387  *
25388  * Returns: (transfer full): a new #GFile for the given @path.
25389  */
25390
25391
25392 /**
25393  * g_file_new_for_uri:
25394  * @uri: a UTF8 string containing a URI.
25395  *
25396  * Constructs a #GFile for a given URI. This operation never
25397  * fails, but the returned object might not support any I/O
25398  * operation if @uri is malformed or if the uri type is
25399  * not supported.
25400  *
25401  * Returns: (transfer full): a #GFile for the given @uri.
25402  */
25403
25404
25405 /**
25406  * g_file_open_readwrite:
25407  * @file: #GFile to open
25408  * @cancellable: (allow-none): a #GCancellable
25409  * @error: a #GError, or %NULL
25410  *
25411  * Opens an existing file for reading and writing. The result is
25412  * a #GFileIOStream that can be used to read and write the contents of the file.
25413  *
25414  * If @cancellable is not %NULL, then the operation can be cancelled by
25415  * triggering the cancellable object from another thread. If the operation
25416  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25417  *
25418  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
25419  * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
25420  * Other errors are possible too, and depend on what kind of filesystem the file is on.
25421  * Note that in many non-local file cases read and write streams are not supported,
25422  * so make sure you really need to do read and write streaming, rather than
25423  * just opening for reading or writing.
25424  *
25425  * Free the returned object with g_object_unref().
25426  *
25427  * Returns: (transfer full): #GFileIOStream or %NULL on error.
25428  * Since: 2.22
25429  */
25430
25431
25432 /**
25433  * g_file_open_readwrite_async:
25434  * @file: input #GFile.
25435  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
25436  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25437  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25438  * @user_data: (closure): the data to pass to callback function
25439  *
25440  * Asynchronously opens @file for reading and writing.
25441  *
25442  * For more details, see g_file_open_readwrite() which is
25443  * the synchronous version of this call.
25444  *
25445  * When the operation is finished, @callback will be called. You can then call
25446  * g_file_open_readwrite_finish() to get the result of the operation.
25447  *
25448  * Since: 2.22
25449  */
25450
25451
25452 /**
25453  * g_file_open_readwrite_finish:
25454  * @file: input #GFile.
25455  * @res: a #GAsyncResult.
25456  * @error: a #GError, or %NULL
25457  *
25458  * Finishes an asynchronous file read operation started with
25459  * g_file_open_readwrite_async().
25460  *
25461  * Free the returned object with g_object_unref().
25462  *
25463  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
25464  * Since: 2.22
25465  */
25466
25467
25468 /**
25469  * g_file_output_stream_get_etag:
25470  * @stream: a #GFileOutputStream.
25471  *
25472  * Gets the entity tag for the file when it has been written.
25473  * This must be called after the stream has been written
25474  * and closed, as the etag can change while writing.
25475  *
25476  * Returns: the entity tag for the stream.
25477  */
25478
25479
25480 /**
25481  * g_file_output_stream_query_info:
25482  * @stream: a #GFileOutputStream.
25483  * @attributes: a file attribute query string.
25484  * @cancellable: optional #GCancellable object, %NULL to ignore.
25485  * @error: a #GError, %NULL to ignore.
25486  *
25487  * Queries a file output stream for the given @attributes.
25488  * This function blocks while querying the stream. For the asynchronous
25489  * version of this function, see g_file_output_stream_query_info_async().
25490  * While the stream is blocked, the stream will set the pending flag
25491  * internally, and any other operations on the stream will fail with
25492  * %G_IO_ERROR_PENDING.
25493  *
25494  * Can fail if the stream was already closed (with @error being set to
25495  * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
25496  * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
25497  * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
25498  * all cases of failure, %NULL will be returned.
25499  *
25500  * If @cancellable is not %NULL, then the operation can be cancelled by
25501  * triggering the cancellable object from another thread. If the operation
25502  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
25503  * be returned.
25504  *
25505  * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
25506  */
25507
25508
25509 /**
25510  * g_file_output_stream_query_info_async:
25511  * @stream: a #GFileOutputStream.
25512  * @attributes: a file attribute query string.
25513  * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
25514  * @cancellable: optional #GCancellable object, %NULL to ignore.
25515  * @callback: callback to call when the request is satisfied
25516  * @user_data: the data to pass to callback function
25517  *
25518  * Asynchronously queries the @stream for a #GFileInfo. When completed,
25519  * @callback will be called with a #GAsyncResult which can be used to
25520  * finish the operation with g_file_output_stream_query_info_finish().
25521  *
25522  * For the synchronous version of this function, see
25523  * g_file_output_stream_query_info().
25524  */
25525
25526
25527 /**
25528  * g_file_output_stream_query_info_finish:
25529  * @stream: a #GFileOutputStream.
25530  * @result: a #GAsyncResult.
25531  * @error: a #GError, %NULL to ignore.
25532  *
25533  * Finalizes the asynchronous query started
25534  * by g_file_output_stream_query_info_async().
25535  *
25536  * Returns: (transfer full): A #GFileInfo for the finished query.
25537  */
25538
25539
25540 /**
25541  * g_file_parse_name:
25542  * @parse_name: a file name or path to be parsed.
25543  *
25544  * Constructs a #GFile with the given @parse_name (i.e. something given by g_file_get_parse_name()).
25545  * This operation never fails, but the returned object might not support any I/O
25546  * operation if the @parse_name cannot be parsed.
25547  *
25548  * Returns: (transfer full): a new #GFile.
25549  */
25550
25551
25552 /**
25553  * g_file_poll_mountable:
25554  * @file: input #GFile.
25555  * @cancellable: optional #GCancellable object, %NULL to ignore.
25556  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
25557  * @user_data: the data to pass to callback function
25558  *
25559  * Polls a file of type G_FILE_TYPE_MOUNTABLE.
25560  *
25561  * If @cancellable is not %NULL, then the operation can be cancelled by
25562  * triggering the cancellable object from another thread. If the operation
25563  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25564  *
25565  * When the operation is finished, @callback will be called. You can then call
25566  * g_file_mount_mountable_finish() to get the result of the operation.
25567  *
25568  * Since: 2.22
25569  */
25570
25571
25572 /**
25573  * g_file_poll_mountable_finish:
25574  * @file: input #GFile.
25575  * @result: a #GAsyncResult.
25576  * @error: a #GError, or %NULL
25577  *
25578  * Finishes a poll operation. See g_file_poll_mountable() for details.
25579  *
25580  * Finish an asynchronous poll operation that was polled
25581  * with g_file_poll_mountable().
25582  *
25583  * otherwise.
25584  *
25585  * Returns: %TRUE if the operation finished successfully. %FALSE
25586  * Since: 2.22
25587  */
25588
25589
25590 /**
25591  * g_file_query_default_handler:
25592  * @file: a #GFile to open.
25593  * @cancellable: optional #GCancellable object, %NULL to ignore.
25594  * @error: a #GError, or %NULL
25595  *
25596  * Returns the #GAppInfo that is registered as the default
25597  * application to handle the file specified by @file.
25598  *
25599  * If @cancellable is not %NULL, then the operation can be cancelled by
25600  * triggering the cancellable object from another thread. If the operation
25601  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25602  *
25603  * When you are done with it, release it with g_object_unref()
25604  *
25605  * Returns: (transfer full): a #GAppInfo if the handle was found, %NULL if there were errors.
25606  */
25607
25608
25609 /**
25610  * g_file_query_exists:
25611  * @file: input #GFile.
25612  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25613  *
25614  * Utility function to check if a particular file exists. This is
25615  * implemented using g_file_query_info() and as such does blocking I/O.
25616  *
25617  * Note that in many cases it is racy to first check for file existence
25618  * and then execute something based on the outcome of that, because the
25619  * file might have been created or removed in between the operations. The
25620  * general approach to handling that is to not check, but just do the
25621  * operation and handle the errors as they come.
25622  *
25623  * As an example of race-free checking, take the case of reading a file, and
25624  * if it doesn't exist, creating it. There are two racy versions: read it, and
25625  * on error create it; and: check if it exists, if not create it. These
25626  * can both result in two processes creating the file (with perhaps a partially
25627  * written file as the result). The correct approach is to always try to create
25628  * the file with g_file_create() which will either atomically create the file
25629  * or fail with a G_IO_ERROR_EXISTS error.
25630  *
25631  * However, in many cases an existence check is useful in a user
25632  * interface, for instance to make a menu item sensitive/insensitive, so that
25633  * you don't have to fool users that something is possible and then just show
25634  * and error dialog. If you do this, you should make sure to also handle the
25635  * errors that can happen due to races when you execute the operation.
25636  *
25637  * Returns: %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled).
25638  */
25639
25640
25641 /**
25642  * g_file_query_file_type:
25643  * @file: input #GFile.
25644  * @flags: a set of #GFileQueryInfoFlags passed to g_file_query_info().
25645  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25646  *
25647  * Utility function to inspect the #GFileType of a file. This is
25648  * implemented using g_file_query_info() and as such does blocking I/O.
25649  *
25650  * The primary use case of this method is to check if a file is a regular file,
25651  * directory, or symlink.
25652  *
25653  * does not exist
25654  *
25655  * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN if the file
25656  * Since: 2.18
25657  */
25658
25659
25660 /**
25661  * g_file_query_filesystem_info:
25662  * @file: input #GFile.
25663  * @attributes: an attribute query string.
25664  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25665  * @error: a #GError.
25666  *
25667  * Similar to g_file_query_info(), but obtains information
25668  * about the filesystem the @file is on, rather than the file itself.
25669  * For instance the amount of space available and the type of
25670  * the filesystem.
25671  *
25672  * The @attributes value is a string that specifies the file attributes that
25673  * should be gathered. It is not an error if it's not possible to read a particular
25674  * requested attribute from a file - it just won't be set. @attributes should
25675  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
25676  * means all attributes, and a wildcard like "filesystem::*" means all attributes in the
25677  * filesystem namespace. The standard namespace for filesystem attributes is "filesystem".
25678  * Common attributes of interest are #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE
25679  * (the total size of the filesystem in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of
25680  * bytes available), and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
25681  *
25682  * If @cancellable is not %NULL, then the operation can be cancelled by
25683  * triggering the cancellable object from another thread. If the operation
25684  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25685  *
25686  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
25687  * Other errors are possible too, and depend on what kind of filesystem the file is on.
25688  *
25689  * Free the returned object with g_object_unref().
25690  *
25691  * Returns: (transfer full): a #GFileInfo or %NULL if there was an error.
25692  */
25693
25694
25695 /**
25696  * g_file_query_filesystem_info_async:
25697  * @file: input #GFile.
25698  * @attributes: an attribute query string.
25699  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
25700  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25701  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25702  * @user_data: (closure): the data to pass to callback function
25703  *
25704  * Asynchronously gets the requested information about the filesystem
25705  * that the specified @file is on. The result is a #GFileInfo object
25706  * that contains key-value attributes (such as type or size for the
25707  * file).
25708  *
25709  * For more details, see g_file_query_filesystem_info() which is the
25710  * synchronous version of this call.
25711  *
25712  * When the operation is finished, @callback will be called. You can
25713  * then call g_file_query_info_finish() to get the result of the
25714  * operation.
25715  */
25716
25717
25718 /**
25719  * g_file_query_filesystem_info_finish:
25720  * @file: input #GFile.
25721  * @res: a #GAsyncResult.
25722  * @error: a #GError.
25723  *
25724  * Finishes an asynchronous filesystem info query.  See
25725  * g_file_query_filesystem_info_async().
25726  *
25727  * Free the returned object with g_object_unref().
25728  *
25729  * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
25730  */
25731
25732
25733 /**
25734  * g_file_query_info:
25735  * @file: input #GFile.
25736  * @attributes: an attribute query string.
25737  * @flags: a set of #GFileQueryInfoFlags.
25738  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25739  * @error: a #GError.
25740  *
25741  * Gets the requested information about specified @file. The result
25742  * is a #GFileInfo object that contains key-value attributes (such as
25743  * the type or size of the file).
25744  *
25745  * The @attributes value is a string that specifies the file attributes that
25746  * should be gathered. It is not an error if it's not possible to read a particular
25747  * requested attribute from a file - it just won't be set. @attributes should
25748  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
25749  * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
25750  * namespace. An example attribute query be "standard::*,owner::user".
25751  * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
25752  *
25753  * If @cancellable is not %NULL, then the operation can be cancelled by
25754  * triggering the cancellable object from another thread. If the operation
25755  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25756  *
25757  * For symlinks, normally the information about the target of the
25758  * symlink is returned, rather than information about the symlink itself.
25759  * However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in @flags the
25760  * information about the symlink itself will be returned. Also, for symlinks
25761  * that point to non-existing files the information about the symlink itself
25762  * will be returned.
25763  *
25764  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
25765  * Other errors are possible too, and depend on what kind of filesystem the file is on.
25766  *
25767  * Free the returned object with g_object_unref().
25768  *
25769  * Returns: (transfer full): a #GFileInfo for the given @file, or %NULL on error.
25770  */
25771
25772
25773 /**
25774  * g_file_query_info_async:
25775  * @file: input #GFile.
25776  * @attributes: an attribute query string.
25777  * @flags: a set of #GFileQueryInfoFlags.
25778  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
25779  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25780  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25781  * @user_data: (closure): the data to pass to callback function
25782  *
25783  * Asynchronously gets the requested information about specified @file. The result
25784  * is a #GFileInfo object that contains key-value attributes (such as type or size
25785  * for the file).
25786  *
25787  * For more details, see g_file_query_info() which is
25788  * the synchronous version of this call.
25789  *
25790  * When the operation is finished, @callback will be called. You can then call
25791  * g_file_query_info_finish() to get the result of the operation.
25792  */
25793
25794
25795 /**
25796  * g_file_query_info_finish:
25797  * @file: input #GFile.
25798  * @res: a #GAsyncResult.
25799  * @error: a #GError.
25800  *
25801  * Finishes an asynchronous file info query.
25802  * See g_file_query_info_async().
25803  *
25804  * Free the returned object with g_object_unref().
25805  *
25806  * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
25807  */
25808
25809
25810 /**
25811  * g_file_query_settable_attributes:
25812  * @file: input #GFile.
25813  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25814  * @error: a #GError, or %NULL
25815  *
25816  * Obtain the list of settable attributes for the file.
25817  *
25818  * Returns the type and full attribute name of all the attributes
25819  * that can be set on this file. This doesn't mean setting it will always
25820  * succeed though, you might get an access failure, or some specific
25821  * file may not support a specific attribute.
25822  *
25823  * If @cancellable is not %NULL, then the operation can be cancelled by
25824  * triggering the cancellable object from another thread. If the operation
25825  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25826  *
25827  * When you are done with it, release it with g_file_attribute_info_list_unref()
25828  *
25829  * Returns: a #GFileAttributeInfoList describing the settable attributes.
25830  */
25831
25832
25833 /**
25834  * g_file_query_writable_namespaces:
25835  * @file: input #GFile.
25836  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25837  * @error: a #GError, or %NULL
25838  *
25839  * Obtain the list of attribute namespaces where new attributes
25840  * can be created by a user. An example of this is extended
25841  * attributes (in the "xattr" namespace).
25842  *
25843  * If @cancellable is not %NULL, then the operation can be cancelled by
25844  * triggering the cancellable object from another thread. If the operation
25845  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25846  *
25847  * When you are done with it, release it with g_file_attribute_info_list_unref()
25848  *
25849  * Returns: a #GFileAttributeInfoList describing the writable namespaces.
25850  */
25851
25852
25853 /**
25854  * g_file_read:
25855  * @file: #GFile to read.
25856  * @cancellable: (allow-none): a #GCancellable
25857  * @error: a #GError, or %NULL
25858  *
25859  * Opens a file for reading. The result is a #GFileInputStream that
25860  * can be used to read the contents of the file.
25861  *
25862  * If @cancellable is not %NULL, then the operation can be cancelled by
25863  * triggering the cancellable object from another thread. If the operation
25864  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25865  *
25866  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
25867  * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
25868  * Other errors are possible too, and depend on what kind of filesystem the file is on.
25869  *
25870  * Free the returned object with g_object_unref().
25871  *
25872  * Virtual: read_fn
25873  * Returns: (transfer full): #GFileInputStream or %NULL on error.
25874  */
25875
25876
25877 /**
25878  * g_file_read_async:
25879  * @file: input #GFile
25880  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
25881  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25882  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25883  * @user_data: (closure): the data to pass to callback function
25884  *
25885  * Asynchronously opens @file for reading.
25886  *
25887  * For more details, see g_file_read() which is
25888  * the synchronous version of this call.
25889  *
25890  * When the operation is finished, @callback will be called. You can then call
25891  * g_file_read_finish() to get the result of the operation.
25892  */
25893
25894
25895 /**
25896  * g_file_read_finish:
25897  * @file: input #GFile.
25898  * @res: a #GAsyncResult.
25899  * @error: a #GError, or %NULL
25900  *
25901  * Finishes an asynchronous file read operation started with
25902  * g_file_read_async().
25903  *
25904  * Free the returned object with g_object_unref().
25905  *
25906  * Returns: (transfer full): a #GFileInputStream or %NULL on error.
25907  */
25908
25909
25910 /**
25911  * g_file_replace:
25912  * @file: input #GFile.
25913  * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore.
25914  * @make_backup: %TRUE if a backup should be created.
25915  * @flags: a set of #GFileCreateFlags.
25916  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25917  * @error: a #GError, or %NULL
25918  *
25919  * Returns an output stream for overwriting the file, possibly
25920  * creating a backup copy of the file first. If the file doesn't exist,
25921  * it will be created.
25922  *
25923  * This will try to replace the file in the safest way possible so
25924  * that any errors during the writing will not affect an already
25925  * existing copy of the file. For instance, for local files it
25926  * may write to a temporary file and then atomically rename over
25927  * the destination when the stream is closed.
25928  *
25929  * By default files created are generally readable by everyone,
25930  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
25931  * will be made readable only to the current user, to the level that
25932  * is supported on the target filesystem.
25933  *
25934  * If @cancellable is not %NULL, then the operation can be cancelled by
25935  * triggering the cancellable object from another thread. If the operation
25936  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25937  *
25938  * If you pass in a non-#NULL @etag value, then this value is
25939  * compared to the current entity tag of the file, and if they differ
25940  * an G_IO_ERROR_WRONG_ETAG error is returned. This generally means
25941  * that the file has been changed since you last read it. You can get
25942  * the new etag from g_file_output_stream_get_etag() after you've
25943  * finished writing and closed the #GFileOutputStream. When you load
25944  * a new file you can use g_file_input_stream_query_info() to get
25945  * the etag of the file.
25946  *
25947  * If @make_backup is %TRUE, this function will attempt to make a backup
25948  * of the current file before overwriting it. If this fails a G_IO_ERROR_CANT_CREATE_BACKUP
25949  * error will be returned. If you want to replace anyway, try again with
25950  * @make_backup set to %FALSE.
25951  *
25952  * If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned,
25953  * and if the file is some other form of non-regular file then a
25954  * G_IO_ERROR_NOT_REGULAR_FILE error will be returned.
25955  * Some file systems don't allow all file names, and may
25956  * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
25957  * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
25958  * Other errors are possible too, and depend on what kind of
25959  * filesystem the file is on.
25960  *
25961  * Free the returned object with g_object_unref().
25962  *
25963  * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
25964  */
25965
25966
25967 /**
25968  * g_file_replace_async:
25969  * @file: input #GFile.
25970  * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
25971  * @make_backup: %TRUE if a backup should be created.
25972  * @flags: a set of #GFileCreateFlags.
25973  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
25974  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25975  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25976  * @user_data: (closure): the data to pass to callback function
25977  *
25978  * Asynchronously overwrites the file, replacing the contents, possibly
25979  * creating a backup copy of the file first.
25980  *
25981  * For more details, see g_file_replace() which is
25982  * the synchronous version of this call.
25983  *
25984  * When the operation is finished, @callback will be called. You can then call
25985  * g_file_replace_finish() to get the result of the operation.
25986  */
25987
25988
25989 /**
25990  * g_file_replace_contents:
25991  * @file: input #GFile.
25992  * @contents: (element-type guint8) (array length=length): a string containing the new contents for @file.
25993  * @length: the length of @contents in bytes.
25994  * @etag: (allow-none): the old <link linkend="gfile-etag">entity tag</link> for the document, or %NULL
25995  * @make_backup: %TRUE if a backup should be created.
25996  * @flags: a set of #GFileCreateFlags.
25997  * @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
25998  * @cancellable: optional #GCancellable object, %NULL to ignore.
25999  * @error: a #GError, or %NULL
26000  *
26001  * Replaces the contents of @file with @contents of @length bytes.
26002  * If @etag is specified (not %NULL) any existing file must have that etag, or
26003  * the error %G_IO_ERROR_WRONG_ETAG will be returned.
26004  *
26005  * If @make_backup is %TRUE, this function will attempt to make a backup of @file.
26006  *
26007  * If @cancellable is not %NULL, then the operation can be cancelled by
26008  * triggering the cancellable object from another thread. If the operation
26009  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26010  *
26011  * The returned @new_etag can be used to verify that the file hasn't changed the
26012  * next time it is saved over.
26013  *
26014  * has occurred, this function will return %FALSE and set @error
26015  * appropriately if present.
26016  *
26017  * Returns: %TRUE if successful. If an error
26018  */
26019
26020
26021 /**
26022  * g_file_replace_contents_async:
26023  * @file: input #GFile.
26024  * @contents: (element-type guint8) (array length=length): string of contents to replace the file with.
26025  * @length: the length of @contents in bytes.
26026  * @etag: (allow-none): a new <link linkend="gfile-etag">entity tag</link> for the @file, or %NULL
26027  * @make_backup: %TRUE if a backup should be created.
26028  * @flags: a set of #GFileCreateFlags.
26029  * @cancellable: optional #GCancellable object, %NULL to ignore.
26030  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
26031  * @user_data: the data to pass to callback function
26032  *
26033  * Starts an asynchronous replacement of @file with the given
26034  * @contents of @length bytes. @etag will replace the document's
26035  * current entity tag.
26036  *
26037  * When this operation has completed, @callback will be called with
26038  * @user_user data, and the operation can be finalized with
26039  * g_file_replace_contents_finish().
26040  *
26041  * If @cancellable is not %NULL, then the operation can be cancelled by
26042  * triggering the cancellable object from another thread. If the operation
26043  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26044  *
26045  * If @make_backup is %TRUE, this function will attempt to
26046  * make a backup of @file.
26047  */
26048
26049
26050 /**
26051  * g_file_replace_contents_finish:
26052  * @file: input #GFile.
26053  * @res: a #GAsyncResult.
26054  * @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
26055  * @error: a #GError, or %NULL
26056  *
26057  * Finishes an asynchronous replace of the given @file. See
26058  * g_file_replace_contents_async(). Sets @new_etag to the new entity
26059  * tag for the document, if present.
26060  *
26061  * Returns: %TRUE on success, %FALSE on failure.
26062  */
26063
26064
26065 /**
26066  * g_file_replace_finish:
26067  * @file: input #GFile.
26068  * @res: a #GAsyncResult.
26069  * @error: a #GError, or %NULL
26070  *
26071  * Finishes an asynchronous file replace operation started with
26072  * g_file_replace_async().
26073  *
26074  * Free the returned object with g_object_unref().
26075  *
26076  * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
26077  */
26078
26079
26080 /**
26081  * g_file_replace_readwrite:
26082  * @file: a #GFile
26083  * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore
26084  * @make_backup: %TRUE if a backup should be created
26085  * @flags: a set of #GFileCreateFlags
26086  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
26087  * @error: return location for a #GError, or %NULL
26088  *
26089  * Returns an output stream for overwriting the file in readwrite mode,
26090  * possibly creating a backup copy of the file first. If the file doesn't
26091  * exist, it will be created.
26092  *
26093  * For details about the behaviour, see g_file_replace() which does the same
26094  * thing but returns an output stream only.
26095  *
26096  * Note that in many non-local file cases read and write streams are not
26097  * supported, so make sure you really need to do read and write streaming,
26098  * rather than just opening for reading or writing.
26099  *
26100  * Free the returned object with g_object_unref().
26101  *
26102  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
26103  * Since: 2.22
26104  */
26105
26106
26107 /**
26108  * g_file_replace_readwrite_async:
26109  * @file: input #GFile.
26110  * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
26111  * @make_backup: %TRUE if a backup should be created.
26112  * @flags: a set of #GFileCreateFlags.
26113  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
26114  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26115  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
26116  * @user_data: (closure): the data to pass to callback function
26117  *
26118  * Asynchronously overwrites the file in read-write mode, replacing the
26119  * contents, possibly creating a backup copy of the file first.
26120  *
26121  * For more details, see g_file_replace_readwrite() which is
26122  * the synchronous version of this call.
26123  *
26124  * When the operation is finished, @callback will be called. You can then
26125  * call g_file_replace_readwrite_finish() to get the result of the operation.
26126  *
26127  * Since: 2.22
26128  */
26129
26130
26131 /**
26132  * g_file_replace_readwrite_finish:
26133  * @file: input #GFile.
26134  * @res: a #GAsyncResult.
26135  * @error: a #GError, or %NULL
26136  *
26137  * Finishes an asynchronous file replace operation started with
26138  * g_file_replace_readwrite_async().
26139  *
26140  * Free the returned object with g_object_unref().
26141  *
26142  * Returns: (transfer full): a #GFileIOStream, or %NULL on error.
26143  * Since: 2.22
26144  */
26145
26146
26147 /**
26148  * g_file_resolve_relative_path:
26149  * @file: input #GFile.
26150  * @relative_path: a given relative path string.
26151  *
26152  * Resolves a relative path for @file to an absolute path.
26153  *
26154  * This call does no blocking i/o.
26155  *
26156  * is %NULL or if @file is invalid.
26157  * Free the returned object with g_object_unref().
26158  *
26159  * Returns: (transfer full): #GFile to the resolved path. %NULL if @relative_path
26160  */
26161
26162
26163 /**
26164  * g_file_set_attribute:
26165  * @file: input #GFile.
26166  * @attribute: a string containing the attribute's name.
26167  * @type: The type of the attribute
26168  * @value_p: a pointer to the value (or the pointer itself if the type is a pointer type)
26169  * @flags: a set of #GFileQueryInfoFlags.
26170  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26171  * @error: a #GError, or %NULL
26172  *
26173  * Sets an attribute in the file with attribute name @attribute to @value.
26174  *
26175  * Some attributes can be unset by setting @attribute to
26176  * %G_FILE_ATTRIBUTE_TYPE_INVALID and @value to %NULL.
26177  *
26178  * If @cancellable is not %NULL, then the operation can be cancelled by
26179  * triggering the cancellable object from another thread. If the operation
26180  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26181  *
26182  * Returns: %TRUE if the attribute was set, %FALSE otherwise.
26183  */
26184
26185
26186 /**
26187  * g_file_set_attribute_byte_string:
26188  * @file: input #GFile.
26189  * @attribute: a string containing the attribute's name.
26190  * @value: a string containing the attribute's new value.
26191  * @flags: a #GFileQueryInfoFlags.
26192  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26193  * @error: a #GError, or %NULL
26194  *
26195  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value.
26196  * If @attribute is of a different type, this operation will fail,
26197  * returning %FALSE.
26198  *
26199  * If @cancellable is not %NULL, then the operation can be cancelled by
26200  * triggering the cancellable object from another thread. If the operation
26201  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26202  *
26203  * in the @file, %FALSE otherwise.
26204  *
26205  * Returns: %TRUE if the @attribute was successfully set to @value
26206  */
26207
26208
26209 /**
26210  * g_file_set_attribute_int32:
26211  * @file: input #GFile.
26212  * @attribute: a string containing the attribute's name.
26213  * @value: a #gint32 containing the attribute's new value.
26214  * @flags: a #GFileQueryInfoFlags.
26215  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26216  * @error: a #GError, or %NULL
26217  *
26218  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value.
26219  * If @attribute is of a different type, this operation will fail.
26220  *
26221  * If @cancellable is not %NULL, then the operation can be cancelled by
26222  * triggering the cancellable object from another thread. If the operation
26223  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26224  *
26225  * in the @file, %FALSE otherwise.
26226  *
26227  * Returns: %TRUE if the @attribute was successfully set to @value
26228  */
26229
26230
26231 /**
26232  * g_file_set_attribute_int64:
26233  * @file: input #GFile.
26234  * @attribute: a string containing the attribute's name.
26235  * @value: a #guint64 containing the attribute's new value.
26236  * @flags: a #GFileQueryInfoFlags.
26237  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26238  * @error: a #GError, or %NULL
26239  *
26240  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value.
26241  * If @attribute is of a different type, this operation will fail.
26242  *
26243  * If @cancellable is not %NULL, then the operation can be cancelled by
26244  * triggering the cancellable object from another thread. If the operation
26245  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26246  *
26247  * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
26248  */
26249
26250
26251 /**
26252  * g_file_set_attribute_string:
26253  * @file: input #GFile.
26254  * @attribute: a string containing the attribute's name.
26255  * @value: a string containing the attribute's value.
26256  * @flags: #GFileQueryInfoFlags.
26257  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26258  * @error: a #GError, or %NULL
26259  *
26260  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value.
26261  * If @attribute is of a different type, this operation will fail.
26262  *
26263  * If @cancellable is not %NULL, then the operation can be cancelled by
26264  * triggering the cancellable object from another thread. If the operation
26265  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26266  *
26267  * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
26268  */
26269
26270
26271 /**
26272  * g_file_set_attribute_uint32:
26273  * @file: input #GFile.
26274  * @attribute: a string containing the attribute's name.
26275  * @value: a #guint32 containing the attribute's new value.
26276  * @flags: a #GFileQueryInfoFlags.
26277  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26278  * @error: a #GError, or %NULL
26279  *
26280  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value.
26281  * If @attribute is of a different type, this operation will fail.
26282  *
26283  * If @cancellable is not %NULL, then the operation can be cancelled by
26284  * triggering the cancellable object from another thread. If the operation
26285  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26286  *
26287  * in the @file, %FALSE otherwise.
26288  *
26289  * Returns: %TRUE if the @attribute was successfully set to @value
26290  */
26291
26292
26293 /**
26294  * g_file_set_attribute_uint64:
26295  * @file: input #GFile.
26296  * @attribute: a string containing the attribute's name.
26297  * @value: a #guint64 containing the attribute's new value.
26298  * @flags: a #GFileQueryInfoFlags.
26299  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26300  * @error: a #GError, or %NULL
26301  *
26302  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value.
26303  * If @attribute is of a different type, this operation will fail.
26304  *
26305  * If @cancellable is not %NULL, then the operation can be cancelled by
26306  * triggering the cancellable object from another thread. If the operation
26307  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26308  *
26309  * in the @file, %FALSE otherwise.
26310  *
26311  * Returns: %TRUE if the @attribute was successfully set to @value
26312  */
26313
26314
26315 /**
26316  * g_file_set_attributes_async:
26317  * @file: input #GFile.
26318  * @info: a #GFileInfo.
26319  * @flags: a #GFileQueryInfoFlags.
26320  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
26321  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26322  * @callback: (scope async): a #GAsyncReadyCallback.
26323  * @user_data: (closure): a #gpointer.
26324  *
26325  * Asynchronously sets the attributes of @file with @info.
26326  *
26327  * For more details, see g_file_set_attributes_from_info() which is
26328  * the synchronous version of this call.
26329  *
26330  * When the operation is finished, @callback will be called. You can then call
26331  * g_file_set_attributes_finish() to get the result of the operation.
26332  */
26333
26334
26335 /**
26336  * g_file_set_attributes_finish:
26337  * @file: input #GFile.
26338  * @result: a #GAsyncResult.
26339  * @info: (out) (transfer full): a #GFileInfo.
26340  * @error: a #GError, or %NULL
26341  *
26342  * Finishes setting an attribute started in g_file_set_attributes_async().
26343  *
26344  * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise.
26345  */
26346
26347
26348 /**
26349  * g_file_set_attributes_from_info:
26350  * @file: input #GFile.
26351  * @info: a #GFileInfo.
26352  * @flags: #GFileQueryInfoFlags
26353  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26354  * @error: a #GError, or %NULL
26355  *
26356  * Tries to set all attributes in the #GFileInfo on the target values,
26357  * not stopping on the first error.
26358  *
26359  * If there is any error during this operation then @error will be set to
26360  * the first error. Error on particular fields are flagged by setting
26361  * the "status" field in the attribute value to
26362  * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can also detect
26363  * further errors.
26364  *
26365  * If @cancellable is not %NULL, then the operation can be cancelled by
26366  * triggering the cancellable object from another thread. If the operation
26367  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26368  *
26369  * Returns: %TRUE if there was any error, %FALSE otherwise.
26370  */
26371
26372
26373 /**
26374  * g_file_set_display_name:
26375  * @file: input #GFile.
26376  * @display_name: a string.
26377  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26378  * @error: a #GError, or %NULL
26379  *
26380  * Renames @file to the specified display name.
26381  *
26382  * The display name is converted from UTF8 to the correct encoding for the target
26383  * filesystem if possible and the @file is renamed to this.
26384  *
26385  * If you want to implement a rename operation in the user interface the edit name
26386  * (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the initial value in the rename
26387  * widget, and then the result after editing should be passed to g_file_set_display_name().
26388  *
26389  * On success the resulting converted filename is returned.
26390  *
26391  * If @cancellable is not %NULL, then the operation can be cancelled by
26392  * triggering the cancellable object from another thread. If the operation
26393  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26394  *
26395  * if there was an error.
26396  * Free the returned object with g_object_unref().
26397  *
26398  * Returns: (transfer full): a #GFile specifying what @file was renamed to, or %NULL
26399  */
26400
26401
26402 /**
26403  * g_file_set_display_name_async:
26404  * @file: input #GFile.
26405  * @display_name: a string.
26406  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
26407  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26408  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
26409  * @user_data: (closure): the data to pass to callback function
26410  *
26411  * Asynchronously sets the display name for a given #GFile.
26412  *
26413  * For more details, see g_file_set_display_name() which is
26414  * the synchronous version of this call.
26415  *
26416  * When the operation is finished, @callback will be called. You can then call
26417  * g_file_set_display_name_finish() to get the result of the operation.
26418  */
26419
26420
26421 /**
26422  * g_file_set_display_name_finish:
26423  * @file: input #GFile.
26424  * @res: a #GAsyncResult.
26425  * @error: a #GError, or %NULL
26426  *
26427  * Finishes setting a display name started with
26428  * g_file_set_display_name_async().
26429  *
26430  * Free the returned object with g_object_unref().
26431  *
26432  * Returns: (transfer full): a #GFile or %NULL on error.
26433  */
26434
26435
26436 /**
26437  * g_file_start_mountable:
26438  * @file: input #GFile.
26439  * @flags: flags affecting the operation
26440  * @start_operation: a #GMountOperation, or %NULL to avoid user interaction.
26441  * @cancellable: optional #GCancellable object, %NULL to ignore.
26442  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
26443  * @user_data: the data to pass to callback function
26444  *
26445  * Starts a file of type G_FILE_TYPE_MOUNTABLE.
26446  * Using @start_operation, you can request callbacks when, for instance,
26447  * passwords are needed during authentication.
26448  *
26449  * If @cancellable is not %NULL, then the operation can be cancelled by
26450  * triggering the cancellable object from another thread. If the operation
26451  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26452  *
26453  * When the operation is finished, @callback will be called. You can then call
26454  * g_file_mount_mountable_finish() to get the result of the operation.
26455  *
26456  * Since: 2.22
26457  */
26458
26459
26460 /**
26461  * g_file_start_mountable_finish:
26462  * @file: input #GFile.
26463  * @result: a #GAsyncResult.
26464  * @error: a #GError, or %NULL
26465  *
26466  * Finishes a start operation. See g_file_start_mountable() for details.
26467  *
26468  * Finish an asynchronous start operation that was started
26469  * with g_file_start_mountable().
26470  *
26471  * otherwise.
26472  *
26473  * Returns: %TRUE if the operation finished successfully. %FALSE
26474  * Since: 2.22
26475  */
26476
26477
26478 /**
26479  * g_file_stop_mountable:
26480  * @file: input #GFile.
26481  * @flags: flags affecting the operation
26482  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
26483  * @cancellable: optional #GCancellable object, %NULL to ignore.
26484  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
26485  * @user_data: the data to pass to callback function
26486  *
26487  * Stops a file of type G_FILE_TYPE_MOUNTABLE.
26488  *
26489  * If @cancellable is not %NULL, then the operation can be cancelled by
26490  * triggering the cancellable object from another thread. If the operation
26491  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26492  *
26493  * When the operation is finished, @callback will be called. You can then call
26494  * g_file_stop_mountable_finish() to get the result of the operation.
26495  *
26496  * Since: 2.22
26497  */
26498
26499
26500 /**
26501  * g_file_stop_mountable_finish:
26502  * @file: input #GFile.
26503  * @result: a #GAsyncResult.
26504  * @error: a #GError, or %NULL
26505  *
26506  * Finishes an stop operation, see g_file_stop_mountable() for details.
26507  *
26508  * Finish an asynchronous stop operation that was started
26509  * with g_file_stop_mountable().
26510  *
26511  * otherwise.
26512  *
26513  * Returns: %TRUE if the operation finished successfully. %FALSE
26514  * Since: 2.22
26515  */
26516
26517
26518 /**
26519  * g_file_supports_thread_contexts:
26520  * @file: a #GFile.
26521  *
26522  * Checks if @file supports <link
26523  * linkend="g-main-context-push-thread-default-context">thread-default
26524  * contexts</link>. If this returns %FALSE, you cannot perform
26525  * asynchronous operations on @file in a thread that has a
26526  * thread-default context.
26527  *
26528  * Returns: Whether or not @file supports thread-default contexts.
26529  * Since: 2.22
26530  */
26531
26532
26533 /**
26534  * g_file_trash:
26535  * @file: #GFile to send to trash.
26536  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26537  * @error: a #GError, or %NULL
26538  *
26539  * Sends @file to the "Trashcan", if possible. This is similar to
26540  * deleting it, but the user can recover it before emptying the trashcan.
26541  * Not all file systems support trashing, so this call can return the
26542  * %G_IO_ERROR_NOT_SUPPORTED error.
26543  *
26544  *
26545  * If @cancellable is not %NULL, then the operation can be cancelled by
26546  * triggering the cancellable object from another thread. If the operation
26547  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26548  *
26549  * Returns: %TRUE on successful trash, %FALSE otherwise.
26550  */
26551
26552
26553 /**
26554  * g_file_unmount_mountable:
26555  * @file: input #GFile.
26556  * @flags: flags affecting the operation
26557  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26558  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
26559  * @user_data: (closure): the data to pass to callback function
26560  *
26561  * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
26562  *
26563  * If @cancellable is not %NULL, then the operation can be cancelled by
26564  * triggering the cancellable object from another thread. If the operation
26565  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26566  *
26567  * When the operation is finished, @callback will be called. You can then call
26568  * g_file_unmount_mountable_finish() to get the result of the operation.
26569  *
26570  * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation() instead.
26571  */
26572
26573
26574 /**
26575  * g_file_unmount_mountable_finish:
26576  * @file: input #GFile.
26577  * @result: a #GAsyncResult.
26578  * @error: a #GError, or %NULL
26579  *
26580  * Finishes an unmount operation, see g_file_unmount_mountable() for details.
26581  *
26582  * Finish an asynchronous unmount operation that was started
26583  * with g_file_unmount_mountable().
26584  *
26585  * otherwise.
26586  *
26587  * Returns: %TRUE if the operation finished successfully. %FALSE
26588  * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation_finish() instead.
26589  */
26590
26591
26592 /**
26593  * g_file_unmount_mountable_with_operation:
26594  * @file: input #GFile.
26595  * @flags: flags affecting the operation
26596  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
26597  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26598  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
26599  * @user_data: (closure): the data to pass to callback function
26600  *
26601  * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
26602  *
26603  * If @cancellable is not %NULL, then the operation can be cancelled by
26604  * triggering the cancellable object from another thread. If the operation
26605  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26606  *
26607  * When the operation is finished, @callback will be called. You can then call
26608  * g_file_unmount_mountable_finish() to get the result of the operation.
26609  *
26610  * Since: 2.22
26611  */
26612
26613
26614 /**
26615  * g_file_unmount_mountable_with_operation_finish:
26616  * @file: input #GFile.
26617  * @result: a #GAsyncResult.
26618  * @error: a #GError, or %NULL
26619  *
26620  * Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.
26621  *
26622  * Finish an asynchronous unmount operation that was started
26623  * with g_file_unmount_mountable_with_operation().
26624  *
26625  * otherwise.
26626  *
26627  * Returns: %TRUE if the operation finished successfully. %FALSE
26628  * Since: 2.22
26629  */
26630
26631
26632 /**
26633  * g_filename_completer_get_completion_suffix:
26634  * @completer: the filename completer.
26635  * @initial_text: text to be completed.
26636  *
26637  * Obtains a completion for @initial_text from @completer.
26638  *
26639  * This string is not owned by GIO, so remember to g_free() it
26640  * when finished.
26641  *
26642  * Returns: a completed string, or %NULL if no completion exists.
26643  */
26644
26645
26646 /**
26647  * g_filename_completer_get_completions:
26648  * @completer: the filename completer.
26649  * @initial_text: text to be completed.
26650  *
26651  * Gets an array of completion strings for a given initial text.
26652  *
26653  * This array must be freed by g_strfreev() when finished.
26654  *
26655  * Returns: (array zero-terminated=1) (transfer full): array of strings with possible completions for @initial_text.
26656  */
26657
26658
26659 /**
26660  * g_filename_completer_new:
26661  *
26662  * Creates a new filename completer.
26663  *
26664  * Returns: a #GFilenameCompleter.
26665  */
26666
26667
26668 /**
26669  * g_filename_completer_set_dirs_only:
26670  * @completer: the filename completer.
26671  * @dirs_only: a #gboolean.
26672  *
26673  * If @dirs_only is %TRUE, @completer will only
26674  * complete directory names, and not file names.
26675  */
26676
26677
26678 /**
26679  * g_filter_input_stream_get_base_stream:
26680  * @stream: a #GFilterInputStream.
26681  *
26682  * Gets the base stream for the filter stream.
26683  *
26684  * Returns: (transfer none): a #GInputStream.
26685  */
26686
26687
26688 /**
26689  * g_filter_input_stream_get_close_base_stream:
26690  * @stream: a #GFilterInputStream.
26691  *
26692  * Returns whether the base stream will be closed when @stream is
26693  * closed.
26694  *
26695  * Returns: %TRUE if the base stream will be closed.
26696  */
26697
26698
26699 /**
26700  * g_filter_input_stream_set_close_base_stream:
26701  * @stream: a #GFilterInputStream.
26702  * @close_base: %TRUE to close the base stream.
26703  *
26704  * Sets whether the base stream will be closed when @stream is closed.
26705  */
26706
26707
26708 /**
26709  * g_filter_output_stream_get_base_stream:
26710  * @stream: a #GFilterOutputStream.
26711  *
26712  * Gets the base stream for the filter stream.
26713  *
26714  * Returns: (transfer none): a #GOutputStream.
26715  */
26716
26717
26718 /**
26719  * g_filter_output_stream_get_close_base_stream:
26720  * @stream: a #GFilterOutputStream.
26721  *
26722  * Returns whether the base stream will be closed when @stream is
26723  * closed.
26724  *
26725  * Returns: %TRUE if the base stream will be closed.
26726  */
26727
26728
26729 /**
26730  * g_filter_output_stream_set_close_base_stream:
26731  * @stream: a #GFilterOutputStream.
26732  * @close_base: %TRUE to close the base stream.
26733  *
26734  * Sets whether the base stream will be closed when @stream is closed.
26735  */
26736
26737
26738 /**
26739  * g_hash_table_freeze:
26740  * @hash_table: a #GHashTable
26741  *
26742  * This function is deprecated and will be removed in the next major
26743  * release of GLib. It does nothing.
26744  */
26745
26746
26747 /**
26748  * g_hash_table_thaw:
26749  * @hash_table: a #GHashTable
26750  *
26751  * This function is deprecated and will be removed in the next major
26752  * release of GLib. It does nothing.
26753  */
26754
26755
26756 /**
26757  * g_icon_equal:
26758  * @icon1: pointer to the first #GIcon.
26759  * @icon2: pointer to the second #GIcon.
26760  *
26761  * Checks if two icons are equal.
26762  *
26763  * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise.
26764  */
26765
26766
26767 /**
26768  * g_icon_hash:
26769  * @icon: #gconstpointer to an icon object.
26770  *
26771  * Gets a hash for an icon.
26772  *
26773  * use in a #GHashTable or similar data structure.
26774  *
26775  * Virtual: hash
26776  * Returns: a #guint containing a hash for the @icon, suitable for
26777  */
26778
26779
26780 /**
26781  * g_icon_new_for_string:
26782  * @str: A string obtained via g_icon_to_string().
26783  * @error: Return location for error.
26784  *
26785  * Generate a #GIcon instance from @str. This function can fail if
26786  * @str is not valid - see g_icon_to_string() for discussion.
26787  *
26788  * If your application or library provides one or more #GIcon
26789  * implementations you need to ensure that each #GType is registered
26790  * with the type system prior to calling g_icon_new_for_string().
26791  *
26792  * interface or %NULL if @error is set.
26793  *
26794  * Returns: (transfer full): An object implementing the #GIcon
26795  * Since: 2.20
26796  */
26797
26798
26799 /**
26800  * g_icon_to_string:
26801  * @icon: a #GIcon.
26802  *
26803  * Generates a textual representation of @icon that can be used for
26804  * serialization such as when passing @icon to a different process or
26805  * saving it to persistent storage. Use g_icon_new_for_string() to
26806  * get @icon back from the returned string.
26807  *
26808  * The encoding of the returned string is proprietary to #GIcon except
26809  * in the following two cases
26810  *
26811  * <itemizedlist>
26812  * <listitem><para>
26813  * If @icon is a #GFileIcon, the returned string is a native path
26814  * (such as <literal>/path/to/my icon.png</literal>) without escaping
26815  * if the #GFile for @icon is a native file.  If the file is not
26816  * native, the returned string is the result of g_file_get_uri()
26817  * (such as <literal>sftp://path/to/my&percnt;20icon.png</literal>).
26818  * </para></listitem>
26819  * <listitem><para>
26820  * If @icon is a #GThemedIcon with exactly one name, the encoding is
26821  * simply the name (such as <literal>network-server</literal>).
26822  * </para></listitem>
26823  * </itemizedlist>
26824  *
26825  * be serialized. Use g_free() to free.
26826  *
26827  * Virtual: to_tokens
26828  * Returns: An allocated NUL-terminated UTF8 string or %NULL if @icon can't
26829  * Since: 2.20
26830  */
26831
26832
26833 /**
26834  * g_inet_address_equal:
26835  * @address: A #GInetAddress.
26836  * @other_address: Another #GInetAddress.
26837  *
26838  * Checks if two #GInetAddress instances are equal, e.g. the same address.
26839  *
26840  * Returns: %TRUE if @address and @other_address are equal, %FALSE otherwise.
26841  * Since: 2.30
26842  */
26843
26844
26845 /**
26846  * g_inet_address_get_family:
26847  * @address: a #GInetAddress
26848  *
26849  * Gets @address's family
26850  *
26851  * Returns: @address's family
26852  * Since: 2.22
26853  */
26854
26855
26856 /**
26857  * g_inet_address_get_is_any:
26858  * @address: a #GInetAddress
26859  *
26860  * Tests whether @address is the "any" address for its family.
26861  *
26862  * Returns: %TRUE if @address is the "any" address for its family.
26863  * Since: 2.22
26864  */
26865
26866
26867 /**
26868  * g_inet_address_get_is_link_local:
26869  * @address: a #GInetAddress
26870  *
26871  * Tests whether @address is a link-local address (that is, if it
26872  * identifies a host on a local network that is not connected to the
26873  * Internet).
26874  *
26875  * Returns: %TRUE if @address is a link-local address.
26876  * Since: 2.22
26877  */
26878
26879
26880 /**
26881  * g_inet_address_get_is_loopback:
26882  * @address: a #GInetAddress
26883  *
26884  * Tests whether @address is the loopback address for its family.
26885  *
26886  * Returns: %TRUE if @address is the loopback address for its family.
26887  * Since: 2.22
26888  */
26889
26890
26891 /**
26892  * g_inet_address_get_is_mc_global:
26893  * @address: a #GInetAddress
26894  *
26895  * Tests whether @address is a global multicast address.
26896  *
26897  * Returns: %TRUE if @address is a global multicast address.
26898  * Since: 2.22
26899  */
26900
26901
26902 /**
26903  * g_inet_address_get_is_mc_link_local:
26904  * @address: a #GInetAddress
26905  *
26906  * Tests whether @address is a link-local multicast address.
26907  *
26908  * Returns: %TRUE if @address is a link-local multicast address.
26909  * Since: 2.22
26910  */
26911
26912
26913 /**
26914  * g_inet_address_get_is_mc_node_local:
26915  * @address: a #GInetAddress
26916  *
26917  * Tests whether @address is a node-local multicast address.
26918  *
26919  * Returns: %TRUE if @address is a node-local multicast address.
26920  * Since: 2.22
26921  */
26922
26923
26924 /**
26925  * g_inet_address_get_is_mc_org_local:
26926  * @address: a #GInetAddress
26927  *
26928  * Tests whether @address is an organization-local multicast address.
26929  *
26930  * Returns: %TRUE if @address is an organization-local multicast address.
26931  * Since: 2.22
26932  */
26933
26934
26935 /**
26936  * g_inet_address_get_is_mc_site_local:
26937  * @address: a #GInetAddress
26938  *
26939  * Tests whether @address is a site-local multicast address.
26940  *
26941  * Returns: %TRUE if @address is a site-local multicast address.
26942  * Since: 2.22
26943  */
26944
26945
26946 /**
26947  * g_inet_address_get_is_multicast:
26948  * @address: a #GInetAddress
26949  *
26950  * Tests whether @address is a multicast address.
26951  *
26952  * Returns: %TRUE if @address is a multicast address.
26953  * Since: 2.22
26954  */
26955
26956
26957 /**
26958  * g_inet_address_get_is_site_local:
26959  * @address: a #GInetAddress
26960  *
26961  * Tests whether @address is a site-local address such as 10.0.0.1
26962  * (that is, the address identifies a host on a local network that can
26963  * not be reached directly from the Internet, but which may have
26964  * outgoing Internet connectivity via a NAT or firewall).
26965  *
26966  * Returns: %TRUE if @address is a site-local address.
26967  * Since: 2.22
26968  */
26969
26970
26971 /**
26972  * g_inet_address_get_native_size:
26973  * @address: a #GInetAddress
26974  *
26975  * Gets the size of the native raw binary address for @address. This
26976  * is the size of the data that you get from g_inet_address_to_bytes().
26977  *
26978  * Returns: the number of bytes used for the native version of @address.
26979  * Since: 2.22
26980  */
26981
26982
26983 /**
26984  * g_inet_address_new_any:
26985  * @family: the address family
26986  *
26987  * Creates a #GInetAddress for the "any" address (unassigned/"don't
26988  * care") for @family.
26989  *
26990  * for @family.
26991  *
26992  * Returns: a new #GInetAddress corresponding to the "any" address
26993  * Since: 2.22
26994  */
26995
26996
26997 /**
26998  * g_inet_address_new_from_bytes:
26999  * @bytes: raw address data
27000  * @family: the address family of @bytes
27001  *
27002  * Creates a new #GInetAddress from the given @family and @bytes.
27003  * @bytes should be 4 bytes for %G_INET_ADDRESS_IPV4 and 16 bytes for
27004  * %G_INET_ADDRESS_IPV6.
27005  *
27006  * Returns: a new #GInetAddress corresponding to @family and @bytes.
27007  * Since: 2.22
27008  */
27009
27010
27011 /**
27012  * g_inet_address_new_from_string:
27013  * @string: a string representation of an IP address
27014  *
27015  * Parses @string as an IP address and creates a new #GInetAddress.
27016  *
27017  * @string could not be parsed.
27018  *
27019  * Returns: a new #GInetAddress corresponding to @string, or %NULL if
27020  * Since: 2.22
27021  */
27022
27023
27024 /**
27025  * g_inet_address_new_loopback:
27026  * @family: the address family
27027  *
27028  * Creates a #GInetAddress for the loopback address for @family.
27029  *
27030  * for @family.
27031  *
27032  * Returns: a new #GInetAddress corresponding to the loopback address
27033  * Since: 2.22
27034  */
27035
27036
27037 /**
27038  * g_inet_address_to_bytes: (skip)
27039  * @address: a #GInetAddress
27040  *
27041  * Gets the raw binary address data from @address.
27042  *
27043  * which should not be modified, stored, or freed. The size of this
27044  * array can be gotten with g_inet_address_get_native_size().
27045  *
27046  * Returns: a pointer to an internal array of the bytes in @address,
27047  * Since: 2.22
27048  */
27049
27050
27051 /**
27052  * g_inet_address_to_string:
27053  * @address: a #GInetAddress
27054  *
27055  * Converts @address to string form.
27056  *
27057  * freed after use.
27058  *
27059  * Returns: a representation of @address as a string, which should be
27060  * Since: 2.22
27061  */
27062
27063
27064 /**
27065  * g_inet_socket_address_get_address:
27066  * @address: a #GInetSocketAddress
27067  *
27068  * Gets @address's #GInetAddress.
27069  *
27070  * g_object_ref()'d if it will be stored
27071  *
27072  * Returns: (transfer none): the #GInetAddress for @address, which must be
27073  * Since: 2.22
27074  */
27075
27076
27077 /**
27078  * g_inet_socket_address_get_port:
27079  * @address: a #GInetSocketAddress
27080  *
27081  * Gets @address's port.
27082  *
27083  * Returns: the port for @address
27084  * Since: 2.22
27085  */
27086
27087
27088 /**
27089  * g_inet_socket_address_new:
27090  * @address: a #GInetAddress
27091  * @port: a port number
27092  *
27093  * Creates a new #GInetSocketAddress for @address and @port.
27094  *
27095  * Returns: a new #GInetSocketAddress
27096  * Since: 2.22
27097  */
27098
27099
27100 /**
27101  * g_initable_init:
27102  * @initable: a #GInitable.
27103  * @cancellable: optional #GCancellable object, %NULL to ignore.
27104  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27105  *
27106  * Initializes the object implementing the interface. This must be
27107  * done before any real use of the object after initial construction.
27108  *
27109  * Implementations may also support cancellation. If @cancellable is not %NULL,
27110  * then initialization can be cancelled by triggering the cancellable object
27111  * from another thread. If the operation was cancelled, the error
27112  * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
27113  * the object doesn't support cancellable initialization the error
27114  * %G_IO_ERROR_NOT_SUPPORTED will be returned.
27115  *
27116  * If this function is not called, or returns with an error then all
27117  * operations on the object should fail, generally returning the
27118  * error %G_IO_ERROR_NOT_INITIALIZED.
27119  *
27120  * Implementations of this method must be idempotent, i.e. multiple calls
27121  * to this function with the same argument should return the same results.
27122  * Only the first call initializes the object, further calls return the result
27123  * of the first call. This is so that its safe to implement the singleton
27124  * pattern in the GObject constructor function.
27125  *
27126  * return %FALSE and set @error appropriately if present.
27127  *
27128  * Returns: %TRUE if successful. If an error has occurred, this function will
27129  * Since: 2.22
27130  */
27131
27132
27133 /**
27134  * g_initable_new:
27135  * @object_type: a #GType supporting #GInitable.
27136  * @cancellable: optional #GCancellable object, %NULL to ignore.
27137  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27138  * @first_property_name: the name of the first property, or %NULL if no properties
27139  * @...: the value if the first property, followed by and other property value pairs, and ended by %NULL.
27140  *
27141  * Helper function for constructing #GInitiable object. This is
27142  * similar to g_object_new() but also initializes the object
27143  * and returns %NULL, setting an error on failure.
27144  *
27145  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
27146  * Since: 2.22
27147  */
27148
27149
27150 /**
27151  * g_initable_new_valist:
27152  * @object_type: a #GType supporting #GInitable.
27153  * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
27154  * @var_args: The var args list generated from @first_property_name.
27155  * @cancellable: optional #GCancellable object, %NULL to ignore.
27156  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27157  *
27158  * Helper function for constructing #GInitiable object. This is
27159  * similar to g_object_new_valist() but also initializes the object
27160  * and returns %NULL, setting an error on failure.
27161  *
27162  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
27163  * Since: 2.22
27164  */
27165
27166
27167 /**
27168  * g_initable_newv:
27169  * @object_type: a #GType supporting #GInitable.
27170  * @n_parameters: the number of parameters in @parameters
27171  * @parameters: the parameters to use to construct the object
27172  * @cancellable: optional #GCancellable object, %NULL to ignore.
27173  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27174  *
27175  * Helper function for constructing #GInitiable object. This is
27176  * similar to g_object_newv() but also initializes the object
27177  * and returns %NULL, setting an error on failure.
27178  *
27179  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
27180  * Since: 2.22
27181  */
27182
27183
27184 /**
27185  * g_input_stream_clear_pending:
27186  * @stream: input stream
27187  *
27188  * Clears the pending flag on @stream.
27189  */
27190
27191
27192 /**
27193  * g_input_stream_close:
27194  * @stream: A #GInputStream.
27195  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27196  * @error: location to store the error occuring, or %NULL to ignore
27197  *
27198  * Closes the stream, releasing resources related to it.
27199  *
27200  * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
27201  * Closing a stream multiple times will not return an error.
27202  *
27203  * Streams will be automatically closed when the last reference
27204  * is dropped, but you might want to call this function to make sure
27205  * resources are released as early as possible.
27206  *
27207  * Some streams might keep the backing store of the stream (e.g. a file descriptor)
27208  * open after the stream is closed. See the documentation for the individual
27209  * stream for details.
27210  *
27211  * On failure the first error that happened will be reported, but the close
27212  * operation will finish as much as possible. A stream that failed to
27213  * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
27214  * is important to check and report the error to the user.
27215  *
27216  * If @cancellable is not NULL, then the operation can be cancelled by
27217  * triggering the cancellable object from another thread. If the operation
27218  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27219  * Cancelling a close will still leave the stream closed, but some streams
27220  * can use a faster close that doesn't block to e.g. check errors.
27221  *
27222  * Returns: %TRUE on success, %FALSE on failure
27223  */
27224
27225
27226 /**
27227  * g_input_stream_close_async:
27228  * @stream: A #GInputStream.
27229  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27230  * @cancellable: (allow-none): optional cancellable object
27231  * @callback: (scope async): callback to call when the request is satisfied
27232  * @user_data: (closure): the data to pass to callback function
27233  *
27234  * Requests an asynchronous closes of the stream, releasing resources related to it.
27235  * When the operation is finished @callback will be called.
27236  * You can then call g_input_stream_close_finish() to get the result of the
27237  * operation.
27238  *
27239  * For behaviour details see g_input_stream_close().
27240  *
27241  * The asyncronous methods have a default fallback that uses threads to implement
27242  * asynchronicity, so they are optional for inheriting classes. However, if you
27243  * override one you must override all.
27244  */
27245
27246
27247 /**
27248  * g_input_stream_close_finish:
27249  * @stream: a #GInputStream.
27250  * @result: a #GAsyncResult.
27251  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27252  *
27253  * Finishes closing a stream asynchronously, started from g_input_stream_close_async().
27254  *
27255  * Returns: %TRUE if the stream was closed successfully.
27256  */
27257
27258
27259 /**
27260  * g_input_stream_has_pending:
27261  * @stream: input stream.
27262  *
27263  * Checks if an input stream has pending actions.
27264  *
27265  * Returns: %TRUE if @stream has pending actions.
27266  */
27267
27268
27269 /**
27270  * g_input_stream_is_closed:
27271  * @stream: input stream.
27272  *
27273  * Checks if an input stream is closed.
27274  *
27275  * Returns: %TRUE if the stream is closed.
27276  */
27277
27278
27279 /**
27280  * g_input_stream_read:
27281  * @stream: a #GInputStream.
27282  * @buffer: a buffer to read data into (which should be at least count bytes long).
27283  * @count: the number of bytes that will be read from the stream
27284  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27285  * @error: location to store the error occuring, or %NULL to ignore
27286  *
27287  * Tries to read @count bytes from the stream into the buffer starting at
27288  * @buffer. Will block during this read.
27289  *
27290  * If count is zero returns zero and does nothing. A value of @count
27291  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
27292  *
27293  * On success, the number of bytes read into the buffer is returned.
27294  * It is not an error if this is not the same as the requested size, as it
27295  * can happen e.g. near the end of a file. Zero is returned on end of file
27296  * (or if @count is zero),  but never otherwise.
27297  *
27298  * If @cancellable is not NULL, then the operation can be cancelled by
27299  * triggering the cancellable object from another thread. If the operation
27300  * was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an
27301  * operation was partially finished when the operation was cancelled the
27302  * partial result will be returned, without an error.
27303  *
27304  * On error -1 is returned and @error is set accordingly.
27305  *
27306  * Returns: Number of bytes read, or -1 on error
27307  */
27308
27309
27310 /**
27311  * g_input_stream_read_all:
27312  * @stream: a #GInputStream.
27313  * @buffer: a buffer to read data into (which should be at least count bytes long).
27314  * @count: the number of bytes that will be read from the stream
27315  * @bytes_read: (out): location to store the number of bytes that was read from the stream
27316  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27317  * @error: location to store the error occuring, or %NULL to ignore
27318  *
27319  * Tries to read @count bytes from the stream into the buffer starting at
27320  * @buffer. Will block during this read.
27321  *
27322  * This function is similar to g_input_stream_read(), except it tries to
27323  * read as many bytes as requested, only stopping on an error or end of stream.
27324  *
27325  * On a successful read of @count bytes, or if we reached the end of the
27326  * stream,  %TRUE is returned, and @bytes_read is set to the number of bytes
27327  * read into @buffer.
27328  *
27329  * If there is an error during the operation %FALSE is returned and @error
27330  * is set to indicate the error status, @bytes_read is updated to contain
27331  * the number of bytes read into @buffer before the error occurred.
27332  *
27333  * Returns: %TRUE on success, %FALSE if there was an error
27334  */
27335
27336
27337 /**
27338  * g_input_stream_read_async:
27339  * @stream: A #GInputStream.
27340  * @buffer: a buffer to read data into (which should be at least count bytes long).
27341  * @count: the number of bytes that will be read from the stream
27342  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27343  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27344  * @callback: (scope async): callback to call when the request is satisfied
27345  * @user_data: (closure): the data to pass to callback function
27346  *
27347  * Request an asynchronous read of @count bytes from the stream into the buffer
27348  * starting at @buffer. When the operation is finished @callback will be called.
27349  * You can then call g_input_stream_read_finish() to get the result of the
27350  * operation.
27351  *
27352  * During an async request no other sync and async calls are allowed on @stream, and will
27353  * result in %G_IO_ERROR_PENDING errors.
27354  *
27355  * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
27356  *
27357  * On success, the number of bytes read into the buffer will be passed to the
27358  * callback. It is not an error if this is not the same as the requested size, as it
27359  * can happen e.g. near the end of a file, but generally we try to read
27360  * as many bytes as requested. Zero is returned on end of file
27361  * (or if @count is zero),  but never otherwise.
27362  *
27363  * Any outstanding i/o request with higher priority (lower numerical value) will
27364  * be executed before an outstanding request with lower priority. Default
27365  * priority is %G_PRIORITY_DEFAULT.
27366  *
27367  * The asyncronous methods have a default fallback that uses threads to implement
27368  * asynchronicity, so they are optional for inheriting classes. However, if you
27369  * override one you must override all.
27370  */
27371
27372
27373 /**
27374  * g_input_stream_read_finish:
27375  * @stream: a #GInputStream.
27376  * @result: a #GAsyncResult.
27377  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27378  *
27379  * Finishes an asynchronous stream read operation.
27380  *
27381  * Returns: number of bytes read in, or -1 on error.
27382  */
27383
27384
27385 /**
27386  * g_input_stream_set_pending:
27387  * @stream: input stream
27388  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27389  *
27390  * Sets @stream to have actions pending. If the pending flag is
27391  * already set or @stream is closed, it will return %FALSE and set
27392  * @error.
27393  *
27394  * Returns: %TRUE if pending was previously unset and is now set.
27395  */
27396
27397
27398 /**
27399  * g_input_stream_skip:
27400  * @stream: a #GInputStream.
27401  * @count: the number of bytes that will be skipped from the stream
27402  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27403  * @error: location to store the error occuring, or %NULL to ignore
27404  *
27405  * Tries to skip @count bytes from the stream. Will block during the operation.
27406  *
27407  * This is identical to g_input_stream_read(), from a behaviour standpoint,
27408  * but the bytes that are skipped are not returned to the user. Some
27409  * streams have an implementation that is more efficient than reading the data.
27410  *
27411  * This function is optional for inherited classes, as the default implementation
27412  * emulates it using read.
27413  *
27414  * If @cancellable is not %NULL, then the operation can be cancelled by
27415  * triggering the cancellable object from another thread. If the operation
27416  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
27417  * operation was partially finished when the operation was cancelled the
27418  * partial result will be returned, without an error.
27419  *
27420  * Returns: Number of bytes skipped, or -1 on error
27421  */
27422
27423
27424 /**
27425  * g_input_stream_skip_async:
27426  * @stream: A #GInputStream.
27427  * @count: the number of bytes that will be skipped from the stream
27428  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27429  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27430  * @callback: (scope async): callback to call when the request is satisfied
27431  * @user_data: (closure): the data to pass to callback function
27432  *
27433  * Request an asynchronous skip of @count bytes from the stream.
27434  * When the operation is finished @callback will be called.
27435  * You can then call g_input_stream_skip_finish() to get the result
27436  * of the operation.
27437  *
27438  * During an async request no other sync and async calls are allowed,
27439  * and will result in %G_IO_ERROR_PENDING errors.
27440  *
27441  * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
27442  *
27443  * On success, the number of bytes skipped will be passed to the callback.
27444  * It is not an error if this is not the same as the requested size, as it
27445  * can happen e.g. near the end of a file, but generally we try to skip
27446  * as many bytes as requested. Zero is returned on end of file
27447  * (or if @count is zero), but never otherwise.
27448  *
27449  * Any outstanding i/o request with higher priority (lower numerical value)
27450  * will be executed before an outstanding request with lower priority.
27451  * Default priority is %G_PRIORITY_DEFAULT.
27452  *
27453  * The asynchronous methods have a default fallback that uses threads to
27454  * implement asynchronicity, so they are optional for inheriting classes.
27455  * However, if you override one, you must override all.
27456  */
27457
27458
27459 /**
27460  * g_input_stream_skip_finish:
27461  * @stream: a #GInputStream.
27462  * @result: a #GAsyncResult.
27463  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27464  *
27465  * Finishes a stream skip operation.
27466  *
27467  * Returns: the size of the bytes skipped, or %-1 on error.
27468  */
27469
27470
27471 /**
27472  * g_io_error_from_errno:
27473  * @err_no: Error number as defined in errno.h.
27474  *
27475  * Converts errno.h error codes into GIO error codes.
27476  *
27477  * Returns: #GIOErrorEnum value for the given errno.h error number.
27478  */
27479
27480
27481 /**
27482  * g_io_error_from_win32_error:
27483  * @error_code: Windows error number.
27484  *
27485  * Converts some common error codes into GIO error codes. The
27486  * fallback value G_IO_ERROR_FAILED is returned for error codes not
27487  * handled.
27488  *
27489  * Returns: #GIOErrorEnum value for the given error number.
27490  * Since: 2.26
27491  */
27492
27493
27494 /**
27495  * g_io_error_quark:
27496  *
27497  * Gets the GIO Error Quark.
27498  *
27499  * Returns: a #GQuark.
27500  */
27501
27502
27503 /**
27504  * g_io_extension_get_name:
27505  * @extension: a #GIOExtension
27506  *
27507  * Gets the name under which @extension was registered.
27508  *
27509  * Note that the same type may be registered as extension
27510  * for multiple extension points, under different names.
27511  *
27512  * Returns: the name of @extension.
27513  */
27514
27515
27516 /**
27517  * g_io_extension_get_priority:
27518  * @extension: a #GIOExtension
27519  *
27520  * Gets the priority with which @extension was registered.
27521  *
27522  * Returns: the priority of @extension
27523  */
27524
27525
27526 /**
27527  * g_io_extension_get_type:
27528  * @extension: a #GIOExtension
27529  *
27530  * Gets the type associated with @extension.
27531  *
27532  * Returns: the type of @extension
27533  */
27534
27535
27536 /**
27537  * g_io_extension_point_get_extension_by_name:
27538  * @extension_point: a #GIOExtensionPoint
27539  * @name: the name of the extension to get
27540  *
27541  * Finds a #GIOExtension for an extension point by name.
27542  *
27543  * given name, or %NULL if there is no extension with that name
27544  *
27545  * Returns: (transfer none): the #GIOExtension for @extension_point that has the
27546  */
27547
27548
27549 /**
27550  * g_io_extension_point_get_extensions:
27551  * @extension_point: a #GIOExtensionPoint
27552  *
27553  * Gets a list of all extensions that implement this extension point.
27554  * The list is sorted by priority, beginning with the highest priority.
27555  *
27556  * #GIOExtension<!-- -->s. The list is owned by GIO and should not be
27557  * modified.
27558  *
27559  * Returns: (element-type GIOExtension) (transfer none): a #GList of
27560  */
27561
27562
27563 /**
27564  * g_io_extension_point_get_required_type:
27565  * @extension_point: a #GIOExtensionPoint
27566  *
27567  * Gets the required type for @extension_point.
27568  *
27569  * or #G_TYPE_INVALID if the extension point has no required type
27570  *
27571  * Returns: the #GType that all implementations must have,
27572  */
27573
27574
27575 /**
27576  * g_io_extension_point_implement:
27577  * @extension_point_name: the name of the extension point
27578  * @type: the #GType to register as extension
27579  * @extension_name: the name for the extension
27580  * @priority: the priority for the extension
27581  *
27582  * Registers @type as extension for the extension point with name
27583  * @extension_point_name.
27584  *
27585  * If @type has already been registered as an extension for this
27586  * extension point, the existing #GIOExtension object is returned.
27587  *
27588  * Returns: a #GIOExtension object for #GType
27589  */
27590
27591
27592 /**
27593  * g_io_extension_point_lookup:
27594  * @name: the name of the extension point
27595  *
27596  * Looks up an existing extension point.
27597  *
27598  * registered extension point with the given name
27599  *
27600  * Returns: the #GIOExtensionPoint, or %NULL if there is no
27601  */
27602
27603
27604 /**
27605  * g_io_extension_point_register:
27606  * @name: The name of the extension point
27607  *
27608  * Registers an extension point.
27609  *
27610  * and should not be freed
27611  *
27612  * Returns: the new #GIOExtensionPoint. This object is owned by GIO
27613  */
27614
27615
27616 /**
27617  * g_io_extension_point_set_required_type:
27618  * @extension_point: a #GIOExtensionPoint
27619  * @type: the #GType to require
27620  *
27621  * Sets the required type for @extension_point to @type.
27622  * All implementations must henceforth have this type.
27623  */
27624
27625
27626 /**
27627  * g_io_extension_ref_class:
27628  * @extension: a #GIOExtension
27629  *
27630  * Gets a reference to the class for the type that is
27631  * associated with @extension.
27632  *
27633  * Returns: (transfer full): the #GTypeClass for the type of @extension
27634  */
27635
27636
27637 /**
27638  * g_io_module_load:
27639  * @module: a #GIOModule.
27640  *
27641  * Required API for GIO modules to implement.
27642  * This function is ran after the module has been loaded into GIO,
27643  * to initialize the module.
27644  */
27645
27646
27647 /**
27648  * g_io_module_new:
27649  * @filename: filename of the shared library module.
27650  *
27651  * Creates a new GIOModule that will load the specific
27652  * shared library when in use.
27653  *
27654  * or %NULL on error.
27655  *
27656  * Returns: a #GIOModule from given @filename,
27657  */
27658
27659
27660 /**
27661  * g_io_module_query:
27662  *
27663  * Optional API for GIO modules to implement.
27664  *
27665  * Should return a list of all the extension points that may be
27666  * implemented in this module.
27667  *
27668  * This method will not be called in normal use, however it may be
27669  * called when probing existing modules and recording which extension
27670  * points that this modle is used for. This means we won't have to
27671  * load and initialze this module unless its needed.
27672  *
27673  * If this function is not implemented by the module the module will
27674  * always be loaded, initialized and then unloaded on application startup
27675  * so that it can register its extension points during init.
27676  *
27677  * Note that a module need not actually implement all the extension points
27678  * that g_io_module_query returns, since the exact list of extension may
27679  * depend on runtime issues. However all extension points actually implemented
27680  * must be returned by g_io_module_query() (if defined).
27681  *
27682  * When installing a module that implements g_io_module_query you must
27683  * run gio-querymodules in order to build the cache files required for
27684  * lazy loading.
27685  *
27686  * extension points of the module. The array must be suitable for
27687  * freeing with g_strfreev().
27688  *
27689  * Returns: (transfer full): A %NULL-terminated array of strings, listing the supported
27690  * Since: 2.24
27691  */
27692
27693
27694 /**
27695  * g_io_module_unload:
27696  * @module: a #GIOModule.
27697  *
27698  * Required API for GIO modules to implement.
27699  * This function is ran when the module is being unloaded from GIO,
27700  * to finalize the module.
27701  */
27702
27703
27704 /**
27705  * g_io_modules_load_all_in_directory:
27706  * @dirname: pathname for a directory containing modules to load.
27707  *
27708  * Loads all the modules in the specified directory.
27709  *
27710  * If don't require all modules to be initialized (and thus registering
27711  * all gtypes) then you can use g_io_modules_scan_all_in_directory()
27712  * which allows delayed/lazy loading of modules.
27713  *
27714  * from the directory,
27715  * All the modules are loaded into memory, if you want to
27716  * unload them (enabling on-demand loading) you must call
27717  * g_type_module_unuse() on all the modules. Free the list
27718  * with g_list_free().
27719  *
27720  * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded
27721  */
27722
27723
27724 /**
27725  * g_io_modules_scan_all_in_directory:
27726  * @dirname: pathname for a directory containing modules to scan.
27727  *
27728  * Scans all the modules in the specified directory, ensuring that
27729  * any extension point implemented by a module is registered.
27730  *
27731  * This may not actually load and initialize all the types in each
27732  * module, some modules may be lazily loaded and initialized when
27733  * an extension point it implementes is used with e.g.
27734  * g_io_extension_point_get_extensions() or
27735  * g_io_extension_point_get_extension_by_name().
27736  *
27737  * If you need to guarantee that all types are loaded in all the modules,
27738  * use g_io_modules_load_all_in_directory().
27739  *
27740  * Since: 2.24
27741  */
27742
27743
27744 /**
27745  * g_io_scheduler_cancel_all_jobs:
27746  *
27747  * Cancels all cancellable I/O jobs.
27748  *
27749  * A job is cancellable if a #GCancellable was passed into
27750  * g_io_scheduler_push_job().
27751  */
27752
27753
27754 /**
27755  * g_io_scheduler_job_send_to_mainloop:
27756  * @job: a #GIOSchedulerJob
27757  * @func: a #GSourceFunc callback that will be called in the original thread
27758  * @user_data: data to pass to @func
27759  * @notify: a #GDestroyNotify for @user_data, or %NULL
27760  *
27761  * Used from an I/O job to send a callback to be run in the thread
27762  * that the job was started from, waiting for the result (and thus
27763  * blocking the I/O job).
27764  *
27765  * Returns: The return value of @func
27766  */
27767
27768
27769 /**
27770  * g_io_scheduler_job_send_to_mainloop_async:
27771  * @job: a #GIOSchedulerJob
27772  * @func: a #GSourceFunc callback that will be called in the original thread
27773  * @user_data: data to pass to @func
27774  * @notify: a #GDestroyNotify for @user_data, or %NULL
27775  *
27776  * Used from an I/O job to send a callback to be run asynchronously in
27777  * the thread that the job was started from. The callback will be run
27778  * when the main loop is available, but at that time the I/O job might
27779  * have finished. The return value from the callback is ignored.
27780  *
27781  * Note that if you are passing the @user_data from g_io_scheduler_push_job()
27782  * on to this function you have to ensure that it is not freed before
27783  * @func is called, either by passing %NULL as @notify to
27784  * g_io_scheduler_push_job() or by using refcounting for @user_data.
27785  */
27786
27787
27788 /**
27789  * g_io_scheduler_push_job:
27790  * @job_func: a #GIOSchedulerJobFunc.
27791  * @user_data: data to pass to @job_func
27792  * @notify: a #GDestroyNotify for @user_data, or %NULL
27793  * @io_priority: the <link linkend="gioscheduler">I/O priority</link> of the request.
27794  * @cancellable: optional #GCancellable object, %NULL to ignore.
27795  *
27796  * Schedules the I/O job to run.
27797  *
27798  * @notify will be called on @user_data after @job_func has returned,
27799  * regardless whether the job was cancelled or has run to completion.
27800  *
27801  * If @cancellable is not %NULL, it can be used to cancel the I/O job
27802  * by calling g_cancellable_cancel() or by calling
27803  * g_io_scheduler_cancel_all_jobs().
27804  */
27805
27806
27807 /**
27808  * g_io_stream_clear_pending:
27809  * @stream: a #GIOStream
27810  *
27811  * Clears the pending flag on @stream.
27812  *
27813  * Since: 2.22
27814  */
27815
27816
27817 /**
27818  * g_io_stream_close:
27819  * @stream: a #GIOStream
27820  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
27821  * @error: location to store the error occuring, or %NULL to ignore
27822  *
27823  * Closes the stream, releasing resources related to it. This will also
27824  * closes the individual input and output streams, if they are not already
27825  * closed.
27826  *
27827  * Once the stream is closed, all other operations will return
27828  * %G_IO_ERROR_CLOSED. Closing a stream multiple times will not
27829  * return an error.
27830  *
27831  * Closing a stream will automatically flush any outstanding buffers
27832  * in the stream.
27833  *
27834  * Streams will be automatically closed when the last reference
27835  * is dropped, but you might want to call this function to make sure
27836  * resources are released as early as possible.
27837  *
27838  * Some streams might keep the backing store of the stream (e.g. a file
27839  * descriptor) open after the stream is closed. See the documentation for
27840  * the individual stream for details.
27841  *
27842  * On failure the first error that happened will be reported, but the
27843  * close operation will finish as much as possible. A stream that failed
27844  * to close will still return %G_IO_ERROR_CLOSED for all operations.
27845  * Still, it is important to check and report the error to the user,
27846  * otherwise there might be a loss of data as all data might not be written.
27847  *
27848  * If @cancellable is not NULL, then the operation can be cancelled by
27849  * triggering the cancellable object from another thread. If the operation
27850  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27851  * Cancelling a close will still leave the stream closed, but some streams
27852  * can use a faster close that doesn't block to e.g. check errors.
27853  *
27854  * The default implementation of this method just calls close on the
27855  * individual input/output streams.
27856  *
27857  * Returns: %TRUE on success, %FALSE on failure
27858  * Since: 2.22
27859  */
27860
27861
27862 /**
27863  * g_io_stream_close_async:
27864  * @stream: a #GIOStream
27865  * @io_priority: the io priority of the request
27866  * @cancellable: (allow-none): optional cancellable object
27867  * @callback: (scope async): callback to call when the request is satisfied
27868  * @user_data: (closure): the data to pass to callback function
27869  *
27870  * Requests an asynchronous close of the stream, releasing resources
27871  * related to it. When the operation is finished @callback will be
27872  * called. You can then call g_io_stream_close_finish() to get
27873  * the result of the operation.
27874  *
27875  * For behaviour details see g_io_stream_close().
27876  *
27877  * The asynchronous methods have a default fallback that uses threads
27878  * to implement asynchronicity, so they are optional for inheriting
27879  * classes. However, if you override one you must override all.
27880  *
27881  * Since: 2.22
27882  */
27883
27884
27885 /**
27886  * g_io_stream_close_finish:
27887  * @stream: a #GIOStream
27888  * @result: a #GAsyncResult
27889  * @error: a #GError location to store the error occuring, or %NULL to ignore
27890  *
27891  * Closes a stream.
27892  *
27893  * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
27894  * Since: 2.22
27895  */
27896
27897
27898 /**
27899  * g_io_stream_get_input_stream:
27900  * @stream: a #GIOStream
27901  *
27902  * Gets the input stream for this object. This is used
27903  * for reading.
27904  *
27905  * Do not free.
27906  *
27907  * Returns: (transfer none): a #GInputStream, owned by the #GIOStream.
27908  * Since: 2.22
27909  */
27910
27911
27912 /**
27913  * g_io_stream_get_output_stream:
27914  * @stream: a #GIOStream
27915  *
27916  * Gets the output stream for this object. This is used for
27917  * writing.
27918  *
27919  * Do not free.
27920  *
27921  * Returns: (transfer none): a #GOutputStream, owned by the #GIOStream.
27922  * Since: 2.22
27923  */
27924
27925
27926 /**
27927  * g_io_stream_has_pending:
27928  * @stream: a #GIOStream
27929  *
27930  * Checks if a stream has pending actions.
27931  *
27932  * Returns: %TRUE if @stream has pending actions.
27933  * Since: 2.22
27934  */
27935
27936
27937 /**
27938  * g_io_stream_is_closed:
27939  * @stream: a #GIOStream
27940  *
27941  * Checks if a stream is closed.
27942  *
27943  * Returns: %TRUE if the stream is closed.
27944  * Since: 2.22
27945  */
27946
27947
27948 /**
27949  * g_io_stream_set_pending:
27950  * @stream: a #GIOStream
27951  * @error: a #GError location to store the error occuring, or %NULL to ignore
27952  *
27953  * Sets @stream to have actions pending. If the pending flag is
27954  * already set or @stream is closed, it will return %FALSE and set
27955  * @error.
27956  *
27957  * Returns: %TRUE if pending was previously unset and is now set.
27958  * Since: 2.22
27959  */
27960
27961
27962 /**
27963  * g_io_stream_splice_async:
27964  * @stream1: a #GIOStream.
27965  * @stream2: a #GIOStream.
27966  * @flags: a set of #GIOStreamSpliceFlags.
27967  * @io_priority: the io priority of the request.
27968  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27969  * @callback: (scope async): a #GAsyncReadyCallback.
27970  * @user_data: (closure): user data passed to @callback.
27971  *
27972  * Asyncronously splice the output stream of @stream1 to the input stream of
27973  * @stream2, and splice the output stream of @stream2 to the input stream of
27974  * @stream1.
27975  *
27976  * When the operation is finished @callback will be called.
27977  * You can then call g_io_stream_splice_finish() to get the
27978  * result of the operation.
27979  *
27980  * Since: 2.28
27981  */
27982
27983
27984 /**
27985  * g_io_stream_splice_finish:
27986  * @result: a #GAsyncResult.
27987  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27988  *
27989  * Finishes an asynchronous io stream splice operation.
27990  *
27991  * Returns: %TRUE on success, %FALSE otherwise.
27992  * Since: 2.28
27993  */
27994
27995
27996 /**
27997  * g_keyfile_settings_backend_new:
27998  * @filename: the filename of the keyfile
27999  * @root_path: the path under which all settings keys appear
28000  * @root_group: (allow-none): the group name corresponding to @root_path, or %NULL
28001  * @returns: (transfer full): a keyfile-backed #GSettingsBackend
28002  *
28003  * Creates a keyfile-backed #GSettingsBackend.
28004  *
28005  * The filename of the keyfile to use is given by @filename.
28006  *
28007  * All settings read to or written from the backend must fall under the
28008  * path given in @root_path (which must start and end with a slash and
28009  * not contain two consecutive slashes).  @root_path may be "/".
28010  *
28011  * If @root_group is non-%NULL then it specifies the name of the keyfile
28012  * group used for keys that are written directly below @root_path.  For
28013  * example, if @root_path is "/apps/example/" and @root_group is
28014  * "toplevel", then settings the key "/apps/example/enabled" to a value
28015  * of %TRUE will cause the following to appear in the keyfile:
28016  *
28017  * |[
28018  * [toplevel]
28019  * enabled=true
28020  * ]|
28021  *
28022  * If @root_group is %NULL then it is not permitted to store keys
28023  * directly below the @root_path.
28024  *
28025  * For keys not stored directly below @root_path (ie: in a sub-path),
28026  * the name of the subpath (with the final slash stripped) is used as
28027  * the name of the keyfile group.  To continue the example, if
28028  * "/apps/example/profiles/default/font-size" were set to
28029  * 12 then the following would appear in the keyfile:
28030  *
28031  * |[
28032  * [profiles/default]
28033  * font-size=12
28034  * ]|
28035  *
28036  * The backend will refuse writes (and return writability as being
28037  * %FALSE) for keys outside of @root_path and, in the event that
28038  * @root_group is %NULL, also for keys directly under @root_path.
28039  * Writes will also be refused if the backend detects that it has the
28040  * inability to rewrite the keyfile (ie: the containing directory is not
28041  * writable).
28042  *
28043  * There is no checking done for your key namespace clashing with the
28044  * syntax of the key file format.  For example, if you have '[' or ']'
28045  * characters in your path names or '=' in your key names you may be in
28046  * trouble.
28047  */
28048
28049
28050 /**
28051  * g_loadable_icon_load:
28052  * @icon: a #GLoadableIcon.
28053  * @size: an integer.
28054  * @type: (out) (allow-none): a location to store the type of the loaded icon, %NULL to ignore.
28055  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28056  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28057  *
28058  * Loads a loadable icon. For the asynchronous version of this function,
28059  * see g_loadable_icon_load_async().
28060  *
28061  * Returns: (transfer full): a #GInputStream to read the icon from.
28062  */
28063
28064
28065 /**
28066  * g_loadable_icon_load_async:
28067  * @icon: a #GLoadableIcon.
28068  * @size: an integer.
28069  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28070  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
28071  * @user_data: (closure): the data to pass to callback function
28072  *
28073  * Loads an icon asynchronously. To finish this function, see
28074  * g_loadable_icon_load_finish(). For the synchronous, blocking
28075  * version of this function, see g_loadable_icon_load().
28076  */
28077
28078
28079 /**
28080  * g_loadable_icon_load_finish:
28081  * @icon: a #GLoadableIcon.
28082  * @res: a #GAsyncResult.
28083  * @type: a location to store the type of the loaded icon, %NULL to ignore.
28084  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28085  *
28086  * Finishes an asynchronous icon load started in g_loadable_icon_load_async().
28087  *
28088  * Returns: (transfer full): a #GInputStream to read the icon from.
28089  */
28090
28091
28092 /**
28093  * g_local_vfs_new:
28094  *
28095  * Returns a new #GVfs handle for a local vfs.
28096  *
28097  * Returns: a new #GVfs handle.
28098  */
28099
28100
28101 /**
28102  * g_main_destroy:
28103  * @loop: a #GMainLoop
28104  *
28105  * Frees the memory allocated for the #GMainLoop.
28106  *
28107  * Deprecated: 2.2: Use g_main_loop_unref() instead
28108  */
28109
28110
28111 /**
28112  * g_main_is_running:
28113  * @loop: a #GMainLoop
28114  *
28115  * Checks if the main loop is running.
28116  *
28117  * Returns: %TRUE if the main loop is running
28118  * Deprecated: 2.2: Use g_main_loop_is_running() instead
28119  */
28120
28121
28122 /**
28123  * g_main_iteration:
28124  * @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.
28125  *
28126  * Runs a single iteration for the default #GMainContext.
28127  *
28128  * Returns: %TRUE if more events are pending.
28129  * Deprecated: 2.2: Use g_main_context_iteration() instead.
28130  */
28131
28132
28133 /**
28134  * g_main_new:
28135  * @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.
28136  *
28137  * Creates a new #GMainLoop for th default main context.
28138  *
28139  * Returns: a new #GMainLoop
28140  * Deprecated: 2.2: Use g_main_loop_new() instead
28141  */
28142
28143
28144 /**
28145  * g_main_pending:
28146  *
28147  * Checks if any events are pending for the default #GMainContext
28148  * (i.e. ready to be processed).
28149  *
28150  *
28151  * Deprected: 2.2: Use g_main_context_pending() instead.
28152  *
28153  * Returns: %TRUE if any events are pending.
28154  */
28155
28156
28157 /**
28158  * g_main_quit:
28159  * @loop: a #GMainLoop
28160  *
28161  * Stops the #GMainLoop.
28162  * If g_main_run() was called to run the #GMainLoop, it will now return.
28163  *
28164  * Deprecated: 2.2: Use g_main_loop_quit() instead
28165  */
28166
28167
28168 /**
28169  * g_main_run:
28170  * @loop: a #GMainLoop
28171  *
28172  * Runs a main loop until it stops running.
28173  *
28174  * Deprecated: 2.2: Use g_main_loop_run() instead
28175  */
28176
28177
28178 /**
28179  * g_main_set_poll_func:
28180  * @func: the function to call to poll all file descriptors
28181  *
28182  * Sets the function to use for the handle polling of file descriptors
28183  * for the default main context.
28184  *
28185  * Deprecated: 2.2: Use g_main_context_set_poll_func() again
28186  */
28187
28188
28189 /**
28190  * g_memory_input_stream_add_data:
28191  * @stream: a #GMemoryInputStream
28192  * @data: (array length=len) (element-type guint8): input data
28193  * @len: length of the data, may be -1 if @data is a nul-terminated string
28194  * @destroy: (allow-none): function that is called to free @data, or %NULL
28195  *
28196  * Appends @data to data that can be read from the input stream
28197  */
28198
28199
28200 /**
28201  * g_memory_input_stream_new:
28202  *
28203  * Creates a new empty #GMemoryInputStream.
28204  *
28205  * Returns: a new #GInputStream
28206  */
28207
28208
28209 /**
28210  * g_memory_input_stream_new_from_data:
28211  * @data: (array length=len) (element-type guint8): input data
28212  * @len: length of the data, may be -1 if @data is a nul-terminated string
28213  * @destroy: (allow-none): function that is called to free @data, or %NULL
28214  *
28215  * Creates a new #GMemoryInputStream with data in memory of a given size.
28216  *
28217  * Returns: new #GInputStream read from @data of @len bytes.
28218  */
28219
28220
28221 /**
28222  * g_memory_output_stream_get_data:
28223  * @ostream: a #GMemoryOutputStream
28224  *
28225  * Gets any loaded data from the @ostream.
28226  *
28227  * Note that the returned pointer may become invalid on the next
28228  * write or truncate operation on the stream.
28229  *
28230  * Returns: (transfer none): pointer to the stream's data
28231  */
28232
28233
28234 /**
28235  * g_memory_output_stream_get_data_size:
28236  * @ostream: a #GMemoryOutputStream
28237  *
28238  * Returns the number of bytes from the start up
28239  * to including the last byte written in the stream
28240  * that has not been truncated away.
28241  *
28242  * Returns: the number of bytes written to the stream
28243  * Since: 2.18
28244  */
28245
28246
28247 /**
28248  * g_memory_output_stream_get_size:
28249  * @ostream: a #GMemoryOutputStream
28250  *
28251  * Gets the size of the currently allocated data area (available from
28252  * g_memory_output_stream_get_data()). If the stream isn't
28253  * growable (no realloc was passed to g_memory_output_stream_new()) then
28254  * this is the maximum size of the stream and further writes
28255  * will return %G_IO_ERROR_NO_SPACE.
28256  *
28257  * Note that for growable streams the returned size may become invalid on
28258  * the next write or truncate operation on the stream.
28259  *
28260  * If you want the number of bytes currently written to the stream, use
28261  * g_memory_output_stream_get_data_size().
28262  *
28263  * Returns: the number of bytes allocated for the data buffer
28264  */
28265
28266
28267 /**
28268  * g_memory_output_stream_new: (skip)
28269  * @data: pointer to a chunk of memory to use, or %NULL
28270  * @size: the size of @data
28271  * @realloc_function: a function with realloc() semantics (like g_realloc()) to be called when @data needs to be grown, or %NULL
28272  * @destroy_function: a function to be called on @data when the stream is finalized, or %NULL
28273  *
28274  * Creates a new #GMemoryOutputStream.
28275  *
28276  * If @data is non-%NULL, the stream  will use that for its internal storage.
28277  * If @realloc_fn is non-%NULL, it will be used for resizing the internal
28278  * storage when necessary. To construct a fixed-size output stream,
28279  * pass %NULL as @realloc_fn.
28280  *
28281  * |[
28282  * /&ast; a stream that can grow &ast;/
28283  * stream = g_memory_output_stream_new (NULL, 0, realloc, free);
28284  *
28285  * /&ast; another stream that can grow &ast;/
28286  * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
28287  *
28288  * /&ast; a fixed-size stream &ast;/
28289  * data = malloc (200);
28290  * stream3 = g_memory_output_stream_new (data, 200, NULL, free);
28291  * ]|
28292  *
28293  * Returns: A newly created #GMemoryOutputStream object.
28294  */
28295
28296
28297 /**
28298  * g_memory_output_stream_steal_data:
28299  * @ostream: a #GMemoryOutputStream
28300  *
28301  * Gets any loaded data from the @ostream. Ownership of the data
28302  * is transferred to the caller; when no longer needed it must be
28303  * freed using the free function set in @ostream's
28304  * #GMemoryOutputStream:destroy-function property.
28305  *
28306  * @ostream must be closed before calling this function.
28307  *
28308  * Returns: (transfer full): the stream's data
28309  * Since: 2.26
28310  */
28311
28312
28313 /**
28314  * g_memory_settings_backend_new:
28315  *
28316  * Creates a memory-backed #GSettingsBackend.
28317  *
28318  * This backend allows changes to settings, but does not write them
28319  * to any backing storage, so the next time you run your application,
28320  * the memory backend will start out with the default values again.
28321  *
28322  * Returns: (transfer full): a newly created #GSettingsBackend
28323  * Since: 2.28
28324  */
28325
28326
28327 /**
28328  * g_mount_can_eject:
28329  * @mount: a #GMount.
28330  *
28331  * Checks if @mount can be eject.
28332  *
28333  * Returns: %TRUE if the @mount can be ejected.
28334  */
28335
28336
28337 /**
28338  * g_mount_can_unmount:
28339  * @mount: a #GMount.
28340  *
28341  * Checks if @mount can be mounted.
28342  *
28343  * Returns: %TRUE if the @mount can be unmounted.
28344  */
28345
28346
28347 /**
28348  * g_mount_eject:
28349  * @mount: a #GMount.
28350  * @flags: flags affecting the unmount if required for eject
28351  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28352  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
28353  * @user_data: user data passed to @callback.
28354  *
28355  * Ejects a mount. This is an asynchronous operation, and is
28356  * finished by calling g_mount_eject_finish() with the @mount
28357  * and #GAsyncResult data returned in the @callback.
28358  *
28359  * Deprecated: 2.22: Use g_mount_eject_with_operation() instead.
28360  */
28361
28362
28363 /**
28364  * g_mount_eject_finish:
28365  * @mount: a #GMount.
28366  * @result: a #GAsyncResult.
28367  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28368  *
28369  * Finishes ejecting a mount. If any errors occurred during the operation,
28370  * @error will be set to contain the errors and %FALSE will be returned.
28371  *
28372  * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
28373  * Deprecated: 2.22: Use g_mount_eject_with_operation_finish() instead.
28374  */
28375
28376
28377 /**
28378  * g_mount_eject_with_operation:
28379  * @mount: a #GMount.
28380  * @flags: flags affecting the unmount if required for eject
28381  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
28382  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28383  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
28384  * @user_data: user data passed to @callback.
28385  *
28386  * Ejects a mount. This is an asynchronous operation, and is
28387  * finished by calling g_mount_eject_with_operation_finish() with the @mount
28388  * and #GAsyncResult data returned in the @callback.
28389  *
28390  * Since: 2.22
28391  */
28392
28393
28394 /**
28395  * g_mount_eject_with_operation_finish:
28396  * @mount: a #GMount.
28397  * @result: a #GAsyncResult.
28398  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28399  *
28400  * Finishes ejecting a mount. If any errors occurred during the operation,
28401  * @error will be set to contain the errors and %FALSE will be returned.
28402  *
28403  * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
28404  * Since: 2.22
28405  */
28406
28407
28408 /**
28409  * g_mount_get_default_location:
28410  * @mount: a #GMount.
28411  *
28412  * Gets the default location of @mount. The default location of the given
28413  * @mount is a path that reflects the main entry point for the user (e.g.
28414  * the home directory, or the root of the volume).
28415  *
28416  * The returned object should be unreffed with
28417  * g_object_unref() when no longer needed.
28418  *
28419  * Returns: (transfer full): a #GFile.
28420  */
28421
28422
28423 /**
28424  * g_mount_get_drive:
28425  * @mount: a #GMount.
28426  *
28427  * Gets the drive for the @mount.
28428  *
28429  * This is a convenience method for getting the #GVolume and then
28430  * using that object to get the #GDrive.
28431  *
28432  * The returned object should be unreffed with
28433  * g_object_unref() when no longer needed.
28434  *
28435  * Returns: (transfer full): a #GDrive or %NULL if @mount is not associated with a volume or a drive.
28436  */
28437
28438
28439 /**
28440  * g_mount_get_icon:
28441  * @mount: a #GMount.
28442  *
28443  * Gets the icon for @mount.
28444  *
28445  * The returned object should be unreffed with
28446  * g_object_unref() when no longer needed.
28447  *
28448  * Returns: (transfer full): a #GIcon.
28449  */
28450
28451
28452 /**
28453  * g_mount_get_name:
28454  * @mount: a #GMount.
28455  *
28456  * Gets the name of @mount.
28457  *
28458  * The returned string should be freed with g_free()
28459  * when no longer needed.
28460  *
28461  * Returns: the name for the given @mount.
28462  */
28463
28464
28465 /**
28466  * g_mount_get_root:
28467  * @mount: a #GMount.
28468  *
28469  * Gets the root directory on @mount.
28470  *
28471  * The returned object should be unreffed with
28472  * g_object_unref() when no longer needed.
28473  *
28474  * Returns: (transfer full): a #GFile.
28475  */
28476
28477
28478 /**
28479  * g_mount_get_uuid:
28480  * @mount: a #GMount.
28481  *
28482  * Gets the UUID for the @mount. The reference is typically based on
28483  * the file system UUID for the mount in question and should be
28484  * considered an opaque string. Returns %NULL if there is no UUID
28485  * available.
28486  *
28487  * The returned string should be freed with g_free()
28488  * when no longer needed.
28489  *
28490  * Returns: the UUID for @mount or %NULL if no UUID can be computed.
28491  */
28492
28493
28494 /**
28495  * g_mount_get_volume:
28496  * @mount: a #GMount.
28497  *
28498  * Gets the volume for the @mount.
28499  *
28500  * The returned object should be unreffed with
28501  * g_object_unref() when no longer needed.
28502  *
28503  * Returns: (transfer full): a #GVolume or %NULL if @mount is not associated with a volume.
28504  */
28505
28506
28507 /**
28508  * g_mount_guess_content_type:
28509  * @mount: a #GMount
28510  * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
28511  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
28512  * @callback: a #GAsyncReadyCallback
28513  * @user_data: user data passed to @callback
28514  *
28515  * Tries to guess the type of content stored on @mount. Returns one or
28516  * more textual identifiers of well-known content types (typically
28517  * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
28518  * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
28519  * specification for more on x-content types.
28520  *
28521  * This is an asynchronous operation (see
28522  * g_mount_guess_content_type_sync() for the synchronous version), and
28523  * is finished by calling g_mount_guess_content_type_finish() with the
28524  * @mount and #GAsyncResult data returned in the @callback.
28525  *
28526  * Since: 2.18
28527  */
28528
28529
28530 /**
28531  * g_mount_guess_content_type_finish:
28532  * @mount: a #GMount
28533  * @result: a #GAsyncResult
28534  * @error: a #GError location to store the error occuring, or %NULL to ignore
28535  *
28536  * Finishes guessing content types of @mount. If any errors occured
28537  * during the operation, @error will be set to contain the errors and
28538  * %FALSE will be returned. In particular, you may get an
28539  * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
28540  * guessing.
28541  *
28542  * Caller should free this array with g_strfreev() when done with it.
28543  *
28544  * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
28545  * Since: 2.18
28546  */
28547
28548
28549 /**
28550  * g_mount_guess_content_type_sync:
28551  * @mount: a #GMount
28552  * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
28553  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
28554  * @error: a #GError location to store the error occuring, or %NULL to ignore
28555  *
28556  * Tries to guess the type of content stored on @mount. Returns one or
28557  * more textual identifiers of well-known content types (typically
28558  * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
28559  * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
28560  * specification for more on x-content types.
28561  *
28562  * This is an synchronous operation and as such may block doing IO;
28563  * see g_mount_guess_content_type() for the asynchronous version.
28564  *
28565  * Caller should free this array with g_strfreev() when done with it.
28566  *
28567  * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
28568  * Since: 2.18
28569  */
28570
28571
28572 /**
28573  * g_mount_is_shadowed:
28574  * @mount: A #GMount.
28575  *
28576  * Determines if @mount is shadowed. Applications or libraries should
28577  * avoid displaying @mount in the user interface if it is shadowed.
28578  *
28579  * A mount is said to be shadowed if there exists one or more user
28580  * visible objects (currently #GMount objects) with a root that is
28581  * inside the root of @mount.
28582  *
28583  * One application of shadow mounts is when exposing a single file
28584  * system that is used to address several logical volumes. In this
28585  * situation, a #GVolumeMonitor implementation would create two
28586  * #GVolume objects (for example, one for the camera functionality of
28587  * the device and one for a SD card reader on the device) with
28588  * activation URIs <literal>gphoto2://[usb:001,002]/store1/</literal>
28589  * and <literal>gphoto2://[usb:001,002]/store2/</literal>. When the
28590  * underlying mount (with root
28591  * <literal>gphoto2://[usb:001,002]/</literal>) is mounted, said
28592  * #GVolumeMonitor implementation would create two #GMount objects
28593  * (each with their root matching the corresponding volume activation
28594  * root) that would shadow the original mount.
28595  *
28596  * The proxy monitor in GVfs 2.26 and later, automatically creates and
28597  * manage shadow mounts (and shadows the underlying mount) if the
28598  * activation root on a #GVolume is set.
28599  *
28600  * Returns: %TRUE if @mount is shadowed.
28601  * Since: 2.20
28602  */
28603
28604
28605 /**
28606  * g_mount_operation_get_anonymous:
28607  * @op: a #GMountOperation.
28608  *
28609  * Check to see whether the mount operation is being used
28610  * for an anonymous user.
28611  *
28612  * Returns: %TRUE if mount operation is anonymous.
28613  */
28614
28615
28616 /**
28617  * g_mount_operation_get_choice:
28618  * @op: a #GMountOperation.
28619  *
28620  * Gets a choice from the mount operation.
28621  *
28622  * the choice's list, or %0.
28623  *
28624  * Returns: an integer containing an index of the user's choice from
28625  */
28626
28627
28628 /**
28629  * g_mount_operation_get_domain:
28630  * @op: a #GMountOperation.
28631  *
28632  * Gets the domain of the mount operation.
28633  *
28634  * Returns: a string set to the domain.
28635  */
28636
28637
28638 /**
28639  * g_mount_operation_get_password:
28640  * @op: a #GMountOperation.
28641  *
28642  * Gets a password from the mount operation.
28643  *
28644  * Returns: a string containing the password within @op.
28645  */
28646
28647
28648 /**
28649  * g_mount_operation_get_password_save:
28650  * @op: a #GMountOperation.
28651  *
28652  * Gets the state of saving passwords for the mount operation.
28653  *
28654  * Returns: a #GPasswordSave flag.
28655  */
28656
28657
28658 /**
28659  * g_mount_operation_get_username:
28660  * @op: a #GMountOperation.
28661  *
28662  * Get the user name from the mount operation.
28663  *
28664  * Returns: a string containing the user name.
28665  */
28666
28667
28668 /**
28669  * g_mount_operation_new:
28670  *
28671  * Creates a new mount operation.
28672  *
28673  * Returns: a #GMountOperation.
28674  */
28675
28676
28677 /**
28678  * g_mount_operation_reply:
28679  * @op: a #GMountOperation
28680  * @result: a #GMountOperationResult
28681  *
28682  * Emits the #GMountOperation::reply signal.
28683  */
28684
28685
28686 /**
28687  * g_mount_operation_set_anonymous:
28688  * @op: a #GMountOperation.
28689  * @anonymous: boolean value.
28690  *
28691  * Sets the mount operation to use an anonymous user if @anonymous is %TRUE.
28692  */
28693
28694
28695 /**
28696  * g_mount_operation_set_choice:
28697  * @op: a #GMountOperation.
28698  * @choice: an integer.
28699  *
28700  * Sets a default choice for the mount operation.
28701  */
28702
28703
28704 /**
28705  * g_mount_operation_set_domain:
28706  * @op: a #GMountOperation.
28707  * @domain: the domain to set.
28708  *
28709  * Sets the mount operation's domain.
28710  */
28711
28712
28713 /**
28714  * g_mount_operation_set_password:
28715  * @op: a #GMountOperation.
28716  * @password: password to set.
28717  *
28718  * Sets the mount operation's password to @password.
28719  */
28720
28721
28722 /**
28723  * g_mount_operation_set_password_save:
28724  * @op: a #GMountOperation.
28725  * @save: a set of #GPasswordSave flags.
28726  *
28727  * Sets the state of saving passwords for the mount operation.
28728  */
28729
28730
28731 /**
28732  * g_mount_operation_set_username:
28733  * @op: a #GMountOperation.
28734  * @username: input username.
28735  *
28736  * Sets the user name within @op to @username.
28737  */
28738
28739
28740 /**
28741  * g_mount_remount:
28742  * @mount: a #GMount.
28743  * @flags: flags affecting the operation
28744  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
28745  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28746  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
28747  * @user_data: user data passed to @callback.
28748  *
28749  * Remounts a mount. This is an asynchronous operation, and is
28750  * finished by calling g_mount_remount_finish() with the @mount
28751  * and #GAsyncResults data returned in the @callback.
28752  *
28753  * Remounting is useful when some setting affecting the operation
28754  * of the volume has been changed, as these may need a remount to
28755  * take affect. While this is semantically equivalent with unmounting
28756  * and then remounting not all backends might need to actually be
28757  * unmounted.
28758  */
28759
28760
28761 /**
28762  * g_mount_remount_finish:
28763  * @mount: a #GMount.
28764  * @result: a #GAsyncResult.
28765  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28766  *
28767  * Finishes remounting a mount. If any errors occurred during the operation,
28768  * @error will be set to contain the errors and %FALSE will be returned.
28769  *
28770  * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise.
28771  */
28772
28773
28774 /**
28775  * g_mount_shadow:
28776  * @mount: A #GMount.
28777  *
28778  * Increments the shadow count on @mount. Usually used by
28779  * #GVolumeMonitor implementations when creating a shadow mount for
28780  * @mount, see g_mount_is_shadowed() for more information. The caller
28781  * will need to emit the #GMount::changed signal on @mount manually.
28782  *
28783  * Since: 2.20
28784  */
28785
28786
28787 /**
28788  * g_mount_unmount:
28789  * @mount: a #GMount.
28790  * @flags: flags affecting the operation
28791  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28792  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
28793  * @user_data: user data passed to @callback.
28794  *
28795  * Unmounts a mount. This is an asynchronous operation, and is
28796  * finished by calling g_mount_unmount_finish() with the @mount
28797  * and #GAsyncResult data returned in the @callback.
28798  *
28799  * Deprecated: 2.22: Use g_mount_unmount_with_operation() instead.
28800  */
28801
28802
28803 /**
28804  * g_mount_unmount_finish:
28805  * @mount: a #GMount.
28806  * @result: a #GAsyncResult.
28807  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28808  *
28809  * Finishes unmounting a mount. If any errors occurred during the operation,
28810  * @error will be set to contain the errors and %FALSE will be returned.
28811  *
28812  * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
28813  * Deprecated: 2.22: Use g_mount_unmount_with_operation_finish() instead.
28814  */
28815
28816
28817 /**
28818  * g_mount_unmount_with_operation:
28819  * @mount: a #GMount.
28820  * @flags: flags affecting the operation
28821  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
28822  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28823  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
28824  * @user_data: user data passed to @callback.
28825  *
28826  * Unmounts a mount. This is an asynchronous operation, and is
28827  * finished by calling g_mount_unmount_with_operation_finish() with the @mount
28828  * and #GAsyncResult data returned in the @callback.
28829  *
28830  * Since: 2.22
28831  */
28832
28833
28834 /**
28835  * g_mount_unmount_with_operation_finish:
28836  * @mount: a #GMount.
28837  * @result: a #GAsyncResult.
28838  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28839  *
28840  * Finishes unmounting a mount. If any errors occurred during the operation,
28841  * @error will be set to contain the errors and %FALSE will be returned.
28842  *
28843  * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
28844  * Since: 2.22
28845  */
28846
28847
28848 /**
28849  * g_mount_unshadow:
28850  * @mount: A #GMount.
28851  *
28852  * Decrements the shadow count on @mount. Usually used by
28853  * #GVolumeMonitor implementations when destroying a shadow mount for
28854  * @mount, see g_mount_is_shadowed() for more information. The caller
28855  * will need to emit the #GMount::changed signal on @mount manually.
28856  *
28857  * Since: 2.20
28858  */
28859
28860
28861 /**
28862  * g_network_address_get_hostname:
28863  * @addr: a #GNetworkAddress
28864  *
28865  * Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded,
28866  * depending on what @addr was created with.
28867  *
28868  * Returns: @addr's hostname
28869  * Since: 2.22
28870  */
28871
28872
28873 /**
28874  * g_network_address_get_port:
28875  * @addr: a #GNetworkAddress
28876  *
28877  * Gets @addr's port number
28878  *
28879  * Returns: @addr's port (which may be 0)
28880  * Since: 2.22
28881  */
28882
28883
28884 /**
28885  * g_network_address_get_scheme:
28886  * @addr: a #GNetworkAddress
28887  *
28888  * Gets @addr's scheme
28889  *
28890  * Returns: @addr's scheme (%NULL if not built from URI)
28891  * Since: 2.26
28892  */
28893
28894
28895 /**
28896  * g_network_address_new:
28897  * @hostname: the hostname
28898  * @port: the port
28899  *
28900  * Creates a new #GSocketConnectable for connecting to the given
28901  * @hostname and @port.
28902  *
28903  * Returns: (transfer full): the new #GNetworkAddress
28904  * Since: 2.22
28905  */
28906
28907
28908 /**
28909  * g_network_address_parse:
28910  * @host_and_port: the hostname and optionally a port
28911  * @default_port: the default port if not in @host_and_port
28912  * @error: a pointer to a #GError, or %NULL
28913  *
28914  * Creates a new #GSocketConnectable for connecting to the given
28915  * @hostname and @port. May fail and return %NULL in case
28916  * parsing @host_and_port fails.
28917  *
28918  * @host_and_port may be in any of a number of recognised formats; an IPv6
28919  * address, an IPv4 address, or a domain name (in which case a DNS
28920  * lookup is performed). Quoting with [] is supported for all address
28921  * types. A port override may be specified in the usual way with a
28922  * colon. Ports may be given as decimal numbers or symbolic names (in
28923  * which case an /etc/services lookup is performed).
28924  *
28925  * If no port is specified in @host_and_port then @default_port will be
28926  * used as the port number to connect to.
28927  *
28928  * In general, @host_and_port is expected to be provided by the user
28929  * (allowing them to give the hostname, and a port overide if necessary)
28930  * and @default_port is expected to be provided by the application.
28931  *
28932  * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
28933  * Since: 2.22
28934  */
28935
28936
28937 /**
28938  * g_network_address_parse_uri:
28939  * @uri: the hostname and optionally a port
28940  * @default_port: The default port if none is found in the URI
28941  * @error: a pointer to a #GError, or %NULL
28942  *
28943  * Creates a new #GSocketConnectable for connecting to the given
28944  * @uri. May fail and return %NULL in case parsing @uri fails.
28945  *
28946  * Using this rather than g_network_address_new() or
28947  * g_network_address_parse_host() allows #GSocketClient to determine
28948  * when to use application-specific proxy protocols.
28949  *
28950  * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
28951  * Since: 2.26
28952  */
28953
28954
28955 /**
28956  * g_network_service_get_domain:
28957  * @srv: a #GNetworkService
28958  *
28959  * Gets the domain that @srv serves. This might be either UTF-8 or
28960  * ASCII-encoded, depending on what @srv was created with.
28961  *
28962  * Returns: @srv's domain name
28963  * Since: 2.22
28964  */
28965
28966
28967 /**
28968  * g_network_service_get_protocol:
28969  * @srv: a #GNetworkService
28970  *
28971  * Gets @srv's protocol name (eg, "tcp").
28972  *
28973  * Returns: @srv's protocol name
28974  * Since: 2.22
28975  */
28976
28977
28978 /**
28979  * g_network_service_get_scheme:
28980  * @srv: a #GNetworkService
28981  *
28982  * Get's the URI scheme used to resolve proxies. By default, the service name
28983  * is used as scheme.
28984  *
28985  * Returns: @srv's scheme name
28986  * Since: 2.26
28987  */
28988
28989
28990 /**
28991  * g_network_service_get_service:
28992  * @srv: a #GNetworkService
28993  *
28994  * Gets @srv's service name (eg, "ldap").
28995  *
28996  * Returns: @srv's service name
28997  * Since: 2.22
28998  */
28999
29000
29001 /**
29002  * g_network_service_new:
29003  * @service: the service type to look up (eg, "ldap")
29004  * @protocol: the networking protocol to use for @service (eg, "tcp")
29005  * @domain: the DNS domain to look up the service in
29006  *
29007  * Creates a new #GNetworkService representing the given @service,
29008  * @protocol, and @domain. This will initially be unresolved; use the
29009  * #GSocketConnectable interface to resolve it.
29010  *
29011  * Returns: (transfer full): a new #GNetworkService
29012  * Since: 2.22
29013  */
29014
29015
29016 /**
29017  * g_network_service_set_scheme:
29018  * @srv: a #GNetworkService
29019  * @scheme: a URI scheme
29020  *
29021  * Set's the URI scheme used to resolve proxies. By default, the service name
29022  * is used as scheme.
29023  *
29024  * Since: 2.26
29025  */
29026
29027
29028 /**
29029  * g_new:
29030  * @struct_type: the type of the elements to allocate
29031  * @n_structs: the number of elements to allocate
29032  *
29033  * Allocates @n_structs elements of type @struct_type.
29034  * The returned pointer is cast to a pointer to the given type.
29035  * If @n_structs is 0 it returns %NULL.
29036  * Care is taken to avoid overflow when calculating the size of the allocated block.
29037  *
29038  * Since the returned pointer is already casted to the right type,
29039  * it is normally unnecessary to cast it explicitly, and doing
29040  * so might hide memory allocation errors.
29041  *
29042  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
29043  */
29044
29045
29046 /**
29047  * g_new0:
29048  * @struct_type: the type of the elements to allocate.
29049  * @n_structs: the number of elements to allocate.
29050  *
29051  * Allocates @n_structs elements of type @struct_type, initialized to 0's.
29052  * The returned pointer is cast to a pointer to the given type.
29053  * If @n_structs is 0 it returns %NULL.
29054  * Care is taken to avoid overflow when calculating the size of the allocated block.
29055  *
29056  * Since the returned pointer is already casted to the right type,
29057  * it is normally unnecessary to cast it explicitly, and doing
29058  * so might hide memory allocation errors.
29059  *
29060  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
29061  */
29062
29063
29064 /**
29065  * g_newa:
29066  * @struct_type: Type of memory chunks to be allocated
29067  * @n_structs: Number of chunks to be allocated
29068  *
29069  * Wraps g_alloca() in a more typesafe manner.
29070  *
29071  * Returns: Pointer to stack space for @n_structs chunks of type @struct_type
29072  */
29073
29074
29075 /**
29076  * g_node_append:
29077  * @parent: the #GNode to place the new #GNode under
29078  * @node: the #GNode to insert
29079  *
29080  * Inserts a #GNode as the last child of the given parent.
29081  *
29082  * Returns: the inserted #GNode
29083  */
29084
29085
29086 /**
29087  * g_node_append_data:
29088  * @parent: the #GNode to place the new #GNode under
29089  * @data: the data for the new #GNode
29090  *
29091  * Inserts a new #GNode as the last child of the given parent.
29092  *
29093  * Returns: the new #GNode
29094  */
29095
29096
29097 /**
29098  * g_node_first_child:
29099  * @node: a #GNode
29100  *
29101  * Gets the first child of a #GNode.
29102  *
29103  * or has no children
29104  *
29105  * Returns: the first child of @node, or %NULL if @node is %NULL
29106  */
29107
29108
29109 /**
29110  * g_node_insert_data:
29111  * @parent: the #GNode to place the new #GNode under
29112  * @position: the position to place the new #GNode at. If position is -1, the new #GNode is inserted as the last child of @parent
29113  * @data: the data for the new #GNode
29114  *
29115  * Inserts a new #GNode at the given position.
29116  *
29117  * Returns: the new #GNode
29118  */
29119
29120
29121 /**
29122  * g_node_insert_data_before:
29123  * @parent: the #GNode to place the new #GNode under
29124  * @sibling: the sibling #GNode to place the new #GNode before
29125  * @data: the data for the new #GNode
29126  *
29127  * Inserts a new #GNode before the given sibling.
29128  *
29129  * Returns: the new #GNode
29130  */
29131
29132
29133 /**
29134  * g_node_next_sibling:
29135  * @node: a #GNode
29136  *
29137  * Gets the next sibling of a #GNode.
29138  *
29139  * or %NULL
29140  *
29141  * Returns: the next sibling of @node, or %NULL if @node is the last node
29142  */
29143
29144
29145 /**
29146  * g_node_prepend_data:
29147  * @parent: the #GNode to place the new #GNode under
29148  * @data: the data for the new #GNode
29149  *
29150  * Inserts a new #GNode as the first child of the given parent.
29151  *
29152  * Returns: the new #GNode
29153  */
29154
29155
29156 /**
29157  * g_node_prev_sibling:
29158  * @node: a #GNode
29159  *
29160  * Gets the previous sibling of a #GNode.
29161  *
29162  * node or %NULL
29163  *
29164  * Returns: the previous sibling of @node, or %NULL if @node is the first
29165  */
29166
29167
29168 /**
29169  * g_null_settings_backend_new:
29170  *
29171  * Creates a readonly #GSettingsBackend.
29172  *
29173  * This backend does not allow changes to settings, so all settings
29174  * will always have their default values.
29175  *
29176  * Returns: (transfer full): a newly created #GSettingsBackend
29177  * Since: 2.28
29178  */
29179
29180
29181 /**
29182  * g_output_stream_clear_pending:
29183  * @stream: output stream
29184  *
29185  * Clears the pending flag on @stream.
29186  */
29187
29188
29189 /**
29190  * g_output_stream_close:
29191  * @stream: A #GOutputStream.
29192  * @cancellable: (allow-none): optional cancellable object
29193  * @error: location to store the error occuring, or %NULL to ignore
29194  *
29195  * Closes the stream, releasing resources related to it.
29196  *
29197  * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
29198  * Closing a stream multiple times will not return an error.
29199  *
29200  * Closing a stream will automatically flush any outstanding buffers in the
29201  * stream.
29202  *
29203  * Streams will be automatically closed when the last reference
29204  * is dropped, but you might want to call this function to make sure
29205  * resources are released as early as possible.
29206  *
29207  * Some streams might keep the backing store of the stream (e.g. a file descriptor)
29208  * open after the stream is closed. See the documentation for the individual
29209  * stream for details.
29210  *
29211  * On failure the first error that happened will be reported, but the close
29212  * operation will finish as much as possible. A stream that failed to
29213  * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
29214  * is important to check and report the error to the user, otherwise
29215  * there might be a loss of data as all data might not be written.
29216  *
29217  * If @cancellable is not NULL, then the operation can be cancelled by
29218  * triggering the cancellable object from another thread. If the operation
29219  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
29220  * Cancelling a close will still leave the stream closed, but there some streams
29221  * can use a faster close that doesn't block to e.g. check errors. On
29222  * cancellation (as with any error) there is no guarantee that all written
29223  * data will reach the target.
29224  *
29225  * Returns: %TRUE on success, %FALSE on failure
29226  */
29227
29228
29229 /**
29230  * g_output_stream_close_async:
29231  * @stream: A #GOutputStream.
29232  * @io_priority: the io priority of the request.
29233  * @cancellable: (allow-none): optional cancellable object
29234  * @callback: (scope async): callback to call when the request is satisfied
29235  * @user_data: (closure): the data to pass to callback function
29236  *
29237  * Requests an asynchronous close of the stream, releasing resources
29238  * related to it. When the operation is finished @callback will be
29239  * called. You can then call g_output_stream_close_finish() to get
29240  * the result of the operation.
29241  *
29242  * For behaviour details see g_output_stream_close().
29243  *
29244  * The asyncronous methods have a default fallback that uses threads
29245  * to implement asynchronicity, so they are optional for inheriting
29246  * classes. However, if you override one you must override all.
29247  */
29248
29249
29250 /**
29251  * g_output_stream_close_finish:
29252  * @stream: a #GOutputStream.
29253  * @result: a #GAsyncResult.
29254  * @error: a #GError location to store the error occuring, or %NULL to ignore.
29255  *
29256  * Closes an output stream.
29257  *
29258  * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
29259  */
29260
29261
29262 /**
29263  * g_output_stream_flush:
29264  * @stream: a #GOutputStream.
29265  * @cancellable: (allow-none): optional cancellable object
29266  * @error: location to store the error occuring, or %NULL to ignore
29267  *
29268  * Flushed any outstanding buffers in the stream. Will block during
29269  * the operation. Closing the stream will implicitly cause a flush.
29270  *
29271  * This function is optional for inherited classes.
29272  *
29273  * If @cancellable is not %NULL, then the operation can be cancelled by
29274  * triggering the cancellable object from another thread. If the operation
29275  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
29276  *
29277  * Returns: %TRUE on success, %FALSE on error
29278  */
29279
29280
29281 /**
29282  * g_output_stream_flush_async:
29283  * @stream: a #GOutputStream.
29284  * @io_priority: the io priority of the request.
29285  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29286  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
29287  * @user_data: (closure): the data to pass to callback function
29288  *
29289  * Flushes a stream asynchronously.
29290  * For behaviour details see g_output_stream_flush().
29291  *
29292  * When the operation is finished @callback will be
29293  * called. You can then call g_output_stream_flush_finish() to get the
29294  * result of the operation.
29295  */
29296
29297
29298 /**
29299  * g_output_stream_flush_finish:
29300  * @stream: a #GOutputStream.
29301  * @result: a GAsyncResult.
29302  * @error: a #GError location to store the error occuring, or %NULL to ignore.
29303  *
29304  * Finishes flushing an output stream.
29305  *
29306  * Returns: %TRUE if flush operation suceeded, %FALSE otherwise.
29307  */
29308
29309
29310 /**
29311  * g_output_stream_has_pending:
29312  * @stream: a #GOutputStream.
29313  *
29314  * Checks if an ouput stream has pending actions.
29315  *
29316  * Returns: %TRUE if @stream has pending actions.
29317  */
29318
29319
29320 /**
29321  * g_output_stream_is_closed:
29322  * @stream: a #GOutputStream.
29323  *
29324  * Checks if an output stream has already been closed.
29325  *
29326  * Returns: %TRUE if @stream is closed. %FALSE otherwise.
29327  */
29328
29329
29330 /**
29331  * g_output_stream_is_closing:
29332  * @stream: a #GOutputStream.
29333  *
29334  * Checks if an output stream is being closed. This can be
29335  * used inside e.g. a flush implementation to see if the
29336  * flush (or other i/o operation) is called from within
29337  * the closing operation.
29338  *
29339  * Returns: %TRUE if @stream is being closed. %FALSE otherwise.
29340  * Since: 2.24
29341  */
29342
29343
29344 /**
29345  * g_output_stream_set_pending:
29346  * @stream: a #GOutputStream.
29347  * @error: a #GError location to store the error occuring, or %NULL to ignore.
29348  *
29349  * Sets @stream to have actions pending. If the pending flag is
29350  * already set or @stream is closed, it will return %FALSE and set
29351  * @error.
29352  *
29353  * Returns: %TRUE if pending was previously unset and is now set.
29354  */
29355
29356
29357 /**
29358  * g_output_stream_splice:
29359  * @stream: a #GOutputStream.
29360  * @source: a #GInputStream.
29361  * @flags: a set of #GOutputStreamSpliceFlags.
29362  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29363  * @error: a #GError location to store the error occuring, or %NULL to ignore.
29364  *
29365  * Splices an input stream into an output stream.
29366  *
29367  * -1 if an error occurred. Note that if the number of bytes
29368  * spliced is greater than %G_MAXSSIZE, then that will be
29369  * returned, and there is no way to determine the actual number
29370  * of bytes spliced.
29371  *
29372  * Returns: a #gssize containing the size of the data spliced, or
29373  */
29374
29375
29376 /**
29377  * g_output_stream_splice_async:
29378  * @stream: a #GOutputStream.
29379  * @source: a #GInputStream.
29380  * @flags: a set of #GOutputStreamSpliceFlags.
29381  * @io_priority: the io priority of the request.
29382  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29383  * @callback: (scope async): a #GAsyncReadyCallback.
29384  * @user_data: (closure): user data passed to @callback.
29385  *
29386  * Splices a stream asynchronously.
29387  * When the operation is finished @callback will be called.
29388  * You can then call g_output_stream_splice_finish() to get the
29389  * result of the operation.
29390  *
29391  * For the synchronous, blocking version of this function, see
29392  * g_output_stream_splice().
29393  */
29394
29395
29396 /**
29397  * g_output_stream_splice_finish:
29398  * @stream: a #GOutputStream.
29399  * @result: a #GAsyncResult.
29400  * @error: a #GError location to store the error occuring, or %NULL to ignore.
29401  *
29402  * Finishes an asynchronous stream splice operation.
29403  *
29404  * number of bytes spliced is greater than %G_MAXSSIZE, then that
29405  * will be returned, and there is no way to determine the actual
29406  * number of bytes spliced.
29407  *
29408  * Returns: a #gssize of the number of bytes spliced. Note that if the
29409  */
29410
29411
29412 /**
29413  * g_output_stream_write:
29414  * @stream: a #GOutputStream.
29415  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
29416  * @count: the number of bytes to write
29417  * @cancellable: (allow-none): optional cancellable object
29418  * @error: location to store the error occuring, or %NULL to ignore
29419  *
29420  * Tries to write @count bytes from @buffer into the stream. Will block
29421  * during the operation.
29422  *
29423  * If count is 0, returns 0 and does nothing. A value of @count
29424  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
29425  *
29426  * On success, the number of bytes written to the stream is returned.
29427  * It is not an error if this is not the same as the requested size, as it
29428  * can happen e.g. on a partial I/O error, or if there is not enough
29429  * storage in the stream. All writes block until at least one byte
29430  * is written or an error occurs; 0 is never returned (unless
29431  * @count is 0).
29432  *
29433  * If @cancellable is not NULL, then the operation can be cancelled by
29434  * triggering the cancellable object from another thread. If the operation
29435  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
29436  * operation was partially finished when the operation was cancelled the
29437  * partial result will be returned, without an error.
29438  *
29439  * On error -1 is returned and @error is set accordingly.
29440  *
29441  * Returns: Number of bytes written, or -1 on error
29442  */
29443
29444
29445 /**
29446  * g_output_stream_write_all:
29447  * @stream: a #GOutputStream.
29448  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
29449  * @count: the number of bytes to write
29450  * @bytes_written: (out): location to store the number of bytes that was written to the stream
29451  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29452  * @error: location to store the error occuring, or %NULL to ignore
29453  *
29454  * Tries to write @count bytes from @buffer into the stream. Will block
29455  * during the operation.
29456  *
29457  * This function is similar to g_output_stream_write(), except it tries to
29458  * write as many bytes as requested, only stopping on an error.
29459  *
29460  * On a successful write of @count bytes, %TRUE is returned, and @bytes_written
29461  * is set to @count.
29462  *
29463  * If there is an error during the operation FALSE is returned and @error
29464  * is set to indicate the error status, @bytes_written is updated to contain
29465  * the number of bytes written into the stream before the error occurred.
29466  *
29467  * Returns: %TRUE on success, %FALSE if there was an error
29468  */
29469
29470
29471 /**
29472  * g_output_stream_write_async:
29473  * @stream: A #GOutputStream.
29474  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
29475  * @count: the number of bytes to write
29476  * @io_priority: the io priority of the request.
29477  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29478  * @callback: (scope async): callback to call when the request is satisfied
29479  * @user_data: (closure): the data to pass to callback function
29480  *
29481  * Request an asynchronous write of @count bytes from @buffer into
29482  * the stream. When the operation is finished @callback will be called.
29483  * You can then call g_output_stream_write_finish() to get the result of the
29484  * operation.
29485  *
29486  * During an async request no other sync and async calls are allowed,
29487  * and will result in %G_IO_ERROR_PENDING errors.
29488  *
29489  * A value of @count larger than %G_MAXSSIZE will cause a
29490  * %G_IO_ERROR_INVALID_ARGUMENT error.
29491  *
29492  * On success, the number of bytes written will be passed to the
29493  * @callback. It is not an error if this is not the same as the
29494  * requested size, as it can happen e.g. on a partial I/O error,
29495  * but generally we try to write as many bytes as requested.
29496  *
29497  * You are guaranteed that this method will never fail with
29498  * %G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the
29499  * method will just wait until this changes.
29500  *
29501  * Any outstanding I/O request with higher priority (lower numerical
29502  * value) will be executed before an outstanding request with lower
29503  * priority. Default priority is %G_PRIORITY_DEFAULT.
29504  *
29505  * The asyncronous methods have a default fallback that uses threads
29506  * to implement asynchronicity, so they are optional for inheriting
29507  * classes. However, if you override one you must override all.
29508  *
29509  * For the synchronous, blocking version of this function, see
29510  * g_output_stream_write().
29511  */
29512
29513
29514 /**
29515  * g_output_stream_write_finish:
29516  * @stream: a #GOutputStream.
29517  * @result: a #GAsyncResult.
29518  * @error: a #GError location to store the error occuring, or %NULL to ignore.
29519  *
29520  * Finishes a stream write operation.
29521  *
29522  * Returns: a #gssize containing the number of bytes written to the stream.
29523  */
29524
29525
29526 /**
29527  * g_permission_acquire:
29528  * @permission: a #GPermission instance
29529  * @cancellable: a #GCancellable, or %NULL
29530  * @error: a pointer to a %NULL #GError, or %NULL
29531  * @returns: %TRUE if the permission was successfully acquired
29532  *
29533  * Attempts to acquire the permission represented by @permission.
29534  *
29535  * The precise method by which this happens depends on the permission
29536  * and the underlying authentication mechanism.  A simple example is
29537  * that a dialog may appear asking the user to enter their password.
29538  *
29539  * You should check with g_permission_get_can_acquire() before calling
29540  * this function.
29541  *
29542  * If the permission is acquired then %TRUE is returned.  Otherwise,
29543  * %FALSE is returned and @error is set appropriately.
29544  *
29545  * This call is blocking, likely for a very long time (in the case that
29546  * user interaction is required).  See g_permission_acquire_async() for
29547  * the non-blocking version.
29548  *
29549  * Since: 2.26
29550  */
29551
29552
29553 /**
29554  * g_permission_acquire_async:
29555  * @permission: a #GPermission instance
29556  * @cancellable: a #GCancellable, or %NULL
29557  * @callback: the #GAsyncReadyCallback to call when done
29558  * @user_data: the user data to pass to @callback
29559  *
29560  * Attempts to acquire the permission represented by @permission.
29561  *
29562  * This is the first half of the asynchronous version of
29563  * g_permission_acquire().
29564  *
29565  * Since: 2.26
29566  */
29567
29568
29569 /**
29570  * g_permission_acquire_finish:
29571  * @permission: a #GPermission instance
29572  * @result: the #GAsyncResult given to the #GAsyncReadyCallback
29573  * @error: a pointer to a %NULL #GError, or %NULL
29574  * @returns: %TRUE if the permission was successfully acquired
29575  *
29576  * Collects the result of attempting to acquire the permission
29577  * represented by @permission.
29578  *
29579  * This is the second half of the asynchronous version of
29580  * g_permission_acquire().
29581  *
29582  * Since: 2.26
29583  */
29584
29585
29586 /**
29587  * g_permission_get_allowed:
29588  * @permission: a #GPermission instance
29589  * @returns: the value of the 'allowed' property
29590  *
29591  * Gets the value of the 'allowed' property.  This property is %TRUE if
29592  * the caller currently has permission to perform the action that
29593  * @permission represents the permission to perform.
29594  *
29595  * Since: 2.26
29596  */
29597
29598
29599 /**
29600  * g_permission_get_can_acquire:
29601  * @permission: a #GPermission instance
29602  * @returns: the value of the 'can-acquire' property
29603  *
29604  * Gets the value of the 'can-acquire' property.  This property is %TRUE
29605  * if it is generally possible to acquire the permission by calling
29606  * g_permission_acquire().
29607  *
29608  * Since: 2.26
29609  */
29610
29611
29612 /**
29613  * g_permission_get_can_release:
29614  * @permission: a #GPermission instance
29615  * @returns: the value of the 'can-release' property
29616  *
29617  * Gets the value of the 'can-release' property.  This property is %TRUE
29618  * if it is generally possible to release the permission by calling
29619  * g_permission_release().
29620  *
29621  * Since: 2.26
29622  */
29623
29624
29625 /**
29626  * g_permission_impl_update:
29627  * @permission: a #GPermission instance
29628  * @allowed: the new value for the 'allowed' property
29629  * @can_acquire: the new value for the 'can-acquire' property
29630  * @can_release: the new value for the 'can-release' property
29631  *
29632  * This function is called by the #GPermission implementation to update
29633  * the properties of the permission.  You should never call this
29634  * function except from a #GPermission implementation.
29635  *
29636  * GObject notify signals are generated, as appropriate.
29637  *
29638  * Since: 2.26
29639  */
29640
29641
29642 /**
29643  * g_permission_release:
29644  * @permission: a #GPermission instance
29645  * @cancellable: a #GCancellable, or %NULL
29646  * @error: a pointer to a %NULL #GError, or %NULL
29647  * @returns: %TRUE if the permission was successfully released
29648  *
29649  * Attempts to release the permission represented by @permission.
29650  *
29651  * The precise method by which this happens depends on the permission
29652  * and the underlying authentication mechanism.  In most cases the
29653  * permission will be dropped immediately without further action.
29654  *
29655  * You should check with g_permission_get_can_release() before calling
29656  * this function.
29657  *
29658  * If the permission is released then %TRUE is returned.  Otherwise,
29659  * %FALSE is returned and @error is set appropriately.
29660  *
29661  * This call is blocking, likely for a very long time (in the case that
29662  * user interaction is required).  See g_permission_release_async() for
29663  * the non-blocking version.
29664  *
29665  * Since: 2.26
29666  */
29667
29668
29669 /**
29670  * g_permission_release_async:
29671  * @permission: a #GPermission instance
29672  * @cancellable: a #GCancellable, or %NULL
29673  * @callback: the #GAsyncReadyCallback to call when done
29674  * @user_data: the user data to pass to @callback
29675  *
29676  * Attempts to release the permission represented by @permission.
29677  *
29678  * This is the first half of the asynchronous version of
29679  * g_permission_release().
29680  *
29681  * Since: 2.26
29682  */
29683
29684
29685 /**
29686  * g_permission_release_finish:
29687  * @permission: a #GPermission instance
29688  * @result: the #GAsyncResult given to the #GAsyncReadyCallback
29689  * @error: a pointer to a %NULL #GError, or %NULL
29690  * @returns: %TRUE if the permission was successfully released
29691  *
29692  * Collects the result of attempting to release the permission
29693  * represented by @permission.
29694  *
29695  * This is the second half of the asynchronous version of
29696  * g_permission_release().
29697  *
29698  * Since: 2.26
29699  */
29700
29701
29702 /**
29703  * g_poll_file_monitor_new:
29704  * @file: a #GFile.
29705  *
29706  * Polls @file for changes.
29707  *
29708  * Returns: a new #GFileMonitor for the given #GFile.
29709  */
29710
29711
29712 /**
29713  * g_pollable_input_stream_can_poll:
29714  * @stream: a #GPollableInputStream.
29715  *
29716  * Checks if @stream is actually pollable. Some classes may implement
29717  * #GPollableInputStream but have only certain instances of that class
29718  * be pollable. If this method returns %FALSE, then the behavior of
29719  * other #GPollableInputStream methods is undefined.
29720  *
29721  * For any given stream, the value returned by this method is constant;
29722  * a stream cannot switch from pollable to non-pollable or vice versa.
29723  *
29724  * Returns: %TRUE if @stream is pollable, %FALSE if not.
29725  * Since: 2.28
29726  */
29727
29728
29729 /**
29730  * g_pollable_input_stream_create_source: (skip)
29731  * @stream: a #GPollableInputStream.
29732  * @cancellable: (allow-none): a #GCancellable, or %NULL
29733  *
29734  * Creates a #GSource that triggers when @stream can be read, or
29735  * @cancellable is triggered or an error occurs. The callback on the
29736  * source is of the #GPollableSourceFunc type.
29737  *
29738  * As with g_pollable_input_stream_is_readable(), it is possible that
29739  * the stream may not actually be readable even after the source
29740  * triggers, so you should use g_pollable_input_stream_read_nonblocking()
29741  * rather than g_input_stream_read() from the callback.
29742  *
29743  * Returns: (transfer full): a new #GSource
29744  * Since: 2.28
29745  */
29746
29747
29748 /**
29749  * g_pollable_input_stream_is_readable:
29750  * @stream: a #GPollableInputStream.
29751  *
29752  * Checks if @stream can be read.
29753  *
29754  * Note that some stream types may not be able to implement this 100%
29755  * reliably, and it is possible that a call to g_input_stream_read()
29756  * after this returns %TRUE would still block. To guarantee
29757  * non-blocking behavior, you should always use
29758  * g_pollable_input_stream_read_nonblocking(), which will return a
29759  * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
29760  *
29761  * has occurred on @stream, this will result in
29762  * g_pollable_input_stream_is_readable() returning %TRUE, and the
29763  * next attempt to read will return the error.
29764  *
29765  * Returns: %TRUE if @stream is readable, %FALSE if not. If an error
29766  * Since: 2.28
29767  */
29768
29769
29770 /**
29771  * g_pollable_input_stream_read_nonblocking:
29772  * @stream: a #GPollableInputStream
29773  * @buffer: a buffer to read data into (which should be at least @size bytes long).
29774  * @size: the number of bytes you want to read
29775  * @cancellable: (allow-none): a #GCancellable, or %NULL
29776  * @error: #GError for error reporting, or %NULL to ignore.
29777  *
29778  * Attempts to read up to @size bytes from @stream into @buffer, as
29779  * with g_input_stream_read(). If @stream is not currently readable,
29780  * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
29781  * use g_pollable_input_stream_create_source() to create a #GSource
29782  * that will be triggered when @stream is readable.
29783  *
29784  * Note that since this method never blocks, you cannot actually
29785  * use @cancellable to cancel it. However, it will return an error
29786  * if @cancellable has already been cancelled when you call, which
29787  * may happen if you call this method after a source triggers due
29788  * to having been cancelled.
29789  *
29790  * %G_IO_ERROR_WOULD_BLOCK).
29791  *
29792  * Virtual: read_nonblocking
29793  * Returns: the number of bytes read, or -1 on error (including
29794  */
29795
29796
29797 /**
29798  * g_pollable_output_stream_can_poll:
29799  * @stream: a #GPollableOutputStream.
29800  *
29801  * Checks if @stream is actually pollable. Some classes may implement
29802  * #GPollableOutputStream but have only certain instances of that
29803  * class be pollable. If this method returns %FALSE, then the behavior
29804  * of other #GPollableOutputStream methods is undefined.
29805  *
29806  * For any given stream, the value returned by this method is constant;
29807  * a stream cannot switch from pollable to non-pollable or vice versa.
29808  *
29809  * Returns: %TRUE if @stream is pollable, %FALSE if not.
29810  * Since: 2.28
29811  */
29812
29813
29814 /**
29815  * g_pollable_output_stream_create_source: (skip)
29816  * @stream: a #GPollableOutputStream.
29817  * @cancellable: (allow-none): a #GCancellable, or %NULL
29818  *
29819  * Creates a #GSource that triggers when @stream can be written, or
29820  * @cancellable is triggered or an error occurs. The callback on the
29821  * source is of the #GPollableSourceFunc type.
29822  *
29823  * As with g_pollable_output_stream_is_writable(), it is possible that
29824  * the stream may not actually be writable even after the source
29825  * triggers, so you should use g_pollable_output_stream_write_nonblocking()
29826  * rather than g_output_stream_write() from the callback.
29827  *
29828  * Returns: (transfer full): a new #GSource
29829  * Since: 2.28
29830  */
29831
29832
29833 /**
29834  * g_pollable_output_stream_is_writable:
29835  * @stream: a #GPollableOutputStream.
29836  *
29837  * Checks if @stream can be written.
29838  *
29839  * Note that some stream types may not be able to implement this 100%
29840  * reliably, and it is possible that a call to g_output_stream_write()
29841  * after this returns %TRUE would still block. To guarantee
29842  * non-blocking behavior, you should always use
29843  * g_pollable_output_stream_write_nonblocking(), which will return a
29844  * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
29845  *
29846  * has occurred on @stream, this will result in
29847  * g_pollable_output_stream_is_writable() returning %TRUE, and the
29848  * next attempt to write will return the error.
29849  *
29850  * Returns: %TRUE if @stream is writable, %FALSE if not. If an error
29851  * Since: 2.28
29852  */
29853
29854
29855 /**
29856  * g_pollable_output_stream_write_nonblocking:
29857  * @stream: a #GPollableOutputStream
29858  * @buffer: (array length=size) (element-type guint8): a buffer to write data from
29859  * @size: the number of bytes you want to write
29860  * @cancellable: (allow-none): a #GCancellable, or %NULL
29861  * @error: #GError for error reporting, or %NULL to ignore.
29862  *
29863  * Attempts to write up to @size bytes from @buffer to @stream, as
29864  * with g_output_stream_write(). If @stream is not currently writable,
29865  * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
29866  * use g_pollable_output_stream_create_source() to create a #GSource
29867  * that will be triggered when @stream is writable.
29868  *
29869  * Note that since this method never blocks, you cannot actually
29870  * use @cancellable to cancel it. However, it will return an error
29871  * if @cancellable has already been cancelled when you call, which
29872  * may happen if you call this method after a source triggers due
29873  * to having been cancelled.
29874  *
29875  * %G_IO_ERROR_WOULD_BLOCK).
29876  *
29877  * Virtual: write_nonblocking
29878  * Returns: the number of bytes written, or -1 on error (including
29879  */
29880
29881
29882 /**
29883  * g_pollable_source_new: (skip)
29884  * @pollable_stream: the stream associated with the new source
29885  *
29886  * Utility method for #GPollableInputStream and #GPollableOutputStream
29887  * implementations. Creates a new #GSource that expects a callback of
29888  * type #GPollableSourceFunc. The new source does not actually do
29889  * anything on its own; use g_source_add_child_source() to add other
29890  * sources to it to cause it to trigger.
29891  *
29892  * Returns: (transfer full): the new #GSource.
29893  * Since: 2.28
29894  */
29895
29896
29897 /**
29898  * g_proxy_address_get_destination_hostname:
29899  * @proxy: a #GProxyAddress
29900  *
29901  * Gets @proxy's destination hostname.
29902  *
29903  * Returns: the @proxy's destination hostname
29904  * Since: 2.26
29905  */
29906
29907
29908 /**
29909  * g_proxy_address_get_destination_port:
29910  * @proxy: a #GProxyAddress
29911  *
29912  * Gets @proxy's destination port.
29913  *
29914  * Returns: the @proxy's destination port
29915  * Since: 2.26
29916  */
29917
29918
29919 /**
29920  * g_proxy_address_get_password:
29921  * @proxy: a #GProxyAddress
29922  *
29923  * Gets @proxy's password.
29924  *
29925  * Returns: the @proxy's password
29926  * Since: 2.26
29927  */
29928
29929
29930 /**
29931  * g_proxy_address_get_protocol:
29932  * @proxy: a #GProxyAddress
29933  *
29934  * Gets @proxy's protocol.
29935  *
29936  * Returns: the @proxy's protocol
29937  * Since: 2.26
29938  */
29939
29940
29941 /**
29942  * g_proxy_address_get_username:
29943  * @proxy: a #GProxyAddress
29944  *
29945  * Gets @proxy's username.
29946  *
29947  * Returns: the @proxy's username
29948  * Since: 2.26
29949  */
29950
29951
29952 /**
29953  * g_proxy_address_new:
29954  * @inetaddr: The proxy server #GInetAddress.
29955  * @port: The proxy server port.
29956  * @protocol: The proxy protocol to support, in lower case (e.g. socks, http).
29957  * @dest_hostname: The destination hostname the the proxy should tunnel to.
29958  * @dest_port: The destination port to tunnel to.
29959  * @username: (allow-none): The username to authenticate to the proxy server (or %NULL).
29960  * @password: (allow-none): The password to authenticate to the proxy server (or %NULL).
29961  *
29962  * Creates a new #GProxyAddress for @inetaddr with @protocol that should
29963  * tunnel through @dest_hostname and @dest_port.
29964  *
29965  * Returns: a new #GProxyAddress
29966  * Since: 2.26
29967  */
29968
29969
29970 /**
29971  * g_proxy_connect:
29972  * @proxy: a #GProxy
29973  * @connection: a #GIOStream
29974  * @proxy_address: a #GProxyAddress
29975  * @cancellable: (allow-none): a #GCancellable
29976  * @error: return #GError
29977  *
29978  * Given @connection to communicate with a proxy (eg, a
29979  * #GSocketConnection that is connected to the proxy server), this
29980  * does the necessary handshake to connect to @proxy_address, and if
29981  * required, wraps the #GIOStream to handle proxy payload.
29982  *
29983  * be the same as @connection, in which case a reference
29984  * will be added.
29985  *
29986  * Returns: (transfer full): a #GIOStream that will replace @connection. This might
29987  * Since: 2.26
29988  */
29989
29990
29991 /**
29992  * g_proxy_connect_async:
29993  * @proxy: a #GProxy
29994  * @connection: a #GIOStream
29995  * @proxy_address: a #GProxyAddress
29996  * @cancellable: (allow-none): a #GCancellable
29997  * @callback: (scope async): a #GAsyncReadyCallback
29998  * @user_data: (closure): callback data
29999  *
30000  * Asynchronous version of g_proxy_connect().
30001  *
30002  * Since: 2.26
30003  */
30004
30005
30006 /**
30007  * g_proxy_connect_finish:
30008  * @proxy: a #GProxy
30009  * @result: a #GAsyncResult
30010  * @error: return #GError
30011  *
30012  * See g_proxy_connect().
30013  *
30014  * Returns: (transfer full): a #GIOStream.
30015  * Since: 2.26
30016  */
30017
30018
30019 /**
30020  * g_proxy_get_default_for_protocol:
30021  * @protocol: the proxy protocol name (e.g. http, socks, etc)
30022  *
30023  * Lookup "gio-proxy" extension point for a proxy implementation that supports
30024  * specified protocol.
30025  *
30026  * is not supported.
30027  *
30028  * Returns: (transfer full): return a #GProxy or NULL if protocol
30029  * Since: 2.26
30030  */
30031
30032
30033 /**
30034  * g_proxy_resolver_get_default:
30035  *
30036  * Gets the default #GProxyResolver for the system.
30037  *
30038  * Returns: (transfer none): the default #GProxyResolver.
30039  * Since: 2.26
30040  */
30041
30042
30043 /**
30044  * g_proxy_resolver_is_supported:
30045  * @resolver: a #GProxyResolver
30046  *
30047  * Checks if @resolver can be used on this system. (This is used
30048  * internally; g_proxy_resolver_get_default() will only return a proxy
30049  * resolver that returns %TRUE for this method.)
30050  *
30051  * Returns: %TRUE if @resolver is supported.
30052  * Since: 2.26
30053  */
30054
30055
30056 /**
30057  * g_proxy_resolver_lookup:
30058  * @resolver: a #GProxyResolver
30059  * @uri: a URI representing the destination to connect to
30060  * @cancellable: (allow-none): a #GCancellable, or %NULL
30061  * @error: return location for a #GError, or %NULL
30062  *
30063  * Looks into the system proxy configuration to determine what proxy,
30064  * if any, to use to connect to @uri. The returned proxy URIs are of the
30065  * form <literal>&lt;protocol&gt;://[user[:password]@]host:port</literal>
30066  * or <literal>direct://</literal>, where &lt;protocol&gt; could be
30067  * http, rtsp, socks or other proxying protocol.
30068  *
30069  * If you don't know what network protocol is being used on the
30070  * socket, you should use <literal>none</literal> as the URI protocol.
30071  * In this case, the resolver might still return a generic proxy type
30072  * (such as SOCKS), but would not return protocol-specific proxy types
30073  * (such as http).
30074  *
30075  * <literal>direct://</literal> is used when no proxy is needed.
30076  * Direct connection should not be attempted unless it is part of the
30077  * returned array of proxies.
30078  *
30079  * NULL-terminated array of proxy URIs. Must be freed
30080  * with g_strfreev().
30081  *
30082  * Returns: (transfer full) (array zero-terminated=1): A
30083  * Since: 2.26
30084  */
30085
30086
30087 /**
30088  * g_proxy_resolver_lookup_async:
30089  * @resolver: a #GProxyResolver
30090  * @uri: a URI representing the destination to connect to
30091  * @cancellable: (allow-none): a #GCancellable, or %NULL
30092  * @callback: (scope async): callback to call after resolution completes
30093  * @user_data: (closure): data for @callback
30094  *
30095  * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
30096  * details.
30097  *
30098  * Since: 2.26
30099  */
30100
30101
30102 /**
30103  * g_proxy_resolver_lookup_finish:
30104  * @resolver: a #GProxyResolver
30105  * @result: the result passed to your #GAsyncReadyCallback
30106  * @error: return location for a #GError, or %NULL
30107  *
30108  * Call this function to obtain the array of proxy URIs when
30109  * g_proxy_resolver_lookup_async() is complete. See
30110  * g_proxy_resolver_lookup() for more details.
30111  *
30112  * NULL-terminated array of proxy URIs. Must be freed
30113  * with g_strfreev().
30114  *
30115  * Returns: (transfer full) (array zero-terminated=1): A
30116  * Since: 2.26
30117  */
30118
30119
30120 /**
30121  * g_proxy_supports_hostname:
30122  * @proxy: a #GProxy
30123  *
30124  * Some proxy protocols expect to be passed a hostname, which they
30125  * will resolve to an IP address themselves. Others, like SOCKS4, do
30126  * not allow this. This function will return %FALSE if @proxy is
30127  * implementing such a protocol. When %FALSE is returned, the caller
30128  * should resolve the destination hostname first, and then pass a
30129  * #GProxyAddress containing the stringified IP address to
30130  * g_proxy_connect() or g_proxy_connect_async().
30131  *
30132  * Returns: %TRUE if hostname resolution is supported.
30133  * Since: 2.26
30134  */
30135
30136
30137 /**
30138  * g_renew:
30139  * @struct_type: the type of the elements to allocate
30140  * @mem: the currently allocated memory
30141  * @n_structs: the number of elements to allocate
30142  *
30143  * Reallocates the memory pointed to by @mem, so that it now has space for
30144  * @n_structs elements of type @struct_type. It returns the new address of
30145  * the memory, which may have been moved.
30146  * Care is taken to avoid overflow when calculating the size of the allocated block.
30147  *
30148  * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
30149  */
30150
30151
30152 /**
30153  * g_resolver_error_quark:
30154  *
30155  * Gets the #GResolver Error Quark.
30156  *
30157  * Returns: a #GQuark.
30158  * Since: 2.22
30159  */
30160
30161
30162 /**
30163  * g_resolver_free_addresses: (skip)
30164  * @addresses: a #GList of #GInetAddress
30165  *
30166  * Frees @addresses (which should be the return value from
30167  * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()).
30168  * (This is a convenience method; you can also simply free the results
30169  * by hand.)
30170  *
30171  * Since: 2.22
30172  */
30173
30174
30175 /**
30176  * g_resolver_free_targets: (skip)
30177  * @targets: a #GList of #GSrvTarget
30178  *
30179  * Frees @targets (which should be the return value from
30180  * g_resolver_lookup_service() or g_resolver_lookup_service_finish()).
30181  * (This is a convenience method; you can also simply free the
30182  * results by hand.)
30183  *
30184  * Since: 2.22
30185  */
30186
30187
30188 /**
30189  * g_resolver_get_default:
30190  *
30191  * Gets the default #GResolver. You should unref it when you are done
30192  * with it. #GResolver may use its reference count as a hint about how
30193  * many threads/processes, etc it should allocate for concurrent DNS
30194  * resolutions.
30195  *
30196  * Returns: (transfer full): the default #GResolver.
30197  * Since: 2.22
30198  */
30199
30200
30201 /**
30202  * g_resolver_lookup_by_address:
30203  * @resolver: a #GResolver
30204  * @address: the address to reverse-resolve
30205  * @cancellable: (allow-none): a #GCancellable, or %NULL
30206  * @error: return location for a #GError, or %NULL
30207  *
30208  * Synchronously reverse-resolves @address to determine its
30209  * associated hostname.
30210  *
30211  * If the DNS resolution fails, @error (if non-%NULL) will be set to
30212  * a value from #GResolverError.
30213  *
30214  * If @cancellable is non-%NULL, it can be used to cancel the
30215  * operation, in which case @error (if non-%NULL) will be set to
30216  * %G_IO_ERROR_CANCELLED.
30217  *
30218  * form), or %NULL on error.
30219  *
30220  * Returns: a hostname (either ASCII-only, or in ASCII-encoded
30221  * Since: 2.22
30222  */
30223
30224
30225 /**
30226  * g_resolver_lookup_by_address_async:
30227  * @resolver: a #GResolver
30228  * @address: the address to reverse-resolve
30229  * @cancellable: (allow-none): a #GCancellable, or %NULL
30230  * @callback: (scope async): callback to call after resolution completes
30231  * @user_data: (closure): data for @callback
30232  *
30233  * Begins asynchronously reverse-resolving @address to determine its
30234  * associated hostname, and eventually calls @callback, which must
30235  * call g_resolver_lookup_by_address_finish() to get the final result.
30236  *
30237  * Since: 2.22
30238  */
30239
30240
30241 /**
30242  * g_resolver_lookup_by_address_finish:
30243  * @resolver: a #GResolver
30244  * @result: the result passed to your #GAsyncReadyCallback
30245  * @error: return location for a #GError, or %NULL
30246  *
30247  * Retrieves the result of a previous call to
30248  * g_resolver_lookup_by_address_async().
30249  *
30250  * If the DNS resolution failed, @error (if non-%NULL) will be set to
30251  * a value from #GResolverError. If the operation was cancelled,
30252  * @error will be set to %G_IO_ERROR_CANCELLED.
30253  *
30254  * form), or %NULL on error.
30255  *
30256  * Returns: a hostname (either ASCII-only, or in ASCII-encoded
30257  * Since: 2.22
30258  */
30259
30260
30261 /**
30262  * g_resolver_lookup_by_name:
30263  * @resolver: a #GResolver
30264  * @hostname: the hostname to look up
30265  * @cancellable: (allow-none): a #GCancellable, or %NULL
30266  * @error: return location for a #GError, or %NULL
30267  *
30268  * Synchronously resolves @hostname to determine its associated IP
30269  * address(es). @hostname may be an ASCII-only or UTF-8 hostname, or
30270  * the textual form of an IP address (in which case this just becomes
30271  * a wrapper around g_inet_address_new_from_string()).
30272  *
30273  * On success, g_resolver_lookup_by_name() will return a #GList of
30274  * #GInetAddress, sorted in order of preference and guaranteed to not
30275  * contain duplicates. That is, if using the result to connect to
30276  * @hostname, you should attempt to connect to the first address
30277  * first, then the second if the first fails, etc. If you are using
30278  * the result to listen on a socket, it is appropriate to add each
30279  * result using e.g. g_socket_listener_add_address().
30280  *
30281  * If the DNS resolution fails, @error (if non-%NULL) will be set to a
30282  * value from #GResolverError.
30283  *
30284  * If @cancellable is non-%NULL, it can be used to cancel the
30285  * operation, in which case @error (if non-%NULL) will be set to
30286  * %G_IO_ERROR_CANCELLED.
30287  *
30288  * If you are planning to connect to a socket on the resolved IP
30289  * address, it may be easier to create a #GNetworkAddress and use its
30290  * #GSocketConnectable interface.
30291  *
30292  * of #GInetAddress, or %NULL on error. You
30293  * must unref each of the addresses and free the list when you are
30294  * done with it. (You can use g_resolver_free_addresses() to do this.)
30295  *
30296  * Returns: (element-type GInetAddress) (transfer full): a #GList
30297  * Since: 2.22
30298  */
30299
30300
30301 /**
30302  * g_resolver_lookup_by_name_async:
30303  * @resolver: a #GResolver
30304  * @hostname: the hostname to look up the address of
30305  * @cancellable: (allow-none): a #GCancellable, or %NULL
30306  * @callback: (scope async): callback to call after resolution completes
30307  * @user_data: (closure): data for @callback
30308  *
30309  * Begins asynchronously resolving @hostname to determine its
30310  * associated IP address(es), and eventually calls @callback, which
30311  * must call g_resolver_lookup_by_name_finish() to get the result.
30312  * See g_resolver_lookup_by_name() for more details.
30313  *
30314  * Since: 2.22
30315  */
30316
30317
30318 /**
30319  * g_resolver_lookup_by_name_finish:
30320  * @resolver: a #GResolver
30321  * @result: the result passed to your #GAsyncReadyCallback
30322  * @error: return location for a #GError, or %NULL
30323  *
30324  * Retrieves the result of a call to
30325  * g_resolver_lookup_by_name_async().
30326  *
30327  * If the DNS resolution failed, @error (if non-%NULL) will be set to
30328  * a value from #GResolverError. If the operation was cancelled,
30329  * @error will be set to %G_IO_ERROR_CANCELLED.
30330  *
30331  * of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name()
30332  * for more details.
30333  *
30334  * Returns: (element-type GInetAddress) (transfer full): a #GList
30335  * Since: 2.22
30336  */
30337
30338
30339 /**
30340  * g_resolver_lookup_service:
30341  * @resolver: a #GResolver
30342  * @service: the service type to look up (eg, "ldap")
30343  * @protocol: the networking protocol to use for @service (eg, "tcp")
30344  * @domain: the DNS domain to look up the service in
30345  * @cancellable: (allow-none): a #GCancellable, or %NULL
30346  * @error: return location for a #GError, or %NULL
30347  *
30348  * Synchronously performs a DNS SRV lookup for the given @service and
30349  * @protocol in the given @domain and returns an array of #GSrvTarget.
30350  * @domain may be an ASCII-only or UTF-8 hostname. Note also that the
30351  * @service and @protocol arguments <emphasis>do not</emphasis>
30352  * include the leading underscore that appears in the actual DNS
30353  * entry.
30354  *
30355  * On success, g_resolver_lookup_service() will return a #GList of
30356  * #GSrvTarget, sorted in order of preference. (That is, you should
30357  * attempt to connect to the first target first, then the second if
30358  * the first fails, etc.)
30359  *
30360  * If the DNS resolution fails, @error (if non-%NULL) will be set to
30361  * a value from #GResolverError.
30362  *
30363  * If @cancellable is non-%NULL, it can be used to cancel the
30364  * operation, in which case @error (if non-%NULL) will be set to
30365  * %G_IO_ERROR_CANCELLED.
30366  *
30367  * If you are planning to connect to the service, it is usually easier
30368  * to create a #GNetworkService and use its #GSocketConnectable
30369  * interface.
30370  *
30371  * or %NULL on error. You must free each of the targets and the list when you are
30372  * done with it. (You can use g_resolver_free_targets() to do this.)
30373  *
30374  * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
30375  * Since: 2.22
30376  */
30377
30378
30379 /**
30380  * g_resolver_lookup_service_async:
30381  * @resolver: a #GResolver
30382  * @service: the service type to look up (eg, "ldap")
30383  * @protocol: the networking protocol to use for @service (eg, "tcp")
30384  * @domain: the DNS domain to look up the service in
30385  * @cancellable: (allow-none): a #GCancellable, or %NULL
30386  * @callback: (scope async): callback to call after resolution completes
30387  * @user_data: (closure): data for @callback
30388  *
30389  * Begins asynchronously performing a DNS SRV lookup for the given
30390  * @service and @protocol in the given @domain, and eventually calls
30391  * @callback, which must call g_resolver_lookup_service_finish() to
30392  * get the final result. See g_resolver_lookup_service() for more
30393  * details.
30394  *
30395  * Since: 2.22
30396  */
30397
30398
30399 /**
30400  * g_resolver_lookup_service_finish:
30401  * @resolver: a #GResolver
30402  * @result: the result passed to your #GAsyncReadyCallback
30403  * @error: return location for a #GError, or %NULL
30404  *
30405  * Retrieves the result of a previous call to
30406  * g_resolver_lookup_service_async().
30407  *
30408  * If the DNS resolution failed, @error (if non-%NULL) will be set to
30409  * a value from #GResolverError. If the operation was cancelled,
30410  * @error will be set to %G_IO_ERROR_CANCELLED.
30411  *
30412  * or %NULL on error. See g_resolver_lookup_service() for more details.
30413  *
30414  * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
30415  * Since: 2.22
30416  */
30417
30418
30419 /**
30420  * g_resolver_set_default:
30421  * @resolver: the new default #GResolver
30422  *
30423  * Sets @resolver to be the application's default resolver (reffing
30424  * @resolver, and unreffing the previous default resolver, if any).
30425  * Future calls to g_resolver_get_default() will return this resolver.
30426  *
30427  * This can be used if an application wants to perform any sort of DNS
30428  * caching or "pinning"; it can implement its own #GResolver that
30429  * calls the original default resolver for DNS operations, and
30430  * implements its own cache policies on top of that, and then set
30431  * itself as the default resolver for all later code to use.
30432  *
30433  * Since: 2.22
30434  */
30435
30436
30437 /**
30438  * g_seekable_can_seek:
30439  * @seekable: a #GSeekable.
30440  *
30441  * Tests if the stream supports the #GSeekableIface.
30442  *
30443  * Returns: %TRUE if @seekable can be seeked. %FALSE otherwise.
30444  */
30445
30446
30447 /**
30448  * g_seekable_can_truncate:
30449  * @seekable: a #GSeekable.
30450  *
30451  * Tests if the stream can be truncated.
30452  *
30453  * Returns: %TRUE if the stream can be truncated, %FALSE otherwise.
30454  */
30455
30456
30457 /**
30458  * g_seekable_seek:
30459  * @seekable: a #GSeekable.
30460  * @offset: a #goffset.
30461  * @type: a #GSeekType.
30462  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
30463  * @error: a #GError location to store the error occuring, or %NULL to ignore.
30464  *
30465  * Seeks in the stream by the given @offset, modified by @type.
30466  *
30467  * If @cancellable is not %NULL, then the operation can be cancelled by
30468  * triggering the cancellable object from another thread. If the operation
30469  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
30470  *
30471  * has occurred, this function will return %FALSE and set @error
30472  * appropriately if present.
30473  *
30474  * Returns: %TRUE if successful. If an error
30475  */
30476
30477
30478 /**
30479  * g_seekable_tell:
30480  * @seekable: a #GSeekable.
30481  *
30482  * Tells the current position within the stream.
30483  *
30484  * Returns: the offset from the beginning of the buffer.
30485  */
30486
30487
30488 /**
30489  * g_seekable_truncate:
30490  * @seekable: a #GSeekable.
30491  * @offset: a #goffset.
30492  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
30493  * @error: a #GError location to store the error occuring, or %NULL to ignore.
30494  *
30495  * Truncates a stream with a given #offset.
30496  *
30497  * If @cancellable is not %NULL, then the operation can be cancelled by
30498  * triggering the cancellable object from another thread. If the operation
30499  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
30500  * operation was partially finished when the operation was cancelled the
30501  * partial result will be returned, without an error.
30502  *
30503  * has occurred, this function will return %FALSE and set @error
30504  * appropriately if present.
30505  *
30506  * Virtual: truncate_fn
30507  * Returns: %TRUE if successful. If an error
30508  */
30509
30510
30511 /**
30512  * g_settings_apply:
30513  * @settings: a #GSettings instance
30514  *
30515  * Applies any changes that have been made to the settings.  This
30516  * function does nothing unless @settings is in 'delay-apply' mode;
30517  * see g_settings_delay().  In the normal case settings are always
30518  * applied immediately.
30519  */
30520
30521
30522 /**
30523  * g_settings_backend_changed:
30524  * @backend: a #GSettingsBackend implementation
30525  * @key: the name of the key
30526  * @origin_tag: the origin tag
30527  *
30528  * Signals that a single key has possibly changed.  Backend
30529  * implementations should call this if a key has possibly changed its
30530  * value.
30531  *
30532  * @key must be a valid key (ie starting with a slash, not containing
30533  * '//', and not ending with a slash).
30534  *
30535  * The implementation must call this function during any call to
30536  * g_settings_backend_write(), before the call returns (except in the
30537  * case that no keys are actually changed and it cares to detect this
30538  * fact).  It may not rely on the existence of a mainloop for
30539  * dispatching the signal later.
30540  *
30541  * The implementation may call this function at any other time it likes
30542  * in response to other events (such as changes occuring outside of the
30543  * program).  These calls may originate from a mainloop or may originate
30544  * in response to any other action (including from calls to
30545  * g_settings_backend_write()).
30546  *
30547  * In the case that this call is in response to a call to
30548  * g_settings_backend_write() then @origin_tag must be set to the same
30549  * value that was passed to that call.
30550  *
30551  * Since: 2.26
30552  */
30553
30554
30555 /**
30556  * g_settings_backend_changed_tree:
30557  * @backend: a #GSettingsBackend implementation
30558  * @tree: a #GTree containing the changes
30559  * @origin_tag: the origin tag
30560  *
30561  * This call is a convenience wrapper.  It gets the list of changes from
30562  * @tree, computes the longest common prefix and calls
30563  * g_settings_backend_changed().
30564  *
30565  * Since: 2.26
30566  */
30567
30568
30569 /**
30570  * g_settings_backend_flatten_tree:
30571  * @tree: a #GTree containing the changes
30572  * @path: (out): the location to save the path
30573  * @keys: (out) (transfer container) (array zero-terminated=1): the location to save the relative keys
30574  * @values: (out) (allow-none) (transfer container) (array zero-terminated=1):  the location to save the values, or %NULL
30575  *
30576  * Calculate the longest common prefix of all keys in a tree and write
30577  * out an array of the key names relative to that prefix and,
30578  * optionally, the value to store at each of those keys.
30579  *
30580  * You must free the value returned in @path, @keys and @values using
30581  * g_free().  You should not attempt to free or unref the contents of
30582  * @keys or @values.
30583  *
30584  * Since: 2.26
30585  */
30586
30587
30588 /**
30589  * g_settings_backend_get_default:
30590  * @returns: (transfer full): the default #GSettingsBackend
30591  *
30592  * Returns the default #GSettingsBackend. It is possible to override
30593  * the default by setting the <envar>GSETTINGS_BACKEND</envar>
30594  * environment variable to the name of a settings backend.
30595  *
30596  * The user gets a reference to the backend.
30597  *
30598  * Since: 2.28
30599  */
30600
30601
30602 /**
30603  * g_settings_backend_keys_changed:
30604  * @backend: a #GSettingsBackend implementation
30605  * @path: the path containing the changes
30606  * @items: (array zero-terminated=1): the %NULL-terminated list of changed keys
30607  * @origin_tag: the origin tag
30608  *
30609  * Signals that a list of keys have possibly changed.  Backend
30610  * implementations should call this if keys have possibly changed their
30611  * values.
30612  *
30613  * @path must be a valid path (ie starting and ending with a slash and
30614  * not containing '//').  Each string in @items must form a valid key
30615  * name when @path is prefixed to it (ie: each item must not start or
30616  * end with '/' and must not contain '//').
30617  *
30618  * The meaning of this signal is that any of the key names resulting
30619  * from the contatenation of @path with each item in @items may have
30620  * changed.
30621  *
30622  * The same rules for when notifications must occur apply as per
30623  * g_settings_backend_changed().  These two calls can be used
30624  * interchangeably if exactly one item has changed (although in that
30625  * case g_settings_backend_changed() is definitely preferred).
30626  *
30627  * For efficiency reasons, the implementation should strive for @path to
30628  * be as long as possible (ie: the longest common prefix of all of the
30629  * keys that were changed) but this is not strictly required.
30630  *
30631  * Since: 2.26
30632  */
30633
30634
30635 /**
30636  * g_settings_backend_path_changed:
30637  * @backend: a #GSettingsBackend implementation
30638  * @path: the path containing the changes
30639  * @origin_tag: the origin tag
30640  *
30641  * Signals that all keys below a given path may have possibly changed.
30642  * Backend implementations should call this if an entire path of keys
30643  * have possibly changed their values.
30644  *
30645  * @path must be a valid path (ie starting and ending with a slash and
30646  * not containing '//').
30647  *
30648  * The meaning of this signal is that any of the key which has a name
30649  * starting with @path may have changed.
30650  *
30651  * The same rules for when notifications must occur apply as per
30652  * g_settings_backend_changed().  This call might be an appropriate
30653  * reasponse to a 'reset' call but implementations are also free to
30654  * explicitly list the keys that were affected by that call if they can
30655  * easily do so.
30656  *
30657  * For efficiency reasons, the implementation should strive for @path to
30658  * be as long as possible (ie: the longest common prefix of all of the
30659  * keys that were changed) but this is not strictly required.  As an
30660  * example, if this function is called with the path of "/" then every
30661  * single key in the application will be notified of a possible change.
30662  *
30663  * Since: 2.26
30664  */
30665
30666
30667 /**
30668  * g_settings_backend_path_writable_changed:
30669  * @backend: a #GSettingsBackend implementation
30670  * @path: the name of the path
30671  *
30672  * Signals that the writability of all keys below a given path may have
30673  * changed.
30674  *
30675  * Since GSettings performs no locking operations for itself, this call
30676  * will always be made in response to external events.
30677  *
30678  * Since: 2.26
30679  */
30680
30681
30682 /**
30683  * g_settings_backend_writable_changed:
30684  * @backend: a #GSettingsBackend implementation
30685  * @key: the name of the key
30686  *
30687  * Signals that the writability of a single key has possibly changed.
30688  *
30689  * Since GSettings performs no locking operations for itself, this call
30690  * will always be made in response to external events.
30691  *
30692  * Since: 2.26
30693  */
30694
30695
30696 /**
30697  * g_settings_bind:
30698  * @settings: a #GSettings object
30699  * @key: the key to bind
30700  * @object: (type GObject.Object): a #GObject
30701  * @property: the name of the property to bind
30702  * @flags: flags for the binding
30703  *
30704  * Create a binding between the @key in the @settings object
30705  * and the property @property of @object.
30706  *
30707  * The binding uses the default GIO mapping functions to map
30708  * between the settings and property values. These functions
30709  * handle booleans, numeric types and string types in a
30710  * straightforward way. Use g_settings_bind_with_mapping() if
30711  * you need a custom mapping, or map between types that are not
30712  * supported by the default mapping functions.
30713  *
30714  * Unless the @flags include %G_SETTINGS_BIND_NO_SENSITIVITY, this
30715  * function also establishes a binding between the writability of
30716  * @key and the "sensitive" property of @object (if @object has
30717  * a boolean property by that name). See g_settings_bind_writable()
30718  * for more details about writable bindings.
30719  *
30720  * Note that the lifecycle of the binding is tied to the object,
30721  * and that you can have only one binding per object property.
30722  * If you bind the same property twice on the same object, the second
30723  * binding overrides the first one.
30724  *
30725  * Since: 2.26
30726  */
30727
30728
30729 /**
30730  * g_settings_bind_with_mapping: (skip)
30731  * @settings: a #GSettings object
30732  * @key: the key to bind
30733  * @object: (type GObject.Object): a #GObject
30734  * @property: the name of the property to bind
30735  * @flags: flags for the binding
30736  * @get_mapping: a function that gets called to convert values from @settings to @object, or %NULL to use the default GIO mapping
30737  * @set_mapping: a function that gets called to convert values from @object to @settings, or %NULL to use the default GIO mapping
30738  * @user_data: data that gets passed to @get_mapping and @set_mapping
30739  * @destroy: #GDestroyNotify function for @user_data
30740  *
30741  * Create a binding between the @key in the @settings object
30742  * and the property @property of @object.
30743  *
30744  * The binding uses the provided mapping functions to map between
30745  * settings and property values.
30746  *
30747  * Note that the lifecycle of the binding is tied to the object,
30748  * and that you can have only one binding per object property.
30749  * If you bind the same property twice on the same object, the second
30750  * binding overrides the first one.
30751  *
30752  * Since: 2.26
30753  */
30754
30755
30756 /**
30757  * g_settings_bind_writable:
30758  * @settings: a #GSettings object
30759  * @key: the key to bind
30760  * @object: (type GObject.Object): a #GObject
30761  * @property: the name of a boolean property to bind
30762  * @inverted: whether to 'invert' the value
30763  *
30764  * Create a binding between the writability of @key in the
30765  * @settings object and the property @property of @object.
30766  * The property must be boolean; "sensitive" or "visible"
30767  * properties of widgets are the most likely candidates.
30768  *
30769  * Writable bindings are always uni-directional; changes of the
30770  * writability of the setting will be propagated to the object
30771  * property, not the other way.
30772  *
30773  * When the @inverted argument is %TRUE, the binding inverts the
30774  * value as it passes from the setting to the object, i.e. @property
30775  * will be set to %TRUE if the key is <emphasis>not</emphasis>
30776  * writable.
30777  *
30778  * Note that the lifecycle of the binding is tied to the object,
30779  * and that you can have only one binding per object property.
30780  * If you bind the same property twice on the same object, the second
30781  * binding overrides the first one.
30782  *
30783  * Since: 2.26
30784  */
30785
30786
30787 /**
30788  * g_settings_delay:
30789  * @settings: a #GSettings object
30790  *
30791  * Changes the #GSettings object into 'delay-apply' mode. In this
30792  * mode, changes to @settings are not immediately propagated to the
30793  * backend, but kept locally until g_settings_apply() is called.
30794  *
30795  * Since: 2.26
30796  */
30797
30798
30799 /**
30800  * g_settings_get:
30801  * @settings: a #GSettings object
30802  * @key: the key to get the value for
30803  * @format: a #GVariant format string
30804  * @...: arguments as per @format
30805  *
30806  * Gets the value that is stored at @key in @settings.
30807  *
30808  * A convenience function that combines g_settings_get_value() with
30809  * g_variant_get().
30810  *
30811  * It is a programmer error to give a @key that isn't contained in the
30812  * schema for @settings or for the #GVariantType of @format to mismatch
30813  * the type given in the schema.
30814  *
30815  * Since: 2.26
30816  */
30817
30818
30819 /**
30820  * g_settings_get_boolean:
30821  * @settings: a #GSettings object
30822  * @key: the key to get the value for
30823  * @returns: a boolean
30824  *
30825  * Gets the value that is stored at @key in @settings.
30826  *
30827  * A convenience variant of g_settings_get() for booleans.
30828  *
30829  * It is a programmer error to give a @key that isn't specified as
30830  * having a boolean type in the schema for @settings.
30831  *
30832  * Since: 2.26
30833  */
30834
30835
30836 /**
30837  * g_settings_get_child:
30838  * @settings: a #GSettings object
30839  * @name: the name of the 'child' schema
30840  * @returns: (transfer full): a 'child' settings object
30841  *
30842  * Creates a 'child' settings object which has a base path of
30843  * <replaceable>base-path</replaceable>/@name, where
30844  * <replaceable>base-path</replaceable> is the base path of @settings.
30845  *
30846  * The schema for the child settings object must have been declared
30847  * in the schema of @settings using a <tag class="starttag">child</tag> element.
30848  *
30849  * Since: 2.26
30850  */
30851
30852
30853 /**
30854  * g_settings_get_double:
30855  * @settings: a #GSettings object
30856  * @key: the key to get the value for
30857  * @returns: a double
30858  *
30859  * Gets the value that is stored at @key in @settings.
30860  *
30861  * A convenience variant of g_settings_get() for doubles.
30862  *
30863  * It is a programmer error to give a @key that isn't specified as
30864  * having a 'double' type in the schema for @settings.
30865  *
30866  * Since: 2.26
30867  */
30868
30869
30870 /**
30871  * g_settings_get_enum:
30872  * @settings: a #GSettings object
30873  * @key: the key to get the value for
30874  * @returns: the enum value
30875  *
30876  * Gets the value that is stored in @settings for @key and converts it
30877  * to the enum value that it represents.
30878  *
30879  * In order to use this function the type of the value must be a string
30880  * and it must be marked in the schema file as an enumerated type.
30881  *
30882  * It is a programmer error to give a @key that isn't contained in the
30883  * schema for @settings or is not marked as an enumerated type.
30884  *
30885  * If the value stored in the configuration database is not a valid
30886  * value for the enumerated type then this function will return the
30887  * default value.
30888  *
30889  * Since: 2.26
30890  */
30891
30892
30893 /**
30894  * g_settings_get_flags:
30895  * @settings: a #GSettings object
30896  * @key: the key to get the value for
30897  * @returns: the flags value
30898  *
30899  * Gets the value that is stored in @settings for @key and converts it
30900  * to the flags value that it represents.
30901  *
30902  * In order to use this function the type of the value must be an array
30903  * of strings and it must be marked in the schema file as an flags type.
30904  *
30905  * It is a programmer error to give a @key that isn't contained in the
30906  * schema for @settings or is not marked as a flags type.
30907  *
30908  * If the value stored in the configuration database is not a valid
30909  * value for the flags type then this function will return the default
30910  * value.
30911  *
30912  * Since: 2.26
30913  */
30914
30915
30916 /**
30917  * g_settings_get_has_unapplied:
30918  * @settings: a #GSettings object
30919  * @returns: %TRUE if @settings has unapplied changes
30920  *
30921  * Returns whether the #GSettings object has any unapplied
30922  * changes.  This can only be the case if it is in 'delayed-apply' mode.
30923  *
30924  * Since: 2.26
30925  */
30926
30927
30928 /**
30929  * g_settings_get_int:
30930  * @settings: a #GSettings object
30931  * @key: the key to get the value for
30932  * @returns: an integer
30933  *
30934  * Gets the value that is stored at @key in @settings.
30935  *
30936  * A convenience variant of g_settings_get() for 32-bit integers.
30937  *
30938  * It is a programmer error to give a @key that isn't specified as
30939  * having a int32 type in the schema for @settings.
30940  *
30941  * Since: 2.26
30942  */
30943
30944
30945 /**
30946  * g_settings_get_mapped:
30947  * @settings: a #GSettings object
30948  * @key: the key to get the value for
30949  * @mapping: (scope call): the function to map the value in the settings database to the value used by the application
30950  * @user_data: user data for @mapping
30951  * @returns: (transfer full): the result, which may be %NULL
30952  *
30953  * Gets the value that is stored at @key in @settings, subject to
30954  * application-level validation/mapping.
30955  *
30956  * You should use this function when the application needs to perform
30957  * some processing on the value of the key (for example, parsing).  The
30958  * @mapping function performs that processing.  If the function
30959  * indicates that the processing was unsuccessful (due to a parse error,
30960  * for example) then the mapping is tried again with another value.
30961  * This allows a robust 'fall back to defaults' behaviour to be
30962  * implemented somewhat automatically.
30963  *
30964  * The first value that is tried is the user's setting for the key.  If
30965  * the mapping function fails to map this value, other values may be
30966  * tried in an unspecified order (system or site defaults, translated
30967  * schema default values, untranslated schema default values, etc).
30968  *
30969  * If the mapping function fails for all possible values, one additional
30970  * attempt is made: the mapping function is called with a %NULL value.
30971  * If the mapping function still indicates failure at this point then
30972  * the application will be aborted.
30973  *
30974  * The result parameter for the @mapping function is pointed to a
30975  * #gpointer which is initially set to %NULL.  The same pointer is given
30976  * to each invocation of @mapping.  The final value of that #gpointer is
30977  * what is returned by this function.  %NULL is valid; it is returned
30978  * just as any other value would be.
30979  */
30980
30981
30982 /**
30983  * g_settings_get_range:
30984  * @settings: a #GSettings
30985  * @key: the key to query the range of
30986  * @returns: a #GVariant describing the range
30987  *
30988  * Queries the range of a key.
30989  *
30990  * This function will return a #GVariant that fully describes the range
30991  * of values that are valid for @key.
30992  *
30993  * The type of #GVariant returned is <literal>(sv)</literal>.  The
30994  * string describes the type of range restriction in effect.  The type
30995  * and meaning of the value contained in the variant depends on the
30996  * string.
30997  *
30998  * If the string is <literal>'type'</literal> then the variant contains
30999  * an empty array.  The element type of that empty array is the expected
31000  * type of value and all values of that type are valid.
31001  *
31002  * If the string is <literal>'enum'</literal> then the variant contains
31003  * an array enumerating the possible values.  Each item in the array is
31004  * a possible valid value and no other values are valid.
31005  *
31006  * If the string is <literal>'flags'</literal> then the variant contains
31007  * an array.  Each item in the array is a value that may appear zero or
31008  * one times in an array to be used as the value for this key.  For
31009  * example, if the variant contained the array <literal>['x',
31010  * 'y']</literal> then the valid values for the key would be
31011  * <literal>[]</literal>, <literal>['x']</literal>,
31012  * <literal>['y']</literal>, <literal>['x', 'y']</literal> and
31013  * <literal>['y', 'x']</literal>.
31014  *
31015  * Finally, if the string is <literal>'range'</literal> then the variant
31016  * contains a pair of like-typed values -- the minimum and maximum
31017  * permissible values for this key.
31018  *
31019  * This information should not be used by normal programs.  It is
31020  * considered to be a hint for introspection purposes.  Normal programs
31021  * should already know what is permitted by their own schema.  The
31022  * format may change in any way in the future -- but particularly, new
31023  * forms may be added to the possibilities described above.
31024  *
31025  * It is a programmer error to give a @key that isn't contained in the
31026  * schema for @settings.
31027  *
31028  * You should free the returned value with g_variant_unref() when it is
31029  * no longer needed.
31030  *
31031  * Since: 2.28
31032  */
31033
31034
31035 /**
31036  * g_settings_get_string:
31037  * @settings: a #GSettings object
31038  * @key: the key to get the value for
31039  * @returns: a newly-allocated string
31040  *
31041  * Gets the value that is stored at @key in @settings.
31042  *
31043  * A convenience variant of g_settings_get() for strings.
31044  *
31045  * It is a programmer error to give a @key that isn't specified as
31046  * having a string type in the schema for @settings.
31047  *
31048  * Since: 2.26
31049  */
31050
31051
31052 /**
31053  * g_settings_get_strv:
31054  * @settings: a #GSettings object
31055  * @key: the key to get the value for
31056  * @returns: (array zero-terminated=1) (transfer full): a newly-allocated, %NULL-terminated array of strings, the value that is stored at @key in @settings.
31057  *
31058  * A convenience variant of g_settings_get() for string arrays.
31059  *
31060  * It is a programmer error to give a @key that isn't specified as
31061  * having an array of strings type in the schema for @settings.
31062  *
31063  * Since: 2.26
31064  */
31065
31066
31067 /**
31068  * g_settings_get_uint:
31069  * @settings: a #GSettings object
31070  * @key: the key to get the value for
31071  * @returns: an unsigned integer
31072  *
31073  * Gets the value that is stored at @key in @settings.
31074  *
31075  * A convenience variant of g_settings_get() for 32-bit unsigned
31076  * integers.
31077  *
31078  * It is a programmer error to give a @key that isn't specified as
31079  * having a uint32 type in the schema for @settings.
31080  *
31081  * Since: 2.30
31082  */
31083
31084
31085 /**
31086  * g_settings_get_value:
31087  * @settings: a #GSettings object
31088  * @key: the key to get the value for
31089  * @returns: a new #GVariant
31090  *
31091  * Gets the value that is stored in @settings for @key.
31092  *
31093  * It is a programmer error to give a @key that isn't contained in the
31094  * schema for @settings.
31095  *
31096  * Since: 2.26
31097  */
31098
31099
31100 /**
31101  * g_settings_is_writable:
31102  * @settings: a #GSettings object
31103  * @name: the name of a key
31104  * @returns: %TRUE if the key @name is writable
31105  *
31106  * Finds out if a key can be written or not
31107  *
31108  * Since: 2.26
31109  */
31110
31111
31112 /**
31113  * g_settings_list_children:
31114  * @settings: a #GSettings object
31115  * @returns: (transfer full) (element-type utf8): a list of the children on @settings
31116  *
31117  * Gets the list of children on @settings.
31118  *
31119  * The list is exactly the list of strings for which it is not an error
31120  * to call g_settings_get_child().
31121  *
31122  * For GSettings objects that are lists, this value can change at any
31123  * time and you should connect to the "children-changed" signal to watch
31124  * for those changes.  Note that there is a race condition here: you may
31125  * request a child after listing it only for it to have been destroyed
31126  * in the meantime.  For this reason, g_settings_get_child() may return
31127  * %NULL even for a child that was listed by this function.
31128  *
31129  * For GSettings objects that are not lists, you should probably not be
31130  * calling this function from "normal" code (since you should already
31131  * know what children are in your schema).  This function may still be
31132  * useful there for introspection reasons, however.
31133  *
31134  * You should free the return value with g_strfreev() when you are done
31135  * with it.
31136  */
31137
31138
31139 /**
31140  * g_settings_list_keys:
31141  * @settings: a #GSettings object
31142  * @returns: (transfer full) (element-type utf8): a list of the keys on @settings
31143  *
31144  * Introspects the list of keys on @settings.
31145  *
31146  * You should probably not be calling this function from "normal" code
31147  * (since you should already know what keys are in your schema).  This
31148  * function is intended for introspection reasons.
31149  *
31150  * You should free the return value with g_strfreev() when you are done
31151  * with it.
31152  */
31153
31154
31155 /**
31156  * g_settings_list_relocatable_schemas:
31157  *
31158  * Gets a list of the relocatable #GSettings schemas installed on the
31159  * system.  These are schemas that do not provide their own path.  It is
31160  * usual to instantiate these schemas directly, but if you want to you
31161  * can use g_settings_new_with_path() to specify the path.
31162  *
31163  * The output of this function, tTaken together with the output of
31164  * g_settings_list_schemas() represents the complete list of all
31165  * installed schemas.
31166  *
31167  * #GSettings schemas that are available.  The list must not be
31168  * modified or freed.
31169  *
31170  * Returns: (element-type utf8) (transfer none): a list of relocatable
31171  * Since: 2.28
31172  */
31173
31174
31175 /**
31176  * g_settings_list_schemas:
31177  *
31178  * Gets a list of the #GSettings schemas installed on the system.  The
31179  * returned list is exactly the list of schemas for which you may call
31180  * g_settings_new() without adverse effects.
31181  *
31182  * This function does not list the schemas that do not provide their own
31183  * paths (ie: schemas for which you must use
31184  * g_settings_new_with_path()).  See
31185  * g_settings_list_relocatable_schemas() for that.
31186  *
31187  * schemas that are available.  The list must not be modified or
31188  * freed.
31189  *
31190  * Returns: (element-type utf8) (transfer none): a list of #GSettings
31191  * Since: 2.26
31192  */
31193
31194
31195 /**
31196  * g_settings_new:
31197  * @schema: the name of the schema
31198  * @returns: a new #GSettings object
31199  *
31200  * Creates a new #GSettings object with a given schema.
31201  *
31202  * Signals on the newly created #GSettings object will be dispatched
31203  * via the thread-default #GMainContext in effect at the time of the
31204  * call to g_settings_new().  The new #GSettings will hold a reference
31205  * on the context.  See g_main_context_push_thread_default().
31206  *
31207  * Since: 2.26
31208  */
31209
31210
31211 /**
31212  * g_settings_new_with_backend:
31213  * @schema: the name of the schema
31214  * @backend: the #GSettingsBackend to use
31215  * @returns: a new #GSettings object
31216  *
31217  * Creates a new #GSettings object with a given schema and backend.
31218  *
31219  * Creating a #GSettings object with a different backend allows accessing
31220  * settings from a database other than the usual one. For example, it may make
31221  * sense to pass a backend corresponding to the "defaults" settings database on
31222  * the system to get a settings object that modifies the system default
31223  * settings instead of the settings for this user.
31224  *
31225  * Since: 2.26
31226  */
31227
31228
31229 /**
31230  * g_settings_new_with_backend_and_path:
31231  * @schema: the name of the schema
31232  * @backend: the #GSettingsBackend to use
31233  * @path: the path to use
31234  * @returns: a new #GSettings object
31235  *
31236  * Creates a new #GSettings object with a given schema, backend and
31237  * path.
31238  *
31239  * This is a mix of g_settings_new_with_backend() and
31240  * g_settings_new_with_path().
31241  *
31242  * Since: 2.26
31243  */
31244
31245
31246 /**
31247  * g_settings_new_with_path:
31248  * @schema: the name of the schema
31249  * @path: the path to use
31250  * @returns: a new #GSettings object
31251  *
31252  * Creates a new #GSettings object with a given schema and path.
31253  *
31254  * You only need to do this if you want to directly create a settings
31255  * object with a schema that doesn't have a specified path of its own.
31256  * That's quite rare.
31257  *
31258  * It is a programmer error to call this function for a schema that
31259  * has an explicitly specified path.
31260  *
31261  * Since: 2.26
31262  */
31263
31264
31265 /**
31266  * g_settings_range_check:
31267  * @settings: a #GSettings
31268  * @key: the key to check
31269  * @value: the value to check
31270  * @returns: %TRUE if @value is valid for @key
31271  *
31272  * Checks if the given @value is of the correct type and within the
31273  * permitted range for @key.
31274  *
31275  * This API is not intended to be used by normal programs -- they should
31276  * already know what is permitted by their own schemas.  This API is
31277  * meant to be used by programs such as editors or commandline tools.
31278  *
31279  * It is a programmer error to give a @key that isn't contained in the
31280  * schema for @settings.
31281  *
31282  * Since: 2.28
31283  */
31284
31285
31286 /**
31287  * g_settings_reset:
31288  * @settings: a #GSettings object
31289  * @key: the name of a key
31290  *
31291  * Resets @key to its default value.
31292  *
31293  * This call resets the key, as much as possible, to its default value.
31294  * That might the value specified in the schema or the one set by the
31295  * administrator.
31296  */
31297
31298
31299 /**
31300  * g_settings_revert:
31301  * @settings: a #GSettings instance
31302  *
31303  * Reverts all non-applied changes to the settings.  This function
31304  * does nothing unless @settings is in 'delay-apply' mode; see
31305  * g_settings_delay().  In the normal case settings are always applied
31306  * immediately.
31307  *
31308  * Change notifications will be emitted for affected keys.
31309  */
31310
31311
31312 /**
31313  * g_settings_set:
31314  * @settings: a #GSettings object
31315  * @key: the name of the key to set
31316  * @format: a #GVariant format string
31317  * @...: arguments as per @format
31318  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
31319  *
31320  * Sets @key in @settings to @value.
31321  *
31322  * A convenience function that combines g_settings_set_value() with
31323  * g_variant_new().
31324  *
31325  * It is a programmer error to give a @key that isn't contained in the
31326  * schema for @settings or for the #GVariantType of @format to mismatch
31327  * the type given in the schema.
31328  *
31329  * Since: 2.26
31330  */
31331
31332
31333 /**
31334  * g_settings_set_boolean:
31335  * @settings: a #GSettings object
31336  * @key: the name of the key to set
31337  * @value: the value to set it to
31338  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
31339  *
31340  * Sets @key in @settings to @value.
31341  *
31342  * A convenience variant of g_settings_set() for booleans.
31343  *
31344  * It is a programmer error to give a @key that isn't specified as
31345  * having a boolean type in the schema for @settings.
31346  *
31347  * Since: 2.26
31348  */
31349
31350
31351 /**
31352  * g_settings_set_double:
31353  * @settings: a #GSettings object
31354  * @key: the name of the key to set
31355  * @value: the value to set it to
31356  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
31357  *
31358  * Sets @key in @settings to @value.
31359  *
31360  * A convenience variant of g_settings_set() for doubles.
31361  *
31362  * It is a programmer error to give a @key that isn't specified as
31363  * having a 'double' type in the schema for @settings.
31364  *
31365  * Since: 2.26
31366  */
31367
31368
31369 /**
31370  * g_settings_set_enum:
31371  * @settings: a #GSettings object
31372  * @key: a key, within @settings
31373  * @value: an enumerated value
31374  * @returns: %TRUE, if the set succeeds
31375  *
31376  * Looks up the enumerated type nick for @value and writes it to @key,
31377  * within @settings.
31378  *
31379  * It is a programmer error to give a @key that isn't contained in the
31380  * schema for @settings or is not marked as an enumerated type, or for
31381  * @value not to be a valid value for the named type.
31382  *
31383  * After performing the write, accessing @key directly with
31384  * g_settings_get_string() will return the 'nick' associated with
31385  * @value.
31386  */
31387
31388
31389 /**
31390  * g_settings_set_flags:
31391  * @settings: a #GSettings object
31392  * @key: a key, within @settings
31393  * @value: a flags value
31394  * @returns: %TRUE, if the set succeeds
31395  *
31396  * Looks up the flags type nicks for the bits specified by @value, puts
31397  * them in an array of strings and writes the array to @key, withing
31398  * @settings.
31399  *
31400  * It is a programmer error to give a @key that isn't contained in the
31401  * schema for @settings or is not marked as a flags type, or for @value
31402  * to contain any bits that are not value for the named type.
31403  *
31404  * After performing the write, accessing @key directly with
31405  * g_settings_get_strv() will return an array of 'nicks'; one for each
31406  * bit in @value.
31407  */
31408
31409
31410 /**
31411  * g_settings_set_int:
31412  * @settings: a #GSettings object
31413  * @key: the name of the key to set
31414  * @value: the value to set it to
31415  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
31416  *
31417  * Sets @key in @settings to @value.
31418  *
31419  * A convenience variant of g_settings_set() for 32-bit integers.
31420  *
31421  * It is a programmer error to give a @key that isn't specified as
31422  * having a int32 type in the schema for @settings.
31423  *
31424  * Since: 2.26
31425  */
31426
31427
31428 /**
31429  * g_settings_set_string:
31430  * @settings: a #GSettings object
31431  * @key: the name of the key to set
31432  * @value: the value to set it to
31433  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
31434  *
31435  * Sets @key in @settings to @value.
31436  *
31437  * A convenience variant of g_settings_set() for strings.
31438  *
31439  * It is a programmer error to give a @key that isn't specified as
31440  * having a string type in the schema for @settings.
31441  *
31442  * Since: 2.26
31443  */
31444
31445
31446 /**
31447  * g_settings_set_strv:
31448  * @settings: a #GSettings object
31449  * @key: the name of the key to set
31450  * @value: (allow-none) (array zero-terminated=1): the value to set it to, or %NULL
31451  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
31452  *
31453  * Sets @key in @settings to @value.
31454  *
31455  * A convenience variant of g_settings_set() for string arrays.  If
31456  * @value is %NULL, then @key is set to be the empty array.
31457  *
31458  * It is a programmer error to give a @key that isn't specified as
31459  * having an array of strings type in the schema for @settings.
31460  *
31461  * Since: 2.26
31462  */
31463
31464
31465 /**
31466  * g_settings_set_uint:
31467  * @settings: a #GSettings object
31468  * @key: the name of the key to set
31469  * @value: the value to set it to
31470  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
31471  *
31472  * Sets @key in @settings to @value.
31473  *
31474  * A convenience variant of g_settings_set() for 32-bit unsigned
31475  * integers.
31476  *
31477  * It is a programmer error to give a @key that isn't specified as
31478  * having a uint32 type in the schema for @settings.
31479  *
31480  * Since: 2.30
31481  */
31482
31483
31484 /**
31485  * g_settings_set_value:
31486  * @settings: a #GSettings object
31487  * @key: the name of the key to set
31488  * @value: a #GVariant of the correct type
31489  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
31490  *
31491  * Sets @key in @settings to @value.
31492  *
31493  * It is a programmer error to give a @key that isn't contained in the
31494  * schema for @settings or for @value to have the incorrect type, per
31495  * the schema.
31496  *
31497  * If @value is floating then this function consumes the reference.
31498  *
31499  * Since: 2.26
31500  */
31501
31502
31503 /**
31504  * g_settings_sync:
31505  *
31506  * Ensures that all pending operations for the given are complete for
31507  * the default backend.
31508  *
31509  * Writes made to a #GSettings are handled asynchronously.  For this
31510  * reason, it is very unlikely that the changes have it to disk by the
31511  * time g_settings_set() returns.
31512  *
31513  * This call will block until all of the writes have made it to the
31514  * backend.  Since the mainloop is not running, no change notifications
31515  * will be dispatched during this call (but some may be queued by the
31516  * time the call is done).
31517  */
31518
31519
31520 /**
31521  * g_settings_unbind:
31522  * @object: the object
31523  * @property: the property whose binding is removed
31524  *
31525  * Removes an existing binding for @property on @object.
31526  *
31527  * Note that bindings are automatically removed when the
31528  * object is finalized, so it is rarely necessary to call this
31529  * function.
31530  *
31531  * Since: 2.26
31532  */
31533
31534
31535 /**
31536  * g_signal_connect:
31537  * @instance: the instance to connect to.
31538  * @detailed_signal: a string of the form "signal-name::detail".
31539  * @c_handler: the #GCallback to connect.
31540  * @data: data to pass to @c_handler calls.
31541  *
31542  * Connects a #GCallback function to a signal for a particular object.
31543  *
31544  * The handler will be called before the default handler of the signal.
31545  *
31546  * Returns: the handler id
31547  */
31548
31549
31550 /**
31551  * g_signal_connect_after:
31552  * @instance: the instance to connect to.
31553  * @detailed_signal: a string of the form "signal-name::detail".
31554  * @c_handler: the #GCallback to connect.
31555  * @data: data to pass to @c_handler calls.
31556  *
31557  * Connects a #GCallback function to a signal for a particular object.
31558  *
31559  * The handler will be called after the default handler of the signal.
31560  *
31561  * Returns: the handler id
31562  */
31563
31564
31565 /**
31566  * g_signal_connect_swapped:
31567  * @instance: the instance to connect to.
31568  * @detailed_signal: a string of the form "signal-name::detail".
31569  * @c_handler: the #GCallback to connect.
31570  * @data: data to pass to @c_handler calls.
31571  *
31572  * Connects a #GCallback function to a signal for a particular object.
31573  *
31574  * The instance on which the signal is emitted and @data will be swapped when
31575  * calling the handler.
31576  *
31577  * Returns: the handler id
31578  */
31579
31580
31581 /**
31582  * g_signal_handlers_block_by_func:
31583  * @instance: The instance to block handlers from.
31584  * @func: The C closure callback of the handlers (useless for non-C closures).
31585  * @data: The closure data of the handlers' closures.
31586  *
31587  * Blocks all handlers on an instance that match @func and @data.
31588  *
31589  * Returns: The number of handlers that matched.
31590  */
31591
31592
31593 /**
31594  * g_signal_handlers_disconnect_by_func:
31595  * @instance: The instance to remove handlers from.
31596  * @func: The C closure callback of the handlers (useless for non-C closures).
31597  * @data: The closure data of the handlers' closures.
31598  *
31599  * Disconnects all handlers on an instance that match @func and @data.
31600  *
31601  * Returns: The number of handlers that matched.
31602  */
31603
31604
31605 /**
31606  * g_signal_handlers_unblock_by_func:
31607  * @instance: The instance to unblock handlers from.
31608  * @func: The C closure callback of the handlers (useless for non-C closures).
31609  * @data: The closure data of the handlers' closures.
31610  *
31611  * Unblocks all handlers on an instance that match @func and @data.
31612  *
31613  * Returns: The number of handlers that matched.
31614  */
31615
31616
31617 /**
31618  * g_simple_action_group_add_entries:
31619  * @simple: a #GSimpleActionGroup
31620  * @entries: a pointer to the first item in an array of #GActionEntry structs
31621  * @n_entries: the length of @entries, or -1
31622  * @user_data: the user data for signal connections
31623  *
31624  * A convenience function for creating multiple #GSimpleAction instances
31625  * and adding them to the action group.
31626  *
31627  * Each action is constructed as per one #GActionEntry.
31628  *
31629  * <example>
31630  * <title>Using g_simple_action_group_add_entries()</title>
31631  * <programlisting>
31632  * static void
31633  * activate_quit (GSimpleAction *simple,
31634  * GVariant      *parameter,
31635  * gpointer       user_data)
31636  * {
31637  * exit (0);
31638  * }
31639  *
31640  * static void
31641  * activate_print_string (GSimpleAction *simple,
31642  * GVariant      *parameter,
31643  * gpointer       user_data)
31644  * {
31645  * g_print ("%s\n", g_variant_get_string (parameter, NULL));
31646  * }
31647  *
31648  * static GActionGroup *
31649  * create_action_group (void)
31650  * {
31651  * const GActionEntry entries[] = {
31652  * { "quit",         activate_quit              },
31653  * { "print-string", activate_print_string, "s" }
31654  * };
31655  * GSimpleActionGroup *group;
31656  *
31657  * group = g_simple_action_group_new ();
31658  * g_simple_action_group_add_entries (group, entries, G_N_ELEMENTS (entries), NULL);
31659  *
31660  * return G_ACTION_GROUP (group);
31661  * }
31662  * </programlisting>
31663  * </example>
31664  *
31665  * Since: 2.30
31666  */
31667
31668
31669 /**
31670  * g_simple_action_group_insert:
31671  * @simple: a #GSimpleActionGroup
31672  * @action: a #GAction
31673  *
31674  * Adds an action to the action group.
31675  *
31676  * If the action group already contains an action with the same name as
31677  * @action then the old action is dropped from the group.
31678  *
31679  * The action group takes its own reference on @action.
31680  *
31681  * Since: 2.28
31682  */
31683
31684
31685 /**
31686  * g_simple_action_group_lookup:
31687  * @simple: a #GSimpleActionGroup
31688  * @action_name: the name of an action
31689  *
31690  * Looks up the action with the name @action_name in the group.
31691  *
31692  * If no such action exists, returns %NULL.
31693  *
31694  * Returns: (transfer none): a #GAction, or %NULL
31695  * Since: 2.28
31696  */
31697
31698
31699 /**
31700  * g_simple_action_group_new:
31701  *
31702  * Creates a new, empty, #GSimpleActionGroup.
31703  *
31704  * Returns: a new #GSimpleActionGroup
31705  * Since: 2.28
31706  */
31707
31708
31709 /**
31710  * g_simple_action_group_remove:
31711  * @simple: a #GSimpleActionGroup
31712  * @action_name: the name of the action
31713  *
31714  * Removes the named action from the action group.
31715  *
31716  * If no action of this name is in the group then nothing happens.
31717  *
31718  * Since: 2.28
31719  */
31720
31721
31722 /**
31723  * g_simple_action_new:
31724  * @name: the name of the action
31725  * @parameter_type: (allow-none): the type of parameter to the activate function
31726  *
31727  * Creates a new action.
31728  *
31729  * The created action is stateless.  See g_simple_action_new_stateful().
31730  *
31731  * Returns: a new #GSimpleAction
31732  * Since: 2.28
31733  */
31734
31735
31736 /**
31737  * g_simple_action_new_stateful:
31738  * @name: the name of the action
31739  * @parameter_type: (allow-none): the type of the parameter to the activate function
31740  * @state: the initial state of the action
31741  *
31742  * Creates a new stateful action.
31743  *
31744  * @state is the initial state of the action.  All future state values
31745  * must have the same #GVariantType as the initial state.
31746  *
31747  * If the @state GVariant is floating, it is consumed.
31748  *
31749  * Returns: a new #GSimpleAction
31750  * Since: 2.28
31751  */
31752
31753
31754 /**
31755  * g_simple_action_set_enabled:
31756  * @simple: a #GSimpleAction
31757  * @enabled: whether the action is enabled
31758  *
31759  * Sets the action as enabled or not.
31760  *
31761  * An action must be enabled in order to be activated or in order to
31762  * have its state changed from outside callers.
31763  *
31764  * This should only be called by the implementor of the action.  Users
31765  * of the action should not attempt to modify its enabled flag.
31766  *
31767  * Since: 2.28
31768  */
31769
31770
31771 /**
31772  * g_simple_action_set_state:
31773  * @simple: a #GSimpleAction
31774  * @value: the new #GVariant for the state
31775  *
31776  * Sets the state of the action.
31777  *
31778  * This directly updates the 'state' property to the given value.
31779  *
31780  * This should only be called by the implementor of the action.  Users
31781  * of the action should not attempt to directly modify the 'state'
31782  * property.  Instead, they should call g_action_change_state() to
31783  * request the change.
31784  *
31785  * Since: 2.30
31786  */
31787
31788
31789 /**
31790  * g_simple_async_report_error_in_idle: (skip)
31791  * @object: (allow-none): a #GObject, or %NULL.
31792  * @callback: a #GAsyncReadyCallback.
31793  * @user_data: user data passed to @callback.
31794  * @domain: a #GQuark containing the error domain (usually #G_IO_ERROR).
31795  * @code: a specific error code.
31796  * @format: a formatted error reporting string.
31797  * @...: a list of variables to fill in @format.
31798  *
31799  * Reports an error in an asynchronous function in an idle function by
31800  * directly setting the contents of the #GAsyncResult with the given error
31801  * information.
31802  */
31803
31804
31805 /**
31806  * g_simple_async_report_gerror_in_idle:
31807  * @object: (allow-none): a #GObject, or %NULL
31808  * @callback: (scope async): a #GAsyncReadyCallback.
31809  * @user_data: (closure): user data passed to @callback.
31810  * @error: the #GError to report
31811  *
31812  * Reports an error in an idle function. Similar to
31813  * g_simple_async_report_error_in_idle(), but takes a #GError rather
31814  * than building a new one.
31815  */
31816
31817
31818 /**
31819  * g_simple_async_report_take_gerror_in_idle: (skip)
31820  * @object: (allow-none): a #GObject, or %NULL
31821  * @callback: a #GAsyncReadyCallback.
31822  * @user_data: user data passed to @callback.
31823  * @error: the #GError to report
31824  *
31825  * Reports an error in an idle function. Similar to
31826  * g_simple_async_report_gerror_in_idle(), but takes over the caller's
31827  * ownership of @error, so the caller does not have to free it any more.
31828  *
31829  * Since: 2.28
31830  */
31831
31832
31833 /**
31834  * g_simple_async_result_complete:
31835  * @simple: a #GSimpleAsyncResult.
31836  *
31837  * Completes an asynchronous I/O job immediately. Must be called in
31838  * the thread where the asynchronous result was to be delivered, as it
31839  * invokes the callback directly. If you are in a different thread use
31840  * g_simple_async_result_complete_in_idle().
31841  *
31842  * Calling this function takes a reference to @simple for as long as
31843  * is needed to complete the call.
31844  */
31845
31846
31847 /**
31848  * g_simple_async_result_complete_in_idle:
31849  * @simple: a #GSimpleAsyncResult.
31850  *
31851  * Completes an asynchronous function in an idle handler in the <link
31852  * linkend="g-main-context-push-thread-default">thread-default main
31853  * loop</link> of the thread that @simple was initially created in.
31854  *
31855  * Calling this function takes a reference to @simple for as long as
31856  * is needed to complete the call.
31857  */
31858
31859
31860 /**
31861  * g_simple_async_result_get_op_res_gboolean:
31862  * @simple: a #GSimpleAsyncResult.
31863  *
31864  * Gets the operation result boolean from within the asynchronous result.
31865  *
31866  * if the operation's result was %FALSE.
31867  *
31868  * Returns: %TRUE if the operation's result was %TRUE, %FALSE
31869  */
31870
31871
31872 /**
31873  * g_simple_async_result_get_op_res_gpointer: (skip)
31874  * @simple: a #GSimpleAsyncResult.
31875  *
31876  * Gets a pointer result as returned by the asynchronous function.
31877  *
31878  * Returns: a pointer from the result.
31879  */
31880
31881
31882 /**
31883  * g_simple_async_result_get_op_res_gssize:
31884  * @simple: a #GSimpleAsyncResult.
31885  *
31886  * Gets a gssize from the asynchronous result.
31887  *
31888  * Returns: a gssize returned from the asynchronous function.
31889  */
31890
31891
31892 /**
31893  * g_simple_async_result_get_source_tag: (skip)
31894  * @simple: a #GSimpleAsyncResult.
31895  *
31896  * Gets the source tag for the #GSimpleAsyncResult.
31897  *
31898  * Returns: a #gpointer to the source object for the #GSimpleAsyncResult.
31899  */
31900
31901
31902 /**
31903  * g_simple_async_result_is_valid:
31904  * @result: the #GAsyncResult passed to the _finish function.
31905  * @source: the #GObject passed to the _finish function.
31906  * @source_tag: the asynchronous function.
31907  *
31908  * Ensures that the data passed to the _finish function of an async
31909  * operation is consistent.  Three checks are performed.
31910  *
31911  * First, @result is checked to ensure that it is really a
31912  * #GSimpleAsyncResult.  Second, @source is checked to ensure that it
31913  * matches the source object of @result.  Third, @source_tag is
31914  * checked to ensure that it is either %NULL (as it is when the result was
31915  * created by g_simple_async_report_error_in_idle() or
31916  * g_simple_async_report_gerror_in_idle()) or equal to the
31917  * @source_tag argument given to g_simple_async_result_new() (which, by
31918  * convention, is a pointer to the _async function corresponding to the
31919  * _finish function from which this function is called).
31920  *
31921  * Returns: #TRUE if all checks passed or #FALSE if any failed.
31922  * Since: 2.20
31923  */
31924
31925
31926 /**
31927  * g_simple_async_result_new:
31928  * @source_object: (allow-none): a #GObject, or %NULL.
31929  * @callback: (scope async): a #GAsyncReadyCallback.
31930  * @user_data: (closure): user data passed to @callback.
31931  * @source_tag: the asynchronous function.
31932  *
31933  * Creates a #GSimpleAsyncResult.
31934  *
31935  * Returns: a #GSimpleAsyncResult.
31936  */
31937
31938
31939 /**
31940  * g_simple_async_result_new_error:
31941  * @source_object: (allow-none): a #GObject, or %NULL.
31942  * @callback: (scope async): a #GAsyncReadyCallback.
31943  * @user_data: (closure): user data passed to @callback.
31944  * @domain: a #GQuark.
31945  * @code: an error code.
31946  * @format: a string with format characters.
31947  * @...: a list of values to insert into @format.
31948  *
31949  * Creates a new #GSimpleAsyncResult with a set error.
31950  *
31951  * Returns: a #GSimpleAsyncResult.
31952  */
31953
31954
31955 /**
31956  * g_simple_async_result_new_from_error:
31957  * @source_object: (allow-none): a #GObject, or %NULL.
31958  * @callback: (scope async): a #GAsyncReadyCallback.
31959  * @user_data: (closure): user data passed to @callback.
31960  * @error: a #GError
31961  *
31962  * Creates a #GSimpleAsyncResult from an error condition.
31963  *
31964  * Returns: a #GSimpleAsyncResult.
31965  */
31966
31967
31968 /**
31969  * g_simple_async_result_new_take_error: (skip)
31970  * @source_object: (allow-none): a #GObject, or %NULL
31971  * @callback: (scope async): a #GAsyncReadyCallback
31972  * @user_data: (closure): user data passed to @callback
31973  * @error: a #GError
31974  *
31975  * Creates a #GSimpleAsyncResult from an error condition, and takes over the
31976  * caller's ownership of @error, so the caller does not need to free it anymore.
31977  *
31978  * Returns: a #GSimpleAsyncResult
31979  * Since: 2.28
31980  */
31981
31982
31983 /**
31984  * g_simple_async_result_propagate_error:
31985  * @simple: a #GSimpleAsyncResult.
31986  * @dest: (out): a location to propagate the error to.
31987  *
31988  * Propagates an error from within the simple asynchronous result to
31989  * a given destination.
31990  *
31991  * Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise.
31992  */
31993
31994
31995 /**
31996  * g_simple_async_result_run_in_thread: (skip)
31997  * @simple: a #GSimpleAsyncResult.
31998  * @func: a #GSimpleAsyncThreadFunc.
31999  * @io_priority: the io priority of the request.
32000  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32001  *
32002  * Runs the asynchronous job in a separate thread and then calls
32003  * g_simple_async_result_complete_in_idle() on @simple to return
32004  * the result to the appropriate main loop.
32005  *
32006  * Calling this function takes a reference to @simple for as long as
32007  * is needed to run the job and report its completion.
32008  */
32009
32010
32011 /**
32012  * g_simple_async_result_set_error: (skip)
32013  * @simple: a #GSimpleAsyncResult.
32014  * @domain: a #GQuark (usually #G_IO_ERROR).
32015  * @code: an error code.
32016  * @format: a formatted error reporting string.
32017  * @...: a list of variables to fill in @format.
32018  *
32019  * Sets an error within the asynchronous result without a #GError.
32020  */
32021
32022
32023 /**
32024  * g_simple_async_result_set_error_va: (skip)
32025  * @simple: a #GSimpleAsyncResult.
32026  * @domain: a #GQuark (usually #G_IO_ERROR).
32027  * @code: an error code.
32028  * @format: a formatted error reporting string.
32029  * @args: va_list of arguments.
32030  *
32031  * Sets an error within the asynchronous result without a #GError.
32032  * Unless writing a binding, see g_simple_async_result_set_error().
32033  */
32034
32035
32036 /**
32037  * g_simple_async_result_set_from_error:
32038  * @simple: a #GSimpleAsyncResult.
32039  * @error: #GError.
32040  *
32041  * Sets the result from a #GError.
32042  */
32043
32044
32045 /**
32046  * g_simple_async_result_set_handle_cancellation:
32047  * @simple: a #GSimpleAsyncResult.
32048  * @handle_cancellation: a #gboolean.
32049  *
32050  * Sets whether to handle cancellation within the asynchronous operation.
32051  */
32052
32053
32054 /**
32055  * g_simple_async_result_set_op_res_gboolean:
32056  * @simple: a #GSimpleAsyncResult.
32057  * @op_res: a #gboolean.
32058  *
32059  * Sets the operation result to a boolean within the asynchronous result.
32060  */
32061
32062
32063 /**
32064  * g_simple_async_result_set_op_res_gpointer: (skip)
32065  * @simple: a #GSimpleAsyncResult.
32066  * @op_res: a pointer result from an asynchronous function.
32067  * @destroy_op_res: a #GDestroyNotify function.
32068  *
32069  * Sets the operation result within the asynchronous result to a pointer.
32070  */
32071
32072
32073 /**
32074  * g_simple_async_result_set_op_res_gssize:
32075  * @simple: a #GSimpleAsyncResult.
32076  * @op_res: a #gssize.
32077  *
32078  * Sets the operation result within the asynchronous result to
32079  * the given @op_res.
32080  */
32081
32082
32083 /**
32084  * g_simple_async_result_take_error: (skip)
32085  * @simple: a #GSimpleAsyncResult
32086  * @error: a #GError
32087  *
32088  * Sets the result from @error, and takes over the caller's ownership
32089  * of @error, so the caller does not need to free it any more.
32090  *
32091  * Since: 2.28
32092  */
32093
32094
32095 /**
32096  * g_simple_permission_new:
32097  * @allowed: %TRUE if the action is allowed
32098  * @returns: the #GSimplePermission, as a #GPermission
32099  *
32100  * Creates a new #GPermission instance that represents an action that is
32101  * either always or never allowed.
32102  *
32103  * Since: 2.26
32104  */
32105
32106
32107 /**
32108  * g_socket_accept:
32109  * @socket: a #GSocket.
32110  * @cancellable: (allow-none): a %GCancellable or %NULL
32111  * @error: #GError for error reporting, or %NULL to ignore.
32112  *
32113  * Accept incoming connections on a connection-based socket. This removes
32114  * the first outstanding connection request from the listening socket and
32115  * creates a #GSocket object for it.
32116  *
32117  * The @socket must be bound to a local address with g_socket_bind() and
32118  * must be listening for incoming connections (g_socket_listen()).
32119  *
32120  * If there are no outstanding connections then the operation will block
32121  * or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.
32122  * To be notified of an incoming connection, wait for the %G_IO_IN condition.
32123  *
32124  * Free the returned object with g_object_unref().
32125  *
32126  * Returns: (transfer full): a new #GSocket, or %NULL on error.
32127  * Since: 2.22
32128  */
32129
32130
32131 /**
32132  * g_socket_address_enumerator_next:
32133  * @enumerator: a #GSocketAddressEnumerator
32134  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32135  * @error: a #GError.
32136  *
32137  * Retrieves the next #GSocketAddress from @enumerator. Note that this
32138  * may block for some amount of time. (Eg, a #GNetworkAddress may need
32139  * to do a DNS lookup before it can return an address.) Use
32140  * g_socket_address_enumerator_next_async() if you need to avoid
32141  * blocking.
32142  *
32143  * If @enumerator is expected to yield addresses, but for some reason
32144  * is unable to (eg, because of a DNS error), then the first call to
32145  * g_socket_address_enumerator_next() will return an appropriate error
32146  * in *@error. However, if the first call to
32147  * g_socket_address_enumerator_next() succeeds, then any further
32148  * internal errors (other than @cancellable being triggered) will be
32149  * ignored.
32150  *
32151  * error (in which case *@error will be set) or if there are no
32152  * more addresses.
32153  *
32154  * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
32155  */
32156
32157
32158 /**
32159  * g_socket_address_enumerator_next_async:
32160  * @enumerator: a #GSocketAddressEnumerator
32161  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32162  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
32163  * @user_data: (closure): the data to pass to callback function
32164  *
32165  * Asynchronously retrieves the next #GSocketAddress from @enumerator
32166  * and then calls @callback, which must call
32167  * g_socket_address_enumerator_next_finish() to get the result.
32168  */
32169
32170
32171 /**
32172  * g_socket_address_enumerator_next_finish:
32173  * @enumerator: a #GSocketAddressEnumerator
32174  * @result: a #GAsyncResult
32175  * @error: a #GError
32176  *
32177  * Retrieves the result of a completed call to
32178  * g_socket_address_enumerator_next_async(). See
32179  * g_socket_address_enumerator_next() for more information about
32180  * error handling.
32181  *
32182  * error (in which case *@error will be set) or if there are no
32183  * more addresses.
32184  *
32185  * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
32186  */
32187
32188
32189 /**
32190  * g_socket_address_get_family:
32191  * @address: a #GSocketAddress
32192  *
32193  * Gets the socket family type of @address.
32194  *
32195  * Returns: the socket family type of @address.
32196  * Since: 2.22
32197  */
32198
32199
32200 /**
32201  * g_socket_address_get_native_size:
32202  * @address: a #GSocketAddress
32203  *
32204  * Gets the size of @address's native <type>struct sockaddr</type>.
32205  * You can use this to allocate memory to pass to
32206  * g_socket_address_to_native().
32207  *
32208  * @address represents
32209  *
32210  * Returns: the size of the native <type>struct sockaddr</type> that
32211  * Since: 2.22
32212  */
32213
32214
32215 /**
32216  * g_socket_address_new_from_native:
32217  * @native: a pointer to a <type>struct sockaddr</type>
32218  * @len: the size of the memory location pointed to by @native
32219  *
32220  * Creates a #GSocketAddress subclass corresponding to the native
32221  * <type>struct sockaddr</type> @native.
32222  *
32223  * otherwise %NULL.
32224  *
32225  * Returns: a new #GSocketAddress if @native could successfully be converted,
32226  * Since: 2.22
32227  */
32228
32229
32230 /**
32231  * g_socket_address_to_native:
32232  * @address: a #GSocketAddress
32233  * @dest: a pointer to a memory location that will contain the native <type>struct sockaddr</type>.
32234  * @destlen: the size of @dest. Must be at least as large as g_socket_address_get_native_size().
32235  * @error: #GError for error reporting, or %NULL to ignore.
32236  *
32237  * Converts a #GSocketAddress to a native <type>struct
32238  * sockaddr</type>, which can be passed to low-level functions like
32239  * connect() or bind().
32240  *
32241  * If not enough space is availible, a %G_IO_ERROR_NO_SPACE error is
32242  * returned. If the address type is not known on the system
32243  * then a %G_IO_ERROR_NOT_SUPPORTED error is returned.
32244  *
32245  * Returns: %TRUE if @dest was filled in, %FALSE on error
32246  * Since: 2.22
32247  */
32248
32249
32250 /**
32251  * g_socket_bind:
32252  * @socket: a #GSocket.
32253  * @address: a #GSocketAddress specifying the local address.
32254  * @allow_reuse: whether to allow reusing this address
32255  * @error: #GError for error reporting, or %NULL to ignore.
32256  *
32257  * When a socket is created it is attached to an address family, but it
32258  * doesn't have an address in this family. g_socket_bind() assigns the
32259  * address (sometimes called name) of the socket.
32260  *
32261  * It is generally required to bind to a local address before you can
32262  * receive connections. (See g_socket_listen() and g_socket_accept() ).
32263  * In certain situations, you may also want to bind a socket that will be
32264  * used to initiate connections, though this is not normally required.
32265  *
32266  * @allow_reuse should be %TRUE for server sockets (sockets that you will
32267  * eventually call g_socket_accept() on), and %FALSE for client sockets.
32268  * (Specifically, if it is %TRUE, then g_socket_bind() will set the
32269  * %SO_REUSEADDR flag on the socket, allowing it to bind @address even if
32270  * that address was previously used by another socket that has not yet been
32271  * fully cleaned-up by the kernel. Failing to set this flag on a server
32272  * socket may cause the bind call to return %G_IO_ERROR_ADDRESS_IN_USE if
32273  * the server program is stopped and then immediately restarted.)
32274  *
32275  * Returns: %TRUE on success, %FALSE on error.
32276  * Since: 2.22
32277  */
32278
32279
32280 /**
32281  * g_socket_check_connect_result:
32282  * @socket: a #GSocket
32283  * @error: #GError for error reporting, or %NULL to ignore.
32284  *
32285  * Checks and resets the pending connect error for the socket.
32286  * This is used to check for errors when g_socket_connect() is
32287  * used in non-blocking mode.
32288  *
32289  * Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error
32290  * Since: 2.22
32291  */
32292
32293
32294 /**
32295  * g_socket_client_add_application_proxy:
32296  * @client: a #GSocketClient
32297  * @protocol: The proxy protocol
32298  *
32299  * Enable proxy protocols to be handled by the application. When the
32300  * indicated proxy protocol is returned by the #GProxyResolver,
32301  * #GSocketClient will consider this protocol as supported but will
32302  * not try to find a #GProxy instance to handle handshaking. The
32303  * application must check for this case by calling
32304  * g_socket_connection_get_remote_address() on the returned
32305  * #GSocketConnection, and seeing if it's a #GProxyAddress of the
32306  * appropriate type, to determine whether or not it needs to handle
32307  * the proxy handshaking itself.
32308  *
32309  * This should be used for proxy protocols that are dialects of
32310  * another protocol such as HTTP proxy. It also allows cohabitation of
32311  * proxy protocols that are reused between protocols. A good example
32312  * is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also
32313  * be use as generic socket proxy through the HTTP CONNECT method.
32314  */
32315
32316
32317 /**
32318  * g_socket_client_connect:
32319  * @client: a #GSocketClient.
32320  * @connectable: a #GSocketConnectable specifying the remote address.
32321  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32322  * @error: #GError for error reporting, or %NULL to ignore.
32323  *
32324  * Tries to resolve the @connectable and make a network connection to it.
32325  *
32326  * Upon a successful connection, a new #GSocketConnection is constructed
32327  * and returned.  The caller owns this new object and must drop their
32328  * reference to it when finished with it.
32329  *
32330  * The type of the #GSocketConnection object returned depends on the type of
32331  * the underlying socket that is used. For instance, for a TCP/IP connection
32332  * it will be a #GTcpConnection.
32333  *
32334  * The socket created will be the same family as the address that the
32335  * @connectable resolves to, unless family is set with g_socket_client_set_family()
32336  * or indirectly via g_socket_client_set_local_address(). The socket type
32337  * defaults to %G_SOCKET_TYPE_STREAM but can be set with
32338  * g_socket_client_set_socket_type().
32339  *
32340  * If a local address is specified with g_socket_client_set_local_address() the
32341  * socket will be bound to this address before connecting.
32342  *
32343  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
32344  * Since: 2.22
32345  */
32346
32347
32348 /**
32349  * g_socket_client_connect_async:
32350  * @client: a #GSocketClient
32351  * @connectable: a #GSocketConnectable specifying the remote address.
32352  * @cancellable: (allow-none): a #GCancellable, or %NULL
32353  * @callback: (scope async): a #GAsyncReadyCallback
32354  * @user_data: (closure): user data for the callback
32355  *
32356  * This is the asynchronous version of g_socket_client_connect().
32357  *
32358  * When the operation is finished @callback will be
32359  * called. You can then call g_socket_client_connect_finish() to get
32360  * the result of the operation.
32361  *
32362  * Since: 2.22
32363  */
32364
32365
32366 /**
32367  * g_socket_client_connect_finish:
32368  * @client: a #GSocketClient.
32369  * @result: a #GAsyncResult.
32370  * @error: a #GError location to store the error occurring, or %NULL to ignore.
32371  *
32372  * Finishes an async connect operation. See g_socket_client_connect_async()
32373  *
32374  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
32375  * Since: 2.22
32376  */
32377
32378
32379 /**
32380  * g_socket_client_connect_to_host:
32381  * @client: a #GSocketClient
32382  * @host_and_port: the name and optionally port of the host to connect to
32383  * @default_port: the default port to connect to
32384  * @cancellable: (allow-none): a #GCancellable, or %NULL
32385  * @error: a pointer to a #GError, or %NULL
32386  *
32387  * This is a helper function for g_socket_client_connect().
32388  *
32389  * Attempts to create a TCP connection to the named host.
32390  *
32391  * @host_and_port may be in any of a number of recognized formats; an IPv6
32392  * address, an IPv4 address, or a domain name (in which case a DNS
32393  * lookup is performed).  Quoting with [] is supported for all address
32394  * types.  A port override may be specified in the usual way with a
32395  * colon.  Ports may be given as decimal numbers or symbolic names (in
32396  * which case an /etc/services lookup is performed).
32397  *
32398  * If no port override is given in @host_and_port then @default_port will be
32399  * used as the port number to connect to.
32400  *
32401  * In general, @host_and_port is expected to be provided by the user (allowing
32402  * them to give the hostname, and a port override if necessary) and
32403  * @default_port is expected to be provided by the application.
32404  *
32405  * In the case that an IP address is given, a single connection
32406  * attempt is made.  In the case that a name is given, multiple
32407  * connection attempts may be made, in turn and according to the
32408  * number of address records in DNS, until a connection succeeds.
32409  *
32410  * Upon a successful connection, a new #GSocketConnection is constructed
32411  * and returned.  The caller owns this new object and must drop their
32412  * reference to it when finished with it.
32413  *
32414  * In the event of any failure (DNS error, service not found, no hosts
32415  * connectable) %NULL is returned and @error (if non-%NULL) is set
32416  * accordingly.
32417  *
32418  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
32419  * Since: 2.22
32420  */
32421
32422
32423 /**
32424  * g_socket_client_connect_to_host_async:
32425  * @client: a #GSocketClient
32426  * @host_and_port: the name and optionally the port of the host to connect to
32427  * @default_port: the default port to connect to
32428  * @cancellable: (allow-none): a #GCancellable, or %NULL
32429  * @callback: (scope async): a #GAsyncReadyCallback
32430  * @user_data: (closure): user data for the callback
32431  *
32432  * This is the asynchronous version of g_socket_client_connect_to_host().
32433  *
32434  * When the operation is finished @callback will be
32435  * called. You can then call g_socket_client_connect_to_host_finish() to get
32436  * the result of the operation.
32437  *
32438  * Since: 2.22
32439  */
32440
32441
32442 /**
32443  * g_socket_client_connect_to_host_finish:
32444  * @client: a #GSocketClient.
32445  * @result: a #GAsyncResult.
32446  * @error: a #GError location to store the error occurring, or %NULL to ignore.
32447  *
32448  * Finishes an async connect operation. See g_socket_client_connect_to_host_async()
32449  *
32450  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
32451  * Since: 2.22
32452  */
32453
32454
32455 /**
32456  * g_socket_client_connect_to_service:
32457  * @client: a #GSocketConnection
32458  * @domain: a domain name
32459  * @service: the name of the service to connect to
32460  * @cancellable: (allow-none): a #GCancellable, or %NULL
32461  * @error: a pointer to a #GError, or %NULL
32462  * @returns: (transfer full): a #GSocketConnection if successful, or %NULL on error
32463  *
32464  * Attempts to create a TCP connection to a service.
32465  *
32466  * This call looks up the SRV record for @service at @domain for the
32467  * "tcp" protocol.  It then attempts to connect, in turn, to each of
32468  * the hosts providing the service until either a connection succeeds
32469  * or there are no hosts remaining.
32470  *
32471  * Upon a successful connection, a new #GSocketConnection is constructed
32472  * and returned.  The caller owns this new object and must drop their
32473  * reference to it when finished with it.
32474  *
32475  * In the event of any failure (DNS error, service not found, no hosts
32476  * connectable) %NULL is returned and @error (if non-%NULL) is set
32477  * accordingly.
32478  */
32479
32480
32481 /**
32482  * g_socket_client_connect_to_service_async:
32483  * @client: a #GSocketClient
32484  * @domain: a domain name
32485  * @service: the name of the service to connect to
32486  * @cancellable: (allow-none): a #GCancellable, or %NULL
32487  * @callback: (scope async): a #GAsyncReadyCallback
32488  * @user_data: (closure): user data for the callback
32489  *
32490  * This is the asynchronous version of
32491  * g_socket_client_connect_to_service().
32492  *
32493  * Since: 2.22
32494  */
32495
32496
32497 /**
32498  * g_socket_client_connect_to_service_finish:
32499  * @client: a #GSocketClient.
32500  * @result: a #GAsyncResult.
32501  * @error: a #GError location to store the error occurring, or %NULL to ignore.
32502  *
32503  * Finishes an async connect operation. See g_socket_client_connect_to_service_async()
32504  *
32505  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
32506  * Since: 2.22
32507  */
32508
32509
32510 /**
32511  * g_socket_client_connect_to_uri:
32512  * @client: a #GSocketClient
32513  * @uri: A network URI
32514  * @default_port: the default port to connect to
32515  * @cancellable: (allow-none): a #GCancellable, or %NULL
32516  * @error: a pointer to a #GError, or %NULL
32517  *
32518  * This is a helper function for g_socket_client_connect().
32519  *
32520  * Attempts to create a TCP connection with a network URI.
32521  *
32522  * @uri may be any valid URI containing an "authority" (hostname/port)
32523  * component. If a port is not specified in the URI, @default_port
32524  * will be used. TLS will be negotiated if #GSocketClient:tls is %TRUE.
32525  * (#GSocketClient does not know to automatically assume TLS for
32526  * certain URI schemes.)
32527  *
32528  * Using this rather than g_socket_client_connect() or
32529  * g_socket_client_connect_to_host() allows #GSocketClient to
32530  * determine when to use application-specific proxy protocols.
32531  *
32532  * Upon a successful connection, a new #GSocketConnection is constructed
32533  * and returned.  The caller owns this new object and must drop their
32534  * reference to it when finished with it.
32535  *
32536  * In the event of any failure (DNS error, service not found, no hosts
32537  * connectable) %NULL is returned and @error (if non-%NULL) is set
32538  * accordingly.
32539  *
32540  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
32541  * Since: 2.26
32542  */
32543
32544
32545 /**
32546  * g_socket_client_connect_to_uri_async:
32547  * @client: a #GSocketClient
32548  * @uri: a network uri
32549  * @default_port: the default port to connect to
32550  * @cancellable: (allow-none): a #GCancellable, or %NULL
32551  * @callback: (scope async): a #GAsyncReadyCallback
32552  * @user_data: (closure): user data for the callback
32553  *
32554  * This is the asynchronous version of g_socket_client_connect_to_uri().
32555  *
32556  * When the operation is finished @callback will be
32557  * called. You can then call g_socket_client_connect_to_uri_finish() to get
32558  * the result of the operation.
32559  *
32560  * Since: 2.26
32561  */
32562
32563
32564 /**
32565  * g_socket_client_connect_to_uri_finish:
32566  * @client: a #GSocketClient.
32567  * @result: a #GAsyncResult.
32568  * @error: a #GError location to store the error occurring, or %NULL to ignore.
32569  *
32570  * Finishes an async connect operation. See g_socket_client_connect_to_uri_async()
32571  *
32572  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
32573  * Since: 2.26
32574  */
32575
32576
32577 /**
32578  * g_socket_client_get_enable_proxy:
32579  * @client: a #GSocketClient.
32580  *
32581  * Gets the proxy enable state; see g_socket_client_set_enable_proxy()
32582  *
32583  * Returns: whether proxying is enabled
32584  * Since: 2.26
32585  */
32586
32587
32588 /**
32589  * g_socket_client_get_family:
32590  * @client: a #GSocketClient.
32591  *
32592  * Gets the socket family of the socket client.
32593  *
32594  * See g_socket_client_set_family() for details.
32595  *
32596  * Returns: a #GSocketFamily
32597  * Since: 2.22
32598  */
32599
32600
32601 /**
32602  * g_socket_client_get_local_address:
32603  * @client: a #GSocketClient.
32604  *
32605  * Gets the local address of the socket client.
32606  *
32607  * See g_socket_client_set_local_address() for details.
32608  *
32609  * Returns: (transfer none): a #GSocketAddress or %NULL. Do not free.
32610  * Since: 2.22
32611  */
32612
32613
32614 /**
32615  * g_socket_client_get_protocol:
32616  * @client: a #GSocketClient
32617  *
32618  * Gets the protocol name type of the socket client.
32619  *
32620  * See g_socket_client_set_protocol() for details.
32621  *
32622  * Returns: a #GSocketProtocol
32623  * Since: 2.22
32624  */
32625
32626
32627 /**
32628  * g_socket_client_get_socket_type:
32629  * @client: a #GSocketClient.
32630  *
32631  * Gets the socket type of the socket client.
32632  *
32633  * See g_socket_client_set_socket_type() for details.
32634  *
32635  * Returns: a #GSocketFamily
32636  * Since: 2.22
32637  */
32638
32639
32640 /**
32641  * g_socket_client_get_timeout:
32642  * @client: a #GSocketClient
32643  *
32644  * Gets the I/O timeout time for sockets created by @client.
32645  *
32646  * See g_socket_client_set_timeout() for details.
32647  *
32648  * Returns: the timeout in seconds
32649  * Since: 2.26
32650  */
32651
32652
32653 /**
32654  * g_socket_client_get_tls:
32655  * @client: a #GSocketClient.
32656  *
32657  * Gets whether @client creates TLS connections. See
32658  * g_socket_client_set_tls() for details.
32659  *
32660  * Returns: whether @client uses TLS
32661  * Since: 2.28
32662  */
32663
32664
32665 /**
32666  * g_socket_client_get_tls_validation_flags:
32667  * @client: a #GSocketClient.
32668  *
32669  * Gets the TLS validation flags used creating TLS connections via
32670  * @client.
32671  *
32672  * Returns: the TLS validation flags
32673  * Since: 2.28
32674  */
32675
32676
32677 /**
32678  * g_socket_client_new:
32679  *
32680  * Creates a new #GSocketClient with the default options.
32681  *
32682  * Free the returned object with g_object_unref().
32683  *
32684  * Returns: a #GSocketClient.
32685  * Since: 2.22
32686  */
32687
32688
32689 /**
32690  * g_socket_client_set_enable_proxy:
32691  * @client: a #GSocketClient.
32692  * @enable: whether to enable proxies
32693  *
32694  * Sets whether or not @client attempts to make connections via a
32695  * proxy server. When enabled (the default), #GSocketClient will use a
32696  * #GProxyResolver to determine if a proxy protocol such as SOCKS is
32697  * needed, and automatically do the necessary proxy negotiation.
32698  *
32699  * Since: 2.26
32700  */
32701
32702
32703 /**
32704  * g_socket_client_set_family:
32705  * @client: a #GSocketClient.
32706  * @family: a #GSocketFamily
32707  *
32708  * Sets the socket family of the socket client.
32709  * If this is set to something other than %G_SOCKET_FAMILY_INVALID
32710  * then the sockets created by this object will be of the specified
32711  * family.
32712  *
32713  * This might be useful for instance if you want to force the local
32714  * connection to be an ipv4 socket, even though the address might
32715  * be an ipv6 mapped to ipv4 address.
32716  *
32717  * Since: 2.22
32718  */
32719
32720
32721 /**
32722  * g_socket_client_set_local_address:
32723  * @client: a #GSocketClient.
32724  * @address: a #GSocketAddress, or %NULL
32725  *
32726  * Sets the local address of the socket client.
32727  * The sockets created by this object will bound to the
32728  * specified address (if not %NULL) before connecting.
32729  *
32730  * This is useful if you want to ensure that the local
32731  * side of the connection is on a specific port, or on
32732  * a specific interface.
32733  *
32734  * Since: 2.22
32735  */
32736
32737
32738 /**
32739  * g_socket_client_set_protocol:
32740  * @client: a #GSocketClient.
32741  * @protocol: a #GSocketProtocol
32742  *
32743  * Sets the protocol of the socket client.
32744  * The sockets created by this object will use of the specified
32745  * protocol.
32746  *
32747  * If @protocol is %0 that means to use the default
32748  * protocol for the socket family and type.
32749  *
32750  * Since: 2.22
32751  */
32752
32753
32754 /**
32755  * g_socket_client_set_socket_type:
32756  * @client: a #GSocketClient.
32757  * @type: a #GSocketType
32758  *
32759  * Sets the socket type of the socket client.
32760  * The sockets created by this object will be of the specified
32761  * type.
32762  *
32763  * It doesn't make sense to specify a type of %G_SOCKET_TYPE_DATAGRAM,
32764  * as GSocketClient is used for connection oriented services.
32765  *
32766  * Since: 2.22
32767  */
32768
32769
32770 /**
32771  * g_socket_client_set_timeout:
32772  * @client: a #GSocketClient.
32773  * @timeout: the timeout
32774  *
32775  * Sets the I/O timeout for sockets created by @client. @timeout is a
32776  * time in seconds, or 0 for no timeout (the default).
32777  *
32778  * The timeout value affects the initial connection attempt as well,
32779  * so setting this may cause calls to g_socket_client_connect(), etc,
32780  * to fail with %G_IO_ERROR_TIMED_OUT.
32781  *
32782  * Since: 2.26
32783  */
32784
32785
32786 /**
32787  * g_socket_client_set_tls:
32788  * @client: a #GSocketClient.
32789  * @tls: whether to use TLS
32790  *
32791  * Sets whether @client creates TLS (aka SSL) connections. If @tls is
32792  * %TRUE, @client will wrap its connections in a #GTlsClientConnection
32793  * and perform a TLS handshake when connecting.
32794  *
32795  * Note that since #GSocketClient must return a #GSocketConnection,
32796  * but #GTlsClientConnection is not a #GSocketConnection, this
32797  * actually wraps the resulting #GTlsClientConnection in a
32798  * #GTcpWrapperConnection when returning it. You can use
32799  * g_tcp_wrapper_connection_get_base_io_stream() on the return value
32800  * to extract the #GTlsClientConnection.
32801  *
32802  * Since: 2.28
32803  */
32804
32805
32806 /**
32807  * g_socket_client_set_tls_validation_flags:
32808  * @client: a #GSocketClient.
32809  * @flags: the validation flags
32810  *
32811  * Sets the TLS validation flags used when creating TLS connections
32812  * via @client. The default value is %G_TLS_CERTIFICATE_VALIDATE_ALL.
32813  *
32814  * Since: 2.28
32815  */
32816
32817
32818 /**
32819  * g_socket_close:
32820  * @socket: a #GSocket
32821  * @error: #GError for error reporting, or %NULL to ignore.
32822  *
32823  * Closes the socket, shutting down any active connection.
32824  *
32825  * Closing a socket does not wait for all outstanding I/O operations
32826  * to finish, so the caller should not rely on them to be guaranteed
32827  * to complete even if the close returns with no error.
32828  *
32829  * Once the socket is closed, all other operations will return
32830  * %G_IO_ERROR_CLOSED. Closing a socket multiple times will not
32831  * return an error.
32832  *
32833  * Sockets will be automatically closed when the last reference
32834  * is dropped, but you might want to call this function to make sure
32835  * resources are released as early as possible.
32836  *
32837  * Beware that due to the way that TCP works, it is possible for
32838  * recently-sent data to be lost if either you close a socket while the
32839  * %G_IO_IN condition is set, or else if the remote connection tries to
32840  * send something to you after you close the socket but before it has
32841  * finished reading all of the data you sent. There is no easy generic
32842  * way to avoid this problem; the easiest fix is to design the network
32843  * protocol such that the client will never send data "out of turn".
32844  * Another solution is for the server to half-close the connection by
32845  * calling g_socket_shutdown() with only the @shutdown_write flag set,
32846  * and then wait for the client to notice this and close its side of the
32847  * connection, after which the server can safely call g_socket_close().
32848  * (This is what #GTcpConnection does if you call
32849  * g_tcp_connection_set_graceful_disconnect(). But of course, this
32850  * only works if the client will close its connection after the server
32851  * does.)
32852  *
32853  * Returns: %TRUE on success, %FALSE on error
32854  * Since: 2.22
32855  */
32856
32857
32858 /**
32859  * g_socket_condition_check:
32860  * @socket: a #GSocket
32861  * @condition: a #GIOCondition mask to check
32862  *
32863  * Checks on the readiness of @socket to perform operations.
32864  * The operations specified in @condition are checked for and masked
32865  * against the currently-satisfied conditions on @socket. The result
32866  * is returned.
32867  *
32868  * Note that on Windows, it is possible for an operation to return
32869  * %G_IO_ERROR_WOULD_BLOCK even immediately after
32870  * g_socket_condition_check() has claimed that the socket is ready for
32871  * writing. Rather than calling g_socket_condition_check() and then
32872  * writing to the socket if it succeeds, it is generally better to
32873  * simply try writing to the socket right away, and try again later if
32874  * the initial attempt returns %G_IO_ERROR_WOULD_BLOCK.
32875  *
32876  * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition;
32877  * these conditions will always be set in the output if they are true.
32878  *
32879  * This call never blocks.
32880  *
32881  * Returns: the @GIOCondition mask of the current state
32882  * Since: 2.22
32883  */
32884
32885
32886 /**
32887  * g_socket_condition_wait:
32888  * @socket: a #GSocket
32889  * @condition: a #GIOCondition mask to wait for
32890  * @cancellable: (allow-none): a #GCancellable, or %NULL
32891  * @error: a #GError pointer, or %NULL
32892  *
32893  * Waits for @condition to become true on @socket. When the condition
32894  * is met, %TRUE is returned.
32895  *
32896  * If @cancellable is cancelled before the condition is met, or if the
32897  * socket has a timeout set and it is reached before the condition is
32898  * met, then %FALSE is returned and @error, if non-%NULL, is set to
32899  * the appropriate value (%G_IO_ERROR_CANCELLED or
32900  * %G_IO_ERROR_TIMED_OUT).
32901  *
32902  * Returns: %TRUE if the condition was met, %FALSE otherwise
32903  * Since: 2.22
32904  */
32905
32906
32907 /**
32908  * g_socket_connect:
32909  * @socket: a #GSocket.
32910  * @address: a #GSocketAddress specifying the remote address.
32911  * @cancellable: (allow-none): a %GCancellable or %NULL
32912  * @error: #GError for error reporting, or %NULL to ignore.
32913  *
32914  * Connect the socket to the specified remote address.
32915  *
32916  * For connection oriented socket this generally means we attempt to make
32917  * a connection to the @address. For a connection-less socket it sets
32918  * the default address for g_socket_send() and discards all incoming datagrams
32919  * from other sources.
32920  *
32921  * Generally connection oriented sockets can only connect once, but
32922  * connection-less sockets can connect multiple times to change the
32923  * default address.
32924  *
32925  * If the connect call needs to do network I/O it will block, unless
32926  * non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
32927  * and the user can be notified of the connection finishing by waiting
32928  * for the G_IO_OUT condition. The result of the connection must then be
32929  * checked with g_socket_check_connect_result().
32930  *
32931  * Returns: %TRUE if connected, %FALSE on error.
32932  * Since: 2.22
32933  */
32934
32935
32936 /**
32937  * g_socket_connectable_enumerate:
32938  * @connectable: a #GSocketConnectable
32939  *
32940  * Creates a #GSocketAddressEnumerator for @connectable.
32941  *
32942  * Returns: (transfer full): a new #GSocketAddressEnumerator.
32943  * Since: 2.22
32944  */
32945
32946
32947 /**
32948  * g_socket_connectable_proxy_enumerate:
32949  * @connectable: a #GSocketConnectable
32950  *
32951  * Creates a #GSocketAddressEnumerator for @connectable that will
32952  * return #GProxyAddress<!-- -->es for addresses that you must connect
32953  * to via a proxy.
32954  *
32955  * If @connectable does not implement
32956  * g_socket_connectable_proxy_enumerate(), this will fall back to
32957  * calling g_socket_connectable_enumerate().
32958  *
32959  * Returns: (transfer full): a new #GSocketAddressEnumerator.
32960  * Since: 2.26
32961  */
32962
32963
32964 /**
32965  * g_socket_connection_factory_create_connection:
32966  * @socket: a #GSocket
32967  *
32968  * Creates a #GSocketConnection subclass of the right type for
32969  * @socket.
32970  *
32971  * Returns: (transfer full): a #GSocketConnection
32972  * Since: 2.22
32973  */
32974
32975
32976 /**
32977  * g_socket_connection_factory_lookup_type:
32978  * @family: a #GSocketFamily
32979  * @type: a #GSocketType
32980  * @protocol_id: a protocol id
32981  *
32982  * Looks up the #GType to be used when creating socket connections on
32983  * sockets with the specified @family, @type and @protocol_id.
32984  *
32985  * If no type is registered, the #GSocketConnection base type is returned.
32986  *
32987  * Returns: a #GType
32988  * Since: 2.22
32989  */
32990
32991
32992 /**
32993  * g_socket_connection_factory_register_type:
32994  * @g_type: a #GType, inheriting from %G_TYPE_SOCKET_CONNECTION
32995  * @family: a #GSocketFamily
32996  * @type: a #GSocketType
32997  * @protocol: a protocol id
32998  *
32999  * Looks up the #GType to be used when creating socket connections on
33000  * sockets with the specified @family, @type and @protocol.
33001  *
33002  * If no type is registered, the #GSocketConnection base type is returned.
33003  *
33004  * Since: 2.22
33005  */
33006
33007
33008 /**
33009  * g_socket_connection_get_local_address:
33010  * @connection: a #GSocketConnection
33011  * @error: #GError for error reporting, or %NULL to ignore.
33012  *
33013  * Try to get the local address of a socket connection.
33014  *
33015  * Free the returned object with g_object_unref().
33016  *
33017  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
33018  * Since: 2.22
33019  */
33020
33021
33022 /**
33023  * g_socket_connection_get_remote_address:
33024  * @connection: a #GSocketConnection
33025  * @error: #GError for error reporting, or %NULL to ignore.
33026  *
33027  * Try to get the remote address of a socket connection.
33028  *
33029  * Free the returned object with g_object_unref().
33030  *
33031  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
33032  * Since: 2.22
33033  */
33034
33035
33036 /**
33037  * g_socket_connection_get_socket:
33038  * @connection: a #GSocketConnection
33039  *
33040  * Gets the underlying #GSocket object of the connection.
33041  * This can be useful if you want to do something unusual on it
33042  * not supported by the #GSocketConnection APIs.
33043  *
33044  * Returns: (transfer none): a #GSocketAddress or %NULL on error.
33045  * Since: 2.22
33046  */
33047
33048
33049 /**
33050  * g_socket_control_message_deserialize:
33051  * @level: a socket level
33052  * @type: a socket control message type for the given @level
33053  * @size: the size of the data in bytes
33054  * @data: (array length=size) (element-type guint8): pointer to the message data
33055  *
33056  * Tries to deserialize a socket control message of a given
33057  * @level and @type. This will ask all known (to GType) subclasses
33058  * of #GSocketControlMessage if they can understand this kind
33059  * of message and if so deserialize it into a #GSocketControlMessage.
33060  *
33061  * If there is no implementation for this kind of control message, %NULL
33062  * will be returned.
33063  *
33064  * Returns: (transfer full): the deserialized message or %NULL
33065  * Since: 2.22
33066  */
33067
33068
33069 /**
33070  * g_socket_control_message_get_level:
33071  * @message: a #GSocketControlMessage
33072  *
33073  * Returns the "level" (i.e. the originating protocol) of the control message.
33074  * This is often SOL_SOCKET.
33075  *
33076  * Returns: an integer describing the level
33077  * Since: 2.22
33078  */
33079
33080
33081 /**
33082  * g_socket_control_message_get_msg_type:
33083  * @message: a #GSocketControlMessage
33084  *
33085  * Returns the protocol specific type of the control message.
33086  * For instance, for UNIX fd passing this would be SCM_RIGHTS.
33087  *
33088  * Returns: an integer describing the type of control message
33089  * Since: 2.22
33090  */
33091
33092
33093 /**
33094  * g_socket_control_message_get_size:
33095  * @message: a #GSocketControlMessage
33096  *
33097  * Returns the space required for the control message, not including
33098  * headers or alignment.
33099  *
33100  * Returns: The number of bytes required.
33101  * Since: 2.22
33102  */
33103
33104
33105 /**
33106  * g_socket_control_message_serialize:
33107  * @message: a #GSocketControlMessage
33108  * @data: A buffer to write data to
33109  *
33110  * Converts the data in the message to bytes placed in the
33111  * message.
33112  *
33113  * @data is guaranteed to have enough space to fit the size
33114  * returned by g_socket_control_message_get_size() on this
33115  * object.
33116  *
33117  * Since: 2.22
33118  */
33119
33120
33121 /**
33122  * g_socket_create_source: (skip)
33123  * @socket: a #GSocket
33124  * @condition: a #GIOCondition mask to monitor
33125  * @cancellable: (allow-none): a %GCancellable or %NULL
33126  *
33127  * Creates a %GSource that can be attached to a %GMainContext to monitor
33128  * for the availibility of the specified @condition on the socket.
33129  *
33130  * The callback on the source is of the #GSocketSourceFunc type.
33131  *
33132  * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition;
33133  * these conditions will always be reported output if they are true.
33134  *
33135  * @cancellable if not %NULL can be used to cancel the source, which will
33136  * cause the source to trigger, reporting the current condition (which
33137  * is likely 0 unless cancellation happened at the same time as a
33138  * condition change). You can check for this in the callback using
33139  * g_cancellable_is_cancelled().
33140  *
33141  * If @socket has a timeout set, and it is reached before @condition
33142  * occurs, the source will then trigger anyway, reporting %G_IO_IN or
33143  * %G_IO_OUT depending on @condition. However, @socket will have been
33144  * marked as having had a timeout, and so the next #GSocket I/O method
33145  * you call will then fail with a %G_IO_ERROR_TIMED_OUT.
33146  *
33147  * Returns: (transfer full): a newly allocated %GSource, free with g_source_unref().
33148  * Since: 2.22
33149  */
33150
33151
33152 /**
33153  * g_socket_get_blocking:
33154  * @socket: a #GSocket.
33155  *
33156  * Gets the blocking mode of the socket. For details on blocking I/O,
33157  * see g_socket_set_blocking().
33158  *
33159  * Returns: %TRUE if blocking I/O is used, %FALSE otherwise.
33160  * Since: 2.22
33161  */
33162
33163
33164 /**
33165  * g_socket_get_credentials:
33166  * @socket: a #GSocket.
33167  * @error: #GError for error reporting, or %NULL to ignore.
33168  *
33169  * Returns the credentials of the foreign process connected to this
33170  * socket, if any (e.g. it is only supported for %G_SOCKET_FAMILY_UNIX
33171  * sockets).
33172  *
33173  * If this operation isn't supported on the OS, the method fails with
33174  * the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented
33175  * by reading the %SO_PEERCRED option on the underlying socket.
33176  *
33177  * Other ways to obtain credentials from a foreign peer includes the
33178  * #GUnixCredentialsMessage type and
33179  * g_unix_connection_send_credentials() /
33180  * g_unix_connection_receive_credentials() functions.
33181  *
33182  * that must be freed with g_object_unref().
33183  *
33184  * Returns: (transfer full): %NULL if @error is set, otherwise a #GCredentials object
33185  * Since: 2.26
33186  */
33187
33188
33189 /**
33190  * g_socket_get_family:
33191  * @socket: a #GSocket.
33192  *
33193  * Gets the socket family of the socket.
33194  *
33195  * Returns: a #GSocketFamily
33196  * Since: 2.22
33197  */
33198
33199
33200 /**
33201  * g_socket_get_fd:
33202  * @socket: a #GSocket.
33203  *
33204  * Returns the underlying OS socket object. On unix this
33205  * is a socket file descriptor, and on windows this is
33206  * a Winsock2 SOCKET handle. This may be useful for
33207  * doing platform specific or otherwise unusual operations
33208  * on the socket.
33209  *
33210  * Returns: the file descriptor of the socket.
33211  * Since: 2.22
33212  */
33213
33214
33215 /**
33216  * g_socket_get_keepalive:
33217  * @socket: a #GSocket.
33218  *
33219  * Gets the keepalive mode of the socket. For details on this,
33220  * see g_socket_set_keepalive().
33221  *
33222  * Returns: %TRUE if keepalive is active, %FALSE otherwise.
33223  * Since: 2.22
33224  */
33225
33226
33227 /**
33228  * g_socket_get_listen_backlog:
33229  * @socket: a #GSocket.
33230  *
33231  * Gets the listen backlog setting of the socket. For details on this,
33232  * see g_socket_set_listen_backlog().
33233  *
33234  * Returns: the maximum number of pending connections.
33235  * Since: 2.22
33236  */
33237
33238
33239 /**
33240  * g_socket_get_local_address:
33241  * @socket: a #GSocket.
33242  * @error: #GError for error reporting, or %NULL to ignore.
33243  *
33244  * Try to get the local address of a bound socket. This is only
33245  * useful if the socket has been bound to a local address,
33246  * either explicitly or implicitly when connecting.
33247  *
33248  * Free the returned object with g_object_unref().
33249  *
33250  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
33251  * Since: 2.22
33252  */
33253
33254
33255 /**
33256  * g_socket_get_protocol:
33257  * @socket: a #GSocket.
33258  *
33259  * Gets the socket protocol id the socket was created with.
33260  * In case the protocol is unknown, -1 is returned.
33261  *
33262  * Returns: a protocol id, or -1 if unknown
33263  * Since: 2.22
33264  */
33265
33266
33267 /**
33268  * g_socket_get_remote_address:
33269  * @socket: a #GSocket.
33270  * @error: #GError for error reporting, or %NULL to ignore.
33271  *
33272  * Try to get the remove address of a connected socket. This is only
33273  * useful for connection oriented sockets that have been connected.
33274  *
33275  * Free the returned object with g_object_unref().
33276  *
33277  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
33278  * Since: 2.22
33279  */
33280
33281
33282 /**
33283  * g_socket_get_socket_type:
33284  * @socket: a #GSocket.
33285  *
33286  * Gets the socket type of the socket.
33287  *
33288  * Returns: a #GSocketType
33289  * Since: 2.22
33290  */
33291
33292
33293 /**
33294  * g_socket_get_timeout:
33295  * @socket: a #GSocket.
33296  *
33297  * Gets the timeout setting of the socket. For details on this, see
33298  * g_socket_set_timeout().
33299  *
33300  * Returns: the timeout in seconds
33301  * Since: 2.26
33302  */
33303
33304
33305 /**
33306  * g_socket_is_closed:
33307  * @socket: a #GSocket
33308  *
33309  * Checks whether a socket is closed.
33310  *
33311  * Returns: %TRUE if socket is closed, %FALSE otherwise
33312  * Since: 2.22
33313  */
33314
33315
33316 /**
33317  * g_socket_is_connected:
33318  * @socket: a #GSocket.
33319  *
33320  * Check whether the socket is connected. This is only useful for
33321  * connection-oriented sockets.
33322  *
33323  * Returns: %TRUE if socket is connected, %FALSE otherwise.
33324  * Since: 2.22
33325  */
33326
33327
33328 /**
33329  * g_socket_listen:
33330  * @socket: a #GSocket.
33331  * @error: #GError for error reporting, or %NULL to ignore.
33332  *
33333  * Marks the socket as a server socket, i.e. a socket that is used
33334  * to accept incoming requests using g_socket_accept().
33335  *
33336  * Before calling this the socket must be bound to a local address using
33337  * g_socket_bind().
33338  *
33339  * To set the maximum amount of outstanding clients, use
33340  * g_socket_set_listen_backlog().
33341  *
33342  * Returns: %TRUE on success, %FALSE on error.
33343  * Since: 2.22
33344  */
33345
33346
33347 /**
33348  * g_socket_listener_accept:
33349  * @listener: a #GSocketListener
33350  * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL
33351  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
33352  * @error: #GError for error reporting, or %NULL to ignore.
33353  *
33354  * Blocks waiting for a client to connect to any of the sockets added
33355  * to the listener. Returns a #GSocketConnection for the socket that was
33356  * accepted.
33357  *
33358  * If @source_object is not %NULL it will be filled out with the source
33359  * object specified when the corresponding socket or address was added
33360  * to the listener.
33361  *
33362  * If @cancellable is not %NULL, then the operation can be cancelled by
33363  * triggering the cancellable object from another thread. If the operation
33364  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
33365  *
33366  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
33367  * Since: 2.22
33368  */
33369
33370
33371 /**
33372  * g_socket_listener_accept_async:
33373  * @listener: a #GSocketListener
33374  * @cancellable: (allow-none): a #GCancellable, or %NULL
33375  * @callback: (scope async): a #GAsyncReadyCallback
33376  * @user_data: (closure): user data for the callback
33377  *
33378  * This is the asynchronous version of g_socket_listener_accept().
33379  *
33380  * When the operation is finished @callback will be
33381  * called. You can then call g_socket_listener_accept_socket()
33382  * to get the result of the operation.
33383  *
33384  * Since: 2.22
33385  */
33386
33387
33388 /**
33389  * g_socket_listener_accept_finish:
33390  * @listener: a #GSocketListener
33391  * @result: a #GAsyncResult.
33392  * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
33393  * @error: a #GError location to store the error occurring, or %NULL to ignore.
33394  *
33395  * Finishes an async accept operation. See g_socket_listener_accept_async()
33396  *
33397  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
33398  * Since: 2.22
33399  */
33400
33401
33402 /**
33403  * g_socket_listener_accept_socket:
33404  * @listener: a #GSocketListener
33405  * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL.
33406  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
33407  * @error: #GError for error reporting, or %NULL to ignore.
33408  *
33409  * Blocks waiting for a client to connect to any of the sockets added
33410  * to the listener. Returns the #GSocket that was accepted.
33411  *
33412  * If you want to accept the high-level #GSocketConnection, not a #GSocket,
33413  * which is often the case, then you should use g_socket_listener_accept()
33414  * instead.
33415  *
33416  * If @source_object is not %NULL it will be filled out with the source
33417  * object specified when the corresponding socket or address was added
33418  * to the listener.
33419  *
33420  * If @cancellable is not %NULL, then the operation can be cancelled by
33421  * triggering the cancellable object from another thread. If the operation
33422  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
33423  *
33424  * Returns: (transfer full): a #GSocket on success, %NULL on error.
33425  * Since: 2.22
33426  */
33427
33428
33429 /**
33430  * g_socket_listener_accept_socket_async:
33431  * @listener: a #GSocketListener
33432  * @cancellable: (allow-none): a #GCancellable, or %NULL
33433  * @callback: (scope async): a #GAsyncReadyCallback
33434  * @user_data: (closure): user data for the callback
33435  *
33436  * This is the asynchronous version of g_socket_listener_accept_socket().
33437  *
33438  * When the operation is finished @callback will be
33439  * called. You can then call g_socket_listener_accept_socket_finish()
33440  * to get the result of the operation.
33441  *
33442  * Since: 2.22
33443  */
33444
33445
33446 /**
33447  * g_socket_listener_accept_socket_finish:
33448  * @listener: a #GSocketListener
33449  * @result: a #GAsyncResult.
33450  * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
33451  * @error: a #GError location to store the error occurring, or %NULL to ignore.
33452  *
33453  * Finishes an async accept operation. See g_socket_listener_accept_socket_async()
33454  *
33455  * Returns: (transfer full): a #GSocket on success, %NULL on error.
33456  * Since: 2.22
33457  */
33458
33459
33460 /**
33461  * g_socket_listener_add_address:
33462  * @listener: a #GSocketListener
33463  * @address: a #GSocketAddress
33464  * @type: a #GSocketType
33465  * @protocol: a #GSocketProtocol
33466  * @source_object: (allow-none): Optional #GObject identifying this source
33467  * @effective_address: (out) (allow-none): location to store the address that was bound to, or %NULL.
33468  * @error: #GError for error reporting, or %NULL to ignore.
33469  *
33470  * Creates a socket of type @type and protocol @protocol, binds
33471  * it to @address and adds it to the set of sockets we're accepting
33472  * sockets from.
33473  *
33474  * Note that adding an IPv6 address, depending on the platform,
33475  * may or may not result in a listener that also accepts IPv4
33476  * connections.  For more deterministic behavior, see
33477  * g_socket_listener_add_inet_port().
33478  *
33479  * @source_object will be passed out in the various calls
33480  * to accept to identify this particular source, which is
33481  * useful if you're listening on multiple addresses and do
33482  * different things depending on what address is connected to.
33483  *
33484  * If successful and @effective_address is non-%NULL then it will
33485  * be set to the address that the binding actually occurred at.  This
33486  * is helpful for determining the port number that was used for when
33487  * requesting a binding to port 0 (ie: "any port").  This address, if
33488  * requested, belongs to the caller and must be freed.
33489  *
33490  * Returns: %TRUE on success, %FALSE on error.
33491  * Since: 2.22
33492  */
33493
33494
33495 /**
33496  * g_socket_listener_add_any_inet_port:
33497  * @listener: a #GSocketListener
33498  * @source_object: (allow-none): Optional #GObject identifying this source
33499  * @error: a #GError location to store the error occurring, or %NULL to ignore.
33500  *
33501  * Listens for TCP connections on any available port number for both
33502  * IPv6 and IPv4 (if each is available).
33503  *
33504  * This is useful if you need to have a socket for incoming connections
33505  * but don't care about the specific port number.
33506  *
33507  * @source_object will be passed out in the various calls
33508  * to accept to identify this particular source, which is
33509  * useful if you're listening on multiple addresses and do
33510  * different things depending on what address is connected to.
33511  *
33512  * Returns: the port number, or 0 in case of failure.
33513  * Since: 2.24
33514  */
33515
33516
33517 /**
33518  * g_socket_listener_add_inet_port:
33519  * @listener: a #GSocketListener
33520  * @port: an IP port number (non-zero)
33521  * @source_object: (allow-none): Optional #GObject identifying this source
33522  * @error: #GError for error reporting, or %NULL to ignore.
33523  *
33524  * Helper function for g_socket_listener_add_address() that
33525  * creates a TCP/IP socket listening on IPv4 and IPv6 (if
33526  * supported) on the specified port on all interfaces.
33527  *
33528  * @source_object will be passed out in the various calls
33529  * to accept to identify this particular source, which is
33530  * useful if you're listening on multiple addresses and do
33531  * different things depending on what address is connected to.
33532  *
33533  * Returns: %TRUE on success, %FALSE on error.
33534  * Since: 2.22
33535  */
33536
33537
33538 /**
33539  * g_socket_listener_add_socket:
33540  * @listener: a #GSocketListener
33541  * @socket: a listening #GSocket
33542  * @source_object: (allow-none): Optional #GObject identifying this source
33543  * @error: #GError for error reporting, or %NULL to ignore.
33544  *
33545  * Adds @socket to the set of sockets that we try to accept
33546  * new clients from. The socket must be bound to a local
33547  * address and listened to.
33548  *
33549  * @source_object will be passed out in the various calls
33550  * to accept to identify this particular source, which is
33551  * useful if you're listening on multiple addresses and do
33552  * different things depending on what address is connected to.
33553  *
33554  * Returns: %TRUE on success, %FALSE on error.
33555  * Since: 2.22
33556  */
33557
33558
33559 /**
33560  * g_socket_listener_close:
33561  * @listener: a #GSocketListener
33562  *
33563  * Closes all the sockets in the listener.
33564  *
33565  * Since: 2.22
33566  */
33567
33568
33569 /**
33570  * g_socket_listener_new:
33571  *
33572  * Creates a new #GSocketListener with no sockets to listen for.
33573  * New listeners can be added with e.g. g_socket_listener_add_address()
33574  * or g_socket_listener_add_inet_port().
33575  *
33576  * Returns: a new #GSocketListener.
33577  * Since: 2.22
33578  */
33579
33580
33581 /**
33582  * g_socket_listener_set_backlog:
33583  * @listener: a #GSocketListener
33584  * @listen_backlog: an integer
33585  *
33586  * Sets the listen backlog on the sockets in the listener.
33587  *
33588  * See g_socket_set_listen_backlog() for details
33589  *
33590  * Since: 2.22
33591  */
33592
33593
33594 /**
33595  * g_socket_new:
33596  * @family: the socket family to use, e.g. %G_SOCKET_FAMILY_IPV4.
33597  * @type: the socket type to use.
33598  * @protocol: the id of the protocol to use, or 0 for default.
33599  * @error: #GError for error reporting, or %NULL to ignore.
33600  *
33601  * Creates a new #GSocket with the defined family, type and protocol.
33602  * If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type
33603  * for the family and type is used.
33604  *
33605  * The @protocol is a family and type specific int that specifies what
33606  * kind of protocol to use. #GSocketProtocol lists several common ones.
33607  * Many families only support one protocol, and use 0 for this, others
33608  * support several and using 0 means to use the default protocol for
33609  * the family and type.
33610  *
33611  * The protocol id is passed directly to the operating
33612  * system, so you can use protocols not listed in #GSocketProtocol if you
33613  * know the protocol number used for it.
33614  *
33615  * Free the returned object with g_object_unref().
33616  *
33617  * Returns: a #GSocket or %NULL on error.
33618  * Since: 2.22
33619  */
33620
33621
33622 /**
33623  * g_socket_new_from_fd:
33624  * @fd: a native socket file descriptor.
33625  * @error: #GError for error reporting, or %NULL to ignore.
33626  *
33627  * Creates a new #GSocket from a native file descriptor
33628  * or winsock SOCKET handle.
33629  *
33630  * This reads all the settings from the file descriptor so that
33631  * all properties should work. Note that the file descriptor
33632  * will be set to non-blocking mode, independent on the blocking
33633  * mode of the #GSocket.
33634  *
33635  * Free the returned object with g_object_unref().
33636  *
33637  * Returns: a #GSocket or %NULL on error.
33638  * Since: 2.22
33639  */
33640
33641
33642 /**
33643  * g_socket_receive:
33644  * @socket: a #GSocket
33645  * @buffer: a buffer to read data into (which should be at least @size bytes long).
33646  * @size: the number of bytes you want to read from the socket
33647  * @cancellable: (allow-none): a %GCancellable or %NULL
33648  * @error: #GError for error reporting, or %NULL to ignore.
33649  *
33650  * Receive data (up to @size bytes) from a socket. This is mainly used by
33651  * connection-oriented sockets; it is identical to g_socket_receive_from()
33652  * with @address set to %NULL.
33653  *
33654  * For %G_SOCKET_TYPE_DATAGRAM and %G_SOCKET_TYPE_SEQPACKET sockets,
33655  * g_socket_receive() will always read either 0 or 1 complete messages from
33656  * the socket. If the received message is too large to fit in @buffer, then
33657  * the data beyond @size bytes will be discarded, without any explicit
33658  * indication that this has occurred.
33659  *
33660  * For %G_SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any
33661  * number of bytes, up to @size. If more than @size bytes have been
33662  * received, the additional data will be returned in future calls to
33663  * g_socket_receive().
33664  *
33665  * If the socket is in blocking mode the call will block until there
33666  * is some data to receive, the connection is closed, or there is an
33667  * error. If there is no data available and the socket is in
33668  * non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error will be
33669  * returned. To be notified when data is available, wait for the
33670  * %G_IO_IN condition.
33671  *
33672  * On error -1 is returned and @error is set accordingly.
33673  *
33674  * the peer, or -1 on error
33675  *
33676  * Returns: Number of bytes read, or 0 if the connection was closed by
33677  * Since: 2.22
33678  */
33679
33680
33681 /**
33682  * g_socket_receive_from:
33683  * @socket: a #GSocket
33684  * @address: a pointer to a #GSocketAddress pointer, or %NULL
33685  * @buffer: a buffer to read data into (which should be at least @size bytes long).
33686  * @size: the number of bytes you want to read from the socket
33687  * @cancellable: (allow-none): a %GCancellable or %NULL
33688  * @error: #GError for error reporting, or %NULL to ignore.
33689  *
33690  * Receive data (up to @size bytes) from a socket.
33691  *
33692  * If @address is non-%NULL then @address will be set equal to the
33693  * source address of the received packet.
33694  * @address is owned by the caller.
33695  *
33696  * See g_socket_receive() for additional information.
33697  *
33698  * the peer, or -1 on error
33699  *
33700  * Returns: Number of bytes read, or 0 if the connection was closed by
33701  * Since: 2.22
33702  */
33703
33704
33705 /**
33706  * g_socket_receive_message:
33707  * @socket: a #GSocket
33708  * @address: a pointer to a #GSocketAddress pointer, or %NULL
33709  * @vectors: (array length=num_vectors): an array of #GInputVector structs
33710  * @num_vectors: the number of elements in @vectors, or -1
33711  * @messages: (array length=num_messages) (allow-none): a pointer which may be filled with an array of #GSocketControlMessages, or %NULL
33712  * @num_messages: a pointer which will be filled with the number of elements in @messages, or %NULL
33713  * @flags: a pointer to an int containing #GSocketMsgFlags flags
33714  * @cancellable: (allow-none): a %GCancellable or %NULL
33715  * @error: a #GError pointer, or %NULL
33716  *
33717  * Receive data from a socket.  This is the most complicated and
33718  * fully-featured version of this call. For easier use, see
33719  * g_socket_receive() and g_socket_receive_from().
33720  *
33721  * If @address is non-%NULL then @address will be set equal to the
33722  * source address of the received packet.
33723  * @address is owned by the caller.
33724  *
33725  * @vector must point to an array of #GInputVector structs and
33726  * @num_vectors must be the length of this array.  These structs
33727  * describe the buffers that received data will be scattered into.
33728  * If @num_vectors is -1, then @vectors is assumed to be terminated
33729  * by a #GInputVector with a %NULL buffer pointer.
33730  *
33731  * As a special case, if @num_vectors is 0 (in which case, @vectors
33732  * may of course be %NULL), then a single byte is received and
33733  * discarded. This is to facilitate the common practice of sending a
33734  * single '\0' byte for the purposes of transferring ancillary data.
33735  *
33736  * @messages, if non-%NULL, will be set to point to a newly-allocated
33737  * array of #GSocketControlMessage instances or %NULL if no such
33738  * messages was received. These correspond to the control messages
33739  * received from the kernel, one #GSocketControlMessage per message
33740  * from the kernel. This array is %NULL-terminated and must be freed
33741  * by the caller using g_free() after calling g_object_unref() on each
33742  * element. If @messages is %NULL, any control messages received will
33743  * be discarded.
33744  *
33745  * @num_messages, if non-%NULL, will be set to the number of control
33746  * messages received.
33747  *
33748  * If both @messages and @num_messages are non-%NULL, then
33749  * @num_messages gives the number of #GSocketControlMessage instances
33750  * in @messages (ie: not including the %NULL terminator).
33751  *
33752  * @flags is an in/out parameter. The commonly available arguments
33753  * for this are available in the #GSocketMsgFlags enum, but the
33754  * values there are the same as the system values, and the flags
33755  * are passed in as-is, so you can pass in system-specific flags too
33756  * (and g_socket_receive_message() may pass system-specific flags out).
33757  *
33758  * As with g_socket_receive(), data may be discarded if @socket is
33759  * %G_SOCKET_TYPE_DATAGRAM or %G_SOCKET_TYPE_SEQPACKET and you do not
33760  * provide enough buffer space to read a complete message. You can pass
33761  * %G_SOCKET_MSG_PEEK in @flags to peek at the current message without
33762  * removing it from the receive queue, but there is no portable way to find
33763  * out the length of the message other than by reading it into a
33764  * sufficiently-large buffer.
33765  *
33766  * If the socket is in blocking mode the call will block until there
33767  * is some data to receive, the connection is closed, or there is an
33768  * error. If there is no data available and the socket is in
33769  * non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error will be
33770  * returned. To be notified when data is available, wait for the
33771  * %G_IO_IN condition.
33772  *
33773  * On error -1 is returned and @error is set accordingly.
33774  *
33775  * the peer, or -1 on error
33776  *
33777  * Returns: Number of bytes read, or 0 if the connection was closed by
33778  * Since: 2.22
33779  */
33780
33781
33782 /**
33783  * g_socket_receive_with_blocking:
33784  * @socket: a #GSocket
33785  * @buffer: a buffer to read data into (which should be at least @size bytes long).
33786  * @size: the number of bytes you want to read from the socket
33787  * @blocking: whether to do blocking or non-blocking I/O
33788  * @cancellable: (allow-none): a %GCancellable or %NULL
33789  * @error: #GError for error reporting, or %NULL to ignore.
33790  *
33791  * This behaves exactly the same as g_socket_receive(), except that
33792  * the choice of blocking or non-blocking behavior is determined by
33793  * the @blocking argument rather than by @socket's properties.
33794  *
33795  * the peer, or -1 on error
33796  *
33797  * Returns: Number of bytes read, or 0 if the connection was closed by
33798  * Since: 2.26
33799  */
33800
33801
33802 /**
33803  * g_socket_send:
33804  * @socket: a #GSocket
33805  * @buffer: (array length=size): the buffer containing the data to send.
33806  * @size: the number of bytes to send
33807  * @cancellable: (allow-none): a %GCancellable or %NULL
33808  * @error: #GError for error reporting, or %NULL to ignore.
33809  *
33810  * Tries to send @size bytes from @buffer on the socket. This is
33811  * mainly used by connection-oriented sockets; it is identical to
33812  * g_socket_send_to() with @address set to %NULL.
33813  *
33814  * If the socket is in blocking mode the call will block until there is
33815  * space for the data in the socket queue. If there is no space available
33816  * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
33817  * will be returned. To be notified when space is available, wait for the
33818  * %G_IO_OUT condition. Note though that you may still receive
33819  * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
33820  * notified of a %G_IO_OUT condition. (On Windows in particular, this is
33821  * very common due to the way the underlying APIs work.)
33822  *
33823  * On error -1 is returned and @error is set accordingly.
33824  *
33825  * on error
33826  *
33827  * Returns: Number of bytes written (which may be less than @size), or -1
33828  * Since: 2.22
33829  */
33830
33831
33832 /**
33833  * g_socket_send_message:
33834  * @socket: a #GSocket
33835  * @address: a #GSocketAddress, or %NULL
33836  * @vectors: (array length=num_vectors): an array of #GOutputVector structs
33837  * @num_vectors: the number of elements in @vectors, or -1
33838  * @messages: (array length=num_messages) (allow-none): a pointer to an array of #GSocketControlMessages, or %NULL.
33839  * @num_messages: number of elements in @messages, or -1.
33840  * @flags: an int containing #GSocketMsgFlags flags
33841  * @cancellable: (allow-none): a %GCancellable or %NULL
33842  * @error: #GError for error reporting, or %NULL to ignore.
33843  *
33844  * Send data to @address on @socket.  This is the most complicated and
33845  * fully-featured version of this call. For easier use, see
33846  * g_socket_send() and g_socket_send_to().
33847  *
33848  * If @address is %NULL then the message is sent to the default receiver
33849  * (set by g_socket_connect()).
33850  *
33851  * @vectors must point to an array of #GOutputVector structs and
33852  * @num_vectors must be the length of this array. (If @num_vectors is -1,
33853  * then @vectors is assumed to be terminated by a #GOutputVector with a
33854  * %NULL buffer pointer.) The #GOutputVector structs describe the buffers
33855  * that the sent data will be gathered from. Using multiple
33856  * #GOutputVector<!-- -->s is more memory-efficient than manually copying
33857  * data from multiple sources into a single buffer, and more
33858  * network-efficient than making multiple calls to g_socket_send().
33859  *
33860  * @messages, if non-%NULL, is taken to point to an array of @num_messages
33861  * #GSocketControlMessage instances. These correspond to the control
33862  * messages to be sent on the socket.
33863  * If @num_messages is -1 then @messages is treated as a %NULL-terminated
33864  * array.
33865  *
33866  * @flags modify how the message is sent. The commonly available arguments
33867  * for this are available in the #GSocketMsgFlags enum, but the
33868  * values there are the same as the system values, and the flags
33869  * are passed in as-is, so you can pass in system-specific flags too.
33870  *
33871  * If the socket is in blocking mode the call will block until there is
33872  * space for the data in the socket queue. If there is no space available
33873  * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
33874  * will be returned. To be notified when space is available, wait for the
33875  * %G_IO_OUT condition. Note though that you may still receive
33876  * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
33877  * notified of a %G_IO_OUT condition. (On Windows in particular, this is
33878  * very common due to the way the underlying APIs work.)
33879  *
33880  * On error -1 is returned and @error is set accordingly.
33881  *
33882  * on error
33883  *
33884  * Returns: Number of bytes written (which may be less than @size), or -1
33885  * Since: 2.22
33886  */
33887
33888
33889 /**
33890  * g_socket_send_to:
33891  * @socket: a #GSocket
33892  * @address: a #GSocketAddress, or %NULL
33893  * @buffer: (array length=size): the buffer containing the data to send.
33894  * @size: the number of bytes to send
33895  * @cancellable: (allow-none): a %GCancellable or %NULL
33896  * @error: #GError for error reporting, or %NULL to ignore.
33897  *
33898  * Tries to send @size bytes from @buffer to @address. If @address is
33899  * %NULL then the message is sent to the default receiver (set by
33900  * g_socket_connect()).
33901  *
33902  * See g_socket_send() for additional information.
33903  *
33904  * on error
33905  *
33906  * Returns: Number of bytes written (which may be less than @size), or -1
33907  * Since: 2.22
33908  */
33909
33910
33911 /**
33912  * g_socket_send_with_blocking:
33913  * @socket: a #GSocket
33914  * @buffer: (array length=size): the buffer containing the data to send.
33915  * @size: the number of bytes to send
33916  * @blocking: whether to do blocking or non-blocking I/O
33917  * @cancellable: (allow-none): a %GCancellable or %NULL
33918  * @error: #GError for error reporting, or %NULL to ignore.
33919  *
33920  * This behaves exactly the same as g_socket_send(), except that
33921  * the choice of blocking or non-blocking behavior is determined by
33922  * the @blocking argument rather than by @socket's properties.
33923  *
33924  * on error
33925  *
33926  * Returns: Number of bytes written (which may be less than @size), or -1
33927  * Since: 2.26
33928  */
33929
33930
33931 /**
33932  * g_socket_service_is_active:
33933  * @service: a #GSocketService
33934  *
33935  * Check whether the service is active or not. An active
33936  * service will accept new clients that connect, while
33937  * a non-active service will let connecting clients queue
33938  * up until the service is started.
33939  *
33940  * Returns: %TRUE if the service is active, %FALSE otherwise
33941  * Since: 2.22
33942  */
33943
33944
33945 /**
33946  * g_socket_service_new:
33947  *
33948  * Creates a new #GSocketService with no sockets to listen for.
33949  * New listeners can be added with e.g. g_socket_listener_add_address()
33950  * or g_socket_listener_add_inet_port().
33951  *
33952  * Returns: a new #GSocketService.
33953  * Since: 2.22
33954  */
33955
33956
33957 /**
33958  * g_socket_service_start:
33959  * @service: a #GSocketService
33960  *
33961  * Starts the service, i.e. start accepting connections
33962  * from the added sockets when the mainloop runs.
33963  *
33964  * This call is threadsafe, so it may be called from a thread
33965  * handling an incoming client request.
33966  *
33967  * Since: 2.22
33968  */
33969
33970
33971 /**
33972  * g_socket_service_stop:
33973  * @service: a #GSocketService
33974  *
33975  * Stops the service, i.e. stops accepting connections
33976  * from the added sockets when the mainloop runs.
33977  *
33978  * This call is threadsafe, so it may be called from a thread
33979  * handling an incoming client request.
33980  *
33981  * Since: 2.22
33982  */
33983
33984
33985 /**
33986  * g_socket_set_blocking:
33987  * @socket: a #GSocket.
33988  * @blocking: Whether to use blocking I/O or not.
33989  *
33990  * Sets the blocking mode of the socket. In blocking mode
33991  * all operations block until they succeed or there is an error. In
33992  * non-blocking mode all functions return results immediately or
33993  * with a %G_IO_ERROR_WOULD_BLOCK error.
33994  *
33995  * All sockets are created in blocking mode. However, note that the
33996  * platform level socket is always non-blocking, and blocking mode
33997  * is a GSocket level feature.
33998  *
33999  * Since: 2.22
34000  */
34001
34002
34003 /**
34004  * g_socket_set_keepalive:
34005  * @socket: a #GSocket.
34006  * @keepalive: Value for the keepalive flag
34007  *
34008  * Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When
34009  * this flag is set on a socket, the system will attempt to verify that the
34010  * remote socket endpoint is still present if a sufficiently long period of
34011  * time passes with no data being exchanged. If the system is unable to
34012  * verify the presence of the remote endpoint, it will automatically close
34013  * the connection.
34014  *
34015  * This option is only functional on certain kinds of sockets. (Notably,
34016  * %G_SOCKET_PROTOCOL_TCP sockets.)
34017  *
34018  * The exact time between pings is system- and protocol-dependent, but will
34019  * normally be at least two hours. Most commonly, you would set this flag
34020  * on a server socket if you want to allow clients to remain idle for long
34021  * periods of time, but also want to ensure that connections are eventually
34022  * garbage-collected if clients crash or become unreachable.
34023  *
34024  * Since: 2.22
34025  */
34026
34027
34028 /**
34029  * g_socket_set_listen_backlog:
34030  * @socket: a #GSocket.
34031  * @backlog: the maximum number of pending connections.
34032  *
34033  * Sets the maximum number of outstanding connections allowed
34034  * when listening on this socket. If more clients than this are
34035  * connecting to the socket and the application is not handling them
34036  * on time then the new connections will be refused.
34037  *
34038  * Note that this must be called before g_socket_listen() and has no
34039  * effect if called after that.
34040  *
34041  * Since: 2.22
34042  */
34043
34044
34045 /**
34046  * g_socket_set_timeout:
34047  * @socket: a #GSocket.
34048  * @timeout: the timeout for @socket, in seconds, or 0 for none
34049  *
34050  * Sets the time in seconds after which I/O operations on @socket will
34051  * time out if they have not yet completed.
34052  *
34053  * On a blocking socket, this means that any blocking #GSocket
34054  * operation will time out after @timeout seconds of inactivity,
34055  * returning %G_IO_ERROR_TIMED_OUT.
34056  *
34057  * On a non-blocking socket, calls to g_socket_condition_wait() will
34058  * also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources
34059  * created with g_socket_create_source() will trigger after
34060  * @timeout seconds of inactivity, with the requested condition
34061  * set, at which point calling g_socket_receive(), g_socket_send(),
34062  * g_socket_check_connect_result(), etc, will fail with
34063  * %G_IO_ERROR_TIMED_OUT.
34064  *
34065  * If @timeout is 0 (the default), operations will never time out
34066  * on their own.
34067  *
34068  * Note that if an I/O operation is interrupted by a signal, this may
34069  * cause the timeout to be reset.
34070  *
34071  * Since: 2.26
34072  */
34073
34074
34075 /**
34076  * g_socket_shutdown:
34077  * @socket: a #GSocket
34078  * @shutdown_read: whether to shut down the read side
34079  * @shutdown_write: whether to shut down the write side
34080  * @error: #GError for error reporting, or %NULL to ignore.
34081  *
34082  * Shut down part of a full-duplex connection.
34083  *
34084  * If @shutdown_read is %TRUE then the recieving side of the connection
34085  * is shut down, and further reading is disallowed.
34086  *
34087  * If @shutdown_write is %TRUE then the sending side of the connection
34088  * is shut down, and further writing is disallowed.
34089  *
34090  * It is allowed for both @shutdown_read and @shutdown_write to be %TRUE.
34091  *
34092  * One example where this is used is graceful disconnect for TCP connections
34093  * where you close the sending side, then wait for the other side to close
34094  * the connection, thus ensuring that the other side saw all sent data.
34095  *
34096  * Returns: %TRUE on success, %FALSE on error
34097  * Since: 2.22
34098  */
34099
34100
34101 /**
34102  * g_socket_speaks_ipv4:
34103  * @socket: a #GSocket
34104  *
34105  * Checks if a socket is capable of speaking IPv4.
34106  *
34107  * IPv4 sockets are capable of speaking IPv4.  On some operating systems
34108  * and under some combinations of circumstances IPv6 sockets are also
34109  * capable of speaking IPv4.  See RFC 3493 section 3.7 for more
34110  * information.
34111  *
34112  * No other types of sockets are currently considered as being capable
34113  * of speaking IPv4.
34114  *
34115  * Returns: %TRUE if this socket can be used with IPv4.
34116  * Since: 2.22
34117  */
34118
34119
34120 /**
34121  * g_srv_target_copy:
34122  * @target: a #GSrvTarget
34123  *
34124  * Copies @target
34125  *
34126  * Returns: a copy of @target
34127  * Since: 2.22
34128  */
34129
34130
34131 /**
34132  * g_srv_target_free:
34133  * @target: a #GSrvTarget
34134  *
34135  * Frees @target
34136  *
34137  * Since: 2.22
34138  */
34139
34140
34141 /**
34142  * g_srv_target_get_hostname:
34143  * @target: a #GSrvTarget
34144  *
34145  * Gets @target's hostname (in ASCII form; if you are going to present
34146  * this to the user, you should use g_hostname_is_ascii_encoded() to
34147  * check if it contains encoded Unicode segments, and use
34148  * g_hostname_to_unicode() to convert it if it does.)
34149  *
34150  * Returns: @target's hostname
34151  * Since: 2.22
34152  */
34153
34154
34155 /**
34156  * g_srv_target_get_port:
34157  * @target: a #GSrvTarget
34158  *
34159  * Gets @target's port
34160  *
34161  * Returns: @target's port
34162  * Since: 2.22
34163  */
34164
34165
34166 /**
34167  * g_srv_target_get_priority:
34168  * @target: a #GSrvTarget
34169  *
34170  * Gets @target's priority. You should not need to look at this;
34171  * #GResolver already sorts the targets according to the algorithm in
34172  * RFC 2782.
34173  *
34174  * Returns: @target's priority
34175  * Since: 2.22
34176  */
34177
34178
34179 /**
34180  * g_srv_target_get_weight:
34181  * @target: a #GSrvTarget
34182  *
34183  * Gets @target's weight. You should not need to look at this;
34184  * #GResolver already sorts the targets according to the algorithm in
34185  * RFC 2782.
34186  *
34187  * Returns: @target's weight
34188  * Since: 2.22
34189  */
34190
34191
34192 /**
34193  * g_srv_target_list_sort: (skip)
34194  * @targets: a #GList of #GSrvTarget
34195  *
34196  * Sorts @targets in place according to the algorithm in RFC 2782.
34197  *
34198  * Returns: (transfer full): the head of the sorted list.
34199  * Since: 2.22
34200  */
34201
34202
34203 /**
34204  * g_srv_target_new:
34205  * @hostname: the host that the service is running on
34206  * @port: the port that the service is running on
34207  * @priority: the target's priority
34208  * @weight: the target's weight
34209  *
34210  * Creates a new #GSrvTarget with the given parameters.
34211  *
34212  * You should not need to use this; normally #GSrvTarget<!-- -->s are
34213  * created by #GResolver.
34214  *
34215  * Returns: a new #GSrvTarget.
34216  * Since: 2.22
34217  */
34218
34219
34220 /**
34221  * g_tcp_connection_get_graceful_disconnect:
34222  * @connection: a #GTcpConnection
34223  *
34224  * Checks if graceful disconnects are used. See
34225  * g_tcp_connection_set_graceful_disconnect().
34226  *
34227  * Returns: %TRUE if graceful disconnect is used on close, %FALSE otherwise
34228  * Since: 2.22
34229  */
34230
34231
34232 /**
34233  * g_tcp_connection_set_graceful_disconnect:
34234  * @connection: a #GTcpConnection
34235  * @graceful_disconnect: Whether to do graceful disconnects or not
34236  *
34237  * This enabled graceful disconnects on close. A graceful disconnect
34238  * means that we signal the receiving end that the connection is terminated
34239  * and wait for it to close the connection before closing the connection.
34240  *
34241  * A graceful disconnect means that we can be sure that we successfully sent
34242  * all the outstanding data to the other end, or get an error reported.
34243  * However, it also means we have to wait for all the data to reach the
34244  * other side and for it to acknowledge this by closing the socket, which may
34245  * take a while. For this reason it is disabled by default.
34246  *
34247  * Since: 2.22
34248  */
34249
34250
34251 /**
34252  * g_tcp_wrapper_connection_get_base_io_stream:
34253  * @conn: a #GTcpWrapperConnection
34254  *
34255  * Get's @conn's base #GIOStream
34256  *
34257  * Returns: (transfer none): @conn's base #GIOStream
34258  */
34259
34260
34261 /**
34262  * g_tcp_wrapper_connection_new:
34263  * @base_io_stream: the #GIOStream to wrap
34264  * @socket: the #GSocket associated with @base_io_stream
34265  *
34266  * Wraps @base_io_stream and @socket together as a #GSocketConnection.
34267  *
34268  * Returns: the new #GSocketConnection.
34269  * Since: 2.28
34270  */
34271
34272
34273 /**
34274  * g_themed_icon_append_name:
34275  * @icon: a #GThemedIcon
34276  * @iconname: name of icon to append to list of icons from within @icon.
34277  *
34278  * Append a name to the list of icons from within @icon.
34279  *
34280  * <note><para>
34281  * Note that doing so invalidates the hash computed by prior calls
34282  * to g_icon_hash().
34283  * </para></note>
34284  */
34285
34286
34287 /**
34288  * g_themed_icon_get_names:
34289  * @icon: a #GThemedIcon.
34290  *
34291  * Gets the names of icons from within @icon.
34292  *
34293  * Returns: (transfer none): a list of icon names.
34294  */
34295
34296
34297 /**
34298  * g_themed_icon_new:
34299  * @iconname: a string containing an icon name.
34300  *
34301  * Creates a new themed icon for @iconname.
34302  *
34303  * Returns: (transfer full): a new #GThemedIcon.
34304  */
34305
34306
34307 /**
34308  * g_themed_icon_new_from_names:
34309  * @iconnames: (array length=len): an array of strings containing icon names.
34310  * @len: the length of the @iconnames array, or -1 if @iconnames is %NULL-terminated
34311  *
34312  * Creates a new themed icon for @iconnames.
34313  *
34314  * Returns: (transfer full): a new #GThemedIcon
34315  */
34316
34317
34318 /**
34319  * g_themed_icon_new_with_default_fallbacks:
34320  * @iconname: a string containing an icon name
34321  *
34322  * Creates a new themed icon for @iconname, and all the names
34323  * that can be created by shortening @iconname at '-' characters.
34324  *
34325  * In the following example, @icon1 and @icon2 are equivalent:
34326  * |[
34327  * const char *names[] = {
34328  * "gnome-dev-cdrom-audio",
34329  * "gnome-dev-cdrom",
34330  * "gnome-dev",
34331  * "gnome"
34332  * };
34333  *
34334  * icon1 = g_themed_icon_new_from_names (names, 4);
34335  * icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
34336  * ]|
34337  *
34338  * Returns: (transfer full): a new #GThemedIcon.
34339  */
34340
34341
34342 /**
34343  * g_themed_icon_prepend_name:
34344  * @icon: a #GThemedIcon
34345  * @iconname: name of icon to prepend to list of icons from within @icon.
34346  *
34347  * Prepend a name to the list of icons from within @icon.
34348  *
34349  * <note><para>
34350  * Note that doing so invalidates the hash computed by prior calls
34351  * to g_icon_hash().
34352  * </para></note>
34353  *
34354  * Since: 2.18
34355  */
34356
34357
34358 /**
34359  * g_threaded_socket_service_new:
34360  * @max_threads: the maximal number of threads to execute concurrently handling incoming clients, -1 means no limit
34361  *
34362  * Creates a new #GThreadedSocketService with no listeners. Listeners
34363  * must be added with one of the #GSocketListener "add" methods.
34364  *
34365  * Returns: a new #GSocketService.
34366  * Since: 2.22
34367  */
34368
34369
34370 /**
34371  * g_time_zone_monitor_get:
34372  *
34373  * Gets the singleton instance of the #GTimeZoneMonitor class, creating
34374  * it if required.
34375  *
34376  * You should call g_object_unref() on the result when you no longer
34377  * need it.  Be aware, though, that this will not destroy the instance,
34378  * so if you connected to the changed signal, you are required to
34379  * disconnect from it for yourself.
34380  *
34381  * There is only one instance of #GTimeZoneMonitor and it dispatches its
34382  * signals via the default #GMainContext.  There is no way to create an
34383  * instance that will dispatch signals using a different context.
34384  *
34385  * Returns: (transfer full): a reference to the #GTimeZoneMonitor.
34386  */
34387
34388
34389 /**
34390  * g_tls_backend_get_certificate_type:
34391  * @backend: the #GTlsBackend
34392  *
34393  * Gets the #GType of @backend's #GTlsCertificate implementation.
34394  *
34395  * implementation.
34396  *
34397  * Returns: the #GType of @backend's #GTlsCertificate
34398  * Since: 2.28
34399  */
34400
34401
34402 /**
34403  * g_tls_backend_get_client_connection_type:
34404  * @backend: the #GTlsBackend
34405  *
34406  * Gets the #GType of @backend's #GTlsClientConnection implementation.
34407  *
34408  * implementation.
34409  *
34410  * Returns: the #GType of @backend's #GTlsClientConnection
34411  * Since: 2.28
34412  */
34413
34414
34415 /**
34416  * g_tls_backend_get_default:
34417  *
34418  * Gets the default #GTlsBackend for the system.
34419  *
34420  * Returns: (transfer none): a #GTlsBackend
34421  * Since: 2.28
34422  */
34423
34424
34425 /**
34426  * g_tls_backend_get_default_database:
34427  * @backend: the #GTlsBackend
34428  *
34429  * Gets the default #GTlsDatabase used to verify TLS connections.
34430  *
34431  * unreffed when done.
34432  *
34433  * Returns: (transfer full): the default database, which should be
34434  * Since: 2.30
34435  */
34436
34437
34438 /**
34439  * g_tls_backend_get_file_database_type:
34440  * @backend: the #GTlsBackend
34441  *
34442  * Gets the #GTyep of @backend's #GTlsFileDatabase implementation.
34443  *
34444  * Returns: the #GType of backend's #GTlsFileDatabase implementation.
34445  * Since: 2.30
34446  */
34447
34448
34449 /**
34450  * g_tls_backend_get_server_connection_type:
34451  * @backend: the #GTlsBackend
34452  *
34453  * Gets the #GType of @backend's #GTlsServerConnection implementation.
34454  *
34455  * implementation.
34456  *
34457  * Returns: the #GType of @backend's #GTlsServerConnection
34458  * Since: 2.28
34459  */
34460
34461
34462 /**
34463  * g_tls_backend_supports_tls:
34464  * @backend: the #GTlsBackend
34465  *
34466  * Checks if TLS is supported; if this returns %FALSE for the default
34467  * #GTlsBackend, it means no "real" TLS backend is available.
34468  *
34469  * Returns: whether or not TLS is supported
34470  * Since: 2.28
34471  */
34472
34473
34474 /**
34475  * g_tls_certificate_get_issuer:
34476  * @cert: a #GTlsCertificate
34477  *
34478  * Gets the #GTlsCertificate representing @cert's issuer, if known
34479  *
34480  * or %NULL if @cert is self-signed or signed with an unknown
34481  * certificate.
34482  *
34483  * Returns: (transfer none): The certificate of @cert's issuer,
34484  * Since: 2.28
34485  */
34486
34487
34488 /**
34489  * g_tls_certificate_list_new_from_file:
34490  * @file: file containing PEM-encoded certificates to import
34491  * @error: #GError for error reporting, or %NULL to ignore.
34492  *
34493  * Creates one or more #GTlsCertificate<!-- -->s from the PEM-encoded
34494  * data in @file. If @file cannot be read or parsed, the function will
34495  * return %NULL and set @error. If @file does not contain any
34496  * PEM-encoded certificates, this will return an empty list and not
34497  * set @error.
34498  *
34499  * #GList containing #GTlsCertificate objects. You must free the list
34500  * and its contents when you are done with it.
34501  *
34502  * Returns: (element-type Gio.TlsCertificate) (transfer full): a
34503  * Since: 2.28
34504  */
34505
34506
34507 /**
34508  * g_tls_certificate_new_from_file:
34509  * @file: file containing a PEM-encoded certificate to import
34510  * @error: #GError for error reporting, or %NULL to ignore.
34511  *
34512  * Creates a #GTlsCertificate from the PEM-encoded data in @file. If
34513  * @file cannot be read or parsed, the function will return %NULL and
34514  * set @error. Otherwise, this behaves like g_tls_certificate_new().
34515  *
34516  * Returns: the new certificate, or %NULL on error
34517  * Since: 2.28
34518  */
34519
34520
34521 /**
34522  * g_tls_certificate_new_from_files:
34523  * @cert_file: file containing a PEM-encoded certificate to import
34524  * @key_file: file containing a PEM-encoded private key to import
34525  * @error: #GError for error reporting, or %NULL to ignore.
34526  *
34527  * Creates a #GTlsCertificate from the PEM-encoded data in @cert_file
34528  * and @key_file. If either file cannot be read or parsed, the
34529  * function will return %NULL and set @error. Otherwise, this behaves
34530  * like g_tls_certificate_new().
34531  *
34532  * Returns: the new certificate, or %NULL on error
34533  * Since: 2.28
34534  */
34535
34536
34537 /**
34538  * g_tls_certificate_new_from_pem:
34539  * @data: PEM-encoded certificate data
34540  * @length: the length of @data, or -1 if it's 0-terminated.
34541  * @error: #GError for error reporting, or %NULL to ignore.
34542  *
34543  * Creates a new #GTlsCertificate from the PEM-encoded data in @data.
34544  * If @data includes both a certificate and a private key, then the
34545  * returned certificate will include the private key data as well.
34546  *
34547  * If @data includes multiple certificates, only the first one will be
34548  * parsed.
34549  *
34550  * Returns: the new certificate, or %NULL if @data is invalid
34551  * Since: 2.28
34552  */
34553
34554
34555 /**
34556  * g_tls_certificate_verify:
34557  * @cert: a #GTlsCertificate
34558  * @identity: (allow-none): the expected peer identity
34559  * @trusted_ca: (allow-none): the certificate of a trusted authority
34560  *
34561  * This verifies @cert and returns a set of #GTlsCertificateFlags
34562  * indicating any problems found with it. This can be used to verify a
34563  * certificate outside the context of making a connection, or to
34564  * check a certificate against a CA that is not part of the system
34565  * CA database.
34566  *
34567  * If @identity is not %NULL, @cert's name(s) will be compared against
34568  * it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return
34569  * value if it does not match. If @identity is %NULL, that bit will
34570  * never be set in the return value.
34571  *
34572  * If @trusted_ca is not %NULL, then @cert (or one of the certificates
34573  * in its chain) must be signed by it, or else
34574  * %G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If
34575  * @trusted_ca is %NULL, that bit will never be set in the return
34576  * value.
34577  *
34578  * (All other #GTlsCertificateFlags values will always be set or unset
34579  * as appropriate.)
34580  *
34581  * Returns: the appropriate #GTlsCertificateFlags
34582  * Since: 2.28
34583  */
34584
34585
34586 /**
34587  * g_tls_client_connection_get_accepted_cas:
34588  * @conn: the #GTlsClientConnection
34589  *
34590  * Gets the list of distinguished names of the Certificate Authorities
34591  * that the server will accept certificates from. This will be set
34592  * during the TLS handshake if the server requests a certificate.
34593  * Otherwise, it will be %NULL.
34594  *
34595  * Each item in the list is a #GByteArray which contains the complete
34596  * subject DN of the certificate authority.
34597  *
34598  * CA DNs. You should unref each element with g_byte_array_unref() and then
34599  * the free the list with g_list_free().
34600  *
34601  * Returns: (element-type GByteArray) (transfer full): the list of
34602  * Since: 2.28
34603  */
34604
34605
34606 /**
34607  * g_tls_client_connection_get_server_identity:
34608  * @conn: the #GTlsClientConnection
34609  *
34610  * Gets @conn's expected server identity
34611  *
34612  * expected server identity, or %NULL if the expected identity is not
34613  * known.
34614  *
34615  * Returns: (transfer none): a #GSocketConnectable describing the
34616  * Since: 2.28
34617  */
34618
34619
34620 /**
34621  * g_tls_client_connection_get_use_ssl3:
34622  * @conn: the #GTlsClientConnection
34623  *
34624  * Gets whether @conn will use SSL 3.0 rather than the
34625  * highest-supported version of TLS; see
34626  * g_tls_client_connection_set_use_ssl3().
34627  *
34628  * Returns: whether @conn will use SSL 3.0
34629  * Since: 2.28
34630  */
34631
34632
34633 /**
34634  * g_tls_client_connection_get_validation_flags:
34635  * @conn: the #GTlsClientConnection
34636  *
34637  * Gets @conn's validation flags
34638  *
34639  * Returns: the validation flags
34640  * Since: 2.28
34641  */
34642
34643
34644 /**
34645  * g_tls_client_connection_new:
34646  * @base_io_stream: the #GIOStream to wrap
34647  * @server_identity: (allow-none): the expected identity of the server
34648  * @error: #GError for error reporting, or %NULL to ignore.
34649  *
34650  * Creates a new #GTlsClientConnection wrapping @base_io_stream (which
34651  * must have pollable input and output streams) which is assumed to
34652  * communicate with the server identified by @server_identity.
34653  *
34654  * Returns: (transfer full): the new #GTlsClientConnection, or %NULL on error
34655  * Since: 2.28
34656  */
34657
34658
34659 /**
34660  * g_tls_client_connection_set_server_identity:
34661  * @conn: the #GTlsClientConnection
34662  * @identity: a #GSocketConnectable describing the expected server identity
34663  *
34664  * Sets @conn's expected server identity, which is used both to tell
34665  * servers on virtual hosts which certificate to present, and also
34666  * to let @conn know what name to look for in the certificate when
34667  * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.
34668  *
34669  * Since: 2.28
34670  */
34671
34672
34673 /**
34674  * g_tls_client_connection_set_use_ssl3:
34675  * @conn: the #GTlsClientConnection
34676  * @use_ssl3: whether to use SSL 3.0
34677  *
34678  * If @use_ssl3 is %TRUE, this forces @conn to use SSL 3.0 rather than
34679  * trying to properly negotiate the right version of TLS or SSL to use.
34680  * This can be used when talking to servers that do not implement the
34681  * fallbacks correctly and which will therefore fail to handshake with
34682  * a "modern" TLS handshake attempt.
34683  *
34684  * Since: 2.28
34685  */
34686
34687
34688 /**
34689  * g_tls_client_connection_set_validation_flags:
34690  * @conn: the #GTlsClientConnection
34691  * @flags: the #GTlsCertificateFlags to use
34692  *
34693  * Sets @conn's validation flags, to override the default set of
34694  * checks performed when validating a server certificate. By default,
34695  * %G_TLS_CERTIFICATE_VALIDATE_ALL is used.
34696  *
34697  * Since: 2.28
34698  */
34699
34700
34701 /**
34702  * g_tls_connection_emit_accept_certificate:
34703  * @conn: a #GTlsConnection
34704  * @peer_cert: the peer's #GTlsCertificate
34705  * @errors: the problems with @peer_cert
34706  *
34707  * Used by #GTlsConnection implementations to emit the
34708  * #GTlsConnection::accept-certificate signal.
34709  *
34710  * %TRUE to accept @peer_cert
34711  *
34712  * Returns: %TRUE if one of the signal handlers has returned
34713  * Since: 2.28
34714  */
34715
34716
34717 /**
34718  * g_tls_connection_get_certificate:
34719  * @conn: a #GTlsConnection
34720  *
34721  * Gets @conn's certificate, as set by
34722  * g_tls_connection_set_certificate().
34723  *
34724  * Returns: (transfer none): @conn's certificate, or %NULL
34725  * Since: 2.28
34726  */
34727
34728
34729 /**
34730  * g_tls_connection_get_database:
34731  * @conn: a #GTlsConnection
34732  *
34733  * Gets the certificate database that @conn uses to verify
34734  * peer certificates. See g_tls_connection_set_database().
34735  *
34736  * Returns: (transfer none): the certificate database that @conn uses or %NULL
34737  * Since: 2.30
34738  */
34739
34740
34741 /**
34742  * g_tls_connection_get_interaction:
34743  * @conn: a connection
34744  *
34745  * Get the object that will be used to interact with the user. It will be used
34746  * for things like prompting the user for passwords. If %NULL is returned, then
34747  * no user interaction will occur for this connection.
34748  *
34749  * Returns: (transfer none): The interaction object.
34750  * Since: 2.30
34751  */
34752
34753
34754 /**
34755  * g_tls_connection_get_peer_certificate:
34756  * @conn: a #GTlsConnection
34757  *
34758  * Gets @conn's peer's certificate after the handshake has completed.
34759  * (It is not set during the emission of
34760  * #GTlsConnection::accept-certificate.)
34761  *
34762  * Returns: (transfer none): @conn's peer's certificate, or %NULL
34763  * Since: 2.28
34764  */
34765
34766
34767 /**
34768  * g_tls_connection_get_peer_certificate_errors:
34769  * @conn: a #GTlsConnection
34770  *
34771  * Gets the errors associated with validating @conn's peer's
34772  * certificate, after the handshake has completed. (It is not set
34773  * during the emission of #GTlsConnection::accept-certificate.)
34774  *
34775  * Returns: @conn's peer's certificate errors
34776  * Since: 2.28
34777  */
34778
34779
34780 /**
34781  * g_tls_connection_get_rehandshake_mode:
34782  * @conn: a #GTlsConnection
34783  *
34784  * Gets @conn rehandshaking mode. See
34785  * g_tls_connection_set_rehandshake_mode() for details.
34786  *
34787  * Returns: @conn's rehandshaking mode
34788  * Since: 2.28
34789  */
34790
34791
34792 /**
34793  * g_tls_connection_get_require_close_notify:
34794  * @conn: a #GTlsConnection
34795  *
34796  * Tests whether or not @conn expects a proper TLS close notification
34797  * when the connection is closed. See
34798  * g_tls_connection_set_require_close_notify() for details.
34799  *
34800  * notification.
34801  *
34802  * Returns: %TRUE if @conn requires a proper TLS close
34803  * Since: 2.28
34804  */
34805
34806
34807 /**
34808  * g_tls_connection_get_use_system_certdb:
34809  * @conn: a #GTlsConnection
34810  *
34811  * Gets whether @conn uses the system certificate database to verify
34812  * peer certificates. See g_tls_connection_set_use_system_certdb().
34813  *
34814  * Returns: whether @conn uses the system certificate database
34815  * Deprecated: 2.30: Use g_tls_connection_get_database() instead
34816  */
34817
34818
34819 /**
34820  * g_tls_connection_handshake:
34821  * @conn: a #GTlsConnection
34822  * @cancellable: a #GCancellable, or %NULL
34823  * @error: a #GError, or %NULL
34824  *
34825  * Attempts a TLS handshake on @conn.
34826  *
34827  * On the client side, it is never necessary to call this method;
34828  * although the connection needs to perform a handshake after
34829  * connecting (or after sending a "STARTTLS"-type command) and may
34830  * need to rehandshake later if the server requests it,
34831  * #GTlsConnection will handle this for you automatically when you try
34832  * to send or receive data on the connection. However, you can call
34833  * g_tls_connection_handshake() manually if you want to know for sure
34834  * whether the initial handshake succeeded or failed (as opposed to
34835  * just immediately trying to write to @conn's output stream, in which
34836  * case if it fails, it may not be possible to tell if it failed
34837  * before or after completing the handshake).
34838  *
34839  * Likewise, on the server side, although a handshake is necessary at
34840  * the beginning of the communication, you do not need to call this
34841  * function explicitly unless you want clearer error reporting.
34842  * However, you may call g_tls_connection_handshake() later on to
34843  * renegotiate parameters (encryption methods, etc) with the client.
34844  *
34845  * #GTlsConnection::accept_certificate may be emitted during the
34846  * handshake.
34847  *
34848  * Returns: success or failure
34849  * Since: 2.28
34850  */
34851
34852
34853 /**
34854  * g_tls_connection_handshake_async:
34855  * @conn: a #GTlsConnection
34856  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
34857  * @cancellable: a #GCancellable, or %NULL
34858  * @callback: callback to call when the handshake is complete
34859  * @user_data: the data to pass to the callback function
34860  *
34861  * Asynchronously performs a TLS handshake on @conn. See
34862  * g_tls_connection_handshake() for more information.
34863  *
34864  * Since: 2.28
34865  */
34866
34867
34868 /**
34869  * g_tls_connection_handshake_finish:
34870  * @conn: a #GTlsConnection
34871  * @result: a #GAsyncResult.
34872  * @error: a #GError pointer, or %NULL
34873  *
34874  * Finish an asynchronous TLS handshake operation. See
34875  * g_tls_connection_handshake() for more information.
34876  *
34877  * case @error will be set.
34878  *
34879  * Returns: %TRUE on success, %FALSE on failure, in which
34880  * Since: 2.28
34881  */
34882
34883
34884 /**
34885  * g_tls_connection_set_certificate:
34886  * @conn: a #GTlsConnection
34887  * @certificate: the certificate to use for @conn
34888  *
34889  * This sets the certificate that @conn will present to its peer
34890  * during the TLS handshake. For a #GTlsServerConnection, it is
34891  * mandatory to set this, and that will normally be done at construct
34892  * time.
34893  *
34894  * For a #GTlsClientConnection, this is optional. If a handshake fails
34895  * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server
34896  * requires a certificate, and if you try connecting again, you should
34897  * call this method first. You can call
34898  * g_tls_client_connection_get_accepted_cas() on the failed connection
34899  * to get a list of Certificate Authorities that the server will
34900  * accept certificates from.
34901  *
34902  * (It is also possible that a server will allow the connection with
34903  * or without a certificate; in that case, if you don't provide a
34904  * certificate, you can tell that the server requested one by the fact
34905  * that g_tls_client_connection_get_accepted_cas() will return
34906  * non-%NULL.)
34907  *
34908  * Since: 2.28
34909  */
34910
34911
34912 /**
34913  * g_tls_connection_set_database:
34914  * @conn: a #GTlsConnection
34915  * @database: a #GTlsDatabase
34916  *
34917  * Sets the certificate database that is used to verify peer certificates.
34918  * This is set to the default database by default. See
34919  * g_tls_backend_get_default_database(). If set to %NULL, then
34920  * peer certificate validation will always set the
34921  * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
34922  * #GTlsConnection::accept-certificate will always be emitted on
34923  * client-side connections, unless that bit is not set in
34924  * #GTlsClientConnection:validation-flags).
34925  *
34926  * Since: 2.30
34927  */
34928
34929
34930 /**
34931  * g_tls_connection_set_interaction:
34932  * @conn: a connection
34933  * @interaction: (allow-none): an interaction object, or %NULL
34934  *
34935  * Set the object that will be used to interact with the user. It will be used
34936  * for things like prompting the user for passwords.
34937  *
34938  * The @interaction argument will normally be a derived subclass of
34939  * #GTlsInteraction. %NULL can also be provided if no user interaction
34940  * should occur for this connection.
34941  *
34942  * Since: 2.30
34943  */
34944
34945
34946 /**
34947  * g_tls_connection_set_rehandshake_mode:
34948  * @conn: a #GTlsConnection
34949  * @mode: the rehandshaking mode
34950  *
34951  * Sets how @conn behaves with respect to rehandshaking requests.
34952  *
34953  * %G_TLS_REHANDSHAKE_NEVER means that it will never agree to
34954  * rehandshake after the initial handshake is complete. (For a client,
34955  * this means it will refuse rehandshake requests from the server, and
34956  * for a server, this means it will close the connection with an error
34957  * if the client attempts to rehandshake.)
34958  *
34959  * %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a
34960  * rehandshake only if the other end of the connection supports the
34961  * TLS <literal>renegotiation_info</literal> extension. This is the
34962  * default behavior, but means that rehandshaking will not work
34963  * against older implementations that do not support that extension.
34964  *
34965  * %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow
34966  * rehandshaking even without the
34967  * <literal>renegotiation_info</literal> extension. On the server side
34968  * in particular, this is not recommended, since it leaves the server
34969  * open to certain attacks. However, this mode is necessary if you
34970  * need to allow renegotiation with older client software.
34971  *
34972  * Since: 2.28
34973  */
34974
34975
34976 /**
34977  * g_tls_connection_set_require_close_notify:
34978  * @conn: a #GTlsConnection
34979  * @require_close_notify: whether or not to require close notification
34980  *
34981  * Sets whether or not @conn expects a proper TLS close notification
34982  * before the connection is closed. If this is %TRUE (the default),
34983  * then @conn will expect to receive a TLS close notification from its
34984  * peer before the connection is closed, and will return a
34985  * %G_TLS_ERROR_EOF error if the connection is closed without proper
34986  * notification (since this may indicate a network error, or
34987  * man-in-the-middle attack).
34988  *
34989  * In some protocols, the application will know whether or not the
34990  * connection was closed cleanly based on application-level data
34991  * (because the application-level data includes a length field, or is
34992  * somehow self-delimiting); in this case, the close notify is
34993  * redundant and sometimes omitted. (TLS 1.1 explicitly allows this;
34994  * in TLS 1.0 it is technically an error, but often done anyway.) You
34995  * can use g_tls_connection_set_require_close_notify() to tell @conn
34996  * to allow an "unannounced" connection close, in which case the close
34997  * will show up as a 0-length read, as in a non-TLS
34998  * #GSocketConnection, and it is up to the application to check that
34999  * the data has been fully received.
35000  *
35001  * Note that this only affects the behavior when the peer closes the
35002  * connection; when the application calls g_io_stream_close() itself
35003  * on @conn, this will send a close notification regardless of the
35004  * setting of this property. If you explicitly want to do an unclean
35005  * close, you can close @conn's #GTlsConnection:base-io-stream rather
35006  * than closing @conn itself.
35007  *
35008  * Since: 2.28
35009  */
35010
35011
35012 /**
35013  * g_tls_connection_set_use_system_certdb:
35014  * @conn: a #GTlsConnection
35015  * @use_system_certdb: whether to use the system certificate database
35016  *
35017  * Sets whether @conn uses the system certificate database to verify
35018  * peer certificates. This is %TRUE by default. If set to %FALSE, then
35019  * peer certificate validation will always set the
35020  * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
35021  * #GTlsConnection::accept-certificate will always be emitted on
35022  * client-side connections, unless that bit is not set in
35023  * #GTlsClientConnection:validation-flags).
35024  *
35025  * Deprecated: 2.30: Use g_tls_connection_set_database() instead
35026  */
35027
35028
35029 /**
35030  * g_tls_database_create_certificate_handle:
35031  * @self: a #GTlsDatabase
35032  * @certificate: certificate for which to create a handle.
35033  *
35034  * Create a handle string for the certificate. The database will only be able
35035  * to create a handle for certificates that originate from the database. In
35036  * cases where the database cannot create a handle for a certificate, %NULL
35037  * will be returned.
35038  *
35039  * This handle should be stable across various instances of the application,
35040  * and between applications. If a certificate is modified in the database,
35041  * then it is not guaranteed that this handle will continue to point to it.
35042  *
35043  * Returns: (allow-none): a newly allocated string containing the handle.
35044  * Since: 2.30
35045  */
35046
35047
35048 /**
35049  * g_tls_database_lookup_certificate_for_handle:
35050  * @self: a #GTlsDatabase
35051  * @handle: a certificate handle
35052  * @interaction: (allow-none): used to interact with the user if necessary
35053  * @flags: Flags which affect the lookup.
35054  * @cancellable: (allow-none): a #GCancellable, or %NULL
35055  * @error: (allow-none): a #GError, or %NULL
35056  *
35057  * Lookup a certificate by its handle.
35058  *
35059  * The handle should have been created by calling g_tls_database_create_handle()
35060  * on a #GTlsDatabase object of the same TLS backend. The handle is designed
35061  * to remain valid across instantiations of the database.
35062  *
35063  * If the handle is no longer valid, or does not point to a certificate in
35064  * this database, then %NULL will be returned.
35065  *
35066  * This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform
35067  * the lookup operation asynchronously.
35068  *
35069  * #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate.
35070  *
35071  * Returns: (transfer full) (allow-none): a newly allocated
35072  * Since: 2.30
35073  */
35074
35075
35076 /**
35077  * g_tls_database_lookup_certificate_for_handle_async:
35078  * @self: a #GTlsDatabase
35079  * @handle: a certificate handle
35080  * @interaction: (allow-none): used to interact with the user if necessary
35081  * @flags: Flags which affect the lookup.
35082  * @cancellable: (allow-none): a #GCancellable, or %NULL
35083  * @callback: callback to call when the operation completes
35084  * @user_data: the data to pass to the callback function
35085  *
35086  * Asynchronously lookup a certificate by its handle in the database. See
35087  * g_tls_database_lookup_handle() for more information.
35088  *
35089  * Since: 2.30
35090  */
35091
35092
35093 /**
35094  * g_tls_database_lookup_certificate_for_handle_finish:
35095  * @self: a #GTlsDatabase
35096  * @result: a #GAsyncResult.
35097  * @error: a #GError pointer, or %NULL
35098  *
35099  * Finish an asynchronous lookup of a certificate by its handle. See
35100  * g_tls_database_lookup_handle() for more information.
35101  *
35102  * If the handle is no longer valid, or does not point to a certificate in
35103  * this database, then %NULL will be returned.
35104  *
35105  * Use g_object_unref() to release the certificate.
35106  *
35107  * Returns: (transfer full): a newly allocated #GTlsCertificate object.
35108  * Since: 2.30
35109  */
35110
35111
35112 /**
35113  * g_tls_database_lookup_certificate_issuer:
35114  * @self: a #GTlsDatabase
35115  * @certificate: a #GTlsCertificate
35116  * @interaction: (allow-none): used to interact with the user if necessary
35117  * @flags: flags which affect the lookup operation
35118  * @cancellable: (allow-none): a #GCancellable, or %NULL
35119  * @error: (allow-none): a #GError, or %NULL
35120  *
35121  * Lookup the issuer of @certificate in the database.
35122  *
35123  * The %issuer property
35124  * of @certificate is not modified, and the two certificates are not hooked
35125  * into a chain.
35126  *
35127  * This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform
35128  * the lookup operation asynchronously.
35129  *
35130  * or %NULL. Use g_object_unref() to release the certificate.
35131  *
35132  * Returns: (transfer full): a newly allocated issuer #GTlsCertificate,
35133  * Since: 2.30
35134  */
35135
35136
35137 /**
35138  * g_tls_database_lookup_certificate_issuer_async:
35139  * @self: a #GTlsDatabase
35140  * @certificate: a #GTlsCertificate
35141  * @interaction: (allow-none): used to interact with the user if necessary
35142  * @flags: flags which affect the lookup operation
35143  * @cancellable: (allow-none): a #GCancellable, or %NULL
35144  * @callback: callback to call when the operation completes
35145  * @user_data: the data to pass to the callback function
35146  *
35147  * Asynchronously lookup the issuer of @certificate in the database. See
35148  * g_tls_database_lookup_certificate_issuer() for more information.
35149  *
35150  * Since: 2.30
35151  */
35152
35153
35154 /**
35155  * g_tls_database_lookup_certificate_issuer_finish:
35156  * @self: a #GTlsDatabase
35157  * @result: a #GAsyncResult.
35158  * @error: a #GError pointer, or %NULL
35159  *
35160  * Finish an asynchronous lookup issuer operation. See
35161  * g_tls_database_lookup_certificate_issuer() for more information.
35162  *
35163  * or %NULL. Use g_object_unref() to release the certificate.
35164  *
35165  * Returns: (transfer full): a newly allocated issuer #GTlsCertificate,
35166  * Since: 2.30
35167  */
35168
35169
35170 /**
35171  * g_tls_database_lookup_certificates_issued_by:
35172  * @self: a #GTlsDatabase
35173  * @issuer_raw_dn: a #GByteArray which holds the DER encoded issuer DN.
35174  * @interaction: (allow-none): used to interact with the user if necessary
35175  * @flags: Flags which affect the lookup operation.
35176  * @cancellable: (allow-none): a #GCancellable, or %NULL
35177  * @error: (allow-none): a #GError, or %NULL
35178  *
35179  * Lookup certificates issued by this issuer in the database.
35180  *
35181  * This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform
35182  * the lookup operation asynchronously.
35183  *
35184  * Use g_object_unref() on each certificate, and g_list_free() on the release the list.
35185  *
35186  * Returns: (transfer full): a newly allocated list of #GTlsCertificate objects.
35187  * Since: 2.30
35188  */
35189
35190
35191 /**
35192  * g_tls_database_lookup_certificates_issued_by_async:
35193  * @self: a #GTlsDatabase
35194  * @issuer_raw_dn: a #GByteArray which holds the DER encoded issuer DN.
35195  * @interaction: (allow-none): used to interact with the user if necessary
35196  * @flags: Flags which affect the lookup operation.
35197  * @cancellable: (allow-none): a #GCancellable, or %NULL
35198  * @callback: callback to call when the operation completes
35199  * @user_data: the data to pass to the callback function
35200  *
35201  * Asynchronously lookup certificates issued by this issuer in the database. See
35202  * g_tls_database_lookup_certificates_issued_by() for more information.
35203  *
35204  * The database may choose to hold a reference to the issuer byte array for the duration
35205  * of of this asynchronous operation. The byte array should not be modified during
35206  * this time.
35207  *
35208  * Since: 2.30
35209  */
35210
35211
35212 /**
35213  * g_tls_database_lookup_certificates_issued_by_finish:
35214  * @self: a #GTlsDatabase
35215  * @result: a #GAsyncResult.
35216  * @error: a #GError pointer, or %NULL
35217  *
35218  * Finish an asynchronous lookup of certificates. See
35219  * g_tls_database_lookup_certificates_issued_by() for more information.
35220  *
35221  * Use g_object_unref() on each certificate, and g_list_free() on the release the list.
35222  *
35223  * Returns: (transfer full): a newly allocated list of #GTlsCertificate objects.
35224  * Since: 2.30
35225  */
35226
35227
35228 /**
35229  * g_tls_database_verify_chain:
35230  * @self: a #GTlsDatabase
35231  * @chain: a #GTlsCertificate chain
35232  * @purpose: the purpose that this certificate chain will be used for.
35233  * @identity: (allow-none): the expected peer identity
35234  * @interaction: (allow-none): used to interact with the user if necessary
35235  * @flags: additional verify flags
35236  * @cancellable: (allow-none): a #GCancellable, or %NULL
35237  * @error: (allow-none): a #GError, or %NULL
35238  *
35239  * Verify's a certificate chain after looking up and adding any missing
35240  * certificates to the chain.
35241  *
35242  * @chain is a chain of #GTlsCertificate objects each pointing to the next
35243  * certificate in the chain by its %issuer property. The chain may initially
35244  * consist of one or more certificates. After the verification process is
35245  * complete, @chain may be modified by adding missing certificates, or removing
35246  * extra certificates. If a certificate anchor was found, then it is added to
35247  * the @chain.
35248  *
35249  * @purpose describes the purpose (or usage) for which the certificate
35250  * is being used. Typically @purpose will be set to #G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER
35251  * which means that the certificate is being used to authenticate a server
35252  * (and we are acting as the client).
35253  *
35254  * The @identity is used to check for pinned certificates (trust exceptions)
35255  * in the database. These will override the normal verification process on a
35256  * host by host basis.
35257  *
35258  * Currently there are no @flags, and %G_TLS_DATABASE_VERIFY_NONE should be
35259  * used.
35260  *
35261  * This function can block, use g_tls_database_verify_chain_async() to perform
35262  * the verification operation asynchronously.
35263  *
35264  * result of verification.
35265  *
35266  * Returns: the appropriate #GTlsCertificateFlags which represents the
35267  * Since: 2.30
35268  */
35269
35270
35271 /**
35272  * g_tls_database_verify_chain_async:
35273  * @self: a #GTlsDatabase
35274  * @chain: a #GTlsCertificate chain
35275  * @purpose: the purpose that this certificate chain will be used for.
35276  * @identity: (allow-none): the expected peer identity
35277  * @interaction: (allow-none): used to interact with the user if necessary
35278  * @flags: additional verify flags
35279  * @cancellable: (allow-none): a #GCancellable, or %NULL
35280  * @callback: callback to call when the operation completes
35281  * @user_data: the data to pass to the callback function
35282  *
35283  * Asynchronously verify's a certificate chain after looking up and adding
35284  * any missing certificates to the chain. See g_tls_database_verify_chain()
35285  * for more information.
35286  *
35287  * Since: 2.30
35288  */
35289
35290
35291 /**
35292  * g_tls_database_verify_chain_finish:
35293  * @self: a #GTlsDatabase
35294  * @result: a #GAsyncResult.
35295  * @error: a #GError pointer, or %NULL
35296  *
35297  * Finish an asynchronous verify chain operation. See
35298  * g_tls_database_verify_chain() for more information. *
35299  * result of verification.
35300  *
35301  * Returns: the appropriate #GTlsCertificateFlags which represents the
35302  * Since: 2.30
35303  */
35304
35305
35306 /**
35307  * g_tls_error_quark:
35308  *
35309  * Gets the TLS error quark.
35310  *
35311  * Returns: a #GQuark.
35312  * Since: 2.28
35313  */
35314
35315
35316 /**
35317  * g_tls_file_database_new:
35318  * @anchors: filename of anchor certificate authorities.
35319  * @error: #GError for error reporting, or %NULL to ignore.
35320  *
35321  * Creates a new #GTlsFileDatabase which uses anchor certificate authorities
35322  * in @anchors to verify certificate chains.
35323  *
35324  * The certificates in @anchors must be PEM encoded.
35325  *
35326  * Returns: (transfer full): the new #GTlsFileDatabase, or %NULL on error
35327  * Since: 2.30
35328  */
35329
35330
35331 /**
35332  * g_tls_interaction_ask_password:
35333  * @interaction: a #GTlsInteraction object
35334  * @password: a #GTlsPassword object
35335  *
35336  * This function is normally called by #GTlsConnection or #GTlsDatabase to
35337  * ask the user for a password.
35338  *
35339  * Derived subclasses usually implement a password prompt, although they may
35340  * also choose to provide a password from elsewhere. The @password value will
35341  * be filled in and then @callback will be called. Alternatively the user may
35342  * abort this password request, which will usually abort the TLS connection.
35343  *
35344  * Returns: The status of the ask password interaction.
35345  * Since: 2.30
35346  */
35347
35348
35349 /**
35350  * g_tls_interaction_ask_password_async:
35351  * @interaction: a #GTlsInteraction object
35352  * @password: a #GTlsPassword object
35353  * @callback: will be called when the interaction completes
35354  * @user_data: (allow-none): data to pass to the @callback
35355  *
35356  * This function is normally called by #GTlsConnection or #GTlsDatabase to
35357  * ask the user for a password.
35358  *
35359  * Derived subclasses usually implement a password prompt, although they may
35360  * also choose to provide a password from elsewhere. The @password value will
35361  * be filled in and then @callback will be called. Alternatively the user may
35362  * abort this password request, which will usually abort the TLS connection.
35363  *
35364  * The @callback will be invoked on thread-default main context of the thread
35365  * that called this function. The @callback should call
35366  * g_tls_interaction_ask_password_finish() to get the status of the user
35367  * interaction.
35368  *
35369  * Since: 2.30
35370  */
35371
35372
35373 /**
35374  * g_tls_interaction_ask_password_finish:
35375  * @interaction: a #GTlsInteraction object
35376  * @result: the result passed to the callback
35377  *
35378  * Complete an ask password user interaction request. This should be once
35379  * the g_tls_interaction_ask_password() completion callback is called.
35380  *
35381  * If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsPassword passed
35382  * to g_tls_interaction_ask_password() will have its password filled in.
35383  *
35384  * Returns: The status of the ask password interaction.
35385  * Since: 2.30
35386  */
35387
35388
35389 /**
35390  * g_tls_password_get_description:
35391  * @password: a #GTlsPassword object
35392  *
35393  * Get a description string about what the password will be used for.
35394  *
35395  * Returns: The description of the password.
35396  * Since: 2.30
35397  */
35398
35399
35400 /**
35401  * g_tls_password_get_flags:
35402  * @password: a #GTlsPassword object
35403  *
35404  * Get flags about the password.
35405  *
35406  * Returns: The flags about the password.
35407  * Since: 2.30
35408  */
35409
35410
35411 /**
35412  * g_tls_password_get_value:
35413  * @password: a #GTlsPassword object
35414  * @length: (allow-none): location to place the length of the password.
35415  *
35416  * Get the password value. If @length is not %NULL then it will be filled
35417  * in with the length of the password value.
35418  *
35419  * Returns: The password value owned by the password object.
35420  * Since: 2.30
35421  */
35422
35423
35424 /**
35425  * g_tls_password_get_warning:
35426  * @password: a #GTlsPassword object
35427  *
35428  * Get a user readable translated warning. Usually this warning is a
35429  * representation of the password flags returned from
35430  * g_tls_password_get_flags().
35431  *
35432  * Returns: The warning.
35433  * Since: 2.30
35434  */
35435
35436
35437 /**
35438  * g_tls_password_new:
35439  * @flags: the password flags
35440  * @description: description of what the password is for
35441  *
35442  * Create a new #GTlsPassword object.
35443  *
35444  * Returns: (transfer full): The newly allocated password object
35445  */
35446
35447
35448 /**
35449  * g_tls_password_set_description:
35450  * @password: a #GTlsPassword object
35451  * @description: The description of the password
35452  *
35453  * Set a description string about what the password will be used for.
35454  *
35455  * Since: 2.30
35456  */
35457
35458
35459 /**
35460  * g_tls_password_set_flags:
35461  * @password: a #GTlsPassword object
35462  * @flags: The flags about the password
35463  *
35464  * Set flags about the password.
35465  *
35466  * Since: 2.30
35467  */
35468
35469
35470 /**
35471  * g_tls_password_set_value:
35472  * @password: a #GTlsPassword object
35473  * @value: the new password value
35474  * @length: the length of the password, or -1
35475  *
35476  * Set the value for this password. The @value will be copied by the password
35477  * object.
35478  *
35479  * Specify the @length, for a non-null-terminated password. Pass -1 as
35480  * @length if using a null-terminated password, and @length will be calculated
35481  * automatically.
35482  *
35483  * Since: 2.30
35484  */
35485
35486
35487 /**
35488  * g_tls_password_set_value_full:
35489  * @password: a #GTlsPassword object
35490  * @value: the value for the password
35491  * @length: the length of the password, or -1
35492  * @destroy: (allow-none): a function to use to free the password.
35493  *
35494  * Provide the value for this password.
35495  *
35496  * The @value will be owned by the password object, and later freed using
35497  * the @destroy function callback.
35498  *
35499  * Specify the @length, for a non-null-terminated password. Pass -1 as
35500  * @length if using a null-terminated password, and @length will be calculated
35501  * automatically.
35502  *
35503  * Since: 2.30
35504  */
35505
35506
35507 /**
35508  * g_tls_password_set_warning:
35509  * @password: a #GTlsPassword object
35510  * @warning: The user readable warning
35511  *
35512  * Set a user readable translated warning. Usually this warning is a
35513  * representation of the password flags returned from
35514  * g_tls_password_get_flags().
35515  *
35516  * Since: 2.30
35517  */
35518
35519
35520 /**
35521  * g_tls_server_connection_new:
35522  * @base_io_stream: the #GIOStream to wrap
35523  * @certificate: (allow-none): the default server certificate, or %NULL
35524  * @error: #GError for error reporting, or %NULL to ignore.
35525  *
35526  * Creates a new #GTlsServerConnection wrapping @base_io_stream (which
35527  * must have pollable input and output streams).
35528  *
35529  * Returns: (transfer full): the new #GTlsServerConnection, or %NULL on error
35530  * Since: 2.28
35531  */
35532
35533
35534 /**
35535  * g_try_new:
35536  * @struct_type: the type of the elements to allocate
35537  * @n_structs: the number of elements to allocate
35538  *
35539  * Attempts to allocate @n_structs elements of type @struct_type, and returns
35540  * %NULL on failure. Contrast with g_new(), which aborts the program on failure.
35541  * The returned pointer is cast to a pointer to the given type.
35542  * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
35543  *
35544  * Since: 2.8
35545  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
35546  */
35547
35548
35549 /**
35550  * g_try_new0:
35551  * @struct_type: the type of the elements to allocate
35552  * @n_structs: the number of elements to allocate
35553  *
35554  * Attempts to allocate @n_structs elements of type @struct_type, initialized
35555  * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts
35556  * the program on failure.
35557  * The returned pointer is cast to a pointer to the given type.
35558  * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
35559  *
35560  * Since: 2.8
35561  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
35562  */
35563
35564
35565 /**
35566  * g_try_renew:
35567  * @struct_type: the type of the elements to allocate
35568  * @mem: the currently allocated memory
35569  * @n_structs: the number of elements to allocate
35570  *
35571  * Attempts to reallocate the memory pointed to by @mem, so that it now has
35572  * space for @n_structs elements of type @struct_type, and returns %NULL on
35573  * failure. Contrast with g_renew(), which aborts the program on failure.
35574  * It returns the new address of the memory, which may have been moved.
35575  * The function returns %NULL if an overflow occurs.
35576  *
35577  * Since: 2.8
35578  * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
35579  */
35580
35581
35582 /**
35583  * g_unix_connection_receive_credentials:
35584  * @connection: A #GUnixConnection.
35585  * @cancellable: (allow-none): A #GCancellable or %NULL.
35586  * @error: Return location for error or %NULL.
35587  *
35588  * Receives credentials from the sending end of the connection.  The
35589  * sending end has to call g_unix_connection_send_credentials() (or
35590  * similar) for this to work.
35591  *
35592  * As well as reading the credentials this also reads (and discards) a
35593  * single byte from the stream, as this is required for credentials
35594  * passing to work on some implementations.
35595  *
35596  * Other ways to exchange credentials with a foreign peer includes the
35597  * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
35598  *
35599  * g_object_unref()), %NULL if @error is set.
35600  *
35601  * Returns: (transfer full): Received credentials on success (free with
35602  * Since: 2.26
35603  */
35604
35605
35606 /**
35607  * g_unix_connection_receive_fd:
35608  * @connection: a #GUnixConnection
35609  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
35610  * @error: (allow-none): #GError for error reporting, or %NULL to ignore
35611  *
35612  * Receives a file descriptor from the sending end of the connection.
35613  * The sending end has to call g_unix_connection_send_fd() for this
35614  * to work.
35615  *
35616  * As well as reading the fd this also reads a single byte from the
35617  * stream, as this is required for fd passing to work on some
35618  * implementations.
35619  *
35620  * Returns: a file descriptor on success, -1 on error.
35621  * Since: 2.22
35622  */
35623
35624
35625 /**
35626  * g_unix_connection_send_credentials:
35627  * @connection: A #GUnixConnection.
35628  * @cancellable: (allow-none): A #GCancellable or %NULL.
35629  * @error: Return location for error or %NULL.
35630  *
35631  * Passes the credentials of the current user the receiving side
35632  * of the connection. The receiving end has to call
35633  * g_unix_connection_receive_credentials() (or similar) to accept the
35634  * credentials.
35635  *
35636  * As well as sending the credentials this also writes a single NUL
35637  * byte to the stream, as this is required for credentials passing to
35638  * work on some implementations.
35639  *
35640  * Other ways to exchange credentials with a foreign peer includes the
35641  * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
35642  *
35643  * Returns: %TRUE on success, %FALSE if @error is set.
35644  * Since: 2.26
35645  */
35646
35647
35648 /**
35649  * g_unix_connection_send_fd:
35650  * @connection: a #GUnixConnection
35651  * @fd: a file descriptor
35652  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
35653  * @error: (allow-none): #GError for error reporting, or %NULL to ignore.
35654  *
35655  * Passes a file descriptor to the receiving side of the
35656  * connection. The receiving end has to call g_unix_connection_receive_fd()
35657  * to accept the file descriptor.
35658  *
35659  * As well as sending the fd this also writes a single byte to the
35660  * stream, as this is required for fd passing to work on some
35661  * implementations.
35662  *
35663  * Returns: a %TRUE on success, %NULL on error.
35664  * Since: 2.22
35665  */
35666
35667
35668 /**
35669  * g_unix_credentials_message_get_credentials:
35670  * @message: A #GUnixCredentialsMessage.
35671  *
35672  * Gets the credentials stored in @message.
35673  *
35674  * Returns: (transfer none): A #GCredentials instance. Do not free, it is owned by @message.
35675  * Since: 2.26
35676  */
35677
35678
35679 /**
35680  * g_unix_credentials_message_is_supported:
35681  *
35682  * Checks if passing #GCredentials on a #GSocket is supported on this platform.
35683  *
35684  * Returns: %TRUE if supported, %FALSE otherwise
35685  * Since: 2.26
35686  */
35687
35688
35689 /**
35690  * g_unix_credentials_message_new:
35691  *
35692  * Creates a new #GUnixCredentialsMessage with credentials matching the current processes.
35693  *
35694  * Returns: a new #GUnixCredentialsMessage
35695  * Since: 2.26
35696  */
35697
35698
35699 /**
35700  * g_unix_credentials_message_new_with_credentials:
35701  * @credentials: A #GCredentials object.
35702  *
35703  * Creates a new #GUnixCredentialsMessage holding @credentials.
35704  *
35705  * Returns: a new #GUnixCredentialsMessage
35706  * Since: 2.26
35707  */
35708
35709
35710 /**
35711  * g_unix_fd_list_append:
35712  * @list: a #GUnixFDList
35713  * @fd: a valid open file descriptor
35714  * @error: a #GError pointer
35715  *
35716  * Adds a file descriptor to @list.
35717  *
35718  * The file descriptor is duplicated using dup(). You keep your copy
35719  * of the descriptor and the copy contained in @list will be closed
35720  * when @list is finalized.
35721  *
35722  * A possible cause of failure is exceeding the per-process or
35723  * system-wide file descriptor limit.
35724  *
35725  * The index of the file descriptor in the list is returned.  If you use
35726  * this index with g_unix_fd_list_get() then you will receive back a
35727  * duplicated copy of the same file descriptor.
35728  *
35729  * (and @error is set)
35730  *
35731  * Returns: the index of the appended fd in case of success, else -1
35732  * Since: 2.24
35733  */
35734
35735
35736 /**
35737  * g_unix_fd_list_get:
35738  * @list: a #GUnixFDList
35739  * @index_: the index into the list
35740  * @error: a #GError pointer
35741  *
35742  * Gets a file descriptor out of @list.
35743  *
35744  * @index_ specifies the index of the file descriptor to get.  It is a
35745  * programmer error for @index_ to be out of range; see
35746  * g_unix_fd_list_get_length().
35747  *
35748  * The file descriptor is duplicated using dup() and set as
35749  * close-on-exec before being returned.  You must call close() on it
35750  * when you are done.
35751  *
35752  * A possible cause of failure is exceeding the per-process or
35753  * system-wide file descriptor limit.
35754  *
35755  * Returns: the file descriptor, or -1 in case of error
35756  * Since: 2.24
35757  */
35758
35759
35760 /**
35761  * g_unix_fd_list_get_length:
35762  * @list: a #GUnixFDList
35763  *
35764  * Gets the length of @list (ie: the number of file descriptors
35765  * contained within).
35766  *
35767  * Returns: the length of @list
35768  * Since: 2.24
35769  */
35770
35771
35772 /**
35773  * g_unix_fd_list_new:
35774  *
35775  * Creates a new #GUnixFDList containing no file descriptors.
35776  *
35777  * Returns: a new #GUnixFDList
35778  * Since: 2.24
35779  */
35780
35781
35782 /**
35783  * g_unix_fd_list_new_from_array:
35784  * @fds: (array length=n_fds): the initial list of file descriptors
35785  * @n_fds: the length of #fds, or -1
35786  *
35787  * Creates a new #GUnixFDList containing the file descriptors given in
35788  * @fds.  The file descriptors become the property of the new list and
35789  * may no longer be used by the caller.  The array itself is owned by
35790  * the caller.
35791  *
35792  * Each file descriptor in the array should be set to close-on-exec.
35793  *
35794  * If @n_fds is -1 then @fds must be terminated with -1.
35795  *
35796  * Returns: a new #GUnixFDList
35797  * Since: 2.24
35798  */
35799
35800
35801 /**
35802  * g_unix_fd_list_peek_fds:
35803  * @list: a #GUnixFDList
35804  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
35805  *
35806  * Returns the array of file descriptors that is contained in this
35807  * object.
35808  *
35809  * After this call, the descriptors remain the property of @list.  The
35810  * caller must not close them and must not free the array.  The array is
35811  * valid only until @list is changed in any way.
35812  *
35813  * If @length is non-%NULL then it is set to the number of file
35814  * descriptors in the returned array. The returned array is also
35815  * terminated with -1.
35816  *
35817  * This function never returns %NULL. In case there are no file
35818  * descriptors contained in @list, an empty array is returned.
35819  *
35820  * descriptors
35821  *
35822  * Returns: (array length=length) (transfer none): an array of file
35823  * Since: 2.24
35824  */
35825
35826
35827 /**
35828  * g_unix_fd_list_steal_fds:
35829  * @list: a #GUnixFDList
35830  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
35831  *
35832  * Returns the array of file descriptors that is contained in this
35833  * object.
35834  *
35835  * After this call, the descriptors are no longer contained in
35836  * @list. Further calls will return an empty list (unless more
35837  * descriptors have been added).
35838  *
35839  * The return result of this function must be freed with g_free().
35840  * The caller is also responsible for closing all of the file
35841  * descriptors.  The file descriptors in the array are set to
35842  * close-on-exec.
35843  *
35844  * If @length is non-%NULL then it is set to the number of file
35845  * descriptors in the returned array. The returned array is also
35846  * terminated with -1.
35847  *
35848  * This function never returns %NULL. In case there are no file
35849  * descriptors contained in @list, an empty array is returned.
35850  *
35851  * descriptors
35852  *
35853  * Returns: (array length=length) (transfer full): an array of file
35854  * Since: 2.24
35855  */
35856
35857
35858 /**
35859  * g_unix_fd_message_append_fd:
35860  * @message: a #GUnixFDMessage
35861  * @fd: a valid open file descriptor
35862  * @error: a #GError pointer
35863  *
35864  * Adds a file descriptor to @message.
35865  *
35866  * The file descriptor is duplicated using dup(). You keep your copy
35867  * of the descriptor and the copy contained in @message will be closed
35868  * when @message is finalized.
35869  *
35870  * A possible cause of failure is exceeding the per-process or
35871  * system-wide file descriptor limit.
35872  *
35873  * Returns: %TRUE in case of success, else %FALSE (and @error is set)
35874  * Since: 2.22
35875  */
35876
35877
35878 /**
35879  * g_unix_fd_message_get_fd_list:
35880  * @message: a #GUnixFDMessage
35881  *
35882  * Gets the #GUnixFDList contained in @message.  This function does not
35883  * return a reference to the caller, but the returned list is valid for
35884  * the lifetime of @message.
35885  *
35886  * Returns: (transfer none): the #GUnixFDList from @message
35887  * Since: 2.24
35888  */
35889
35890
35891 /**
35892  * g_unix_fd_message_new:
35893  *
35894  * Creates a new #GUnixFDMessage containing an empty file descriptor
35895  * list.
35896  *
35897  * Returns: a new #GUnixFDMessage
35898  * Since: 2.22
35899  */
35900
35901
35902 /**
35903  * g_unix_fd_message_new_with_fd_list:
35904  * @fd_list: a #GUnixFDList
35905  *
35906  * Creates a new #GUnixFDMessage containing @list.
35907  *
35908  * Returns: a new #GUnixFDMessage
35909  * Since: 2.24
35910  */
35911
35912
35913 /**
35914  * g_unix_fd_message_steal_fds:
35915  * @message: a #GUnixFDMessage
35916  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
35917  *
35918  * Returns the array of file descriptors that is contained in this
35919  * object.
35920  *
35921  * After this call, the descriptors are no longer contained in
35922  * @message. Further calls will return an empty list (unless more
35923  * descriptors have been added).
35924  *
35925  * The return result of this function must be freed with g_free().
35926  * The caller is also responsible for closing all of the file
35927  * descriptors.
35928  *
35929  * If @length is non-%NULL then it is set to the number of file
35930  * descriptors in the returned array. The returned array is also
35931  * terminated with -1.
35932  *
35933  * This function never returns %NULL. In case there are no file
35934  * descriptors contained in @message, an empty array is returned.
35935  *
35936  * descriptors
35937  *
35938  * Returns: (array length=length) (transfer full): an array of file
35939  * Since: 2.22
35940  */
35941
35942
35943 /**
35944  * g_unix_input_stream_get_close_fd:
35945  * @stream: a #GUnixInputStream
35946  *
35947  * Returns whether the file descriptor of @stream will be
35948  * closed when the stream is closed.
35949  *
35950  * Returns: %TRUE if the file descriptor is closed when done
35951  * Since: 2.20
35952  */
35953
35954
35955 /**
35956  * g_unix_input_stream_get_fd:
35957  * @stream: a #GUnixInputStream
35958  *
35959  * Return the UNIX file descriptor that the stream reads from.
35960  *
35961  * Returns: The file descriptor of @stream
35962  * Since: 2.20
35963  */
35964
35965
35966 /**
35967  * g_unix_input_stream_new:
35968  * @fd: a UNIX file descriptor
35969  * @close_fd: %TRUE to close the file descriptor when done
35970  *
35971  * Creates a new #GUnixInputStream for the given @fd.
35972  *
35973  * If @close_fd is %TRUE, the file descriptor will be closed
35974  * when the stream is closed.
35975  *
35976  * Returns: a new #GUnixInputStream
35977  */
35978
35979
35980 /**
35981  * g_unix_input_stream_set_close_fd:
35982  * @stream: a #GUnixInputStream
35983  * @close_fd: %TRUE to close the file descriptor when done
35984  *
35985  * Sets whether the file descriptor of @stream shall be closed
35986  * when the stream is closed.
35987  *
35988  * Since: 2.20
35989  */
35990
35991
35992 /**
35993  * g_unix_is_mount_path_system_internal:
35994  * @mount_path: a mount path, e.g. <filename>/media/disk</filename> or <filename>/usr</filename>
35995  *
35996  * Determines if @mount_path is considered an implementation of the
35997  * OS. This is primarily used for hiding mountable and mounted volumes
35998  * that only are used in the OS and has little to no relevance to the
35999  * casual user.
36000  *
36001  * of the OS.
36002  *
36003  * Returns: %TRUE if @mount_path is considered an implementation detail
36004  */
36005
36006
36007 /**
36008  * g_unix_mount_at: (skip)
36009  * @mount_path: path for a possible unix mount.
36010  * @time_read: (out) (allow-none): guint64 to contain a timestamp.
36011  *
36012  * Gets a #GUnixMountEntry for a given mount path. If @time_read
36013  * is set, it will be filled with a unix timestamp for checking
36014  * if the mounts have changed since with g_unix_mounts_changed_since().
36015  *
36016  * Returns: (transfer full): a #GUnixMountEntry.
36017  */
36018
36019
36020 /**
36021  * g_unix_mount_compare:
36022  * @mount1: first #GUnixMountEntry to compare.
36023  * @mount2: second #GUnixMountEntry to compare.
36024  *
36025  * Compares two unix mounts.
36026  *
36027  * or less than @mount2, respectively.
36028  *
36029  * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
36030  */
36031
36032
36033 /**
36034  * g_unix_mount_free:
36035  * @mount_entry: a #GUnixMount.
36036  *
36037  * Frees a unix mount.
36038  */
36039
36040
36041 /**
36042  * g_unix_mount_get_device_path:
36043  * @mount_entry: a #GUnixMount.
36044  *
36045  * Gets the device path for a unix mount.
36046  *
36047  * Returns: a string containing the device path.
36048  */
36049
36050
36051 /**
36052  * g_unix_mount_get_fs_type:
36053  * @mount_entry: a #GUnixMount.
36054  *
36055  * Gets the filesystem type for the unix mount.
36056  *
36057  * Returns: a string containing the file system type.
36058  */
36059
36060
36061 /**
36062  * g_unix_mount_get_mount_path:
36063  * @mount_entry: input #GUnixMountEntry to get the mount path for.
36064  *
36065  * Gets the mount path for a unix mount.
36066  *
36067  * Returns: the mount path for @mount_entry.
36068  */
36069
36070
36071 /**
36072  * g_unix_mount_guess_can_eject:
36073  * @mount_entry: a #GUnixMountEntry
36074  *
36075  * Guesses whether a Unix mount can be ejected.
36076  *
36077  * Returns: %TRUE if @mount_entry is deemed to be ejectable.
36078  */
36079
36080
36081 /**
36082  * g_unix_mount_guess_icon:
36083  * @mount_entry: a #GUnixMountEntry
36084  *
36085  * Guesses the icon of a Unix mount.
36086  *
36087  * Returns: (transfer full): a #GIcon
36088  */
36089
36090
36091 /**
36092  * g_unix_mount_guess_name:
36093  * @mount_entry: a #GUnixMountEntry
36094  *
36095  * Guesses the name of a Unix mount.
36096  * The result is a translated string.
36097  *
36098  * be freed with g_free()
36099  *
36100  * Returns: A newly allocated string that must
36101  */
36102
36103
36104 /**
36105  * g_unix_mount_guess_should_display:
36106  * @mount_entry: a #GUnixMountEntry
36107  *
36108  * Guesses whether a Unix mount should be displayed in the UI.
36109  *
36110  * Returns: %TRUE if @mount_entry is deemed to be displayable.
36111  */
36112
36113
36114 /**
36115  * g_unix_mount_is_readonly:
36116  * @mount_entry: a #GUnixMount.
36117  *
36118  * Checks if a unix mount is mounted read only.
36119  *
36120  * Returns: %TRUE if @mount_entry is read only.
36121  */
36122
36123
36124 /**
36125  * g_unix_mount_is_system_internal:
36126  * @mount_entry: a #GUnixMount.
36127  *
36128  * Checks if a unix mount is a system path.
36129  *
36130  * Returns: %TRUE if the unix mount is for a system path.
36131  */
36132
36133
36134 /**
36135  * g_unix_mount_monitor_new:
36136  *
36137  * Gets a new #GUnixMountMonitor. The default rate limit for which the
36138  * monitor will report consecutive changes for the mount and mount
36139  * point entry files is the default for a #GFileMonitor. Use
36140  * g_unix_mount_monitor_set_rate_limit() to change this.
36141  *
36142  * Returns: a #GUnixMountMonitor.
36143  */
36144
36145
36146 /**
36147  * g_unix_mount_monitor_set_rate_limit:
36148  * @mount_monitor: a #GUnixMountMonitor
36149  * @limit_msec: a integer with the limit in milliseconds to poll for changes.
36150  *
36151  * Sets the rate limit to which the @mount_monitor will report
36152  * consecutive change events to the mount and mount point entry files.
36153  *
36154  * Since: 2.18
36155  */
36156
36157
36158 /**
36159  * g_unix_mount_point_compare:
36160  * @mount1: a #GUnixMount.
36161  * @mount2: a #GUnixMount.
36162  *
36163  * Compares two unix mount points.
36164  *
36165  * or less than @mount2, respectively.
36166  *
36167  * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
36168  */
36169
36170
36171 /**
36172  * g_unix_mount_point_free:
36173  * @mount_point: unix mount point to free.
36174  *
36175  * Frees a unix mount point.
36176  */
36177
36178
36179 /**
36180  * g_unix_mount_point_get_device_path:
36181  * @mount_point: a #GUnixMountPoint.
36182  *
36183  * Gets the device path for a unix mount point.
36184  *
36185  * Returns: a string containing the device path.
36186  */
36187
36188
36189 /**
36190  * g_unix_mount_point_get_fs_type:
36191  * @mount_point: a #GUnixMountPoint.
36192  *
36193  * Gets the file system type for the mount point.
36194  *
36195  * Returns: a string containing the file system type.
36196  */
36197
36198
36199 /**
36200  * g_unix_mount_point_get_mount_path:
36201  * @mount_point: a #GUnixMountPoint.
36202  *
36203  * Gets the mount path for a unix mount point.
36204  *
36205  * Returns: a string containing the mount path.
36206  */
36207
36208
36209 /**
36210  * g_unix_mount_point_guess_can_eject:
36211  * @mount_point: a #GUnixMountPoint
36212  *
36213  * Guesses whether a Unix mount point can be ejected.
36214  *
36215  * Returns: %TRUE if @mount_point is deemed to be ejectable.
36216  */
36217
36218
36219 /**
36220  * g_unix_mount_point_guess_icon:
36221  * @mount_point: a #GUnixMountPoint
36222  *
36223  * Guesses the icon of a Unix mount point.
36224  *
36225  * Returns: (transfer full): a #GIcon
36226  */
36227
36228
36229 /**
36230  * g_unix_mount_point_guess_name:
36231  * @mount_point: a #GUnixMountPoint
36232  *
36233  * Guesses the name of a Unix mount point.
36234  * The result is a translated string.
36235  *
36236  * be freed with g_free()
36237  *
36238  * Returns: A newly allocated string that must
36239  */
36240
36241
36242 /**
36243  * g_unix_mount_point_is_loopback:
36244  * @mount_point: a #GUnixMountPoint.
36245  *
36246  * Checks if a unix mount point is a loopback device.
36247  *
36248  * Returns: %TRUE if the mount point is a loopback. %FALSE otherwise.
36249  */
36250
36251
36252 /**
36253  * g_unix_mount_point_is_readonly:
36254  * @mount_point: a #GUnixMountPoint.
36255  *
36256  * Checks if a unix mount point is read only.
36257  *
36258  * Returns: %TRUE if a mount point is read only.
36259  */
36260
36261
36262 /**
36263  * g_unix_mount_point_is_user_mountable:
36264  * @mount_point: a #GUnixMountPoint.
36265  *
36266  * Checks if a unix mount point is mountable by the user.
36267  *
36268  * Returns: %TRUE if the mount point is user mountable.
36269  */
36270
36271
36272 /**
36273  * g_unix_mount_points_changed_since:
36274  * @time: guint64 to contain a timestamp.
36275  *
36276  * Checks if the unix mount points have changed since a given unix time.
36277  *
36278  * Returns: %TRUE if the mount points have changed since @time.
36279  */
36280
36281
36282 /**
36283  * g_unix_mount_points_get: (skip)
36284  * @time_read: (out) (allow-none): guint64 to contain a timestamp.
36285  *
36286  * Gets a #GList of #GUnixMountPoint containing the unix mount points.
36287  * If @time_read is set, it will be filled with the mount timestamp,
36288  * allowing for checking if the mounts have changed with
36289  * g_unix_mount_points_changed_since().
36290  *
36291  * a #GList of the UNIX mountpoints.
36292  *
36293  * Returns: (element-type GUnixMountPoint) (transfer full):
36294  */
36295
36296
36297 /**
36298  * g_unix_mounts_changed_since:
36299  * @time: guint64 to contain a timestamp.
36300  *
36301  * Checks if the unix mounts have changed since a given unix time.
36302  *
36303  * Returns: %TRUE if the mounts have changed since @time.
36304  */
36305
36306
36307 /**
36308  * g_unix_mounts_get: (skip)
36309  * @time_read: (out) (allow-none): guint64 to contain a timestamp, or %NULL
36310  *
36311  * Gets a #GList of #GUnixMountEntry containing the unix mounts.
36312  * If @time_read is set, it will be filled with the mount
36313  * timestamp, allowing for checking if the mounts have changed
36314  * with g_unix_mounts_changed_since().
36315  *
36316  * a #GList of the UNIX mounts.
36317  *
36318  * Returns: (element-type GUnixMountEntry) (transfer full):
36319  */
36320
36321
36322 /**
36323  * g_unix_output_stream_get_close_fd:
36324  * @stream: a #GUnixOutputStream
36325  *
36326  * Returns whether the file descriptor of @stream will be
36327  * closed when the stream is closed.
36328  *
36329  * Returns: %TRUE if the file descriptor is closed when done
36330  * Since: 2.20
36331  */
36332
36333
36334 /**
36335  * g_unix_output_stream_get_fd:
36336  * @stream: a #GUnixOutputStream
36337  *
36338  * Return the UNIX file descriptor that the stream writes to.
36339  *
36340  * Returns: The file descriptor of @stream
36341  * Since: 2.20
36342  */
36343
36344
36345 /**
36346  * g_unix_output_stream_new:
36347  * @fd: a UNIX file descriptor
36348  * @close_fd: %TRUE to close the file descriptor when done
36349  *
36350  * Creates a new #GUnixOutputStream for the given @fd.
36351  *
36352  * If @close_fd, is %TRUE, the file descriptor will be closed when
36353  * the output stream is destroyed.
36354  *
36355  * Returns: a new #GOutputStream
36356  */
36357
36358
36359 /**
36360  * g_unix_output_stream_set_close_fd:
36361  * @stream: a #GUnixOutputStream
36362  * @close_fd: %TRUE to close the file descriptor when done
36363  *
36364  * Sets whether the file descriptor of @stream shall be closed
36365  * when the stream is closed.
36366  *
36367  * Since: 2.20
36368  */
36369
36370
36371 /**
36372  * g_unix_socket_address_abstract_names_supported:
36373  *
36374  * Checks if abstract unix domain socket names are supported.
36375  *
36376  * Returns: %TRUE if supported, %FALSE otherwise
36377  * Since: 2.22
36378  */
36379
36380
36381 /**
36382  * g_unix_socket_address_get_address_type:
36383  * @address: a #GInetSocketAddress
36384  *
36385  * Gets @address's type.
36386  *
36387  * Returns: a #GUnixSocketAddressType
36388  * Since: 2.26
36389  */
36390
36391
36392 /**
36393  * g_unix_socket_address_get_is_abstract:
36394  * @address: a #GInetSocketAddress
36395  *
36396  * Tests if @address is abstract.
36397  *
36398  * Returns: %TRUE if the address is abstract, %FALSE otherwise
36399  * Since: 2.22
36400  * Deprecated: Use g_unix_socket_address_get_address_type()
36401  */
36402
36403
36404 /**
36405  * g_unix_socket_address_get_path:
36406  * @address: a #GInetSocketAddress
36407  *
36408  * Gets @address's path, or for abstract sockets the "name".
36409  *
36410  * Guaranteed to be zero-terminated, but an abstract socket
36411  * may contain embedded zeros, and thus you should use
36412  * g_unix_socket_address_get_path_len() to get the true length
36413  * of this string.
36414  *
36415  * Returns: the path for @address
36416  * Since: 2.22
36417  */
36418
36419
36420 /**
36421  * g_unix_socket_address_get_path_len:
36422  * @address: a #GInetSocketAddress
36423  *
36424  * Gets the length of @address's path.
36425  *
36426  * For details, see g_unix_socket_address_get_path().
36427  *
36428  * Returns: the length of the path
36429  * Since: 2.22
36430  */
36431
36432
36433 /**
36434  * g_unix_socket_address_new:
36435  * @path: the socket path
36436  *
36437  * Creates a new #GUnixSocketAddress for @path.
36438  *
36439  * To create abstract socket addresses, on systems that support that,
36440  * use g_unix_socket_address_new_abstract().
36441  *
36442  * Returns: a new #GUnixSocketAddress
36443  * Since: 2.22
36444  */
36445
36446
36447 /**
36448  * g_unix_socket_address_new_abstract:
36449  * @path: (array length=path_len) (element-type gchar): the abstract name
36450  * @path_len: the length of @path, or -1
36451  *
36452  * Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
36453  * #GUnixSocketAddress for @path.
36454  *
36455  * Returns: a new #GUnixSocketAddress
36456  * Deprecated: Use g_unix_socket_address_new_with_type().
36457  */
36458
36459
36460 /**
36461  * g_unix_socket_address_new_with_type:
36462  * @path: (array length=path_len) (element-type gchar): the name
36463  * @path_len: the length of @path, or -1
36464  * @type: a #GUnixSocketAddressType
36465  *
36466  * Creates a new #GUnixSocketAddress of type @type with name @path.
36467  *
36468  * If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to
36469  * calling g_unix_socket_address_new().
36470  *
36471  * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len
36472  * bytes of @path will be copied to the socket's path, and only those
36473  * bytes will be considered part of the name. (If @path_len is -1,
36474  * then @path is assumed to be NUL-terminated.) For example, if @path
36475  * was "test", then calling g_socket_address_get_native_size() on the
36476  * returned socket would return 7 (2 bytes of overhead, 1 byte for the
36477  * abstract-socket indicator byte, and 4 bytes for the name "test").
36478  *
36479  * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then
36480  * @path_len bytes of @path will be copied to the socket's path, the
36481  * rest of the path will be padded with 0 bytes, and the entire
36482  * zero-padded buffer will be considered the name. (As above, if
36483  * @path_len is -1, then @path is assumed to be NUL-terminated.) In
36484  * this case, g_socket_address_get_native_size() will always return
36485  * the full size of a <literal>struct sockaddr_un</literal>, although
36486  * g_unix_socket_address_get_path_len() will still return just the
36487  * length of @path.
36488  *
36489  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over
36490  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course,
36491  * when connecting to a server created by another process, you must
36492  * use the appropriate type corresponding to how that process created
36493  * its listening socket.
36494  *
36495  * Returns: a new #GUnixSocketAddress
36496  * Since: 2.26
36497  */
36498
36499
36500 /**
36501  * g_utf8_next_char:
36502  * @p: Pointer to the start of a valid UTF-8 character
36503  *
36504  * Skips to the next character in a UTF-8 string. The string must be
36505  * valid; this macro is as fast as possible, and has no error-checking.
36506  * You would use this macro to iterate over a string character by
36507  * character. The macro returns the start of the next UTF-8 character.
36508  * Before using this macro, use g_utf8_validate() to validate strings
36509  * that may contain invalid UTF-8.
36510  */
36511
36512
36513 /**
36514  * g_vfs_get_default:
36515  *
36516  * Gets the default #GVfs for the system.
36517  *
36518  * Returns: (transfer none): a #GVfs.
36519  */
36520
36521
36522 /**
36523  * g_vfs_get_file_for_path:
36524  * @vfs: a #GVfs.
36525  * @path: a string containing a VFS path.
36526  *
36527  * Gets a #GFile for @path.
36528  *
36529  * Free the returned object with g_object_unref().
36530  *
36531  * Returns: (transfer full): a #GFile.
36532  */
36533
36534
36535 /**
36536  * g_vfs_get_file_for_uri:
36537  * @vfs: a#GVfs.
36538  * @uri: a string containing a URI
36539  *
36540  * Gets a #GFile for @uri.
36541  *
36542  * This operation never fails, but the returned object
36543  * might not support any I/O operation if the URI
36544  * is malformed or if the URI scheme is not supported.
36545  *
36546  * Free the returned object with g_object_unref().
36547  *
36548  * Returns: (transfer full): a #GFile.
36549  */
36550
36551
36552 /**
36553  * g_vfs_get_local:
36554  *
36555  * Gets the local #GVfs for the system.
36556  *
36557  * Returns: (transfer none): a #GVfs.
36558  */
36559
36560
36561 /**
36562  * g_vfs_get_supported_uri_schemes:
36563  * @vfs: a #GVfs.
36564  *
36565  * Gets a list of URI schemes supported by @vfs.
36566  *
36567  * The returned array belongs to GIO and must
36568  * not be freed or modified.
36569  *
36570  * Returns: (transfer none): a %NULL-terminated array of strings.
36571  */
36572
36573
36574 /**
36575  * g_vfs_is_active:
36576  * @vfs: a #GVfs.
36577  *
36578  * Checks if the VFS is active.
36579  *
36580  * Returns: %TRUE if construction of the @vfs was successful and it is now active.
36581  */
36582
36583
36584 /**
36585  * g_vfs_parse_name:
36586  * @vfs: a #GVfs.
36587  * @parse_name: a string to be parsed by the VFS module.
36588  *
36589  * This operation never fails, but the returned object might
36590  * not support any I/O operations if the @parse_name cannot
36591  * be parsed by the #GVfs module.
36592  *
36593  * Free the returned object with g_object_unref().
36594  *
36595  * Returns: (transfer full): a #GFile for the given @parse_name.
36596  */
36597
36598
36599 /**
36600  * g_volume_can_eject:
36601  * @volume: a #GVolume.
36602  *
36603  * Checks if a volume can be ejected.
36604  *
36605  * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise.
36606  */
36607
36608
36609 /**
36610  * g_volume_can_mount:
36611  * @volume: a #GVolume.
36612  *
36613  * Checks if a volume can be mounted.
36614  *
36615  * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise.
36616  */
36617
36618
36619 /**
36620  * g_volume_eject:
36621  * @volume: a #GVolume.
36622  * @flags: flags affecting the unmount if required for eject
36623  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
36624  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
36625  * @user_data: user data that gets passed to @callback
36626  *
36627  * Ejects a volume. This is an asynchronous operation, and is
36628  * finished by calling g_volume_eject_finish() with the @volume
36629  * and #GAsyncResult returned in the @callback.
36630  *
36631  * Deprecated: 2.22: Use g_volume_eject_with_operation() instead.
36632  */
36633
36634
36635 /**
36636  * g_volume_eject_finish:
36637  * @volume: pointer to a #GVolume.
36638  * @result: a #GAsyncResult.
36639  * @error: a #GError location to store an error, or %NULL to ignore
36640  *
36641  * Finishes ejecting a volume. If any errors occured during the operation,
36642  * @error will be set to contain the errors and %FALSE will be returned.
36643  *
36644  * Returns: %TRUE, %FALSE if operation failed.
36645  * Deprecated: 2.22: Use g_volume_eject_with_operation_finish() instead.
36646  */
36647
36648
36649 /**
36650  * g_volume_eject_with_operation:
36651  * @volume: a #GVolume.
36652  * @flags: flags affecting the unmount if required for eject
36653  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
36654  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
36655  * @callback: a #GAsyncReadyCallback, or %NULL.
36656  * @user_data: user data passed to @callback.
36657  *
36658  * Ejects a volume. This is an asynchronous operation, and is
36659  * finished by calling g_volume_eject_with_operation_finish() with the @volume
36660  * and #GAsyncResult data returned in the @callback.
36661  *
36662  * Since: 2.22
36663  */
36664
36665
36666 /**
36667  * g_volume_eject_with_operation_finish:
36668  * @volume: a #GVolume.
36669  * @result: a #GAsyncResult.
36670  * @error: a #GError location to store the error occuring, or %NULL to ignore.
36671  *
36672  * Finishes ejecting a volume. If any errors occurred during the operation,
36673  * @error will be set to contain the errors and %FALSE will be returned.
36674  *
36675  * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise.
36676  * Since: 2.22
36677  */
36678
36679
36680 /**
36681  * g_volume_enumerate_identifiers:
36682  * @volume: a #GVolume
36683  *
36684  * Gets the kinds of <link linkend="volume-identifier">identifiers</link>
36685  * that @volume has. Use g_volume_get_identifer() to obtain
36686  * the identifiers themselves.
36687  *
36688  * of strings containing kinds of identifiers. Use g_strfreev() to free.
36689  *
36690  * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated array
36691  */
36692
36693
36694 /**
36695  * g_volume_get_activation_root:
36696  * @volume: a #GVolume
36697  *
36698  * Gets the activation root for a #GVolume if it is known ahead of
36699  * mount time. Returns %NULL otherwise. If not %NULL and if @volume
36700  * is mounted, then the result of g_mount_get_root() on the
36701  * #GMount object obtained from g_volume_get_mount() will always
36702  * either be equal or a prefix of what this function returns. In
36703  * other words, in code
36704  *
36705  * <programlisting>
36706  * GMount *mount;
36707  * GFile *mount_root
36708  * GFile *volume_activation_root;
36709  *
36710  * mount = g_volume_get_mount (volume); /&ast; mounted, so never NULL &ast;/
36711  * mount_root = g_mount_get_root (mount);
36712  * volume_activation_root = g_volume_get_activation_root(volume); /&ast; assume not NULL &ast;/
36713  * </programlisting>
36714  *
36715  * then the expression
36716  *
36717  * <programlisting>
36718  * (g_file_has_prefix (volume_activation_root, mount_root) ||
36719  * </programlisting>
36720  *
36721  * will always be %TRUE.
36722  *
36723  * Activation roots are typically used in #GVolumeMonitor
36724  * implementations to find the underlying mount to shadow, see
36725  * g_mount_is_shadowed() for more details.
36726  *
36727  * g_object_unref() to free.
36728  *
36729  * Returns: (transfer full): the activation root of @volume or %NULL. Use
36730  * Since: 2.18
36731  */
36732
36733
36734 /**
36735  * g_volume_get_drive:
36736  * @volume: a #GVolume.
36737  *
36738  * Gets the drive for the @volume.
36739  *
36740  * The returned object should be unreffed with g_object_unref()
36741  * when no longer needed.
36742  *
36743  * Returns: (transfer full): a #GDrive or %NULL if @volume is not associated with a drive.
36744  */
36745
36746
36747 /**
36748  * g_volume_get_icon:
36749  * @volume: a #GVolume.
36750  *
36751  * Gets the icon for @volume.
36752  *
36753  * The returned object should be unreffed with g_object_unref()
36754  * when no longer needed.
36755  *
36756  * Returns: (transfer full): a #GIcon.
36757  */
36758
36759
36760 /**
36761  * g_volume_get_identifier:
36762  * @volume: a #GVolume
36763  * @kind: the kind of identifier to return
36764  *
36765  * Gets the identifier of the given kind for @volume.
36766  * See the <link linkend="volume-identifier">introduction</link>
36767  * for more information about volume identifiers.
36768  *
36769  * requested identfier, or %NULL if the #GVolume
36770  * doesn't have this kind of identifier
36771  *
36772  * Returns: a newly allocated string containing the
36773  */
36774
36775
36776 /**
36777  * g_volume_get_mount:
36778  * @volume: a #GVolume.
36779  *
36780  * Gets the mount for the @volume.
36781  *
36782  * The returned object should be unreffed with g_object_unref()
36783  * when no longer needed.
36784  *
36785  * Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted.
36786  */
36787
36788
36789 /**
36790  * g_volume_get_name:
36791  * @volume: a #GVolume.
36792  *
36793  * Gets the name of @volume.
36794  *
36795  * be freed with g_free() when no longer needed.
36796  *
36797  * Returns: the name for the given @volume. The returned string should
36798  */
36799
36800
36801 /**
36802  * g_volume_get_uuid:
36803  * @volume: a #GVolume.
36804  *
36805  * Gets the UUID for the @volume. The reference is typically based on
36806  * the file system UUID for the volume in question and should be
36807  * considered an opaque string. Returns %NULL if there is no UUID
36808  * available.
36809  *
36810  * The returned string should be freed with g_free()
36811  * when no longer needed.
36812  *
36813  * Returns: the UUID for @volume or %NULL if no UUID can be computed.
36814  */
36815
36816
36817 /**
36818  * g_volume_monitor_adopt_orphan_mount:
36819  * @mount: a #GMount object to find a parent for
36820  *
36821  * This function should be called by any #GVolumeMonitor
36822  * implementation when a new #GMount object is created that is not
36823  * associated with a #GVolume object. It must be called just before
36824  * emitting the @mount_added signal.
36825  *
36826  * If the return value is not %NULL, the caller must associate the
36827  * returned #GVolume object with the #GMount. This involves returning
36828  * it in its g_mount_get_volume() implementation. The caller must
36829  * also listen for the "removed" signal on the returned object
36830  * and give up its reference when handling that signal
36831  *
36832  * Similary, if implementing g_volume_monitor_adopt_orphan_mount(),
36833  * the implementor must take a reference to @mount and return it in
36834  * its g_volume_get_mount() implemented. Also, the implementor must
36835  * listen for the "unmounted" signal on @mount and give up its
36836  * reference upon handling that signal.
36837  *
36838  * There are two main use cases for this function.
36839  *
36840  * One is when implementing a user space file system driver that reads
36841  * blocks of a block device that is already represented by the native
36842  * volume monitor (for example a CD Audio file system driver). Such
36843  * a driver will generate its own #GMount object that needs to be
36844  * assoicated with the #GVolume object that represents the volume.
36845  *
36846  * The other is for implementing a #GVolumeMonitor whose sole purpose
36847  * is to return #GVolume objects representing entries in the users
36848  * "favorite servers" list or similar.
36849  *
36850  * if no wants to adopt the #GMount.
36851  *
36852  * implementations should instead create shadow mounts with the URI of
36853  * the mount they intend to adopt. See the proxy volume monitor in
36854  * gvfs for an example of this. Also see g_mount_is_shadowed(),
36855  * g_mount_shadow() and g_mount_unshadow() functions.
36856  *
36857  * Returns: (transfer full): the #GVolume object that is the parent for @mount or %NULL
36858  * Deprecated: 2.20: Instead of using this function, #GVolumeMonitor
36859  */
36860
36861
36862 /**
36863  * g_volume_monitor_get:
36864  *
36865  * Gets the volume monitor used by gio.
36866  *
36867  * g_object_unref() when done with it.
36868  *
36869  * Returns: (transfer full): a reference to the #GVolumeMonitor used by gio. Call
36870  */
36871
36872
36873 /**
36874  * g_volume_monitor_get_connected_drives:
36875  * @volume_monitor: a #GVolumeMonitor.
36876  *
36877  * Gets a list of drives connected to the system.
36878  *
36879  * The returned list should be freed with g_list_free(), after
36880  * its elements have been unreffed with g_object_unref().
36881  *
36882  * Returns: (element-type GDrive) (transfer full): a #GList of connected #GDrive objects.
36883  */
36884
36885
36886 /**
36887  * g_volume_monitor_get_mount_for_uuid:
36888  * @volume_monitor: a #GVolumeMonitor.
36889  * @uuid: the UUID to look for
36890  *
36891  * Finds a #GMount object by its UUID (see g_mount_get_uuid())
36892  *
36893  * Free the returned object with g_object_unref().
36894  *
36895  * Returns: (transfer full): a #GMount or %NULL if no such mount is available.
36896  */
36897
36898
36899 /**
36900  * g_volume_monitor_get_mounts:
36901  * @volume_monitor: a #GVolumeMonitor.
36902  *
36903  * Gets a list of the mounts on the system.
36904  *
36905  * The returned list should be freed with g_list_free(), after
36906  * its elements have been unreffed with g_object_unref().
36907  *
36908  * Returns: (element-type GMount) (transfer full): a #GList of #GMount objects.
36909  */
36910
36911
36912 /**
36913  * g_volume_monitor_get_volume_for_uuid:
36914  * @volume_monitor: a #GVolumeMonitor.
36915  * @uuid: the UUID to look for
36916  *
36917  * Finds a #GVolume object by its UUID (see g_volume_get_uuid())
36918  *
36919  * Free the returned object with g_object_unref().
36920  *
36921  * Returns: (transfer full): a #GVolume or %NULL if no such volume is available.
36922  */
36923
36924
36925 /**
36926  * g_volume_monitor_get_volumes:
36927  * @volume_monitor: a #GVolumeMonitor.
36928  *
36929  * Gets a list of the volumes on the system.
36930  *
36931  * The returned list should be freed with g_list_free(), after
36932  * its elements have been unreffed with g_object_unref().
36933  *
36934  * Returns: (element-type GVolume) (transfer full): a #GList of #GVolume objects.
36935  */
36936
36937
36938 /**
36939  * g_volume_mount:
36940  * @volume: a #GVolume.
36941  * @flags: flags affecting the operation
36942  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
36943  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
36944  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
36945  * @user_data: user data that gets passed to @callback
36946  *
36947  * Mounts a volume. This is an asynchronous operation, and is
36948  * finished by calling g_volume_mount_finish() with the @volume
36949  * and #GAsyncResult returned in the @callback.
36950  *
36951  * Virtual: mount_fn
36952  */
36953
36954
36955 /**
36956  * g_volume_mount_finish:
36957  * @volume: a #GVolume
36958  * @result: a #GAsyncResult
36959  * @error: a #GError location to store an error, or %NULL to ignore
36960  *
36961  * Finishes mounting a volume. If any errors occured during the operation,
36962  * @error will be set to contain the errors and %FALSE will be returned.
36963  *
36964  * If the mount operation succeeded, g_volume_get_mount() on @volume
36965  * is guaranteed to return the mount right after calling this
36966  * function; there's no need to listen for the 'mount-added' signal on
36967  * #GVolumeMonitor.
36968  *
36969  * Returns: %TRUE, %FALSE if operation failed.
36970  */
36971
36972
36973 /**
36974  * g_volume_should_automount:
36975  * @volume: a #GVolume
36976  *
36977  * Returns whether the volume should be automatically mounted.
36978  *
36979  * Returns: %TRUE if the volume should be automatically mounted.
36980  */
36981
36982
36983 /**
36984  * g_warn_if_fail:
36985  * @expr: the expression to check
36986  *
36987  * Logs a warning if the expression is not true.
36988  *
36989  * Since: 2.16
36990  */
36991
36992
36993 /**
36994  * g_warn_if_reached:
36995  *
36996  * Logs a critical warning.
36997  *
36998  * Since: 2.16
36999  */
37000
37001
37002 /**
37003  * g_win32_input_stream_get_close_handle:
37004  * @stream: a #GWin32InputStream
37005  *
37006  * Returns whether the handle of @stream will be
37007  * closed when the stream is closed.
37008  *
37009  * Returns: %TRUE if the handle is closed when done
37010  * Since: 2.26
37011  */
37012
37013
37014 /**
37015  * g_win32_input_stream_get_handle:
37016  * @stream: a #GWin32InputStream
37017  *
37018  * Return the Windows file handle that the stream reads from.
37019  *
37020  * Returns: The file handle of @stream
37021  * Since: 2.26
37022  */
37023
37024
37025 /**
37026  * g_win32_input_stream_new:
37027  * @handle: a Win32 file handle
37028  * @close_fd: %TRUE to close the handle when done
37029  *
37030  * Creates a new #GWin32InputStream for the given @fd.
37031  *
37032  * If @close_handle is %TRUE, the handle will be closed
37033  * when the stream is closed.
37034  *
37035  * Note that "handle" here means a Win32 HANDLE, not a "file descriptor"
37036  * as used in the Windows C libraries.
37037  *
37038  * Returns: a new #GWin32InputStream
37039  */
37040
37041
37042 /**
37043  * g_win32_input_stream_set_close_handle:
37044  * @stream: a #GWin32InputStream
37045  * @close_handle: %TRUE to close the handle when done
37046  *
37047  * Sets whether the handle of @stream shall be closed
37048  * when the stream is closed.
37049  *
37050  * Since: 2.26
37051  */
37052
37053
37054 /**
37055  * g_win32_output_stream_get_close_handle:
37056  * @stream: a #GWin32OutputStream
37057  *
37058  * Returns whether the handle of @stream will be closed when the
37059  * stream is closed.
37060  *
37061  * Returns: %TRUE if the handle is closed when done
37062  * Since: 2.26
37063  */
37064
37065
37066 /**
37067  * g_win32_output_stream_get_handle:
37068  * @stream: a #GWin32OutputStream
37069  *
37070  * Return the Windows handle that the stream writes to.
37071  *
37072  * Returns: The handle descriptor of @stream
37073  * Since: 2.26
37074  */
37075
37076
37077 /**
37078  * g_win32_output_stream_new:
37079  * @handle: a Win32 file handle
37080  * @close_handle: %TRUE to close the handle when done
37081  *
37082  * Creates a new #GWin32OutputStream for the given @handle.
37083  *
37084  * If @close_handle, is %TRUE, the handle will be closed when the
37085  * output stream is destroyed.
37086  *
37087  * Returns: a new #GOutputStream
37088  * Since: 2.26
37089  */
37090
37091
37092 /**
37093  * g_win32_output_stream_set_close_handle:
37094  * @stream: a #GWin32OutputStream
37095  * @close_handle: %TRUE to close the handle when done
37096  *
37097  * Sets whether the handle of @stream shall be closed when the stream
37098  * is closed.
37099  *
37100  * Since: 2.26
37101  */
37102
37103
37104 /**
37105  * g_zlib_compressor_get_file_info:
37106  * @compressor: a #GZlibCompressor
37107  *
37108  * Returns the #GZlibCompressor:file-info property.
37109  *
37110  * Returns: (transfer none): a #GFileInfo, or %NULL
37111  * Since: 2.26
37112  */
37113
37114
37115 /**
37116  * g_zlib_compressor_new:
37117  * @format: The format to use for the compressed data
37118  * @level: compression level (0-9), -1 for default
37119  *
37120  * Creates a new #GZlibCompressor.
37121  *
37122  * Returns: a new #GZlibCompressor
37123  * Since: 2.24
37124  */
37125
37126
37127 /**
37128  * g_zlib_compressor_set_file_info:
37129  * @compressor: a #GZlibCompressor
37130  * @file_info: (allow-none): a #GFileInfo
37131  *
37132  * Sets @file_info in @compressor. If non-%NULL, and @compressor's
37133  * #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
37134  * it will be used to set the file name and modification time in
37135  * the GZIP header of the compressed data.
37136  *
37137  * Note: it is an error to call this function while a compression is in
37138  * progress; it may only be called immediately after creation of @compressor,
37139  * or after resetting it with g_converter_reset().
37140  *
37141  * Since: 2.26
37142  */
37143
37144
37145 /**
37146  * g_zlib_decompressor_get_file_info:
37147  * @decompressor: a #GZlibDecompressor
37148  *
37149  * Retrieves the #GFileInfo constructed from the GZIP header data
37150  * of compressed data processed by @compressor, or %NULL if @decompressor's
37151  * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
37152  * or the header data was not fully processed yet, or it not present in the
37153  * data stream at all.
37154  *
37155  * Returns: (transfer none): a #GFileInfo, or %NULL
37156  * Since: 2.26
37157  */
37158
37159
37160 /**
37161  * g_zlib_decompressor_new:
37162  * @format: The format to use for the compressed data
37163  *
37164  * Creates a new #GZlibDecompressor.
37165  *
37166  * Returns: a new #GZlibDecompressor
37167  * Since: 2.24
37168  */
37169
37170
37171 /**
37172  * gchararray:
37173  *
37174  * A C representable type name for #G_TYPE_STRING.
37175  */
37176
37177
37178 /**
37179  * get_all_desktop_entries_for_mime_type:
37180  * @mime_type: a mime type.
37181  * @except: NULL or a strv list
37182  *
37183  * Returns all the desktop ids for @mime_type. The desktop files
37184  * are listed in an order so that default applications are listed before
37185  * non-default ones, and handlers for inherited mimetypes are listed
37186  * after the base ones.
37187  *
37188  * Optionally doesn't list the desktop ids given in the @except
37189  *
37190  * to handle @mime_type.
37191  *
37192  * Returns: a #GList containing the desktop ids which claim
37193  */
37194
37195
37196 /**
37197  * gunichar:
37198  *
37199  * A type which can hold any UTF-32 or UCS-4 character code,
37200  * also known as a Unicode code point.
37201  *
37202  * If you want to produce the UTF-8 representation of a #gunichar,
37203  * use g_ucs4_to_utf8(). See also g_utf8_to_ucs4() for the reverse
37204  * process.
37205  *
37206  * To print/scan values of this type as integer, use
37207  * %G_GINT32_MODIFIER and/or %G_GUINT32_FORMAT.
37208  *
37209  * The notation to express a Unicode code point in running text is
37210  * as a hexadecimal number with four to six digits and uppercase
37211  * letters, prefixed by the string "U+". Leading zeros are omitted,
37212  * unless the code point would have fewer than four hexadecimal digits.
37213  * For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point
37214  * in the U+-notation, use the format string "U+%04"G_GINT32_FORMAT"X".
37215  * To scan, use the format string "U+%06"G_GINT32_FORMAT"X".
37216  *
37217  * |[
37218  * gunichar c;
37219  * sscanf ("U+0041", "U+%06"G_GINT32_FORMAT"X", &amp;c)
37220  * g_print ("Read U+%04"G_GINT32_FORMAT"X", c);
37221  * ]|
37222  */
37223
37224
37225 /**
37226  * gunichar2:
37227  *
37228  * A type which can hold any UTF-16 code
37229  * point<footnote id="utf16_surrogate_pairs">UTF-16 also has so called
37230  * <firstterm>surrogate pairs</firstterm> to encode characters beyond
37231  * the BMP as pairs of 16bit numbers. Surrogate pairs cannot be stored
37232  * in a single gunichar2 field, but all GLib functions accepting gunichar2
37233  * arrays will correctly interpret surrogate pairs.</footnote>.
37234  *
37235  * To print/scan values of this type to/from text you need to convert
37236  * to/from UTF-8, using g_utf16_to_utf8()/g_utf8_to_utf16().
37237  *
37238  * To print/scan values of this type as integer, use
37239  * %G_GINT16_MODIFIER and/or %G_GUINT16_FORMAT.
37240  */
37241
37242
37243 /**
37244  * mime_info_cache_reload:
37245  * @dir: directory path which needs reloading.
37246  *
37247  * Reload the mime information for the @dir.
37248  */
37249
37250
37251
37252 /************************************************************/
37253 /* THIS FILE IS GENERATED DO NOT EDIT */
37254 /************************************************************/