Update annotations for GLib 2.31.14
[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_action_map_add_action_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_action_map_add_action_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  * @change_action_state: the virtual function pointer for g_action_group_change_action_state()
137  * @query_action: the virtual function pointer for g_action_group_query_action()
138  * @activate_action: the virtual function pointer for g_action_group_activate_action()
139  * @action_added: the class closure for the #GActionGroup::action-added signal
140  * @action_removed: the class closure for the #GActionGroup::action-removed signal
141  * @action_enabled_changed: the class closure for the #GActionGroup::action-enabled-changed signal
142  * @action_state_changed: the class closure for the #GActionGroup::action-enabled-changed signal
143  *
144  * The virtual function table for #GActionGroup.
145  *
146  * Since: 2.28
147  */
148
149
150 /**
151  * GActionInterface:
152  * @get_name: the virtual function pointer for g_action_get_name()
153  * @get_parameter_type: the virtual function pointer for g_action_get_parameter_type()
154  * @get_state_type: the virtual function pointer for g_action_get_state_type()
155  * @get_state_hint: the virtual function pointer for g_action_get_state_hint()
156  * @get_enabled: the virtual function pointer for g_action_get_enabled()
157  * @get_state: the virtual function pointer for g_action_get_state()
158  * @change_state: the virtual function pointer for g_action_change_state()
159  * @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.
160  *
161  * The virtual function table for #GAction.
162  *
163  * Since: 2.28
164  */
165
166
167 /**
168  * GActionMapInterface:
169  * @lookup_action: the virtual function pointer for g_action_map_lookup_action()
170  * @add_action: the virtual function pointer for g_action_map_add_action()
171  * @remove_action: the virtual function pointer for g_action_map_remove_action()
172  *
173  * The virtual function table for #GActionMap.
174  *
175  * Since: 2.32
176  */
177
178
179 /**
180  * GAppInfo:
181  *
182  * Information about an installed application and methods to launch
183  * it (with file arguments).
184  */
185
186
187 /**
188  * GAppInfoCreateFlags:
189  * @G_APP_INFO_CREATE_NONE: No flags.
190  * @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window.
191  * @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments.
192  * @G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION: Application supports startup notification. Since 2.26
193  *
194  * Flags used when creating a #GAppInfo.
195  */
196
197
198 /**
199  * GAppInfoIface:
200  * @g_iface: The parent interface.
201  * @dup: Copies a #GAppInfo.
202  * @equal: Checks two #GAppInfo<!-- -->s for equality.
203  * @get_id: Gets a string identifier for a #GAppInfo.
204  * @get_name: Gets the name of the application for a #GAppInfo.
205  * @get_description: Gets a short description for the application described by the #GAppInfo.
206  * @get_executable: Gets the executable name for the #GAppInfo.
207  * @get_icon: Gets the #GIcon for the #GAppInfo.
208  * @launch: Launches an application specified by the #GAppInfo.
209  * @supports_uris: Indicates whether the application specified supports launching URIs.
210  * @supports_files: Indicates whether the application specified accepts filename arguments.
211  * @launch_uris: Launches an application with a list of URIs.
212  * @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>.
213  * @set_as_default_for_type: Sets an application as default for a given content type.
214  * @set_as_default_for_extension: Sets an application as default for a given file extension.
215  * @add_supports_type: Adds to the #GAppInfo information about supported file types.
216  * @can_remove_supports_type: Checks for support for removing supported file types from a #GAppInfo.
217  * @remove_supports_type: Removes a supported application type from a #GAppInfo.
218  * @can_delete: Checks if a #GAppInfo can be deleted. Since 2.20
219  * @do_delete: Deletes a #GAppInfo. Since 2.20
220  * @get_commandline: Gets the commandline for the #GAppInfo. Since 2.20
221  * @get_display_name: Gets the display name for the #GAppInfo. Since 2.24
222  * @set_as_last_used_for_type: Sets the application as the last used. See g_app_info_set_as_last_used_for_type().
223  *
224  * Application Information interface, for operating system portability.
225  */
226
227
228 /**
229  * GAppLaunchContext:
230  *
231  * Integrating the launch with the launching application. This is used to
232  * handle for instance startup notification and launching the new application
233  * on the same screen as the launching window.
234  */
235
236
237 /**
238  * GApplication:
239  *
240  *
241  *
242  * Since: 2.28
243  */
244
245
246 /**
247  * GApplication::activate:
248  * @application: the application
249  *
250  * The ::activate signal is emitted on the primary instance when an
251  * activation occurs. See g_application_activate().
252  */
253
254
255 /**
256  * GApplication::command-line:
257  * @application: the application
258  * @command_line: a #GApplicationCommandLine representing the passed commandline
259  *
260  * The ::command-line signal is emitted on the primary instance when
261  * a commandline is not handled locally. See g_application_run() and
262  * the #GApplicationCommandline documentation for more information.
263  *
264  * process. See g_application_command_line_set_exit_status().
265  *
266  * Returns: An integer that is set as the exit status for the calling
267  */
268
269
270 /**
271  * GApplication::open:
272  * @application: the application
273  * @files: (array length=n_files) (element-type GFile): an array of #GFiles
274  * @n_files: the length of @files
275  * @hint: a hint provided by the calling instance
276  *
277  * The ::open signal is emitted on the primary instance when there are
278  * files to open. See g_application_open() for more information.
279  */
280
281
282 /**
283  * GApplication::shutdown:
284  * @application: the application
285  *
286  * The ::shutdown signal is emitted only on the registered primary instance
287  * immediately after the main loop terminates.
288  */
289
290
291 /**
292  * GApplication::startup:
293  * @application: the application
294  *
295  * The ::startup signal is emitted on the primary instance immediately
296  * after registration. See g_application_register().
297  */
298
299
300 /**
301  * GApplicationClass:
302  * @startup: invoked on the primary instance immediately after registration
303  * @shutdown: invoked only on the registered primary instance immediately after the main loop terminates
304  * @activate: invoked on the primary instance when an activation occurs
305  * @open: invoked on the primary instance when there are files to open
306  * @command_line: invoked on the primary instance when a command-line is not handled locally
307  * @local_command_line: invoked (locally) when the process has been invoked via commandline execution (as opposed to, say, D-Bus activation - which is not currently supported by GApplication). The virtual function has the chance to inspect (and possibly replace) the list of command line arguments. See g_application_run() for more information.
308  * @before_emit: invoked on the primary instance before 'activate', 'open', 'command-line' or any action invocation, gets the 'platform data' from the calling instance
309  * @after_emit: invoked on the primary instance after 'activate', 'open', 'command-line' or any action invocation, gets the 'platform data' from the calling instance
310  * @add_platform_data: invoked (locally) to add 'platform data' to be sent to the primary instance when activating, opening or invoking actions
311  * @quit_mainloop: Used to be invoked on the primary instance when the use count of the application drops to zero (and after any inactivity timeout, if requested). Not used anymore since 2.32
312  * @run_mainloop: Used to be invoked on the primary instance from g_application_run() if the use-count is non-zero. Since 2.32, GApplication is iterating the main context directly and is not using @run_mainloop anymore
313  *
314  * Virtual function table for #GApplication.
315  *
316  * Since: 2.28
317  */
318
319
320 /**
321  * GApplicationCommandLineClass:
322  *
323  * The <structname>GApplicationCommandLineClass</structname> structure
324  * contains private data only
325  *
326  * Since: 2.28
327  */
328
329
330 /**
331  * GApplicationFlags:
332  * @G_APPLICATION_FLAGS_NONE: Default
333  * @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.
334  * @G_APPLICATION_IS_LAUNCHER: Don't try to become the primary instance.
335  * @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.
336  * @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.
337  * @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().
338  * @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.
339  *
340  * Flags used to define the behaviour of a #GApplication.
341  *
342  * Since: 2.28
343  */
344
345
346 /**
347  * GAskPasswordFlags:
348  * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password.
349  * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username.
350  * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain.
351  * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings.
352  * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users.
353  *
354  * #GAskPasswordFlags are used to request specific information from the
355  * user, or to notify the user of their choices in an authentication
356  * situation.
357  */
358
359
360 /**
361  * GAsyncInitable:
362  *
363  * Interface for asynchronously initializable objects.
364  *
365  * Since: 2.22
366  */
367
368
369 /**
370  * GAsyncInitableIface:
371  * @g_iface: The parent interface.
372  * @init_async: Starts initialization of the object.
373  * @init_finish: Finishes initialization of the object.
374  *
375  * Provides an interface for asynchronous initializing object such that
376  * initialization may fail.
377  *
378  * Since: 2.22
379  */
380
381
382 /**
383  * GAsyncReadyCallback:
384  * @source_object: the object the asynchronous operation was started with.
385  * @res: a #GAsyncResult.
386  * @user_data: user data passed to the callback.
387  *
388  * Type definition for a function that will be called back when an asynchronous
389  * operation within GIO has been completed.
390  */
391
392
393 /**
394  * GAsyncResult:
395  *
396  * Holds results information for an asynchronous operation,
397  * usually passed directly to a asynchronous _finish() operation.
398  */
399
400
401 /**
402  * GAsyncResultIface:
403  * @g_iface: The parent interface.
404  * @get_user_data: Gets the user data passed to the callback.
405  * @get_source_object: Gets the source object that issued the asynchronous operation.
406  *
407  * Interface definition for #GAsyncResult.
408  */
409
410
411 /**
412  * GBaseFinalizeFunc:
413  * @g_class: The #GTypeClass structure to finalize.
414  *
415  * A callback function used by the type system to finalize those portions
416  * of a derived types class structure that were setup from the corresponding
417  * GBaseInitFunc() function. Class finalization basically works the inverse
418  * way in which class intialization is performed.
419  * See GClassInitFunc() for a discussion of the class intialization process.
420  */
421
422
423 /**
424  * GBaseInitFunc:
425  * @g_class: The #GTypeClass structure to initialize.
426  *
427  * A callback function used by the type system to do base initialization
428  * of the class structures of derived types. It is called as part of the
429  * initialization process of all derived classes and should reallocate
430  * or reset all dynamic class members copied over from the parent class.
431  * For example, class members (such as strings) that are not sufficiently
432  * handled by a plain memory copy of the parent class into the derived class
433  * have to be altered. See GClassInitFunc() for a discussion of the class
434  * intialization process.
435  */
436
437
438 /**
439  * GBinding:
440  *
441  * <structname>GBinding</structname> is an opaque structure whose members
442  * cannot be accessed directly.
443  *
444  * Since: 2.26
445  */
446
447
448 /**
449  * GBindingFlags:
450  * @G_BINDING_DEFAULT: The default binding; if the source property changes, the target property is updated with its value.
451  * @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the property of the source or the property of the target changes, the other is updated.
452  * @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.
453  * @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().
454  *
455  * Flags to be passed to g_object_bind_property() or
456  * g_object_bind_property_full().
457  *
458  * This enumeration can be extended at later date.
459  *
460  * Since: 2.26
461  */
462
463
464 /**
465  * GBindingTransformFunc:
466  * @binding: a #GBinding
467  * @source_value: the value of the source property
468  * @target_value: the value of the target property
469  * @user_data: data passed to the transform function
470  *
471  * A function to be called to transform the source property of @source
472  * from @source_value into the target property of @target
473  * using @target_value.
474  *
475  * otherwise
476  *
477  * Returns: %TRUE if the transformation was successful, and %FALSE
478  * Since: 2.26
479  */
480
481
482 /**
483  * GBookmarkFile:
484  *
485  * The <structname>GBookmarkFile</structname> struct contains only
486  * private data and should not be directly accessed.
487  */
488
489
490 /**
491  * GBookmarkFileError:
492  * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed
493  * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found
494  * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did not register a bookmark
495  * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found
496  * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed
497  * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an unknown encoding
498  * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing
499  * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found
500  *
501  * Error codes returned by bookmark file parsing.
502  */
503
504
505 /**
506  * GBoxedCopyFunc:
507  * @boxed: The boxed structure to be copied.
508  *
509  * This function is provided by the user and should produce a copy
510  * of the passed in boxed structure.
511  *
512  * Returns: The newly created copy of the boxed structure.
513  */
514
515
516 /**
517  * GBoxedFreeFunc:
518  * @boxed: The boxed structure to be freed.
519  *
520  * This function is provided by the user and should free the boxed
521  * structure passed.
522  */
523
524
525 /**
526  * GBufferedInputStream:
527  *
528  * Implements #GFilterInputStream with a sized input buffer.
529  */
530
531
532 /**
533  * GBufferedOutputStream:
534  *
535  * An implementation of #GFilterOutputStream with a sized buffer.
536  */
537
538
539 /**
540  * GBusAcquiredCallback:
541  * @connection: The #GDBusConnection to a message bus.
542  * @name: The name that is requested to be owned.
543  * @user_data: User data passed to g_bus_own_name().
544  *
545  * Invoked when a connection to a message bus has been obtained.
546  *
547  * Since: 2.26
548  */
549
550
551 /**
552  * GBusNameAcquiredCallback:
553  * @connection: The #GDBusConnection on which to acquired the name.
554  * @name: The name being owned.
555  * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
556  *
557  * Invoked when the name is acquired.
558  *
559  * Since: 2.26
560  */
561
562
563 /**
564  * GBusNameAppearedCallback:
565  * @connection: The #GDBusConnection the name is being watched on.
566  * @name: The name being watched.
567  * @name_owner: Unique name of the owner of the name being watched.
568  * @user_data: User data passed to g_bus_watch_name().
569  *
570  * Invoked when the name being watched is known to have to have a owner.
571  *
572  * Since: 2.26
573  */
574
575
576 /**
577  * GBusNameLostCallback:
578  * @connection: The #GDBusConnection on which to acquire the name or %NULL if the connection was disconnected.
579  * @name: The name being owned.
580  * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
581  *
582  * Invoked when the name is lost or @connection has been closed.
583  *
584  * Since: 2.26
585  */
586
587
588 /**
589  * GBusNameOwnerFlags:
590  * @G_BUS_NAME_OWNER_FLAGS_NONE: No flags set.
591  * @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the the name.
592  * @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.
593  *
594  * Flags used in g_bus_own_name().
595  *
596  * Since: 2.26
597  */
598
599
600 /**
601  * GBusNameVanishedCallback:
602  * @connection: The #GDBusConnection the name is being watched on.
603  * @name: The name being watched.
604  * @user_data: User data passed to g_bus_watch_name().
605  *
606  * Invoked when the name being watched is known not to have to have a owner.
607  *
608  * Since: 2.26
609  */
610
611
612 /**
613  * GBusNameWatcherFlags:
614  * @G_BUS_NAME_WATCHER_FLAGS_NONE: No flags set.
615  * @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.
616  *
617  * Flags used in g_bus_watch_name().
618  *
619  * Since: 2.26
620  */
621
622
623 /**
624  * GBusType:
625  * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any.
626  * @G_BUS_TYPE_NONE: Not a message bus.
627  * @G_BUS_TYPE_SYSTEM: The system-wide message bus.
628  * @G_BUS_TYPE_SESSION: The login session message bus.
629  *
630  * An enumeration for well-known message buses.
631  *
632  * Since: 2.26
633  */
634
635
636 /**
637  * GCClosure:
638  * @closure: the #GClosure
639  * @callback: the callback function
640  *
641  * A #GCClosure is a specialization of #GClosure for C function callbacks.
642  */
643
644
645 /**
646  * GCallback:
647  *
648  * The type used for callback functions in structure definitions and function
649  * signatures. This doesn't mean that all callback functions must take no
650  * parameters and return void. The required signature of a callback function
651  * is determined by the context in which is used (e.g. the signal to which it
652  * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
653  */
654
655
656 /**
657  * GCancellable:
658  *
659  * Allows actions to be cancelled.
660  */
661
662
663 /**
664  * GCancellable::cancelled:
665  * @cancellable: a #GCancellable.
666  *
667  * Emitted when the operation has been cancelled.
668  *
669  * Can be used by implementations of cancellable operations. If the
670  * operation is cancelled from another thread, the signal will be
671  * emitted in the thread that cancelled the operation, not the
672  * thread that is running the operation.
673  *
674  * Note that disconnecting from this signal (or any signal) in a
675  * multi-threaded program is prone to race conditions. For instance
676  * it is possible that a signal handler may be invoked even
677  * <emphasis>after</emphasis> a call to
678  * g_signal_handler_disconnect() for that handler has already
679  * returned.
680  *
681  * There is also a problem when cancellation happen
682  * right before connecting to the signal. If this happens the
683  * signal will unexpectedly not be emitted, and checking before
684  * connecting to the signal leaves a race condition where this is
685  * still happening.
686  *
687  * In order to make it safe and easy to connect handlers there
688  * are two helper functions: g_cancellable_connect() and
689  * g_cancellable_disconnect() which protect against problems
690  * like this.
691  *
692  * An example of how to us this:
693  * |[
694  * /<!-- -->* Make sure we don't do any unnecessary work if already cancelled *<!-- -->/
695  * if (g_cancellable_set_error_if_cancelled (cancellable))
696  * return;
697  *
698  * /<!-- -->* Set up all the data needed to be able to
699  * * handle cancellation of the operation *<!-- -->/
700  * my_data = my_data_new (...);
701  *
702  * id = 0;
703  * if (cancellable)
704  * id = g_cancellable_connect (cancellable,
705  * G_CALLBACK (cancelled_handler)
706  * data, NULL);
707  *
708  * /<!-- -->* cancellable operation here... *<!-- -->/
709  *
710  * g_cancellable_disconnect (cancellable, id);
711  *
712  * /<!-- -->* cancelled_handler is never called after this, it
713  * * is now safe to free the data *<!-- -->/
714  * my_data_free (my_data);
715  * ]|
716  *
717  * Note that the cancelled signal is emitted in the thread that
718  * the user cancelled from, which may be the main thread. So, the
719  * cancellable signal should not do something that can block.
720  */
721
722
723 /**
724  * GCancellableSourceFunc:
725  * @cancellable: the #GCancellable
726  * @user_data: data passed in by the user.
727  *
728  * This is the function type of the callback used for the #GSource
729  * returned by g_cancellable_source_new().
730  *
731  * Returns: it should return %FALSE if the source should be removed.
732  * Since: 2.28
733  */
734
735
736 /**
737  * GCharsetConverter:
738  *
739  * Conversions between character sets.
740  */
741
742
743 /**
744  * GChecksum:
745  *
746  * An opaque structure representing a checksumming operation.
747  * To create a new GChecksum, use g_checksum_new(). To free
748  * a GChecksum, use g_checksum_free().
749  *
750  * Since: 2.16
751  */
752
753
754 /**
755  * GChecksumType:
756  * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
757  * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
758  * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
759  *
760  * The hashing algorithm to be used by #GChecksum when performing the
761  * digest of some data.
762  *
763  * Note that the #GChecksumType enumeration may be extended at a later
764  * date to include new hashing algorithm types.
765  *
766  * Since: 2.16
767  */
768
769
770 /**
771  * GChildWatchFunc:
772  * @pid: the process id of the child process
773  * @status: Status information about the child process, see waitpid(2) for more information about this field
774  * @user_data: user data passed to g_child_watch_add()
775  *
776  * The type of functions to be called when a child exists.
777  */
778
779
780 /**
781  * GClassFinalizeFunc:
782  * @g_class: The #GTypeClass structure to finalize.
783  * @class_data: The @class_data member supplied via the #GTypeInfo structure.
784  *
785  * A callback function used by the type system to finalize a class.
786  * This function is rarely needed, as dynamically allocated class resources
787  * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
788  * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
789  * structure of a static type is invalid, because classes of static types
790  * will never be finalized (they are artificially kept alive when their
791  * reference count drops to zero).
792  */
793
794
795 /**
796  * GClassInitFunc:
797  * @g_class: The #GTypeClass structure to initialize.
798  * @class_data: The @class_data member supplied via the #GTypeInfo structure.
799  *
800  * A callback function used by the type system to initialize the class
801  * of a specific type. This function should initialize all static class
802  * members.
803  * The initialization process of a class involves:
804  * <itemizedlist>
805  * <listitem><para>
806  * 1 - Copying common members from the parent class over to the
807  * derived class structure.
808  * </para></listitem>
809  * <listitem><para>
810  * 2 -  Zero initialization of the remaining members not copied
811  * over from the parent class.
812  * </para></listitem>
813  * <listitem><para>
814  * 3 - Invocation of the GBaseInitFunc() initializers of all parent
815  * types and the class' type.
816  * </para></listitem>
817  * <listitem><para>
818  * 4 - Invocation of the class' GClassInitFunc() initializer.
819  * </para></listitem>
820  * </itemizedlist>
821  * Since derived classes are partially initialized through a memory copy
822  * of the parent class, the general rule is that GBaseInitFunc() and
823  * GBaseFinalizeFunc() should take care of necessary reinitialization
824  * and release of those class members that were introduced by the type
825  * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
826  * GClassInitFunc() should only care about initializing static
827  * class members, while dynamic class members (such as allocated strings
828  * or reference counted resources) are better handled by a GBaseInitFunc()
829  * for this type, so proper initialization of the dynamic class members
830  * is performed for class initialization of derived types as well.
831  * An example may help to correspond the intend of the different class
832  * initializers:
833  *
834  * |[
835  * typedef struct {
836  * GObjectClass parent_class;
837  * gint         static_integer;
838  * gchar       *dynamic_string;
839  * } TypeAClass;
840  * static void
841  * type_a_base_class_init (TypeAClass *class)
842  * {
843  * class->dynamic_string = g_strdup ("some string");
844  * }
845  * static void
846  * type_a_base_class_finalize (TypeAClass *class)
847  * {
848  * g_free (class->dynamic_string);
849  * }
850  * static void
851  * type_a_class_init (TypeAClass *class)
852  * {
853  * class->static_integer = 42;
854  * }
855  *
856  * typedef struct {
857  * TypeAClass   parent_class;
858  * gfloat       static_float;
859  * GString     *dynamic_gstring;
860  * } TypeBClass;
861  * static void
862  * type_b_base_class_init (TypeBClass *class)
863  * {
864  * class->dynamic_gstring = g_string_new ("some other string");
865  * }
866  * static void
867  * type_b_base_class_finalize (TypeBClass *class)
868  * {
869  * g_string_free (class->dynamic_gstring);
870  * }
871  * static void
872  * type_b_class_init (TypeBClass *class)
873  * {
874  * class->static_float = 3.14159265358979323846;
875  * }
876  * ]|
877  * Initialization of TypeBClass will first cause initialization of
878  * TypeAClass (derived classes reference their parent classes, see
879  * g_type_class_ref() on this).
880  * Initialization of TypeAClass roughly involves zero-initializing its fields,
881  * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
882  * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
883  * type_a_class_init() to initialize its static members (static_integer).
884  * The first step in the initialization process of TypeBClass is then
885  * a plain memory copy of the contents of TypeAClass into TypeBClass and
886  * zero-initialization of the remaining fields in TypeBClass.
887  * The dynamic members of TypeAClass within TypeBClass now need
888  * reinitialization which is performed by calling type_a_base_class_init()
889  * with an argument of TypeBClass.
890  * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
891  * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
892  * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
893  * is called to complete the initialization process with the static members
894  * (static_float).
895  * Corresponding finalization counter parts to the GBaseInitFunc() functions
896  * have to be provided to release allocated resources at class finalization
897  * time.
898  */
899
900
901 /**
902  * GClosure:
903  * @in_marshal: Indicates whether the closure is currently being invoked with g_closure_invoke()
904  * @is_invalid: Indicates whether the closure has been invalidated by g_closure_invalidate()
905  *
906  * A #GClosure represents a callback supplied by the programmer.
907  */
908
909
910 /**
911  * GClosureMarshal:
912  * @closure: the #GClosure to which the marshaller belongs
913  * @return_value: (allow-none): a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
914  * @n_param_values: the length of the @param_values array
915  * @param_values: (array length=n_param_values): an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
916  * @invocation_hint: (allow-none): the invocation hint given as the last argument to g_closure_invoke()
917  * @marshal_data: (allow-none): additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
918  *
919  * The type used for marshaller functions.
920  */
921
922
923 /**
924  * GClosureNotify:
925  * @data: data specified when registering the notification callback
926  * @closure: the #GClosure on which the notification is emitted
927  *
928  * The type used for the various notification callbacks which can be registered
929  * on closures.
930  */
931
932
933 /**
934  * GConnectFlags:
935  * @G_CONNECT_AFTER: whether the handler should be called before or after the default handler of the signal.
936  * @G_CONNECT_SWAPPED: whether the instance and data should be swapped when calling the handler.
937  *
938  * The connection flags are used to specify the behaviour of a signal's
939  * connection.
940  */
941
942
943 /**
944  * GConvertError:
945  * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character sets is not supported.
946  * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input.
947  * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason.
948  * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input.
949  * @G_CONVERT_ERROR_BAD_URI: URI is invalid.
950  * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path.
951  *
952  * Error codes returned by character set conversion routines.
953  */
954
955
956 /**
957  * GConverter:
958  *
959  * Seek object for streaming operations.
960  *
961  * Since: 2.24
962  */
963
964
965 /**
966  * GConverterFlags:
967  * @G_CONVERTER_NO_FLAGS: No flags.
968  * @G_CONVERTER_INPUT_AT_END: At end of input data
969  * @G_CONVERTER_FLUSH: Flush data
970  *
971  * Flags used when calling a g_converter_convert().
972  *
973  * Since: 2.24
974  */
975
976
977 /**
978  * GConverterIface:
979  * @g_iface: The parent interface.
980  * @convert: Converts data.
981  * @reset: Reverts the internal state of the converter to its initial state.
982  *
983  * Provides an interface for converting data from one type
984  * to another type. The conversion can be stateful
985  * and may fail at any place.
986  *
987  * Since: 2.24
988  */
989
990
991 /**
992  * GConverterInputStream:
993  *
994  * An implementation of #GFilterInputStream that allows data
995  * conversion.
996  */
997
998
999 /**
1000  * GConverterOutputStream:
1001  *
1002  * An implementation of #GFilterOutputStream that allows data
1003  * conversion.
1004  */
1005
1006
1007 /**
1008  * GConverterResult:
1009  * @G_CONVERTER_ERROR: There was an error during conversion.
1010  * @G_CONVERTER_CONVERTED: Some data was consumed or produced
1011  * @G_CONVERTER_FINISHED: The conversion is finished
1012  * @G_CONVERTER_FLUSHED: Flushing is finished
1013  *
1014  * Results returned from g_converter_convert().
1015  *
1016  * Since: 2.24
1017  */
1018
1019
1020 /**
1021  * GCopyFunc:
1022  * @src: A pointer to the data which should be copied
1023  * @data: Additional data
1024  *
1025  * A function of this signature is used to copy the node data
1026  * when doing a deep-copy of a tree.
1027  *
1028  * Returns: A pointer to the copy
1029  * Since: 2.4
1030  */
1031
1032
1033 /**
1034  * GCredentials:
1035  *
1036  * The #GCredentials structure contains only private data and
1037  * should only be accessed using the provided API.
1038  *
1039  * Since: 2.26
1040  */
1041
1042
1043 /**
1044  * GCredentialsClass:
1045  *
1046  * Class structure for #GCredentials.
1047  *
1048  * Since: 2.26
1049  */
1050
1051
1052 /**
1053  * GCredentialsType:
1054  * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type.
1055  * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a <type>struct ucred</type>.
1056  * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a <type>struct cmsgcred</type>.
1057  * @G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED: The native credentials type is a <type>struct sockpeercred</type>. Added in 2.30.
1058  *
1059  * Enumeration describing different kinds of native credential types.
1060  *
1061  * Since: 2.26
1062  */
1063
1064
1065 /**
1066  * GDBusAnnotationInfo:
1067  * @ref_count: The reference count or -1 if statically allocated.
1068  * @key: The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".
1069  * @value: The value of the annotation.
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 annotation.
1073  *
1074  * Since: 2.26
1075  */
1076
1077
1078 /**
1079  * GDBusArgInfo:
1080  * @ref_count: The reference count or -1 if statically allocated.
1081  * @name: Name of the argument, e.g. @unix_user_id.
1082  * @signature: D-Bus signature of the argument (a single complete type).
1083  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1084  *
1085  * Information about an argument for a method or a signal.
1086  *
1087  * Since: 2.26
1088  */
1089
1090
1091 /**
1092  * GDBusAuthMechanism:credentials:
1093  *
1094  * If authenticating as a server, this property contains the
1095  * received credentials, if any.
1096  *
1097  * If authenticating as a client, the property contains the
1098  * credentials that were sent, if any.
1099  */
1100
1101
1102 /**
1103  * GDBusAuthObserver:
1104  *
1105  * The #GDBusAuthObserver structure contains only private data and
1106  * should only be accessed using the provided API.
1107  *
1108  * Since: 2.26
1109  */
1110
1111
1112 /**
1113  * GDBusAuthObserver::authorize-authenticated-peer:
1114  * @observer: The #GDBusAuthObserver emitting the signal.
1115  * @stream: A #GIOStream for the #GDBusConnection.
1116  * @credentials: Credentials received from the peer or %NULL.
1117  *
1118  * Emitted to check if a peer that is successfully authenticated
1119  * is authorized.
1120  *
1121  * Returns: %TRUE if the peer is authorized, %FALSE if not.
1122  * Since: 2.26
1123  */
1124
1125
1126 /**
1127  * GDBusAuthObserverClass:
1128  * @authorize_authenticated_peer: Signal class handler for the #GDBusAuthObserver::authorize-authenticated-peer signal.
1129  *
1130  * Class structure for #GDBusAuthObserverClass.
1131  *
1132  * Since: 2.26
1133  */
1134
1135
1136 /**
1137  * GDBusCallFlags:
1138  * @G_DBUS_CALL_FLAGS_NONE: No flags set.
1139  * @G_DBUS_CALL_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this method invocation.
1140  *
1141  * Flags used in g_dbus_connection_call() and similar APIs.
1142  *
1143  * Since: 2.26
1144  */
1145
1146
1147 /**
1148  * GDBusCapabilityFlags:
1149  * @G_DBUS_CAPABILITY_FLAGS_NONE: No flags set.
1150  * @G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING: The connection supports exchanging UNIX file descriptors with the remote peer.
1151  *
1152  * Capabilities negotiated with the remote peer.
1153  *
1154  * Since: 2.26
1155  */
1156
1157
1158 /**
1159  * GDBusConnection:
1160  *
1161  * The #GDBusConnection structure contains only private data and
1162  * should only be accessed using the provided API.
1163  *
1164  * Since: 2.26
1165  */
1166
1167
1168 /**
1169  * GDBusConnection::closed:
1170  * @connection: The #GDBusConnection emitting the signal.
1171  * @remote_peer_vanished: %TRUE if @connection is closed because the remote peer closed its end of the connection.
1172  * @error: A #GError with more details about the event or %NULL.
1173  *
1174  * Emitted when the connection is closed.
1175  *
1176  * The cause of this event can be
1177  * <itemizedlist>
1178  * <listitem><para>
1179  * If g_dbus_connection_close() is called. In this case
1180  * @remote_peer_vanished is set to %FALSE and @error is %NULL.
1181  * </para></listitem>
1182  * <listitem><para>
1183  * If the remote peer closes the connection. In this case
1184  * @remote_peer_vanished is set to %TRUE and @error is set.
1185  * </para></listitem>
1186  * <listitem><para>
1187  * If the remote peer sends invalid or malformed data. In this
1188  * case @remote_peer_vanished is set to %FALSE and @error
1189  * is set.
1190  * </para></listitem>
1191  * </itemizedlist>
1192  *
1193  * Upon receiving this signal, you should give up your reference to
1194  * @connection. You are guaranteed that this signal is emitted only
1195  * once.
1196  *
1197  * Since: 2.26
1198  */
1199
1200
1201 /**
1202  * GDBusConnection:address:
1203  *
1204  * A D-Bus address specifying potential endpoints that can be used
1205  * when establishing the connection.
1206  *
1207  * Since: 2.26
1208  */
1209
1210
1211 /**
1212  * GDBusConnection:authentication-observer:
1213  *
1214  * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
1215  *
1216  * Since: 2.26
1217  */
1218
1219
1220 /**
1221  * GDBusConnection:capabilities:
1222  *
1223  * Flags from the #GDBusCapabilityFlags enumeration
1224  * representing connection features negotiated with the other peer.
1225  *
1226  * Since: 2.26
1227  */
1228
1229
1230 /**
1231  * GDBusConnection:closed:
1232  *
1233  * A boolean specifying whether the connection has been closed.
1234  *
1235  * Since: 2.26
1236  */
1237
1238
1239 /**
1240  * GDBusConnection:exit-on-close:
1241  *
1242  * A boolean specifying whether the process will be terminated (by
1243  * calling <literal>raise(SIGTERM)</literal>) if the connection
1244  * is closed by the remote peer.
1245  *
1246  * Note that #GDBusConnection objects returned by g_bus_get_finish() and
1247  * g_bus_get_sync() will (usually) have this property set to %TRUE.
1248  *
1249  * Since: 2.26
1250  */
1251
1252
1253 /**
1254  * GDBusConnection:flags:
1255  *
1256  * Flags from the #GDBusConnectionFlags enumeration.
1257  *
1258  * Since: 2.26
1259  */
1260
1261
1262 /**
1263  * GDBusConnection:guid:
1264  *
1265  * The GUID of the peer performing the role of server when
1266  * authenticating.
1267  *
1268  * If you are constructing a #GDBusConnection and pass
1269  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the
1270  * #GDBusConnection:flags property then you MUST also set this
1271  * property to a valid guid.
1272  *
1273  * If you are constructing a #GDBusConnection and pass
1274  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
1275  * #GDBusConnection:flags property you will be able to read the GUID
1276  * of the other peer here after the connection has been successfully
1277  * initialized.
1278  *
1279  * Since: 2.26
1280  */
1281
1282
1283 /**
1284  * GDBusConnection:locked:
1285  *
1286  * A boolean specifying whether the message is locked.
1287  *
1288  * Since: 2.26
1289  */
1290
1291
1292 /**
1293  * GDBusConnection:stream:
1294  *
1295  * The underlying #GIOStream used for I/O.
1296  *
1297  * If this is passed on construction and is a #GSocketConnection,
1298  * then the corresponding #GSocket will be put into non-blocking mode.
1299  *
1300  * While the #GDBusConnection is active, it will interact with this
1301  * stream from a worker thread, so it is not safe to interact with
1302  * the stream directly.
1303  *
1304  * Since: 2.26
1305  */
1306
1307
1308 /**
1309  * GDBusConnection:unique-name:
1310  *
1311  * The unique name as assigned by the message bus or %NULL if the
1312  * connection is not open or not a message bus connection.
1313  *
1314  * Since: 2.26
1315  */
1316
1317
1318 /**
1319  * GDBusConnectionClass:
1320  * @closed: Signal class handler for the #GDBusConnection::closed signal.
1321  *
1322  * Class structure for #GDBusConnection.
1323  *
1324  * Since: 2.26
1325  */
1326
1327
1328 /**
1329  * GDBusConnectionFlags:
1330  * @G_DBUS_CONNECTION_FLAGS_NONE: No flags set.
1331  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT: Perform authentication against server.
1332  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER: Perform authentication against client.
1333  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: When authenticating as a server, allow the anonymous authentication method.
1334  * @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.
1335  * @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.
1336  *
1337  * Flags used when creating a new #GDBusConnection.
1338  *
1339  * Since: 2.26
1340  */
1341
1342
1343 /**
1344  * GDBusError:
1345  *
1346  * Certain timeout errors, e.g. while starting a service. Warning: this is
1347  * Error codes for the %G_DBUS_ERROR error domain.
1348  *
1349  * Since: 2.26
1350  */
1351
1352
1353 /**
1354  * GDBusErrorEntry:
1355  * @error_code: An error code.
1356  * @dbus_error_name: The D-Bus error name to associate with @error_code.
1357  *
1358  * Struct used in g_dbus_error_register_error_domain().
1359  *
1360  * Since: 2.26
1361  */
1362
1363
1364 /**
1365  * GDBusInterface:
1366  *
1367  * Base type for D-Bus interfaces.
1368  *
1369  * Since: 2.30
1370  */
1371
1372
1373 /**
1374  * GDBusInterfaceGetPropertyFunc:
1375  * @connection: A #GDBusConnection.
1376  * @sender: The unique bus name of the remote caller.
1377  * @object_path: The object path that the method was invoked on.
1378  * @interface_name: The D-Bus interface name for the property.
1379  * @property_name: The name of the property to get the value of.
1380  * @error: Return location for error.
1381  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1382  *
1383  * The type of the @get_property function in #GDBusInterfaceVTable.
1384  *
1385  * @error is set. If the returned #GVariant is floating, it is
1386  * consumed - otherwise its reference count is decreased by one.
1387  *
1388  * Returns: A #GVariant with the value for @property_name or %NULL if
1389  * Since: 2.26
1390  */
1391
1392
1393 /**
1394  * GDBusInterfaceIface:
1395  * @parent_iface: The parent interface.
1396  * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_get_info().
1397  * @get_object: Gets the enclosing #GDBusObject. See g_dbus_interface_get_object().
1398  * @set_object: Sets the enclosing #GDBusObject. See g_dbus_interface_set_object().
1399  * @dup_object: Gets a reference to the enclosing #GDBusObject. See g_dbus_interface_dup_object(). Added in 2.32.
1400  *
1401  * Base type for D-Bus interfaces.
1402  *
1403  * Since: 2.30
1404  */
1405
1406
1407 /**
1408  * GDBusInterfaceInfo:
1409  * @ref_count: The reference count or -1 if statically allocated.
1410  * @name: The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".
1411  * @methods: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods.
1412  * @signals: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals.
1413  * @properties: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties.
1414  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1415  *
1416  * Information about a D-Bus interface.
1417  *
1418  * Since: 2.26
1419  */
1420
1421
1422 /**
1423  * GDBusInterfaceMethodCallFunc:
1424  * @connection: A #GDBusConnection.
1425  * @sender: The unique bus name of the remote caller.
1426  * @object_path: The object path that the method was invoked on.
1427  * @interface_name: The D-Bus interface name the method was invoked on.
1428  * @method_name: The name of the method that was invoked.
1429  * @parameters: A #GVariant tuple with parameters.
1430  * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
1431  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1432  *
1433  * The type of the @method_call function in #GDBusInterfaceVTable.
1434  *
1435  * Since: 2.26
1436  */
1437
1438
1439 /**
1440  * GDBusInterfaceSetPropertyFunc:
1441  * @connection: A #GDBusConnection.
1442  * @sender: The unique bus name of the remote caller.
1443  * @object_path: The object path that the method was invoked on.
1444  * @interface_name: The D-Bus interface name for the property.
1445  * @property_name: The name of the property to get the value of.
1446  * @value: The value to set the property to.
1447  * @error: Return location for error.
1448  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1449  *
1450  * The type of the @set_property function in #GDBusInterfaceVTable.
1451  *
1452  * Returns: %TRUE if the property was set to @value, %FALSE if @error is set.
1453  * Since: 2.26
1454  */
1455
1456
1457 /**
1458  * GDBusInterfaceSkeleton:
1459  *
1460  * The #GDBusInterfaceSkeleton structure contains private data and should
1461  * only be accessed using the provided API.
1462  *
1463  * Since: 2.30
1464  */
1465
1466
1467 /**
1468  * GDBusInterfaceSkeleton::g-authorize-method:
1469  * @interface: The #GDBusInterfaceSkeleton emitting the signal.
1470  * @invocation: A #GDBusMethodInvocation.
1471  *
1472  * Emitted when a method is invoked by a remote caller and used to
1473  * determine if the method call is authorized.
1474  *
1475  * Note that this signal is emitted in a thread dedicated to
1476  * handling the method call so handlers are allowed to perform
1477  * blocking IO. This means that it is appropriate to call
1478  * e.g. <ulink
1479  * url="http://hal.freedesktop.org/docs/polkit/PolkitAuthority.html#polkit-authority-check-authorization-sync">polkit_authority_check_authorization_sync()</ulink>
1480  * with the <ulink
1481  * 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.
1482  *
1483  * If %FALSE is returned then no further handlers are run and the
1484  * signal handler must take a reference to @invocation and finish
1485  * handling the call (e.g. return an error via
1486  * g_dbus_method_invocation_return_error()).
1487  *
1488  * Otherwise, if %TRUE is returned, signal emission continues. If no
1489  * handlers return %FALSE, then the method is dispatched. If
1490  * @interface has an enclosing #GDBusObjectSkeleton, then the
1491  * #GDBusObjectSkeleton::authorize-method signal handlers run before
1492  * the handlers for this signal.
1493  *
1494  * The default class handler just returns %TRUE.
1495  *
1496  * Please note that the common case is optimized: if no signals
1497  * handlers are connected and the default class handler isn't
1498  * overridden (for both @interface and the enclosing
1499  * #GDBusObjectSkeleton, if any) and #GDBusInterfaceSkeleton:g-flags does
1500  * not have the
1501  * %G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD
1502  * flags set, no dedicated thread is ever used and the call will be
1503  * handled in the same thread as the object that @interface belongs
1504  * to was exported in.
1505  *
1506  * Returns: %TRUE if the call is authorized, %FALSE otherwise.
1507  * Since: 2.30
1508  */
1509
1510
1511 /**
1512  * GDBusInterfaceSkeleton:g-flags:
1513  *
1514  * Flags from the #GDBusInterfaceSkeletonFlags enumeration.
1515  *
1516  * Since: 2.30
1517  */
1518
1519
1520 /**
1521  * GDBusInterfaceSkeletonClass:
1522  * @parent_class: The parent class.
1523  * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details.
1524  * @get_vtable: Returns a #GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details.
1525  * @get_properties: Returns a #GVariant with all properties. See g_dbus_interface_skeleton_get_properties().
1526  * @flush: Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush().
1527  * @g_authorize_method: Signal class handler for the #GDBusInterfaceSkeleton::g-authorize-method signal.
1528  *
1529  * Class structure for #GDBusInterfaceSkeleton.
1530  *
1531  * Since: 2.30
1532  */
1533
1534
1535 /**
1536  * GDBusInterfaceSkeletonFlags:
1537  * @G_DBUS_INTERFACE_SKELETON_FLAGS_NONE: No flags set.
1538  * @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.
1539  *
1540  * Flags describing the behavior of a #GDBusInterfaceSkeleton instance.
1541  *
1542  * Since: 2.30
1543  */
1544
1545
1546 /**
1547  * GDBusInterfaceVTable:
1548  * @method_call: Function for handling incoming method calls.
1549  * @get_property: Function for getting a property.
1550  * @set_property: Function for setting a property.
1551  *
1552  * Virtual table for handling properties and method calls for a D-Bus
1553  * interface.
1554  *
1555  * If you want to handle getting/setting D-Bus properties asynchronously, simply
1556  * register an object with the <literal>org.freedesktop.DBus.Properties</literal>
1557  * D-Bus interface using g_dbus_connection_register_object().
1558  *
1559  * Since: 2.26
1560  */
1561
1562
1563 /**
1564  * GDBusMessage:
1565  *
1566  * The #GDBusMessage structure contains only private data and should
1567  * only be accessed using the provided API.
1568  *
1569  * Since: 2.26
1570  */
1571
1572
1573 /**
1574  * GDBusMessageByteOrder:
1575  * @G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN: The byte order is big endian.
1576  * @G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN: The byte order is little endian.
1577  *
1578  * Enumeration used to describe the byte order of a D-Bus message.
1579  *
1580  * Since: 2.26
1581  */
1582
1583
1584 /**
1585  * GDBusMessageClass:
1586  *
1587  * Class structure for #GDBusMessage.
1588  *
1589  * Since: 2.26
1590  */
1591
1592
1593 /**
1594  * GDBusMessageFilterFunction:
1595  * @connection: (transfer none): A #GDBusConnection.
1596  * @message: (transfer full): A locked #GDBusMessage that the filter function takes ownership of.
1597  * @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.
1598  * @user_data: User data passed when adding the filter.
1599  *
1600  * Signature for function used in g_dbus_connection_add_filter().
1601  *
1602  * A filter function is passed a #GDBusMessage and expected to return
1603  * a #GDBusMessage too. Passive filter functions that don't modify the
1604  * message can simply return the @message object:
1605  * |[
1606  * static GDBusMessage *
1607  * passive_filter (GDBusConnection *connection
1608  * GDBusMessage    *message,
1609  * gboolean         incoming,
1610  * gpointer         user_data)
1611  * {
1612  * /<!-- -->* inspect @message *<!-- -->/
1613  * return message;
1614  * }
1615  * ]|
1616  * Filter functions that wants to drop a message can simply return %NULL:
1617  * |[
1618  * static GDBusMessage *
1619  * drop_filter (GDBusConnection *connection
1620  * GDBusMessage    *message,
1621  * gboolean         incoming,
1622  * gpointer         user_data)
1623  * {
1624  * if (should_drop_message)
1625  * {
1626  * g_object_unref (message);
1627  * message = NULL;
1628  * }
1629  * return message;
1630  * }
1631  * ]|
1632  * Finally, a filter function may modify a message by copying it:
1633  * |[
1634  * static GDBusMessage *
1635  * modifying_filter (GDBusConnection *connection
1636  * GDBusMessage    *message,
1637  * gboolean         incoming,
1638  * gpointer         user_data)
1639  * {
1640  * GDBusMessage *copy;
1641  * GError *error;
1642  *
1643  * error = NULL;
1644  * copy = g_dbus_message_copy (message, &error);
1645  * /<!-- -->* handle @error being is set *<!-- -->/
1646  * g_object_unref (message);
1647  *
1648  * /<!-- -->* modify @copy *<!-- -->/
1649  *
1650  * return copy;
1651  * }
1652  * ]|
1653  * If the returned #GDBusMessage is different from @message and cannot
1654  * be sent on @connection (it could use features, such as file
1655  * descriptors, not compatible with @connection), then a warning is
1656  * logged to <emphasis>standard error</emphasis>. Applications can
1657  * check this ahead of time using g_dbus_message_to_blob() passing a
1658  * #GDBusCapabilityFlags value obtained from @connection.
1659  *
1660  * g_object_unref() or %NULL to drop the message. Passive filter
1661  * functions can simply return the passed @message object.
1662  *
1663  * Returns: (transfer full) (allow-none): A #GDBusMessage that will be freed with
1664  * Since: 2.26
1665  */
1666
1667
1668 /**
1669  * GDBusMessageFlags:
1670  * @G_DBUS_MESSAGE_FLAGS_NONE: No flags set.
1671  * @G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED: A reply is not expected.
1672  * @G_DBUS_MESSAGE_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this message.
1673  *
1674  * Message flags used in #GDBusMessage.
1675  *
1676  * Since: 2.26
1677  */
1678
1679
1680 /**
1681  * GDBusMessageHeaderField:
1682  * @G_DBUS_MESSAGE_HEADER_FIELD_INVALID: Not a valid header field.
1683  * @G_DBUS_MESSAGE_HEADER_FIELD_PATH: The object path.
1684  * @G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE: The interface name.
1685  * @G_DBUS_MESSAGE_HEADER_FIELD_MEMBER: The method or signal name.
1686  * @G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME: The name of the error that occurred.
1687  * @G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL: The serial number the message is a reply to.
1688  * @G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION: The name the message is intended for.
1689  * @G_DBUS_MESSAGE_HEADER_FIELD_SENDER: Unique name of the sender of the message (filled in by the bus).
1690  * @G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE: The signature of the message body.
1691  * @G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS: The number of UNIX file descriptors that accompany the message.
1692  *
1693  * Header fields used in #GDBusMessage.
1694  *
1695  * Since: 2.26
1696  */
1697
1698
1699 /**
1700  * GDBusMessageType:
1701  * @G_DBUS_MESSAGE_TYPE_INVALID: Message is of invalid type.
1702  * @G_DBUS_MESSAGE_TYPE_METHOD_CALL: Method call.
1703  * @G_DBUS_MESSAGE_TYPE_METHOD_RETURN: Method reply.
1704  * @G_DBUS_MESSAGE_TYPE_ERROR: Error reply.
1705  * @G_DBUS_MESSAGE_TYPE_SIGNAL: Signal emission.
1706  *
1707  * Message types used in #GDBusMessage.
1708  *
1709  * Since: 2.26
1710  */
1711
1712
1713 /**
1714  * GDBusMethodInfo:
1715  * @ref_count: The reference count or -1 if statically allocated.
1716  * @name: The name of the D-Bus method, e.g. @RequestName.
1717  * @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.
1718  * @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.
1719  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1720  *
1721  * Information about a method on an D-Bus interface.
1722  *
1723  * Since: 2.26
1724  */
1725
1726
1727 /**
1728  * GDBusMethodInvocation:
1729  *
1730  * The #GDBusMethodInvocation structure contains only private data and
1731  * should only be accessed using the provided API.
1732  *
1733  * Since: 2.26
1734  */
1735
1736
1737 /**
1738  * GDBusMethodInvocationClass:
1739  *
1740  * Class structure for #GDBusMethodInvocation.
1741  *
1742  * Since: 2.26
1743  */
1744
1745
1746 /**
1747  * GDBusNodeInfo:
1748  * @ref_count: The reference count or -1 if statically allocated.
1749  * @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.
1750  * @interfaces: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces.
1751  * @nodes: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes.
1752  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1753  *
1754  * Information about nodes in a remote object hierarchy.
1755  *
1756  * Since: 2.26
1757  */
1758
1759
1760 /**
1761  * GDBusObject::interface-added:
1762  * @object: The #GDBusObject emitting the signal.
1763  * @interface: The #GDBusInterface that was added.
1764  *
1765  * Emitted when @interface is added to @object.
1766  *
1767  * Since: 2.30
1768  */
1769
1770
1771 /**
1772  * GDBusObject::interface-removed:
1773  * @object: The #GDBusObject emitting the signal.
1774  * @interface: The #GDBusInterface that was removed.
1775  *
1776  * Emitted when @interface is removed from @object.
1777  *
1778  * Since: 2.30
1779  */
1780
1781
1782 /**
1783  * GDBusObjectIface:
1784  * @parent_iface: The parent interface.
1785  * @get_object_path: Returns the object path. See g_dbus_object_get_object_path().
1786  * @get_interfaces: Returns all interfaces. See g_dbus_object_get_interfaces().
1787  * @get_interface: Returns an interface by name. See g_dbus_object_get_interface().
1788  * @interface_added: Signal handler for the #GDBusObject::interface-added signal.
1789  * @interface_removed: Signal handler for the #GDBusObject::interface-removed signal.
1790  *
1791  * Base object type for D-Bus objects.
1792  *
1793  * Since: 2.30
1794  */
1795
1796
1797 /**
1798  * GDBusObjectManager::interface-added:
1799  * @manager: The #GDBusObjectManager emitting the signal.
1800  * @object: The #GDBusObject on which an interface was added.
1801  * @interface: The #GDBusInterface that was added.
1802  *
1803  * Emitted when @interface is added to @object.
1804  *
1805  * This signal exists purely as a convenience to avoid having to
1806  * connect signals to all objects managed by @manager.
1807  *
1808  * Since: 2.30
1809  */
1810
1811
1812 /**
1813  * GDBusObjectManager::interface-removed:
1814  * @manager: The #GDBusObjectManager emitting the signal.
1815  * @object: The #GDBusObject on which an interface was removed.
1816  * @interface: The #GDBusInterface that was removed.
1817  *
1818  * Emitted when @interface has been removed from @object.
1819  *
1820  * This signal exists purely as a convenience to avoid having to
1821  * connect signals to all objects managed by @manager.
1822  *
1823  * Since: 2.30
1824  */
1825
1826
1827 /**
1828  * GDBusObjectManager::object-added:
1829  * @manager: The #GDBusObjectManager emitting the signal.
1830  * @object: The #GDBusObject that was added.
1831  *
1832  * Emitted when @object is added to @manager.
1833  *
1834  * Since: 2.30
1835  */
1836
1837
1838 /**
1839  * GDBusObjectManager::object-removed:
1840  * @manager: The #GDBusObjectManager emitting the signal.
1841  * @object: The #GDBusObject that was removed.
1842  *
1843  * Emitted when @object is removed from @manager.
1844  *
1845  * Since: 2.30
1846  */
1847
1848
1849 /**
1850  * GDBusObjectManagerClient:
1851  *
1852  * The #GDBusObjectManagerClient structure contains private data and should
1853  * only be accessed using the provided API.
1854  *
1855  * Since: 2.30
1856  */
1857
1858
1859 /**
1860  * GDBusObjectManagerClient::interface-proxy-properties-changed:
1861  * @manager: The #GDBusObjectManagerClient emitting the signal.
1862  * @object_proxy: The #GDBusObjectProxy on which an interface has properties that are changing.
1863  * @interface_proxy: The #GDBusProxy that has properties that are changing.
1864  * @changed_properties: A #GVariant containing the properties that changed.
1865  * @invalidated_properties: A %NULL terminated array of properties that was invalidated.
1866  *
1867  * Emitted when one or more D-Bus properties on proxy changes. The
1868  * local cache has already been updated when this signal fires. Note
1869  * that both @changed_properties and @invalidated_properties are
1870  * guaranteed to never be %NULL (either may be empty though).
1871  *
1872  * This signal exists purely as a convenience to avoid having to
1873  * connect signals to all interface proxies managed by @manager.
1874  *
1875  * This signal is emitted in the
1876  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
1877  * that @manager was constructed in.
1878  *
1879  * Since: 2.30
1880  */
1881
1882
1883 /**
1884  * GDBusObjectManagerClient::interface-proxy-signal:
1885  * @manager: The #GDBusObjectManagerClient emitting the signal.
1886  * @object_proxy: The #GDBusObjectProxy on which an interface is emitting a D-Bus signal.
1887  * @interface_proxy: The #GDBusProxy that is emitting a D-Bus signal.
1888  * @sender_name: The sender of the signal or NULL if the connection is not a bus connection.
1889  * @signal_name: The signal name.
1890  * @parameters: A #GVariant tuple with parameters for the signal.
1891  *
1892  * Emitted when a D-Bus signal is received on @interface_proxy.
1893  *
1894  * This signal exists purely as a convenience to avoid having to
1895  * connect signals to all interface proxies managed by @manager.
1896  *
1897  * This signal is emitted in the
1898  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
1899  * that @manager was constructed in.
1900  *
1901  * Since: 2.30
1902  */
1903
1904
1905 /**
1906  * GDBusObjectManagerClient:bus-type:
1907  *
1908  * If this property is not %G_BUS_TYPE_NONE, then
1909  * #GDBusObjectManagerClient:connection must be %NULL and will be set to the
1910  * #GDBusConnection obtained by calling g_bus_get() with the value
1911  * of this property.
1912  *
1913  * Since: 2.30
1914  */
1915
1916
1917 /**
1918  * GDBusObjectManagerClient:connection:
1919  *
1920  * The #GDBusConnection to use.
1921  *
1922  * Since: 2.30
1923  */
1924
1925
1926 /**
1927  * GDBusObjectManagerClient:flags:
1928  *
1929  * Flags from the #GDBusObjectManagerClientFlags enumeration.
1930  *
1931  * Since: 2.30
1932  */
1933
1934
1935 /**
1936  * GDBusObjectManagerClient:get-proxy-type-destroy-notify:
1937  *
1938  * A #GDestroyNotify for the #gpointer user_data in #GDBusObjectManagerClient:get-proxy-type-user-data.
1939  *
1940  * Since: 2.30
1941  */
1942
1943
1944 /**
1945  * GDBusObjectManagerClient:get-proxy-type-func:
1946  *
1947  * The #GDBusProxyTypeFunc to use when determining what #GType to
1948  * use for interface proxies or %NULL.
1949  *
1950  * Since: 2.30
1951  */
1952
1953
1954 /**
1955  * GDBusObjectManagerClient:get-proxy-type-user-data:
1956  *
1957  * The #gpointer user_data to pass to #GDBusObjectManagerClient:get-proxy-type-func.
1958  *
1959  * Since: 2.30
1960  */
1961
1962
1963 /**
1964  * GDBusObjectManagerClient:name:
1965  *
1966  * The well-known name or unique name that the manager is for.
1967  *
1968  * Since: 2.30
1969  */
1970
1971
1972 /**
1973  * GDBusObjectManagerClient:name-owner:
1974  *
1975  * The unique name that owns #GDBusObjectManagerClient:name or %NULL if
1976  * no-one is currently owning the name. Connect to the
1977  * #GObject::notify signal to track changes to this property.
1978  *
1979  * Since: 2.30
1980  */
1981
1982
1983 /**
1984  * GDBusObjectManagerClient:object-path:
1985  *
1986  * The object path the manager is for.
1987  *
1988  * Since: 2.30
1989  */
1990
1991
1992 /**
1993  * GDBusObjectManagerClientClass:
1994  * @parent_class: The parent class.
1995  * @interface_proxy_signal: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-signal signal.
1996  * @interface_proxy_properties_changed: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-properties-changed signal.
1997  *
1998  * Class structure for #GDBusObjectManagerClient.
1999  *
2000  * Since: 2.30
2001  */
2002
2003
2004 /**
2005  * GDBusObjectManagerClientFlags:
2006  * @G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE: No flags set.
2007  * @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.
2008  *
2009  * Flags used when constructing a #GDBusObjectManagerClient.
2010  *
2011  * Since: 2.30
2012  */
2013
2014
2015 /**
2016  * GDBusObjectManagerIface:
2017  * @parent_iface: The parent interface.
2018  * @get_object_path: Virtual function for g_dbus_object_manager_get_object_path().
2019  * @get_objects: Virtual function for g_dbus_object_manager_get_objects().
2020  * @get_object: Virtual function for g_dbus_object_manager_get_object().
2021  * @get_interface: Virtual function for g_dbus_object_manager_get_interface().
2022  * @object_added: Signal handler for the #GDBusObjectManager::object-added signal.
2023  * @object_removed: Signal handler for the #GDBusObjectManager::object-removed signal.
2024  * @interface_added: Signal handler for the #GDBusObjectManager::interface-added signal.
2025  * @interface_removed: Signal handler for the #GDBusObjectManager::interface-removed signal.
2026  *
2027  * Base type for D-Bus object managers.
2028  *
2029  * Since: 2.30
2030  */
2031
2032
2033 /**
2034  * GDBusObjectManagerServer:
2035  *
2036  * The #GDBusObjectManagerServer structure contains private data and should
2037  * only be accessed using the provided API.
2038  *
2039  * Since: 2.30
2040  */
2041
2042
2043 /**
2044  * GDBusObjectManagerServer:connection:
2045  *
2046  * The #GDBusConnection to export objects on.
2047  *
2048  * Since: 2.30
2049  */
2050
2051
2052 /**
2053  * GDBusObjectManagerServer:object-path:
2054  *
2055  * The object path to register the manager object at.
2056  *
2057  * Since: 2.30
2058  */
2059
2060
2061 /**
2062  * GDBusObjectManagerServerClass:
2063  * @parent_class: The parent class.
2064  *
2065  * Class structure for #GDBusObjectManagerServer.
2066  *
2067  * Since: 2.30
2068  */
2069
2070
2071 /**
2072  * GDBusObjectProxy:
2073  *
2074  * The #GDBusObjectProxy structure contains private data and should
2075  * only be accessed using the provided API.
2076  *
2077  * Since: 2.30
2078  */
2079
2080
2081 /**
2082  * GDBusObjectProxy:g-connection:
2083  *
2084  * The connection of the proxy.
2085  *
2086  * Since: 2.30
2087  */
2088
2089
2090 /**
2091  * GDBusObjectProxy:g-object-path:
2092  *
2093  * The object path of the proxy.
2094  *
2095  * Since: 2.30
2096  */
2097
2098
2099 /**
2100  * GDBusObjectProxyClass:
2101  * @parent_class: The parent class.
2102  *
2103  * Class structure for #GDBusObjectProxy.
2104  *
2105  * Since: 2.30
2106  */
2107
2108
2109 /**
2110  * GDBusObjectSkeleton:
2111  *
2112  * The #GDBusObjectSkeleton structure contains private data and should only be
2113  * accessed using the provided API.
2114  *
2115  * Since: 2.30
2116  */
2117
2118
2119 /**
2120  * GDBusObjectSkeleton::authorize-method:
2121  * @object: The #GDBusObjectSkeleton emitting the signal.
2122  * @interface: The #GDBusInterfaceSkeleton that @invocation is for.
2123  * @invocation: A #GDBusMethodInvocation.
2124  *
2125  * Emitted when a method is invoked by a remote caller and used to
2126  * determine if the method call is authorized.
2127  *
2128  * This signal is like #GDBusInterfaceSkeleton<!-- -->'s
2129  * #GDBusInterfaceSkeleton::g-authorize-method signal, except that it is
2130  * for the enclosing object.
2131  *
2132  * The default class handler just returns %TRUE.
2133  *
2134  * Returns: %TRUE if the call is authorized, %FALSE otherwise.
2135  * Since: 2.30
2136  */
2137
2138
2139 /**
2140  * GDBusObjectSkeleton:g-object-path:
2141  *
2142  * The object path where the object is exported.
2143  *
2144  * Since: 2.30
2145  */
2146
2147
2148 /**
2149  * GDBusObjectSkeletonClass:
2150  * @parent_class: The parent class.
2151  * @authorize_method: Signal class handler for the #GDBusObjectSkeleton::authorize-method signal.
2152  *
2153  * Class structure for #GDBusObjectSkeleton.
2154  *
2155  * Since: 2.30
2156  */
2157
2158
2159 /**
2160  * GDBusPropertyInfo:
2161  * @ref_count: The reference count or -1 if statically allocated.
2162  * @name: The name of the D-Bus property, e.g. "SupportedFilesystems".
2163  * @signature: The D-Bus signature of the property (a single complete type).
2164  * @flags: Access control flags for the property.
2165  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
2166  *
2167  * Information about a D-Bus property on a D-Bus interface.
2168  *
2169  * Since: 2.26
2170  */
2171
2172
2173 /**
2174  * GDBusPropertyInfoFlags:
2175  * @G_DBUS_PROPERTY_INFO_FLAGS_NONE: No flags set.
2176  * @G_DBUS_PROPERTY_INFO_FLAGS_READABLE: Property is readable.
2177  * @G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE: Property is writable.
2178  *
2179  * Flags describing the access control of a D-Bus property.
2180  *
2181  * Since: 2.26
2182  */
2183
2184
2185 /**
2186  * GDBusProxy:
2187  *
2188  * The #GDBusProxy structure contains only private data and
2189  * should only be accessed using the provided API.
2190  *
2191  * Since: 2.26
2192  */
2193
2194
2195 /**
2196  * GDBusProxy::g-properties-changed:
2197  * @proxy: The #GDBusProxy emitting the signal.
2198  * @changed_properties: A #GVariant containing the properties that changed
2199  * @invalidated_properties: A %NULL terminated array of properties that was invalidated
2200  *
2201  * Emitted when one or more D-Bus properties on @proxy changes. The
2202  * local cache has already been updated when this signal fires. Note
2203  * that both @changed_properties and @invalidated_properties are
2204  * guaranteed to never be %NULL (either may be empty though).
2205  *
2206  * This signal corresponds to the
2207  * <literal>PropertiesChanged</literal> D-Bus signal on the
2208  * <literal>org.freedesktop.DBus.Properties</literal> interface.
2209  *
2210  * Since: 2.26
2211  */
2212
2213
2214 /**
2215  * GDBusProxy::g-signal:
2216  * @proxy: The #GDBusProxy emitting the signal.
2217  * @sender_name: The sender of the signal or %NULL if the connection is not a bus connection.
2218  * @signal_name: The name of the signal.
2219  * @parameters: A #GVariant tuple with parameters for the signal.
2220  *
2221  * Emitted when a signal from the remote object and interface that @proxy is for, has been received.
2222  *
2223  * Since: 2.26
2224  */
2225
2226
2227 /**
2228  * GDBusProxy:g-bus-type:
2229  *
2230  * If this property is not %G_BUS_TYPE_NONE, then
2231  * #GDBusProxy:g-connection must be %NULL and will be set to the
2232  * #GDBusConnection obtained by calling g_bus_get() with the value
2233  * of this property.
2234  *
2235  * Since: 2.26
2236  */
2237
2238
2239 /**
2240  * GDBusProxy:g-connection:
2241  *
2242  * The #GDBusConnection the proxy is for.
2243  *
2244  * Since: 2.26
2245  */
2246
2247
2248 /**
2249  * GDBusProxy:g-default-timeout:
2250  *
2251  * The timeout to use if -1 (specifying default timeout) is passed
2252  * as @timeout_msec in the g_dbus_proxy_call() and
2253  * g_dbus_proxy_call_sync() functions.
2254  *
2255  * This allows applications to set a proxy-wide timeout for all
2256  * remote method invocations on the proxy. If this property is -1,
2257  * the default timeout (typically 25 seconds) is used. If set to
2258  * %G_MAXINT, then no timeout is used.
2259  *
2260  * Since: 2.26
2261  */
2262
2263
2264 /**
2265  * GDBusProxy:g-flags:
2266  *
2267  * Flags from the #GDBusProxyFlags enumeration.
2268  *
2269  * Since: 2.26
2270  */
2271
2272
2273 /**
2274  * GDBusProxy:g-interface-info:
2275  *
2276  * Ensure that interactions with this proxy conform to the given
2277  * interface. This is mainly to ensure that malformed data received
2278  * from the other peer is ignored. The given #GDBusInterfaceInfo is
2279  * said to be the <emphasis>expected interface</emphasis>.
2280  *
2281  * The checks performed are:
2282  * <itemizedlist>
2283  * <listitem><para>
2284  * When completing a method call, if the type signature of
2285  * the reply message isn't what's expected, the reply is
2286  * discarded and the #GError is set to %G_IO_ERROR_INVALID_ARGUMENT.
2287  * </para></listitem>
2288  * <listitem><para>
2289  * Received signals that have a type signature mismatch are dropped and
2290  * a warning is logged via g_warning().
2291  * </para></listitem>
2292  * <listitem><para>
2293  * Properties received via the initial <literal>GetAll()</literal> call
2294  * or via the <literal>::PropertiesChanged</literal> signal (on the
2295  * <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties">org.freedesktop.DBus.Properties</ulink> interface) or
2296  * set using g_dbus_proxy_set_cached_property() with a type signature
2297  * mismatch are ignored and a warning is logged via g_warning().
2298  * </para></listitem>
2299  * </itemizedlist>
2300  * Note that these checks are never done on methods, signals and
2301  * properties that are not referenced in the given
2302  * #GDBusInterfaceInfo, since extending a D-Bus interface on the
2303  * service-side is not considered an ABI break.
2304  *
2305  * Since: 2.26
2306  */
2307
2308
2309 /**
2310  * GDBusProxy:g-interface-name:
2311  *
2312  * The D-Bus interface name the proxy is for.
2313  *
2314  * Since: 2.26
2315  */
2316
2317
2318 /**
2319  * GDBusProxy:g-name:
2320  *
2321  * The well-known or unique name that the proxy is for.
2322  *
2323  * Since: 2.26
2324  */
2325
2326
2327 /**
2328  * GDBusProxy:g-name-owner:
2329  *
2330  * The unique name that owns #GDBusProxy:name or %NULL if no-one
2331  * currently owns that name. You may connect to #GObject::notify signal to
2332  * track changes to this property.
2333  *
2334  * Since: 2.26
2335  */
2336
2337
2338 /**
2339  * GDBusProxy:g-object-path:
2340  *
2341  * The object path the proxy is for.
2342  *
2343  * Since: 2.26
2344  */
2345
2346
2347 /**
2348  * GDBusProxyClass:
2349  * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal.
2350  * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal.
2351  *
2352  * Class structure for #GDBusProxy.
2353  *
2354  * Since: 2.26
2355  */
2356
2357
2358 /**
2359  * GDBusProxyFlags:
2360  * @G_DBUS_PROXY_FLAGS_NONE: No flags set.
2361  * @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties.
2362  * @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object.
2363  * @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.
2364  *
2365  * Flags used when constructing an instance of a #GDBusProxy derived class.
2366  *
2367  * Since: 2.26
2368  */
2369
2370
2371 /**
2372  * GDBusProxyTypeFunc:
2373  * @manager: A #GDBusObjectManagerClient.
2374  * @object_path: The object path of the remote object.
2375  * @interface_name: (allow-none): The interface name of the remote object or %NULL if a #GDBusObjectProxy #GType is requested.
2376  * @user_data: User data.
2377  *
2378  * Function signature for a function used to determine the #GType to
2379  * use for an interface proxy (if @interface_name is not %NULL) or
2380  * object proxy (if @interface_name is %NULL).
2381  *
2382  * This function is called in the
2383  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
2384  * that @manager was constructed in.
2385  *
2386  * must be a #GDBusProxy<!-- -->- or #GDBusObjectProxy<!-- -->-derived
2387  * type.
2388  *
2389  * Returns: A #GType to use for the remote object. The returned type
2390  * Since: 2.30
2391  */
2392
2393
2394 /**
2395  * GDBusSendMessageFlags:
2396  * @G_DBUS_SEND_MESSAGE_FLAGS_NONE: No flags set.
2397  * @G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL: Do not automatically assign a serial number from the #GDBusConnection object when sending a message.
2398  *
2399  * Flags used when sending #GDBusMessage<!-- -->s on a #GDBusConnection.
2400  *
2401  * Since: 2.26
2402  */
2403
2404
2405 /**
2406  * GDBusServer:
2407  *
2408  * The #GDBusServer structure contains only private data and
2409  * should only be accessed using the provided API.
2410  *
2411  * Since: 2.26
2412  */
2413
2414
2415 /**
2416  * GDBusServer::new-connection:
2417  * @server: The #GDBusServer emitting the signal.
2418  * @connection: A #GDBusConnection for the new connection.
2419  *
2420  * Emitted when a new authenticated connection has been made. Use
2421  * g_dbus_connection_get_peer_credentials() to figure out what
2422  * identity (if any), was authenticated.
2423  *
2424  * If you want to accept the connection, take a reference to the
2425  * @connection object and return %TRUE. When you are done with the
2426  * connection call g_dbus_connection_close() and give up your
2427  * reference. Note that the other peer may disconnect at any time -
2428  * a typical thing to do when accepting a connection is to listen to
2429  * the #GDBusConnection::closed signal.
2430  *
2431  * If #GDBusServer:flags contains %G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
2432  * then the signal is emitted in a new thread dedicated to the
2433  * connection. Otherwise the signal is emitted in the <link
2434  * linkend="g-main-context-push-thread-default">thread-default main
2435  * loop</link> of the thread that @server was constructed in.
2436  *
2437  * You are guaranteed that signal handlers for this signal runs
2438  * before incoming messages on @connection are processed. This means
2439  * that it's suitable to call g_dbus_connection_register_object() or
2440  * similar from the signal handler.
2441  *
2442  * run.
2443  *
2444  * Returns: %TRUE to claim @connection, %FALSE to let other handlers
2445  * Since: 2.26
2446  */
2447
2448
2449 /**
2450  * GDBusServer:active:
2451  *
2452  * Whether the server is currently active.
2453  *
2454  * Since: 2.26
2455  */
2456
2457
2458 /**
2459  * GDBusServer:address:
2460  *
2461  * The D-Bus address to listen on.
2462  *
2463  * Since: 2.26
2464  */
2465
2466
2467 /**
2468  * GDBusServer:authentication-observer:
2469  *
2470  * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
2471  *
2472  * Since: 2.26
2473  */
2474
2475
2476 /**
2477  * GDBusServer:client-address:
2478  *
2479  * The D-Bus address that clients can use.
2480  *
2481  * Since: 2.26
2482  */
2483
2484
2485 /**
2486  * GDBusServer:flags:
2487  *
2488  * Flags from the #GDBusServerFlags enumeration.
2489  *
2490  * Since: 2.26
2491  */
2492
2493
2494 /**
2495  * GDBusServer:guid:
2496  *
2497  * The guid of the server.
2498  *
2499  * Since: 2.26
2500  */
2501
2502
2503 /**
2504  * GDBusServerClass:
2505  * @new_connection: Signal class handler for the #GDBusServer::new-connection signal.
2506  *
2507  * Class structure for #GDBusServer.
2508  *
2509  * Since: 2.26
2510  */
2511
2512
2513 /**
2514  * GDBusServerFlags:
2515  * @G_DBUS_SERVER_FLAGS_NONE: No flags set.
2516  * @G_DBUS_SERVER_FLAGS_RUN_IN_THREAD: All #GDBusServer::new-connection signals will run in separated dedicated threads (see signal for details).
2517  * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: Allow the anonymous authentication method.
2518  *
2519  * Flags used when creating a #GDBusServer.
2520  *
2521  * Since: 2.26
2522  */
2523
2524
2525 /**
2526  * GDBusSignalCallback:
2527  * @connection: A #GDBusConnection.
2528  * @sender_name: The unique bus name of the sender of the signal.
2529  * @object_path: The object path that the signal was emitted on.
2530  * @interface_name: The name of the interface.
2531  * @signal_name: The name of the signal.
2532  * @parameters: A #GVariant tuple with parameters for the signal.
2533  * @user_data: User data passed when subscribing to the signal.
2534  *
2535  * Signature for callback function used in g_dbus_connection_signal_subscribe().
2536  *
2537  * Since: 2.26
2538  */
2539
2540
2541 /**
2542  * GDBusSignalFlags:
2543  * @G_DBUS_SIGNAL_FLAGS_NONE: No flags set.
2544  * @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).
2545  *
2546  * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe().
2547  *
2548  * Since: 2.26
2549  */
2550
2551
2552 /**
2553  * GDBusSignalInfo:
2554  * @ref_count: The reference count or -1 if statically allocated.
2555  * @name: The name of the D-Bus signal, e.g. "NameOwnerChanged".
2556  * @args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments.
2557  * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
2558  *
2559  * Information about a signal on a D-Bus interface.
2560  *
2561  * Since: 2.26
2562  */
2563
2564
2565 /**
2566  * GDBusSubtreeDispatchFunc:
2567  * @connection: A #GDBusConnection.
2568  * @sender: The unique bus name of the remote caller.
2569  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2570  * @interface_name: The D-Bus interface name that the method call or property access is for.
2571  * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
2572  * @out_user_data: Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL).
2573  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2574  *
2575  * The type of the @dispatch function in #GDBusSubtreeVTable.
2576  *
2577  * Subtrees are flat.  @node, if non-%NULL, is always exactly one
2578  * segment of the object path (ie: it never contains a slash).
2579  *
2580  * Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.
2581  * Since: 2.26
2582  */
2583
2584
2585 /**
2586  * GDBusSubtreeEnumerateFunc:
2587  * @connection: A #GDBusConnection.
2588  * @sender: The unique bus name of the remote caller.
2589  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2590  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2591  *
2592  * The type of the @enumerate function in #GDBusSubtreeVTable.
2593  *
2594  * This function is called when generating introspection data and also
2595  * when preparing to dispatch incoming messages in the event that the
2596  * %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not
2597  * specified (ie: to verify that the object path is valid).
2598  *
2599  * Hierarchies are not supported; the items that you return should not
2600  * contain the '/' character.
2601  *
2602  * The return value will be freed with g_strfreev().
2603  *
2604  * Returns: A newly allocated array of strings for node names that are children of @object_path.
2605  * Since: 2.26
2606  */
2607
2608
2609 /**
2610  * GDBusSubtreeFlags:
2611  * @G_DBUS_SUBTREE_FLAGS_NONE: No flags set.
2612  * @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.
2613  *
2614  * Flags passed to g_dbus_connection_register_subtree().
2615  *
2616  * Since: 2.26
2617  */
2618
2619
2620 /**
2621  * GDBusSubtreeIntrospectFunc:
2622  * @connection: A #GDBusConnection.
2623  * @sender: The unique bus name of the remote caller.
2624  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2625  * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
2626  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2627  *
2628  * The type of the @introspect function in #GDBusSubtreeVTable.
2629  *
2630  * Subtrees are flat.  @node, if non-%NULL, is always exactly one
2631  * segment of the object path (ie: it never contains a slash).
2632  *
2633  * This function should return %NULL to indicate that there is no object
2634  * at this node.
2635  *
2636  * If this function returns non-%NULL, the return value is expected to
2637  * be a %NULL-terminated array of pointers to #GDBusInterfaceInfo
2638  * structures describing the interfaces implemented by @node.  This
2639  * array will have g_dbus_interface_info_unref() called on each item
2640  * before being freed with g_free().
2641  *
2642  * The difference between returning %NULL and an array containing zero
2643  * items is that the standard DBus interfaces will returned to the
2644  * remote introspector in the empty array case, but not in the %NULL
2645  * case.
2646  *
2647  * Returns: A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL.
2648  * Since: 2.26
2649  */
2650
2651
2652 /**
2653  * GDBusSubtreeVTable:
2654  * @enumerate: Function for enumerating child nodes.
2655  * @introspect: Function for introspecting a child node.
2656  * @dispatch: Function for dispatching a remote call on a child node.
2657  *
2658  * Virtual table for handling subtrees registered with g_dbus_connection_register_subtree().
2659  *
2660  * Since: 2.26
2661  */
2662
2663
2664 /**
2665  * GDataInputStream:
2666  *
2667  * An implementation of #GBufferedInputStream that allows for high-level
2668  * data manipulation of arbitrary data (including binary operations).
2669  */
2670
2671
2672 /**
2673  * GDataOutputStream:
2674  *
2675  * An implementation of #GBufferedOutputStream that allows for high-level
2676  * data manipulation of arbitrary data (including binary operations).
2677  */
2678
2679
2680 /**
2681  * GDataOutputStream:byte-order:
2682  *
2683  * Determines the byte ordering that is used when writing
2684  * multi-byte entities (such as integers) to the stream.
2685  */
2686
2687
2688 /**
2689  * GDataStream:byte-order:
2690  *
2691  * The ::byte-order property determines the byte ordering that
2692  * is used when reading multi-byte entities (such as integers)
2693  * from the stream.
2694  */
2695
2696
2697 /**
2698  * GDataStream:newline-type:
2699  *
2700  * The :newline-type property determines what is considered
2701  * as a line ending when reading complete lines from the stream.
2702  */
2703
2704
2705 /**
2706  * GDataStreamByteOrder:
2707  * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order.
2708  * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order.
2709  * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture.
2710  *
2711  * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources
2712  * across various machine architectures.
2713  */
2714
2715
2716 /**
2717  * GDataStreamNewlineType:
2718  * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms.
2719  * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings.
2720  * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows.
2721  * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type.
2722  *
2723  * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file.
2724  */
2725
2726
2727 /**
2728  * GDateTime:
2729  *
2730  * <structname>GDateTime</structname> is an opaque structure whose members
2731  * cannot be accessed directly.
2732  *
2733  * Since: 2.26
2734  */
2735
2736
2737 /**
2738  * GDebugKey:
2739  * @key: the string
2740  * @value: the flag
2741  *
2742  * Associates a string with a bit flag.
2743  * Used in g_parse_debug_string().
2744  */
2745
2746
2747 /**
2748  * GDesktopAppInfo:
2749  *
2750  * Information about an installed application from a desktop file.
2751  */
2752
2753
2754 /**
2755  * GDesktopAppInfo:filename:
2756  *
2757  * The origin filename of this #GDesktopAppInfo
2758  */
2759
2760
2761 /**
2762  * GDesktopAppInfoLookup:
2763  *
2764  * Interface that is used by backends to associate default
2765  * handlers with URI schemes.
2766  */
2767
2768
2769 /**
2770  * GDesktopAppLaunchCallback:
2771  * @appinfo: a #GDesktopAppInfo
2772  * @pid: Process identifier
2773  * @user_data: User data
2774  *
2775  * During invocation, g_desktop_app_info_launch_uris_as_manager() may
2776  * create one or more child processes.  This callback is invoked once
2777  * for each, providing the process ID.
2778  */
2779
2780
2781 /**
2782  * GDrive:
2783  *
2784  * Opaque drive object.
2785  */
2786
2787
2788 /**
2789  * GDrive::changed:
2790  * @drive: a #GDrive.
2791  *
2792  * Emitted when the drive's state has changed.
2793  */
2794
2795
2796 /**
2797  * GDrive::disconnected:
2798  * @drive: a #GDrive.
2799  *
2800  * This signal is emitted when the #GDrive have been
2801  * disconnected. If the recipient is holding references to the
2802  * object they should release them so the object can be
2803  * finalized.
2804  */
2805
2806
2807 /**
2808  * GDrive::eject-button:
2809  * @drive: a #GDrive.
2810  *
2811  * Emitted when the physical eject button (if any) of a drive has
2812  * been pressed.
2813  */
2814
2815
2816 /**
2817  * GDrive::stop-button:
2818  * @drive: a #GDrive.
2819  *
2820  * Emitted when the physical stop button (if any) of a drive has
2821  * been pressed.
2822  *
2823  * Since: 2.22
2824  */
2825
2826
2827 /**
2828  * GDriveIface:
2829  * @g_iface: The parent interface.
2830  * @changed: Signal emitted when the drive is changed.
2831  * @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.
2832  * @eject_button: Signal emitted when the physical eject button (if any) of a drive have been pressed.
2833  * @get_name: Returns the name for the given #GDrive.
2834  * @get_icon: Returns a #GIcon for the given #GDrive.
2835  * @has_volumes: Returns %TRUE if the #GDrive has mountable volumes.
2836  * @get_volumes: Returns a list #GList of #GVolume for the #GDrive.
2837  * @is_media_removable: Returns %TRUE if the #GDrive supports removal and insertion of media.
2838  * @has_media: Returns %TRUE if the #GDrive has media inserted.
2839  * @is_media_check_automatic: Returns %TRUE if the #GDrive is capabable of automatically detecting media changes.
2840  * @can_poll_for_media: Returns %TRUE if the #GDrive is capable of manually polling for media change.
2841  * @can_eject: Returns %TRUE if the #GDrive can eject media.
2842  * @eject: Ejects a #GDrive.
2843  * @eject_finish: Finishes an eject operation.
2844  * @poll_for_media: Poll for media insertion/removal on a #GDrive.
2845  * @poll_for_media_finish: Finishes a media poll operation.
2846  * @get_identifier: Returns the identifier of the given kind, or %NULL if the #GDrive doesn't have one.
2847  * @enumerate_identifiers: Returns an array strings listing the kinds of identifiers which the #GDrive has.
2848  * @get_start_stop_type: Gets a #GDriveStartStopType with details about starting/stopping the drive. Since 2.22.
2849  * @can_stop: Returns %TRUE if a #GDrive can be stopped. Since 2.22.
2850  * @stop: Stops a #GDrive. Since 2.22.
2851  * @stop_finish: Finishes a stop operation. Since 2.22.
2852  * @can_start: Returns %TRUE if a #GDrive can be started. Since 2.22.
2853  * @can_start_degraded: Returns %TRUE if a #GDrive can be started degraded. Since 2.22.
2854  * @start: Starts a #GDrive. Since 2.22.
2855  * @start_finish: Finishes a start operation. Since 2.22.
2856  * @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.
2857  * @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22.
2858  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
2859  * @get_sort_key: Gets a key used for sorting #GDrive instances or %NULL if no such key exists. Since 2.32.
2860  *
2861  * Interface for creating #GDrive implementations.
2862  */
2863
2864
2865 /**
2866  * GDriveStartFlags:
2867  * @G_DRIVE_START_NONE: No flags set.
2868  *
2869  * Flags used when starting a drive.
2870  *
2871  * Since: 2.22
2872  */
2873
2874
2875 /**
2876  * GDriveStartStopType:
2877  * @G_DRIVE_START_STOP_TYPE_UNKNOWN: Unknown or drive doesn't support start/stop.
2878  * @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.
2879  * @G_DRIVE_START_STOP_TYPE_NETWORK: The start/stop methods are used for connecting/disconnect to the drive over the network.
2880  * @G_DRIVE_START_STOP_TYPE_MULTIDISK: The start/stop methods will assemble/disassemble a virtual drive from several physical drives.
2881  * @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)
2882  *
2883  * Enumeration describing how a drive can be started/stopped.
2884  *
2885  * Since: 2.22
2886  */
2887
2888
2889 /**
2890  * GEmblem:
2891  *
2892  * An object for Emblems
2893  */
2894
2895
2896 /**
2897  * GEmblemOrigin:
2898  * @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin
2899  * @G_EMBLEM_ORIGIN_DEVICE: Emblem adds device-specific information
2900  * @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly"
2901  * @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)
2902  *
2903  * GEmblemOrigin is used to add information about the origin of the emblem
2904  * to #GEmblem.
2905  *
2906  * Since: 2.18
2907  */
2908
2909
2910 /**
2911  * GEmblemedIcon:
2912  *
2913  * An implementation of #GIcon for icons with emblems.
2914  */
2915
2916
2917 /**
2918  * GEnumClass:
2919  * @g_type_class: the parent class
2920  * @minimum: the smallest possible value.
2921  * @maximum: the largest possible value.
2922  * @n_values: the number of possible values.
2923  * @values: an array of #GEnumValue structs describing the individual values.
2924  *
2925  * The class of an enumeration type holds information about its
2926  * possible values.
2927  */
2928
2929
2930 /**
2931  * GEnumValue:
2932  * @value: the enum value
2933  * @value_name: the name of the value
2934  * @value_nick: the nickname of the value
2935  *
2936  * A structure which contains a single enum value, its name, and its
2937  * nickname.
2938  */
2939
2940
2941 /**
2942  * GError:
2943  * @domain: error domain, e.g. #G_FILE_ERROR
2944  * @code: error code, e.g. %G_FILE_ERROR_NOENT
2945  * @message: human-readable informative error message
2946  *
2947  * The <structname>GError</structname> structure contains
2948  * information about an error that has occurred.
2949  */
2950
2951
2952 /**
2953  * GFile:
2954  *
2955  * A handle to an object implementing the #GFileIface interface.
2956  * Generally stores a location within the file system. Handles do not
2957  * necessarily represent files or directories that currently exist.
2958  */
2959
2960
2961 /**
2962  * GFileAttributeInfo:
2963  * @name: the name of the attribute.
2964  * @type: the #GFileAttributeType type of the attribute.
2965  * @flags: a set of #GFileAttributeInfoFlags.
2966  *
2967  * Information about a specific attribute.
2968  */
2969
2970
2971 /**
2972  * GFileAttributeInfoFlags:
2973  * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set.
2974  * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied.
2975  * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved.
2976  *
2977  * Flags specifying the behaviour of an attribute.
2978  */
2979
2980
2981 /**
2982  * GFileAttributeInfoList:
2983  * @infos: an array of #GFileAttributeInfo<!-- -->s.
2984  * @n_infos: the number of values in the array.
2985  *
2986  * Acts as a lightweight registry for possible valid file attributes.
2987  * The registry stores Key-Value pair formats as #GFileAttributeInfo<!-- -->s.
2988  */
2989
2990
2991 /**
2992  * GFileAttributeMatcher:
2993  *
2994  * Determines if a string matches a file attribute.
2995  */
2996
2997
2998 /**
2999  * GFileAttributeStatus:
3000  * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty).
3001  * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set.
3002  * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value.
3003  *
3004  * Used by g_file_set_attributes_from_info() when setting file attributes.
3005  */
3006
3007
3008 /**
3009  * GFileAttributeType:
3010  * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitalized type.
3011  * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string.
3012  * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes.
3013  * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value.
3014  * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer.
3015  * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer.
3016  * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer.
3017  * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer.
3018  * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject.
3019  * @G_FILE_ATTRIBUTE_TYPE_STRINGV: a %NULL terminated char **. Since 2.22
3020  *
3021  * The data types for file attributes.
3022  */
3023
3024
3025 /**
3026  * GFileCopyFlags:
3027  * @G_FILE_COPY_NONE: No flags set.
3028  * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
3029  * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
3030  * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
3031  * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
3032  * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
3033  * @G_FILE_COPY_TARGET_DEFAULT_PERMS: Leaves target file with default perms, instead of setting the source file perms.
3034  *
3035  * Flags used when copying or moving files.
3036  */
3037
3038
3039 /**
3040  * GFileCreateFlags:
3041  * @G_FILE_CREATE_NONE: No flags set.
3042  * @G_FILE_CREATE_PRIVATE: Create a file that can only be accessed by the current user.
3043  * @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
3044  *
3045  * Flags used when an operation may create a file.
3046  */
3047
3048
3049 /**
3050  * GFileDescriptorBased:
3051  *
3052  * An interface for file descriptor based io objects.
3053  */
3054
3055
3056 /**
3057  * GFileDescriptorBasedIface:
3058  * @g_iface: The parent interface.
3059  *
3060  *
3061  */
3062
3063
3064 /**
3065  * GFileEnumerator:
3066  *
3067  * A per matched file iterator.
3068  */
3069
3070
3071 /**
3072  * GFileIOStream:
3073  *
3074  * A subclass of GIOStream for opened files. This adds
3075  * a few file-specific operations and seeking and truncating.
3076  *
3077  * #GFileIOStream implements GSeekable.
3078  */
3079
3080
3081 /**
3082  * GFileIcon:
3083  *
3084  * Gets an icon for a #GFile. Implements #GLoadableIcon.
3085  */
3086
3087
3088 /**
3089  * GFileIcon:file:
3090  *
3091  * The file containing the icon.
3092  */
3093
3094
3095 /**
3096  * GFileIface:
3097  * @g_iface: The parent interface.
3098  * @dup: Duplicates a #GFile.
3099  * @hash: Creates a hash of a #GFile.
3100  * @equal: Checks equality of two given #GFile<!-- -->s.
3101  * @is_native: Checks to see if a file is native to the system.
3102  * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
3103  * @get_uri_scheme: Gets the URI scheme for a #GFile.
3104  * @get_basename: Gets the basename for a given #GFile.
3105  * @get_path: Gets the current path within a #GFile.
3106  * @get_uri: Gets a URI for the path within a #GFile.
3107  * @get_parse_name: Gets the parsed name for the #GFile.
3108  * @get_parent: Gets the parent directory for the #GFile.
3109  * @prefix_matches: Checks whether a #GFile contains a specified file.
3110  * @get_relative_path: Gets the path for a #GFile relative to a given path.
3111  * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
3112  * @get_child_for_display_name: Gets the child #GFile for a given display name.
3113  * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
3114  * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
3115  * @enumerate_children_finish: Finishes asynchronously enumerating the children.
3116  * @query_info: Gets the #GFileInfo for a #GFile.
3117  * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
3118  * @query_info_finish: Finishes an asynchronous query info operation.
3119  * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
3120  * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
3121  * @query_filesystem_info_finish: Finishes asynchronously getting the file system info.
3122  * @find_enclosing_mount: Gets a #GMount for the #GFile.
3123  * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
3124  * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
3125  * @set_display_name: Sets the display name for a #GFile.
3126  * @set_display_name_async: Asynchronously sets a #GFile's display name.
3127  * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
3128  * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
3129  * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
3130  * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
3131  * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
3132  * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
3133  * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
3134  * @set_attribute: Sets a #GFileAttribute.
3135  * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
3136  * @set_attributes_async: Asynchronously sets a file's attributes.
3137  * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
3138  * @read_fn: Reads a file asynchronously.
3139  * @read_async: Asynchronously reads a file.
3140  * @read_finish: Finishes asynchronously reading a file.
3141  * @append_to: Writes to the end of a file.
3142  * @append_to_async: Asynchronously writes to the end of a file.
3143  * @append_to_finish: Finishes an asynchronous file append operation.
3144  * @create: Creates a new file.
3145  * @create_async: Asynchronously creates a file.
3146  * @create_finish: Finishes asynchronously creating a file.
3147  * @replace: Replaces the contents of a file.
3148  * @replace_async: Asynchronously replaces the contents of a file.
3149  * @replace_finish: Finishes asynchronously replacing a file.
3150  * @delete_file: Deletes a file.
3151  * @_delete_file_async: Asynchronously deletes a file.
3152  * @_delete_file_finish: Finishes an asynchronous delete.
3153  * @trash: Sends a #GFile to the Trash location.
3154  * @_trash_async: Asynchronously sends a #GFile to the Trash location.
3155  * @_trash_finish: Finishes an asynchronous file trashing operation.
3156  * @make_directory: Makes a directory.
3157  * @_make_directory_async: Asynchronously makes a directory.
3158  * @_make_directory_finish: Finishes making a directory asynchronously.
3159  * @make_symbolic_link: Makes a symbolic link.
3160  * @_make_symbolic_link_async: Asynchronously makes a symbolic link
3161  * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
3162  * @copy: Copies a file.
3163  * @copy_async: Asynchronously copies a file.
3164  * @copy_finish: Finishes an asynchronous copy operation.
3165  * @move: Moves a file.
3166  * @_move_async: Asynchronously moves a file.
3167  * @_move_finish: Finishes an asynchronous move operation.
3168  * @mount_mountable: Mounts a mountable object.
3169  * @mount_mountable_finish: Finishes a mounting operation.
3170  * @unmount_mountable: Unmounts a mountable object.
3171  * @unmount_mountable_finish: Finishes an unmount operation.
3172  * @eject_mountable: Ejects a mountable.
3173  * @eject_mountable_finish: Finishes an eject operation.
3174  * @mount_enclosing_volume: Mounts a specified location.
3175  * @mount_enclosing_volume_finish: Finishes mounting a specified location.
3176  * @monitor_dir: Creates a #GFileMonitor for the location.
3177  * @monitor_file: Creates a #GFileMonitor for the location.
3178  * @open_readwrite: Open file read/write. Since 2.22.
3179  * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22.
3180  * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22.
3181  * @create_readwrite: Creates file read/write. Since 2.22.
3182  * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22.
3183  * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22.
3184  * @replace_readwrite: Replaces file read/write. Since 2.22.
3185  * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22.
3186  * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22.
3187  * @start_mountable: Starts a mountable object. Since 2.22.
3188  * @start_mountable_finish: Finishes an start operation. Since 2.22.
3189  * @stop_mountable: Stops a mountable. Since 2.22.
3190  * @stop_mountable_finish: Finishes an stop operation. Since 2.22.
3191  * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22.
3192  * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22.
3193  * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22.
3194  * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22.
3195  * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
3196  * @poll_mountable: Polls a mountable object for media changes. Since 2.22.
3197  * @poll_mountable_finish: Finishes an poll operation for media changes. Since 2.22.
3198  *
3199  * An interface for writing VFS file handles.
3200  */
3201
3202
3203 /**
3204  * GFileInfo:
3205  *
3206  * Stores information about a file system object referenced by a #GFile.
3207  */
3208
3209
3210 /**
3211  * GFileInputStream:
3212  *
3213  * A subclass of GInputStream for opened files. This adds
3214  * a few file-specific operations and seeking.
3215  *
3216  * #GFileInputStream implements #GSeekable.
3217  */
3218
3219
3220 /**
3221  * GFileMonitor:
3222  *
3223  * Watches for changes to a file.
3224  */
3225
3226
3227 /**
3228  * GFileMonitor::changed:
3229  * @monitor: a #GFileMonitor.
3230  * @file: a #GFile.
3231  * @other_file: (allow-none): a #GFile or #NULL.
3232  * @event_type: a #GFileMonitorEvent.
3233  *
3234  * Emitted when @file has been changed.
3235  *
3236  * If using #G_FILE_MONITOR_SEND_MOVED flag and @event_type is
3237  * #G_FILE_MONITOR_SEND_MOVED, @file will be set to a #GFile containing the
3238  * old path, and @other_file will be set to a #GFile containing the new path.
3239  *
3240  * In all the other cases, @other_file will be set to #NULL.
3241  */
3242
3243
3244 /**
3245  * GFileMonitorEvent:
3246  * @G_FILE_MONITOR_EVENT_CHANGED: a file changed.
3247  * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes.
3248  * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted.
3249  * @G_FILE_MONITOR_EVENT_CREATED: a file was created.
3250  * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed.
3251  * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted.
3252  * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted.
3253  * @G_FILE_MONITOR_EVENT_MOVED: the file was moved.
3254  *
3255  * Specifies what type of event a monitor event is.
3256  */
3257
3258
3259 /**
3260  * GFileMonitorFlags:
3261  * @G_FILE_MONITOR_NONE: No flags set.
3262  * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
3263  * @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).
3264  *
3265  * Flags used to set what a #GFileMonitor will watch for.
3266  */
3267
3268
3269 /**
3270  * GFileOutputStream:
3271  *
3272  * A subclass of GOutputStream for opened files. This adds
3273  * a few file-specific operations and seeking and truncating.
3274  *
3275  * #GFileOutputStream implements GSeekable.
3276  */
3277
3278
3279 /**
3280  * GFileProgressCallback:
3281  * @current_num_bytes: the current number of bytes in the operation.
3282  * @total_num_bytes: the total number of bytes in the operation.
3283  * @user_data: user data passed to the callback.
3284  *
3285  * When doing file operations that may take a while, such as moving
3286  * a file or copying a file, a progress callback is used to pass how
3287  * far along that operation is to the application.
3288  */
3289
3290
3291 /**
3292  * GFileQueryInfoFlags:
3293  * @G_FILE_QUERY_INFO_NONE: No flags set.
3294  * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
3295  *
3296  * Flags used when querying a #GFileInfo.
3297  */
3298
3299
3300 /**
3301  * GFileReadMoreCallback:
3302  * @file_contents: the data as currently read.
3303  * @file_size: the size of the data currently read.
3304  * @callback_data: data passed to the callback.
3305  *
3306  * When loading the partial contents of a file with g_file_load_partial_contents_async(),
3307  * it may become necessary to determine if any more data from the file should be loaded.
3308  * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
3309  * should be read, or %FALSE otherwise.
3310  *
3311  * Returns: %TRUE if more data should be read back. %FALSE otherwise.
3312  */
3313
3314
3315 /**
3316  * GFileType:
3317  * @G_FILE_TYPE_UNKNOWN: File's type is unknown.
3318  * @G_FILE_TYPE_REGULAR: File handle represents a regular file.
3319  * @G_FILE_TYPE_DIRECTORY: File handle represents a directory.
3320  * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link (Unix systems).
3321  * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo, block device, or character device.
3322  * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems).
3323  * @G_FILE_TYPE_MOUNTABLE: File is a mountable location.
3324  *
3325  * Indicates the file's on-disk type.
3326  */
3327
3328
3329 /**
3330  * GFilenameCompleter:
3331  *
3332  * Completes filenames based on files that exist within the file system.
3333  */
3334
3335
3336 /**
3337  * GFilenameCompleter::got-completion-data:
3338  *
3339  * Emitted when the file name completion information comes available.
3340  */
3341
3342
3343 /**
3344  * GFilesystemPreviewType:
3345  * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it.
3346  * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files.
3347  * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files.
3348  *
3349  * Indicates a hint from the file system whether files should be
3350  * previewed in a file manager. Returned as the value of the key
3351  * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW.
3352  */
3353
3354
3355 /**
3356  * GFilterInputStream:
3357  *
3358  * A base class for all input streams that work on an underlying stream.
3359  */
3360
3361
3362 /**
3363  * GFilterOutputStream:
3364  *
3365  * A base class for all output streams that work on an underlying stream.
3366  */
3367
3368
3369 /**
3370  * GFlagsClass:
3371  * @g_type_class: the parent class
3372  * @mask: a mask covering all possible values.
3373  * @n_values: the number of possible values.
3374  * @values: an array of #GFlagsValue structs describing the individual values.
3375  *
3376  * The class of a flags type holds information about its
3377  * possible values.
3378  */
3379
3380
3381 /**
3382  * GFlagsValue:
3383  * @value: the flags value
3384  * @value_name: the name of the value
3385  * @value_nick: the nickname of the value
3386  *
3387  * A structure which contains a single flags value, its name, and its
3388  * nickname.
3389  */
3390
3391
3392 /**
3393  * GFreeFunc:
3394  * @data: a data pointer
3395  *
3396  * Declares a type of function which takes an arbitrary
3397  * data pointer argument and has no return value. It is
3398  * not currently used in GLib or GTK+.
3399  */
3400
3401
3402 /**
3403  * GHmac:
3404  *
3405  * An opaque structure representing a HMAC operation.
3406  * To create a new GHmac, use g_hmac_new(). To free
3407  * a GHmac, use g_hmac_unref().
3408  *
3409  * Since: 2.30
3410  */
3411
3412
3413 /**
3414  * GIOErrorEnum:
3415  * @G_IO_ERROR_FAILED: Generic error condition for when any operation fails.
3416  * @G_IO_ERROR_NOT_FOUND: File not found error.
3417  * @G_IO_ERROR_EXISTS: File already exists error.
3418  * @G_IO_ERROR_IS_DIRECTORY: File is a directory error.
3419  * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory.
3420  * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty.
3421  * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file.
3422  * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link.
3423  * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted.
3424  * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters.
3425  * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters.
3426  * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links.
3427  * @G_IO_ERROR_NO_SPACE: No space left on drive.
3428  * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument.
3429  * @G_IO_ERROR_PERMISSION_DENIED: Permission denied.
3430  * @G_IO_ERROR_NOT_SUPPORTED: Operation not supported for the current backend.
3431  * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted.
3432  * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted.
3433  * @G_IO_ERROR_CLOSED: File was closed.
3434  * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable.
3435  * @G_IO_ERROR_PENDING: Operations are still pending.
3436  * @G_IO_ERROR_READ_ONLY: File is read only.
3437  * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created.
3438  * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect.
3439  * @G_IO_ERROR_TIMED_OUT: Operation timed out.
3440  * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive.
3441  * @G_IO_ERROR_BUSY: File is busy.
3442  * @G_IO_ERROR_WOULD_BLOCK: Operation would block.
3443  * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
3444  * @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
3445  * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has already interacted with the user. Do not display any error dialog.
3446  * @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
3447  * @G_IO_ERROR_NOT_INITIALIZED: The object has not been initialized. Since 2.22
3448  * @G_IO_ERROR_ADDRESS_IN_USE: The requested address is already in use. Since 2.22
3449  * @G_IO_ERROR_PARTIAL_INPUT: Need more input to finish operation. Since 2.24
3450  * @G_IO_ERROR_INVALID_DATA: There input data was invalid. Since 2.24
3451  * @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.
3452  * @G_IO_ERROR_HOST_UNREACHABLE: Host unreachable. Since 2.26
3453  * @G_IO_ERROR_NETWORK_UNREACHABLE: Network unreachable. Since 2.26
3454  * @G_IO_ERROR_CONNECTION_REFUSED: Connection refused. Since 2.26
3455  * @G_IO_ERROR_PROXY_FAILED: Connection to proxy server failed. Since 2.26
3456  * @G_IO_ERROR_PROXY_AUTH_FAILED: Proxy authentication failed. Since 2.26
3457  * @G_IO_ERROR_PROXY_NEED_AUTH: Proxy server needs authentication. Since 2.26
3458  * @G_IO_ERROR_PROXY_NOT_ALLOWED: Proxy connection is not allowed by ruleset. Since 2.26
3459  *
3460  * Error codes returned by GIO functions.
3461  */
3462
3463
3464 /**
3465  * GIOModule:
3466  *
3467  * Opaque module base class for extending GIO.
3468  */
3469
3470
3471 /**
3472  * GIOModuleScope:
3473  *
3474  * Represents a scope for loading IO modules. A scope can be used for blocking
3475  * duplicate modules, or blocking a module you don't want to load.
3476  *
3477  * The scope can be used with g_io_modules_load_all_in_directory_with_scope()
3478  * or g_io_modules_scan_all_in_directory_with_scope().
3479  *
3480  * Since: 2.30
3481  */
3482
3483
3484 /**
3485  * GIOModuleScopeFlags:
3486  * @G_IO_MODULES_SCOPE_NONE: No module scan flags
3487  * @G_IO_MODULES_SCOPE_BLOCK_DUPLICATES: When using this scope to load or scan modules, automatically block a modules which has the same base basename as previously loaded module.
3488  *
3489  * Flags for use with g_io_module_scope_new().
3490  *
3491  * Since: 2.30
3492  */
3493
3494
3495 /**
3496  * GIOSchedulerJob:
3497  *
3498  * Opaque class for defining and scheduling IO jobs.
3499  */
3500
3501
3502 /**
3503  * GIOSchedulerJobFunc:
3504  * @job: a #GIOSchedulerJob.
3505  * @cancellable: optional #GCancellable object, %NULL to ignore.
3506  * @user_data: the data to pass to callback function
3507  *
3508  * I/O Job function.
3509  *
3510  * Long-running jobs should periodically check the @cancellable
3511  * to see if they have been cancelled.
3512  *
3513  * complete the job, %FALSE if the job is complete (or cancelled)
3514  *
3515  * Returns: %TRUE if this function should be called again to
3516  */
3517
3518
3519 /**
3520  * GIOStream:
3521  *
3522  * Base class for read-write streams.
3523  */
3524
3525
3526 /**
3527  * GIOStreamSpliceFlags:
3528  * @G_IO_STREAM_SPLICE_NONE: Do not close either stream.
3529  * @G_IO_STREAM_SPLICE_CLOSE_STREAM1: Close the first stream after the splice.
3530  * @G_IO_STREAM_SPLICE_CLOSE_STREAM2: Close the second stream after the splice.
3531  * @G_IO_STREAM_SPLICE_WAIT_FOR_BOTH: Wait for both splice operations to finish before calling the callback.
3532  *
3533  * GIOStreamSpliceFlags determine how streams should be spliced.
3534  *
3535  * Since: 2.28
3536  */
3537
3538
3539 /**
3540  * GIcon:
3541  *
3542  * An abstract type that specifies an icon.
3543  */
3544
3545
3546 /**
3547  * GIconIface:
3548  * @g_iface: The parent interface.
3549  * @hash: A hash for a given #GIcon.
3550  * @equal: Checks if two #GIcon<!-- -->s are equal.
3551  * @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).
3552  * @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).
3553  *
3554  * GIconIface is used to implement GIcon types for various
3555  * different systems. See #GThemedIcon and #GLoadableIcon for
3556  * examples of how to implement this interface.
3557  */
3558
3559
3560 /**
3561  * GIconv:
3562  *
3563  * The <structname>GIConv</structname> struct wraps an
3564  * iconv() conversion descriptor. It contains private data
3565  * and should only be accessed using the following functions.
3566  */
3567
3568
3569 /**
3570  * GInetAddress:
3571  *
3572  * An IPv4 or IPv6 internet address.
3573  */
3574
3575
3576 /**
3577  * GInetAddress:is-any:
3578  *
3579  * Whether this is the "any" address for its family.
3580  * See g_inet_address_get_is_any().
3581  *
3582  * Since: 2.22
3583  */
3584
3585
3586 /**
3587  * GInetAddress:is-link-local:
3588  *
3589  * Whether this is a link-local address.
3590  * See g_inet_address_get_is_link_local().
3591  *
3592  * Since: 2.22
3593  */
3594
3595
3596 /**
3597  * GInetAddress:is-loopback:
3598  *
3599  * Whether this is the loopback address for its family.
3600  * See g_inet_address_get_is_loopback().
3601  *
3602  * Since: 2.22
3603  */
3604
3605
3606 /**
3607  * GInetAddress:is-mc-global:
3608  *
3609  * Whether this is a global multicast address.
3610  * See g_inet_address_get_is_mc_global().
3611  *
3612  * Since: 2.22
3613  */
3614
3615
3616 /**
3617  * GInetAddress:is-mc-link-local:
3618  *
3619  * Whether this is a link-local multicast address.
3620  * See g_inet_address_get_is_mc_link_local().
3621  *
3622  * Since: 2.22
3623  */
3624
3625
3626 /**
3627  * GInetAddress:is-mc-node-local:
3628  *
3629  * Whether this is a node-local multicast address.
3630  * See g_inet_address_get_is_mc_node_local().
3631  *
3632  * Since: 2.22
3633  */
3634
3635
3636 /**
3637  * GInetAddress:is-mc-org-local:
3638  *
3639  * Whether this is an organization-local multicast address.
3640  * See g_inet_address_get_is_mc_org_local().
3641  *
3642  * Since: 2.22
3643  */
3644
3645
3646 /**
3647  * GInetAddress:is-mc-site-local:
3648  *
3649  * Whether this is a site-local multicast address.
3650  * See g_inet_address_get_is_mc_site_local().
3651  *
3652  * Since: 2.22
3653  */
3654
3655
3656 /**
3657  * GInetAddress:is-multicast:
3658  *
3659  * Whether this is a multicast address.
3660  * See g_inet_address_get_is_multicast().
3661  *
3662  * Since: 2.22
3663  */
3664
3665
3666 /**
3667  * GInetAddress:is-site-local:
3668  *
3669  * Whether this is a site-local address.
3670  * See g_inet_address_get_is_loopback().
3671  *
3672  * Since: 2.22
3673  */
3674
3675
3676 /**
3677  * GInetAddressMask:
3678  *
3679  * A combination of an IPv4 or IPv6 base address and a length,
3680  * representing a range of IP addresses.
3681  *
3682  * Since: 2.32
3683  */
3684
3685
3686 /**
3687  * GInetSocketAddress:
3688  *
3689  * An IPv4 or IPv6 socket address, corresponding to a <type>struct
3690  * sockaddr_in</type> or <type>struct sockaddr_in6</type>.
3691  */
3692
3693
3694 /**
3695  * GInetSocketAddress:flowinfo:
3696  *
3697  * The <literal>sin6_flowinfo</literal> field, for IPv6 addresses.
3698  *
3699  * Since: 2.32
3700  */
3701
3702
3703 /**
3704  * GInetSocketAddress:scope_id:
3705  *
3706  * The <literal>sin6_scope_id</literal> field, for IPv6 addresses.
3707  *
3708  * Since: 2.32
3709  */
3710
3711
3712 /**
3713  * GInitable:
3714  *
3715  * Interface for initializable objects.
3716  *
3717  * Since: 2.22
3718  */
3719
3720
3721 /**
3722  * GInitableIface:
3723  * @g_iface: The parent interface.
3724  * @init: Initializes the object.
3725  *
3726  * Provides an interface for initializing object such that initialization
3727  * may fail.
3728  *
3729  * Since: 2.22
3730  */
3731
3732
3733 /**
3734  * GInitiallyUnowned:
3735  *
3736  * All the fields in the <structname>GInitiallyUnowned</structname> structure
3737  * are private to the #GInitiallyUnowned implementation and should never be
3738  * accessed directly.
3739  */
3740
3741
3742 /**
3743  * GInitiallyUnownedClass:
3744  *
3745  * The class structure for the <structname>GInitiallyUnowned</structname> type.
3746  */
3747
3748
3749 /**
3750  * GInputStream:
3751  *
3752  * Base class for streaming input operations.
3753  */
3754
3755
3756 /**
3757  * GInputVector:
3758  * @buffer: Pointer to a buffer where data will be written.
3759  * @size: the available size in @buffer.
3760  *
3761  * Structure used for scatter/gather data input.
3762  * You generally pass in an array of #GInputVector<!-- -->s
3763  * and the operation will store the read data starting in the
3764  * first buffer, switching to the next as needed.
3765  *
3766  * Since: 2.22
3767  */
3768
3769
3770 /**
3771  * GInstanceInitFunc:
3772  * @instance: The instance to initialize.
3773  * @g_class: The class of the type the instance is created for.
3774  *
3775  * A callback function used by the type system to initialize a new
3776  * instance of a type. This function initializes all instance members and
3777  * allocates any resources required by it.
3778  * Initialization of a derived instance involves calling all its parent
3779  * types instance initializers, so the class member of the instance
3780  * is altered during its initialization to always point to the class that
3781  * belongs to the type the current initializer was introduced for.
3782  */
3783
3784
3785 /**
3786  * GInterfaceFinalizeFunc:
3787  * @g_iface: The interface structure to finalize.
3788  * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3789  *
3790  * A callback function used by the type system to finalize an interface.
3791  * This function should destroy any internal data and release any resources
3792  * allocated by the corresponding GInterfaceInitFunc() function.
3793  */
3794
3795
3796 /**
3797  * GInterfaceInfo:
3798  * @interface_init: location of the interface initialization function
3799  * @interface_finalize: location of the interface finalization function
3800  * @interface_data: user-supplied data passed to the interface init/finalize functions
3801  *
3802  * A structure that provides information to the type system which is
3803  * used specifically for managing interface types.
3804  */
3805
3806
3807 /**
3808  * GInterfaceInitFunc:
3809  * @g_iface: The interface structure to initialize.
3810  * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3811  *
3812  * A callback function used by the type system to initialize a new
3813  * interface.  This function should initialize all internal data and
3814  * allocate any resources required by the interface.
3815  */
3816
3817
3818 /**
3819  * GLIB_CHECK_VERSION:
3820  * @major: the major version to check for
3821  * @minor: the minor version to check for
3822  * @micro: the micro version to check for
3823  *
3824  * Checks the version of the GLib library that is being compiled
3825  * against.
3826  *
3827  * <example>
3828  * <title>Checking the version of the GLib library</title>
3829  * <programlisting>
3830  * if (!GLIB_CHECK_VERSION (1, 2, 0))
3831  * g_error ("GLib version 1.2.0 or above is needed");
3832  * </programlisting>
3833  * </example>
3834  *
3835  * See glib_check_version() for a runtime check.
3836  *
3837  * is the same as or newer than the passed-in version.
3838  *
3839  * Returns: %TRUE if the version of the GLib header files
3840  */
3841
3842
3843 /**
3844  * GLoadableIcon:
3845  *
3846  * Generic type for all kinds of icons that can be loaded
3847  * as a stream.
3848  */
3849
3850
3851 /**
3852  * GLoadableIconIface:
3853  * @g_iface: The parent interface.
3854  * @load: Loads an icon.
3855  * @load_async: Loads an icon asynchronously.
3856  * @load_finish: Finishes an asynchronous icon load.
3857  *
3858  * Interface for icons that can be loaded as a stream.
3859  */
3860
3861
3862 /**
3863  * GMainContext:
3864  *
3865  * The <structname>GMainContext</structname> struct is an opaque data
3866  * type representing a set of sources to be handled in a main loop.
3867  */
3868
3869
3870 /**
3871  * GMainLoop:
3872  *
3873  * The <structname>GMainLoop</structname> struct is an opaque data type
3874  * representing the main event loop of a GLib or GTK+ application.
3875  */
3876
3877
3878 /**
3879  * GMarkupError:
3880  * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8
3881  * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace
3882  * @G_MARKUP_ERROR_PARSE: document was ill-formed
3883  * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser functions; element wasn't known
3884  * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser functions; attribute wasn't known
3885  * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser functions; content was invalid
3886  * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser functions; a required attribute was missing
3887  *
3888  * Error codes returned by markup parsing.
3889  */
3890
3891
3892 /**
3893  * GMarkupParseContext:
3894  *
3895  * A parse context is used to parse a stream of bytes that
3896  * you expect to contain marked-up text.
3897  *
3898  * See g_markup_parse_context_new(), #GMarkupParser, and so
3899  * on for more details.
3900  */
3901
3902
3903 /**
3904  * GMarkupParseFlags:
3905  * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use
3906  * @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
3907  * @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
3908  *
3909  * Flags that affect the behaviour of the parser.
3910  */
3911
3912
3913 /**
3914  * GMarkupParser:
3915  * @start_element: Callback to invoke when the opening tag of an element is seen.
3916  * @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>.
3917  * @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.
3918  * @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.
3919  * @error: Callback to invoke when an error occurs.
3920  *
3921  * Any of the fields in #GMarkupParser can be %NULL, in which case they
3922  * will be ignored. Except for the @error function, any of these callbacks
3923  * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT,
3924  * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT
3925  * errors are intended to be set from these callbacks. If you set an error
3926  * from a callback, g_markup_parse_context_parse() will report that error
3927  * back to its caller.
3928  */
3929
3930
3931 /**
3932  * GMemVTable:
3933  * @malloc: function to use for allocating memory.
3934  * @realloc: function to use for reallocating memory.
3935  * @free: function to use to free memory.
3936  * @calloc: function to use for allocating zero-filled memory.
3937  * @try_malloc: function to use for allocating memory without a default error handler.
3938  * @try_realloc: function to use for reallocating memory without a default error handler.
3939  *
3940  * A set of functions used to perform memory allocation. The same #GMemVTable must
3941  * be used for all allocations in the same program; a call to g_mem_set_vtable(),
3942  * if it exists, should be prior to any use of GLib.
3943  */
3944
3945
3946 /**
3947  * GMemoryInputStream:
3948  *
3949  * Implements #GInputStream for arbitrary memory chunks.
3950  */
3951
3952
3953 /**
3954  * GMemoryOutputStream:
3955  *
3956  * Implements #GOutputStream for arbitrary memory chunks.
3957  */
3958
3959
3960 /**
3961  * GMemoryOutputStream:data:
3962  *
3963  * Pointer to buffer where data will be written.
3964  *
3965  * Since: 2.24
3966  */
3967
3968
3969 /**
3970  * GMemoryOutputStream:data-size:
3971  *
3972  * Size of data written to the buffer.
3973  *
3974  * Since: 2.24
3975  */
3976
3977
3978 /**
3979  * GMemoryOutputStream:destroy-function: (skip)
3980  *
3981  * Function called with the buffer as argument when the stream is destroyed.
3982  *
3983  * Since: 2.24
3984  */
3985
3986
3987 /**
3988  * GMemoryOutputStream:realloc-function: (skip)
3989  *
3990  * Function with realloc semantics called to enlarge the buffer.
3991  *
3992  * Since: 2.24
3993  */
3994
3995
3996 /**
3997  * GMemoryOutputStream:size:
3998  *
3999  * Current size of the data buffer.
4000  *
4001  * Since: 2.24
4002  */
4003
4004
4005 /**
4006  * GMenu:
4007  *
4008  * #GMenu is an opaque structure type.  You must access it using the
4009  * functions below.
4010  *
4011  * Since: 2.32
4012  */
4013
4014
4015 /**
4016  * GMenuAttributeIter:
4017  *
4018  * #GMenuAttributeIter is an opaque structure type.  You must access it
4019  * using the functions below.
4020  *
4021  * Since: 2.32
4022  */
4023
4024
4025 /**
4026  * GMenuItem:
4027  *
4028  * #GMenuItem is an opaque structure type.  You must access it using the
4029  * functions below.
4030  *
4031  * Since: 2.32
4032  */
4033
4034
4035 /**
4036  * GMenuLinkIter:
4037  *
4038  * #GMenuLinkIter is an opaque structure type.  You must access it using
4039  * the functions below.
4040  *
4041  * Since: 2.32
4042  */
4043
4044
4045 /**
4046  * GMenuModel:
4047  *
4048  * #GMenuModel is an opaque structure type.  You must access it using the
4049  * functions below.
4050  *
4051  * Since: 2.32
4052  */
4053
4054
4055 /**
4056  * GMenuModel::items-changed:
4057  * @model: the #GMenuModel that is changing
4058  * @position: the position of the change
4059  * @removed: the number of items removed
4060  * @added: the number of items added
4061  *
4062  * Emitted when a change has occured to the menu.
4063  *
4064  * The only changes that can occur to a menu is that items are removed
4065  * or added.  Items may not change (except by being removed and added
4066  * back in the same location).  This signal is capable of describing
4067  * both of those changes (at the same time).
4068  *
4069  * The signal means that starting at the index @position, @removed
4070  * items were removed and @added items were added in their place.  If
4071  * @removed is zero then only items were added.  If @added is zero
4072  * then only items were removed.
4073  *
4074  * As an example, if the menu contains items a, b, c, d (in that
4075  * order) and the signal (2, 1, 3) occurs then the new composition of
4076  * the menu will be a, b, _, _, _, d (with each _ representing some
4077  * new item).
4078  *
4079  * Signal handlers may query the model (particularly the added items)
4080  * and expect to see the results of the modification that is being
4081  * reported.  The signal is emitted after the modification.
4082  */
4083
4084
4085 /**
4086  * GMount:
4087  *
4088  * A handle to an object implementing the #GMountIface interface.
4089  */
4090
4091
4092 /**
4093  * GMount::changed:
4094  * @mount: the object on which the signal is emitted
4095  *
4096  * Emitted when the mount has been changed.
4097  */
4098
4099
4100 /**
4101  * GMount::pre-unmount:
4102  * @mount: the object on which the signal is emitted
4103  *
4104  * This signal is emitted when the #GMount is about to be
4105  * unmounted.
4106  *
4107  * Since: 2.22
4108  */
4109
4110
4111 /**
4112  * GMount::unmounted:
4113  * @mount: the object on which the signal is emitted
4114  *
4115  * This signal is emitted when the #GMount have been
4116  * unmounted. If the recipient is holding references to the
4117  * object they should release them so the object can be
4118  * finalized.
4119  */
4120
4121
4122 /**
4123  * GMountIface:
4124  * @g_iface: The parent interface.
4125  * @changed: Changed signal that is emitted when the mount's state has changed.
4126  * @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.
4127  * @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.
4128  * @get_root: Gets a #GFile to the root directory of the #GMount.
4129  * @get_name: Gets a string containing the name of the #GMount.
4130  * @get_icon: Gets a #GIcon for the #GMount.
4131  * @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.
4132  * @get_volume: Gets a #GVolume the mount is located on. Returns %NULL if the #GMount is not associated with a #GVolume.
4133  * @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.
4134  * @can_unmount: Checks if a #GMount can be unmounted.
4135  * @can_eject: Checks if a #GMount can be ejected.
4136  * @unmount: Starts unmounting a #GMount.
4137  * @unmount_finish: Finishes an unmounting operation.
4138  * @eject: Starts ejecting a #GMount.
4139  * @eject_finish: Finishes an eject operation.
4140  * @remount: Starts remounting a #GMount.
4141  * @remount_finish: Finishes a remounting operation.
4142  * @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.
4143  * @guess_content_type_finish: Finishes a contenet type guessing operation. Added in 2.18.
4144  * @guess_content_type_sync: Synchronous variant of @guess_content_type. Added in 2.18
4145  * @unmount_with_operation: Starts unmounting a #GMount using a #GMountOperation. Since 2.22.
4146  * @unmount_with_operation_finish: Finishes an unmounting operation using a #GMountOperation. Since 2.22.
4147  * @eject_with_operation: Starts ejecting a #GMount using a #GMountOperation. Since 2.22.
4148  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
4149  * @get_default_location: Gets a #GFile indication a start location that can be use as the entry point for this mount. Since 2.24.
4150  * @get_sort_key: Gets a key used for sorting #GMount instance or %NULL if no such key exists. Since 2.32.
4151  *
4152  * Interface for implementing operations for mounts.
4153  */
4154
4155
4156 /**
4157  * GMountMountFlags:
4158  * @G_MOUNT_MOUNT_NONE: No flags set.
4159  *
4160  * Flags used when mounting a mount.
4161  */
4162
4163
4164 /**
4165  * GMountOperation:
4166  *
4167  * Class for providing authentication methods for mounting operations,
4168  * such as mounting a file locally, or authenticating with a server.
4169  */
4170
4171
4172 /**
4173  * GMountOperation::aborted:
4174  *
4175  * Emitted by the backend when e.g. a device becomes unavailable
4176  * while a mount operation is in progress.
4177  *
4178  * Implementations of GMountOperation should handle this signal
4179  * by dismissing open password dialogs.
4180  *
4181  * Since: 2.20
4182  */
4183
4184
4185 /**
4186  * GMountOperation::ask-password:
4187  * @op: a #GMountOperation requesting a password.
4188  * @message: string containing a message to display to the user.
4189  * @default_user: string containing the default user name.
4190  * @default_domain: string containing the default domain.
4191  * @flags: a set of #GAskPasswordFlags.
4192  *
4193  * Emitted when a mount operation asks the user for a password.
4194  *
4195  * If the message contains a line break, the first line should be
4196  * presented as a heading. For example, it may be used as the
4197  * primary text in a #GtkMessageDialog.
4198  */
4199
4200
4201 /**
4202  * GMountOperation::ask-question:
4203  * @op: a #GMountOperation asking a question.
4204  * @message: string containing a message to display to the user.
4205  * @choices: an array of strings for each possible choice.
4206  *
4207  * Emitted when asking the user a question and gives a list of
4208  * choices for the user to choose from.
4209  *
4210  * If the message contains a line break, the first line should be
4211  * presented as a heading. For example, it may be used as the
4212  * primary text in a #GtkMessageDialog.
4213  */
4214
4215
4216 /**
4217  * GMountOperation::reply:
4218  * @op: a #GMountOperation.
4219  * @result: a #GMountOperationResult indicating how the request was handled
4220  *
4221  * Emitted when the user has replied to the mount operation.
4222  */
4223
4224
4225 /**
4226  * GMountOperation::show-processes:
4227  * @op: a #GMountOperation.
4228  * @message: string containing a message to display to the user.
4229  * @processes: (element-type GPid): an array of #GPid for processes blocking the operation.
4230  * @choices: an array of strings for each possible choice.
4231  *
4232  * Emitted when one or more processes are blocking an operation
4233  * e.g. unmounting/ejecting a #GMount or stopping a #GDrive.
4234  *
4235  * Note that this signal may be emitted several times to update the
4236  * list of blocking processes as processes close files. The
4237  * application should only respond with g_mount_operation_reply() to
4238  * the latest signal (setting #GMountOperation:choice to the choice
4239  * the user made).
4240  *
4241  * If the message contains a line break, the first line should be
4242  * presented as a heading. For example, it may be used as the
4243  * primary text in a #GtkMessageDialog.
4244  *
4245  * Since: 2.22
4246  */
4247
4248
4249 /**
4250  * GMountOperation:anonymous:
4251  *
4252  * Whether to use an anonymous user when authenticating.
4253  */
4254
4255
4256 /**
4257  * GMountOperation:choice:
4258  *
4259  * The index of the user's choice when a question is asked during the
4260  * mount operation. See the #GMountOperation::ask-question signal.
4261  */
4262
4263
4264 /**
4265  * GMountOperation:domain:
4266  *
4267  * The domain to use for the mount operation.
4268  */
4269
4270
4271 /**
4272  * GMountOperation:password:
4273  *
4274  * The password that is used for authentication when carrying out
4275  * the mount operation.
4276  */
4277
4278
4279 /**
4280  * GMountOperation:password-save:
4281  *
4282  * Determines if and how the password information should be saved.
4283  */
4284
4285
4286 /**
4287  * GMountOperation:username:
4288  *
4289  * The user name that is used for authentication when carrying out
4290  * the mount operation.
4291  */
4292
4293
4294 /**
4295  * GMountOperationResult:
4296  * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the user specified data is now available
4297  * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation to be aborted
4298  * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not implemented)
4299  *
4300  * #GMountOperationResult is returned as a result when a request for
4301  * information is send by the mounting operation.
4302  */
4303
4304
4305 /**
4306  * GMountUnmountFlags:
4307  * @G_MOUNT_UNMOUNT_NONE: No flags set.
4308  * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding file operations on the mount.
4309  *
4310  * Flags used when an unmounting a mount.
4311  */
4312
4313
4314 /**
4315  * GNetworkAddress:
4316  *
4317  * A #GSocketConnectable for resolving a hostname and connecting to
4318  * that host.
4319  */
4320
4321
4322 /**
4323  * GNetworkMonitor:
4324  *
4325  * #GNetworkMonitor monitors the status of network connections and
4326  * indicates when a possibly-user-visible change has occurred.
4327  *
4328  * Since: 2.32
4329  */
4330
4331
4332 /**
4333  * GNetworkMonitor::network-changed:
4334  * @monitor: a #GNetworkMonitor
4335  * @available: the current value of #GNetworkMonitor:network-available
4336  *
4337  * Emitted when the network configuration changes. If @available is
4338  * %TRUE, then some hosts may be reachable that were not reachable
4339  * before, while others that were reachable before may no longer be
4340  * reachable. If @available is %FALSE, then no remote hosts are
4341  * reachable.
4342  *
4343  * Since: 2.32
4344  */
4345
4346
4347 /**
4348  * GNetworkMonitor:network-available:
4349  *
4350  * Whether the network is considered available. That is, whether the
4351  * system has a default route for at least one of IPv4 or IPv6.
4352  *
4353  * Real-world networks are of course much more complicated than
4354  * this; the machine may be connected to a wifi hotspot that
4355  * requires payment before allowing traffic through, or may be
4356  * connected to a functioning router that has lost its own upstream
4357  * connectivity. Some hosts might only be accessible when a VPN is
4358  * active. Other hosts might only be accessible when the VPN is
4359  * <emphasis>not</emphasis> active. Thus, it is best to use
4360  * g_network_monitor_can_reach() or
4361  * g_network_monitor_can_reach_async() to test for reachability on a
4362  * host-by-host basis. (On the other hand, when the property is
4363  * %FALSE, the application can reasonably expect that no remote
4364  * hosts at all are reachable, and should indicate this to the user
4365  * in its UI.)
4366  *
4367  * See also #GNetworkMonitor::network-changed.
4368  *
4369  * Since: 2.32
4370  */
4371
4372
4373 /**
4374  * GNetworkService:
4375  *
4376  * A #GSocketConnectable for resolving a SRV record and connecting to
4377  * that service.
4378  */
4379
4380
4381 /**
4382  * GNormalizeMode:
4383  * @G_NORMALIZE_DEFAULT: standardize differences that do not affect the text content, such as the above-mentioned accent representation
4384  * @G_NORMALIZE_NFD: another name for %G_NORMALIZE_DEFAULT
4385  * @G_NORMALIZE_DEFAULT_COMPOSE: like %G_NORMALIZE_DEFAULT, but with composed forms rather than a maximally decomposed form
4386  * @G_NORMALIZE_NFC: another name for %G_NORMALIZE_DEFAULT_COMPOSE
4387  * @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
4388  * @G_NORMALIZE_NFKD: another name for %G_NORMALIZE_ALL
4389  * @G_NORMALIZE_ALL_COMPOSE: like %G_NORMALIZE_ALL, but with composed forms rather than a maximally decomposed form
4390  * @G_NORMALIZE_NFKC: another name for %G_NORMALIZE_ALL_COMPOSE
4391  *
4392  * Defines how a Unicode string is transformed in a canonical
4393  * form, standardizing such issues as whether a character with
4394  * an accent is represented as a base character and combining
4395  * accent or as a single precomposed character. Unicode strings
4396  * should generally be normalized before comparing them.
4397  */
4398
4399
4400 /**
4401  * GObject:
4402  *
4403  * All the fields in the <structname>GObject</structname> structure are private
4404  * to the #GObject implementation and should never be accessed directly.
4405  */
4406
4407
4408 /**
4409  * GObjectClass:
4410  * @g_type_class: the parent class
4411  * @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.
4412  * @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.
4413  * @get_property: the generic getter for all properties of this type. Should be overridden for every type with properties.
4414  * @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.
4415  * @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.
4416  * @dispatch_properties_changed: emits property change notification for a bunch of properties. Overriding @dispatch_properties_changed should be rarely needed.
4417  * @notify: the class closure for the notify signal
4418  * @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.
4419  *
4420  * The class structure for the <structname>GObject</structname> type.
4421  *
4422  * <example>
4423  * <title>Implementing singletons using a constructor</title>
4424  * <programlisting>
4425  * static MySingleton *the_singleton = NULL;
4426  *
4427  * static GObject*
4428  * my_singleton_constructor (GType                  type,
4429  * guint                  n_construct_params,
4430  * GObjectConstructParam *construct_params)
4431  * {
4432  * GObject *object;
4433  *
4434  * if (!the_singleton)
4435  * {
4436  * object = G_OBJECT_CLASS (parent_class)->constructor (type,
4437  * n_construct_params,
4438  * construct_params);
4439  * the_singleton = MY_SINGLETON (object);
4440  * }
4441  * else
4442  * object = g_object_ref (G_OBJECT (the_singleton));
4443  *
4444  * return object;
4445  * }
4446  * </programlisting></example>
4447  */
4448
4449
4450 /**
4451  * GObjectConstructParam:
4452  * @pspec: the #GParamSpec of the construct parameter
4453  * @value: the value to set the parameter to
4454  *
4455  * The <structname>GObjectConstructParam</structname> struct is an auxiliary
4456  * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
4457  * a #GObjectClass.
4458  */
4459
4460
4461 /**
4462  * GObjectFinalizeFunc:
4463  * @object: the #GObject being finalized
4464  *
4465  * The type of the @finalize function of #GObjectClass.
4466  */
4467
4468
4469 /**
4470  * GObjectGetPropertyFunc:
4471  * @object: a #GObject
4472  * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
4473  * @value: a #GValue to return the property value in
4474  * @pspec: the #GParamSpec describing the property
4475  *
4476  * The type of the @get_property function of #GObjectClass.
4477  */
4478
4479
4480 /**
4481  * GObjectSetPropertyFunc:
4482  * @object: a #GObject
4483  * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
4484  * @value: the new value for the property
4485  * @pspec: the #GParamSpec describing the property
4486  *
4487  * The type of the @set_property function of #GObjectClass.
4488  */
4489
4490
4491 /**
4492  * GOptionArg:
4493  * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags.
4494  * @G_OPTION_ARG_STRING: The option takes a string argument.
4495  * @G_OPTION_ARG_INT: The option takes an integer argument.
4496  * @G_OPTION_ARG_CALLBACK: The option provides a callback to parse the extra argument.
4497  * @G_OPTION_ARG_FILENAME: The option takes a filename as argument.
4498  * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple uses of the option are collected into an array of strings.
4499  * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, multiple uses of the option are collected into an array of strings.
4500  * @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
4501  * @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
4502  *
4503  * The #GOptionArg enum values determine which type of extra argument the
4504  * options expect to find. If an option expects an extra argument, it
4505  * can be specified in several ways; with a short option:
4506  * <option>-x arg</option>, with a long option: <option>--name arg</option>
4507  * or combined in a single argument: <option>--name=arg</option>.
4508  */
4509
4510
4511 /**
4512  * GOptionArgFunc:
4513  * @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.
4514  * @value: The value to be parsed.
4515  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
4516  * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED is intended to be used for errors in #GOptionArgFunc callbacks.
4517  *
4518  * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK
4519  * options.
4520  *
4521  * occurred, in which case @error should be set with g_set_error()
4522  *
4523  * Returns: %TRUE if the option was successfully parsed, %FALSE if an error
4524  */
4525
4526
4527 /**
4528  * GOptionContext:
4529  *
4530  * A <structname>GOptionContext</structname> struct defines which options
4531  * are accepted by the commandline option parser. The struct has only private
4532  * fields and should not be directly accessed.
4533  */
4534
4535
4536 /**
4537  * GOptionEntry:
4538  * @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>.
4539  * @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.
4540  * @flags: Flags from #GOptionFlags.
4541  * @arg: The type of the option, as a #GOptionArg.
4542  * @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().
4543  * @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().
4544  * @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().
4545  *
4546  * A <structname>GOptionEntry</structname> defines a single option.
4547  * To have an effect, they must be added to a #GOptionGroup with
4548  * g_option_context_add_main_entries() or g_option_group_add_entries().
4549  */
4550
4551
4552 /**
4553  * GOptionError:
4554  * @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().
4555  * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed.
4556  * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed.
4557  *
4558  * Error codes returned by option parsing.
4559  */
4560
4561
4562 /**
4563  * GOptionErrorFunc:
4564  * @context: The active #GOptionContext
4565  * @group: The group to which the function belongs
4566  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
4567  * @error: The #GError containing details about the parse error
4568  *
4569  * The type of function to be used as callback when a parse error occurs.
4570  */
4571
4572
4573 /**
4574  * GOptionFlags:
4575  * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in <option>--help</option> output.
4576  * @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.
4577  * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this flag indicates that the sense of the option is reversed.
4578  * @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
4579  * @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
4580  * @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
4581  * @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.
4582  *
4583  * Flags which modify individual options.
4584  */
4585
4586
4587 /**
4588  * GOptionGroup:
4589  *
4590  * A <structname>GOptionGroup</structname> struct defines the options in a single
4591  * group. The struct has only private fields and should not be directly accessed.
4592  *
4593  * All options in a group share the same translation function. Libraries which
4594  * need to parse commandline options are expected to provide a function for
4595  * getting a <structname>GOptionGroup</structname> holding their options, which
4596  * the application can then add to its #GOptionContext.
4597  */
4598
4599
4600 /**
4601  * GOptionParseFunc:
4602  * @context: The active #GOptionContext
4603  * @group: The group to which the function belongs
4604  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
4605  * @error: A return location for error details
4606  *
4607  * The type of function that can be called before and after parsing.
4608  *
4609  * occurred, in which case @error should be set with g_set_error()
4610  *
4611  * Returns: %TRUE if the function completed successfully, %FALSE if an error
4612  */
4613
4614
4615 /**
4616  * GOutputStream:
4617  *
4618  * Base class for writing output.
4619  *
4620  * All classes derived from GOutputStream should implement synchronous
4621  * writing, splicing, flushing and closing streams, but may implement
4622  * asynchronous versions.
4623  */
4624
4625
4626 /**
4627  * GOutputStreamSpliceFlags:
4628  * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream.
4629  * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after the splice.
4630  * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after the splice.
4631  *
4632  * GOutputStreamSpliceFlags determine how streams should be spliced.
4633  */
4634
4635
4636 /**
4637  * GOutputVector:
4638  * @buffer: Pointer to a buffer of data to read.
4639  * @size: the size of @buffer.
4640  *
4641  * Structure used for scatter/gather data output.
4642  * You generally pass in an array of #GOutputVector<!-- -->s
4643  * and the operation will use all the buffers as if they were
4644  * one buffer.
4645  *
4646  * Since: 2.22
4647  */
4648
4649
4650 /**
4651  * GParamFlags:
4652  * @G_PARAM_READABLE: the parameter is readable
4653  * @G_PARAM_WRITABLE: the parameter is writable
4654  * @G_PARAM_CONSTRUCT: the parameter will be set upon object construction
4655  * @G_PARAM_CONSTRUCT_ONLY: the parameter will only be set upon object construction
4656  * @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) strict validation is not required
4657  * @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
4658  * @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
4659  * @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
4660  * @G_PARAM_PRIVATE: internal
4661  * @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
4662  *
4663  * Through the #GParamFlags flag values, certain aspects of parameters
4664  * can be configured.
4665  */
4666
4667
4668 /**
4669  * GParamSpec:
4670  * @g_type_instance: private #GTypeInstance portion
4671  * @name: name of this parameter: always an interned string
4672  * @flags: #GParamFlags flags for this parameter
4673  * @value_type: the #GValue type for this parameter
4674  * @owner_type: #GType type that uses (introduces) this parameter
4675  *
4676  * All other fields of the <structname>GParamSpec</structname> struct are private and
4677  * should not be used directly.
4678  */
4679
4680
4681 /**
4682  * GParamSpecBoolean:
4683  * @parent_instance: private #GParamSpec portion
4684  * @default_value: default value for the property specified
4685  *
4686  * A #GParamSpec derived structure that contains the meta data for boolean properties.
4687  */
4688
4689
4690 /**
4691  * GParamSpecBoxed:
4692  * @parent_instance: private #GParamSpec portion
4693  *
4694  * A #GParamSpec derived structure that contains the meta data for boxed properties.
4695  */
4696
4697
4698 /**
4699  * GParamSpecChar:
4700  * @parent_instance: private #GParamSpec portion
4701  * @minimum: minimum value for the property specified
4702  * @maximum: maximum value for the property specified
4703  * @default_value: default value for the property specified
4704  *
4705  * A #GParamSpec derived structure that contains the meta data for character properties.
4706  */
4707
4708
4709 /**
4710  * GParamSpecClass:
4711  * @g_type_class: the parent class
4712  * @value_type: the #GValue type for this parameter
4713  * @finalize: The instance finalization function (optional), should chain up to the finalize method of the parent class.
4714  * @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().
4715  * @value_validate: Ensures that the contents of @value comply with the specifications set out by this type (optional), see g_param_value_validate().
4716  * @values_cmp: Compares @value1 with @value2 according to this type (recommended, the default is memcmp()), see g_param_values_cmp().
4717  *
4718  * The class structure for the <structname>GParamSpec</structname> type.
4719  * Normally, <structname>GParamSpec</structname> classes are filled by
4720  * g_param_type_register_static().
4721  */
4722
4723
4724 /**
4725  * GParamSpecDouble:
4726  * @parent_instance: private #GParamSpec portion
4727  * @minimum: minimum value for the property specified
4728  * @maximum: maximum value for the property specified
4729  * @default_value: default value for the property specified
4730  * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-90.
4731  *
4732  * A #GParamSpec derived structure that contains the meta data for double properties.
4733  */
4734
4735
4736 /**
4737  * GParamSpecEnum:
4738  * @parent_instance: private #GParamSpec portion
4739  * @enum_class: the #GEnumClass for the enum
4740  * @default_value: default value for the property specified
4741  *
4742  * A #GParamSpec derived structure that contains the meta data for enum
4743  * properties.
4744  */
4745
4746
4747 /**
4748  * GParamSpecFlags:
4749  * @parent_instance: private #GParamSpec portion
4750  * @flags_class: the #GFlagsClass for the flags
4751  * @default_value: default value for the property specified
4752  *
4753  * A #GParamSpec derived structure that contains the meta data for flags
4754  * properties.
4755  */
4756
4757
4758 /**
4759  * GParamSpecFloat:
4760  * @parent_instance: private #GParamSpec portion
4761  * @minimum: minimum value for the property specified
4762  * @maximum: maximum value for the property specified
4763  * @default_value: default value for the property specified
4764  * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-30.
4765  *
4766  * A #GParamSpec derived structure that contains the meta data for float properties.
4767  */
4768
4769
4770 /**
4771  * GParamSpecGType:
4772  * @parent_instance: private #GParamSpec portion
4773  * @is_a_type: a #GType whose subtypes can occur as values
4774  *
4775  * A #GParamSpec derived structure that contains the meta data for #GType properties.
4776  *
4777  * Since: 2.10
4778  */
4779
4780
4781 /**
4782  * GParamSpecInt:
4783  * @parent_instance: private #GParamSpec portion
4784  * @minimum: minimum value for the property specified
4785  * @maximum: maximum value for the property specified
4786  * @default_value: default value for the property specified
4787  *
4788  * A #GParamSpec derived structure that contains the meta data for integer properties.
4789  */
4790
4791
4792 /**
4793  * GParamSpecInt64:
4794  * @parent_instance: private #GParamSpec portion
4795  * @minimum: minimum value for the property specified
4796  * @maximum: maximum value for the property specified
4797  * @default_value: default value for the property specified
4798  *
4799  * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
4800  */
4801
4802
4803 /**
4804  * GParamSpecLong:
4805  * @parent_instance: private #GParamSpec portion
4806  * @minimum: minimum value for the property specified
4807  * @maximum: maximum value for the property specified
4808  * @default_value: default value for the property specified
4809  *
4810  * A #GParamSpec derived structure that contains the meta data for long integer properties.
4811  */
4812
4813
4814 /**
4815  * GParamSpecObject:
4816  * @parent_instance: private #GParamSpec portion
4817  *
4818  * A #GParamSpec derived structure that contains the meta data for object properties.
4819  */
4820
4821
4822 /**
4823  * GParamSpecOverride:
4824  *
4825  * This is a type of #GParamSpec type that simply redirects operations to
4826  * another paramspec.  All operations other than getting or
4827  * setting the value are redirected, including accessing the nick and
4828  * blurb, validating a value, and so forth. See
4829  * g_param_spec_get_redirect_target() for retrieving the overidden
4830  * property. #GParamSpecOverride is used in implementing
4831  * g_object_class_override_property(), and will not be directly useful
4832  * unless you are implementing a new base type similar to GObject.
4833  *
4834  * Since: 2.4
4835  */
4836
4837
4838 /**
4839  * GParamSpecParam:
4840  * @parent_instance: private #GParamSpec portion
4841  *
4842  * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
4843  * properties.
4844  */
4845
4846
4847 /**
4848  * GParamSpecPointer:
4849  * @parent_instance: private #GParamSpec portion
4850  *
4851  * A #GParamSpec derived structure that contains the meta data for pointer properties.
4852  */
4853
4854
4855 /**
4856  * GParamSpecString:
4857  * @parent_instance: private #GParamSpec portion
4858  * @default_value: default value for the property specified
4859  * @cset_first: a string containing the allowed values for the first byte
4860  * @cset_nth: a string containing the allowed values for the subsequent bytes
4861  * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
4862  * @null_fold_if_empty: replace empty string by %NULL
4863  * @ensure_non_null: replace %NULL strings by an empty string
4864  *
4865  * A #GParamSpec derived structure that contains the meta data for string
4866  * properties.
4867  */
4868
4869
4870 /**
4871  * GParamSpecTypeInfo:
4872  * @instance_size: Size of the instance (object) structure.
4873  * @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.
4874  * @instance_init: Location of the instance initialization function (optional).
4875  * @value_type: The #GType of values conforming to this #GParamSpec
4876  * @finalize: The instance finalization function (optional).
4877  * @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().
4878  * @value_validate: Ensures that the contents of @value comply with the specifications set out by @pspec (optional), see g_param_value_validate().
4879  * @values_cmp: Compares @value1 with @value2 according to @pspec (recommended, the default is memcmp()), see g_param_values_cmp().
4880  *
4881  * This structure is used to provide the type system with the information
4882  * required to initialize and destruct (finalize) a parameter's class and
4883  * instances thereof.
4884  * The initialized structure is passed to the g_param_type_register_static()
4885  * The type system will perform a deep copy of this structure, so its memory
4886  * does not need to be persistent across invocation of
4887  * g_param_type_register_static().
4888  */
4889
4890
4891 /**
4892  * GParamSpecUChar:
4893  * @parent_instance: private #GParamSpec portion
4894  * @minimum: minimum value for the property specified
4895  * @maximum: maximum value for the property specified
4896  * @default_value: default value for the property specified
4897  *
4898  * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
4899  */
4900
4901
4902 /**
4903  * GParamSpecUInt:
4904  * @parent_instance: private #GParamSpec portion
4905  * @minimum: minimum value for the property specified
4906  * @maximum: maximum value for the property specified
4907  * @default_value: default value for the property specified
4908  *
4909  * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
4910  */
4911
4912
4913 /**
4914  * GParamSpecUInt64:
4915  * @parent_instance: private #GParamSpec portion
4916  * @minimum: minimum value for the property specified
4917  * @maximum: maximum value for the property specified
4918  * @default_value: default value for the property specified
4919  *
4920  * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
4921  */
4922
4923
4924 /**
4925  * GParamSpecULong:
4926  * @parent_instance: private #GParamSpec portion
4927  * @minimum: minimum value for the property specified
4928  * @maximum: maximum value for the property specified
4929  * @default_value: default value for the property specified
4930  *
4931  * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
4932  */
4933
4934
4935 /**
4936  * GParamSpecUnichar:
4937  * @parent_instance: private #GParamSpec portion
4938  * @default_value: default value for the property specified
4939  *
4940  * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
4941  */
4942
4943
4944 /**
4945  * GParamSpecValueArray:
4946  * @parent_instance: private #GParamSpec portion
4947  * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
4948  * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
4949  *
4950  * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
4951  */
4952
4953
4954 /**
4955  * GParamSpecVariant:
4956  * @parent_instance: private #GParamSpec portion
4957  * @type: a #GVariantType, or %NULL
4958  * @default_value: a #GVariant, or %NULL
4959  *
4960  * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
4961  *
4962  * Since: 2.26
4963  */
4964
4965
4966 /**
4967  * GParameter:
4968  * @name: the parameter name
4969  * @value: the parameter value
4970  *
4971  * The <structname>GParameter</structname> struct is an auxiliary structure used
4972  * to hand parameter name/value pairs to g_object_newv().
4973  */
4974
4975
4976 /**
4977  * GPasswordSave:
4978  * @G_PASSWORD_SAVE_NEVER: never save a password.
4979  * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session.
4980  * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently.
4981  *
4982  * #GPasswordSave is used to indicate the lifespan of a saved password.
4983  *
4984  * #Gvfs stores passwords in the Gnome keyring when this flag allows it
4985  * to, and later retrieves it again from there.
4986  */
4987
4988
4989 /**
4990  * GPermission:
4991  *
4992  * #GPermission is an opaque data structure and can only be accessed
4993  * using the following functions.
4994  */
4995
4996
4997 /**
4998  * GPermission:allowed:
4999  *
5000  * %TRUE if the caller currently has permission to perform the action that
5001  * @permission represents the permission to perform.
5002  */
5003
5004
5005 /**
5006  * GPermission:can-acquire:
5007  *
5008  * %TRUE if it is generally possible to acquire the permission by calling
5009  * g_permission_acquire().
5010  */
5011
5012
5013 /**
5014  * GPermission:can-release:
5015  *
5016  * %TRUE if it is generally possible to release the permission by calling
5017  * g_permission_release().
5018  */
5019
5020
5021 /**
5022  * GPid:
5023  *
5024  * A type which is used to hold a process identification.
5025  *
5026  * On UNIX, processes are identified by a process id (an integer),
5027  * while Windows uses process handles (which are pointers).
5028  *
5029  * GPid is used in GLib only for descendant processes spawned with
5030  * the g_spawn functions.
5031  */
5032
5033
5034 /**
5035  * GPollFD:
5036  * @fd: the file descriptor to poll (or a <type>HANDLE</type> on Win32)
5037  * @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.
5038  * @revents: a bitwise combination of flags from #GIOCondition, returned from the poll() function to indicate which events occurred.
5039  *
5040  * Represents a file descriptor, which events to poll for, and which events
5041  * occurred.
5042  */
5043
5044
5045 /**
5046  * GPollFunc:
5047  * @ufds: an array of #GPollFD elements
5048  * @nfsd: the number of elements in @ufds
5049  * @timeout_: the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout.
5050  *
5051  * Specifies the type of function passed to g_main_context_set_poll_func().
5052  * The semantics of the function should match those of the poll() system call.
5053  *
5054  * reported, or -1 if an error occurred.
5055  *
5056  * Returns: the number of #GPollFD elements which have events or errors
5057  */
5058
5059
5060 /**
5061  * GPollableInputStream:
5062  *
5063  * An interface for a #GInputStream that can be polled for readability.
5064  *
5065  * Since: 2.28
5066  */
5067
5068
5069 /**
5070  * GPollableInputStreamInterface:
5071  * @g_iface: The parent interface.
5072  * @can_poll: Checks if the #GPollableInputStream instance is actually pollable
5073  * @is_readable: Checks if the stream is readable
5074  * @create_source: Creates a #GSource to poll the stream
5075  * @read_nonblocking: Does a non-blocking read or returns %G_IO_ERROR_WOULD_BLOCK
5076  *
5077  * The interface for pollable input streams.
5078  *
5079  * The default implementation of @can_poll always returns %TRUE.
5080  *
5081  * The default implementation of @read_nonblocking calls
5082  * g_pollable_input_stream_is_readable(), and then calls
5083  * g_input_stream_read() if it returns %TRUE. This means you only need
5084  * to override it if it is possible that your @is_readable
5085  * implementation may return %TRUE when the stream is not actually
5086  * readable.
5087  *
5088  * Since: 2.28
5089  */
5090
5091
5092 /**
5093  * GPollableOutputStream:
5094  *
5095  * An interface for a #GOutputStream that can be polled for readability.
5096  *
5097  * Since: 2.28
5098  */
5099
5100
5101 /**
5102  * GPollableOutputStreamInterface:
5103  * @g_iface: The parent interface.
5104  * @can_poll: Checks if the #GPollableOutputStream instance is actually pollable
5105  * @is_writable: Checks if the stream is writable
5106  * @create_source: Creates a #GSource to poll the stream
5107  * @write_nonblocking: Does a non-blocking write or returns %G_IO_ERROR_WOULD_BLOCK
5108  *
5109  * The interface for pollable output streams.
5110  *
5111  * The default implementation of @can_poll always returns %TRUE.
5112  *
5113  * The default implementation of @write_nonblocking calls
5114  * g_pollable_output_stream_is_writable(), and then calls
5115  * g_output_stream_write() if it returns %TRUE. This means you only
5116  * need to override it if it is possible that your @is_writable
5117  * implementation may return %TRUE when the stream is not actually
5118  * writable.
5119  *
5120  * Since: 2.28
5121  */
5122
5123
5124 /**
5125  * GPollableSourceFunc:
5126  * @pollable_stream: the #GPollableInputStream or #GPollableOutputStream
5127  * @user_data: data passed in by the user.
5128  *
5129  * This is the function type of the callback used for the #GSource
5130  * returned by g_pollable_input_stream_create_source() and
5131  * g_pollable_output_stream_create_source().
5132  *
5133  * Returns: it should return %FALSE if the source should be removed.
5134  * Since: 2.28
5135  */
5136
5137
5138 /**
5139  * GPrintFunc:
5140  * @string: the message to output
5141  *
5142  * Specifies the type of the print handler functions.
5143  * These are called with the complete formatted string to output.
5144  */
5145
5146
5147 /**
5148  * GProxy:
5149  *
5150  * Interface that handles proxy connection and payload.
5151  *
5152  * Since: 2.26
5153  */
5154
5155
5156 /**
5157  * GProxyAddress:
5158  *
5159  * A #GInetSocketAddress representing a connection via a proxy server
5160  *
5161  * Since: 2.26
5162  */
5163
5164
5165 /**
5166  * GProxyAddressEnumerator:
5167  *
5168  * A subclass of #GSocketAddressEnumerator that takes another address
5169  * enumerator and wraps its results in #GProxyAddress<!-- -->es as
5170  * directed by the default #GProxyResolver.
5171  */
5172
5173
5174 /**
5175  * GProxyInterface:
5176  * @g_iface: The parent interface.
5177  * @connect: Connect to proxy server and wrap (if required) the #connection to handle payload.
5178  * @connect_async: Same has connect() but asynchronous.
5179  * @connect_finish: Returns the result of connect_async()
5180  *
5181  * Provides an interface for handling proxy connection and payload.
5182  *
5183  * Since: 2.26
5184  */
5185
5186
5187 /**
5188  * GProxyResolver:
5189  *
5190  * Interface that can be used to resolve proxy address.
5191  */
5192
5193
5194 /**
5195  * GQueue:
5196  * @head: a pointer to the first element of the queue
5197  * @tail: a pointer to the last element of the queue
5198  * @length: the number of elements in the queue
5199  *
5200  * Contains the public fields of a
5201  * <link linkend="glib-Double-ended-Queues">Queue</link>.
5202  */
5203
5204
5205 /**
5206  * GReallocFunc:
5207  * @data: memory block to reallocate
5208  * @size: size to reallocate @data to
5209  *
5210  * Changes the size of the memory block pointed to by @data to
5211  * @size bytes.
5212  *
5213  * The function should have the same semantics as realloc().
5214  *
5215  * Returns: a pointer to the reallocated memory
5216  */
5217
5218
5219 /**
5220  * GRegex:
5221  *
5222  * A GRegex is the "compiled" form of a regular expression pattern. This
5223  * structure is opaque and its fields cannot be accessed directly.
5224  *
5225  * Since: 2.14
5226  */
5227
5228
5229 /**
5230  * GRegexCompileFlags:
5231  * @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.
5232  * @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.
5233  * @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.
5234  * @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.
5235  * @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.
5236  * @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.
5237  * @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.
5238  * @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).
5239  * @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.
5240  * @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.
5241  * @G_REGEX_NEWLINE_CR: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\r'.
5242  * @G_REGEX_NEWLINE_LF: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\n'.
5243  * @G_REGEX_NEWLINE_CRLF: Usually any newline character is recognized, if this option is set, the only recognized newline character sequence is '\r\n'.
5244  *
5245  * Flags specifying compile-time options.
5246  *
5247  * Since: 2.14
5248  */
5249
5250
5251 /**
5252  * GRegexError:
5253  * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed.
5254  * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed.
5255  * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement string.
5256  * @G_REGEX_ERROR_MATCH: The match process failed.
5257  * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. Since 2.16
5258  * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16
5259  * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16
5260  * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". Since 2.16
5261  * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" quantifier. Since 2.16
5262  * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. Since 2.16
5263  * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for character class. Since 2.16
5264  * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence in character class. Since 2.16
5265  * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. Since 2.16
5266  * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16
5267  * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", "(?&lt;" or "(?P". Since 2.16
5268  * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are supported only within a class. Since 2.16
5269  * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" without opening "(". Since 2.16
5270  * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent subpattern. Since 2.16
5271  * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. Since 2.16
5272  * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. Since 2.16
5273  * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16
5274  * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not fixed length. Since 2.16
5275  * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". Since 2.16
5276  * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains more than two branches. Since 2.16
5277  * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". Since 2.16
5278  * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. Since 2.16
5279  * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating elements are not supported. Since 2.16
5280  * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence is too large. Since 2.16
5281  * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16
5282  * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in lookbehind assertion. Since 2.16
5283  * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. Since 2.16
5284  * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator in subpattern name. Since 2.16
5285  * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have the same name. Since 2.16
5286  * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. Since 2.16
5287  * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or "\\p". Since 2.16
5288  * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long (maximum 32 characters). Since 2.16
5289  * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum 10,000). Since 2.16
5290  * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". Since 2.16
5291  * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more than one branch. Since 2.16
5292  * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. Since 2.16
5293  * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. Since 2.16
5294  * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced name or an optionally braced non-zero number. Since 2.16
5295  *
5296  * Error codes returned by regular expressions functions.
5297  *
5298  * Since: 2.14
5299  */
5300
5301
5302 /**
5303  * GRegexEvalCallback:
5304  * @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.
5305  * @result: a #GString containing the new string
5306  * @user_data: user data passed to g_regex_replace_eval()
5307  *
5308  * Specifies the type of the function passed to g_regex_replace_eval().
5309  * It is called for each occurrence of the pattern in the string passed
5310  * to g_regex_replace_eval(), and it should append the replacement to
5311  * @result.
5312  *
5313  * Returns: %FALSE to continue the replacement process, %TRUE to stop it
5314  * Since: 2.14
5315  */
5316
5317
5318 /**
5319  * GRegexMatchFlags:
5320  * @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.
5321  * @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".
5322  * @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".
5323  * @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".
5324  * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().
5325  * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when creating a new #GRegex, setting the '\r' character as line terminator.
5326  * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when creating a new #GRegex, setting the '\n' character as line terminator.
5327  * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when creating a new #GRegex, setting the '\r\n' characters as line terminator.
5328  * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when creating a new #GRegex, any newline character or character sequence is recognized.
5329  *
5330  * Flags specifying match-time options.
5331  *
5332  * Since: 2.14
5333  */
5334
5335
5336 /**
5337  * GRemoteActionGroupInterface:
5338  * @activate_action_full: the virtual function pointer for g_remote_action_group_activate_action_full()
5339  * @change_action_state_full: the virtual function pointer for g_remote_action_group_change_action_state_full()
5340  *
5341  * The virtual function table for #GRemoteActionGroup.
5342  *
5343  * Since: 2.32
5344  */
5345
5346
5347 /**
5348  * GResolver:
5349  *
5350  * The object that handles DNS resolution. Use g_resolver_get_default()
5351  * to get the default resolver.
5352  */
5353
5354
5355 /**
5356  * GResolver::reload:
5357  * @resolver: a #GResolver
5358  *
5359  * Emitted when the resolver notices that the system resolver
5360  * configuration has changed.
5361  */
5362
5363
5364 /**
5365  * GResolverError:
5366  * @G_RESOLVER_ERROR_NOT_FOUND: the requested name/address/service was not found
5367  * @G_RESOLVER_ERROR_TEMPORARY_FAILURE: the requested information could not be looked up due to a network error or similar problem
5368  * @G_RESOLVER_ERROR_INTERNAL: unknown error
5369  *
5370  * An error code used with %G_RESOLVER_ERROR in a #GError returned
5371  * from a #GResolver routine.
5372  *
5373  * Since: 2.22
5374  */
5375
5376
5377 /**
5378  * GResource:
5379  *
5380  * A resource bundle.
5381  *
5382  * Since: 2.32
5383  */
5384
5385
5386 /**
5387  * GResourceError:
5388  * @G_RESOURCE_ERROR_NOT_FOUND: no file was found at the requested path
5389  * @G_RESOURCE_ERROR_INTERNAL: unknown error
5390  *
5391  * An error code used with %G_RESOURCE_ERROR in a #GError returned
5392  * from a #GResource routine.
5393  *
5394  * Since: 2.32
5395  */
5396
5397
5398 /**
5399  * GResourceFlags:
5400  * @G_RESOURCE_FLAGS_NONE: No flags set.
5401  * @G_RESOURCE_FLAGS_COMPRESSED: The file is compressed.
5402  *
5403  * GResourceFlags give information about a particular file inside a resource
5404  * bundle.
5405  *
5406  * Since: 2.32
5407  */
5408
5409
5410 /**
5411  * GResourceLookupFlags:
5412  * @G_RESOURCE_LOOKUP_FLAGS_NONE: No flags set.
5413  *
5414  * GResourceLookupFlags determine how resource path lookups are handled.
5415  *
5416  * Since: 2.32
5417  */
5418
5419
5420 /**
5421  * GSeekable:
5422  *
5423  * Seek object for streaming operations.
5424  */
5425
5426
5427 /**
5428  * GSeekableIface:
5429  * @g_iface: The parent interface.
5430  * @tell: Tells the current location within a stream.
5431  * @can_seek: Checks if seeking is supported by the stream.
5432  * @seek: Seeks to a location within a stream.
5433  * @can_truncate: Chekcs if truncation is suppored by the stream.
5434  * @truncate_fn: Truncates a stream.
5435  *
5436  * Provides an interface for implementing seekable functionality on I/O Streams.
5437  */
5438
5439
5440 /**
5441  * GSettings::change-event:
5442  * @settings: the object on which the signal was emitted
5443  * @keys: (array length=n_keys) (element-type GQuark) (allow-none):  an array of #GQuark<!-- -->s for the changed keys, or %NULL
5444  * @n_keys: the length of the @keys array, or 0
5445  *
5446  * The "change-event" signal is emitted once per change event that
5447  * affects this settings object.  You should connect to this signal
5448  * only if you are interested in viewing groups of changes before they
5449  * are split out into multiple emissions of the "changed" signal.
5450  * For most use cases it is more appropriate to use the "changed" signal.
5451  *
5452  * In the event that the change event applies to one or more specified
5453  * keys, @keys will be an array of #GQuark of length @n_keys.  In the
5454  * event that the change event applies to the #GSettings object as a
5455  * whole (ie: potentially every key has been changed) then @keys will
5456  * be %NULL and @n_keys will be 0.
5457  *
5458  * The default handler for this signal invokes the "changed" signal
5459  * for each affected key.  If any other connected handler returns
5460  * %TRUE then this default functionality will be suppressed.
5461  *
5462  * event. FALSE to propagate the event further.
5463  *
5464  * Returns: %TRUE to stop other handlers from being invoked for the
5465  */
5466
5467
5468 /**
5469  * GSettings::changed:
5470  * @settings: the object on which the signal was emitted
5471  * @key: the name of the key that changed
5472  *
5473  * The "changed" signal is emitted when a key has potentially changed.
5474  * You should call one of the g_settings_get() calls to check the new
5475  * value.
5476  *
5477  * This signal supports detailed connections.  You can connect to the
5478  * detailed signal "changed::x" in order to only receive callbacks
5479  * when key "x" changes.
5480  */
5481
5482
5483 /**
5484  * GSettings::writable-change-event:
5485  * @settings: the object on which the signal was emitted
5486  * @key: the quark of the key, or 0
5487  *
5488  * The "writable-change-event" signal is emitted once per writability
5489  * change event that affects this settings object.  You should connect
5490  * to this signal if you are interested in viewing groups of changes
5491  * before they are split out into multiple emissions of the
5492  * "writable-changed" signal.  For most use cases it is more
5493  * appropriate to use the "writable-changed" signal.
5494  *
5495  * In the event that the writability change applies only to a single
5496  * key, @key will be set to the #GQuark for that key.  In the event
5497  * that the writability change affects the entire settings object,
5498  * @key will be 0.
5499  *
5500  * The default handler for this signal invokes the "writable-changed"
5501  * and "changed" signals for each affected key.  This is done because
5502  * changes in writability might also imply changes in value (if for
5503  * example, a new mandatory setting is introduced).  If any other
5504  * connected handler returns %TRUE then this default functionality
5505  * will be suppressed.
5506  *
5507  * event. FALSE to propagate the event further.
5508  *
5509  * Returns: %TRUE to stop other handlers from being invoked for the
5510  */
5511
5512
5513 /**
5514  * GSettings::writable-changed:
5515  * @settings: the object on which the signal was emitted
5516  * @key: the key
5517  *
5518  * The "writable-changed" signal is emitted when the writability of a
5519  * key has potentially changed.  You should call
5520  * g_settings_is_writable() in order to determine the new status.
5521  *
5522  * This signal supports detailed connections.  You can connect to the
5523  * detailed signal "writable-changed::x" in order to only receive
5524  * callbacks when the writability of "x" changes.
5525  */
5526
5527
5528 /**
5529  * GSettings:context:
5530  *
5531  * The name of the context that the settings are stored in.
5532  */
5533
5534
5535 /**
5536  * GSettings:delay-apply:
5537  *
5538  * Whether the #GSettings object is in 'delay-apply' mode. See
5539  * g_settings_delay() for details.
5540  *
5541  * Since: 2.28
5542  */
5543
5544
5545 /**
5546  * GSettings:has-unapplied:
5547  *
5548  * If this property is %TRUE, the #GSettings object has outstanding
5549  * changes that will be applied when g_settings_apply() is called.
5550  */
5551
5552
5553 /**
5554  * GSettings:path:
5555  *
5556  * The path within the backend where the settings are stored.
5557  */
5558
5559
5560 /**
5561  * GSettings:schema:
5562  *
5563  * The name of the schema that describes the types of keys
5564  * for this #GSettings object.
5565  *
5566  * The type of this property is *not* #GSettingsSchema.
5567  * #GSettingsSchema has only existed since version 2.32 and
5568  * unfortunately this name was used in previous versions to refer to
5569  * the schema ID rather than the schema itself.  Take care to use the
5570  * 'settings-schema' property if you wish to pass in a
5571  * #GSettingsSchema.
5572  *
5573  * Deprecated:2.32:Use the 'schema-id' property instead.  In a future
5574  * version, this property may instead refer to a #GSettingsSchema.
5575  */
5576
5577
5578 /**
5579  * GSettings:schema-id:
5580  *
5581  * The name of the schema that describes the types of keys
5582  * for this #GSettings object.
5583  */
5584
5585
5586 /**
5587  * GSettings:settings-schema:
5588  *
5589  * The #GSettingsSchema describing the types of keys for this
5590  * #GSettings object.
5591  *
5592  * Ideally, this property would be called 'schema'.  #GSettingsSchema
5593  * has only existed since version 2.32, however, and before then the
5594  * 'schema' property was used to refer to the ID of the schema rather
5595  * than the schema itself.  Take care.
5596  */
5597
5598
5599 /**
5600  * GSettingsBackend:
5601  *
5602  * An implementation of a settings storage repository.
5603  */
5604
5605
5606 /**
5607  * GSettingsBindFlags:
5608  * @G_SETTINGS_BIND_DEFAULT: Equivalent to <literal>G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET</literal>
5609  * @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.
5610  * @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.
5611  * @G_SETTINGS_BIND_NO_SENSITIVITY: Do not try to bind a "sensitivity" property to the writability of the setting
5612  * @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
5613  * @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().
5614  *
5615  * Flags used when creating a binding. These flags determine in which
5616  * direction the binding works. The default is to synchronize in both
5617  * directions.
5618  */
5619
5620
5621 /**
5622  * GSettingsBindGetMapping:
5623  * @value: return location for the property value
5624  * @variant: the #GVariant
5625  * @user_data: user data that was specified when the binding was created
5626  *
5627  * The type for the function that is used to convert from #GSettings to
5628  * an object property. The @value is already initialized to hold values
5629  * of the appropriate type.
5630  *
5631  * Returns: %TRUE if the conversion succeeded, %FALSE in case of an error
5632  */
5633
5634
5635 /**
5636  * GSettingsBindSetMapping:
5637  * @value: a #GValue containing the property value to map
5638  * @expected_type: the #GVariantType to create
5639  * @user_data: user data that was specified when the binding was created
5640  *
5641  * The type for the function that is used to convert an object property
5642  * value to a #GVariant for storing it in #GSettings.
5643  *
5644  * or %NULL in case of an error
5645  *
5646  * Returns: a new #GVariant holding the data from @value,
5647  */
5648
5649
5650 /**
5651  * GSettingsGetMapping:
5652  * @value: the #GVariant to map, or %NULL
5653  * @result: (out): the result of the mapping
5654  * @user_data: (closure): the user data that was passed to g_settings_get_mapped()
5655  *
5656  * The type of the function that is used to convert from a value stored
5657  * in a #GSettings to a value that is useful to the application.
5658  *
5659  * If the value is successfully mapped, the result should be stored at
5660  * @result and %TRUE returned.  If mapping fails (for example, if @value
5661  * is not in the right format) then %FALSE should be returned.
5662  *
5663  * If @value is %NULL then it means that the mapping function is being
5664  * given a "last chance" to successfully return a valid value.  %TRUE
5665  * must be returned in this case.
5666  *
5667  * Returns: %TRUE if the conversion succeeded, %FALSE in case of an error
5668  */
5669
5670
5671 /**
5672  * GSettingsSchema:
5673  *
5674  * This is an opaque structure type.  You may not access it directly.
5675  *
5676  * Since: 2.32
5677  */
5678
5679
5680 /**
5681  * GSettingsSchemaSource:
5682  *
5683  * This is an opaque structure type.  You may not access it directly.
5684  *
5685  * Since: 2.32
5686  */
5687
5688
5689 /**
5690  * GSignalAccumulator:
5691  * @ihint: Signal invocation hint, see #GSignalInvocationHint.
5692  * @return_accu: Accumulator to collect callback return values in, this is the return value of the current signal emission.
5693  * @handler_return: A #GValue holding the return value of the signal handler.
5694  * @data: Callback data that was specified when creating the signal.
5695  *
5696  * The signal accumulator is a special callback function that can be used
5697  * to collect return values of the various callbacks that are called
5698  * during a signal emission. The signal accumulator is specified at signal
5699  * creation time, if it is left %NULL, no accumulation of callback return
5700  * values is performed. The return value of signal emissions is then the
5701  * value returned by the last callback.
5702  *
5703  * should be aborted. Returning %FALSE means to abort the
5704  * current emission and %TRUE is returned for continuation.
5705  *
5706  * Returns: The accumulator function returns whether the signal emission
5707  */
5708
5709
5710 /**
5711  * GSignalCMarshaller:
5712  *
5713  * This is the signature of marshaller functions, required to marshall
5714  * arrays of parameter values to signal emissions into C language callback
5715  * invocations. It is merely an alias to #GClosureMarshal since the #GClosure
5716  * mechanism takes over responsibility of actual function invocation for the
5717  * signal system.
5718  */
5719
5720
5721 /**
5722  * GSignalEmissionHook:
5723  * @ihint: Signal invocation hint, see #GSignalInvocationHint.
5724  * @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
5725  * @param_values: (array length=n_param_values): the instance on which the signal was emitted, followed by the parameters of the emission.
5726  * @data: user data associated with the hook.
5727  *
5728  * A simple function pointer to get invoked when the signal is emitted. This
5729  * allows you to tie a hook to the signal type, so that it will trap all
5730  * emissions of that signal, from any object.
5731  *
5732  * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
5733  *
5734  * hook is disconnected (and destroyed).
5735  *
5736  * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
5737  */
5738
5739
5740 /**
5741  * GSignalFlags:
5742  * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage.
5743  * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage.
5744  * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage.
5745  * @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.
5746  * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name upon handler connections and emissions.
5747  * @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.
5748  * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
5749  * @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the arguments, even if there are no signal handlers connected.  Since 2.30.
5750  * @G_SIGNAL_DEPRECATED: The signal is deprecated and will be removed in a future version. A warning will be generated if it is connected while running with G_ENABLE_DIAGNOSTIC=1.  Since 2.32.
5751  *
5752  * The signal flags are used to specify a signal's behaviour, the overall
5753  * signal description outlines how especially the RUN flags control the
5754  * stages of a signal emission.
5755  */
5756
5757
5758 /**
5759  * GSignalInvocationHint:
5760  * @signal_id: The signal id of the signal invoking the callback
5761  * @detail: The detail passed on for this emission
5762  * @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.
5763  *
5764  * The #GSignalInvocationHint structure is used to pass on additional information
5765  * to callbacks during a signal emission.
5766  */
5767
5768
5769 /**
5770  * GSignalMatchType:
5771  * @G_SIGNAL_MATCH_ID: The signal id must be equal.
5772  * @G_SIGNAL_MATCH_DETAIL: The signal detail be equal.
5773  * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same.
5774  * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same.
5775  * @G_SIGNAL_MATCH_DATA: The closure data must be the same.
5776  * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may matched.
5777  *
5778  * The match types specify what g_signal_handlers_block_matched(),
5779  * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
5780  * match signals by.
5781  */
5782
5783
5784 /**
5785  * GSignalQuery:
5786  * @signal_id: The signal id of the signal being queried, or 0 if the signal to be queried was unknown.
5787  * @signal_name: The signal name.
5788  * @itype: The interface/instance type that this signal can be emitted for.
5789  * @signal_flags: The signal flags as passed in to g_signal_new().
5790  * @return_type: The return type for user callbacks.
5791  * @n_params: The number of parameters that user callbacks take.
5792  * @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>
5793  *
5794  * A structure holding in-depth information for a specific signal. It is
5795  * filled in by the g_signal_query() function.
5796  */
5797
5798
5799 /**
5800  * GSimpleAction::activate:
5801  * @simple: the #GSimpleAction
5802  * @parameter: (allow-none): the parameter to the activation
5803  *
5804  * Indicates that the action was just activated.
5805  *
5806  * @parameter will always be of the expected type.  In the event that
5807  * an incorrect type was given, no signal will be emitted.
5808  *
5809  * Since: 2.28
5810  */
5811
5812
5813 /**
5814  * GSimpleAction::change-state:
5815  * @simple: the #GSimpleAction
5816  * @value: (allow-none): the requested value for the state
5817  *
5818  * Indicates that the action just received a request to change its
5819  * state.
5820  *
5821  * @value will always be of the correct state type.  In the event that
5822  * an incorrect type was given, no signal will be emitted.
5823  *
5824  * If no handler is connected to this signal then the default
5825  * behaviour is to call g_simple_action_set_state() to set the state
5826  * to the requested value.  If you connect a signal handler then no
5827  * default action is taken.  If the state should change then you must
5828  * call g_simple_action_set_state() from the handler.
5829  *
5830  * <example>
5831  * <title>Example 'change-state' handler</title>
5832  * <programlisting>
5833  * static void
5834  * change_volume_state (GSimpleAction *action,
5835  * GVariant      *value,
5836  * gpointer       user_data)
5837  * {
5838  * gint requested;
5839  *
5840  * requested = g_variant_get_int32 (value);
5841  *
5842  * // Volume only goes from 0 to 10
5843  * if (0 <= requested && requested <= 10)
5844  * g_simple_action_set_state (action, value);
5845  * }
5846  * </programlisting>
5847  * </example>
5848  *
5849  * The handler need not set the state to the requested value.  It
5850  * could set it to any value at all, or take some other action.
5851  *
5852  * Since: 2.30
5853  */
5854
5855
5856 /**
5857  * GSimpleAction:enabled:
5858  *
5859  * If @action is currently enabled.
5860  *
5861  * If the action is disabled then calls to g_action_activate() and
5862  * g_action_change_state() have no effect.
5863  *
5864  * Since: 2.28
5865  */
5866
5867
5868 /**
5869  * GSimpleAction:name:
5870  *
5871  * The name of the action.  This is mostly meaningful for identifying
5872  * the action once it has been added to a #GSimpleActionGroup.
5873  *
5874  * Since: 2.28
5875  */
5876
5877
5878 /**
5879  * GSimpleAction:parameter-type:
5880  *
5881  * The type of the parameter that must be given when activating the
5882  * action.
5883  *
5884  * Since: 2.28
5885  */
5886
5887
5888 /**
5889  * GSimpleAction:state:
5890  *
5891  * The state of the action, or %NULL if the action is stateless.
5892  *
5893  * Since: 2.28
5894  */
5895
5896
5897 /**
5898  * GSimpleAction:state-type:
5899  *
5900  * The #GVariantType of the state that the action has, or %NULL if the
5901  * action is stateless.
5902  *
5903  * Since: 2.28
5904  */
5905
5906
5907 /**
5908  * GSimpleActionGroup:
5909  *
5910  * The #GSimpleActionGroup structure contains private data and should only be accessed using the provided API.
5911  *
5912  * Since: 2.28
5913  */
5914
5915
5916 /**
5917  * GSimpleAsyncResult:
5918  *
5919  * A simple implementation of #GAsyncResult.
5920  */
5921
5922
5923 /**
5924  * GSimpleAsyncThreadFunc:
5925  * @res: a #GSimpleAsyncResult.
5926  * @object: a #GObject.
5927  * @cancellable: optional #GCancellable object, %NULL to ignore.
5928  *
5929  * Simple thread function that runs an asynchronous operation and
5930  * checks for cancellation.
5931  */
5932
5933
5934 /**
5935  * GSimplePermission:
5936  *
5937  * #GSimplePermission is an opaque data structure.  There are no methods
5938  * except for those defined by #GPermission.
5939  */
5940
5941
5942 /**
5943  * GSocket:
5944  *
5945  * A lowlevel network socket object.
5946  *
5947  * Since: 2.22
5948  */
5949
5950
5951 /**
5952  * GSocket:broadcast:
5953  *
5954  * Whether the socket should allow sending to and receiving from broadcast addresses.
5955  *
5956  * Since: 2.32
5957  */
5958
5959
5960 /**
5961  * GSocket:multicast-loopback:
5962  *
5963  * Whether outgoing multicast packets loop back to the local host.
5964  *
5965  * Since: 2.32
5966  */
5967
5968
5969 /**
5970  * GSocket:multicast-ttl:
5971  *
5972  * Time-to-live out outgoing multicast packets
5973  *
5974  * Since: 2.32
5975  */
5976
5977
5978 /**
5979  * GSocket:timeout:
5980  *
5981  * The timeout in seconds on socket I/O
5982  *
5983  * Since: 2.26
5984  */
5985
5986
5987 /**
5988  * GSocket:ttl:
5989  *
5990  * Time-to-live for outgoing unicast packets
5991  *
5992  * Since: 2.32
5993  */
5994
5995
5996 /**
5997  * GSocketAddress:
5998  *
5999  * A socket endpoint address, corresponding to <type>struct sockaddr</type>
6000  * or one of its subtypes.
6001  */
6002
6003
6004 /**
6005  * GSocketAddressEnumerator:
6006  *
6007  * Enumerator type for objects that contain or generate
6008  * #GSocketAddress<!-- -->es.
6009  */
6010
6011
6012 /**
6013  * GSocketClient:
6014  *
6015  * A helper class for network servers to listen for and accept connections.
6016  *
6017  * Since: 2.22
6018  */
6019
6020
6021 /**
6022  * GSocketClient::event:
6023  * @client: the #GSocketClient
6024  * @event: the event that is occurring
6025  * @connectable: the #GSocketConnectable that @event is occurring on
6026  * @connection: the current representation of the connection
6027  *
6028  * Emitted when @client's activity on @connectable changes state.
6029  * Among other things, this can be used to provide progress
6030  * information about a network connection in the UI. The meanings of
6031  * the different @event values are as follows:
6032  *
6033  * <variablelist>
6034  * <varlistentry>
6035  * <term>%G_SOCKET_CLIENT_RESOLVING:</term>
6036  * <listitem><para>
6037  * @client is about to look up @connectable in DNS.
6038  * @connection will be %NULL.
6039  * </para></listitem>
6040  * </varlistentry>
6041  * <varlistentry>
6042  * <term>%G_SOCKET_CLIENT_RESOLVED:</term>
6043  * <listitem><para>
6044  * @client has successfully resolved @connectable in DNS.
6045  * @connection will be %NULL.
6046  * </para></listitem>
6047  * </varlistentry>
6048  * <varlistentry>
6049  * <term>%G_SOCKET_CLIENT_CONNECTING:</term>
6050  * <listitem><para>
6051  * @client is about to make a connection to a remote host;
6052  * either a proxy server or the destination server itself.
6053  * @connection is the #GSocketConnection, which is not yet
6054  * connected.
6055  * </para></listitem>
6056  * </varlistentry>
6057  * <varlistentry>
6058  * <term>%G_SOCKET_CLIENT_CONNECTED:</term>
6059  * <listitem><para>
6060  * @client has successfully connected to a remote host.
6061  * @connection is the connected #GSocketConnection.
6062  * </para></listitem>
6063  * </varlistentry>
6064  * <varlistentry>
6065  * <term>%G_SOCKET_CLIENT_PROXY_NEGOTIATING:</term>
6066  * <listitem><para>
6067  * @client is about to negotiate with a proxy to get it to
6068  * connect to @connectable. @connection is the
6069  * #GSocketConnection to the proxy server.
6070  * </para></listitem>
6071  * </varlistentry>
6072  * <varlistentry>
6073  * <term>%G_SOCKET_CLIENT_PROXY_NEGOTIATED:</term>
6074  * <listitem><para>
6075  * @client has negotiated a connection to @connectable through
6076  * a proxy server. @connection is the stream returned from
6077  * g_proxy_connect(), which may or may not be a
6078  * #GSocketConnection.
6079  * </para></listitem>
6080  * </varlistentry>
6081  * <varlistentry>
6082  * <term>%G_SOCKET_CLIENT_TLS_HANDSHAKING:</term>
6083  * <listitem><para>
6084  * @client is about to begin a TLS handshake. @connection is a
6085  * #GTlsClientConnection.
6086  * </para></listitem>
6087  * </varlistentry>
6088  * <varlistentry>
6089  * <term>%G_SOCKET_CLIENT_TLS_HANDSHAKED:</term>
6090  * <listitem><para>
6091  * @client has successfully completed the TLS handshake.
6092  * @connection is a #GTlsClientConnection.
6093  * </para></listitem>
6094  * </varlistentry>
6095  * <varlistentry>
6096  * <term>%G_SOCKET_CLIENT_COMPLETE:</term>
6097  * <listitem><para>
6098  * @client has either successfully connected to @connectable
6099  * (in which case @connection is the #GSocketConnection that
6100  * it will be returning to the caller) or has failed (in which
6101  * case @connection is %NULL and the client is about to return
6102  * an error).
6103  * </para></listitem>
6104  * </varlistentry>
6105  * </variablelist>
6106  *
6107  * Each event except %G_SOCKET_CLIENT_COMPLETE may be emitted
6108  * multiple times (or not at all) for a given connectable (in
6109  * particular, if @client ends up attempting to connect to more than
6110  * one address). However, if @client emits the #GSocketClient:event
6111  * signal at all for a given connectable, that it will always emit
6112  * it with %G_SOCKET_CLIENT_COMPLETE when it is done.
6113  *
6114  * Note that there may be additional #GSocketClientEvent values in
6115  * the future; unrecognized @event values should be ignored.
6116  *
6117  * Since: 2.32
6118  */
6119
6120
6121 /**
6122  * GSocketClientEvent:
6123  * @G_SOCKET_CLIENT_RESOLVING: The client is doing a DNS lookup.
6124  * @G_SOCKET_CLIENT_RESOLVED: The client has completed a DNS lookup.
6125  * @G_SOCKET_CLIENT_CONNECTING: The client is connecting to a remote host (either a proxy or the destination server).
6126  * @G_SOCKET_CLIENT_CONNECTED: The client has connected to a remote host.
6127  * @G_SOCKET_CLIENT_PROXY_NEGOTIATING: The client is negotiating with a proxy to connect to the destination server.
6128  * @G_SOCKET_CLIENT_PROXY_NEGOTIATED: The client has negotiated with the proxy server.
6129  * @G_SOCKET_CLIENT_TLS_HANDSHAKING: The client is performing a TLS handshake.
6130  * @G_SOCKET_CLIENT_TLS_HANDSHAKED: The client has performed a TLS handshake.
6131  * @G_SOCKET_CLIENT_COMPLETE: The client is done with a particular #GSocketConnectable.
6132  *
6133  * Describes an event occurring on a #GSocketClient. See the
6134  * #GSocketClient::event signal for more details.
6135  *
6136  * Additional values may be added to this type in the future.
6137  *
6138  * Since: 2.32
6139  */
6140
6141
6142 /**
6143  * GSocketConnectable:
6144  *
6145  * Interface for objects that contain or generate #GSocketAddress<!-- -->es.
6146  */
6147
6148
6149 /**
6150  * GSocketConnectableIface:
6151  * @g_iface: The parent interface.
6152  * @enumerate: Creates a #GSocketAddressEnumerator
6153  * @proxy_enumerate: Creates a #GProxyAddressEnumerator
6154  *
6155  * Provides an interface for returning a #GSocketAddressEnumerator
6156  * and #GProxyAddressEnumerator
6157  */
6158
6159
6160 /**
6161  * GSocketConnection:
6162  *
6163  * A socket connection GIOStream object for connection-oriented sockets.
6164  *
6165  * Since: 2.22
6166  */
6167
6168
6169 /**
6170  * GSocketControlMessage:
6171  *
6172  * Base class for socket-type specific control messages that can be sent and
6173  * received over #GSocket.
6174  */
6175
6176
6177 /**
6178  * GSocketControlMessageClass:
6179  * @get_size: gets the size of the message.
6180  * @get_level: gets the protocol of the message.
6181  * @get_type: gets the protocol specific type of the message.
6182  * @serialize: Writes out the message data.
6183  * @deserialize: Tries to deserialize a message.
6184  *
6185  *
6186  */
6187
6188
6189 /**
6190  * GSocketFamily:
6191  * @G_SOCKET_FAMILY_INVALID: no address family
6192  * @G_SOCKET_FAMILY_IPV4: the IPv4 family
6193  * @G_SOCKET_FAMILY_IPV6: the IPv6 family
6194  * @G_SOCKET_FAMILY_UNIX: the UNIX domain family
6195  *
6196  * The protocol family of a #GSocketAddress. (These values are
6197  * identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX,
6198  * if available.)
6199  *
6200  * Since: 2.22
6201  */
6202
6203
6204 /**
6205  * GSocketListenerClass:
6206  * @changed: virtual method called when the set of socket listened to changes
6207  *
6208  *
6209  */
6210
6211
6212 /**
6213  * GSocketMsgFlags:
6214  * @G_SOCKET_MSG_NONE: No flags.
6215  * @G_SOCKET_MSG_OOB: Request to send/receive out of band data.
6216  * @G_SOCKET_MSG_PEEK: Read data from the socket without removing it from the queue.
6217  * @G_SOCKET_MSG_DONTROUTE: Don't use a gateway to send out the packet, only send to hosts on directly connected networks.
6218  *
6219  * Flags used in g_socket_receive_message() and g_socket_send_message().
6220  * The flags listed in the enum are some commonly available flags, but the
6221  * values used for them are the same as on the platform, and any other flags
6222  * are passed in/out as is. So to use a platform specific flag, just include
6223  * the right system header and pass in the flag.
6224  *
6225  * Since: 2.22
6226  */
6227
6228
6229 /**
6230  * GSocketProtocol:
6231  * @G_SOCKET_PROTOCOL_UNKNOWN: The protocol type is unknown
6232  * @G_SOCKET_PROTOCOL_DEFAULT: The default protocol for the family/type
6233  * @G_SOCKET_PROTOCOL_TCP: TCP over IP
6234  * @G_SOCKET_PROTOCOL_UDP: UDP over IP
6235  * @G_SOCKET_PROTOCOL_SCTP: SCTP over IP
6236  *
6237  * A protocol identifier is specified when creating a #GSocket, which is a
6238  * family/type specific identifier, where 0 means the default protocol for
6239  * the particular family/type.
6240  *
6241  * This enum contains a set of commonly available and used protocols. You
6242  * can also pass any other identifiers handled by the platform in order to
6243  * use protocols not listed here.
6244  *
6245  * Since: 2.22
6246  */
6247
6248
6249 /**
6250  * GSocketService:
6251  *
6252  * A helper class for handling accepting incomming connections in the
6253  * glib mainloop.
6254  *
6255  * Since: 2.22
6256  */
6257
6258
6259 /**
6260  * GSocketService::incoming:
6261  * @service: the #GSocketService
6262  * @connection: a new #GSocketConnection object
6263  * @source_object: (allow-none): the source_object passed to g_socket_listener_add_address()
6264  *
6265  * The ::incoming signal is emitted when a new incoming connection
6266  * to @service needs to be handled. The handler must initiate the
6267  * handling of @connection, but may not block; in essence,
6268  * asynchronous operations must be used.
6269  *
6270  * @connection will be unreffed once the signal handler returns,
6271  * so you need to ref it yourself if you are planning to use it.
6272  *
6273  * Returns: %TRUE to stop other handlers from being called
6274  * Since: 2.22
6275  */
6276
6277
6278 /**
6279  * GSocketServiceClass:
6280  * @incomming: signal emitted when new connections are accepted
6281  *
6282  *
6283  */
6284
6285
6286 /**
6287  * GSocketSourceFunc:
6288  * @socket: the #GSocket
6289  * @condition: the current condition at the source fired.
6290  * @user_data: data passed in by the user.
6291  *
6292  * This is the function type of the callback used for the #GSource
6293  * returned by g_socket_create_source().
6294  *
6295  * Returns: it should return %FALSE if the source should be removed.
6296  * Since: 2.22
6297  */
6298
6299
6300 /**
6301  * GSocketType:
6302  * @G_SOCKET_TYPE_INVALID: Type unknown or wrong
6303  * @G_SOCKET_TYPE_STREAM: Reliable connection-based byte streams (e.g. TCP).
6304  * @G_SOCKET_TYPE_DATAGRAM: Connectionless, unreliable datagram passing. (e.g. UDP)
6305  * @G_SOCKET_TYPE_SEQPACKET: Reliable connection-based passing of datagrams of fixed maximum length (e.g. SCTP).
6306  *
6307  * Flags used when creating a #GSocket. Some protocols may not implement
6308  * all the socket types.
6309  *
6310  * Since: 2.22
6311  */
6312
6313
6314 /**
6315  * GSource:
6316  *
6317  * The <structname>GSource</structname> struct is an opaque data type
6318  * representing an event source.
6319  */
6320
6321
6322 /**
6323  * GSourceCallbackFuncs:
6324  * @ref: Called when a reference is added to the callback object
6325  * @unref: Called when a reference to the callback object is dropped
6326  * @get: Called to extract the callback function and data from the callback object. The <structname>GSourceCallbackFuncs</structname> struct contains functions for managing callback objects.
6327  *
6328  *
6329  */
6330
6331
6332 /**
6333  * GSourceDummyMarshal:
6334  *
6335  * This is just a placeholder for #GClosureMarshal,
6336  * which cannot be used here for dependency reasons.
6337  */
6338
6339
6340 /**
6341  * GSourceFunc:
6342  * @user_data: data passed to the function, set when the source was created with one of the above functions
6343  *
6344  * Specifies the type of function passed to g_timeout_add(),
6345  * g_timeout_add_full(), g_idle_add(), and g_idle_add_full().
6346  *
6347  * Returns: %FALSE if the source should be removed
6348  */
6349
6350
6351 /**
6352  * GSourceFuncs:
6353  * @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.
6354  * @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.
6355  * @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.
6356  * @finalize: Called when the source is finalized.
6357  *
6358  * The <structname>GSourceFuncs</structname> struct contains a table of
6359  * functions used to handle event sources in a generic manner.
6360  *
6361  * For idle sources, the prepare and check functions always return %TRUE
6362  * to indicate that the source is always ready to be processed. The prepare
6363  * function also returns a timeout value of 0 to ensure that the poll() call
6364  * doesn't block (since that would be time wasted which could have been spent
6365  * running the idle function).
6366  *
6367  * For timeout sources, the prepare and check functions both return %TRUE
6368  * if the timeout interval has expired. The prepare function also returns
6369  * a timeout value to ensure that the poll() call doesn't block too long
6370  * and miss the next timeout.
6371  *
6372  * For file descriptor sources, the prepare function typically returns %FALSE,
6373  * since it must wait until poll() has been called before it knows whether
6374  * any events need to be processed. It sets the returned timeout to -1 to
6375  * indicate that it doesn't mind how long the poll() call blocks. In the
6376  * check function, it tests the results of the poll() call to see if the
6377  * required condition has been met, and returns %TRUE if so.
6378  */
6379
6380
6381 /**
6382  * GSpawnChildSetupFunc:
6383  * @user_data: user data to pass to the function.
6384  *
6385  * Specifies the type of the setup function passed to g_spawn_async(),
6386  * g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very
6387  * limited ways, be used to affect the child's execution.
6388  *
6389  * On POSIX platforms, the function is called in the child after GLib
6390  * has performed all the setup it plans to perform, but before calling
6391  * exec(). Actions taken in this function will only affect the child,
6392  * not the parent.
6393  *
6394  * On Windows, the function is called in the parent. Its usefulness on
6395  * Windows is thus questionable. In many cases executing the child setup
6396  * function in the parent can have ill effects, and you should be very
6397  * careful when porting software to Windows that uses child setup
6398  * functions.
6399  *
6400  * However, even on POSIX, you are extremely limited in what you can
6401  * safely do from a #GSpawnChildSetupFunc, because any mutexes that
6402  * were held by other threads in the parent process at the time of the
6403  * fork() will still be locked in the child process, and they will
6404  * never be unlocked (since the threads that held them don't exist in
6405  * the child). POSIX allows only async-signal-safe functions (see
6406  * <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>)
6407  * to be called in the child between fork() and exec(), which
6408  * drastically limits the usefulness of child setup functions.
6409  *
6410  * In particular, it is not safe to call any function which may
6411  * call malloc(), which includes POSIX functions such as setenv().
6412  * If you need to set up the child environment differently from
6413  * the parent, you should use g_get_environ(), g_environ_setenv(),
6414  * and g_environ_unsetenv(), and then pass the complete environment
6415  * list to the <literal>g_spawn...</literal> function.
6416  */
6417
6418
6419 /**
6420  * GSpawnError:
6421  * @G_SPAWN_ERROR_FORK: Fork failed due to lack of memory.
6422  * @G_SPAWN_ERROR_READ: Read or select on pipes failed.
6423  * @G_SPAWN_ERROR_CHDIR: Changing to working directory failed.
6424  * @G_SPAWN_ERROR_ACCES: execv() returned <literal>EACCES</literal>
6425  * @G_SPAWN_ERROR_PERM: execv() returned <literal>EPERM</literal>
6426  * @G_SPAWN_ERROR_2BIG: execv() returned <literal>E2BIG</literal>
6427  * @G_SPAWN_ERROR_NOEXEC: execv() returned <literal>ENOEXEC</literal>
6428  * @G_SPAWN_ERROR_NAMETOOLONG: execv() returned <literal>ENAMETOOLONG</literal>
6429  * @G_SPAWN_ERROR_NOENT: execv() returned <literal>ENOENT</literal>
6430  * @G_SPAWN_ERROR_NOMEM: execv() returned <literal>ENOMEM</literal>
6431  * @G_SPAWN_ERROR_NOTDIR: execv() returned <literal>ENOTDIR</literal>
6432  * @G_SPAWN_ERROR_LOOP: execv() returned <literal>ELOOP</literal>
6433  * @G_SPAWN_ERROR_TXTBUSY: execv() returned <literal>ETXTBUSY</literal>
6434  * @G_SPAWN_ERROR_IO: execv() returned <literal>EIO</literal>
6435  * @G_SPAWN_ERROR_NFILE: execv() returned <literal>ENFILE</literal>
6436  * @G_SPAWN_ERROR_MFILE: execv() returned <literal>EMFILE</literal>
6437  * @G_SPAWN_ERROR_INVAL: execv() returned <literal>EINVAL</literal>
6438  * @G_SPAWN_ERROR_ISDIR: execv() returned <literal>EISDIR</literal>
6439  * @G_SPAWN_ERROR_LIBBAD: execv() returned <literal>ELIBBAD</literal>
6440  * @G_SPAWN_ERROR_FAILED: Some other fatal failure, <literal>error-&gt;message</literal> should explain.
6441  *
6442  * Error codes returned by spawning processes.
6443  */
6444
6445
6446 /**
6447  * GSpawnFlags:
6448  * @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.
6449  * @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.
6450  * @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>.
6451  * @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.
6452  * @G_SPAWN_STDERR_TO_DEV_NULL: the child's standard error will be discarded.
6453  * @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>).
6454  * @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.
6455  *
6456  * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes().
6457  */
6458
6459
6460 /**
6461  * GSrvTarget:
6462  *
6463  * A single target host/port that a network service is running on.
6464  */
6465
6466
6467 /**
6468  * GStrv:
6469  *
6470  * A C representable type name for #G_TYPE_STRV.
6471  */
6472
6473
6474 /**
6475  * GTcpConnection:
6476  *
6477  * A #GSocketConnection for UNIX domain socket connections.
6478  *
6479  * Since: 2.22
6480  */
6481
6482
6483 /**
6484  * GTestLogFatalFunc:
6485  * @log_domain: the log domain of the message
6486  * @log_level: the log level of the message (including the fatal and recursion flags)
6487  * @message: the message to process
6488  * @user_data: user data, set in g_test_log_set_fatal_handler()
6489  *
6490  * Specifies the prototype of fatal log handler functions.
6491  *
6492  * Returns: %TRUE if the program should abort, %FALSE otherwise
6493  * Since: 2.22
6494  */
6495
6496
6497 /**
6498  * GThemedIcon:
6499  *
6500  * An implementation of #GIcon for themed icons.
6501  */
6502
6503
6504 /**
6505  * GThemedIcon:name:
6506  *
6507  * The icon name.
6508  */
6509
6510
6511 /**
6512  * GThemedIcon:names:
6513  *
6514  * A %NULL-terminated array of icon names.
6515  */
6516
6517
6518 /**
6519  * GThemedIcon:use-default-fallbacks:
6520  *
6521  * Whether to use the default fallbacks found by shortening the icon name
6522  * at '-' characters. If the "names" array has more than one element,
6523  * ignores any past the first.
6524  *
6525  * For example, if the icon name was "gnome-dev-cdrom-audio", the array
6526  * would become
6527  * |[
6528  * {
6529  * "gnome-dev-cdrom-audio",
6530  * "gnome-dev-cdrom",
6531  * "gnome-dev",
6532  * "gnome",
6533  * NULL
6534  * };
6535  * ]|
6536  */
6537
6538
6539 /**
6540  * GThreadedSocketService:
6541  *
6542  * A helper class for handling accepting incoming connections in the
6543  * glib mainloop and handling them in a thread.
6544  *
6545  * Since: 2.22
6546  */
6547
6548
6549 /**
6550  * GThreadedSocketService::run:
6551  * @service: the #GThreadedSocketService.
6552  * @connection: a new #GSocketConnection object.
6553  * @source_object: the source_object passed to g_socket_listener_add_address().
6554  *
6555  * The ::run signal is emitted in a worker thread in response to an
6556  * incoming connection. This thread is dedicated to handling
6557  * @connection and may perform blocking IO. The signal handler need
6558  * not return until the connection is closed.
6559  *
6560  * Returns: %TRUE to stop further signal handlers from being called
6561  */
6562
6563
6564 /**
6565  * GTimeSpan:
6566  *
6567  * A value representing an interval of time, in microseconds.
6568  *
6569  * Since: 2.26
6570  */
6571
6572
6573 /**
6574  * GTimeType:
6575  * @G_TIME_TYPE_STANDARD: the time is in local standard time
6576  * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time
6577  * @G_TIME_TYPE_UNIVERSAL: the time is in UTC
6578  *
6579  * Disambiguates a given time in two ways.
6580  *
6581  * First, specifies if the given time is in universal or local time.
6582  *
6583  * Second, if the time is in local time, specifies if it is local
6584  * standard time or local daylight time.  This is important for the case
6585  * where the same local time occurs twice (during daylight savings time
6586  * transitions, for example).
6587  */
6588
6589
6590 /**
6591  * GTlsAuthenticationMode:
6592  * @G_TLS_AUTHENTICATION_NONE: client authentication not required
6593  * @G_TLS_AUTHENTICATION_REQUESTED: client authentication is requested
6594  * @G_TLS_AUTHENTICATION_REQUIRED: client authentication is required
6595  *
6596  * The client authentication mode for a #GTlsServerConnection.
6597  *
6598  * Since: 2.28
6599  */
6600
6601
6602 /**
6603  * GTlsBackend:
6604  *
6605  * TLS (Transport Layer Security, aka SSL) backend. This is an
6606  * internal type used to coordinate the different classes implemented
6607  * by a TLS backend.
6608  *
6609  * Since: 2.28
6610  */
6611
6612
6613 /**
6614  * GTlsBackendInterface:
6615  * @g_iface: The parent interface.
6616  * @supports_tls: returns whether the backend supports TLS.
6617  * @get_default_database: returns a default #GTlsDatabase instance.
6618  * @get_certificate_type: returns the #GTlsCertificate implementation type
6619  * @get_client_connection_type: returns the #GTlsClientConnection implementation type
6620  * @get_server_connection_type: returns the #GTlsServerConnection implementation type
6621  * @get_file_database_type: returns the #GTlsFileDatabase implementation type.
6622  *
6623  * Provides an interface for describing TLS-related types.
6624  *
6625  * Since: 2.28
6626  */
6627
6628
6629 /**
6630  * GTlsCertificate:
6631  *
6632  * Abstract base class for TLS certificate types.
6633  *
6634  * Since: 2.28
6635  */
6636
6637
6638 /**
6639  * GTlsCertificate:certificate:
6640  *
6641  * The DER (binary) encoded representation of the certificate's
6642  * public key. This property and the
6643  * #GTlsCertificate:certificate-pem property represent the same
6644  * data, just in different forms.
6645  *
6646  * Since: 2.28
6647  */
6648
6649
6650 /**
6651  * GTlsCertificate:certificate-pem:
6652  *
6653  * The PEM (ASCII) encoded representation of the certificate's
6654  * public key. This property and the #GTlsCertificate:certificate
6655  * property represent the same data, just in different forms.
6656  *
6657  * Since: 2.28
6658  */
6659
6660
6661 /**
6662  * GTlsCertificate:issuer:
6663  *
6664  * A #GTlsCertificate representing the entity that issued this
6665  * certificate. If %NULL, this means that the certificate is either
6666  * self-signed, or else the certificate of the issuer is not
6667  * available.
6668  *
6669  * Since: 2.28
6670  */
6671
6672
6673 /**
6674  * GTlsCertificate:private-key:
6675  *
6676  * The DER (binary) encoded representation of the certificate's
6677  * private key, in either PKCS#1 format or unencrypted PKCS#8
6678  * format. This property (or the #GTlsCertificate:private-key-pem
6679  * property) can be set when constructing a key (eg, from a file),
6680  * but cannot be read.
6681  *
6682  * PKCS#8 format is supported since 2.32; earlier releases only
6683  * support PKCS#1. You can use the <literal>openssl rsa</literal>
6684  * tool to convert PKCS#8 keys to PKCS#1.
6685  *
6686  * Since: 2.28
6687  */
6688
6689
6690 /**
6691  * GTlsCertificate:private-key-pem:
6692  *
6693  * The PEM (ASCII) encoded representation of the certificate's
6694  * private key in either PKCS#1 format ("<literal>BEGIN RSA PRIVATE
6695  * KEY</literal>") or unencrypted PKCS#8 format ("<literal>BEGIN
6696  * PRIVATE KEY</literal>"). This property (or the
6697  * #GTlsCertificate:private-key property) can be set when
6698  * constructing a key (eg, from a file), but cannot be read.
6699  *
6700  * PKCS#8 format is supported since 2.32; earlier releases only
6701  * support PKCS#1. You can use the <literal>openssl rsa</literal>
6702  * tool to convert PKCS#8 keys to PKCS#1.
6703  *
6704  * Since: 2.28
6705  */
6706
6707
6708 /**
6709  * GTlsCertificateFlags:
6710  * @G_TLS_CERTIFICATE_UNKNOWN_CA: The signing certificate authority is not known.
6711  * @G_TLS_CERTIFICATE_BAD_IDENTITY: The certificate does not match the expected identity of the site that it was retrieved from.
6712  * @G_TLS_CERTIFICATE_NOT_ACTIVATED: The certificate's activation time is still in the future
6713  * @G_TLS_CERTIFICATE_EXPIRED: The certificate has expired
6714  * @G_TLS_CERTIFICATE_REVOKED: The certificate has been revoked according to the #GTlsConnection's certificate revocation list.
6715  * @G_TLS_CERTIFICATE_INSECURE: The certificate's algorithm is considered insecure.
6716  * @G_TLS_CERTIFICATE_GENERIC_ERROR: Some other error occurred validating the certificate
6717  * @G_TLS_CERTIFICATE_VALIDATE_ALL: the combination of all of the above flags
6718  *
6719  * A set of flags describing TLS certification validation. This can be
6720  * used to set which validation steps to perform (eg, with
6721  * g_tls_client_connection_set_validation_flags()), or to describe why
6722  * a particular certificate was rejected (eg, in
6723  * #GTlsConnection::accept-certificate).
6724  *
6725  * Since: 2.28
6726  */
6727
6728
6729 /**
6730  * GTlsClientConnection:
6731  *
6732  * TLS client-side connection; the client-side implementation of a
6733  * #GTlsConnection
6734  *
6735  * Since: 2.28
6736  */
6737
6738
6739 /**
6740  * GTlsClientConnection:accepted-cas:
6741  *
6742  * A list of the distinguished names of the Certificate Authorities
6743  * that the server will accept client certificates signed by. If the
6744  * server requests a client certificate during the handshake, then
6745  * this property will be set after the handshake completes.
6746  *
6747  * Each item in the list is a #GByteArray which contains the complete
6748  * subject DN of the certificate authority.
6749  *
6750  * Since: 2.28
6751  */
6752
6753
6754 /**
6755  * GTlsClientConnection:server-identity:
6756  *
6757  * A #GSocketConnectable describing the identity of the server that
6758  * is expected on the other end of the connection.
6759  *
6760  * If the %G_TLS_CERTIFICATE_BAD_IDENTITY flag is set in
6761  * #GTlsClientConnection:validation-flags, this object will be used
6762  * to determine the expected identify of the remote end of the
6763  * connection; if #GTlsClientConnection:server-identity is not set,
6764  * or does not match the identity presented by the server, then the
6765  * %G_TLS_CERTIFICATE_BAD_IDENTITY validation will fail.
6766  *
6767  * In addition to its use in verifying the server certificate,
6768  * this is also used to give a hint to the server about what
6769  * certificate we expect, which is useful for servers that serve
6770  * virtual hosts.
6771  *
6772  * Since: 2.28
6773  */
6774
6775
6776 /**
6777  * GTlsClientConnection:use-ssl3:
6778  *
6779  * If %TRUE, tells the connection to use SSL 3.0 rather than trying
6780  * to negotiate the best version of TLS or SSL to use. This can be
6781  * used when talking to servers that don't implement version
6782  * negotiation correctly and therefore refuse to handshake at all with
6783  * a "modern" TLS handshake.
6784  *
6785  * Since: 2.28
6786  */
6787
6788
6789 /**
6790  * GTlsClientConnection:validation-flags:
6791  *
6792  * What steps to perform when validating a certificate received from
6793  * a server. Server certificates that fail to validate in all of the
6794  * ways indicated here will be rejected unless the application
6795  * overrides the default via #GTlsConnection::accept-certificate.
6796  *
6797  * Since: 2.28
6798  */
6799
6800
6801 /**
6802  * GTlsConnection:
6803  *
6804  * TLS connection. This is an abstract type that will be subclassed by
6805  * a TLS-library-specific subtype.
6806  *
6807  * Since: 2.28
6808  */
6809
6810
6811 /**
6812  * GTlsConnection::accept-certificate:
6813  * @conn: a #GTlsConnection
6814  * @peer_cert: the peer's #GTlsCertificate
6815  * @errors: the problems with @peer_cert.
6816  *
6817  * Emitted during the TLS handshake after the peer certificate has
6818  * been received. You can examine @peer_cert's certification path by
6819  * calling g_tls_certificate_get_issuer() on it.
6820  *
6821  * For a client-side connection, @peer_cert is the server's
6822  * certificate, and the signal will only be emitted if the
6823  * certificate was not acceptable according to @conn's
6824  * #GTlsClientConnection:validation_flags. If you would like the
6825  * certificate to be accepted despite @errors, return %TRUE from the
6826  * signal handler. Otherwise, if no handler accepts the certificate,
6827  * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE.
6828  *
6829  * For a server-side connection, @peer_cert is the certificate
6830  * presented by the client, if this was requested via the server's
6831  * #GTlsServerConnection:authentication_mode. On the server side,
6832  * the signal is always emitted when the client presents a
6833  * certificate, and the certificate will only be accepted if a
6834  * handler returns %TRUE.
6835  *
6836  * Note that if this signal is emitted as part of asynchronous I/O
6837  * in the main thread, then you should not attempt to interact with
6838  * the user before returning from the signal handler. If you want to
6839  * let the user decide whether or not to accept the certificate, you
6840  * would have to return %FALSE from the signal handler on the first
6841  * attempt, and then after the connection attempt returns a
6842  * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if
6843  * the user decides to accept the certificate, remember that fact,
6844  * create a new connection, and return %TRUE from the signal handler
6845  * the next time.
6846  *
6847  * If you are doing I/O in another thread, you do not
6848  * need to worry about this, and can simply block in the signal
6849  * handler until the UI thread returns an answer.
6850  *
6851  * immediately end the signal emission). %FALSE to allow the signal
6852  * emission to continue, which will cause the handshake to fail if
6853  * no one else overrides it.
6854  *
6855  * Returns: %TRUE to accept @peer_cert (which will also
6856  * Since: 2.28
6857  */
6858
6859
6860 /**
6861  * GTlsConnection:base-io-stream:
6862  *
6863  * The #GIOStream that the connection wraps
6864  *
6865  * Since: 2.28
6866  */
6867
6868
6869 /**
6870  * GTlsConnection:certificate:
6871  *
6872  * The connection's certificate; see
6873  * g_tls_connection_set_certificate().
6874  *
6875  * Since: 2.28
6876  */
6877
6878
6879 /**
6880  * GTlsConnection:database:
6881  *
6882  * The certificate database to use when verifying this TLS connection.
6883  * If no cerificate database is set, then the default database will be
6884  * used. See g_tls_backend_get_default_database().
6885  *
6886  * Since: 2.30
6887  */
6888
6889
6890 /**
6891  * GTlsConnection:interaction:
6892  *
6893  * A #GTlsInteraction object to be used when the connection or certificate
6894  * database need to interact with the user. This will be used to prompt the
6895  * user for passwords where necessary.
6896  *
6897  * Since: 2.30
6898  */
6899
6900
6901 /**
6902  * GTlsConnection:peer-certificate:
6903  *
6904  * The connection's peer's certificate, after the TLS handshake has
6905  * completed and the certificate has been accepted. Note in
6906  * particular that this is not yet set during the emission of
6907  * #GTlsConnection::accept-certificate.
6908  *
6909  * (You can watch for a #GObject::notify signal on this property to
6910  * detect when a handshake has occurred.)
6911  *
6912  * Since: 2.28
6913  */
6914
6915
6916 /**
6917  * GTlsConnection:peer-certificate-errors:
6918  *
6919  * The errors noticed-and-ignored while verifying
6920  * #GTlsConnection:peer-certificate. Normally this should be 0, but
6921  * it may not be if #GTlsClientConnection:validation-flags is not
6922  * %G_TLS_CERTIFICATE_VALIDATE_ALL, or if
6923  * #GTlsConnection::accept-certificate overrode the default
6924  * behavior.
6925  *
6926  * Since: 2.28
6927  */
6928
6929
6930 /**
6931  * GTlsConnection:rehandshake-mode:
6932  *
6933  * The rehandshaking mode. See
6934  * g_tls_connection_set_rehandshake_mode().
6935  *
6936  * Since: 2.28
6937  */
6938
6939
6940 /**
6941  * GTlsConnection:require-close-notify:
6942  *
6943  * Whether or not proper TLS close notification is required.
6944  * See g_tls_connection_set_require_close_notify().
6945  *
6946  * Since: 2.28
6947  */
6948
6949
6950 /**
6951  * GTlsConnection:use-system-certdb:
6952  *
6953  * Whether or not the system certificate database will be used to
6954  * verify peer certificates. See
6955  * g_tls_connection_set_use_system_certdb().
6956  *
6957  * Deprecated: 2.30: Use GTlsConnection:database instead
6958  */
6959
6960
6961 /**
6962  * GTlsDatabase:
6963  *
6964  * Abstract base class for the backend-specific database types.
6965  *
6966  * Since: 2.30
6967  */
6968
6969
6970 /**
6971  * GTlsDatabaseLookupFlags:
6972  * @G_TLS_DATABASE_LOOKUP_NONE: No lookup flags
6973  * @G_TLS_DATABASE_LOOKUP_KEYPAIR: Restrict lookup to certificates that have a private key.
6974  *
6975  * Flags for g_tls_database_lookup_handle(), g_tls_database_lookup_issuer(),
6976  * and g_tls_database_lookup_issued().
6977  *
6978  * Since: 2.30
6979  */
6980
6981
6982 /**
6983  * GTlsDatabaseVerifyFlags:
6984  * @G_TLS_DATABASE_VERIFY_NONE: No verification flags
6985  *
6986  * Flags for g_tls_database_verify_chain().
6987  *
6988  * Since: 2.30
6989  */
6990
6991
6992 /**
6993  * GTlsError:
6994  * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available
6995  * @G_TLS_ERROR_MISC: Miscellaneous TLS error
6996  * @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed
6997  * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the peer does not seem to be a TLS server.
6998  * @G_TLS_ERROR_HANDSHAKE: The TLS handshake failed because the peer's certificate was not acceptable.
6999  * @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().
7000  * @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().
7001  *
7002  * An error code used with %G_TLS_ERROR in a #GError returned from a
7003  * TLS-related routine.
7004  *
7005  * Since: 2.28
7006  */
7007
7008
7009 /**
7010  * GTlsFileDatabase:
7011  *
7012  * Implemented by a #GTlsDatabase which allows you to load certificates
7013  * from a file.
7014  *
7015  * Since: 2.30
7016  */
7017
7018
7019 /**
7020  * GTlsFileDatabase:anchors:
7021  *
7022  * The path to a file containing PEM encoded certificate authority
7023  * root anchors. The certificates in this file will be treated as
7024  * root authorities for the purpose of verifying other certificates
7025  * via the g_tls_database_verify_chain() operation.
7026  *
7027  * Since: 2.30
7028  */
7029
7030
7031 /**
7032  * GTlsFileDatabaseInterface:
7033  * @g_iface: The parent interface.
7034  *
7035  * Provides an interface for #GTlsFileDatabase implementations.
7036  */
7037
7038
7039 /**
7040  * GTlsInteraction:
7041  *
7042  * An object representing interaction that the TLS connection and database
7043  * might have with the user.
7044  *
7045  * Since: 2.30
7046  */
7047
7048
7049 /**
7050  * GTlsInteractionClass:
7051  * @ask_password: ask for a password synchronously. If the implementation returns %G_TLS_INTERACTION_HANDLED, then the password argument should have been filled in by using g_tls_password_set_value() or a similar function.
7052  * @ask_password_async: ask for a password asynchronously.
7053  * @ask_password_finish: complete operation to ask for a password asynchronously. If the implementation returns %G_TLS_INTERACTION_HANDLED, then the password argument of the async method should have been filled in by using g_tls_password_set_value() or a similar function.
7054  *
7055  * The class for #GTlsInteraction. Derived classes implement the various
7056  * virtual interaction methods to handle TLS interactions.
7057  *
7058  * Derived classes can choose to implement whichever interactions methods they'd
7059  * like to support by overriding those virtual methods in their class
7060  * initialization function. If a derived class implements an async method,
7061  * it must also implement the corresponding finish method.
7062  *
7063  * The synchronous interaction methods should implement to display modal dialogs,
7064  * and the asynchronous methods to display modeless dialogs.
7065  *
7066  * If the user cancels an interaction, then the result should be
7067  * %G_TLS_INTERACTION_FAILED and the error should be set with a domain of
7068  * %G_IO_ERROR and code of %G_IO_ERROR_CANCELLED.
7069  *
7070  * Since: 2.30
7071  */
7072
7073
7074 /**
7075  * GTlsInteractionResult:
7076  * @G_TLS_INTERACTION_UNHANDLED: The interaction was unhandled (i.e. not implemented).
7077  * @G_TLS_INTERACTION_HANDLED: The interaction completed, and resulting data is available.
7078  * @G_TLS_INTERACTION_FAILED: The interaction has failed, or was cancelled. and the operation should be aborted.
7079  *
7080  * #GTlsInteractionResult is returned by various functions in #GTlsInteraction
7081  * when finishing an interaction request.
7082  *
7083  * Since: 2.30
7084  */
7085
7086
7087 /**
7088  * GTlsPassword:
7089  *
7090  * An abstract interface representing a password used in TLS. Often used in
7091  * user interaction such as unlocking a key storage token.
7092  *
7093  * Since: 2.30
7094  */
7095
7096
7097 /**
7098  * GTlsPasswordFlags:
7099  * @G_TLS_PASSWORD_NONE: No flags
7100  * @G_TLS_PASSWORD_RETRY: The password was wrong, and the user should retry.
7101  * @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.
7102  * @G_TLS_PASSWORD_FINAL_TRY: Hint to the user that this is the last try to get this password right.
7103  *
7104  * Various flags for the password.
7105  *
7106  * Since: 2.30
7107  */
7108
7109
7110 /**
7111  * GTlsRehandshakeMode:
7112  * @G_TLS_REHANDSHAKE_NEVER: Never allow rehandshaking
7113  * @G_TLS_REHANDSHAKE_SAFELY: Allow safe rehandshaking only
7114  * @G_TLS_REHANDSHAKE_UNSAFELY: Allow unsafe rehandshaking
7115  *
7116  * When to allow rehandshaking. See
7117  * g_tls_connection_set_rehandshake_mode().
7118  *
7119  * Since: 2.28
7120  */
7121
7122
7123 /**
7124  * GTlsServerConnection:
7125  *
7126  * TLS server-side connection. This is the server-side implementation
7127  * of a #GTlsConnection.
7128  *
7129  * Since: 2.28
7130  */
7131
7132
7133 /**
7134  * GTlsServerConnection:authentication-mode:
7135  *
7136  * The #GTlsAuthenticationMode for the server. This can be changed
7137  * before calling g_tls_connection_handshake() if you want to
7138  * rehandshake with a different mode from the initial handshake.
7139  *
7140  * Since: 2.28
7141  */
7142
7143
7144 /**
7145  * GToggleNotify:
7146  * @data: Callback data passed to g_object_add_toggle_ref()
7147  * @object: The object on which g_object_add_toggle_ref() was called.
7148  * @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.
7149  *
7150  * A callback function used for notification when the state
7151  * of a toggle reference changes. See g_object_add_toggle_ref().
7152  */
7153
7154
7155 /**
7156  * GTranslateFunc:
7157  * @str: the untranslated string
7158  * @data: user data specified when installing the function, e.g. in g_option_group_set_translate_func()
7159  *
7160  * The type of functions which are used to translate user-visible
7161  * strings, for <option>--help</option> output.
7162  *
7163  * The returned string is owned by GLib and must not be freed.
7164  *
7165  * Returns: a translation of the string for the current locale.
7166  */
7167
7168
7169 /**
7170  * GType:
7171  *
7172  * A numerical value which represents the unique identifier of a registered
7173  * type.
7174  */
7175
7176
7177 /**
7178  * GTypeClass:
7179  *
7180  * An opaque structure used as the base of all classes.
7181  */
7182
7183
7184 /**
7185  * GTypeClassCacheFunc:
7186  * @cache_data: data that was given to the g_type_add_class_cache_func() call
7187  * @g_class: The #GTypeClass structure which is unreferenced
7188  *
7189  * A callback function which is called when the reference count of a class
7190  * drops to zero. It may use g_type_class_ref() to prevent the class from
7191  * being freed. You should not call g_type_class_unref() from a
7192  * #GTypeClassCacheFunc function to prevent infinite recursion, use
7193  * g_type_class_unref_uncached() instead.
7194  *
7195  * The functions have to check the class id passed in to figure
7196  * whether they actually want to cache the class of this type, since all
7197  * classes are routed through the same #GTypeClassCacheFunc chain.
7198  *
7199  * called, %FALSE to continue.
7200  *
7201  * Returns: %TRUE to stop further #GTypeClassCacheFunc<!-- -->s from being
7202  */
7203
7204
7205 /**
7206  * GTypeDebugFlags:
7207  * @G_TYPE_DEBUG_NONE: Print no messages.
7208  * @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping.
7209  * @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions.
7210  * @G_TYPE_DEBUG_MASK: Mask covering all debug flags.
7211  *
7212  * The <type>GTypeDebugFlags</type> enumeration values can be passed to
7213  * g_type_init_with_debug_flags() to trigger debugging messages during runtime.
7214  * Note that the messages can also be triggered by setting the
7215  * <envar>GOBJECT_DEBUG</envar> environment variable to a ':'-separated list of
7216  * "objects" and "signals".
7217  */
7218
7219
7220 /**
7221  * GTypeFlags:
7222  * @G_TYPE_FLAG_ABSTRACT: Indicates an abstract type. No instances can be created for an abstract type.
7223  * @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().
7224  *
7225  * Bit masks used to check or determine characteristics of a type.
7226  */
7227
7228
7229 /**
7230  * GTypeFundamentalFlags:
7231  * @G_TYPE_FLAG_CLASSED: Indicates a classed type.
7232  * @G_TYPE_FLAG_INSTANTIATABLE: Indicates an instantiable type (implies classed).
7233  * @G_TYPE_FLAG_DERIVABLE: Indicates a flat derivable type.
7234  * @G_TYPE_FLAG_DEEP_DERIVABLE: Indicates a deep derivable type (implies derivable).
7235  *
7236  * Bit masks used to check or determine specific characteristics of a
7237  * fundamental type.
7238  */
7239
7240
7241 /**
7242  * GTypeFundamentalInfo:
7243  * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type
7244  *
7245  * A structure that provides information to the type system which is
7246  * used specifically for managing fundamental types.
7247  */
7248
7249
7250 /**
7251  * GTypeInfo:
7252  * @class_size: Size of the class structure (required for interface, classed and instantiatable types).
7253  * @base_init: Location of the base initialization function (optional).
7254  * @base_finalize: Location of the base finalization function (optional).
7255  * @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.
7256  * @class_finalize: Location of the class finalization function for classed and instantiatable types. Location fo the default vtable finalization function for interface types. (optional)
7257  * @class_data: User-supplied data passed to the class init/finalize functions.
7258  * @instance_size: Size of the instance (object) structure (required for instantiatable types only).
7259  * @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.
7260  * @instance_init: Location of the instance initialization function (optional, for instantiatable types only).
7261  * @value_table: A #GTypeValueTable function table for generic handling of GValues of this type (usually only useful for fundamental types).
7262  *
7263  * This structure is used to provide the type system with the information
7264  * required to initialize and destruct (finalize) a type's class and
7265  * its instances.
7266  * The initialized structure is passed to the g_type_register_static() function
7267  * (or is copied into the provided #GTypeInfo structure in the
7268  * g_type_plugin_complete_type_info()). The type system will perform a deep
7269  * copy of this structure, so its memory does not need to be persistent
7270  * across invocation of g_type_register_static().
7271  */
7272
7273
7274 /**
7275  * GTypeInstance:
7276  *
7277  * An opaque structure used as the base of all type instances.
7278  */
7279
7280
7281 /**
7282  * GTypeInterface:
7283  *
7284  * An opaque structure used as the base of all interface types.
7285  */
7286
7287
7288 /**
7289  * GTypeInterfaceCheckFunc:
7290  * @check_data: data passed to g_type_add_interface_check().
7291  * @g_iface: the interface that has been initialized
7292  *
7293  * A callback called after an interface vtable is initialized.
7294  * See g_type_add_interface_check().
7295  *
7296  * Since: 2.4
7297  */
7298
7299
7300 /**
7301  * GTypeModule:
7302  * @name: the name of the module
7303  *
7304  * The members of the <structname>GTypeModule</structname> structure should not
7305  * be accessed directly, except for the @name field.
7306  */
7307
7308
7309 /**
7310  * GTypeModuleClass:
7311  * @parent_class: the parent class
7312  * @load: loads the module and registers one or more types using g_type_module_register_type().
7313  * @unload: unloads the module
7314  *
7315  * In order to implement dynamic loading of types based on #GTypeModule,
7316  * the @load and @unload functions in #GTypeModuleClass must be implemented.
7317  */
7318
7319
7320 /**
7321  * GTypePlugin:
7322  *
7323  * The <structname>GTypePlugin</structname> typedef is used as a placeholder
7324  * for objects that implement the <structname>GTypePlugin</structname>
7325  * interface.
7326  */
7327
7328
7329 /**
7330  * GTypePluginClass:
7331  * @use_plugin: Increases the use count of the plugin.
7332  * @unuse_plugin: Decreases the use count of the plugin.
7333  * @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.
7334  * @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.
7335  *
7336  * The #GTypePlugin interface is used by the type system in order to handle
7337  * the lifecycle of dynamically loaded types.
7338  */
7339
7340
7341 /**
7342  * GTypePluginCompleteInterfaceInfo:
7343  * @plugin: the #GTypePlugin
7344  * @instance_type: the #GType of an instantiable type to which the interface is added
7345  * @interface_type: the #GType of the interface whose info is completed
7346  * @info: the #GInterfaceInfo to fill in
7347  *
7348  * The type of the @complete_interface_info function of #GTypePluginClass.
7349  */
7350
7351
7352 /**
7353  * GTypePluginCompleteTypeInfo:
7354  * @plugin: the #GTypePlugin
7355  * @g_type: the #GType whose info is completed
7356  * @info: the #GTypeInfo struct to fill in
7357  * @value_table: the #GTypeValueTable to fill in
7358  *
7359  * The type of the @complete_type_info function of #GTypePluginClass.
7360  */
7361
7362
7363 /**
7364  * GTypePluginUnuse:
7365  * @plugin: the #GTypePlugin whose use count should be decreased
7366  *
7367  * The type of the @unuse_plugin function of #GTypePluginClass.
7368  */
7369
7370
7371 /**
7372  * GTypePluginUse:
7373  * @plugin: the #GTypePlugin whose use count should be increased
7374  *
7375  * The type of the @use_plugin function of #GTypePluginClass, which gets called
7376  * to increase the use count of @plugin.
7377  */
7378
7379
7380 /**
7381  * GTypeQuery:
7382  * @type: the #GType value of the type.
7383  * @type_name: the name of the type.
7384  * @class_size: the size of the class structure.
7385  * @instance_size: the size of the instance structure.
7386  *
7387  * A structure holding information for a specific type. It is
7388  * filled in by the g_type_query() function.
7389  */
7390
7391
7392 /**
7393  * GTypeValueTable:
7394  * @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 (""); ]|
7395  * @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); ]|
7396  * @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); ]|
7397  * @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; ]|
7398  * @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'.
7399  * @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 signal emission 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.
7400  * @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.
7401  * @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; ]|
7402  *
7403  * The #GTypeValueTable provides the functions required by the #GValue implementation,
7404  * to serve as a container for values of a type.
7405  */
7406
7407
7408 /**
7409  * GUnicodeBreakType:
7410  * @G_UNICODE_BREAK_MANDATORY: Mandatory Break (BK)
7411  * @G_UNICODE_BREAK_CARRIAGE_RETURN: Carriage Return (CR)
7412  * @G_UNICODE_BREAK_LINE_FEED: Line Feed (LF)
7413  * @G_UNICODE_BREAK_COMBINING_MARK: Attached Characters and Combining Marks (CM)
7414  * @G_UNICODE_BREAK_SURROGATE: Surrogates (SG)
7415  * @G_UNICODE_BREAK_ZERO_WIDTH_SPACE: Zero Width Space (ZW)
7416  * @G_UNICODE_BREAK_INSEPARABLE: Inseparable (IN)
7417  * @G_UNICODE_BREAK_NON_BREAKING_GLUE: Non-breaking ("Glue") (GL)
7418  * @G_UNICODE_BREAK_CONTINGENT: Contingent Break Opportunity (CB)
7419  * @G_UNICODE_BREAK_SPACE: Space (SP)
7420  * @G_UNICODE_BREAK_AFTER: Break Opportunity After (BA)
7421  * @G_UNICODE_BREAK_BEFORE: Break Opportunity Before (BB)
7422  * @G_UNICODE_BREAK_BEFORE_AND_AFTER: Break Opportunity Before and After (B2)
7423  * @G_UNICODE_BREAK_HYPHEN: Hyphen (HY)
7424  * @G_UNICODE_BREAK_NON_STARTER: Nonstarter (NS)
7425  * @G_UNICODE_BREAK_OPEN_PUNCTUATION: Opening Punctuation (OP)
7426  * @G_UNICODE_BREAK_CLOSE_PUNCTUATION: Closing Punctuation (CL)
7427  * @G_UNICODE_BREAK_QUOTATION: Ambiguous Quotation (QU)
7428  * @G_UNICODE_BREAK_EXCLAMATION: Exclamation/Interrogation (EX)
7429  * @G_UNICODE_BREAK_IDEOGRAPHIC: Ideographic (ID)
7430  * @G_UNICODE_BREAK_NUMERIC: Numeric (NU)
7431  * @G_UNICODE_BREAK_INFIX_SEPARATOR: Infix Separator (Numeric) (IS)
7432  * @G_UNICODE_BREAK_SYMBOL: Symbols Allowing Break After (SY)
7433  * @G_UNICODE_BREAK_ALPHABETIC: Ordinary Alphabetic and Symbol Characters (AL)
7434  * @G_UNICODE_BREAK_PREFIX: Prefix (Numeric) (PR)
7435  * @G_UNICODE_BREAK_POSTFIX: Postfix (Numeric) (PO)
7436  * @G_UNICODE_BREAK_COMPLEX_CONTEXT: Complex Content Dependent (South East Asian) (SA)
7437  * @G_UNICODE_BREAK_AMBIGUOUS: Ambiguous (Alphabetic or Ideographic) (AI)
7438  * @G_UNICODE_BREAK_UNKNOWN: Unknown (XX)
7439  * @G_UNICODE_BREAK_NEXT_LINE: Next Line (NL)
7440  * @G_UNICODE_BREAK_WORD_JOINER: Word Joiner (WJ)
7441  * @G_UNICODE_BREAK_HANGUL_L_JAMO: Hangul L Jamo (JL)
7442  * @G_UNICODE_BREAK_HANGUL_V_JAMO: Hangul V Jamo (JV)
7443  * @G_UNICODE_BREAK_HANGUL_T_JAMO: Hangul T Jamo (JT)
7444  * @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2)
7445  * @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3)
7446  * @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28
7447  *
7448  * These are the possible line break classifications.
7449  *
7450  * The five Hangul types were added in Unicode 4.1, so, has been
7451  * introduced in GLib 2.10. Note that new types may be added in the future.
7452  * Applications should be ready to handle unknown values.
7453  * They may be regarded as %G_UNICODE_BREAK_UNKNOWN.
7454  *
7455  * See <ulink url="http://www.unicode.org/unicode/reports/tr14/">http://www.unicode.org/unicode/reports/tr14/</ulink>.
7456  */
7457
7458
7459 /**
7460  * GUnicodeScript:
7461  * @G_UNICODE_SCRIPT_COMMON: a character used by multiple different scripts
7462  * @G_UNICODE_SCRIPT_INHERITED: a mark glyph that takes its script from the i                             base glyph to which it is attached
7463  * @G_UNICODE_SCRIPT_ARABIC: Arabic
7464  * @G_UNICODE_SCRIPT_ARMENIAN: Armenian
7465  * @G_UNICODE_SCRIPT_BENGALI: Bengali
7466  * @G_UNICODE_SCRIPT_BOPOMOFO: Bopomofo
7467  * @G_UNICODE_SCRIPT_CHEROKEE: Cherokee
7468  * @G_UNICODE_SCRIPT_COPTIC: Coptic
7469  * @G_UNICODE_SCRIPT_CYRILLIC: Cyrillic
7470  * @G_UNICODE_SCRIPT_DESERET: Deseret
7471  * @G_UNICODE_SCRIPT_DEVANAGARI: Devanagari
7472  * @G_UNICODE_SCRIPT_ETHIOPIC: Ethiopic
7473  * @G_UNICODE_SCRIPT_GEORGIAN: Georgian
7474  * @G_UNICODE_SCRIPT_GOTHIC: Gothic
7475  * @G_UNICODE_SCRIPT_GREEK: Greek
7476  * @G_UNICODE_SCRIPT_GUJARATI: Gujarati
7477  * @G_UNICODE_SCRIPT_GURMUKHI: Gurmukhi
7478  * @G_UNICODE_SCRIPT_HAN: Han
7479  * @G_UNICODE_SCRIPT_HANGUL: Hangul
7480  * @G_UNICODE_SCRIPT_HEBREW: Hebrew
7481  * @G_UNICODE_SCRIPT_HIRAGANA: Hiragana
7482  * @G_UNICODE_SCRIPT_KANNADA: Kannada
7483  * @G_UNICODE_SCRIPT_KATAKANA: Katakana
7484  * @G_UNICODE_SCRIPT_KHMER: Khmer
7485  * @G_UNICODE_SCRIPT_LAO: Lao
7486  * @G_UNICODE_SCRIPT_LATIN: Latin
7487  * @G_UNICODE_SCRIPT_MALAYALAM: Malayalam
7488  * @G_UNICODE_SCRIPT_MONGOLIAN: Mongolian
7489  * @G_UNICODE_SCRIPT_MYANMAR: Myanmar
7490  * @G_UNICODE_SCRIPT_OGHAM: Ogham
7491  * @G_UNICODE_SCRIPT_OLD_ITALIC: Old Italic
7492  * @G_UNICODE_SCRIPT_ORIYA: Oriya
7493  * @G_UNICODE_SCRIPT_RUNIC: Runic
7494  * @G_UNICODE_SCRIPT_SINHALA: Sinhala
7495  * @G_UNICODE_SCRIPT_SYRIAC: Syriac
7496  * @G_UNICODE_SCRIPT_TAMIL: Tamil
7497  * @G_UNICODE_SCRIPT_TELUGU: Telugu
7498  * @G_UNICODE_SCRIPT_THAANA: Thaana
7499  * @G_UNICODE_SCRIPT_THAI: Thai
7500  * @G_UNICODE_SCRIPT_TIBETAN: Tibetan Canadian Aboriginal
7501  * @G_UNICODE_SCRIPT_YI: Yi
7502  * @G_UNICODE_SCRIPT_TAGALOG: Tagalog
7503  * @G_UNICODE_SCRIPT_HANUNOO: Hanunoo
7504  * @G_UNICODE_SCRIPT_BUHID: Buhid
7505  * @G_UNICODE_SCRIPT_TAGBANWA: Tagbanwa
7506  * @G_UNICODE_SCRIPT_BRAILLE: Braille
7507  * @G_UNICODE_SCRIPT_CYPRIOT: Cypriot
7508  * @G_UNICODE_SCRIPT_LIMBU: Limbu
7509  * @G_UNICODE_SCRIPT_OSMANYA: Osmanya
7510  * @G_UNICODE_SCRIPT_SHAVIAN: Shavian
7511  * @G_UNICODE_SCRIPT_LINEAR_B: Linear B
7512  * @G_UNICODE_SCRIPT_TAI_LE: Tai Le
7513  * @G_UNICODE_SCRIPT_UGARITIC: Ugaritic New Tai Lue
7514  * @G_UNICODE_SCRIPT_BUGINESE: Buginese
7515  * @G_UNICODE_SCRIPT_GLAGOLITIC: Glagolitic
7516  * @G_UNICODE_SCRIPT_TIFINAGH: Tifinagh Syloti Nagri Old Persian
7517  * @G_UNICODE_SCRIPT_KHAROSHTHI: Kharoshthi
7518  * @G_UNICODE_SCRIPT_UNKNOWN: an unassigned code point
7519  * @G_UNICODE_SCRIPT_BALINESE: Balinese
7520  * @G_UNICODE_SCRIPT_CUNEIFORM: Cuneiform
7521  * @G_UNICODE_SCRIPT_PHOENICIAN: Phoenician
7522  * @G_UNICODE_SCRIPT_PHAGS_PA: Phags-pa
7523  * @G_UNICODE_SCRIPT_NKO: N'Ko
7524  * @G_UNICODE_SCRIPT_KAYAH_LI: Kayah Li. Since 2.16.3
7525  * @G_UNICODE_SCRIPT_LEPCHA: Lepcha. Since 2.16.3
7526  * @G_UNICODE_SCRIPT_REJANG: Rejang. Since 2.16.3
7527  * @G_UNICODE_SCRIPT_SUNDANESE: Sundanese. Since 2.16.3
7528  * @G_UNICODE_SCRIPT_SAURASHTRA: Saurashtra. Since 2.16.3
7529  * @G_UNICODE_SCRIPT_CHAM: Cham. Since 2.16.3
7530  * @G_UNICODE_SCRIPT_OL_CHIKI: Ol Chiki. Since 2.16.3
7531  * @G_UNICODE_SCRIPT_VAI: Vai. Since 2.16.3
7532  * @G_UNICODE_SCRIPT_CARIAN: Carian. Since 2.16.3
7533  * @G_UNICODE_SCRIPT_LYCIAN: Lycian. Since 2.16.3
7534  * @G_UNICODE_SCRIPT_LYDIAN: Lydian. Since 2.16.3
7535  * @G_UNICODE_SCRIPT_AVESTAN: Avestan. Since 2.26
7536  * @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
7537  * @G_UNICODE_SCRIPT_JAVANESE: Javanese. Since 2.26
7538  * @G_UNICODE_SCRIPT_KAITHI: Kaithi. Since 2.26
7539  * @G_UNICODE_SCRIPT_LISU: Lisu. Since 2.26 Meetei Mayek. Since 2.26 Old South Arabian. Since 2.26
7540  * @G_UNICODE_SCRIPT_OLD_TURKIC: Old Turkic. Since 2.28
7541  * @G_UNICODE_SCRIPT_SAMARITAN: Samaritan. Since 2.26
7542  * @G_UNICODE_SCRIPT_TAI_THAM: Tai Tham. Since 2.26
7543  * @G_UNICODE_SCRIPT_TAI_VIET: Tai Viet. Since 2.26
7544  * @G_UNICODE_SCRIPT_BATAK: Batak. Since 2.28
7545  * @G_UNICODE_SCRIPT_BRAHMI: Brahmi. Since 2.28
7546  * @G_UNICODE_SCRIPT_MANDAIC: Mandaic. Since 2.28
7547  *
7548  * The #GUnicodeScript enumeration identifies different writing
7549  * systems. The values correspond to the names as defined in the
7550  * Unicode standard. The enumeration has been added in GLib 2.14,
7551  * and is interchangeable with #PangoScript.
7552  *
7553  * Note that new types may be added in the future. Applications
7554  * should be ready to handle unknown values.
7555  * See <ulink
7556  * url="http://www.unicode.org/reports/tr24/">Unicode Standard Annex
7557  * #24: Script names</ulink>.
7558  */
7559
7560
7561 /**
7562  * GUnicodeType:
7563  * @G_UNICODE_CONTROL: General category "Other, Control" (Cc)
7564  * @G_UNICODE_FORMAT: General category "Other, Format" (Cf)
7565  * @G_UNICODE_UNASSIGNED: General category "Other, Not Assigned" (Cn)
7566  * @G_UNICODE_PRIVATE_USE: General category "Other, Private Use" (Co)
7567  * @G_UNICODE_SURROGATE: General category "Other, Surrogate" (Cs)
7568  * @G_UNICODE_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll)
7569  * @G_UNICODE_MODIFIER_LETTER: General category "Letter, Modifier" (Lm)
7570  * @G_UNICODE_OTHER_LETTER: General category "Letter, Other" (Lo)
7571  * @G_UNICODE_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt)
7572  * @G_UNICODE_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu)
7573  * @G_UNICODE_SPACING_MARK: General category "Mark, Spacing" (Mc)
7574  * @G_UNICODE_ENCLOSING_MARK: General category "Mark, Enclosing" (Me)
7575  * @G_UNICODE_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn)
7576  * @G_UNICODE_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd)
7577  * @G_UNICODE_LETTER_NUMBER: General category "Number, Letter" (Nl)
7578  * @G_UNICODE_OTHER_NUMBER: General category "Number, Other" (No)
7579  * @G_UNICODE_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc)
7580  * @G_UNICODE_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd)
7581  * @G_UNICODE_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe)
7582  * @G_UNICODE_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf)
7583  * @G_UNICODE_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi)
7584  * @G_UNICODE_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po)
7585  * @G_UNICODE_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps)
7586  * @G_UNICODE_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc)
7587  * @G_UNICODE_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk)
7588  * @G_UNICODE_MATH_SYMBOL: General category "Symbol, Math" (Sm)
7589  * @G_UNICODE_OTHER_SYMBOL: General category "Symbol, Other" (So)
7590  * @G_UNICODE_LINE_SEPARATOR: General category "Separator, Line" (Zl)
7591  * @G_UNICODE_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp)
7592  * @G_UNICODE_SPACE_SEPARATOR: General category "Separator, Space" (Zs)
7593  *
7594  * These are the possible character classifications from the
7595  * Unicode specification.
7596  * See <ulink url="http://www.unicode.org/Public/UNIDATA/UnicodeData.html">http://www.unicode.org/Public/UNIDATA/UnicodeData.html</ulink>.
7597  */
7598
7599
7600 /**
7601  * GUnixCredentialsMessage:
7602  *
7603  * The #GUnixCredentialsMessage structure contains only private data
7604  * and should only be accessed using the provided API.
7605  *
7606  * Since: 2.26
7607  */
7608
7609
7610 /**
7611  * GUnixCredentialsMessage:credentials:
7612  *
7613  * The credentials stored in the message.
7614  *
7615  * Since: 2.26
7616  */
7617
7618
7619 /**
7620  * GUnixCredentialsMessageClass:
7621  *
7622  * Class structure for #GUnixCredentialsMessage.
7623  *
7624  * Since: 2.26
7625  */
7626
7627
7628 /**
7629  * GUnixInputStream:
7630  *
7631  * Implements #GInputStream for reading from selectable unix file descriptors
7632  */
7633
7634
7635 /**
7636  * GUnixInputStream:close-fd:
7637  *
7638  * Whether to close the file descriptor when the stream is closed.
7639  *
7640  * Since: 2.20
7641  */
7642
7643
7644 /**
7645  * GUnixInputStream:fd:
7646  *
7647  * The file descriptor that the stream reads from.
7648  *
7649  * Since: 2.20
7650  */
7651
7652
7653 /**
7654  * GUnixMountEntry:
7655  *
7656  * Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>).
7657  * This corresponds roughly to a mtab entry.
7658  */
7659
7660
7661 /**
7662  * GUnixMountMonitor:
7663  *
7664  * Watches #GUnixMount<!-- -->s for changes.
7665  */
7666
7667
7668 /**
7669  * GUnixMountMonitor::mountpoints-changed:
7670  * @monitor: the object on which the signal is emitted
7671  *
7672  * Emitted when the unix mount points have changed.
7673  */
7674
7675
7676 /**
7677  * GUnixMountMonitor::mounts-changed:
7678  * @monitor: the object on which the signal is emitted
7679  *
7680  * Emitted when the unix mounts have changed.
7681  */
7682
7683
7684 /**
7685  * GUnixMountPoint:
7686  *
7687  * Defines a Unix mount point (e.g. <filename>/dev</filename>).
7688  * This corresponds roughly to a fstab entry.
7689  */
7690
7691
7692 /**
7693  * GUnixOutputStream:
7694  *
7695  * Implements #GOutputStream for outputting to selectable unix file descriptors
7696  */
7697
7698
7699 /**
7700  * GUnixOutputStream:close-fd:
7701  *
7702  * Whether to close the file descriptor when the stream is closed.
7703  *
7704  * Since: 2.20
7705  */
7706
7707
7708 /**
7709  * GUnixOutputStream:fd:
7710  *
7711  * The file descriptor that the stream writes to.
7712  *
7713  * Since: 2.20
7714  */
7715
7716
7717 /**
7718  * GUnixSocketAddress:
7719  *
7720  * A UNIX-domain (local) socket address, corresponding to a
7721  * <type>struct sockaddr_un</type>.
7722  */
7723
7724
7725 /**
7726  * GUnixSocketAddress:abstract:
7727  *
7728  * Whether or not this is an abstract address
7729  *
7730  * distinguishes between zero-padded and non-zero-padded
7731  * abstract addresses.
7732  *
7733  * Deprecated: Use #GUnixSocketAddress:address-type, which
7734  */
7735
7736
7737 /**
7738  * GUnixSocketAddressType:
7739  * @G_UNIX_SOCKET_ADDRESS_INVALID: invalid
7740  * @G_UNIX_SOCKET_ADDRESS_ANONYMOUS: anonymous
7741  * @G_UNIX_SOCKET_ADDRESS_PATH: a filesystem path
7742  * @G_UNIX_SOCKET_ADDRESS_ABSTRACT: an abstract name
7743  * @G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED: an abstract name, 0-padded to the full length of a unix socket name
7744  *
7745  * The type of name used by a #GUnixSocketAddress.
7746  * %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain
7747  * socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS
7748  * indicates a socket not bound to any name (eg, a client-side socket,
7749  * or a socket created with socketpair()).
7750  *
7751  * For abstract sockets, there are two incompatible ways of naming
7752  * them; the man pages suggest using the entire <literal>struct
7753  * sockaddr_un</literal> as the name, padding the unused parts of the
7754  * %sun_path field with zeroes; this corresponds to
7755  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED. However, many programs
7756  * instead just use a portion of %sun_path, and pass an appropriate
7757  * smaller length to bind() or connect(). This is
7758  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT.
7759  *
7760  * Since: 2.26
7761  */
7762
7763
7764 /**
7765  * GUserDirectory:
7766  * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory
7767  * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory
7768  * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory
7769  * @G_USER_DIRECTORY_MUSIC: the user's Music directory
7770  * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory
7771  * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory
7772  * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory
7773  * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory
7774  * @G_USER_N_DIRECTORIES: the number of enum values
7775  *
7776  * These are logical ids for special directories which are defined
7777  * depending on the platform used. You should use g_get_user_special_dir()
7778  * to retrieve the full path associated to the logical id.
7779  *
7780  * The #GUserDirectory enumeration can be extended at later date. Not
7781  * every platform has a directory for every logical id in this
7782  * enumeration.
7783  *
7784  * Since: 2.14
7785  */
7786
7787
7788 /**
7789  * GValue:
7790  *
7791  * An opaque structure used to hold different types of values.
7792  * The data within the structure has protected scope: it is accessible only
7793  * to functions within a #GTypeValueTable structure, or implementations of
7794  * the g_value_*() API. That is, code portions which implement new fundamental
7795  * types.
7796  * #GValue users cannot make any assumptions about how data is stored
7797  * within the 2 element @data union, and the @g_type member should
7798  * only be accessed through the G_VALUE_TYPE() macro.
7799  */
7800
7801
7802 /**
7803  * GValueArray:
7804  * @n_values: number of values contained in the array
7805  * @values: array of values
7806  *
7807  * A #GValueArray contains an array of #GValue elements.
7808  */
7809
7810
7811 /**
7812  * GValueTransform:
7813  * @src_value: Source value.
7814  * @dest_value: Target value.
7815  *
7816  * The type of value transformation functions which can be registered with
7817  * g_value_register_transform_func().
7818  */
7819
7820
7821 /**
7822  * GVariantType:
7823  *
7824  * A type in the GVariant type system.
7825  *
7826  * Two types may not be compared by value; use g_variant_type_equal() or
7827  * g_variant_type_is_subtype_of().  May be copied using
7828  * g_variant_type_copy() and freed using g_variant_type_free().
7829  */
7830
7831
7832 /**
7833  * GVfs:
7834  *
7835  * Virtual File System object.
7836  */
7837
7838
7839 /**
7840  * GVoidFunc:
7841  *
7842  * Declares a type of function which takes no arguments
7843  * and has no return value. It is used to specify the type
7844  * function passed to g_atexit().
7845  */
7846
7847
7848 /**
7849  * GVolume:
7850  *
7851  * Opaque mountable volume object.
7852  */
7853
7854
7855 /**
7856  * GVolume::changed:
7857  *
7858  * Emitted when the volume has been changed.
7859  */
7860
7861
7862 /**
7863  * GVolume::removed:
7864  *
7865  * This signal is emitted when the #GVolume have been removed. If
7866  * the recipient is holding references to the object they should
7867  * release them so the object can be finalized.
7868  */
7869
7870
7871 /**
7872  * GVolumeIface:
7873  * @g_iface: The parent interface.
7874  * @changed: Changed signal that is emitted when the volume's state has changed.
7875  * @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.
7876  * @get_name: Gets a string containing the name of the #GVolume.
7877  * @get_icon: Gets a #GIcon for the #GVolume.
7878  * @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.
7879  * @get_drive: Gets a #GDrive the volume is located on. Returns %NULL if the #GVolume is not associated with a #GDrive.
7880  * @get_mount: Gets a #GMount representing the mounted volume. Returns %NULL if the #GVolume is not mounted.
7881  * @can_mount: Returns %TRUE if the #GVolume can be mounted.
7882  * @can_eject: Checks if a #GVolume can be ejected.
7883  * @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.
7884  * @mount_finish: Finishes a mount operation.
7885  * @eject: Ejects a given #GVolume.
7886  * @eject_finish: Finishes an eject operation.
7887  * @get_identifier: Returns the <link linkend="volume-identifier">identifier</link> of the given kind, or %NULL if the #GVolume doesn't have one.
7888  * @enumerate_identifiers: Returns an array strings listing the kinds of <link linkend="volume-identifier">identifiers</link> which the #GVolume has.
7889  * @should_automount: Returns %TRUE if the #GVolume should be automatically mounted.
7890  * @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if it is not known.
7891  * @eject_with_operation: Starts ejecting a #GVolume using a #GMountOperation. Since 2.22.
7892  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
7893  * @get_sort_key: Gets a key used for sorting #GVolume instance or %NULL if no such key exists. Since 2.32.
7894  *
7895  * Interface for implementing operations for mountable volumes.
7896  */
7897
7898
7899 /**
7900  * GVolumeMonitor:
7901  *
7902  * A Volume Monitor that watches for volume events.
7903  */
7904
7905
7906 /**
7907  * GVolumeMonitor::drive-changed:
7908  * @volume_monitor: The volume monitor emitting the signal.
7909  * @drive: the drive that changed
7910  *
7911  * Emitted when a drive changes.
7912  */
7913
7914
7915 /**
7916  * GVolumeMonitor::drive-connected:
7917  * @volume_monitor: The volume monitor emitting the signal.
7918  * @drive: a #GDrive that was connected.
7919  *
7920  * Emitted when a drive is connected to the system.
7921  */
7922
7923
7924 /**
7925  * GVolumeMonitor::drive-disconnected:
7926  * @volume_monitor: The volume monitor emitting the signal.
7927  * @drive: a #GDrive that was disconnected.
7928  *
7929  * Emitted when a drive is disconnected from the system.
7930  */
7931
7932
7933 /**
7934  * GVolumeMonitor::drive-eject-button:
7935  * @volume_monitor: The volume monitor emitting the signal.
7936  * @drive: the drive where the eject button was pressed
7937  *
7938  * Emitted when the eject button is pressed on @drive.
7939  *
7940  * Since: 2.18
7941  */
7942
7943
7944 /**
7945  * GVolumeMonitor::drive-stop-button:
7946  * @volume_monitor: The volume monitor emitting the signal.
7947  * @drive: the drive where the stop button was pressed
7948  *
7949  * Emitted when the stop button is pressed on @drive.
7950  *
7951  * Since: 2.22
7952  */
7953
7954
7955 /**
7956  * GVolumeMonitor::mount-added:
7957  * @volume_monitor: The volume monitor emitting the signal.
7958  * @mount: a #GMount that was added.
7959  *
7960  * Emitted when a mount is added.
7961  */
7962
7963
7964 /**
7965  * GVolumeMonitor::mount-changed:
7966  * @volume_monitor: The volume monitor emitting the signal.
7967  * @mount: a #GMount that changed.
7968  *
7969  * Emitted when a mount changes.
7970  */
7971
7972
7973 /**
7974  * GVolumeMonitor::mount-pre-unmount:
7975  * @volume_monitor: The volume monitor emitting the signal.
7976  * @mount: a #GMount that is being unmounted.
7977  *
7978  * Emitted when a mount is about to be removed.
7979  */
7980
7981
7982 /**
7983  * GVolumeMonitor::mount-removed:
7984  * @volume_monitor: The volume monitor emitting the signal.
7985  * @mount: a #GMount that was removed.
7986  *
7987  * Emitted when a mount is removed.
7988  */
7989
7990
7991 /**
7992  * GVolumeMonitor::volume-added:
7993  * @volume_monitor: The volume monitor emitting the signal.
7994  * @volume: a #GVolume that was added.
7995  *
7996  * Emitted when a mountable volume is added to the system.
7997  */
7998
7999
8000 /**
8001  * GVolumeMonitor::volume-changed:
8002  * @volume_monitor: The volume monitor emitting the signal.
8003  * @volume: a #GVolume that changed.
8004  *
8005  * Emitted when mountable volume is changed.
8006  */
8007
8008
8009 /**
8010  * GVolumeMonitor::volume-removed:
8011  * @volume_monitor: The volume monitor emitting the signal.
8012  * @volume: a #GVolume that was removed.
8013  *
8014  * Emitted when a mountable volume is removed from the system.
8015  */
8016
8017
8018 /**
8019  * GWeakNotify:
8020  * @data: data that was provided when the weak reference was established
8021  * @where_the_object_was: the object being finalized
8022  *
8023  * A #GWeakNotify function can be added to an object as a callback that gets
8024  * triggered when the object is finalized. Since the object is already being
8025  * finalized when the #GWeakNotify is called, there's not much you could do
8026  * with the object, apart from e.g. using its address as hash-index or the like.
8027  */
8028
8029
8030 /**
8031  * GWin32InputStream:close-handle:
8032  *
8033  * Whether to close the file handle when the stream is closed.
8034  *
8035  * Since: 2.26
8036  */
8037
8038
8039 /**
8040  * GWin32InputStream:handle:
8041  *
8042  * The handle that the stream reads from.
8043  *
8044  * Since: 2.26
8045  */
8046
8047
8048 /**
8049  * GWin32OutputStream:close-handle:
8050  *
8051  * Whether to close the file handle when the stream is closed.
8052  *
8053  * Since: 2.26
8054  */
8055
8056
8057 /**
8058  * GWin32OutputStream:handle:
8059  *
8060  * The file handle that the stream writes to.
8061  *
8062  * Since: 2.26
8063  */
8064
8065
8066 /**
8067  * GZlibCompressor:
8068  *
8069  * Zlib decompression
8070  */
8071
8072
8073 /**
8074  * GZlibCompressor:file-info:
8075  *
8076  * If set to a non-%NULL #GFileInfo object, and #GZlibCompressor:format is
8077  * %G_ZLIB_COMPRESSOR_FORMAT_GZIP, the compressor will write the file name
8078  * and modification time from the file info to the the GZIP header.
8079  *
8080  * Since: 2.26
8081  */
8082
8083
8084 /**
8085  * GZlibCompressorFormat:
8086  * @G_ZLIB_COMPRESSOR_FORMAT_ZLIB: deflate compression with zlib header
8087  * @G_ZLIB_COMPRESSOR_FORMAT_GZIP: gzip file format
8088  * @G_ZLIB_COMPRESSOR_FORMAT_RAW: deflate compression with no header
8089  *
8090  * Used to select the type of data format to use for #GZlibDecompressor
8091  * and #GZlibCompressor.
8092  *
8093  * Since: 2.24
8094  */
8095
8096
8097 /**
8098  * GZlibDecompressor:
8099  *
8100  * Zlib decompression
8101  */
8102
8103
8104 /**
8105  * GZlibDecompressor:file-info:
8106  *
8107  * A #GFileInfo containing the information found in the GZIP header
8108  * of the data stream processed, or %NULL if the header was not yet
8109  * fully processed, is not present at all, or the compressor's
8110  * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP.
8111  *
8112  * Since: 2.26
8113  */
8114
8115
8116 /**
8117  * G_BOOKMARK_FILE_ERROR:
8118  *
8119  * Error domain for bookmark file parsing.
8120  * Errors in this domain will be from the #GBookmarkFileError
8121  * enumeration. See #GError for information on error domains.
8122  */
8123
8124
8125 /**
8126  * G_BREAKPOINT:
8127  *
8128  * Inserts a breakpoint instruction into the code.
8129  *
8130  * On x86 and alpha systems this is implemented as a soft interrupt
8131  * and on other architectures it raises a <literal>SIGTRAP</literal> signal.
8132  */
8133
8134
8135 /**
8136  * G_CALLBACK:
8137  * @f: a function pointer.
8138  *
8139  * Cast a function pointer to a #GCallback.
8140  */
8141
8142
8143 /**
8144  * G_CCLOSURE_SWAP_DATA:
8145  * @cclosure: a #GCClosure
8146  *
8147  * Checks whether the user data of the #GCClosure should be passed as the
8148  * first parameter to the callback. See g_cclosure_new_swap().
8149  *
8150  * Returns: %TRUE if data has to be swapped.
8151  */
8152
8153
8154 /**
8155  * G_CLOSURE_NEEDS_MARSHAL:
8156  * @closure: a #GClosure
8157  *
8158  * Check if the closure still needs a marshaller. See g_closure_set_marshal().
8159  *
8160  * @closure.
8161  *
8162  * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on
8163  */
8164
8165
8166 /**
8167  * G_CLOSURE_N_NOTIFIERS:
8168  * @cl: a #GClosure
8169  *
8170  * Get the total number of notifiers connected with the closure @cl.
8171  * The count includes the meta marshaller, the finalize and invalidate notifiers
8172  * and the marshal guards. Note that each guard counts as two notifiers.
8173  * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
8174  * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
8175  *
8176  * Returns: number of notifiers
8177  */
8178
8179
8180 /**
8181  * G_CONVERT_ERROR:
8182  *
8183  * Error domain for character set conversions. Errors in this domain will
8184  * be from the #GConvertError enumeration. See #GError for information on
8185  * error domains.
8186  */
8187
8188
8189 /**
8190  * G_DATALIST_FLAGS_MASK:
8191  *
8192  * A bitmask that restricts the possible flags passed to
8193  * g_datalist_set_flags(). Passing a flags value where
8194  * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.
8195  */
8196
8197
8198 /**
8199  * G_DBUS_ERROR:
8200  *
8201  * Error domain for errors generated by a remote message bus. Errors
8202  * in this domain will be from the #GDBusError enumeration.  See
8203  * #GError for more information on error domains.
8204  *
8205  * Note that errors in this error domain is intended only for
8206  * returning errors from a remote message bus process. Errors
8207  * generated locally in-process by e.g. #GDBusConnection is from the
8208  * %G_IO_ERROR domain.
8209  *
8210  * Since: 2.26
8211  */
8212
8213
8214 /**
8215  * G_DEFINE_ABSTRACT_TYPE:
8216  * @TN: The name of the new type, in Camel case.
8217  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
8218  * @T_P: The #GType of the parent type.
8219  *
8220  * A convenience macro for type implementations.
8221  * Similar to G_DEFINE_TYPE(), but defines an abstract type.
8222  * See G_DEFINE_TYPE_EXTENDED() for an example.
8223  *
8224  * Since: 2.4
8225  */
8226
8227
8228 /**
8229  * G_DEFINE_ABSTRACT_TYPE_WITH_CODE:
8230  * @TN: The name of the new type, in Camel case.
8231  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
8232  * @T_P: The #GType of the parent type.
8233  * @_C_: Custom code that gets inserted in the @type_name_get_type() function.
8234  *
8235  * A convenience macro for type implementations.
8236  * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows you to
8237  * insert custom code into the *_get_type() function, e.g. interface implementations
8238  * via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
8239  *
8240  * Since: 2.4
8241  */
8242
8243
8244 /**
8245  * G_DEFINE_BOXED_TYPE:
8246  * @TypeName: The name of the new type, in Camel case.
8247  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
8248  * @copy_func: the #GBoxedCopyFunc for the new type
8249  * @free_func: the #GBoxedFreeFunc for the new type
8250  *
8251  * A convenience macro for boxed type implementations, which defines a
8252  * type_name_get_type() function registering the boxed type.
8253  *
8254  * Since: 2.26
8255  */
8256
8257
8258 /**
8259  * G_DEFINE_BOXED_TYPE_WITH_CODE:
8260  * @TypeName: The name of the new type, in Camel case.
8261  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
8262  * @copy_func: the #GBoxedCopyFunc for the new type
8263  * @free_func: the #GBoxedFreeFunc for the new type
8264  * @_C_: Custom code that gets inserted in the *_get_type() function.
8265  *
8266  * A convenience macro for boxed type implementations.
8267  * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the
8268  * type_name_get_type() function, e.g. to register value transformations with
8269  * g_value_register_transform_func().
8270  *
8271  * Since: 2.26
8272  */
8273
8274
8275 /**
8276  * G_DEFINE_DYNAMIC_TYPE:
8277  * @TN: The name of the new type, in Camel case.
8278  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
8279  * @T_P: The #GType of the parent type.
8280  *
8281  * A convenience macro for dynamic type implementations, which declares a
8282  * class initialization function, an instance initialization function (see
8283  * #GTypeInfo for information about these) and a static variable named
8284  * @t_n<!-- -->_parent_class pointing to the parent class. Furthermore,
8285  * it defines a <function>*_get_type()</function> and a static
8286  * <function>*_register_type()</function> function for use in your
8287  * <function>module_init()</function>.
8288  * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.
8289  *
8290  * Since: 2.14
8291  */
8292
8293
8294 /**
8295  * G_DEFINE_DYNAMIC_TYPE_EXTENDED:
8296  * @TypeName: The name of the new type, in Camel case.
8297  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
8298  * @TYPE_PARENT: The #GType of the parent type.
8299  * @flags: #GTypeFlags to pass to g_type_module_register_type()
8300  * @CODE: Custom code that gets inserted in the *_get_type() function.
8301  *
8302  * A more general version of G_DEFINE_DYNAMIC_TYPE() which
8303  * allows to specify #GTypeFlags and custom code.
8304  *
8305  * |[
8306  * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
8307  * gtk_gadget,
8308  * GTK_TYPE_THING,
8309  * 0,
8310  * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO,
8311  * gtk_gadget_gizmo_init));
8312  * ]|
8313  * expands to
8314  * |[
8315  * static void     gtk_gadget_init              (GtkGadget      *self);
8316  * static void     gtk_gadget_class_init        (GtkGadgetClass *klass);
8317  * static void     gtk_gadget_class_finalize    (GtkGadgetClass *klass);
8318  *
8319  * static gpointer gtk_gadget_parent_class = NULL;
8320  * static GType    gtk_gadget_type_id = 0;
8321  *
8322  * static void     gtk_gadget_class_intern_init (gpointer klass)
8323  * {
8324  * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
8325  * gtk_gadget_class_init ((GtkGadgetClass*) klass);
8326  * }
8327  *
8328  * GType
8329  * gtk_gadget_get_type (void)
8330  * {
8331  * return gtk_gadget_type_id;
8332  * }
8333  *
8334  * static void
8335  * gtk_gadget_register_type (GTypeModule *type_module)
8336  * {
8337  * const GTypeInfo g_define_type_info = {
8338  * sizeof (GtkGadgetClass),
8339  * (GBaseInitFunc) NULL,
8340  * (GBaseFinalizeFunc) NULL,
8341  * (GClassInitFunc) gtk_gadget_class_intern_init,
8342  * (GClassFinalizeFunc) gtk_gadget_class_finalize,
8343  * NULL,   // class_data
8344  * sizeof (GtkGadget),
8345  * 0,      // n_preallocs
8346  * (GInstanceInitFunc) gtk_gadget_init,
8347  * NULL    // value_table
8348  * };
8349  * gtk_gadget_type_id = g_type_module_register_type (type_module,
8350  * GTK_TYPE_THING,
8351  * GtkGadget,
8352  * &g_define_type_info,
8353  * (GTypeFlags) flags);
8354  * {
8355  * const GInterfaceInfo g_implement_interface_info = {
8356  * (GInterfaceInitFunc) gtk_gadget_gizmo_init
8357  * };
8358  * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
8359  * }
8360  * }
8361  * ]|
8362  *
8363  * Since: 2.14
8364  */
8365
8366
8367 /**
8368  * G_DEFINE_INTERFACE:
8369  * @TN: The name of the new type, in Camel case.
8370  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
8371  * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
8372  *
8373  * A convenience macro for #GTypeInterface definitions, which declares
8374  * a default vtable initialization function and defines a *_get_type()
8375  * function.
8376  *
8377  * The macro expects the interface initialization function to have the
8378  * name <literal>t_n ## _default_init</literal>, and the interface
8379  * structure to have the name <literal>TN ## Interface</literal>.
8380  *
8381  * Since: 2.24
8382  */
8383
8384
8385 /**
8386  * G_DEFINE_INTERFACE_WITH_CODE:
8387  * @TN: The name of the new type, in Camel case.
8388  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
8389  * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
8390  * @_C_: Custom code that gets inserted in the *_get_type() function.
8391  *
8392  * A convenience macro for #GTypeInterface definitions. Similar to
8393  * G_DEFINE_INTERFACE(), but allows you to insert custom code into the
8394  * *_get_type() function, e.g. additional interface implementations
8395  * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See
8396  * G_DEFINE_TYPE_EXTENDED() for a similar example using
8397  * G_DEFINE_TYPE_WITH_CODE().
8398  *
8399  * Since: 2.24
8400  */
8401
8402
8403 /**
8404  * G_DEFINE_POINTER_TYPE:
8405  * @TypeName: The name of the new type, in Camel case.
8406  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
8407  *
8408  * A convenience macro for pointer type implementations, which defines a
8409  * type_name_get_type() function registering the pointer type.
8410  *
8411  * Since: 2.26
8412  */
8413
8414
8415 /**
8416  * G_DEFINE_POINTER_TYPE_WITH_CODE:
8417  * @TypeName: The name of the new type, in Camel case.
8418  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
8419  * @_C_: Custom code that gets inserted in the *_get_type() function.
8420  *
8421  * A convenience macro for pointer type implementations.
8422  * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert custom code into the
8423  * type_name_get_type() function.
8424  *
8425  * Since: 2.26
8426  */
8427
8428
8429 /**
8430  * G_DEFINE_TYPE:
8431  * @TN: The name of the new type, in Camel case.
8432  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
8433  * @T_P: The #GType of the parent type.
8434  *
8435  * A convenience macro for type implementations, which declares a
8436  * class initialization function, an instance initialization function (see #GTypeInfo for information about
8437  * these) and a static variable named @t_n<!-- -->_parent_class pointing to the parent class. Furthermore, it defines
8438  * a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() for an example.
8439  *
8440  * Since: 2.4
8441  */
8442
8443
8444 /**
8445  * G_DEFINE_TYPE_EXTENDED:
8446  * @TN: The name of the new type, in Camel case.
8447  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
8448  * @T_P: The #GType of the parent type.
8449  * @_f_: #GTypeFlags to pass to g_type_register_static()
8450  * @_C_: Custom code that gets inserted in the *_get_type() function.
8451  *
8452  * The most general convenience macro for type implementations, on which
8453  * G_DEFINE_TYPE(), etc are based.
8454  *
8455  * |[
8456  * G_DEFINE_TYPE_EXTENDED (GtkGadget,
8457  * gtk_gadget,
8458  * GTK_TYPE_WIDGET,
8459  * 0,
8460  * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
8461  * gtk_gadget_gizmo_init));
8462  * ]|
8463  * expands to
8464  * |[
8465  * static void     gtk_gadget_init       (GtkGadget      *self);
8466  * static void     gtk_gadget_class_init (GtkGadgetClass *klass);
8467  * static gpointer gtk_gadget_parent_class = NULL;
8468  * static void     gtk_gadget_class_intern_init (gpointer klass)
8469  * {
8470  * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
8471  * gtk_gadget_class_init ((GtkGadgetClass*) klass);
8472  * }
8473  *
8474  * GType
8475  * gtk_gadget_get_type (void)
8476  * {
8477  * static volatile gsize g_define_type_id__volatile = 0;
8478  * if (g_once_init_enter (&g_define_type_id__volatile))
8479  * {
8480  * GType g_define_type_id =
8481  * g_type_register_static_simple (GTK_TYPE_WIDGET,
8482  * g_intern_static_string ("GtkGadget"),
8483  * sizeof (GtkGadgetClass),
8484  * (GClassInitFunc) gtk_gadget_class_intern_init,
8485  * sizeof (GtkGadget),
8486  * (GInstanceInitFunc) gtk_gadget_init,
8487  * (GTypeFlags) flags);
8488  * {
8489  * const GInterfaceInfo g_implement_interface_info = {
8490  * (GInterfaceInitFunc) gtk_gadget_gizmo_init
8491  * };
8492  * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
8493  * }
8494  * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
8495  * }
8496  * return g_define_type_id__volatile;
8497  * }
8498  * ]|
8499  * The only pieces which have to be manually provided are the definitions of
8500  * the instance and class structure and the definitions of the instance and
8501  * class init functions.
8502  *
8503  * Since: 2.4
8504  */
8505
8506
8507 /**
8508  * G_DEFINE_TYPE_WITH_CODE:
8509  * @TN: The name of the new type, in Camel case.
8510  * @t_n: The name of the new type in lowercase, with words separated by '_'.
8511  * @T_P: The #GType of the parent type.
8512  * @_C_: Custom code that gets inserted in the *_get_type() function.
8513  *
8514  * A convenience macro for type implementations.
8515  * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the
8516  * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
8517  * See G_DEFINE_TYPE_EXTENDED() for an example.
8518  *
8519  * Since: 2.4
8520  */
8521
8522
8523 /**
8524  * G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME:
8525  *
8526  * Extension point for default handler to URI association. See
8527  * <link linkend="extending-gio">Extending GIO</link>.
8528  */
8529
8530
8531 /**
8532  * G_ENUM_CLASS:
8533  * @class: a valid #GEnumClass
8534  *
8535  * Casts a derived #GEnumClass structure into a #GEnumClass structure.
8536  */
8537
8538
8539 /**
8540  * G_ENUM_CLASS_TYPE:
8541  * @class: a #GEnumClass
8542  *
8543  * Get the type identifier from a given #GEnumClass structure.
8544  *
8545  * Returns: the #GType
8546  */
8547
8548
8549 /**
8550  * G_ENUM_CLASS_TYPE_NAME:
8551  * @class: a #GEnumClass
8552  *
8553  * Get the static type name from a given #GEnumClass structure.
8554  *
8555  * Returns: the type name.
8556  */
8557
8558
8559 /**
8560  * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE:
8561  *
8562  * A key in the "access" namespace for checking deletion privileges.
8563  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8564  * This attribute will be %TRUE if the user is able to delete the file.
8565  */
8566
8567
8568 /**
8569  * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE:
8570  *
8571  * A key in the "access" namespace for getting execution privileges.
8572  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8573  * This attribute will be %TRUE if the user is able to execute the file.
8574  */
8575
8576
8577 /**
8578  * G_FILE_ATTRIBUTE_ACCESS_CAN_READ:
8579  *
8580  * A key in the "access" namespace for getting read privileges.
8581  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8582  * This attribute will be %TRUE if the user is able to read the file.
8583  */
8584
8585
8586 /**
8587  * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME:
8588  *
8589  * A key in the "access" namespace for checking renaming privileges.
8590  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8591  * This attribute will be %TRUE if the user is able to rename the file.
8592  */
8593
8594
8595 /**
8596  * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH:
8597  *
8598  * A key in the "access" namespace for checking trashing privileges.
8599  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8600  * This attribute will be %TRUE if the user is able to move the file to
8601  * the trash.
8602  */
8603
8604
8605 /**
8606  * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE:
8607  *
8608  * A key in the "access" namespace for getting write privileges.
8609  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8610  * This attribute will be %TRUE if the user is able to write to the file.
8611  */
8612
8613
8614 /**
8615  * G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE:
8616  *
8617  * A key in the "dos" namespace for checking if the file's archive flag
8618  * is set. This attribute is %TRUE if the archive flag is set. This attribute
8619  * is only available for DOS file systems. Corresponding #GFileAttributeType
8620  * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8621  */
8622
8623
8624 /**
8625  * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM:
8626  *
8627  * A key in the "dos" namespace for checking if the file's backup flag
8628  * is set. This attribute is %TRUE if the backup flag is set. This attribute
8629  * is only available for DOS file systems. Corresponding #GFileAttributeType
8630  * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8631  */
8632
8633
8634 /**
8635  * G_FILE_ATTRIBUTE_ETAG_VALUE:
8636  *
8637  * A key in the "etag" namespace for getting the value of the file's
8638  * entity tag. Corresponding #GFileAttributeType is
8639  * %G_FILE_ATTRIBUTE_TYPE_STRING.
8640  */
8641
8642
8643 /**
8644  * G_FILE_ATTRIBUTE_FILESYSTEM_FREE:
8645  *
8646  * A key in the "filesystem" namespace for getting the number of bytes of free space left on the
8647  * file system. Corresponding #GFileAttributeType is
8648  * %G_FILE_ATTRIBUTE_TYPE_UINT64.
8649  */
8650
8651
8652 /**
8653  * G_FILE_ATTRIBUTE_FILESYSTEM_READONLY:
8654  *
8655  * A key in the "filesystem" namespace for checking if the file system
8656  * is read only. Is set to %TRUE if the file system is read only.
8657  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8658  */
8659
8660
8661 /**
8662  * G_FILE_ATTRIBUTE_FILESYSTEM_SIZE:
8663  *
8664  * A key in the "filesystem" namespace for getting the total size (in bytes) of the file system,
8665  * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType
8666  * is %G_FILE_ATTRIBUTE_TYPE_UINT64.
8667  */
8668
8669
8670 /**
8671  * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE:
8672  *
8673  * A key in the "filesystem" namespace for getting the file system's type.
8674  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8675  */
8676
8677
8678 /**
8679  * G_FILE_ATTRIBUTE_FILESYSTEM_USED:
8680  *
8681  * A key in the "filesystem" namespace for getting the number of bytes of used on the
8682  * file system. Corresponding #GFileAttributeType is
8683  * %G_FILE_ATTRIBUTE_TYPE_UINT64.
8684  *
8685  * Since: 2.32
8686  */
8687
8688
8689 /**
8690  * G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW:
8691  *
8692  * A key in the "filesystem" namespace for hinting a file manager
8693  * application whether it should preview (e.g. thumbnail) files on the
8694  * file system. The value for this key contain a
8695  * #GFilesystemPreviewType.
8696  */
8697
8698
8699 /**
8700  * G_FILE_ATTRIBUTE_GVFS_BACKEND:
8701  *
8702  * A key in the "gvfs" namespace that gets the name of the current
8703  * GVFS backend in use. Corresponding #GFileAttributeType is
8704  * %G_FILE_ATTRIBUTE_TYPE_STRING.
8705  */
8706
8707
8708 /**
8709  * G_FILE_ATTRIBUTE_ID_FILE:
8710  *
8711  * A key in the "id" namespace for getting a file identifier.
8712  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8713  * An example use would be during listing files, to avoid recursive
8714  * directory scanning.
8715  */
8716
8717
8718 /**
8719  * G_FILE_ATTRIBUTE_ID_FILESYSTEM:
8720  *
8721  * A key in the "id" namespace for getting the file system identifier.
8722  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8723  * An example use would be during drag and drop to see if the source
8724  * and target are on the same filesystem (default to move) or not (default
8725  * to copy).
8726  */
8727
8728
8729 /**
8730  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT:
8731  *
8732  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
8733  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8734  */
8735
8736
8737 /**
8738  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT:
8739  *
8740  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
8741  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8742  */
8743
8744
8745 /**
8746  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL:
8747  *
8748  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
8749  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8750  *
8751  * Since: 2.22
8752  */
8753
8754
8755 /**
8756  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START:
8757  *
8758  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
8759  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8760  *
8761  * Since: 2.22
8762  */
8763
8764
8765 /**
8766  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED:
8767  *
8768  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started
8769  * degraded.
8770  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8771  *
8772  * Since: 2.22
8773  */
8774
8775
8776 /**
8777  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP:
8778  *
8779  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
8780  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8781  *
8782  * Since: 2.22
8783  */
8784
8785
8786 /**
8787  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT:
8788  *
8789  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)  is unmountable.
8790  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8791  */
8792
8793
8794 /**
8795  * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI:
8796  *
8797  * A key in the "mountable" namespace for getting the HAL UDI for the mountable
8798  * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8799  */
8800
8801
8802 /**
8803  * G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC:
8804  *
8805  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)
8806  * is automatically polled for media.
8807  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8808  *
8809  * Since: 2.22
8810  */
8811
8812
8813 /**
8814  * G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE:
8815  *
8816  * A key in the "mountable" namespace for getting the #GDriveStartStopType.
8817  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8818  *
8819  * Since: 2.22
8820  */
8821
8822
8823 /**
8824  * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE:
8825  *
8826  * A key in the "mountable" namespace for getting the unix device.
8827  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8828  */
8829
8830
8831 /**
8832  * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE:
8833  *
8834  * A key in the "mountable" namespace for getting the unix device file.
8835  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8836  *
8837  * Since: 2.22
8838  */
8839
8840
8841 /**
8842  * G_FILE_ATTRIBUTE_OWNER_GROUP:
8843  *
8844  * A key in the "owner" namespace for getting the file owner's group.
8845  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8846  */
8847
8848
8849 /**
8850  * G_FILE_ATTRIBUTE_OWNER_USER:
8851  *
8852  * A key in the "owner" namespace for getting the user name of the
8853  * file's owner. Corresponding #GFileAttributeType is
8854  * %G_FILE_ATTRIBUTE_TYPE_STRING.
8855  */
8856
8857
8858 /**
8859  * G_FILE_ATTRIBUTE_OWNER_USER_REAL:
8860  *
8861  * A key in the "owner" namespace for getting the real name of the
8862  * user that owns the file. Corresponding #GFileAttributeType is
8863  * %G_FILE_ATTRIBUTE_TYPE_STRING.
8864  */
8865
8866
8867 /**
8868  * G_FILE_ATTRIBUTE_PREVIEW_ICON:
8869  *
8870  * A key in the "preview" namespace for getting a #GIcon that can be
8871  * used to get preview of the file. For example, it may be a low
8872  * resolution thumbnail without metadata. Corresponding
8873  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.  The value
8874  * for this key should contain a #GIcon.
8875  *
8876  * Since: 2.20
8877  */
8878
8879
8880 /**
8881  * G_FILE_ATTRIBUTE_SELINUX_CONTEXT:
8882  *
8883  * A key in the "selinux" namespace for getting the file's SELinux
8884  * context. Corresponding #GFileAttributeType is
8885  * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only
8886  * available if GLib has been built with SELinux support.
8887  */
8888
8889
8890 /**
8891  * G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE:
8892  *
8893  * A key in the "standard" namespace for getting the amount of disk space
8894  * that is consumed by the file (in bytes).  This will generally be larger
8895  * than the file size (due to block size overhead) but can occasionally be
8896  * smaller (for example, for sparse files).
8897  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
8898  *
8899  * Since: 2.20
8900  */
8901
8902
8903 /**
8904  * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE:
8905  *
8906  * A key in the "standard" namespace for getting the content type of the file.
8907  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8908  * The value for this key should contain a valid content type.
8909  */
8910
8911
8912 /**
8913  * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME:
8914  *
8915  * A key in the "standard" namespace for getting the copy name of the file.
8916  * The copy name is an optional version of the name. If available it's always
8917  * in UTF8, and corresponds directly to the original filename (only transcoded to
8918  * UTF8). This is useful if you want to copy the file to another filesystem that
8919  * might have a different encoding. If the filename is not a valid string in the
8920  * encoding selected for the filesystem it is in then the copy name will not be set.
8921  *
8922  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8923  */
8924
8925
8926 /**
8927  * G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION:
8928  *
8929  * A key in the "standard" namespace for getting the description of the file.
8930  * The description is a utf8 string that describes the file, generally containing
8931  * the filename, but can also contain furter information. Example descriptions
8932  * could be "filename (on hostname)" for a remote file or "filename (in trash)"
8933  * for a file in the trash. This is useful for instance as the window title
8934  * when displaying a directory or for a bookmarks menu.
8935  *
8936  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8937  */
8938
8939
8940 /**
8941  * G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME:
8942  *
8943  * A key in the "standard" namespace for getting the display name of the file.
8944  * A display name is guaranteed to be in UTF8 and can thus be displayed in
8945  * the UI.
8946  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8947  */
8948
8949
8950 /**
8951  * G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME:
8952  *
8953  * A key in the "standard" namespace for edit name of the file.
8954  * An edit name is similar to the display name, but it is meant to be
8955  * used when you want to rename the file in the UI. The display name
8956  * might contain information you don't want in the new filename (such as
8957  * "(invalid unicode)" if the filename was in an invalid encoding).
8958  *
8959  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8960  */
8961
8962
8963 /**
8964  * G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE:
8965  *
8966  * A key in the "standard" namespace for getting the fast content type.
8967  * The fast content type isn't as reliable as the regular one, as it
8968  * only uses the filename to guess it, but it is faster to calculate than the
8969  * regular content type.
8970  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8971  */
8972
8973
8974 /**
8975  * G_FILE_ATTRIBUTE_STANDARD_ICON:
8976  *
8977  * A key in the "standard" namespace for getting the icon for the file.
8978  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
8979  * The value for this key should contain a #GIcon.
8980  */
8981
8982
8983 /**
8984  * G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP:
8985  *
8986  * A key in the "standard" namespace for checking if a file is a backup file.
8987  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8988  */
8989
8990
8991 /**
8992  * G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN:
8993  *
8994  * A key in the "standard" namespace for checking if a file is hidden.
8995  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8996  */
8997
8998
8999 /**
9000  * G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK:
9001  *
9002  * A key in the "standard" namespace for checking if the file is a symlink.
9003  * Typically the actual type is something else, if we followed the symlink
9004  * to get the type.
9005  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
9006  */
9007
9008
9009 /**
9010  * G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL:
9011  *
9012  * A key in the "standard" namespace for checking if a file is virtual.
9013  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
9014  */
9015
9016
9017 /**
9018  * G_FILE_ATTRIBUTE_STANDARD_NAME:
9019  *
9020  * A key in the "standard" namespace for getting the name of the file.
9021  * The name is the on-disk filename which may not be in any known encoding,
9022  * and can thus not be generally displayed as is.
9023  * Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
9024  * name in a user interface.
9025  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
9026  */
9027
9028
9029 /**
9030  * G_FILE_ATTRIBUTE_STANDARD_SIZE:
9031  *
9032  * A key in the "standard" namespace for getting the file's size (in bytes).
9033  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
9034  */
9035
9036
9037 /**
9038  * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER:
9039  *
9040  * A key in the "standard" namespace for setting the sort order of a file.
9041  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
9042  * An example use would be in file managers, which would use this key
9043  * to set the order files are displayed. Files with smaller sort order
9044  * should be sorted first, and files without sort order as if sort order
9045  * was zero.
9046  */
9047
9048
9049 /**
9050  * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET:
9051  *
9052  * A key in the "standard" namespace for getting the symlink target, if the file
9053  * is a symlink. Corresponding #GFileAttributeType is
9054  * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
9055  */
9056
9057
9058 /**
9059  * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI:
9060  *
9061  * A key in the "standard" namespace for getting the target URI for the file, in
9062  * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
9063  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
9064  */
9065
9066
9067 /**
9068  * G_FILE_ATTRIBUTE_STANDARD_TYPE:
9069  *
9070  * A key in the "standard" namespace for storing file types.
9071  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
9072  * The value for this key should contain a #GFileType.
9073  */
9074
9075
9076 /**
9077  * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED:
9078  *
9079  * A key in the "thumbnail" namespace for checking if thumbnailing failed.
9080  * This attribute is %TRUE if thumbnailing failed. Corresponding
9081  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
9082  */
9083
9084
9085 /**
9086  * G_FILE_ATTRIBUTE_THUMBNAIL_PATH:
9087  *
9088  * A key in the "thumbnail" namespace for getting the path to the thumbnail
9089  * image. Corresponding #GFileAttributeType is
9090  * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
9091  */
9092
9093
9094 /**
9095  * G_FILE_ATTRIBUTE_TIME_ACCESS:
9096  *
9097  * A key in the "time" namespace for getting the time the file was last
9098  * accessed. Corresponding #GFileAttributeType is
9099  * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
9100  * file was last accessed.
9101  */
9102
9103
9104 /**
9105  * G_FILE_ATTRIBUTE_TIME_ACCESS_USEC:
9106  *
9107  * A key in the "time" namespace for getting the microseconds of the time
9108  * the file was last accessed. This should be used in conjunction with
9109  * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is
9110  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
9111  */
9112
9113
9114 /**
9115  * G_FILE_ATTRIBUTE_TIME_CHANGED:
9116  *
9117  * A key in the "time" namespace for getting the time the file was last
9118  * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
9119  * and contains the UNIX time since the file was last changed.
9120  *
9121  * This corresponds to the traditional UNIX ctime.
9122  */
9123
9124
9125 /**
9126  * G_FILE_ATTRIBUTE_TIME_CHANGED_USEC:
9127  *
9128  * A key in the "time" namespace for getting the microseconds of the time
9129  * the file was last changed. This should be used in conjunction with
9130  * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is
9131  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
9132  */
9133
9134
9135 /**
9136  * G_FILE_ATTRIBUTE_TIME_CREATED:
9137  *
9138  * A key in the "time" namespace for getting the time the file was created.
9139  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
9140  * and contains the UNIX time since the file was created.
9141  *
9142  * This corresponds to the NTFS ctime.
9143  */
9144
9145
9146 /**
9147  * G_FILE_ATTRIBUTE_TIME_CREATED_USEC:
9148  *
9149  * A key in the "time" namespace for getting the microseconds of the time
9150  * the file was created. This should be used in conjunction with
9151  * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is
9152  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
9153  */
9154
9155
9156 /**
9157  * G_FILE_ATTRIBUTE_TIME_MODIFIED:
9158  *
9159  * A key in the "time" namespace for getting the time the file was last
9160  * modified. Corresponding #GFileAttributeType is
9161  * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
9162  * file was modified.
9163  */
9164
9165
9166 /**
9167  * G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC:
9168  *
9169  * A key in the "time" namespace for getting the miliseconds of the time
9170  * the file was last modified. This should be used in conjunction with
9171  * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is
9172  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
9173  */
9174
9175
9176 /**
9177  * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE:
9178  *
9179  * A key in the "trash" namespace.  When requested against
9180  * items in "trash:///", will return the date and time when the file
9181  * was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss.
9182  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
9183  *
9184  * Since: 2.24.
9185  */
9186
9187
9188 /**
9189  * G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT:
9190  *
9191  * A key in the "trash" namespace.  When requested against
9192  * "trash:///" returns the number of (toplevel) items in the trash folder.
9193  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
9194  */
9195
9196
9197 /**
9198  * G_FILE_ATTRIBUTE_TRASH_ORIG_PATH:
9199  *
9200  * A key in the "trash" namespace.  When requested against
9201  * items in "trash:///", will return the original path to the file before it
9202  * was trashed. Corresponding #GFileAttributeType is
9203  * %G_FILE_ATTRIBUTE_TYPE_STRING.
9204  *
9205  * Since: 2.24.
9206  */
9207
9208
9209 /**
9210  * G_FILE_ATTRIBUTE_UNIX_BLOCKS:
9211  *
9212  * A key in the "unix" namespace for getting the number of blocks allocated
9213  * for the file. This attribute is only available for UNIX file systems.
9214  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
9215  */
9216
9217
9218 /**
9219  * G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE:
9220  *
9221  * A key in the "unix" namespace for getting the block size for the file
9222  * system. This attribute is only available for UNIX file systems.
9223  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
9224  */
9225
9226
9227 /**
9228  * G_FILE_ATTRIBUTE_UNIX_DEVICE:
9229  *
9230  * A key in the "unix" namespace for getting the device id of the device the
9231  * file is located on (see stat() documentation). This attribute is only
9232  * available for UNIX file systems. Corresponding #GFileAttributeType is
9233  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
9234  */
9235
9236
9237 /**
9238  * G_FILE_ATTRIBUTE_UNIX_GID:
9239  *
9240  * A key in the "unix" namespace for getting the group ID for the file.
9241  * This attribute is only available for UNIX file systems.
9242  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
9243  */
9244
9245
9246 /**
9247  * G_FILE_ATTRIBUTE_UNIX_INODE:
9248  *
9249  * A key in the "unix" namespace for getting the inode of the file.
9250  * This attribute is only available for UNIX file systems. Corresponding
9251  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
9252  */
9253
9254
9255 /**
9256  * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT:
9257  *
9258  * A key in the "unix" namespace for checking if the file represents a
9259  * UNIX mount point. This attribute is %TRUE if the file is a UNIX mount
9260  * point. This attribute is only available for UNIX file systems.
9261  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
9262  */
9263
9264
9265 /**
9266  * G_FILE_ATTRIBUTE_UNIX_MODE:
9267  *
9268  * A key in the "unix" namespace for getting the mode of the file
9269  * (e.g. whether the file is a regular file, symlink, etc). See lstat()
9270  * documentation. This attribute is only available for UNIX file systems.
9271  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
9272  */
9273
9274
9275 /**
9276  * G_FILE_ATTRIBUTE_UNIX_NLINK:
9277  *
9278  * A key in the "unix" namespace for getting the number of hard links
9279  * for a file. See lstat() documentation. This attribute is only available
9280  * for UNIX file systems. Corresponding #GFileAttributeType is
9281  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
9282  */
9283
9284
9285 /**
9286  * G_FILE_ATTRIBUTE_UNIX_RDEV:
9287  *
9288  * A key in the "unix" namespace for getting the device ID for the file
9289  * (if it is a special file). See lstat() documentation. This attribute
9290  * is only available for UNIX file systems. Corresponding #GFileAttributeType
9291  * is %G_FILE_ATTRIBUTE_TYPE_UINT32.
9292  */
9293
9294
9295 /**
9296  * G_FILE_ATTRIBUTE_UNIX_UID:
9297  *
9298  * A key in the "unix" namespace for getting the user ID for the file.
9299  * This attribute is only available for UNIX file systems.
9300  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
9301  */
9302
9303
9304 /**
9305  * G_FLAGS_CLASS:
9306  * @class: a valid #GFlagsClass
9307  *
9308  * Casts a derived #GFlagsClass structure into a #GFlagsClass structure.
9309  */
9310
9311
9312 /**
9313  * G_FLAGS_CLASS_TYPE:
9314  * @class: a #GFlagsClass
9315  *
9316  * Get the type identifier from a given #GFlagsClass structure.
9317  *
9318  * Returns: the #GType
9319  */
9320
9321
9322 /**
9323  * G_FLAGS_CLASS_TYPE_NAME:
9324  * @class: a #GFlagsClass
9325  *
9326  * Get the static type name from a given #GFlagsClass structure.
9327  *
9328  * Returns: the type name.
9329  */
9330
9331
9332 /**
9333  * G_IMPLEMENT_INTERFACE:
9334  * @TYPE_IFACE: The #GType of the interface to add
9335  * @iface_init: The interface init function
9336  *
9337  * A convenience macro to ease interface addition in the @_C_ section
9338  * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE().
9339  * See G_DEFINE_TYPE_EXTENDED() for an example.
9340  *
9341  * Note that this macro can only be used together with the G_DEFINE_TYPE_*
9342  * macros, since it depends on variable names from those macros.
9343  *
9344  * Since: 2.4
9345  */
9346
9347
9348 /**
9349  * G_IMPLEMENT_INTERFACE_DYNAMIC:
9350  * @TYPE_IFACE: The #GType of the interface to add
9351  * @iface_init: The interface init function
9352  *
9353  * A convenience macro to ease interface addition in the @_C_ section
9354  * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED()
9355  * for an example.
9356  *
9357  * Note that this macro can only be used together with the
9358  * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable
9359  * names from that macro.
9360  *
9361  * Since: 2.24
9362  */
9363
9364
9365 /**
9366  * G_INITIALLY_UNOWNED:
9367  * @object: Object which is subject to casting.
9368  *
9369  * Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*)
9370  * pointer. Depending on the current debugging level, this function may invoke
9371  * certain runtime checks to identify invalid casts.
9372  */
9373
9374
9375 /**
9376  * G_INITIALLY_UNOWNED_CLASS:
9377  * @class: a valid #GInitiallyUnownedClass
9378  *
9379  * Casts a derived #GInitiallyUnownedClass structure into a
9380  * #GInitiallyUnownedClass structure.
9381  */
9382
9383
9384 /**
9385  * G_INITIALLY_UNOWNED_GET_CLASS:
9386  * @object: a #GInitiallyUnowned instance.
9387  *
9388  * Get the class structure associated to a #GInitiallyUnowned instance.
9389  *
9390  * Returns: pointer to object class structure.
9391  */
9392
9393
9394 /**
9395  * G_IO_ERROR:
9396  *
9397  * Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration.
9398  * See #GError for more information on error domains.
9399  */
9400
9401
9402 /**
9403  * G_IS_ENUM_CLASS:
9404  * @class: a #GEnumClass
9405  *
9406  * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM
9407  * or derived.
9408  */
9409
9410
9411 /**
9412  * G_IS_FLAGS_CLASS:
9413  * @class: a #GFlagsClass
9414  *
9415  * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS
9416  * or derived.
9417  */
9418
9419
9420 /**
9421  * G_IS_INITIALLY_UNOWNED:
9422  * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED.
9423  *
9424  * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED.
9425  */
9426
9427
9428 /**
9429  * G_IS_INITIALLY_UNOWNED_CLASS:
9430  * @class: a #GInitiallyUnownedClass
9431  *
9432  * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type
9433  * %G_TYPE_INITIALLY_UNOWNED or derived.
9434  */
9435
9436
9437 /**
9438  * G_IS_OBJECT:
9439  * @object: Instance to check for being a %G_TYPE_OBJECT.
9440  *
9441  * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT.
9442  */
9443
9444
9445 /**
9446  * G_IS_OBJECT_CLASS:
9447  * @class: a #GObjectClass
9448  *
9449  * Checks whether @class "is a" valid #GObjectClass structure of type
9450  * %G_TYPE_OBJECT or derived.
9451  */
9452
9453
9454 /**
9455  * G_IS_PARAM_SPEC:
9456  * @pspec: a #GParamSpec
9457  *
9458  * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM
9459  * or derived.
9460  */
9461
9462
9463 /**
9464  * G_IS_PARAM_SPEC_BOOLEAN:
9465  * @pspec: a valid #GParamSpec instance
9466  *
9467  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
9468  *
9469  * Returns: %TRUE on success.
9470  */
9471
9472
9473 /**
9474  * G_IS_PARAM_SPEC_BOXED:
9475  * @pspec: a valid #GParamSpec instance
9476  *
9477  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
9478  *
9479  * Returns: %TRUE on success.
9480  */
9481
9482
9483 /**
9484  * G_IS_PARAM_SPEC_CHAR:
9485  * @pspec: a valid #GParamSpec instance
9486  *
9487  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
9488  *
9489  * Returns: %TRUE on success.
9490  */
9491
9492
9493 /**
9494  * G_IS_PARAM_SPEC_CLASS:
9495  * @pclass: a #GParamSpecClass
9496  *
9497  * Checks whether @pclass "is a" valid #GParamSpecClass structure of type
9498  * %G_TYPE_PARAM or derived.
9499  */
9500
9501
9502 /**
9503  * G_IS_PARAM_SPEC_DOUBLE:
9504  * @pspec: a valid #GParamSpec instance
9505  *
9506  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
9507  *
9508  * Returns: %TRUE on success.
9509  */
9510
9511
9512 /**
9513  * G_IS_PARAM_SPEC_ENUM:
9514  * @pspec: a valid #GParamSpec instance
9515  *
9516  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
9517  *
9518  * Returns: %TRUE on success.
9519  */
9520
9521
9522 /**
9523  * G_IS_PARAM_SPEC_FLAGS:
9524  * @pspec: a valid #GParamSpec instance
9525  *
9526  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
9527  *
9528  * Returns: %TRUE on success.
9529  */
9530
9531
9532 /**
9533  * G_IS_PARAM_SPEC_FLOAT:
9534  * @pspec: a valid #GParamSpec instance
9535  *
9536  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
9537  *
9538  * Returns: %TRUE on success.
9539  */
9540
9541
9542 /**
9543  * G_IS_PARAM_SPEC_GTYPE:
9544  * @pspec: a #GParamSpec
9545  *
9546  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
9547  *
9548  * Since: 2.10
9549  * Returns: %TRUE on success.
9550  */
9551
9552
9553 /**
9554  * G_IS_PARAM_SPEC_INT:
9555  * @pspec: a valid #GParamSpec instance
9556  *
9557  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
9558  *
9559  * Returns: %TRUE on success.
9560  */
9561
9562
9563 /**
9564  * G_IS_PARAM_SPEC_INT64:
9565  * @pspec: a valid #GParamSpec instance
9566  *
9567  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
9568  *
9569  * Returns: %TRUE on success.
9570  */
9571
9572
9573 /**
9574  * G_IS_PARAM_SPEC_LONG:
9575  * @pspec: a valid #GParamSpec instance
9576  *
9577  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
9578  *
9579  * Returns: %TRUE on success.
9580  */
9581
9582
9583 /**
9584  * G_IS_PARAM_SPEC_OBJECT:
9585  * @pspec: a valid #GParamSpec instance
9586  *
9587  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
9588  *
9589  * Returns: %TRUE on success.
9590  */
9591
9592
9593 /**
9594  * G_IS_PARAM_SPEC_OVERRIDE:
9595  * @pspec: a #GParamSpec
9596  *
9597  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
9598  *
9599  * Since: 2.4
9600  * Returns: %TRUE on success.
9601  */
9602
9603
9604 /**
9605  * G_IS_PARAM_SPEC_PARAM:
9606  * @pspec: a valid #GParamSpec instance
9607  *
9608  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
9609  *
9610  * Returns: %TRUE on success.
9611  */
9612
9613
9614 /**
9615  * G_IS_PARAM_SPEC_POINTER:
9616  * @pspec: a valid #GParamSpec instance
9617  *
9618  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
9619  *
9620  * Returns: %TRUE on success.
9621  */
9622
9623
9624 /**
9625  * G_IS_PARAM_SPEC_STRING:
9626  * @pspec: a valid #GParamSpec instance
9627  *
9628  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
9629  *
9630  * Returns: %TRUE on success.
9631  */
9632
9633
9634 /**
9635  * G_IS_PARAM_SPEC_UCHAR:
9636  * @pspec: a valid #GParamSpec instance
9637  *
9638  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
9639  *
9640  * Returns: %TRUE on success.
9641  */
9642
9643
9644 /**
9645  * G_IS_PARAM_SPEC_UINT:
9646  * @pspec: a valid #GParamSpec instance
9647  *
9648  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
9649  *
9650  * Returns: %TRUE on success.
9651  */
9652
9653
9654 /**
9655  * G_IS_PARAM_SPEC_UINT64:
9656  * @pspec: a valid #GParamSpec instance
9657  *
9658  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
9659  *
9660  * Returns: %TRUE on success.
9661  */
9662
9663
9664 /**
9665  * G_IS_PARAM_SPEC_ULONG:
9666  * @pspec: a valid #GParamSpec instance
9667  *
9668  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
9669  *
9670  * Returns: %TRUE on success.
9671  */
9672
9673
9674 /**
9675  * G_IS_PARAM_SPEC_UNICHAR:
9676  * @pspec: a valid #GParamSpec instance
9677  *
9678  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
9679  *
9680  * Returns: %TRUE on success.
9681  */
9682
9683
9684 /**
9685  * G_IS_PARAM_SPEC_VALUE_ARRAY:
9686  * @pspec: a valid #GParamSpec instance
9687  *
9688  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
9689  *
9690  * Returns: %TRUE on success.
9691  * Deprecated: 2.32: Use #GArray instead of #GValueArray
9692  */
9693
9694
9695 /**
9696  * G_IS_PARAM_SPEC_VARIANT:
9697  * @pspec: a #GParamSpec
9698  *
9699  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
9700  *
9701  * Returns: %TRUE on success
9702  * Since: 2.26
9703  */
9704
9705
9706 /**
9707  * G_IS_VALUE:
9708  * @value: A #GValue structure.
9709  *
9710  * Checks if @value is a valid and initialized #GValue structure.
9711  *
9712  * Returns: %TRUE on success.
9713  */
9714
9715
9716 /**
9717  * G_MARKUP_ERROR:
9718  *
9719  * Error domain for markup parsing.
9720  * Errors in this domain will be from the #GMarkupError enumeration.
9721  * See #GError for information on error domains.
9722  */
9723
9724
9725 /**
9726  * G_NETWORK_MONITOR_EXTENSION_POINT_NAME:
9727  *
9728  * Extension point for network status monitoring functionality.
9729  * See <link linkend="extending-gio">Extending GIO</link>.
9730  *
9731  * Since: 2.30
9732  */
9733
9734
9735 /**
9736  * G_NODE_IS_LEAF:
9737  * @node: a #GNode
9738  *
9739  * Returns %TRUE if a #GNode is a leaf node.
9740  *
9741  * (i.e. it has no children)
9742  *
9743  * Returns: %TRUE if the #GNode is a leaf node
9744  */
9745
9746
9747 /**
9748  * G_NODE_IS_ROOT:
9749  * @node: a #GNode
9750  *
9751  * Returns %TRUE if a #GNode is the root of a tree.
9752  *
9753  * (i.e. it has no parent or siblings)
9754  *
9755  * Returns: %TRUE if the #GNode is the root of a tree
9756  */
9757
9758
9759 /**
9760  * G_OBJECT:
9761  * @object: Object which is subject to casting.
9762  *
9763  * Casts a #GObject or derived pointer into a (GObject*) pointer.
9764  * Depending on the current debugging level, this function may invoke
9765  * certain runtime checks to identify invalid casts.
9766  */
9767
9768
9769 /**
9770  * G_OBJECT_CLASS:
9771  * @class: a valid #GObjectClass
9772  *
9773  * Casts a derived #GObjectClass structure into a #GObjectClass structure.
9774  */
9775
9776
9777 /**
9778  * G_OBJECT_CLASS_NAME:
9779  * @class: a valid #GObjectClass
9780  *
9781  * Return the name of a class structure's type.
9782  *
9783  * should not be freed.
9784  *
9785  * Returns: Type name of @class. The string is owned by the type system and
9786  */
9787
9788
9789 /**
9790  * G_OBJECT_CLASS_TYPE:
9791  * @class: a valid #GObjectClass
9792  *
9793  * Get the type id of a class structure.
9794  *
9795  * Returns: Type id of @class.
9796  */
9797
9798
9799 /**
9800  * G_OBJECT_GET_CLASS:
9801  * @object: a #GObject instance.
9802  *
9803  * Get the class structure associated to a #GObject instance.
9804  *
9805  * Returns: pointer to object class structure.
9806  */
9807
9808
9809 /**
9810  * G_OBJECT_TYPE:
9811  * @object: Object to return the type id for.
9812  *
9813  * Get the type id of an object.
9814  *
9815  * Returns: Type id of @object.
9816  */
9817
9818
9819 /**
9820  * G_OBJECT_TYPE_NAME:
9821  * @object: Object to return the type name for.
9822  *
9823  * Get the name of an object's type.
9824  *
9825  * should not be freed.
9826  *
9827  * Returns: Type name of @object. The string is owned by the type system and
9828  */
9829
9830
9831 /**
9832  * G_OBJECT_WARN_INVALID_PROPERTY_ID:
9833  * @object: the #GObject on which set_property() or get_property() was called
9834  * @property_id: the numeric id of the property
9835  * @pspec: the #GParamSpec of the property
9836  *
9837  * This macro should be used to emit a standard warning about unexpected
9838  * properties in set_property() and get_property() implementations.
9839  */
9840
9841
9842 /**
9843  * G_OPTION_ERROR:
9844  *
9845  * Error domain for option parsing. Errors in this domain will
9846  * be from the #GOptionError enumeration. See #GError for information on
9847  * error domains.
9848  */
9849
9850
9851 /**
9852  * G_OPTION_REMAINING:
9853  *
9854  * If a long option in the main group has this name, it is not treated as a
9855  * regular option. Instead it collects all non-option arguments which would
9856  * otherwise be left in <literal>argv</literal>. The option must be of type
9857  * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY
9858  * or %G_OPTION_ARG_FILENAME_ARRAY.
9859  *
9860  *
9861  * Using #G_OPTION_REMAINING instead of simply scanning <literal>argv</literal>
9862  * for leftover arguments has the advantage that GOption takes care of
9863  * necessary encoding conversions for strings or filenames.
9864  *
9865  * Since: 2.6
9866  */
9867
9868
9869 /**
9870  * G_PARAM_MASK:
9871  *
9872  * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
9873  */
9874
9875
9876 /**
9877  * G_PARAM_READWRITE:
9878  *
9879  * #GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.
9880  */
9881
9882
9883 /**
9884  * G_PARAM_SPEC:
9885  * @pspec: a valid #GParamSpec
9886  *
9887  * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into
9888  * a #GParamSpec object.
9889  */
9890
9891
9892 /**
9893  * G_PARAM_SPEC_BOOLEAN:
9894  * @pspec: a valid #GParamSpec instance
9895  *
9896  * Cast a #GParamSpec instance into a #GParamSpecBoolean.
9897  */
9898
9899
9900 /**
9901  * G_PARAM_SPEC_BOXED:
9902  * @pspec: a valid #GParamSpec instance
9903  *
9904  * Cast a #GParamSpec instance into a #GParamSpecBoxed.
9905  */
9906
9907
9908 /**
9909  * G_PARAM_SPEC_CHAR:
9910  * @pspec: a valid #GParamSpec instance
9911  *
9912  * Cast a #GParamSpec instance into a #GParamSpecChar.
9913  */
9914
9915
9916 /**
9917  * G_PARAM_SPEC_CLASS:
9918  * @pclass: a valid #GParamSpecClass
9919  *
9920  * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure.
9921  */
9922
9923
9924 /**
9925  * G_PARAM_SPEC_DOUBLE:
9926  * @pspec: a valid #GParamSpec instance
9927  *
9928  * Cast a #GParamSpec instance into a #GParamSpecDouble.
9929  */
9930
9931
9932 /**
9933  * G_PARAM_SPEC_ENUM:
9934  * @pspec: a valid #GParamSpec instance
9935  *
9936  * Cast a #GParamSpec instance into a #GParamSpecEnum.
9937  */
9938
9939
9940 /**
9941  * G_PARAM_SPEC_FLAGS:
9942  * @pspec: a valid #GParamSpec instance
9943  *
9944  * Cast a #GParamSpec instance into a #GParamSpecFlags.
9945  */
9946
9947
9948 /**
9949  * G_PARAM_SPEC_FLOAT:
9950  * @pspec: a valid #GParamSpec instance
9951  *
9952  * Cast a #GParamSpec instance into a #GParamSpecFloat.
9953  */
9954
9955
9956 /**
9957  * G_PARAM_SPEC_GET_CLASS:
9958  * @pspec: a valid #GParamSpec
9959  *
9960  * Retrieves the #GParamSpecClass of a #GParamSpec.
9961  */
9962
9963
9964 /**
9965  * G_PARAM_SPEC_GTYPE:
9966  * @pspec: a #GParamSpec
9967  *
9968  * Casts a #GParamSpec into a #GParamSpecGType.
9969  *
9970  * Since: 2.10
9971  */
9972
9973
9974 /**
9975  * G_PARAM_SPEC_INT:
9976  * @pspec: a valid #GParamSpec instance
9977  *
9978  * Cast a #GParamSpec instance into a #GParamSpecInt.
9979  */
9980
9981
9982 /**
9983  * G_PARAM_SPEC_INT64:
9984  * @pspec: a valid #GParamSpec instance
9985  *
9986  * Cast a #GParamSpec instance into a #GParamSpecInt64.
9987  */
9988
9989
9990 /**
9991  * G_PARAM_SPEC_LONG:
9992  * @pspec: a valid #GParamSpec instance
9993  *
9994  * Cast a #GParamSpec instance into a #GParamSpecLong.
9995  */
9996
9997
9998 /**
9999  * G_PARAM_SPEC_OBJECT:
10000  * @pspec: a valid #GParamSpec instance
10001  *
10002  * Casts a #GParamSpec instance into a #GParamSpecObject.
10003  */
10004
10005
10006 /**
10007  * G_PARAM_SPEC_OVERRIDE:
10008  * @pspec: a #GParamSpec
10009  *
10010  * Casts a #GParamSpec into a #GParamSpecOverride.
10011  *
10012  * Since: 2.4
10013  */
10014
10015
10016 /**
10017  * G_PARAM_SPEC_PARAM:
10018  * @pspec: a valid #GParamSpec instance
10019  *
10020  * Casts a #GParamSpec instance into a #GParamSpecParam.
10021  */
10022
10023
10024 /**
10025  * G_PARAM_SPEC_POINTER:
10026  * @pspec: a valid #GParamSpec instance
10027  *
10028  * Casts a #GParamSpec instance into a #GParamSpecPointer.
10029  */
10030
10031
10032 /**
10033  * G_PARAM_SPEC_STRING:
10034  * @pspec: a valid #GParamSpec instance
10035  *
10036  * Casts a #GParamSpec instance into a #GParamSpecString.
10037  */
10038
10039
10040 /**
10041  * G_PARAM_SPEC_TYPE:
10042  * @pspec: a valid #GParamSpec
10043  *
10044  * Retrieves the #GType of this @pspec.
10045  */
10046
10047
10048 /**
10049  * G_PARAM_SPEC_TYPE_NAME:
10050  * @pspec: a valid #GParamSpec
10051  *
10052  * Retrieves the #GType name of this @pspec.
10053  */
10054
10055
10056 /**
10057  * G_PARAM_SPEC_UCHAR:
10058  * @pspec: a valid #GParamSpec instance
10059  *
10060  * Cast a #GParamSpec instance into a #GParamSpecUChar.
10061  */
10062
10063
10064 /**
10065  * G_PARAM_SPEC_UINT:
10066  * @pspec: a valid #GParamSpec instance
10067  *
10068  * Cast a #GParamSpec instance into a #GParamSpecUInt.
10069  */
10070
10071
10072 /**
10073  * G_PARAM_SPEC_UINT64:
10074  * @pspec: a valid #GParamSpec instance
10075  *
10076  * Cast a #GParamSpec instance into a #GParamSpecUInt64.
10077  */
10078
10079
10080 /**
10081  * G_PARAM_SPEC_ULONG:
10082  * @pspec: a valid #GParamSpec instance
10083  *
10084  * Cast a #GParamSpec instance into a #GParamSpecULong.
10085  */
10086
10087
10088 /**
10089  * G_PARAM_SPEC_UNICHAR:
10090  * @pspec: a valid #GParamSpec instance
10091  *
10092  * Cast a #GParamSpec instance into a #GParamSpecUnichar.
10093  */
10094
10095
10096 /**
10097  * G_PARAM_SPEC_VALUE_ARRAY:
10098  * @pspec: a valid #GParamSpec instance
10099  *
10100  * Cast a #GParamSpec instance into a #GParamSpecValueArray.
10101  *
10102  * Deprecated: 2.32: Use #GArray instead of #GValueArray
10103  */
10104
10105
10106 /**
10107  * G_PARAM_SPEC_VALUE_TYPE:
10108  * @pspec: a valid #GParamSpec
10109  *
10110  * Retrieves the #GType to initialize a #GValue for this parameter.
10111  */
10112
10113
10114 /**
10115  * G_PARAM_SPEC_VARIANT:
10116  * @pspec: a #GParamSpec
10117  *
10118  * Casts a #GParamSpec into a #GParamSpecVariant.
10119  *
10120  * Since: 2.26
10121  */
10122
10123
10124 /**
10125  * G_PARAM_STATIC_STRINGS:
10126  *
10127  * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
10128  *
10129  * Since 2.13.0
10130  */
10131
10132
10133 /**
10134  * G_PARAM_USER_SHIFT:
10135  *
10136  * Minimum shift count to be used for user defined flags, to be stored in
10137  * #GParamSpec.flags. The maximum allowed is 30 + G_PARAM_USER_SHIFT.
10138  */
10139
10140
10141 /**
10142  * G_PRIORITY_DEFAULT:
10143  *
10144  * Use this for default priority event sources.
10145  *
10146  * In GLib this priority is used when adding timeout functions
10147  * with g_timeout_add(). In GDK this priority is used for events
10148  * from the X server.
10149  */
10150
10151
10152 /**
10153  * G_PRIORITY_DEFAULT_IDLE:
10154  *
10155  * Use this for default priority idle functions.
10156  *
10157  * In GLib this priority is used when adding idle functions with
10158  * g_idle_add().
10159  */
10160
10161
10162 /**
10163  * G_PRIORITY_HIGH:
10164  *
10165  * Use this for high priority event sources.
10166  *
10167  * It is not used within GLib or GTK+.
10168  */
10169
10170
10171 /**
10172  * G_PRIORITY_HIGH_IDLE:
10173  *
10174  * Use this for high priority idle functions.
10175  *
10176  * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations,
10177  * and #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is
10178  * done to ensure that any pending resizes are processed before any
10179  * pending redraws, so that widgets are not redrawn twice unnecessarily.)
10180  */
10181
10182
10183 /**
10184  * G_PRIORITY_LOW:
10185  *
10186  * Use this for very low priority background tasks.
10187  *
10188  * It is not used within GLib or GTK+.
10189  */
10190
10191
10192 /**
10193  * G_PROXY_EXTENSION_POINT_NAME:
10194  *
10195  * Extension point for proxy functionality.
10196  * See <link linkend="extending-gio">Extending GIO</link>.
10197  *
10198  * Since: 2.26
10199  */
10200
10201
10202 /**
10203  * G_PROXY_RESOLVER_EXTENSION_POINT_NAME:
10204  *
10205  * Extension point for proxy resolving functionality.
10206  * See <link linkend="extending-gio">Extending GIO</link>.
10207  */
10208
10209
10210 /**
10211  * G_QUEUE_INIT:
10212  *
10213  * A statically-allocated #GQueue must be initialized with this
10214  * macro before it can be used. This macro can be used to initialize
10215  * a variable, but it cannot be assigned to a variable. In that case
10216  * you have to use g_queue_init().
10217  *
10218  * |[
10219  * GQueue my_queue = G_QUEUE_INIT;
10220  * ]|
10221  *
10222  * Since: 2.14
10223  */
10224
10225
10226 /**
10227  * G_REGEX_ERROR:
10228  *
10229  * Error domain for regular expressions. Errors in this domain will be
10230  * from the #GRegexError enumeration. See #GError for information on
10231  * error domains.
10232  *
10233  * Since: 2.14
10234  */
10235
10236
10237 /**
10238  * G_RESOLVER_ERROR:
10239  *
10240  * Error domain for #GResolver. Errors in this domain will be from the
10241  * #GResolverError enumeration. See #GError for more information on
10242  * error domains.
10243  */
10244
10245
10246 /**
10247  * G_RESOURCE_ERROR:
10248  *
10249  * Error domain for #GResource. Errors in this domain will be from the
10250  * #GResourceError enumeration. See #GError for more information on
10251  * error domains.
10252  */
10253
10254
10255 /**
10256  * G_SETTINGS_BACKEND_EXTENSION_POINT_NAME:
10257  *
10258  * Extension point for #GSettingsBackend functionality.
10259  */
10260
10261
10262 /**
10263  * G_SIGNAL_FLAGS_MASK:
10264  *
10265  * A mask for all #GSignalFlags bits.
10266  */
10267
10268
10269 /**
10270  * G_SIGNAL_MATCH_MASK:
10271  *
10272  * A mask for all #GSignalMatchType bits.
10273  */
10274
10275
10276 /**
10277  * G_SIGNAL_TYPE_STATIC_SCOPE:
10278  *
10279  * This macro flags signal argument types for which the signal system may
10280  * assume that instances thereof remain persistent across all signal emissions
10281  * they are used in. This is only useful for non ref-counted, value-copy types.
10282  *
10283  * To flag a signal argument in this way, add
10284  * <literal>| G_SIGNAL_TYPE_STATIC_SCOPE</literal> to the corresponding argument
10285  * of g_signal_new().
10286  * |[
10287  * g_signal_new ("size_request",
10288  * G_TYPE_FROM_CLASS (gobject_class),
10289  * G_SIGNAL_RUN_FIRST,
10290  * G_STRUCT_OFFSET (GtkWidgetClass, size_request),
10291  * NULL, NULL,
10292  * _gtk_marshal_VOID__BOXED,
10293  * G_TYPE_NONE, 1,
10294  * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
10295  * ]|
10296  */
10297
10298
10299 /**
10300  * G_SOURCE_CONTINUE:
10301  *
10302  * Use this macro as the return value of a #GSourceFunc to leave
10303  * the #GSource in the main loop.
10304  *
10305  * Since: 2.28
10306  */
10307
10308
10309 /**
10310  * G_SOURCE_REMOVE:
10311  *
10312  * Use this macro as the return value of a #GSourceFunc to remove
10313  * the #GSource from the main loop.
10314  *
10315  * Since: 2.28
10316  */
10317
10318
10319 /**
10320  * G_SPAWN_ERROR:
10321  *
10322  * Error domain for spawning processes. Errors in this domain will
10323  * be from the #GSpawnError enumeration. See #GError for information on
10324  * error domains.
10325  */
10326
10327
10328 /**
10329  * G_TIME_SPAN_DAY:
10330  *
10331  * Evaluates to a time span of one day.
10332  *
10333  * Since: 2.26
10334  */
10335
10336
10337 /**
10338  * G_TIME_SPAN_HOUR:
10339  *
10340  * Evaluates to a time span of one hour.
10341  *
10342  * Since: 2.26
10343  */
10344
10345
10346 /**
10347  * G_TIME_SPAN_MILLISECOND:
10348  *
10349  * Evaluates to a time span of one millisecond.
10350  *
10351  * Since: 2.26
10352  */
10353
10354
10355 /**
10356  * G_TIME_SPAN_MINUTE:
10357  *
10358  * Evaluates to a time span of one minute.
10359  *
10360  * Since: 2.26
10361  */
10362
10363
10364 /**
10365  * G_TIME_SPAN_SECOND:
10366  *
10367  * Evaluates to a time span of one second.
10368  *
10369  * Since: 2.26
10370  */
10371
10372
10373 /**
10374  * G_TLS_BACKEND_EXTENSION_POINT_NAME:
10375  *
10376  * Extension point for TLS functionality via #GTlsBackend.
10377  * See <link linkend="extending-gio">Extending GIO</link>.
10378  */
10379
10380
10381 /**
10382  * G_TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT:
10383  *
10384  * The purpose used to verify the client certificate in a TLS connection.
10385  * Used by TLS servers.
10386  */
10387
10388
10389 /**
10390  * G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER:
10391  *
10392  * The purpose used to verify the server certificate in a TLS connection. This
10393  * is the most common purpose in use. Used by TLS clients.
10394  */
10395
10396
10397 /**
10398  * G_TLS_ERROR:
10399  *
10400  * Error domain for TLS. Errors in this domain will be from the
10401  * #GTlsError enumeration. See #GError for more information on error
10402  * domains.
10403  */
10404
10405
10406 /**
10407  * G_TYPE_ARRAY:
10408  *
10409  * The #GType for a boxed type holding a #GArray reference.
10410  *
10411  * Since: 2.22
10412  */
10413
10414
10415 /**
10416  * G_TYPE_BOOLEAN:
10417  *
10418  * The fundamental type corresponding to #gboolean.
10419  */
10420
10421
10422 /**
10423  * G_TYPE_BOXED:
10424  *
10425  * The fundamental type from which all boxed types are derived.
10426  */
10427
10428
10429 /**
10430  * G_TYPE_BYTES:
10431  *
10432  * The #GType for #GBytes.
10433  *
10434  * Since: 2.32
10435  */
10436
10437
10438 /**
10439  * G_TYPE_BYTE_ARRAY:
10440  *
10441  * The #GType for a boxed type holding a #GByteArray reference.
10442  *
10443  * Since: 2.22
10444  */
10445
10446
10447 /**
10448  * G_TYPE_CHAR:
10449  *
10450  * The fundamental type corresponding to #gchar.
10451  * The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
10452  * This may or may not be the same type a the C type "gchar".
10453  */
10454
10455
10456 /**
10457  * G_TYPE_CHECK_CLASS_CAST:
10458  * @g_class: Location of a #GTypeClass structure.
10459  * @g_type: The type to be returned.
10460  * @c_type: The corresponding C type of class structure of @g_type.
10461  *
10462  * Checks that @g_class is a class structure of the type identified by @g_type
10463  * and issues a warning if this is not the case. Returns @g_class casted
10464  * to a pointer to @c_type.
10465  *
10466  * This macro should only be used in type implementations.
10467  */
10468
10469
10470 /**
10471  * G_TYPE_CHECK_CLASS_TYPE:
10472  * @g_class: Location of a #GTypeClass structure.
10473  * @g_type: The type to be checked.
10474  *
10475  * Checks if @g_class is a class structure of the type identified by
10476  * @g_type.
10477  *
10478  * This macro should only be used in type implementations.
10479  *
10480  * Returns: %TRUE on success.
10481  */
10482
10483
10484 /**
10485  * G_TYPE_CHECK_INSTANCE:
10486  * @instance: Location of a #GTypeInstance structure.
10487  *
10488  * Checks if @instance is a valid #GTypeInstance structure,
10489  * otherwise issues a warning and returns %FALSE.
10490  *
10491  * This macro should only be used in type implementations.
10492  *
10493  * Returns: %TRUE on success.
10494  */
10495
10496
10497 /**
10498  * G_TYPE_CHECK_INSTANCE_CAST:
10499  * @instance: Location of a #GTypeInstance structure.
10500  * @g_type: The type to be returned.
10501  * @c_type: The corresponding C type of @g_type.
10502  *
10503  * Checks that @instance is an instance of the type identified by @g_type
10504  * and issues a warning if this is not the case. Returns @instance casted
10505  * to a pointer to @c_type.
10506  *
10507  * This macro should only be used in type implementations.
10508  */
10509
10510
10511 /**
10512  * G_TYPE_CHECK_INSTANCE_TYPE:
10513  * @instance: Location of a #GTypeInstance structure.
10514  * @g_type: The type to be checked
10515  *
10516  * Checks if @instance is an instance of the type identified by @g_type.
10517  *
10518  * This macro should only be used in type implementations.
10519  *
10520  * Returns: %TRUE on success.
10521  */
10522
10523
10524 /**
10525  * G_TYPE_CHECK_VALUE:
10526  * @value: a #GValue
10527  *
10528  * Checks if @value has been initialized to hold values
10529  * of a value type.
10530  *
10531  * This macro should only be used in type implementations.
10532  *
10533  * Returns: %TRUE on success.
10534  */
10535
10536
10537 /**
10538  * G_TYPE_CHECK_VALUE_TYPE:
10539  * @value: a #GValue
10540  * @g_type: The type to be checked.
10541  *
10542  * Checks if @value has been initialized to hold values
10543  * of type @g_type.
10544  *
10545  * This macro should only be used in type implementations.
10546  *
10547  * Returns: %TRUE on success.
10548  */
10549
10550
10551 /**
10552  * G_TYPE_CLASS_GET_PRIVATE:
10553  * @klass: the class of a type deriving from @private_type.
10554  * @g_type: the type identifying which private data to retrieve.
10555  * @c_type: The C type for the private structure.
10556  *
10557  * Gets the private class structure for a particular type.
10558  * The private structure must have been registered in the
10559  * get_type() function with g_type_add_class_private().
10560  *
10561  * This macro should only be used in type implementations.
10562  *
10563  * Since: 2.24
10564  * Returns: a pointer to the private data structure.
10565  */
10566
10567
10568 /**
10569  * G_TYPE_CLOSURE:
10570  *
10571  * The #GType for #GClosure.
10572  */
10573
10574
10575 /**
10576  * G_TYPE_DATE:
10577  *
10578  * The #GType for #GDate.
10579  */
10580
10581
10582 /**
10583  * G_TYPE_DATE_TIME:
10584  *
10585  * The #GType for a boxed type holding a #GDateTime.
10586  *
10587  * Since: 2.26
10588  */
10589
10590
10591 /**
10592  * G_TYPE_DBUS_ANNOTATION_INFO:
10593  *
10594  * The #GType for a boxed type holding a #GDBusAnnotationInfo.
10595  *
10596  * Since: 2.26
10597  */
10598
10599
10600 /**
10601  * G_TYPE_DBUS_ARG_INFO:
10602  *
10603  * The #GType for a boxed type holding a #GDBusArgInfo.
10604  *
10605  * Since: 2.26
10606  */
10607
10608
10609 /**
10610  * G_TYPE_DBUS_INTERFACE_INFO:
10611  *
10612  * The #GType for a boxed type holding a #GDBusInterfaceInfo.
10613  *
10614  * Since: 2.26
10615  */
10616
10617
10618 /**
10619  * G_TYPE_DBUS_METHOD_INFO:
10620  *
10621  * The #GType for a boxed type holding a #GDBusMethodInfo.
10622  *
10623  * Since: 2.26
10624  */
10625
10626
10627 /**
10628  * G_TYPE_DBUS_NODE_INFO:
10629  *
10630  * The #GType for a boxed type holding a #GDBusNodeInfo.
10631  *
10632  * Since: 2.26
10633  */
10634
10635
10636 /**
10637  * G_TYPE_DBUS_PROPERTY_INFO:
10638  *
10639  * The #GType for a boxed type holding a #GDBusPropertyInfo.
10640  *
10641  * Since: 2.26
10642  */
10643
10644
10645 /**
10646  * G_TYPE_DBUS_SIGNAL_INFO:
10647  *
10648  * The #GType for a boxed type holding a #GDBusSignalInfo.
10649  *
10650  * Since: 2.26
10651  */
10652
10653
10654 /**
10655  * G_TYPE_DOUBLE:
10656  *
10657  * The fundamental type corresponding to #gdouble.
10658  */
10659
10660
10661 /**
10662  * G_TYPE_ENUM:
10663  *
10664  * The fundamental type from which all enumeration types are derived.
10665  */
10666
10667
10668 /**
10669  * G_TYPE_ERROR:
10670  *
10671  * The #GType for a boxed type holding a #GError.
10672  *
10673  * Since: 2.26
10674  */
10675
10676
10677 /**
10678  * G_TYPE_FLAGS:
10679  *
10680  * The fundamental type from which all flags types are derived.
10681  */
10682
10683
10684 /**
10685  * G_TYPE_FLAG_RESERVED_ID_BIT:
10686  *
10687  * A bit in the type number that's supposed to be left untouched.
10688  */
10689
10690
10691 /**
10692  * G_TYPE_FLOAT:
10693  *
10694  * The fundamental type corresponding to #gfloat.
10695  */
10696
10697
10698 /**
10699  * G_TYPE_FROM_CLASS:
10700  * @g_class: Location of a valid #GTypeClass structure.
10701  *
10702  * Get the type identifier from a given @class structure.
10703  *
10704  * This macro should only be used in type implementations.
10705  *
10706  * Returns: the #GType
10707  */
10708
10709
10710 /**
10711  * G_TYPE_FROM_INSTANCE:
10712  * @instance: Location of a valid #GTypeInstance structure.
10713  *
10714  * Get the type identifier from a given @instance structure.
10715  *
10716  * This macro should only be used in type implementations.
10717  *
10718  * Returns: the #GType
10719  */
10720
10721
10722 /**
10723  * G_TYPE_FROM_INTERFACE:
10724  * @g_iface: Location of a valid #GTypeInterface structure.
10725  *
10726  * Get the type identifier from a given @interface structure.
10727  *
10728  * This macro should only be used in type implementations.
10729  *
10730  * Returns: the #GType
10731  */
10732
10733
10734 /**
10735  * G_TYPE_FUNDAMENTAL:
10736  * @type: A #GType value.
10737  *
10738  * The fundamental type which is the ancestor of @type.
10739  * Fundamental types are types that serve as ultimate bases for the derived types,
10740  * thus they are the roots of distinct inheritance hierarchies.
10741  */
10742
10743
10744 /**
10745  * G_TYPE_FUNDAMENTAL_MAX:
10746  *
10747  * An integer constant that represents the number of identifiers reserved
10748  * for types that are assigned at compile-time.
10749  */
10750
10751
10752 /**
10753  * G_TYPE_FUNDAMENTAL_SHIFT:
10754  *
10755  * Shift value used in converting numbers to type IDs.
10756  */
10757
10758
10759 /**
10760  * G_TYPE_GSTRING:
10761  *
10762  * The #GType for #GString.
10763  */
10764
10765
10766 /**
10767  * G_TYPE_GTYPE:
10768  *
10769  * The type for #GType.
10770  */
10771
10772
10773 /**
10774  * G_TYPE_HASH_TABLE:
10775  *
10776  * The #GType for a boxed type holding a #GHashTable reference.
10777  *
10778  * Since: 2.10
10779  */
10780
10781
10782 /**
10783  * G_TYPE_HAS_VALUE_TABLE:
10784  * @type: A #GType value.
10785  *
10786  * Checks if @type has a #GTypeValueTable.
10787  *
10788  * Returns: %TRUE on success.
10789  */
10790
10791
10792 /**
10793  * G_TYPE_INITIALLY_UNOWNED:
10794  *
10795  * The type for #GInitiallyUnowned.
10796  */
10797
10798
10799 /**
10800  * G_TYPE_INSTANCE_GET_CLASS:
10801  * @instance: Location of the #GTypeInstance structure.
10802  * @g_type: The #GType of the class to be returned.
10803  * @c_type: The C type of the class structure.
10804  *
10805  * Get the class structure of a given @instance, casted
10806  * to a specified ancestor type @g_type of the instance.
10807  *
10808  * Note that while calling a GInstanceInitFunc(), the class pointer gets
10809  * modified, so it might not always return the expected pointer.
10810  *
10811  * This macro should only be used in type implementations.
10812  *
10813  * Returns: a pointer to the class structure
10814  */
10815
10816
10817 /**
10818  * G_TYPE_INSTANCE_GET_INTERFACE:
10819  * @instance: Location of the #GTypeInstance structure.
10820  * @g_type: The #GType of the interface to be returned.
10821  * @c_type: The C type of the interface structure.
10822  *
10823  * Get the interface structure for interface @g_type of a given @instance.
10824  *
10825  * This macro should only be used in type implementations.
10826  *
10827  * Returns: a pointer to the interface structure
10828  */
10829
10830
10831 /**
10832  * G_TYPE_INSTANCE_GET_PRIVATE:
10833  * @instance: the instance of a type deriving from @private_type.
10834  * @g_type: the type identifying which private data to retrieve.
10835  * @c_type: The C type for the private structure.
10836  *
10837  * Gets the private structure for a particular type.
10838  * The private structure must have been registered in the
10839  * class_init function with g_type_class_add_private().
10840  *
10841  * This macro should only be used in type implementations.
10842  *
10843  * Since: 2.4
10844  * Returns: a pointer to the private data structure.
10845  */
10846
10847
10848 /**
10849  * G_TYPE_INT:
10850  *
10851  * The fundamental type corresponding to #gint.
10852  */
10853
10854
10855 /**
10856  * G_TYPE_INT64:
10857  *
10858  * The fundamental type corresponding to #gint64.
10859  */
10860
10861
10862 /**
10863  * G_TYPE_INTERFACE:
10864  *
10865  * The fundamental type from which all interfaces are derived.
10866  */
10867
10868
10869 /**
10870  * G_TYPE_INVALID:
10871  *
10872  * An invalid #GType used as error return value in some functions which return
10873  * a #GType.
10874  */
10875
10876
10877 /**
10878  * G_TYPE_IO_CHANNEL:
10879  *
10880  * The #GType for #GIOChannel.
10881  */
10882
10883
10884 /**
10885  * G_TYPE_IO_CONDITION:
10886  *
10887  * The #GType for #GIOCondition.
10888  */
10889
10890
10891 /**
10892  * G_TYPE_IS_ABSTRACT:
10893  * @type: A #GType value.
10894  *
10895  * Checks if @type is an abstract type.  An abstract type cannot be
10896  * instantiated and is normally used as an abstract base class for
10897  * derived classes.
10898  *
10899  * Returns: %TRUE on success.
10900  */
10901
10902
10903 /**
10904  * G_TYPE_IS_CLASSED:
10905  * @type: A #GType value.
10906  *
10907  * Checks if @type is a classed type.
10908  *
10909  * Returns: %TRUE on success.
10910  */
10911
10912
10913 /**
10914  * G_TYPE_IS_DEEP_DERIVABLE:
10915  * @type: A #GType value.
10916  *
10917  * Checks if @type is a deep derivable type.  A deep derivable type
10918  * can be used as the base class of a deep (multi-level) class hierarchy.
10919  *
10920  * Returns: %TRUE on success.
10921  */
10922
10923
10924 /**
10925  * G_TYPE_IS_DERIVABLE:
10926  * @type: A #GType value.
10927  *
10928  * Checks if @type is a derivable type.  A derivable type can
10929  * be used as the base class of a flat (single-level) class hierarchy.
10930  *
10931  * Returns: %TRUE on success.
10932  */
10933
10934
10935 /**
10936  * G_TYPE_IS_DERIVED:
10937  * @type: A #GType value.
10938  *
10939  * Checks if @type is derived (or in object-oriented terminology:
10940  * inherited) from another type (this holds true for all non-fundamental
10941  * types).
10942  *
10943  * Returns: %TRUE on success.
10944  */
10945
10946
10947 /**
10948  * G_TYPE_IS_ENUM:
10949  * @type: a #GType ID.
10950  *
10951  * Checks whether @type "is a" %G_TYPE_ENUM.
10952  *
10953  * Returns: %TRUE if @type "is a" %G_TYPE_ENUM.
10954  */
10955
10956
10957 /**
10958  * G_TYPE_IS_FLAGS:
10959  * @type: a #GType ID.
10960  *
10961  * Checks whether @type "is a" %G_TYPE_FLAGS.
10962  *
10963  * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS.
10964  */
10965
10966
10967 /**
10968  * G_TYPE_IS_FUNDAMENTAL:
10969  * @type: A #GType value.
10970  *
10971  * Checks if @type is a fundamental type.
10972  *
10973  * Returns: %TRUE on success.
10974  */
10975
10976
10977 /**
10978  * G_TYPE_IS_INSTANTIATABLE:
10979  * @type: A #GType value.
10980  *
10981  * Checks if @type can be instantiated.  Instantiation is the
10982  * process of creating an instance (object) of this type.
10983  *
10984  * Returns: %TRUE on success.
10985  */
10986
10987
10988 /**
10989  * G_TYPE_IS_INTERFACE:
10990  * @type: A #GType value.
10991  *
10992  * Checks if @type is an interface type.
10993  * An interface type provides a pure API, the implementation
10994  * of which is provided by another type (which is then said to conform
10995  * to the interface).  GLib interfaces are somewhat analogous to Java
10996  * interfaces and C++ classes containing only pure virtual functions,
10997  * with the difference that GType interfaces are not derivable (but see
10998  * g_type_interface_add_prerequisite() for an alternative).
10999  *
11000  * Returns: %TRUE on success.
11001  */
11002
11003
11004 /**
11005  * G_TYPE_IS_OBJECT:
11006  * @type: Type id to check
11007  *
11008  * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it.
11009  *
11010  * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT.
11011  */
11012
11013
11014 /**
11015  * G_TYPE_IS_PARAM:
11016  * @type: a #GType ID
11017  *
11018  * Checks whether @type "is a" %G_TYPE_PARAM.
11019  */
11020
11021
11022 /**
11023  * G_TYPE_IS_VALUE:
11024  * @type: A #GType value.
11025  *
11026  * Checks whether the passed in type ID can be used for g_value_init().
11027  * That is, this macro checks whether this type provides an implementation
11028  * of the #GTypeValueTable functions required for a type to create a #GValue of.
11029  *
11030  * Returns: Whether @type is suitable as a #GValue type.
11031  */
11032
11033
11034 /**
11035  * G_TYPE_IS_VALUE_ABSTRACT:
11036  * @type: A #GType value.
11037  *
11038  * Checks if @type is an abstract value type.  An abstract value type introduces
11039  * a value table, but can't be used for g_value_init() and is normally used as
11040  * an abstract base type for derived value types.
11041  *
11042  * Returns: %TRUE on success.
11043  */
11044
11045
11046 /**
11047  * G_TYPE_IS_VALUE_TYPE:
11048  * @type: A #GType value.
11049  *
11050  * Checks if @type is a value type and can be used with g_value_init().
11051  *
11052  * Returns: %TRUE on success.
11053  */
11054
11055
11056 /**
11057  * G_TYPE_KEY_FILE:
11058  *
11059  * The #GType for a boxed type holding a #GKeyFile.
11060  *
11061  * Since: 2.32
11062  */
11063
11064
11065 /**
11066  * G_TYPE_LONG:
11067  *
11068  * The fundamental type corresponding to #glong.
11069  */
11070
11071
11072 /**
11073  * G_TYPE_MAIN_CONTEXT:
11074  *
11075  * The #GType for a boxed type holding a #GMainContext.
11076  *
11077  * Since: 2.30
11078  */
11079
11080
11081 /**
11082  * G_TYPE_MAIN_LOOP:
11083  *
11084  * The #GType for a boxed type holding a #GMainLoop.
11085  *
11086  * Since: 2.30
11087  */
11088
11089
11090 /**
11091  * G_TYPE_MAKE_FUNDAMENTAL:
11092  * @x: the fundamental type number.
11093  *
11094  * Get the type ID for the fundamental type number @x.
11095  * Use g_type_fundamental_next() instead of this macro to create new fundamental
11096  * types.
11097  *
11098  * Returns: the GType
11099  */
11100
11101
11102 /**
11103  * G_TYPE_MATCH_INFO:
11104  *
11105  * The #GType for a boxed type holding a #GMatchInfo reference.
11106  *
11107  * Since: 2.30
11108  */
11109
11110
11111 /**
11112  * G_TYPE_NONE:
11113  *
11114  * A fundamental type which is used as a replacement for the C
11115  * <literal>void</literal> return type.
11116  */
11117
11118
11119 /**
11120  * G_TYPE_OBJECT:
11121  *
11122  * The fundamental type for #GObject.
11123  */
11124
11125
11126 /**
11127  * G_TYPE_PARAM:
11128  *
11129  * The fundamental type from which all #GParamSpec types are derived.
11130  */
11131
11132
11133 /**
11134  * G_TYPE_PARAM_BOOLEAN:
11135  *
11136  * The #GType of #GParamSpecBoolean.
11137  */
11138
11139
11140 /**
11141  * G_TYPE_PARAM_BOXED:
11142  *
11143  * The #GType of #GParamSpecBoxed.
11144  */
11145
11146
11147 /**
11148  * G_TYPE_PARAM_CHAR:
11149  *
11150  * The #GType of #GParamSpecChar.
11151  */
11152
11153
11154 /**
11155  * G_TYPE_PARAM_DOUBLE:
11156  *
11157  * The #GType of #GParamSpecDouble.
11158  */
11159
11160
11161 /**
11162  * G_TYPE_PARAM_ENUM:
11163  *
11164  * The #GType of #GParamSpecEnum.
11165  */
11166
11167
11168 /**
11169  * G_TYPE_PARAM_FLAGS:
11170  *
11171  * The #GType of #GParamSpecFlags.
11172  */
11173
11174
11175 /**
11176  * G_TYPE_PARAM_FLOAT:
11177  *
11178  * The #GType of #GParamSpecFloat.
11179  */
11180
11181
11182 /**
11183  * G_TYPE_PARAM_GTYPE:
11184  *
11185  * The #GType of #GParamSpecGType.
11186  *
11187  * Since: 2.10
11188  */
11189
11190
11191 /**
11192  * G_TYPE_PARAM_INT:
11193  *
11194  * The #GType of #GParamSpecInt.
11195  */
11196
11197
11198 /**
11199  * G_TYPE_PARAM_INT64:
11200  *
11201  * The #GType of #GParamSpecInt64.
11202  */
11203
11204
11205 /**
11206  * G_TYPE_PARAM_LONG:
11207  *
11208  * The #GType of #GParamSpecLong.
11209  */
11210
11211
11212 /**
11213  * G_TYPE_PARAM_OBJECT:
11214  *
11215  * The #GType of #GParamSpecObject.
11216  */
11217
11218
11219 /**
11220  * G_TYPE_PARAM_OVERRIDE:
11221  *
11222  * The #GType of #GParamSpecOverride.
11223  *
11224  * Since: 2.4
11225  */
11226
11227
11228 /**
11229  * G_TYPE_PARAM_PARAM:
11230  *
11231  * The #GType of #GParamSpecParam.
11232  */
11233
11234
11235 /**
11236  * G_TYPE_PARAM_POINTER:
11237  *
11238  * The #GType of #GParamSpecPointer.
11239  */
11240
11241
11242 /**
11243  * G_TYPE_PARAM_STRING:
11244  *
11245  * The #GType of #GParamSpecString.
11246  */
11247
11248
11249 /**
11250  * G_TYPE_PARAM_UCHAR:
11251  *
11252  * The #GType of #GParamSpecUChar.
11253  */
11254
11255
11256 /**
11257  * G_TYPE_PARAM_UINT:
11258  *
11259  * The #GType of #GParamSpecUInt.
11260  */
11261
11262
11263 /**
11264  * G_TYPE_PARAM_UINT64:
11265  *
11266  * The #GType of #GParamSpecUInt64.
11267  */
11268
11269
11270 /**
11271  * G_TYPE_PARAM_ULONG:
11272  *
11273  * The #GType of #GParamSpecULong.
11274  */
11275
11276
11277 /**
11278  * G_TYPE_PARAM_UNICHAR:
11279  *
11280  * The #GType of #GParamSpecUnichar.
11281  */
11282
11283
11284 /**
11285  * G_TYPE_PARAM_VALUE_ARRAY:
11286  *
11287  * The #GType of #GParamSpecValueArray.
11288  *
11289  * Deprecated: 2.32: Use #GArray instead of #GValueArray
11290  */
11291
11292
11293 /**
11294  * G_TYPE_PARAM_VARIANT:
11295  *
11296  * The #GType of #GParamSpecVariant.
11297  *
11298  * Since: 2.26
11299  */
11300
11301
11302 /**
11303  * G_TYPE_POINTER:
11304  *
11305  * The fundamental type corresponding to #gpointer.
11306  */
11307
11308
11309 /**
11310  * G_TYPE_PTR_ARRAY:
11311  *
11312  * The #GType for a boxed type holding a #GPtrArray reference.
11313  *
11314  * Since: 2.22
11315  */
11316
11317
11318 /**
11319  * G_TYPE_REGEX:
11320  *
11321  * The #GType for a boxed type holding a #GRegex reference.
11322  *
11323  * Since: 2.14
11324  */
11325
11326
11327 /**
11328  * G_TYPE_RESERVED_BSE_FIRST:
11329  *
11330  * First fundamental type number to create a new fundamental type id with
11331  * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
11332  */
11333
11334
11335 /**
11336  * G_TYPE_RESERVED_BSE_LAST:
11337  *
11338  * Last fundamental type number reserved for BSE.
11339  */
11340
11341
11342 /**
11343  * G_TYPE_RESERVED_GLIB_FIRST:
11344  *
11345  * First fundamental type number to create a new fundamental type id with
11346  * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
11347  */
11348
11349
11350 /**
11351  * G_TYPE_RESERVED_GLIB_LAST:
11352  *
11353  * Last fundamental type number reserved for GLib.
11354  */
11355
11356
11357 /**
11358  * G_TYPE_RESERVED_USER_FIRST:
11359  *
11360  * First available fundamental type number to create new fundamental
11361  * type id with G_TYPE_MAKE_FUNDAMENTAL().
11362  */
11363
11364
11365 /**
11366  * G_TYPE_RESOURCE:
11367  *
11368  * The #GType for #GResource.
11369  */
11370
11371
11372 /**
11373  * G_TYPE_SETTINGS_SCHEMA:
11374  *
11375  * A boxed #GType corresponding to #GSettingsSchema.
11376  *
11377  * Since: 2.32
11378  */
11379
11380
11381 /**
11382  * G_TYPE_SETTINGS_SCHEMA_SOURCE:
11383  *
11384  * A boxed #GType corresponding to #GSettingsSchemaSource.
11385  *
11386  * Since: 2.32
11387  */
11388
11389
11390 /**
11391  * G_TYPE_SOURCE:
11392  *
11393  * The #GType for a boxed type holding a #GSource.
11394  *
11395  * Since: 2.30
11396  */
11397
11398
11399 /**
11400  * G_TYPE_STRING:
11401  *
11402  * The fundamental type corresponding to nul-terminated C strings.
11403  */
11404
11405
11406 /**
11407  * G_TYPE_STRV:
11408  *
11409  * The #GType for a boxed type holding a %NULL-terminated array of strings.
11410  *
11411  * The code fragments in the following example show the use of a property of
11412  * type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
11413  * and g_object_get().
11414  *
11415  * |[
11416  * g_object_class_install_property (object_class,
11417  * PROP_AUTHORS,
11418  * g_param_spec_boxed ("authors",
11419  * _("Authors"),
11420  * _("List of authors"),
11421  * G_TYPE_STRV,
11422  * G_PARAM_READWRITE));
11423  *
11424  * gchar *authors[] = { "Owen", "Tim", NULL };
11425  * g_object_set (obj, "authors", authors, NULL);
11426  *
11427  * gchar *writers[];
11428  * g_object_get (obj, "authors", &writers, NULL);
11429  * /&ast; do something with writers &ast;/
11430  * g_strfreev (writers);
11431  * ]|
11432  *
11433  * Since: 2.4
11434  */
11435
11436
11437 /**
11438  * G_TYPE_UCHAR:
11439  *
11440  * The fundamental type corresponding to #guchar.
11441  */
11442
11443
11444 /**
11445  * G_TYPE_UINT:
11446  *
11447  * The fundamental type corresponding to #guint.
11448  */
11449
11450
11451 /**
11452  * G_TYPE_UINT64:
11453  *
11454  * The fundamental type corresponding to #guint64.
11455  */
11456
11457
11458 /**
11459  * G_TYPE_ULONG:
11460  *
11461  * The fundamental type corresponding to #gulong.
11462  */
11463
11464
11465 /**
11466  * G_TYPE_VALUE:
11467  *
11468  * The type ID of the "GValue" type which is a boxed type,
11469  * used to pass around pointers to GValues.
11470  */
11471
11472
11473 /**
11474  * G_TYPE_VALUE_ARRAY:
11475  *
11476  * The type ID of the "GValueArray" type which is a boxed type,
11477  * used to pass around pointers to GValueArrays.
11478  *
11479  * Deprecated: 2.32: Use #GArray instead of #GValueArray
11480  */
11481
11482
11483 /**
11484  * G_TYPE_VARIANT:
11485  *
11486  * The fundamental type corresponding to #GVariant.
11487  *
11488  * All floating #GVariant instances passed through the #GType system are
11489  * consumed.
11490  *
11491  * Note that callbacks in closures, and signal handlers
11492  * for signals of return type %G_TYPE_VARIANT, must never return floating
11493  * variants.
11494  *
11495  * Note: GLib 2.24 did include a boxed type with this name. It was replaced
11496  * with this fundamental type in 2.26.
11497  *
11498  * Since: 2.26
11499  */
11500
11501
11502 /**
11503  * G_TYPE_VARIANT_BUILDER:
11504  *
11505  * The #GType for a boxed type holding a #GVariantBuilder.
11506  *
11507  * Since: 2.30
11508  */
11509
11510
11511 /**
11512  * G_TYPE_VARIANT_TYPE:
11513  *
11514  * The #GType for a boxed type holding a #GVariantType.
11515  *
11516  * Since: 2.24
11517  */
11518
11519
11520 /**
11521  * G_UNICHAR_MAX_DECOMPOSITION_LENGTH:
11522  *
11523  * The maximum length (in codepoints) of a compatibility or canonical
11524  * decomposition of a single Unicode character.
11525  *
11526  * This is as defined by Unicode 6.1.
11527  *
11528  * Since: 2.32
11529  */
11530
11531
11532 /**
11533  * G_UNICODE_COMBINING_MARK:
11534  *
11535  * Older name for %G_UNICODE_SPACING_MARK.
11536  *
11537  * Deprecated: 2.30: Use %G_UNICODE_SPACING_MARK.
11538  */
11539
11540
11541 /**
11542  * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH:
11543  *
11544  * Allowed characters in a path. Includes "!$&'()*+,;=:@/".
11545  */
11546
11547
11548 /**
11549  * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT:
11550  *
11551  * Allowed characters in path elements. Includes "!$&'()*+,;=:@".
11552  */
11553
11554
11555 /**
11556  * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO:
11557  *
11558  * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".
11559  */
11560
11561
11562 /**
11563  * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS:
11564  *
11565  * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".
11566  */
11567
11568
11569 /**
11570  * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS:
11571  *
11572  * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
11573  */
11574
11575
11576 /**
11577  * G_VALUE_HOLDS:
11578  * @value: A #GValue structure.
11579  * @type: A #GType value.
11580  *
11581  * Checks if @value holds (or contains) a value of @type.
11582  * This macro will also check for @value != %NULL and issue a
11583  * warning if the check fails.
11584  *
11585  * Returns: %TRUE if @value holds the @type.
11586  */
11587
11588
11589 /**
11590  * G_VALUE_HOLDS_BOOLEAN:
11591  * @value: a valid #GValue structure
11592  *
11593  * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN.
11594  *
11595  * Returns: %TRUE on success.
11596  */
11597
11598
11599 /**
11600  * G_VALUE_HOLDS_BOXED:
11601  * @value: a valid #GValue structure
11602  *
11603  * Checks whether the given #GValue can hold values derived
11604  * from type %G_TYPE_BOXED.
11605  *
11606  * Returns: %TRUE on success.
11607  */
11608
11609
11610 /**
11611  * G_VALUE_HOLDS_CHAR:
11612  * @value: a valid #GValue structure
11613  *
11614  * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR.
11615  *
11616  * Returns: %TRUE on success.
11617  */
11618
11619
11620 /**
11621  * G_VALUE_HOLDS_DOUBLE:
11622  * @value: a valid #GValue structure
11623  *
11624  * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE.
11625  *
11626  * Returns: %TRUE on success.
11627  */
11628
11629
11630 /**
11631  * G_VALUE_HOLDS_ENUM:
11632  * @value: a valid #GValue structure
11633  *
11634  * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM.
11635  *
11636  * Returns: %TRUE on success.
11637  */
11638
11639
11640 /**
11641  * G_VALUE_HOLDS_FLAGS:
11642  * @value: a valid #GValue structure
11643  *
11644  * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS.
11645  *
11646  * Returns: %TRUE on success.
11647  */
11648
11649
11650 /**
11651  * G_VALUE_HOLDS_FLOAT:
11652  * @value: a valid #GValue structure
11653  *
11654  * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT.
11655  *
11656  * Returns: %TRUE on success.
11657  */
11658
11659
11660 /**
11661  * G_VALUE_HOLDS_GTYPE:
11662  * @value: a valid #GValue structure
11663  *
11664  * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE.
11665  *
11666  * Since: 2.12
11667  * Returns: %TRUE on success.
11668  */
11669
11670
11671 /**
11672  * G_VALUE_HOLDS_INT:
11673  * @value: a valid #GValue structure
11674  *
11675  * Checks whether the given #GValue can hold values of type %G_TYPE_INT.
11676  *
11677  * Returns: %TRUE on success.
11678  */
11679
11680
11681 /**
11682  * G_VALUE_HOLDS_INT64:
11683  * @value: a valid #GValue structure
11684  *
11685  * Checks whether the given #GValue can hold values of type %G_TYPE_INT64.
11686  *
11687  * Returns: %TRUE on success.
11688  */
11689
11690
11691 /**
11692  * G_VALUE_HOLDS_LONG:
11693  * @value: a valid #GValue structure
11694  *
11695  * Checks whether the given #GValue can hold values of type %G_TYPE_LONG.
11696  *
11697  * Returns: %TRUE on success.
11698  */
11699
11700
11701 /**
11702  * G_VALUE_HOLDS_OBJECT:
11703  * @value: a valid #GValue structure
11704  *
11705  * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT.
11706  *
11707  * Returns: %TRUE on success.
11708  */
11709
11710
11711 /**
11712  * G_VALUE_HOLDS_PARAM:
11713  * @value: a valid #GValue structure
11714  *
11715  * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM.
11716  *
11717  * Returns: %TRUE on success.
11718  */
11719
11720
11721 /**
11722  * G_VALUE_HOLDS_POINTER:
11723  * @value: a valid #GValue structure
11724  *
11725  * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER.
11726  *
11727  * Returns: %TRUE on success.
11728  */
11729
11730
11731 /**
11732  * G_VALUE_HOLDS_STRING:
11733  * @value: a valid #GValue structure
11734  *
11735  * Checks whether the given #GValue can hold values of type %G_TYPE_STRING.
11736  *
11737  * Returns: %TRUE on success.
11738  */
11739
11740
11741 /**
11742  * G_VALUE_HOLDS_UCHAR:
11743  * @value: a valid #GValue structure
11744  *
11745  * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR.
11746  *
11747  * Returns: %TRUE on success.
11748  */
11749
11750
11751 /**
11752  * G_VALUE_HOLDS_UINT:
11753  * @value: a valid #GValue structure
11754  *
11755  * Checks whether the given #GValue can hold values of type %G_TYPE_UINT.
11756  *
11757  * Returns: %TRUE on success.
11758  */
11759
11760
11761 /**
11762  * G_VALUE_HOLDS_UINT64:
11763  * @value: a valid #GValue structure
11764  *
11765  * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64.
11766  *
11767  * Returns: %TRUE on success.
11768  */
11769
11770
11771 /**
11772  * G_VALUE_HOLDS_ULONG:
11773  * @value: a valid #GValue structure
11774  *
11775  * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG.
11776  *
11777  * Returns: %TRUE on success.
11778  */
11779
11780
11781 /**
11782  * G_VALUE_HOLDS_VARIANT:
11783  * @value: a valid #GValue structure
11784  *
11785  * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT.
11786  *
11787  * Returns: %TRUE on success.
11788  * Since: 2.26
11789  */
11790
11791
11792 /**
11793  * G_VALUE_INIT:
11794  *
11795  * A #GValue must be initialized before it can be used.
11796  * This macro can be used as initializer instead of an explicit
11797  * <literal>{ 0 }</literal> when declaring a variable,
11798  * but it cannot be assigned to a variable.
11799  *
11800  * |[
11801  * GValue value = G_VALUE_INIT;
11802  * ]|
11803  *
11804  * Since: 2.30
11805  */
11806
11807
11808 /**
11809  * G_VALUE_NOCOPY_CONTENTS:
11810  *
11811  * If passed to G_VALUE_COLLECT(), allocated data won't be copied
11812  * but used verbatim. This does not affect ref-counted types like
11813  * objects.
11814  */
11815
11816
11817 /**
11818  * G_VALUE_TYPE:
11819  * @value: A #GValue structure.
11820  *
11821  * Get the type identifier of @value.
11822  *
11823  * Returns: the #GType.
11824  */
11825
11826
11827 /**
11828  * G_VALUE_TYPE_NAME:
11829  * @value: A #GValue structure.
11830  *
11831  * Gets the the type name of @value.
11832  *
11833  * Returns: the type name.
11834  */
11835
11836
11837 /**
11838  * G_VARIANT_TYPE:
11839  * @type_string: a well-formed #GVariantType type string
11840  *
11841  * Converts a string to a const #GVariantType.  Depending on the
11842  * current debugging level, this function may perform a runtime check
11843  * to ensure that @string is a valid GVariant type string.
11844  *
11845  * It is always a programmer error to use this macro with an invalid
11846  * type string. If in doubt, use g_variant_type_string_is_valid() to
11847  * check if the string is valid.
11848  *
11849  * Since 2.24
11850  */
11851
11852
11853 /**
11854  * G_VARIANT_TYPE_ANY:
11855  *
11856  * An indefinite type that is a supertype of every type (including
11857  * itself).
11858  */
11859
11860
11861 /**
11862  * G_VARIANT_TYPE_ARRAY:
11863  *
11864  * An indefinite type that is a supertype of every array type.
11865  */
11866
11867
11868 /**
11869  * G_VARIANT_TYPE_BASIC:
11870  *
11871  * An indefinite type that is a supertype of every basic (ie:
11872  * non-container) type.
11873  */
11874
11875
11876 /**
11877  * G_VARIANT_TYPE_BOOLEAN:
11878  *
11879  * The type of a value that can be either %TRUE or %FALSE.
11880  */
11881
11882
11883 /**
11884  * G_VARIANT_TYPE_BYTE:
11885  *
11886  * The type of an integer value that can range from 0 to 255.
11887  */
11888
11889
11890 /**
11891  * G_VARIANT_TYPE_BYTESTRING:
11892  *
11893  * The type of an array of bytes.  This type is commonly used to pass
11894  * around strings that may not be valid utf8.  In that case, the
11895  * convention is that the nul terminator character should be included as
11896  * the last character in the array.
11897  */
11898
11899
11900 /**
11901  * G_VARIANT_TYPE_BYTESTRING_ARRAY:
11902  *
11903  * The type of an array of byte strings (an array of arrays of bytes).
11904  */
11905
11906
11907 /**
11908  * G_VARIANT_TYPE_DICTIONARY:
11909  *
11910  * An indefinite type that is a supertype of every dictionary type --
11911  * that is, any array type that has an element type equal to any
11912  * dictionary entry type.
11913  */
11914
11915
11916 /**
11917  * G_VARIANT_TYPE_DICT_ENTRY:
11918  *
11919  * An indefinite type that is a supertype of every dictionary entry
11920  * type.
11921  */
11922
11923
11924 /**
11925  * G_VARIANT_TYPE_DOUBLE:
11926  *
11927  * The type of a double precision IEEE754 floating point number.
11928  * These guys go up to about 1.80e308 (plus and minus) but miss out on
11929  * some numbers in between.  In any case, that's far greater than the
11930  * estimated number of fundamental particles in the observable
11931  * universe.
11932  */
11933
11934
11935 /**
11936  * G_VARIANT_TYPE_HANDLE:
11937  *
11938  * The type of a 32bit signed integer value, that by convention, is used
11939  * as an index into an array of file descriptors that are sent alongside
11940  * a D-Bus message.
11941  *
11942  * If you are not interacting with D-Bus, then there is no reason to make
11943  * use of this type.
11944  */
11945
11946
11947 /**
11948  * G_VARIANT_TYPE_INT16:
11949  *
11950  * The type of an integer value that can range from -32768 to 32767.
11951  */
11952
11953
11954 /**
11955  * G_VARIANT_TYPE_INT32:
11956  *
11957  * The type of an integer value that can range from -2147483648 to
11958  * 2147483647.
11959  */
11960
11961
11962 /**
11963  * G_VARIANT_TYPE_INT64:
11964  *
11965  * The type of an integer value that can range from
11966  * -9223372036854775808 to 9223372036854775807.
11967  */
11968
11969
11970 /**
11971  * G_VARIANT_TYPE_MAYBE:
11972  *
11973  * An indefinite type that is a supertype of every maybe type.
11974  */
11975
11976
11977 /**
11978  * G_VARIANT_TYPE_OBJECT_PATH:
11979  *
11980  * The type of a D-Bus object reference.  These are strings of a
11981  * specific format used to identify objects at a given destination on
11982  * the bus.
11983  *
11984  * If you are not interacting with D-Bus, then there is no reason to make
11985  * use of this type.  If you are, then the D-Bus specification contains a
11986  * precise description of valid object paths.
11987  */
11988
11989
11990 /**
11991  * G_VARIANT_TYPE_OBJECT_PATH_ARRAY:
11992  *
11993  * The type of an array of object paths.
11994  */
11995
11996
11997 /**
11998  * G_VARIANT_TYPE_SIGNATURE:
11999  *
12000  * The type of a D-Bus type signature.  These are strings of a specific
12001  * format used as type signatures for D-Bus methods and messages.
12002  *
12003  * If you are not interacting with D-Bus, then there is no reason to make
12004  * use of this type.  If you are, then the D-Bus specification contains a
12005  * precise description of valid signature strings.
12006  */
12007
12008
12009 /**
12010  * G_VARIANT_TYPE_STRING:
12011  *
12012  * The type of a string.  "" is a string.  %NULL is not a string.
12013  */
12014
12015
12016 /**
12017  * G_VARIANT_TYPE_STRING_ARRAY:
12018  *
12019  * The type of an array of strings.
12020  */
12021
12022
12023 /**
12024  * G_VARIANT_TYPE_TUPLE:
12025  *
12026  * An indefinite type that is a supertype of every tuple type,
12027  * regardless of the number of items in the tuple.
12028  */
12029
12030
12031 /**
12032  * G_VARIANT_TYPE_UINT16:
12033  *
12034  * The type of an integer value that can range from 0 to 65535.
12035  * There were about this many people living in Toronto in the 1870s.
12036  */
12037
12038
12039 /**
12040  * G_VARIANT_TYPE_UINT32:
12041  *
12042  * The type of an integer value that can range from 0 to 4294967295.
12043  * That's one number for everyone who was around in the late 1970s.
12044  */
12045
12046
12047 /**
12048  * G_VARIANT_TYPE_UINT64:
12049  *
12050  * The type of an integer value that can range from 0 to
12051  * 18446744073709551616.  That's a really big number, but a Rubik's
12052  * cube can have a bit more than twice as many possible positions.
12053  */
12054
12055
12056 /**
12057  * G_VARIANT_TYPE_UNIT:
12058  *
12059  * The empty tuple type.  Has only one instance.  Known also as "triv"
12060  * or "void".
12061  */
12062
12063
12064 /**
12065  * G_VARIANT_TYPE_VARDICT:
12066  *
12067  * The type of a dictionary mapping strings to variants (the ubiquitous
12068  * "a{sv}" type).
12069  *
12070  * Since: 2.30
12071  */
12072
12073
12074 /**
12075  * G_VARIANT_TYPE_VARIANT:
12076  *
12077  * The type of a box that contains any other value (including another
12078  * variant).
12079  */
12080
12081
12082 /**
12083  * G_VFS_EXTENSION_POINT_NAME:
12084  *
12085  * Extension point for #GVfs functionality.
12086  * See <link linkend="extending-gio">Extending GIO</link>.
12087  */
12088
12089
12090 /**
12091  * G_VOLUME_IDENTIFIER_KIND_HAL_UDI:
12092  *
12093  * The string used to obtain a Hal UDI with g_volume_get_identifier().
12094  */
12095
12096
12097 /**
12098  * G_VOLUME_IDENTIFIER_KIND_LABEL:
12099  *
12100  * The string used to obtain a filesystem label with g_volume_get_identifier().
12101  */
12102
12103
12104 /**
12105  * G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT:
12106  *
12107  * The string used to obtain a NFS mount with g_volume_get_identifier().
12108  */
12109
12110
12111 /**
12112  * G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE:
12113  *
12114  * The string used to obtain a Unix device path with g_volume_get_identifier().
12115  */
12116
12117
12118 /**
12119  * G_VOLUME_IDENTIFIER_KIND_UUID:
12120  *
12121  * The string used to obtain a UUID with g_volume_get_identifier().
12122  */
12123
12124
12125 /**
12126  * G_VOLUME_MONITOR_EXTENSION_POINT_NAME:
12127  *
12128  * Extension point for volume monitor functionality.
12129  * See <link linkend="extending-gio">Extending GIO</link>.
12130  */
12131
12132
12133 /**
12134  * SECTION:extensionpoints
12135  * @short_description: Extension Points
12136  * @include: gio.h
12137  * @see_also: <link linkend="extending-gio">Extending GIO</link>
12138  *
12139  * #GIOExtensionPoint provides a mechanism for modules to extend the
12140  * functionality of the library or application that loaded it in an
12141  * organized fashion.
12142  *
12143  * An extension point is identified by a name, and it may optionally
12144  * require that any implementation must by of a certain type (or derived
12145  * thereof). Use g_io_extension_point_register() to register an
12146  * extension point, and g_io_extension_point_set_required_type() to
12147  * set a required type.
12148  *
12149  * A module can implement an extension point by specifying the #GType
12150  * that implements the functionality. Additionally, each implementation
12151  * of an extension point has a name, and a priority. Use
12152  * g_io_extension_point_implement() to implement an extension point.
12153  *
12154  * |[
12155  * GIOExtensionPoint *ep;
12156  *
12157  * /&ast; Register an extension point &ast;/
12158  * ep = g_io_extension_point_register ("my-extension-point");
12159  * g_io_extension_point_set_required_type (ep, MY_TYPE_EXAMPLE);
12160  * ]|
12161  *
12162  * |[
12163  * /&ast; Implement an extension point &ast;/
12164  * G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE);
12165  * g_io_extension_point_implement ("my-extension-point",
12166  * my_example_impl_get_type (),
12167  * "my-example",
12168  * 10);
12169  * ]|
12170  *
12171  * It is up to the code that registered the extension point how
12172  * it uses the implementations that have been associated with it.
12173  * Depending on the use case, it may use all implementations, or
12174  * only the one with the highest priority, or pick a specific
12175  * one by name.
12176  *
12177  * To avoid opening all modules just to find out what extension
12178  * points they implement, GIO makes use of a caching mechanism,
12179  * see <link linkend="gio-querymodules">gio-querymodules</link>.
12180  * You are expected to run this command after installing a
12181  * GIO module.
12182  *
12183  * The <envar>GIO_EXTRA_MODULES</envar> environment variable can be
12184  * used to specify additional directories to automatically load modules
12185  * from. This environment variable has the same syntax as the
12186  * <envar>PATH</envar>. If two modules have the same base name in different
12187  * directories, then the latter one will be ignored. If additional
12188  * directories are specified GIO will load modules from the built-in
12189  * directory last.
12190  */
12191
12192
12193 /**
12194  * SECTION:gaction
12195  * @title: GAction
12196  * @short_description: An action interface
12197  *
12198  * #GAction represents a single named action.
12199  *
12200  * The main interface to an action is that it can be activated with
12201  * g_action_activate().  This results in the 'activate' signal being
12202  * emitted.  An activation has a #GVariant parameter (which may be
12203  * %NULL).  The correct type for the parameter is determined by a static
12204  * parameter type (which is given at construction time).
12205  *
12206  * An action may optionally have a state, in which case the state may be
12207  * set with g_action_change_state().  This call takes a #GVariant.  The
12208  * correct type for the state is determined by a static state type
12209  * (which is given at construction time).
12210  *
12211  * The state may have a hint associated with it, specifying its valid
12212  * range.
12213  *
12214  * #GAction is merely the interface to the concept of an action, as
12215  * described above.  Various implementations of actions exist, including
12216  * #GSimpleAction and #GtkAction.
12217  *
12218  * In all cases, the implementing class is responsible for storing the
12219  * name of the action, the parameter type, the enabled state, the
12220  * optional state type and the state and emitting the appropriate
12221  * signals when these change.  The implementor responsible for filtering
12222  * calls to g_action_activate() and g_action_change_state() for type
12223  * safety and for the state being enabled.
12224  *
12225  * Probably the only useful thing to do with a #GAction is to put it
12226  * inside of a #GSimpleActionGroup.
12227  */
12228
12229
12230 /**
12231  * SECTION:gactiongroup
12232  * @title: GActionGroup
12233  * @short_description: A group of actions
12234  * @see_also: #GAction
12235  *
12236  * #GActionGroup represents a group of actions. Actions can be used to
12237  * expose functionality in a structured way, either from one part of a
12238  * program to another, or to the outside world. Action groups are often
12239  * used together with a #GMenuModel that provides additional
12240  * representation data for displaying the actions to the user, e.g. in
12241  * a menu.
12242  *
12243  * The main way to interact with the actions in a GActionGroup is to
12244  * activate them with g_action_group_activate_action(). Activating an
12245  * action may require a #GVariant parameter. The required type of the
12246  * parameter can be inquired with g_action_group_get_action_parameter_type().
12247  * Actions may be disabled, see g_action_group_get_action_enabled().
12248  * Activating a disabled action has no effect.
12249  *
12250  * Actions may optionally have a state in the form of a #GVariant. The
12251  * current state of an action can be inquired with
12252  * g_action_group_get_action_state(). Activating a stateful action may
12253  * change its state, but it is also possible to set the state by calling
12254  * g_action_group_change_action_state().
12255  *
12256  * As typical example, consider a text editing application which has an
12257  * option to change the current font to 'bold'. A good way to represent
12258  * this would be a stateful action, with a boolean state. Activating the
12259  * action would toggle the state.
12260  *
12261  * Each action in the group has a unique name (which is a string).  All
12262  * method calls, except g_action_group_list_actions() take the name of
12263  * an action as an argument.
12264  *
12265  * The #GActionGroup API is meant to be the 'public' API to the action
12266  * group.  The calls here are exactly the interaction that 'external
12267  * forces' (eg: UI, incoming D-Bus messages, etc.) are supposed to have
12268  * with actions.  'Internal' APIs (ie: ones meant only to be accessed by
12269  * the action group implementation) are found on subclasses.  This is
12270  * why you will find - for example - g_action_group_get_action_enabled()
12271  * but not an equivalent <function>set()</function> call.
12272  *
12273  * Signals are emitted on the action group in response to state changes
12274  * on individual actions.
12275  *
12276  * Implementations of #GActionGroup should provide implementations for
12277  * the virtual functions g_action_group_list_actions() and
12278  * g_action_group_query_action().  The other virtual functions should
12279  * not be implemented - their "wrappers" are actually implemented with
12280  * calls to g_action_group_query_action().
12281  */
12282
12283
12284 /**
12285  * SECTION:gactiongroupexporter
12286  * @title: GActionGroup exporter
12287  * @short_description: Export GActionGroups on D-Bus
12288  * @see_also: #GActionGroup, #GDBusActionGroup
12289  *
12290  * These functions support exporting a #GActionGroup on D-Bus.
12291  * The D-Bus interface that is used is a private implementation
12292  * detail.
12293  *
12294  * To access an exported #GActionGroup remotely, use
12295  * g_dbus_action_group_new() to obtain a #GDBusActionGroup.
12296  */
12297
12298
12299 /**
12300  * SECTION:gactionmap
12301  * @title: GActionMap
12302  * @short_description: Interface for action containers
12303  *
12304  * The GActionMap interface is implemented by #GActionGroup
12305  * implementations that operate by containing a number of
12306  * named #GAction instances, such as #GSimpleActionGroup.
12307  *
12308  * One useful application of this interface is to map the
12309  * names of actions from various action groups to unique,
12310  * prefixed names (e.g. by prepending "app." or "win.").
12311  * This is the motivation for the 'Map' part of the interface
12312  * name.
12313  *
12314  * Since: 2.32
12315  */
12316
12317
12318 /**
12319  * SECTION:gappinfo
12320  * @short_description: Application information and launch contexts
12321  * @include: gio/gio.h
12322  *
12323  * #GAppInfo and #GAppLaunchContext are used for describing and launching
12324  * applications installed on the system.
12325  *
12326  * As of GLib 2.20, URIs will always be converted to POSIX paths
12327  * (using g_file_get_path()) when using g_app_info_launch() even if
12328  * the application requested an URI and not a POSIX path. For example
12329  * for an desktop-file based application with Exec key <literal>totem
12330  * &percnt;U</literal> and a single URI,
12331  * <literal>sftp://foo/file.avi</literal>, then
12332  * <literal>/home/user/.gvfs/sftp on foo/file.avi</literal> will be
12333  * passed. This will only work if a set of suitable GIO extensions
12334  * (such as gvfs 2.26 compiled with FUSE support), is available and
12335  * operational; if this is not the case, the URI will be passed
12336  * unmodified to the application. Some URIs, such as
12337  * <literal>mailto:</literal>, of course cannot be mapped to a POSIX
12338  * path (in gvfs there's no FUSE mount for it); such URIs will be
12339  * passed unmodified to the application.
12340  *
12341  * Specifically for gvfs 2.26 and later, the POSIX URI will be mapped
12342  * back to the GIO URI in the #GFile constructors (since gvfs
12343  * implements the #GVfs extension point). As such, if the application
12344  * needs to examine the URI, it needs to use g_file_get_uri() or
12345  * similar on #GFile. In other words, an application cannot assume
12346  * that the URI passed to e.g. g_file_new_for_commandline_arg() is
12347  * equal to the result of g_file_get_uri(). The following snippet
12348  * illustrates this:
12349  *
12350  * <programlisting>
12351  * GFile *f;
12352  * char *uri;
12353  *
12354  * file = g_file_new_for_commandline_arg (uri_from_commandline);
12355  *
12356  * uri = g_file_get_uri (file);
12357  * strcmp (uri, uri_from_commandline) == 0; // FALSE
12358  * g_free (uri);
12359  *
12360  * if (g_file_has_uri_scheme (file, "cdda"))
12361  * {
12362  * // do something special with uri
12363  * }
12364  * g_object_unref (file);
12365  * </programlisting>
12366  *
12367  * This code will work when both <literal>cdda://sr0/Track
12368  * 1.wav</literal> and <literal>/home/user/.gvfs/cdda on sr0/Track
12369  * 1.wav</literal> is passed to the application. It should be noted
12370  * that it's generally not safe for applications to rely on the format
12371  * of a particular URIs. Different launcher applications (e.g. file
12372  * managers) may have different ideas of what a given URI means.
12373  */
12374
12375
12376 /**
12377  * SECTION:gapplication
12378  * @title: GApplication
12379  * @short_description: Core application class
12380  *
12381  * A #GApplication is the foundation of an application, unique for a
12382  * given application identifier.  The GApplication class wraps some
12383  * low-level platform-specific services and is intended to act as the
12384  * foundation for higher-level application classes such as
12385  * #GtkApplication or #MxApplication.  In general, you should not use
12386  * this class outside of a higher level framework.
12387  *
12388  * One of the core features that GApplication provides is process
12389  * uniqueness, in the context of a "session".  The session concept is
12390  * platform-dependent, but corresponds roughly to a graphical desktop
12391  * login.  When your application is launched again, its arguments
12392  * are passed through platform communication to the already running
12393  * program. The already running instance of the program is called the
12394  * <firstterm>primary instance</firstterm>. On Linux, the D-Bus session
12395  * bus is used for communication.
12396  *
12397  * GApplication provides convenient life cycle management by maintaining
12398  * a <firstterm>use count</firstterm> for the primary application instance.
12399  * The use count can be changed using g_application_hold() and
12400  * g_application_release(). If it drops to zero, the application exits.
12401  * Higher-level classes such as #GtkApplication employ the use count to
12402  * ensure that the application stays alive as long as it has any opened
12403  * windows.
12404  *
12405  * Before using GApplication, you must choose an "application identifier".
12406  * The expected form of an application identifier is very close to that of
12407  * of a <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-interface">DBus bus name</ulink>.
12408  * Examples include: "com.example.MyApp", "org.example.internal-apps.Calculator".
12409  * For details on valid application identifiers, see g_application_id_is_valid().
12410  *
12411  * On Linux, the application identifier is claimed as a well-known bus name
12412  * on the user's session bus.  This means that the uniqueness of your
12413  * application is scoped to the current session.  It also means that your
12414  * application may provide additional services (through registration of other
12415  * object paths) at that bus name.  The registration of these object paths
12416  * should be done with the shared GDBus session bus.  Note that due to the
12417  * internal architecture of GDBus, method calls can be dispatched at any time
12418  * (even if a main loop is not running).  For this reason, you must ensure that
12419  * any object paths that you wish to register are registered before #GApplication
12420  * attempts to acquire the bus name of your application (which happens in
12421  * g_application_register()).  Unfortunately, this means that you cannot use
12422  * g_application_get_is_remote() to decide if you want to register object paths.
12423  *
12424  * GApplication also implements the #GActionGroup and #GActionMap
12425  * interfaces and lets you easily export actions by adding them with
12426  * g_action_map_add_action(). When invoking an action by calling
12427  * g_action_group_activate_action() on the application, it is always
12428  * invoked in the primary instance. The actions are also exported on
12429  * the session bus, and GIO provides the #GDBusActionGroup wrapper to
12430  * conveniently access them remotely. Additionally, g_application_set_app_menu()
12431  * and g_application_set_menubar() can be used to export representation
12432  * data for the actions, in the form of #GMenuModels. GIO provides
12433  * a #GDBusMenuModel wrapper for remote access to exported #GMenuModels.
12434  *
12435  * There is a number of different entry points into a GApplication:
12436  * <itemizedlist>
12437  * <listitem>via 'Activate' (i.e. just starting the application)</listitem>
12438  * <listitem>via 'Open' (i.e. opening some files)</listitem>
12439  * <listitem>by handling a command-line</listitem>
12440  * <listitem>via activating an action</listitem>
12441  * </itemizedlist>
12442  * The #GApplication::startup signal lets you handle the application
12443  * initialization for all of these in a single place.
12444  *
12445  * Regardless of which of these entry points is used to start the application,
12446  * GApplication passes some <firstterm id="platform-data">platform
12447  * data</firstterm> from the launching instance to the primary instance,
12448  * in the form of a #GVariant dictionary mapping strings to variants.
12449  * To use platform data, override the @before_emit or @after_emit virtual
12450  * functions in your #GApplication subclass. When dealing with
12451  * #GApplicationCommandline objects, the platform data is directly
12452  * available via g_application_command_line_get_cwd(),
12453  * g_application_command_line_get_environ() and
12454  * g_application_command_line_get_platform_data().
12455  *
12456  * As the name indicates, the platform data may vary depending on the
12457  * operating system, but it always includes the current directory (key
12458  * "cwd"), and optionally the environment (ie the set of environment
12459  * variables and their values) of the calling process (key "environ").
12460  * The environment is only added to the platform data if the
12461  * #G_APPLICATION_SEND_ENVIONMENT flag is set. GApplication subclasses
12462  * can add their own platform data by overriding the @add_platform_data
12463  * virtual function. For instance, #GtkApplication adds startup notification
12464  * data in this way.
12465  *
12466  * To parse commandline arguments you may handle the
12467  * #GApplication::command-line signal or override the local_command_line()
12468  * vfunc, to parse them in either the primary instance or the local instance,
12469  * respectively.
12470  *
12471  * <example id="gapplication-example-open"><title>Opening files with a GApplication</title>
12472  * <programlisting>
12473  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-open.c">
12474  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
12475  * </xi:include>
12476  * </programlisting>
12477  * </example>
12478  *
12479  * <example id="gapplication-example-actions"><title>A GApplication with actions</title>
12480  * <programlisting>
12481  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-actions.c">
12482  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
12483  * </xi:include>
12484  * </programlisting>
12485  * </example>
12486  *
12487  * <example id="gapplication-example-menu"><title>A GApplication with menus</title>
12488  * <programlisting>
12489  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-menu.c">
12490  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
12491  * </xi:include>
12492  * </programlisting>
12493  * </example>
12494  */
12495
12496
12497 /**
12498  * SECTION:gapplicationcommandline
12499  * @title: GApplicationCommandLine
12500  * @short_description: A command-line invocation of an application
12501  * @see_also: #GApplication
12502  *
12503  * #GApplicationCommandLine represents a command-line invocation of
12504  * an application.  It is created by #GApplication and emitted
12505  * in the #GApplication::command-line signal and virtual function.
12506  *
12507  * The class contains the list of arguments that the program was invoked
12508  * with.  It is also possible to query if the commandline invocation was
12509  * local (ie: the current process is running in direct response to the
12510  * invocation) or remote (ie: some other process forwarded the
12511  * commandline to this process).
12512  *
12513  * The GApplicationCommandLine object can provide the @argc and @argv
12514  * parameters for use with the #GOptionContext command-line parsing API,
12515  * with the g_application_command_line_get_arguments() function. See
12516  * <xref linkend="gapplication-example-cmdline3"/> for an example.
12517  *
12518  * The exit status of the originally-invoked process may be set and
12519  * messages can be printed to stdout or stderr of that process.  The
12520  * lifecycle of the originally-invoked process is tied to the lifecycle
12521  * of this object (ie: the process exits when the last reference is
12522  * dropped).
12523  *
12524  * The main use for #GApplicationCommandline (and the
12525  * #GApplication::command-line signal) is 'Emacs server' like use cases:
12526  * You can set the <envar>EDITOR</envar> environment variable to have
12527  * e.g. git use your favourite editor to edit commit messages, and if you
12528  * already have an instance of the editor running, the editing will happen
12529  * in the running instance, instead of opening a new one. An important
12530  * aspect of this use case is that the process that gets started by git
12531  * does not return until the editing is done.
12532  *
12533  * <example id="gapplication-example-cmdline"><title>Handling commandline arguments with GApplication</title>
12534  * <para>
12535  * A simple example where the commandline is completely handled
12536  * in the #GApplication::command-line handler. The launching instance exits
12537  * once the signal handler in the primary instance has returned, and the
12538  * return value of the signal handler becomes the exit status of the launching
12539  * instance.
12540  * </para>
12541  * <programlisting>
12542  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline.c">
12543  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
12544  * </xi:include>
12545  * </programlisting>
12546  * </example>
12547  *
12548  * <example id="gapplication-example-cmdline2"><title>Split commandline handling</title>
12549  * <para>
12550  * An example of split commandline handling. Options that start with
12551  * <literal>--local-</literal> are handled locally, all other options are
12552  * passed to the #GApplication::command-line handler which runs in the primary
12553  * instance.
12554  * </para>
12555  * <programlisting>
12556  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline2.c">
12557  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
12558  * </xi:include>
12559  * </programlisting>
12560  * </example>
12561  *
12562  * <example id="gapplication-example-cmdline3"><title>Deferred commandline handling</title>
12563  * <para>
12564  * An example of deferred commandline handling. Here, the commandline is
12565  * not completely handled before the #GApplication::command-line handler
12566  * returns. Instead, we keep a reference to the GApplicationCommandline
12567  * object and handle it later(in this example, in an idle). Note that it
12568  * is necessary to hold the application until you are done with the
12569  * commandline.
12570  * </para>
12571  * <para>
12572  * This example also shows how to use #GOptionContext for parsing the
12573  * commandline arguments. Note that it is necessary to disable the
12574  * built-in help-handling of #GOptionContext, since it calls exit()
12575  * after printing help, which is not what you want to happen in
12576  * the primary instance.
12577  * </para>
12578  * <programlisting>
12579  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline3.c">
12580  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
12581  * </xi:include>
12582  * </programlisting>
12583  * </example>
12584  */
12585
12586
12587 /**
12588  * SECTION:gasyncinitable
12589  * @short_description: Asynchronously failable object initialization interface
12590  * @include: gio/gio.h
12591  * @see_also: #GInitable
12592  *
12593  * This is the asynchronous version of #GInitable; it behaves the same
12594  * in all ways except that initialization is asynchronous. For more details
12595  * see the descriptions on #GInitable.
12596  *
12597  * A class may implement both the #GInitable and #GAsyncInitable interfaces.
12598  *
12599  * Users of objects implementing this are not intended to use the interface
12600  * method directly; instead it will be used automatically in various ways.
12601  * For C applications you generally just call g_async_initable_new_async()
12602  * directly, or indirectly via a foo_thing_new_async() wrapper. This will call
12603  * g_async_initable_init_async() under the cover, calling back with %NULL and
12604  * a set %GError on failure.
12605  *
12606  * A typical implementation might look something like this:
12607  *
12608  * |[
12609  * enum {
12610  * NOT_INITIALIZED,
12611  * INITIALIZING,
12612  * INITIALIZED
12613  * };
12614  *
12615  * static void
12616  * _foo_ready_cb (Foo *self)
12617  * {
12618  * GList *l;
12619  *
12620  * self->priv->state = INITIALIZED;
12621  *
12622  * for (l = self->priv->init_results; l != NULL; l = l->next)
12623  * {
12624  * GSimpleAsyncResult *simple = l->data;
12625  *
12626  * if (!self->priv->success)
12627  * g_simple_async_result_set_error (simple, ...);
12628  *
12629  * g_simple_async_result_complete (simple);
12630  * g_object_unref (simple);
12631  * }
12632  *
12633  * g_list_free (self->priv->init_results);
12634  * self->priv->init_results = NULL;
12635  * }
12636  *
12637  * static void
12638  * foo_init_async (GAsyncInitable       *initable,
12639  * int                   io_priority,
12640  * GCancellable         *cancellable,
12641  * GAsyncReadyCallback   callback,
12642  * gpointer              user_data)
12643  * {
12644  * Foo *self = FOO (initable);
12645  * GSimpleAsyncResult *simple;
12646  *
12647  * simple = g_simple_async_result_new (G_OBJECT (initable)
12648  * callback,
12649  * user_data,
12650  * foo_init_async);
12651  *
12652  * switch (self->priv->state)
12653  * {
12654  * case NOT_INITIALIZED:
12655  * _foo_get_ready (self);
12656  * self->priv->init_results = g_list_append (self->priv->init_results,
12657  * simple);
12658  * self->priv->state = INITIALIZING;
12659  * break;
12660  * case INITIALIZING:
12661  * self->priv->init_results = g_list_append (self->priv->init_results,
12662  * simple);
12663  * break;
12664  * case INITIALIZED:
12665  * if (!self->priv->success)
12666  * g_simple_async_result_set_error (simple, ...);
12667  *
12668  * g_simple_async_result_complete_in_idle (simple);
12669  * g_object_unref (simple);
12670  * break;
12671  * }
12672  * }
12673  *
12674  * static gboolean
12675  * foo_init_finish (GAsyncInitable       *initable,
12676  * GAsyncResult         *result,
12677  * GError              **error)
12678  * {
12679  * g_return_val_if_fail (g_simple_async_result_is_valid (result,
12680  * G_OBJECT (initable), foo_init_async), FALSE);
12681  *
12682  * if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
12683  * error))
12684  * return FALSE;
12685  *
12686  * return TRUE;
12687  * }
12688  *
12689  * static void
12690  * foo_async_initable_iface_init (gpointer g_iface,
12691  * gpointer data)
12692  * {
12693  * GAsyncInitableIface *iface = g_iface;
12694  *
12695  * iface->init_async = foo_init_async;
12696  * iface->init_finish = foo_init_finish;
12697  * }
12698  * ]|
12699  */
12700
12701
12702 /**
12703  * SECTION:gasyncresult
12704  * @short_description: Asynchronous Function Results
12705  * @include: gio/gio.h
12706  * @see_also: #GSimpleAsyncResult
12707  *
12708  * Provides a base class for implementing asynchronous function results.
12709  *
12710  * Asynchronous operations are broken up into two separate operations
12711  * which are chained together by a #GAsyncReadyCallback. To begin
12712  * an asynchronous operation, provide a #GAsyncReadyCallback to the
12713  * asynchronous function. This callback will be triggered when the
12714  * operation has completed, and will be passed a #GAsyncResult instance
12715  * filled with the details of the operation's success or failure, the
12716  * object the asynchronous function was started for and any error codes
12717  * returned. The asynchronous callback function is then expected to call
12718  * the corresponding "_finish()" function, passing the object the
12719  * function was called for, the #GAsyncResult instance, and (optionally)
12720  * an @error to grab any error conditions that may have occurred.
12721  *
12722  * The "_finish()" function for an operation takes the generic result
12723  * (of type #GAsyncResult) and returns the specific result that the
12724  * operation in question yields (e.g. a #GFileEnumerator for a
12725  * "enumerate children" operation). If the result or error status of the
12726  * operation is not needed, there is no need to call the "_finish()"
12727  * function; GIO will take care of cleaning up the result and error
12728  * information after the #GAsyncReadyCallback returns. You can pass
12729  * %NULL for the #GAsyncReadyCallback if you don't need to take any
12730  * action at all after the operation completes. Applications may also
12731  * take a reference to the #GAsyncResult and call "_finish()" later;
12732  * however, the "_finish()" function may be called at most once.
12733  *
12734  * Example of a typical asynchronous operation flow:
12735  * |[
12736  * void _theoretical_frobnitz_async (Theoretical         *t,
12737  * GCancellable        *c,
12738  * GAsyncReadyCallback *cb,
12739  * gpointer             u);
12740  *
12741  * gboolean _theoretical_frobnitz_finish (Theoretical   *t,
12742  * GAsyncResult  *res,
12743  * GError       **e);
12744  *
12745  * static void
12746  * frobnitz_result_func (GObject      *source_object,
12747  * GAsyncResult *res,
12748  * gpointer      user_data)
12749  * {
12750  * gboolean success = FALSE;
12751  *
12752  * success = _theoretical_frobnitz_finish (source_object, res, NULL);
12753  *
12754  * if (success)
12755  * g_printf ("Hurray!\n");
12756  * else
12757  * g_printf ("Uh oh!\n");
12758  *
12759  * /<!-- -->* ... *<!-- -->/
12760  *
12761  * }
12762  *
12763  * int main (int argc, void *argv[])
12764  * {
12765  * /<!-- -->* ... *<!-- -->/
12766  *
12767  * _theoretical_frobnitz_async (theoretical_data,
12768  * NULL,
12769  * frobnitz_result_func,
12770  * NULL);
12771  *
12772  * /<!-- -->* ... *<!-- -->/
12773  * }
12774  * ]|
12775  *
12776  * The callback for an asynchronous operation is called only once, and is
12777  * always called, even in the case of a cancelled operation. On cancellation
12778  * the result is a %G_IO_ERROR_CANCELLED error.
12779  */
12780
12781
12782 /**
12783  * SECTION:gbufferedinputstream
12784  * @short_description: Buffered Input Stream
12785  * @include: gio/gio.h
12786  * @see_also: #GFilterInputStream, #GInputStream
12787  *
12788  * Buffered input stream implements #GFilterInputStream and provides
12789  * for buffered reads.
12790  *
12791  * By default, #GBufferedInputStream's buffer size is set at 4 kilobytes.
12792  *
12793  * To create a buffered input stream, use g_buffered_input_stream_new(),
12794  * or g_buffered_input_stream_new_sized() to specify the buffer's size at
12795  * construction.
12796  *
12797  * To get the size of a buffer within a buffered input stream, use
12798  * g_buffered_input_stream_get_buffer_size(). To change the size of a
12799  * buffered input stream's buffer, use
12800  * g_buffered_input_stream_set_buffer_size(). Note that the buffer's size
12801  * cannot be reduced below the size of the data within the buffer.
12802  */
12803
12804
12805 /**
12806  * SECTION:gbufferedoutputstream
12807  * @short_description: Buffered Output Stream
12808  * @include: gio/gio.h
12809  * @see_also: #GFilterOutputStream, #GOutputStream
12810  *
12811  * Buffered output stream implements #GFilterOutputStream and provides
12812  * for buffered writes.
12813  *
12814  * By default, #GBufferedOutputStream's buffer size is set at 4 kilobytes.
12815  *
12816  * To create a buffered output stream, use g_buffered_output_stream_new(),
12817  * or g_buffered_output_stream_new_sized() to specify the buffer's size
12818  * at construction.
12819  *
12820  * To get the size of a buffer within a buffered input stream, use
12821  * g_buffered_output_stream_get_buffer_size(). To change the size of a
12822  * buffered output stream's buffer, use
12823  * g_buffered_output_stream_set_buffer_size(). Note that the buffer's
12824  * size cannot be reduced below the size of the data within the buffer.
12825  */
12826
12827
12828 /**
12829  * SECTION:gcancellable
12830  * @short_description: Thread-safe Operation Cancellation Stack
12831  * @include: gio/gio.h
12832  *
12833  * GCancellable is a thread-safe operation cancellation stack used
12834  * throughout GIO to allow for cancellation of synchronous and
12835  * asynchronous operations.
12836  */
12837
12838
12839 /**
12840  * SECTION:gcharsetconverter
12841  * @short_description: Convert between charsets
12842  * @include: gio/gio.h
12843  *
12844  * #GCharsetConverter is an implementation of #GConverter based on
12845  * GIConv.
12846  */
12847
12848
12849 /**
12850  * SECTION:gcontenttype
12851  * @short_description: Platform-specific content typing
12852  * @include: gio/gio.h
12853  *
12854  * A content type is a platform specific string that defines the type
12855  * 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".
12856  * On Win32 it is an extension string like ".doc", ".txt" or a perceived
12857  * string like "audio". Such strings can be looked up in the registry at
12858  * HKEY_CLASSES_ROOT.
12859  */
12860
12861
12862 /**
12863  * SECTION:gconverter
12864  * @short_description: Data conversion interface
12865  * @include: gio/gio.h
12866  * @see_also: #GInputStream, #GOutputStream
12867  *
12868  * #GConverter is implemented by objects that convert
12869  * binary data in various ways. The conversion can be
12870  * stateful and may fail at any place.
12871  *
12872  * Some example conversions are: character set conversion,
12873  * compression, decompression and regular expression
12874  * replace.
12875  *
12876  * Since: 2.24
12877  */
12878
12879
12880 /**
12881  * SECTION:gconverterinputstream
12882  * @short_description: Converter Input Stream
12883  * @include: gio/gio.h
12884  * @see_also: #GInputStream, #GConverter
12885  *
12886  * Converter input stream implements #GInputStream and allows
12887  * conversion of data of various types during reading.
12888  */
12889
12890
12891 /**
12892  * SECTION:gconverteroutputstream
12893  * @short_description: Converter Output Stream
12894  * @include: gio/gio.h
12895  * @see_also: #GOutputStream, #GConverter
12896  *
12897  * Converter output stream implements #GOutputStream and allows
12898  * conversion of data of various types during reading.
12899  */
12900
12901
12902 /**
12903  * SECTION:gcredentials
12904  * @short_description: An object containing credentials
12905  * @include: gio/gio.h
12906  *
12907  * The #GCredentials type is a reference-counted wrapper for native
12908  * credentials. This information is typically used for identifying,
12909  * authenticating and authorizing other processes.
12910  *
12911  * Some operating systems supports looking up the credentials of the
12912  * remote peer of a communication endpoint - see e.g.
12913  * g_socket_get_credentials().
12914  *
12915  * Some operating systems supports securely sending and receiving
12916  * credentials over a Unix Domain Socket, see
12917  * #GUnixCredentialsMessage, g_unix_connection_send_credentials() and
12918  * g_unix_connection_receive_credentials() for details.
12919  *
12920  * On Linux, the native credential type is a <type>struct ucred</type>
12921  * - see the
12922  * <citerefentry><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>
12923  * man page for details. This corresponds to
12924  * %G_CREDENTIALS_TYPE_LINUX_UCRED.
12925  *
12926  * On FreeBSD, the native credential type is a <type>struct cmsgcred</type>.
12927  * This corresponds to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED.
12928  *
12929  * On OpenBSD, the native credential type is a <type>struct sockpeercred</type>.
12930  * This corresponds to %G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED.
12931  */
12932
12933
12934 /**
12935  * SECTION:gdatainputstream
12936  * @short_description: Data Input Stream
12937  * @include: gio/gio.h
12938  * @see_also: #GInputStream
12939  *
12940  * Data input stream implements #GInputStream and includes functions for
12941  * reading structured data directly from a binary input stream.
12942  */
12943
12944
12945 /**
12946  * SECTION:gdataoutputstream
12947  * @short_description: Data Output Stream
12948  * @include: gio/gio.h
12949  * @see_also: #GOutputStream
12950  *
12951  * Data output stream implements #GOutputStream and includes functions for
12952  * writing data directly to an output stream.
12953  */
12954
12955
12956 /**
12957  * SECTION:gdbusactiongroup
12958  * @title: GDBusActionGroup
12959  * @short_description: A D-Bus GActionGroup implementation
12960  * @see_also: <link linkend="gio-GActionGroup-exporter">GActionGroup exporter</link>
12961  *
12962  * #GDBusActionGroup is an implementation of the #GActionGroup
12963  * interface that can be used as a proxy for an action group
12964  * that is exported over D-Bus with g_dbus_connection_export_action_group().
12965  */
12966
12967
12968 /**
12969  * SECTION:gdbusaddress
12970  * @title: D-Bus Addresses
12971  * @short_description: D-Bus connection endpoints
12972  * @include: gio/gio.h
12973  *
12974  * Routines for working with D-Bus addresses. A D-Bus address is a string
12975  * like "unix:tmpdir=/tmp/my-app-name". The exact format of addresses
12976  * is explained in detail in the <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html&num;addresses">D-Bus specification</link>.
12977  */
12978
12979
12980 /**
12981  * SECTION:gdbusauthobserver
12982  * @short_description: Object used for authenticating connections
12983  * @include: gio/gio.h
12984  *
12985  * The #GDBusAuthObserver type provides a mechanism for participating
12986  * in how a #GDBusServer (or a #GDBusConnection) authenticates remote
12987  * peers. Simply instantiate a #GDBusAuthObserver and connect to the
12988  * signals you are interested in. Note that new signals may be added
12989  * in the future
12990  *
12991  * For example, if you only want to allow D-Bus connections from
12992  * processes owned by the same uid as the server, you would use a
12993  * signal handler like the following:
12994  * <example id="auth-observer"><title>Controlling Authentication</title><programlisting>
12995  * static gboolean
12996  * on_authorize_authenticated_peer (GDBusAuthObserver *observer,
12997  * GIOStream         *stream,
12998  * GCredentials      *credentials,
12999  * gpointer           user_data)
13000  * {
13001  * gboolean authorized;
13002  *
13003  * authorized = FALSE;
13004  * if (credentials != NULL)
13005  * {
13006  * GCredentials *own_credentials;
13007  * own_credentials = g_credentials_new ();
13008  * if (g_credentials_is_same_user (credentials, own_credentials, NULL))
13009  * authorized = TRUE;
13010  * g_object_unref (own_credentials);
13011  * }
13012  *
13013  * return authorized;
13014  * }
13015  * </programlisting></example>
13016  */
13017
13018
13019 /**
13020  * SECTION:gdbusconnection
13021  * @short_description: D-Bus Connections
13022  * @include: gio/gio.h
13023  *
13024  * The #GDBusConnection type is used for D-Bus connections to remote
13025  * peers such as a message buses. It is a low-level API that offers a
13026  * lot of flexibility. For instance, it lets you establish a connection
13027  * over any transport that can by represented as an #GIOStream.
13028  *
13029  * This class is rarely used directly in D-Bus clients. If you are writing
13030  * an D-Bus client, it is often easier to use the g_bus_own_name(),
13031  * g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs.
13032  *
13033  * As an exception to the usual GLib rule that a particular object must not be
13034  * used by two threads at the same time, #GDBusConnection's methods may be
13035  * called from any thread<footnote>
13036  * <para>
13037  * This is so that g_bus_get() and g_bus_get_sync() can safely return the
13038  * same #GDBusConnection when called from any thread.
13039  * </para>
13040  * </footnote>.
13041  *
13042  * Most of the ways to obtain a #GDBusConnection automatically initialize it
13043  * (i.e. connect to D-Bus): for instance, g_dbus_connection_new() and
13044  * g_bus_get(), and the synchronous versions of those methods, give you an
13045  * initialized connection. Language bindings for GIO should use
13046  * g_initable_new() or g_async_initable_new(), which also initialize the
13047  * connection.
13048  *
13049  * If you construct an uninitialized #GDBusConnection, such as via
13050  * g_object_new(), you must initialize it via g_initable_init() or
13051  * g_async_initable_init() before using its methods or properties. Calling
13052  * methods or accessing properties on a #GDBusConnection that has not completed
13053  * initialization successfully is considered to be invalid, and leads to
13054  * undefined behaviour. In particular, if initialization fails with a #GError,
13055  * the only valid thing you can do with that #GDBusConnection is to free it
13056  * with g_object_unref().
13057  *
13058  * <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>
13059  *
13060  * <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>
13061  *
13062  * <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>
13063  *
13064  * <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>
13065  */
13066
13067
13068 /**
13069  * SECTION:gdbuserror
13070  * @title: GDBusError
13071  * @short_description: Mapping D-Bus errors to and from GError
13072  * @include: gio/gio.h
13073  *
13074  * All facilities that return errors from remote methods (such as
13075  * g_dbus_connection_call_sync()) use #GError to represent both D-Bus
13076  * errors (e.g. errors returned from the other peer) and locally
13077  * in-process generated errors.
13078  *
13079  * To check if a returned #GError is an error from a remote peer, use
13080  * g_dbus_error_is_remote_error(). To get the actual D-Bus error name,
13081  * use g_dbus_error_get_remote_error(). Before presenting an error,
13082  * always use g_dbus_error_strip_remote_error().
13083  *
13084  * In addition, facilities used to return errors to a remote peer also
13085  * use #GError. See g_dbus_method_invocation_return_error() for
13086  * discussion about how the D-Bus error name is set.
13087  *
13088  * Applications can associate a #GError error domain with a set of D-Bus errors in order to
13089  * automatically map from D-Bus errors to #GError and back. This
13090  * is typically done in the function returning the #GQuark for the
13091  * error domain:
13092  * <example id="error-registration"><title>Error Registration</title><programlisting>
13093  * /<!-- -->* foo-bar-error.h: *<!-- -->/
13094  *
13095  * #define FOO_BAR_ERROR (foo_bar_error_quark ())
13096  * GQuark foo_bar_error_quark (void);
13097  *
13098  * typedef enum
13099  * {
13100  * FOO_BAR_ERROR_FAILED,
13101  * FOO_BAR_ERROR_ANOTHER_ERROR,
13102  * FOO_BAR_ERROR_SOME_THIRD_ERROR,
13103  * } FooBarError;
13104  *
13105  * /<!-- -->* foo-bar-error.c: *<!-- -->/
13106  *
13107  * static const GDBusErrorEntry foo_bar_error_entries[] =
13108  * {
13109  * {FOO_BAR_ERROR_FAILED,           "org.project.Foo.Bar.Error.Failed"},
13110  * {FOO_BAR_ERROR_ANOTHER_ERROR,    "org.project.Foo.Bar.Error.AnotherError"},
13111  * {FOO_BAR_ERROR_SOME_THIRD_ERROR, "org.project.Foo.Bar.Error.SomeThirdError"},
13112  * };
13113  *
13114  * GQuark
13115  * foo_bar_error_quark (void)
13116  * {
13117  * static volatile gsize quark_volatile = 0;
13118  * g_dbus_error_register_error_domain ("foo-bar-error-quark",
13119  * &quark_volatile,
13120  * foo_bar_error_entries,
13121  * G_N_ELEMENTS (foo_bar_error_entries));
13122  * G_STATIC_ASSERT (G_N_ELEMENTS (foo_bar_error_entries) - 1 == FOO_BAR_ERROR_SOME_THIRD_ERROR);
13123  * return (GQuark) quark_volatile;
13124  * }
13125  * </programlisting></example>
13126  * With this setup, a D-Bus peer can transparently pass e.g. %FOO_BAR_ERROR_ANOTHER_ERROR and
13127  * other peers will see the D-Bus error name <literal>org.project.Foo.Bar.Error.AnotherError</literal>.
13128  * If the other peer is using GDBus, the peer will see also %FOO_BAR_ERROR_ANOTHER_ERROR instead
13129  * of %G_IO_ERROR_DBUS_ERROR. Note that GDBus clients can still recover
13130  * <literal>org.project.Foo.Bar.Error.AnotherError</literal> using g_dbus_error_get_remote_error().
13131  *
13132  * Note that errors in the %G_DBUS_ERROR error domain is intended only
13133  * for returning errors from a remote message bus process. Errors
13134  * generated locally in-process by e.g. #GDBusConnection is from the
13135  * %G_IO_ERROR domain.
13136  */
13137
13138
13139 /**
13140  * SECTION:gdbusinterface
13141  * @short_description: Base type for D-Bus interfaces
13142  * @include: gio/gio.h
13143  *
13144  * The #GDBusInterface type is the base type for D-Bus interfaces both
13145  * on the service side (see #GDBusInterfaceSkeleton) and client side
13146  * (see #GDBusProxy).
13147  */
13148
13149
13150 /**
13151  * SECTION:gdbusinterfaceskeleton
13152  * @short_description: Service-side D-Bus interface
13153  * @include: gio/gio.h
13154  *
13155  * Abstract base class for D-Bus interfaces on the service side.
13156  */
13157
13158
13159 /**
13160  * SECTION:gdbusintrospection
13161  * @title: D-Bus Introspection Data
13162  * @short_description: Node and interface description data structures
13163  * @include: gio/gio.h
13164  *
13165  * Various data structures and convenience routines to parse and
13166  * generate D-Bus introspection XML. Introspection information is
13167  * used when registering objects with g_dbus_connection_register_object().
13168  *
13169  * The format of D-Bus introspection XML is specified in the
13170  * <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format">D-Bus specification</ulink>.
13171  */
13172
13173
13174 /**
13175  * SECTION:gdbusmenumodel
13176  * @title: GDBusMenuModel
13177  * @short_description: A D-Bus GMenuModel implementation
13178  * @see_also: <link linkend="gio-GMenuModel-exporter">GMenuModel Exporter</link>
13179  *
13180  * #GDBusMenuModel is an implementation of #GMenuModel that can be used
13181  * as a proxy for a menu model that is exported over D-Bus with
13182  * g_dbus_connection_export_menu_model().
13183  */
13184
13185
13186 /**
13187  * SECTION:gdbusmessage
13188  * @short_description: D-Bus Message
13189  * @include: gio/gio.h
13190  *
13191  * A type for representing D-Bus messages that can be sent or received
13192  * on a #GDBusConnection.
13193  */
13194
13195
13196 /**
13197  * SECTION:gdbusmethodinvocation
13198  * @short_description: Object for handling remote calls
13199  * @include: gio/gio.h
13200  *
13201  * Instances of the #GDBusMethodInvocation class are used when
13202  * handling D-Bus method calls. It provides a way to asynchronously
13203  * return results and errors.
13204  *
13205  * The normal way to obtain a #GDBusMethodInvocation object is to receive
13206  * it as an argument to the handle_method_call() function in a
13207  * #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object().
13208  */
13209
13210
13211 /**
13212  * SECTION:gdbusnameowning
13213  * @title: Owning Bus Names
13214  * @short_description: Simple API for owning bus names
13215  * @include: gio/gio.h
13216  *
13217  * Convenience API for owning bus names.
13218  *
13219  * <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>
13220  */
13221
13222
13223 /**
13224  * SECTION:gdbusnamewatching
13225  * @title: Watching Bus Names
13226  * @short_description: Simple API for watching bus names
13227  * @include: gio/gio.h
13228  *
13229  * Convenience API for watching bus names.
13230  *
13231  * <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>
13232  */
13233
13234
13235 /**
13236  * SECTION:gdbusobject
13237  * @short_description: Base type for D-Bus objects
13238  * @include: gio/gio.h
13239  *
13240  * The #GDBusObject type is the base type for D-Bus objects on both
13241  * the service side (see #GDBusObjectSkeleton) and the client side
13242  * (see #GDBusObjectProxy). It is essentially just a container of
13243  * interfaces.
13244  */
13245
13246
13247 /**
13248  * SECTION:gdbusobjectmanager
13249  * @short_description: Base type for D-Bus object managers
13250  * @include: gio/gio.h
13251  *
13252  * The #GDBusObjectManager type is the base type for service- and
13253  * client-side implementations of the standardized <ulink
13254  * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
13255  * interface.
13256  *
13257  * See #GDBusObjectManagerClient for the client-side implementation
13258  * and #GDBusObjectManagerServer for the service-side implementation.
13259  */
13260
13261
13262 /**
13263  * SECTION:gdbusobjectmanagerclient
13264  * @short_description: Client-side object manager
13265  * @include: gio/gio.h
13266  *
13267  * #GDBusObjectManagerClient is used to create, monitor and delete object
13268  * proxies for remote objects exported by a #GDBusObjectManagerServer (or any
13269  * code implementing the <ulink
13270  * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
13271  * interface).
13272  *
13273  * Once an instance of this type has been created, you can connect to
13274  * the #GDBusObjectManager::object-added and
13275  * #GDBusObjectManager::object-removed signals and inspect the
13276  * #GDBusObjectProxy objects returned by
13277  * g_dbus_object_manager_get_objects().
13278  *
13279  * If the name for a #GDBusObjectManagerClient is not owned by anyone at
13280  * object construction time, the default behavior is to request the
13281  * message bus to launch an owner for the name. This behavior can be
13282  * disabled using the %G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START
13283  * flag. It's also worth noting that this only works if the name of
13284  * interest is activatable in the first place. E.g. in some cases it
13285  * is not possible to launch an owner for the requested name. In this
13286  * case, #GDBusObjectManagerClient object construction still succeeds but
13287  * there will be no object proxies
13288  * (e.g. g_dbus_object_manager_get_objects() returns the empty list) and
13289  * the #GDBusObjectManagerClient:name-owner property is %NULL.
13290  *
13291  * The owner of the requested name can come and go (for example
13292  * consider a system service being restarted) â€“ #GDBusObjectManagerClient
13293  * handles this case too; simply connect to the #GObject::notify
13294  * signal to watch for changes on the #GDBusObjectManagerClient:name-owner
13295  * property. When the name owner vanishes, the behavior is that
13296  * #GDBusObjectManagerClient:name-owner is set to %NULL (this includes
13297  * emission of the #GObject::notify signal) and then
13298  * #GDBusObjectManager::object-removed signals are synthesized
13299  * for all currently existing object proxies. Since
13300  * #GDBusObjectManagerClient:name-owner is %NULL when this happens, you can
13301  * use this information to disambiguate a synthesized signal from a
13302  * genuine signal caused by object removal on the remote
13303  * #GDBusObjectManager. Similarly, when a new name owner appears,
13304  * #GDBusObjectManager::object-added signals are synthesized
13305  * while #GDBusObjectManagerClient:name-owner is still %NULL. Only when all
13306  * object proxies have been added, the #GDBusObjectManagerClient:name-owner
13307  * is set to the new name owner (this includes emission of the
13308  * #GObject::notify signal).  Furthermore, you are guaranteed that
13309  * #GDBusObjectManagerClient:name-owner will alternate between a name owner
13310  * (e.g. <literal>:1.42</literal>) and %NULL even in the case where
13311  * the name of interest is atomically replaced
13312  *
13313  * Ultimately, #GDBusObjectManagerClient is used to obtain #GDBusProxy
13314  * instances. All signals (including the
13315  * <literal>org.freedesktop.DBus.Properties::PropertiesChanged</literal>
13316  * signal) delivered to #GDBusProxy instances are guaranteed to
13317  * originate from the name owner. This guarantee along with the
13318  * behavior described above, means that certain race conditions
13319  * including the <emphasis><quote>half the proxy is from the old owner
13320  * and the other half is from the new owner</quote></emphasis> problem
13321  * cannot happen.
13322  *
13323  * To avoid having the application connect to signals on the returned
13324  * #GDBusObjectProxy and #GDBusProxy objects, the
13325  * #GDBusObject::interface-added,
13326  * #GDBusObject::interface-removed,
13327  * #GDBusProxy::g-properties-changed and
13328  * #GDBusProxy::g-signal signals
13329  * are also emitted on the #GDBusObjectManagerClient instance managing these
13330  * objects. The signals emitted are
13331  * #GDBusObjectManager::interface-added,
13332  * #GDBusObjectManager::interface-removed,
13333  * #GDBusObjectManagerClient::interface-proxy-properties-changed and
13334  * #GDBusObjectManagerClient::interface-proxy-signal.
13335  *
13336  * Note that all callbacks and signals are emitted in the
13337  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
13338  * that the #GDBusObjectManagerClient object was constructed
13339  * in. Additionally, the #GDBusObjectProxy and #GDBusProxy objects
13340  * originating from the #GDBusObjectManagerClient object will be created in
13341  * the same context and, consequently, will deliver signals in the
13342  * same main loop.
13343  */
13344
13345
13346 /**
13347  * SECTION:gdbusobjectmanagerserver
13348  * @short_description: Service-side object manager
13349  * @include: gio/gio.h
13350  *
13351  * #GDBusObjectManagerServer is used to export #GDBusObject instances using
13352  * the standardized <ulink
13353  * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
13354  * interface. For example, remote D-Bus clients can get all objects
13355  * and properties in a single call. Additionally, any change in the
13356  * object hierarchy is broadcast using signals. This means that D-Bus
13357  * clients can keep caches up to date by only listening to D-Bus
13358  * signals.
13359  *
13360  * See #GDBusObjectManagerClient for the client-side code that is
13361  * intended to be used with #GDBusObjectManagerServer or any D-Bus
13362  * object implementing the org.freedesktop.DBus.ObjectManager
13363  * interface.
13364  */
13365
13366
13367 /**
13368  * SECTION:gdbusobjectproxy
13369  * @short_description: Client-side D-Bus object
13370  * @include: gio/gio.h
13371  *
13372  * A #GDBusObjectProxy is an object used to represent a remote object
13373  * with one or more D-Bus interfaces. Normally, you don't instantiate
13374  * a #GDBusObjectProxy yourself - typically #GDBusObjectManagerClient
13375  * is used to obtain it.
13376  *
13377  * Since: 2.30
13378  */
13379
13380
13381 /**
13382  * SECTION:gdbusobjectskeleton
13383  * @short_description: Service-side D-Bus object
13384  * @include: gio/gio.h
13385  *
13386  * A #GDBusObjectSkeleton instance is essentially a group of D-Bus
13387  * interfaces. The set of exported interfaces on the object may be
13388  * dynamic and change at runtime.
13389  *
13390  * This type is intended to be used with #GDBusObjectManager.
13391  */
13392
13393
13394 /**
13395  * SECTION:gdbusproxy
13396  * @short_description: Client-side D-Bus interface proxy
13397  * @include: gio/gio.h
13398  *
13399  * #GDBusProxy is a base class used for proxies to access a D-Bus
13400  * interface on a remote object. A #GDBusProxy can be constructed for
13401  * both well-known and unique names.
13402  *
13403  * By default, #GDBusProxy will cache all properties (and listen to
13404  * changes) of the remote object, and proxy all signals that gets
13405  * emitted. This behaviour can be changed by passing suitable
13406  * #GDBusProxyFlags when the proxy is created. If the proxy is for a
13407  * well-known name, the property cache is flushed when the name owner
13408  * vanishes and reloaded when a name owner appears.
13409  *
13410  * If a #GDBusProxy is used for a well-known name, the owner of the
13411  * name is tracked and can be read from
13412  * #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to
13413  * get notified of changes. Additionally, only signals and property
13414  * changes emitted from the current name owner are considered and
13415  * calls are always sent to the current name owner. This avoids a
13416  * number of race conditions when the name is lost by one owner and
13417  * claimed by another. However, if no name owner currently exists,
13418  * then calls will be sent to the well-known name which may result in
13419  * the message bus launching an owner (unless
13420  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set).
13421  *
13422  * The generic #GDBusProxy::g-properties-changed and
13423  * #GDBusProxy::g-signal signals are not very convenient to work
13424  * with. Therefore, the recommended way of working with proxies is to
13425  * subclass #GDBusProxy, and have more natural properties and signals
13426  * in your derived class. See <xref linkend="gdbus-example-gdbus-codegen"/>
13427  * for how this can easily be done using the
13428  * <command><link linkend="gdbus-codegen">gdbus-codegen</link></command>
13429  * tool.
13430  *
13431  * A #GDBusProxy instance can be used from multiple threads but note
13432  * that all signals (e.g. #GDBusProxy::g-signal, #GDBusProxy::g-properties-changed
13433  * and #GObject::notify) are emitted in the
13434  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
13435  * of the thread where the instance was constructed.
13436  *
13437  * <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>
13438  */
13439
13440
13441 /**
13442  * SECTION:gdbusserver
13443  * @short_description: Helper for accepting connections
13444  * @include: gio/gio.h
13445  *
13446  * #GDBusServer is a helper for listening to and accepting D-Bus
13447  * connections. This can be used to create a new D-Bus server, allowing two
13448  * peers to use the D-Bus protocol for their own specialized communication.
13449  * A server instance provided in this way will not perform message routing or
13450  * implement the org.freedesktop.DBus interface.
13451  *
13452  * To just export an object on a well-known name on a message bus, such as the
13453  * session or system bus, you should instead use g_bus_own_name().
13454  *
13455  * <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>
13456  */
13457
13458
13459 /**
13460  * SECTION:gdbusutils
13461  * @title: D-Bus Utilities
13462  * @short_description: Various utilities related to D-Bus.
13463  * @include: gio/gio.h
13464  *
13465  * Various utility routines related to D-Bus.
13466  */
13467
13468
13469 /**
13470  * SECTION:gdesktopappinfo
13471  * @title: GDesktopAppInfo
13472  * @short_description: Application information from desktop files
13473  * @include: gio/gdesktopappinfo.h
13474  *
13475  * #GDesktopAppInfo is an implementation of #GAppInfo based on
13476  * desktop files.
13477  *
13478  * Note that <filename>&lt;gio/gdesktopappinfo.h&gt;</filename> belongs to
13479  * the UNIX-specific GIO interfaces, thus you have to use the
13480  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
13481  */
13482
13483
13484 /**
13485  * SECTION:gdrive
13486  * @short_description: Drive management
13487  * @include: gio/gio.h
13488  *
13489  * #GDrive - this represent a piece of hardware connected to the machine.
13490  * It's generally only created for removable hardware or hardware with
13491  * removable media.
13492  *
13493  * #GDrive is a container class for #GVolume objects that stem from
13494  * the same piece of media. As such, #GDrive abstracts a drive with
13495  * (or without) removable media and provides operations for querying
13496  * whether media is available, determing whether media change is
13497  * automatically detected and ejecting the media.
13498  *
13499  * If the #GDrive reports that media isn't automatically detected, one
13500  * can poll for media; typically one should not do this periodically
13501  * as a poll for media operation is potententially expensive and may
13502  * spin up the drive creating noise.
13503  *
13504  * #GDrive supports starting and stopping drives with authentication
13505  * support for the former. This can be used to support a diverse set
13506  * of use cases including connecting/disconnecting iSCSI devices,
13507  * powering down external disk enclosures and starting/stopping
13508  * multi-disk devices such as RAID devices. Note that the actual
13509  * semantics and side-effects of starting/stopping a #GDrive may vary
13510  * according to implementation. To choose the correct verbs in e.g. a
13511  * file manager, use g_drive_get_start_stop_type().
13512  *
13513  * For porting from GnomeVFS note that there is no equivalent of
13514  * #GDrive in that API.
13515  */
13516
13517
13518 /**
13519  * SECTION:gemblem
13520  * @short_description: An object for emblems
13521  * @include: gio/gio.h
13522  * @see_also: #GIcon, #GEmblemedIcon, #GLoadableIcon, #GThemedIcon
13523  *
13524  * #GEmblem is an implementation of #GIcon that supports
13525  * having an emblem, which is an icon with additional properties.
13526  * It can than be added to a #GEmblemedIcon.
13527  *
13528  * Currently, only metainformation about the emblem's origin is
13529  * supported. More may be added in the future.
13530  */
13531
13532
13533 /**
13534  * SECTION:gemblemedicon
13535  * @short_description: Icon with emblems
13536  * @include: gio/gio.h
13537  * @see_also: #GIcon, #GLoadableIcon, #GThemedIcon, #GEmblem
13538  *
13539  * #GEmblemedIcon is an implementation of #GIcon that supports
13540  * adding an emblem to an icon. Adding multiple emblems to an
13541  * icon is ensured via g_emblemed_icon_add_emblem().
13542  *
13543  * Note that #GEmblemedIcon allows no control over the position
13544  * of the emblems. See also #GEmblem for more information.
13545  */
13546
13547
13548 /**
13549  * SECTION:gfile
13550  * @short_description: File and Directory Handling
13551  * @include: gio/gio.h
13552  * @see_also: #GFileInfo, #GFileEnumerator
13553  *
13554  * #GFile is a high level abstraction for manipulating files on a
13555  * virtual file system. #GFile<!-- -->s are lightweight, immutable
13556  * objects that do no I/O upon creation. It is necessary to understand that
13557  * #GFile objects do not represent files, merely an identifier for a file. All
13558  * file content I/O is implemented as streaming operations (see #GInputStream and
13559  * #GOutputStream).
13560  *
13561  * To construct a #GFile, you can use:
13562  * g_file_new_for_path() if you have a path.
13563  * g_file_new_for_uri() if you have a URI.
13564  * g_file_new_for_commandline_arg() for a command line argument.
13565  * g_file_new_tmp() to create a temporary file from a template.
13566  * g_file_parse_name() from a utf8 string gotten from g_file_get_parse_name().
13567  *
13568  * One way to think of a #GFile is as an abstraction of a pathname. For normal
13569  * files the system pathname is what is stored internally, but as #GFile<!-- -->s
13570  * are extensible it could also be something else that corresponds to a pathname
13571  * in a userspace implementation of a filesystem.
13572  *
13573  * #GFile<!-- -->s make up hierarchies of directories and files that correspond to the
13574  * files on a filesystem. You can move through the file system with #GFile using
13575  * g_file_get_parent() to get an identifier for the parent directory, g_file_get_child()
13576  * to get a child within a directory, g_file_resolve_relative_path() to resolve a relative
13577  * path between two #GFile<!-- -->s. There can be multiple hierarchies, so you may not
13578  * end up at the same root if you repeatedly call g_file_get_parent() on two different
13579  * files.
13580  *
13581  * All #GFile<!-- -->s have a basename (get with g_file_get_basename()). These names
13582  * are byte strings that are used to identify the file on the filesystem (relative to
13583  * its parent directory) and there is no guarantees that they have any particular charset
13584  * encoding or even make any sense at all. If you want to use filenames in a user
13585  * interface you should use the display name that you can get by requesting the
13586  * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info().
13587  * This is guaranteed to be in utf8 and can be used in a user interface. But always
13588  * store the real basename or the #GFile to use to actually access the file, because
13589  * there is no way to go from a display name to the actual name.
13590  *
13591  * Using #GFile as an identifier has the same weaknesses as using a path in that
13592  * there may be multiple aliases for the same file. For instance, hard or
13593  * soft links may cause two different #GFile<!-- -->s to refer to the same file.
13594  * Other possible causes for aliases are: case insensitive filesystems, short
13595  * and long names on Fat/NTFS, or bind mounts in Linux. If you want to check if
13596  * two #GFile<!-- -->s point to the same file you can query for the
13597  * %G_FILE_ATTRIBUTE_ID_FILE attribute. Note that #GFile does some trivial
13598  * canonicalization of pathnames passed in, so that trivial differences in the
13599  * path string used at creation (duplicated slashes, slash at end of path, "."
13600  * or ".." path segments, etc) does not create different #GFile<!-- -->s.
13601  *
13602  * Many #GFile operations have both synchronous and asynchronous versions
13603  * to suit your application. Asynchronous versions of synchronous functions
13604  * simply have _async() appended to their function names. The asynchronous
13605  * I/O functions call a #GAsyncReadyCallback which is then used to finalize
13606  * the operation, producing a GAsyncResult which is then passed to the
13607  * function's matching _finish() operation.
13608  *
13609  * Some #GFile operations do not have synchronous analogs, as they may
13610  * take a very long time to finish, and blocking may leave an application
13611  * unusable. Notable cases include:
13612  * g_file_mount_mountable() to mount a mountable file.
13613  * g_file_unmount_mountable_with_operation() to unmount a mountable file.
13614  * g_file_eject_mountable_with_operation() to eject a mountable file.
13615  *
13616  * <para id="gfile-etag"><indexterm><primary>entity tag</primary></indexterm>
13617  * One notable feature of #GFile<!-- -->s are entity tags, or "etags" for
13618  * short. Entity tags are somewhat like a more abstract version of the
13619  * traditional mtime, and can be used to quickly determine if the file has
13620  * been modified from the version on the file system. See the HTTP 1.1
13621  * <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">specification</ulink>
13622  * for HTTP Etag headers, which are a very similar concept.
13623  * </para>
13624  */
13625
13626
13627 /**
13628  * SECTION:gfileattribute
13629  * @short_description: Key-Value Paired File Attributes
13630  * @include: gio/gio.h
13631  * @see_also: #GFile, #GFileInfo
13632  *
13633  * File attributes in GIO consist of a list of key-value pairs.
13634  *
13635  * Keys are strings that contain a key namespace and a key name, separated
13636  * by a colon, e.g. "namespace:keyname". Namespaces are included to sort
13637  * key-value pairs by namespaces for relevance. Keys can be retrived
13638  * using wildcards, e.g. "standard::*" will return all of the keys in the
13639  * "standard" namespace.
13640  *
13641  * Values are stored within the list in #GFileAttributeValue structures.
13642  * Values can store different types, listed in the enum #GFileAttributeType.
13643  * Upon creation of a #GFileAttributeValue, the type will be set to
13644  * %G_FILE_ATTRIBUTE_TYPE_INVALID.
13645  *
13646  * The list of possible attributes for a filesystem (pointed to by a #GFile) is
13647  * available as a #GFileAttributeInfoList. This list is queryable by key names
13648  * as indicated earlier.
13649  *
13650  * Classes that implement #GFileIface will create a #GFileAttributeInfoList and
13651  * install default keys and values for their given file system, architecture,
13652  * and other possible implementation details (e.g., on a UNIX system, a file
13653  * attribute key will be registered for the user id for a given file).
13654  *
13655  * <para>
13656  * <table>
13657  * <title>GFileAttributes Default Namespaces</title>
13658  * <tgroup cols='2' align='left'><thead>
13659  * <row><entry>Namspace</entry><entry>Description</entry></row>
13660  * </thead>
13661  * <tbody>
13662  * <row><entry>"standard"</entry><entry>The "Standard" namespace. General file
13663  * information that any application may need should be put in this namespace.
13664  * Examples include the file's name, type, and size.</entry></row>
13665  * <row><entry>"etag"</entry><entry>The <link linkend="gfile-etag">"Entity Tag"</link>
13666  * namespace. Currently, the only key in this namespace is "value", which contains
13667  * the value of the current entity tag.</entry></row>
13668  * <row><entry>"id"</entry><entry>The "Identification" namespace. This
13669  * namespace is used by file managers and applications that list directories
13670  * to check for loops and to uniquely identify files.</entry></row>
13671  * <row><entry>"access"</entry><entry>The "Access" namespace. Used to check
13672  * if a user has the proper privilidges to access files and perform
13673  * file operations. Keys in this namespace are made to be generic
13674  * and easily understood, e.g. the "can_read" key is %TRUE if
13675  * the current user has permission to read the file. UNIX permissions and
13676  * NTFS ACLs in Windows should be mapped to these values.</entry></row>
13677  * <row><entry>"mountable"</entry><entry>The "Mountable" namespace. Includes
13678  * simple boolean keys for checking if a file or path supports mount operations, e.g.
13679  * mount, unmount, eject. These are used for files of type %G_FILE_TYPE_MOUNTABLE.</entry></row>
13680  * <row><entry>"time"</entry><entry>The "Time" namespace. Includes file
13681  * access, changed, created times. </entry></row>
13682  * <row><entry>"unix"</entry><entry>The "Unix" namespace. Includes UNIX-specific
13683  * information and may not be available for all files. Examples include
13684  * the UNIX "UID", "GID", etc.</entry></row>
13685  * <row><entry>"dos"</entry><entry>The "DOS" namespace. Includes DOS-specific
13686  * information and may not be available for all files. Examples include
13687  * "is_system" for checking if a file is marked as a system file, and "is_archive"
13688  * for checking if a file is marked as an archive file.</entry></row>
13689  * <row><entry>"owner"</entry><entry>The "Owner" namespace. Includes information
13690  * about who owns a file. May not be available for all file systems. Examples include
13691  * "user" for getting the user name of the file owner. This information is often mapped from
13692  * some backend specific data such as a unix UID.</entry></row>
13693  * <row><entry>"thumbnail"</entry><entry>The "Thumbnail" namespace. Includes
13694  * information about file thumbnails and their location within the file system. Examples of
13695  * keys in this namespace include "path" to get the location of a thumbnail, and "failed"
13696  * to check if thumbnailing of the file failed.</entry></row>
13697  * <row><entry>"filesystem"</entry><entry>The "Filesystem" namespace. Gets information
13698  * about the file system where a file is located, such as its type, how much
13699  * space is left available, and the overall size of the file system.</entry></row>
13700  * <row><entry>"gvfs"</entry><entry>The "GVFS" namespace. Keys in this namespace
13701  * contain information about the current GVFS backend in use. </entry></row>
13702  * <row><entry>"xattr"</entry><entry>The "xattr" namespace. Gets information
13703  * about extended user attributes. See attr(5). The "user." prefix of the
13704  * extended user attribute name is stripped away when constructing keys in
13705  * this namespace, e.g. "xattr::mime_type" for the extended attribute with
13706  * the name "user.mime_type". Note that this information is only available
13707  * if GLib has been built with extended attribute support.</entry></row>
13708  * <row><entry>"xattr-sys"</entry><entry>The "xattr-sys" namespace.
13709  * Gets information about extended attributes which are not user-specific.
13710  * See attr(5). Note that this information is only available if GLib
13711  * has been built with extended attribute support.</entry></row>
13712  * <row><entry>"selinux"</entry><entry>The "SELinux" namespace. Includes
13713  * information about the SELinux context of files. Note that this information
13714  * is only available if GLib has been built with SELinux support.</entry></row>
13715  * </tbody>
13716  * </tgroup>
13717  * </table>
13718  * </para>
13719  *
13720  * Please note that these are not all of the possible namespaces.
13721  * More namespaces can be added from GIO modules or by individual applications.
13722  * For more information about writing GIO modules, see #GIOModule.
13723  *
13724  * <!-- TODO: Implementation note about using extended attributes on supported
13725  * file systems -->
13726  *
13727  * <para><table>
13728  * <title>GFileAttributes Built-in Keys and Value Types</title>
13729  * <tgroup cols='3' align='left'><thead>
13730  * <row><entry>Enum Value</entry><entry>Namespace:Key</entry><entry>Value Type</entry></row>
13731  * </thead><tbody>
13732  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TYPE</entry><entry>standard::type</entry><entry>uint32 (#GFileType)</entry></row>
13733  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</entry><entry>standard::is-hidden</entry><entry>boolean</entry></row>
13734  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP</entry><entry>standard::is-backup</entry><entry>boolean</entry></row>
13735  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</entry><entry>standard::is-symlink</entry><entry>boolean</entry></row>
13736  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</entry><entry>standard::is-virtual</entry><entry>boolean</entry></row>
13737  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_NAME</entry><entry>standard::name</entry><entry>byte string</entry></row>
13738  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</entry><entry>standard::display-name</entry><entry>string</entry></row>
13739  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</entry><entry>standard::edit-name</entry><entry>string</entry></row>
13740  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ICON</entry><entry>standard::icon</entry><entry>object (#GIcon)</entry></row>
13741  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</entry><entry>standard::content-type</entry><entry>string</entry></row>
13742  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</entry><entry>standard::fast-content-type</entry><entry>string</entry></row>
13743  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SIZE</entry><entry>standard::size</entry><entry>uint64</entry></row>
13744  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE</entry><entry>standard::allocated-size</entry><entry>uint64</entry></row>
13745  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</entry><entry>standard::symlink-target</entry><entry>byte string</entry></row>
13746  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TARGET_URI</entry><entry>standard::target-uri</entry><entry>string</entry></row>
13747  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER</entry><entry>standard::sort-order</entry><entry>int32</entry></row>
13748  * <row><entry>%G_FILE_ATTRIBUTE_ETAG_VALUE</entry><entry>etag::value</entry><entry>string</entry></row>
13749  * <row><entry>%G_FILE_ATTRIBUTE_ID_FILE</entry><entry>id::file</entry><entry>string</entry></row>
13750  * <row><entry>%G_FILE_ATTRIBUTE_ID_FILESYSTEM</entry><entry>id::filesystem</entry><entry>string</entry></row>
13751  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_READ</entry><entry>access::can-read</entry><entry>boolean</entry></row>
13752  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE</entry><entry>access::can-write</entry><entry>boolean</entry></row>
13753  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</entry><entry>access::can-execute</entry><entry>boolean</entry></row>
13754  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE</entry><entry>access::can-delete</entry><entry>boolean</entry></row>
13755  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH</entry><entry>access::can-trash</entry><entry>boolean</entry></row>
13756  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME</entry><entry>access::can-rename</entry><entry>boolean</entry></row>
13757  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</entry><entry>mountable::can-mount</entry><entry>boolean</entry></row>
13758  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</entry><entry>mountable::can-unmount</entry><entry>boolean</entry></row>
13759  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</entry><entry>mountable::can-eject</entry><entry>boolean</entry></row>
13760  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</entry><entry>mountable::unix-device</entry><entry>uint32</entry></row>
13761  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE</entry><entry>mountable::unix-device-file</entry><entry>string</entry></row>
13762  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</entry><entry>mountable::hal-udi</entry><entry>string</entry></row>
13763  * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED</entry><entry>time::modified</entry><entry>uint64</entry></row>
13764  * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC</entry><entry>time::modified-usec</entry><entry>uint32</entry></row>
13765  * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS</entry><entry>time::access</entry><entry>uint64</entry></row>
13766  * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS_USEC</entry><entry>time::access-usec</entry><entry>uint32</entry></row>
13767  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED</entry><entry>time::changed</entry><entry>uint64</entry></row>
13768  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED_USEC</entry><entry>time::changed-usec</entry><entry>uint32</entry></row>
13769  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED</entry><entry>time::created</entry><entry>uint64</entry></row>
13770  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED_USEC</entry><entry>time::created-usec</entry><entry>uint32</entry></row>
13771  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_DEVICE</entry><entry>unix::device</entry><entry>uint32</entry></row>
13772  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_INODE</entry><entry>unix::inode</entry><entry>uint64</entry></row>
13773  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_MODE</entry><entry>unix::mode</entry><entry>uint32</entry></row>
13774  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_NLINK</entry><entry>unix::nlink</entry><entry>uint32</entry></row>
13775  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_UID</entry><entry>unix::uid</entry><entry>uint32</entry></row>
13776  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_GID</entry><entry>unix::gid</entry><entry>uint32</entry></row>
13777  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_RDEV</entry><entry>unix::rdev</entry><entry>uint32</entry></row>
13778  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</entry><entry>unix::block-size</entry><entry>uint32</entry></row>
13779  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCKS</entry><entry>unix::blocks</entry><entry>uint64</entry></row>
13780  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</entry><entry>unix::is-mountpoint</entry><entry>boolean</entry></row>
13781  * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE</entry><entry>dos::is-archive</entry><entry>boolean</entry></row>
13782  * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_SYSTEM</entry><entry>dos::is-system</entry><entry>boolean</entry></row>
13783  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER</entry><entry>owner::user</entry><entry>string</entry></row>
13784  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER_REAL</entry><entry>owner::user-real</entry><entry>string</entry></row>
13785  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_GROUP</entry><entry>owner::group</entry><entry>string</entry></row>
13786  * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAIL_PATH</entry><entry>thumbnail::path</entry><entry>bytestring</entry></row>
13787  * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAILING_FAILED</entry><entry>thumbnail::failed</entry><entry>boolean</entry></row>
13788  * <row><entry>%G_FILE_ATTRIBUTE_PREVIEW_ICON</entry><entry>preview::icon</entry><entry>object (#GIcon)</entry></row>
13789  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_SIZE</entry><entry>filesystem::size</entry><entry>uint64</entry></row>
13790  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_FREE</entry><entry>filesystem::free</entry><entry>uint64</entry></row>
13791  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_USED</entry><entry>filesystem::used</entry><entry>uint64</entry></row>
13792  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_TYPE</entry><entry>filesystem::type</entry><entry>string</entry></row>
13793  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_READONLY</entry><entry>filesystem::readonly</entry><entry>boolean</entry></row>
13794  * <row><entry>%G_FILE_ATTRIBUTE_GVFS_BACKEND</entry><entry>gvfs::backend</entry><entry>string</entry></row>
13795  * <row><entry>%G_FILE_ATTRIBUTE_SELINUX_CONTEXT</entry><entry>selinux::context</entry><entry>string</entry></row>
13796  * </tbody></tgroup></table></para>
13797  *
13798  * Note that there are no predefined keys in the "xattr" and "xattr-sys"
13799  * namespaces. Keys for the "xattr" namespace are constructed by stripping
13800  * away the "user." prefix from the extended user attribute, and prepending
13801  * "xattr::". Keys for the "xattr-sys" namespace are constructed by
13802  * concatenating "xattr-sys::" with the extended attribute name. All extended
13803  * attribute values are returned as hex-encoded strings in which bytes outside
13804  * the ASCII range are encoded as hexadecimal escape sequences of the form
13805  * \x<replaceable>nn</replaceable>.
13806  */
13807
13808
13809 /**
13810  * SECTION:gfiledescriptorbased
13811  * @short_description: Interface for file descriptor based IO
13812  * @include: gio/gfiledescriptorbased.h
13813  * @see_also: #GInputStream, #GOutputStream
13814  *
13815  * #GFileDescriptorBased is implemented by streams (implementations of
13816  * #GInputStream or #GOutputStream) that are based on file descriptors.
13817  *
13818  * Note that <filename>&lt;gio/gfiledescriptorbased.h&gt;</filename> belongs to
13819  * the UNIX-specific GIO interfaces, thus you have to use the
13820  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
13821  *
13822  * Since: 2.24
13823  */
13824
13825
13826 /**
13827  * SECTION:gfileenumerator
13828  * @short_description: Enumerated Files Routines
13829  * @include: gio/gio.h
13830  *
13831  * #GFileEnumerator allows you to operate on a set of #GFile<!-- -->s,
13832  * returning a #GFileInfo structure for each file enumerated (e.g.
13833  * g_file_enumerate_children() will return a #GFileEnumerator for each
13834  * of the children within a directory).
13835  *
13836  * To get the next file's information from a #GFileEnumerator, use
13837  * g_file_enumerator_next_file() or its asynchronous version,
13838  * g_file_enumerator_next_files_async(). Note that the asynchronous
13839  * version will return a list of #GFileInfo<!---->s, whereas the
13840  * synchronous will only return the next file in the enumerator.
13841  *
13842  * To close a #GFileEnumerator, use g_file_enumerator_close(), or
13843  * its asynchronous version, g_file_enumerator_close_async(). Once
13844  * a #GFileEnumerator is closed, no further actions may be performed
13845  * on it, and it should be freed with g_object_unref().
13846  */
13847
13848
13849 /**
13850  * SECTION:gfileicon
13851  * @short_description: Icons pointing to an image file
13852  * @include: gio/gio.h
13853  * @see_also: #GIcon, #GLoadableIcon
13854  *
13855  * #GFileIcon specifies an icon by pointing to an image file
13856  * to be used as icon.
13857  */
13858
13859
13860 /**
13861  * SECTION:gfileinfo
13862  * @short_description: File Information and Attributes
13863  * @include: gio/gio.h
13864  * @see_also: #GFile, <link linkend="gio-GFileAttribute">GFileAttribute</link>
13865  *
13866  * Functionality for manipulating basic metadata for files. #GFileInfo
13867  * implements methods for getting information that all files should
13868  * contain, and allows for manipulation of extended attributes.
13869  *
13870  * See <link linkend="gio-GFileAttribute">GFileAttribute</link> for more
13871  * information on how GIO handles file attributes.
13872  *
13873  * To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its
13874  * async variant). To obtain a #GFileInfo for a file input or output
13875  * stream, use g_file_input_stream_query_info() or
13876  * g_file_output_stream_query_info() (or their async variants).
13877  *
13878  * To change the actual attributes of a file, you should then set the
13879  * attribute in the #GFileInfo and call g_file_set_attributes_from_info()
13880  * or g_file_set_attributes_async() on a GFile.
13881  *
13882  * However, not all attributes can be changed in the file. For instance,
13883  * the actual size of a file cannot be changed via g_file_info_set_size().
13884  * You may call g_file_query_settable_attributes() and
13885  * g_file_query_writable_namespaces() to discover the settable attributes
13886  * of a particular file at runtime.
13887  *
13888  * #GFileAttributeMatcher allows for searching through a #GFileInfo for
13889  * attributes.
13890  */
13891
13892
13893 /**
13894  * SECTION:gfileinputstream
13895  * @short_description: File input streaming operations
13896  * @include: gio/gio.h
13897  * @see_also: #GInputStream, #GDataInputStream, #GSeekable
13898  *
13899  * GFileInputStream provides input streams that take their
13900  * content from a file.
13901  *
13902  * GFileInputStream implements #GSeekable, which allows the input
13903  * stream to jump to arbitrary positions in the file, provided the
13904  * filesystem of the file allows it. To find the position of a file
13905  * input stream, use g_seekable_tell(). To find out if a file input
13906  * stream supports seeking, use g_seekable_stream_can_seek().
13907  * To position a file input stream, use g_seekable_seek().
13908  */
13909
13910
13911 /**
13912  * SECTION:gfileiostream
13913  * @short_description: File read and write streaming operations
13914  * @include: gio/gio.h
13915  * @see_also: #GIOStream, #GFileInputStream, #GFileOutputStream, #GSeekable
13916  *
13917  * GFileIOStream provides io streams that both read and write to the same
13918  * file handle.
13919  *
13920  * GFileIOStream implements #GSeekable, which allows the io
13921  * stream to jump to arbitrary positions in the file and to truncate
13922  * the file, provided the filesystem of the file supports these
13923  * operations.
13924  *
13925  * To find the position of a file io stream, use
13926  * g_seekable_tell().
13927  *
13928  * To find out if a file io stream supports seeking, use g_seekable_can_seek().
13929  * To position a file io stream, use g_seekable_seek().
13930  * To find out if a file io stream supports truncating, use
13931  * g_seekable_can_truncate(). To truncate a file io
13932  * stream, use g_seekable_truncate().
13933  *
13934  * The default implementation of all the #GFileIOStream operations
13935  * and the implementation of #GSeekable just call into the same operations
13936  * on the output stream.
13937  *
13938  * Since: 2.22
13939  */
13940
13941
13942 /**
13943  * SECTION:gfilemonitor
13944  * @short_description: File Monitor
13945  * @include: gio/gio.h
13946  *
13947  * Monitors a file or directory for changes.
13948  *
13949  * To obtain a #GFileMonitor for a file or directory, use
13950  * g_file_monitor(), g_file_monitor_file(), or
13951  * g_file_monitor_directory().
13952  *
13953  * To get informed about changes to the file or directory you are
13954  * monitoring, connect to the #GFileMonitor::changed signal. The
13955  * signal will be emitted in the <link
13956  * linkend="g-main-context-push-thread-default">thread-default main
13957  * context</link> of the thread that the monitor was created in
13958  * (though if the global default main context is blocked, this may
13959  * cause notifications to be blocked even if the thread-default
13960  * context is still running).
13961  */
13962
13963
13964 /**
13965  * SECTION:gfilenamecompleter
13966  * @short_description: Filename Completer
13967  * @include: gio/gio.h
13968  *
13969  * Completes partial file and directory names given a partial string by
13970  * looking in the file system for clues. Can return a list of possible
13971  * completion strings for widget implementations.
13972  */
13973
13974
13975 /**
13976  * SECTION:gfileoutputstream
13977  * @short_description: File output streaming operations
13978  * @include: gio/gio.h
13979  * @see_also: #GOutputStream, #GDataOutputStream, #GSeekable
13980  *
13981  * GFileOutputStream provides output streams that write their
13982  * content to a file.
13983  *
13984  * GFileOutputStream implements #GSeekable, which allows the output
13985  * stream to jump to arbitrary positions in the file and to truncate
13986  * the file, provided the filesystem of the file supports these
13987  * operations.
13988  *
13989  * To find the position of a file output stream, use g_seekable_tell().
13990  * To find out if a file output stream supports seeking, use
13991  * g_seekable_can_seek().To position a file output stream, use
13992  * g_seekable_seek(). To find out if a file output stream supports
13993  * truncating, use g_seekable_can_truncate(). To truncate a file output
13994  * stream, use g_seekable_truncate().
13995  */
13996
13997
13998 /**
13999  * SECTION:gfilterinputstream
14000  * @short_description: Filter Input Stream
14001  * @include: gio/gio.h
14002  *
14003  * Base class for input stream implementations that perform some
14004  * kind of filtering operation on a base stream. Typical examples
14005  * of filtering operations are character set conversion, compression
14006  * and byte order flipping.
14007  */
14008
14009
14010 /**
14011  * SECTION:gfilteroutputstream
14012  * @short_description: Filter Output Stream
14013  * @include: gio/gio.h
14014  *
14015  * Base class for output stream implementations that perform some
14016  * kind of filtering operation on a base stream. Typical examples
14017  * of filtering operations are character set conversion, compression
14018  * and byte order flipping.
14019  */
14020
14021
14022 /**
14023  * SECTION:gicon
14024  * @short_description: Interface for icons
14025  * @include: gio/gio.h
14026  *
14027  * #GIcon is a very minimal interface for icons. It provides functions
14028  * for checking the equality of two icons, hashing of icons and
14029  * serializing an icon to and from strings.
14030  *
14031  * #GIcon does not provide the actual pixmap for the icon as this is out
14032  * of GIO's scope, however implementations of #GIcon may contain the name
14033  * of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon).
14034  *
14035  * To obtain a hash of a #GIcon, see g_icon_hash().
14036  *
14037  * To check if two #GIcons are equal, see g_icon_equal().
14038  *
14039  * For serializing a #GIcon, use g_icon_to_string() and
14040  * g_icon_new_for_string().
14041  *
14042  * If your application or library provides one or more #GIcon
14043  * implementations you need to ensure that each #GType is registered
14044  * with the type system prior to calling g_icon_new_for_string().
14045  */
14046
14047
14048 /**
14049  * SECTION:ginetaddress
14050  * @short_description: An IPv4/IPv6 address
14051  *
14052  * #GInetAddress represents an IPv4 or IPv6 internet address. Use
14053  * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_async() to
14054  * look up the #GInetAddress for a hostname. Use
14055  * g_resolver_lookup_by_address() or
14056  * g_resolver_lookup_by_address_async() to look up the hostname for a
14057  * #GInetAddress.
14058  *
14059  * To actually connect to a remote host, you will need a
14060  * #GInetSocketAddress (which includes a #GInetAddress as well as a
14061  * port number).
14062  */
14063
14064
14065 /**
14066  * SECTION:ginetaddressmask
14067  * @short_description: An IPv4/IPv6 address mask
14068  *
14069  * #GInetAddressMask represents a range of IPv4 or IPv6 addresses
14070  * described by a base address and a length indicating how many bits
14071  * of the base address are relevant for matching purposes. These are
14072  * often given in string form. Eg, "10.0.0.0/8", or "fe80::/10".
14073  */
14074
14075
14076 /**
14077  * SECTION:ginetsocketaddress
14078  * @short_description: Internet GSocketAddress
14079  *
14080  * An IPv4 or IPv6 socket address; that is, the combination of a
14081  * #GInetAddress and a port number.
14082  */
14083
14084
14085 /**
14086  * SECTION:ginitable
14087  * @short_description: Failable object initialization interface
14088  * @include: gio/gio.h
14089  * @see_also: #GAsyncInitable
14090  *
14091  * #GInitable is implemented by objects that can fail during
14092  * initialization. If an object implements this interface then
14093  * it must be initialized as the first thing after construction,
14094  * either via g_initable_init() or g_async_initable_init_async()
14095  * (the latter is only available if it also implements #GAsyncInitable).
14096  *
14097  * If the object is not initialized, or initialization returns with an
14098  * error, then all operations on the object except g_object_ref() and
14099  * g_object_unref() are considered to be invalid, and have undefined
14100  * behaviour. They will often fail with g_critical() or g_warning(), but
14101  * this must not be relied on.
14102  *
14103  * Users of objects implementing this are not intended to use
14104  * the interface method directly, instead it will be used automatically
14105  * in various ways. For C applications you generally just call
14106  * g_initable_new() directly, or indirectly via a foo_thing_new() wrapper.
14107  * This will call g_initable_init() under the cover, returning %NULL and
14108  * setting a #GError on failure (at which point the instance is
14109  * unreferenced).
14110  *
14111  * For bindings in languages where the native constructor supports
14112  * exceptions the binding could check for objects implemention %GInitable
14113  * during normal construction and automatically initialize them, throwing
14114  * an exception on failure.
14115  */
14116
14117
14118 /**
14119  * SECTION:ginputstream
14120  * @short_description: Base class for implementing streaming input
14121  * @include: gio/gio.h
14122  *
14123  * GInputStream has functions to read from a stream (g_input_stream_read()),
14124  * to close a stream (g_input_stream_close()) and to skip some content
14125  * (g_input_stream_skip()).
14126  *
14127  * To copy the content of an input stream to an output stream without
14128  * manually handling the reads and writes, use g_output_stream_splice().
14129  *
14130  * All of these functions have async variants too.
14131  */
14132
14133
14134 /**
14135  * SECTION:gioerror
14136  * @short_description: Error helper functions
14137  * @include: gio/gio.h
14138  *
14139  * Contains helper functions for reporting errors to the user.
14140  */
14141
14142
14143 /**
14144  * SECTION:giomodule
14145  * @short_description: Loadable GIO Modules
14146  * @include: gio/gio.h
14147  *
14148  * Provides an interface and default functions for loading and unloading
14149  * modules. This is used internally to make GIO extensible, but can also
14150  * be used by others to implement module loading.
14151  */
14152
14153
14154 /**
14155  * SECTION:gioscheduler
14156  * @short_description: I/O Scheduler
14157  * @include: gio/gio.h
14158  *
14159  * Schedules asynchronous I/O operations. #GIOScheduler integrates
14160  * into the main event loop (#GMainLoop) and uses threads.
14161  *
14162  * <para id="io-priority"><indexterm><primary>I/O priority</primary></indexterm>
14163  * Each I/O operation has a priority, and the scheduler uses the priorities
14164  * to determine the order in which operations are executed. They are
14165  * <emphasis>not</emphasis> used to determine system-wide I/O scheduling.
14166  * Priorities are integers, with lower numbers indicating higher priority.
14167  * It is recommended to choose priorities between %G_PRIORITY_LOW and
14168  * %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT as a default.
14169  * </para>
14170  */
14171
14172
14173 /**
14174  * SECTION:giostream
14175  * @short_description: Base class for implementing read/write streams
14176  * @include: gio/gio.h
14177  * @see_also: #GInputStream, #GOutputStream
14178  *
14179  * GIOStream represents an object that has both read and write streams.
14180  * Generally the two streams acts as separate input and output streams,
14181  * but they share some common resources and state. For instance, for
14182  * seekable streams they may use the same position in both streams.
14183  *
14184  * Examples of #GIOStream objects are #GSocketConnection which represents
14185  * a two-way network connection, and #GFileIOStream which represent a
14186  * file handle opened in read-write mode.
14187  *
14188  * To do the actual reading and writing you need to get the substreams
14189  * with g_io_stream_get_input_stream() and g_io_stream_get_output_stream().
14190  *
14191  * The #GIOStream object owns the input and the output streams, not the other
14192  * way around, so keeping the substreams alive will not keep the #GIOStream
14193  * object alive. If the #GIOStream object is freed it will be closed, thus
14194  * closing the substream, so even if the substreams stay alive they will
14195  * always just return a %G_IO_ERROR_CLOSED for all operations.
14196  *
14197  * To close a stream use g_io_stream_close() which will close the common
14198  * stream object and also the individual substreams. You can also close
14199  * the substreams themselves. In most cases this only marks the
14200  * substream as closed, so further I/O on it fails. However, some streams
14201  * may support "half-closed" states where one direction of the stream
14202  * is actually shut down.
14203  *
14204  * Since: 2.22
14205  */
14206
14207
14208 /**
14209  * SECTION:gloadableicon
14210  * @short_description: Loadable Icons
14211  * @include: gio/gio.h
14212  * @see_also: #GIcon, #GThemedIcon
14213  *
14214  * Extends the #GIcon interface and adds the ability to
14215  * load icons from streams.
14216  */
14217
14218
14219 /**
14220  * SECTION:gmemoryinputstream
14221  * @short_description: Streaming input operations on memory chunks
14222  * @include: gio/gio.h
14223  * @see_also: #GMemoryOutputStream
14224  *
14225  * #GMemoryInputStream is a class for using arbitrary
14226  * memory chunks as input for GIO streaming input operations.
14227  */
14228
14229
14230 /**
14231  * SECTION:gmemoryoutputstream
14232  * @short_description: Streaming output operations on memory chunks
14233  * @include: gio/gio.h
14234  * @see_also: #GMemoryInputStream
14235  *
14236  * #GMemoryOutputStream is a class for using arbitrary
14237  * memory chunks as output for GIO streaming output operations.
14238  */
14239
14240
14241 /**
14242  * SECTION:gmenu
14243  * @title: GMenu
14244  * @short_description: A simple implementation of GMenuModel
14245  *
14246  * #GMenu is a simple implementation of #GMenuModel.
14247  * You populate a #GMenu by adding #GMenuItem instances to it.
14248  *
14249  * There are some convenience functions to allow you to directly
14250  * add items (avoiding #GMenuItem) for the common cases. To add
14251  * a regular item, use g_menu_insert(). To add a section, use
14252  * g_menu_insert_section(). To add a submenu, use
14253  * g_menu_insert_submenu().
14254  *
14255  * Often it is more convenient to create a #GMenu from an XML
14256  * fragment, using <link linkend="gio-GMenu-Markup">GMenu Markup</link>.
14257  */
14258
14259
14260 /**
14261  * SECTION:gmenuexporter
14262  * @title: GMenuModel exporter
14263  * @short_description: Export GMenuModels on D-Bus
14264  * @see_also: #GMenuModel, #GDBusMenuModel
14265  *
14266  * These functions support exporting a #GMenuModel on D-Bus.
14267  * The D-Bus interface that is used is a private implementation
14268  * detail.
14269  *
14270  * To access an exported #GMenuModel remotely, use
14271  * g_dbus_menu_model_get() to obtain a #GDBusMenuModel.
14272  */
14273
14274
14275 /**
14276  * SECTION:gmenumodel
14277  * @title: GMenuModel
14278  * @short_description: An abstract class representing the contents of a menu
14279  * @see_also: #GActionGroup
14280  *
14281  * #GMenuModel represents the contents of a menu -- an ordered list of
14282  * menu items. The items are associated with actions, which can be
14283  * activated through them. Items can be grouped in sections, and may
14284  * have submenus associated with them. Both items and sections usually
14285  * have some representation data, such as labels or icons. The type of
14286  * the associated action (ie whether it is stateful, and what kind of
14287  * state it has) can influence the representation of the item.
14288  *
14289  * The conceptual model of menus in #GMenuModel is hierarchical:
14290  * sections and submenus are again represented by #GMenuModels.
14291  * Menus themselves do not define their own roles. Rather, the role
14292  * of a particular #GMenuModel is defined by the item that references
14293  * it (or, in the case of the 'root' menu, is defined by the context
14294  * in which it is used).
14295  *
14296  * As an example, consider the visible portions of the menu in
14297  * <xref linkend="menu-example"/>.
14298  *
14299  * <figure id="menu-example">
14300  * <title>An example menu</title>
14301  * <graphic fileref="menu-example.png" format="PNG"></graphic>
14302  * </figure>
14303  *
14304  * There are 8 "menus" visible in the screenshot: one menubar, two
14305  * submenus and 5 sections:
14306  * <itemizedlist>
14307  * <listitem>the toplevel menubar (containing 4 items)</listitem>
14308  * <listitem>the View submenu (containing 3 sections)</listitem>
14309  * <listitem>the first section of the View submenu (containing 2 items)</listitem>
14310  * <listitem>the second section of the View submenu (containing 1 item)</listitem>
14311  * <listitem>the final section of the View submenu (containing 1 item)</listitem>
14312  * <listitem>the Highlight Mode submenu (containing 2 sections)</listitem>
14313  * <listitem>the Sources section (containing 2 items)</listitem>
14314  * <listitem>the Markup section (containing 2 items)</listitem>
14315  * </itemizedlist>
14316  *
14317  * <xref linkend="menu-model"/> illustrates the conceptual connection between
14318  * these 8 menus. Each large block in the figure represents a menu and the
14319  * smaller blocks within the large block represent items in that menu. Some
14320  * items contain references to other menus.
14321  *
14322  * <figure id="menu-model">
14323  * <title>A menu model</title>
14324  * <graphic fileref="menu-model.png" format="PNG"></graphic>
14325  * </figure>
14326  *
14327  * Notice that the separators visible in <xref linkend="menu-example"/>
14328  * appear nowhere in <xref linkend="menu-model"/>. This is because
14329  * separators are not explicitly represented in the menu model. Instead,
14330  * a separator is inserted between any two non-empty sections of a menu.
14331  * Section items can have labels just like any other item. In that case,
14332  * a display system may show a section header instead of a separator.
14333  *
14334  * The motivation for this abstract model of application controls is
14335  * that modern user interfaces tend to make these controls available
14336  * outside the application. Examples include global menus, jumplists,
14337  * dash boards, etc. To support such uses, it is necessary to 'export'
14338  * information about actions and their representation in menus, which
14339  * is exactly what the
14340  * <link linkend="gio-GActionGroup-exporter">GActionGroup exporter</link>
14341  * and the
14342  * <link linkend="gio-GMenuModel-exporter">GMenuModel exporter</link>
14343  * do for #GActionGroup and #GMenuModel. The client-side counterparts
14344  * to make use of the exported information are #GDBusActionGroup and
14345  * #GDBusMenuModel.
14346  *
14347  * The API of #GMenuModel is very generic, with iterators for the
14348  * attributes and links of an item, see g_menu_model_iterate_item_attributes()
14349  * and g_menu_model_iterate_item_links(). The 'standard' attributes and
14350  * link types have predefined names: %G_MENU_ATTRIBUTE_LABEL,
14351  * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, %G_MENU_LINK_SECTION
14352  * and %G_MENU_LINK_SUBMENU.
14353  *
14354  * Items in a #GMenuModel represent active controls if they refer to
14355  * an action that can get activated when the user interacts with the
14356  * menu item. The reference to the action is encoded by the string id
14357  * in the %G_MENU_ATTRIBUTE_ACTION attribute. An action id uniquely
14358  * identifies an action in an action group. Which action group(s) provide
14359  * actions depends on the context in which the menu model is used.
14360  * E.g. when the model is exported as the application menu of a
14361  * #GtkApplication, actions can be application-wide or window-specific
14362  * (and thus come from two different action groups). By convention, the
14363  * application-wide actions have names that start with "app.", while the
14364  * names of window-specific actions start with "win.".
14365  *
14366  * While a wide variety of stateful actions is possible, the following
14367  * is the minimum that is expected to be supported by all users of exported
14368  * menu information:
14369  * <itemizedlist>
14370  * <listitem>an action with no parameter type and no state</listitem>
14371  * <listitem>an action with no parameter type and boolean state</listitem>
14372  * <listitem>an action with string parameter type and string state</listitem>
14373  * </itemizedlist>
14374  *
14375  * <formalpara><title>Stateless</title>
14376  * <para>
14377  * A stateless action typically corresponds to an ordinary menu item.
14378  * </para>
14379  * <para>
14380  * Selecting such a menu item will activate the action (with no parameter).
14381  * </para>
14382  * </formalpara>
14383  *
14384  * <formalpara><title>Boolean State</title>
14385  * <para>
14386  * An action with a boolean state will most typically be used with a "toggle"
14387  * or "switch" menu item. The state can be set directly, but activating the
14388  * action (with no parameter) results in the state being toggled.
14389  * </para>
14390  * <para>
14391  * Selecting a toggle menu item will activate the action. The menu item should
14392  * be rendered as "checked" when the state is true.
14393  * </para>
14394  * </formalpara>
14395  *
14396  * <formalpara><title>String Parameter and State</title>
14397  * <para>
14398  * Actions with string parameters and state will most typically be used to
14399  * represent an enumerated choice over the items available for a group of
14400  * radio menu items. Activating the action with a string parameter is
14401  * equivalent to setting that parameter as the state.
14402  * </para>
14403  * <para>
14404  * Radio menu items, in addition to being associated with the action, will
14405  * have a target value. Selecting that menu item will result in activation
14406  * of the action with the target value as the parameter. The menu item should
14407  * be rendered as "selected" when the state of the action is equal to the
14408  * target value of the menu item.
14409  * </para>
14410  * </formalpara>
14411  */
14412
14413
14414 /**
14415  * SECTION:gmount
14416  * @short_description: Mount management
14417  * @include: gio/gio.h
14418  * @see_also: GVolume, GUnixMount
14419  *
14420  * The #GMount interface represents user-visible mounts. Note, when
14421  * porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.
14422  *
14423  * #GMount is a "mounted" filesystem that you can access. Mounted is in
14424  * quotes because it's not the same as a unix mount, it might be a gvfs
14425  * mount, but you can still access the files on it if you use GIO. Might or
14426  * might not be related to a volume object.
14427  *
14428  * Unmounting a #GMount instance is an asynchronous operation. For
14429  * more information about asynchronous operations, see #GAsyncReady
14430  * and #GSimpleAsyncReady. To unmount a #GMount instance, first call
14431  * g_mount_unmount_with_operation() with (at least) the #GMount instance and a
14432  * #GAsyncReadyCallback.  The callback will be fired when the
14433  * operation has resolved (either with success or failure), and a
14434  * #GAsyncReady structure will be passed to the callback.  That
14435  * callback should then call g_mount_unmount_with_operation_finish() with the #GMount
14436  * and the #GAsyncReady data to see if the operation was completed
14437  * successfully.  If an @error is present when g_mount_unmount_with_operation_finish()
14438  * is called, then it will be filled with any error information.
14439  */
14440
14441
14442 /**
14443  * SECTION:gmountoperation
14444  * @short_description: Object used for authentication and user interaction
14445  * @include: gio/gio.h
14446  *
14447  * #GMountOperation provides a mechanism for interacting with the user.
14448  * It can be used for authenticating mountable operations, such as loop
14449  * mounting files, hard drive partitions or server locations. It can
14450  * also be used to ask the user questions or show a list of applications
14451  * preventing unmount or eject operations from completing.
14452  *
14453  * Note that #GMountOperation is used for more than just #GMount
14454  * objects â€“ for example it is also used in g_drive_start() and
14455  * g_drive_stop().
14456  *
14457  * Users should instantiate a subclass of this that implements all the
14458  * various callbacks to show the required dialogs, such as
14459  * #GtkMountOperation. If no user interaction is desired (for example
14460  * when automounting filesystems at login time), usually %NULL can be
14461  * passed, see each method taking a #GMountOperation for details.
14462  */
14463
14464
14465 /**
14466  * SECTION:gnetworkaddress
14467  * @short_description: A GSocketConnectable for resolving hostnames
14468  * @include: gio/gio.h
14469  *
14470  * #GNetworkAddress provides an easy way to resolve a hostname and
14471  * then attempt to connect to that host, handling the possibility of
14472  * multiple IP addresses and multiple address families.
14473  *
14474  * See #GSocketConnectable for and example of using the connectable
14475  * interface.
14476  */
14477
14478
14479 /**
14480  * SECTION:gnetworkmonitor
14481  * @title: GNetworkMonitor
14482  * @short_description: Network status monitor
14483  * @include: gio/gio.h
14484  *
14485  * #GNetworkMonitor provides an easy-to-use cross-platform API
14486  * for monitoring network connectivity. On Linux, the implementation
14487  * is based on the kernels netlink interface.
14488  */
14489
14490
14491 /**
14492  * SECTION:gnetworkservice
14493  * @short_description: A GSocketConnectable for resolving SRV records
14494  * @include: gio/gio.h
14495  *
14496  * Like #GNetworkAddress does with hostnames, #GNetworkService
14497  * provides an easy way to resolve a SRV record, and then attempt to
14498  * connect to one of the hosts that implements that service, handling
14499  * service priority/weighting, multiple IP addresses, and multiple
14500  * address families.
14501  *
14502  * See #GSrvTarget for more information about SRV records, and see
14503  * #GSocketConnectable for and example of using the connectable
14504  * interface.
14505  */
14506
14507
14508 /**
14509  * SECTION:goutputstream
14510  * @short_description: Base class for implementing streaming output
14511  * @include: gio/gio.h
14512  *
14513  * GOutputStream has functions to write to a stream (g_output_stream_write()),
14514  * to close a stream (g_output_stream_close()) and to flush pending writes
14515  * (g_output_stream_flush()).
14516  *
14517  * To copy the content of an input stream to an output stream without
14518  * manually handling the reads and writes, use g_output_stream_splice().
14519  *
14520  * All of these functions have async variants too.
14521  */
14522
14523
14524 /**
14525  * SECTION:gpermission
14526  * @title: GPermission
14527  * @short_description: An object representing the permission to perform a certain action
14528  *
14529  * A #GPermission represents the status of the caller's permission to
14530  * perform a certain action.
14531  *
14532  * You can query if the action is currently allowed and if it is
14533  * possible to acquire the permission so that the action will be allowed
14534  * in the future.
14535  *
14536  * There is also an API to actually acquire the permission and one to
14537  * release it.
14538  *
14539  * As an example, a #GPermission might represent the ability for the
14540  * user to write to a #GSettings object.  This #GPermission object could
14541  * then be used to decide if it is appropriate to show a "Click here to
14542  * unlock" button in a dialog and to provide the mechanism to invoke
14543  * when that button is clicked.
14544  */
14545
14546
14547 /**
14548  * SECTION:gpollableinputstream
14549  * @short_description: Interface for pollable input streams
14550  * @include: gio/gio.h
14551  * @see_also: #GInputStream, #GPollableOutputStream, #GFileDescriptorBased
14552  *
14553  * #GPollableInputStream is implemented by #GInputStream<!-- -->s that
14554  * can be polled for readiness to read. This can be used when
14555  * interfacing with a non-GIO API that expects
14556  * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
14557  *
14558  * Since: 2.28
14559  */
14560
14561
14562 /**
14563  * SECTION:gpollableoutputstream
14564  * @short_description: Interface for pollable output streams
14565  * @include: gio/gio.h
14566  * @see_also: #GOutputStream, #GFileDescriptorBased, #GPollableInputStream
14567  *
14568  * #GPollableOutputStream is implemented by #GOutputStream<!-- -->s that
14569  * can be polled for readiness to write. This can be used when
14570  * interfacing with a non-GIO API that expects
14571  * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
14572  *
14573  * Since: 2.28
14574  */
14575
14576
14577 /**
14578  * SECTION:gproxy
14579  * @short_description: Interface for proxy handling
14580  *
14581  * A #GProxy handles connecting to a remote host via a given type of
14582  * proxy server. It is implemented by the 'gio-proxy' extension point.
14583  * The extensions are named after their proxy protocol name. As an
14584  * example, a SOCKS5 proxy implementation can be retrieved with the
14585  * name 'socks5' using the function
14586  * g_io_extension_point_get_extension_by_name().
14587  *
14588  * Since: 2.26
14589  */
14590
14591
14592 /**
14593  * SECTION:gproxyaddress
14594  * @short_description: An internet address with proxy information
14595  *
14596  * Support for proxied #GInetSocketAddress.
14597  */
14598
14599
14600 /**
14601  * SECTION:gproxyresolver
14602  * @short_description: Asynchronous and cancellable network proxy resolver
14603  * @include: gio/gio.h
14604  *
14605  * #GProxyResolver provides synchronous and asynchronous network proxy
14606  * resolution. #GProxyResolver is used within #GSocketClient through
14607  * the method g_socket_connectable_proxy_enumerate().
14608  */
14609
14610
14611 /**
14612  * SECTION:gremoteactiongroup
14613  * @title: GRemoteActionGroup
14614  * @short_description: a #GActionGroup that interacts with other processes
14615  *
14616  * The GRemoteActionGroup interface is implemented by #GActionGroup
14617  * instances that either transmit action invocations to other processes
14618  * or receive action invocations in the local process from other
14619  * processes.
14620  *
14621  * The interface has <literal>_full</literal> variants of the two
14622  * methods on #GActionGroup used to activate actions:
14623  * g_action_group_activate_action() and
14624  * g_action_group_change_action_state().  These variants allow a
14625  * "platform data" #GVariant to be specified: a dictionary providing
14626  * context for the action invocation (for example: timestamps, startup
14627  * notification IDs, etc).
14628  *
14629  * #GDBusActionGroup implements #GRemoteActionGroup.  This provides a
14630  * mechanism to send platform data for action invocations over D-Bus.
14631  *
14632  * Additionally, g_dbus_connection_export_action_group() will check if
14633  * the exported #GActionGroup implements #GRemoteActionGroup and use the
14634  * <literal>_full</literal> variants of the calls if available.  This
14635  * provides a mechanism by which to receive platform data for action
14636  * invocations that arrive by way of D-Bus.
14637  *
14638  * Since: 2.32
14639  */
14640
14641
14642 /**
14643  * SECTION:gresolver
14644  * @short_description: Asynchronous and cancellable DNS resolver
14645  * @include: gio/gio.h
14646  *
14647  * #GResolver provides cancellable synchronous and asynchronous DNS
14648  * resolution, for hostnames (g_resolver_lookup_by_address(),
14649  * g_resolver_lookup_by_name() and their async variants) and SRV
14650  * (service) records (g_resolver_lookup_service()).
14651  *
14652  * #GNetworkAddress and #GNetworkService provide wrappers around
14653  * #GResolver functionality that also implement #GSocketConnectable,
14654  * making it easy to connect to a remote host/service.
14655  */
14656
14657
14658 /**
14659  * SECTION:gresource
14660  * @short_description: Resource framework
14661  * @include: gio/gio.h
14662  *
14663  * Applications and libraries often contain binary or textual data that is really part of the
14664  * application, rather than user data. For instance #GtkBuilder .ui files, splashscreen images,
14665  * GMenu markup xml, CSS files, icons, etc. These are often shipped as files in <filename>$datadir/appname</filename>, or
14666  * manually included as literal strings in the code.
14667  *
14668  * The #GResource API and the <link linkend="glib-compile-schemas">glib-compile-resources</link> program
14669  * provide a convenient and efficient alternative to this which has some nice properties. You
14670  * maintain the files as normal files, so its easy to edit them, but during the build the files
14671  * are combined into a binary bundle that is linked into the executable. This means that loading
14672  * the resource files are efficient (as they are already in memory, shared with other instances) and
14673  * simple (no need to check for things like I/O errors or locate the files in the filesystem). It
14674  * also makes it easier to create relocatable applications.
14675  *
14676  * Resource files can also be marked as compresses. Such files will be included in the resource bundle
14677  * in a compressed form, but will be automatically uncompressed when the resource is used. This
14678  * is very useful e.g. for larger text files that are parsed once (or rarely) and then thrown away.
14679  *
14680  * Resource files can also be marked to be preprocessed, by setting the value of the
14681  * <literal>preprocess</literal> attribute to a comma-separated list of preprocessing options.
14682  * The only option currently supported is
14683  * <literal>xml-stripblanks</literal> which will use <literal>xmllint</literal> to strip
14684  * ignorable whitespace from the xml file. For this to work, the <envar>XMLLINT</envar>
14685  * environment variable must be set to the full path to the xmllint executable;
14686  * otherwise the preprocessing step is skipped.
14687  *
14688  * Resource bundles are created by the <link linkend="glib-compile-schemas">glib-compile-resources</link> program
14689  * which takes an xml file that describes the bundle, and a set of files that the xml references. These
14690  * are combined into a binary resource bundle.
14691  *
14692  * <example id="resource-example"><title>Example resource description</title>
14693  * <programlisting><![CDATA[
14694  * <?xml version="1.0" encoding="UTF-8"?>
14695  * <gresources>
14696  * <gresource prefix="/org/gtk/Example">
14697  * <file>data/splashscreen.png</file>
14698  * <file compressed="true">dialog.ui</file>
14699  * <file preprocess="xml-stripblanks">menumarkup.xml</file>
14700  * </gresource>
14701  * </gresources>
14702  * ]]></programlisting></example>
14703  *
14704  * This will create a resource bundle with the following files:
14705  * <programlisting><![CDATA[
14706  * /org/gtk/Example/data/splashscreen.png
14707  * /org/gtk/Example/dialog.ui
14708  * /org/gtk/Example/menumarkup.xml
14709  * ]]></programlisting>
14710  *
14711  * Note that all resources in the process share the same namespace, so use java-style
14712  * path prefixes (like in the above example) to avoid conflicts.
14713  *
14714  * You can then use <link linkend="glib-compile-schemas">glib-compile-resources</link> to compile the xml to a
14715  * binary bundle that you can load with g_resource_load(). However, its more common to use the --generate-source and
14716  * --generate-header arguments to create a source file and header to link directly into your application.
14717  *
14718  * Once a #GResource has been created and registered all the data in it can be accessed globally in the process by
14719  * using API calls like g_resources_open_stream() to stream the data or g_resources_lookup_data() to get a direct pointer
14720  * to the data. You can also use uris like "resource:///org/gtk/Example/data/splashscreen.png" with #GFile to access
14721  * the resource data.
14722  *
14723  * There are two forms of the generated source, the default version uses the compiler support for constructor
14724  * and destructor functions (where availible) to automatically create and register the #GResource on startup
14725  * or library load time. If you pass --manual-register two functions to register/unregister the resource is instead
14726  * created. This requires an explicit initialization call in your application/library, but it works on all platforms,
14727  * even on the minor ones where this is not availible. (Constructor support is availible for at least Win32, MacOS and Linux.)
14728  *
14729  * Note that resource data can point directly into the data segment of e.g. a library, so if you are unloading libraries
14730  * during runtime you need to be very careful with keeping around pointers to data from a resource, as this goes away
14731  * when the library is unloaded. However, in practice this is not generally a problem, since most resource accesses
14732  * is for your own resources, and resource data is often used once, during parsing, and then released.
14733  *
14734  * Since: 2.32
14735  */
14736
14737
14738 /**
14739  * SECTION:gseekable
14740  * @short_description: Stream seeking interface
14741  * @include: gio/gio.h
14742  * @see_also: #GInputStream, #GOutputStream
14743  *
14744  * #GSeekable is implemented by streams (implementations of
14745  * #GInputStream or #GOutputStream) that support seeking.
14746  */
14747
14748
14749 /**
14750  * SECTION:gsettings
14751  * @short_description: High-level API for application settings
14752  *
14753  * The #GSettings class provides a convenient API for storing and retrieving
14754  * application settings.
14755  *
14756  * Reads and writes can be considered to be non-blocking.  Reading
14757  * settings with #GSettings is typically extremely fast: on
14758  * approximately the same order of magnitude (but slower than) a
14759  * #GHashTable lookup.  Writing settings is also extremely fast in terms
14760  * of time to return to your application, but can be extremely expensive
14761  * for other threads and other processes.  Many settings backends
14762  * (including dconf) have lazy initialisation which means in the common
14763  * case of the user using their computer without modifying any settings
14764  * a lot of work can be avoided.  For dconf, the D-Bus service doesn't
14765  * even need to be started in this case.  For this reason, you should
14766  * only ever modify #GSettings keys in response to explicit user action.
14767  * Particular care should be paid to ensure that modifications are not
14768  * made during startup -- for example, when setting the initial value
14769  * of preferences widgets.  The built-in g_settings_bind() functionality
14770  * is careful not to write settings in response to notify signals as a
14771  * result of modifications that it makes to widgets.
14772  *
14773  * When creating a GSettings instance, you have to specify a schema
14774  * that describes the keys in your settings and their types and default
14775  * values, as well as some other information.
14776  *
14777  * Normally, a schema has as fixed path that determines where the settings
14778  * are stored in the conceptual global tree of settings. However, schemas
14779  * can also be 'relocatable', i.e. not equipped with a fixed path. This is
14780  * useful e.g. when the schema describes an 'account', and you want to be
14781  * able to store a arbitrary number of accounts.
14782  *
14783  * Unlike other configuration systems (like GConf), GSettings does not
14784  * restrict keys to basic types like strings and numbers. GSettings stores
14785  * values as #GVariant, and allows any #GVariantType for keys. Key names
14786  * are restricted to lowercase characters, numbers and '-'. Furthermore,
14787  * the names must begin with a lowercase character, must not end
14788  * with a '-', and must not contain consecutive dashes.
14789  *
14790  * Similar to GConf, the default values in GSettings schemas can be
14791  * localized, but the localized values are stored in gettext catalogs
14792  * and looked up with the domain that is specified in the
14793  * <tag class="attribute">gettext-domain</tag> attribute of the
14794  * <tag class="starttag">schemalist</tag> or <tag class="starttag">schema</tag>
14795  * elements and the category that is specified in the l10n attribute of the
14796  * <tag class="starttag">key</tag> element.
14797  *
14798  * GSettings uses schemas in a compact binary form that is created
14799  * by the <link linkend="glib-compile-schemas">glib-compile-schemas</link>
14800  * utility. The input is a schema description in an XML format that can be
14801  * described by the following DTD:
14802  * |[<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>]|
14803  *
14804  * glib-compile-schemas expects schema files to have the extension <filename>.gschema.xml</filename>
14805  *
14806  * At runtime, schemas are identified by their id (as specified
14807  * in the <tag class="attribute">id</tag> attribute of the
14808  * <tag class="starttag">schema</tag> element). The
14809  * convention for schema ids is to use a dotted name, similar in
14810  * style to a D-Bus bus name, e.g. "org.gnome.SessionManager". In particular,
14811  * if the settings are for a specific service that owns a D-Bus bus name,
14812  * the D-Bus bus name and schema id should match. For schemas which deal
14813  * with settings not associated with one named application, the id should
14814  * not use StudlyCaps, e.g. "org.gnome.font-rendering".
14815  *
14816  * In addition to #GVariant types, keys can have types that have enumerated
14817  * types. These can be described by a <tag class="starttag">choice</tag>,
14818  * <tag class="starttag">enum</tag> or <tag class="starttag">flags</tag> element, see
14819  * <xref linkend="schema-enumerated"/>. The underlying type of
14820  * such a key is string, but you can use g_settings_get_enum(),
14821  * g_settings_set_enum(), g_settings_get_flags(), g_settings_set_flags()
14822  * access the numeric values corresponding to the string value of enum
14823  * and flags keys.
14824  *
14825  * <example id="schema-default-values"><title>Default values</title>
14826  * <programlisting><![CDATA[
14827  * <schemalist>
14828  * <schema id="org.gtk.Test" path="/tests/" gettext-domain="test">
14829  *
14830  * <key name="greeting" type="s">
14831  * <default l10n="messages">"Hello, earthlings"</default>
14832  * <summary>A greeting</summary>
14833  * <description>
14834  * Greeting of the invading martians
14835  * </description>
14836  * </key>
14837  *
14838  * <key name="box" type="(ii)">
14839  * <default>(20,30)</default>
14840  * </key>
14841  *
14842  * </schema>
14843  * </schemalist>
14844  * ]]></programlisting></example>
14845  *
14846  * <example id="schema-enumerated"><title>Ranges, choices and enumerated types</title>
14847  * <programlisting><![CDATA[
14848  * <schemalist>
14849  *
14850  * <enum id="org.gtk.Test.myenum">
14851  * <value nick="first" value="1"/>
14852  * <value nick="second" value="2"/>
14853  * </enum>
14854  *
14855  * <flags id="org.gtk.Test.myflags">
14856  * <value nick="flag1" value="1"/>
14857  * <value nick="flag2" value="2"/>
14858  * <value nick="flag3" value="4"/>
14859  * </flags>
14860  *
14861  * <schema id="org.gtk.Test">
14862  *
14863  * <key name="key-with-range" type="i">
14864  * <range min="1" max="100"/>
14865  * <default>10</default>
14866  * </key>
14867  *
14868  * <key name="key-with-choices" type="s">
14869  * <choices>
14870  * <choice value='Elisabeth'/>
14871  * <choice value='Annabeth'/>
14872  * <choice value='Joe'/>
14873  * </choices>
14874  * <aliases>
14875  * <alias value='Anna' target='Annabeth'/>
14876  * <alias value='Beth' target='Elisabeth'/>
14877  * </aliases>
14878  * <default>'Joe'</default>
14879  * </key>
14880  *
14881  * <key name='enumerated-key' enum='org.gtk.Test.myenum'>
14882  * <default>'first'</default>
14883  * </key>
14884  *
14885  * <key name='flags-key' flags='org.gtk.Test.myflags'>
14886  * <default>["flag1",flag2"]</default>
14887  * </key>
14888  * </schema>
14889  * </schemalist>
14890  * ]]></programlisting></example>
14891  *
14892  * <refsect2>
14893  * <title>Vendor overrides</title>
14894  * <para>
14895  * Default values are defined in the schemas that get installed by
14896  * an application. Sometimes, it is necessary for a vendor or distributor
14897  * to adjust these defaults. Since patching the XML source for the schema
14898  * is inconvenient and error-prone,
14899  * <link linkend="glib-compile-schemas">glib-compile-schemas</link> reads
14900  * so-called 'vendor override' files. These are keyfiles in the same
14901  * directory as the XML schema sources which can override default values.
14902  * The schema id serves as the group name in the key file, and the values
14903  * are expected in serialized GVariant form, as in the following example:
14904  * <informalexample><programlisting>
14905  * [org.gtk.Example]
14906  * key1='string'
14907  * key2=1.5
14908  * </programlisting></informalexample>
14909  * </para>
14910  * <para>
14911  * glib-compile-schemas expects schema files to have the extension
14912  * <filename>.gschema.override</filename>
14913  * </para>
14914  * </refsect2>
14915  *
14916  * <refsect2>
14917  * <title>Binding</title>
14918  * <para>
14919  * A very convenient feature of GSettings lets you bind #GObject properties
14920  * directly to settings, using g_settings_bind(). Once a GObject property
14921  * has been bound to a setting, changes on either side are automatically
14922  * propagated to the other side. GSettings handles details like
14923  * mapping between GObject and GVariant types, and preventing infinite
14924  * cycles.
14925  * </para>
14926  * <para>
14927  * This makes it very easy to hook up a preferences dialog to the
14928  * underlying settings. To make this even more convenient, GSettings
14929  * looks for a boolean property with the name "sensitivity" and
14930  * automatically binds it to the writability of the bound setting.
14931  * If this 'magic' gets in the way, it can be suppressed with the
14932  * #G_SETTINGS_BIND_NO_SENSITIVITY flag.
14933  * </para>
14934  * </refsect2>
14935  */
14936
14937
14938 /**
14939  * SECTION:gsettingsbackend
14940  * @title: GSettingsBackend
14941  * @short_description: Interface for settings backend implementations
14942  * @include: gio/gsettingsbackend.h
14943  * @see_also: #GSettings, #GIOExtensionPoint
14944  *
14945  * The #GSettingsBackend interface defines a generic interface for
14946  * non-strictly-typed data that is stored in a hierarchy. To implement
14947  * an alternative storage backend for #GSettings, you need to implement
14948  * the #GSettingsBackend interface and then make it implement the
14949  * extension point #G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.
14950  *
14951  * The interface defines methods for reading and writing values, a
14952  * method for determining if writing of certain values will fail
14953  * (lockdown) and a change notification mechanism.
14954  *
14955  * The semantics of the interface are very precisely defined and
14956  * implementations must carefully adhere to the expectations of
14957  * callers that are documented on each of the interface methods.
14958  *
14959  * Some of the GSettingsBackend functions accept or return a #GTree.
14960  * These trees always have strings as keys and #GVariant as values.
14961  * g_settings_backend_create_tree() is a convenience function to create
14962  * suitable trees.
14963  *
14964  * <note><para>
14965  * The #GSettingsBackend API is exported to allow third-party
14966  * implementations, but does not carry the same stability guarantees
14967  * as the public GIO API. For this reason, you have to define the
14968  * C preprocessor symbol #G_SETTINGS_ENABLE_BACKEND before including
14969  * <filename>gio/gsettingsbackend.h</filename>
14970  * </para></note>
14971  */
14972
14973
14974 /**
14975  * SECTION:gsettingsschema
14976  * @short_description: introspecting and controlling the loading of #GSettings schemas
14977  *
14978  * The #GSettingsSchemaSource and #GSettingsSchema APIs provide a
14979  * mechanism for advanced control over the loading of schemas and a
14980  * mechanism for introspecting their content.
14981  *
14982  * Plugin loading systems that wish to provide plugins a way to access
14983  * settings face the problem of how to make the schemas for these
14984  * settings visible to GSettings.  Typically, a plugin will want to ship
14985  * the schema along with itself and it won't be installed into the
14986  * standard system directories for schemas.
14987  *
14988  * #GSettingsSchemaSource provides a mechanism for dealing with this by
14989  * allowing the creation of a new 'schema source' from which schemas can
14990  * be acquired.  This schema source can then become part of the metadata
14991  * associated with the plugin and queried whenever the plugin requires
14992  * access to some settings.
14993  *
14994  * Consider the following example:
14995  *
14996  * |[
14997  * typedef struct
14998  * {
14999  * ...
15000  * GSettingsSchemaSource *schema_source;
15001  * ...
15002  * } Plugin;
15003  *
15004  * Plugin *
15005  * initialise_plugin (const gchar *dir)
15006  * {
15007  * Plugin *plugin;
15008  *
15009  * ...
15010  *
15011  * plugin->schema_source =
15012  * g_settings_new_schema_source_from_directory (dir,
15013  * g_settings_schema_source_get_default (), FALSE, NULL);
15014  *
15015  * ...
15016  *
15017  * return plugin;
15018  * }
15019  *
15020  * ...
15021  *
15022  * GSettings *
15023  * plugin_get_settings (Plugin      *plugin,
15024  * const gchar *schema_id)
15025  * {
15026  * GSettingsSchema *schema;
15027  *
15028  * if (schema_id == NULL)
15029  * schema_id = plugin->identifier;
15030  *
15031  * schema = g_settings_schema_source_lookup (plugin->schema_source,
15032  * schema_id, FALSE);
15033  *
15034  * if (schema == NULL)
15035  * {
15036  * ... disable the plugin or abort, etc ...
15037  * }
15038  *
15039  * return g_settings_new_full (schema, NULL, NULL);
15040  * }
15041  * ]|
15042  *
15043  * The code above shows how hooks should be added to the code that
15044  * initialises (or enables) the plugin to create the schema source and
15045  * how an API can be added to the plugin system to provide a convenient
15046  * way for the plugin to access its settings, using the schemas that it
15047  * ships.
15048  *
15049  * From the standpoint of the plugin, it would need to ensure that it
15050  * ships a gschemas.compiled file as part of itself, and then simply do
15051  * the following:
15052  *
15053  * |[
15054  * {
15055  * GSettings *settings;
15056  * gint some_value;
15057  *
15058  * settings = plugin_get_settings (self, NULL);
15059  * some_value = g_settings_get_int (settings, "some-value");
15060  * ...
15061  * }
15062  * ]|
15063  *
15064  * It's also possible that the plugin system expects the schema source
15065  * files (ie: .gschema.xml files) instead of a gschemas.compiled file.
15066  * In that case, the plugin loading system must compile the schemas for
15067  * itself before attempting to create the settings source.
15068  *
15069  * Since: 2.32
15070  */
15071
15072
15073 /**
15074  * SECTION:gsimpleaction
15075  * @title: GSimpleAction
15076  * @short_description: A simple GAction implementation
15077  *
15078  * A #GSimpleAction is the obvious simple implementation of the #GAction
15079  * interface. This is the easiest way to create an action for purposes of
15080  * adding it to a #GSimpleActionGroup.
15081  *
15082  * See also #GtkAction.
15083  */
15084
15085
15086 /**
15087  * SECTION:gsimpleactiongroup
15088  * @title: GSimpleActionGroup
15089  * @short_description: A simple GActionGroup implementation
15090  *
15091  * #GSimpleActionGroup is a hash table filled with #GAction objects,
15092  * implementing the #GActionGroup and #GActionMap interfaces.
15093  */
15094
15095
15096 /**
15097  * SECTION:gsimpleasyncresult
15098  * @short_description: Simple asynchronous results implementation
15099  * @include: gio/gio.h
15100  * @see_also: #GAsyncResult
15101  *
15102  * Implements #GAsyncResult for simple cases. Most of the time, this
15103  * will be all an application needs, and will be used transparently.
15104  * Because of this, #GSimpleAsyncResult is used throughout GIO for
15105  * handling asynchronous functions.
15106  *
15107  * GSimpleAsyncResult handles #GAsyncReadyCallback<!-- -->s, error
15108  * reporting, operation cancellation and the final state of an operation,
15109  * completely transparent to the application. Results can be returned
15110  * as a pointer e.g. for functions that return data that is collected
15111  * asynchronously, a boolean value for checking the success or failure
15112  * of an operation, or a #gssize for operations which return the number
15113  * of bytes modified by the operation; all of the simple return cases
15114  * are covered.
15115  *
15116  * Most of the time, an application will not need to know of the details
15117  * of this API; it is handled transparently, and any necessary operations
15118  * are handled by #GAsyncResult's interface. However, if implementing a
15119  * new GIO module, for writing language bindings, or for complex
15120  * applications that need better control of how asynchronous operations
15121  * are completed, it is important to understand this functionality.
15122  *
15123  * GSimpleAsyncResults are tagged with the calling function to ensure
15124  * that asynchronous functions and their finishing functions are used
15125  * together correctly.
15126  *
15127  * To create a new #GSimpleAsyncResult, call g_simple_async_result_new().
15128  * If the result needs to be created for a #GError, use
15129  * g_simple_async_result_new_from_error() or
15130  * g_simple_async_result_new_take_error(). If a #GError is not available
15131  * (e.g. the asynchronous operation's doesn't take a #GError argument),
15132  * but the result still needs to be created for an error condition, use
15133  * g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
15134  * if your application or binding requires passing a variable argument list
15135  * directly), and the error can then be propagated through the use of
15136  * g_simple_async_result_propagate_error().
15137  *
15138  * An asynchronous operation can be made to ignore a cancellation event by
15139  * calling g_simple_async_result_set_handle_cancellation() with a
15140  * #GSimpleAsyncResult for the operation and %FALSE. This is useful for
15141  * operations that are dangerous to cancel, such as close (which would
15142  * cause a leak if cancelled before being run).
15143  *
15144  * GSimpleAsyncResult can integrate into GLib's event loop, #GMainLoop,
15145  * or it can use #GThread<!-- -->s.
15146  * g_simple_async_result_complete() will finish an I/O task directly
15147  * from the point where it is called. g_simple_async_result_complete_in_idle()
15148  * will finish it from an idle handler in the <link
15149  * linkend="g-main-context-push-thread-default">thread-default main
15150  * context</link>. g_simple_async_result_run_in_thread() will run the
15151  * job in a separate thread and then deliver the result to the
15152  * thread-default main context.
15153  *
15154  * To set the results of an asynchronous function,
15155  * g_simple_async_result_set_op_res_gpointer(),
15156  * g_simple_async_result_set_op_res_gboolean(), and
15157  * g_simple_async_result_set_op_res_gssize()
15158  * are provided, setting the operation's result to a gpointer, gboolean, or
15159  * gssize, respectively.
15160  *
15161  * Likewise, to get the result of an asynchronous function,
15162  * g_simple_async_result_get_op_res_gpointer(),
15163  * g_simple_async_result_get_op_res_gboolean(), and
15164  * g_simple_async_result_get_op_res_gssize() are
15165  * provided, getting the operation's result as a gpointer, gboolean, and
15166  * gssize, respectively.
15167  *
15168  * For the details of the requirements implementations must respect, see
15169  * #GAsyncResult.  A typical implementation of an asynchronous operation
15170  * using GSimpleAsyncResult looks something like this:
15171  *
15172  * |[
15173  * static void
15174  * baked_cb (Cake    *cake,
15175  * gpointer user_data)
15176  * {
15177  * /&ast; In this example, this callback is not given a reference to the cake, so
15178  * &ast; the GSimpleAsyncResult has to take a reference to it.
15179  * &ast;/
15180  * GSimpleAsyncResult *result = user_data;
15181  *
15182  * if (cake == NULL)
15183  * g_simple_async_result_set_error (result,
15184  * BAKER_ERRORS,
15185  * BAKER_ERROR_NO_FLOUR,
15186  * "Go to the supermarket");
15187  * else
15188  * g_simple_async_result_set_op_res_gpointer (result,
15189  * g_object_ref (cake),
15190  * g_object_unref);
15191  *
15192  *
15193  * /&ast; In this example, we assume that baked_cb is called as a callback from
15194  * &ast; the mainloop, so it's safe to complete the operation synchronously here.
15195  * &ast; If, however, _baker_prepare_cake () might call its callback without
15196  * &ast; first returning to the mainloop â€” inadvisable, but some APIs do so â€”
15197  * &ast; we would need to use g_simple_async_result_complete_in_idle().
15198  * &ast;/
15199  * g_simple_async_result_complete (result);
15200  * g_object_unref (result);
15201  * }
15202  *
15203  * void
15204  * baker_bake_cake_async (Baker              *self,
15205  * guint               radius,
15206  * GAsyncReadyCallback callback,
15207  * gpointer            user_data)
15208  * {
15209  * GSimpleAsyncResult *simple;
15210  * Cake               *cake;
15211  *
15212  * if (radius < 3)
15213  * {
15214  * g_simple_async_report_error_in_idle (G_OBJECT (self),
15215  * callback,
15216  * user_data,
15217  * BAKER_ERRORS,
15218  * BAKER_ERROR_TOO_SMALL,
15219  * "%ucm radius cakes are silly",
15220  * radius);
15221  * return;
15222  * }
15223  *
15224  * simple = g_simple_async_result_new (G_OBJECT (self),
15225  * callback,
15226  * user_data,
15227  * baker_bake_cake_async);
15228  * cake = _baker_get_cached_cake (self, radius);
15229  *
15230  * if (cake != NULL)
15231  * {
15232  * g_simple_async_result_set_op_res_gpointer (simple,
15233  * g_object_ref (cake),
15234  * g_object_unref);
15235  * g_simple_async_result_complete_in_idle (simple);
15236  * g_object_unref (simple);
15237  * /&ast; Drop the reference returned by _baker_get_cached_cake(); the
15238  * &ast; GSimpleAsyncResult has taken its own reference.
15239  * &ast;/
15240  * g_object_unref (cake);
15241  * return;
15242  * }
15243  *
15244  * _baker_prepare_cake (self, radius, baked_cb, simple);
15245  * }
15246  *
15247  * Cake *
15248  * baker_bake_cake_finish (Baker        *self,
15249  * GAsyncResult *result,
15250  * GError      **error)
15251  * {
15252  * GSimpleAsyncResult *simple;
15253  * Cake               *cake;
15254  *
15255  * g_return_val_if_fail (g_simple_async_result_is_valid (result,
15256  * G_OBJECT (self),
15257  * baker_bake_cake_async),
15258  * NULL);
15259  *
15260  * simple = (GSimpleAsyncResult *) result;
15261  *
15262  * if (g_simple_async_result_propagate_error (simple, error))
15263  * return NULL;
15264  *
15265  * cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple));
15266  * return g_object_ref (cake);
15267  * }
15268  * ]|
15269  */
15270
15271
15272 /**
15273  * SECTION:gsimplepermission
15274  * @title: GSimplePermission
15275  * @short_description: A GPermission that doesn't change value
15276  *
15277  * #GSimplePermission is a trivial implementation of #GPermission that
15278  * represents a permission that is either always or never allowed.  The
15279  * value is given at construction and doesn't change.
15280  *
15281  * Calling request or release will result in errors.
15282  */
15283
15284
15285 /**
15286  * SECTION:gsocket
15287  * @short_description: Low-level socket object
15288  * @include: gio/gio.h
15289  * @see_also: #GInitable
15290  *
15291  * A #GSocket is a low-level networking primitive. It is a more or less
15292  * direct mapping of the BSD socket API in a portable GObject based API.
15293  * It supports both the UNIX socket implementations and winsock2 on Windows.
15294  *
15295  * #GSocket is the platform independent base upon which the higher level
15296  * network primitives are based. Applications are not typically meant to
15297  * use it directly, but rather through classes like #GSocketClient,
15298  * #GSocketService and #GSocketConnection. However there may be cases where
15299  * direct use of #GSocket is useful.
15300  *
15301  * #GSocket implements the #GInitable interface, so if it is manually constructed
15302  * by e.g. g_object_new() you must call g_initable_init() and check the
15303  * results before using the object. This is done automatically in
15304  * g_socket_new() and g_socket_new_from_fd(), so these functions can return
15305  * %NULL.
15306  *
15307  * Sockets operate in two general modes, blocking or non-blocking. When
15308  * in blocking mode all operations block until the requested operation
15309  * is finished or there is an error. In non-blocking mode all calls that
15310  * would block return immediately with a %G_IO_ERROR_WOULD_BLOCK error.
15311  * To know when a call would successfully run you can call g_socket_condition_check(),
15312  * or g_socket_condition_wait(). You can also use g_socket_create_source() and
15313  * attach it to a #GMainContext to get callbacks when I/O is possible.
15314  * Note that all sockets are always set to non blocking mode in the system, and
15315  * blocking mode is emulated in GSocket.
15316  *
15317  * When working in non-blocking mode applications should always be able to
15318  * handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other
15319  * function said that I/O was possible. This can easily happen in case
15320  * of a race condition in the application, but it can also happen for other
15321  * reasons. For instance, on Windows a socket is always seen as writable
15322  * until a write returns %G_IO_ERROR_WOULD_BLOCK.
15323  *
15324  * #GSocket<!-- -->s can be either connection oriented or datagram based.
15325  * For connection oriented types you must first establish a connection by
15326  * either connecting to an address or accepting a connection from another
15327  * address. For connectionless socket types the target/source address is
15328  * specified or received in each I/O operation.
15329  *
15330  * All socket file descriptors are set to be close-on-exec.
15331  *
15332  * Note that creating a #GSocket causes the signal %SIGPIPE to be
15333  * ignored for the remainder of the program. If you are writing a
15334  * command-line utility that uses #GSocket, you may need to take into
15335  * account the fact that your program will not automatically be killed
15336  * if it tries to write to %stdout after it has been closed.
15337  *
15338  * Since: 2.22
15339  */
15340
15341
15342 /**
15343  * SECTION:gsocketaddress
15344  * @short_description: Abstract base class representing endpoints for socket communication
15345  *
15346  * #GSocketAddress is the equivalent of <type>struct sockaddr</type>
15347  * in the BSD sockets API. This is an abstract class; use
15348  * #GInetSocketAddress for internet sockets, or #GUnixSocketAddress
15349  * for UNIX domain sockets.
15350  */
15351
15352
15353 /**
15354  * SECTION:gsocketclient
15355  * @short_description: Helper for connecting to a network service
15356  * @include: gio/gio.h
15357  * @see_also: #GSocketConnection, #GSocketListener
15358  *
15359  * #GSocketClient is a high-level utility class for connecting to a
15360  * network host using a connection oriented socket type.
15361  *
15362  * You create a #GSocketClient object, set any options you want, and then
15363  * call a sync or async connect operation, which returns a #GSocketConnection
15364  * subclass on success.
15365  *
15366  * The type of the #GSocketConnection object returned depends on the type of
15367  * the underlying socket that is in use. For instance, for a TCP/IP connection
15368  * it will be a #GTcpConnection.
15369  *
15370  * Since: 2.22
15371  */
15372
15373
15374 /**
15375  * SECTION:gsocketconnectable
15376  * @short_description: Interface for potential socket endpoints
15377  *
15378  * Objects that describe one or more potential socket endpoints
15379  * implement #GSocketConnectable. Callers can then use
15380  * g_socket_connectable_enumerate() to get a #GSocketAddressEnumerator
15381  * to try out each socket address in turn until one succeeds, as shown
15382  * in the sample code below.
15383  *
15384  * |[
15385  * MyConnectionType *
15386  * connect_to_host (const char    *hostname,
15387  * guint16        port,
15388  * GCancellable  *cancellable,
15389  * GError       **error)
15390  * {
15391  * MyConnection *conn = NULL;
15392  * GSocketConnectable *addr;
15393  * GSocketAddressEnumerator *enumerator;
15394  * GSocketAddress *sockaddr;
15395  * GError *conn_error = NULL;
15396  *
15397  * addr = g_network_address_new ("www.gnome.org", 80);
15398  * enumerator = g_socket_connectable_enumerate (addr);
15399  * g_object_unref (addr);
15400  *
15401  * /<!-- -->* Try each sockaddr until we succeed. Record the first
15402  * * connection error, but not any further ones (since they'll probably
15403  * * be basically the same as the first).
15404  * *<!-- -->/
15405  * while (!conn && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
15406  * {
15407  * conn = connect_to_sockaddr (sockaddr, conn_error ? NULL : &conn_error);
15408  * g_object_unref (sockaddr);
15409  * }
15410  * g_object_unref (enumerator);
15411  *
15412  * if (conn)
15413  * {
15414  * if (conn_error)
15415  * {
15416  * /<!-- -->* We couldn't connect to the first address, but we succeeded
15417  * * in connecting to a later address.
15418  * *<!-- -->/
15419  * g_error_free (conn_error);
15420  * }
15421  * return conn;
15422  * }
15423  * else if (error)
15424  * {
15425  * /<!-- -->* Either the initial lookup failed, or else the caller
15426  * * cancelled us.
15427  * *<!-- -->/
15428  * if (conn_error)
15429  * g_error_free (conn_error);
15430  * return NULL;
15431  * }
15432  * else
15433  * {
15434  * g_error_propagate (error, conn_error);
15435  * return NULL;
15436  * }
15437  * }
15438  * ]|
15439  */
15440
15441
15442 /**
15443  * SECTION:gsocketconnection
15444  * @short_description: A socket connection
15445  * @include: gio/gio.h
15446  * @see_also: #GIOStream, #GSocketClient, #GSocketListener
15447  *
15448  * #GSocketConnection is a #GIOStream for a connected socket. They
15449  * can be created either by #GSocketClient when connecting to a host,
15450  * or by #GSocketListener when accepting a new client.
15451  *
15452  * The type of the #GSocketConnection object returned from these calls
15453  * depends on the type of the underlying socket that is in use. For
15454  * instance, for a TCP/IP connection it will be a #GTcpConnection.
15455  *
15456  * Choosing what type of object to construct is done with the socket
15457  * connection factory, and it is possible for 3rd parties to register
15458  * custom socket connection types for specific combination of socket
15459  * family/type/protocol using g_socket_connection_factory_register_type().
15460  *
15461  * Since: 2.22
15462  */
15463
15464
15465 /**
15466  * SECTION:gsocketcontrolmessage
15467  * @title: GSocketControlMessage
15468  * @short_description: A GSocket control message
15469  * @see_also: #GSocket.
15470  *
15471  * A #GSocketControlMessage is a special-purpose utility message that
15472  * can be sent to or received from a #GSocket. These types of
15473  * messages are often called "ancillary data".
15474  *
15475  * The message can represent some sort of special instruction to or
15476  * information from the socket or can represent a special kind of
15477  * transfer to the peer (for example, sending a file description over
15478  * a UNIX socket).
15479  *
15480  * These messages are sent with g_socket_send_message() and received
15481  * with g_socket_receive_message().
15482  *
15483  * To extend the set of control message that can be sent, subclass this
15484  * class and override the get_size, get_level, get_type and serialize
15485  * methods.
15486  *
15487  * To extend the set of control messages that can be received, subclass
15488  * this class and implement the deserialize method. Also, make sure your
15489  * class is registered with the GType typesystem before calling
15490  * g_socket_receive_message() to read such a message.
15491  *
15492  * Since: 2.22
15493  */
15494
15495
15496 /**
15497  * SECTION:gsocketlistener
15498  * @title: GSocketListener
15499  * @short_description: Helper for accepting network client connections
15500  * @see_also: #GThreadedSocketService, #GSocketService.
15501  *
15502  * A #GSocketListener is an object that keeps track of a set
15503  * of server sockets and helps you accept sockets from any of the
15504  * socket, either sync or async.
15505  *
15506  * If you want to implement a network server, also look at #GSocketService
15507  * and #GThreadedSocketService which are subclass of #GSocketListener
15508  * that makes this even easier.
15509  *
15510  * Since: 2.22
15511  */
15512
15513
15514 /**
15515  * SECTION:gsocketservice
15516  * @title: GSocketService
15517  * @short_description: Make it easy to implement a network service
15518  * @see_also: #GThreadedSocketService, #GSocketListener.
15519  *
15520  * A #GSocketService is an object that represents a service that
15521  * is provided to the network or over local sockets.  When a new
15522  * connection is made to the service the #GSocketService::incoming
15523  * signal is emitted.
15524  *
15525  * A #GSocketService is a subclass of #GSocketListener and you need
15526  * to add the addresses you want to accept connections on with the
15527  * #GSocketListener APIs.
15528  *
15529  * There are two options for implementing a network service based on
15530  * #GSocketService. The first is to create the service using
15531  * g_socket_service_new() and to connect to the #GSocketService::incoming
15532  * signal. The second is to subclass #GSocketService and override the
15533  * default signal handler implementation.
15534  *
15535  * In either case, the handler must immediately return, or else it
15536  * will block additional incoming connections from being serviced.
15537  * If you are interested in writing connection handlers that contain
15538  * blocking code then see #GThreadedSocketService.
15539  *
15540  * The socket service runs on the main loop of the <link
15541  * linkend="g-main-context-push-thread-default-context">thread-default
15542  * context</link> of the thread it is created in, and is not
15543  * threadsafe in general. However, the calls to start and stop the
15544  * service are thread-safe so these can be used from threads that
15545  * handle incoming clients.
15546  *
15547  * Since: 2.22
15548  */
15549
15550
15551 /**
15552  * SECTION:gsrvtarget
15553  * @short_description: DNS SRV record target
15554  * @include: gio/gio.h
15555  *
15556  * SRV (service) records are used by some network protocols to provide
15557  * service-specific aliasing and load-balancing. For example, XMPP
15558  * (Jabber) uses SRV records to locate the XMPP server for a domain;
15559  * rather than connecting directly to "example.com" or assuming a
15560  * specific server hostname like "xmpp.example.com", an XMPP client
15561  * would look up the "xmpp-client" SRV record for "example.com", and
15562  * then connect to whatever host was pointed to by that record.
15563  *
15564  * You can use g_resolver_lookup_service() or
15565  * g_resolver_lookup_service_async() to find the #GSrvTarget<!-- -->s
15566  * for a given service. However, if you are simply planning to connect
15567  * to the remote service, you can use #GNetworkService's
15568  * #GSocketConnectable interface and not need to worry about
15569  * #GSrvTarget at all.
15570  */
15571
15572
15573 /**
15574  * SECTION:gtcpconnection
15575  * @title: GTcpConnection
15576  * @short_description: A TCP GSocketConnection
15577  * @see_also: #GSocketConnection.
15578  *
15579  * This is the subclass of #GSocketConnection that is created
15580  * for TCP/IP sockets.
15581  *
15582  * Since: 2.22
15583  */
15584
15585
15586 /**
15587  * SECTION:gtcpwrapperconnection
15588  * @title: GTcpWrapperConnection
15589  * @short_description: wrapper for non-GSocketConnection-based, GSocket-based GIOStreams
15590  * @see_also: #GSocketConnection.
15591  *
15592  * A #GTcpWrapperConnection can be used to wrap a #GIOStream that is
15593  * based on a #GSocket, but which is not actually a
15594  * #GSocketConnection. This is used by #GSocketClient so that it can
15595  * always return a #GSocketConnection, even when the connection it has
15596  * actually created is not directly a #GSocketConnection.
15597  *
15598  * Since: 2.28
15599  */
15600
15601
15602 /**
15603  * SECTION:gthemedicon
15604  * @short_description: Icon theming support
15605  * @include: gio/gio.h
15606  * @see_also: #GIcon, #GLoadableIcon
15607  *
15608  * #GThemedIcon is an implementation of #GIcon that supports icon themes.
15609  * #GThemedIcon contains a list of all of the icons present in an icon
15610  * theme, so that icons can be looked up quickly. #GThemedIcon does
15611  * not provide actual pixmaps for icons, just the icon names.
15612  * Ideally something like gtk_icon_theme_choose_icon() should be used to
15613  * resolve the list of names so that fallback icons work nicely with
15614  * themes that inherit other themes.
15615  */
15616
15617
15618 /**
15619  * SECTION:gthreadedsocketservice
15620  * @title: GThreadedSocketService
15621  * @short_description: A threaded GSocketService
15622  * @see_also: #GSocketService.
15623  *
15624  * A #GThreadedSocketService is a simple subclass of #GSocketService
15625  * that handles incoming connections by creating a worker thread and
15626  * dispatching the connection to it by emitting the
15627  * #GThreadedSocketService::run signal in the new thread.
15628  *
15629  * The signal handler may perform blocking IO and need not return
15630  * until the connection is closed.
15631  *
15632  * The service is implemented using a thread pool, so there is a
15633  * limited amount of threads available to serve incoming requests.
15634  * The service automatically stops the #GSocketService from accepting
15635  * new connections when all threads are busy.
15636  *
15637  * As with #GSocketService, you may connect to #GThreadedSocketService::run,
15638  * or subclass and override the default handler.
15639  */
15640
15641
15642 /**
15643  * SECTION:gtls
15644  * @title: TLS Overview
15645  * @short_description: TLS (aka SSL) support for GSocketConnection
15646  * @include: gio/gio.h
15647  *
15648  * #GTlsConnection and related classes provide TLS (Transport Layer
15649  * Security, previously known as SSL, Secure Sockets Layer) support for
15650  * gio-based network streams.
15651  *
15652  * In the simplest case, for a client connection, you can just set the
15653  * #GSocketClient:tls flag on a #GSocketClient, and then any
15654  * connections created by that client will have TLS negotiated
15655  * automatically, using appropriate default settings, and rejecting
15656  * any invalid or self-signed certificates (unless you change that
15657  * default by setting the #GSocketClient:tls-validation-flags
15658  * property). The returned object will be a #GTcpWrapperConnection,
15659  * which wraps the underlying #GTlsClientConnection.
15660  *
15661  * For greater control, you can create your own #GTlsClientConnection,
15662  * wrapping a #GSocketConnection (or an arbitrary #GIOStream with
15663  * pollable input and output streams) and then connect to its signals,
15664  * such as #GTlsConnection::accept-certificate, before starting the
15665  * handshake.
15666  *
15667  * Server-side TLS is similar, using #GTlsServerConnection. At the
15668  * moment, there is no support for automatically wrapping server-side
15669  * connections in the way #GSocketClient does for client-side
15670  * connections.
15671  */
15672
15673
15674 /**
15675  * SECTION:gtlsbackend
15676  * @title: GTlsBackend
15677  * @short_description: TLS backend implementation
15678  * @include: gio/gio.h
15679  *
15680  *
15681  */
15682
15683
15684 /**
15685  * SECTION:gtlscertificate
15686  * @title: GTlsCertificate
15687  * @short_description: TLS certificate
15688  * @see_also: #GTlsConnection
15689  *
15690  * A certificate used for TLS authentication and encryption.
15691  * This can represent either a public key only (eg, the certificate
15692  * received by a client from a server), or the combination of
15693  * a public key and a private key (which is needed when acting as a
15694  * #GTlsServerConnection).
15695  *
15696  * Since: 2.28
15697  */
15698
15699
15700 /**
15701  * SECTION:gtlsclientconnection
15702  * @short_description: TLS client-side connection
15703  * @include: gio/gio.h
15704  *
15705  * #GTlsClientConnection is the client-side subclass of
15706  * #GTlsConnection, representing a client-side TLS connection.
15707  */
15708
15709
15710 /**
15711  * SECTION:gtlsconnection
15712  * @short_description: TLS connection type
15713  * @include: gio/gio.h
15714  *
15715  * #GTlsConnection is the base TLS connection class type, which wraps
15716  * a #GIOStream and provides TLS encryption on top of it. Its
15717  * subclasses, #GTlsClientConnection and #GTlsServerConnection,
15718  * implement client-side and server-side TLS, respectively.
15719  *
15720  * Since: 2.28
15721  */
15722
15723
15724 /**
15725  * SECTION:gtlsdatabase
15726  * @short_description: TLS database type
15727  * @include: gio/gio.h
15728  *
15729  * #GTlsDatabase is used to lookup certificates and other information
15730  * from a certificate or key store. It is an abstract base class which
15731  * TLS library specific subtypes override.
15732  *
15733  * Most common client applications will not directly interact with
15734  * #GTlsDatabase. It is used internally by #GTlsConnection.
15735  *
15736  * Since: 2.30
15737  */
15738
15739
15740 /**
15741  * SECTION:gtlsfiledatabase
15742  * @short_description: TLS file based database type
15743  * @include: gio/gio.h
15744  *
15745  * #GTlsFileDatabase is implemented by #GTlsDatabase objects which load
15746  * their certificate information from a file. It is in interface which
15747  * TLS library specific subtypes implement.
15748  *
15749  * Since: 2.30
15750  */
15751
15752
15753 /**
15754  * SECTION:gtlsinteraction
15755  * @short_description: Interaction with the user during TLS operations.
15756  * @include: gio/gio.h
15757  *
15758  * #GTlsInteraction provides a mechanism for the TLS connection and database
15759  * code to interact with the user. It can be used to ask the user for passwords.
15760  *
15761  * To use a #GTlsInteraction with a TLS connection use
15762  * g_tls_connection_set_interaction().
15763  *
15764  * Callers should instantiate a derived class that implements the various
15765  * interaction methods to show the required dialogs.
15766  *
15767  * Callers should use the 'invoke' functions like
15768  * g_tls_interaction_invoke_ask_password() to run interaction methods. These
15769  * functions make sure that the interaction is invoked in the main loop
15770  * and not in the current thread, if the current thread is not running the
15771  * main loop.
15772  *
15773  * Derived classes can choose to implement whichever interactions methods they'd
15774  * like to support by overriding those virtual methods in their class
15775  * initialization function. Any interactions not implemented will return
15776  * %G_TLS_INTERACTION_UNHANDLED. If a derived class implements an async method,
15777  * it must also implement the corresponding finish method.
15778  */
15779
15780
15781 /**
15782  * SECTION:gtlspassword
15783  * @title: GTlsPassword
15784  * @short_description: TLS Passwords for prompting
15785  * @include: gio/gio.h
15786  *
15787  * Holds a password used in TLS.
15788  */
15789
15790
15791 /**
15792  * SECTION:gtlsserverconnection
15793  * @short_description: TLS server-side connection
15794  * @include: gio/gio.h
15795  *
15796  * #GTlsServerConnection is the server-side subclass of #GTlsConnection,
15797  * representing a server-side TLS connection.
15798  *
15799  * Since: 2.28
15800  */
15801
15802
15803 /**
15804  * SECTION:gunixconnection
15805  * @title: GUnixConnection
15806  * @short_description: A UNIX domain GSocketConnection
15807  * @include: gio/gunixconnection.h
15808  * @see_also: #GSocketConnection.
15809  *
15810  * This is the subclass of #GSocketConnection that is created
15811  * for UNIX domain sockets.
15812  *
15813  * It contains functions to do some of the UNIX socket specific
15814  * functionality like passing file descriptors.
15815  *
15816  * Note that <filename>&lt;gio/gunixconnection.h&gt;</filename> belongs to
15817  * the UNIX-specific GIO interfaces, thus you have to use the
15818  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15819  *
15820  * Since: 2.22
15821  */
15822
15823
15824 /**
15825  * SECTION:gunixcredentialsmessage
15826  * @title: GUnixCredentialsMessage
15827  * @short_description: A GSocketControlMessage containing credentials
15828  * @include: gio/gunixcredentialsmessage.h
15829  * @see_also: #GUnixConnection, #GSocketControlMessage
15830  *
15831  * This #GSocketControlMessage contains a #GCredentials instance.  It
15832  * may be sent using g_socket_send_message() and received using
15833  * g_socket_receive_message() over UNIX sockets (ie: sockets in the
15834  * %G_SOCKET_FAMILY_UNIX family).
15835  *
15836  * For an easier way to send and receive credentials over
15837  * stream-oriented UNIX sockets, see
15838  * g_unix_connection_send_credentials() and
15839  * g_unix_connection_receive_credentials(). To receive credentials of
15840  * a foreign process connected to a socket, use
15841  * g_socket_get_credentials().
15842  */
15843
15844
15845 /**
15846  * SECTION:gunixfdlist
15847  * @title: GUnixFDList
15848  * @short_description: An object containing a set of UNIX file descriptors
15849  * @include: gio/gunixfdlist.h
15850  * @see_also: #GUnixFDMessage
15851  *
15852  * A #GUnixFDList contains a list of file descriptors.  It owns the file
15853  * descriptors that it contains, closing them when finalized.
15854  *
15855  * It may be wrapped in a #GUnixFDMessage and sent over a #GSocket in
15856  * the %G_SOCKET_ADDRESS_UNIX family by using g_socket_send_message()
15857  * and received using g_socket_receive_message().
15858  *
15859  * Note that <filename>&lt;gio/gunixfdlist.h&gt;</filename> belongs to
15860  * the UNIX-specific GIO interfaces, thus you have to use the
15861  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15862  */
15863
15864
15865 /**
15866  * SECTION:gunixfdmessage
15867  * @title: GUnixFDMessage
15868  * @short_description: A GSocketControlMessage containing a GUnixFDList
15869  * @include: gio/gunixfdmessage.h
15870  * @see_also: #GUnixConnection, #GUnixFDList, #GSocketControlMessage
15871  *
15872  * This #GSocketControlMessage contains a #GUnixFDList.
15873  * It may be sent using g_socket_send_message() and received using
15874  * g_socket_receive_message() over UNIX sockets (ie: sockets in the
15875  * %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied
15876  * between processes by the kernel.
15877  *
15878  * For an easier way to send and receive file descriptors over
15879  * stream-oriented UNIX sockets, see g_unix_connection_send_fd() and
15880  * g_unix_connection_receive_fd().
15881  *
15882  * Note that <filename>&lt;gio/gunixfdmessage.h&gt;</filename> belongs to
15883  * the UNIX-specific GIO interfaces, thus you have to use the
15884  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15885  */
15886
15887
15888 /**
15889  * SECTION:gunixinputstream
15890  * @short_description: Streaming input operations for UNIX file descriptors
15891  * @include: gio/gunixinputstream.h
15892  * @see_also: #GInputStream
15893  *
15894  * #GUnixInputStream implements #GInputStream for reading from a UNIX
15895  * file descriptor, including asynchronous operations. (If the file
15896  * descriptor refers to a socket or pipe, this will use poll() to do
15897  * asynchronous I/O. If it refers to a regular file, it will fall back
15898  * to doing asynchronous I/O in another thread.)
15899  *
15900  * Note that <filename>&lt;gio/gunixinputstream.h&gt;</filename> belongs
15901  * to the UNIX-specific GIO interfaces, thus you have to use the
15902  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15903  */
15904
15905
15906 /**
15907  * SECTION:gunixmounts
15908  * @include: gio/gunixmounts.h
15909  * @short_description: UNIX mounts
15910  *
15911  * Routines for managing mounted UNIX mount points and paths.
15912  *
15913  * Note that <filename>&lt;gio/gunixmounts.h&gt;</filename> belongs to the
15914  * UNIX-specific GIO interfaces, thus you have to use the
15915  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15916  */
15917
15918
15919 /**
15920  * SECTION:gunixoutputstream
15921  * @short_description: Streaming output operations for UNIX file descriptors
15922  * @include: gio/gunixoutputstream.h
15923  * @see_also: #GOutputStream
15924  *
15925  * #GUnixOutputStream implements #GOutputStream for writing to a UNIX
15926  * file descriptor, including asynchronous operations. (If the file
15927  * descriptor refers to a socket or pipe, this will use poll() to do
15928  * asynchronous I/O. If it refers to a regular file, it will fall back
15929  * to doing asynchronous I/O in another thread.)
15930  *
15931  * Note that <filename>&lt;gio/gunixoutputstream.h&gt;</filename> belongs
15932  * to the UNIX-specific GIO interfaces, thus you have to use the
15933  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15934  */
15935
15936
15937 /**
15938  * SECTION:gunixsocketaddress
15939  * @short_description: UNIX GSocketAddress
15940  * @include: gio/gunixsocketaddress.h
15941  *
15942  * Support for UNIX-domain (also known as local) sockets.
15943  *
15944  * UNIX domain sockets are generally visible in the filesystem.
15945  * However, some systems support abstract socket names which are not
15946  * visible in the filesystem and not affected by the filesystem
15947  * permissions, visibility, etc. Currently this is only supported
15948  * under Linux. If you attempt to use abstract sockets on other
15949  * systems, function calls may return %G_IO_ERROR_NOT_SUPPORTED
15950  * errors. You can use g_unix_socket_address_abstract_names_supported()
15951  * to see if abstract names are supported.
15952  *
15953  * Note that <filename>&lt;gio/gunixsocketaddress.h&gt;</filename> belongs to
15954  * the UNIX-specific GIO interfaces, thus you have to use the
15955  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15956  */
15957
15958
15959 /**
15960  * SECTION:gvfs
15961  * @short_description: Virtual File System
15962  * @include: gio/gio.h
15963  *
15964  * Entry point for using GIO functionality.
15965  */
15966
15967
15968 /**
15969  * SECTION:gvolume
15970  * @short_description: Volume management
15971  * @include: gio/gio.h
15972  *
15973  * The #GVolume interface represents user-visible objects that can be
15974  * mounted. Note, when porting from GnomeVFS, #GVolume is the moral
15975  * equivalent of #GnomeVFSDrive.
15976  *
15977  * Mounting a #GVolume instance is an asynchronous operation. For more
15978  * information about asynchronous operations, see #GAsyncReady and
15979  * #GSimpleAsyncReady. To mount a #GVolume, first call
15980  * g_volume_mount() with (at least) the #GVolume instance, optionally
15981  * a #GMountOperation object and a #GAsyncReadyCallback.
15982  *
15983  * Typically, one will only want to pass %NULL for the
15984  * #GMountOperation if automounting all volumes when a desktop session
15985  * starts since it's not desirable to put up a lot of dialogs asking
15986  * for credentials.
15987  *
15988  * The callback will be fired when the operation has resolved (either
15989  * with success or failure), and a #GAsyncReady structure will be
15990  * passed to the callback.  That callback should then call
15991  * g_volume_mount_finish() with the #GVolume instance and the
15992  * #GAsyncReady data to see if the operation was completed
15993  * successfully.  If an @error is present when g_volume_mount_finish()
15994  * is called, then it will be filled with any error information.
15995  *
15996  * <para id="volume-identifier">
15997  * It is sometimes necessary to directly access the underlying
15998  * operating system object behind a volume (e.g. for passing a volume
15999  * to an application via the commandline). For this purpose, GIO
16000  * allows to obtain an 'identifier' for the volume. There can be
16001  * different kinds of identifiers, such as Hal UDIs, filesystem labels,
16002  * traditional Unix devices (e.g. <filename>/dev/sda2</filename>),
16003  * uuids. GIO uses predefind strings as names for the different kinds
16004  * of identifiers: #G_VOLUME_IDENTIFIER_KIND_HAL_UDI,
16005  * #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. Use g_volume_get_identifier()
16006  * to obtain an identifier for a volume.
16007  * </para>
16008  *
16009  * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available
16010  * when the gvfs hal volume monitor is in use. Other volume monitors
16011  * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
16012  * identifier, which can be used to obtain a hal device by means of
16013  * libhal_manger_find_device_string_match().
16014  */
16015
16016
16017 /**
16018  * SECTION:gvolumemonitor
16019  * @short_description: Volume Monitor
16020  * @include: gio/gio.h
16021  * @see_also: #GFileMonitor
16022  *
16023  * #GVolumeMonitor is for listing the user interesting devices and volumes
16024  * on the computer. In other words, what a file selector or file manager
16025  * would show in a sidebar.
16026  *
16027  * #GVolumeMonitor is not <link
16028  * linkend="g-main-context-push-thread-default">thread-default-context
16029  * aware</link>, and so should not be used other than from the main
16030  * thread, with no thread-default-context active.
16031  */
16032
16033
16034 /**
16035  * SECTION:gwin32inputstream
16036  * @short_description: Streaming input operations for Windows file handles
16037  * @include: gio/gwin32inputstream.h
16038  * @see_also: #GInputStream
16039  *
16040  * #GWin32InputStream implements #GInputStream for reading from a
16041  * Windows file handle.
16042  *
16043  * Note that <filename>&lt;gio/gwin32inputstream.h&gt;</filename> belongs
16044  * to the Windows-specific GIO interfaces, thus you have to use the
16045  * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
16046  */
16047
16048
16049 /**
16050  * SECTION:gwin32outputstream
16051  * @short_description: Streaming output operations for Windows file handles
16052  * @include: gio/gwin32outputstream.h
16053  * @see_also: #GOutputStream
16054  *
16055  * #GWin32OutputStream implements #GOutputStream for writing to a
16056  * Windows file handle.
16057  *
16058  * Note that <filename>&lt;gio/gwin32outputstream.h&gt;</filename> belongs
16059  * to the Windows-specific GIO interfaces, thus you have to use the
16060  * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
16061  */
16062
16063
16064 /**
16065  * SECTION:gzcompressor
16066  * @short_description: Zlib compressor
16067  * @include: gio/gio.h
16068  *
16069  * #GZlibCompressor is an implementation of #GConverter that
16070  * compresses data using zlib.
16071  */
16072
16073
16074 /**
16075  * SECTION:gzdecompressor
16076  * @short_description: Zlib decompressor
16077  * @include: gio/gio.h
16078  *
16079  * #GZlibDecompressor is an implementation of #GConverter that
16080  * decompresses data compressed with zlib.
16081  */
16082
16083
16084 /**
16085  * The string info map is an efficient data structure designed to be:
16086  *
16087  * 1) Implement <choices> with a list of valid strings
16088  *
16089  * 2) Implement <alias> by mapping one string to another
16090  *
16091  * 3) Implement enumerated types by mapping strings to integer values
16092  * (and back).
16093  *
16094  * The map is made out of an array of uint32s.  Each entry in the array
16095  * is an integer value, followed by a specially formatted string value:
16096  *
16097  * The string starts with the byte 0xff or 0xfe, followed by the
16098  * content of the string, followed by a nul byte, followed by
16099  * additional nul bytes for padding, followed by a 0xff byte.
16100  *
16101  * Padding is added so that the entire formatted string takes up a
16102  * multiple of 4 bytes, and not less than 8 bytes.  The requirement
16103  * for a string to take up 8 bytes is so that the scanner doesn't lose
16104  * synch and mistake a string for an integer value.
16105  *
16106  * The first byte of the formatted string depends on if the integer is
16107  * an enum value (0xff) or an alias (0xfe).  If it is an alias then the
16108  * number refers to the word offset within the info map at which the
16109  * integer corresponding to the "target" value is stored.
16110  *
16111  * For example, consider the case of the string info map representing an
16112  * enumerated type of 'foo' (value 1) and 'bar' (value 2) and 'baz'
16113  * (alias for 'bar').  Note that string info maps are always little
16114  * endian.
16115  *
16116  * x01 x00 x00 x00   xff 'f' 'o' 'o'   x00 x00 x00 xff   x02 x00 x00 x00
16117  * xff 'b' 'a' 'r'   x00 x00 x00 xff   x03 x00 x00 x00   xfe 'b' 'a' 'z'
16118  * x00 x00 x00 xff
16119  *
16120  *
16121  * The operations that someone may want to perform with the map:
16122  *
16123  * - lookup if a string is valid (and not an alias)
16124  * - lookup the integer value for a enum 'nick'
16125  * - lookup the integer value for the target of an alias
16126  * - lookup an alias and convert it to its target string
16127  * - lookup the enum nick for a given value
16128  *
16129  * In order to lookup if a string is valid, it is padded on either side
16130  * (as described) and scanned for in the array.  For example, you might
16131  * look for "foo":
16132  *
16133  * xff 'f' 'o' 'o'   x00 x00 x00 xff
16134  *
16135  * In order to lookup the integer value for a nick, the string is padded
16136  * on either side and scanned for in the array, as above.  Instead of
16137  * merely succeeding, we look at the integer value to the left of the
16138  * match.  This is the enum value.
16139  *
16140  * In order to lookup an alias and convert it to its target enum value,
16141  * the string is padded on either side (as described, with 0xfe) and
16142  * scanned for.  For example, you might look for "baz":
16143  *
16144  * xfe 'b' 'a' 'z'  x00 x00 x00 xff
16145  *
16146  * The integer immediately preceding the match then contains the offset
16147  * of the integer value of the target.  In our example, that's '3'.
16148  * This index is dereferenced to find the enum value of '2'.
16149  *
16150  * To convert the alias to its target string, 5 bytes just need to be
16151  * added past the start of the integer value to find the start of the
16152  * string.
16153  *
16154  * To lookup the enum nick for a given value, the value is searched for
16155  * in the array.  To ensure that the value isn't matching the inside of a
16156  * string, we must check that it is either the first item in the array or
16157  * immediately preceded by the byte 0xff.  It must also be immediately
16158  * followed by the byte 0xff.
16159  *
16160  * Because strings always take up a minimum of 2 words, because 0xff or
16161  * 0xfe never appear inside of a utf-8 string and because no two integer
16162  * values ever appear in sequence, the only way we can have the
16163  * sequence:
16164  *
16165  * xff __ __ __ __ xff (or 0xfe)
16166  *
16167  * is in the event of an integer nested between two strings.
16168  *
16169  * For implementation simplicity/efficiency, strings may not be more
16170  * than 65 characters in length (ie: 17 32bit words after padding).
16171  *
16172  * In the event that we are doing <choices> (ie: not an enum type) then
16173  * the value of each choice is set to zero and ignored.
16174  */
16175
16176
16177 /**
16178  * _g_io_module_get_default:
16179  * @extension_point: the name of an extension point
16180  * @envvar: (allow-none): the name of an environment variable to override the default implementation.
16181  * @verify_func: (allow-none): a function to call to verify that a given implementation is usable in the current environment.
16182  *
16183  * Retrieves the default object implementing @extension_point.
16184  *
16185  * If @envvar is not %NULL, and the environment variable with that
16186  * name is set, then the implementation it specifies will be tried
16187  * first. After that, or if @envvar is not set, all other
16188  * implementations will be tried in order of decreasing priority.
16189  *
16190  * If an extension point implementation implements #GInitable, then
16191  * that implementation will only be used if it initializes
16192  * successfully. Otherwise, if @verify_func is not %NULL, then it will
16193  * be called on each candidate implementation after construction, to
16194  * check if it is actually usable or not.
16195  *
16196  * The result is cached after it is generated the first time, and
16197  * the function is thread-safe.
16198  *
16199  * @extension_point, or %NULL if there are no usable
16200  * implementations.
16201  *
16202  * Returns: (transfer none): an object implementing
16203  */
16204
16205
16206 /**
16207  * g_action_activate:
16208  * @action: a #GAction
16209  * @parameter: (allow-none): the parameter to the activation
16210  *
16211  * Activates the action.
16212  *
16213  * @parameter must be the correct type of parameter for the action (ie:
16214  * the parameter type given at construction time).  If the parameter
16215  * type was %NULL then @parameter must also be %NULL.
16216  *
16217  * Since: 2.28
16218  */
16219
16220
16221 /**
16222  * g_action_change_state:
16223  * @action: a #GAction
16224  * @value: the new state
16225  *
16226  * Request for the state of @action to be changed to @value.
16227  *
16228  * The action must be stateful and @value must be of the correct type.
16229  * See g_action_get_state_type().
16230  *
16231  * This call merely requests a change.  The action may refuse to change
16232  * its state or may change its state to something other than @value.
16233  * See g_action_get_state_hint().
16234  *
16235  * If the @value GVariant is floating, it is consumed.
16236  *
16237  * Since: 2.30
16238  */
16239
16240
16241 /**
16242  * g_action_get_enabled:
16243  * @action: a #GAction
16244  *
16245  * Checks if @action is currently enabled.
16246  *
16247  * An action must be enabled in order to be activated or in order to
16248  * have its state changed from outside callers.
16249  *
16250  * Returns: whether the action is enabled
16251  * Since: 2.28
16252  */
16253
16254
16255 /**
16256  * g_action_get_name:
16257  * @action: a #GAction
16258  *
16259  * Queries the name of @action.
16260  *
16261  * Returns: the name of the action
16262  * Since: 2.28
16263  */
16264
16265
16266 /**
16267  * g_action_get_parameter_type:
16268  * @action: a #GAction
16269  *
16270  * Queries the type of the parameter that must be given when activating
16271  * @action.
16272  *
16273  * When activating the action using g_action_activate(), the #GVariant
16274  * given to that function must be of the type returned by this function.
16275  *
16276  * In the case that this function returns %NULL, you must not give any
16277  * #GVariant, but %NULL instead.
16278  *
16279  * Returns: (allow-none): the parameter type
16280  * Since: 2.28
16281  */
16282
16283
16284 /**
16285  * g_action_get_state:
16286  * @action: a #GAction
16287  *
16288  * Queries the current state of @action.
16289  *
16290  * If the action is not stateful then %NULL will be returned.  If the
16291  * action is stateful then the type of the return value is the type
16292  * given by g_action_get_state_type().
16293  *
16294  * The return value (if non-%NULL) should be freed with
16295  * g_variant_unref() when it is no longer required.
16296  *
16297  * Returns: (transfer full): the current state of the action
16298  * Since: 2.28
16299  */
16300
16301
16302 /**
16303  * g_action_get_state_hint:
16304  * @action: a #GAction
16305  *
16306  * Requests a hint about the valid range of values for the state of
16307  * @action.
16308  *
16309  * If %NULL is returned it either means that the action is not stateful
16310  * or that there is no hint about the valid range of values for the
16311  * state of the action.
16312  *
16313  * If a #GVariant array is returned then each item in the array is a
16314  * possible value for the state.  If a #GVariant pair (ie: two-tuple) is
16315  * returned then the tuple specifies the inclusive lower and upper bound
16316  * of valid values for the state.
16317  *
16318  * In any case, the information is merely a hint.  It may be possible to
16319  * have a state value outside of the hinted range and setting a value
16320  * within the range may fail.
16321  *
16322  * The return value (if non-%NULL) should be freed with
16323  * g_variant_unref() when it is no longer required.
16324  *
16325  * Returns: (transfer full): the state range hint
16326  * Since: 2.28
16327  */
16328
16329
16330 /**
16331  * g_action_get_state_type:
16332  * @action: a #GAction
16333  *
16334  * Queries the type of the state of @action.
16335  *
16336  * If the action is stateful (e.g. created with
16337  * g_simple_action_new_stateful()) then this function returns the
16338  * #GVariantType of the state.  This is the type of the initial value
16339  * given as the state. All calls to g_action_change_state() must give a
16340  * #GVariant of this type and g_action_get_state() will return a
16341  * #GVariant of the same type.
16342  *
16343  * If the action is not stateful (e.g. created with g_simple_action_new())
16344  * then this function will return %NULL. In that case, g_action_get_state()
16345  * will return %NULL and you must not call g_action_change_state().
16346  *
16347  * Returns: (allow-none): the state type, if the action is stateful
16348  * Since: 2.28
16349  */
16350
16351
16352 /**
16353  * g_action_group_action_added:
16354  * @action_group: a #GActionGroup
16355  * @action_name: the name of an action in the group
16356  *
16357  * Emits the #GActionGroup::action-added signal on @action_group.
16358  *
16359  * This function should only be called by #GActionGroup implementations.
16360  *
16361  * Since: 2.28
16362  */
16363
16364
16365 /**
16366  * g_action_group_action_enabled_changed:
16367  * @action_group: a #GActionGroup
16368  * @action_name: the name of an action in the group
16369  * @enabled: whether or not the action is now enabled
16370  *
16371  * Emits the #GActionGroup::action-enabled-changed signal on @action_group.
16372  *
16373  * This function should only be called by #GActionGroup implementations.
16374  *
16375  * Since: 2.28
16376  */
16377
16378
16379 /**
16380  * g_action_group_action_removed:
16381  * @action_group: a #GActionGroup
16382  * @action_name: the name of an action in the group
16383  *
16384  * Emits the #GActionGroup::action-removed signal on @action_group.
16385  *
16386  * This function should only be called by #GActionGroup implementations.
16387  *
16388  * Since: 2.28
16389  */
16390
16391
16392 /**
16393  * g_action_group_action_state_changed:
16394  * @action_group: a #GActionGroup
16395  * @action_name: the name of an action in the group
16396  * @state: the new state of the named action
16397  *
16398  * Emits the #GActionGroup::action-state-changed signal on @action_group.
16399  *
16400  * This function should only be called by #GActionGroup implementations.
16401  *
16402  * Since: 2.28
16403  */
16404
16405
16406 /**
16407  * g_action_group_activate_action:
16408  * @action_group: a #GActionGroup
16409  * @action_name: the name of the action to activate
16410  * @parameter: (allow-none): parameters to the activation
16411  *
16412  * Activate the named action within @action_group.
16413  *
16414  * If the action is expecting a parameter, then the correct type of
16415  * parameter must be given as @parameter.  If the action is expecting no
16416  * parameters then @parameter must be %NULL.  See
16417  * g_action_group_get_action_parameter_type().
16418  *
16419  * Since: 2.28
16420  */
16421
16422
16423 /**
16424  * g_action_group_change_action_state:
16425  * @action_group: a #GActionGroup
16426  * @action_name: the name of the action to request the change on
16427  * @value: the new state
16428  *
16429  * Request for the state of the named action within @action_group to be
16430  * changed to @value.
16431  *
16432  * The action must be stateful and @value must be of the correct type.
16433  * See g_action_group_get_action_state_type().
16434  *
16435  * This call merely requests a change.  The action may refuse to change
16436  * its state or may change its state to something other than @value.
16437  * See g_action_group_get_action_state_hint().
16438  *
16439  * If the @value GVariant is floating, it is consumed.
16440  *
16441  * Since: 2.28
16442  */
16443
16444
16445 /**
16446  * g_action_group_get_action_enabled:
16447  * @action_group: a #GActionGroup
16448  * @action_name: the name of the action to query
16449  *
16450  * Checks if the named action within @action_group is currently enabled.
16451  *
16452  * An action must be enabled in order to be activated or in order to
16453  * have its state changed from outside callers.
16454  *
16455  * Returns: whether or not the action is currently enabled
16456  * Since: 2.28
16457  */
16458
16459
16460 /**
16461  * g_action_group_get_action_parameter_type:
16462  * @action_group: a #GActionGroup
16463  * @action_name: the name of the action to query
16464  *
16465  * Queries the type of the parameter that must be given when activating
16466  * the named action within @action_group.
16467  *
16468  * When activating the action using g_action_group_activate_action(),
16469  * the #GVariant given to that function must be of the type returned
16470  * by this function.
16471  *
16472  * In the case that this function returns %NULL, you must not give any
16473  * #GVariant, but %NULL instead.
16474  *
16475  * The parameter type of a particular action will never change but it is
16476  * possible for an action to be removed and for a new action to be added
16477  * with the same name but a different parameter type.
16478  *
16479  * Returns: the parameter type
16480  * Since: 2.28
16481  */
16482
16483
16484 /**
16485  * g_action_group_get_action_state:
16486  * @action_group: a #GActionGroup
16487  * @action_name: the name of the action to query
16488  *
16489  * Queries the current state of the named action within @action_group.
16490  *
16491  * If the action is not stateful then %NULL will be returned.  If the
16492  * action is stateful then the type of the return value is the type
16493  * given by g_action_group_get_action_state_type().
16494  *
16495  * The return value (if non-%NULL) should be freed with
16496  * g_variant_unref() when it is no longer required.
16497  *
16498  * Returns: (allow-none): the current state of the action
16499  * Since: 2.28
16500  */
16501
16502
16503 /**
16504  * g_action_group_get_action_state_hint:
16505  * @action_group: a #GActionGroup
16506  * @action_name: the name of the action to query
16507  *
16508  * Requests a hint about the valid range of values for the state of the
16509  * named action within @action_group.
16510  *
16511  * If %NULL is returned it either means that the action is not stateful
16512  * or that there is no hint about the valid range of values for the
16513  * state of the action.
16514  *
16515  * If a #GVariant array is returned then each item in the array is a
16516  * possible value for the state.  If a #GVariant pair (ie: two-tuple) is
16517  * returned then the tuple specifies the inclusive lower and upper bound
16518  * of valid values for the state.
16519  *
16520  * In any case, the information is merely a hint.  It may be possible to
16521  * have a state value outside of the hinted range and setting a value
16522  * within the range may fail.
16523  *
16524  * The return value (if non-%NULL) should be freed with
16525  * g_variant_unref() when it is no longer required.
16526  *
16527  * Returns: (transfer full): the state range hint
16528  * Since: 2.28
16529  */
16530
16531
16532 /**
16533  * g_action_group_get_action_state_type:
16534  * @action_group: a #GActionGroup
16535  * @action_name: the name of the action to query
16536  *
16537  * Queries the type of the state of the named action within
16538  * @action_group.
16539  *
16540  * If the action is stateful then this function returns the
16541  * #GVariantType of the state.  All calls to
16542  * g_action_group_change_action_state() must give a #GVariant of this
16543  * type and g_action_group_get_action_state() will return a #GVariant
16544  * of the same type.
16545  *
16546  * If the action is not stateful then this function will return %NULL.
16547  * In that case, g_action_group_get_action_state() will return %NULL
16548  * and you must not call g_action_group_change_action_state().
16549  *
16550  * The state type of a particular action will never change but it is
16551  * possible for an action to be removed and for a new action to be added
16552  * with the same name but a different state type.
16553  *
16554  * Returns: (transfer full): the state type, if the action is stateful
16555  * Since: 2.28
16556  */
16557
16558
16559 /**
16560  * g_action_group_has_action:
16561  * @action_group: a #GActionGroup
16562  * @action_name: the name of the action to check for
16563  *
16564  * Checks if the named action exists within @action_group.
16565  *
16566  * Returns: whether the named action exists
16567  * Since: 2.28
16568  */
16569
16570
16571 /**
16572  * g_action_group_list_actions:
16573  * @action_group: a #GActionGroup
16574  *
16575  * Lists the actions contained within @action_group.
16576  *
16577  * The caller is responsible for freeing the list with g_strfreev() when
16578  * it is no longer required.
16579  *
16580  * actions in the groupb
16581  *
16582  * Returns: (transfer full): a %NULL-terminated array of the names of the
16583  * Since: 2.28
16584  */
16585
16586
16587 /**
16588  * g_action_group_query_action:
16589  * @action_group: a #GActionGroup
16590  * @action_name: the name of an action in the group
16591  * @enabled: (out): if the action is presently enabled
16592  * @parameter_type: (out): the parameter type, or %NULL if none needed
16593  * @state_type: (out): the state type, or %NULL if stateless
16594  * @state_hint: (out): the state hint, or %NULL if none
16595  * @state: (out): the current state, or %NULL if stateless
16596  *
16597  * Queries all aspects of the named action within an @action_group.
16598  *
16599  * This function acquires the information available from
16600  * g_action_group_has_action(), g_action_group_get_action_enabled(),
16601  * g_action_group_get_action_parameter_type(),
16602  * g_action_group_get_action_state_type(),
16603  * g_action_group_get_action_state_hint() and
16604  * g_action_group_get_state() with a single function call.
16605  *
16606  * This provides two main benefits.
16607  *
16608  * The first is the improvement in efficiency that comes with not having
16609  * to perform repeated lookups of the action in order to discover
16610  * different things about it.  The second is that implementing
16611  * #GActionGroup can now be done by only overriding this one virtual
16612  * function.
16613  *
16614  * The interface provides a default implementation of this function that
16615  * calls the individual functions, as required, to fetch the
16616  * information.  The interface also provides default implementations of
16617  * those functions that call this function.  All implementations,
16618  * therefore, must override either this function or all of the others.
16619  *
16620  * If the action exists, %TRUE is returned and any of the requested
16621  * fields (as indicated by having a non-%NULL reference passed in) are
16622  * filled.  If the action doesn't exist, %FALSE is returned and the
16623  * fields may or may not have been modified.
16624  *
16625  * Returns: %TRUE if the action exists, else %FALSE
16626  * Since: 2.32
16627  */
16628
16629
16630 /**
16631  * g_action_map_add_action:
16632  * @action_map: a #GActionMap
16633  * @action: a #GAction
16634  *
16635  * Adds an action to the @action_map.
16636  *
16637  * If the action map already contains an action with the same name
16638  * as @action then the old action is dropped from the action map.
16639  *
16640  * The action map takes its own reference on @action.
16641  *
16642  * Since: 2.32
16643  */
16644
16645
16646 /**
16647  * g_action_map_add_action_entries:
16648  * @action_map: a #GActionMap
16649  * @entries: a pointer to the first item in an array of #GActionEntry structs
16650  * @n_entries: the length of @entries, or -1 if @entries is %NULL-terminated
16651  * @user_data: the user data for signal connections
16652  *
16653  * A convenience function for creating multiple #GSimpleAction instances
16654  * and adding them to a #GActionMap.
16655  *
16656  * Each action is constructed as per one #GActionEntry.
16657  *
16658  * <example>
16659  * <title>Using g_action_map_add_action_entries()</title>
16660  * <programlisting>
16661  * static void
16662  * activate_quit (GSimpleAction *simple,
16663  * GVariant      *parameter,
16664  * gpointer       user_data)
16665  * {
16666  * exit (0);
16667  * }
16668  *
16669  * static void
16670  * activate_print_string (GSimpleAction *simple,
16671  * GVariant      *parameter,
16672  * gpointer       user_data)
16673  * {
16674  * g_print ("%s\n", g_variant_get_string (parameter, NULL));
16675  * }
16676  *
16677  * static GActionGroup *
16678  * create_action_group (void)
16679  * {
16680  * const GActionEntry entries[] = {
16681  * { "quit",         activate_quit              },
16682  * { "print-string", activate_print_string, "s" }
16683  * };
16684  * GSimpleActionGroup *group;
16685  *
16686  * group = g_simple_action_group_new ();
16687  * g_action_map_add_action_entries (G_ACTION_MAP (group), entries, G_N_ELEMENTS (entries), NULL);
16688  *
16689  * return G_ACTION_GROUP (group);
16690  * }
16691  * </programlisting>
16692  * </example>
16693  *
16694  * Since: 2.32
16695  */
16696
16697
16698 /**
16699  * g_action_map_lookup_action:
16700  * @action_map: a #GActionMap
16701  * @action_name: the name of an action
16702  *
16703  * Looks up the action with the name @action_name in @action_map.
16704  *
16705  * If no such action exists, returns %NULL.
16706  *
16707  * Returns: (transfer none): a #GAction, or %NULL
16708  * Since: 2.32
16709  */
16710
16711
16712 /**
16713  * g_action_map_remove_action:
16714  * @action_map: a #GActionMap
16715  * @action_name: the name of the action
16716  *
16717  * Removes the named action from the action map.
16718  *
16719  * If no action of this name is in the map then nothing happens.
16720  *
16721  * Since: 2.32
16722  */
16723
16724
16725 /**
16726  * g_alloca:
16727  * @size: number of bytes to allocate.
16728  *
16729  * Allocates @size bytes on the stack; these bytes will be freed when the current
16730  * stack frame is cleaned up. This macro essentially just wraps the alloca()
16731  * function present on most UNIX variants.
16732  * Thus it provides the same advantages and pitfalls as alloca():
16733  * <variablelist>
16734  * <varlistentry><term></term><listitem><para>
16735  * + alloca() is very fast, as on most systems it's implemented by just adjusting
16736  * the stack pointer register.
16737  * </para></listitem></varlistentry>
16738  * <varlistentry><term></term><listitem><para>
16739  * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
16740  * blocks just build up and are released together at function end.
16741  * </para></listitem></varlistentry>
16742  * <varlistentry><term></term><listitem><para>
16743  * - Allocation sizes have to fit into the current stack frame. For instance in a
16744  * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
16745  * so be sparse with alloca() uses.
16746  * </para></listitem></varlistentry>
16747  * <varlistentry><term></term><listitem><para>
16748  * - Allocation failure due to insufficient stack space is not indicated with a %NULL
16749  * return like e.g. with malloc(). Instead, most systems probably handle it the same
16750  * way as out of stack space situations from infinite function recursion, i.e.
16751  * with a segmentation fault.
16752  * </para></listitem></varlistentry>
16753  * <varlistentry><term></term><listitem><para>
16754  * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
16755  * Stack space allocated with alloca() in the same scope as a variable sized array
16756  * will be freed together with the variable sized array upon exit of that scope, and
16757  * not upon exit of the enclosing function scope.
16758  * </para></listitem></varlistentry>
16759  * </variablelist>
16760  *
16761  * Returns: space for @size bytes, allocated on the stack
16762  */
16763
16764
16765 /**
16766  * g_app_info_add_supports_type:
16767  * @appinfo: a #GAppInfo.
16768  * @content_type: a string.
16769  * @error: a #GError.
16770  *
16771  * Adds a content type to the application information to indicate the
16772  * application is capable of opening files with the given content type.
16773  *
16774  * Returns: %TRUE on success, %FALSE on error.
16775  */
16776
16777
16778 /**
16779  * g_app_info_can_delete:
16780  * @appinfo: a #GAppInfo
16781  *
16782  * Obtains the information whether the #GAppInfo can be deleted.
16783  * See g_app_info_delete().
16784  *
16785  * Returns: %TRUE if @appinfo can be deleted
16786  * Since: 2.20
16787  */
16788
16789
16790 /**
16791  * g_app_info_can_remove_supports_type:
16792  * @appinfo: a #GAppInfo.
16793  *
16794  * Checks if a supported content type can be removed from an application.
16795  *
16796  * content types from a given @appinfo, %FALSE if not.
16797  *
16798  * Returns: %TRUE if it is possible to remove supported
16799  */
16800
16801
16802 /**
16803  * g_app_info_create_from_commandline:
16804  * @commandline: the commandline to use
16805  * @application_name: (allow-none): the application name, or %NULL to use @commandline
16806  * @flags: flags that can specify details of the created #GAppInfo
16807  * @error: a #GError location to store the error occurring, %NULL to ignore.
16808  *
16809  * Creates a new #GAppInfo from the given information.
16810  *
16811  * Returns: (transfer full): new #GAppInfo for given command.
16812  */
16813
16814
16815 /**
16816  * g_app_info_delete:
16817  * @appinfo: a #GAppInfo
16818  *
16819  * Tries to delete a #GAppInfo.
16820  *
16821  * On some platforms, there may be a difference between user-defined
16822  * #GAppInfo<!-- -->s which can be deleted, and system-wide ones which
16823  * cannot. See g_app_info_can_delete().
16824  *
16825  * Virtual: do_delete
16826  * Returns: %TRUE if @appinfo has been deleted
16827  * Since: 2.20
16828  */
16829
16830
16831 /**
16832  * g_app_info_dup:
16833  * @appinfo: a #GAppInfo.
16834  *
16835  * Creates a duplicate of a #GAppInfo.
16836  *
16837  * Returns: (transfer full): a duplicate of @appinfo.
16838  */
16839
16840
16841 /**
16842  * g_app_info_equal:
16843  * @appinfo1: the first #GAppInfo.
16844  * @appinfo2: the second #GAppInfo.
16845  *
16846  * Checks if two #GAppInfo<!-- -->s are equal.
16847  *
16848  * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.
16849  */
16850
16851
16852 /**
16853  * g_app_info_get_all:
16854  *
16855  * Gets a list of all of the applications currently registered
16856  * on this system.
16857  *
16858  * For desktop files, this includes applications that have
16859  * <literal>NoDisplay=true</literal> set or are excluded from
16860  * display by means of <literal>OnlyShowIn</literal> or
16861  * <literal>NotShowIn</literal>. See g_app_info_should_show().
16862  * The returned list does not include applications which have
16863  * the <literal>Hidden</literal> key set.
16864  *
16865  * Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfo<!---->s.
16866  */
16867
16868
16869 /**
16870  * g_app_info_get_all_for_type:
16871  * @content_type: the content type to find a #GAppInfo for
16872  *
16873  * Gets a list of all #GAppInfos for a given content type,
16874  * including the recommended and fallback #GAppInfos. See
16875  * g_app_info_get_recommended_for_type() and
16876  * g_app_info_get_fallback_for_type().
16877  *
16878  * for given @content_type or %NULL on error.
16879  *
16880  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
16881  */
16882
16883
16884 /**
16885  * g_app_info_get_commandline:
16886  * @appinfo: a #GAppInfo
16887  *
16888  * Gets the commandline with which the application will be
16889  * started.
16890  *
16891  * or %NULL if this information is not available
16892  *
16893  * Returns: a string containing the @appinfo's commandline,
16894  * Since: 2.20
16895  */
16896
16897
16898 /**
16899  * g_app_info_get_default_for_type:
16900  * @content_type: the content type to find a #GAppInfo for
16901  * @must_support_uris: if %TRUE, the #GAppInfo is expected to support URIs
16902  *
16903  * Gets the default #GAppInfo for a given content type.
16904  *
16905  * %NULL on error.
16906  *
16907  * Returns: (transfer full): #GAppInfo for given @content_type or
16908  */
16909
16910
16911 /**
16912  * g_app_info_get_default_for_uri_scheme:
16913  * @uri_scheme: a string containing a URI scheme.
16914  *
16915  * Gets the default application for handling URIs with
16916  * the given URI scheme. A URI scheme is the initial part
16917  * of the URI, up to but not including the ':', e.g. "http",
16918  * "ftp" or "sip".
16919  *
16920  * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
16921  */
16922
16923
16924 /**
16925  * g_app_info_get_description:
16926  * @appinfo: a #GAppInfo.
16927  *
16928  * Gets a human-readable description of an installed application.
16929  *
16930  * application @appinfo, or %NULL if none.
16931  *
16932  * Returns: a string containing a description of the
16933  */
16934
16935
16936 /**
16937  * g_app_info_get_display_name:
16938  * @appinfo: a #GAppInfo.
16939  *
16940  * Gets the display name of the application. The display name is often more
16941  * descriptive to the user than the name itself.
16942  *
16943  * no display name is available.
16944  *
16945  * Returns: the display name of the application for @appinfo, or the name if
16946  * Since: 2.24
16947  */
16948
16949
16950 /**
16951  * g_app_info_get_executable:
16952  * @appinfo: a #GAppInfo
16953  *
16954  * Gets the executable's name for the installed application.
16955  *
16956  * binaries name
16957  *
16958  * Returns: a string containing the @appinfo's application
16959  */
16960
16961
16962 /**
16963  * g_app_info_get_fallback_for_type:
16964  * @content_type: the content type to find a #GAppInfo for
16965  *
16966  * Gets a list of fallback #GAppInfos for a given content type, i.e.
16967  * those applications which claim to support the given content type
16968  * by MIME type subclassing and not directly.
16969  *
16970  * for given @content_type or %NULL on error.
16971  *
16972  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
16973  * Since: 2.28
16974  */
16975
16976
16977 /**
16978  * g_app_info_get_icon:
16979  * @appinfo: a #GAppInfo.
16980  *
16981  * Gets the icon for the application.
16982  *
16983  * if there is no default icon.
16984  *
16985  * Returns: (transfer none): the default #GIcon for @appinfo or %NULL
16986  */
16987
16988
16989 /**
16990  * g_app_info_get_id:
16991  * @appinfo: a #GAppInfo.
16992  *
16993  * Gets the ID of an application. An id is a string that
16994  * identifies the application. The exact format of the id is
16995  * platform dependent. For instance, on Unix this is the
16996  * desktop file id from the xdg menu specification.
16997  *
16998  * Note that the returned ID may be %NULL, depending on how
16999  * the @appinfo has been constructed.
17000  *
17001  * Returns: a string containing the application's ID.
17002  */
17003
17004
17005 /**
17006  * g_app_info_get_name:
17007  * @appinfo: a #GAppInfo.
17008  *
17009  * Gets the installed name of the application.
17010  *
17011  * Returns: the name of the application for @appinfo.
17012  */
17013
17014
17015 /**
17016  * g_app_info_get_recommended_for_type:
17017  * @content_type: the content type to find a #GAppInfo for
17018  *
17019  * Gets a list of recommended #GAppInfos for a given content type, i.e.
17020  * those applications which claim to support the given content type exactly,
17021  * and not by MIME type subclassing.
17022  * Note that the first application of the list is the last used one, i.e.
17023  * the last one for which g_app_info_set_as_last_used_for_type() has been
17024  * called.
17025  *
17026  * for given @content_type or %NULL on error.
17027  *
17028  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
17029  * Since: 2.28
17030  */
17031
17032
17033 /**
17034  * g_app_info_launch:
17035  * @appinfo: a #GAppInfo
17036  * @files: (element-type GFile): a #GList of #GFile objects
17037  * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
17038  * @error: a #GError
17039  *
17040  * Launches the application. Passes @files to the launched application
17041  * as arguments, using the optional @launch_context to get information
17042  * about the details of the launcher (like what screen it is on).
17043  * On error, @error will be set accordingly.
17044  *
17045  * To launch the application without arguments pass a %NULL @files list.
17046  *
17047  * Note that even if the launch is successful the application launched
17048  * can fail to start if it runs into problems during startup. There is
17049  * no way to detect this.
17050  *
17051  * Some URIs can be changed when passed through a GFile (for instance
17052  * unsupported URIs with strange formats like mailto:), so if you have
17053  * a textual URI you want to pass in as argument, consider using
17054  * g_app_info_launch_uris() instead.
17055  *
17056  * The launched application inherits the environment of the launching
17057  * process, but it can be modified with g_app_launch_context_setenv() and
17058  * g_app_launch_context_unsetenv().
17059  *
17060  * On UNIX, this function sets the <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>
17061  * environment variable with the path of the launched desktop file and
17062  * <envar>GIO_LAUNCHED_DESKTOP_FILE_PID</envar> to the process
17063  * id of the launched process. This can be used to ignore
17064  * <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>, should it be inherited
17065  * by further processes. The <envar>DISPLAY</envar> and
17066  * <envar>DESKTOP_STARTUP_ID</envar> environment variables are also
17067  * set, based on information provided in @launch_context.
17068  *
17069  * Returns: %TRUE on successful launch, %FALSE otherwise.
17070  */
17071
17072
17073 /**
17074  * g_app_info_launch_default_for_uri:
17075  * @uri: the uri to show
17076  * @launch_context: (allow-none): an optional #GAppLaunchContext.
17077  * @error: a #GError.
17078  *
17079  * Utility function that launches the default application
17080  * registered to handle the specified uri. Synchronous I/O
17081  * is done on the uri to detect the type of the file if
17082  * required.
17083  *
17084  * Returns: %TRUE on success, %FALSE on error.
17085  */
17086
17087
17088 /**
17089  * g_app_info_launch_uris:
17090  * @appinfo: a #GAppInfo
17091  * @uris: (element-type utf8): a #GList containing URIs to launch.
17092  * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
17093  * @error: a #GError
17094  *
17095  * Launches the application. This passes the @uris to the launched application
17096  * as arguments, using the optional @launch_context to get information
17097  * about the details of the launcher (like what screen it is on).
17098  * On error, @error will be set accordingly.
17099  *
17100  * To launch the application without arguments pass a %NULL @uris list.
17101  *
17102  * Note that even if the launch is successful the application launched
17103  * can fail to start if it runs into problems during startup. There is
17104  * no way to detect this.
17105  *
17106  * Returns: %TRUE on successful launch, %FALSE otherwise.
17107  */
17108
17109
17110 /**
17111  * g_app_info_remove_supports_type:
17112  * @appinfo: a #GAppInfo.
17113  * @content_type: a string.
17114  * @error: a #GError.
17115  *
17116  * Removes a supported type from an application, if possible.
17117  *
17118  * Returns: %TRUE on success, %FALSE on error.
17119  */
17120
17121
17122 /**
17123  * g_app_info_reset_type_associations:
17124  * @content_type: a content type
17125  *
17126  * Removes all changes to the type associations done by
17127  * g_app_info_set_as_default_for_type(),
17128  * g_app_info_set_as_default_for_extension(),
17129  * g_app_info_add_supports_type() or
17130  * g_app_info_remove_supports_type().
17131  *
17132  * Since: 2.20
17133  */
17134
17135
17136 /**
17137  * g_app_info_set_as_default_for_extension:
17138  * @appinfo: a #GAppInfo.
17139  * @extension: a string containing the file extension (without the dot).
17140  * @error: a #GError.
17141  *
17142  * Sets the application as the default handler for the given file extension.
17143  *
17144  * Returns: %TRUE on success, %FALSE on error.
17145  */
17146
17147
17148 /**
17149  * g_app_info_set_as_default_for_type:
17150  * @appinfo: a #GAppInfo.
17151  * @content_type: the content type.
17152  * @error: a #GError.
17153  *
17154  * Sets the application as the default handler for a given type.
17155  *
17156  * Returns: %TRUE on success, %FALSE on error.
17157  */
17158
17159
17160 /**
17161  * g_app_info_set_as_last_used_for_type:
17162  * @appinfo: a #GAppInfo.
17163  * @content_type: the content type.
17164  * @error: a #GError.
17165  *
17166  * Sets the application as the last used application for a given type.
17167  * This will make the application appear as first in the list returned
17168  * by g_app_info_get_recommended_for_type(), regardless of the default
17169  * application for that content type.
17170  *
17171  * Returns: %TRUE on success, %FALSE on error.
17172  */
17173
17174
17175 /**
17176  * g_app_info_should_show:
17177  * @appinfo: a #GAppInfo.
17178  *
17179  * Checks if the application info should be shown in menus that
17180  * list available applications.
17181  *
17182  * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise.
17183  */
17184
17185
17186 /**
17187  * g_app_info_supports_files:
17188  * @appinfo: a #GAppInfo.
17189  *
17190  * Checks if the application accepts files as arguments.
17191  *
17192  * Returns: %TRUE if the @appinfo supports files.
17193  */
17194
17195
17196 /**
17197  * g_app_info_supports_uris:
17198  * @appinfo: a #GAppInfo.
17199  *
17200  * Checks if the application supports reading files and directories from URIs.
17201  *
17202  * Returns: %TRUE if the @appinfo supports URIs.
17203  */
17204
17205
17206 /**
17207  * g_app_launch_context_get_display:
17208  * @context: a #GAppLaunchContext
17209  * @info: a #GAppInfo
17210  * @files: (element-type GFile): a #GList of #GFile objects
17211  *
17212  * Gets the display string for the @context. This is used to ensure new
17213  * applications are started on the same display as the launching
17214  * application, by setting the <envar>DISPLAY</envar> environment variable.
17215  *
17216  * Returns: a display string for the display.
17217  */
17218
17219
17220 /**
17221  * g_app_launch_context_get_environment:
17222  * @context: a #GAppLaunchContext
17223  *
17224  * Gets the complete environment variable list to be passed to
17225  * the child process when @context is used to launch an application.
17226  * This is a %NULL-terminated array of strings, where each string has
17227  * the form <literal>KEY=VALUE</literal>.
17228  *
17229  * child's environment
17230  *
17231  * Returns: (array zero-terminated=1) (transfer full): the
17232  * Since: 2.32
17233  */
17234
17235
17236 /**
17237  * g_app_launch_context_get_startup_notify_id:
17238  * @context: a #GAppLaunchContext
17239  * @info: a #GAppInfo
17240  * @files: (element-type GFile): a #GList of of #GFile objects
17241  *
17242  * Initiates startup notification for the application and returns the
17243  * <envar>DESKTOP_STARTUP_ID</envar> for the launched operation,
17244  * if supported.
17245  *
17246  * Startup notification IDs are defined in the <ulink
17247  * url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">
17248  * FreeDesktop.Org Startup Notifications standard</ulink>.
17249  *
17250  * not supported.
17251  *
17252  * Returns: a startup notification ID for the application, or %NULL if
17253  */
17254
17255
17256 /**
17257  * g_app_launch_context_launch_failed:
17258  * @context: a #GAppLaunchContext.
17259  * @startup_notify_id: the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
17260  *
17261  * Called when an application has failed to launch, so that it can cancel
17262  * the application startup notification started in g_app_launch_context_get_startup_notify_id().
17263  */
17264
17265
17266 /**
17267  * g_app_launch_context_new:
17268  *
17269  * Creates a new application launch context. This is not normally used,
17270  * instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
17271  *
17272  * Returns: a #GAppLaunchContext.
17273  */
17274
17275
17276 /**
17277  * g_app_launch_context_setenv:
17278  * @context: a #GAppLaunchContext
17279  * @variable: the environment variable to set
17280  * @value: the value for to set the variable to.
17281  *
17282  * Arranges for @variable to be set to @value in the child's
17283  * environment when @context is used to launch an application.
17284  *
17285  * Since: 2.32
17286  */
17287
17288
17289 /**
17290  * g_app_launch_context_unsetenv:
17291  * @context: a #GAppLaunchContext
17292  * @variable: the environment variable to remove
17293  *
17294  * Arranges for @variable to be unset in the child's environment
17295  * when @context is used to launch an application.
17296  *
17297  * Since: 2.32
17298  */
17299
17300
17301 /**
17302  * g_application_activate:
17303  * @application: a #GApplication
17304  *
17305  * Activates the application.
17306  *
17307  * In essence, this results in the #GApplication::activate() signal being
17308  * emitted in the primary instance.
17309  *
17310  * The application must be registered before calling this function.
17311  *
17312  * Since: 2.28
17313  */
17314
17315
17316 /**
17317  * g_application_command_line_get_arguments:
17318  * @cmdline: a #GApplicationCommandLine
17319  * @argc: (out): the length of the arguments array, or %NULL
17320  *
17321  * Gets the list of arguments that was passed on the command line.
17322  *
17323  * The strings in the array may contain non-utf8 data.
17324  *
17325  * The return value is %NULL-terminated and should be freed using
17326  * g_strfreev().
17327  *
17328  * containing the arguments (the argv)
17329  *
17330  * Returns: (array length=argc) (transfer full): the string array
17331  * Since: 2.28
17332  */
17333
17334
17335 /**
17336  * g_application_command_line_get_cwd:
17337  * @cmdline: a #GApplicationCommandLine
17338  *
17339  * Gets the working directory of the command line invocation.
17340  * The string may contain non-utf8 data.
17341  *
17342  * It is possible that the remote application did not send a working
17343  * directory, so this may be %NULL.
17344  *
17345  * The return value should not be modified or freed and is valid for as
17346  * long as @cmdline exists.
17347  *
17348  * Returns: the current directory, or %NULL
17349  * Since: 2.28
17350  */
17351
17352
17353 /**
17354  * g_application_command_line_get_environ:
17355  * @cmdline: a #GApplicationCommandLine
17356  *
17357  * Gets the contents of the 'environ' variable of the command line
17358  * invocation, as would be returned by g_get_environ(), ie as a
17359  * %NULL-terminated list of strings in the form 'NAME=VALUE'.
17360  * The strings may contain non-utf8 data.
17361  *
17362  * The remote application usually does not send an environment.  Use
17363  * %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
17364  * set it is possible that the environment is still not available (due
17365  * to invocation messages from other applications).
17366  *
17367  * The return value should not be modified or freed and is valid for as
17368  * long as @cmdline exists.
17369  *
17370  * See g_application_command_line_getenv() if you are only interested
17371  * in the value of a single environment variable.
17372  *
17373  * strings, or %NULL if they were not sent
17374  *
17375  * Returns: (array zero-terminated=1) (transfer none): the environment
17376  * Since: 2.28
17377  */
17378
17379
17380 /**
17381  * g_application_command_line_get_exit_status:
17382  * @cmdline: a #GApplicationCommandLine
17383  *
17384  * Gets the exit status of @cmdline.  See
17385  * g_application_command_line_set_exit_status() for more information.
17386  *
17387  * Returns: the exit status
17388  * Since: 2.28
17389  */
17390
17391
17392 /**
17393  * g_application_command_line_get_is_remote:
17394  * @cmdline: a #GApplicationCommandLine
17395  *
17396  * Determines if @cmdline represents a remote invocation.
17397  *
17398  * Returns: %TRUE if the invocation was remote
17399  * Since: 2.28
17400  */
17401
17402
17403 /**
17404  * g_application_command_line_get_platform_data:
17405  * @cmdline: #GApplicationCommandLine
17406  *
17407  * Gets the platform data associated with the invocation of @cmdline.
17408  *
17409  * This is a #GVariant dictionary containing information about the
17410  * context in which the invocation occurred.  It typically contains
17411  * information like the current working directory and the startup
17412  * notification ID.
17413  *
17414  * For local invocation, it will be %NULL.
17415  *
17416  * Returns: (allow-none): the platform data, or %NULL
17417  * Since: 2.28
17418  */
17419
17420
17421 /**
17422  * g_application_command_line_getenv:
17423  * @cmdline: a #GApplicationCommandLine
17424  * @name: the environment variable to get
17425  *
17426  * Gets the value of a particular environment variable of the command
17427  * line invocation, as would be returned by g_getenv().  The strings may
17428  * contain non-utf8 data.
17429  *
17430  * The remote application usually does not send an environment.  Use
17431  * %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
17432  * set it is possible that the environment is still not available (due
17433  * to invocation messages from other applications).
17434  *
17435  * The return value should not be modified or freed and is valid for as
17436  * long as @cmdline exists.
17437  *
17438  * Returns: the value of the variable, or %NULL if unset or unsent
17439  * Since: 2.28
17440  */
17441
17442
17443 /**
17444  * g_application_command_line_print:
17445  * @cmdline: a #GApplicationCommandLine
17446  * @format: a printf-style format string
17447  * @...: arguments, as per @format
17448  *
17449  * Formats a message and prints it using the stdout print handler in the
17450  * invoking process.
17451  *
17452  * If @cmdline is a local invocation then this is exactly equivalent to
17453  * g_print().  If @cmdline is remote then this is equivalent to calling
17454  * g_print() in the invoking process.
17455  *
17456  * Since: 2.28
17457  */
17458
17459
17460 /**
17461  * g_application_command_line_printerr:
17462  * @cmdline: a #GApplicationCommandLine
17463  * @format: a printf-style format string
17464  * @...: arguments, as per @format
17465  *
17466  * Formats a message and prints it using the stderr print handler in the
17467  * invoking process.
17468  *
17469  * If @cmdline is a local invocation then this is exactly equivalent to
17470  * g_printerr().  If @cmdline is remote then this is equivalent to
17471  * calling g_printerr() in the invoking process.
17472  *
17473  * Since: 2.28
17474  */
17475
17476
17477 /**
17478  * g_application_command_line_set_exit_status:
17479  * @cmdline: a #GApplicationCommandLine
17480  * @exit_status: the exit status
17481  *
17482  * Sets the exit status that will be used when the invoking process
17483  * exits.
17484  *
17485  * The return value of the #GApplication::command-line signal is
17486  * passed to this function when the handler returns.  This is the usual
17487  * way of setting the exit status.
17488  *
17489  * In the event that you want the remote invocation to continue running
17490  * and want to decide on the exit status in the future, you can use this
17491  * call.  For the case of a remote invocation, the remote process will
17492  * typically exit when the last reference is dropped on @cmdline.  The
17493  * exit status of the remote process will be equal to the last value
17494  * that was set with this function.
17495  *
17496  * In the case that the commandline invocation is local, the situation
17497  * is slightly more complicated.  If the commandline invocation results
17498  * in the mainloop running (ie: because the use-count of the application
17499  * increased to a non-zero value) then the application is considered to
17500  * have been 'successful' in a certain sense, and the exit status is
17501  * always zero.  If the application use count is zero, though, the exit
17502  * status of the local #GApplicationCommandLine is used.
17503  *
17504  * Since: 2.28
17505  */
17506
17507
17508 /**
17509  * g_application_get_application_id:
17510  * @application: a #GApplication
17511  *
17512  * Gets the unique identifier for @application.
17513  *
17514  * Returns: the identifier for @application, owned by @application
17515  * Since: 2.28
17516  */
17517
17518
17519 /**
17520  * g_application_get_default:
17521  *
17522  * Returns the default #GApplication instance for this process.
17523  *
17524  * Normally there is only one #GApplication per process and it becomes
17525  * the default when it is created.  You can exercise more control over
17526  * this by using g_application_set_default().
17527  *
17528  * If there is no default application then %NULL is returned.
17529  *
17530  * Returns: (transfer none): the default application for this process, or %NULL
17531  * Since: 2.32
17532  */
17533
17534
17535 /**
17536  * g_application_get_flags:
17537  * @application: a #GApplication
17538  *
17539  * Gets the flags for @application.
17540  *
17541  * See #GApplicationFlags.
17542  *
17543  * Returns: the flags for @application
17544  * Since: 2.28
17545  */
17546
17547
17548 /**
17549  * g_application_get_inactivity_timeout:
17550  * @application: a #GApplication
17551  *
17552  * Gets the current inactivity timeout for the application.
17553  *
17554  * This is the amount of time (in milliseconds) after the last call to
17555  * g_application_release() before the application stops running.
17556  *
17557  * Returns: the timeout, in milliseconds
17558  * Since: 2.28
17559  */
17560
17561
17562 /**
17563  * g_application_get_is_registered:
17564  * @application: a #GApplication
17565  *
17566  * Checks if @application is registered.
17567  *
17568  * An application is registered if g_application_register() has been
17569  * successfully called.
17570  *
17571  * Returns: %TRUE if @application is registered
17572  * Since: 2.28
17573  */
17574
17575
17576 /**
17577  * g_application_get_is_remote:
17578  * @application: a #GApplication
17579  *
17580  * Checks if @application is remote.
17581  *
17582  * If @application is remote then it means that another instance of
17583  * application already exists (the 'primary' instance).  Calls to
17584  * perform actions on @application will result in the actions being
17585  * performed by the primary instance.
17586  *
17587  * The value of this property cannot be accessed before
17588  * g_application_register() has been called.  See
17589  * g_application_get_is_registered().
17590  *
17591  * Returns: %TRUE if @application is remote
17592  * Since: 2.28
17593  */
17594
17595
17596 /**
17597  * g_application_hold:
17598  * @application: a #GApplication
17599  *
17600  * Increases the use count of @application.
17601  *
17602  * Use this function to indicate that the application has a reason to
17603  * continue to run.  For example, g_application_hold() is called by GTK+
17604  * when a toplevel window is on the screen.
17605  *
17606  * To cancel the hold, call g_application_release().
17607  */
17608
17609
17610 /**
17611  * g_application_id_is_valid:
17612  * @application_id: a potential application identifier
17613  *
17614  * Checks if @application_id is a valid application identifier.
17615  *
17616  * A valid ID is required for calls to g_application_new() and
17617  * g_application_set_application_id().
17618  *
17619  * For convenience, the restrictions on application identifiers are
17620  * reproduced here:
17621  * <itemizedlist>
17622  * <listitem>Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-." and must not begin with a digit.</listitem>
17623  * <listitem>Application identifiers must contain at least one '.' (period) character (and thus at least three elements).</listitem>
17624  * <listitem>Application identifiers must not begin or end with a '.' (period) character.</listitem>
17625  * <listitem>Application identifiers must not contain consecutive '.' (period) characters.</listitem>
17626  * <listitem>Application identifiers must not exceed 255 characters.</listitem>
17627  * </itemizedlist>
17628  *
17629  * Returns: %TRUE if @application_id is valid
17630  */
17631
17632
17633 /**
17634  * g_application_new:
17635  * @application_id: the application id
17636  * @flags: the application flags
17637  *
17638  * Creates a new #GApplication instance.
17639  *
17640  * This function calls g_type_init() for you.
17641  *
17642  * The application id must be valid.  See g_application_id_is_valid().
17643  *
17644  * Returns: a new #GApplication instance
17645  */
17646
17647
17648 /**
17649  * g_application_open:
17650  * @application: a #GApplication
17651  * @files: (array length=n_files): an array of #GFiles to open
17652  * @n_files: the length of the @files array
17653  * @hint: a hint (or ""), but never %NULL
17654  *
17655  * Opens the given files.
17656  *
17657  * In essence, this results in the #GApplication::open signal being emitted
17658  * in the primary instance.
17659  *
17660  * @n_files must be greater than zero.
17661  *
17662  * @hint is simply passed through to the ::open signal.  It is
17663  * intended to be used by applications that have multiple modes for
17664  * opening files (eg: "view" vs "edit", etc).  Unless you have a need
17665  * for this functionality, you should use "".
17666  *
17667  * The application must be registered before calling this function
17668  * and it must have the %G_APPLICATION_HANDLES_OPEN flag set.
17669  *
17670  * Since: 2.28
17671  */
17672
17673
17674 /**
17675  * g_application_register:
17676  * @application: a #GApplication
17677  * @cancellable: a #GCancellable, or %NULL
17678  * @error: a pointer to a NULL #GError, or %NULL
17679  *
17680  * Attempts registration of the application.
17681  *
17682  * This is the point at which the application discovers if it is the
17683  * primary instance or merely acting as a remote for an already-existing
17684  * primary instance.  This is implemented by attempting to acquire the
17685  * application identifier as a unique bus name on the session bus using
17686  * GDBus.
17687  *
17688  * Due to the internal architecture of GDBus, method calls can be
17689  * dispatched at any time (even if a main loop is not running).  For
17690  * this reason, you must ensure that any object paths that you wish to
17691  * register are registered before calling this function.
17692  *
17693  * If the application has already been registered then %TRUE is
17694  * returned with no work performed.
17695  *
17696  * The #GApplication::startup signal is emitted if registration succeeds
17697  * and @application is the primary instance.
17698  *
17699  * In the event of an error (such as @cancellable being cancelled, or a
17700  * failure to connect to the session bus), %FALSE is returned and @error
17701  * is set appropriately.
17702  *
17703  * Note: the return value of this function is not an indicator that this
17704  * instance is or is not the primary instance of the application.  See
17705  * g_application_get_is_remote() for that.
17706  *
17707  * Returns: %TRUE if registration succeeded
17708  * Since: 2.28
17709  */
17710
17711
17712 /**
17713  * g_application_release:
17714  * @application: a #GApplication
17715  *
17716  * Decrease the use count of @application.
17717  *
17718  * When the use count reaches zero, the application will stop running.
17719  *
17720  * Never call this function except to cancel the effect of a previous
17721  * call to g_application_hold().
17722  */
17723
17724
17725 /**
17726  * g_application_run:
17727  * @application: a #GApplication
17728  * @argc: the argc from main() (or 0 if @argv is %NULL)
17729  * @argv: (array length=argc) (allow-none): the argv from main(), or %NULL
17730  *
17731  * Runs the application.
17732  *
17733  * This function is intended to be run from main() and its return value
17734  * is intended to be returned by main(). Although you are expected to pass
17735  * the @argc, @argv parameters from main() to this function, it is possible
17736  * to pass %NULL if @argv is not available or commandline handling is not
17737  * required.
17738  *
17739  * First, the local_command_line() virtual function is invoked.
17740  * This function always runs on the local instance. It gets passed a pointer
17741  * to a %NULL-terminated copy of @argv and is expected to remove the arguments
17742  * that it handled (shifting up remaining arguments). See
17743  * <xref linkend="gapplication-example-cmdline2"/> for an example of
17744  * parsing @argv manually. Alternatively, you may use the #GOptionContext API,
17745  * after setting <literal>argc = g_strv_length (argv);</literal>.
17746  *
17747  * The last argument to local_command_line() is a pointer to the @status
17748  * variable which can used to set the exit status that is returned from
17749  * g_application_run().
17750  *
17751  * If local_command_line() returns %TRUE, the command line is expected
17752  * to be completely handled, including possibly registering as the primary
17753  * instance, calling g_application_activate() or g_application_open(), etc.
17754  *
17755  * If local_command_line() returns %FALSE then the application is registered
17756  * and the #GApplication::command-line signal is emitted in the primary
17757  * instance (which may or may not be this instance). The signal handler
17758  * gets passed a #GApplicationCommandline object that (among other things)
17759  * contains the remaining commandline arguments that have not been handled
17760  * by local_command_line().
17761  *
17762  * If the application has the %G_APPLICATION_HANDLES_COMMAND_LINE
17763  * flag set then the default implementation of local_command_line()
17764  * always returns %FALSE immediately, resulting in the commandline
17765  * always being handled in the primary instance.
17766  *
17767  * Otherwise, the default implementation of local_command_line() tries
17768  * to do a couple of things that are probably reasonable for most
17769  * applications.  First, g_application_register() is called to attempt
17770  * to register the application.  If that works, then the command line
17771  * arguments are inspected.  If no commandline arguments are given, then
17772  * g_application_activate() is called.  If commandline arguments are
17773  * given and the %G_APPLICATION_HANDLES_OPEN flag is set then they
17774  * are assumed to be filenames and g_application_open() is called.
17775  *
17776  * If you need to handle commandline arguments that are not filenames,
17777  * and you don't mind commandline handling to happen in the primary
17778  * instance, you should set %G_APPLICATION_HANDLED_COMMAND_LINE and
17779  * process the commandline arguments in your #GApplication::command-line
17780  * signal handler, either manually or using the #GOptionContext API.
17781  *
17782  * If you are interested in doing more complicated local handling of the
17783  * commandline then you should implement your own #GApplication subclass
17784  * and override local_command_line(). In this case, you most likely want
17785  * to return %TRUE from your local_command_line() implementation to
17786  * suppress the default handling. See
17787  * <xref linkend="gapplication-example-cmdline2"/> for an example.
17788  *
17789  * If, after the above is done, the use count of the application is zero
17790  * then the exit status is returned immediately.  If the use count is
17791  * non-zero then the default main context is iterated until the use count
17792  * falls to zero, at which point 0 is returned.
17793  *
17794  * If the %G_APPLICATION_IS_SERVICE flag is set, then the exiting at
17795  * use count of zero is delayed for a while (ie: the instance stays
17796  * around to provide its <emphasis>service</emphasis> to others).
17797  *
17798  * Returns: the exit status
17799  * Since: 2.28
17800  */
17801
17802
17803 /**
17804  * g_application_set_action_group:
17805  * @application: a #GApplication
17806  * @action_group: (allow-none): a #GActionGroup, or %NULL
17807  *
17808  * This used to be how actions were associated with a #GApplication.
17809  * Now there is #GActionMap for that.
17810  *
17811  *
17812  * Deprecated:2.32:Use the #GActionMap interface instead.  Never ever
17813  * mix use of this API with use of #GActionMap on the same @application
17814  * or things will go very badly wrong.  This function is known to
17815  * introduce buggy behaviour (ie: signals not emitted on changes to the
17816  * action group), so you should really use #GActionMap instead.
17817  *
17818  * Since: 2.28
17819  */
17820
17821
17822 /**
17823  * g_application_set_application_id:
17824  * @application: a #GApplication
17825  * @application_id: the identifier for @application
17826  *
17827  * Sets the unique identifier for @application.
17828  *
17829  * The application id can only be modified if @application has not yet
17830  * been registered.
17831  *
17832  * The application id must be valid.  See g_application_id_is_valid().
17833  *
17834  * Since: 2.28
17835  */
17836
17837
17838 /**
17839  * g_application_set_default:
17840  * @application: the application to set as default, or %NULL
17841  *
17842  * Sets or unsets the default application for the process, as returned
17843  * by g_application_get_default().
17844  *
17845  * This function does not take its own reference on @application.  If
17846  * @application is destroyed then the default application will revert
17847  * back to %NULL.
17848  *
17849  * Since: 2.32
17850  */
17851
17852
17853 /**
17854  * g_application_set_flags:
17855  * @application: a #GApplication
17856  * @flags: the flags for @application
17857  *
17858  * Sets the flags for @application.
17859  *
17860  * The flags can only be modified if @application has not yet been
17861  * registered.
17862  *
17863  * See #GApplicationFlags.
17864  *
17865  * Since: 2.28
17866  */
17867
17868
17869 /**
17870  * g_application_set_inactivity_timeout:
17871  * @application: a #GApplication
17872  * @inactivity_timeout: the timeout, in milliseconds
17873  *
17874  * Sets the current inactivity timeout for the application.
17875  *
17876  * This is the amount of time (in milliseconds) after the last call to
17877  * g_application_release() before the application stops running.
17878  *
17879  * This call has no side effects of its own.  The value set here is only
17880  * used for next time g_application_release() drops the use count to
17881  * zero.  Any timeouts currently in progress are not impacted.
17882  *
17883  * Since: 2.28
17884  */
17885
17886
17887 /**
17888  * g_async_initable_init_async:
17889  * @initable: a #GAsyncInitable.
17890  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
17891  * @cancellable: optional #GCancellable object, %NULL to ignore.
17892  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
17893  * @user_data: the data to pass to callback function
17894  *
17895  * Starts asynchronous initialization of the object implementing the
17896  * interface. This must be done before any real use of the object after
17897  * initial construction. If the object also implements #GInitable you can
17898  * optionally call g_initable_init() instead.
17899  *
17900  * When the initialization is finished, @callback will be called. You can
17901  * then call g_async_initable_init_finish() to get the result of the
17902  * initialization.
17903  *
17904  * Implementations may also support cancellation. If @cancellable is not
17905  * %NULL, then initialization can be cancelled by triggering the cancellable
17906  * object from another thread. If the operation was cancelled, the error
17907  * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
17908  * the object doesn't support cancellable initialization, the error
17909  * %G_IO_ERROR_NOT_SUPPORTED will be returned.
17910  *
17911  * As with #GInitable, if the object is not initialized, or initialization
17912  * returns with an error, then all operations on the object except
17913  * g_object_ref() and g_object_unref() are considered to be invalid, and
17914  * have undefined behaviour. They will often fail with g_critical() or
17915  * g_warning(), but this must not be relied on.
17916  *
17917  * Implementations of this method must be idempotent: i.e. multiple calls
17918  * to this function with the same argument should return the same results.
17919  * Only the first call initializes the object; further calls return the result
17920  * of the first call. This is so that it's safe to implement the singleton
17921  * pattern in the GObject constructor function.
17922  *
17923  * For classes that also support the #GInitable interface, the default
17924  * implementation of this method will run the g_initable_init() function
17925  * in a thread, so if you want to support asynchronous initialization via
17926  * threads, just implement the #GAsyncInitable interface without overriding
17927  * any interface methods.
17928  *
17929  * Since: 2.22
17930  */
17931
17932
17933 /**
17934  * g_async_initable_init_finish:
17935  * @initable: a #GAsyncInitable.
17936  * @res: a #GAsyncResult.
17937  * @error: a #GError location to store the error occurring, or %NULL to ignore.
17938  *
17939  * Finishes asynchronous initialization and returns the result.
17940  * See g_async_initable_init_async().
17941  *
17942  * will return %FALSE and set @error appropriately if present.
17943  *
17944  * Returns: %TRUE if successful. If an error has occurred, this function
17945  * Since: 2.22
17946  */
17947
17948
17949 /**
17950  * g_async_initable_new_async:
17951  * @object_type: a #GType supporting #GAsyncInitable.
17952  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
17953  * @cancellable: optional #GCancellable object, %NULL to ignore.
17954  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
17955  * @user_data: the data to pass to callback function
17956  * @first_property_name: the name of the first property, or %NULL if no properties
17957  * @...: the value of the first property, followed by other property value pairs, and ended by %NULL.
17958  *
17959  * Helper function for constructing #GAsyncInitable object. This is
17960  * similar to g_object_new() but also initializes the object asynchronously.
17961  *
17962  * When the initialization is finished, @callback will be called. You can
17963  * then call g_async_initable_new_finish() to get the new object and check
17964  * for any errors.
17965  *
17966  * Since: 2.22
17967  */
17968
17969
17970 /**
17971  * g_async_initable_new_finish:
17972  * @initable: the #GAsyncInitable from the callback
17973  * @res: the #GAsyncResult from the callback
17974  * @error: return location for errors, or %NULL to ignore
17975  *
17976  * Finishes the async construction for the various g_async_initable_new
17977  * calls, returning the created object or %NULL on error.
17978  *
17979  * Free with g_object_unref().
17980  *
17981  * Returns: (transfer full): a newly created #GObject, or %NULL on error.
17982  * Since: 2.22
17983  */
17984
17985
17986 /**
17987  * g_async_initable_new_valist_async:
17988  * @object_type: a #GType supporting #GAsyncInitable.
17989  * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
17990  * @var_args: The var args list generated from @first_property_name.
17991  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
17992  * @cancellable: optional #GCancellable object, %NULL to ignore.
17993  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
17994  * @user_data: the data to pass to callback function
17995  *
17996  * Helper function for constructing #GAsyncInitable object. This is
17997  * similar to g_object_new_valist() but also initializes the object
17998  * asynchronously.
17999  *
18000  * When the initialization is finished, @callback will be called. You can
18001  * then call g_async_initable_new_finish() to get the new object and check
18002  * for any errors.
18003  *
18004  * Since: 2.22
18005  */
18006
18007
18008 /**
18009  * g_async_initable_newv_async:
18010  * @object_type: a #GType supporting #GAsyncInitable.
18011  * @n_parameters: the number of parameters in @parameters
18012  * @parameters: the parameters to use to construct the object
18013  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
18014  * @cancellable: optional #GCancellable object, %NULL to ignore.
18015  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
18016  * @user_data: the data to pass to callback function
18017  *
18018  * Helper function for constructing #GAsyncInitable object. This is
18019  * similar to g_object_newv() but also initializes the object asynchronously.
18020  *
18021  * When the initialization is finished, @callback will be called. You can
18022  * then call g_async_initable_new_finish() to get the new object and check
18023  * for any errors.
18024  *
18025  * Since: 2.22
18026  */
18027
18028
18029 /**
18030  * g_async_result_get_source_object:
18031  * @res: a #GAsyncResult
18032  *
18033  * Gets the source object from a #GAsyncResult.
18034  *
18035  * or %NULL if there is none.
18036  *
18037  * Returns: (transfer full): a new reference to the source object for the @res,
18038  */
18039
18040
18041 /**
18042  * g_async_result_get_user_data:
18043  * @res: a #GAsyncResult.
18044  *
18045  * Gets the user data from a #GAsyncResult.
18046  *
18047  * Returns: (transfer full): the user data for @res.
18048  */
18049
18050
18051 /**
18052  * g_buffered_input_stream_fill:
18053  * @stream: a #GBufferedInputStream
18054  * @count: the number of bytes that will be read from the stream
18055  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
18056  * @error: location to store the error occurring, or %NULL to ignore
18057  *
18058  * Tries to read @count bytes from the stream into the buffer.
18059  * Will block during this read.
18060  *
18061  * If @count is zero, returns zero and does nothing. A value of @count
18062  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
18063  *
18064  * On success, the number of bytes read into the buffer is returned.
18065  * It is not an error if this is not the same as the requested size, as it
18066  * can happen e.g. near the end of a file. Zero is returned on end of file
18067  * (or if @count is zero),  but never otherwise.
18068  *
18069  * If @count is -1 then the attempted read size is equal to the number of
18070  * bytes that are required to fill the buffer.
18071  *
18072  * If @cancellable is not %NULL, then the operation can be cancelled by
18073  * triggering the cancellable object from another thread. If the operation
18074  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
18075  * operation was partially finished when the operation was cancelled the
18076  * partial result will be returned, without an error.
18077  *
18078  * On error -1 is returned and @error is set accordingly.
18079  *
18080  * For the asynchronous, non-blocking, version of this function, see
18081  * g_buffered_input_stream_fill_async().
18082  *
18083  * or -1 on error.
18084  *
18085  * Returns: the number of bytes read into @stream's buffer, up to @count,
18086  */
18087
18088
18089 /**
18090  * g_buffered_input_stream_fill_async:
18091  * @stream: a #GBufferedInputStream
18092  * @count: the number of bytes that will be read from the stream
18093  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
18094  * @cancellable: (allow-none): optional #GCancellable object
18095  * @callback: (scope async): a #GAsyncReadyCallback
18096  * @user_data: (closure): a #gpointer
18097  *
18098  * Reads data into @stream's buffer asynchronously, up to @count size.
18099  * @io_priority can be used to prioritize reads. For the synchronous
18100  * version of this function, see g_buffered_input_stream_fill().
18101  *
18102  * If @count is -1 then the attempted read size is equal to the number
18103  * of bytes that are required to fill the buffer.
18104  */
18105
18106
18107 /**
18108  * g_buffered_input_stream_fill_finish:
18109  * @stream: a #GBufferedInputStream
18110  * @result: a #GAsyncResult
18111  * @error: a #GError
18112  *
18113  * Finishes an asynchronous read.
18114  *
18115  * Returns: a #gssize of the read stream, or %-1 on an error.
18116  */
18117
18118
18119 /**
18120  * g_buffered_input_stream_get_available:
18121  * @stream: #GBufferedInputStream
18122  *
18123  * Gets the size of the available data within the stream.
18124  *
18125  * Returns: size of the available stream.
18126  */
18127
18128
18129 /**
18130  * g_buffered_input_stream_get_buffer_size:
18131  * @stream: a #GBufferedInputStream
18132  *
18133  * Gets the size of the input buffer.
18134  *
18135  * Returns: the current buffer size.
18136  */
18137
18138
18139 /**
18140  * g_buffered_input_stream_new:
18141  * @base_stream: a #GInputStream
18142  *
18143  * Creates a new #GInputStream from the given @base_stream, with
18144  * a buffer set to the default size (4 kilobytes).
18145  *
18146  * Returns: a #GInputStream for the given @base_stream.
18147  */
18148
18149
18150 /**
18151  * g_buffered_input_stream_new_sized:
18152  * @base_stream: a #GInputStream
18153  * @size: a #gsize
18154  *
18155  * Creates a new #GBufferedInputStream from the given @base_stream,
18156  * with a buffer set to @size.
18157  *
18158  * Returns: a #GInputStream.
18159  */
18160
18161
18162 /**
18163  * g_buffered_input_stream_peek:
18164  * @stream: a #GBufferedInputStream
18165  * @buffer: (array length=count) (element-type guint8): a pointer to an allocated chunk of memory
18166  * @offset: a #gsize
18167  * @count: a #gsize
18168  *
18169  * Peeks in the buffer, copying data of size @count into @buffer,
18170  * offset @offset bytes.
18171  *
18172  * Returns: a #gsize of the number of bytes peeked, or -1 on error.
18173  */
18174
18175
18176 /**
18177  * g_buffered_input_stream_peek_buffer:
18178  * @stream: a #GBufferedInputStream
18179  * @count: (out): a #gsize to get the number of bytes available in the buffer
18180  *
18181  * Returns the buffer with the currently available bytes. The returned
18182  * buffer must not be modified and will become invalid when reading from
18183  * the stream or filling the buffer.
18184  *
18185  * read-only buffer
18186  *
18187  * Returns: (array length=count) (element-type guint8) (transfer none):
18188  */
18189
18190
18191 /**
18192  * g_buffered_input_stream_read_byte:
18193  * @stream: a #GBufferedInputStream
18194  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
18195  * @error: location to store the error occurring, or %NULL to ignore
18196  *
18197  * Tries to read a single byte from the stream or the buffer. Will block
18198  * during this read.
18199  *
18200  * On success, the byte read from the stream is returned. On end of stream
18201  * -1 is returned but it's not an exceptional error and @error is not set.
18202  *
18203  * If @cancellable is not %NULL, then the operation can be cancelled by
18204  * triggering the cancellable object from another thread. If the operation
18205  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
18206  * operation was partially finished when the operation was cancelled the
18207  * partial result will be returned, without an error.
18208  *
18209  * On error -1 is returned and @error is set accordingly.
18210  *
18211  * Returns: the byte read from the @stream, or -1 on end of stream or error.
18212  */
18213
18214
18215 /**
18216  * g_buffered_input_stream_set_buffer_size:
18217  * @stream: a #GBufferedInputStream
18218  * @size: a #gsize
18219  *
18220  * Sets the size of the internal buffer of @stream to @size, or to the
18221  * size of the contents of the buffer. The buffer can never be resized
18222  * smaller than its current contents.
18223  */
18224
18225
18226 /**
18227  * g_buffered_output_stream_get_auto_grow:
18228  * @stream: a #GBufferedOutputStream.
18229  *
18230  * Checks if the buffer automatically grows as data is added.
18231  *
18232  * %FALSE otherwise.
18233  *
18234  * Returns: %TRUE if the @stream's buffer automatically grows,
18235  */
18236
18237
18238 /**
18239  * g_buffered_output_stream_get_buffer_size:
18240  * @stream: a #GBufferedOutputStream.
18241  *
18242  * Gets the size of the buffer in the @stream.
18243  *
18244  * Returns: the current size of the buffer.
18245  */
18246
18247
18248 /**
18249  * g_buffered_output_stream_new:
18250  * @base_stream: a #GOutputStream.
18251  *
18252  * Creates a new buffered output stream for a base stream.
18253  *
18254  * Returns: a #GOutputStream for the given @base_stream.
18255  */
18256
18257
18258 /**
18259  * g_buffered_output_stream_new_sized:
18260  * @base_stream: a #GOutputStream.
18261  * @size: a #gsize.
18262  *
18263  * Creates a new buffered output stream with a given buffer size.
18264  *
18265  * Returns: a #GOutputStream with an internal buffer set to @size.
18266  */
18267
18268
18269 /**
18270  * g_buffered_output_stream_set_auto_grow:
18271  * @stream: a #GBufferedOutputStream.
18272  * @auto_grow: a #gboolean.
18273  *
18274  * Sets whether or not the @stream's buffer should automatically grow.
18275  * If @auto_grow is true, then each write will just make the buffer
18276  * larger, and you must manually flush the buffer to actually write out
18277  * the data to the underlying stream.
18278  */
18279
18280
18281 /**
18282  * g_buffered_output_stream_set_buffer_size:
18283  * @stream: a #GBufferedOutputStream.
18284  * @size: a #gsize.
18285  *
18286  * Sets the size of the internal buffer to @size.
18287  */
18288
18289
18290 /**
18291  * g_bus_get:
18292  * @bus_type: A #GBusType.
18293  * @cancellable: A #GCancellable or %NULL.
18294  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
18295  * @user_data: The data to pass to @callback.
18296  *
18297  * Asynchronously connects to the message bus specified by @bus_type.
18298  *
18299  * When the operation is finished, @callback will be invoked. You can
18300  * then call g_bus_get_finish() to get the result of the operation.
18301  *
18302  * This is a asynchronous failable function. See g_bus_get_sync() for
18303  * the synchronous version.
18304  *
18305  * Since: 2.26
18306  */
18307
18308
18309 /**
18310  * g_bus_get_finish:
18311  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_bus_get().
18312  * @error: Return location for error or %NULL.
18313  *
18314  * Finishes an operation started with g_bus_get().
18315  *
18316  * The returned object is a singleton, that is, shared with other
18317  * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
18318  * event that you need a private message bus connection, use
18319  * g_dbus_address_get_for_bus_sync() and
18320  * g_dbus_connection_new_for_address().
18321  *
18322  * Note that the returned #GDBusConnection object will (usually) have
18323  * the #GDBusConnection:exit-on-close property set to %TRUE.
18324  *
18325  * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
18326  * Since: 2.26
18327  */
18328
18329
18330 /**
18331  * g_bus_get_sync:
18332  * @bus_type: A #GBusType.
18333  * @cancellable: A #GCancellable or %NULL.
18334  * @error: Return location for error or %NULL.
18335  *
18336  * Synchronously connects to the message bus specified by @bus_type.
18337  * Note that the returned object may shared with other callers,
18338  * e.g. if two separate parts of a process calls this function with
18339  * the same @bus_type, they will share the same object.
18340  *
18341  * This is a synchronous failable function. See g_bus_get() and
18342  * g_bus_get_finish() for the asynchronous version.
18343  *
18344  * The returned object is a singleton, that is, shared with other
18345  * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
18346  * event that you need a private message bus connection, use
18347  * g_dbus_address_get_for_bus_sync() and
18348  * g_dbus_connection_new_for_address().
18349  *
18350  * Note that the returned #GDBusConnection object will (usually) have
18351  * the #GDBusConnection:exit-on-close property set to %TRUE.
18352  *
18353  * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
18354  * Since: 2.26
18355  */
18356
18357
18358 /**
18359  * g_bus_own_name:
18360  * @bus_type: The type of bus to own a name on.
18361  * @name: The well-known name to own.
18362  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
18363  * @bus_acquired_handler: Handler to invoke when connected to the bus of type @bus_type or %NULL.
18364  * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
18365  * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
18366  * @user_data: User data to pass to handlers.
18367  * @user_data_free_func: Function for freeing @user_data or %NULL.
18368  *
18369  * Starts acquiring @name on the bus specified by @bus_type and calls
18370  * @name_acquired_handler and @name_lost_handler when the name is
18371  * acquired respectively lost. Callbacks will be invoked in the <link
18372  * linkend="g-main-context-push-thread-default">thread-default main
18373  * loop</link> of the thread you are calling this function from.
18374  *
18375  * You are guaranteed that one of the @name_acquired_handler and @name_lost_handler
18376  * callbacks will be invoked after calling this function - there are three
18377  * possible cases:
18378  * <itemizedlist>
18379  * <listitem><para>
18380  * @name_lost_handler with a %NULL connection (if a connection to the bus can't be made).
18381  * </para></listitem>
18382  * <listitem><para>
18383  * @bus_acquired_handler then @name_lost_handler (if the name can't be obtained)
18384  * </para></listitem>
18385  * <listitem><para>
18386  * @bus_acquired_handler then @name_acquired_handler (if the name was obtained).
18387  * </para></listitem>
18388  * </itemizedlist>
18389  * When you are done owning the name, just call g_bus_unown_name()
18390  * with the owner id this function returns.
18391  *
18392  * If the name is acquired or lost (for example another application
18393  * could acquire the name if you allow replacement or the application
18394  * currently owning the name exits), the handlers are also invoked. If the
18395  * #GDBusConnection that is used for attempting to own the name
18396  * closes, then @name_lost_handler is invoked since it is no
18397  * longer possible for other processes to access the process.
18398  *
18399  * You cannot use g_bus_own_name() several times for the same name (unless
18400  * interleaved with calls to g_bus_unown_name()) - only the first call
18401  * will work.
18402  *
18403  * Another guarantee is that invocations of @name_acquired_handler
18404  * and @name_lost_handler are guaranteed to alternate; that
18405  * is, if @name_acquired_handler is invoked then you are
18406  * guaranteed that the next time one of the handlers is invoked, it
18407  * will be @name_lost_handler. The reverse is also true.
18408  *
18409  * If you plan on exporting objects (using e.g.
18410  * g_dbus_connection_register_object()), note that it is generally too late
18411  * to export the objects in @name_acquired_handler. Instead, you can do this
18412  * in @bus_acquired_handler since you are guaranteed that this will run
18413  * before @name is requested from the bus.
18414  *
18415  * This behavior makes it very simple to write applications that wants
18416  * to own names and export objects, see <xref linkend="gdbus-owning-names"/>.
18417  * Simply register objects to be exported in @bus_acquired_handler and
18418  * unregister the objects (if any) in @name_lost_handler.
18419  *
18420  * g_bus_unown_name() to stop owning the name.
18421  *
18422  * Returns: An identifier (never 0) that an be used with
18423  * Since: 2.26
18424  */
18425
18426
18427 /**
18428  * g_bus_own_name_on_connection:
18429  * @connection: A #GDBusConnection.
18430  * @name: The well-known name to own.
18431  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
18432  * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
18433  * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
18434  * @user_data: User data to pass to handlers.
18435  * @user_data_free_func: Function for freeing @user_data or %NULL.
18436  *
18437  * Like g_bus_own_name() but takes a #GDBusConnection instead of a
18438  * #GBusType.
18439  *
18440  * g_bus_unown_name() to stop owning the name.
18441  *
18442  * Returns: An identifier (never 0) that an be used with
18443  * Since: 2.26
18444  */
18445
18446
18447 /**
18448  * g_bus_own_name_on_connection_with_closures:
18449  * @connection: A #GDBusConnection.
18450  * @name: The well-known name to own.
18451  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
18452  * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
18453  * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
18454  *
18455  * Version of g_bus_own_name_on_connection() using closures instead of callbacks for
18456  * easier binding in other languages.
18457  *
18458  * g_bus_unown_name() to stop owning the name.
18459  *
18460  * Returns: An identifier (never 0) that an be used with
18461  * Rename to: g_bus_own_name_on_connection
18462  * Since: 2.26
18463  */
18464
18465
18466 /**
18467  * g_bus_own_name_with_closures:
18468  * @bus_type: The type of bus to own a name on.
18469  * @name: The well-known name to own.
18470  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
18471  * @bus_acquired_closure: (allow-none): #GClosure to invoke when connected to the bus of type @bus_type or %NULL.
18472  * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
18473  * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
18474  *
18475  * Version of g_bus_own_name() using closures instead of callbacks for
18476  * easier binding in other languages.
18477  *
18478  * g_bus_unown_name() to stop owning the name.
18479  *
18480  * Returns: An identifier (never 0) that an be used with
18481  * Rename to: g_bus_own_name
18482  * Since: 2.26
18483  */
18484
18485
18486 /**
18487  * g_bus_unown_name:
18488  * @owner_id: An identifier obtained from g_bus_own_name()
18489  *
18490  * Stops owning a name.
18491  *
18492  * Since: 2.26
18493  */
18494
18495
18496 /**
18497  * g_bus_unwatch_name:
18498  * @watcher_id: An identifier obtained from g_bus_watch_name()
18499  *
18500  * Stops watching a name.
18501  *
18502  * Since: 2.26
18503  */
18504
18505
18506 /**
18507  * g_bus_watch_name:
18508  * @bus_type: The type of bus to watch a name on.
18509  * @name: The name (well-known or unique) to watch.
18510  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
18511  * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
18512  * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
18513  * @user_data: User data to pass to handlers.
18514  * @user_data_free_func: Function for freeing @user_data or %NULL.
18515  *
18516  * Starts watching @name on the bus specified by @bus_type and calls
18517  * @name_appeared_handler and @name_vanished_handler when the name is
18518  * known to have a owner respectively known to lose its
18519  * owner. Callbacks will be invoked in the <link
18520  * linkend="g-main-context-push-thread-default">thread-default main
18521  * loop</link> of the thread you are calling this function from.
18522  *
18523  * You are guaranteed that one of the handlers will be invoked after
18524  * calling this function. When you are done watching the name, just
18525  * call g_bus_unwatch_name() with the watcher id this function
18526  * returns.
18527  *
18528  * If the name vanishes or appears (for example the application owning
18529  * the name could restart), the handlers are also invoked. If the
18530  * #GDBusConnection that is used for watching the name disconnects, then
18531  * @name_vanished_handler is invoked since it is no longer
18532  * possible to access the name.
18533  *
18534  * Another guarantee is that invocations of @name_appeared_handler
18535  * and @name_vanished_handler are guaranteed to alternate; that
18536  * is, if @name_appeared_handler is invoked then you are
18537  * guaranteed that the next time one of the handlers is invoked, it
18538  * will be @name_vanished_handler. The reverse is also true.
18539  *
18540  * This behavior makes it very simple to write applications that wants
18541  * to take action when a certain name exists, see <xref
18542  * linkend="gdbus-watching-names"/>. Basically, the application
18543  * should create object proxies in @name_appeared_handler and destroy
18544  * them again (if any) in @name_vanished_handler.
18545  *
18546  * g_bus_unwatch_name() to stop watching the name.
18547  *
18548  * Returns: An identifier (never 0) that an be used with
18549  * Since: 2.26
18550  */
18551
18552
18553 /**
18554  * g_bus_watch_name_on_connection:
18555  * @connection: A #GDBusConnection.
18556  * @name: The name (well-known or unique) to watch.
18557  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
18558  * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
18559  * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
18560  * @user_data: User data to pass to handlers.
18561  * @user_data_free_func: Function for freeing @user_data or %NULL.
18562  *
18563  * Like g_bus_watch_name() but takes a #GDBusConnection instead of a
18564  * #GBusType.
18565  *
18566  * g_bus_unwatch_name() to stop watching the name.
18567  *
18568  * Returns: An identifier (never 0) that an be used with
18569  * Since: 2.26
18570  */
18571
18572
18573 /**
18574  * g_bus_watch_name_on_connection_with_closures:
18575  * @connection: A #GDBusConnection.
18576  * @name: The name (well-known or unique) to watch.
18577  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
18578  * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
18579  * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
18580  *
18581  * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for
18582  * easier binding in other languages.
18583  *
18584  * g_bus_unwatch_name() to stop watching the name.
18585  *
18586  * Returns: An identifier (never 0) that an be used with
18587  * Rename to: g_bus_watch_name_on_connection
18588  * Since: 2.26
18589  */
18590
18591
18592 /**
18593  * g_bus_watch_name_with_closures:
18594  * @bus_type: The type of bus to watch a name on.
18595  * @name: The name (well-known or unique) to watch.
18596  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
18597  * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
18598  * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
18599  *
18600  * Version of g_bus_watch_name() using closures instead of callbacks for
18601  * easier binding in other languages.
18602  *
18603  * g_bus_unwatch_name() to stop watching the name.
18604  *
18605  * Returns: An identifier (never 0) that an be used with
18606  * Rename to: g_bus_watch_name
18607  * Since: 2.26
18608  */
18609
18610
18611 /**
18612  * g_cancellable_cancel:
18613  * @cancellable: a #GCancellable object.
18614  *
18615  * Will set @cancellable to cancelled, and will emit the
18616  * #GCancellable::cancelled signal. (However, see the warning about
18617  * race conditions in the documentation for that signal if you are
18618  * planning to connect to it.)
18619  *
18620  * This function is thread-safe. In other words, you can safely call
18621  * it from a thread other than the one running the operation that was
18622  * passed the @cancellable.
18623  *
18624  * The convention within gio is that cancelling an asynchronous
18625  * operation causes it to complete asynchronously. That is, if you
18626  * cancel the operation from the same thread in which it is running,
18627  * then the operation's #GAsyncReadyCallback will not be invoked until
18628  * the application returns to the main loop.
18629  */
18630
18631
18632 /**
18633  * g_cancellable_connect:
18634  * @cancellable: A #GCancellable.
18635  * @callback: The #GCallback to connect.
18636  * @data: Data to pass to @callback.
18637  * @data_destroy_func: Free function for @data or %NULL.
18638  *
18639  * Convenience function to connect to the #GCancellable::cancelled
18640  * signal. Also handles the race condition that may happen
18641  * if the cancellable is cancelled right before connecting.
18642  *
18643  * @callback is called at most once, either directly at the
18644  * time of the connect if @cancellable is already cancelled,
18645  * or when @cancellable is cancelled in some thread.
18646  *
18647  * @data_destroy_func will be called when the handler is
18648  * disconnected, or immediately if the cancellable is already
18649  * cancelled.
18650  *
18651  * See #GCancellable::cancelled for details on how to use this.
18652  *
18653  * been cancelled.
18654  *
18655  * Returns: The id of the signal handler or 0 if @cancellable has already
18656  * Since: 2.22
18657  */
18658
18659
18660 /**
18661  * g_cancellable_disconnect:
18662  * @cancellable: A #GCancellable or %NULL.
18663  * @handler_id: Handler id of the handler to be disconnected, or %0.
18664  *
18665  * Disconnects a handler from a cancellable instance similar to
18666  * g_signal_handler_disconnect().  Additionally, in the event that a
18667  * signal handler is currently running, this call will block until the
18668  * handler has finished.  Calling this function from a
18669  * #GCancellable::cancelled signal handler will therefore result in a
18670  * deadlock.
18671  *
18672  * This avoids a race condition where a thread cancels at the
18673  * same time as the cancellable operation is finished and the
18674  * signal handler is removed. See #GCancellable::cancelled for
18675  * details on how to use this.
18676  *
18677  * If @cancellable is %NULL or @handler_id is %0 this function does
18678  * nothing.
18679  *
18680  * Since: 2.22
18681  */
18682
18683
18684 /**
18685  * g_cancellable_get_current:
18686  *
18687  * Gets the top cancellable from the stack.
18688  *
18689  * if the stack is empty.
18690  *
18691  * Returns: (transfer none): a #GCancellable from the top of the stack, or %NULL
18692  */
18693
18694
18695 /**
18696  * g_cancellable_get_fd:
18697  * @cancellable: a #GCancellable.
18698  *
18699  * Gets the file descriptor for a cancellable job. This can be used to
18700  * implement cancellable operations on Unix systems. The returned fd will
18701  * turn readable when @cancellable is cancelled.
18702  *
18703  * You are not supposed to read from the fd yourself, just check for
18704  * readable status. Reading to unset the readable status is done
18705  * with g_cancellable_reset().
18706  *
18707  * After a successful return from this function, you should use
18708  * g_cancellable_release_fd() to free up resources allocated for
18709  * the returned file descriptor.
18710  *
18711  * See also g_cancellable_make_pollfd().
18712  *
18713  * is not supported, or on errors.
18714  *
18715  * Returns: A valid file descriptor. %-1 if the file descriptor
18716  */
18717
18718
18719 /**
18720  * g_cancellable_is_cancelled:
18721  * @cancellable: (allow-none): a #GCancellable or %NULL
18722  *
18723  * Checks if a cancellable job has been cancelled.
18724  *
18725  * FALSE if called with %NULL or if item is not cancelled.
18726  *
18727  * Returns: %TRUE if @cancellable is cancelled,
18728  */
18729
18730
18731 /**
18732  * g_cancellable_make_pollfd:
18733  * @cancellable: a #GCancellable or %NULL
18734  * @pollfd: a pointer to a #GPollFD
18735  *
18736  * Creates a #GPollFD corresponding to @cancellable; this can be passed
18737  * to g_poll() and used to poll for cancellation. This is useful both
18738  * for unix systems without a native poll and for portability to
18739  * windows.
18740  *
18741  * When this function returns %TRUE, you should use
18742  * g_cancellable_release_fd() to free up resources allocated for the
18743  * @pollfd. After a %FALSE return, do not call g_cancellable_release_fd().
18744  *
18745  * If this function returns %FALSE, either no @cancellable was given or
18746  * resource limits prevent this function from allocating the necessary
18747  * structures for polling. (On Linux, you will likely have reached
18748  * the maximum number of file descriptors.) The suggested way to handle
18749  * these cases is to ignore the @cancellable.
18750  *
18751  * You are not supposed to read from the fd yourself, just check for
18752  * readable status. Reading to unset the readable status is done
18753  * with g_cancellable_reset().
18754  *
18755  * failure to prepare the cancellable.
18756  *
18757  * Returns: %TRUE if @pollfd was successfully initialized, %FALSE on
18758  * Since: 2.22
18759  */
18760
18761
18762 /**
18763  * g_cancellable_new:
18764  *
18765  * Creates a new #GCancellable object.
18766  *
18767  * Applications that want to start one or more operations
18768  * that should be cancellable should create a #GCancellable
18769  * and pass it to the operations.
18770  *
18771  * One #GCancellable can be used in multiple consecutive
18772  * operations or in multiple concurrent operations.
18773  *
18774  * Returns: a #GCancellable.
18775  */
18776
18777
18778 /**
18779  * g_cancellable_pop_current:
18780  * @cancellable: a #GCancellable object
18781  *
18782  * Pops @cancellable off the cancellable stack (verifying that @cancellable
18783  * is on the top of the stack).
18784  */
18785
18786
18787 /**
18788  * g_cancellable_push_current:
18789  * @cancellable: a #GCancellable object
18790  *
18791  * Pushes @cancellable onto the cancellable stack. The current
18792  * cancellable can then be received using g_cancellable_get_current().
18793  *
18794  * This is useful when implementing cancellable operations in
18795  * code that does not allow you to pass down the cancellable object.
18796  *
18797  * This is typically called automatically by e.g. #GFile operations,
18798  * so you rarely have to call this yourself.
18799  */
18800
18801
18802 /**
18803  * g_cancellable_release_fd:
18804  * @cancellable: a #GCancellable
18805  *
18806  * Releases a resources previously allocated by g_cancellable_get_fd()
18807  * or g_cancellable_make_pollfd().
18808  *
18809  * For compatibility reasons with older releases, calling this function
18810  * is not strictly required, the resources will be automatically freed
18811  * when the @cancellable is finalized. However, the @cancellable will
18812  * block scarce file descriptors until it is finalized if this function
18813  * is not called. This can cause the application to run out of file
18814  * descriptors when many #GCancellables are used at the same time.
18815  *
18816  * Since: 2.22
18817  */
18818
18819
18820 /**
18821  * g_cancellable_reset:
18822  * @cancellable: a #GCancellable object.
18823  *
18824  * Resets @cancellable to its uncancelled state.
18825  *
18826  * If cancellable is currently in use by any cancellable operation
18827  * then the behavior of this function is undefined.
18828  */
18829
18830
18831 /**
18832  * g_cancellable_set_error_if_cancelled:
18833  * @cancellable: (allow-none): a #GCancellable or %NULL
18834  * @error: #GError to append error state to
18835  *
18836  * If the @cancellable is cancelled, sets the error to notify
18837  * that the operation was cancelled.
18838  *
18839  * Returns: %TRUE if @cancellable was cancelled, %FALSE if it was not
18840  */
18841
18842
18843 /**
18844  * g_cancellable_source_new: (skip)
18845  * @cancellable: a #GCancellable, or %NULL
18846  *
18847  * Creates a source that triggers if @cancellable is cancelled and
18848  * calls its callback of type #GCancellableSourceFunc. This is
18849  * primarily useful for attaching to another (non-cancellable) source
18850  * with g_source_add_child_source() to add cancellability to it.
18851  *
18852  * For convenience, you can call this with a %NULL #GCancellable,
18853  * in which case the source will never trigger.
18854  *
18855  * Returns: (transfer full): the new #GSource.
18856  * Since: 2.28
18857  */
18858
18859
18860 /**
18861  * g_charset_converter_get_num_fallbacks:
18862  * @converter: a #GCharsetConverter
18863  *
18864  * Gets the number of fallbacks that @converter has applied so far.
18865  *
18866  * Returns: the number of fallbacks that @converter has applied
18867  * Since: 2.24
18868  */
18869
18870
18871 /**
18872  * g_charset_converter_get_use_fallback:
18873  * @converter: a #GCharsetConverter
18874  *
18875  * Gets the #GCharsetConverter:use-fallback property.
18876  *
18877  * Returns: %TRUE if fallbacks are used by @converter
18878  * Since: 2.24
18879  */
18880
18881
18882 /**
18883  * g_charset_converter_new:
18884  * @to_charset: destination charset
18885  * @from_charset: source charset
18886  * @error: #GError for error reporting, or %NULL to ignore.
18887  *
18888  * Creates a new #GCharsetConverter.
18889  *
18890  * Returns: a new #GCharsetConverter or %NULL on error.
18891  * Since: 2.24
18892  */
18893
18894
18895 /**
18896  * g_charset_converter_set_use_fallback:
18897  * @converter: a #GCharsetConverter
18898  * @use_fallback: %TRUE to use fallbacks
18899  *
18900  * Sets the #GCharsetConverter:use-fallback property.
18901  *
18902  * Since: 2.24
18903  */
18904
18905
18906 /**
18907  * g_content_type_can_be_executable:
18908  * @type: a content type string
18909  *
18910  * Checks if a content type can be executable. Note that for instance
18911  * things like text files can be executables (i.e. scripts and batch files).
18912  *
18913  * can be executable, %FALSE otherwise.
18914  *
18915  * Returns: %TRUE if the file type corresponds to a type that
18916  */
18917
18918
18919 /**
18920  * g_content_type_equals:
18921  * @type1: a content type string
18922  * @type2: a content type string
18923  *
18924  * Compares two content types for equality.
18925  *
18926  * %FALSE otherwise.
18927  *
18928  * Returns: %TRUE if the two strings are identical or equivalent,
18929  */
18930
18931
18932 /**
18933  * g_content_type_from_mime_type:
18934  * @mime_type: a mime type string
18935  *
18936  * Tries to find a content type based on the mime type name.
18937  *
18938  * or %NULL. Free with g_free()
18939  *
18940  * Returns: (allow-none): Newly allocated string with content type
18941  * Since: 2.18
18942  */
18943
18944
18945 /**
18946  * g_content_type_get_description:
18947  * @type: a content type string
18948  *
18949  * Gets the human readable description of the content type.
18950  *
18951  * returned string with g_free()
18952  *
18953  * Returns: a short description of the content type @type. Free the
18954  */
18955
18956
18957 /**
18958  * g_content_type_get_icon:
18959  * @type: a content type string
18960  *
18961  * Gets the icon for a content type.
18962  *
18963  * object with g_object_unref()
18964  *
18965  * Returns: (transfer full): #GIcon corresponding to the content type. Free the returned
18966  */
18967
18968
18969 /**
18970  * g_content_type_get_mime_type:
18971  * @type: a content type string
18972  *
18973  * Gets the mime type for the content type, if one is registered.
18974  *
18975  * or %NULL if unknown.
18976  *
18977  * Returns: (allow-none): the registered mime type for the given @type,
18978  */
18979
18980
18981 /**
18982  * g_content_type_guess:
18983  * @filename: (allow-none): a string, or %NULL
18984  * @data: (allow-none) (array length=data_size): a stream of data, or %NULL
18985  * @data_size: the size of @data
18986  * @result_uncertain: (allow-none) (out): return location for the certainty of the result, or %NULL
18987  *
18988  * Guesses the content type based on example data. If the function is
18989  * uncertain, @result_uncertain will be set to %TRUE. Either @filename
18990  * or @data may be %NULL, in which case the guess will be based solely
18991  * on the other argument.
18992  *
18993  * given data. Free with g_free()
18994  *
18995  * Returns: a string indicating a guessed content type for the
18996  */
18997
18998
18999 /**
19000  * g_content_type_guess_for_tree:
19001  * @root: the root of the tree to guess a type for
19002  *
19003  * Tries to guess the type of the tree with root @root, by
19004  * looking at the files it contains. The result is an array
19005  * of content types, with the best guess coming first.
19006  *
19007  * The types returned all have the form x-content/foo, e.g.
19008  * x-content/audio-cdda (for audio CDs) or x-content/image-dcf
19009  * (for a camera memory card). See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
19010  * specification for more on x-content types.
19011  *
19012  * This function is useful in the implementation of
19013  * g_mount_guess_content_type().
19014  *
19015  * array of zero or more content types. Free with g_strfreev()
19016  *
19017  * Returns: (transfer full) (array zero-terminated=1): an %NULL-terminated
19018  * Since: 2.18
19019  */
19020
19021
19022 /**
19023  * g_content_type_is_a:
19024  * @type: a content type string
19025  * @supertype: a content type string
19026  *
19027  * Determines if @type is a subset of @supertype.
19028  *
19029  * %FALSE otherwise.
19030  *
19031  * Returns: %TRUE if @type is a kind of @supertype,
19032  */
19033
19034
19035 /**
19036  * g_content_type_is_unknown:
19037  * @type: a content type string
19038  *
19039  * Checks if the content type is the generic "unknown" type.
19040  * On UNIX this is the "application/octet-stream" mimetype,
19041  * while on win32 it is "*".
19042  *
19043  * Returns: %TRUE if the type is the unknown type.
19044  */
19045
19046
19047 /**
19048  * g_content_types_get_registered:
19049  *
19050  * Gets a list of strings containing all the registered content types
19051  * known to the system. The list and its data should be freed using
19052  * <programlisting>
19053  * g_list_free_full (list, g_free);
19054  * </programlisting>
19055  *
19056  * Returns: (element-type utf8) (transfer full): #GList of the registered content types
19057  */
19058
19059
19060 /**
19061  * g_converter_convert:
19062  * @converter: a #GConverter.
19063  * @inbuf: (array length=inbuf_size) (element-type guint8): the buffer containing the data to convert.
19064  * @inbuf_size: the number of bytes in @inbuf
19065  * @outbuf: a buffer to write converted data in.
19066  * @outbuf_size: the number of bytes in @outbuf, must be at least one
19067  * @flags: a #GConvertFlags controlling the conversion details
19068  * @bytes_read: (out): will be set to the number of bytes read from @inbuf on success
19069  * @bytes_written: (out): will be set to the number of bytes written to @outbuf on success
19070  * @error: location to store the error occurring, or %NULL to ignore
19071  *
19072  * This is the main operation used when converting data. It is to be called
19073  * multiple times in a loop, and each time it will do some work, i.e.
19074  * producing some output (in @outbuf) or consuming some input (from @inbuf) or
19075  * both. If its not possible to do any work an error is returned.
19076  *
19077  * Note that a single call may not consume all input (or any input at all).
19078  * Also a call may produce output even if given no input, due to state stored
19079  * in the converter producing output.
19080  *
19081  * If any data was either produced or consumed, and then an error happens, then
19082  * only the successful conversion is reported and the error is returned on the
19083  * next call.
19084  *
19085  * A full conversion loop involves calling this method repeatedly, each time
19086  * giving it new input and space output space. When there is no more input
19087  * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set.
19088  * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED
19089  * each time until all data is consumed and all output is produced, then
19090  * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED
19091  * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance
19092  * in a decompression converter where the end of data is detectable from the
19093  * data (and there might even be other data after the end of the compressed data).
19094  *
19095  * When some data has successfully been converted @bytes_read and is set to
19096  * the number of bytes read from @inbuf, and @bytes_written is set to indicate
19097  * how many bytes was written to @outbuf. If there are more data to output
19098  * or consume (i.e. unless the %G_CONVERTER_INPUT_AT_END is specified) then
19099  * %G_CONVERTER_CONVERTED is returned, and if no more data is to be output
19100  * then %G_CONVERTER_FINISHED is returned.
19101  *
19102  * On error %G_CONVERTER_ERROR is returned and @error is set accordingly.
19103  * Some errors need special handling:
19104  *
19105  * %G_IO_ERROR_NO_SPACE is returned if there is not enough space
19106  * to write the resulting converted data, the application should
19107  * call the function again with a larger @outbuf to continue.
19108  *
19109  * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough
19110  * input to fully determine what the conversion should produce,
19111  * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for
19112  * example with an incomplete multibyte sequence when converting text,
19113  * or when a regexp matches up to the end of the input (and may match
19114  * further input). It may also happen when @inbuf_size is zero and
19115  * there is no more data to produce.
19116  *
19117  * When this happens the application should read more input and then
19118  * call the function again. If further input shows that there is no
19119  * more data call the function again with the same data but with
19120  * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion
19121  * to finish as e.g. in the regexp match case (or, to fail again with
19122  * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the
19123  * input is actually partial).
19124  *
19125  * After g_converter_convert() has returned %G_CONVERTER_FINISHED the
19126  * converter object is in an invalid state where its not allowed
19127  * to call g_converter_convert() anymore. At this time you can only
19128  * free the object or call g_converter_reset() to reset it to the
19129  * initial state.
19130  *
19131  * If the flag %G_CONVERTER_FLUSH is set then conversion is modified
19132  * to try to write out all internal state to the output. The application
19133  * has to call the function multiple times with the flag set, and when
19134  * the available input has been consumed and all internal state has
19135  * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if
19136  * really at the end) is returned instead of %G_CONVERTER_CONVERTED.
19137  * This is somewhat similar to what happens at the end of the input stream,
19138  * but done in the middle of the data.
19139  *
19140  * This has different meanings for different conversions. For instance
19141  * in a compression converter it would mean that we flush all the
19142  * compression state into output such that if you uncompress the
19143  * compressed data you get back all the input data. Doing this may
19144  * make the final file larger due to padding though. Another example
19145  * is a regexp conversion, where if you at the end of the flushed data
19146  * have a match, but there is also a potential longer match. In the
19147  * non-flushed case we would ask for more input, but when flushing we
19148  * treat this as the end of input and do the match.
19149  *
19150  * Flushing is not always possible (like if a charset converter flushes
19151  * at a partial multibyte sequence). Converters are supposed to try
19152  * to produce as much output as possible and then return an error
19153  * (typically %G_IO_ERROR_PARTIAL_INPUT).
19154  *
19155  * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error.
19156  * Since: 2.24
19157  */
19158
19159
19160 /**
19161  * g_converter_input_stream_get_converter:
19162  * @converter_stream: a #GConverterInputStream
19163  *
19164  * Gets the #GConverter that is used by @converter_stream.
19165  *
19166  * Returns: (transfer none): the converter of the converter input stream
19167  * Since: 2.24
19168  */
19169
19170
19171 /**
19172  * g_converter_input_stream_new:
19173  * @base_stream: a #GInputStream
19174  * @converter: a #GConverter
19175  *
19176  * Creates a new converter input stream for the @base_stream.
19177  *
19178  * Returns: a new #GInputStream.
19179  */
19180
19181
19182 /**
19183  * g_converter_output_stream_get_converter:
19184  * @converter_stream: a #GConverterOutputStream
19185  *
19186  * Gets the #GConverter that is used by @converter_stream.
19187  *
19188  * Returns: (transfer none): the converter of the converter output stream
19189  * Since: 2.24
19190  */
19191
19192
19193 /**
19194  * g_converter_output_stream_new:
19195  * @base_stream: a #GOutputStream
19196  * @converter: a #GConverter
19197  *
19198  * Creates a new converter output stream for the @base_stream.
19199  *
19200  * Returns: a new #GOutputStream.
19201  */
19202
19203
19204 /**
19205  * g_converter_reset:
19206  * @converter: a #GConverter.
19207  *
19208  * Resets all internal state in the converter, making it behave
19209  * as if it was just created. If the converter has any internal
19210  * state that would produce output then that output is lost.
19211  *
19212  * Since: 2.24
19213  */
19214
19215
19216 /**
19217  * g_credentials_get_native: (skip)
19218  * @credentials: A #GCredentials.
19219  * @native_type: The type of native credentials to get.
19220  *
19221  * Gets a pointer to native credentials of type @native_type from
19222  * @credentials.
19223  *
19224  * It is a programming error (which will cause an warning to be
19225  * logged) to use this method if there is no #GCredentials support for
19226  * the OS or if @native_type isn't supported by the OS.
19227  *
19228  * operation there is no #GCredentials support for the OS or if
19229  * @native_type isn't supported by the OS. Do not free the returned
19230  * data, it is owned by @credentials.
19231  *
19232  * Returns: The pointer to native credentials or %NULL if the
19233  * Since: 2.26
19234  */
19235
19236
19237 /**
19238  * g_credentials_get_unix_user:
19239  * @credentials: A #GCredentials
19240  * @error: Return location for error or %NULL.
19241  *
19242  * Tries to get the UNIX user identifier from @credentials. This
19243  * method is only available on UNIX platforms.
19244  *
19245  * This operation can fail if #GCredentials is not supported on the
19246  * OS or if the native credentials type does not contain information
19247  * about the UNIX user.
19248  *
19249  * Returns: The UNIX user identifier or -1 if @error is set.
19250  * Since: 2.26
19251  */
19252
19253
19254 /**
19255  * g_credentials_is_same_user:
19256  * @credentials: A #GCredentials.
19257  * @other_credentials: A #GCredentials.
19258  * @error: Return location for error or %NULL.
19259  *
19260  * Checks if @credentials and @other_credentials is the same user.
19261  *
19262  * This operation can fail if #GCredentials is not supported on the
19263  * the OS.
19264  *
19265  * user, %FALSE otherwise or if @error is set.
19266  *
19267  * Returns: %TRUE if @credentials and @other_credentials has the same
19268  * Since: 2.26
19269  */
19270
19271
19272 /**
19273  * g_credentials_new:
19274  *
19275  * Creates a new #GCredentials object with credentials matching the
19276  * the current process.
19277  *
19278  * Returns: A #GCredentials. Free with g_object_unref().
19279  * Since: 2.26
19280  */
19281
19282
19283 /**
19284  * g_credentials_set_native:
19285  * @credentials: A #GCredentials.
19286  * @native_type: The type of native credentials to set.
19287  * @native: A pointer to native credentials.
19288  *
19289  * Copies the native credentials of type @native_type from @native
19290  * into @credentials.
19291  *
19292  * It is a programming error (which will cause an warning to be
19293  * logged) to use this method if there is no #GCredentials support for
19294  * the OS or if @native_type isn't supported by the OS.
19295  *
19296  * Since: 2.26
19297  */
19298
19299
19300 /**
19301  * g_credentials_set_unix_user:
19302  * @credentials: A #GCredentials.
19303  * @uid: The UNIX user identifier to set.
19304  * @error: Return location for error or %NULL.
19305  *
19306  * Tries to set the UNIX user identifier on @credentials. This method
19307  * is only available on UNIX platforms.
19308  *
19309  * This operation can fail if #GCredentials is not supported on the
19310  * OS or if the native credentials type does not contain information
19311  * about the UNIX user.
19312  *
19313  * Returns: %TRUE if @uid was set, %FALSE if error is set.
19314  * Since: 2.26
19315  */
19316
19317
19318 /**
19319  * g_credentials_to_string:
19320  * @credentials: A #GCredentials object.
19321  *
19322  * Creates a human-readable textual representation of @credentials
19323  * that can be used in logging and debug messages. The format of the
19324  * returned string may change in future GLib release.
19325  *
19326  * Returns: A string that should be freed with g_free().
19327  * Since: 2.26
19328  */
19329
19330
19331 /**
19332  * g_data_input_stream_get_byte_order:
19333  * @stream: a given #GDataInputStream.
19334  *
19335  * Gets the byte order for the data input stream.
19336  *
19337  * Returns: the @stream's current #GDataStreamByteOrder.
19338  */
19339
19340
19341 /**
19342  * g_data_input_stream_get_newline_type:
19343  * @stream: a given #GDataInputStream.
19344  *
19345  * Gets the current newline type for the @stream.
19346  *
19347  * Returns: #GDataStreamNewlineType for the given @stream.
19348  */
19349
19350
19351 /**
19352  * g_data_input_stream_new:
19353  * @base_stream: a #GInputStream.
19354  *
19355  * Creates a new data input stream for the @base_stream.
19356  *
19357  * Returns: a new #GDataInputStream.
19358  */
19359
19360
19361 /**
19362  * g_data_input_stream_read_byte:
19363  * @stream: a given #GDataInputStream.
19364  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19365  * @error: #GError for error reporting.
19366  *
19367  * Reads an unsigned 8-bit/1-byte value from @stream.
19368  *
19369  * if an error occurred.
19370  *
19371  * Returns: an unsigned 8-bit/1-byte value read from the @stream or %0
19372  */
19373
19374
19375 /**
19376  * g_data_input_stream_read_int16:
19377  * @stream: a given #GDataInputStream.
19378  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19379  * @error: #GError for error reporting.
19380  *
19381  * Reads a 16-bit/2-byte value from @stream.
19382  *
19383  * In order to get the correct byte order for this read operation,
19384  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
19385  *
19386  * an error occurred.
19387  *
19388  * Returns: a signed 16-bit/2-byte value read from @stream or %0 if
19389  */
19390
19391
19392 /**
19393  * g_data_input_stream_read_int32:
19394  * @stream: a given #GDataInputStream.
19395  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19396  * @error: #GError for error reporting.
19397  *
19398  * Reads a signed 32-bit/4-byte value from @stream.
19399  *
19400  * In order to get the correct byte order for this read operation,
19401  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
19402  *
19403  * If @cancellable is not %NULL, then the operation can be cancelled by
19404  * triggering the cancellable object from another thread. If the operation
19405  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19406  *
19407  * an error occurred.
19408  *
19409  * Returns: a signed 32-bit/4-byte value read from the @stream or %0 if
19410  */
19411
19412
19413 /**
19414  * g_data_input_stream_read_int64:
19415  * @stream: a given #GDataInputStream.
19416  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19417  * @error: #GError for error reporting.
19418  *
19419  * Reads a 64-bit/8-byte value from @stream.
19420  *
19421  * In order to get the correct byte order for this read operation,
19422  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
19423  *
19424  * If @cancellable is not %NULL, then the operation can be cancelled by
19425  * triggering the cancellable object from another thread. If the operation
19426  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19427  *
19428  * an error occurred.
19429  *
19430  * Returns: a signed 64-bit/8-byte value read from @stream or %0 if
19431  */
19432
19433
19434 /**
19435  * g_data_input_stream_read_line:
19436  * @stream: a given #GDataInputStream.
19437  * @length: (out): a #gsize to get the length of the data read in.
19438  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19439  * @error: #GError for error reporting.
19440  *
19441  * Reads a line from the data input stream.  Note that no encoding
19442  * checks or conversion is performed; the input is not guaranteed to
19443  * be UTF-8, and may in fact have embedded NUL characters.
19444  *
19445  * If @cancellable is not %NULL, then the operation can be cancelled by
19446  * triggering the cancellable object from another thread. If the operation
19447  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19448  *
19449  * NUL terminated byte array with the line that was read in (without
19450  * the newlines).  Set @length to a #gsize to get the length of the
19451  * read line.  On an error, it will return %NULL and @error will be
19452  * set. If there's no content to read, it will still return %NULL,
19453  * but @error won't be set.
19454  *
19455  * Returns: (transfer full) (array zero-terminated=1) (element-type guint8): a
19456  */
19457
19458
19459 /**
19460  * g_data_input_stream_read_line_async:
19461  * @stream: a given #GDataInputStream.
19462  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19463  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19464  * @callback: (scope async): callback to call when the request is satisfied.
19465  * @user_data: (closure): the data to pass to callback function.
19466  *
19467  * The asynchronous version of g_data_input_stream_read_line().  It is
19468  * an error to have two outstanding calls to this function.
19469  *
19470  * When the operation is finished, @callback will be called. You
19471  * can then call g_data_input_stream_read_line_finish() to get
19472  * the result of the operation.
19473  *
19474  * Since: 2.20
19475  */
19476
19477
19478 /**
19479  * g_data_input_stream_read_line_finish:
19480  * @stream: a given #GDataInputStream.
19481  * @result: the #GAsyncResult that was provided to the callback.
19482  * @length: (out): a #gsize to get the length of the data read in.
19483  * @error: #GError for error reporting.
19484  *
19485  * Finish an asynchronous call started by
19486  * g_data_input_stream_read_line_async().  Note the warning about
19487  * string encoding in g_data_input_stream_read_line() applies here as
19488  * well.
19489  *
19490  * NUL-terminated byte array with the line that was read in
19491  * (without the newlines).  Set @length to a #gsize to get the
19492  * length of the read line.  On an error, it will return %NULL and
19493  * @error will be set. If there's no content to read, it will
19494  * still return %NULL, but @error won't be set.
19495  *
19496  * Returns: (transfer full) (array zero-terminated=1) (element-type guint8): a
19497  * Since: 2.20
19498  */
19499
19500
19501 /**
19502  * g_data_input_stream_read_line_finish_utf8:
19503  * @stream: a given #GDataInputStream.
19504  * @result: the #GAsyncResult that was provided to the callback.
19505  * @length: (out): a #gsize to get the length of the data read in.
19506  * @error: #GError for error reporting.
19507  *
19508  * Finish an asynchronous call started by
19509  * g_data_input_stream_read_line_async().
19510  *
19511  * (without the newlines).  Set @length to a #gsize to get the length
19512  * of the read line.  On an error, it will return %NULL and @error
19513  * will be set. For UTF-8 conversion errors, the set error domain is
19514  * %G_CONVERT_ERROR.  If there's no content to read, it will still
19515  * return %NULL, but @error won't be set.
19516  *
19517  * Returns: (transfer full): a string with the line that was read in
19518  * Since: 2.30
19519  */
19520
19521
19522 /**
19523  * g_data_input_stream_read_line_utf8:
19524  * @stream: a given #GDataInputStream.
19525  * @length: (out): a #gsize to get the length of the data read in.
19526  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19527  * @error: #GError for error reporting.
19528  *
19529  * Reads a UTF-8 encoded line from the data input stream.
19530  *
19531  * If @cancellable is not %NULL, then the operation can be cancelled by
19532  * triggering the cancellable object from another thread. If the operation
19533  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19534  *
19535  * line that was read in (without the newlines).  Set @length to a
19536  * #gsize to get the length of the read line.  On an error, it will
19537  * return %NULL and @error will be set.  For UTF-8 conversion errors,
19538  * the set error domain is %G_CONVERT_ERROR.  If there's no content to
19539  * read, it will still return %NULL, but @error won't be set.
19540  *
19541  * Returns: (transfer full): a NUL terminated UTF-8 string with the
19542  * Since: 2.30
19543  */
19544
19545
19546 /**
19547  * g_data_input_stream_read_uint16:
19548  * @stream: a given #GDataInputStream.
19549  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19550  * @error: #GError for error reporting.
19551  *
19552  * Reads an unsigned 16-bit/2-byte value from @stream.
19553  *
19554  * In order to get the correct byte order for this read operation,
19555  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
19556  *
19557  * an error occurred.
19558  *
19559  * Returns: an unsigned 16-bit/2-byte value read from the @stream or %0 if
19560  */
19561
19562
19563 /**
19564  * g_data_input_stream_read_uint32:
19565  * @stream: a given #GDataInputStream.
19566  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19567  * @error: #GError for error reporting.
19568  *
19569  * Reads an unsigned 32-bit/4-byte value from @stream.
19570  *
19571  * In order to get the correct byte order for this read operation,
19572  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
19573  *
19574  * If @cancellable is not %NULL, then the operation can be cancelled by
19575  * triggering the cancellable object from another thread. If the operation
19576  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19577  *
19578  * an error occurred.
19579  *
19580  * Returns: an unsigned 32-bit/4-byte value read from the @stream or %0 if
19581  */
19582
19583
19584 /**
19585  * g_data_input_stream_read_uint64:
19586  * @stream: a given #GDataInputStream.
19587  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19588  * @error: #GError for error reporting.
19589  *
19590  * Reads an unsigned 64-bit/8-byte value from @stream.
19591  *
19592  * In order to get the correct byte order for this read operation,
19593  * see g_data_input_stream_get_byte_order().
19594  *
19595  * If @cancellable is not %NULL, then the operation can be cancelled by
19596  * triggering the cancellable object from another thread. If the operation
19597  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19598  *
19599  * an error occurred.
19600  *
19601  * Returns: an unsigned 64-bit/8-byte read from @stream or %0 if
19602  */
19603
19604
19605 /**
19606  * g_data_input_stream_read_until:
19607  * @stream: a given #GDataInputStream.
19608  * @stop_chars: characters to terminate the read.
19609  * @length: (out): a #gsize to get the length of the data read in.
19610  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19611  * @error: #GError for error reporting.
19612  *
19613  * Reads a string from the data input stream, up to the first
19614  * occurrence of any of the stop characters.
19615  *
19616  * Note that, in contrast to g_data_input_stream_read_until_async(),
19617  * this function consumes the stop character that it finds.
19618  *
19619  * Don't use this function in new code.  Its functionality is
19620  * inconsistent with g_data_input_stream_read_until_async().  Both
19621  * functions will be marked as deprecated in a future release.  Use
19622  * g_data_input_stream_read_upto() instead, but note that that function
19623  * does not consume the stop character.
19624  *
19625  * before encountering any of the stop characters. Set @length to
19626  * a #gsize to get the length of the string. This function will
19627  * return %NULL on an error.
19628  *
19629  * Returns: (transfer full): a string with the data that was read
19630  */
19631
19632
19633 /**
19634  * g_data_input_stream_read_until_async:
19635  * @stream: a given #GDataInputStream.
19636  * @stop_chars: characters to terminate the read.
19637  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19638  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19639  * @callback: (scope async): callback to call when the request is satisfied.
19640  * @user_data: (closure): the data to pass to callback function.
19641  *
19642  * The asynchronous version of g_data_input_stream_read_until().
19643  * It is an error to have two outstanding calls to this function.
19644  *
19645  * Note that, in contrast to g_data_input_stream_read_until(),
19646  * this function does not consume the stop character that it finds.  You
19647  * must read it for yourself.
19648  *
19649  * When the operation is finished, @callback will be called. You
19650  * can then call g_data_input_stream_read_until_finish() to get
19651  * the result of the operation.
19652  *
19653  * Don't use this function in new code.  Its functionality is
19654  * inconsistent with g_data_input_stream_read_until().  Both functions
19655  * will be marked as deprecated in a future release.  Use
19656  * g_data_input_stream_read_upto_async() instead.
19657  *
19658  * Since: 2.20
19659  */
19660
19661
19662 /**
19663  * g_data_input_stream_read_until_finish:
19664  * @stream: a given #GDataInputStream.
19665  * @result: the #GAsyncResult that was provided to the callback.
19666  * @length: (out): a #gsize to get the length of the data read in.
19667  * @error: #GError for error reporting.
19668  *
19669  * Finish an asynchronous call started by
19670  * g_data_input_stream_read_until_async().
19671  *
19672  *
19673  * before encountering any of the stop characters. Set @length to
19674  * a #gsize to get the length of the string. This function will
19675  * return %NULL on an error.
19676  *
19677  * Since: 2.20
19678  * Returns: (transfer full): a string with the data that was read
19679  */
19680
19681
19682 /**
19683  * g_data_input_stream_read_upto:
19684  * @stream: a #GDataInputStream
19685  * @stop_chars: characters to terminate the read
19686  * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
19687  * @length: (out): a #gsize to get the length of the data read in
19688  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
19689  * @error: #GError for error reporting
19690  *
19691  * Reads a string from the data input stream, up to the first
19692  * occurrence of any of the stop characters.
19693  *
19694  * In contrast to g_data_input_stream_read_until(), this function
19695  * does <emphasis>not</emphasis> consume the stop character. You have
19696  * to use g_data_input_stream_read_byte() to get it before calling
19697  * g_data_input_stream_read_upto() again.
19698  *
19699  * Note that @stop_chars may contain '\0' if @stop_chars_len is
19700  * specified.
19701  *
19702  * before encountering any of the stop characters. Set @length to
19703  * a #gsize to get the length of the string. This function will
19704  * return %NULL on an error
19705  *
19706  * Returns: (transfer full): a string with the data that was read
19707  * Since: 2.26
19708  */
19709
19710
19711 /**
19712  * g_data_input_stream_read_upto_async:
19713  * @stream: a #GDataInputStream
19714  * @stop_chars: characters to terminate the read
19715  * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
19716  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19717  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
19718  * @callback: (scope async): callback to call when the request is satisfied
19719  * @user_data: (closure): the data to pass to callback function
19720  *
19721  * The asynchronous version of g_data_input_stream_read_upto().
19722  * It is an error to have two outstanding calls to this function.
19723  *
19724  * In contrast to g_data_input_stream_read_until(), this function
19725  * does <emphasis>not</emphasis> consume the stop character. You have
19726  * to use g_data_input_stream_read_byte() to get it before calling
19727  * g_data_input_stream_read_upto() again.
19728  *
19729  * Note that @stop_chars may contain '\0' if @stop_chars_len is
19730  * specified.
19731  *
19732  * When the operation is finished, @callback will be called. You
19733  * can then call g_data_input_stream_read_upto_finish() to get
19734  * the result of the operation.
19735  *
19736  * Since: 2.26
19737  */
19738
19739
19740 /**
19741  * g_data_input_stream_read_upto_finish:
19742  * @stream: a #GDataInputStream
19743  * @result: the #GAsyncResult that was provided to the callback
19744  * @length: (out): a #gsize to get the length of the data read in
19745  * @error: #GError for error reporting
19746  *
19747  * Finish an asynchronous call started by
19748  * g_data_input_stream_read_upto_async().
19749  *
19750  * Note that this function does <emphasis>not</emphasis> consume the
19751  * stop character. You have to use g_data_input_stream_read_byte() to
19752  * get it before calling g_data_input_stream_read_upto_async() again.
19753  *
19754  * before encountering any of the stop characters. Set @length to
19755  * a #gsize to get the length of the string. This function will
19756  * return %NULL on an error.
19757  *
19758  * Returns: (transfer full): a string with the data that was read
19759  * Since: 2.24
19760  */
19761
19762
19763 /**
19764  * g_data_input_stream_set_byte_order:
19765  * @stream: a given #GDataInputStream.
19766  * @order: a #GDataStreamByteOrder to set.
19767  *
19768  * This function sets the byte order for the given @stream. All subsequent
19769  * reads from the @stream will be read in the given @order.
19770  */
19771
19772
19773 /**
19774  * g_data_input_stream_set_newline_type:
19775  * @stream: a #GDataInputStream.
19776  * @type: the type of new line return as #GDataStreamNewlineType.
19777  *
19778  * Sets the newline type for the @stream.
19779  *
19780  * Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read
19781  * chunk ends in "CR" we must read an additional byte to know if this is "CR" or
19782  * "CR LF", and this might block if there is no more data available.
19783  */
19784
19785
19786 /**
19787  * g_data_output_stream_get_byte_order:
19788  * @stream: a #GDataOutputStream.
19789  *
19790  * Gets the byte order for the stream.
19791  *
19792  * Returns: the #GDataStreamByteOrder for the @stream.
19793  */
19794
19795
19796 /**
19797  * g_data_output_stream_new:
19798  * @base_stream: a #GOutputStream.
19799  *
19800  * Creates a new data output stream for @base_stream.
19801  *
19802  * Returns: #GDataOutputStream.
19803  */
19804
19805
19806 /**
19807  * g_data_output_stream_put_byte:
19808  * @stream: a #GDataOutputStream.
19809  * @data: a #guchar.
19810  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19811  * @error: a #GError, %NULL to ignore.
19812  *
19813  * Puts a byte into the output stream.
19814  *
19815  * Returns: %TRUE if @data was successfully added to the @stream.
19816  */
19817
19818
19819 /**
19820  * g_data_output_stream_put_int16:
19821  * @stream: a #GDataOutputStream.
19822  * @data: a #gint16.
19823  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19824  * @error: a #GError, %NULL to ignore.
19825  *
19826  * Puts a signed 16-bit integer into the output stream.
19827  *
19828  * Returns: %TRUE if @data was successfully added to the @stream.
19829  */
19830
19831
19832 /**
19833  * g_data_output_stream_put_int32:
19834  * @stream: a #GDataOutputStream.
19835  * @data: a #gint32.
19836  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19837  * @error: a #GError, %NULL to ignore.
19838  *
19839  * Puts a signed 32-bit integer into the output stream.
19840  *
19841  * Returns: %TRUE if @data was successfully added to the @stream.
19842  */
19843
19844
19845 /**
19846  * g_data_output_stream_put_int64:
19847  * @stream: a #GDataOutputStream.
19848  * @data: a #gint64.
19849  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19850  * @error: a #GError, %NULL to ignore.
19851  *
19852  * Puts a signed 64-bit integer into the stream.
19853  *
19854  * Returns: %TRUE if @data was successfully added to the @stream.
19855  */
19856
19857
19858 /**
19859  * g_data_output_stream_put_string:
19860  * @stream: a #GDataOutputStream.
19861  * @str: a string.
19862  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19863  * @error: a #GError, %NULL to ignore.
19864  *
19865  * Puts a string into the output stream.
19866  *
19867  * Returns: %TRUE if @string was successfully added to the @stream.
19868  */
19869
19870
19871 /**
19872  * g_data_output_stream_put_uint16:
19873  * @stream: a #GDataOutputStream.
19874  * @data: a #guint16.
19875  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19876  * @error: a #GError, %NULL to ignore.
19877  *
19878  * Puts an unsigned 16-bit integer into the output stream.
19879  *
19880  * Returns: %TRUE if @data was successfully added to the @stream.
19881  */
19882
19883
19884 /**
19885  * g_data_output_stream_put_uint32:
19886  * @stream: a #GDataOutputStream.
19887  * @data: a #guint32.
19888  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19889  * @error: a #GError, %NULL to ignore.
19890  *
19891  * Puts an unsigned 32-bit integer into the stream.
19892  *
19893  * Returns: %TRUE if @data was successfully added to the @stream.
19894  */
19895
19896
19897 /**
19898  * g_data_output_stream_put_uint64:
19899  * @stream: a #GDataOutputStream.
19900  * @data: a #guint64.
19901  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19902  * @error: a #GError, %NULL to ignore.
19903  *
19904  * Puts an unsigned 64-bit integer into the stream.
19905  *
19906  * Returns: %TRUE if @data was successfully added to the @stream.
19907  */
19908
19909
19910 /**
19911  * g_data_output_stream_set_byte_order:
19912  * @stream: a #GDataOutputStream.
19913  * @order: a %GDataStreamByteOrder.
19914  *
19915  * Sets the byte order of the data output stream to @order.
19916  */
19917
19918
19919 /**
19920  * g_dbus_action_group_get:
19921  * @connection: A #GDBusConnection
19922  * @bus_name: the bus name which exports the action group
19923  * @object_path: the object path at which the action group is exported
19924  *
19925  * Obtains a #GDBusActionGroup for the action group which is exported at
19926  * the given @bus_name and @object_path.
19927  *
19928  * The thread default main context is taken at the time of this call.
19929  * All signals on the menu model (and any linked models) are reported
19930  * with respect to this context.  All calls on the returned menu model
19931  * (and linked models) must also originate from this same context, with
19932  * the thread default main context unchanged.
19933  *
19934  * This call is non-blocking.  The returned action group may or may not
19935  * already be filled in.  The correct thing to do is connect the signals
19936  * for the action group to monitor for changes and then to call
19937  * g_action_group_list_actions() to get the initial list.
19938  *
19939  * Returns: (transfer full): a #GDBusActionGroup
19940  * Since: 2.32
19941  */
19942
19943
19944 /**
19945  * g_dbus_address_get_for_bus_sync:
19946  * @bus_type: A #GBusType.
19947  * @cancellable: A #GCancellable or %NULL.
19948  * @error: Return location for error or %NULL.
19949  *
19950  * Synchronously looks up the D-Bus address for the well-known message
19951  * bus instance specified by @bus_type. This may involve using various
19952  * platform specific mechanisms.
19953  *
19954  * Returns: A valid D-Bus address string for @bus_type or %NULL if @error is set.
19955  * Since: 2.26
19956  */
19957
19958
19959 /**
19960  * g_dbus_address_get_stream:
19961  * @address: A valid D-Bus address.
19962  * @cancellable: A #GCancellable or %NULL.
19963  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
19964  * @user_data: Data to pass to @callback.
19965  *
19966  * Asynchronously connects to an endpoint specified by @address and
19967  * sets up the connection so it is in a state to run the client-side
19968  * of the D-Bus authentication conversation.
19969  *
19970  * When the operation is finished, @callback will be invoked. You can
19971  * then call g_dbus_address_get_stream_finish() to get the result of
19972  * the operation.
19973  *
19974  * This is an asynchronous failable function. See
19975  * g_dbus_address_get_stream_sync() for the synchronous version.
19976  *
19977  * Since: 2.26
19978  */
19979
19980
19981 /**
19982  * g_dbus_address_get_stream_finish:
19983  * @res: A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().
19984  * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
19985  * @error: Return location for error or %NULL.
19986  *
19987  * Finishes an operation started with g_dbus_address_get_stream().
19988  *
19989  * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
19990  * Since: 2.26
19991  */
19992
19993
19994 /**
19995  * g_dbus_address_get_stream_sync:
19996  * @address: A valid D-Bus address.
19997  * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
19998  * @cancellable: A #GCancellable or %NULL.
19999  * @error: Return location for error or %NULL.
20000  *
20001  * Synchronously connects to an endpoint specified by @address and
20002  * sets up the connection so it is in a state to run the client-side
20003  * of the D-Bus authentication conversation.
20004  *
20005  * This is a synchronous failable function. See
20006  * g_dbus_address_get_stream() for the asynchronous version.
20007  *
20008  * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
20009  * Since: 2.26
20010  */
20011
20012
20013 /**
20014  * g_dbus_annotation_info_lookup:
20015  * @annotations: (array zero-terminated=1): A %NULL-terminated array of annotations or %NULL.
20016  * @name: The name of the annotation to look up.
20017  *
20018  * Looks up the value of an annotation.
20019  *
20020  * This cost of this function is O(n) in number of annotations.
20021  *
20022  * Returns: The value or %NULL if not found. Do not free, it is owned by @annotations.
20023  * Since: 2.26
20024  */
20025
20026
20027 /**
20028  * g_dbus_annotation_info_ref:
20029  * @info: A #GDBusNodeInfo
20030  *
20031  * If @info is statically allocated does nothing. Otherwise increases
20032  * the reference count.
20033  *
20034  * Returns: The same @info.
20035  * Since: 2.26
20036  */
20037
20038
20039 /**
20040  * g_dbus_annotation_info_unref:
20041  * @info: A #GDBusAnnotationInfo.
20042  *
20043  * If @info is statically allocated, does nothing. Otherwise decreases
20044  * the reference count of @info. When its reference count drops to 0,
20045  * the memory used is freed.
20046  *
20047  * Since: 2.26
20048  */
20049
20050
20051 /**
20052  * g_dbus_arg_info_ref:
20053  * @info: A #GDBusArgInfo
20054  *
20055  * If @info is statically allocated does nothing. Otherwise increases
20056  * the reference count.
20057  *
20058  * Returns: The same @info.
20059  * Since: 2.26
20060  */
20061
20062
20063 /**
20064  * g_dbus_arg_info_unref:
20065  * @info: A #GDBusArgInfo.
20066  *
20067  * If @info is statically allocated, does nothing. Otherwise decreases
20068  * the reference count of @info. When its reference count drops to 0,
20069  * the memory used is freed.
20070  *
20071  * Since: 2.26
20072  */
20073
20074
20075 /**
20076  * g_dbus_auth_observer_authorize_authenticated_peer:
20077  * @observer: A #GDBusAuthObserver.
20078  * @stream: A #GIOStream for the #GDBusConnection.
20079  * @credentials: Credentials received from the peer or %NULL.
20080  *
20081  * Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.
20082  *
20083  * Returns: %TRUE if the peer is authorized, %FALSE if not.
20084  * Since: 2.26
20085  */
20086
20087
20088 /**
20089  * g_dbus_auth_observer_new:
20090  *
20091  * Creates a new #GDBusAuthObserver object.
20092  *
20093  * Returns: A #GDBusAuthObserver. Free with g_object_unref().
20094  * Since: 2.26
20095  */
20096
20097
20098 /**
20099  * g_dbus_connection_add_filter:
20100  * @connection: A #GDBusConnection.
20101  * @filter_function: A filter function.
20102  * @user_data: User data to pass to @filter_function.
20103  * @user_data_free_func: Function to free @user_data with when filter is removed or %NULL.
20104  *
20105  * Adds a message filter. Filters are handlers that are run on all
20106  * incoming and outgoing messages, prior to standard dispatch. Filters
20107  * are run in the order that they were added.  The same handler can be
20108  * added as a filter more than once, in which case it will be run more
20109  * than once.  Filters added during a filter callback won't be run on
20110  * the message being processed. Filter functions are allowed to modify
20111  * and even drop messages.
20112  *
20113  * Note that filters are run in a dedicated message handling thread so
20114  * they can't block and, generally, can't do anything but signal a
20115  * worker thread. Also note that filters are rarely needed - use API
20116  * such as g_dbus_connection_send_message_with_reply(),
20117  * g_dbus_connection_signal_subscribe() or g_dbus_connection_call() instead.
20118  *
20119  * If a filter consumes an incoming message the message is not
20120  * dispatched anywhere else - not even the standard dispatch machinery
20121  * (that API such as g_dbus_connection_signal_subscribe() and
20122  * g_dbus_connection_send_message_with_reply() relies on) will see the
20123  * message. Similary, if a filter consumes an outgoing message, the
20124  * message will not be sent to the other peer.
20125  *
20126  * g_dbus_connection_remove_filter().
20127  *
20128  * Returns: A filter identifier that can be used with
20129  * Since: 2.26
20130  */
20131
20132
20133 /**
20134  * g_dbus_connection_call:
20135  * @connection: A #GDBusConnection.
20136  * @bus_name: (allow-none): A unique or well-known bus name or %NULL if @connection is not a message bus connection.
20137  * @object_path: Path of remote object.
20138  * @interface_name: D-Bus interface to invoke method on.
20139  * @method_name: The name of the method to invoke.
20140  * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
20141  * @reply_type: (allow-none): The expected type of the reply, or %NULL.
20142  * @flags: Flags from the #GDBusCallFlags enumeration.
20143  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
20144  * @cancellable: A #GCancellable or %NULL.
20145  * @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.
20146  * @user_data: The data to pass to @callback.
20147  *
20148  * Asynchronously invokes the @method_name method on the
20149  * @interface_name D-Bus interface on the remote object at
20150  * @object_path owned by @bus_name.
20151  *
20152  * If @connection is closed then the operation will fail with
20153  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
20154  * fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value
20155  * not compatible with the D-Bus protocol, the operation fails with
20156  * %G_IO_ERROR_INVALID_ARGUMENT.
20157  *
20158  * If @reply_type is non-%NULL then the reply will be checked for having this type and an
20159  * error will be raised if it does not match.  Said another way, if you give a @reply_type
20160  * then any non-%NULL return value will be of this type.
20161  *
20162  * If the @parameters #GVariant is floating, it is consumed. This allows
20163  * convenient 'inline' use of g_variant_new(), e.g.:
20164  * |[
20165  * g_dbus_connection_call (connection,
20166  * "org.freedesktop.StringThings",
20167  * "/org/freedesktop/StringThings",
20168  * "org.freedesktop.StringThings",
20169  * "TwoStrings",
20170  * g_variant_new ("(ss)",
20171  * "Thing One",
20172  * "Thing Two"),
20173  * NULL,
20174  * G_DBUS_CALL_FLAGS_NONE,
20175  * -1,
20176  * NULL,
20177  * (GAsyncReadyCallback) two_strings_done,
20178  * NULL);
20179  * ]|
20180  *
20181  * This is an asynchronous method. When the operation is finished, @callback will be invoked
20182  * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
20183  * of the thread you are calling this method from. You can then call
20184  * g_dbus_connection_call_finish() to get the result of the operation.
20185  * See g_dbus_connection_call_sync() for the synchronous version of this
20186  * function.
20187  *
20188  * Since: 2.26
20189  */
20190
20191
20192 /**
20193  * g_dbus_connection_call_finish:
20194  * @connection: A #GDBusConnection.
20195  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call().
20196  * @error: Return location for error or %NULL.
20197  *
20198  * Finishes an operation started with g_dbus_connection_call().
20199  *
20200  * return values. Free with g_variant_unref().
20201  *
20202  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
20203  * Since: 2.26
20204  */
20205
20206
20207 /**
20208  * g_dbus_connection_call_sync:
20209  * @connection: A #GDBusConnection.
20210  * @bus_name: A unique or well-known bus name.
20211  * @object_path: Path of remote object.
20212  * @interface_name: D-Bus interface to invoke method on.
20213  * @method_name: The name of the method to invoke.
20214  * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
20215  * @reply_type: (allow-none): The expected type of the reply, or %NULL.
20216  * @flags: Flags from the #GDBusCallFlags enumeration.
20217  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
20218  * @cancellable: A #GCancellable or %NULL.
20219  * @error: Return location for error or %NULL.
20220  *
20221  * Synchronously invokes the @method_name method on the
20222  * @interface_name D-Bus interface on the remote object at
20223  * @object_path owned by @bus_name.
20224  *
20225  * If @connection is closed then the operation will fail with
20226  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the
20227  * operation will fail with %G_IO_ERROR_CANCELLED. If @parameters
20228  * contains a value not compatible with the D-Bus protocol, the operation
20229  * fails with %G_IO_ERROR_INVALID_ARGUMENT.
20230  * If @reply_type is non-%NULL then the reply will be checked for having
20231  * this type and an error will be raised if it does not match.  Said
20232  * another way, if you give a @reply_type then any non-%NULL return
20233  * value will be of this type.
20234  *
20235  * If the @parameters #GVariant is floating, it is consumed.
20236  * This allows convenient 'inline' use of g_variant_new(), e.g.:
20237  * |[
20238  * g_dbus_connection_call_sync (connection,
20239  * "org.freedesktop.StringThings",
20240  * "/org/freedesktop/StringThings",
20241  * "org.freedesktop.StringThings",
20242  * "TwoStrings",
20243  * g_variant_new ("(ss)",
20244  * "Thing One",
20245  * "Thing Two"),
20246  * NULL,
20247  * G_DBUS_CALL_FLAGS_NONE,
20248  * -1,
20249  * NULL,
20250  * &amp;error);
20251  * ]|
20252  *
20253  * The calling thread is blocked until a reply is received. See
20254  * g_dbus_connection_call() for the asynchronous version of
20255  * this method.
20256  *
20257  * return values. Free with g_variant_unref().
20258  *
20259  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
20260  * Since: 2.26
20261  */
20262
20263
20264 /**
20265  * g_dbus_connection_call_with_unix_fd_list:
20266  * @connection: A #GDBusConnection.
20267  * @bus_name: (allow-none): A unique or well-known bus name or %NULL if @connection is not a message bus connection.
20268  * @object_path: Path of remote object.
20269  * @interface_name: D-Bus interface to invoke method on.
20270  * @method_name: The name of the method to invoke.
20271  * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
20272  * @reply_type: (allow-none): The expected type of the reply, or %NULL.
20273  * @flags: Flags from the #GDBusCallFlags enumeration.
20274  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
20275  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
20276  * @cancellable: A #GCancellable or %NULL.
20277  * @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.
20278  * @user_data: The data to pass to @callback.
20279  *
20280  * Like g_dbus_connection_call() but also takes a #GUnixFDList object.
20281  *
20282  * This method is only available on UNIX.
20283  *
20284  * Since: 2.30
20285  */
20286
20287
20288 /**
20289  * g_dbus_connection_call_with_unix_fd_list_finish:
20290  * @connection: A #GDBusConnection.
20291  * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
20292  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call_with_unix_fd_list().
20293  * @error: Return location for error or %NULL.
20294  *
20295  * Finishes an operation started with g_dbus_connection_call_with_unix_fd_list().
20296  *
20297  * return values. Free with g_variant_unref().
20298  *
20299  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
20300  * Since: 2.30
20301  */
20302
20303
20304 /**
20305  * g_dbus_connection_call_with_unix_fd_list_sync:
20306  * @connection: A #GDBusConnection.
20307  * @bus_name: A unique or well-known bus name.
20308  * @object_path: Path of remote object.
20309  * @interface_name: D-Bus interface to invoke method on.
20310  * @method_name: The name of the method to invoke.
20311  * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
20312  * @reply_type: (allow-none): The expected type of the reply, or %NULL.
20313  * @flags: Flags from the #GDBusCallFlags enumeration.
20314  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
20315  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
20316  * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
20317  * @cancellable: A #GCancellable or %NULL.
20318  * @error: Return location for error or %NULL.
20319  *
20320  * Like g_dbus_connection_call_sync() but also takes and returns #GUnixFDList objects.
20321  *
20322  * This method is only available on UNIX.
20323  *
20324  * return values. Free with g_variant_unref().
20325  *
20326  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
20327  * Since: 2.30
20328  */
20329
20330
20331 /**
20332  * g_dbus_connection_close:
20333  * @connection: A #GDBusConnection.
20334  * @cancellable: A #GCancellable or %NULL.
20335  * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
20336  * @user_data: The data to pass to @callback.
20337  *
20338  * Closes @connection. Note that this never causes the process to
20339  * exit (this might only happen if the other end of a shared message
20340  * bus connection disconnects, see #GDBusConnection:exit-on-close).
20341  *
20342  * Once the connection is closed, operations such as sending a message
20343  * will return with the error %G_IO_ERROR_CLOSED. Closing a connection
20344  * will not automatically flush the connection so queued messages may
20345  * be lost. Use g_dbus_connection_flush() if you need such guarantees.
20346  *
20347  * If @connection is already closed, this method fails with
20348  * %G_IO_ERROR_CLOSED.
20349  *
20350  * When @connection has been closed, the #GDBusConnection::closed
20351  * signal is emitted in the <link
20352  * linkend="g-main-context-push-thread-default">thread-default main
20353  * loop</link> of the thread that @connection was constructed in.
20354  *
20355  * This is an asynchronous method. When the operation is finished,
20356  * @callback will be invoked in the <link
20357  * linkend="g-main-context-push-thread-default">thread-default main
20358  * loop</link> of the thread you are calling this method from. You can
20359  * then call g_dbus_connection_close_finish() to get the result of the
20360  * operation.  See g_dbus_connection_close_sync() for the synchronous
20361  * version.
20362  *
20363  * Since: 2.26
20364  */
20365
20366
20367 /**
20368  * g_dbus_connection_close_finish:
20369  * @connection: A #GDBusConnection.
20370  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_close().
20371  * @error: Return location for error or %NULL.
20372  *
20373  * Finishes an operation started with g_dbus_connection_close().
20374  *
20375  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
20376  * Since: 2.26
20377  */
20378
20379
20380 /**
20381  * g_dbus_connection_close_sync:
20382  * @connection: A #GDBusConnection.
20383  * @cancellable: A #GCancellable or %NULL.
20384  * @error: Return location for error or %NULL.
20385  *
20386  * Synchronously closees @connection. The calling thread is blocked
20387  * until this is done. See g_dbus_connection_close() for the
20388  * asynchronous version of this method and more details about what it
20389  * does.
20390  *
20391  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
20392  * Since: 2.26
20393  */
20394
20395
20396 /**
20397  * g_dbus_connection_emit_signal:
20398  * @connection: A #GDBusConnection.
20399  * @destination_bus_name: (allow-none): The unique bus name for the destination for the signal or %NULL to emit to all listeners.
20400  * @object_path: Path of remote object.
20401  * @interface_name: D-Bus interface to emit a signal on.
20402  * @signal_name: The name of the signal to emit.
20403  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
20404  * @error: Return location for error or %NULL.
20405  *
20406  * Emits a signal.
20407  *
20408  * If the parameters GVariant is floating, it is consumed.
20409  *
20410  * This can only fail if @parameters is not compatible with the D-Bus protocol.
20411  *
20412  * Returns: %TRUE unless @error is set.
20413  * Since: 2.26
20414  */
20415
20416
20417 /**
20418  * g_dbus_connection_export_action_group:
20419  * @connection: a #GDBusConnection
20420  * @object_path: a D-Bus object path
20421  * @action_group: a #GActionGroup
20422  * @error: a pointer to a %NULL #GError, or %NULL
20423  *
20424  * Exports @action_group on @connection at @object_path.
20425  *
20426  * The implemented D-Bus API should be considered private.  It is
20427  * subject to change in the future.
20428  *
20429  * A given object path can only have one action group exported on it.
20430  * If this constraint is violated, the export will fail and 0 will be
20431  * returned (with @error set accordingly).
20432  *
20433  * You can unexport the action group using
20434  * g_dbus_connection_unexport_action_group() with the return value of
20435  * this function.
20436  *
20437  * The thread default main context is taken at the time of this call.
20438  * All incoming action activations and state change requests are
20439  * reported from this context.  Any changes on the action group that
20440  * cause it to emit signals must also come from this same context.
20441  * Since incoming action activations and state change requests are
20442  * rather likely to cause changes on the action group, this effectively
20443  * limits a given action group to being exported from only one main
20444  * context.
20445  *
20446  * Returns: the ID of the export (never zero), or 0 in case of failure
20447  * Since: 2.32
20448  */
20449
20450
20451 /**
20452  * g_dbus_connection_export_menu_model:
20453  * @connection: a #GDBusConnection
20454  * @object_path: a D-Bus object path
20455  * @menu: a #GMenuModel
20456  * @error: return location for an error, or %NULL
20457  *
20458  * Exports @menu on @connection at @object_path.
20459  *
20460  * The implemented D-Bus API should be considered private.
20461  * It is subject to change in the future.
20462  *
20463  * An object path can only have one action group exported on it. If this
20464  * constraint is violated, the export will fail and 0 will be
20465  * returned (with @error set accordingly).
20466  *
20467  * You can unexport the menu model using
20468  * g_dbus_connection_unexport_menu_model() with the return value of
20469  * this function.
20470  *
20471  * Returns: the ID of the export (never zero), or 0 in case of failure
20472  * Since: 2.32
20473  */
20474
20475
20476 /**
20477  * g_dbus_connection_flush:
20478  * @connection: A #GDBusConnection.
20479  * @cancellable: A #GCancellable or %NULL.
20480  * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
20481  * @user_data: The data to pass to @callback.
20482  *
20483  * Asynchronously flushes @connection, that is, writes all queued
20484  * outgoing message to the transport and then flushes the transport
20485  * (using g_output_stream_flush_async()). This is useful in programs
20486  * that wants to emit a D-Bus signal and then exit
20487  * immediately. Without flushing the connection, there is no guarantee
20488  * that the message has been sent to the networking buffers in the OS
20489  * kernel.
20490  *
20491  * This is an asynchronous method. When the operation is finished,
20492  * @callback will be invoked in the <link
20493  * linkend="g-main-context-push-thread-default">thread-default main
20494  * loop</link> of the thread you are calling this method from. You can
20495  * then call g_dbus_connection_flush_finish() to get the result of the
20496  * operation.  See g_dbus_connection_flush_sync() for the synchronous
20497  * version.
20498  *
20499  * Since: 2.26
20500  */
20501
20502
20503 /**
20504  * g_dbus_connection_flush_finish:
20505  * @connection: A #GDBusConnection.
20506  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_flush().
20507  * @error: Return location for error or %NULL.
20508  *
20509  * Finishes an operation started with g_dbus_connection_flush().
20510  *
20511  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
20512  * Since: 2.26
20513  */
20514
20515
20516 /**
20517  * g_dbus_connection_flush_sync:
20518  * @connection: A #GDBusConnection.
20519  * @cancellable: A #GCancellable or %NULL.
20520  * @error: Return location for error or %NULL.
20521  *
20522  * Synchronously flushes @connection. The calling thread is blocked
20523  * until this is done. See g_dbus_connection_flush() for the
20524  * asynchronous version of this method and more details about what it
20525  * does.
20526  *
20527  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
20528  * Since: 2.26
20529  */
20530
20531
20532 /**
20533  * g_dbus_connection_get_capabilities:
20534  * @connection: A #GDBusConnection.
20535  *
20536  * Gets the capabilities negotiated with the remote peer
20537  *
20538  * Returns: Zero or more flags from the #GDBusCapabilityFlags enumeration.
20539  * Since: 2.26
20540  */
20541
20542
20543 /**
20544  * g_dbus_connection_get_exit_on_close:
20545  * @connection: A #GDBusConnection.
20546  *
20547  * Gets whether the process is terminated when @connection is
20548  * closed by the remote peer. See
20549  * #GDBusConnection:exit-on-close for more details.
20550  *
20551  * closed by the remote peer.
20552  *
20553  * Returns: Whether the process is terminated when @connection is
20554  * Since: 2.26
20555  */
20556
20557
20558 /**
20559  * g_dbus_connection_get_guid:
20560  * @connection: A #GDBusConnection.
20561  *
20562  * The GUID of the peer performing the role of server when
20563  * authenticating. See #GDBusConnection:guid for more details.
20564  *
20565  * @connection.
20566  *
20567  * Returns: The GUID. Do not free this string, it is owned by
20568  * Since: 2.26
20569  */
20570
20571
20572 /**
20573  * g_dbus_connection_get_peer_credentials:
20574  * @connection: A #GDBusConnection.
20575  *
20576  * Gets the credentials of the authenticated peer. This will always
20577  * return %NULL unless @connection acted as a server
20578  * (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed)
20579  * when set up and the client passed credentials as part of the
20580  * authentication process.
20581  *
20582  * In a message bus setup, the message bus is always the server and
20583  * each application is a client. So this method will always return
20584  * %NULL for message bus clients.
20585  *
20586  * this object, it is owned by @connection.
20587  *
20588  * Returns: (transfer none): A #GCredentials or %NULL if not available. Do not free
20589  * Since: 2.26
20590  */
20591
20592
20593 /**
20594  * g_dbus_connection_get_stream:
20595  * @connection: a #GDBusConnection
20596  *
20597  * Gets the underlying stream used for IO.
20598  *
20599  * While the #GDBusConnection is active, it will interact with this
20600  * stream from a worker thread, so it is not safe to interact with
20601  * the stream directly.
20602  *
20603  * Returns: (transfer none): the stream used for IO
20604  * Since: 2.26
20605  */
20606
20607
20608 /**
20609  * g_dbus_connection_get_unique_name:
20610  * @connection: A #GDBusConnection.
20611  *
20612  * Gets the unique name of @connection as assigned by the message
20613  * bus. This can also be used to figure out if @connection is a
20614  * message bus connection.
20615  *
20616  * bus connection. Do not free this string, it is owned by
20617  * @connection.
20618  *
20619  * Returns: The unique name or %NULL if @connection is not a message
20620  * Since: 2.26
20621  */
20622
20623
20624 /**
20625  * g_dbus_connection_is_closed:
20626  * @connection: A #GDBusConnection.
20627  *
20628  * Gets whether @connection is closed.
20629  *
20630  * Returns: %TRUE if the connection is closed, %FALSE otherwise.
20631  * Since: 2.26
20632  */
20633
20634
20635 /**
20636  * g_dbus_connection_new:
20637  * @stream: A #GIOStream.
20638  * @guid: (allow-none): The GUID to use if a authenticating as a server or %NULL.
20639  * @flags: Flags describing how to make the connection.
20640  * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
20641  * @cancellable: A #GCancellable or %NULL.
20642  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
20643  * @user_data: The data to pass to @callback.
20644  *
20645  * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
20646  * with the end represented by @stream.
20647  *
20648  * If @stream is a #GSocketConnection, then the corresponding #GSocket
20649  * will be put into non-blocking mode.
20650  *
20651  * The D-Bus connection will interact with @stream from a worker thread.
20652  * As a result, the caller should not interact with @stream after this
20653  * method has been called, except by calling g_object_unref() on it.
20654  *
20655  * If @observer is not %NULL it may be used to control the
20656  * authentication process.
20657  *
20658  * When the operation is finished, @callback will be invoked. You can
20659  * then call g_dbus_connection_new_finish() to get the result of the
20660  * operation.
20661  *
20662  * This is a asynchronous failable constructor. See
20663  * g_dbus_connection_new_sync() for the synchronous
20664  * version.
20665  *
20666  * Since: 2.26
20667  */
20668
20669
20670 /**
20671  * g_dbus_connection_new_finish:
20672  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
20673  * @error: Return location for error or %NULL.
20674  *
20675  * Finishes an operation started with g_dbus_connection_new().
20676  *
20677  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
20678  * Since: 2.26
20679  */
20680
20681
20682 /**
20683  * g_dbus_connection_new_for_address:
20684  * @address: A D-Bus address.
20685  * @flags: Flags describing how to make the connection.
20686  * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
20687  * @cancellable: A #GCancellable or %NULL.
20688  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
20689  * @user_data: The data to pass to @callback.
20690  *
20691  * Asynchronously connects and sets up a D-Bus client connection for
20692  * exchanging D-Bus messages with an endpoint specified by @address
20693  * which must be in the D-Bus address format.
20694  *
20695  * This constructor can only be used to initiate client-side
20696  * connections - use g_dbus_connection_new() if you need to act as the
20697  * server. In particular, @flags cannot contain the
20698  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
20699  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
20700  *
20701  * When the operation is finished, @callback will be invoked. You can
20702  * then call g_dbus_connection_new_finish() to get the result of the
20703  * operation.
20704  *
20705  * If @observer is not %NULL it may be used to control the
20706  * authentication process.
20707  *
20708  * This is a asynchronous failable constructor. See
20709  * g_dbus_connection_new_for_address_sync() for the synchronous
20710  * version.
20711  *
20712  * Since: 2.26
20713  */
20714
20715
20716 /**
20717  * g_dbus_connection_new_for_address_finish:
20718  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
20719  * @error: Return location for error or %NULL.
20720  *
20721  * Finishes an operation started with g_dbus_connection_new_for_address().
20722  *
20723  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
20724  * Since: 2.26
20725  */
20726
20727
20728 /**
20729  * g_dbus_connection_new_for_address_sync:
20730  * @address: A D-Bus address.
20731  * @flags: Flags describing how to make the connection.
20732  * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
20733  * @cancellable: A #GCancellable or %NULL.
20734  * @error: Return location for error or %NULL.
20735  *
20736  * Synchronously connects and sets up a D-Bus client connection for
20737  * exchanging D-Bus messages with an endpoint specified by @address
20738  * which must be in the D-Bus address format.
20739  *
20740  * This constructor can only be used to initiate client-side
20741  * connections - use g_dbus_connection_new_sync() if you need to act
20742  * as the server. In particular, @flags cannot contain the
20743  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
20744  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
20745  *
20746  * This is a synchronous failable constructor. See
20747  * g_dbus_connection_new_for_address() for the asynchronous version.
20748  *
20749  * If @observer is not %NULL it may be used to control the
20750  * authentication process.
20751  *
20752  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
20753  * Since: 2.26
20754  */
20755
20756
20757 /**
20758  * g_dbus_connection_new_sync:
20759  * @stream: A #GIOStream.
20760  * @guid: (allow-none): The GUID to use if a authenticating as a server or %NULL.
20761  * @flags: Flags describing how to make the connection.
20762  * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
20763  * @cancellable: A #GCancellable or %NULL.
20764  * @error: Return location for error or %NULL.
20765  *
20766  * Synchronously sets up a D-Bus connection for exchanging D-Bus messages
20767  * with the end represented by @stream.
20768  *
20769  * If @stream is a #GSocketConnection, then the corresponding #GSocket
20770  * will be put into non-blocking mode.
20771  *
20772  * The D-Bus connection will interact with @stream from a worker thread.
20773  * As a result, the caller should not interact with @stream after this
20774  * method has been called, except by calling g_object_unref() on it.
20775  *
20776  * If @observer is not %NULL it may be used to control the
20777  * authentication process.
20778  *
20779  * This is a synchronous failable constructor. See
20780  * g_dbus_connection_new() for the asynchronous version.
20781  *
20782  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
20783  * Since: 2.26
20784  */
20785
20786
20787 /**
20788  * g_dbus_connection_register_object:
20789  * @connection: A #GDBusConnection.
20790  * @object_path: The object path to register at.
20791  * @interface_info: Introspection data for the interface.
20792  * @vtable: (allow-none): A #GDBusInterfaceVTable to call into or %NULL.
20793  * @user_data: (allow-none): Data to pass to functions in @vtable.
20794  * @user_data_free_func: Function to call when the object path is unregistered.
20795  * @error: Return location for error or %NULL.
20796  *
20797  * Registers callbacks for exported objects at @object_path with the
20798  * D-Bus interface that is described in @interface_info.
20799  *
20800  * Calls to functions in @vtable (and @user_data_free_func) will
20801  * happen in the <link linkend="g-main-context-push-thread-default">thread-default main
20802  * loop</link> of the thread you are calling this method from.
20803  *
20804  * Note that all #GVariant values passed to functions in @vtable will match
20805  * the signature given in @interface_info - if a remote caller passes
20806  * incorrect values, the <literal>org.freedesktop.DBus.Error.InvalidArgs</literal>
20807  * is returned to the remote caller.
20808  *
20809  * Additionally, if the remote caller attempts to invoke methods or
20810  * access properties not mentioned in @interface_info the
20811  * <literal>org.freedesktop.DBus.Error.UnknownMethod</literal> resp.
20812  * <literal>org.freedesktop.DBus.Error.InvalidArgs</literal> errors
20813  * are returned to the caller.
20814  *
20815  * It is considered a programming error if the
20816  * #GDBusInterfaceGetPropertyFunc function in @vtable returns a
20817  * #GVariant of incorrect type.
20818  *
20819  * If an existing callback is already registered at @object_path and
20820  * @interface_name, then @error is set to #G_IO_ERROR_EXISTS.
20821  *
20822  * GDBus automatically implements the standard D-Bus interfaces
20823  * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
20824  * and org.freedesktop.Peer, so you don't have to implement those for
20825  * the objects you export. You <emphasis>can</emphasis> implement
20826  * org.freedesktop.DBus.Properties yourself, e.g. to handle getting
20827  * and setting of properties asynchronously.
20828  *
20829  * Note that the reference count on @interface_info will be
20830  * incremented by 1 (unless allocated statically, e.g. if the
20831  * reference count is -1, see g_dbus_interface_info_ref()) for as long
20832  * as the object is exported. Also note that @vtable will be copied.
20833  *
20834  * See <xref linkend="gdbus-server"/> for an example of how to use this method.
20835  *
20836  * that can be used with g_dbus_connection_unregister_object() .
20837  *
20838  * Returns: 0 if @error is set, otherwise a registration id (never 0)
20839  * Since: 2.26
20840  */
20841
20842
20843 /**
20844  * g_dbus_connection_register_subtree:
20845  * @connection: A #GDBusConnection.
20846  * @object_path: The object path to register the subtree at.
20847  * @vtable: A #GDBusSubtreeVTable to enumerate, introspect and dispatch nodes in the subtree.
20848  * @flags: Flags used to fine tune the behavior of the subtree.
20849  * @user_data: Data to pass to functions in @vtable.
20850  * @user_data_free_func: Function to call when the subtree is unregistered.
20851  * @error: Return location for error or %NULL.
20852  *
20853  * Registers a whole subtree of <quote>dynamic</quote> objects.
20854  *
20855  * The @enumerate and @introspection functions in @vtable are used to
20856  * convey, to remote callers, what nodes exist in the subtree rooted
20857  * by @object_path.
20858  *
20859  * When handling remote calls into any node in the subtree, first the
20860  * @enumerate function is used to check if the node exists. If the node exists
20861  * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set
20862  * the @introspection function is used to check if the node supports the
20863  * requested method. If so, the @dispatch function is used to determine
20864  * where to dispatch the call. The collected #GDBusInterfaceVTable and
20865  * #gpointer will be used to call into the interface vtable for processing
20866  * the request.
20867  *
20868  * All calls into user-provided code will be invoked in the <link
20869  * linkend="g-main-context-push-thread-default">thread-default main
20870  * loop</link> of the thread you are calling this method from.
20871  *
20872  * If an existing subtree is already registered at @object_path or
20873  * then @error is set to #G_IO_ERROR_EXISTS.
20874  *
20875  * Note that it is valid to register regular objects (using
20876  * g_dbus_connection_register_object()) in a subtree registered with
20877  * g_dbus_connection_register_subtree() - if so, the subtree handler
20878  * is tried as the last resort. One way to think about a subtree
20879  * handler is to consider it a <quote>fallback handler</quote>
20880  * for object paths not registered via g_dbus_connection_register_object()
20881  * or other bindings.
20882  *
20883  * Note that @vtable will be copied so you cannot change it after
20884  * registration.
20885  *
20886  * See <xref linkend="gdbus-subtree-server"/> for an example of how to use this method.
20887  *
20888  * that can be used with g_dbus_connection_unregister_subtree() .
20889  *
20890  * Returns: 0 if @error is set, otherwise a subtree registration id (never 0)
20891  * Since: 2.26
20892  */
20893
20894
20895 /**
20896  * g_dbus_connection_remove_filter:
20897  * @connection: a #GDBusConnection
20898  * @filter_id: an identifier obtained from g_dbus_connection_add_filter()
20899  *
20900  * Removes a filter.
20901  *
20902  * Since: 2.26
20903  */
20904
20905
20906 /**
20907  * g_dbus_connection_send_message:
20908  * @connection: A #GDBusConnection.
20909  * @message: A #GDBusMessage
20910  * @flags: Flags affecting how the message is sent.
20911  * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
20912  * @error: Return location for error or %NULL.
20913  *
20914  * Asynchronously sends @message to the peer represented by @connection.
20915  *
20916  * Unless @flags contain the
20917  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
20918  * will be assigned by @connection and set on @message via
20919  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
20920  * serial number used will be written to this location prior to
20921  * submitting the message to the underlying transport.
20922  *
20923  * If @connection is closed then the operation will fail with
20924  * %G_IO_ERROR_CLOSED. If @message is not well-formed,
20925  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
20926  *
20927  * See <xref linkend="gdbus-server"/> and <xref
20928  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
20929  * low-level API to send and receive UNIX file descriptors.
20930  *
20931  * Note that @message must be unlocked, unless @flags contain the
20932  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
20933  *
20934  * transmission, %FALSE if @error is set.
20935  *
20936  * Returns: %TRUE if the message was well-formed and queued for
20937  * Since: 2.26
20938  */
20939
20940
20941 /**
20942  * g_dbus_connection_send_message_with_reply:
20943  * @connection: A #GDBusConnection.
20944  * @message: A #GDBusMessage.
20945  * @flags: Flags affecting how the message is sent.
20946  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
20947  * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
20948  * @cancellable: A #GCancellable or %NULL.
20949  * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
20950  * @user_data: The data to pass to @callback.
20951  *
20952  * Asynchronously sends @message to the peer represented by @connection.
20953  *
20954  * Unless @flags contain the
20955  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
20956  * will be assigned by @connection and set on @message via
20957  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
20958  * serial number used will be written to this location prior to
20959  * submitting the message to the underlying transport.
20960  *
20961  * If @connection is closed then the operation will fail with
20962  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
20963  * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
20964  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
20965  *
20966  * This is an asynchronous method. When the operation is finished, @callback will be invoked
20967  * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
20968  * of the thread you are calling this method from. You can then call
20969  * g_dbus_connection_send_message_with_reply_finish() to get the result of the operation.
20970  * See g_dbus_connection_send_message_with_reply_sync() for the synchronous version.
20971  *
20972  * Note that @message must be unlocked, unless @flags contain the
20973  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
20974  *
20975  * See <xref linkend="gdbus-server"/> and <xref
20976  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
20977  * low-level API to send and receive UNIX file descriptors.
20978  *
20979  * Since: 2.26
20980  */
20981
20982
20983 /**
20984  * g_dbus_connection_send_message_with_reply_finish:
20985  * @connection: a #GDBusConnection
20986  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_send_message_with_reply().
20987  * @error: Return location for error or %NULL.
20988  *
20989  * Finishes an operation started with g_dbus_connection_send_message_with_reply().
20990  *
20991  * Note that @error is only set if a local in-process error
20992  * occurred. That is to say that the returned #GDBusMessage object may
20993  * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
20994  * g_dbus_message_to_gerror() to transcode this to a #GError.
20995  *
20996  * See <xref linkend="gdbus-server"/> and <xref
20997  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
20998  * low-level API to send and receive UNIX file descriptors.
20999  *
21000  * Returns: (transfer full): A locked #GDBusMessage or %NULL if @error is set.
21001  * Since: 2.26
21002  */
21003
21004
21005 /**
21006  * g_dbus_connection_send_message_with_reply_sync:
21007  * @connection: A #GDBusConnection.
21008  * @message: A #GDBusMessage.
21009  * @flags: Flags affecting how the message is sent.
21010  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
21011  * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
21012  * @cancellable: A #GCancellable or %NULL.
21013  * @error: Return location for error or %NULL.
21014  *
21015  * Synchronously sends @message to the peer represented by @connection
21016  * and blocks the calling thread until a reply is received or the
21017  * timeout is reached. See g_dbus_connection_send_message_with_reply()
21018  * for the asynchronous version of this method.
21019  *
21020  * Unless @flags contain the
21021  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
21022  * will be assigned by @connection and set on @message via
21023  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
21024  * serial number used will be written to this location prior to
21025  * submitting the message to the underlying transport.
21026  *
21027  * If @connection is closed then the operation will fail with
21028  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
21029  * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
21030  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
21031  *
21032  * Note that @error is only set if a local in-process error
21033  * occurred. That is to say that the returned #GDBusMessage object may
21034  * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
21035  * g_dbus_message_to_gerror() to transcode this to a #GError.
21036  *
21037  * See <xref linkend="gdbus-server"/> and <xref
21038  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
21039  * low-level API to send and receive UNIX file descriptors.
21040  *
21041  * Note that @message must be unlocked, unless @flags contain the
21042  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
21043  *
21044  * Returns: (transfer full): A locked #GDBusMessage that is the reply to @message or %NULL if @error is set.
21045  * Since: 2.26
21046  */
21047
21048
21049 /**
21050  * g_dbus_connection_set_exit_on_close:
21051  * @connection: A #GDBusConnection.
21052  * @exit_on_close: Whether the process should be terminated when @connection is closed by the remote peer.
21053  *
21054  * Sets whether the process should be terminated when @connection is
21055  * closed by the remote peer. See #GDBusConnection:exit-on-close for
21056  * more details.
21057  *
21058  * Note that this function should be used with care. Most modern UNIX
21059  * desktops tie the notion of a user session the session bus, and expect
21060  * all of a users applications to quit when their bus connection goes away.
21061  * If you are setting @exit_on_close to %FALSE for the shared session
21062  * bus connection, you should make sure that your application exits
21063  * when the user session ends.
21064  *
21065  * Since: 2.26
21066  */
21067
21068
21069 /**
21070  * g_dbus_connection_signal_subscribe:
21071  * @connection: A #GDBusConnection.
21072  * @sender: (allow-none): Sender name to match on (unique or well-known name) or %NULL to listen from all senders.
21073  * @interface_name: (allow-none): D-Bus interface name to match on or %NULL to match on all interfaces.
21074  * @member: (allow-none): D-Bus signal name to match on or %NULL to match on all signals.
21075  * @object_path: (allow-none): Object path to match on or %NULL to match on all object paths.
21076  * @arg0: (allow-none): Contents of first string argument to match on or %NULL to match on all kinds of arguments.
21077  * @flags: Flags describing how to subscribe to the signal (currently unused).
21078  * @callback: Callback to invoke when there is a signal matching the requested data.
21079  * @user_data: User data to pass to @callback.
21080  * @user_data_free_func: (allow-none): Function to free @user_data with when subscription is removed or %NULL.
21081  *
21082  * Subscribes to signals on @connection and invokes @callback with a
21083  * whenever the signal is received. Note that @callback
21084  * will be invoked in the <link
21085  * linkend="g-main-context-push-thread-default">thread-default main
21086  * loop</link> of the thread you are calling this method from.
21087  *
21088  * If @connection is not a message bus connection, @sender must be
21089  * %NULL.
21090  *
21091  * If @sender is a well-known name note that @callback is invoked with
21092  * the unique name for the owner of @sender, not the well-known name
21093  * as one would expect. This is because the message bus rewrites the
21094  * name. As such, to avoid certain race conditions, users should be
21095  * tracking the name owner of the well-known name and use that when
21096  * processing the received signal.
21097  *
21098  * Returns: A subscription identifier that can be used with g_dbus_connection_signal_unsubscribe().
21099  * Since: 2.26
21100  */
21101
21102
21103 /**
21104  * g_dbus_connection_signal_unsubscribe:
21105  * @connection: A #GDBusConnection.
21106  * @subscription_id: A subscription id obtained from g_dbus_connection_signal_subscribe().
21107  *
21108  * Unsubscribes from signals.
21109  *
21110  * Since: 2.26
21111  */
21112
21113
21114 /**
21115  * g_dbus_connection_start_message_processing:
21116  * @connection: A #GDBusConnection.
21117  *
21118  * If @connection was created with
21119  * %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method
21120  * starts processing messages. Does nothing on if @connection wasn't
21121  * created with this flag or if the method has already been called.
21122  *
21123  * Since: 2.26
21124  */
21125
21126
21127 /**
21128  * g_dbus_connection_unexport_action_group:
21129  * @connection: a #GDBusConnection
21130  * @export_id: the ID from g_dbus_connection_export_action_group()
21131  *
21132  * Reverses the effect of a previous call to
21133  * g_dbus_connection_export_action_group().
21134  *
21135  * It is an error to call this function with an ID that wasn't returned
21136  * from g_dbus_connection_export_action_group() or to call it with the
21137  * same ID more than once.
21138  *
21139  * Since: 2.32
21140  */
21141
21142
21143 /**
21144  * g_dbus_connection_unexport_menu_model:
21145  * @connection: a #GDBusConnection
21146  * @export_id: the ID from g_dbus_connection_export_menu_model()
21147  *
21148  * Reverses the effect of a previous call to
21149  * g_dbus_connection_export_menu_model().
21150  *
21151  * It is an error to call this function with an ID that wasn't returned
21152  * from g_dbus_connection_export_menu_model() or to call it with the
21153  * same ID more than once.
21154  *
21155  * Since: 2.32
21156  */
21157
21158
21159 /**
21160  * g_dbus_connection_unregister_object:
21161  * @connection: A #GDBusConnection.
21162  * @registration_id: A registration id obtained from g_dbus_connection_register_object().
21163  *
21164  * Unregisters an object.
21165  *
21166  * Returns: %TRUE if the object was unregistered, %FALSE otherwise.
21167  * Since: 2.26
21168  */
21169
21170
21171 /**
21172  * g_dbus_connection_unregister_subtree:
21173  * @connection: A #GDBusConnection.
21174  * @registration_id: A subtree registration id obtained from g_dbus_connection_register_subtree().
21175  *
21176  * Unregisters a subtree.
21177  *
21178  * Returns: %TRUE if the subtree was unregistered, %FALSE otherwise.
21179  * Since: 2.26
21180  */
21181
21182
21183 /**
21184  * g_dbus_error_encode_gerror:
21185  * @error: A #GError.
21186  *
21187  * Creates a D-Bus error name to use for @error. If @error matches
21188  * a registered error (cf. g_dbus_error_register_error()), the corresponding
21189  * D-Bus error name will be returned.
21190  *
21191  * Otherwise the a name of the form
21192  * <literal>org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE</literal>
21193  * will be used. This allows other GDBus applications to map the error
21194  * on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
21195  *
21196  * This function is typically only used in object mappings to put a
21197  * #GError on the wire. Regular applications should not use it.
21198  *
21199  * Returns: A D-Bus error name (never %NULL). Free with g_free().
21200  * Since: 2.26
21201  */
21202
21203
21204 /**
21205  * g_dbus_error_get_remote_error:
21206  * @error: A #GError.
21207  *
21208  * Gets the D-Bus error name used for @error, if any.
21209  *
21210  * This function is guaranteed to return a D-Bus error name for all
21211  * #GError<!-- -->s returned from functions handling remote method
21212  * calls (e.g. g_dbus_connection_call_finish()) unless
21213  * g_dbus_error_strip_remote_error() has been used on @error.
21214  *
21215  * Returns: An allocated string or %NULL if the D-Bus error name could not be found. Free with g_free().
21216  * Since: 2.26
21217  */
21218
21219
21220 /**
21221  * g_dbus_error_is_remote_error:
21222  * @error: A #GError.
21223  *
21224  * Checks if @error represents an error received via D-Bus from a remote peer. If so,
21225  * use g_dbus_error_get_remote_error() to get the name of the error.
21226  *
21227  * %FALSE otherwise.
21228  *
21229  * Returns: %TRUE if @error represents an error from a remote peer,
21230  * Since: 2.26
21231  */
21232
21233
21234 /**
21235  * g_dbus_error_new_for_dbus_error:
21236  * @dbus_error_name: D-Bus error name.
21237  * @dbus_error_message: D-Bus error message.
21238  *
21239  * Creates a #GError based on the contents of @dbus_error_name and
21240  * @dbus_error_message.
21241  *
21242  * Errors registered with g_dbus_error_register_error() will be looked
21243  * up using @dbus_error_name and if a match is found, the error domain
21244  * and code is used. Applications can use g_dbus_error_get_remote_error()
21245  * to recover @dbus_error_name.
21246  *
21247  * If a match against a registered error is not found and the D-Bus
21248  * error name is in a form as returned by g_dbus_error_encode_gerror()
21249  * the error domain and code encoded in the name is used to
21250  * create the #GError. Also, @dbus_error_name is added to the error message
21251  * such that it can be recovered with g_dbus_error_get_remote_error().
21252  *
21253  * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR
21254  * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is
21255  * added to the error message such that it can be recovered with
21256  * g_dbus_error_get_remote_error().
21257  *
21258  * In all three cases, @dbus_error_name can always be recovered from the
21259  * returned #GError using the g_dbus_error_get_remote_error() function
21260  * (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
21261  *
21262  * This function is typically only used in object mappings to prepare
21263  * #GError instances for applications. Regular applications should not use
21264  * it.
21265  *
21266  * Returns: An allocated #GError. Free with g_error_free().
21267  * Since: 2.26
21268  */
21269
21270
21271 /**
21272  * g_dbus_error_register_error:
21273  * @error_domain: A #GQuark for a error domain.
21274  * @error_code: An error code.
21275  * @dbus_error_name: A D-Bus error name.
21276  *
21277  * Creates an association to map between @dbus_error_name and
21278  * #GError<!-- -->s specified by @error_domain and @error_code.
21279  *
21280  * This is typically done in the routine that returns the #GQuark for
21281  * an error domain.
21282  *
21283  * exists.
21284  *
21285  * Returns: %TRUE if the association was created, %FALSE if it already
21286  * Since: 2.26
21287  */
21288
21289
21290 /**
21291  * g_dbus_error_register_error_domain:
21292  * @error_domain_quark_name: The error domain name.
21293  * @quark_volatile: A pointer where to store the #GQuark.
21294  * @entries: A pointer to @num_entries #GDBusErrorEntry struct items.
21295  * @num_entries: Number of items to register.
21296  *
21297  * Helper function for associating a #GError error domain with D-Bus error names.
21298  *
21299  * Since: 2.26
21300  */
21301
21302
21303 /**
21304  * g_dbus_error_set_dbus_error:
21305  * @error: A pointer to a #GError or %NULL.
21306  * @dbus_error_name: D-Bus error name.
21307  * @dbus_error_message: D-Bus error message.
21308  * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
21309  * @...: Arguments for @format.
21310  *
21311  * Does nothing if @error is %NULL. Otherwise sets *@error to
21312  * a new #GError created with g_dbus_error_new_for_dbus_error()
21313  * with @dbus_error_message prepend with @format (unless %NULL).
21314  *
21315  * Since: 2.26
21316  */
21317
21318
21319 /**
21320  * g_dbus_error_set_dbus_error_valist:
21321  * @error: A pointer to a #GError or %NULL.
21322  * @dbus_error_name: D-Bus error name.
21323  * @dbus_error_message: D-Bus error message.
21324  * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
21325  * @var_args: Arguments for @format.
21326  *
21327  * Like g_dbus_error_set_dbus_error() but intended for language bindings.
21328  *
21329  * Since: 2.26
21330  */
21331
21332
21333 /**
21334  * g_dbus_error_strip_remote_error:
21335  * @error: A #GError.
21336  *
21337  * Looks for extra information in the error message used to recover
21338  * the D-Bus error name and strips it if found. If stripped, the
21339  * message field in @error will correspond exactly to what was
21340  * received on the wire.
21341  *
21342  * This is typically used when presenting errors to the end user.
21343  *
21344  * Returns: %TRUE if information was stripped, %FALSE otherwise.
21345  * Since: 2.26
21346  */
21347
21348
21349 /**
21350  * g_dbus_error_unregister_error:
21351  * @error_domain: A #GQuark for a error domain.
21352  * @error_code: An error code.
21353  * @dbus_error_name: A D-Bus error name.
21354  *
21355  * Destroys an association previously set up with g_dbus_error_register_error().
21356  *
21357  * Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found.
21358  * Since: 2.26
21359  */
21360
21361
21362 /**
21363  * g_dbus_generate_guid:
21364  *
21365  * Generate a D-Bus GUID that can be used with
21366  * e.g. g_dbus_connection_new().
21367  *
21368  * See the D-Bus specification regarding what strings are valid D-Bus
21369  * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
21370  *
21371  * Returns: A valid D-Bus GUID. Free with g_free().
21372  * Since: 2.26
21373  */
21374
21375
21376 /**
21377  * g_dbus_gvalue_to_gvariant:
21378  * @gvalue: A #GValue to convert to a #GVariant.
21379  * @type: A #GVariantType.
21380  *
21381  * Converts a #GValue to a #GVariant of the type indicated by the @type parameter.
21382  *
21383  * The conversion is using the following rules:
21384  * <table frame='all'>
21385  * <title>#GValue / #GVariant conversion rules</title>
21386  * <tgroup cols='2' align='left' colsep='1' rowsep='1'>
21387  * <thead>
21388  * <row>
21389  * <entry>If the #GType for @gvalue is...</entry>
21390  * <entry>... then @type must be</entry>
21391  * </row>
21392  * </thead>
21393  * <tbody>
21394  * <row>
21395  * <entry>#G_TYPE_STRING</entry>
21396  * <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>
21397  * </row>
21398  * <row>
21399  * <entry>#G_TYPE_STRV</entry>
21400  * <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>
21401  * </row>
21402  * <row>
21403  * <entry>#G_TYPE_BOOLEAN</entry>
21404  * <entry><link linkend="G-VARIANT-TYPE-BOOLEAN:CAPS">'b'</link></entry>
21405  * </row>
21406  * <row>
21407  * <entry>#G_TYPE_UCHAR</entry>
21408  * <entry><link linkend="G-VARIANT-TYPE-BYTE:CAPS">'y'</link></entry>
21409  * </row>
21410  * <row>
21411  * <entry>#G_TYPE_INT</entry>
21412  * <entry><link linkend="G-VARIANT-TYPE-INT32:CAPS">'i'</link> or <link linkend="G-VARIANT-TYPE-INT16:CAPS">'n'</link></entry>
21413  * </row>
21414  * <row>
21415  * <entry>#G_TYPE_UINT</entry>
21416  * <entry><link linkend="G-VARIANT-TYPE-UINT32:CAPS">'u'</link> or <link linkend="G-VARIANT-TYPE-UINT16:CAPS">'q'</link></entry>
21417  * </row>
21418  * <row>
21419  * <entry>#G_TYPE_INT64</entry>
21420  * <entry><link linkend="G-VARIANT-TYPE-INT64:CAPS">'x'</link></entry>
21421  * </row>
21422  * <row>
21423  * <entry>#G_TYPE_UINT64</entry>
21424  * <entry><link linkend="G-VARIANT-TYPE-UINT64:CAPS">'t'</link></entry>
21425  * </row>
21426  * <row>
21427  * <entry>#G_TYPE_DOUBLE</entry>
21428  * <entry><link linkend="G-VARIANT-TYPE-DOUBLE:CAPS">'d'</link></entry>
21429  * </row>
21430  * <row>
21431  * <entry>#G_TYPE_VARIANT</entry>
21432  * <entry>Any #GVariantType</entry>
21433  * </row>
21434  * </tbody>
21435  * </tgroup>
21436  * </table>
21437  * This can fail if e.g. @gvalue is of type #G_TYPE_STRING and @type
21438  * is <link linkend="G-VARIANT-TYPE-INT32:CAPS">'i'</link>. It will
21439  * also fail for any #GType (including e.g. #G_TYPE_OBJECT and
21440  * #G_TYPE_BOXED derived-types) not in the table above.
21441  *
21442  * Note that if @gvalue is of type #G_TYPE_VARIANT and its value is
21443  * %NULL, the <emphasis>empty</emphasis> #GVariant instance (never
21444  * %NULL) for @type is returned (e.g. 0 for scalar types, the empty
21445  * string for string types, <literal>'/'</literal> for object path
21446  * types, the empty array for any array type and so on).
21447  *
21448  * See the g_dbus_gvariant_to_gvalue() function for how to convert a
21449  * #GVariant to a #GValue.
21450  *
21451  * @type holding the data from @gvalue or %NULL in case of
21452  * failure. Free with g_variant_unref().
21453  *
21454  * Returns: A #GVariant (never floating) of #GVariantType
21455  * Since: 2.30
21456  */
21457
21458
21459 /**
21460  * g_dbus_gvariant_to_gvalue:
21461  * @value: A #GVariant.
21462  * @out_gvalue: Return location pointing to a zero-filled (uninitialized) #GValue.
21463  *
21464  * Converts a #GVariant to a #GValue. If @value is floating, it is consumed.
21465  *
21466  * The rules specified in the g_dbus_gvalue_to_gvariant() function are
21467  * used - this function is essentially its reverse form.
21468  *
21469  * The conversion never fails - a valid #GValue is always returned in
21470  * @out_gvalue.
21471  *
21472  * Since: 2.30
21473  */
21474
21475
21476 /**
21477  * g_dbus_interface_dup_object:
21478  * @interface_: An exported D-Bus interface.
21479  *
21480  * Gets the #GDBusObject that @interface_ belongs to, if any.
21481  *
21482  * reference should be freed with g_object_unref().
21483  *
21484  * Returns: (transfer full): A #GDBusObject or %NULL. The returned
21485  * Since: 2.32
21486  * Rename to: g_dbus_interface_get_object
21487  */
21488
21489
21490 /**
21491  * g_dbus_interface_get_info:
21492  * @interface_: An exported D-Bus interface.
21493  *
21494  * Gets D-Bus introspection information for the D-Bus interface
21495  * implemented by @interface_.
21496  *
21497  * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
21498  * Since: 2.30
21499  */
21500
21501
21502 /**
21503  * g_dbus_interface_get_object: (skip)
21504  * @interface_: An exported D-Bus interface.
21505  *
21506  * Gets the #GDBusObject that @interface_ belongs to, if any.
21507  *
21508  * <warning>It is not safe to use the returned object if @interface_
21509  * or the returned object is being used from other threads. See
21510  * g_dbus_interface_dup_object() for a thread-safe
21511  * alternative.</warning>
21512  *
21513  * reference belongs to @interface_ and should not be freed.
21514  *
21515  * Returns: (transfer none): A #GDBusObject or %NULL. The returned
21516  * Since: 2.30
21517  */
21518
21519
21520 /**
21521  * g_dbus_interface_info_cache_build:
21522  * @info: A #GDBusInterfaceInfo.
21523  *
21524  * Builds a lookup-cache to speed up
21525  * g_dbus_interface_info_lookup_method(),
21526  * g_dbus_interface_info_lookup_signal() and
21527  * g_dbus_interface_info_lookup_property().
21528  *
21529  * If this has already been called with @info, the existing cache is
21530  * used and its use count is increased.
21531  *
21532  * Note that @info cannot be modified until
21533  * g_dbus_interface_info_cache_release() is called.
21534  *
21535  * Since: 2.30
21536  */
21537
21538
21539 /**
21540  * g_dbus_interface_info_cache_release:
21541  * @info: A GDBusInterfaceInfo
21542  *
21543  * Decrements the usage count for the cache for @info built by
21544  * g_dbus_interface_info_cache_build() (if any) and frees the
21545  * resources used by the cache if the usage count drops to zero.
21546  *
21547  * Since: 2.30
21548  */
21549
21550
21551 /**
21552  * g_dbus_interface_info_generate_xml:
21553  * @info: A #GDBusNodeInfo
21554  * @indent: Indentation level.
21555  * @string_builder: (out): A #GString to to append XML data to.
21556  *
21557  * Appends an XML representation of @info (and its children) to @string_builder.
21558  *
21559  * This function is typically used for generating introspection XML
21560  * documents at run-time for handling the
21561  * <literal>org.freedesktop.DBus.Introspectable.Introspect</literal>
21562  * method.
21563  *
21564  * Since: 2.26
21565  */
21566
21567
21568 /**
21569  * g_dbus_interface_info_lookup_method:
21570  * @info: A #GDBusInterfaceInfo.
21571  * @name: A D-Bus method name (typically in CamelCase)
21572  *
21573  * Looks up information about a method.
21574  *
21575  * This cost of this function is O(n) in number of methods unless
21576  * g_dbus_interface_info_cache_build() has been used on @info.
21577  *
21578  * Returns: (transfer none): A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info.
21579  * Since: 2.26
21580  */
21581
21582
21583 /**
21584  * g_dbus_interface_info_lookup_property:
21585  * @info: A #GDBusInterfaceInfo.
21586  * @name: A D-Bus property name (typically in CamelCase).
21587  *
21588  * Looks up information about a property.
21589  *
21590  * This cost of this function is O(n) in number of properties unless
21591  * g_dbus_interface_info_cache_build() has been used on @info.
21592  *
21593  * Returns: (transfer none): A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info.
21594  * Since: 2.26
21595  */
21596
21597
21598 /**
21599  * g_dbus_interface_info_lookup_signal:
21600  * @info: A #GDBusInterfaceInfo.
21601  * @name: A D-Bus signal name (typically in CamelCase)
21602  *
21603  * Looks up information about a signal.
21604  *
21605  * This cost of this function is O(n) in number of signals unless
21606  * g_dbus_interface_info_cache_build() has been used on @info.
21607  *
21608  * Returns: (transfer none): A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info.
21609  * Since: 2.26
21610  */
21611
21612
21613 /**
21614  * g_dbus_interface_info_ref:
21615  * @info: A #GDBusInterfaceInfo
21616  *
21617  * If @info is statically allocated does nothing. Otherwise increases
21618  * the reference count.
21619  *
21620  * Returns: The same @info.
21621  * Since: 2.26
21622  */
21623
21624
21625 /**
21626  * g_dbus_interface_info_unref:
21627  * @info: A #GDBusInterfaceInfo.
21628  *
21629  * If @info is statically allocated, does nothing. Otherwise decreases
21630  * the reference count of @info. When its reference count drops to 0,
21631  * the memory used is freed.
21632  *
21633  * Since: 2.26
21634  */
21635
21636
21637 /**
21638  * g_dbus_interface_set_object:
21639  * @interface_: An exported D-Bus interface.
21640  * @object: A #GDBusObject or %NULL.
21641  *
21642  * Sets the #GDBusObject for @interface_ to @object.
21643  *
21644  * Note that @interface_ will hold a weak reference to @object.
21645  *
21646  * Since: 2.30
21647  */
21648
21649
21650 /**
21651  * g_dbus_interface_skeleton_export:
21652  * @interface_: The D-Bus interface to export.
21653  * @connection: A #GDBusConnection to export @interface_ on.
21654  * @object_path: The path to export the interface at.
21655  * @error: Return location for error or %NULL.
21656  *
21657  * Exports @interface_ at @object_path on @connection.
21658  *
21659  * This can be called multiple times to export the same @interface_
21660  * onto multiple connections however the @object_path provided must be
21661  * the same for all connections.
21662  *
21663  * Use g_dbus_interface_skeleton_unexport() to unexport the object.
21664  *
21665  * @error set.
21666  *
21667  * Returns: %TRUE if the interface was exported on @connection, otherwise %FALSE with
21668  * Since: 2.30
21669  */
21670
21671
21672 /**
21673  * g_dbus_interface_skeleton_flush:
21674  * @interface_: A #GDBusInterfaceSkeleton.
21675  *
21676  * If @interface_ has outstanding changes, request for these changes to be
21677  * emitted immediately.
21678  *
21679  * For example, an exported D-Bus interface may queue up property
21680  * changes and emit the
21681  * <literal>org.freedesktop.DBus.Properties::PropertiesChanged</literal>
21682  * signal later (e.g. in an idle handler). This technique is useful
21683  * for collapsing multiple property changes into one.
21684  *
21685  * Since: 2.30
21686  */
21687
21688
21689 /**
21690  * g_dbus_interface_skeleton_get_connection:
21691  * @interface_: A #GDBusInterfaceSkeleton.
21692  *
21693  * Gets the first connection that @interface_ is exported on, if any.
21694  *
21695  * not exported anywhere. Do not free, the object belongs to @interface_.
21696  *
21697  * Returns: (transfer none): A #GDBusConnection or %NULL if @interface_ is
21698  * Since: 2.30
21699  */
21700
21701
21702 /**
21703  * g_dbus_interface_skeleton_get_connections:
21704  * @interface_: A #GDBusInterfaceSkeleton.
21705  *
21706  * Gets a list of the connections that @interface_ is exported on.
21707  *
21708  * all the connections that @interface_ is exported on. The returned
21709  * list should be freed with g_list_free() after each element has
21710  * been freed with g_object_unref().
21711  *
21712  * Returns: (element-type GDBusConnection) (transfer full): A list of
21713  * Since: 2.32
21714  */
21715
21716
21717 /**
21718  * g_dbus_interface_skeleton_get_flags:
21719  * @interface_: A #GDBusInterfaceSkeleton.
21720  *
21721  * Gets the #GDBusInterfaceSkeletonFlags that describes what the behavior
21722  * of @interface_
21723  *
21724  * Returns: One or more flags from the #GDBusInterfaceSkeletonFlags enumeration.
21725  * Since: 2.30
21726  */
21727
21728
21729 /**
21730  * g_dbus_interface_skeleton_get_info:
21731  * @interface_: A #GDBusInterfaceSkeleton.
21732  *
21733  * Gets D-Bus introspection information for the D-Bus interface
21734  * implemented by @interface_.
21735  *
21736  * Returns: (transfer none): A #GDBusInterfaceInfo (never %NULL). Do not free.
21737  * Since: 2.30
21738  */
21739
21740
21741 /**
21742  * g_dbus_interface_skeleton_get_object_path:
21743  * @interface_: A #GDBusInterfaceSkeleton.
21744  *
21745  * Gets the object path that @interface_ is exported on, if any.
21746  *
21747  * anywhere. Do not free, the string belongs to @interface_.
21748  *
21749  * Returns: A string owned by @interface_ or %NULL if @interface_ is not exported
21750  * Since: 2.30
21751  */
21752
21753
21754 /**
21755  * g_dbus_interface_skeleton_get_properties:
21756  * @interface_: A #GDBusInterfaceSkeleton.
21757  *
21758  * Gets all D-Bus properties for @interface_.
21759  *
21760  * Returns: (transfer full): A #GVariant of type <link linkend="G-VARIANT-TYPE-VARDICT:CAPS">'a{sv}'</link>. Free with g_variant_unref().
21761  * Since: 2.30
21762  */
21763
21764
21765 /**
21766  * g_dbus_interface_skeleton_get_vtable: (skip)
21767  * @interface_: A #GDBusInterfaceSkeleton.
21768  *
21769  * Gets the interface vtable for the D-Bus interface implemented by
21770  * @interface_. The returned function pointers should expect @interface_
21771  * itself to be passed as @user_data.
21772  *
21773  * Returns: A #GDBusInterfaceVTable (never %NULL).
21774  * Since: 2.30
21775  */
21776
21777
21778 /**
21779  * g_dbus_interface_skeleton_has_connection:
21780  * @interface_: A #GDBusInterfaceSkeleton.
21781  * @connection: A #GDBusConnection.
21782  *
21783  * Checks if @interface_ is export on @connection.
21784  *
21785  * Returns: %TRUE if @interface_ is exported on @connection, %FALSE otherwise.
21786  * Since: 2.32
21787  */
21788
21789
21790 /**
21791  * g_dbus_interface_skeleton_set_flags:
21792  * @interface_: A #GDBusInterfaceSkeleton.
21793  * @flags: Flags from the #GDBusInterfaceSkeletonFlags enumeration.
21794  *
21795  * Sets flags describing what the behavior of @skeleton should be.
21796  *
21797  * Since: 2.30
21798  */
21799
21800
21801 /**
21802  * g_dbus_interface_skeleton_unexport:
21803  * @interface_: A #GDBusInterfaceSkeleton.
21804  *
21805  * Stops exporting @interface_ on all connections it is exported on.
21806  *
21807  * To unexport @interface_ from only a single connection, use
21808  * g_dbus_interface_skeleton_export_from_connection()
21809  *
21810  * Since: 2.30
21811  */
21812
21813
21814 /**
21815  * g_dbus_interface_skeleton_unexport_from_connection:
21816  * @interface_: A #GDBusInterfaceSkeleton.
21817  * @connection: A #GDBusConnection.
21818  *
21819  * Stops exporting @interface_ on @connection.
21820  *
21821  * To stop exporting on all connections the interface is exported on,
21822  * use g_dbus_interface_skeleton_unexport().
21823  *
21824  * Since: 2.32
21825  */
21826
21827
21828 /**
21829  * g_dbus_is_address:
21830  * @string: A string.
21831  *
21832  * Checks if @string is a D-Bus address.
21833  *
21834  * This doesn't check if @string is actually supported by #GDBusServer
21835  * or #GDBusConnection - use g_dbus_is_supported_address() to do more
21836  * checks.
21837  *
21838  * Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise.
21839  * Since: 2.26
21840  */
21841
21842
21843 /**
21844  * g_dbus_is_guid:
21845  * @string: The string to check.
21846  *
21847  * Checks if @string is a D-Bus GUID.
21848  *
21849  * See the D-Bus specification regarding what strings are valid D-Bus
21850  * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
21851  *
21852  * Returns: %TRUE if @string is a guid, %FALSE otherwise.
21853  * Since: 2.26
21854  */
21855
21856
21857 /**
21858  * g_dbus_is_interface_name:
21859  * @string: The string to check.
21860  *
21861  * Checks if @string is a valid D-Bus interface name.
21862  *
21863  * Returns: %TRUE if valid, %FALSE otherwise.
21864  * Since: 2.26
21865  */
21866
21867
21868 /**
21869  * g_dbus_is_member_name:
21870  * @string: The string to check.
21871  *
21872  * Checks if @string is a valid D-Bus member (e.g. signal or method) name.
21873  *
21874  * Returns: %TRUE if valid, %FALSE otherwise.
21875  * Since: 2.26
21876  */
21877
21878
21879 /**
21880  * g_dbus_is_name:
21881  * @string: The string to check.
21882  *
21883  * Checks if @string is a valid D-Bus bus name (either unique or well-known).
21884  *
21885  * Returns: %TRUE if valid, %FALSE otherwise.
21886  * Since: 2.26
21887  */
21888
21889
21890 /**
21891  * g_dbus_is_supported_address:
21892  * @string: A string.
21893  * @error: Return location for error or %NULL.
21894  *
21895  * Like g_dbus_is_address() but also checks if the library suppors the
21896  * transports in @string and that key/value pairs for each transport
21897  * are valid.
21898  *
21899  * supported by this library, %FALSE if @error is set.
21900  *
21901  * Returns: %TRUE if @string is a valid D-Bus address that is
21902  * Since: 2.26
21903  */
21904
21905
21906 /**
21907  * g_dbus_is_unique_name:
21908  * @string: The string to check.
21909  *
21910  * Checks if @string is a valid D-Bus unique bus name.
21911  *
21912  * Returns: %TRUE if valid, %FALSE otherwise.
21913  * Since: 2.26
21914  */
21915
21916
21917 /**
21918  * g_dbus_menu_model_get:
21919  * @connection: a #GDBusConnection
21920  * @bus_name: the bus name which exports the menu model
21921  * @object_path: the object path at which the menu model is exported
21922  *
21923  * Obtains a #GDBusMenuModel for the menu model which is exported
21924  * at the given @bus_name and @object_path.
21925  *
21926  * The thread default main context is taken at the time of this call.
21927  * All signals on the menu model (and any linked models) are reported
21928  * with respect to this context.  All calls on the returned menu model
21929  * (and linked models) must also originate from this same context, with
21930  * the thread default main context unchanged.
21931  *
21932  * g_object_unref().
21933  *
21934  * Returns: (transfer full): a #GDBusMenuModel object. Free with
21935  * Since: 2.32
21936  */
21937
21938
21939 /**
21940  * g_dbus_message_bytes_needed:
21941  * @blob: (array length=blob_len) (element-type guint8): A blob represent a binary D-Bus message.
21942  * @blob_len: The length of @blob (must be at least 16).
21943  * @error: Return location for error or %NULL.
21944  *
21945  * Utility function to calculate how many bytes are needed to
21946  * completely deserialize the D-Bus message stored at @blob.
21947  *
21948  * @blob contains invalid data or not enough data is available to
21949  * determine the size).
21950  *
21951  * Returns: Number of bytes needed or -1 if @error is set (e.g. if
21952  * Since: 2.26
21953  */
21954
21955
21956 /**
21957  * g_dbus_message_copy:
21958  * @message: A #GDBusMessage.
21959  * @error: Return location for error or %NULL.
21960  *
21961  * Copies @message. The copy is a deep copy and the returned
21962  * #GDBusMessage is completely identical except that it is guaranteed
21963  * to not be locked.
21964  *
21965  * This operation can fail if e.g. @message contains file descriptors
21966  * and the per-process or system-wide open files limit is reached.
21967  *
21968  * Free with g_object_unref().
21969  *
21970  * Returns: (transfer full): A new #GDBusMessage or %NULL if @error is set.
21971  * Since: 2.26
21972  */
21973
21974
21975 /**
21976  * g_dbus_message_get_arg0:
21977  * @message: A #GDBusMessage.
21978  *
21979  * Convenience to get the first item in the body of @message.
21980  *
21981  * @message is not a string.
21982  *
21983  * Returns: The string item or %NULL if the first item in the body of
21984  * Since: 2.26
21985  */
21986
21987
21988 /**
21989  * g_dbus_message_get_body:
21990  * @message: A #GDBusMessage.
21991  *
21992  * Gets the body of a message.
21993  *
21994  * Returns: A #GVariant or %NULL if the body is empty. Do not free, it is owned by @message.
21995  * Since: 2.26
21996  */
21997
21998
21999 /**
22000  * g_dbus_message_get_byte_order:
22001  * @message: A #GDBusMessage.
22002  *
22003  * Gets the byte order of @message.
22004  *
22005  * Returns: The byte order.
22006  */
22007
22008
22009 /**
22010  * g_dbus_message_get_destination:
22011  * @message: A #GDBusMessage.
22012  *
22013  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
22014  *
22015  * Returns: The value.
22016  * Since: 2.26
22017  */
22018
22019
22020 /**
22021  * g_dbus_message_get_error_name:
22022  * @message: A #GDBusMessage.
22023  *
22024  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
22025  *
22026  * Returns: The value.
22027  * Since: 2.26
22028  */
22029
22030
22031 /**
22032  * g_dbus_message_get_flags:
22033  * @message: A #GDBusMessage.
22034  *
22035  * Gets the flags for @message.
22036  *
22037  * Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
22038  * Since: 2.26
22039  */
22040
22041
22042 /**
22043  * g_dbus_message_get_header:
22044  * @message: A #GDBusMessage.
22045  * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
22046  *
22047  * Gets a header field on @message.
22048  *
22049  * otherwise. Do not free, it is owned by @message.
22050  *
22051  * Returns: A #GVariant with the value if the header was found, %NULL
22052  * Since: 2.26
22053  */
22054
22055
22056 /**
22057  * g_dbus_message_get_header_fields:
22058  * @message: A #GDBusMessage.
22059  *
22060  * Gets an array of all header fields on @message that are set.
22061  *
22062  * terminated by %G_DBUS_MESSAGE_HEADER_FIELD_INVALID.  Each element
22063  * is a #guchar. Free with g_free().
22064  *
22065  * Returns: (array zero-terminated=1): An array of header fields
22066  * Since: 2.26
22067  */
22068
22069
22070 /**
22071  * g_dbus_message_get_interface:
22072  * @message: A #GDBusMessage.
22073  *
22074  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
22075  *
22076  * Returns: The value.
22077  * Since: 2.26
22078  */
22079
22080
22081 /**
22082  * g_dbus_message_get_locked:
22083  * @message: A #GDBusMessage.
22084  *
22085  * Checks whether @message is locked. To monitor changes to this
22086  * value, conncet to the #GObject::notify signal to listen for changes
22087  * on the #GDBusMessage:locked property.
22088  *
22089  * Returns: %TRUE if @message is locked, %FALSE otherwise.
22090  * Since: 2.26
22091  */
22092
22093
22094 /**
22095  * g_dbus_message_get_member:
22096  * @message: A #GDBusMessage.
22097  *
22098  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
22099  *
22100  * Returns: The value.
22101  * Since: 2.26
22102  */
22103
22104
22105 /**
22106  * g_dbus_message_get_message_type:
22107  * @message: A #GDBusMessage.
22108  *
22109  * Gets the type of @message.
22110  *
22111  * Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
22112  * Since: 2.26
22113  */
22114
22115
22116 /**
22117  * g_dbus_message_get_num_unix_fds:
22118  * @message: A #GDBusMessage.
22119  *
22120  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
22121  *
22122  * Returns: The value.
22123  * Since: 2.26
22124  */
22125
22126
22127 /**
22128  * g_dbus_message_get_path:
22129  * @message: A #GDBusMessage.
22130  *
22131  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
22132  *
22133  * Returns: The value.
22134  * Since: 2.26
22135  */
22136
22137
22138 /**
22139  * g_dbus_message_get_reply_serial:
22140  * @message: A #GDBusMessage.
22141  *
22142  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
22143  *
22144  * Returns: The value.
22145  * Since: 2.26
22146  */
22147
22148
22149 /**
22150  * g_dbus_message_get_sender:
22151  * @message: A #GDBusMessage.
22152  *
22153  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
22154  *
22155  * Returns: The value.
22156  * Since: 2.26
22157  */
22158
22159
22160 /**
22161  * g_dbus_message_get_serial:
22162  * @message: A #GDBusMessage.
22163  *
22164  * Gets the serial for @message.
22165  *
22166  * Returns: A #guint32.
22167  * Since: 2.26
22168  */
22169
22170
22171 /**
22172  * g_dbus_message_get_signature:
22173  * @message: A #GDBusMessage.
22174  *
22175  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
22176  *
22177  * Returns: The value.
22178  * Since: 2.26
22179  */
22180
22181
22182 /**
22183  * g_dbus_message_get_unix_fd_list:
22184  * @message: A #GDBusMessage.
22185  *
22186  * Gets the UNIX file descriptors associated with @message, if any.
22187  *
22188  * This method is only available on UNIX.
22189  *
22190  * associated. Do not free, this object is owned by @message.
22191  *
22192  * Returns: (transfer none): A #GUnixFDList or %NULL if no file descriptors are
22193  * Since: 2.26
22194  */
22195
22196
22197 /**
22198  * g_dbus_message_lock:
22199  * @message: A #GDBusMessage.
22200  *
22201  * If @message is locked, does nothing. Otherwise locks the message.
22202  *
22203  * Since: 2.26
22204  */
22205
22206
22207 /**
22208  * g_dbus_message_new:
22209  *
22210  * Creates a new empty #GDBusMessage.
22211  *
22212  * Returns: A #GDBusMessage. Free with g_object_unref().
22213  * Since: 2.26
22214  */
22215
22216
22217 /**
22218  * g_dbus_message_new_from_blob:
22219  * @blob: (array length=blob_len) (element-type guint8): A blob represent a binary D-Bus message.
22220  * @blob_len: The length of @blob.
22221  * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
22222  * @error: Return location for error or %NULL.
22223  *
22224  * Creates a new #GDBusMessage from the data stored at @blob. The byte
22225  * order that the message was in can be retrieved using
22226  * g_dbus_message_get_byte_order().
22227  *
22228  * g_object_unref().
22229  *
22230  * Returns: A new #GDBusMessage or %NULL if @error is set. Free with
22231  * Since: 2.26
22232  */
22233
22234
22235 /**
22236  * g_dbus_message_new_method_call:
22237  * @name: A valid D-Bus name or %NULL.
22238  * @path: A valid object path.
22239  * @interface_: A valid D-Bus interface name or %NULL.
22240  * @method: A valid method name.
22241  *
22242  * Creates a new #GDBusMessage for a method call.
22243  *
22244  * Returns: A #GDBusMessage. Free with g_object_unref().
22245  * Since: 2.26
22246  */
22247
22248
22249 /**
22250  * g_dbus_message_new_method_error:
22251  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
22252  * @error_name: A valid D-Bus error name.
22253  * @error_message_format: The D-Bus error message in a printf() format.
22254  * @...: Arguments for @error_message_format.
22255  *
22256  * Creates a new #GDBusMessage that is an error reply to @method_call_message.
22257  *
22258  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
22259  * Since: 2.26
22260  */
22261
22262
22263 /**
22264  * g_dbus_message_new_method_error_literal:
22265  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
22266  * @error_name: A valid D-Bus error name.
22267  * @error_message: The D-Bus error message.
22268  *
22269  * Creates a new #GDBusMessage that is an error reply to @method_call_message.
22270  *
22271  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
22272  * Since: 2.26
22273  */
22274
22275
22276 /**
22277  * g_dbus_message_new_method_error_valist:
22278  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
22279  * @error_name: A valid D-Bus error name.
22280  * @error_message_format: The D-Bus error message in a printf() format.
22281  * @var_args: Arguments for @error_message_format.
22282  *
22283  * Like g_dbus_message_new_method_error() but intended for language bindings.
22284  *
22285  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
22286  * Since: 2.26
22287  */
22288
22289
22290 /**
22291  * g_dbus_message_new_method_reply:
22292  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
22293  *
22294  * Creates a new #GDBusMessage that is a reply to @method_call_message.
22295  *
22296  * Returns: (transfer full): #GDBusMessage. Free with g_object_unref().
22297  * Since: 2.26
22298  */
22299
22300
22301 /**
22302  * g_dbus_message_new_signal:
22303  * @path: A valid object path.
22304  * @interface_: A valid D-Bus interface name.
22305  * @signal: A valid signal name.
22306  *
22307  * Creates a new #GDBusMessage for a signal emission.
22308  *
22309  * Returns: A #GDBusMessage. Free with g_object_unref().
22310  * Since: 2.26
22311  */
22312
22313
22314 /**
22315  * g_dbus_message_print:
22316  * @message: A #GDBusMessage.
22317  * @indent: Indentation level.
22318  *
22319  * Produces a human-readable multi-line description of @message.
22320  *
22321  * The contents of the description has no ABI guarantees, the contents
22322  * and formatting is subject to change at any time. Typical output
22323  * looks something like this:
22324  * <programlisting>
22325  * Flags:   none
22326  * Version: 0
22327  * Serial:  4
22328  * Headers:
22329  * path -> objectpath '/org/gtk/GDBus/TestObject'
22330  * interface -> 'org.gtk.GDBus.TestInterface'
22331  * member -> 'GimmeStdout'
22332  * destination -> ':1.146'
22333  * Body: ()
22334  * UNIX File Descriptors:
22335  * (none)
22336  * </programlisting>
22337  * or
22338  * <programlisting>
22339  * Flags:   no-reply-expected
22340  * Version: 0
22341  * Serial:  477
22342  * Headers:
22343  * reply-serial -> uint32 4
22344  * destination -> ':1.159'
22345  * sender -> ':1.146'
22346  * num-unix-fds -> uint32 1
22347  * Body: ()
22348  * UNIX File Descriptors:
22349  * fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
22350  * </programlisting>
22351  *
22352  * Type:    method-return
22353  * Returns: A string that should be freed with g_free().
22354  * Since: 2.26
22355  */
22356
22357
22358 /**
22359  * g_dbus_message_set_body:
22360  * @message: A #GDBusMessage.
22361  * @body: Either %NULL or a #GVariant that is a tuple.
22362  *
22363  * Sets the body @message. As a side-effect the
22364  * %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the
22365  * type string of @body (or cleared if @body is %NULL).
22366  *
22367  * If @body is floating, @message assumes ownership of @body.
22368  *
22369  * Since: 2.26
22370  */
22371
22372
22373 /**
22374  * g_dbus_message_set_byte_order:
22375  * @message: A #GDBusMessage.
22376  * @byte_order: The byte order.
22377  *
22378  * Sets the byte order of @message.
22379  */
22380
22381
22382 /**
22383  * g_dbus_message_set_destination:
22384  * @message: A #GDBusMessage.
22385  * @value: The value to set.
22386  *
22387  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
22388  *
22389  * Since: 2.26
22390  */
22391
22392
22393 /**
22394  * g_dbus_message_set_error_name:
22395  * @message: A #GDBusMessage.
22396  * @value: The value to set.
22397  *
22398  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
22399  *
22400  * Since: 2.26
22401  */
22402
22403
22404 /**
22405  * g_dbus_message_set_flags:
22406  * @message: A #GDBusMessage.
22407  * @flags: Flags for @message that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
22408  *
22409  * Sets the flags to set on @message.
22410  *
22411  * Since: 2.26
22412  */
22413
22414
22415 /**
22416  * g_dbus_message_set_header:
22417  * @message: A #GDBusMessage.
22418  * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
22419  * @value: A #GVariant to set the header field or %NULL to clear the header field.
22420  *
22421  * Sets a header field on @message.
22422  *
22423  * If @value is floating, @message assumes ownership of @value.
22424  *
22425  * Since: 2.26
22426  */
22427
22428
22429 /**
22430  * g_dbus_message_set_interface:
22431  * @message: A #GDBusMessage.
22432  * @value: The value to set.
22433  *
22434  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
22435  *
22436  * Since: 2.26
22437  */
22438
22439
22440 /**
22441  * g_dbus_message_set_member:
22442  * @message: A #GDBusMessage.
22443  * @value: The value to set.
22444  *
22445  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
22446  *
22447  * Since: 2.26
22448  */
22449
22450
22451 /**
22452  * g_dbus_message_set_message_type:
22453  * @message: A #GDBusMessage.
22454  * @type: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
22455  *
22456  * Sets @message to be of @type.
22457  *
22458  * Since: 2.26
22459  */
22460
22461
22462 /**
22463  * g_dbus_message_set_num_unix_fds:
22464  * @message: A #GDBusMessage.
22465  * @value: The value to set.
22466  *
22467  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
22468  *
22469  * Since: 2.26
22470  */
22471
22472
22473 /**
22474  * g_dbus_message_set_path:
22475  * @message: A #GDBusMessage.
22476  * @value: The value to set.
22477  *
22478  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
22479  *
22480  * Since: 2.26
22481  */
22482
22483
22484 /**
22485  * g_dbus_message_set_reply_serial:
22486  * @message: A #GDBusMessage.
22487  * @value: The value to set.
22488  *
22489  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
22490  *
22491  * Since: 2.26
22492  */
22493
22494
22495 /**
22496  * g_dbus_message_set_sender:
22497  * @message: A #GDBusMessage.
22498  * @value: The value to set.
22499  *
22500  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
22501  *
22502  * Since: 2.26
22503  */
22504
22505
22506 /**
22507  * g_dbus_message_set_serial:
22508  * @message: A #GDBusMessage.
22509  * @serial: A #guint32.
22510  *
22511  * Sets the serial for @message.
22512  *
22513  * Since: 2.26
22514  */
22515
22516
22517 /**
22518  * g_dbus_message_set_signature:
22519  * @message: A #GDBusMessage.
22520  * @value: The value to set.
22521  *
22522  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
22523  *
22524  * Since: 2.26
22525  */
22526
22527
22528 /**
22529  * g_dbus_message_set_unix_fd_list:
22530  * @message: A #GDBusMessage.
22531  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
22532  *
22533  * Sets the UNIX file descriptors associated with @message. As a
22534  * side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header
22535  * field is set to the number of fds in @fd_list (or cleared if
22536  * @fd_list is %NULL).
22537  *
22538  * This method is only available on UNIX.
22539  *
22540  * Since: 2.26
22541  */
22542
22543
22544 /**
22545  * g_dbus_message_to_blob:
22546  * @message: A #GDBusMessage.
22547  * @out_size: Return location for size of generated blob.
22548  * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
22549  * @error: Return location for error.
22550  *
22551  * Serializes @message to a blob. The byte order returned by
22552  * g_dbus_message_get_byte_order() will be used.
22553  *
22554  * valid binary D-Bus message of @out_size bytes generated by @message
22555  * or %NULL if @error is set. Free with g_free().
22556  *
22557  * Returns: (array length=out_size) (transfer full): A pointer to a
22558  * Since: 2.26
22559  */
22560
22561
22562 /**
22563  * g_dbus_message_to_gerror:
22564  * @message: A #GDBusMessage.
22565  * @error: The #GError to set.
22566  *
22567  * If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does
22568  * nothing and returns %FALSE.
22569  *
22570  * Otherwise this method encodes the error in @message as a #GError
22571  * using g_dbus_error_set_dbus_error() using the information in the
22572  * %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as
22573  * well as the first string item in @message's body.
22574  *
22575  * Returns: %TRUE if @error was set, %FALSE otherwise.
22576  * Since: 2.26
22577  */
22578
22579
22580 /**
22581  * g_dbus_method_info_ref:
22582  * @info: A #GDBusMethodInfo
22583  *
22584  * If @info is statically allocated does nothing. Otherwise increases
22585  * the reference count.
22586  *
22587  * Returns: The same @info.
22588  * Since: 2.26
22589  */
22590
22591
22592 /**
22593  * g_dbus_method_info_unref:
22594  * @info: A #GDBusMethodInfo.
22595  *
22596  * If @info is statically allocated, does nothing. Otherwise decreases
22597  * the reference count of @info. When its reference count drops to 0,
22598  * the memory used is freed.
22599  *
22600  * Since: 2.26
22601  */
22602
22603
22604 /**
22605  * g_dbus_method_invocation_get_connection:
22606  * @invocation: A #GDBusMethodInvocation.
22607  *
22608  * Gets the #GDBusConnection the method was invoked on.
22609  *
22610  * Returns: (transfer none): A #GDBusConnection. Do not free, it is owned by @invocation.
22611  * Since: 2.26
22612  */
22613
22614
22615 /**
22616  * g_dbus_method_invocation_get_interface_name:
22617  * @invocation: A #GDBusMethodInvocation.
22618  *
22619  * Gets the name of the D-Bus interface the method was invoked on.
22620  *
22621  * Returns: A string. Do not free, it is owned by @invocation.
22622  * Since: 2.26
22623  */
22624
22625
22626 /**
22627  * g_dbus_method_invocation_get_message:
22628  * @invocation: A #GDBusMethodInvocation.
22629  *
22630  * Gets the #GDBusMessage for the method invocation. This is useful if
22631  * you need to use low-level protocol features, such as UNIX file
22632  * descriptor passing, that cannot be properly expressed in the
22633  * #GVariant API.
22634  *
22635  * See <xref linkend="gdbus-server"/> and <xref
22636  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
22637  * low-level API to send and receive UNIX file descriptors.
22638  *
22639  * Returns: (transfer none): #GDBusMessage. Do not free, it is owned by @invocation.
22640  * Since: 2.26
22641  */
22642
22643
22644 /**
22645  * g_dbus_method_invocation_get_method_info:
22646  * @invocation: A #GDBusMethodInvocation.
22647  *
22648  * Gets information about the method call, if any.
22649  *
22650  * Returns: A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation.
22651  * Since: 2.26
22652  */
22653
22654
22655 /**
22656  * g_dbus_method_invocation_get_method_name:
22657  * @invocation: A #GDBusMethodInvocation.
22658  *
22659  * Gets the name of the method that was invoked.
22660  *
22661  * Returns: A string. Do not free, it is owned by @invocation.
22662  * Since: 2.26
22663  */
22664
22665
22666 /**
22667  * g_dbus_method_invocation_get_object_path:
22668  * @invocation: A #GDBusMethodInvocation.
22669  *
22670  * Gets the object path the method was invoked on.
22671  *
22672  * Returns: A string. Do not free, it is owned by @invocation.
22673  * Since: 2.26
22674  */
22675
22676
22677 /**
22678  * g_dbus_method_invocation_get_parameters:
22679  * @invocation: A #GDBusMethodInvocation.
22680  *
22681  * Gets the parameters of the method invocation. If there are no input
22682  * parameters then this will return a GVariant with 0 children rather than NULL.
22683  *
22684  * Returns: (transfer none): A #GVariant tuple. Do not unref this because it is owned by @invocation.
22685  * Since: 2.26
22686  */
22687
22688
22689 /**
22690  * g_dbus_method_invocation_get_sender:
22691  * @invocation: A #GDBusMethodInvocation.
22692  *
22693  * Gets the bus name that invoked the method.
22694  *
22695  * Returns: A string. Do not free, it is owned by @invocation.
22696  * Since: 2.26
22697  */
22698
22699
22700 /**
22701  * g_dbus_method_invocation_get_user_data: (skip)
22702  * @invocation: A #GDBusMethodInvocation.
22703  *
22704  * Gets the @user_data #gpointer passed to g_dbus_connection_register_object().
22705  *
22706  * Returns: A #gpointer.
22707  * Since: 2.26
22708  */
22709
22710
22711 /**
22712  * g_dbus_method_invocation_return_dbus_error:
22713  * @invocation: (transfer full): A #GDBusMethodInvocation.
22714  * @error_name: A valid D-Bus error name.
22715  * @error_message: A valid D-Bus error message.
22716  *
22717  * Finishes handling a D-Bus method call by returning an error.
22718  *
22719  * This method will free @invocation, you cannot use it afterwards.
22720  *
22721  * Since: 2.26
22722  */
22723
22724
22725 /**
22726  * g_dbus_method_invocation_return_error:
22727  * @invocation: (transfer full): A #GDBusMethodInvocation.
22728  * @domain: A #GQuark for the #GError error domain.
22729  * @code: The error code.
22730  * @format: printf()-style format.
22731  * @...: Parameters for @format.
22732  *
22733  * Finishes handling a D-Bus method call by returning an error.
22734  *
22735  * See g_dbus_error_encode_gerror() for details about what error name
22736  * will be returned on the wire. In a nutshell, if the given error is
22737  * registered using g_dbus_error_register_error() the name given
22738  * during registration is used. Otherwise, a name of the form
22739  * <literal>org.gtk.GDBus.UnmappedGError.Quark...</literal> is
22740  * used. This provides transparent mapping of #GError between
22741  * applications using GDBus.
22742  *
22743  * If you are writing an application intended to be portable,
22744  * <emphasis>always</emphasis> register errors with g_dbus_error_register_error()
22745  * or use g_dbus_method_invocation_return_dbus_error().
22746  *
22747  * This method will free @invocation, you cannot use it afterwards.
22748  *
22749  * Since: 2.26
22750  */
22751
22752
22753 /**
22754  * g_dbus_method_invocation_return_error_literal:
22755  * @invocation: (transfer full): A #GDBusMethodInvocation.
22756  * @domain: A #GQuark for the #GError error domain.
22757  * @code: The error code.
22758  * @message: The error message.
22759  *
22760  * Like g_dbus_method_invocation_return_error() but without printf()-style formatting.
22761  *
22762  * This method will free @invocation, you cannot use it afterwards.
22763  *
22764  * Since: 2.26
22765  */
22766
22767
22768 /**
22769  * g_dbus_method_invocation_return_error_valist:
22770  * @invocation: (transfer full): A #GDBusMethodInvocation.
22771  * @domain: A #GQuark for the #GError error domain.
22772  * @code: The error code.
22773  * @format: printf()-style format.
22774  * @var_args: #va_list of parameters for @format.
22775  *
22776  * Like g_dbus_method_invocation_return_error() but intended for
22777  * language bindings.
22778  *
22779  * This method will free @invocation, you cannot use it afterwards.
22780  *
22781  * Since: 2.26
22782  */
22783
22784
22785 /**
22786  * g_dbus_method_invocation_return_gerror:
22787  * @invocation: (transfer full): A #GDBusMethodInvocation.
22788  * @error: A #GError.
22789  *
22790  * Like g_dbus_method_invocation_return_error() but takes a #GError
22791  * instead of the error domain, error code and message.
22792  *
22793  * This method will free @invocation, you cannot use it afterwards.
22794  *
22795  * Since: 2.26
22796  */
22797
22798
22799 /**
22800  * g_dbus_method_invocation_return_value:
22801  * @invocation: (transfer full): A #GDBusMethodInvocation.
22802  * @parameters: (allow-none): A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
22803  *
22804  * Finishes handling a D-Bus method call by returning @parameters.
22805  * If the @parameters GVariant is floating, it is consumed.
22806  *
22807  * It is an error if @parameters is not of the right format.
22808  *
22809  * This method will free @invocation, you cannot use it afterwards.
22810  *
22811  * Since: 2.26
22812  */
22813
22814
22815 /**
22816  * g_dbus_method_invocation_return_value_with_unix_fd_list:
22817  * @invocation: (transfer full): A #GDBusMethodInvocation.
22818  * @parameters: (allow-none): A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
22819  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
22820  *
22821  * Like g_dbus_method_invocation_return_value() but also takes a #GUnixFDList.
22822  *
22823  * This method is only available on UNIX.
22824  *
22825  * This method will free @invocation, you cannot use it afterwards.
22826  *
22827  * Since: 2.30
22828  */
22829
22830
22831 /**
22832  * g_dbus_method_invocation_take_error: (skip)
22833  * @invocation: (transfer full): A #GDBusMethodInvocation.
22834  * @error: (transfer full): A #GError.
22835  *
22836  * Like g_dbus_method_invocation_return_gerror() but takes ownership
22837  * of @error so the caller does not need to free it.
22838  *
22839  * This method will free @invocation, you cannot use it afterwards.
22840  *
22841  * Since: 2.30
22842  */
22843
22844
22845 /**
22846  * g_dbus_node_info_generate_xml:
22847  * @info: A #GDBusNodeInfo.
22848  * @indent: Indentation level.
22849  * @string_builder: (out): A #GString to to append XML data to.
22850  *
22851  * Appends an XML representation of @info (and its children) to @string_builder.
22852  *
22853  * This function is typically used for generating introspection XML documents at run-time for
22854  * handling the <literal>org.freedesktop.DBus.Introspectable.Introspect</literal> method.
22855  *
22856  * Since: 2.26
22857  */
22858
22859
22860 /**
22861  * g_dbus_node_info_lookup_interface:
22862  * @info: A #GDBusNodeInfo.
22863  * @name: A D-Bus interface name.
22864  *
22865  * Looks up information about an interface.
22866  *
22867  * This cost of this function is O(n) in number of interfaces.
22868  *
22869  * Returns: (transfer none): A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info.
22870  * Since: 2.26
22871  */
22872
22873
22874 /**
22875  * g_dbus_node_info_new_for_xml:
22876  * @xml_data: Valid D-Bus introspection XML.
22877  * @error: Return location for error.
22878  *
22879  * Parses @xml_data and returns a #GDBusNodeInfo representing the data.
22880  *
22881  * Note that this routine is using a
22882  * <link linkend="glib-Simple-XML-Subset-Parser.description">GMarkup</link>-based
22883  * parser that only accepts a subset of valid XML documents.
22884  *
22885  * with g_dbus_node_info_unref().
22886  *
22887  * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free
22888  * Since: 2.26
22889  */
22890
22891
22892 /**
22893  * g_dbus_node_info_ref:
22894  * @info: A #GDBusNodeInfo
22895  *
22896  * If @info is statically allocated does nothing. Otherwise increases
22897  * the reference count.
22898  *
22899  * Returns: The same @info.
22900  * Since: 2.26
22901  */
22902
22903
22904 /**
22905  * g_dbus_node_info_unref:
22906  * @info: A #GDBusNodeInfo.
22907  *
22908  * If @info is statically allocated, does nothing. Otherwise decreases
22909  * the reference count of @info. When its reference count drops to 0,
22910  * the memory used is freed.
22911  *
22912  * Since: 2.26
22913  */
22914
22915
22916 /**
22917  * g_dbus_object_get_interface:
22918  * @object: A #GDBusObject.
22919  * @interface_name: A D-Bus interface name.
22920  *
22921  * Gets the D-Bus interface with name @interface_name associated with
22922  * @object, if any.
22923  *
22924  * #GDBusInterface that must be freed with g_object_unref().
22925  *
22926  * Returns: (transfer full): %NULL if not found, otherwise a
22927  * Since: 2.30
22928  */
22929
22930
22931 /**
22932  * g_dbus_object_get_interfaces:
22933  * @object: A #GDBusObject.
22934  *
22935  * Gets the D-Bus interfaces associated with @object.
22936  *
22937  * The returned list must be freed by g_list_free() after each element has been freed
22938  * with g_object_unref().
22939  *
22940  * Returns: (element-type GDBusInterface) (transfer full): A list of #GDBusInterface instances.
22941  * Since: 2.30
22942  */
22943
22944
22945 /**
22946  * g_dbus_object_get_object_path:
22947  * @object: A #GDBusObject.
22948  *
22949  * Gets the object path for @object.
22950  *
22951  * Returns: A string owned by @object. Do not free.
22952  * Since: 2.30
22953  */
22954
22955
22956 /**
22957  * g_dbus_object_manager_client_get_connection:
22958  * @manager: A #GDBusObjectManagerClient
22959  *
22960  * Gets the #GDBusConnection used by @manager.
22961  *
22962  * the object belongs to @manager.
22963  *
22964  * Returns: (transfer none): A #GDBusConnection object. Do not free,
22965  * Since: 2.30
22966  */
22967
22968
22969 /**
22970  * g_dbus_object_manager_client_get_flags:
22971  * @manager: A #GDBusObjectManagerClient
22972  *
22973  * Gets the flags that @manager was constructed with.
22974  *
22975  * enumeration.
22976  *
22977  * Returns: Zero of more flags from the #GDBusObjectManagerClientFlags
22978  * Since: 2.30
22979  */
22980
22981
22982 /**
22983  * g_dbus_object_manager_client_get_name:
22984  * @manager: A #GDBusObjectManagerClient
22985  *
22986  * Gets the name that @manager is for.
22987  *
22988  * belongs to @manager.
22989  *
22990  * Returns: A unique or well-known name. Do not free, the string
22991  * Since: 2.30
22992  */
22993
22994
22995 /**
22996  * g_dbus_object_manager_client_get_name_owner:
22997  * @manager: A #GDBusObjectManagerClient.
22998  *
22999  * The unique name that owns the name that @manager is for or %NULL if
23000  * no-one currently owns that name. You can connect to the
23001  * #GObject::notify signal to track changes to the
23002  * #GDBusObjectManagerClient:name-owner property.
23003  *
23004  * g_free().
23005  *
23006  * Returns: The name owner or %NULL if no name owner exists. Free with
23007  * Since: 2.30
23008  */
23009
23010
23011 /**
23012  * g_dbus_object_manager_client_new:
23013  * @connection: A #GDBusConnection.
23014  * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
23015  * @name: The owner of the control object (unique or well-known name).
23016  * @object_path: The object path of the control object.
23017  * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
23018  * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
23019  * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
23020  * @cancellable: A #GCancellable or %NULL
23021  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
23022  * @user_data: The data to pass to @callback.
23023  *
23024  * Asynchronously creates a new #GDBusObjectManagerClient object.
23025  *
23026  * This is an asynchronous failable constructor. When the result is
23027  * ready, @callback will be invoked in the
23028  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
23029  * of the thread you are calling this method from. You can
23030  * then call g_dbus_object_manager_client_new_finish() to get the result. See
23031  * g_dbus_object_manager_client_new_sync() for the synchronous version.
23032  *
23033  * Since: 2.30
23034  */
23035
23036
23037 /**
23038  * g_dbus_object_manager_client_new_finish:
23039  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new().
23040  * @error: Return location for error or %NULL.
23041  *
23042  * Finishes an operation started with g_dbus_object_manager_client_new().
23043  *
23044  * #GDBusObjectManagerClient object or %NULL if @error is set. Free
23045  * with g_object_unref().
23046  *
23047  * Returns: (transfer full) (type GDBusObjectManagerClient): A
23048  * Since: 2.30
23049  */
23050
23051
23052 /**
23053  * g_dbus_object_manager_client_new_for_bus:
23054  * @bus_type: A #GBusType.
23055  * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
23056  * @name: The owner of the control object (unique or well-known name).
23057  * @object_path: The object path of the control object.
23058  * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
23059  * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
23060  * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
23061  * @cancellable: A #GCancellable or %NULL
23062  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
23063  * @user_data: The data to pass to @callback.
23064  *
23065  * Like g_dbus_object_manager_client_new() but takes a #GBusType instead of a
23066  * #GDBusConnection.
23067  *
23068  * This is an asynchronous failable constructor. When the result is
23069  * ready, @callback will be invoked in the
23070  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
23071  * of the thread you are calling this method from. You can
23072  * then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See
23073  * g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version.
23074  *
23075  * Since: 2.30
23076  */
23077
23078
23079 /**
23080  * g_dbus_object_manager_client_new_for_bus_finish:
23081  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new_for_bus().
23082  * @error: Return location for error or %NULL.
23083  *
23084  * Finishes an operation started with g_dbus_object_manager_client_new_for_bus().
23085  *
23086  * #GDBusObjectManagerClient object or %NULL if @error is set. Free
23087  * with g_object_unref().
23088  *
23089  * Returns: (transfer full) (type GDBusObjectManagerClient): A
23090  * Since: 2.30
23091  */
23092
23093
23094 /**
23095  * g_dbus_object_manager_client_new_for_bus_sync:
23096  * @bus_type: A #GBusType.
23097  * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
23098  * @name: The owner of the control object (unique or well-known name).
23099  * @object_path: The object path of the control object.
23100  * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
23101  * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
23102  * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
23103  * @cancellable: A #GCancellable or %NULL
23104  * @error: Return location for error or %NULL.
23105  *
23106  * Like g_dbus_object_manager_client_new_sync() but takes a #GBusType instead
23107  * of a #GDBusConnection.
23108  *
23109  * This is a synchronous failable constructor - the calling thread is
23110  * blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus()
23111  * for the asynchronous version.
23112  *
23113  * #GDBusObjectManagerClient object or %NULL if @error is set. Free
23114  * with g_object_unref().
23115  *
23116  * Returns: (transfer full) (type GDBusObjectManagerClient): A
23117  * Since: 2.30
23118  */
23119
23120
23121 /**
23122  * g_dbus_object_manager_client_new_sync:
23123  * @connection: A #GDBusConnection.
23124  * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
23125  * @name: The owner of the control object (unique or well-known name).
23126  * @object_path: The object path of the control object.
23127  * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
23128  * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
23129  * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
23130  * @cancellable: A #GCancellable or %NULL
23131  * @error: Return location for error or %NULL.
23132  *
23133  * Creates a new #GDBusObjectManagerClient object.
23134  *
23135  * This is a synchronous failable constructor - the calling thread is
23136  * blocked until a reply is received. See g_dbus_object_manager_client_new()
23137  * for the asynchronous version.
23138  *
23139  * #GDBusObjectManagerClient object or %NULL if @error is set. Free
23140  * with g_object_unref().
23141  *
23142  * Returns: (transfer full) (type GDBusObjectManagerClient): A
23143  * Since: 2.30
23144  */
23145
23146
23147 /**
23148  * g_dbus_object_manager_get_interface:
23149  * @manager: A #GDBusObjectManager.
23150  * @object_path: Object path to lookup.
23151  * @interface_name: D-Bus interface name to lookup.
23152  *
23153  * Gets the interface proxy for @interface_name at @object_path, if
23154  * any.
23155  *
23156  * with g_object_unref().
23157  *
23158  * Returns: (transfer full): A #GDBusInterface instance or %NULL. Free
23159  * Since: 2.30
23160  */
23161
23162
23163 /**
23164  * g_dbus_object_manager_get_object:
23165  * @manager: A #GDBusObjectManager.
23166  * @object_path: Object path to lookup.
23167  *
23168  * Gets the #GDBusObjectProxy at @object_path, if any.
23169  *
23170  * g_object_unref().
23171  *
23172  * Returns: (transfer full): A #GDBusObject or %NULL. Free with
23173  * Since: 2.30
23174  */
23175
23176
23177 /**
23178  * g_dbus_object_manager_get_object_path:
23179  * @manager: A #GDBusObjectManager.
23180  *
23181  * Gets the object path that @manager is for.
23182  *
23183  * Returns: A string owned by @manager. Do not free.
23184  * Since: 2.30
23185  */
23186
23187
23188 /**
23189  * g_dbus_object_manager_get_objects:
23190  * @manager: A #GDBusObjectManager.
23191  *
23192  * Gets all #GDBusObject objects known to @manager.
23193  *
23194  * #GDBusObject objects. The returned list should be freed with
23195  * g_list_free() after each element has been freed with
23196  * g_object_unref().
23197  *
23198  * Returns: (transfer full) (element-type GDBusObject): A list of
23199  * Since: 2.30
23200  */
23201
23202
23203 /**
23204  * g_dbus_object_manager_server_export:
23205  * @manager: A #GDBusObjectManagerServer.
23206  * @object: A #GDBusObjectSkeleton.
23207  *
23208  * Exports @object on @manager.
23209  *
23210  * If there is already a #GDBusObject exported at the object path,
23211  * then the old object is removed.
23212  *
23213  * The object path for @object must be in the hierarchy rooted by the
23214  * object path for @manager.
23215  *
23216  * Note that @manager will take a reference on @object for as long as
23217  * it is exported.
23218  *
23219  * Since: 2.30
23220  */
23221
23222
23223 /**
23224  * g_dbus_object_manager_server_export_uniquely:
23225  * @manager: A #GDBusObjectManagerServer.
23226  * @object: An object.
23227  *
23228  * Like g_dbus_object_manager_server_export() but appends a string of
23229  * the form <literal>_N</literal> (with N being a natural number) to
23230  * @object<!-- -->'s object path if an object with the given path
23231  * already exists. As such, the #GDBusObjectProxy:g-object-path property
23232  * of @object may be modified.
23233  *
23234  * Since: 2.30
23235  */
23236
23237
23238 /**
23239  * g_dbus_object_manager_server_get_connection:
23240  * @manager: A #GDBusObjectManagerServer
23241  *
23242  * Gets the #GDBusConnection used by @manager.
23243  *
23244  * @manager isn't exported on a connection. The returned object should
23245  * be freed with g_object_unref().
23246  *
23247  * Returns: (transfer full): A #GDBusConnection object or %NULL if
23248  * Since: 2.30
23249  */
23250
23251
23252 /**
23253  * g_dbus_object_manager_server_new:
23254  * @object_path: The object path to export the manager object at.
23255  *
23256  * Creates a new #GDBusObjectManagerServer object.
23257  *
23258  * The returned server isn't yet exported on any connection. To do so,
23259  * use g_dbus_object_manager_server_set_connection(). Normally you
23260  * want to export all of your objects before doing so to avoid <ulink
23261  * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">InterfacesAdded</ulink>
23262  * signals being emitted.
23263  *
23264  * Returns: A #GDBusObjectManagerServer object. Free with g_object_unref().
23265  * Since: 2.30
23266  */
23267
23268
23269 /**
23270  * g_dbus_object_manager_server_set_connection:
23271  * @manager: A #GDBusObjectManagerServer.
23272  * @connection: (allow-none): A #GDBusConnection or %NULL.
23273  *
23274  * Exports all objects managed by @manager on @connection. If
23275  * @connection is %NULL, stops exporting objects.
23276  */
23277
23278
23279 /**
23280  * g_dbus_object_manager_server_unexport:
23281  * @manager: A #GDBusObjectManagerServer.
23282  * @object_path: An object path.
23283  *
23284  * If @manager has an object at @path, removes the object. Otherwise
23285  * does nothing.
23286  *
23287  * Note that @object_path must be in the hierarchy rooted by the
23288  * object path for @manager.
23289  *
23290  * Returns: %TRUE if object at @object_path was removed, %FALSE otherwise.
23291  * Since: 2.30
23292  */
23293
23294
23295 /**
23296  * g_dbus_object_proxy_get_connection:
23297  * @proxy: a #GDBusObjectProxy
23298  *
23299  * Gets the connection that @proxy is for.
23300  *
23301  * object is owned by @proxy.
23302  *
23303  * Returns: (transfer none): A #GDBusConnection. Do not free, the
23304  * Since: 2.30
23305  */
23306
23307
23308 /**
23309  * g_dbus_object_proxy_new:
23310  * @connection: a #GDBusConnection
23311  * @object_path: the object path
23312  *
23313  * Creates a new #GDBusObjectProxy for the given connection and
23314  * object path.
23315  *
23316  * Returns: a new #GDBusObjectProxy
23317  * Since: 2.30
23318  */
23319
23320
23321 /**
23322  * g_dbus_object_skeleton_add_interface:
23323  * @object: A #GDBusObjectSkeleton.
23324  * @interface_: A #GDBusInterfaceSkeleton.
23325  *
23326  * Adds @interface_ to @object.
23327  *
23328  * If @object already contains a #GDBusInterfaceSkeleton with the same
23329  * interface name, it is removed before @interface_ is added.
23330  *
23331  * Note that @object takes its own reference on @interface_ and holds
23332  * it until removed.
23333  *
23334  * Since: 2.30
23335  */
23336
23337
23338 /**
23339  * g_dbus_object_skeleton_flush:
23340  * @object: A #GDBusObjectSkeleton.
23341  *
23342  * This method simply calls g_dbus_interface_skeleton_flush() on all
23343  * interfaces belonging to @object. See that method for when flushing
23344  * is useful.
23345  *
23346  * Since: 2.30
23347  */
23348
23349
23350 /**
23351  * g_dbus_object_skeleton_new:
23352  * @object_path: An object path.
23353  *
23354  * Creates a new #GDBusObjectSkeleton.
23355  *
23356  * Returns: A #GDBusObjectSkeleton. Free with g_object_unref().
23357  * Since: 2.30
23358  */
23359
23360
23361 /**
23362  * g_dbus_object_skeleton_remove_interface:
23363  * @object: A #GDBusObjectSkeleton.
23364  * @interface_: A #GDBusInterfaceSkeleton.
23365  *
23366  * Removes @interface_ from @object.
23367  *
23368  * Since: 2.30
23369  */
23370
23371
23372 /**
23373  * g_dbus_object_skeleton_remove_interface_by_name:
23374  * @object: A #GDBusObjectSkeleton.
23375  * @interface_name: A D-Bus interface name.
23376  *
23377  * Removes the #GDBusInterface with @interface_name from @object.
23378  *
23379  * If no D-Bus interface of the given interface exists, this function
23380  * does nothing.
23381  *
23382  * Since: 2.30
23383  */
23384
23385
23386 /**
23387  * g_dbus_object_skeleton_set_object_path:
23388  * @object: A #GDBusObjectSkeleton.
23389  * @object_path: A valid D-Bus object path.
23390  *
23391  * Sets the object path for @object.
23392  *
23393  * Since: 2.30
23394  */
23395
23396
23397 /**
23398  * g_dbus_property_info_ref:
23399  * @info: A #GDBusPropertyInfo
23400  *
23401  * If @info is statically allocated does nothing. Otherwise increases
23402  * the reference count.
23403  *
23404  * Returns: The same @info.
23405  * Since: 2.26
23406  */
23407
23408
23409 /**
23410  * g_dbus_property_info_unref:
23411  * @info: A #GDBusPropertyInfo.
23412  *
23413  * If @info is statically allocated, does nothing. Otherwise decreases
23414  * the reference count of @info. When its reference count drops to 0,
23415  * the memory used is freed.
23416  *
23417  * Since: 2.26
23418  */
23419
23420
23421 /**
23422  * g_dbus_proxy_call:
23423  * @proxy: A #GDBusProxy.
23424  * @method_name: Name of method to invoke.
23425  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
23426  * @flags: Flags from the #GDBusCallFlags enumeration.
23427  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
23428  * @cancellable: A #GCancellable or %NULL.
23429  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
23430  * @user_data: The data to pass to @callback.
23431  *
23432  * Asynchronously invokes the @method_name method on @proxy.
23433  *
23434  * If @method_name contains any dots, then @name is split into interface and
23435  * method name parts. This allows using @proxy for invoking methods on
23436  * other interfaces.
23437  *
23438  * If the #GDBusConnection associated with @proxy is closed then
23439  * the operation will fail with %G_IO_ERROR_CLOSED. If
23440  * @cancellable is canceled, the operation will fail with
23441  * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
23442  * compatible with the D-Bus protocol, the operation fails with
23443  * %G_IO_ERROR_INVALID_ARGUMENT.
23444  *
23445  * If the @parameters #GVariant is floating, it is consumed. This allows
23446  * convenient 'inline' use of g_variant_new(), e.g.:
23447  * |[
23448  * g_dbus_proxy_call (proxy,
23449  * "TwoStrings",
23450  * g_variant_new ("(ss)",
23451  * "Thing One",
23452  * "Thing Two"),
23453  * G_DBUS_CALL_FLAGS_NONE,
23454  * -1,
23455  * NULL,
23456  * (GAsyncReadyCallback) two_strings_done,
23457  * &amp;data);
23458  * ]|
23459  *
23460  * If @proxy has an expected interface (see
23461  * #GDBusProxy:g-interface-info) and @method_name is referenced by it,
23462  * then the return value is checked against the return type.
23463  *
23464  * This is an asynchronous method. When the operation is finished,
23465  * @callback will be invoked in the
23466  * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
23467  * of the thread you are calling this method from.
23468  * You can then call g_dbus_proxy_call_finish() to get the result of
23469  * the operation. See g_dbus_proxy_call_sync() for the synchronous
23470  * version of this method.
23471  *
23472  * Since: 2.26
23473  */
23474
23475
23476 /**
23477  * g_dbus_proxy_call_finish:
23478  * @proxy: A #GDBusProxy.
23479  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call().
23480  * @error: Return location for error or %NULL.
23481  *
23482  * Finishes an operation started with g_dbus_proxy_call().
23483  *
23484  * return values. Free with g_variant_unref().
23485  *
23486  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
23487  * Since: 2.26
23488  */
23489
23490
23491 /**
23492  * g_dbus_proxy_call_sync:
23493  * @proxy: A #GDBusProxy.
23494  * @method_name: Name of method to invoke.
23495  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
23496  * @flags: Flags from the #GDBusCallFlags enumeration.
23497  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
23498  * @cancellable: A #GCancellable or %NULL.
23499  * @error: Return location for error or %NULL.
23500  *
23501  * Synchronously invokes the @method_name method on @proxy.
23502  *
23503  * If @method_name contains any dots, then @name is split into interface and
23504  * method name parts. This allows using @proxy for invoking methods on
23505  * other interfaces.
23506  *
23507  * If the #GDBusConnection associated with @proxy is disconnected then
23508  * the operation will fail with %G_IO_ERROR_CLOSED. If
23509  * @cancellable is canceled, the operation will fail with
23510  * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
23511  * compatible with the D-Bus protocol, the operation fails with
23512  * %G_IO_ERROR_INVALID_ARGUMENT.
23513  *
23514  * If the @parameters #GVariant is floating, it is consumed. This allows
23515  * convenient 'inline' use of g_variant_new(), e.g.:
23516  * |[
23517  * g_dbus_proxy_call_sync (proxy,
23518  * "TwoStrings",
23519  * g_variant_new ("(ss)",
23520  * "Thing One",
23521  * "Thing Two"),
23522  * G_DBUS_CALL_FLAGS_NONE,
23523  * -1,
23524  * NULL,
23525  * &amp;error);
23526  * ]|
23527  *
23528  * The calling thread is blocked until a reply is received. See
23529  * g_dbus_proxy_call() for the asynchronous version of this
23530  * method.
23531  *
23532  * If @proxy has an expected interface (see
23533  * #GDBusProxy:g-interface-info) and @method_name is referenced by it,
23534  * then the return value is checked against the return type.
23535  *
23536  * return values. Free with g_variant_unref().
23537  *
23538  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
23539  * Since: 2.26
23540  */
23541
23542
23543 /**
23544  * g_dbus_proxy_call_with_unix_fd_list:
23545  * @proxy: A #GDBusProxy.
23546  * @method_name: Name of method to invoke.
23547  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
23548  * @flags: Flags from the #GDBusCallFlags enumeration.
23549  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
23550  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
23551  * @cancellable: A #GCancellable or %NULL.
23552  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
23553  * @user_data: The data to pass to @callback.
23554  *
23555  * Like g_dbus_proxy_call() but also takes a #GUnixFDList object.
23556  *
23557  * This method is only available on UNIX.
23558  *
23559  * Since: 2.30
23560  */
23561
23562
23563 /**
23564  * g_dbus_proxy_call_with_unix_fd_list_finish:
23565  * @proxy: A #GDBusProxy.
23566  * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
23567  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call_with_unix_fd_list().
23568  * @error: Return location for error or %NULL.
23569  *
23570  * Finishes an operation started with g_dbus_proxy_call_with_unix_fd_list().
23571  *
23572  * return values. Free with g_variant_unref().
23573  *
23574  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
23575  * Since: 2.30
23576  */
23577
23578
23579 /**
23580  * g_dbus_proxy_call_with_unix_fd_list_sync:
23581  * @proxy: A #GDBusProxy.
23582  * @method_name: Name of method to invoke.
23583  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
23584  * @flags: Flags from the #GDBusCallFlags enumeration.
23585  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
23586  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
23587  * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
23588  * @cancellable: A #GCancellable or %NULL.
23589  * @error: Return location for error or %NULL.
23590  *
23591  * Like g_dbus_proxy_call_sync() but also takes and returns #GUnixFDList objects.
23592  *
23593  * This method is only available on UNIX.
23594  *
23595  * return values. Free with g_variant_unref().
23596  *
23597  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
23598  * Since: 2.30
23599  */
23600
23601
23602 /**
23603  * g_dbus_proxy_get_cached_property:
23604  * @proxy: A #GDBusProxy.
23605  * @property_name: Property name.
23606  *
23607  * Looks up the value for a property from the cache. This call does no
23608  * blocking IO.
23609  *
23610  * If @proxy has an expected interface (see
23611  * #GDBusProxy:g-interface-info) and @property_name is referenced by
23612  * it, then @value is checked against the type of the property.
23613  *
23614  * for @property_name or %NULL if the value is not in the cache. The
23615  * returned reference must be freed with g_variant_unref().
23616  *
23617  * Returns: A reference to the #GVariant instance that holds the value
23618  * Since: 2.26
23619  */
23620
23621
23622 /**
23623  * g_dbus_proxy_get_cached_property_names:
23624  * @proxy: A #GDBusProxy.
23625  *
23626  * Gets the names of all cached properties on @proxy.
23627  *
23628  * @proxy has no cached properties. Free the returned array with
23629  * g_strfreev().
23630  *
23631  * Returns: (transfer full): A %NULL-terminated array of strings or %NULL if
23632  * Since: 2.26
23633  */
23634
23635
23636 /**
23637  * g_dbus_proxy_get_connection:
23638  * @proxy: A #GDBusProxy.
23639  *
23640  * Gets the connection @proxy is for.
23641  *
23642  * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free.
23643  * Since: 2.26
23644  */
23645
23646
23647 /**
23648  * g_dbus_proxy_get_default_timeout:
23649  * @proxy: A #GDBusProxy.
23650  *
23651  * Gets the timeout to use if -1 (specifying default timeout) is
23652  * passed as @timeout_msec in the g_dbus_proxy_call() and
23653  * g_dbus_proxy_call_sync() functions.
23654  *
23655  * See the #GDBusProxy:g-default-timeout property for more details.
23656  *
23657  * Returns: Timeout to use for @proxy.
23658  * Since: 2.26
23659  */
23660
23661
23662 /**
23663  * g_dbus_proxy_get_flags:
23664  * @proxy: A #GDBusProxy.
23665  *
23666  * Gets the flags that @proxy was constructed with.
23667  *
23668  * Returns: Flags from the #GDBusProxyFlags enumeration.
23669  * Since: 2.26
23670  */
23671
23672
23673 /**
23674  * g_dbus_proxy_get_interface_info:
23675  * @proxy: A #GDBusProxy
23676  *
23677  * Returns the #GDBusInterfaceInfo, if any, specifying the interface
23678  * that @proxy conforms to. See the #GDBusProxy:g-interface-info
23679  * property for more details.
23680  *
23681  * object, it is owned by @proxy.
23682  *
23683  * Returns: A #GDBusInterfaceInfo or %NULL. Do not unref the returned
23684  * Since: 2.26
23685  */
23686
23687
23688 /**
23689  * g_dbus_proxy_get_interface_name:
23690  * @proxy: A #GDBusProxy.
23691  *
23692  * Gets the D-Bus interface name @proxy is for.
23693  *
23694  * Returns: A string owned by @proxy. Do not free.
23695  * Since: 2.26
23696  */
23697
23698
23699 /**
23700  * g_dbus_proxy_get_name:
23701  * @proxy: A #GDBusProxy.
23702  *
23703  * Gets the name that @proxy was constructed for.
23704  *
23705  * Returns: A string owned by @proxy. Do not free.
23706  * Since: 2.26
23707  */
23708
23709
23710 /**
23711  * g_dbus_proxy_get_name_owner:
23712  * @proxy: A #GDBusProxy.
23713  *
23714  * The unique name that owns the name that @proxy is for or %NULL if
23715  * no-one currently owns that name. You may connect to the
23716  * #GObject::notify signal to track changes to the
23717  * #GDBusProxy:g-name-owner property.
23718  *
23719  * Returns: The name owner or %NULL if no name owner exists. Free with g_free().
23720  * Since: 2.26
23721  */
23722
23723
23724 /**
23725  * g_dbus_proxy_get_object_path:
23726  * @proxy: A #GDBusProxy.
23727  *
23728  * Gets the object path @proxy is for.
23729  *
23730  * Returns: A string owned by @proxy. Do not free.
23731  * Since: 2.26
23732  */
23733
23734
23735 /**
23736  * g_dbus_proxy_new:
23737  * @connection: A #GDBusConnection.
23738  * @flags: Flags used when constructing the proxy.
23739  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
23740  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
23741  * @object_path: An object path.
23742  * @interface_name: A D-Bus interface name.
23743  * @cancellable: A #GCancellable or %NULL.
23744  * @callback: Callback function to invoke when the proxy is ready.
23745  * @user_data: User data to pass to @callback.
23746  *
23747  * Creates a proxy for accessing @interface_name on the remote object
23748  * at @object_path owned by @name at @connection and asynchronously
23749  * loads D-Bus properties unless the
23750  * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to
23751  * the #GDBusProxy::g-properties-changed signal to get notified about
23752  * property changes.
23753  *
23754  * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
23755  * match rules for signals. Connect to the #GDBusProxy::g-signal signal
23756  * to handle signals from the remote object.
23757  *
23758  * If @name is a well-known name and the
23759  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
23760  * owner currently exists, the message bus will be requested to launch
23761  * a name owner for the name.
23762  *
23763  * This is a failable asynchronous constructor - when the proxy is
23764  * ready, @callback will be invoked and you can use
23765  * g_dbus_proxy_new_finish() to get the result.
23766  *
23767  * See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.
23768  *
23769  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
23770  *
23771  * Since: 2.26
23772  */
23773
23774
23775 /**
23776  * g_dbus_proxy_new_finish:
23777  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new().
23778  * @error: Return location for error or %NULL.
23779  *
23780  * Finishes creating a #GDBusProxy.
23781  *
23782  * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
23783  * Since: 2.26
23784  */
23785
23786
23787 /**
23788  * g_dbus_proxy_new_for_bus:
23789  * @bus_type: A #GBusType.
23790  * @flags: Flags used when constructing the proxy.
23791  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
23792  * @name: A bus name (well-known or unique).
23793  * @object_path: An object path.
23794  * @interface_name: A D-Bus interface name.
23795  * @cancellable: A #GCancellable or %NULL.
23796  * @callback: Callback function to invoke when the proxy is ready.
23797  * @user_data: User data to pass to @callback.
23798  *
23799  * Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
23800  *
23801  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
23802  *
23803  * Since: 2.26
23804  */
23805
23806
23807 /**
23808  * g_dbus_proxy_new_for_bus_finish:
23809  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus().
23810  * @error: Return location for error or %NULL.
23811  *
23812  * Finishes creating a #GDBusProxy.
23813  *
23814  * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
23815  * Since: 2.26
23816  */
23817
23818
23819 /**
23820  * g_dbus_proxy_new_for_bus_sync:
23821  * @bus_type: A #GBusType.
23822  * @flags: Flags used when constructing the proxy.
23823  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
23824  * @name: A bus name (well-known or unique).
23825  * @object_path: An object path.
23826  * @interface_name: A D-Bus interface name.
23827  * @cancellable: A #GCancellable or %NULL.
23828  * @error: Return location for error or %NULL.
23829  *
23830  * Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
23831  *
23832  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
23833  *
23834  * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
23835  * Since: 2.26
23836  */
23837
23838
23839 /**
23840  * g_dbus_proxy_new_sync:
23841  * @connection: A #GDBusConnection.
23842  * @flags: Flags used when constructing the proxy.
23843  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
23844  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
23845  * @object_path: An object path.
23846  * @interface_name: A D-Bus interface name.
23847  * @cancellable: (allow-none): A #GCancellable or %NULL.
23848  * @error: (allow-none): Return location for error or %NULL.
23849  *
23850  * Creates a proxy for accessing @interface_name on the remote object
23851  * at @object_path owned by @name at @connection and synchronously
23852  * loads D-Bus properties unless the
23853  * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.
23854  *
23855  * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
23856  * match rules for signals. Connect to the #GDBusProxy::g-signal signal
23857  * to handle signals from the remote object.
23858  *
23859  * If @name is a well-known name and the
23860  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
23861  * owner currently exists, the message bus will be requested to launch
23862  * a name owner for the name.
23863  *
23864  * This is a synchronous failable constructor. See g_dbus_proxy_new()
23865  * and g_dbus_proxy_new_finish() for the asynchronous version.
23866  *
23867  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
23868  *
23869  * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
23870  * Since: 2.26
23871  */
23872
23873
23874 /**
23875  * g_dbus_proxy_set_cached_property:
23876  * @proxy: A #GDBusProxy
23877  * @property_name: Property name.
23878  * @value: (allow-none): Value for the property or %NULL to remove it from the cache.
23879  *
23880  * If @value is not %NULL, sets the cached value for the property with
23881  * name @property_name to the value in @value.
23882  *
23883  * If @value is %NULL, then the cached value is removed from the
23884  * property cache.
23885  *
23886  * If @proxy has an expected interface (see
23887  * #GDBusProxy:g-interface-info) and @property_name is referenced by
23888  * it, then @value is checked against the type of the property.
23889  *
23890  * If the @value #GVariant is floating, it is consumed. This allows
23891  * convenient 'inline' use of g_variant_new(), e.g.
23892  * |[
23893  * g_dbus_proxy_set_cached_property (proxy,
23894  * "SomeProperty",
23895  * g_variant_new ("(si)",
23896  * "A String",
23897  * 42));
23898  * ]|
23899  *
23900  * Normally you will not need to use this method since @proxy is
23901  * tracking changes using the
23902  * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
23903  * D-Bus signal. However, for performance reasons an object may decide
23904  * to not use this signal for some properties and instead use a
23905  * proprietary out-of-band mechanism to transmit changes.
23906  *
23907  * As a concrete example, consider an object with a property
23908  * <literal>ChatroomParticipants</literal> which is an array of
23909  * strings. Instead of transmitting the same (long) array every time
23910  * the property changes, it is more efficient to only transmit the
23911  * delta using e.g. signals <literal>ChatroomParticipantJoined(String
23912  * name)</literal> and <literal>ChatroomParticipantParted(String
23913  * name)</literal>.
23914  *
23915  * Since: 2.26
23916  */
23917
23918
23919 /**
23920  * g_dbus_proxy_set_default_timeout:
23921  * @proxy: A #GDBusProxy.
23922  * @timeout_msec: Timeout in milliseconds.
23923  *
23924  * Sets the timeout to use if -1 (specifying default timeout) is
23925  * passed as @timeout_msec in the g_dbus_proxy_call() and
23926  * g_dbus_proxy_call_sync() functions.
23927  *
23928  * See the #GDBusProxy:g-default-timeout property for more details.
23929  *
23930  * Since: 2.26
23931  */
23932
23933
23934 /**
23935  * g_dbus_proxy_set_interface_info:
23936  * @proxy: A #GDBusProxy
23937  * @info: (allow-none): Minimum interface this proxy conforms to or %NULL to unset.
23938  *
23939  * Ensure that interactions with @proxy conform to the given
23940  * interface. See the #GDBusProxy:g-interface-info property for more
23941  * details.
23942  *
23943  * Since: 2.26
23944  */
23945
23946
23947 /**
23948  * g_dbus_server_get_client_address:
23949  * @server: A #GDBusServer.
23950  *
23951  * Gets a D-Bus address string that can be used by clients to connect
23952  * to @server.
23953  *
23954  * by @server.
23955  *
23956  * Returns: A D-Bus address string. Do not free, the string is owned
23957  * Since: 2.26
23958  */
23959
23960
23961 /**
23962  * g_dbus_server_get_flags:
23963  * @server: A #GDBusServer.
23964  *
23965  * Gets the flags for @server.
23966  *
23967  * Returns: A set of flags from the #GDBusServerFlags enumeration.
23968  * Since: 2.26
23969  */
23970
23971
23972 /**
23973  * g_dbus_server_get_guid:
23974  * @server: A #GDBusServer.
23975  *
23976  * Gets the GUID for @server.
23977  *
23978  * Returns: A D-Bus GUID. Do not free this string, it is owned by @server.
23979  * Since: 2.26
23980  */
23981
23982
23983 /**
23984  * g_dbus_server_is_active:
23985  * @server: A #GDBusServer.
23986  *
23987  * Gets whether @server is active.
23988  *
23989  * Returns: %TRUE if server is active, %FALSE otherwise.
23990  * Since: 2.26
23991  */
23992
23993
23994 /**
23995  * g_dbus_server_new_sync:
23996  * @address: A D-Bus address.
23997  * @flags: Flags from the #GDBusServerFlags enumeration.
23998  * @guid: A D-Bus GUID.
23999  * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
24000  * @cancellable: A #GCancellable or %NULL.
24001  * @error: Return location for server or %NULL.
24002  *
24003  * Creates a new D-Bus server that listens on the first address in
24004  * @address that works.
24005  *
24006  * Once constructed, you can use g_dbus_server_get_client_address() to
24007  * get a D-Bus address string that clients can use to connect.
24008  *
24009  * Connect to the #GDBusServer::new-connection signal to handle
24010  * incoming connections.
24011  *
24012  * The returned #GDBusServer isn't active - you have to start it with
24013  * g_dbus_server_start().
24014  *
24015  * See <xref linkend="gdbus-peer-to-peer"/> for how #GDBusServer can
24016  * be used.
24017  *
24018  * This is a synchronous failable constructor. See
24019  * g_dbus_server_new() for the asynchronous version.
24020  *
24021  * g_object_unref().
24022  *
24023  * Returns: A #GDBusServer or %NULL if @error is set. Free with
24024  * Since: 2.26
24025  */
24026
24027
24028 /**
24029  * g_dbus_server_start:
24030  * @server: A #GDBusServer.
24031  *
24032  * Starts @server.
24033  *
24034  * Since: 2.26
24035  */
24036
24037
24038 /**
24039  * g_dbus_server_stop:
24040  * @server: A #GDBusServer.
24041  *
24042  * Stops @server.
24043  *
24044  * Since: 2.26
24045  */
24046
24047
24048 /**
24049  * g_dbus_signal_info_ref:
24050  * @info: A #GDBusSignalInfo
24051  *
24052  * If @info is statically allocated does nothing. Otherwise increases
24053  * the reference count.
24054  *
24055  * Returns: The same @info.
24056  * Since: 2.26
24057  */
24058
24059
24060 /**
24061  * g_dbus_signal_info_unref:
24062  * @info: A #GDBusSignalInfo.
24063  *
24064  * If @info is statically allocated, does nothing. Otherwise decreases
24065  * the reference count of @info. When its reference count drops to 0,
24066  * the memory used is freed.
24067  *
24068  * Since: 2.26
24069  */
24070
24071
24072 /**
24073  * g_desktop_app_info_get_categories:
24074  * @info: a #GDesktopAppInfo
24075  *
24076  * Gets the categories from the desktop file.
24077  *
24078  * i.e. no attempt is made to split it by ';' or validate it.
24079  *
24080  * Returns: The unparsed Categories key from the desktop file;
24081  */
24082
24083
24084 /**
24085  * g_desktop_app_info_get_filename:
24086  * @info: a #GDesktopAppInfo
24087  *
24088  * When @info was created from a known filename, return it.  In some
24089  * situations such as the #GDesktopAppInfo returned from
24090  * g_desktop_app_info_new_from_keyfile(), this function will return %NULL.
24091  *
24092  * Returns: The full path to the file for @info, or %NULL if not known.
24093  * Since: 2.24
24094  */
24095
24096
24097 /**
24098  * g_desktop_app_info_get_generic_name:
24099  * @info: a #GDesktopAppInfo
24100  *
24101  * Gets the generic name from the destkop file.
24102  *
24103  * Returns: The value of the GenericName key
24104  */
24105
24106
24107 /**
24108  * g_desktop_app_info_get_is_hidden:
24109  * @info: a #GDesktopAppInfo.
24110  *
24111  * A desktop file is hidden if the Hidden key in it is
24112  * set to True.
24113  *
24114  * Returns: %TRUE if hidden, %FALSE otherwise.
24115  */
24116
24117
24118 /**
24119  * g_desktop_app_info_get_keywords:
24120  * @info: a #GDesktopAppInfo
24121  *
24122  * Gets the keywords from the desktop file.
24123  *
24124  * Returns: (transfer none): The value of the Keywords key
24125  * Since: 2.32
24126  */
24127
24128
24129 /**
24130  * g_desktop_app_info_get_nodisplay:
24131  * @info: a #GDesktopAppInfo
24132  *
24133  * Gets the value of the NoDisplay key, which helps determine if the
24134  * application info should be shown in menus. See
24135  * #G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show().
24136  *
24137  * Returns: The value of the NoDisplay key
24138  * Since: 2.30
24139  */
24140
24141
24142 /**
24143  * g_desktop_app_info_get_show_in:
24144  * @info: a #GDesktopAppInfo
24145  * @desktop_env: a string specifying a desktop name
24146  *
24147  * Checks if the application info should be shown in menus that list available
24148  * applications for a specific name of the desktop, based on the
24149  * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal> keys.
24150  *
24151  * If @desktop_env is %NULL, then the name of the desktop set with
24152  * g_desktop_app_info_set_desktop_env() is used.
24153  *
24154  * Note that g_app_info_should_show() for @info will include this check (with
24155  * %NULL for @desktop_env) as well as additional checks.
24156  *
24157  * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal> keys, %FALSE
24158  * otherwise.
24159  *
24160  * Returns: %TRUE if the @info should be shown in @desktop_env according to the
24161  * Since: 2.30
24162  */
24163
24164
24165 /**
24166  * g_desktop_app_info_launch_uris_as_manager:
24167  * @appinfo: a #GDesktopAppInfo
24168  * @uris: (element-type utf8): List of URIs
24169  * @launch_context: a #GAppLaunchContext
24170  * @spawn_flags: #GSpawnFlags, used for each process
24171  * @user_setup: (scope call): a #GSpawnChildSetupFunc, used once for each process.
24172  * @user_setup_data: (closure user_setup): User data for @user_setup
24173  * @pid_callback: (scope call): Callback for child processes
24174  * @pid_callback_data: (closure pid_callback): User data for @callback
24175  * @error: return location for a #GError, or %NULL
24176  *
24177  * This function performs the equivalent of g_app_info_launch_uris(),
24178  * but is intended primarily for operating system components that
24179  * launch applications.  Ordinary applications should use
24180  * g_app_info_launch_uris().
24181  *
24182  * In contrast to g_app_info_launch_uris(), all processes created will
24183  * always be run directly as children as if by the UNIX fork()/exec()
24184  * calls.
24185  *
24186  * This guarantee allows additional control over the exact environment
24187  * of the child processes, which is provided via a setup function
24188  * @user_setup, as well as the process identifier of each child process
24189  * via @pid_callback. See g_spawn_async() for more information about the
24190  * semantics of the @user_setup function.
24191  *
24192  * Returns: %TRUE on successful launch, %FALSE otherwise.
24193  */
24194
24195
24196 /**
24197  * g_desktop_app_info_lookup_get_default_for_uri_scheme:
24198  * @lookup: a #GDesktopAppInfoLookup
24199  * @uri_scheme: a string containing a URI scheme.
24200  *
24201  * Gets the default application for launching applications
24202  * using this URI scheme for a particular GDesktopAppInfoLookup
24203  * implementation.
24204  *
24205  * The GDesktopAppInfoLookup interface and this function is used
24206  * to implement g_app_info_get_default_for_uri_scheme() backends
24207  * in a GIO module. There is no reason for applications to use it
24208  * directly. Applications should use g_app_info_get_default_for_uri_scheme().
24209  *
24210  * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
24211  * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
24212  */
24213
24214
24215 /**
24216  * g_desktop_app_info_new:
24217  * @desktop_id: the desktop file id
24218  *
24219  * Creates a new #GDesktopAppInfo based on a desktop file id.
24220  *
24221  * A desktop file id is the basename of the desktop file, including the
24222  * .desktop extension. GIO is looking for a desktop file with this name
24223  * in the <filename>applications</filename> subdirectories of the XDG data
24224  * directories (i.e. the directories specified in the
24225  * <envar>XDG_DATA_HOME</envar> and <envar>XDG_DATA_DIRS</envar> environment
24226  * variables). GIO also supports the prefix-to-subdirectory mapping that is
24227  * described in the <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Menu Spec</ulink>
24228  * (i.e. a desktop id of kde-foo.desktop will match
24229  * <filename>/usr/share/applications/kde/foo.desktop</filename>).
24230  *
24231  * Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id
24232  */
24233
24234
24235 /**
24236  * g_desktop_app_info_new_from_filename:
24237  * @filename: the path of a desktop file, in the GLib filename encoding
24238  *
24239  * Creates a new #GDesktopAppInfo.
24240  *
24241  * Returns: a new #GDesktopAppInfo or %NULL on error.
24242  */
24243
24244
24245 /**
24246  * g_desktop_app_info_new_from_keyfile:
24247  * @key_file: an opened #GKeyFile
24248  *
24249  * Creates a new #GDesktopAppInfo.
24250  *
24251  * Returns: a new #GDesktopAppInfo or %NULL on error.
24252  * Since: 2.18
24253  */
24254
24255
24256 /**
24257  * g_desktop_app_info_set_desktop_env:
24258  * @desktop_env: a string specifying what desktop this is
24259  *
24260  * Sets the name of the desktop that the application is running in.
24261  * This is used by g_app_info_should_show() and
24262  * g_desktop_app_info_get_show_in() to evaluate the
24263  * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal>
24264  * desktop entry fields.
24265  *
24266  * The <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Desktop
24267  * Menu specification</ulink> recognizes the following:
24268  * <simplelist>
24269  * <member>GNOME</member>
24270  * <member>KDE</member>
24271  * <member>ROX</member>
24272  * <member>XFCE</member>
24273  * <member>LXDE</member>
24274  * <member>Unity</member>
24275  * <member>Old</member>
24276  * </simplelist>
24277  *
24278  * Should be called only once; subsequent calls are ignored.
24279  */
24280
24281
24282 /**
24283  * g_drive_can_eject:
24284  * @drive: a #GDrive.
24285  *
24286  * Checks if a drive can be ejected.
24287  *
24288  * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise.
24289  */
24290
24291
24292 /**
24293  * g_drive_can_poll_for_media:
24294  * @drive: a #GDrive.
24295  *
24296  * Checks if a drive can be polled for media changes.
24297  *
24298  * %FALSE otherwise.
24299  *
24300  * Returns: %TRUE if the @drive can be polled for media changes,
24301  */
24302
24303
24304 /**
24305  * g_drive_can_start:
24306  * @drive: a #GDrive.
24307  *
24308  * Checks if a drive can be started.
24309  *
24310  * Returns: %TRUE if the @drive can be started, %FALSE otherwise.
24311  * Since: 2.22
24312  */
24313
24314
24315 /**
24316  * g_drive_can_start_degraded:
24317  * @drive: a #GDrive.
24318  *
24319  * Checks if a drive can be started degraded.
24320  *
24321  * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise.
24322  * Since: 2.22
24323  */
24324
24325
24326 /**
24327  * g_drive_can_stop:
24328  * @drive: a #GDrive.
24329  *
24330  * Checks if a drive can be stopped.
24331  *
24332  * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise.
24333  * Since: 2.22
24334  */
24335
24336
24337 /**
24338  * g_drive_eject:
24339  * @drive: a #GDrive.
24340  * @flags: flags affecting the unmount if required for eject
24341  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24342  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24343  * @user_data: user data to pass to @callback
24344  *
24345  * Asynchronously ejects a drive.
24346  *
24347  * When the operation is finished, @callback will be called.
24348  * You can then call g_drive_eject_finish() to obtain the
24349  * result of the operation.
24350  *
24351  * Deprecated: 2.22: Use g_drive_eject_with_operation() instead.
24352  */
24353
24354
24355 /**
24356  * g_drive_eject_finish:
24357  * @drive: a #GDrive.
24358  * @result: a #GAsyncResult.
24359  * @error: a #GError, or %NULL
24360  *
24361  * Finishes ejecting a drive.
24362  *
24363  * %FALSE otherwise.
24364  *
24365  * Returns: %TRUE if the drive has been ejected successfully,
24366  * Deprecated: 2.22: Use g_drive_eject_with_operation_finish() instead.
24367  */
24368
24369
24370 /**
24371  * g_drive_eject_with_operation:
24372  * @drive: a #GDrive.
24373  * @flags: flags affecting the unmount if required for eject
24374  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24375  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24376  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24377  * @user_data: user data passed to @callback.
24378  *
24379  * Ejects a drive. This is an asynchronous operation, and is
24380  * finished by calling g_drive_eject_with_operation_finish() with the @drive
24381  * and #GAsyncResult data returned in the @callback.
24382  *
24383  * Since: 2.22
24384  */
24385
24386
24387 /**
24388  * g_drive_eject_with_operation_finish:
24389  * @drive: a #GDrive.
24390  * @result: a #GAsyncResult.
24391  * @error: a #GError location to store the error occurring, or %NULL to ignore.
24392  *
24393  * Finishes ejecting a drive. If any errors occurred during the operation,
24394  * @error will be set to contain the errors and %FALSE will be returned.
24395  *
24396  * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise.
24397  * Since: 2.22
24398  */
24399
24400
24401 /**
24402  * g_drive_enumerate_identifiers:
24403  * @drive: a #GDrive
24404  *
24405  * Gets the kinds of identifiers that @drive has.
24406  * Use g_drive_get_identifer() to obtain the identifiers
24407  * themselves.
24408  *
24409  * array of strings containing kinds of identifiers. Use g_strfreev()
24410  * to free.
24411  *
24412  * Returns: (transfer full) (array zero-terminated=1): a %NULL-terminated
24413  */
24414
24415
24416 /**
24417  * g_drive_get_icon:
24418  * @drive: a #GDrive.
24419  *
24420  * Gets the icon for @drive.
24421  *
24422  * Free the returned object with g_object_unref().
24423  *
24424  * Returns: (transfer full): #GIcon for the @drive.
24425  */
24426
24427
24428 /**
24429  * g_drive_get_identifier:
24430  * @drive: a #GDrive
24431  * @kind: the kind of identifier to return
24432  *
24433  * Gets the identifier of the given kind for @drive.
24434  *
24435  * requested identfier, or %NULL if the #GDrive
24436  * doesn't have this kind of identifier.
24437  *
24438  * Returns: a newly allocated string containing the
24439  */
24440
24441
24442 /**
24443  * g_drive_get_name:
24444  * @drive: a #GDrive.
24445  *
24446  * Gets the name of @drive.
24447  *
24448  * string should be freed when no longer needed.
24449  *
24450  * Returns: a string containing @drive's name. The returned
24451  */
24452
24453
24454 /**
24455  * g_drive_get_sort_key:
24456  * @drive: A #GDrive.
24457  *
24458  * Gets the sort key for @drive, if any.
24459  *
24460  * Returns: Sorting key for @drive or %NULL if no such key is available.
24461  * Since: 2.32
24462  */
24463
24464
24465 /**
24466  * g_drive_get_start_stop_type:
24467  * @drive: a #GDrive.
24468  *
24469  * Gets a hint about how a drive can be started/stopped.
24470  *
24471  * Returns: A value from the #GDriveStartStopType enumeration.
24472  * Since: 2.22
24473  */
24474
24475
24476 /**
24477  * g_drive_get_volumes:
24478  * @drive: a #GDrive.
24479  *
24480  * Get a list of mountable volumes for @drive.
24481  *
24482  * The returned list should be freed with g_list_free(), after
24483  * its elements have been unreffed with g_object_unref().
24484  *
24485  * Returns: (element-type GVolume) (transfer full): #GList containing any #GVolume objects on the given @drive.
24486  */
24487
24488
24489 /**
24490  * g_drive_has_media:
24491  * @drive: a #GDrive.
24492  *
24493  * Checks if the @drive has media. Note that the OS may not be polling
24494  * the drive for media changes; see g_drive_is_media_check_automatic()
24495  * for more details.
24496  *
24497  * Returns: %TRUE if @drive has media, %FALSE otherwise.
24498  */
24499
24500
24501 /**
24502  * g_drive_has_volumes:
24503  * @drive: a #GDrive.
24504  *
24505  * Check if @drive has any mountable volumes.
24506  *
24507  * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise.
24508  */
24509
24510
24511 /**
24512  * g_drive_is_media_check_automatic:
24513  * @drive: a #GDrive.
24514  *
24515  * Checks if @drive is capabable of automatically detecting media changes.
24516  *
24517  * media changes, %FALSE otherwise.
24518  *
24519  * Returns: %TRUE if the @drive is capabable of automatically detecting
24520  */
24521
24522
24523 /**
24524  * g_drive_is_media_removable:
24525  * @drive: a #GDrive.
24526  *
24527  * Checks if the @drive supports removable media.
24528  *
24529  * Returns: %TRUE if @drive supports removable media, %FALSE otherwise.
24530  */
24531
24532
24533 /**
24534  * g_drive_poll_for_media:
24535  * @drive: a #GDrive.
24536  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24537  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24538  * @user_data: user data to pass to @callback
24539  *
24540  * Asynchronously polls @drive to see if media has been inserted or removed.
24541  *
24542  * When the operation is finished, @callback will be called.
24543  * You can then call g_drive_poll_for_media_finish() to obtain the
24544  * result of the operation.
24545  */
24546
24547
24548 /**
24549  * g_drive_poll_for_media_finish:
24550  * @drive: a #GDrive.
24551  * @result: a #GAsyncResult.
24552  * @error: a #GError, or %NULL
24553  *
24554  * Finishes an operation started with g_drive_poll_for_media() on a drive.
24555  *
24556  * %FALSE otherwise.
24557  *
24558  * Returns: %TRUE if the drive has been poll_for_mediaed successfully,
24559  */
24560
24561
24562 /**
24563  * g_drive_start:
24564  * @drive: a #GDrive.
24565  * @flags: flags affecting the start operation.
24566  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24567  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24568  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24569  * @user_data: user data to pass to @callback
24570  *
24571  * Asynchronously starts a drive.
24572  *
24573  * When the operation is finished, @callback will be called.
24574  * You can then call g_drive_start_finish() to obtain the
24575  * result of the operation.
24576  *
24577  * Since: 2.22
24578  */
24579
24580
24581 /**
24582  * g_drive_start_finish:
24583  * @drive: a #GDrive.
24584  * @result: a #GAsyncResult.
24585  * @error: a #GError, or %NULL
24586  *
24587  * Finishes starting a drive.
24588  *
24589  * %FALSE otherwise.
24590  *
24591  * Returns: %TRUE if the drive has been started successfully,
24592  * Since: 2.22
24593  */
24594
24595
24596 /**
24597  * g_drive_stop:
24598  * @drive: a #GDrive.
24599  * @flags: flags affecting the unmount if required for stopping.
24600  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24601  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24602  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24603  * @user_data: user data to pass to @callback
24604  *
24605  * Asynchronously stops a drive.
24606  *
24607  * When the operation is finished, @callback will be called.
24608  * You can then call g_drive_stop_finish() to obtain the
24609  * result of the operation.
24610  *
24611  * Since: 2.22
24612  */
24613
24614
24615 /**
24616  * g_drive_stop_finish:
24617  * @drive: a #GDrive.
24618  * @result: a #GAsyncResult.
24619  * @error: a #GError, or %NULL
24620  *
24621  * Finishes stopping a drive.
24622  *
24623  * %FALSE otherwise.
24624  *
24625  * Returns: %TRUE if the drive has been stopped successfully,
24626  * Since: 2.22
24627  */
24628
24629
24630 /**
24631  * g_emblem_get_icon:
24632  * @emblem: a #GEmblem from which the icon should be extracted.
24633  *
24634  * Gives back the icon from @emblem.
24635  *
24636  * the emblem and should not be modified or freed.
24637  *
24638  * Returns: (transfer none): a #GIcon. The returned object belongs to
24639  * Since: 2.18
24640  */
24641
24642
24643 /**
24644  * g_emblem_get_origin:
24645  * @emblem: a #GEmblem
24646  *
24647  * Gets the origin of the emblem.
24648  *
24649  * Returns: (transfer none): the origin of the emblem
24650  * Since: 2.18
24651  */
24652
24653
24654 /**
24655  * g_emblem_new:
24656  * @icon: a GIcon containing the icon.
24657  *
24658  * Creates a new emblem for @icon.
24659  *
24660  * Returns: a new #GEmblem.
24661  * Since: 2.18
24662  */
24663
24664
24665 /**
24666  * g_emblem_new_with_origin:
24667  * @icon: a GIcon containing the icon.
24668  * @origin: a GEmblemOrigin enum defining the emblem's origin
24669  *
24670  * Creates a new emblem for @icon.
24671  *
24672  * Returns: a new #GEmblem.
24673  * Since: 2.18
24674  */
24675
24676
24677 /**
24678  * g_emblemed_icon_add_emblem:
24679  * @emblemed: a #GEmblemedIcon
24680  * @emblem: a #GEmblem
24681  *
24682  * Adds @emblem to the #GList of #GEmblem <!-- -->s.
24683  *
24684  * Since: 2.18
24685  */
24686
24687
24688 /**
24689  * g_emblemed_icon_clear_emblems:
24690  * @emblemed: a #GEmblemedIcon
24691  *
24692  * Removes all the emblems from @icon.
24693  *
24694  * Since: 2.28
24695  */
24696
24697
24698 /**
24699  * g_emblemed_icon_get_emblems:
24700  * @emblemed: a #GEmblemedIcon
24701  *
24702  * Gets the list of emblems for the @icon.
24703  *
24704  * #GEmblem <!-- -->s that is owned by @emblemed
24705  *
24706  * Returns: (element-type Gio.Emblem) (transfer none): a #GList of
24707  * Since: 2.18
24708  */
24709
24710
24711 /**
24712  * g_emblemed_icon_get_icon:
24713  * @emblemed: a #GEmblemedIcon
24714  *
24715  * Gets the main icon for @emblemed.
24716  *
24717  * Returns: (transfer none): a #GIcon that is owned by @emblemed
24718  * Since: 2.18
24719  */
24720
24721
24722 /**
24723  * g_emblemed_icon_new:
24724  * @icon: a #GIcon
24725  * @emblem: (allow-none): a #GEmblem, or %NULL
24726  *
24727  * Creates a new emblemed icon for @icon with the emblem @emblem.
24728  *
24729  * Returns: (transfer full) (type GEmblemedIcon): a new #GIcon
24730  * Since: 2.18
24731  */
24732
24733
24734 /**
24735  * g_file_append_to:
24736  * @file: input #GFile.
24737  * @flags: a set of #GFileCreateFlags.
24738  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24739  * @error: a #GError, or %NULL
24740  *
24741  * Gets an output stream for appending data to the file. If
24742  * the file doesn't already exist it is created.
24743  *
24744  * By default files created are generally readable by everyone,
24745  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
24746  * will be made readable only to the current user, to the level that
24747  * is supported on the target filesystem.
24748  *
24749  * If @cancellable is not %NULL, then the operation can be cancelled by
24750  * triggering the cancellable object from another thread. If the operation
24751  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24752  *
24753  * Some file systems don't allow all file names, and may
24754  * return an %G_IO_ERROR_INVALID_FILENAME error.
24755  * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will be
24756  * returned. Other errors are possible too, and depend on what kind of
24757  * filesystem the file is on.
24758  *
24759  * Free the returned object with g_object_unref().
24760  *
24761  * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
24762  */
24763
24764
24765 /**
24766  * g_file_append_to_async:
24767  * @file: input #GFile.
24768  * @flags: a set of #GFileCreateFlags.
24769  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
24770  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24771  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
24772  * @user_data: (closure): the data to pass to callback function
24773  *
24774  * Asynchronously opens @file for appending.
24775  *
24776  * For more details, see g_file_append_to() which is
24777  * the synchronous version of this call.
24778  *
24779  * When the operation is finished, @callback will be called. You can then call
24780  * g_file_append_to_finish() to get the result of the operation.
24781  */
24782
24783
24784 /**
24785  * g_file_append_to_finish:
24786  * @file: input #GFile.
24787  * @res: #GAsyncResult
24788  * @error: a #GError, or %NULL
24789  *
24790  * Finishes an asynchronous file append operation started with
24791  * g_file_append_to_async().
24792  *
24793  * Free the returned object with g_object_unref().
24794  *
24795  * Returns: (transfer full): a valid #GFileOutputStream or %NULL on error.
24796  */
24797
24798
24799 /**
24800  * g_file_attribute_info_list_add:
24801  * @list: a #GFileAttributeInfoList.
24802  * @name: the name of the attribute to add.
24803  * @type: the #GFileAttributeType for the attribute.
24804  * @flags: #GFileAttributeInfoFlags for the attribute.
24805  *
24806  * Adds a new attribute with @name to the @list, setting
24807  * its @type and @flags.
24808  */
24809
24810
24811 /**
24812  * g_file_attribute_info_list_dup:
24813  * @list: a #GFileAttributeInfoList to duplicate.
24814  *
24815  * Makes a duplicate of a file attribute info list.
24816  *
24817  * Returns: a copy of the given @list.
24818  */
24819
24820
24821 /**
24822  * g_file_attribute_info_list_lookup:
24823  * @list: a #GFileAttributeInfoList.
24824  * @name: the name of the attribute to lookup.
24825  *
24826  * Gets the file attribute with the name @name from @list.
24827  *
24828  * attribute isn't found.
24829  *
24830  * Returns: a #GFileAttributeInfo for the @name, or %NULL if an
24831  */
24832
24833
24834 /**
24835  * g_file_attribute_info_list_new:
24836  *
24837  * Creates a new file attribute info list.
24838  *
24839  * Returns: a #GFileAttributeInfoList.
24840  */
24841
24842
24843 /**
24844  * g_file_attribute_info_list_ref:
24845  * @list: a #GFileAttributeInfoList to reference.
24846  *
24847  * References a file attribute info list.
24848  *
24849  * Returns: #GFileAttributeInfoList or %NULL on error.
24850  */
24851
24852
24853 /**
24854  * g_file_attribute_info_list_unref:
24855  * @list: The #GFileAttributeInfoList to unreference.
24856  *
24857  * Removes a reference from the given @list. If the reference count
24858  * falls to zero, the @list is deleted.
24859  */
24860
24861
24862 /**
24863  * g_file_attribute_matcher_enumerate_namespace:
24864  * @matcher: a #GFileAttributeMatcher.
24865  * @ns: a string containing a file attribute namespace.
24866  *
24867  * Checks if the matcher will match all of the keys in a given namespace.
24868  * This will always return %TRUE if a wildcard character is in use (e.g. if
24869  * matcher was created with "standard::*" and @ns is "standard", or if matcher was created
24870  * using "*" and namespace is anything.)
24871  *
24872  * TODO: this is awkwardly worded.
24873  *
24874  * in the given @ns, %FALSE otherwise.
24875  *
24876  * Returns: %TRUE if the matcher matches all of the entries
24877  */
24878
24879
24880 /**
24881  * g_file_attribute_matcher_enumerate_next:
24882  * @matcher: a #GFileAttributeMatcher.
24883  *
24884  * Gets the next matched attribute from a #GFileAttributeMatcher.
24885  *
24886  * no more attribute exist.
24887  *
24888  * Returns: a string containing the next attribute or %NULL if
24889  */
24890
24891
24892 /**
24893  * g_file_attribute_matcher_matches:
24894  * @matcher: a #GFileAttributeMatcher.
24895  * @attribute: a file attribute key.
24896  *
24897  * Checks if an attribute will be matched by an attribute matcher. If
24898  * the matcher was created with the "*" matching string, this function
24899  * will always return %TRUE.
24900  *
24901  * Returns: %TRUE if @attribute matches @matcher. %FALSE otherwise.
24902  */
24903
24904
24905 /**
24906  * g_file_attribute_matcher_matches_only:
24907  * @matcher: a #GFileAttributeMatcher.
24908  * @attribute: a file attribute key.
24909  *
24910  * Checks if a attribute matcher only matches a given attribute. Always
24911  * returns %FALSE if "*" was used when creating the matcher.
24912  *
24913  * Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise.
24914  */
24915
24916
24917 /**
24918  * g_file_attribute_matcher_new:
24919  * @attributes: an attribute string to match.
24920  *
24921  * Creates a new file attribute matcher, which matches attributes
24922  * against a given string. #GFileAttributeMatcher<!-- -->s are reference
24923  * counted structures, and are created with a reference count of 1. If
24924  * the number of references falls to 0, the #GFileAttributeMatcher is
24925  * automatically destroyed.
24926  *
24927  * The @attribute string should be formatted with specific keys separated
24928  * from namespaces with a double colon. Several "namespace::key" strings may be
24929  * concatenated with a single comma (e.g. "standard::type,standard::is-hidden").
24930  * The wildcard "*" may be used to match all keys and namespaces, or
24931  * "namespace::*" will match all keys in a given namespace.
24932  *
24933  * Examples of strings to use:
24934  * <table>
24935  * <title>File Attribute Matcher strings and results</title>
24936  * <tgroup cols='2' align='left'><thead>
24937  * <row><entry> Matcher String </entry><entry> Matches </entry></row></thead>
24938  * <tbody>
24939  * <row><entry>"*"</entry><entry>matches all attributes.</entry></row>
24940  * <row><entry>"standard::is-hidden"</entry><entry>matches only the key is-hidden in the standard namespace.</entry></row>
24941  * <row><entry>"standard::type,unix::*"</entry><entry>matches the type key in the standard namespace and
24942  * all keys in the unix namespace.</entry></row>
24943  * </tbody></tgroup>
24944  * </table>
24945  *
24946  * Returns: a #GFileAttributeMatcher.
24947  */
24948
24949
24950 /**
24951  * g_file_attribute_matcher_ref:
24952  * @matcher: a #GFileAttributeMatcher.
24953  *
24954  * References a file attribute matcher.
24955  *
24956  * Returns: a #GFileAttributeMatcher.
24957  */
24958
24959
24960 /**
24961  * g_file_attribute_matcher_subtract:
24962  * @matcher: Matcher to subtract from
24963  * @subtract: The matcher to subtract
24964  *
24965  * Subtracts all attributes of @subtract from @matcher and returns
24966  * a matcher that supports those attributes.
24967  *
24968  * Note that currently it is not possible to remove a single
24969  * attribute when the @matcher matches the whole namespace - or remove
24970  * a namespace or attribute when the matcher matches everything. This
24971  * is a limitation of the current implementation, but may be fixed
24972  * in the future.
24973  *
24974  * @matcher that are not matched by @subtract
24975  *
24976  * Returns: A file attribute matcher matching all attributes of
24977  */
24978
24979
24980 /**
24981  * g_file_attribute_matcher_to_string:
24982  * @matcher: (allow-none): a #GFileAttributeMatcher.
24983  *
24984  * Prints what the matcher is matching against. The format will be
24985  * equal to the format passed to g_file_attribute_matcher_new().
24986  * The output however, might not be identical, as the matcher may
24987  * decide to use a different order or omit needless parts.
24988  *
24989  * against or %NULL if @matcher was %NULL.
24990  *
24991  * Returns: a string describing the attributes the matcher matches
24992  * Since: 2.32
24993  */
24994
24995
24996 /**
24997  * g_file_attribute_matcher_unref:
24998  * @matcher: a #GFileAttributeMatcher.
24999  *
25000  * Unreferences @matcher. If the reference count falls below 1,
25001  * the @matcher is automatically freed.
25002  */
25003
25004
25005 /**
25006  * g_file_copy:
25007  * @source: input #GFile.
25008  * @destination: destination #GFile
25009  * @flags: set of #GFileCopyFlags
25010  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
25011  * @progress_callback: (allow-none) (scope call): function to callback with progress information, or %NULL if progress information is not needed
25012  * @progress_callback_data: (closure): user data to pass to @progress_callback
25013  * @error: #GError to set on error, or %NULL
25014  *
25015  * Copies the file @source to the location specified by @destination.
25016  * Can not handle recursive copies of directories.
25017  *
25018  * If the flag #G_FILE_COPY_OVERWRITE is specified an already
25019  * existing @destination file is overwritten.
25020  *
25021  * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
25022  * will be copied as symlinks, otherwise the target of the
25023  * @source symlink will be copied.
25024  *
25025  * If @cancellable is not %NULL, then the operation can be cancelled by
25026  * triggering the cancellable object from another thread. If the operation
25027  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25028  *
25029  * If @progress_callback is not %NULL, then the operation can be monitored by
25030  * setting this to a #GFileProgressCallback function. @progress_callback_data
25031  * will be passed to this function. It is guaranteed that this callback will
25032  * be called after all data has been transferred with the total number of bytes
25033  * copied during the operation.
25034  *
25035  * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
25036  * error is returned, independent on the status of the @destination.
25037  *
25038  * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
25039  * error G_IO_ERROR_EXISTS is returned.
25040  *
25041  * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
25042  * error is returned. If trying to overwrite a directory with a directory the
25043  * G_IO_ERROR_WOULD_MERGE error is returned.
25044  *
25045  * If the source is a directory and the target does not exist, or
25046  * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then the
25047  * G_IO_ERROR_WOULD_RECURSE error is returned.
25048  *
25049  * If you are interested in copying the #GFile object itself (not the on-disk
25050  * file), see g_file_dup().
25051  *
25052  * Returns: %TRUE on success, %FALSE otherwise.
25053  */
25054
25055
25056 /**
25057  * g_file_copy_async: (skip)
25058  * @source: input #GFile.
25059  * @destination: destination #GFile
25060  * @flags: set of #GFileCopyFlags
25061  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
25062  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
25063  * @progress_callback: (allow-none): function to callback with progress information, or %NULL if progress information is not needed
25064  * @progress_callback_data: (closure): user data to pass to @progress_callback
25065  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
25066  * @user_data: the data to pass to callback function
25067  *
25068  * Copies the file @source to the location specified by @destination
25069  * asynchronously. For details of the behaviour, see g_file_copy().
25070  *
25071  * If @progress_callback is not %NULL, then that function that will be called
25072  * just like in g_file_copy(), however the callback will run in the main loop,
25073  * not in the thread that is doing the I/O operation.
25074  *
25075  * When the operation is finished, @callback will be called. You can then call
25076  * g_file_copy_finish() to get the result of the operation.
25077  */
25078
25079
25080 /**
25081  * g_file_copy_attributes:
25082  * @source: a #GFile with attributes.
25083  * @destination: a #GFile to copy attributes to.
25084  * @flags: a set of #GFileCopyFlags.
25085  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25086  * @error: a #GError, %NULL to ignore.
25087  *
25088  * Copies the file attributes from @source to @destination.
25089  *
25090  * Normally only a subset of the file attributes are copied,
25091  * those that are copies in a normal file copy operation
25092  * (which for instance does not include e.g. owner). However
25093  * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then
25094  * all the metadata that is possible to copy is copied. This
25095  * is useful when implementing move by copy + delete source.
25096  *
25097  * Returns: %TRUE if the attributes were copied successfully, %FALSE otherwise.
25098  */
25099
25100
25101 /**
25102  * g_file_copy_finish:
25103  * @file: input #GFile.
25104  * @res: a #GAsyncResult.
25105  * @error: a #GError, or %NULL
25106  *
25107  * Finishes copying the file started with
25108  * g_file_copy_async().
25109  *
25110  * Returns: a %TRUE on success, %FALSE on error.
25111  */
25112
25113
25114 /**
25115  * g_file_create:
25116  * @file: input #GFile.
25117  * @flags: a set of #GFileCreateFlags.
25118  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25119  * @error: a #GError, or %NULL
25120  *
25121  * Creates a new file and returns an output stream for writing to it.
25122  * The file must not already exist.
25123  *
25124  * By default files created are generally readable by everyone,
25125  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
25126  * will be made readable only to the current user, to the level that
25127  * is supported on the target filesystem.
25128  *
25129  * If @cancellable is not %NULL, then the operation can be cancelled by
25130  * triggering the cancellable object from another thread. If the operation
25131  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25132  *
25133  * If a file or directory with this name already exists the G_IO_ERROR_EXISTS
25134  * error will be returned.
25135  * Some file systems don't allow all file names, and may
25136  * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
25137  * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
25138  * Other errors are possible too, and depend on what kind of
25139  * filesystem the file is on.
25140  *
25141  * %NULL on error.
25142  * Free the returned object with g_object_unref().
25143  *
25144  * Returns: (transfer full): a #GFileOutputStream for the newly created file, or
25145  */
25146
25147
25148 /**
25149  * g_file_create_async:
25150  * @file: input #GFile.
25151  * @flags: a set of #GFileCreateFlags.
25152  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
25153  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25154  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25155  * @user_data: (closure): the data to pass to callback function
25156  *
25157  * Asynchronously creates a new file and returns an output stream for writing to it.
25158  * The file must not already exist.
25159  *
25160  * For more details, see g_file_create() which is
25161  * the synchronous version of this call.
25162  *
25163  * When the operation is finished, @callback will be called. You can then call
25164  * g_file_create_finish() to get the result of the operation.
25165  */
25166
25167
25168 /**
25169  * g_file_create_finish:
25170  * @file: input #GFile.
25171  * @res: a #GAsyncResult.
25172  * @error: a #GError, or %NULL
25173  *
25174  * Finishes an asynchronous file create operation started with
25175  * g_file_create_async().
25176  *
25177  * Free the returned object with g_object_unref().
25178  *
25179  * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
25180  */
25181
25182
25183 /**
25184  * g_file_create_readwrite:
25185  * @file: a #GFile
25186  * @flags: a set of #GFileCreateFlags
25187  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
25188  * @error: return location for a #GError, or %NULL
25189  *
25190  * Creates a new file and returns a stream for reading and writing to it.
25191  * The file must not already exist.
25192  *
25193  * By default files created are generally readable by everyone,
25194  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
25195  * will be made readable only to the current user, to the level that
25196  * is supported on the target filesystem.
25197  *
25198  * If @cancellable is not %NULL, then the operation can be cancelled by
25199  * triggering the cancellable object from another thread. If the operation
25200  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25201  *
25202  * If a file or directory with this name already exists the %G_IO_ERROR_EXISTS
25203  * error will be returned. Some file systems don't allow all file names,
25204  * and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name
25205  * is too long, %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors
25206  * are possible too, and depend on what kind of filesystem the file is on.
25207  *
25208  * Note that in many non-local file cases read and write streams are not
25209  * supported, so make sure you really need to do read and write streaming,
25210  * rather than just opening for reading or writing.
25211  *
25212  * Free the returned object with g_object_unref().
25213  *
25214  * Returns: (transfer full): a #GFileIOStream for the newly created file, or %NULL on error.
25215  * Since: 2.22
25216  */
25217
25218
25219 /**
25220  * g_file_create_readwrite_async:
25221  * @file: input #GFile
25222  * @flags: a set of #GFileCreateFlags
25223  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
25224  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
25225  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25226  * @user_data: (closure): the data to pass to callback function
25227  *
25228  * Asynchronously creates a new file and returns a stream for reading and
25229  * writing to it. The file must not already exist.
25230  *
25231  * For more details, see g_file_create_readwrite() which is
25232  * the synchronous version of this call.
25233  *
25234  * When the operation is finished, @callback will be called. You can then
25235  * call g_file_create_readwrite_finish() to get the result of the operation.
25236  *
25237  * Since: 2.22
25238  */
25239
25240
25241 /**
25242  * g_file_create_readwrite_finish:
25243  * @file: input #GFile
25244  * @res: a #GAsyncResult
25245  * @error: a #GError, or %NULL
25246  *
25247  * Finishes an asynchronous file create operation started with
25248  * g_file_create_readwrite_async().
25249  *
25250  * Free the returned object with g_object_unref().
25251  *
25252  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
25253  * Since: 2.22
25254  */
25255
25256
25257 /**
25258  * g_file_delete:
25259  * @file: input #GFile.
25260  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25261  * @error: a #GError, or %NULL
25262  *
25263  * Deletes a file. If the @file is a directory, it will only be deleted if it
25264  * is empty.
25265  *
25266  * If @cancellable is not %NULL, then the operation can be cancelled by
25267  * triggering the cancellable object from another thread. If the operation
25268  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25269  *
25270  * Virtual: delete_file
25271  * Returns: %TRUE if the file was deleted. %FALSE otherwise.
25272  */
25273
25274
25275 /**
25276  * g_file_descriptor_based_get_fd:
25277  * @fd_based: a #GFileDescriptorBased.
25278  *
25279  * Gets the underlying file descriptor.
25280  *
25281  * Returns: The file descriptor
25282  * Since: 2.24
25283  */
25284
25285
25286 /**
25287  * g_file_dup:
25288  * @file: input #GFile.
25289  *
25290  * Duplicates a #GFile handle. This operation does not duplicate
25291  * the actual file or directory represented by the #GFile; see
25292  * g_file_copy() if attempting to copy a file.
25293  *
25294  * This call does no blocking i/o.
25295  *
25296  * Returns: (transfer full): a new #GFile that is a duplicate of the given #GFile.
25297  */
25298
25299
25300 /**
25301  * g_file_eject_mountable:
25302  * @file: input #GFile.
25303  * @flags: flags affecting the operation
25304  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25305  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
25306  * @user_data: (closure): the data to pass to callback function
25307  *
25308  * Starts an asynchronous eject on a mountable.
25309  * When this operation has completed, @callback will be called with
25310  * @user_user data, and the operation can be finalized with
25311  * g_file_eject_mountable_finish().
25312  *
25313  * If @cancellable is not %NULL, then the operation can be cancelled by
25314  * triggering the cancellable object from another thread. If the operation
25315  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25316  *
25317  * Deprecated: 2.22: Use g_file_eject_mountable_with_operation() instead.
25318  */
25319
25320
25321 /**
25322  * g_file_eject_mountable_finish:
25323  * @file: input #GFile.
25324  * @result: a #GAsyncResult.
25325  * @error: a #GError, or %NULL
25326  *
25327  * Finishes an asynchronous eject operation started by
25328  * g_file_eject_mountable().
25329  *
25330  * otherwise.
25331  *
25332  * Returns: %TRUE if the @file was ejected successfully. %FALSE
25333  * Deprecated: 2.22: Use g_file_eject_mountable_with_operation_finish() instead.
25334  */
25335
25336
25337 /**
25338  * g_file_eject_mountable_with_operation:
25339  * @file: input #GFile.
25340  * @flags: flags affecting the operation
25341  * @mount_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
25342  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25343  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
25344  * @user_data: (closure): the data to pass to callback function
25345  *
25346  * Starts an asynchronous eject on a mountable.
25347  * When this operation has completed, @callback will be called with
25348  * @user_user data, and the operation can be finalized with
25349  * g_file_eject_mountable_with_operation_finish().
25350  *
25351  * If @cancellable is not %NULL, then the operation can be cancelled by
25352  * triggering the cancellable object from another thread. If the operation
25353  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25354  *
25355  * Since: 2.22
25356  */
25357
25358
25359 /**
25360  * g_file_eject_mountable_with_operation_finish:
25361  * @file: input #GFile.
25362  * @result: a #GAsyncResult.
25363  * @error: a #GError, or %NULL
25364  *
25365  * Finishes an asynchronous eject operation started by
25366  * g_file_eject_mountable_with_operation().
25367  *
25368  * otherwise.
25369  *
25370  * Returns: %TRUE if the @file was ejected successfully. %FALSE
25371  * Since: 2.22
25372  */
25373
25374
25375 /**
25376  * g_file_enumerate_children:
25377  * @file: input #GFile.
25378  * @attributes: an attribute query string.
25379  * @flags: a set of #GFileQueryInfoFlags.
25380  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25381  * @error: #GError for error reporting.
25382  *
25383  * Gets the requested information about the files in a directory. The result
25384  * is a #GFileEnumerator object that will give out #GFileInfo objects for
25385  * all the files in the directory.
25386  *
25387  * The @attributes value is a string that specifies the file attributes that
25388  * should be gathered. It is not an error if it's not possible to read a particular
25389  * requested attribute from a file - it just won't be set. @attributes should
25390  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
25391  * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
25392  * namespace. An example attribute query be "standard::*,owner::user".
25393  * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
25394  *
25395  * If @cancellable is not %NULL, then the operation can be cancelled by
25396  * triggering the cancellable object from another thread. If the operation
25397  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25398  *
25399  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
25400  * If the file is not a directory, the G_FILE_ERROR_NOTDIR error will be returned.
25401  * Other errors are possible too.
25402  *
25403  * Free the returned object with g_object_unref().
25404  *
25405  * Returns: (transfer full): A #GFileEnumerator if successful, %NULL on error.
25406  */
25407
25408
25409 /**
25410  * g_file_enumerate_children_async:
25411  * @file: input #GFile.
25412  * @attributes: an attribute query string.
25413  * @flags: a set of #GFileQueryInfoFlags.
25414  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
25415  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25416  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25417  * @user_data: (closure): the data to pass to callback function
25418  *
25419  * Asynchronously gets the requested information about the files in a directory. The result
25420  * is a #GFileEnumerator object that will give out #GFileInfo objects for
25421  * all the files in the directory.
25422  *
25423  * For more details, see g_file_enumerate_children() which is
25424  * the synchronous version of this call.
25425  *
25426  * When the operation is finished, @callback will be called. You can then call
25427  * g_file_enumerate_children_finish() to get the result of the operation.
25428  */
25429
25430
25431 /**
25432  * g_file_enumerate_children_finish:
25433  * @file: input #GFile.
25434  * @res: a #GAsyncResult.
25435  * @error: a #GError.
25436  *
25437  * Finishes an async enumerate children operation.
25438  * See g_file_enumerate_children_async().
25439  *
25440  * Free the returned object with g_object_unref().
25441  *
25442  * Returns: (transfer full): a #GFileEnumerator or %NULL if an error occurred.
25443  */
25444
25445
25446 /**
25447  * g_file_enumerator_close:
25448  * @enumerator: a #GFileEnumerator.
25449  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25450  * @error: location to store the error occurring, or %NULL to ignore
25451  *
25452  * Releases all resources used by this enumerator, making the
25453  * enumerator return %G_IO_ERROR_CLOSED on all calls.
25454  *
25455  * This will be automatically called when the last reference
25456  * is dropped, but you might want to call this function to make
25457  * sure resources are released as early as possible.
25458  *
25459  * Returns: #TRUE on success or #FALSE on error.
25460  */
25461
25462
25463 /**
25464  * g_file_enumerator_close_async:
25465  * @enumerator: a #GFileEnumerator.
25466  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
25467  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25468  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25469  * @user_data: (closure): the data to pass to callback function
25470  *
25471  * Asynchronously closes the file enumerator.
25472  *
25473  * If @cancellable is not %NULL, then the operation can be cancelled by
25474  * triggering the cancellable object from another thread. If the operation
25475  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in
25476  * g_file_enumerator_close_finish().
25477  */
25478
25479
25480 /**
25481  * g_file_enumerator_close_finish:
25482  * @enumerator: a #GFileEnumerator.
25483  * @result: a #GAsyncResult.
25484  * @error: a #GError location to store the error occurring, or %NULL to ignore.
25485  *
25486  * Finishes closing a file enumerator, started from g_file_enumerator_close_async().
25487  *
25488  * If the file enumerator was already closed when g_file_enumerator_close_async()
25489  * was called, then this function will report %G_IO_ERROR_CLOSED in @error, and
25490  * return %FALSE. If the file enumerator had pending operation when the close
25491  * operation was started, then this function will report %G_IO_ERROR_PENDING, and
25492  * return %FALSE.  If @cancellable was not %NULL, then the operation may have been
25493  * cancelled by triggering the cancellable object from another thread. If the operation
25494  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
25495  * returned.
25496  *
25497  * Returns: %TRUE if the close operation has finished successfully.
25498  */
25499
25500
25501 /**
25502  * g_file_enumerator_get_container:
25503  * @enumerator: a #GFileEnumerator
25504  *
25505  * Get the #GFile container which is being enumerated.
25506  *
25507  * Returns: (transfer none): the #GFile which is being enumerated.
25508  * Since: 2.18
25509  */
25510
25511
25512 /**
25513  * g_file_enumerator_has_pending:
25514  * @enumerator: a #GFileEnumerator.
25515  *
25516  * Checks if the file enumerator has pending operations.
25517  *
25518  * Returns: %TRUE if the @enumerator has pending operations.
25519  */
25520
25521
25522 /**
25523  * g_file_enumerator_is_closed:
25524  * @enumerator: a #GFileEnumerator.
25525  *
25526  * Checks if the file enumerator has been closed.
25527  *
25528  * Returns: %TRUE if the @enumerator is closed.
25529  */
25530
25531
25532 /**
25533  * g_file_enumerator_next_file:
25534  * @enumerator: a #GFileEnumerator.
25535  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25536  * @error: location to store the error occurring, or %NULL to ignore
25537  *
25538  * Returns information for the next file in the enumerated object.
25539  * Will block until the information is available. The #GFileInfo
25540  * returned from this function will contain attributes that match the
25541  * attribute string that was passed when the #GFileEnumerator was created.
25542  *
25543  * On error, returns %NULL and sets @error to the error. If the
25544  * enumerator is at the end, %NULL will be returned and @error will
25545  * be unset.
25546  *
25547  * Free the returned object with g_object_unref() when no longer needed.
25548  *
25549  * Returns: (transfer full): A #GFileInfo or %NULL on error or end of enumerator.
25550  */
25551
25552
25553 /**
25554  * g_file_enumerator_next_files_async:
25555  * @enumerator: a #GFileEnumerator.
25556  * @num_files: the number of file info objects to request
25557  * @io_priority: the <link linkend="gioscheduler">io priority</link> of the request.
25558  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25559  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25560  * @user_data: (closure): the data to pass to callback function
25561  *
25562  * Request information for a number of files from the enumerator asynchronously.
25563  * When all i/o for the operation is finished the @callback will be called with
25564  * the requested information.
25565  *
25566  * The callback can be called with less than @num_files files in case of error
25567  * or at the end of the enumerator. In case of a partial error the callback will
25568  * be called with any succeeding items and no error, and on the next request the
25569  * error will be reported. If a request is cancelled the callback will be called
25570  * with %G_IO_ERROR_CANCELLED.
25571  *
25572  * During an async request no other sync and async calls are allowed, and will
25573  * result in %G_IO_ERROR_PENDING errors.
25574  *
25575  * Any outstanding i/o request with higher priority (lower numerical value) will
25576  * be executed before an outstanding request with lower priority. Default
25577  * priority is %G_PRIORITY_DEFAULT.
25578  */
25579
25580
25581 /**
25582  * g_file_enumerator_next_files_finish:
25583  * @enumerator: a #GFileEnumerator.
25584  * @result: a #GAsyncResult.
25585  * @error: a #GError location to store the error occurring, or %NULL to ignore.
25586  *
25587  * Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
25588  *
25589  * g_list_free() and unref the infos with g_object_unref() when you're
25590  * done with them.
25591  *
25592  * Returns: (transfer full) (element-type Gio.FileInfo): a #GList of #GFileInfo<!---->s. You must free the list with
25593  */
25594
25595
25596 /**
25597  * g_file_enumerator_set_pending:
25598  * @enumerator: a #GFileEnumerator.
25599  * @pending: a boolean value.
25600  *
25601  * Sets the file enumerator as having pending operations.
25602  */
25603
25604
25605 /**
25606  * g_file_equal:
25607  * @file1: the first #GFile.
25608  * @file2: the second #GFile.
25609  *
25610  * Checks equality of two given #GFile<!-- -->s. Note that two
25611  * #GFile<!-- -->s that differ can still refer to the same
25612  * file on the filesystem due to various forms of filename
25613  * aliasing.
25614  *
25615  * This call does no blocking i/o.
25616  *
25617  * %FALSE if either is not a #GFile.
25618  *
25619  * Returns: %TRUE if @file1 and @file2 are equal.
25620  */
25621
25622
25623 /**
25624  * g_file_find_enclosing_mount:
25625  * @file: input #GFile.
25626  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25627  * @error: a #GError.
25628  *
25629  * Gets a #GMount for the #GFile.
25630  *
25631  * If the #GFileIface for @file does not have a mount (e.g. possibly a
25632  * remote share), @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL
25633  * will be returned.
25634  *
25635  * If @cancellable is not %NULL, then the operation can be cancelled by
25636  * triggering the cancellable object from another thread. If the operation
25637  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25638  *
25639  * Free the returned object with g_object_unref().
25640  *
25641  * Returns: (transfer full): a #GMount where the @file is located or %NULL on error.
25642  */
25643
25644
25645 /**
25646  * g_file_find_enclosing_mount_async:
25647  * @file: a #GFile
25648  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
25649  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25650  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25651  * @user_data: (closure): the data to pass to callback function
25652  *
25653  * Asynchronously gets the mount for the file.
25654  *
25655  * For more details, see g_file_find_enclosing_mount() which is
25656  * the synchronous version of this call.
25657  *
25658  * When the operation is finished, @callback will be called. You can then call
25659  * g_file_find_enclosing_mount_finish() to get the result of the operation.
25660  */
25661
25662
25663 /**
25664  * g_file_find_enclosing_mount_finish:
25665  * @file: a #GFile
25666  * @res: a #GAsyncResult
25667  * @error: a #GError
25668  *
25669  * Finishes an asynchronous find mount request.
25670  * See g_file_find_enclosing_mount_async().
25671  *
25672  * Free the returned object with g_object_unref().
25673  *
25674  * Returns: (transfer full): #GMount for given @file or %NULL on error.
25675  */
25676
25677
25678 /**
25679  * g_file_get_basename:
25680  * @file: input #GFile.
25681  *
25682  * Gets the base name (the last component of the path) for a given #GFile.
25683  *
25684  * If called for the top level of a system (such as the filesystem root
25685  * or a uri like sftp://host/) it will return a single directory separator
25686  * (and on Windows, possibly a drive letter).
25687  *
25688  * The base name is a byte string (*not* UTF-8). It has no defined encoding
25689  * or rules other than it may not contain zero bytes.  If you want to use
25690  * filenames in a user interface you should use the display name that you
25691  * can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
25692  * attribute with g_file_query_info().
25693  *
25694  * This call does no blocking i/o.
25695  *
25696  * if given #GFile is invalid. The returned string should be
25697  * freed with g_free() when no longer needed.
25698  *
25699  * Returns: string containing the #GFile's base name, or %NULL
25700  */
25701
25702
25703 /**
25704  * g_file_get_child:
25705  * @file: input #GFile.
25706  * @name: string containing the child's basename.
25707  *
25708  * Gets a child of @file with basename equal to @name.
25709  *
25710  * Note that the file with that specific name might not exist, but
25711  * you can still have a #GFile that points to it. You can use this
25712  * for instance to create that file.
25713  *
25714  * This call does no blocking i/o.
25715  *
25716  * Free the returned object with g_object_unref().
25717  *
25718  * Returns: (transfer full): a #GFile to a child specified by @name.
25719  */
25720
25721
25722 /**
25723  * g_file_get_child_for_display_name:
25724  * @file: input #GFile.
25725  * @display_name: string to a possible child.
25726  * @error: #GError.
25727  *
25728  * Gets the child of @file for a given @display_name (i.e. a UTF8
25729  * version of the name). If this function fails, it returns %NULL and @error will be
25730  * set. This is very useful when constructing a GFile for a new file
25731  * and the user entered the filename in the user interface, for instance
25732  * when you select a directory and type a filename in the file selector.
25733  *
25734  * This call does no blocking i/o.
25735  *
25736  * %NULL if the display name couldn't be converted.
25737  * Free the returned object with g_object_unref().
25738  *
25739  * Returns: (transfer full): a #GFile to the specified child, or
25740  */
25741
25742
25743 /**
25744  * g_file_get_parent:
25745  * @file: input #GFile.
25746  *
25747  * Gets the parent directory for the @file.
25748  * If the @file represents the root directory of the
25749  * file system, then %NULL will be returned.
25750  *
25751  * This call does no blocking i/o.
25752  *
25753  * #GFile or %NULL if there is no parent.
25754  * Free the returned object with g_object_unref().
25755  *
25756  * Returns: (transfer full): a #GFile structure to the parent of the given
25757  */
25758
25759
25760 /**
25761  * g_file_get_parse_name:
25762  * @file: input #GFile.
25763  *
25764  * Gets the parse name of the @file.
25765  * A parse name is a UTF-8 string that describes the
25766  * file such that one can get the #GFile back using
25767  * g_file_parse_name().
25768  *
25769  * This is generally used to show the #GFile as a nice
25770  * full-pathname kind of string in a user interface,
25771  * like in a location entry.
25772  *
25773  * For local files with names that can safely be converted
25774  * to UTF8 the pathname is used, otherwise the IRI is used
25775  * (a form of URI that allows UTF8 characters unescaped).
25776  *
25777  * This call does no blocking i/o.
25778  *
25779  * string should be freed with g_free() when no longer needed.
25780  *
25781  * Returns: a string containing the #GFile's parse name. The returned
25782  */
25783
25784
25785 /**
25786  * g_file_get_path:
25787  * @file: input #GFile.
25788  *
25789  * Gets the local pathname for #GFile, if one exists.
25790  *
25791  * This call does no blocking i/o.
25792  *
25793  * no such path exists. The returned string should be
25794  * freed with g_free() when no longer needed.
25795  *
25796  * Returns: string containing the #GFile's path, or %NULL if
25797  */
25798
25799
25800 /**
25801  * g_file_get_relative_path:
25802  * @parent: input #GFile.
25803  * @descendant: input #GFile.
25804  *
25805  * Gets the path for @descendant relative to @parent.
25806  *
25807  * This call does no blocking i/o.
25808  *
25809  * to @parent, or %NULL if @descendant doesn't have @parent as prefix.
25810  * The returned string should be freed with g_free() when no longer needed.
25811  *
25812  * Returns: string with the relative path from @descendant
25813  */
25814
25815
25816 /**
25817  * g_file_get_uri:
25818  * @file: input #GFile.
25819  *
25820  * Gets the URI for the @file.
25821  *
25822  * This call does no blocking i/o.
25823  *
25824  * The returned string should be freed with g_free() when no longer needed.
25825  *
25826  * Returns: a string containing the #GFile's URI.
25827  */
25828
25829
25830 /**
25831  * g_file_get_uri_scheme:
25832  * @file: input #GFile.
25833  *
25834  * Gets the URI scheme for a #GFile.
25835  * RFC 3986 decodes the scheme as:
25836  * <programlisting>
25837  * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
25838  * </programlisting>
25839  * Common schemes include "file", "http", "ftp", etc.
25840  *
25841  * This call does no blocking i/o.
25842  *
25843  * #GFile. The returned string should be freed with g_free()
25844  * when no longer needed.
25845  *
25846  * Returns: a string containing the URI scheme for the given
25847  */
25848
25849
25850 /**
25851  * g_file_has_parent:
25852  * @file: input #GFile
25853  * @parent: (allow-none): the parent to check for, or %NULL
25854  *
25855  * Checks if @file has a parent, and optionally, if it is @parent.
25856  *
25857  * If @parent is %NULL then this function returns %TRUE if @file has any
25858  * parent at all.  If @parent is non-%NULL then %TRUE is only returned
25859  * if @file is a child of @parent.
25860  *
25861  * case that @parent is %NULL).
25862  *
25863  * Returns: %TRUE if @file is a child of @parent (or any parent in the
25864  * Since: 2.24
25865  */
25866
25867
25868 /**
25869  * g_file_has_prefix:
25870  * @file: input #GFile.
25871  * @prefix: input #GFile.
25872  *
25873  * Checks whether @file has the prefix specified by @prefix. In other word,
25874  * if the names of initial elements of @file<!-- -->s pathname match @prefix.
25875  * Only full pathname elements are matched, so a path like /foo is not
25876  * considered a prefix of /foobar, only of /foo/bar.
25877  *
25878  * This call does no i/o, as it works purely on names. As such it can
25879  * sometimes return %FALSE even if @file is inside a @prefix (from a
25880  * filesystem point of view), because the prefix of @file is an alias
25881  * of @prefix.
25882  *
25883  * %FALSE otherwise.
25884  *
25885  * Virtual: prefix_matches
25886  * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix.
25887  */
25888
25889
25890 /**
25891  * g_file_has_uri_scheme:
25892  * @file: input #GFile.
25893  * @uri_scheme: a string containing a URI scheme.
25894  *
25895  * Checks to see if a #GFile has a given URI scheme.
25896  *
25897  * This call does no blocking i/o.
25898  *
25899  * given URI scheme, %FALSE if URI scheme is %NULL,
25900  * not supported, or #GFile is invalid.
25901  *
25902  * Returns: %TRUE if #GFile's backend supports the
25903  */
25904
25905
25906 /**
25907  * g_file_hash:
25908  * @file: (type GFile): #gconstpointer to a #GFile.
25909  *
25910  * Creates a hash value for a #GFile.
25911  *
25912  * This call does no blocking i/o.
25913  *
25914  * integer that can be used as hash value for the #GFile.
25915  * This function is intended for easily hashing a #GFile to
25916  * add to a #GHashTable or similar data structure.
25917  *
25918  * Virtual: hash
25919  * Returns: 0 if @file is not a valid #GFile, otherwise an
25920  */
25921
25922
25923 /**
25924  * g_file_icon_get_file:
25925  * @icon: a #GIcon.
25926  *
25927  * Gets the #GFile associated with the given @icon.
25928  *
25929  * Returns: (transfer none): a #GFile, or %NULL.
25930  */
25931
25932
25933 /**
25934  * g_file_icon_new:
25935  * @file: a #GFile.
25936  *
25937  * Creates a new icon for a file.
25938  *
25939  * @file, or %NULL on error.
25940  *
25941  * Returns: (transfer full) (type GFileIcon): a #GIcon for the given
25942  */
25943
25944
25945 /**
25946  * g_file_info_clear_status:
25947  * @info: a #GFileInfo.
25948  *
25949  * Clears the status information from @info.
25950  */
25951
25952
25953 /**
25954  * g_file_info_copy_into:
25955  * @src_info: source to copy attributes from.
25956  * @dest_info: destination to copy attributes to.
25957  *
25958  * Copies all of the #GFileAttribute<!-- -->s from @src_info to @dest_info.
25959  */
25960
25961
25962 /**
25963  * g_file_info_dup:
25964  * @other: a #GFileInfo.
25965  *
25966  * Duplicates a file info structure.
25967  *
25968  * Returns: (transfer full): a duplicate #GFileInfo of @other.
25969  */
25970
25971
25972 /**
25973  * g_file_info_get_attribute_as_string:
25974  * @info: a #GFileInfo.
25975  * @attribute: a file attribute key.
25976  *
25977  * Gets the value of a attribute, formated as a string.
25978  * This escapes things as needed to make the string valid
25979  * utf8.
25980  *
25981  * When you're done with the string it must be freed with g_free().
25982  *
25983  * Returns: a UTF-8 string associated with the given @attribute.
25984  */
25985
25986
25987 /**
25988  * g_file_info_get_attribute_boolean:
25989  * @info: a #GFileInfo.
25990  * @attribute: a file attribute key.
25991  *
25992  * Gets the value of a boolean attribute. If the attribute does not
25993  * contain a boolean value, %FALSE will be returned.
25994  *
25995  * Returns: the boolean value contained within the attribute.
25996  */
25997
25998
25999 /**
26000  * g_file_info_get_attribute_byte_string:
26001  * @info: a #GFileInfo.
26002  * @attribute: a file attribute key.
26003  *
26004  * Gets the value of a byte string attribute. If the attribute does
26005  * not contain a byte string, %NULL will be returned.
26006  *
26007  * %NULL otherwise.
26008  *
26009  * Returns: the contents of the @attribute value as a byte string, or
26010  */
26011
26012
26013 /**
26014  * g_file_info_get_attribute_data:
26015  * @info: a #GFileInfo
26016  * @attribute: a file attribute key
26017  * @type: (out) (allow-none): return location for the attribute type, or %NULL
26018  * @value_pp: (out) (allow-none): return location for the attribute value, or %NULL
26019  * @status: (out) (allow-none): return location for the attribute status, or %NULL
26020  *
26021  * Gets the attribute type, value and status for an attribute key.
26022  *
26023  * %FALSE otherwise.
26024  *
26025  * Returns: (transfer none): %TRUE if @info has an attribute named @attribute,
26026  */
26027
26028
26029 /**
26030  * g_file_info_get_attribute_int32:
26031  * @info: a #GFileInfo.
26032  * @attribute: a file attribute key.
26033  *
26034  * Gets a signed 32-bit integer contained within the attribute. If the
26035  * attribute does not contain a signed 32-bit integer, or is invalid,
26036  * 0 will be returned.
26037  *
26038  * Returns: a signed 32-bit integer from the attribute.
26039  */
26040
26041
26042 /**
26043  * g_file_info_get_attribute_int64:
26044  * @info: a #GFileInfo.
26045  * @attribute: a file attribute key.
26046  *
26047  * Gets a signed 64-bit integer contained within the attribute. If the
26048  * attribute does not contain an signed 64-bit integer, or is invalid,
26049  * 0 will be returned.
26050  *
26051  * Returns: a signed 64-bit integer from the attribute.
26052  */
26053
26054
26055 /**
26056  * g_file_info_get_attribute_object:
26057  * @info: a #GFileInfo.
26058  * @attribute: a file attribute key.
26059  *
26060  * Gets the value of a #GObject attribute. If the attribute does
26061  * not contain a #GObject, %NULL will be returned.
26062  *
26063  * %NULL otherwise.
26064  *
26065  * Returns: (transfer none): a #GObject associated with the given @attribute, or
26066  */
26067
26068
26069 /**
26070  * g_file_info_get_attribute_status:
26071  * @info: a #GFileInfo
26072  * @attribute: a file attribute key
26073  *
26074  * Gets the attribute status for an attribute key.
26075  *
26076  * %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.
26077  *
26078  * Returns: a #GFileAttributeStatus for the given @attribute, or
26079  */
26080
26081
26082 /**
26083  * g_file_info_get_attribute_string:
26084  * @info: a #GFileInfo.
26085  * @attribute: a file attribute key.
26086  *
26087  * Gets the value of a string attribute. If the attribute does
26088  * not contain a string, %NULL will be returned.
26089  *
26090  * %NULL otherwise.
26091  *
26092  * Returns: the contents of the @attribute value as a UTF-8 string, or
26093  */
26094
26095
26096 /**
26097  * g_file_info_get_attribute_stringv:
26098  * @info: a #GFileInfo.
26099  * @attribute: a file attribute key.
26100  *
26101  * Gets the value of a stringv attribute. If the attribute does
26102  * not contain a stringv, %NULL will be returned.
26103  *
26104  * %NULL otherwise. Do not free. These returned strings are UTF-8.
26105  *
26106  * Returns: (transfer none): the contents of the @attribute value as a stringv, or
26107  * Since: 2.22
26108  */
26109
26110
26111 /**
26112  * g_file_info_get_attribute_type:
26113  * @info: a #GFileInfo.
26114  * @attribute: a file attribute key.
26115  *
26116  * Gets the attribute type for an attribute key.
26117  *
26118  * %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.
26119  *
26120  * Returns: a #GFileAttributeType for the given @attribute, or
26121  */
26122
26123
26124 /**
26125  * g_file_info_get_attribute_uint32:
26126  * @info: a #GFileInfo.
26127  * @attribute: a file attribute key.
26128  *
26129  * Gets an unsigned 32-bit integer contained within the attribute. If the
26130  * attribute does not contain an unsigned 32-bit integer, or is invalid,
26131  * 0 will be returned.
26132  *
26133  * Returns: an unsigned 32-bit integer from the attribute.
26134  */
26135
26136
26137 /**
26138  * g_file_info_get_attribute_uint64:
26139  * @info: a #GFileInfo.
26140  * @attribute: a file attribute key.
26141  *
26142  * Gets a unsigned 64-bit integer contained within the attribute. If the
26143  * attribute does not contain an unsigned 64-bit integer, or is invalid,
26144  * 0 will be returned.
26145  *
26146  * Returns: a unsigned 64-bit integer from the attribute.
26147  */
26148
26149
26150 /**
26151  * g_file_info_get_content_type:
26152  * @info: a #GFileInfo.
26153  *
26154  * Gets the file's content type.
26155  *
26156  * Returns: a string containing the file's content type.
26157  */
26158
26159
26160 /**
26161  * g_file_info_get_display_name:
26162  * @info: a #GFileInfo.
26163  *
26164  * Gets a display name for a file.
26165  *
26166  * Returns: a string containing the display name.
26167  */
26168
26169
26170 /**
26171  * g_file_info_get_edit_name:
26172  * @info: a #GFileInfo.
26173  *
26174  * Gets the edit name for a file.
26175  *
26176  * Returns: a string containing the edit name.
26177  */
26178
26179
26180 /**
26181  * g_file_info_get_etag:
26182  * @info: a #GFileInfo.
26183  *
26184  * Gets the <link linkend="gfile-etag">entity tag</link> for a given
26185  * #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.
26186  *
26187  * Returns: a string containing the value of the "etag:value" attribute.
26188  */
26189
26190
26191 /**
26192  * g_file_info_get_file_type:
26193  * @info: a #GFileInfo.
26194  *
26195  * Gets a file's type (whether it is a regular file, symlink, etc).
26196  * This is different from the file's content type, see g_file_info_get_content_type().
26197  *
26198  * Returns: a #GFileType for the given file.
26199  */
26200
26201
26202 /**
26203  * g_file_info_get_icon:
26204  * @info: a #GFileInfo.
26205  *
26206  * Gets the icon for a file.
26207  *
26208  * Returns: (transfer none): #GIcon for the given @info.
26209  */
26210
26211
26212 /**
26213  * g_file_info_get_is_backup:
26214  * @info: a #GFileInfo.
26215  *
26216  * Checks if a file is a backup file.
26217  *
26218  * Returns: %TRUE if file is a backup file, %FALSE otherwise.
26219  */
26220
26221
26222 /**
26223  * g_file_info_get_is_hidden:
26224  * @info: a #GFileInfo.
26225  *
26226  * Checks if a file is hidden.
26227  *
26228  * Returns: %TRUE if the file is a hidden file, %FALSE otherwise.
26229  */
26230
26231
26232 /**
26233  * g_file_info_get_is_symlink:
26234  * @info: a #GFileInfo.
26235  *
26236  * Checks if a file is a symlink.
26237  *
26238  * Returns: %TRUE if the given @info is a symlink.
26239  */
26240
26241
26242 /**
26243  * g_file_info_get_modification_time:
26244  * @info: a #GFileInfo.
26245  * @result: (out caller-allocates): a #GTimeVal.
26246  *
26247  * Gets the modification time of the current @info and sets it
26248  * in @result.
26249  */
26250
26251
26252 /**
26253  * g_file_info_get_name:
26254  * @info: a #GFileInfo.
26255  *
26256  * Gets the name for a file.
26257  *
26258  * Returns: a string containing the file name.
26259  */
26260
26261
26262 /**
26263  * g_file_info_get_size:
26264  * @info: a #GFileInfo.
26265  *
26266  * Gets the file's size.
26267  *
26268  * Returns: a #goffset containing the file's size.
26269  */
26270
26271
26272 /**
26273  * g_file_info_get_sort_order:
26274  * @info: a #GFileInfo.
26275  *
26276  * Gets the value of the sort_order attribute from the #GFileInfo.
26277  * See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
26278  *
26279  * Returns: a #gint32 containing the value of the "standard::sort_order" attribute.
26280  */
26281
26282
26283 /**
26284  * g_file_info_get_symlink_target:
26285  * @info: a #GFileInfo.
26286  *
26287  * Gets the symlink target for a given #GFileInfo.
26288  *
26289  * Returns: a string containing the symlink target.
26290  */
26291
26292
26293 /**
26294  * g_file_info_has_attribute:
26295  * @info: a #GFileInfo.
26296  * @attribute: a file attribute key.
26297  *
26298  * Checks if a file info structure has an attribute named @attribute.
26299  *
26300  * %FALSE otherwise.
26301  *
26302  * Returns: %TRUE if @Ginfo has an attribute named @attribute,
26303  */
26304
26305
26306 /**
26307  * g_file_info_has_namespace:
26308  * @info: a #GFileInfo.
26309  * @name_space: a file attribute namespace.
26310  *
26311  * Checks if a file info structure has an attribute in the
26312  * specified @name_space.
26313  *
26314  * %FALSE otherwise.
26315  *
26316  * Returns: %TRUE if @Ginfo has an attribute in @name_space,
26317  * Since: 2.22
26318  */
26319
26320
26321 /**
26322  * g_file_info_list_attributes:
26323  * @info: a #GFileInfo.
26324  * @name_space: a file attribute key's namespace.
26325  *
26326  * Lists the file info structure's attributes.
26327  *
26328  * possible attribute types for the given @name_space, or
26329  * %NULL on error.
26330  *
26331  * Returns: (array zero-terminated=1) (transfer full): a null-terminated array of strings of all of the
26332  */
26333
26334
26335 /**
26336  * g_file_info_new:
26337  *
26338  * Creates a new file info structure.
26339  *
26340  * Returns: a #GFileInfo.
26341  */
26342
26343
26344 /**
26345  * g_file_info_remove_attribute:
26346  * @info: a #GFileInfo.
26347  * @attribute: a file attribute key.
26348  *
26349  * Removes all cases of @attribute from @info if it exists.
26350  */
26351
26352
26353 /**
26354  * g_file_info_set_attribute:
26355  * @info: a #GFileInfo.
26356  * @attribute: a file attribute key.
26357  * @type: a #GFileAttributeType
26358  * @value_p: pointer to the value
26359  *
26360  * Sets the @attribute to contain the given value, if possible.
26361  */
26362
26363
26364 /**
26365  * g_file_info_set_attribute_boolean:
26366  * @info: a #GFileInfo.
26367  * @attribute: a file attribute key.
26368  * @attr_value: a boolean value.
26369  *
26370  * Sets the @attribute to contain the given @attr_value,
26371  * if possible.
26372  */
26373
26374
26375 /**
26376  * g_file_info_set_attribute_byte_string:
26377  * @info: a #GFileInfo.
26378  * @attribute: a file attribute key.
26379  * @attr_value: a byte string.
26380  *
26381  * Sets the @attribute to contain the given @attr_value,
26382  * if possible.
26383  */
26384
26385
26386 /**
26387  * g_file_info_set_attribute_int32:
26388  * @info: a #GFileInfo.
26389  * @attribute: a file attribute key.
26390  * @attr_value: a signed 32-bit integer
26391  *
26392  * Sets the @attribute to contain the given @attr_value,
26393  * if possible.
26394  */
26395
26396
26397 /**
26398  * g_file_info_set_attribute_int64:
26399  * @info: a #GFileInfo.
26400  * @attribute: attribute name to set.
26401  * @attr_value: int64 value to set attribute to.
26402  *
26403  * Sets the @attribute to contain the given @attr_value,
26404  * if possible.
26405  */
26406
26407
26408 /**
26409  * g_file_info_set_attribute_mask:
26410  * @info: a #GFileInfo.
26411  * @mask: a #GFileAttributeMatcher.
26412  *
26413  * Sets @mask on @info to match specific attribute types.
26414  */
26415
26416
26417 /**
26418  * g_file_info_set_attribute_object:
26419  * @info: a #GFileInfo.
26420  * @attribute: a file attribute key.
26421  * @attr_value: a #GObject.
26422  *
26423  * Sets the @attribute to contain the given @attr_value,
26424  * if possible.
26425  */
26426
26427
26428 /**
26429  * g_file_info_set_attribute_status:
26430  * @info: a #GFileInfo
26431  * @attribute: a file attribute key
26432  * @status: a #GFileAttributeStatus
26433  *
26434  * Sets the attribute status for an attribute key. This is only
26435  * needed by external code that implement g_file_set_attributes_from_info()
26436  * or similar functions.
26437  *
26438  * The attribute must exist in @info for this to work. Otherwise %FALSE
26439  * is returned and @info is unchanged.
26440  *
26441  * Returns: %TRUE if the status was changed, %FALSE if the key was not set.
26442  * Since: 2.22
26443  */
26444
26445
26446 /**
26447  * g_file_info_set_attribute_string:
26448  * @info: a #GFileInfo.
26449  * @attribute: a file attribute key.
26450  * @attr_value: a UTF-8 string.
26451  *
26452  * Sets the @attribute to contain the given @attr_value,
26453  * if possible.
26454  */
26455
26456
26457 /**
26458  * g_file_info_set_attribute_stringv:
26459  * @info: a #GFileInfo.
26460  * @attribute: a file attribute key
26461  * @attr_value: (array) (element-type utf8): a %NULL terminated array of UTF-8 strings.
26462  *
26463  * Sets the @attribute to contain the given @attr_value,
26464  * if possible.
26465  *
26466  * Sinze: 2.22
26467  */
26468
26469
26470 /**
26471  * g_file_info_set_attribute_uint32:
26472  * @info: a #GFileInfo.
26473  * @attribute: a file attribute key.
26474  * @attr_value: an unsigned 32-bit integer.
26475  *
26476  * Sets the @attribute to contain the given @attr_value,
26477  * if possible.
26478  */
26479
26480
26481 /**
26482  * g_file_info_set_attribute_uint64:
26483  * @info: a #GFileInfo.
26484  * @attribute: a file attribute key.
26485  * @attr_value: an unsigned 64-bit integer.
26486  *
26487  * Sets the @attribute to contain the given @attr_value,
26488  * if possible.
26489  */
26490
26491
26492 /**
26493  * g_file_info_set_content_type:
26494  * @info: a #GFileInfo.
26495  * @content_type: a content type. See <link linkend="gio-GContentType">GContentType</link>.
26496  *
26497  * Sets the content type attribute for a given #GFileInfo.
26498  * See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
26499  */
26500
26501
26502 /**
26503  * g_file_info_set_display_name:
26504  * @info: a #GFileInfo.
26505  * @display_name: a string containing a display name.
26506  *
26507  * Sets the display name for the current #GFileInfo.
26508  * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
26509  */
26510
26511
26512 /**
26513  * g_file_info_set_edit_name:
26514  * @info: a #GFileInfo.
26515  * @edit_name: a string containing an edit name.
26516  *
26517  * Sets the edit name for the current file.
26518  * See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
26519  */
26520
26521
26522 /**
26523  * g_file_info_set_file_type:
26524  * @info: a #GFileInfo.
26525  * @type: a #GFileType.
26526  *
26527  * Sets the file type in a #GFileInfo to @type.
26528  * See %G_FILE_ATTRIBUTE_STANDARD_TYPE.
26529  */
26530
26531
26532 /**
26533  * g_file_info_set_icon:
26534  * @info: a #GFileInfo.
26535  * @icon: a #GIcon.
26536  *
26537  * Sets the icon for a given #GFileInfo.
26538  * See %G_FILE_ATTRIBUTE_STANDARD_ICON.
26539  */
26540
26541
26542 /**
26543  * g_file_info_set_is_hidden:
26544  * @info: a #GFileInfo.
26545  * @is_hidden: a #gboolean.
26546  *
26547  * Sets the "is_hidden" attribute in a #GFileInfo according to @is_symlink.
26548  * See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
26549  */
26550
26551
26552 /**
26553  * g_file_info_set_is_symlink:
26554  * @info: a #GFileInfo.
26555  * @is_symlink: a #gboolean.
26556  *
26557  * Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
26558  * See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
26559  */
26560
26561
26562 /**
26563  * g_file_info_set_modification_time:
26564  * @info: a #GFileInfo.
26565  * @mtime: a #GTimeVal.
26566  *
26567  * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
26568  * info to the given time value.
26569  */
26570
26571
26572 /**
26573  * g_file_info_set_name:
26574  * @info: a #GFileInfo.
26575  * @name: a string containing a name.
26576  *
26577  * Sets the name attribute for the current #GFileInfo.
26578  * See %G_FILE_ATTRIBUTE_STANDARD_NAME.
26579  */
26580
26581
26582 /**
26583  * g_file_info_set_size:
26584  * @info: a #GFileInfo.
26585  * @size: a #goffset containing the file's size.
26586  *
26587  * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
26588  * to the given size.
26589  */
26590
26591
26592 /**
26593  * g_file_info_set_sort_order:
26594  * @info: a #GFileInfo.
26595  * @sort_order: a sort order integer.
26596  *
26597  * Sets the sort order attribute in the file info structure. See
26598  * %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
26599  */
26600
26601
26602 /**
26603  * g_file_info_set_symlink_target:
26604  * @info: a #GFileInfo.
26605  * @symlink_target: a static string containing a path to a symlink target.
26606  *
26607  * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
26608  * to the given symlink target.
26609  */
26610
26611
26612 /**
26613  * g_file_info_unset_attribute_mask:
26614  * @info: #GFileInfo.
26615  *
26616  * Unsets a mask set by g_file_info_set_attribute_mask(), if one
26617  * is set.
26618  */
26619
26620
26621 /**
26622  * g_file_input_stream_query_info:
26623  * @stream: a #GFileInputStream.
26624  * @attributes: a file attribute query string.
26625  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26626  * @error: a #GError location to store the error occurring, or %NULL to ignore.
26627  *
26628  * Queries a file input stream the given @attributes. This function blocks
26629  * while querying the stream. For the asynchronous (non-blocking) version
26630  * of this function, see g_file_input_stream_query_info_async(). While the
26631  * stream is blocked, the stream will set the pending flag internally, and
26632  * any other operations on the stream will fail with %G_IO_ERROR_PENDING.
26633  *
26634  * Returns: (transfer full): a #GFileInfo, or %NULL on error.
26635  */
26636
26637
26638 /**
26639  * g_file_input_stream_query_info_async:
26640  * @stream: a #GFileInputStream.
26641  * @attributes: a file attribute query string.
26642  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
26643  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26644  * @callback: (scope async): callback to call when the request is satisfied
26645  * @user_data: (closure): the data to pass to callback function
26646  *
26647  * Queries the stream information asynchronously.
26648  * When the operation is finished @callback will be called.
26649  * You can then call g_file_input_stream_query_info_finish()
26650  * to get the result of the operation.
26651  *
26652  * For the synchronous version of this function,
26653  * see g_file_input_stream_query_info().
26654  *
26655  * If @cancellable is not %NULL, then the operation can be cancelled by
26656  * triggering the cancellable object from another thread. If the operation
26657  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set
26658  */
26659
26660
26661 /**
26662  * g_file_input_stream_query_info_finish:
26663  * @stream: a #GFileInputStream.
26664  * @result: a #GAsyncResult.
26665  * @error: a #GError location to store the error occurring, or %NULL to ignore.
26666  *
26667  * Finishes an asynchronous info query operation.
26668  *
26669  * Returns: (transfer full): #GFileInfo.
26670  */
26671
26672
26673 /**
26674  * g_file_io_stream_get_etag:
26675  * @stream: a #GFileIOStream.
26676  *
26677  * Gets the entity tag for the file when it has been written.
26678  * This must be called after the stream has been written
26679  * and closed, as the etag can change while writing.
26680  *
26681  * Returns: the entity tag for the stream.
26682  * Since: 2.22
26683  */
26684
26685
26686 /**
26687  * g_file_io_stream_query_info:
26688  * @stream: a #GFileIOStream.
26689  * @attributes: a file attribute query string.
26690  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26691  * @error: a #GError, %NULL to ignore.
26692  *
26693  * Queries a file io stream for the given @attributes.
26694  * This function blocks while querying the stream. For the asynchronous
26695  * version of this function, see g_file_io_stream_query_info_async().
26696  * While the stream is blocked, the stream will set the pending flag
26697  * internally, and any other operations on the stream will fail with
26698  * %G_IO_ERROR_PENDING.
26699  *
26700  * Can fail if the stream was already closed (with @error being set to
26701  * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
26702  * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
26703  * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I
26704  * all cases of failure, %NULL will be returned.
26705  *
26706  * If @cancellable is not %NULL, then the operation can be cancelled by
26707  * triggering the cancellable object from another thread. If the operation
26708  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
26709  * be returned.
26710  *
26711  * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
26712  * Since: 2.22
26713  */
26714
26715
26716 /**
26717  * g_file_io_stream_query_info_async:
26718  * @stream: a #GFileIOStream.
26719  * @attributes: a file attribute query string.
26720  * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
26721  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26722  * @callback: (scope async): callback to call when the request is satisfied
26723  * @user_data: (closure): the data to pass to callback function
26724  *
26725  * Asynchronously queries the @stream for a #GFileInfo. When completed,
26726  * @callback will be called with a #GAsyncResult which can be used to
26727  * finish the operation with g_file_io_stream_query_info_finish().
26728  *
26729  * For the synchronous version of this function, see
26730  * g_file_io_stream_query_info().
26731  *
26732  * Since: 2.22
26733  */
26734
26735
26736 /**
26737  * g_file_io_stream_query_info_finish:
26738  * @stream: a #GFileIOStream.
26739  * @result: a #GAsyncResult.
26740  * @error: a #GError, %NULL to ignore.
26741  *
26742  * Finalizes the asynchronous query started
26743  * by g_file_io_stream_query_info_async().
26744  *
26745  * Returns: (transfer full): A #GFileInfo for the finished query.
26746  * Since: 2.22
26747  */
26748
26749
26750 /**
26751  * g_file_is_native:
26752  * @file: input #GFile.
26753  *
26754  * Checks to see if a file is native to the platform.
26755  *
26756  * A native file s one expressed in the platform-native filename format,
26757  * e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
26758  * as it might be on a locally mounted remote filesystem.
26759  *
26760  * On some systems non-native files may be available using
26761  * the native filesystem via a userspace filesystem (FUSE), in
26762  * these cases this call will return %FALSE, but g_file_get_path()
26763  * will still return a native path.
26764  *
26765  * This call does no blocking i/o.
26766  *
26767  * Returns: %TRUE if file is native.
26768  */
26769
26770
26771 /**
26772  * g_file_load_contents:
26773  * @file: input #GFile.
26774  * @cancellable: optional #GCancellable object, %NULL to ignore.
26775  * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
26776  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
26777  * @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
26778  * @error: a #GError, or %NULL
26779  *
26780  * Loads the content of the file into memory. The data is always
26781  * zero-terminated, but this is not included in the resultant @length.
26782  * The returned @content should be freed with g_free() when no longer
26783  * needed.
26784  *
26785  * If @cancellable is not %NULL, then the operation can be cancelled by
26786  * triggering the cancellable object from another thread. If the operation
26787  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26788  *
26789  * %FALSE if there were errors.
26790  *
26791  * Returns: %TRUE if the @file's contents were successfully loaded.
26792  */
26793
26794
26795 /**
26796  * g_file_load_contents_async:
26797  * @file: input #GFile.
26798  * @cancellable: optional #GCancellable object, %NULL to ignore.
26799  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
26800  * @user_data: the data to pass to callback function
26801  *
26802  * Starts an asynchronous load of the @file's contents.
26803  *
26804  * For more details, see g_file_load_contents() which is
26805  * the synchronous version of this call.
26806  *
26807  * When the load operation has completed, @callback will be called
26808  * with @user data. To finish the operation, call
26809  * g_file_load_contents_finish() with the #GAsyncResult returned by
26810  * the @callback.
26811  *
26812  * If @cancellable is not %NULL, then the operation can be cancelled by
26813  * triggering the cancellable object from another thread. If the operation
26814  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26815  */
26816
26817
26818 /**
26819  * g_file_load_contents_finish:
26820  * @file: input #GFile.
26821  * @res: a #GAsyncResult.
26822  * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
26823  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
26824  * @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
26825  * @error: a #GError, or %NULL
26826  *
26827  * Finishes an asynchronous load of the @file's contents.
26828  * The contents are placed in @contents, and @length is set to the
26829  * size of the @contents string. The @content should be freed with
26830  * g_free() when no longer needed. If @etag_out is present, it will be
26831  * set to the new entity tag for the @file.
26832  *
26833  * present, it will be set appropriately.
26834  *
26835  * Returns: %TRUE if the load was successful. If %FALSE and @error is
26836  */
26837
26838
26839 /**
26840  * g_file_load_partial_contents_async: (skip)
26841  * @file: input #GFile.
26842  * @cancellable: optional #GCancellable object, %NULL to ignore.
26843  * @read_more_callback: a #GFileReadMoreCallback to receive partial data and to specify whether further data should be read.
26844  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
26845  * @user_data: the data to pass to the callback functions.
26846  *
26847  * Reads the partial contents of a file. A #GFileReadMoreCallback should be
26848  * used to stop reading from the file when appropriate, else this function
26849  * will behave exactly as g_file_load_contents_async(). This operation
26850  * can be finished by g_file_load_partial_contents_finish().
26851  *
26852  * Users of this function should be aware that @user_data is passed to
26853  * both the @read_more_callback and the @callback.
26854  *
26855  * If @cancellable is not %NULL, then the operation can be cancelled by
26856  * triggering the cancellable object from another thread. If the operation
26857  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26858  */
26859
26860
26861 /**
26862  * g_file_load_partial_contents_finish:
26863  * @file: input #GFile.
26864  * @res: a #GAsyncResult.
26865  * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
26866  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
26867  * @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
26868  * @error: a #GError, or %NULL
26869  *
26870  * Finishes an asynchronous partial load operation that was started
26871  * with g_file_load_partial_contents_async(). The data is always
26872  * zero-terminated, but this is not included in the resultant @length.
26873  * The returned @content should be freed with g_free() when no longer
26874  * needed.
26875  *
26876  * present, it will be set appropriately.
26877  *
26878  * Returns: %TRUE if the load was successful. If %FALSE and @error is
26879  */
26880
26881
26882 /**
26883  * g_file_make_directory:
26884  * @file: input #GFile.
26885  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26886  * @error: a #GError, or %NULL
26887  *
26888  * Creates a directory. Note that this will only create a child directory of
26889  * the immediate parent directory of the path or URI given by the #GFile. To
26890  * recursively create directories, see g_file_make_directory_with_parents().
26891  * This function will fail if the parent directory does not exist, setting
26892  * @error to %G_IO_ERROR_NOT_FOUND. If the file system doesn't support creating
26893  * directories, this function will fail, setting @error to
26894  * %G_IO_ERROR_NOT_SUPPORTED.
26895  *
26896  * For a local #GFile the newly created directory will have the default
26897  * (current) ownership and permissions of the current process.
26898  *
26899  * If @cancellable is not %NULL, then the operation can be cancelled by
26900  * triggering the cancellable object from another thread. If the operation
26901  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26902  *
26903  * Returns: %TRUE on successful creation, %FALSE otherwise.
26904  */
26905
26906
26907 /**
26908  * g_file_make_directory_with_parents:
26909  * @file: input #GFile.
26910  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26911  * @error: a #GError, or %NULL
26912  *
26913  * Creates a directory and any parent directories that may not exist similar to
26914  * 'mkdir -p'. If the file system does not support creating directories, this
26915  * function will fail, setting @error to %G_IO_ERROR_NOT_SUPPORTED. If the
26916  * directory itself already exists, this function will fail setting @error
26917  * to %G_IO_ERROR_EXISTS, unlike the similar g_mkdir_with_parents().
26918  *
26919  * For a local #GFile the newly created directories will have the default
26920  * (current) ownership and permissions of the current process.
26921  *
26922  * If @cancellable is not %NULL, then the operation can be cancelled by
26923  * triggering the cancellable object from another thread. If the operation
26924  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26925  *
26926  * otherwise.
26927  *
26928  * Returns: %TRUE if all directories have been successfully created, %FALSE
26929  * Since: 2.18
26930  */
26931
26932
26933 /**
26934  * g_file_make_symbolic_link:
26935  * @file: a #GFile with the name of the symlink to create
26936  * @symlink_value: a string with the path for the target of the new symlink
26937  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26938  * @error: a #GError.
26939  *
26940  * Creates a symbolic link named @file which contains the string
26941  * @symlink_value.
26942  *
26943  * If @cancellable is not %NULL, then the operation can be cancelled by
26944  * triggering the cancellable object from another thread. If the operation
26945  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26946  *
26947  * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise.
26948  */
26949
26950
26951 /**
26952  * g_file_monitor:
26953  * @file: input #GFile
26954  * @flags: a set of #GFileMonitorFlags
26955  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
26956  * @error: a #GError, or %NULL
26957  *
26958  * Obtains a file or directory monitor for the given file, depending
26959  * on the type of the file.
26960  *
26961  * If @cancellable is not %NULL, then the operation can be cancelled by
26962  * triggering the cancellable object from another thread. If the operation
26963  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26964  *
26965  * Free the returned object with g_object_unref().
26966  *
26967  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
26968  * Since: 2.18
26969  */
26970
26971
26972 /**
26973  * g_file_monitor_cancel:
26974  * @monitor: a #GFileMonitor.
26975  *
26976  * Cancels a file monitor.
26977  *
26978  * Returns: %TRUE if monitor was cancelled.
26979  */
26980
26981
26982 /**
26983  * g_file_monitor_directory:
26984  * @file: input #GFile.
26985  * @flags: a set of #GFileMonitorFlags.
26986  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26987  * @error: a #GError, or %NULL.
26988  *
26989  * Obtains a directory monitor for the given file.
26990  * This may fail if directory monitoring is not supported.
26991  *
26992  * If @cancellable is not %NULL, then the operation can be cancelled by
26993  * triggering the cancellable object from another thread. If the operation
26994  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26995  *
26996  * Free the returned object with g_object_unref().
26997  *
26998  * Virtual: monitor_dir
26999  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
27000  */
27001
27002
27003 /**
27004  * g_file_monitor_emit_event:
27005  * @monitor: a #GFileMonitor.
27006  * @child: a #GFile.
27007  * @other_file: a #GFile.
27008  * @event_type: a set of #GFileMonitorEvent flags.
27009  *
27010  * Emits the #GFileMonitor::changed signal if a change
27011  * has taken place. Should be called from file monitor
27012  * implementations only.
27013  *
27014  * The signal will be emitted from an idle handler (in the <link
27015  * linkend="g-main-context-push-thread-default">thread-default main
27016  * context</link>).
27017  */
27018
27019
27020 /**
27021  * g_file_monitor_file:
27022  * @file: input #GFile.
27023  * @flags: a set of #GFileMonitorFlags.
27024  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27025  * @error: a #GError, or %NULL.
27026  *
27027  * Obtains a file monitor for the given file. If no file notification
27028  * mechanism exists, then regular polling of the file is used.
27029  *
27030  * If @cancellable is not %NULL, then the operation can be cancelled by
27031  * triggering the cancellable object from another thread. If the operation
27032  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27033  *
27034  * Free the returned object with g_object_unref().
27035  *
27036  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
27037  */
27038
27039
27040 /**
27041  * g_file_monitor_is_cancelled:
27042  * @monitor: a #GFileMonitor
27043  *
27044  * Returns whether the monitor is canceled.
27045  *
27046  * Returns: %TRUE if monitor is canceled. %FALSE otherwise.
27047  */
27048
27049
27050 /**
27051  * g_file_monitor_set_rate_limit:
27052  * @monitor: a #GFileMonitor.
27053  * @limit_msecs: a non-negative integer with the limit in milliseconds to poll for changes
27054  *
27055  * Sets the rate limit to which the @monitor will report
27056  * consecutive change events to the same file.
27057  */
27058
27059
27060 /**
27061  * g_file_mount_enclosing_volume:
27062  * @location: input #GFile.
27063  * @flags: flags affecting the operation
27064  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
27065  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27066  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
27067  * @user_data: the data to pass to callback function
27068  *
27069  * Starts a @mount_operation, mounting the volume that contains the file @location.
27070  *
27071  * When this operation has completed, @callback will be called with
27072  * @user_user data, and the operation can be finalized with
27073  * g_file_mount_enclosing_volume_finish().
27074  *
27075  * If @cancellable is not %NULL, then the operation can be cancelled by
27076  * triggering the cancellable object from another thread. If the operation
27077  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27078  */
27079
27080
27081 /**
27082  * g_file_mount_enclosing_volume_finish:
27083  * @location: input #GFile.
27084  * @result: a #GAsyncResult.
27085  * @error: a #GError, or %NULL
27086  *
27087  * Finishes a mount operation started by g_file_mount_enclosing_volume().
27088  *
27089  * has occurred, this function will return %FALSE and set @error
27090  * appropriately if present.
27091  *
27092  * Returns: %TRUE if successful. If an error
27093  */
27094
27095
27096 /**
27097  * g_file_mount_mountable:
27098  * @file: input #GFile.
27099  * @flags: flags affecting the operation
27100  * @mount_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
27101  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27102  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
27103  * @user_data: (closure): the data to pass to callback function
27104  *
27105  * Mounts a file of type G_FILE_TYPE_MOUNTABLE.
27106  * Using @mount_operation, you can request callbacks when, for instance,
27107  * passwords are needed during authentication.
27108  *
27109  * If @cancellable is not %NULL, then the operation can be cancelled by
27110  * triggering the cancellable object from another thread. If the operation
27111  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27112  *
27113  * When the operation is finished, @callback will be called. You can then call
27114  * g_file_mount_mountable_finish() to get the result of the operation.
27115  */
27116
27117
27118 /**
27119  * g_file_mount_mountable_finish:
27120  * @file: input #GFile.
27121  * @result: a #GAsyncResult.
27122  * @error: a #GError, or %NULL
27123  *
27124  * Finishes a mount operation. See g_file_mount_mountable() for details.
27125  *
27126  * Finish an asynchronous mount operation that was started
27127  * with g_file_mount_mountable().
27128  *
27129  * Free the returned object with g_object_unref().
27130  *
27131  * Returns: (transfer full): a #GFile or %NULL on error.
27132  */
27133
27134
27135 /**
27136  * g_file_move:
27137  * @source: #GFile pointing to the source location.
27138  * @destination: #GFile pointing to the destination location.
27139  * @flags: set of #GFileCopyFlags.
27140  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27141  * @progress_callback: (allow-none) (scope call): #GFileProgressCallback function for updates.
27142  * @progress_callback_data: (closure): gpointer to user data for the callback function.
27143  * @error: #GError for returning error conditions, or %NULL
27144  *
27145  * Tries to move the file or directory @source to the location specified by @destination.
27146  * If native move operations are supported then this is used, otherwise a copy + delete
27147  * fallback is used. The native implementation may support moving directories (for instance
27148  * on moves inside the same filesystem), but the fallback code does not.
27149  *
27150  * If the flag #G_FILE_COPY_OVERWRITE is specified an already
27151  * existing @destination file is overwritten.
27152  *
27153  * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
27154  * will be copied as symlinks, otherwise the target of the
27155  * @source symlink will be copied.
27156  *
27157  * If @cancellable is not %NULL, then the operation can be cancelled by
27158  * triggering the cancellable object from another thread. If the operation
27159  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27160  *
27161  * If @progress_callback is not %NULL, then the operation can be monitored by
27162  * setting this to a #GFileProgressCallback function. @progress_callback_data
27163  * will be passed to this function. It is guaranteed that this callback will
27164  * be called after all data has been transferred with the total number of bytes
27165  * copied during the operation.
27166  *
27167  * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
27168  * error is returned, independent on the status of the @destination.
27169  *
27170  * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
27171  * error G_IO_ERROR_EXISTS is returned.
27172  *
27173  * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
27174  * error is returned. If trying to overwrite a directory with a directory the
27175  * G_IO_ERROR_WOULD_MERGE error is returned.
27176  *
27177  * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
27178  * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
27179  * may be returned (if the native move operation isn't available).
27180  *
27181  * Returns: %TRUE on successful move, %FALSE otherwise.
27182  */
27183
27184
27185 /**
27186  * g_file_new_for_commandline_arg:
27187  * @arg: a command line string.
27188  *
27189  * Creates a #GFile with the given argument from the command line. The value of
27190  * @arg can be either a URI, an absolute path or a relative path resolved
27191  * relative to the current working directory.
27192  * This operation never fails, but the returned object might not support any
27193  * I/O operation if @arg points to a malformed path.
27194  *
27195  * Free the returned object with g_object_unref().
27196  *
27197  * Returns: (transfer full): a new #GFile.
27198  */
27199
27200
27201 /**
27202  * g_file_new_for_path:
27203  * @path: a string containing a relative or absolute path. The string must be encoded in the glib filename encoding.
27204  *
27205  * Constructs a #GFile for a given path. This operation never
27206  * fails, but the returned object might not support any I/O
27207  * operation if @path is malformed.
27208  *
27209  * Free the returned object with g_object_unref().
27210  *
27211  * Returns: (transfer full): a new #GFile for the given @path.
27212  */
27213
27214
27215 /**
27216  * g_file_new_for_uri:
27217  * @uri: a UTF8 string containing a URI.
27218  *
27219  * Constructs a #GFile for a given URI. This operation never
27220  * fails, but the returned object might not support any I/O
27221  * operation if @uri is malformed or if the uri type is
27222  * not supported.
27223  *
27224  * Free the returned object with g_object_unref().
27225  *
27226  * Returns: (transfer full): a new #GFile for the given @uri.
27227  */
27228
27229
27230 /**
27231  * g_file_new_tmp:
27232  * @tmpl: (type filename) (allow-none): Template for the file name, as in g_file_open_tmp(), or %NULL for a default template.
27233  * @iostream: (out): on return, a #GFileIOStream for the created file.
27234  * @error: a #GError, or %NULL
27235  *
27236  * Opens a file in the preferred directory for temporary files (as
27237  * returned by g_get_tmp_dir()) and returns a #GFile and
27238  * #GFileIOStream pointing to it.
27239  *
27240  * @template should be a string in the GLib file name encoding
27241  * containing a sequence of six 'X' characters, and containing no
27242  * directory components. If it is %NULL, a default template is used.
27243  *
27244  * Unlike the other #GFile constructors, this will return %NULL if
27245  * a temporary file could not be created.
27246  *
27247  * Free the returned object with g_object_unref().
27248  *
27249  * Returns: (transfer full): a new #GFile.
27250  * Since: 2.32
27251  */
27252
27253
27254 /**
27255  * g_file_open_readwrite:
27256  * @file: #GFile to open
27257  * @cancellable: (allow-none): a #GCancellable
27258  * @error: a #GError, or %NULL
27259  *
27260  * Opens an existing file for reading and writing. The result is
27261  * a #GFileIOStream that can be used to read and write the contents of the file.
27262  *
27263  * If @cancellable is not %NULL, then the operation can be cancelled by
27264  * triggering the cancellable object from another thread. If the operation
27265  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27266  *
27267  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
27268  * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
27269  * Other errors are possible too, and depend on what kind of filesystem the file is on.
27270  * Note that in many non-local file cases read and write streams are not supported,
27271  * so make sure you really need to do read and write streaming, rather than
27272  * just opening for reading or writing.
27273  *
27274  * Free the returned object with g_object_unref().
27275  *
27276  * Returns: (transfer full): #GFileIOStream or %NULL on error.
27277  * Since: 2.22
27278  */
27279
27280
27281 /**
27282  * g_file_open_readwrite_async:
27283  * @file: input #GFile.
27284  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27285  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27286  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
27287  * @user_data: (closure): the data to pass to callback function
27288  *
27289  * Asynchronously opens @file for reading and writing.
27290  *
27291  * For more details, see g_file_open_readwrite() which is
27292  * the synchronous version of this call.
27293  *
27294  * When the operation is finished, @callback will be called. You can then call
27295  * g_file_open_readwrite_finish() to get the result of the operation.
27296  *
27297  * Since: 2.22
27298  */
27299
27300
27301 /**
27302  * g_file_open_readwrite_finish:
27303  * @file: input #GFile.
27304  * @res: a #GAsyncResult.
27305  * @error: a #GError, or %NULL
27306  *
27307  * Finishes an asynchronous file read operation started with
27308  * g_file_open_readwrite_async().
27309  *
27310  * Free the returned object with g_object_unref().
27311  *
27312  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
27313  * Since: 2.22
27314  */
27315
27316
27317 /**
27318  * g_file_output_stream_get_etag:
27319  * @stream: a #GFileOutputStream.
27320  *
27321  * Gets the entity tag for the file when it has been written.
27322  * This must be called after the stream has been written
27323  * and closed, as the etag can change while writing.
27324  *
27325  * Returns: the entity tag for the stream.
27326  */
27327
27328
27329 /**
27330  * g_file_output_stream_query_info:
27331  * @stream: a #GFileOutputStream.
27332  * @attributes: a file attribute query string.
27333  * @cancellable: optional #GCancellable object, %NULL to ignore.
27334  * @error: a #GError, %NULL to ignore.
27335  *
27336  * Queries a file output stream for the given @attributes.
27337  * This function blocks while querying the stream. For the asynchronous
27338  * version of this function, see g_file_output_stream_query_info_async().
27339  * While the stream is blocked, the stream will set the pending flag
27340  * internally, and any other operations on the stream will fail with
27341  * %G_IO_ERROR_PENDING.
27342  *
27343  * Can fail if the stream was already closed (with @error being set to
27344  * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
27345  * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
27346  * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
27347  * all cases of failure, %NULL will be returned.
27348  *
27349  * If @cancellable is not %NULL, then the operation can be cancelled by
27350  * triggering the cancellable object from another thread. If the operation
27351  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
27352  * be returned.
27353  *
27354  * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
27355  */
27356
27357
27358 /**
27359  * g_file_output_stream_query_info_async:
27360  * @stream: a #GFileOutputStream.
27361  * @attributes: a file attribute query string.
27362  * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
27363  * @cancellable: optional #GCancellable object, %NULL to ignore.
27364  * @callback: callback to call when the request is satisfied
27365  * @user_data: the data to pass to callback function
27366  *
27367  * Asynchronously queries the @stream for a #GFileInfo. When completed,
27368  * @callback will be called with a #GAsyncResult which can be used to
27369  * finish the operation with g_file_output_stream_query_info_finish().
27370  *
27371  * For the synchronous version of this function, see
27372  * g_file_output_stream_query_info().
27373  */
27374
27375
27376 /**
27377  * g_file_output_stream_query_info_finish:
27378  * @stream: a #GFileOutputStream.
27379  * @result: a #GAsyncResult.
27380  * @error: a #GError, %NULL to ignore.
27381  *
27382  * Finalizes the asynchronous query started
27383  * by g_file_output_stream_query_info_async().
27384  *
27385  * Returns: (transfer full): A #GFileInfo for the finished query.
27386  */
27387
27388
27389 /**
27390  * g_file_parse_name:
27391  * @parse_name: a file name or path to be parsed.
27392  *
27393  * Constructs a #GFile with the given @parse_name (i.e. something given by g_file_get_parse_name()).
27394  * This operation never fails, but the returned object might not support any I/O
27395  * operation if the @parse_name cannot be parsed.
27396  *
27397  * Returns: (transfer full): a new #GFile.
27398  */
27399
27400
27401 /**
27402  * g_file_poll_mountable:
27403  * @file: input #GFile.
27404  * @cancellable: optional #GCancellable object, %NULL to ignore.
27405  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
27406  * @user_data: the data to pass to callback function
27407  *
27408  * Polls a file of type G_FILE_TYPE_MOUNTABLE.
27409  *
27410  * If @cancellable is not %NULL, then the operation can be cancelled by
27411  * triggering the cancellable object from another thread. If the operation
27412  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27413  *
27414  * When the operation is finished, @callback will be called. You can then call
27415  * g_file_mount_mountable_finish() to get the result of the operation.
27416  *
27417  * Since: 2.22
27418  */
27419
27420
27421 /**
27422  * g_file_poll_mountable_finish:
27423  * @file: input #GFile.
27424  * @result: a #GAsyncResult.
27425  * @error: a #GError, or %NULL
27426  *
27427  * Finishes a poll operation. See g_file_poll_mountable() for details.
27428  *
27429  * Finish an asynchronous poll operation that was polled
27430  * with g_file_poll_mountable().
27431  *
27432  * otherwise.
27433  *
27434  * Returns: %TRUE if the operation finished successfully. %FALSE
27435  * Since: 2.22
27436  */
27437
27438
27439 /**
27440  * g_file_query_default_handler:
27441  * @file: a #GFile to open.
27442  * @cancellable: optional #GCancellable object, %NULL to ignore.
27443  * @error: a #GError, or %NULL
27444  *
27445  * Returns the #GAppInfo that is registered as the default
27446  * application to handle the file specified by @file.
27447  *
27448  * If @cancellable is not %NULL, then the operation can be cancelled by
27449  * triggering the cancellable object from another thread. If the operation
27450  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27451  *
27452  * When you are done with it, release it with g_object_unref()
27453  *
27454  * Returns: (transfer full): a #GAppInfo if the handle was found, %NULL if there were errors.
27455  */
27456
27457
27458 /**
27459  * g_file_query_exists:
27460  * @file: input #GFile.
27461  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27462  *
27463  * Utility function to check if a particular file exists. This is
27464  * implemented using g_file_query_info() and as such does blocking I/O.
27465  *
27466  * Note that in many cases it is racy to first check for file existence
27467  * and then execute something based on the outcome of that, because the
27468  * file might have been created or removed in between the operations. The
27469  * general approach to handling that is to not check, but just do the
27470  * operation and handle the errors as they come.
27471  *
27472  * As an example of race-free checking, take the case of reading a file, and
27473  * if it doesn't exist, creating it. There are two racy versions: read it, and
27474  * on error create it; and: check if it exists, if not create it. These
27475  * can both result in two processes creating the file (with perhaps a partially
27476  * written file as the result). The correct approach is to always try to create
27477  * the file with g_file_create() which will either atomically create the file
27478  * or fail with a G_IO_ERROR_EXISTS error.
27479  *
27480  * However, in many cases an existence check is useful in a user
27481  * interface, for instance to make a menu item sensitive/insensitive, so that
27482  * you don't have to fool users that something is possible and then just show
27483  * and error dialog. If you do this, you should make sure to also handle the
27484  * errors that can happen due to races when you execute the operation.
27485  *
27486  * Returns: %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled).
27487  */
27488
27489
27490 /**
27491  * g_file_query_file_type:
27492  * @file: input #GFile.
27493  * @flags: a set of #GFileQueryInfoFlags passed to g_file_query_info().
27494  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27495  *
27496  * Utility function to inspect the #GFileType of a file. This is
27497  * implemented using g_file_query_info() and as such does blocking I/O.
27498  *
27499  * The primary use case of this method is to check if a file is a regular file,
27500  * directory, or symlink.
27501  *
27502  * does not exist
27503  *
27504  * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN if the file
27505  * Since: 2.18
27506  */
27507
27508
27509 /**
27510  * g_file_query_filesystem_info:
27511  * @file: input #GFile.
27512  * @attributes: an attribute query string.
27513  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27514  * @error: a #GError.
27515  *
27516  * Similar to g_file_query_info(), but obtains information
27517  * about the filesystem the @file is on, rather than the file itself.
27518  * For instance the amount of space available and the type of
27519  * the filesystem.
27520  *
27521  * The @attributes value is a string that specifies the file attributes that
27522  * should be gathered. It is not an error if it's not possible to read a particular
27523  * requested attribute from a file - it just won't be set. @attributes should
27524  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
27525  * means all attributes, and a wildcard like "filesystem::*" means all attributes in the
27526  * filesystem namespace. The standard namespace for filesystem attributes is "filesystem".
27527  * Common attributes of interest are #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE
27528  * (the total size of the filesystem in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of
27529  * bytes available), and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
27530  *
27531  * If @cancellable is not %NULL, then the operation can be cancelled by
27532  * triggering the cancellable object from another thread. If the operation
27533  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27534  *
27535  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
27536  * Other errors are possible too, and depend on what kind of filesystem the file is on.
27537  *
27538  * Free the returned object with g_object_unref().
27539  *
27540  * Returns: (transfer full): a #GFileInfo or %NULL if there was an error.
27541  */
27542
27543
27544 /**
27545  * g_file_query_filesystem_info_async:
27546  * @file: input #GFile.
27547  * @attributes: an attribute query string.
27548  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27549  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27550  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
27551  * @user_data: (closure): the data to pass to callback function
27552  *
27553  * Asynchronously gets the requested information about the filesystem
27554  * that the specified @file is on. The result is a #GFileInfo object
27555  * that contains key-value attributes (such as type or size for the
27556  * file).
27557  *
27558  * For more details, see g_file_query_filesystem_info() which is the
27559  * synchronous version of this call.
27560  *
27561  * When the operation is finished, @callback will be called. You can
27562  * then call g_file_query_info_finish() to get the result of the
27563  * operation.
27564  */
27565
27566
27567 /**
27568  * g_file_query_filesystem_info_finish:
27569  * @file: input #GFile.
27570  * @res: a #GAsyncResult.
27571  * @error: a #GError.
27572  *
27573  * Finishes an asynchronous filesystem info query.  See
27574  * g_file_query_filesystem_info_async().
27575  *
27576  * Free the returned object with g_object_unref().
27577  *
27578  * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
27579  */
27580
27581
27582 /**
27583  * g_file_query_info:
27584  * @file: input #GFile.
27585  * @attributes: an attribute query string.
27586  * @flags: a set of #GFileQueryInfoFlags.
27587  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27588  * @error: a #GError.
27589  *
27590  * Gets the requested information about specified @file. The result
27591  * is a #GFileInfo object that contains key-value attributes (such as
27592  * the type or size of the file).
27593  *
27594  * The @attributes value is a string that specifies the file attributes that
27595  * should be gathered. It is not an error if it's not possible to read a particular
27596  * requested attribute from a file - it just won't be set. @attributes should
27597  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
27598  * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
27599  * namespace. An example attribute query be "standard::*,owner::user".
27600  * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
27601  *
27602  * If @cancellable is not %NULL, then the operation can be cancelled by
27603  * triggering the cancellable object from another thread. If the operation
27604  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27605  *
27606  * For symlinks, normally the information about the target of the
27607  * symlink is returned, rather than information about the symlink itself.
27608  * However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in @flags the
27609  * information about the symlink itself will be returned. Also, for symlinks
27610  * that point to non-existing files the information about the symlink itself
27611  * will be returned.
27612  *
27613  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
27614  * Other errors are possible too, and depend on what kind of filesystem the file is on.
27615  *
27616  * Free the returned object with g_object_unref().
27617  *
27618  * Returns: (transfer full): a #GFileInfo for the given @file, or %NULL on error.
27619  */
27620
27621
27622 /**
27623  * g_file_query_info_async:
27624  * @file: input #GFile.
27625  * @attributes: an attribute query string.
27626  * @flags: a set of #GFileQueryInfoFlags.
27627  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27628  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27629  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
27630  * @user_data: (closure): the data to pass to callback function
27631  *
27632  * Asynchronously gets the requested information about specified @file. The result
27633  * is a #GFileInfo object that contains key-value attributes (such as type or size
27634  * for the file).
27635  *
27636  * For more details, see g_file_query_info() which is
27637  * the synchronous version of this call.
27638  *
27639  * When the operation is finished, @callback will be called. You can then call
27640  * g_file_query_info_finish() to get the result of the operation.
27641  */
27642
27643
27644 /**
27645  * g_file_query_info_finish:
27646  * @file: input #GFile.
27647  * @res: a #GAsyncResult.
27648  * @error: a #GError.
27649  *
27650  * Finishes an asynchronous file info query.
27651  * See g_file_query_info_async().
27652  *
27653  * Free the returned object with g_object_unref().
27654  *
27655  * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
27656  */
27657
27658
27659 /**
27660  * g_file_query_settable_attributes:
27661  * @file: input #GFile.
27662  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27663  * @error: a #GError, or %NULL
27664  *
27665  * Obtain the list of settable attributes for the file.
27666  *
27667  * Returns the type and full attribute name of all the attributes
27668  * that can be set on this file. This doesn't mean setting it will always
27669  * succeed though, you might get an access failure, or some specific
27670  * file may not support a specific attribute.
27671  *
27672  * If @cancellable is not %NULL, then the operation can be cancelled by
27673  * triggering the cancellable object from another thread. If the operation
27674  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27675  *
27676  * When you are done with it, release it with g_file_attribute_info_list_unref()
27677  *
27678  * Returns: a #GFileAttributeInfoList describing the settable attributes.
27679  */
27680
27681
27682 /**
27683  * g_file_query_writable_namespaces:
27684  * @file: input #GFile.
27685  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27686  * @error: a #GError, or %NULL
27687  *
27688  * Obtain the list of attribute namespaces where new attributes
27689  * can be created by a user. An example of this is extended
27690  * attributes (in the "xattr" namespace).
27691  *
27692  * If @cancellable is not %NULL, then the operation can be cancelled by
27693  * triggering the cancellable object from another thread. If the operation
27694  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27695  *
27696  * When you are done with it, release it with g_file_attribute_info_list_unref()
27697  *
27698  * Returns: a #GFileAttributeInfoList describing the writable namespaces.
27699  */
27700
27701
27702 /**
27703  * g_file_read:
27704  * @file: #GFile to read.
27705  * @cancellable: (allow-none): a #GCancellable
27706  * @error: a #GError, or %NULL
27707  *
27708  * Opens a file for reading. The result is a #GFileInputStream that
27709  * can be used to read the contents of the file.
27710  *
27711  * If @cancellable is not %NULL, then the operation can be cancelled by
27712  * triggering the cancellable object from another thread. If the operation
27713  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27714  *
27715  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
27716  * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
27717  * Other errors are possible too, and depend on what kind of filesystem the file is on.
27718  *
27719  * Free the returned object with g_object_unref().
27720  *
27721  * Virtual: read_fn
27722  * Returns: (transfer full): #GFileInputStream or %NULL on error.
27723  */
27724
27725
27726 /**
27727  * g_file_read_async:
27728  * @file: input #GFile
27729  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27730  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27731  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
27732  * @user_data: (closure): the data to pass to callback function
27733  *
27734  * Asynchronously opens @file for reading.
27735  *
27736  * For more details, see g_file_read() which is
27737  * the synchronous version of this call.
27738  *
27739  * When the operation is finished, @callback will be called. You can then call
27740  * g_file_read_finish() to get the result of the operation.
27741  */
27742
27743
27744 /**
27745  * g_file_read_finish:
27746  * @file: input #GFile.
27747  * @res: a #GAsyncResult.
27748  * @error: a #GError, or %NULL
27749  *
27750  * Finishes an asynchronous file read operation started with
27751  * g_file_read_async().
27752  *
27753  * Free the returned object with g_object_unref().
27754  *
27755  * Returns: (transfer full): a #GFileInputStream or %NULL on error.
27756  */
27757
27758
27759 /**
27760  * g_file_replace:
27761  * @file: input #GFile.
27762  * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore.
27763  * @make_backup: %TRUE if a backup should be created.
27764  * @flags: a set of #GFileCreateFlags.
27765  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27766  * @error: a #GError, or %NULL
27767  *
27768  * Returns an output stream for overwriting the file, possibly
27769  * creating a backup copy of the file first. If the file doesn't exist,
27770  * it will be created.
27771  *
27772  * This will try to replace the file in the safest way possible so
27773  * that any errors during the writing will not affect an already
27774  * existing copy of the file. For instance, for local files it
27775  * may write to a temporary file and then atomically rename over
27776  * the destination when the stream is closed.
27777  *
27778  * By default files created are generally readable by everyone,
27779  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
27780  * will be made readable only to the current user, to the level that
27781  * is supported on the target filesystem.
27782  *
27783  * If @cancellable is not %NULL, then the operation can be cancelled by
27784  * triggering the cancellable object from another thread. If the operation
27785  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27786  *
27787  * If you pass in a non-#NULL @etag value, then this value is
27788  * compared to the current entity tag of the file, and if they differ
27789  * an G_IO_ERROR_WRONG_ETAG error is returned. This generally means
27790  * that the file has been changed since you last read it. You can get
27791  * the new etag from g_file_output_stream_get_etag() after you've
27792  * finished writing and closed the #GFileOutputStream. When you load
27793  * a new file you can use g_file_input_stream_query_info() to get
27794  * the etag of the file.
27795  *
27796  * If @make_backup is %TRUE, this function will attempt to make a backup
27797  * of the current file before overwriting it. If this fails a G_IO_ERROR_CANT_CREATE_BACKUP
27798  * error will be returned. If you want to replace anyway, try again with
27799  * @make_backup set to %FALSE.
27800  *
27801  * If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned,
27802  * and if the file is some other form of non-regular file then a
27803  * G_IO_ERROR_NOT_REGULAR_FILE error will be returned.
27804  * Some file systems don't allow all file names, and may
27805  * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
27806  * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
27807  * Other errors are possible too, and depend on what kind of
27808  * filesystem the file is on.
27809  *
27810  * Free the returned object with g_object_unref().
27811  *
27812  * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
27813  */
27814
27815
27816 /**
27817  * g_file_replace_async:
27818  * @file: input #GFile.
27819  * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
27820  * @make_backup: %TRUE if a backup should be created.
27821  * @flags: a set of #GFileCreateFlags.
27822  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27823  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27824  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
27825  * @user_data: (closure): the data to pass to callback function
27826  *
27827  * Asynchronously overwrites the file, replacing the contents, possibly
27828  * creating a backup copy of the file first.
27829  *
27830  * For more details, see g_file_replace() which is
27831  * the synchronous version of this call.
27832  *
27833  * When the operation is finished, @callback will be called. You can then call
27834  * g_file_replace_finish() to get the result of the operation.
27835  */
27836
27837
27838 /**
27839  * g_file_replace_contents:
27840  * @file: input #GFile.
27841  * @contents: (element-type guint8) (array length=length): a string containing the new contents for @file.
27842  * @length: the length of @contents in bytes.
27843  * @etag: (allow-none): the old <link linkend="gfile-etag">entity tag</link> for the document, or %NULL
27844  * @make_backup: %TRUE if a backup should be created.
27845  * @flags: a set of #GFileCreateFlags.
27846  * @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
27847  * @cancellable: optional #GCancellable object, %NULL to ignore.
27848  * @error: a #GError, or %NULL
27849  *
27850  * Replaces the contents of @file with @contents of @length bytes.
27851  * If @etag is specified (not %NULL) any existing file must have that etag, or
27852  * the error %G_IO_ERROR_WRONG_ETAG will be returned.
27853  *
27854  * If @make_backup is %TRUE, this function will attempt to make a backup of @file.
27855  *
27856  * If @cancellable is not %NULL, then the operation can be cancelled by
27857  * triggering the cancellable object from another thread. If the operation
27858  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27859  *
27860  * The returned @new_etag can be used to verify that the file hasn't changed the
27861  * next time it is saved over.
27862  *
27863  * has occurred, this function will return %FALSE and set @error
27864  * appropriately if present.
27865  *
27866  * Returns: %TRUE if successful. If an error
27867  */
27868
27869
27870 /**
27871  * g_file_replace_contents_async:
27872  * @file: input #GFile.
27873  * @contents: (element-type guint8) (array length=length): string of contents to replace the file with.
27874  * @length: the length of @contents in bytes.
27875  * @etag: (allow-none): a new <link linkend="gfile-etag">entity tag</link> for the @file, or %NULL
27876  * @make_backup: %TRUE if a backup should be created.
27877  * @flags: a set of #GFileCreateFlags.
27878  * @cancellable: optional #GCancellable object, %NULL to ignore.
27879  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
27880  * @user_data: the data to pass to callback function
27881  *
27882  * Starts an asynchronous replacement of @file with the given
27883  * @contents of @length bytes. @etag will replace the document's
27884  * current entity tag.
27885  *
27886  * When this operation has completed, @callback will be called with
27887  * @user_user data, and the operation can be finalized with
27888  * g_file_replace_contents_finish().
27889  *
27890  * If @cancellable is not %NULL, then the operation can be cancelled by
27891  * triggering the cancellable object from another thread. If the operation
27892  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27893  *
27894  * If @make_backup is %TRUE, this function will attempt to
27895  * make a backup of @file.
27896  */
27897
27898
27899 /**
27900  * g_file_replace_contents_finish:
27901  * @file: input #GFile.
27902  * @res: a #GAsyncResult.
27903  * @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
27904  * @error: a #GError, or %NULL
27905  *
27906  * Finishes an asynchronous replace of the given @file. See
27907  * g_file_replace_contents_async(). Sets @new_etag to the new entity
27908  * tag for the document, if present.
27909  *
27910  * Returns: %TRUE on success, %FALSE on failure.
27911  */
27912
27913
27914 /**
27915  * g_file_replace_finish:
27916  * @file: input #GFile.
27917  * @res: a #GAsyncResult.
27918  * @error: a #GError, or %NULL
27919  *
27920  * Finishes an asynchronous file replace operation started with
27921  * g_file_replace_async().
27922  *
27923  * Free the returned object with g_object_unref().
27924  *
27925  * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
27926  */
27927
27928
27929 /**
27930  * g_file_replace_readwrite:
27931  * @file: a #GFile
27932  * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore
27933  * @make_backup: %TRUE if a backup should be created
27934  * @flags: a set of #GFileCreateFlags
27935  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
27936  * @error: return location for a #GError, or %NULL
27937  *
27938  * Returns an output stream for overwriting the file in readwrite mode,
27939  * possibly creating a backup copy of the file first. If the file doesn't
27940  * exist, it will be created.
27941  *
27942  * For details about the behaviour, see g_file_replace() which does the same
27943  * thing but returns an output stream only.
27944  *
27945  * Note that in many non-local file cases read and write streams are not
27946  * supported, so make sure you really need to do read and write streaming,
27947  * rather than just opening for reading or writing.
27948  *
27949  * Free the returned object with g_object_unref().
27950  *
27951  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
27952  * Since: 2.22
27953  */
27954
27955
27956 /**
27957  * g_file_replace_readwrite_async:
27958  * @file: input #GFile.
27959  * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
27960  * @make_backup: %TRUE if a backup should be created.
27961  * @flags: a set of #GFileCreateFlags.
27962  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27963  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27964  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
27965  * @user_data: (closure): the data to pass to callback function
27966  *
27967  * Asynchronously overwrites the file in read-write mode, replacing the
27968  * contents, possibly creating a backup copy of the file first.
27969  *
27970  * For more details, see g_file_replace_readwrite() which is
27971  * the synchronous version of this call.
27972  *
27973  * When the operation is finished, @callback will be called. You can then
27974  * call g_file_replace_readwrite_finish() to get the result of the operation.
27975  *
27976  * Since: 2.22
27977  */
27978
27979
27980 /**
27981  * g_file_replace_readwrite_finish:
27982  * @file: input #GFile.
27983  * @res: a #GAsyncResult.
27984  * @error: a #GError, or %NULL
27985  *
27986  * Finishes an asynchronous file replace operation started with
27987  * g_file_replace_readwrite_async().
27988  *
27989  * Free the returned object with g_object_unref().
27990  *
27991  * Returns: (transfer full): a #GFileIOStream, or %NULL on error.
27992  * Since: 2.22
27993  */
27994
27995
27996 /**
27997  * g_file_resolve_relative_path:
27998  * @file: input #GFile.
27999  * @relative_path: a given relative path string.
28000  *
28001  * Resolves a relative path for @file to an absolute path.
28002  *
28003  * This call does no blocking i/o.
28004  *
28005  * is %NULL or if @file is invalid.
28006  * Free the returned object with g_object_unref().
28007  *
28008  * Returns: (transfer full): #GFile to the resolved path. %NULL if @relative_path
28009  */
28010
28011
28012 /**
28013  * g_file_set_attribute:
28014  * @file: input #GFile.
28015  * @attribute: a string containing the attribute's name.
28016  * @type: The type of the attribute
28017  * @value_p: (allow-none): a pointer to the value (or the pointer itself if the type is a pointer type)
28018  * @flags: a set of #GFileQueryInfoFlags.
28019  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28020  * @error: a #GError, or %NULL
28021  *
28022  * Sets an attribute in the file with attribute name @attribute to @value.
28023  *
28024  * Some attributes can be unset by setting @attribute to
28025  * %G_FILE_ATTRIBUTE_TYPE_INVALID and @value_p to %NULL.
28026  *
28027  * If @cancellable is not %NULL, then the operation can be cancelled by
28028  * triggering the cancellable object from another thread. If the operation
28029  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28030  *
28031  * Returns: %TRUE if the attribute was set, %FALSE otherwise.
28032  */
28033
28034
28035 /**
28036  * g_file_set_attribute_byte_string:
28037  * @file: input #GFile.
28038  * @attribute: a string containing the attribute's name.
28039  * @value: a string containing the attribute's new value.
28040  * @flags: a #GFileQueryInfoFlags.
28041  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28042  * @error: a #GError, or %NULL
28043  *
28044  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value.
28045  * If @attribute is of a different type, this operation will fail,
28046  * returning %FALSE.
28047  *
28048  * If @cancellable is not %NULL, then the operation can be cancelled by
28049  * triggering the cancellable object from another thread. If the operation
28050  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28051  *
28052  * in the @file, %FALSE otherwise.
28053  *
28054  * Returns: %TRUE if the @attribute was successfully set to @value
28055  */
28056
28057
28058 /**
28059  * g_file_set_attribute_int32:
28060  * @file: input #GFile.
28061  * @attribute: a string containing the attribute's name.
28062  * @value: a #gint32 containing the attribute's new value.
28063  * @flags: a #GFileQueryInfoFlags.
28064  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28065  * @error: a #GError, or %NULL
28066  *
28067  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value.
28068  * If @attribute is of a different type, this operation will fail.
28069  *
28070  * If @cancellable is not %NULL, then the operation can be cancelled by
28071  * triggering the cancellable object from another thread. If the operation
28072  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28073  *
28074  * in the @file, %FALSE otherwise.
28075  *
28076  * Returns: %TRUE if the @attribute was successfully set to @value
28077  */
28078
28079
28080 /**
28081  * g_file_set_attribute_int64:
28082  * @file: input #GFile.
28083  * @attribute: a string containing the attribute's name.
28084  * @value: a #guint64 containing the attribute's new value.
28085  * @flags: a #GFileQueryInfoFlags.
28086  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28087  * @error: a #GError, or %NULL
28088  *
28089  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value.
28090  * If @attribute is of a different type, this operation will fail.
28091  *
28092  * If @cancellable is not %NULL, then the operation can be cancelled by
28093  * triggering the cancellable object from another thread. If the operation
28094  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28095  *
28096  * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
28097  */
28098
28099
28100 /**
28101  * g_file_set_attribute_string:
28102  * @file: input #GFile.
28103  * @attribute: a string containing the attribute's name.
28104  * @value: a string containing the attribute's value.
28105  * @flags: #GFileQueryInfoFlags.
28106  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28107  * @error: a #GError, or %NULL
28108  *
28109  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value.
28110  * If @attribute is of a different type, this operation will fail.
28111  *
28112  * If @cancellable is not %NULL, then the operation can be cancelled by
28113  * triggering the cancellable object from another thread. If the operation
28114  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28115  *
28116  * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
28117  */
28118
28119
28120 /**
28121  * g_file_set_attribute_uint32:
28122  * @file: input #GFile.
28123  * @attribute: a string containing the attribute's name.
28124  * @value: a #guint32 containing the attribute's new value.
28125  * @flags: a #GFileQueryInfoFlags.
28126  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28127  * @error: a #GError, or %NULL
28128  *
28129  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value.
28130  * If @attribute is of a different type, this operation will fail.
28131  *
28132  * If @cancellable is not %NULL, then the operation can be cancelled by
28133  * triggering the cancellable object from another thread. If the operation
28134  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28135  *
28136  * in the @file, %FALSE otherwise.
28137  *
28138  * Returns: %TRUE if the @attribute was successfully set to @value
28139  */
28140
28141
28142 /**
28143  * g_file_set_attribute_uint64:
28144  * @file: input #GFile.
28145  * @attribute: a string containing the attribute's name.
28146  * @value: a #guint64 containing the attribute's new value.
28147  * @flags: a #GFileQueryInfoFlags.
28148  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28149  * @error: a #GError, or %NULL
28150  *
28151  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value.
28152  * If @attribute is of a different type, this operation will fail.
28153  *
28154  * If @cancellable is not %NULL, then the operation can be cancelled by
28155  * triggering the cancellable object from another thread. If the operation
28156  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28157  *
28158  * in the @file, %FALSE otherwise.
28159  *
28160  * Returns: %TRUE if the @attribute was successfully set to @value
28161  */
28162
28163
28164 /**
28165  * g_file_set_attributes_async:
28166  * @file: input #GFile.
28167  * @info: a #GFileInfo.
28168  * @flags: a #GFileQueryInfoFlags.
28169  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
28170  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28171  * @callback: (scope async): a #GAsyncReadyCallback.
28172  * @user_data: (closure): a #gpointer.
28173  *
28174  * Asynchronously sets the attributes of @file with @info.
28175  *
28176  * For more details, see g_file_set_attributes_from_info() which is
28177  * the synchronous version of this call.
28178  *
28179  * When the operation is finished, @callback will be called. You can then call
28180  * g_file_set_attributes_finish() to get the result of the operation.
28181  */
28182
28183
28184 /**
28185  * g_file_set_attributes_finish:
28186  * @file: input #GFile.
28187  * @result: a #GAsyncResult.
28188  * @info: (out) (transfer full): a #GFileInfo.
28189  * @error: a #GError, or %NULL
28190  *
28191  * Finishes setting an attribute started in g_file_set_attributes_async().
28192  *
28193  * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise.
28194  */
28195
28196
28197 /**
28198  * g_file_set_attributes_from_info:
28199  * @file: input #GFile.
28200  * @info: a #GFileInfo.
28201  * @flags: #GFileQueryInfoFlags
28202  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28203  * @error: a #GError, or %NULL
28204  *
28205  * Tries to set all attributes in the #GFileInfo on the target values,
28206  * not stopping on the first error.
28207  *
28208  * If there is any error during this operation then @error will be set to
28209  * the first error. Error on particular fields are flagged by setting
28210  * the "status" field in the attribute value to
28211  * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can also detect
28212  * further errors.
28213  *
28214  * If @cancellable is not %NULL, then the operation can be cancelled by
28215  * triggering the cancellable object from another thread. If the operation
28216  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28217  *
28218  * Returns: %TRUE if there was any error, %FALSE otherwise.
28219  */
28220
28221
28222 /**
28223  * g_file_set_display_name:
28224  * @file: input #GFile.
28225  * @display_name: a string.
28226  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28227  * @error: a #GError, or %NULL
28228  *
28229  * Renames @file to the specified display name.
28230  *
28231  * The display name is converted from UTF8 to the correct encoding for the target
28232  * filesystem if possible and the @file is renamed to this.
28233  *
28234  * If you want to implement a rename operation in the user interface the edit name
28235  * (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the initial value in the rename
28236  * widget, and then the result after editing should be passed to g_file_set_display_name().
28237  *
28238  * On success the resulting converted filename is returned.
28239  *
28240  * If @cancellable is not %NULL, then the operation can be cancelled by
28241  * triggering the cancellable object from another thread. If the operation
28242  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28243  *
28244  * if there was an error.
28245  * Free the returned object with g_object_unref().
28246  *
28247  * Returns: (transfer full): a #GFile specifying what @file was renamed to, or %NULL
28248  */
28249
28250
28251 /**
28252  * g_file_set_display_name_async:
28253  * @file: input #GFile.
28254  * @display_name: a string.
28255  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
28256  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28257  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
28258  * @user_data: (closure): the data to pass to callback function
28259  *
28260  * Asynchronously sets the display name for a given #GFile.
28261  *
28262  * For more details, see g_file_set_display_name() which is
28263  * the synchronous version of this call.
28264  *
28265  * When the operation is finished, @callback will be called. You can then call
28266  * g_file_set_display_name_finish() to get the result of the operation.
28267  */
28268
28269
28270 /**
28271  * g_file_set_display_name_finish:
28272  * @file: input #GFile.
28273  * @res: a #GAsyncResult.
28274  * @error: a #GError, or %NULL
28275  *
28276  * Finishes setting a display name started with
28277  * g_file_set_display_name_async().
28278  *
28279  * Free the returned object with g_object_unref().
28280  *
28281  * Returns: (transfer full): a #GFile or %NULL on error.
28282  */
28283
28284
28285 /**
28286  * g_file_start_mountable:
28287  * @file: input #GFile.
28288  * @flags: flags affecting the operation
28289  * @start_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
28290  * @cancellable: optional #GCancellable object, %NULL to ignore.
28291  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
28292  * @user_data: the data to pass to callback function
28293  *
28294  * Starts a file of type G_FILE_TYPE_MOUNTABLE.
28295  * Using @start_operation, you can request callbacks when, for instance,
28296  * passwords are needed during authentication.
28297  *
28298  * If @cancellable is not %NULL, then the operation can be cancelled by
28299  * triggering the cancellable object from another thread. If the operation
28300  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28301  *
28302  * When the operation is finished, @callback will be called. You can then call
28303  * g_file_mount_mountable_finish() to get the result of the operation.
28304  *
28305  * Since: 2.22
28306  */
28307
28308
28309 /**
28310  * g_file_start_mountable_finish:
28311  * @file: input #GFile.
28312  * @result: a #GAsyncResult.
28313  * @error: a #GError, or %NULL
28314  *
28315  * Finishes a start operation. See g_file_start_mountable() for details.
28316  *
28317  * Finish an asynchronous start operation that was started
28318  * with g_file_start_mountable().
28319  *
28320  * otherwise.
28321  *
28322  * Returns: %TRUE if the operation finished successfully. %FALSE
28323  * Since: 2.22
28324  */
28325
28326
28327 /**
28328  * g_file_stop_mountable:
28329  * @file: input #GFile.
28330  * @flags: flags affecting the operation
28331  * @mount_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
28332  * @cancellable: optional #GCancellable object, %NULL to ignore.
28333  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
28334  * @user_data: the data to pass to callback function
28335  *
28336  * Stops a file of type G_FILE_TYPE_MOUNTABLE.
28337  *
28338  * If @cancellable is not %NULL, then the operation can be cancelled by
28339  * triggering the cancellable object from another thread. If the operation
28340  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28341  *
28342  * When the operation is finished, @callback will be called. You can then call
28343  * g_file_stop_mountable_finish() to get the result of the operation.
28344  *
28345  * Since: 2.22
28346  */
28347
28348
28349 /**
28350  * g_file_stop_mountable_finish:
28351  * @file: input #GFile.
28352  * @result: a #GAsyncResult.
28353  * @error: a #GError, or %NULL
28354  *
28355  * Finishes an stop operation, see g_file_stop_mountable() for details.
28356  *
28357  * Finish an asynchronous stop operation that was started
28358  * with g_file_stop_mountable().
28359  *
28360  * otherwise.
28361  *
28362  * Returns: %TRUE if the operation finished successfully. %FALSE
28363  * Since: 2.22
28364  */
28365
28366
28367 /**
28368  * g_file_supports_thread_contexts:
28369  * @file: a #GFile.
28370  *
28371  * Checks if @file supports <link
28372  * linkend="g-main-context-push-thread-default-context">thread-default
28373  * contexts</link>. If this returns %FALSE, you cannot perform
28374  * asynchronous operations on @file in a thread that has a
28375  * thread-default context.
28376  *
28377  * Returns: Whether or not @file supports thread-default contexts.
28378  * Since: 2.22
28379  */
28380
28381
28382 /**
28383  * g_file_trash:
28384  * @file: #GFile to send to trash.
28385  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28386  * @error: a #GError, or %NULL
28387  *
28388  * Sends @file to the "Trashcan", if possible. This is similar to
28389  * deleting it, but the user can recover it before emptying the trashcan.
28390  * Not all file systems support trashing, so this call can return the
28391  * %G_IO_ERROR_NOT_SUPPORTED error.
28392  *
28393  *
28394  * If @cancellable is not %NULL, then the operation can be cancelled by
28395  * triggering the cancellable object from another thread. If the operation
28396  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28397  *
28398  * Returns: %TRUE on successful trash, %FALSE otherwise.
28399  */
28400
28401
28402 /**
28403  * g_file_unmount_mountable:
28404  * @file: input #GFile.
28405  * @flags: flags affecting the operation
28406  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28407  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
28408  * @user_data: (closure): the data to pass to callback function
28409  *
28410  * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
28411  *
28412  * If @cancellable is not %NULL, then the operation can be cancelled by
28413  * triggering the cancellable object from another thread. If the operation
28414  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28415  *
28416  * When the operation is finished, @callback will be called. You can then call
28417  * g_file_unmount_mountable_finish() to get the result of the operation.
28418  *
28419  * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation() instead.
28420  */
28421
28422
28423 /**
28424  * g_file_unmount_mountable_finish:
28425  * @file: input #GFile.
28426  * @result: a #GAsyncResult.
28427  * @error: a #GError, or %NULL
28428  *
28429  * Finishes an unmount operation, see g_file_unmount_mountable() for details.
28430  *
28431  * Finish an asynchronous unmount operation that was started
28432  * with g_file_unmount_mountable().
28433  *
28434  * otherwise.
28435  *
28436  * Returns: %TRUE if the operation finished successfully. %FALSE
28437  * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation_finish() instead.
28438  */
28439
28440
28441 /**
28442  * g_file_unmount_mountable_with_operation:
28443  * @file: input #GFile.
28444  * @flags: flags affecting the operation
28445  * @mount_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
28446  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28447  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
28448  * @user_data: (closure): the data to pass to callback function
28449  *
28450  * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
28451  *
28452  * If @cancellable is not %NULL, then the operation can be cancelled by
28453  * triggering the cancellable object from another thread. If the operation
28454  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28455  *
28456  * When the operation is finished, @callback will be called. You can then call
28457  * g_file_unmount_mountable_finish() to get the result of the operation.
28458  *
28459  * Since: 2.22
28460  */
28461
28462
28463 /**
28464  * g_file_unmount_mountable_with_operation_finish:
28465  * @file: input #GFile.
28466  * @result: a #GAsyncResult.
28467  * @error: a #GError, or %NULL
28468  *
28469  * Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.
28470  *
28471  * Finish an asynchronous unmount operation that was started
28472  * with g_file_unmount_mountable_with_operation().
28473  *
28474  * otherwise.
28475  *
28476  * Returns: %TRUE if the operation finished successfully. %FALSE
28477  * Since: 2.22
28478  */
28479
28480
28481 /**
28482  * g_filename_completer_get_completion_suffix:
28483  * @completer: the filename completer.
28484  * @initial_text: text to be completed.
28485  *
28486  * Obtains a completion for @initial_text from @completer.
28487  *
28488  * This string is not owned by GIO, so remember to g_free() it
28489  * when finished.
28490  *
28491  * Returns: a completed string, or %NULL if no completion exists.
28492  */
28493
28494
28495 /**
28496  * g_filename_completer_get_completions:
28497  * @completer: the filename completer.
28498  * @initial_text: text to be completed.
28499  *
28500  * Gets an array of completion strings for a given initial text.
28501  *
28502  * This array must be freed by g_strfreev() when finished.
28503  *
28504  * Returns: (array zero-terminated=1) (transfer full): array of strings with possible completions for @initial_text.
28505  */
28506
28507
28508 /**
28509  * g_filename_completer_new:
28510  *
28511  * Creates a new filename completer.
28512  *
28513  * Returns: a #GFilenameCompleter.
28514  */
28515
28516
28517 /**
28518  * g_filename_completer_set_dirs_only:
28519  * @completer: the filename completer.
28520  * @dirs_only: a #gboolean.
28521  *
28522  * If @dirs_only is %TRUE, @completer will only
28523  * complete directory names, and not file names.
28524  */
28525
28526
28527 /**
28528  * g_filter_input_stream_get_base_stream:
28529  * @stream: a #GFilterInputStream.
28530  *
28531  * Gets the base stream for the filter stream.
28532  *
28533  * Returns: (transfer none): a #GInputStream.
28534  */
28535
28536
28537 /**
28538  * g_filter_input_stream_get_close_base_stream:
28539  * @stream: a #GFilterInputStream.
28540  *
28541  * Returns whether the base stream will be closed when @stream is
28542  * closed.
28543  *
28544  * Returns: %TRUE if the base stream will be closed.
28545  */
28546
28547
28548 /**
28549  * g_filter_input_stream_set_close_base_stream:
28550  * @stream: a #GFilterInputStream.
28551  * @close_base: %TRUE to close the base stream.
28552  *
28553  * Sets whether the base stream will be closed when @stream is closed.
28554  */
28555
28556
28557 /**
28558  * g_filter_output_stream_get_base_stream:
28559  * @stream: a #GFilterOutputStream.
28560  *
28561  * Gets the base stream for the filter stream.
28562  *
28563  * Returns: (transfer none): a #GOutputStream.
28564  */
28565
28566
28567 /**
28568  * g_filter_output_stream_get_close_base_stream:
28569  * @stream: a #GFilterOutputStream.
28570  *
28571  * Returns whether the base stream will be closed when @stream is
28572  * closed.
28573  *
28574  * Returns: %TRUE if the base stream will be closed.
28575  */
28576
28577
28578 /**
28579  * g_filter_output_stream_set_close_base_stream:
28580  * @stream: a #GFilterOutputStream.
28581  * @close_base: %TRUE to close the base stream.
28582  *
28583  * Sets whether the base stream will be closed when @stream is closed.
28584  */
28585
28586
28587 /**
28588  * g_icon_equal:
28589  * @icon1: (allow-none): pointer to the first #GIcon.
28590  * @icon2: (allow-none): pointer to the second #GIcon.
28591  *
28592  * Checks if two icons are equal.
28593  *
28594  * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise.
28595  */
28596
28597
28598 /**
28599  * g_icon_hash:
28600  * @icon: #gconstpointer to an icon object.
28601  *
28602  * Gets a hash for an icon.
28603  *
28604  * use in a #GHashTable or similar data structure.
28605  *
28606  * Virtual: hash
28607  * Returns: a #guint containing a hash for the @icon, suitable for
28608  */
28609
28610
28611 /**
28612  * g_icon_new_for_string:
28613  * @str: A string obtained via g_icon_to_string().
28614  * @error: Return location for error.
28615  *
28616  * Generate a #GIcon instance from @str. This function can fail if
28617  * @str is not valid - see g_icon_to_string() for discussion.
28618  *
28619  * If your application or library provides one or more #GIcon
28620  * implementations you need to ensure that each #GType is registered
28621  * with the type system prior to calling g_icon_new_for_string().
28622  *
28623  * interface or %NULL if @error is set.
28624  *
28625  * Returns: (transfer full): An object implementing the #GIcon
28626  * Since: 2.20
28627  */
28628
28629
28630 /**
28631  * g_icon_to_string:
28632  * @icon: a #GIcon.
28633  *
28634  * Generates a textual representation of @icon that can be used for
28635  * serialization such as when passing @icon to a different process or
28636  * saving it to persistent storage. Use g_icon_new_for_string() to
28637  * get @icon back from the returned string.
28638  *
28639  * The encoding of the returned string is proprietary to #GIcon except
28640  * in the following two cases
28641  *
28642  * <itemizedlist>
28643  * <listitem><para>
28644  * If @icon is a #GFileIcon, the returned string is a native path
28645  * (such as <literal>/path/to/my icon.png</literal>) without escaping
28646  * if the #GFile for @icon is a native file.  If the file is not
28647  * native, the returned string is the result of g_file_get_uri()
28648  * (such as <literal>sftp://path/to/my&percnt;20icon.png</literal>).
28649  * </para></listitem>
28650  * <listitem><para>
28651  * If @icon is a #GThemedIcon with exactly one name, the encoding is
28652  * simply the name (such as <literal>network-server</literal>).
28653  * </para></listitem>
28654  * </itemizedlist>
28655  *
28656  * be serialized. Use g_free() to free.
28657  *
28658  * Virtual: to_tokens
28659  * Returns: An allocated NUL-terminated UTF8 string or %NULL if @icon can't
28660  * Since: 2.20
28661  */
28662
28663
28664 /**
28665  * g_inet_address_equal:
28666  * @address: A #GInetAddress.
28667  * @other_address: Another #GInetAddress.
28668  *
28669  * Checks if two #GInetAddress instances are equal, e.g. the same address.
28670  *
28671  * Returns: %TRUE if @address and @other_address are equal, %FALSE otherwise.
28672  * Since: 2.30
28673  */
28674
28675
28676 /**
28677  * g_inet_address_get_family:
28678  * @address: a #GInetAddress
28679  *
28680  * Gets @address's family
28681  *
28682  * Returns: @address's family
28683  * Since: 2.22
28684  */
28685
28686
28687 /**
28688  * g_inet_address_get_is_any:
28689  * @address: a #GInetAddress
28690  *
28691  * Tests whether @address is the "any" address for its family.
28692  *
28693  * Returns: %TRUE if @address is the "any" address for its family.
28694  * Since: 2.22
28695  */
28696
28697
28698 /**
28699  * g_inet_address_get_is_link_local:
28700  * @address: a #GInetAddress
28701  *
28702  * Tests whether @address is a link-local address (that is, if it
28703  * identifies a host on a local network that is not connected to the
28704  * Internet).
28705  *
28706  * Returns: %TRUE if @address is a link-local address.
28707  * Since: 2.22
28708  */
28709
28710
28711 /**
28712  * g_inet_address_get_is_loopback:
28713  * @address: a #GInetAddress
28714  *
28715  * Tests whether @address is the loopback address for its family.
28716  *
28717  * Returns: %TRUE if @address is the loopback address for its family.
28718  * Since: 2.22
28719  */
28720
28721
28722 /**
28723  * g_inet_address_get_is_mc_global:
28724  * @address: a #GInetAddress
28725  *
28726  * Tests whether @address is a global multicast address.
28727  *
28728  * Returns: %TRUE if @address is a global multicast address.
28729  * Since: 2.22
28730  */
28731
28732
28733 /**
28734  * g_inet_address_get_is_mc_link_local:
28735  * @address: a #GInetAddress
28736  *
28737  * Tests whether @address is a link-local multicast address.
28738  *
28739  * Returns: %TRUE if @address is a link-local multicast address.
28740  * Since: 2.22
28741  */
28742
28743
28744 /**
28745  * g_inet_address_get_is_mc_node_local:
28746  * @address: a #GInetAddress
28747  *
28748  * Tests whether @address is a node-local multicast address.
28749  *
28750  * Returns: %TRUE if @address is a node-local multicast address.
28751  * Since: 2.22
28752  */
28753
28754
28755 /**
28756  * g_inet_address_get_is_mc_org_local:
28757  * @address: a #GInetAddress
28758  *
28759  * Tests whether @address is an organization-local multicast address.
28760  *
28761  * Returns: %TRUE if @address is an organization-local multicast address.
28762  * Since: 2.22
28763  */
28764
28765
28766 /**
28767  * g_inet_address_get_is_mc_site_local:
28768  * @address: a #GInetAddress
28769  *
28770  * Tests whether @address is a site-local multicast address.
28771  *
28772  * Returns: %TRUE if @address is a site-local multicast address.
28773  * Since: 2.22
28774  */
28775
28776
28777 /**
28778  * g_inet_address_get_is_multicast:
28779  * @address: a #GInetAddress
28780  *
28781  * Tests whether @address is a multicast address.
28782  *
28783  * Returns: %TRUE if @address is a multicast address.
28784  * Since: 2.22
28785  */
28786
28787
28788 /**
28789  * g_inet_address_get_is_site_local:
28790  * @address: a #GInetAddress
28791  *
28792  * Tests whether @address is a site-local address such as 10.0.0.1
28793  * (that is, the address identifies a host on a local network that can
28794  * not be reached directly from the Internet, but which may have
28795  * outgoing Internet connectivity via a NAT or firewall).
28796  *
28797  * Returns: %TRUE if @address is a site-local address.
28798  * Since: 2.22
28799  */
28800
28801
28802 /**
28803  * g_inet_address_get_native_size:
28804  * @address: a #GInetAddress
28805  *
28806  * Gets the size of the native raw binary address for @address. This
28807  * is the size of the data that you get from g_inet_address_to_bytes().
28808  *
28809  * Returns: the number of bytes used for the native version of @address.
28810  * Since: 2.22
28811  */
28812
28813
28814 /**
28815  * g_inet_address_mask_equal:
28816  * @mask: a #GInetAddressMask
28817  * @mask2: another #GInetAddressMask
28818  *
28819  * Tests if @mask and @mask2 are the same mask.
28820  *
28821  * Returns: whether @mask and @mask2 are the same mask
28822  * Since: 2.32
28823  */
28824
28825
28826 /**
28827  * g_inet_address_mask_get_address:
28828  * @mask: a #GInetAddressMask
28829  *
28830  * Gets @mask's base address
28831  *
28832  * Returns: (transfer none): @mask's base address
28833  * Since: 2.32
28834  */
28835
28836
28837 /**
28838  * g_inet_address_mask_get_family:
28839  * @mask: a #GInetAddressMask
28840  *
28841  * Gets the #GSocketFamily of @mask's address
28842  *
28843  * Returns: the #GSocketFamily of @mask's address
28844  * Since: 2.32
28845  */
28846
28847
28848 /**
28849  * g_inet_address_mask_get_length:
28850  * @mask: a #GInetAddressMask
28851  *
28852  * Gets @mask's length
28853  *
28854  * Returns: @mask's length
28855  * Since: 2.32
28856  */
28857
28858
28859 /**
28860  * g_inet_address_mask_matches:
28861  * @mask: a #GInetAddressMask
28862  * @address: a #GInetAddress
28863  *
28864  * Tests if @address falls within the range described by @mask.
28865  *
28866  * @mask.
28867  *
28868  * Returns: whether @address falls within the range described by
28869  * Since: 2.32
28870  */
28871
28872
28873 /**
28874  * g_inet_address_mask_new:
28875  * @addr: a #GInetAddress
28876  * @length: number of bits of @addr to use
28877  * @error: return location for #GError, or %NULL
28878  *
28879  * Creates a new #GInetAddressMask representing all addresses whose
28880  * first @length bits match @addr.
28881  *
28882  * Returns: a new #GInetAddressMask, or %NULL on error
28883  * Since: 2.32
28884  */
28885
28886
28887 /**
28888  * g_inet_address_mask_new_from_string:
28889  * @mask_string: an IP address or address/length string
28890  * @error: return location for #GError, or %NULL
28891  *
28892  * Parses @mask_string as an IP address and (optional) length, and
28893  * creates a new #GInetAddressMask. The length, if present, is
28894  * delimited by a "/". If it is not present, then the length is
28895  * assumed to be the full length of the address.
28896  *
28897  * on error.
28898  *
28899  * Returns: a new #GInetAddressMask corresponding to @string, or %NULL
28900  * Since: 2.32
28901  */
28902
28903
28904 /**
28905  * g_inet_address_mask_to_string:
28906  * @mask: a #GInetAddressMask
28907  *
28908  * Converts @mask back to its corresponding string form.
28909  *
28910  * Returns: a string corresponding to @mask.
28911  * Since: 2.32
28912  */
28913
28914
28915 /**
28916  * g_inet_address_new_any:
28917  * @family: the address family
28918  *
28919  * Creates a #GInetAddress for the "any" address (unassigned/"don't
28920  * care") for @family.
28921  *
28922  * for @family.
28923  *
28924  * Returns: a new #GInetAddress corresponding to the "any" address
28925  * Since: 2.22
28926  */
28927
28928
28929 /**
28930  * g_inet_address_new_from_bytes:
28931  * @bytes: (array) (element-type guint8): raw address data
28932  * @family: the address family of @bytes
28933  *
28934  * Creates a new #GInetAddress from the given @family and @bytes.
28935  * @bytes should be 4 bytes for %G_SOCKET_FAMILY_IPV4 and 16 bytes for
28936  * %G_SOCKET_FAMILY_IPV6.
28937  *
28938  * Returns: a new #GInetAddress corresponding to @family and @bytes.
28939  * Since: 2.22
28940  */
28941
28942
28943 /**
28944  * g_inet_address_new_from_string:
28945  * @string: a string representation of an IP address
28946  *
28947  * Parses @string as an IP address and creates a new #GInetAddress.
28948  *
28949  * @string could not be parsed.
28950  *
28951  * Returns: a new #GInetAddress corresponding to @string, or %NULL if
28952  * Since: 2.22
28953  */
28954
28955
28956 /**
28957  * g_inet_address_new_loopback:
28958  * @family: the address family
28959  *
28960  * Creates a #GInetAddress for the loopback address for @family.
28961  *
28962  * for @family.
28963  *
28964  * Returns: a new #GInetAddress corresponding to the loopback address
28965  * Since: 2.22
28966  */
28967
28968
28969 /**
28970  * g_inet_address_to_bytes: (skip)
28971  * @address: a #GInetAddress
28972  *
28973  * Gets the raw binary address data from @address.
28974  *
28975  * which should not be modified, stored, or freed. The size of this
28976  * array can be gotten with g_inet_address_get_native_size().
28977  *
28978  * Returns: a pointer to an internal array of the bytes in @address,
28979  * Since: 2.22
28980  */
28981
28982
28983 /**
28984  * g_inet_address_to_string:
28985  * @address: a #GInetAddress
28986  *
28987  * Converts @address to string form.
28988  *
28989  * freed after use.
28990  *
28991  * Returns: a representation of @address as a string, which should be
28992  * Since: 2.22
28993  */
28994
28995
28996 /**
28997  * g_inet_socket_address_get_address:
28998  * @address: a #GInetSocketAddress
28999  *
29000  * Gets @address's #GInetAddress.
29001  *
29002  * g_object_ref()'d if it will be stored
29003  *
29004  * Returns: (transfer none): the #GInetAddress for @address, which must be
29005  * Since: 2.22
29006  */
29007
29008
29009 /**
29010  * g_inet_socket_address_get_flowinfo:
29011  * @address: a %G_SOCKET_FAMILY_IPV6 #GInetSocketAddress
29012  *
29013  * Gets the <literal>sin6_flowinfo</literal> field from @address,
29014  * which must be an IPv6 address.
29015  *
29016  * Returns: the flowinfo field
29017  * Since: 2.32
29018  */
29019
29020
29021 /**
29022  * g_inet_socket_address_get_port:
29023  * @address: a #GInetSocketAddress
29024  *
29025  * Gets @address's port.
29026  *
29027  * Returns: the port for @address
29028  * Since: 2.22
29029  */
29030
29031
29032 /**
29033  * g_inet_socket_address_get_scope_id:
29034  * @address: a %G_SOCKET_FAMILY_IPV6 #GInetAddress
29035  *
29036  * Gets the <literal>sin6_scope_id</literal> field from @address,
29037  * which must be an IPv6 address.
29038  *
29039  * Returns: the scope id field
29040  * Since: 2.32
29041  */
29042
29043
29044 /**
29045  * g_inet_socket_address_new:
29046  * @address: a #GInetAddress
29047  * @port: a port number
29048  *
29049  * Creates a new #GInetSocketAddress for @address and @port.
29050  *
29051  * Returns: a new #GInetSocketAddress
29052  * Since: 2.22
29053  */
29054
29055
29056 /**
29057  * g_initable_init:
29058  * @initable: a #GInitable.
29059  * @cancellable: optional #GCancellable object, %NULL to ignore.
29060  * @error: a #GError location to store the error occurring, or %NULL to ignore.
29061  *
29062  * Initializes the object implementing the interface.
29063  *
29064  * The object must be initialized before any real use after initial
29065  * construction, either with this function or g_async_initable_init_async().
29066  *
29067  * Implementations may also support cancellation. If @cancellable is not %NULL,
29068  * then initialization can be cancelled by triggering the cancellable object
29069  * from another thread. If the operation was cancelled, the error
29070  * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
29071  * the object doesn't support cancellable initialization the error
29072  * %G_IO_ERROR_NOT_SUPPORTED will be returned.
29073  *
29074  * If the object is not initialized, or initialization returns with an
29075  * error, then all operations on the object except g_object_ref() and
29076  * g_object_unref() are considered to be invalid, and have undefined
29077  * behaviour. See the <xref linkend="ginitable"/> section introduction
29078  * for more details.
29079  *
29080  * Implementations of this method must be idempotent, i.e. multiple calls
29081  * to this function with the same argument should return the same results.
29082  * Only the first call initializes the object, further calls return the result
29083  * of the first call. This is so that it's safe to implement the singleton
29084  * pattern in the GObject constructor function.
29085  *
29086  * return %FALSE and set @error appropriately if present.
29087  *
29088  * Returns: %TRUE if successful. If an error has occurred, this function will
29089  * Since: 2.22
29090  */
29091
29092
29093 /**
29094  * g_initable_new:
29095  * @object_type: a #GType supporting #GInitable.
29096  * @cancellable: optional #GCancellable object, %NULL to ignore.
29097  * @error: a #GError location to store the error occurring, or %NULL to ignore.
29098  * @first_property_name: the name of the first property, or %NULL if no properties
29099  * @...: the value if the first property, followed by and other property value pairs, and ended by %NULL.
29100  *
29101  * Helper function for constructing #GInitiable object. This is
29102  * similar to g_object_new() but also initializes the object
29103  * and returns %NULL, setting an error on failure.
29104  *
29105  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
29106  * Since: 2.22
29107  */
29108
29109
29110 /**
29111  * g_initable_new_valist:
29112  * @object_type: a #GType supporting #GInitable.
29113  * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
29114  * @var_args: The var args list generated from @first_property_name.
29115  * @cancellable: optional #GCancellable object, %NULL to ignore.
29116  * @error: a #GError location to store the error occurring, or %NULL to ignore.
29117  *
29118  * Helper function for constructing #GInitiable object. This is
29119  * similar to g_object_new_valist() but also initializes the object
29120  * and returns %NULL, setting an error on failure.
29121  *
29122  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
29123  * Since: 2.22
29124  */
29125
29126
29127 /**
29128  * g_initable_newv:
29129  * @object_type: a #GType supporting #GInitable.
29130  * @n_parameters: the number of parameters in @parameters
29131  * @parameters: (array length=n_parameters): the parameters to use to construct the object
29132  * @cancellable: optional #GCancellable object, %NULL to ignore.
29133  * @error: a #GError location to store the error occurring, or %NULL to ignore.
29134  *
29135  * Helper function for constructing #GInitiable object. This is
29136  * similar to g_object_newv() but also initializes the object
29137  * and returns %NULL, setting an error on failure.
29138  *
29139  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
29140  * Since: 2.22
29141  */
29142
29143
29144 /**
29145  * g_input_stream_clear_pending:
29146  * @stream: input stream
29147  *
29148  * Clears the pending flag on @stream.
29149  */
29150
29151
29152 /**
29153  * g_input_stream_close:
29154  * @stream: A #GInputStream.
29155  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29156  * @error: location to store the error occurring, or %NULL to ignore
29157  *
29158  * Closes the stream, releasing resources related to it.
29159  *
29160  * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
29161  * Closing a stream multiple times will not return an error.
29162  *
29163  * Streams will be automatically closed when the last reference
29164  * is dropped, but you might want to call this function to make sure
29165  * resources are released as early as possible.
29166  *
29167  * Some streams might keep the backing store of the stream (e.g. a file descriptor)
29168  * open after the stream is closed. See the documentation for the individual
29169  * stream for details.
29170  *
29171  * On failure the first error that happened will be reported, but the close
29172  * operation will finish as much as possible. A stream that failed to
29173  * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
29174  * is important to check and report the error to the user.
29175  *
29176  * If @cancellable is not NULL, then the operation can be cancelled by
29177  * triggering the cancellable object from another thread. If the operation
29178  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
29179  * Cancelling a close will still leave the stream closed, but some streams
29180  * can use a faster close that doesn't block to e.g. check errors.
29181  *
29182  * Returns: %TRUE on success, %FALSE on failure
29183  */
29184
29185
29186 /**
29187  * g_input_stream_close_async:
29188  * @stream: A #GInputStream.
29189  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
29190  * @cancellable: (allow-none): optional cancellable object
29191  * @callback: (scope async): callback to call when the request is satisfied
29192  * @user_data: (closure): the data to pass to callback function
29193  *
29194  * Requests an asynchronous closes of the stream, releasing resources related to it.
29195  * When the operation is finished @callback will be called.
29196  * You can then call g_input_stream_close_finish() to get the result of the
29197  * operation.
29198  *
29199  * For behaviour details see g_input_stream_close().
29200  *
29201  * The asyncronous methods have a default fallback that uses threads to implement
29202  * asynchronicity, so they are optional for inheriting classes. However, if you
29203  * override one you must override all.
29204  */
29205
29206
29207 /**
29208  * g_input_stream_close_finish:
29209  * @stream: a #GInputStream.
29210  * @result: a #GAsyncResult.
29211  * @error: a #GError location to store the error occurring, or %NULL to ignore.
29212  *
29213  * Finishes closing a stream asynchronously, started from g_input_stream_close_async().
29214  *
29215  * Returns: %TRUE if the stream was closed successfully.
29216  */
29217
29218
29219 /**
29220  * g_input_stream_has_pending:
29221  * @stream: input stream.
29222  *
29223  * Checks if an input stream has pending actions.
29224  *
29225  * Returns: %TRUE if @stream has pending actions.
29226  */
29227
29228
29229 /**
29230  * g_input_stream_is_closed:
29231  * @stream: input stream.
29232  *
29233  * Checks if an input stream is closed.
29234  *
29235  * Returns: %TRUE if the stream is closed.
29236  */
29237
29238
29239 /**
29240  * g_input_stream_read:
29241  * @stream: a #GInputStream.
29242  * @buffer: a buffer to read data into (which should be at least count bytes long).
29243  * @count: the number of bytes that will be read from the stream
29244  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29245  * @error: location to store the error occurring, or %NULL to ignore
29246  *
29247  * Tries to read @count bytes from the stream into the buffer starting at
29248  * @buffer. Will block during this read.
29249  *
29250  * If count is zero returns zero and does nothing. A value of @count
29251  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
29252  *
29253  * On success, the number of bytes read into the buffer is returned.
29254  * It is not an error if this is not the same as the requested size, as it
29255  * can happen e.g. near the end of a file. Zero is returned on end of file
29256  * (or if @count is zero),  but never otherwise.
29257  *
29258  * If @cancellable is not NULL, then the operation can be cancelled by
29259  * triggering the cancellable object from another thread. If the operation
29260  * was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an
29261  * operation was partially finished when the operation was cancelled the
29262  * partial result will be returned, without an error.
29263  *
29264  * On error -1 is returned and @error is set accordingly.
29265  *
29266  * Returns: Number of bytes read, or -1 on error
29267  */
29268
29269
29270 /**
29271  * g_input_stream_read_all:
29272  * @stream: a #GInputStream.
29273  * @buffer: a buffer to read data into (which should be at least count bytes long).
29274  * @count: the number of bytes that will be read from the stream
29275  * @bytes_read: (out): location to store the number of bytes that was read from the stream
29276  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29277  * @error: location to store the error occurring, or %NULL to ignore
29278  *
29279  * Tries to read @count bytes from the stream into the buffer starting at
29280  * @buffer. Will block during this read.
29281  *
29282  * This function is similar to g_input_stream_read(), except it tries to
29283  * read as many bytes as requested, only stopping on an error or end of stream.
29284  *
29285  * On a successful read of @count bytes, or if we reached the end of the
29286  * stream,  %TRUE is returned, and @bytes_read is set to the number of bytes
29287  * read into @buffer.
29288  *
29289  * If there is an error during the operation %FALSE is returned and @error
29290  * is set to indicate the error status, @bytes_read is updated to contain
29291  * the number of bytes read into @buffer before the error occurred.
29292  *
29293  * Returns: %TRUE on success, %FALSE if there was an error
29294  */
29295
29296
29297 /**
29298  * g_input_stream_read_async:
29299  * @stream: A #GInputStream.
29300  * @buffer: a buffer to read data into (which should be at least count bytes long).
29301  * @count: the number of bytes that will be read from the stream
29302  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
29303  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29304  * @callback: (scope async): callback to call when the request is satisfied
29305  * @user_data: (closure): the data to pass to callback function
29306  *
29307  * Request an asynchronous read of @count bytes from the stream into the buffer
29308  * starting at @buffer. When the operation is finished @callback will be called.
29309  * You can then call g_input_stream_read_finish() to get the result of the
29310  * operation.
29311  *
29312  * During an async request no other sync and async calls are allowed on @stream, and will
29313  * result in %G_IO_ERROR_PENDING errors.
29314  *
29315  * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
29316  *
29317  * On success, the number of bytes read into the buffer will be passed to the
29318  * callback. It is not an error if this is not the same as the requested size, as it
29319  * can happen e.g. near the end of a file, but generally we try to read
29320  * as many bytes as requested. Zero is returned on end of file
29321  * (or if @count is zero),  but never otherwise.
29322  *
29323  * Any outstanding i/o request with higher priority (lower numerical value) will
29324  * be executed before an outstanding request with lower priority. Default
29325  * priority is %G_PRIORITY_DEFAULT.
29326  *
29327  * The asyncronous methods have a default fallback that uses threads to implement
29328  * asynchronicity, so they are optional for inheriting classes. However, if you
29329  * override one you must override all.
29330  */
29331
29332
29333 /**
29334  * g_input_stream_read_finish:
29335  * @stream: a #GInputStream.
29336  * @result: a #GAsyncResult.
29337  * @error: a #GError location to store the error occurring, or %NULL to ignore.
29338  *
29339  * Finishes an asynchronous stream read operation.
29340  *
29341  * Returns: number of bytes read in, or -1 on error.
29342  */
29343
29344
29345 /**
29346  * g_input_stream_set_pending:
29347  * @stream: input stream
29348  * @error: a #GError location to store the error occurring, or %NULL to ignore.
29349  *
29350  * Sets @stream to have actions pending. If the pending flag is
29351  * already set or @stream is closed, it will return %FALSE and set
29352  * @error.
29353  *
29354  * Returns: %TRUE if pending was previously unset and is now set.
29355  */
29356
29357
29358 /**
29359  * g_input_stream_skip:
29360  * @stream: a #GInputStream.
29361  * @count: the number of bytes that will be skipped from the stream
29362  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29363  * @error: location to store the error occurring, or %NULL to ignore
29364  *
29365  * Tries to skip @count bytes from the stream. Will block during the operation.
29366  *
29367  * This is identical to g_input_stream_read(), from a behaviour standpoint,
29368  * but the bytes that are skipped are not returned to the user. Some
29369  * streams have an implementation that is more efficient than reading the data.
29370  *
29371  * This function is optional for inherited classes, as the default implementation
29372  * emulates it using read.
29373  *
29374  * If @cancellable is not %NULL, then the operation can be cancelled by
29375  * triggering the cancellable object from another thread. If the operation
29376  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
29377  * operation was partially finished when the operation was cancelled the
29378  * partial result will be returned, without an error.
29379  *
29380  * Returns: Number of bytes skipped, or -1 on error
29381  */
29382
29383
29384 /**
29385  * g_input_stream_skip_async:
29386  * @stream: A #GInputStream.
29387  * @count: the number of bytes that will be skipped from the stream
29388  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
29389  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29390  * @callback: (scope async): callback to call when the request is satisfied
29391  * @user_data: (closure): the data to pass to callback function
29392  *
29393  * Request an asynchronous skip of @count bytes from the stream.
29394  * When the operation is finished @callback will be called.
29395  * You can then call g_input_stream_skip_finish() to get the result
29396  * of the operation.
29397  *
29398  * During an async request no other sync and async calls are allowed,
29399  * and will result in %G_IO_ERROR_PENDING errors.
29400  *
29401  * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
29402  *
29403  * On success, the number of bytes skipped will be passed to the callback.
29404  * It is not an error if this is not the same as the requested size, as it
29405  * can happen e.g. near the end of a file, but generally we try to skip
29406  * as many bytes as requested. Zero is returned on end of file
29407  * (or if @count is zero), but never otherwise.
29408  *
29409  * Any outstanding i/o request with higher priority (lower numerical value)
29410  * will be executed before an outstanding request with lower priority.
29411  * Default priority is %G_PRIORITY_DEFAULT.
29412  *
29413  * The asynchronous methods have a default fallback that uses threads to
29414  * implement asynchronicity, so they are optional for inheriting classes.
29415  * However, if you override one, you must override all.
29416  */
29417
29418
29419 /**
29420  * g_input_stream_skip_finish:
29421  * @stream: a #GInputStream.
29422  * @result: a #GAsyncResult.
29423  * @error: a #GError location to store the error occurring, or %NULL to ignore.
29424  *
29425  * Finishes a stream skip operation.
29426  *
29427  * Returns: the size of the bytes skipped, or %-1 on error.
29428  */
29429
29430
29431 /**
29432  * g_io_error_from_errno:
29433  * @err_no: Error number as defined in errno.h.
29434  *
29435  * Converts errno.h error codes into GIO error codes.
29436  *
29437  * Returns: #GIOErrorEnum value for the given errno.h error number.
29438  */
29439
29440
29441 /**
29442  * g_io_error_from_win32_error:
29443  * @error_code: Windows error number.
29444  *
29445  * Converts some common error codes into GIO error codes. The
29446  * fallback value G_IO_ERROR_FAILED is returned for error codes not
29447  * handled.
29448  *
29449  * Returns: #GIOErrorEnum value for the given error number.
29450  * Since: 2.26
29451  */
29452
29453
29454 /**
29455  * g_io_error_quark:
29456  *
29457  * Gets the GIO Error Quark.
29458  *
29459  * Returns: a #GQuark.
29460  */
29461
29462
29463 /**
29464  * g_io_extension_get_name:
29465  * @extension: a #GIOExtension
29466  *
29467  * Gets the name under which @extension was registered.
29468  *
29469  * Note that the same type may be registered as extension
29470  * for multiple extension points, under different names.
29471  *
29472  * Returns: the name of @extension.
29473  */
29474
29475
29476 /**
29477  * g_io_extension_get_priority:
29478  * @extension: a #GIOExtension
29479  *
29480  * Gets the priority with which @extension was registered.
29481  *
29482  * Returns: the priority of @extension
29483  */
29484
29485
29486 /**
29487  * g_io_extension_get_type:
29488  * @extension: a #GIOExtension
29489  *
29490  * Gets the type associated with @extension.
29491  *
29492  * Returns: the type of @extension
29493  */
29494
29495
29496 /**
29497  * g_io_extension_point_get_extension_by_name:
29498  * @extension_point: a #GIOExtensionPoint
29499  * @name: the name of the extension to get
29500  *
29501  * Finds a #GIOExtension for an extension point by name.
29502  *
29503  * given name, or %NULL if there is no extension with that name
29504  *
29505  * Returns: (transfer none): the #GIOExtension for @extension_point that has the
29506  */
29507
29508
29509 /**
29510  * g_io_extension_point_get_extensions:
29511  * @extension_point: a #GIOExtensionPoint
29512  *
29513  * Gets a list of all extensions that implement this extension point.
29514  * The list is sorted by priority, beginning with the highest priority.
29515  *
29516  * #GIOExtension<!-- -->s. The list is owned by GIO and should not be
29517  * modified.
29518  *
29519  * Returns: (element-type GIOExtension) (transfer none): a #GList of
29520  */
29521
29522
29523 /**
29524  * g_io_extension_point_get_required_type:
29525  * @extension_point: a #GIOExtensionPoint
29526  *
29527  * Gets the required type for @extension_point.
29528  *
29529  * or #G_TYPE_INVALID if the extension point has no required type
29530  *
29531  * Returns: the #GType that all implementations must have,
29532  */
29533
29534
29535 /**
29536  * g_io_extension_point_implement:
29537  * @extension_point_name: the name of the extension point
29538  * @type: the #GType to register as extension
29539  * @extension_name: the name for the extension
29540  * @priority: the priority for the extension
29541  *
29542  * Registers @type as extension for the extension point with name
29543  * @extension_point_name.
29544  *
29545  * If @type has already been registered as an extension for this
29546  * extension point, the existing #GIOExtension object is returned.
29547  *
29548  * Returns: (transfer none): a #GIOExtension object for #GType
29549  */
29550
29551
29552 /**
29553  * g_io_extension_point_lookup:
29554  * @name: the name of the extension point
29555  *
29556  * Looks up an existing extension point.
29557  *
29558  * is no registered extension point with the given name.
29559  *
29560  * Returns: (transfer none): the #GIOExtensionPoint, or %NULL if there
29561  */
29562
29563
29564 /**
29565  * g_io_extension_point_register:
29566  * @name: The name of the extension point
29567  *
29568  * Registers an extension point.
29569  *
29570  * owned by GIO and should not be freed.
29571  *
29572  * Returns: (transfer none): the new #GIOExtensionPoint. This object is
29573  */
29574
29575
29576 /**
29577  * g_io_extension_point_set_required_type:
29578  * @extension_point: a #GIOExtensionPoint
29579  * @type: the #GType to require
29580  *
29581  * Sets the required type for @extension_point to @type.
29582  * All implementations must henceforth have this type.
29583  */
29584
29585
29586 /**
29587  * g_io_extension_ref_class:
29588  * @extension: a #GIOExtension
29589  *
29590  * Gets a reference to the class for the type that is
29591  * associated with @extension.
29592  *
29593  * Returns: (transfer full): the #GTypeClass for the type of @extension
29594  */
29595
29596
29597 /**
29598  * g_io_module_load:
29599  * @module: a #GIOModule.
29600  *
29601  * Required API for GIO modules to implement.
29602  * This function is ran after the module has been loaded into GIO,
29603  * to initialize the module.
29604  */
29605
29606
29607 /**
29608  * g_io_module_new:
29609  * @filename: filename of the shared library module.
29610  *
29611  * Creates a new GIOModule that will load the specific
29612  * shared library when in use.
29613  *
29614  * or %NULL on error.
29615  *
29616  * Returns: a #GIOModule from given @filename,
29617  */
29618
29619
29620 /**
29621  * g_io_module_query:
29622  *
29623  * Optional API for GIO modules to implement.
29624  *
29625  * Should return a list of all the extension points that may be
29626  * implemented in this module.
29627  *
29628  * This method will not be called in normal use, however it may be
29629  * called when probing existing modules and recording which extension
29630  * points that this model is used for. This means we won't have to
29631  * load and initialze this module unless its needed.
29632  *
29633  * If this function is not implemented by the module the module will
29634  * always be loaded, initialized and then unloaded on application startup
29635  * so that it can register its extension points during init.
29636  *
29637  * Note that a module need not actually implement all the extension points
29638  * that g_io_module_query returns, since the exact list of extension may
29639  * depend on runtime issues. However all extension points actually implemented
29640  * must be returned by g_io_module_query() (if defined).
29641  *
29642  * When installing a module that implements g_io_module_query you must
29643  * run gio-querymodules in order to build the cache files required for
29644  * lazy loading.
29645  *
29646  * extension points of the module. The array must be suitable for
29647  * freeing with g_strfreev().
29648  *
29649  * Returns: (transfer full): A %NULL-terminated array of strings, listing the supported
29650  * Since: 2.24
29651  */
29652
29653
29654 /**
29655  * g_io_module_scope_block:
29656  * @scope: a module loading scope
29657  * @basename: the basename to block
29658  *
29659  * Block modules with the given @basename from being loaded when
29660  * this scope is used with g_io_modules_scan_all_in_directory_with_scope()
29661  * or g_io_modules_load_all_in_directory_with_scope().
29662  *
29663  * Since: 2.30
29664  */
29665
29666
29667 /**
29668  * g_io_module_scope_free:
29669  * @scope: a module loading scope
29670  *
29671  * Free a module scope.
29672  *
29673  * Since: 2.30
29674  */
29675
29676
29677 /**
29678  * g_io_module_scope_new:
29679  * @flags: flags for the new scope
29680  *
29681  * Create a new scope for loading of IO modules. A scope can be used for
29682  * blocking duplicate modules, or blocking a module you don't want to load.
29683  *
29684  * Specify the %G_IO_MODULES_SCOPE_BLOCK_DUPLICATES flag to block modules
29685  * which have the same base name as a module that has already been seen
29686  * in this scope.
29687  *
29688  * Returns: (transfer full): the new module scope
29689  * Since: 2.30
29690  */
29691
29692
29693 /**
29694  * g_io_module_unload:
29695  * @module: a #GIOModule.
29696  *
29697  * Required API for GIO modules to implement.
29698  * This function is ran when the module is being unloaded from GIO,
29699  * to finalize the module.
29700  */
29701
29702
29703 /**
29704  * g_io_modules_load_all_in_directory:
29705  * @dirname: pathname for a directory containing modules to load.
29706  *
29707  * Loads all the modules in the specified directory.
29708  *
29709  * If don't require all modules to be initialized (and thus registering
29710  * all gtypes) then you can use g_io_modules_scan_all_in_directory()
29711  * which allows delayed/lazy loading of modules.
29712  *
29713  * from the directory,
29714  * All the modules are loaded into memory, if you want to
29715  * unload them (enabling on-demand loading) you must call
29716  * g_type_module_unuse() on all the modules. Free the list
29717  * with g_list_free().
29718  *
29719  * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded
29720  */
29721
29722
29723 /**
29724  * g_io_modules_load_all_in_directory_with_scope:
29725  * @dirname: pathname for a directory containing modules to load.
29726  * @scope: a scope to use when scanning the modules.
29727  *
29728  * Loads all the modules in the specified directory.
29729  *
29730  * If don't require all modules to be initialized (and thus registering
29731  * all gtypes) then you can use g_io_modules_scan_all_in_directory()
29732  * which allows delayed/lazy loading of modules.
29733  *
29734  * from the directory,
29735  * All the modules are loaded into memory, if you want to
29736  * unload them (enabling on-demand loading) you must call
29737  * g_type_module_unuse() on all the modules. Free the list
29738  * with g_list_free().
29739  *
29740  * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded
29741  * Since: 2.30
29742  */
29743
29744
29745 /**
29746  * g_io_modules_scan_all_in_directory:
29747  * @dirname: pathname for a directory containing modules to scan.
29748  *
29749  * Scans all the modules in the specified directory, ensuring that
29750  * any extension point implemented by a module is registered.
29751  *
29752  * This may not actually load and initialize all the types in each
29753  * module, some modules may be lazily loaded and initialized when
29754  * an extension point it implementes is used with e.g.
29755  * g_io_extension_point_get_extensions() or
29756  * g_io_extension_point_get_extension_by_name().
29757  *
29758  * If you need to guarantee that all types are loaded in all the modules,
29759  * use g_io_modules_load_all_in_directory().
29760  *
29761  * Since: 2.24
29762  */
29763
29764
29765 /**
29766  * g_io_modules_scan_all_in_directory_with_scope:
29767  * @dirname: pathname for a directory containing modules to scan.
29768  * @scope: a scope to use when scanning the modules
29769  *
29770  * Scans all the modules in the specified directory, ensuring that
29771  * any extension point implemented by a module is registered.
29772  *
29773  * This may not actually load and initialize all the types in each
29774  * module, some modules may be lazily loaded and initialized when
29775  * an extension point it implementes is used with e.g.
29776  * g_io_extension_point_get_extensions() or
29777  * g_io_extension_point_get_extension_by_name().
29778  *
29779  * If you need to guarantee that all types are loaded in all the modules,
29780  * use g_io_modules_load_all_in_directory().
29781  *
29782  * Since: 2.30
29783  */
29784
29785
29786 /**
29787  * g_io_scheduler_cancel_all_jobs:
29788  *
29789  * Cancels all cancellable I/O jobs.
29790  *
29791  * A job is cancellable if a #GCancellable was passed into
29792  * g_io_scheduler_push_job().
29793  */
29794
29795
29796 /**
29797  * g_io_scheduler_job_send_to_mainloop:
29798  * @job: a #GIOSchedulerJob
29799  * @func: a #GSourceFunc callback that will be called in the original thread
29800  * @user_data: data to pass to @func
29801  * @notify: a #GDestroyNotify for @user_data, or %NULL
29802  *
29803  * Used from an I/O job to send a callback to be run in the thread
29804  * that the job was started from, waiting for the result (and thus
29805  * blocking the I/O job).
29806  *
29807  * Returns: The return value of @func
29808  */
29809
29810
29811 /**
29812  * g_io_scheduler_job_send_to_mainloop_async:
29813  * @job: a #GIOSchedulerJob
29814  * @func: a #GSourceFunc callback that will be called in the original thread
29815  * @user_data: data to pass to @func
29816  * @notify: a #GDestroyNotify for @user_data, or %NULL
29817  *
29818  * Used from an I/O job to send a callback to be run asynchronously in
29819  * the thread that the job was started from. The callback will be run
29820  * when the main loop is available, but at that time the I/O job might
29821  * have finished. The return value from the callback is ignored.
29822  *
29823  * Note that if you are passing the @user_data from g_io_scheduler_push_job()
29824  * on to this function you have to ensure that it is not freed before
29825  * @func is called, either by passing %NULL as @notify to
29826  * g_io_scheduler_push_job() or by using refcounting for @user_data.
29827  */
29828
29829
29830 /**
29831  * g_io_scheduler_push_job:
29832  * @job_func: a #GIOSchedulerJobFunc.
29833  * @user_data: data to pass to @job_func
29834  * @notify: a #GDestroyNotify for @user_data, or %NULL
29835  * @io_priority: the <link linkend="gioscheduler">I/O priority</link> of the request.
29836  * @cancellable: optional #GCancellable object, %NULL to ignore.
29837  *
29838  * Schedules the I/O job to run in another thread.
29839  *
29840  * @notify will be called on @user_data after @job_func has returned,
29841  * regardless whether the job was cancelled or has run to completion.
29842  *
29843  * If @cancellable is not %NULL, it can be used to cancel the I/O job
29844  * by calling g_cancellable_cancel() or by calling
29845  * g_io_scheduler_cancel_all_jobs().
29846  */
29847
29848
29849 /**
29850  * g_io_stream_clear_pending:
29851  * @stream: a #GIOStream
29852  *
29853  * Clears the pending flag on @stream.
29854  *
29855  * Since: 2.22
29856  */
29857
29858
29859 /**
29860  * g_io_stream_close:
29861  * @stream: a #GIOStream
29862  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
29863  * @error: location to store the error occurring, or %NULL to ignore
29864  *
29865  * Closes the stream, releasing resources related to it. This will also
29866  * closes the individual input and output streams, if they are not already
29867  * closed.
29868  *
29869  * Once the stream is closed, all other operations will return
29870  * %G_IO_ERROR_CLOSED. Closing a stream multiple times will not
29871  * return an error.
29872  *
29873  * Closing a stream will automatically flush any outstanding buffers
29874  * in the stream.
29875  *
29876  * Streams will be automatically closed when the last reference
29877  * is dropped, but you might want to call this function to make sure
29878  * resources are released as early as possible.
29879  *
29880  * Some streams might keep the backing store of the stream (e.g. a file
29881  * descriptor) open after the stream is closed. See the documentation for
29882  * the individual stream for details.
29883  *
29884  * On failure the first error that happened will be reported, but the
29885  * close operation will finish as much as possible. A stream that failed
29886  * to close will still return %G_IO_ERROR_CLOSED for all operations.
29887  * Still, it is important to check and report the error to the user,
29888  * otherwise there might be a loss of data as all data might not be written.
29889  *
29890  * If @cancellable is not NULL, then the operation can be cancelled by
29891  * triggering the cancellable object from another thread. If the operation
29892  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
29893  * Cancelling a close will still leave the stream closed, but some streams
29894  * can use a faster close that doesn't block to e.g. check errors.
29895  *
29896  * The default implementation of this method just calls close on the
29897  * individual input/output streams.
29898  *
29899  * Returns: %TRUE on success, %FALSE on failure
29900  * Since: 2.22
29901  */
29902
29903
29904 /**
29905  * g_io_stream_close_async:
29906  * @stream: a #GIOStream
29907  * @io_priority: the io priority of the request
29908  * @cancellable: (allow-none): optional cancellable object
29909  * @callback: (scope async): callback to call when the request is satisfied
29910  * @user_data: (closure): the data to pass to callback function
29911  *
29912  * Requests an asynchronous close of the stream, releasing resources
29913  * related to it. When the operation is finished @callback will be
29914  * called. You can then call g_io_stream_close_finish() to get
29915  * the result of the operation.
29916  *
29917  * For behaviour details see g_io_stream_close().
29918  *
29919  * The asynchronous methods have a default fallback that uses threads
29920  * to implement asynchronicity, so they are optional for inheriting
29921  * classes. However, if you override one you must override all.
29922  *
29923  * Since: 2.22
29924  */
29925
29926
29927 /**
29928  * g_io_stream_close_finish:
29929  * @stream: a #GIOStream
29930  * @result: a #GAsyncResult
29931  * @error: a #GError location to store the error occurring, or %NULL to ignore
29932  *
29933  * Closes a stream.
29934  *
29935  * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
29936  * Since: 2.22
29937  */
29938
29939
29940 /**
29941  * g_io_stream_get_input_stream:
29942  * @stream: a #GIOStream
29943  *
29944  * Gets the input stream for this object. This is used
29945  * for reading.
29946  *
29947  * Do not free.
29948  *
29949  * Returns: (transfer none): a #GInputStream, owned by the #GIOStream.
29950  * Since: 2.22
29951  */
29952
29953
29954 /**
29955  * g_io_stream_get_output_stream:
29956  * @stream: a #GIOStream
29957  *
29958  * Gets the output stream for this object. This is used for
29959  * writing.
29960  *
29961  * Do not free.
29962  *
29963  * Returns: (transfer none): a #GOutputStream, owned by the #GIOStream.
29964  * Since: 2.22
29965  */
29966
29967
29968 /**
29969  * g_io_stream_has_pending:
29970  * @stream: a #GIOStream
29971  *
29972  * Checks if a stream has pending actions.
29973  *
29974  * Returns: %TRUE if @stream has pending actions.
29975  * Since: 2.22
29976  */
29977
29978
29979 /**
29980  * g_io_stream_is_closed:
29981  * @stream: a #GIOStream
29982  *
29983  * Checks if a stream is closed.
29984  *
29985  * Returns: %TRUE if the stream is closed.
29986  * Since: 2.22
29987  */
29988
29989
29990 /**
29991  * g_io_stream_set_pending:
29992  * @stream: a #GIOStream
29993  * @error: a #GError location to store the error occurring, or %NULL to ignore
29994  *
29995  * Sets @stream to have actions pending. If the pending flag is
29996  * already set or @stream is closed, it will return %FALSE and set
29997  * @error.
29998  *
29999  * Returns: %TRUE if pending was previously unset and is now set.
30000  * Since: 2.22
30001  */
30002
30003
30004 /**
30005  * g_io_stream_splice_async:
30006  * @stream1: a #GIOStream.
30007  * @stream2: a #GIOStream.
30008  * @flags: a set of #GIOStreamSpliceFlags.
30009  * @io_priority: the io priority of the request.
30010  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
30011  * @callback: (scope async): a #GAsyncReadyCallback.
30012  * @user_data: (closure): user data passed to @callback.
30013  *
30014  * Asyncronously splice the output stream of @stream1 to the input stream of
30015  * @stream2, and splice the output stream of @stream2 to the input stream of
30016  * @stream1.
30017  *
30018  * When the operation is finished @callback will be called.
30019  * You can then call g_io_stream_splice_finish() to get the
30020  * result of the operation.
30021  *
30022  * Since: 2.28
30023  */
30024
30025
30026 /**
30027  * g_io_stream_splice_finish:
30028  * @result: a #GAsyncResult.
30029  * @error: a #GError location to store the error occurring, or %NULL to ignore.
30030  *
30031  * Finishes an asynchronous io stream splice operation.
30032  *
30033  * Returns: %TRUE on success, %FALSE otherwise.
30034  * Since: 2.28
30035  */
30036
30037
30038 /**
30039  * g_keyfile_settings_backend_new:
30040  * @filename: the filename of the keyfile
30041  * @root_path: the path under which all settings keys appear
30042  * @root_group: (allow-none): the group name corresponding to @root_path, or %NULL
30043  *
30044  * Creates a keyfile-backed #GSettingsBackend.
30045  *
30046  * The filename of the keyfile to use is given by @filename.
30047  *
30048  * All settings read to or written from the backend must fall under the
30049  * path given in @root_path (which must start and end with a slash and
30050  * not contain two consecutive slashes).  @root_path may be "/".
30051  *
30052  * If @root_group is non-%NULL then it specifies the name of the keyfile
30053  * group used for keys that are written directly below @root_path.  For
30054  * example, if @root_path is "/apps/example/" and @root_group is
30055  * "toplevel", then settings the key "/apps/example/enabled" to a value
30056  * of %TRUE will cause the following to appear in the keyfile:
30057  *
30058  * |[
30059  * [toplevel]
30060  * enabled=true
30061  * ]|
30062  *
30063  * If @root_group is %NULL then it is not permitted to store keys
30064  * directly below the @root_path.
30065  *
30066  * For keys not stored directly below @root_path (ie: in a sub-path),
30067  * the name of the subpath (with the final slash stripped) is used as
30068  * the name of the keyfile group.  To continue the example, if
30069  * "/apps/example/profiles/default/font-size" were set to
30070  * 12 then the following would appear in the keyfile:
30071  *
30072  * |[
30073  * [profiles/default]
30074  * font-size=12
30075  * ]|
30076  *
30077  * The backend will refuse writes (and return writability as being
30078  * %FALSE) for keys outside of @root_path and, in the event that
30079  * @root_group is %NULL, also for keys directly under @root_path.
30080  * Writes will also be refused if the backend detects that it has the
30081  * inability to rewrite the keyfile (ie: the containing directory is not
30082  * writable).
30083  *
30084  * There is no checking done for your key namespace clashing with the
30085  * syntax of the key file format.  For example, if you have '[' or ']'
30086  * characters in your path names or '=' in your key names you may be in
30087  * trouble.
30088  *
30089  * Returns: (transfer full): a keyfile-backed #GSettingsBackend
30090  */
30091
30092
30093 /**
30094  * g_loadable_icon_load:
30095  * @icon: a #GLoadableIcon.
30096  * @size: an integer.
30097  * @type: (out) (allow-none): a location to store the type of the loaded icon, %NULL to ignore.
30098  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
30099  * @error: a #GError location to store the error occurring, or %NULL to ignore.
30100  *
30101  * Loads a loadable icon. For the asynchronous version of this function,
30102  * see g_loadable_icon_load_async().
30103  *
30104  * Returns: (transfer full): a #GInputStream to read the icon from.
30105  */
30106
30107
30108 /**
30109  * g_loadable_icon_load_async:
30110  * @icon: a #GLoadableIcon.
30111  * @size: an integer.
30112  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
30113  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
30114  * @user_data: (closure): the data to pass to callback function
30115  *
30116  * Loads an icon asynchronously. To finish this function, see
30117  * g_loadable_icon_load_finish(). For the synchronous, blocking
30118  * version of this function, see g_loadable_icon_load().
30119  */
30120
30121
30122 /**
30123  * g_loadable_icon_load_finish:
30124  * @icon: a #GLoadableIcon.
30125  * @res: a #GAsyncResult.
30126  * @type: a location to store the type of the loaded icon, %NULL to ignore.
30127  * @error: a #GError location to store the error occurring, or %NULL to ignore.
30128  *
30129  * Finishes an asynchronous icon load started in g_loadable_icon_load_async().
30130  *
30131  * Returns: (transfer full): a #GInputStream to read the icon from.
30132  */
30133
30134
30135 /**
30136  * g_local_vfs_new:
30137  *
30138  * Returns a new #GVfs handle for a local vfs.
30139  *
30140  * Returns: a new #GVfs handle.
30141  */
30142
30143
30144 /**
30145  * g_main_destroy:
30146  * @loop: a #GMainLoop
30147  *
30148  * Frees the memory allocated for the #GMainLoop.
30149  *
30150  * Deprecated: 2.2: Use g_main_loop_unref() instead
30151  */
30152
30153
30154 /**
30155  * g_main_is_running:
30156  * @loop: a #GMainLoop
30157  *
30158  * Checks if the main loop is running.
30159  *
30160  * Returns: %TRUE if the main loop is running
30161  * Deprecated: 2.2: Use g_main_loop_is_running() instead
30162  */
30163
30164
30165 /**
30166  * g_main_iteration:
30167  * @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.
30168  *
30169  * Runs a single iteration for the default #GMainContext.
30170  *
30171  * Returns: %TRUE if more events are pending.
30172  * Deprecated: 2.2: Use g_main_context_iteration() instead.
30173  */
30174
30175
30176 /**
30177  * g_main_new:
30178  * @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.
30179  *
30180  * Creates a new #GMainLoop for th default main context.
30181  *
30182  * Returns: a new #GMainLoop
30183  * Deprecated: 2.2: Use g_main_loop_new() instead
30184  */
30185
30186
30187 /**
30188  * g_main_pending:
30189  *
30190  * Checks if any events are pending for the default #GMainContext
30191  * (i.e. ready to be processed).
30192  *
30193  *
30194  * Deprected: 2.2: Use g_main_context_pending() instead.
30195  *
30196  * Returns: %TRUE if any events are pending.
30197  */
30198
30199
30200 /**
30201  * g_main_quit:
30202  * @loop: a #GMainLoop
30203  *
30204  * Stops the #GMainLoop.
30205  * If g_main_run() was called to run the #GMainLoop, it will now return.
30206  *
30207  * Deprecated: 2.2: Use g_main_loop_quit() instead
30208  */
30209
30210
30211 /**
30212  * g_main_run:
30213  * @loop: a #GMainLoop
30214  *
30215  * Runs a main loop until it stops running.
30216  *
30217  * Deprecated: 2.2: Use g_main_loop_run() instead
30218  */
30219
30220
30221 /**
30222  * g_main_set_poll_func:
30223  * @func: the function to call to poll all file descriptors
30224  *
30225  * Sets the function to use for the handle polling of file descriptors
30226  * for the default main context.
30227  *
30228  * Deprecated: 2.2: Use g_main_context_set_poll_func() again
30229  */
30230
30231
30232 /**
30233  * g_memory_input_stream_add_data:
30234  * @stream: a #GMemoryInputStream
30235  * @data: (array length=len) (element-type guint8) (transfer full): input data
30236  * @len: length of the data, may be -1 if @data is a nul-terminated string
30237  * @destroy: (allow-none): function that is called to free @data, or %NULL
30238  *
30239  * Appends @data to data that can be read from the input stream
30240  */
30241
30242
30243 /**
30244  * g_memory_input_stream_new:
30245  *
30246  * Creates a new empty #GMemoryInputStream.
30247  *
30248  * Returns: a new #GInputStream
30249  */
30250
30251
30252 /**
30253  * g_memory_input_stream_new_from_data:
30254  * @data: (array length=len) (element-type guint8) (transfer full): input data
30255  * @len: length of the data, may be -1 if @data is a nul-terminated string
30256  * @destroy: (allow-none): function that is called to free @data, or %NULL
30257  *
30258  * Creates a new #GMemoryInputStream with data in memory of a given size.
30259  *
30260  * Returns: new #GInputStream read from @data of @len bytes.
30261  */
30262
30263
30264 /**
30265  * g_memory_output_stream_get_data:
30266  * @ostream: a #GMemoryOutputStream
30267  *
30268  * Gets any loaded data from the @ostream.
30269  *
30270  * Note that the returned pointer may become invalid on the next
30271  * write or truncate operation on the stream.
30272  *
30273  * Returns: (transfer none): pointer to the stream's data
30274  */
30275
30276
30277 /**
30278  * g_memory_output_stream_get_data_size:
30279  * @ostream: a #GMemoryOutputStream
30280  *
30281  * Returns the number of bytes from the start up
30282  * to including the last byte written in the stream
30283  * that has not been truncated away.
30284  *
30285  * Returns: the number of bytes written to the stream
30286  * Since: 2.18
30287  */
30288
30289
30290 /**
30291  * g_memory_output_stream_get_size:
30292  * @ostream: a #GMemoryOutputStream
30293  *
30294  * Gets the size of the currently allocated data area (available from
30295  * g_memory_output_stream_get_data()). If the stream isn't
30296  * growable (no realloc was passed to g_memory_output_stream_new()) then
30297  * this is the maximum size of the stream and further writes
30298  * will return %G_IO_ERROR_NO_SPACE.
30299  *
30300  * Note that for growable streams the returned size may become invalid on
30301  * the next write or truncate operation on the stream.
30302  *
30303  * If you want the number of bytes currently written to the stream, use
30304  * g_memory_output_stream_get_data_size().
30305  *
30306  * Returns: the number of bytes allocated for the data buffer
30307  */
30308
30309
30310 /**
30311  * g_memory_output_stream_new: (skip)
30312  * @data: pointer to a chunk of memory to use, or %NULL
30313  * @size: the size of @data
30314  * @realloc_function: a function with realloc() semantics (like g_realloc()) to be called when @data needs to be grown, or %NULL
30315  * @destroy_function: a function to be called on @data when the stream is finalized, or %NULL
30316  *
30317  * Creates a new #GMemoryOutputStream.
30318  *
30319  * If @data is non-%NULL, the stream  will use that for its internal storage.
30320  * If @realloc_fn is non-%NULL, it will be used for resizing the internal
30321  * storage when necessary. To construct a fixed-size output stream,
30322  * pass %NULL as @realloc_fn.
30323  *
30324  * |[
30325  * /&ast; a stream that can grow &ast;/
30326  * stream = g_memory_output_stream_new (NULL, 0, realloc, free);
30327  *
30328  * /&ast; another stream that can grow &ast;/
30329  * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
30330  *
30331  * /&ast; a fixed-size stream &ast;/
30332  * data = malloc (200);
30333  * stream3 = g_memory_output_stream_new (data, 200, NULL, free);
30334  * ]|
30335  *
30336  * Returns: A newly created #GMemoryOutputStream object.
30337  */
30338
30339
30340 /**
30341  * g_memory_output_stream_steal_data:
30342  * @ostream: a #GMemoryOutputStream
30343  *
30344  * Gets any loaded data from the @ostream. Ownership of the data
30345  * is transferred to the caller; when no longer needed it must be
30346  * freed using the free function set in @ostream's
30347  * #GMemoryOutputStream:destroy-function property.
30348  *
30349  * @ostream must be closed before calling this function.
30350  *
30351  * Returns: (transfer full): the stream's data
30352  * Since: 2.26
30353  */
30354
30355
30356 /**
30357  * g_memory_settings_backend_new:
30358  *
30359  * Creates a memory-backed #GSettingsBackend.
30360  *
30361  * This backend allows changes to settings, but does not write them
30362  * to any backing storage, so the next time you run your application,
30363  * the memory backend will start out with the default values again.
30364  *
30365  * Returns: (transfer full): a newly created #GSettingsBackend
30366  * Since: 2.28
30367  */
30368
30369
30370 /**
30371  * g_menu_append:
30372  * @menu: a #GMenu
30373  * @label: (allow-none): the section label, or %NULL
30374  * @detailed_action: (allow-none): the detailed action string, or %NULL
30375  *
30376  * Convenience function for appending a normal menu item to the end of
30377  * @menu.  Combine g_menu_new() and g_menu_insert_item() for a more
30378  * flexible alternative.
30379  *
30380  * Since: 2.32
30381  */
30382
30383
30384 /**
30385  * g_menu_append_item:
30386  * @menu: a #GMenu
30387  * @item: a #GMenuItem to append
30388  *
30389  * Appends @item to the end of @menu.
30390  *
30391  * See g_menu_insert_item() for more information.
30392  *
30393  * Since: 2.32
30394  */
30395
30396
30397 /**
30398  * g_menu_append_section:
30399  * @menu: a #GMenu
30400  * @label: (allow-none): the section label, or %NULL
30401  * @section: a #GMenuModel with the items of the section
30402  *
30403  * Convenience function for appending a section menu item to the end of
30404  * @menu.  Combine g_menu_item_new_section() and g_menu_insert_item() for a
30405  * more flexible alternative.
30406  *
30407  * Since: 2.32
30408  */
30409
30410
30411 /**
30412  * g_menu_append_submenu:
30413  * @menu: a #GMenu
30414  * @label: (allow-none): the section label, or %NULL
30415  * @submenu: a #GMenuModel with the items of the submenu
30416  *
30417  * Convenience function for appending a submenu menu item to the end of
30418  * @menu.  Combine g_menu_new_submenu() and g_menu_insert_item() for a
30419  * more flexible alternative.
30420  *
30421  * Since: 2.32
30422  */
30423
30424
30425 /**
30426  * g_menu_attribute_iter_get_name:
30427  * @iter: a #GMenuAttributeIter
30428  *
30429  * Gets the name of the attribute at the current iterator position, as
30430  * a string.
30431  *
30432  * The iterator is not advanced.
30433  *
30434  * Returns: the name of the attribute
30435  * Since: 2.32
30436  */
30437
30438
30439 /**
30440  * g_menu_attribute_iter_get_next:
30441  * @iter: a #GMenuAttributeIter
30442  * @out_name: (out) (allow-none) (transfer none): the type of the attribute
30443  * @value: (out) (allow-none) (transfer full): the attribute value
30444  *
30445  * This function combines g_menu_attribute_iter_next() with
30446  * g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value().
30447  *
30448  * First the iterator is advanced to the next (possibly first) attribute.
30449  * If that fails, then %FALSE is returned and there are no other
30450  * effects.
30451  *
30452  * If successful, @name and @value are set to the name and value of the
30453  * attribute that has just been advanced to.  At this point,
30454  * g_menu_item_get_name() and g_menu_item_get_value() will return the
30455  * same values again.
30456  *
30457  * The value returned in @name remains valid for as long as the iterator
30458  * remains at the current position.  The value returned in @value must
30459  * be unreffed using g_variant_unref() when it is no longer in use.
30460  *
30461  * attribute
30462  *
30463  * Returns: %TRUE on success, or %FALSE if there is no additional
30464  * Since: 2.32
30465  */
30466
30467
30468 /**
30469  * g_menu_attribute_iter_get_value:
30470  * @iter: a #GMenuAttributeIter
30471  *
30472  * Gets the value of the attribute at the current iterator position.
30473  *
30474  * The iterator is not advanced.
30475  *
30476  * Returns: (transfer full): the value of the current attribute
30477  * Since: 2.32
30478  */
30479
30480
30481 /**
30482  * g_menu_attribute_iter_next:
30483  * @iter: a #GMenuAttributeIter
30484  *
30485  * Attempts to advance the iterator to the next (possibly first)
30486  * attribute.
30487  *
30488  * %TRUE is returned on success, or %FALSE if there are no more
30489  * attributes.
30490  *
30491  * You must call this function when you first acquire the iterator
30492  * to advance it to the first attribute (and determine if the first
30493  * attribute exists at all).
30494  *
30495  * Returns: %TRUE on success, or %FALSE when there are no more attributes
30496  * Since: 2.32
30497  */
30498
30499
30500 /**
30501  * g_menu_freeze:
30502  * @menu: a #GMenu
30503  *
30504  * Marks @menu as frozen.
30505  *
30506  * After the menu is frozen, it is an error to attempt to make any
30507  * changes to it.  In effect this means that the #GMenu API must no
30508  * longer be used.
30509  *
30510  * This function causes g_menu_model_is_mutable() to begin returning
30511  * %FALSE, which has some positive performance implications.
30512  *
30513  * Since: 2.32
30514  */
30515
30516
30517 /**
30518  * g_menu_insert:
30519  * @menu: a #GMenu
30520  * @position: the position at which to insert the item
30521  * @label: (allow-none): the section label, or %NULL
30522  * @detailed_action: (allow-none): the detailed action string, or %NULL
30523  *
30524  * Convenience function for inserting a normal menu item into @menu.
30525  * Combine g_menu_new() and g_menu_insert_item() for a more flexible
30526  * alternative.
30527  *
30528  * Since: 2.32
30529  */
30530
30531
30532 /**
30533  * g_menu_insert_item:
30534  * @menu: a #GMenu
30535  * @position: the position at which to insert the item
30536  * @item: the #GMenuItem to insert
30537  *
30538  * Inserts @item into @menu.
30539  *
30540  * The "insertion" is actually done by copying all of the attribute and
30541  * link values of @item and using them to form a new item within @menu.
30542  * As such, @item itself is not really inserted, but rather, a menu item
30543  * that is exactly the same as the one presently described by @item.
30544  *
30545  * This means that @item is essentially useless after the insertion
30546  * occurs.  Any changes you make to it are ignored unless it is inserted
30547  * again (at which point its updated values will be copied).
30548  *
30549  * You should probably just free @item once you're done.
30550  *
30551  * There are many convenience functions to take care of common cases.
30552  * See g_menu_insert(), g_menu_insert_section() and
30553  * g_menu_insert_submenu() as well as "prepend" and "append" variants of
30554  * each of these functions.
30555  *
30556  * Since: 2.32
30557  */
30558
30559
30560 /**
30561  * g_menu_insert_section:
30562  * @menu: a #GMenu
30563  * @position: the position at which to insert the item
30564  * @label: (allow-none): the section label, or %NULL
30565  * @section: a #GMenuModel with the items of the section
30566  *
30567  * Convenience function for inserting a section menu item into @menu.
30568  * Combine g_menu_item_new_section() and g_menu_insert_item() for a more
30569  * flexible alternative.
30570  *
30571  * Since: 2.32
30572  */
30573
30574
30575 /**
30576  * g_menu_insert_submenu:
30577  * @menu: a #GMenu
30578  * @position: the position at which to insert the item
30579  * @label: (allow-none): the section label, or %NULL
30580  * @submenu: a #GMenuModel with the items of the submenu
30581  *
30582  * Convenience function for inserting a submenu menu item into @menu.
30583  * Combine g_menu_new_submenu() and g_menu_insert_item() for a more
30584  * flexible alternative.
30585  *
30586  * Since: 2.32
30587  */
30588
30589
30590 /**
30591  * g_menu_item_new:
30592  * @label: (allow-none): the section label, or %NULL
30593  * @detailed_action: (allow-none): the detailed action string, or %NULL
30594  *
30595  * Creates a new #GMenuItem.
30596  *
30597  * If @label is non-%NULL it is used to set the "label" attribute of the
30598  * new item.
30599  *
30600  * If @detailed_action is non-%NULL it is used to set the "action" and
30601  * possibly the "target" attribute of the new item.  See
30602  * g_menu_item_set_detailed_action() for more information.
30603  *
30604  * Returns: a new #GMenuItem
30605  * Since: 2.32
30606  */
30607
30608
30609 /**
30610  * g_menu_item_new_section:
30611  * @label: (allow-none): the section label, or %NULL
30612  * @section: a #GMenuModel with the items of the section
30613  *
30614  * Creates a new #GMenuItem representing a section.
30615  *
30616  * This is a convenience API around g_menu_item_new() and
30617  * g_menu_item_set_section().
30618  *
30619  * The effect of having one menu appear as a section of another is
30620  * exactly as it sounds: the items from @section become a direct part of
30621  * the menu that @menu_item is added to.
30622  *
30623  * Visual separation is typically displayed between two non-empty
30624  * sections.  If @label is non-%NULL then it will be encorporated into
30625  * this visual indication.  This allows for labeled subsections of a
30626  * menu.
30627  *
30628  * As a simple example, consider a typical "Edit" menu from a simple
30629  * program.  It probably contains an "Undo" and "Redo" item, followed by
30630  * a separator, followed by "Cut", "Copy" and "Paste".
30631  *
30632  * This would be accomplished by creating three #GMenu instances.  The
30633  * first would be populated with the "Undo" and "Redo" items, and the
30634  * second with the "Cut", "Copy" and "Paste" items.  The first and
30635  * second menus would then be added as submenus of the third.  In XML
30636  * format, this would look something like the following:
30637  *
30638  * <informalexample><programlisting><![CDATA[
30639  * <menu id='edit-menu'>
30640  * <section>
30641  * <item label='Undo'/>
30642  * <item label='Redo'/>
30643  * </section>
30644  * <section>
30645  * <item label='Cut'/>
30646  * <item label='Copy'/>
30647  * <item label='Paste'/>
30648  * </section>
30649  * </menu>
30650  * ]]></programlisting></informalexample>
30651  *
30652  * The following example is exactly equivalent.  It is more illustrative
30653  * of the exact relationship between the menus and items (keeping in
30654  * mind that the 'link' element defines a new menu that is linked to the
30655  * containing one).  The style of the second example is more verbose and
30656  * difficult to read (and therefore not recommended except for the
30657  * purpose of understanding what is really going on).
30658  *
30659  * <informalexample><programlisting><![CDATA[
30660  * <menu id='edit-menu'>
30661  * <item>
30662  * <link name='section'>
30663  * <item label='Undo'/>
30664  * <item label='Redo'/>
30665  * </link>
30666  * </item>
30667  * <item>
30668  * <link name='section'>
30669  * <item label='Cut'/>
30670  * <item label='Copy'/>
30671  * <item label='Paste'/>
30672  * </link>
30673  * </item>
30674  * </menu>
30675  * ]]></programlisting></informalexample>
30676  *
30677  * Returns: a new #GMenuItem
30678  * Since: 2.32
30679  */
30680
30681
30682 /**
30683  * g_menu_item_new_submenu:
30684  * @label: (allow-none): the section label, or %NULL
30685  * @submenu: a #GMenuModel with the items of the submenu
30686  *
30687  * Creates a new #GMenuItem representing a submenu.
30688  *
30689  * This is a convenience API around g_menu_item_new() and
30690  * g_menu_item_set_submenu().
30691  *
30692  * Returns: a new #GMenuItem
30693  * Since: 2.32
30694  */
30695
30696
30697 /**
30698  * g_menu_item_set_action_and_target:
30699  * @menu_item: a #GMenuItem
30700  * @action: (allow-none): the name of the action for this item
30701  * @format_string: (allow-none): a GVariant format string
30702  * @...: positional parameters, as per @format_string
30703  *
30704  * Sets or unsets the "action" and "target" attributes of @menu_item.
30705  *
30706  * If @action is %NULL then both the "action" and "target" attributes
30707  * are unset (and @format_string is ignored along with the positional
30708  * parameters).
30709  *
30710  * If @action is non-%NULL then the "action" attribute is set.
30711  * @format_string is then inspected.  If it is non-%NULL then the proper
30712  * position parameters are collected to create a #GVariant instance to
30713  * use as the target value.  If it is %NULL then the positional
30714  * parameters are ignored and the "target" attribute is unset.
30715  *
30716  * See also g_menu_item_set_action_and_target_value() for an equivalent
30717  * call that directly accepts a #GVariant.  See
30718  * g_menu_item_set_detailed_action() for a more convenient version that
30719  * works with string-typed targets.
30720  *
30721  * See also g_menu_item_set_action_and_target_value() for a
30722  * description of the semantics of the action and target attributes.
30723  *
30724  * Since: 2.32
30725  */
30726
30727
30728 /**
30729  * g_menu_item_set_action_and_target_value:
30730  * @menu_item: a #GMenuItem
30731  * @action: (allow-none): the name of the action for this item
30732  * @target_value: (allow-none): a #GVariant to use as the action target
30733  *
30734  * Sets or unsets the "action" and "target" attributes of @menu_item.
30735  *
30736  * If @action is %NULL then both the "action" and "target" attributes
30737  * are unset (and @target_value is ignored).
30738  *
30739  * If @action is non-%NULL then the "action" attribute is set.  The
30740  * "target" attribute is then set to the value of @target_value if it is
30741  * non-%NULL or unset otherwise.
30742  *
30743  * Normal menu items (ie: not submenu, section or other custom item
30744  * types) are expected to have the "action" attribute set to identify
30745  * the action that they are associated with.  The state type of the
30746  * action help to determine the disposition of the menu item.  See
30747  * #GAction and #GActionGroup for an overview of actions.
30748  *
30749  * In general, clicking on the menu item will result in activation of
30750  * the named action with the "target" attribute given as the parameter
30751  * to the action invocation.  If the "target" attribute is not set then
30752  * the action is invoked with no parameter.
30753  *
30754  * If the action has no state then the menu item is usually drawn as a
30755  * plain menu item (ie: with no additional decoration).
30756  *
30757  * If the action has a boolean state then the menu item is usually drawn
30758  * as a toggle menu item (ie: with a checkmark or equivalent
30759  * indication).  The item should be marked as 'toggled' or 'checked'
30760  * when the boolean state is %TRUE.
30761  *
30762  * If the action has a string state then the menu item is usually drawn
30763  * as a radio menu item (ie: with a radio bullet or equivalent
30764  * indication).  The item should be marked as 'selected' when the string
30765  * state is equal to the value of the @target property.
30766  *
30767  * See g_menu_item_set_action_and_target() or
30768  * g_menu_item_set_detailed_action() for two equivalent calls that are
30769  * probably more convenient for most uses.
30770  *
30771  * Since: 2.32
30772  */
30773
30774
30775 /**
30776  * g_menu_item_set_attribute:
30777  * @menu_item: a #GMenuItem
30778  * @attribute: the attribute to set
30779  * @format_string: (allow-none): a #GVariant format string, or %NULL
30780  * @...: positional parameters, as per @format_string
30781  *
30782  * Sets or unsets an attribute on @menu_item.
30783  *
30784  * The attribute to set or unset is specified by @attribute. This
30785  * can be one of the standard attribute names %G_MENU_ATTRIBUTE_LABEL,
30786  * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, or a custom
30787  * attribute name.
30788  * Attribute names are restricted to lowercase characters, numbers
30789  * and '-'. Furthermore, the names must begin with a lowercase character,
30790  * must not end with a '-', and must not contain consecutive dashes.
30791  *
30792  * If @format_string is non-%NULL then the proper position parameters
30793  * are collected to create a #GVariant instance to use as the attribute
30794  * value.  If it is %NULL then the positional parameterrs are ignored
30795  * and the named attribute is unset.
30796  *
30797  * See also g_menu_item_set_attribute_value() for an equivalent call
30798  * that directly accepts a #GVariant.
30799  *
30800  * Since: 2.32
30801  */
30802
30803
30804 /**
30805  * g_menu_item_set_attribute_value:
30806  * @menu_item: a #GMenuItem
30807  * @attribute: the attribute to set
30808  * @value: (allow-none): a #GVariant to use as the value, or %NULL
30809  *
30810  * Sets or unsets an attribute on @menu_item.
30811  *
30812  * The attribute to set or unset is specified by @attribute. This
30813  * can be one of the standard attribute names %G_MENU_ATTRIBUTE_LABEL,
30814  * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, or a custom
30815  * attribute name.
30816  * Attribute names are restricted to lowercase characters, numbers
30817  * and '-'. Furthermore, the names must begin with a lowercase character,
30818  * must not end with a '-', and must not contain consecutive dashes.
30819  *
30820  * must consist only of lowercase
30821  * ASCII characters, digits and '-'.
30822  *
30823  * If @value is non-%NULL then it is used as the new value for the
30824  * attribute.  If @value is %NULL then the attribute is unset. If
30825  * the @value #GVariant is floating, it is consumed.
30826  *
30827  * See also g_menu_item_set_attribute() for a more convenient way to do
30828  * the same.
30829  *
30830  * Since: 2.32
30831  */
30832
30833
30834 /**
30835  * g_menu_item_set_detailed_action:
30836  * @menu_item: a #GMenuItem
30837  * @detailed_action: the "detailed" action string
30838  *
30839  * Sets the "action" and possibly the "target" attribute of @menu_item.
30840  *
30841  * If @detailed_action contains a double colon ("::") then it is used as
30842  * a separator between an action name and a target string.  In this
30843  * case, this call is equivalent to calling
30844  * g_menu_item_set_action_and_target() with the part before the "::" and
30845  * g_menu_item_set_target_value() with a string-type #GVariant
30846  * containing the part following the "::".
30847  *
30848  * If @detailed_action doesn't contain "::" then the action is set to
30849  * the given string (verbatim) and the target value is unset.
30850  *
30851  * See g_menu_item_set_action_and_target() or
30852  * g_menu_item_set_action_and_target_value() for more flexible (but
30853  * slightly less convenient) alternatives.
30854  *
30855  * See also g_menu_set_action_and_target_value() for a description of
30856  * the semantics of the action and target attributes.
30857  *
30858  * Since: 2.32
30859  */
30860
30861
30862 /**
30863  * g_menu_item_set_label:
30864  * @menu_item: a #GMenuItem
30865  * @label: (allow-none): the label to set, or %NULL to unset
30866  *
30867  * Sets or unsets the "label" attribute of @menu_item.
30868  *
30869  * If @label is non-%NULL it is used as the label for the menu item.  If
30870  * it is %NULL then the label attribute is unset.
30871  *
30872  * Since: 2.32
30873  */
30874
30875
30876 /**
30877  * g_menu_item_set_link:
30878  * @menu_item: a #GMenuItem
30879  * @link: type of link to establish or unset
30880  * @model: (allow-none): the #GMenuModel to link to (or %NULL to unset)
30881  *
30882  * Creates a link from @menu_item to @model if non-%NULL, or unsets it.
30883  *
30884  * Links are used to establish a relationship between a particular menu
30885  * item and another menu.  For example, %G_MENU_LINK_SUBMENU is used to
30886  * associate a submenu with a particular menu item, and %G_MENU_LINK_SECTION
30887  * is used to create a section. Other types of link can be used, but there
30888  * is no guarantee that clients will be able to make sense of them.
30889  * Link types are restricted to lowercase characters, numbers
30890  * and '-'. Furthermore, the names must begin with a lowercase character,
30891  * must not end with a '-', and must not contain consecutive dashes.
30892  *
30893  * Since: 2.32
30894  */
30895
30896
30897 /**
30898  * g_menu_item_set_section:
30899  * @menu_item: a #GMenuItem
30900  * @section: (allow-none): a #GMenuModel, or %NULL
30901  *
30902  * Sets or unsets the "section" link of @menu_item to @section.
30903  *
30904  * The effect of having one menu appear as a section of another is
30905  * exactly as it sounds: the items from @section become a direct part of
30906  * the menu that @menu_item is added to.  See g_menu_item_new_section()
30907  * for more information about what it means for a menu item to be a
30908  * section.
30909  *
30910  * Since: 2.32
30911  */
30912
30913
30914 /**
30915  * g_menu_item_set_submenu:
30916  * @menu_item: a #GMenuItem
30917  * @submenu: (allow-none): a #GMenuModel, or %NULL
30918  *
30919  * Sets or unsets the "submenu" link of @menu_item to @submenu.
30920  *
30921  * If @submenu is non-%NULL, it is linked to.  If it is %NULL then the
30922  * link is unset.
30923  *
30924  * The effect of having one menu appear as a submenu of another is
30925  * exactly as it sounds.
30926  *
30927  * Since: 2.32
30928  */
30929
30930
30931 /**
30932  * g_menu_link_iter_get_name:
30933  * @iter: a #GMenuLinkIter
30934  *
30935  * Gets the name of the link at the current iterator position.
30936  *
30937  * The iterator is not advanced.
30938  *
30939  * Returns: the type of the link
30940  * Since: 2.32
30941  */
30942
30943
30944 /**
30945  * g_menu_link_iter_get_next:
30946  * @iter: a #GMenuLinkIter
30947  * @out_link: (out) (allow-none) (transfer none): the name of the link
30948  * @value: (out) (allow-none) (transfer full): the linked #GMenuModel
30949  *
30950  * This function combines g_menu_link_iter_next() with
30951  * g_menu_link_iter_get_name() and g_menu_link_iter_get_value().
30952  *
30953  * First the iterator is advanced to the next (possibly first) link.
30954  * If that fails, then %FALSE is returned and there are no other effects.
30955  *
30956  * If successful, @out_link and @value are set to the name and #GMenuModel
30957  * of the link that has just been advanced to.  At this point,
30958  * g_menu_item_get_name() and g_menu_item_get_value() will return the
30959  * same values again.
30960  *
30961  * The value returned in @out_link remains valid for as long as the iterator
30962  * remains at the current position.  The value returned in @value must
30963  * be unreffed using g_object_unref() when it is no longer in use.
30964  *
30965  * Returns: %TRUE on success, or %FALSE if there is no additional link
30966  * Since: 2.32
30967  */
30968
30969
30970 /**
30971  * g_menu_link_iter_get_value:
30972  * @iter: a #GMenuLinkIter
30973  *
30974  * Gets the linked #GMenuModel at the current iterator position.
30975  *
30976  * The iterator is not advanced.
30977  *
30978  * Returns: (transfer full): the #GMenuModel that is linked to
30979  * Since: 2.32
30980  */
30981
30982
30983 /**
30984  * g_menu_link_iter_next:
30985  * @iter: a #GMenuLinkIter
30986  *
30987  * Attempts to advance the iterator to the next (possibly first)
30988  * link.
30989  *
30990  * %TRUE is returned on success, or %FALSE if there are no more links.
30991  *
30992  * You must call this function when you first acquire the iterator to
30993  * advance it to the first link (and determine if the first link exists
30994  * at all).
30995  *
30996  * Returns: %TRUE on success, or %FALSE when there are no more links
30997  * Since: 2.32
30998  */
30999
31000
31001 /**
31002  * g_menu_model_get_item_attribute:
31003  * @model: a #GMenuModel
31004  * @item_index: the index of the item
31005  * @attribute: the attribute to query
31006  * @format_string: a #GVariant format string
31007  * @...: positional parameters, as per @format_string
31008  *
31009  * Queries item at position @item_index in @model for the attribute
31010  * specified by @attribute.
31011  *
31012  * If the attribute exists and matches the #GVariantType corresponding
31013  * to @format_string then @format_string is used to deconstruct the
31014  * value into the positional parameters and %TRUE is returned.
31015  *
31016  * If the attribute does not exist, or it does exist but has the wrong
31017  * type, then the positional parameters are ignored and %FALSE is
31018  * returned.
31019  *
31020  * type
31021  *
31022  * Returns: %TRUE if the named attribute was found with the expected
31023  * Since: 2.32
31024  */
31025
31026
31027 /**
31028  * g_menu_model_get_item_attribute_value:
31029  * @model: a #GMenuModel
31030  * @item_index: the index of the item
31031  * @attribute: the attribute to query
31032  * @expected_type: (allow-none): the expected type of the attribute, or %NULL
31033  *
31034  * Queries the item at position @item_index in @model for the attribute
31035  * specified by @attribute.
31036  *
31037  * If @expected_type is non-%NULL then it specifies the expected type of
31038  * the attribute.  If it is %NULL then any type will be accepted.
31039  *
31040  * If the attribute exists and matches @expected_type (or if the
31041  * expected type is unspecified) then the value is returned.
31042  *
31043  * If the attribute does not exist, or does not match the expected type
31044  * then %NULL is returned.
31045  *
31046  * Returns: (transfer full): the value of the attribute
31047  * Since: 2.32
31048  */
31049
31050
31051 /**
31052  * g_menu_model_get_item_link:
31053  * @model: a #GMenuModel
31054  * @item_index: the index of the item
31055  * @link: the link to query
31056  *
31057  * Queries the item at position @item_index in @model for the link
31058  * specified by @link.
31059  *
31060  * If the link exists, the linked #GMenuModel is returned.  If the link
31061  * does not exist, %NULL is returned.
31062  *
31063  * Returns: (transfer full): the linked #GMenuModel, or %NULL
31064  * Since: 2.32
31065  */
31066
31067
31068 /**
31069  * g_menu_model_get_n_items:
31070  * @model: a #GMenuModel
31071  *
31072  * Query the number of items in @model.
31073  *
31074  * Returns: the number of items
31075  * Since: 2.32
31076  */
31077
31078
31079 /**
31080  * g_menu_model_is_mutable:
31081  * @model: a #GMenuModel
31082  *
31083  * Queries if @model is mutable.
31084  *
31085  * An immutable #GMenuModel will never emit the #GMenuModel::items-changed
31086  * signal. Consumers of the model may make optimisations accordingly.
31087  *
31088  * emitted).
31089  *
31090  * Returns: %TRUE if the model is mutable (ie: "items-changed" may be
31091  * Since: 2.32
31092  */
31093
31094
31095 /**
31096  * g_menu_model_items_changed:
31097  * @model: a #GMenuModel
31098  * @position: the position of the change
31099  * @removed: the number of items removed
31100  * @added: the number of items added
31101  *
31102  * Requests emission of the #GMenuModel::items-changed signal on @model.
31103  *
31104  * This function should never be called except by #GMenuModel
31105  * subclasses.  Any other calls to this function will very likely lead
31106  * to a violation of the interface of the model.
31107  *
31108  * The implementation should update its internal representation of the
31109  * menu before emitting the signal.  The implementation should further
31110  * expect to receive queries about the new state of the menu (and
31111  * particularly added menu items) while signal handlers are running.
31112  *
31113  * The implementation must dispatch this call directly from a mainloop
31114  * entry and not in response to calls -- particularly those from the
31115  * #GMenuModel API.  Said another way: the menu must not change while
31116  * user code is running without returning to the mainloop.
31117  *
31118  * Since: 2.32
31119  */
31120
31121
31122 /**
31123  * g_menu_model_iterate_item_attributes:
31124  * @model: a #GMenuModel
31125  * @item_index: the index of the item
31126  *
31127  * Creates a #GMenuAttributeIter to iterate over the attributes of
31128  * the item at position @item_index in @model.
31129  *
31130  * You must free the iterator with g_object_unref() when you are done.
31131  *
31132  * Returns: (transfer full): a new #GMenuAttributeIter
31133  * Since: 2.32
31134  */
31135
31136
31137 /**
31138  * g_menu_model_iterate_item_links:
31139  * @model: a #GMenuModel
31140  * @item_index: the index of the item
31141  *
31142  * Creates a #GMenuLinkIter to iterate over the links of the item at
31143  * position @item_index in @model.
31144  *
31145  * You must free the iterator with g_object_unref() when you are done.
31146  *
31147  * Returns: (transfer full): a new #GMenuLinkIter
31148  * Since: 2.32
31149  */
31150
31151
31152 /**
31153  * g_menu_new:
31154  *
31155  * Creates a new #GMenu.
31156  *
31157  * The new menu has no items.
31158  *
31159  * Returns: a new #GMenu
31160  * Since: 2.32
31161  */
31162
31163
31164 /**
31165  * g_menu_prepend:
31166  * @menu: a #GMenu
31167  * @label: (allow-none): the section label, or %NULL
31168  * @detailed_action: (allow-none): the detailed action string, or %NULL
31169  *
31170  * Convenience function for prepending a normal menu item to the start
31171  * of @menu.  Combine g_menu_new() and g_menu_insert_item() for a more
31172  * flexible alternative.
31173  *
31174  * Since: 2.32
31175  */
31176
31177
31178 /**
31179  * g_menu_prepend_item:
31180  * @menu: a #GMenu
31181  * @item: a #GMenuItem to prepend
31182  *
31183  * Prepends @item to the start of @menu.
31184  *
31185  * See g_menu_insert_item() for more information.
31186  *
31187  * Since: 2.32
31188  */
31189
31190
31191 /**
31192  * g_menu_prepend_section:
31193  * @menu: a #GMenu
31194  * @label: (allow-none): the section label, or %NULL
31195  * @section: a #GMenuModel with the items of the section
31196  *
31197  * Convenience function for prepending a section menu item to the start
31198  * of @menu.  Combine g_menu_item_new_section() and g_menu_insert_item() for
31199  * a more flexible alternative.
31200  *
31201  * Since: 2.32
31202  */
31203
31204
31205 /**
31206  * g_menu_prepend_submenu:
31207  * @menu: a #GMenu
31208  * @label: (allow-none): the section label, or %NULL
31209  * @submenu: a #GMenuModel with the items of the submenu
31210  *
31211  * Convenience function for prepending a submenu menu item to the start
31212  * of @menu.  Combine g_menu_new_submenu() and g_menu_insert_item() for
31213  * a more flexible alternative.
31214  *
31215  * Since: 2.32
31216  */
31217
31218
31219 /**
31220  * g_menu_remove:
31221  * @menu: a #GMenu
31222  * @position: the position of the item to remove
31223  *
31224  * Removes an item from the menu.
31225  *
31226  * @position gives the index of the item to remove.
31227  *
31228  * It is an error if position is not in range the range from 0 to one
31229  * less than the number of items in the menu.
31230  *
31231  * It is not possible to remove items by identity since items are added
31232  * to the menu simply by copying their links and attributes (ie:
31233  * identity of the item itself is not preserved).
31234  *
31235  * Since: 2.32
31236  */
31237
31238
31239 /**
31240  * g_mount_can_eject:
31241  * @mount: a #GMount.
31242  *
31243  * Checks if @mount can be eject.
31244  *
31245  * Returns: %TRUE if the @mount can be ejected.
31246  */
31247
31248
31249 /**
31250  * g_mount_can_unmount:
31251  * @mount: a #GMount.
31252  *
31253  * Checks if @mount can be mounted.
31254  *
31255  * Returns: %TRUE if the @mount can be unmounted.
31256  */
31257
31258
31259 /**
31260  * g_mount_eject:
31261  * @mount: a #GMount.
31262  * @flags: flags affecting the unmount if required for eject
31263  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31264  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31265  * @user_data: user data passed to @callback.
31266  *
31267  * Ejects a mount. This is an asynchronous operation, and is
31268  * finished by calling g_mount_eject_finish() with the @mount
31269  * and #GAsyncResult data returned in the @callback.
31270  *
31271  * Deprecated: 2.22: Use g_mount_eject_with_operation() instead.
31272  */
31273
31274
31275 /**
31276  * g_mount_eject_finish:
31277  * @mount: a #GMount.
31278  * @result: a #GAsyncResult.
31279  * @error: a #GError location to store the error occurring, or %NULL to ignore.
31280  *
31281  * Finishes ejecting a mount. If any errors occurred during the operation,
31282  * @error will be set to contain the errors and %FALSE will be returned.
31283  *
31284  * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
31285  * Deprecated: 2.22: Use g_mount_eject_with_operation_finish() instead.
31286  */
31287
31288
31289 /**
31290  * g_mount_eject_with_operation:
31291  * @mount: a #GMount.
31292  * @flags: flags affecting the unmount if required for eject
31293  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
31294  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31295  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31296  * @user_data: user data passed to @callback.
31297  *
31298  * Ejects a mount. This is an asynchronous operation, and is
31299  * finished by calling g_mount_eject_with_operation_finish() with the @mount
31300  * and #GAsyncResult data returned in the @callback.
31301  *
31302  * Since: 2.22
31303  */
31304
31305
31306 /**
31307  * g_mount_eject_with_operation_finish:
31308  * @mount: a #GMount.
31309  * @result: a #GAsyncResult.
31310  * @error: a #GError location to store the error occurring, or %NULL to ignore.
31311  *
31312  * Finishes ejecting a mount. If any errors occurred during the operation,
31313  * @error will be set to contain the errors and %FALSE will be returned.
31314  *
31315  * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
31316  * Since: 2.22
31317  */
31318
31319
31320 /**
31321  * g_mount_get_default_location:
31322  * @mount: a #GMount.
31323  *
31324  * Gets the default location of @mount. The default location of the given
31325  * @mount is a path that reflects the main entry point for the user (e.g.
31326  * the home directory, or the root of the volume).
31327  *
31328  * The returned object should be unreffed with
31329  * g_object_unref() when no longer needed.
31330  *
31331  * Returns: (transfer full): a #GFile.
31332  */
31333
31334
31335 /**
31336  * g_mount_get_drive:
31337  * @mount: a #GMount.
31338  *
31339  * Gets the drive for the @mount.
31340  *
31341  * This is a convenience method for getting the #GVolume and then
31342  * using that object to get the #GDrive.
31343  *
31344  * The returned object should be unreffed with
31345  * g_object_unref() when no longer needed.
31346  *
31347  * Returns: (transfer full): a #GDrive or %NULL if @mount is not associated with a volume or a drive.
31348  */
31349
31350
31351 /**
31352  * g_mount_get_icon:
31353  * @mount: a #GMount.
31354  *
31355  * Gets the icon for @mount.
31356  *
31357  * The returned object should be unreffed with
31358  * g_object_unref() when no longer needed.
31359  *
31360  * Returns: (transfer full): a #GIcon.
31361  */
31362
31363
31364 /**
31365  * g_mount_get_name:
31366  * @mount: a #GMount.
31367  *
31368  * Gets the name of @mount.
31369  *
31370  * The returned string should be freed with g_free()
31371  * when no longer needed.
31372  *
31373  * Returns: the name for the given @mount.
31374  */
31375
31376
31377 /**
31378  * g_mount_get_root:
31379  * @mount: a #GMount.
31380  *
31381  * Gets the root directory on @mount.
31382  *
31383  * The returned object should be unreffed with
31384  * g_object_unref() when no longer needed.
31385  *
31386  * Returns: (transfer full): a #GFile.
31387  */
31388
31389
31390 /**
31391  * g_mount_get_sort_key:
31392  * @mount: A #GMount.
31393  *
31394  * Gets the sort key for @mount, if any.
31395  *
31396  * Returns: Sorting key for @mount or %NULL if no such key is available.
31397  * Since: 2.32
31398  */
31399
31400
31401 /**
31402  * g_mount_get_uuid:
31403  * @mount: a #GMount.
31404  *
31405  * Gets the UUID for the @mount. The reference is typically based on
31406  * the file system UUID for the mount in question and should be
31407  * considered an opaque string. Returns %NULL if there is no UUID
31408  * available.
31409  *
31410  * The returned string should be freed with g_free()
31411  * when no longer needed.
31412  *
31413  * Returns: the UUID for @mount or %NULL if no UUID can be computed.
31414  */
31415
31416
31417 /**
31418  * g_mount_get_volume:
31419  * @mount: a #GMount.
31420  *
31421  * Gets the volume for the @mount.
31422  *
31423  * The returned object should be unreffed with
31424  * g_object_unref() when no longer needed.
31425  *
31426  * Returns: (transfer full): a #GVolume or %NULL if @mount is not associated with a volume.
31427  */
31428
31429
31430 /**
31431  * g_mount_guess_content_type:
31432  * @mount: a #GMount
31433  * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
31434  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
31435  * @callback: a #GAsyncReadyCallback
31436  * @user_data: user data passed to @callback
31437  *
31438  * Tries to guess the type of content stored on @mount. Returns one or
31439  * more textual identifiers of well-known content types (typically
31440  * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
31441  * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
31442  * specification for more on x-content types.
31443  *
31444  * This is an asynchronous operation (see
31445  * g_mount_guess_content_type_sync() for the synchronous version), and
31446  * is finished by calling g_mount_guess_content_type_finish() with the
31447  * @mount and #GAsyncResult data returned in the @callback.
31448  *
31449  * Since: 2.18
31450  */
31451
31452
31453 /**
31454  * g_mount_guess_content_type_finish:
31455  * @mount: a #GMount
31456  * @result: a #GAsyncResult
31457  * @error: a #GError location to store the error occurring, or %NULL to ignore
31458  *
31459  * Finishes guessing content types of @mount. If any errors occurred
31460  * during the operation, @error will be set to contain the errors and
31461  * %FALSE will be returned. In particular, you may get an
31462  * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
31463  * guessing.
31464  *
31465  * Caller should free this array with g_strfreev() when done with it.
31466  *
31467  * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
31468  * Since: 2.18
31469  */
31470
31471
31472 /**
31473  * g_mount_guess_content_type_sync:
31474  * @mount: a #GMount
31475  * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
31476  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
31477  * @error: a #GError location to store the error occurring, or %NULL to ignore
31478  *
31479  * Tries to guess the type of content stored on @mount. Returns one or
31480  * more textual identifiers of well-known content types (typically
31481  * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
31482  * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
31483  * specification for more on x-content types.
31484  *
31485  * This is an synchronous operation and as such may block doing IO;
31486  * see g_mount_guess_content_type() for the asynchronous version.
31487  *
31488  * Caller should free this array with g_strfreev() when done with it.
31489  *
31490  * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
31491  * Since: 2.18
31492  */
31493
31494
31495 /**
31496  * g_mount_is_shadowed:
31497  * @mount: A #GMount.
31498  *
31499  * Determines if @mount is shadowed. Applications or libraries should
31500  * avoid displaying @mount in the user interface if it is shadowed.
31501  *
31502  * A mount is said to be shadowed if there exists one or more user
31503  * visible objects (currently #GMount objects) with a root that is
31504  * inside the root of @mount.
31505  *
31506  * One application of shadow mounts is when exposing a single file
31507  * system that is used to address several logical volumes. In this
31508  * situation, a #GVolumeMonitor implementation would create two
31509  * #GVolume objects (for example, one for the camera functionality of
31510  * the device and one for a SD card reader on the device) with
31511  * activation URIs <literal>gphoto2://[usb:001,002]/store1/</literal>
31512  * and <literal>gphoto2://[usb:001,002]/store2/</literal>. When the
31513  * underlying mount (with root
31514  * <literal>gphoto2://[usb:001,002]/</literal>) is mounted, said
31515  * #GVolumeMonitor implementation would create two #GMount objects
31516  * (each with their root matching the corresponding volume activation
31517  * root) that would shadow the original mount.
31518  *
31519  * The proxy monitor in GVfs 2.26 and later, automatically creates and
31520  * manage shadow mounts (and shadows the underlying mount) if the
31521  * activation root on a #GVolume is set.
31522  *
31523  * Returns: %TRUE if @mount is shadowed.
31524  * Since: 2.20
31525  */
31526
31527
31528 /**
31529  * g_mount_operation_get_anonymous:
31530  * @op: a #GMountOperation.
31531  *
31532  * Check to see whether the mount operation is being used
31533  * for an anonymous user.
31534  *
31535  * Returns: %TRUE if mount operation is anonymous.
31536  */
31537
31538
31539 /**
31540  * g_mount_operation_get_choice:
31541  * @op: a #GMountOperation.
31542  *
31543  * Gets a choice from the mount operation.
31544  *
31545  * the choice's list, or %0.
31546  *
31547  * Returns: an integer containing an index of the user's choice from
31548  */
31549
31550
31551 /**
31552  * g_mount_operation_get_domain:
31553  * @op: a #GMountOperation.
31554  *
31555  * Gets the domain of the mount operation.
31556  *
31557  * Returns: a string set to the domain.
31558  */
31559
31560
31561 /**
31562  * g_mount_operation_get_password:
31563  * @op: a #GMountOperation.
31564  *
31565  * Gets a password from the mount operation.
31566  *
31567  * Returns: a string containing the password within @op.
31568  */
31569
31570
31571 /**
31572  * g_mount_operation_get_password_save:
31573  * @op: a #GMountOperation.
31574  *
31575  * Gets the state of saving passwords for the mount operation.
31576  *
31577  * Returns: a #GPasswordSave flag.
31578  */
31579
31580
31581 /**
31582  * g_mount_operation_get_username:
31583  * @op: a #GMountOperation.
31584  *
31585  * Get the user name from the mount operation.
31586  *
31587  * Returns: a string containing the user name.
31588  */
31589
31590
31591 /**
31592  * g_mount_operation_new:
31593  *
31594  * Creates a new mount operation.
31595  *
31596  * Returns: a #GMountOperation.
31597  */
31598
31599
31600 /**
31601  * g_mount_operation_reply:
31602  * @op: a #GMountOperation
31603  * @result: a #GMountOperationResult
31604  *
31605  * Emits the #GMountOperation::reply signal.
31606  */
31607
31608
31609 /**
31610  * g_mount_operation_set_anonymous:
31611  * @op: a #GMountOperation.
31612  * @anonymous: boolean value.
31613  *
31614  * Sets the mount operation to use an anonymous user if @anonymous is %TRUE.
31615  */
31616
31617
31618 /**
31619  * g_mount_operation_set_choice:
31620  * @op: a #GMountOperation.
31621  * @choice: an integer.
31622  *
31623  * Sets a default choice for the mount operation.
31624  */
31625
31626
31627 /**
31628  * g_mount_operation_set_domain:
31629  * @op: a #GMountOperation.
31630  * @domain: the domain to set.
31631  *
31632  * Sets the mount operation's domain.
31633  */
31634
31635
31636 /**
31637  * g_mount_operation_set_password:
31638  * @op: a #GMountOperation.
31639  * @password: password to set.
31640  *
31641  * Sets the mount operation's password to @password.
31642  */
31643
31644
31645 /**
31646  * g_mount_operation_set_password_save:
31647  * @op: a #GMountOperation.
31648  * @save: a set of #GPasswordSave flags.
31649  *
31650  * Sets the state of saving passwords for the mount operation.
31651  */
31652
31653
31654 /**
31655  * g_mount_operation_set_username:
31656  * @op: a #GMountOperation.
31657  * @username: input username.
31658  *
31659  * Sets the user name within @op to @username.
31660  */
31661
31662
31663 /**
31664  * g_mount_remount:
31665  * @mount: a #GMount.
31666  * @flags: flags affecting the operation
31667  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
31668  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31669  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31670  * @user_data: user data passed to @callback.
31671  *
31672  * Remounts a mount. This is an asynchronous operation, and is
31673  * finished by calling g_mount_remount_finish() with the @mount
31674  * and #GAsyncResults data returned in the @callback.
31675  *
31676  * Remounting is useful when some setting affecting the operation
31677  * of the volume has been changed, as these may need a remount to
31678  * take affect. While this is semantically equivalent with unmounting
31679  * and then remounting not all backends might need to actually be
31680  * unmounted.
31681  */
31682
31683
31684 /**
31685  * g_mount_remount_finish:
31686  * @mount: a #GMount.
31687  * @result: a #GAsyncResult.
31688  * @error: a #GError location to store the error occurring, or %NULL to ignore.
31689  *
31690  * Finishes remounting a mount. If any errors occurred during the operation,
31691  * @error will be set to contain the errors and %FALSE will be returned.
31692  *
31693  * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise.
31694  */
31695
31696
31697 /**
31698  * g_mount_shadow:
31699  * @mount: A #GMount.
31700  *
31701  * Increments the shadow count on @mount. Usually used by
31702  * #GVolumeMonitor implementations when creating a shadow mount for
31703  * @mount, see g_mount_is_shadowed() for more information. The caller
31704  * will need to emit the #GMount::changed signal on @mount manually.
31705  *
31706  * Since: 2.20
31707  */
31708
31709
31710 /**
31711  * g_mount_unmount:
31712  * @mount: a #GMount.
31713  * @flags: flags affecting the operation
31714  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31715  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31716  * @user_data: user data passed to @callback.
31717  *
31718  * Unmounts a mount. This is an asynchronous operation, and is
31719  * finished by calling g_mount_unmount_finish() with the @mount
31720  * and #GAsyncResult data returned in the @callback.
31721  *
31722  * Deprecated: 2.22: Use g_mount_unmount_with_operation() instead.
31723  */
31724
31725
31726 /**
31727  * g_mount_unmount_finish:
31728  * @mount: a #GMount.
31729  * @result: a #GAsyncResult.
31730  * @error: a #GError location to store the error occurring, or %NULL to ignore.
31731  *
31732  * Finishes unmounting a mount. If any errors occurred during the operation,
31733  * @error will be set to contain the errors and %FALSE will be returned.
31734  *
31735  * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
31736  * Deprecated: 2.22: Use g_mount_unmount_with_operation_finish() instead.
31737  */
31738
31739
31740 /**
31741  * g_mount_unmount_with_operation:
31742  * @mount: a #GMount.
31743  * @flags: flags affecting the operation
31744  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
31745  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31746  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31747  * @user_data: user data passed to @callback.
31748  *
31749  * Unmounts a mount. This is an asynchronous operation, and is
31750  * finished by calling g_mount_unmount_with_operation_finish() with the @mount
31751  * and #GAsyncResult data returned in the @callback.
31752  *
31753  * Since: 2.22
31754  */
31755
31756
31757 /**
31758  * g_mount_unmount_with_operation_finish:
31759  * @mount: a #GMount.
31760  * @result: a #GAsyncResult.
31761  * @error: a #GError location to store the error occurring, or %NULL to ignore.
31762  *
31763  * Finishes unmounting a mount. If any errors occurred during the operation,
31764  * @error will be set to contain the errors and %FALSE will be returned.
31765  *
31766  * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
31767  * Since: 2.22
31768  */
31769
31770
31771 /**
31772  * g_mount_unshadow:
31773  * @mount: A #GMount.
31774  *
31775  * Decrements the shadow count on @mount. Usually used by
31776  * #GVolumeMonitor implementations when destroying a shadow mount for
31777  * @mount, see g_mount_is_shadowed() for more information. The caller
31778  * will need to emit the #GMount::changed signal on @mount manually.
31779  *
31780  * Since: 2.20
31781  */
31782
31783
31784 /**
31785  * g_network_address_get_hostname:
31786  * @addr: a #GNetworkAddress
31787  *
31788  * Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded,
31789  * depending on what @addr was created with.
31790  *
31791  * Returns: @addr's hostname
31792  * Since: 2.22
31793  */
31794
31795
31796 /**
31797  * g_network_address_get_port:
31798  * @addr: a #GNetworkAddress
31799  *
31800  * Gets @addr's port number
31801  *
31802  * Returns: @addr's port (which may be 0)
31803  * Since: 2.22
31804  */
31805
31806
31807 /**
31808  * g_network_address_get_scheme:
31809  * @addr: a #GNetworkAddress
31810  *
31811  * Gets @addr's scheme
31812  *
31813  * Returns: @addr's scheme (%NULL if not built from URI)
31814  * Since: 2.26
31815  */
31816
31817
31818 /**
31819  * g_network_address_new:
31820  * @hostname: the hostname
31821  * @port: the port
31822  *
31823  * Creates a new #GSocketConnectable for connecting to the given
31824  * @hostname and @port.
31825  *
31826  * Returns: (transfer full) (type GNetworkAddress): the new #GNetworkAddress
31827  * Since: 2.22
31828  */
31829
31830
31831 /**
31832  * g_network_address_parse:
31833  * @host_and_port: the hostname and optionally a port
31834  * @default_port: the default port if not in @host_and_port
31835  * @error: a pointer to a #GError, or %NULL
31836  *
31837  * Creates a new #GSocketConnectable for connecting to the given
31838  * @hostname and @port. May fail and return %NULL in case
31839  * parsing @host_and_port fails.
31840  *
31841  * @host_and_port may be in any of a number of recognised formats; an IPv6
31842  * address, an IPv4 address, or a domain name (in which case a DNS
31843  * lookup is performed). Quoting with [] is supported for all address
31844  * types. A port override may be specified in the usual way with a
31845  * colon.
31846  *
31847  * If no port is specified in @host_and_port then @default_port will be
31848  * used as the port number to connect to.
31849  *
31850  * In general, @host_and_port is expected to be provided by the user
31851  * (allowing them to give the hostname, and a port overide if necessary)
31852  * and @default_port is expected to be provided by the application.
31853  *
31854  * (The port component of @host_and_port can also be specified as a
31855  * service name rather than as a numeric port, but this functionality
31856  * is deprecated, because it depends on the contents of /etc/services,
31857  * which is generally quite sparse on platforms other than Linux.)
31858  *
31859  * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
31860  * Since: 2.22
31861  */
31862
31863
31864 /**
31865  * g_network_address_parse_uri:
31866  * @uri: the hostname and optionally a port
31867  * @default_port: The default port if none is found in the URI
31868  * @error: a pointer to a #GError, or %NULL
31869  *
31870  * Creates a new #GSocketConnectable for connecting to the given
31871  * @uri. May fail and return %NULL in case parsing @uri fails.
31872  *
31873  * Using this rather than g_network_address_new() or
31874  * g_network_address_parse_host() allows #GSocketClient to determine
31875  * when to use application-specific proxy protocols.
31876  *
31877  * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
31878  * Since: 2.26
31879  */
31880
31881
31882 /**
31883  * g_network_monitor_base_add_network:
31884  * @monitor: the #GNetworkMonitorBase
31885  * @network: a #GInetAddressMask
31886  *
31887  * Adds @network to @monitor's list of available networks.
31888  *
31889  * Since: 2.32
31890  */
31891
31892
31893 /**
31894  * g_network_monitor_base_remove_network:
31895  * @monitor: the #GNetworkMonitorBase
31896  * @network: a #GInetAddressMask
31897  *
31898  * Removes @network from @monitor's list of available networks.
31899  *
31900  * Since: 2.32
31901  */
31902
31903
31904 /**
31905  * g_network_monitor_base_set_networks:
31906  * @monitor: the #GNetworkMonitorBase
31907  * @networks: (array length=length): an array of #GInetAddressMask
31908  * @length: length of @networks
31909  *
31910  * Drops @monitor's current list of available networks and replaces
31911  * it with @networks.
31912  */
31913
31914
31915 /**
31916  * g_network_monitor_can_reach:
31917  * @monitor: a #GNetworkMonitor
31918  * @connectable: a #GSocketConnectable
31919  * @cancellable: a #GCancellable, or %NULL
31920  * @error: return location for a #GError, or %NULL
31921  *
31922  * Attempts to determine whether or not the host pointed to by
31923  * @connectable can be reached, without actually trying to connect to
31924  * it.
31925  *
31926  * This may return %TRUE even when #GNetworkMonitor:network-available
31927  * is %FALSE, if, for example, @monitor can determine that
31928  * @connectable refers to a host on a local network.
31929  *
31930  * If @monitor believes that an attempt to connect to @connectable
31931  * will succeed, it will return %TRUE. Otherwise, it will return
31932  * %FALSE and set @error to an appropriate error (such as
31933  * %G_IO_ERROR_HOST_UNREACHABLE).
31934  *
31935  * Note that although this does not attempt to connect to
31936  * @connectable, it may still block for a brief period of time (eg,
31937  * trying to do multicast DNS on the local network), so if you do not
31938  * want to block, you should use g_network_monitor_can_reach_async().
31939  *
31940  * Returns: %TRUE if @connectable is reachable, %FALSE if not.
31941  * Since: 2.32
31942  */
31943
31944
31945 /**
31946  * g_network_monitor_can_reach_async:
31947  * @monitor: a #GNetworkMonitor
31948  * @connectable: a #GSocketConnectable
31949  * @cancellable: a #GCancellable, or %NULL
31950  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
31951  * @user_data: (closure): the data to pass to callback function
31952  *
31953  * Asynchronously attempts to determine whether or not the host
31954  * pointed to by @connectable can be reached, without actually
31955  * trying to connect to it.
31956  *
31957  * For more details, see g_network_monitor_can_reach().
31958  *
31959  * When the operation is finished, @callback will be called.
31960  * You can then call g_network_monitor_can_reach_finish()
31961  * to get the result of the operation.
31962  */
31963
31964
31965 /**
31966  * g_network_monitor_can_reach_finish:
31967  * @monitor: a #GNetworkMonitor
31968  * @result: a #GAsyncResult
31969  * @error: return location for errors, or %NULL
31970  *
31971  * Finishes an async network connectivity test.
31972  * See g_network_monitor_can_reach_async().
31973  *
31974  * Returns: %TRUE if network is reachable, %FALSE if not.
31975  */
31976
31977
31978 /**
31979  * g_network_monitor_get_default:
31980  *
31981  * Gets the default #GNetworkMonitor for the system.
31982  *
31983  * Returns: (transfer none): a #GNetworkMonitor
31984  * Since: 2.32
31985  */
31986
31987
31988 /**
31989  * g_network_monitor_get_network_available:
31990  * @monitor: the #GNetworkMonitor
31991  *
31992  * Checks if the network is available. "Available" here means that the
31993  * system has a default route available for at least one of IPv4 or
31994  * IPv6. It does not necessarily imply that the public Internet is
31995  * reachable. See #GNetworkMonitor:network-available for more details.
31996  *
31997  * Returns: whether the network is available
31998  * Since: 2.32
31999  */
32000
32001
32002 /**
32003  * g_network_service_get_domain:
32004  * @srv: a #GNetworkService
32005  *
32006  * Gets the domain that @srv serves. This might be either UTF-8 or
32007  * ASCII-encoded, depending on what @srv was created with.
32008  *
32009  * Returns: @srv's domain name
32010  * Since: 2.22
32011  */
32012
32013
32014 /**
32015  * g_network_service_get_protocol:
32016  * @srv: a #GNetworkService
32017  *
32018  * Gets @srv's protocol name (eg, "tcp").
32019  *
32020  * Returns: @srv's protocol name
32021  * Since: 2.22
32022  */
32023
32024
32025 /**
32026  * g_network_service_get_scheme:
32027  * @srv: a #GNetworkService
32028  *
32029  * Get's the URI scheme used to resolve proxies. By default, the service name
32030  * is used as scheme.
32031  *
32032  * Returns: @srv's scheme name
32033  * Since: 2.26
32034  */
32035
32036
32037 /**
32038  * g_network_service_get_service:
32039  * @srv: a #GNetworkService
32040  *
32041  * Gets @srv's service name (eg, "ldap").
32042  *
32043  * Returns: @srv's service name
32044  * Since: 2.22
32045  */
32046
32047
32048 /**
32049  * g_network_service_new:
32050  * @service: the service type to look up (eg, "ldap")
32051  * @protocol: the networking protocol to use for @service (eg, "tcp")
32052  * @domain: the DNS domain to look up the service in
32053  *
32054  * Creates a new #GNetworkService representing the given @service,
32055  * @protocol, and @domain. This will initially be unresolved; use the
32056  * #GSocketConnectable interface to resolve it.
32057  *
32058  * Returns: (transfer full) (type GNetworkService): a new #GNetworkService
32059  * Since: 2.22
32060  */
32061
32062
32063 /**
32064  * g_network_service_set_scheme:
32065  * @srv: a #GNetworkService
32066  * @scheme: a URI scheme
32067  *
32068  * Set's the URI scheme used to resolve proxies. By default, the service name
32069  * is used as scheme.
32070  *
32071  * Since: 2.26
32072  */
32073
32074
32075 /**
32076  * g_new:
32077  * @struct_type: the type of the elements to allocate
32078  * @n_structs: the number of elements to allocate
32079  *
32080  * Allocates @n_structs elements of type @struct_type.
32081  * The returned pointer is cast to a pointer to the given type.
32082  * If @n_structs is 0 it returns %NULL.
32083  * Care is taken to avoid overflow when calculating the size of the allocated block.
32084  *
32085  * Since the returned pointer is already casted to the right type,
32086  * it is normally unnecessary to cast it explicitly, and doing
32087  * so might hide memory allocation errors.
32088  *
32089  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
32090  */
32091
32092
32093 /**
32094  * g_new0:
32095  * @struct_type: the type of the elements to allocate.
32096  * @n_structs: the number of elements to allocate.
32097  *
32098  * Allocates @n_structs elements of type @struct_type, initialized to 0's.
32099  * The returned pointer is cast to a pointer to the given type.
32100  * If @n_structs is 0 it returns %NULL.
32101  * Care is taken to avoid overflow when calculating the size of the allocated block.
32102  *
32103  * Since the returned pointer is already casted to the right type,
32104  * it is normally unnecessary to cast it explicitly, and doing
32105  * so might hide memory allocation errors.
32106  *
32107  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
32108  */
32109
32110
32111 /**
32112  * g_newa:
32113  * @struct_type: Type of memory chunks to be allocated
32114  * @n_structs: Number of chunks to be allocated
32115  *
32116  * Wraps g_alloca() in a more typesafe manner.
32117  *
32118  * Returns: Pointer to stack space for @n_structs chunks of type @struct_type
32119  */
32120
32121
32122 /**
32123  * g_node_append:
32124  * @parent: the #GNode to place the new #GNode under
32125  * @node: the #GNode to insert
32126  *
32127  * Inserts a #GNode as the last child of the given parent.
32128  *
32129  * Returns: the inserted #GNode
32130  */
32131
32132
32133 /**
32134  * g_node_append_data:
32135  * @parent: the #GNode to place the new #GNode under
32136  * @data: the data for the new #GNode
32137  *
32138  * Inserts a new #GNode as the last child of the given parent.
32139  *
32140  * Returns: the new #GNode
32141  */
32142
32143
32144 /**
32145  * g_node_first_child:
32146  * @node: a #GNode
32147  *
32148  * Gets the first child of a #GNode.
32149  *
32150  * or has no children
32151  *
32152  * Returns: the first child of @node, or %NULL if @node is %NULL
32153  */
32154
32155
32156 /**
32157  * g_node_insert_data:
32158  * @parent: the #GNode to place the new #GNode under
32159  * @position: the position to place the new #GNode at. If position is -1, the new #GNode is inserted as the last child of @parent
32160  * @data: the data for the new #GNode
32161  *
32162  * Inserts a new #GNode at the given position.
32163  *
32164  * Returns: the new #GNode
32165  */
32166
32167
32168 /**
32169  * g_node_insert_data_after:
32170  * @parent: the #GNode to place the new #GNode under
32171  * @sibling: the sibling #GNode to place the new #GNode after
32172  * @data: the data for the new #GNode
32173  *
32174  * Inserts a new #GNode after the given sibling.
32175  *
32176  * Returns: the new #GNode
32177  */
32178
32179
32180 /**
32181  * g_node_insert_data_before:
32182  * @parent: the #GNode to place the new #GNode under
32183  * @sibling: the sibling #GNode to place the new #GNode before
32184  * @data: the data for the new #GNode
32185  *
32186  * Inserts a new #GNode before the given sibling.
32187  *
32188  * Returns: the new #GNode
32189  */
32190
32191
32192 /**
32193  * g_node_next_sibling:
32194  * @node: a #GNode
32195  *
32196  * Gets the next sibling of a #GNode.
32197  *
32198  * or %NULL
32199  *
32200  * Returns: the next sibling of @node, or %NULL if @node is the last node
32201  */
32202
32203
32204 /**
32205  * g_node_prepend_data:
32206  * @parent: the #GNode to place the new #GNode under
32207  * @data: the data for the new #GNode
32208  *
32209  * Inserts a new #GNode as the first child of the given parent.
32210  *
32211  * Returns: the new #GNode
32212  */
32213
32214
32215 /**
32216  * g_node_prev_sibling:
32217  * @node: a #GNode
32218  *
32219  * Gets the previous sibling of a #GNode.
32220  *
32221  * node or %NULL
32222  *
32223  * Returns: the previous sibling of @node, or %NULL if @node is the first
32224  */
32225
32226
32227 /**
32228  * g_null_settings_backend_new:
32229  *
32230  * Creates a readonly #GSettingsBackend.
32231  *
32232  * This backend does not allow changes to settings, so all settings
32233  * will always have their default values.
32234  *
32235  * Returns: (transfer full): a newly created #GSettingsBackend
32236  * Since: 2.28
32237  */
32238
32239
32240 /**
32241  * g_output_stream_clear_pending:
32242  * @stream: output stream
32243  *
32244  * Clears the pending flag on @stream.
32245  */
32246
32247
32248 /**
32249  * g_output_stream_close:
32250  * @stream: A #GOutputStream.
32251  * @cancellable: (allow-none): optional cancellable object
32252  * @error: location to store the error occurring, or %NULL to ignore
32253  *
32254  * Closes the stream, releasing resources related to it.
32255  *
32256  * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
32257  * Closing a stream multiple times will not return an error.
32258  *
32259  * Closing a stream will automatically flush any outstanding buffers in the
32260  * stream.
32261  *
32262  * Streams will be automatically closed when the last reference
32263  * is dropped, but you might want to call this function to make sure
32264  * resources are released as early as possible.
32265  *
32266  * Some streams might keep the backing store of the stream (e.g. a file descriptor)
32267  * open after the stream is closed. See the documentation for the individual
32268  * stream for details.
32269  *
32270  * On failure the first error that happened will be reported, but the close
32271  * operation will finish as much as possible. A stream that failed to
32272  * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
32273  * is important to check and report the error to the user, otherwise
32274  * there might be a loss of data as all data might not be written.
32275  *
32276  * If @cancellable is not NULL, then the operation can be cancelled by
32277  * triggering the cancellable object from another thread. If the operation
32278  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
32279  * Cancelling a close will still leave the stream closed, but there some streams
32280  * can use a faster close that doesn't block to e.g. check errors. On
32281  * cancellation (as with any error) there is no guarantee that all written
32282  * data will reach the target.
32283  *
32284  * Returns: %TRUE on success, %FALSE on failure
32285  */
32286
32287
32288 /**
32289  * g_output_stream_close_async:
32290  * @stream: A #GOutputStream.
32291  * @io_priority: the io priority of the request.
32292  * @cancellable: (allow-none): optional cancellable object
32293  * @callback: (scope async): callback to call when the request is satisfied
32294  * @user_data: (closure): the data to pass to callback function
32295  *
32296  * Requests an asynchronous close of the stream, releasing resources
32297  * related to it. When the operation is finished @callback will be
32298  * called. You can then call g_output_stream_close_finish() to get
32299  * the result of the operation.
32300  *
32301  * For behaviour details see g_output_stream_close().
32302  *
32303  * The asyncronous methods have a default fallback that uses threads
32304  * to implement asynchronicity, so they are optional for inheriting
32305  * classes. However, if you override one you must override all.
32306  */
32307
32308
32309 /**
32310  * g_output_stream_close_finish:
32311  * @stream: a #GOutputStream.
32312  * @result: a #GAsyncResult.
32313  * @error: a #GError location to store the error occurring, or %NULL to ignore.
32314  *
32315  * Closes an output stream.
32316  *
32317  * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
32318  */
32319
32320
32321 /**
32322  * g_output_stream_flush:
32323  * @stream: a #GOutputStream.
32324  * @cancellable: (allow-none): optional cancellable object
32325  * @error: location to store the error occurring, or %NULL to ignore
32326  *
32327  * Forces a write of all user-space buffered data for the given
32328  * @stream. Will block during the operation. Closing the stream will
32329  * implicitly cause a flush.
32330  *
32331  * This function is optional for inherited classes.
32332  *
32333  * If @cancellable is not %NULL, then the operation can be cancelled by
32334  * triggering the cancellable object from another thread. If the operation
32335  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
32336  *
32337  * Returns: %TRUE on success, %FALSE on error
32338  */
32339
32340
32341 /**
32342  * g_output_stream_flush_async:
32343  * @stream: a #GOutputStream.
32344  * @io_priority: the io priority of the request.
32345  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32346  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
32347  * @user_data: (closure): the data to pass to callback function
32348  *
32349  * Forces an asynchronous write of all user-space buffered data for
32350  * the given @stream.
32351  * For behaviour details see g_output_stream_flush().
32352  *
32353  * When the operation is finished @callback will be
32354  * called. You can then call g_output_stream_flush_finish() to get the
32355  * result of the operation.
32356  */
32357
32358
32359 /**
32360  * g_output_stream_flush_finish:
32361  * @stream: a #GOutputStream.
32362  * @result: a GAsyncResult.
32363  * @error: a #GError location to store the error occurring, or %NULL to ignore.
32364  *
32365  * Finishes flushing an output stream.
32366  *
32367  * Returns: %TRUE if flush operation succeeded, %FALSE otherwise.
32368  */
32369
32370
32371 /**
32372  * g_output_stream_has_pending:
32373  * @stream: a #GOutputStream.
32374  *
32375  * Checks if an ouput stream has pending actions.
32376  *
32377  * Returns: %TRUE if @stream has pending actions.
32378  */
32379
32380
32381 /**
32382  * g_output_stream_is_closed:
32383  * @stream: a #GOutputStream.
32384  *
32385  * Checks if an output stream has already been closed.
32386  *
32387  * Returns: %TRUE if @stream is closed. %FALSE otherwise.
32388  */
32389
32390
32391 /**
32392  * g_output_stream_is_closing:
32393  * @stream: a #GOutputStream.
32394  *
32395  * Checks if an output stream is being closed. This can be
32396  * used inside e.g. a flush implementation to see if the
32397  * flush (or other i/o operation) is called from within
32398  * the closing operation.
32399  *
32400  * Returns: %TRUE if @stream is being closed. %FALSE otherwise.
32401  * Since: 2.24
32402  */
32403
32404
32405 /**
32406  * g_output_stream_set_pending:
32407  * @stream: a #GOutputStream.
32408  * @error: a #GError location to store the error occurring, or %NULL to ignore.
32409  *
32410  * Sets @stream to have actions pending. If the pending flag is
32411  * already set or @stream is closed, it will return %FALSE and set
32412  * @error.
32413  *
32414  * Returns: %TRUE if pending was previously unset and is now set.
32415  */
32416
32417
32418 /**
32419  * g_output_stream_splice:
32420  * @stream: a #GOutputStream.
32421  * @source: a #GInputStream.
32422  * @flags: a set of #GOutputStreamSpliceFlags.
32423  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32424  * @error: a #GError location to store the error occurring, or %NULL to ignore.
32425  *
32426  * Splices an input stream into an output stream.
32427  *
32428  * -1 if an error occurred. Note that if the number of bytes
32429  * spliced is greater than %G_MAXSSIZE, then that will be
32430  * returned, and there is no way to determine the actual number
32431  * of bytes spliced.
32432  *
32433  * Returns: a #gssize containing the size of the data spliced, or
32434  */
32435
32436
32437 /**
32438  * g_output_stream_splice_async:
32439  * @stream: a #GOutputStream.
32440  * @source: a #GInputStream.
32441  * @flags: a set of #GOutputStreamSpliceFlags.
32442  * @io_priority: the io priority of the request.
32443  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32444  * @callback: (scope async): a #GAsyncReadyCallback.
32445  * @user_data: (closure): user data passed to @callback.
32446  *
32447  * Splices a stream asynchronously.
32448  * When the operation is finished @callback will be called.
32449  * You can then call g_output_stream_splice_finish() to get the
32450  * result of the operation.
32451  *
32452  * For the synchronous, blocking version of this function, see
32453  * g_output_stream_splice().
32454  */
32455
32456
32457 /**
32458  * g_output_stream_splice_finish:
32459  * @stream: a #GOutputStream.
32460  * @result: a #GAsyncResult.
32461  * @error: a #GError location to store the error occurring, or %NULL to ignore.
32462  *
32463  * Finishes an asynchronous stream splice operation.
32464  *
32465  * number of bytes spliced is greater than %G_MAXSSIZE, then that
32466  * will be returned, and there is no way to determine the actual
32467  * number of bytes spliced.
32468  *
32469  * Returns: a #gssize of the number of bytes spliced. Note that if the
32470  */
32471
32472
32473 /**
32474  * g_output_stream_write:
32475  * @stream: a #GOutputStream.
32476  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
32477  * @count: the number of bytes to write
32478  * @cancellable: (allow-none): optional cancellable object
32479  * @error: location to store the error occurring, or %NULL to ignore
32480  *
32481  * Tries to write @count bytes from @buffer into the stream. Will block
32482  * during the operation.
32483  *
32484  * If count is 0, returns 0 and does nothing. A value of @count
32485  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
32486  *
32487  * On success, the number of bytes written to the stream is returned.
32488  * It is not an error if this is not the same as the requested size, as it
32489  * can happen e.g. on a partial I/O error, or if there is not enough
32490  * storage in the stream. All writes block until at least one byte
32491  * is written or an error occurs; 0 is never returned (unless
32492  * @count is 0).
32493  *
32494  * If @cancellable is not NULL, then the operation can be cancelled by
32495  * triggering the cancellable object from another thread. If the operation
32496  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
32497  * operation was partially finished when the operation was cancelled the
32498  * partial result will be returned, without an error.
32499  *
32500  * On error -1 is returned and @error is set accordingly.
32501  *
32502  * Virtual: write_fn
32503  * Returns: Number of bytes written, or -1 on error
32504  */
32505
32506
32507 /**
32508  * g_output_stream_write_all:
32509  * @stream: a #GOutputStream.
32510  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
32511  * @count: the number of bytes to write
32512  * @bytes_written: (out): location to store the number of bytes that was written to the stream
32513  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32514  * @error: location to store the error occurring, or %NULL to ignore
32515  *
32516  * Tries to write @count bytes from @buffer into the stream. Will block
32517  * during the operation.
32518  *
32519  * This function is similar to g_output_stream_write(), except it tries to
32520  * write as many bytes as requested, only stopping on an error.
32521  *
32522  * On a successful write of @count bytes, %TRUE is returned, and @bytes_written
32523  * is set to @count.
32524  *
32525  * If there is an error during the operation FALSE is returned and @error
32526  * is set to indicate the error status, @bytes_written is updated to contain
32527  * the number of bytes written into the stream before the error occurred.
32528  *
32529  * Returns: %TRUE on success, %FALSE if there was an error
32530  */
32531
32532
32533 /**
32534  * g_output_stream_write_async:
32535  * @stream: A #GOutputStream.
32536  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
32537  * @count: the number of bytes to write
32538  * @io_priority: the io priority of the request.
32539  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32540  * @callback: (scope async): callback to call when the request is satisfied
32541  * @user_data: (closure): the data to pass to callback function
32542  *
32543  * Request an asynchronous write of @count bytes from @buffer into
32544  * the stream. When the operation is finished @callback will be called.
32545  * You can then call g_output_stream_write_finish() to get the result of the
32546  * operation.
32547  *
32548  * During an async request no other sync and async calls are allowed,
32549  * and will result in %G_IO_ERROR_PENDING errors.
32550  *
32551  * A value of @count larger than %G_MAXSSIZE will cause a
32552  * %G_IO_ERROR_INVALID_ARGUMENT error.
32553  *
32554  * On success, the number of bytes written will be passed to the
32555  * @callback. It is not an error if this is not the same as the
32556  * requested size, as it can happen e.g. on a partial I/O error,
32557  * but generally we try to write as many bytes as requested.
32558  *
32559  * You are guaranteed that this method will never fail with
32560  * %G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the
32561  * method will just wait until this changes.
32562  *
32563  * Any outstanding I/O request with higher priority (lower numerical
32564  * value) will be executed before an outstanding request with lower
32565  * priority. Default priority is %G_PRIORITY_DEFAULT.
32566  *
32567  * The asyncronous methods have a default fallback that uses threads
32568  * to implement asynchronicity, so they are optional for inheriting
32569  * classes. However, if you override one you must override all.
32570  *
32571  * For the synchronous, blocking version of this function, see
32572  * g_output_stream_write().
32573  */
32574
32575
32576 /**
32577  * g_output_stream_write_finish:
32578  * @stream: a #GOutputStream.
32579  * @result: a #GAsyncResult.
32580  * @error: a #GError location to store the error occurring, or %NULL to ignore.
32581  *
32582  * Finishes a stream write operation.
32583  *
32584  * Returns: a #gssize containing the number of bytes written to the stream.
32585  */
32586
32587
32588 /**
32589  * g_permission_acquire:
32590  * @permission: a #GPermission instance
32591  * @cancellable: a #GCancellable, or %NULL
32592  * @error: a pointer to a %NULL #GError, or %NULL
32593  *
32594  * Attempts to acquire the permission represented by @permission.
32595  *
32596  * The precise method by which this happens depends on the permission
32597  * and the underlying authentication mechanism.  A simple example is
32598  * that a dialog may appear asking the user to enter their password.
32599  *
32600  * You should check with g_permission_get_can_acquire() before calling
32601  * this function.
32602  *
32603  * If the permission is acquired then %TRUE is returned.  Otherwise,
32604  * %FALSE is returned and @error is set appropriately.
32605  *
32606  * This call is blocking, likely for a very long time (in the case that
32607  * user interaction is required).  See g_permission_acquire_async() for
32608  * the non-blocking version.
32609  *
32610  * Returns: %TRUE if the permission was successfully acquired
32611  * Since: 2.26
32612  */
32613
32614
32615 /**
32616  * g_permission_acquire_async:
32617  * @permission: a #GPermission instance
32618  * @cancellable: a #GCancellable, or %NULL
32619  * @callback: the #GAsyncReadyCallback to call when done
32620  * @user_data: the user data to pass to @callback
32621  *
32622  * Attempts to acquire the permission represented by @permission.
32623  *
32624  * This is the first half of the asynchronous version of
32625  * g_permission_acquire().
32626  *
32627  * Since: 2.26
32628  */
32629
32630
32631 /**
32632  * g_permission_acquire_finish:
32633  * @permission: a #GPermission instance
32634  * @result: the #GAsyncResult given to the #GAsyncReadyCallback
32635  * @error: a pointer to a %NULL #GError, or %NULL
32636  *
32637  * Collects the result of attempting to acquire the permission
32638  * represented by @permission.
32639  *
32640  * This is the second half of the asynchronous version of
32641  * g_permission_acquire().
32642  *
32643  * Returns: %TRUE if the permission was successfully acquired
32644  * Since: 2.26
32645  */
32646
32647
32648 /**
32649  * g_permission_get_allowed:
32650  * @permission: a #GPermission instance
32651  *
32652  * Gets the value of the 'allowed' property.  This property is %TRUE if
32653  * the caller currently has permission to perform the action that
32654  * @permission represents the permission to perform.
32655  *
32656  * Returns: the value of the 'allowed' property
32657  * Since: 2.26
32658  */
32659
32660
32661 /**
32662  * g_permission_get_can_acquire:
32663  * @permission: a #GPermission instance
32664  *
32665  * Gets the value of the 'can-acquire' property.  This property is %TRUE
32666  * if it is generally possible to acquire the permission by calling
32667  * g_permission_acquire().
32668  *
32669  * Returns: the value of the 'can-acquire' property
32670  * Since: 2.26
32671  */
32672
32673
32674 /**
32675  * g_permission_get_can_release:
32676  * @permission: a #GPermission instance
32677  *
32678  * Gets the value of the 'can-release' property.  This property is %TRUE
32679  * if it is generally possible to release the permission by calling
32680  * g_permission_release().
32681  *
32682  * Returns: the value of the 'can-release' property
32683  * Since: 2.26
32684  */
32685
32686
32687 /**
32688  * g_permission_impl_update:
32689  * @permission: a #GPermission instance
32690  * @allowed: the new value for the 'allowed' property
32691  * @can_acquire: the new value for the 'can-acquire' property
32692  * @can_release: the new value for the 'can-release' property
32693  *
32694  * This function is called by the #GPermission implementation to update
32695  * the properties of the permission.  You should never call this
32696  * function except from a #GPermission implementation.
32697  *
32698  * GObject notify signals are generated, as appropriate.
32699  *
32700  * Since: 2.26
32701  */
32702
32703
32704 /**
32705  * g_permission_release:
32706  * @permission: a #GPermission instance
32707  * @cancellable: a #GCancellable, or %NULL
32708  * @error: a pointer to a %NULL #GError, or %NULL
32709  *
32710  * Attempts to release the permission represented by @permission.
32711  *
32712  * The precise method by which this happens depends on the permission
32713  * and the underlying authentication mechanism.  In most cases the
32714  * permission will be dropped immediately without further action.
32715  *
32716  * You should check with g_permission_get_can_release() before calling
32717  * this function.
32718  *
32719  * If the permission is released then %TRUE is returned.  Otherwise,
32720  * %FALSE is returned and @error is set appropriately.
32721  *
32722  * This call is blocking, likely for a very long time (in the case that
32723  * user interaction is required).  See g_permission_release_async() for
32724  * the non-blocking version.
32725  *
32726  * Returns: %TRUE if the permission was successfully released
32727  * Since: 2.26
32728  */
32729
32730
32731 /**
32732  * g_permission_release_async:
32733  * @permission: a #GPermission instance
32734  * @cancellable: a #GCancellable, or %NULL
32735  * @callback: the #GAsyncReadyCallback to call when done
32736  * @user_data: the user data to pass to @callback
32737  *
32738  * Attempts to release the permission represented by @permission.
32739  *
32740  * This is the first half of the asynchronous version of
32741  * g_permission_release().
32742  *
32743  * Since: 2.26
32744  */
32745
32746
32747 /**
32748  * g_permission_release_finish:
32749  * @permission: a #GPermission instance
32750  * @result: the #GAsyncResult given to the #GAsyncReadyCallback
32751  * @error: a pointer to a %NULL #GError, or %NULL
32752  *
32753  * Collects the result of attempting to release the permission
32754  * represented by @permission.
32755  *
32756  * This is the second half of the asynchronous version of
32757  * g_permission_release().
32758  *
32759  * Returns: %TRUE if the permission was successfully released
32760  * Since: 2.26
32761  */
32762
32763
32764 /**
32765  * g_poll_file_monitor_new:
32766  * @file: a #GFile.
32767  *
32768  * Polls @file for changes.
32769  *
32770  * Returns: a new #GFileMonitor for the given #GFile.
32771  */
32772
32773
32774 /**
32775  * g_pollable_input_stream_can_poll:
32776  * @stream: a #GPollableInputStream.
32777  *
32778  * Checks if @stream is actually pollable. Some classes may implement
32779  * #GPollableInputStream but have only certain instances of that class
32780  * be pollable. If this method returns %FALSE, then the behavior of
32781  * other #GPollableInputStream methods is undefined.
32782  *
32783  * For any given stream, the value returned by this method is constant;
32784  * a stream cannot switch from pollable to non-pollable or vice versa.
32785  *
32786  * Returns: %TRUE if @stream is pollable, %FALSE if not.
32787  * Since: 2.28
32788  */
32789
32790
32791 /**
32792  * g_pollable_input_stream_create_source:
32793  * @stream: a #GPollableInputStream.
32794  * @cancellable: (allow-none): a #GCancellable, or %NULL
32795  *
32796  * Creates a #GSource that triggers when @stream can be read, or
32797  * @cancellable is triggered or an error occurs. The callback on the
32798  * source is of the #GPollableSourceFunc type.
32799  *
32800  * As with g_pollable_input_stream_is_readable(), it is possible that
32801  * the stream may not actually be readable even after the source
32802  * triggers, so you should use g_pollable_input_stream_read_nonblocking()
32803  * rather than g_input_stream_read() from the callback.
32804  *
32805  * Returns: (transfer full): a new #GSource
32806  * Since: 2.28
32807  */
32808
32809
32810 /**
32811  * g_pollable_input_stream_is_readable:
32812  * @stream: a #GPollableInputStream.
32813  *
32814  * Checks if @stream can be read.
32815  *
32816  * Note that some stream types may not be able to implement this 100%
32817  * reliably, and it is possible that a call to g_input_stream_read()
32818  * after this returns %TRUE would still block. To guarantee
32819  * non-blocking behavior, you should always use
32820  * g_pollable_input_stream_read_nonblocking(), which will return a
32821  * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
32822  *
32823  * has occurred on @stream, this will result in
32824  * g_pollable_input_stream_is_readable() returning %TRUE, and the
32825  * next attempt to read will return the error.
32826  *
32827  * Returns: %TRUE if @stream is readable, %FALSE if not. If an error
32828  * Since: 2.28
32829  */
32830
32831
32832 /**
32833  * g_pollable_input_stream_read_nonblocking:
32834  * @stream: a #GPollableInputStream
32835  * @buffer: a buffer to read data into (which should be at least @size bytes long).
32836  * @size: the number of bytes you want to read
32837  * @cancellable: (allow-none): a #GCancellable, or %NULL
32838  * @error: #GError for error reporting, or %NULL to ignore.
32839  *
32840  * Attempts to read up to @size bytes from @stream into @buffer, as
32841  * with g_input_stream_read(). If @stream is not currently readable,
32842  * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
32843  * use g_pollable_input_stream_create_source() to create a #GSource
32844  * that will be triggered when @stream is readable.
32845  *
32846  * Note that since this method never blocks, you cannot actually
32847  * use @cancellable to cancel it. However, it will return an error
32848  * if @cancellable has already been cancelled when you call, which
32849  * may happen if you call this method after a source triggers due
32850  * to having been cancelled.
32851  *
32852  * %G_IO_ERROR_WOULD_BLOCK).
32853  *
32854  * Virtual: read_nonblocking
32855  * Returns: the number of bytes read, or -1 on error (including
32856  */
32857
32858
32859 /**
32860  * g_pollable_output_stream_can_poll:
32861  * @stream: a #GPollableOutputStream.
32862  *
32863  * Checks if @stream is actually pollable. Some classes may implement
32864  * #GPollableOutputStream but have only certain instances of that
32865  * class be pollable. If this method returns %FALSE, then the behavior
32866  * of other #GPollableOutputStream methods is undefined.
32867  *
32868  * For any given stream, the value returned by this method is constant;
32869  * a stream cannot switch from pollable to non-pollable or vice versa.
32870  *
32871  * Returns: %TRUE if @stream is pollable, %FALSE if not.
32872  * Since: 2.28
32873  */
32874
32875
32876 /**
32877  * g_pollable_output_stream_create_source:
32878  * @stream: a #GPollableOutputStream.
32879  * @cancellable: (allow-none): a #GCancellable, or %NULL
32880  *
32881  * Creates a #GSource that triggers when @stream can be written, or
32882  * @cancellable is triggered or an error occurs. The callback on the
32883  * source is of the #GPollableSourceFunc type.
32884  *
32885  * As with g_pollable_output_stream_is_writable(), it is possible that
32886  * the stream may not actually be writable even after the source
32887  * triggers, so you should use g_pollable_output_stream_write_nonblocking()
32888  * rather than g_output_stream_write() from the callback.
32889  *
32890  * Returns: (transfer full): a new #GSource
32891  * Since: 2.28
32892  */
32893
32894
32895 /**
32896  * g_pollable_output_stream_is_writable:
32897  * @stream: a #GPollableOutputStream.
32898  *
32899  * Checks if @stream can be written.
32900  *
32901  * Note that some stream types may not be able to implement this 100%
32902  * reliably, and it is possible that a call to g_output_stream_write()
32903  * after this returns %TRUE would still block. To guarantee
32904  * non-blocking behavior, you should always use
32905  * g_pollable_output_stream_write_nonblocking(), which will return a
32906  * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
32907  *
32908  * has occurred on @stream, this will result in
32909  * g_pollable_output_stream_is_writable() returning %TRUE, and the
32910  * next attempt to write will return the error.
32911  *
32912  * Returns: %TRUE if @stream is writable, %FALSE if not. If an error
32913  * Since: 2.28
32914  */
32915
32916
32917 /**
32918  * g_pollable_output_stream_write_nonblocking:
32919  * @stream: a #GPollableOutputStream
32920  * @buffer: (array length=size) (element-type guint8): a buffer to write data from
32921  * @size: the number of bytes you want to write
32922  * @cancellable: (allow-none): a #GCancellable, or %NULL
32923  * @error: #GError for error reporting, or %NULL to ignore.
32924  *
32925  * Attempts to write up to @size bytes from @buffer to @stream, as
32926  * with g_output_stream_write(). If @stream is not currently writable,
32927  * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
32928  * use g_pollable_output_stream_create_source() to create a #GSource
32929  * that will be triggered when @stream is writable.
32930  *
32931  * Note that since this method never blocks, you cannot actually
32932  * use @cancellable to cancel it. However, it will return an error
32933  * if @cancellable has already been cancelled when you call, which
32934  * may happen if you call this method after a source triggers due
32935  * to having been cancelled.
32936  *
32937  * %G_IO_ERROR_WOULD_BLOCK).
32938  *
32939  * Virtual: write_nonblocking
32940  * Returns: the number of bytes written, or -1 on error (including
32941  */
32942
32943
32944 /**
32945  * g_pollable_source_new:
32946  * @pollable_stream: the stream associated with the new source
32947  *
32948  * Utility method for #GPollableInputStream and #GPollableOutputStream
32949  * implementations. Creates a new #GSource that expects a callback of
32950  * type #GPollableSourceFunc. The new source does not actually do
32951  * anything on its own; use g_source_add_child_source() to add other
32952  * sources to it to cause it to trigger.
32953  *
32954  * Returns: (transfer full): the new #GSource.
32955  * Since: 2.28
32956  */
32957
32958
32959 /**
32960  * g_proxy_address_get_destination_hostname:
32961  * @proxy: a #GProxyAddress
32962  *
32963  * Gets @proxy's destination hostname.
32964  *
32965  * Returns: the @proxy's destination hostname
32966  * Since: 2.26
32967  */
32968
32969
32970 /**
32971  * g_proxy_address_get_destination_port:
32972  * @proxy: a #GProxyAddress
32973  *
32974  * Gets @proxy's destination port.
32975  *
32976  * Returns: the @proxy's destination port
32977  * Since: 2.26
32978  */
32979
32980
32981 /**
32982  * g_proxy_address_get_password:
32983  * @proxy: a #GProxyAddress
32984  *
32985  * Gets @proxy's password.
32986  *
32987  * Returns: the @proxy's password
32988  * Since: 2.26
32989  */
32990
32991
32992 /**
32993  * g_proxy_address_get_protocol:
32994  * @proxy: a #GProxyAddress
32995  *
32996  * Gets @proxy's protocol.
32997  *
32998  * Returns: the @proxy's protocol
32999  * Since: 2.26
33000  */
33001
33002
33003 /**
33004  * g_proxy_address_get_username:
33005  * @proxy: a #GProxyAddress
33006  *
33007  * Gets @proxy's username.
33008  *
33009  * Returns: the @proxy's username
33010  * Since: 2.26
33011  */
33012
33013
33014 /**
33015  * g_proxy_address_new:
33016  * @inetaddr: The proxy server #GInetAddress.
33017  * @port: The proxy server port.
33018  * @protocol: The proxy protocol to support, in lower case (e.g. socks, http).
33019  * @dest_hostname: The destination hostname the the proxy should tunnel to.
33020  * @dest_port: The destination port to tunnel to.
33021  * @username: (allow-none): The username to authenticate to the proxy server (or %NULL).
33022  * @password: (allow-none): The password to authenticate to the proxy server (or %NULL).
33023  *
33024  * Creates a new #GProxyAddress for @inetaddr with @protocol that should
33025  * tunnel through @dest_hostname and @dest_port.
33026  *
33027  * Returns: a new #GProxyAddress
33028  * Since: 2.26
33029  */
33030
33031
33032 /**
33033  * g_proxy_connect:
33034  * @proxy: a #GProxy
33035  * @connection: a #GIOStream
33036  * @proxy_address: a #GProxyAddress
33037  * @cancellable: (allow-none): a #GCancellable
33038  * @error: return #GError
33039  *
33040  * Given @connection to communicate with a proxy (eg, a
33041  * #GSocketConnection that is connected to the proxy server), this
33042  * does the necessary handshake to connect to @proxy_address, and if
33043  * required, wraps the #GIOStream to handle proxy payload.
33044  *
33045  * be the same as @connection, in which case a reference
33046  * will be added.
33047  *
33048  * Returns: (transfer full): a #GIOStream that will replace @connection. This might
33049  * Since: 2.26
33050  */
33051
33052
33053 /**
33054  * g_proxy_connect_async:
33055  * @proxy: a #GProxy
33056  * @connection: a #GIOStream
33057  * @proxy_address: a #GProxyAddress
33058  * @cancellable: (allow-none): a #GCancellable
33059  * @callback: (scope async): a #GAsyncReadyCallback
33060  * @user_data: (closure): callback data
33061  *
33062  * Asynchronous version of g_proxy_connect().
33063  *
33064  * Since: 2.26
33065  */
33066
33067
33068 /**
33069  * g_proxy_connect_finish:
33070  * @proxy: a #GProxy
33071  * @result: a #GAsyncResult
33072  * @error: return #GError
33073  *
33074  * See g_proxy_connect().
33075  *
33076  * Returns: (transfer full): a #GIOStream.
33077  * Since: 2.26
33078  */
33079
33080
33081 /**
33082  * g_proxy_get_default_for_protocol:
33083  * @protocol: the proxy protocol name (e.g. http, socks, etc)
33084  *
33085  * Lookup "gio-proxy" extension point for a proxy implementation that supports
33086  * specified protocol.
33087  *
33088  * is not supported.
33089  *
33090  * Returns: (transfer full): return a #GProxy or NULL if protocol
33091  * Since: 2.26
33092  */
33093
33094
33095 /**
33096  * g_proxy_resolver_get_default:
33097  *
33098  * Gets the default #GProxyResolver for the system.
33099  *
33100  * Returns: (transfer none): the default #GProxyResolver.
33101  * Since: 2.26
33102  */
33103
33104
33105 /**
33106  * g_proxy_resolver_is_supported:
33107  * @resolver: a #GProxyResolver
33108  *
33109  * Checks if @resolver can be used on this system. (This is used
33110  * internally; g_proxy_resolver_get_default() will only return a proxy
33111  * resolver that returns %TRUE for this method.)
33112  *
33113  * Returns: %TRUE if @resolver is supported.
33114  * Since: 2.26
33115  */
33116
33117
33118 /**
33119  * g_proxy_resolver_lookup:
33120  * @resolver: a #GProxyResolver
33121  * @uri: a URI representing the destination to connect to
33122  * @cancellable: (allow-none): a #GCancellable, or %NULL
33123  * @error: return location for a #GError, or %NULL
33124  *
33125  * Looks into the system proxy configuration to determine what proxy,
33126  * if any, to use to connect to @uri. The returned proxy URIs are of the
33127  * form <literal>&lt;protocol&gt;://[user[:password]@]host:port</literal>
33128  * or <literal>direct://</literal>, where &lt;protocol&gt; could be
33129  * http, rtsp, socks or other proxying protocol.
33130  *
33131  * If you don't know what network protocol is being used on the
33132  * socket, you should use <literal>none</literal> as the URI protocol.
33133  * In this case, the resolver might still return a generic proxy type
33134  * (such as SOCKS), but would not return protocol-specific proxy types
33135  * (such as http).
33136  *
33137  * <literal>direct://</literal> is used when no proxy is needed.
33138  * Direct connection should not be attempted unless it is part of the
33139  * returned array of proxies.
33140  *
33141  * NULL-terminated array of proxy URIs. Must be freed
33142  * with g_strfreev().
33143  *
33144  * Returns: (transfer full) (array zero-terminated=1): A
33145  * Since: 2.26
33146  */
33147
33148
33149 /**
33150  * g_proxy_resolver_lookup_async:
33151  * @resolver: a #GProxyResolver
33152  * @uri: a URI representing the destination to connect to
33153  * @cancellable: (allow-none): a #GCancellable, or %NULL
33154  * @callback: (scope async): callback to call after resolution completes
33155  * @user_data: (closure): data for @callback
33156  *
33157  * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
33158  * details.
33159  *
33160  * Since: 2.26
33161  */
33162
33163
33164 /**
33165  * g_proxy_resolver_lookup_finish:
33166  * @resolver: a #GProxyResolver
33167  * @result: the result passed to your #GAsyncReadyCallback
33168  * @error: return location for a #GError, or %NULL
33169  *
33170  * Call this function to obtain the array of proxy URIs when
33171  * g_proxy_resolver_lookup_async() is complete. See
33172  * g_proxy_resolver_lookup() for more details.
33173  *
33174  * NULL-terminated array of proxy URIs. Must be freed
33175  * with g_strfreev().
33176  *
33177  * Returns: (transfer full) (array zero-terminated=1): A
33178  * Since: 2.26
33179  */
33180
33181
33182 /**
33183  * g_proxy_supports_hostname:
33184  * @proxy: a #GProxy
33185  *
33186  * Some proxy protocols expect to be passed a hostname, which they
33187  * will resolve to an IP address themselves. Others, like SOCKS4, do
33188  * not allow this. This function will return %FALSE if @proxy is
33189  * implementing such a protocol. When %FALSE is returned, the caller
33190  * should resolve the destination hostname first, and then pass a
33191  * #GProxyAddress containing the stringified IP address to
33192  * g_proxy_connect() or g_proxy_connect_async().
33193  *
33194  * Returns: %TRUE if hostname resolution is supported.
33195  * Since: 2.26
33196  */
33197
33198
33199 /**
33200  * g_remote_action_group_activate_action_full:
33201  * @remote: a #GDBusActionGroup
33202  * @action_name: the name of the action to activate
33203  * @parameter: (allow none): the optional parameter to the activation
33204  * @platform_data: the platform data to send
33205  *
33206  * Activates the remote action.
33207  *
33208  * This is the same as g_action_group_activate_action() except that it
33209  * allows for provision of "platform data" to be sent along with the
33210  * activation request.  This typically contains details such as the user
33211  * interaction timestamp or startup notification information.
33212  *
33213  * @platform_data must be non-%NULL and must have the type
33214  * %G_VARIANT_TYPE_VARDICT.  If it is floating, it will be consumed.
33215  *
33216  * Since: 2.32
33217  */
33218
33219
33220 /**
33221  * g_remote_action_group_change_action_state_full:
33222  * @remote: a #GRemoteActionGroup
33223  * @action_name: the name of the action to change the state of
33224  * @value: the new requested value for the state
33225  * @platform_data: the platform data to send
33226  *
33227  * Changes the state of a remote action.
33228  *
33229  * This is the same as g_action_group_change_action_state() except that
33230  * it allows for provision of "platform data" to be sent along with the
33231  * state change request.  This typically contains details such as the
33232  * user interaction timestamp or startup notification information.
33233  *
33234  * @platform_data must be non-%NULL and must have the type
33235  * %G_VARIANT_TYPE_VARDICT.  If it is floating, it will be consumed.
33236  *
33237  * Since: 2.32
33238  */
33239
33240
33241 /**
33242  * g_renew:
33243  * @struct_type: the type of the elements to allocate
33244  * @mem: the currently allocated memory
33245  * @n_structs: the number of elements to allocate
33246  *
33247  * Reallocates the memory pointed to by @mem, so that it now has space for
33248  * @n_structs elements of type @struct_type. It returns the new address of
33249  * the memory, which may have been moved.
33250  * Care is taken to avoid overflow when calculating the size of the allocated block.
33251  *
33252  * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
33253  */
33254
33255
33256 /**
33257  * g_resolver_error_quark:
33258  *
33259  * Gets the #GResolver Error Quark.
33260  *
33261  * Returns: a #GQuark.
33262  * Since: 2.22
33263  */
33264
33265
33266 /**
33267  * g_resolver_free_addresses: (skip)
33268  * @addresses: a #GList of #GInetAddress
33269  *
33270  * Frees @addresses (which should be the return value from
33271  * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()).
33272  * (This is a convenience method; you can also simply free the results
33273  * by hand.)
33274  *
33275  * Since: 2.22
33276  */
33277
33278
33279 /**
33280  * g_resolver_free_targets: (skip)
33281  * @targets: a #GList of #GSrvTarget
33282  *
33283  * Frees @targets (which should be the return value from
33284  * g_resolver_lookup_service() or g_resolver_lookup_service_finish()).
33285  * (This is a convenience method; you can also simply free the
33286  * results by hand.)
33287  *
33288  * Since: 2.22
33289  */
33290
33291
33292 /**
33293  * g_resolver_get_default:
33294  *
33295  * Gets the default #GResolver. You should unref it when you are done
33296  * with it. #GResolver may use its reference count as a hint about how
33297  * many threads it should allocate for concurrent DNS resolutions.
33298  *
33299  * Returns: (transfer full): the default #GResolver.
33300  * Since: 2.22
33301  */
33302
33303
33304 /**
33305  * g_resolver_lookup_by_address:
33306  * @resolver: a #GResolver
33307  * @address: the address to reverse-resolve
33308  * @cancellable: (allow-none): a #GCancellable, or %NULL
33309  * @error: return location for a #GError, or %NULL
33310  *
33311  * Synchronously reverse-resolves @address to determine its
33312  * associated hostname.
33313  *
33314  * If the DNS resolution fails, @error (if non-%NULL) will be set to
33315  * a value from #GResolverError.
33316  *
33317  * If @cancellable is non-%NULL, it can be used to cancel the
33318  * operation, in which case @error (if non-%NULL) will be set to
33319  * %G_IO_ERROR_CANCELLED.
33320  *
33321  * form), or %NULL on error.
33322  *
33323  * Returns: a hostname (either ASCII-only, or in ASCII-encoded
33324  * Since: 2.22
33325  */
33326
33327
33328 /**
33329  * g_resolver_lookup_by_address_async:
33330  * @resolver: a #GResolver
33331  * @address: the address to reverse-resolve
33332  * @cancellable: (allow-none): a #GCancellable, or %NULL
33333  * @callback: (scope async): callback to call after resolution completes
33334  * @user_data: (closure): data for @callback
33335  *
33336  * Begins asynchronously reverse-resolving @address to determine its
33337  * associated hostname, and eventually calls @callback, which must
33338  * call g_resolver_lookup_by_address_finish() to get the final result.
33339  *
33340  * Since: 2.22
33341  */
33342
33343
33344 /**
33345  * g_resolver_lookup_by_address_finish:
33346  * @resolver: a #GResolver
33347  * @result: the result passed to your #GAsyncReadyCallback
33348  * @error: return location for a #GError, or %NULL
33349  *
33350  * Retrieves the result of a previous call to
33351  * g_resolver_lookup_by_address_async().
33352  *
33353  * If the DNS resolution failed, @error (if non-%NULL) will be set to
33354  * a value from #GResolverError. If the operation was cancelled,
33355  * @error will be set to %G_IO_ERROR_CANCELLED.
33356  *
33357  * form), or %NULL on error.
33358  *
33359  * Returns: a hostname (either ASCII-only, or in ASCII-encoded
33360  * Since: 2.22
33361  */
33362
33363
33364 /**
33365  * g_resolver_lookup_by_name:
33366  * @resolver: a #GResolver
33367  * @hostname: the hostname to look up
33368  * @cancellable: (allow-none): a #GCancellable, or %NULL
33369  * @error: return location for a #GError, or %NULL
33370  *
33371  * Synchronously resolves @hostname to determine its associated IP
33372  * address(es). @hostname may be an ASCII-only or UTF-8 hostname, or
33373  * the textual form of an IP address (in which case this just becomes
33374  * a wrapper around g_inet_address_new_from_string()).
33375  *
33376  * On success, g_resolver_lookup_by_name() will return a #GList of
33377  * #GInetAddress, sorted in order of preference and guaranteed to not
33378  * contain duplicates. That is, if using the result to connect to
33379  * @hostname, you should attempt to connect to the first address
33380  * first, then the second if the first fails, etc. If you are using
33381  * the result to listen on a socket, it is appropriate to add each
33382  * result using e.g. g_socket_listener_add_address().
33383  *
33384  * If the DNS resolution fails, @error (if non-%NULL) will be set to a
33385  * value from #GResolverError.
33386  *
33387  * If @cancellable is non-%NULL, it can be used to cancel the
33388  * operation, in which case @error (if non-%NULL) will be set to
33389  * %G_IO_ERROR_CANCELLED.
33390  *
33391  * If you are planning to connect to a socket on the resolved IP
33392  * address, it may be easier to create a #GNetworkAddress and use its
33393  * #GSocketConnectable interface.
33394  *
33395  * of #GInetAddress, or %NULL on error. You
33396  * must unref each of the addresses and free the list when you are
33397  * done with it. (You can use g_resolver_free_addresses() to do this.)
33398  *
33399  * Returns: (element-type GInetAddress) (transfer full): a #GList
33400  * Since: 2.22
33401  */
33402
33403
33404 /**
33405  * g_resolver_lookup_by_name_async:
33406  * @resolver: a #GResolver
33407  * @hostname: the hostname to look up the address of
33408  * @cancellable: (allow-none): a #GCancellable, or %NULL
33409  * @callback: (scope async): callback to call after resolution completes
33410  * @user_data: (closure): data for @callback
33411  *
33412  * Begins asynchronously resolving @hostname to determine its
33413  * associated IP address(es), and eventually calls @callback, which
33414  * must call g_resolver_lookup_by_name_finish() to get the result.
33415  * See g_resolver_lookup_by_name() for more details.
33416  *
33417  * Since: 2.22
33418  */
33419
33420
33421 /**
33422  * g_resolver_lookup_by_name_finish:
33423  * @resolver: a #GResolver
33424  * @result: the result passed to your #GAsyncReadyCallback
33425  * @error: return location for a #GError, or %NULL
33426  *
33427  * Retrieves the result of a call to
33428  * g_resolver_lookup_by_name_async().
33429  *
33430  * If the DNS resolution failed, @error (if non-%NULL) will be set to
33431  * a value from #GResolverError. If the operation was cancelled,
33432  * @error will be set to %G_IO_ERROR_CANCELLED.
33433  *
33434  * of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name()
33435  * for more details.
33436  *
33437  * Returns: (element-type GInetAddress) (transfer full): a #GList
33438  * Since: 2.22
33439  */
33440
33441
33442 /**
33443  * g_resolver_lookup_service:
33444  * @resolver: a #GResolver
33445  * @service: the service type to look up (eg, "ldap")
33446  * @protocol: the networking protocol to use for @service (eg, "tcp")
33447  * @domain: the DNS domain to look up the service in
33448  * @cancellable: (allow-none): a #GCancellable, or %NULL
33449  * @error: return location for a #GError, or %NULL
33450  *
33451  * Synchronously performs a DNS SRV lookup for the given @service and
33452  * @protocol in the given @domain and returns an array of #GSrvTarget.
33453  * @domain may be an ASCII-only or UTF-8 hostname. Note also that the
33454  * @service and @protocol arguments <emphasis>do not</emphasis>
33455  * include the leading underscore that appears in the actual DNS
33456  * entry.
33457  *
33458  * On success, g_resolver_lookup_service() will return a #GList of
33459  * #GSrvTarget, sorted in order of preference. (That is, you should
33460  * attempt to connect to the first target first, then the second if
33461  * the first fails, etc.)
33462  *
33463  * If the DNS resolution fails, @error (if non-%NULL) will be set to
33464  * a value from #GResolverError.
33465  *
33466  * If @cancellable is non-%NULL, it can be used to cancel the
33467  * operation, in which case @error (if non-%NULL) will be set to
33468  * %G_IO_ERROR_CANCELLED.
33469  *
33470  * If you are planning to connect to the service, it is usually easier
33471  * to create a #GNetworkService and use its #GSocketConnectable
33472  * interface.
33473  *
33474  * or %NULL on error. You must free each of the targets and the list when you are
33475  * done with it. (You can use g_resolver_free_targets() to do this.)
33476  *
33477  * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
33478  * Since: 2.22
33479  */
33480
33481
33482 /**
33483  * g_resolver_lookup_service_async:
33484  * @resolver: a #GResolver
33485  * @service: the service type to look up (eg, "ldap")
33486  * @protocol: the networking protocol to use for @service (eg, "tcp")
33487  * @domain: the DNS domain to look up the service in
33488  * @cancellable: (allow-none): a #GCancellable, or %NULL
33489  * @callback: (scope async): callback to call after resolution completes
33490  * @user_data: (closure): data for @callback
33491  *
33492  * Begins asynchronously performing a DNS SRV lookup for the given
33493  * @service and @protocol in the given @domain, and eventually calls
33494  * @callback, which must call g_resolver_lookup_service_finish() to
33495  * get the final result. See g_resolver_lookup_service() for more
33496  * details.
33497  *
33498  * Since: 2.22
33499  */
33500
33501
33502 /**
33503  * g_resolver_lookup_service_finish:
33504  * @resolver: a #GResolver
33505  * @result: the result passed to your #GAsyncReadyCallback
33506  * @error: return location for a #GError, or %NULL
33507  *
33508  * Retrieves the result of a previous call to
33509  * g_resolver_lookup_service_async().
33510  *
33511  * If the DNS resolution failed, @error (if non-%NULL) will be set to
33512  * a value from #GResolverError. If the operation was cancelled,
33513  * @error will be set to %G_IO_ERROR_CANCELLED.
33514  *
33515  * or %NULL on error. See g_resolver_lookup_service() for more details.
33516  *
33517  * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
33518  * Since: 2.22
33519  */
33520
33521
33522 /**
33523  * g_resolver_set_default:
33524  * @resolver: the new default #GResolver
33525  *
33526  * Sets @resolver to be the application's default resolver (reffing
33527  * @resolver, and unreffing the previous default resolver, if any).
33528  * Future calls to g_resolver_get_default() will return this resolver.
33529  *
33530  * This can be used if an application wants to perform any sort of DNS
33531  * caching or "pinning"; it can implement its own #GResolver that
33532  * calls the original default resolver for DNS operations, and
33533  * implements its own cache policies on top of that, and then set
33534  * itself as the default resolver for all later code to use.
33535  *
33536  * Since: 2.22
33537  */
33538
33539
33540 /**
33541  * g_resource_enumerate_children:
33542  * @resource: A #GResource.
33543  * @path: A pathname inside the resource.
33544  * @lookup_flags: A #GResourceLookupFlags.
33545  * @error: return location for a #GError, or %NULL.
33546  *
33547  * Returns all the names of children at the specified @path in the resource.
33548  * The return result is a %NULL terminated list of strings which should
33549  * be released with g_strfreev().
33550  *
33551  * @lookup_flags controls the behaviour of the lookup.
33552  *
33553  * Returns: (array zero-terminated=1) (transfer full): an array of constant strings
33554  * Since: 2.32
33555  */
33556
33557
33558 /**
33559  * g_resource_error_quark:
33560  *
33561  * Gets the #GResource Error Quark.
33562  *
33563  * Returns: a #GQuark.
33564  * Since: 2.32
33565  */
33566
33567
33568 /**
33569  * g_resource_get_info:
33570  * @resource: A #GResource.
33571  * @path: A pathname inside the resource.
33572  * @lookup_flags: A #GResourceLookupFlags.
33573  * @size: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
33574  * @flags: (out) (allow-none): a location to place the flags about the file, or %NULL if the length is not needed
33575  * @error: return location for a #GError, or %NULL.
33576  *
33577  * Looks for a file at the specified @path in the resource and
33578  * if found returns information about it.
33579  *
33580  * @lookup_flags controls the behaviour of the lookup.
33581  *
33582  * Returns: %TRUE if the file was found. %FALSE if there were errors.
33583  * Since: 2.32
33584  */
33585
33586
33587 /**
33588  * g_resource_load:
33589  * @filename: (type filename): the path of a filename to load, in the GLib filename encoding.
33590  * @error: return location for a #GError, or %NULL.
33591  *
33592  * Loads a binary resource bundle and creates a #GResource representation of it, allowing
33593  * you to query it for data.
33594  *
33595  * If you want to use this resource in the global resource namespace you need
33596  * to register it with g_resources_register().
33597  *
33598  * Returns: (transfer full): a new #GResource, or %NULL on error.
33599  * Since: 2.32
33600  */
33601
33602
33603 /**
33604  * g_resource_lookup_data:
33605  * @resource: A #GResource.
33606  * @path: A pathname inside the resource.
33607  * @lookup_flags: A #GResourceLookupFlags.
33608  * @error: return location for a #GError, or %NULL.
33609  *
33610  * Looks for a file at the specified @path in the resource and
33611  * returns a #GBytes that lets you directly access the data in
33612  * memory.
33613  *
33614  * The data is always followed by a zero byte, so you
33615  * can safely use the data as a C string. However, that byte
33616  * is not included in the size of the GBytes.
33617  *
33618  * For uncompressed resource files this is a pointer directly into
33619  * the resource bundle, which is typically in some readonly data section
33620  * in the program binary. For compressed files we allocate memory on
33621  * the heap and automatically uncompress the data.
33622  *
33623  * @lookup_flags controls the behaviour of the lookup.
33624  *
33625  * Free the returned object with g_bytes_unref().
33626  *
33627  * Returns: (transfer full): #GBytes or %NULL on error.
33628  * Since: 2.32
33629  */
33630
33631
33632 /**
33633  * g_resource_new_from_data:
33634  * @data: A #GBytes.
33635  * @error: return location for a #GError, or %NULL.
33636  *
33637  * Creates a GResource from a reference to the binary resource bundle.
33638  * This will keep a reference to @data while the resource lives, so
33639  * the data should not be modified or freed.
33640  *
33641  * If you want to use this resource in the global resource namespace you need
33642  * to register it with g_resources_register().
33643  *
33644  * Returns: (transfer full): a new #GResource, or %NULL on error.
33645  * Since: 2.32
33646  */
33647
33648
33649 /**
33650  * g_resource_open_stream:
33651  * @resource: A #GResource.
33652  * @path: A pathname inside the resource.
33653  * @lookup_flags: A #GResourceLookupFlags.
33654  * @error: return location for a #GError, or %NULL.
33655  *
33656  * Looks for a file at the specified @path in the resource and
33657  * returns a #GInputStream that lets you read the data.
33658  *
33659  * @lookup_flags controls the behaviour of the lookup.
33660  *
33661  * Free the returned object with g_object_unref().
33662  *
33663  * Returns: (transfer full): #GInputStream or %NULL on error.
33664  * Since: 2.32
33665  */
33666
33667
33668 /**
33669  * g_resource_ref:
33670  * @resource: A #GResource.
33671  *
33672  * Atomically increments the reference count of @array by one. This
33673  * function is MT-safe and may be called from any thread.
33674  *
33675  * Returns: The passed in #GResource.
33676  * Since: 2.32
33677  */
33678
33679
33680 /**
33681  * g_resource_unref:
33682  * @resource: A #GResource.
33683  *
33684  * Atomically decrements the reference count of @resource by one. If the
33685  * reference count drops to 0, all memory allocated by the array is
33686  * released. This function is MT-safe and may be called from any
33687  * thread.
33688  *
33689  * Since: 2.32
33690  */
33691
33692
33693 /**
33694  * g_resources_enumerate_children:
33695  * @path: A pathname inside the resource.
33696  * @lookup_flags: A #GResourceLookupFlags.
33697  * @error: return location for a #GError, or %NULL.
33698  *
33699  * Returns all the names of children at the specified @path in the set of
33700  * globally registred resources.
33701  * The return result is a %NULL terminated list of strings which should
33702  * be released with g_strfreev().
33703  *
33704  * @lookup_flags controls the behaviour of the lookup.
33705  *
33706  * Returns: (array zero-terminated=1) (transfer full): an array of constant strings
33707  * Since: 2.32
33708  */
33709
33710
33711 /**
33712  * g_resources_get_info:
33713  * @path: A pathname inside the resource.
33714  * @lookup_flags: A #GResourceLookupFlags.
33715  * @size: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
33716  * @flags: (out) (allow-none): a location to place the flags about the file, or %NULL if the length is not needed
33717  * @error: return location for a #GError, or %NULL.
33718  *
33719  * Looks for a file at the specified @path in the set of
33720  * globally registred resources and if found returns information about it.
33721  *
33722  * @lookup_flags controls the behaviour of the lookup.
33723  *
33724  * Returns: %TRUE if the file was found. %FALSE if there were errors.
33725  * Since: 2.32
33726  */
33727
33728
33729 /**
33730  * g_resources_lookup_data:
33731  * @path: A pathname inside the resource.
33732  * @lookup_flags: A #GResourceLookupFlags.
33733  * @error: return location for a #GError, or %NULL.
33734  *
33735  * Looks for a file at the specified @path in the set of
33736  * globally registred resources and returns a #GBytes that
33737  * lets you directly access the data in memory.
33738  *
33739  * The data is always followed by a zero byte, so you
33740  * can safely use the data as a C string. However, that byte
33741  * is not included in the size of the GBytes.
33742  *
33743  * For uncompressed resource files this is a pointer directly into
33744  * the resource bundle, which is typically in some readonly data section
33745  * in the program binary. For compressed files we allocate memory on
33746  * the heap and automatically uncompress the data.
33747  *
33748  * @lookup_flags controls the behaviour of the lookup.
33749  *
33750  * Free the returned object with g_bytes_unref().
33751  *
33752  * Returns: (transfer full): #GBytes or %NULL on error.
33753  * Since: 2.32
33754  */
33755
33756
33757 /**
33758  * g_resources_open_stream:
33759  * @path: A pathname inside the resource.
33760  * @lookup_flags: A #GResourceLookupFlags.
33761  * @error: return location for a #GError, or %NULL.
33762  *
33763  * Looks for a file at the specified @path in the set of
33764  * globally registred resources and returns a #GInputStream
33765  * that lets you read the data.
33766  *
33767  * @lookup_flags controls the behaviour of the lookup.
33768  *
33769  * Free the returned object with g_object_unref().
33770  *
33771  * Returns: (transfer full): #GInputStream or %NULL on error.
33772  * Since: 2.32
33773  */
33774
33775
33776 /**
33777  * g_resources_register:
33778  * @resource: A #GResource.
33779  *
33780  * Registers the resource with the process-global set of resources.
33781  * Once a resource is registered the files in it can be accessed
33782  * with the global resource lookup functions like g_resources_lookup_data().
33783  *
33784  * Since: 2.32
33785  */
33786
33787
33788 /**
33789  * g_resources_unregister:
33790  * @resource: A #GResource.
33791  *
33792  * Unregisters the resource from the process-global set of resources.
33793  *
33794  * Since: 2.32
33795  */
33796
33797
33798 /**
33799  * g_seekable_can_seek:
33800  * @seekable: a #GSeekable.
33801  *
33802  * Tests if the stream supports the #GSeekableIface.
33803  *
33804  * Returns: %TRUE if @seekable can be seeked. %FALSE otherwise.
33805  */
33806
33807
33808 /**
33809  * g_seekable_can_truncate:
33810  * @seekable: a #GSeekable.
33811  *
33812  * Tests if the stream can be truncated.
33813  *
33814  * Returns: %TRUE if the stream can be truncated, %FALSE otherwise.
33815  */
33816
33817
33818 /**
33819  * g_seekable_seek:
33820  * @seekable: a #GSeekable.
33821  * @offset: a #goffset.
33822  * @type: a #GSeekType.
33823  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
33824  * @error: a #GError location to store the error occurring, or %NULL to ignore.
33825  *
33826  * Seeks in the stream by the given @offset, modified by @type.
33827  *
33828  * If @cancellable is not %NULL, then the operation can be cancelled by
33829  * triggering the cancellable object from another thread. If the operation
33830  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
33831  *
33832  * has occurred, this function will return %FALSE and set @error
33833  * appropriately if present.
33834  *
33835  * Returns: %TRUE if successful. If an error
33836  */
33837
33838
33839 /**
33840  * g_seekable_tell:
33841  * @seekable: a #GSeekable.
33842  *
33843  * Tells the current position within the stream.
33844  *
33845  * Returns: the offset from the beginning of the buffer.
33846  */
33847
33848
33849 /**
33850  * g_seekable_truncate:
33851  * @seekable: a #GSeekable.
33852  * @offset: a #goffset.
33853  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
33854  * @error: a #GError location to store the error occurring, or %NULL to ignore.
33855  *
33856  * Truncates a stream with a given #offset.
33857  *
33858  * If @cancellable is not %NULL, then the operation can be cancelled by
33859  * triggering the cancellable object from another thread. If the operation
33860  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
33861  * operation was partially finished when the operation was cancelled the
33862  * partial result will be returned, without an error.
33863  *
33864  * has occurred, this function will return %FALSE and set @error
33865  * appropriately if present.
33866  *
33867  * Virtual: truncate_fn
33868  * Returns: %TRUE if successful. If an error
33869  */
33870
33871
33872 /**
33873  * g_settings_apply:
33874  * @settings: a #GSettings instance
33875  *
33876  * Applies any changes that have been made to the settings.  This
33877  * function does nothing unless @settings is in 'delay-apply' mode;
33878  * see g_settings_delay().  In the normal case settings are always
33879  * applied immediately.
33880  */
33881
33882
33883 /**
33884  * g_settings_backend_changed:
33885  * @backend: a #GSettingsBackend implementation
33886  * @key: the name of the key
33887  * @origin_tag: the origin tag
33888  *
33889  * Signals that a single key has possibly changed.  Backend
33890  * implementations should call this if a key has possibly changed its
33891  * value.
33892  *
33893  * @key must be a valid key (ie starting with a slash, not containing
33894  * '//', and not ending with a slash).
33895  *
33896  * The implementation must call this function during any call to
33897  * g_settings_backend_write(), before the call returns (except in the
33898  * case that no keys are actually changed and it cares to detect this
33899  * fact).  It may not rely on the existence of a mainloop for
33900  * dispatching the signal later.
33901  *
33902  * The implementation may call this function at any other time it likes
33903  * in response to other events (such as changes occurring outside of the
33904  * program).  These calls may originate from a mainloop or may originate
33905  * in response to any other action (including from calls to
33906  * g_settings_backend_write()).
33907  *
33908  * In the case that this call is in response to a call to
33909  * g_settings_backend_write() then @origin_tag must be set to the same
33910  * value that was passed to that call.
33911  *
33912  * Since: 2.26
33913  */
33914
33915
33916 /**
33917  * g_settings_backend_changed_tree:
33918  * @backend: a #GSettingsBackend implementation
33919  * @tree: a #GTree containing the changes
33920  * @origin_tag: the origin tag
33921  *
33922  * This call is a convenience wrapper.  It gets the list of changes from
33923  * @tree, computes the longest common prefix and calls
33924  * g_settings_backend_changed().
33925  *
33926  * Since: 2.26
33927  */
33928
33929
33930 /**
33931  * g_settings_backend_flatten_tree:
33932  * @tree: a #GTree containing the changes
33933  * @path: (out): the location to save the path
33934  * @keys: (out) (transfer container) (array zero-terminated=1): the location to save the relative keys
33935  * @values: (out) (allow-none) (transfer container) (array zero-terminated=1):  the location to save the values, or %NULL
33936  *
33937  * Calculate the longest common prefix of all keys in a tree and write
33938  * out an array of the key names relative to that prefix and,
33939  * optionally, the value to store at each of those keys.
33940  *
33941  * You must free the value returned in @path, @keys and @values using
33942  * g_free().  You should not attempt to free or unref the contents of
33943  * @keys or @values.
33944  *
33945  * Since: 2.26
33946  */
33947
33948
33949 /**
33950  * g_settings_backend_get_default:
33951  *
33952  * Returns the default #GSettingsBackend. It is possible to override
33953  * the default by setting the <envar>GSETTINGS_BACKEND</envar>
33954  * environment variable to the name of a settings backend.
33955  *
33956  * The user gets a reference to the backend.
33957  *
33958  * Returns: (transfer full): the default #GSettingsBackend
33959  * Since: 2.28
33960  */
33961
33962
33963 /**
33964  * g_settings_backend_keys_changed:
33965  * @backend: a #GSettingsBackend implementation
33966  * @path: the path containing the changes
33967  * @items: (array zero-terminated=1): the %NULL-terminated list of changed keys
33968  * @origin_tag: the origin tag
33969  *
33970  * Signals that a list of keys have possibly changed.  Backend
33971  * implementations should call this if keys have possibly changed their
33972  * values.
33973  *
33974  * @path must be a valid path (ie starting and ending with a slash and
33975  * not containing '//').  Each string in @items must form a valid key
33976  * name when @path is prefixed to it (ie: each item must not start or
33977  * end with '/' and must not contain '//').
33978  *
33979  * The meaning of this signal is that any of the key names resulting
33980  * from the contatenation of @path with each item in @items may have
33981  * changed.
33982  *
33983  * The same rules for when notifications must occur apply as per
33984  * g_settings_backend_changed().  These two calls can be used
33985  * interchangeably if exactly one item has changed (although in that
33986  * case g_settings_backend_changed() is definitely preferred).
33987  *
33988  * For efficiency reasons, the implementation should strive for @path to
33989  * be as long as possible (ie: the longest common prefix of all of the
33990  * keys that were changed) but this is not strictly required.
33991  *
33992  * Since: 2.26
33993  */
33994
33995
33996 /**
33997  * g_settings_backend_path_changed:
33998  * @backend: a #GSettingsBackend implementation
33999  * @path: the path containing the changes
34000  * @origin_tag: the origin tag
34001  *
34002  * Signals that all keys below a given path may have possibly changed.
34003  * Backend implementations should call this if an entire path of keys
34004  * have possibly changed their values.
34005  *
34006  * @path must be a valid path (ie starting and ending with a slash and
34007  * not containing '//').
34008  *
34009  * The meaning of this signal is that any of the key which has a name
34010  * starting with @path may have changed.
34011  *
34012  * The same rules for when notifications must occur apply as per
34013  * g_settings_backend_changed().  This call might be an appropriate
34014  * reasponse to a 'reset' call but implementations are also free to
34015  * explicitly list the keys that were affected by that call if they can
34016  * easily do so.
34017  *
34018  * For efficiency reasons, the implementation should strive for @path to
34019  * be as long as possible (ie: the longest common prefix of all of the
34020  * keys that were changed) but this is not strictly required.  As an
34021  * example, if this function is called with the path of "/" then every
34022  * single key in the application will be notified of a possible change.
34023  *
34024  * Since: 2.26
34025  */
34026
34027
34028 /**
34029  * g_settings_backend_path_writable_changed:
34030  * @backend: a #GSettingsBackend implementation
34031  * @path: the name of the path
34032  *
34033  * Signals that the writability of all keys below a given path may have
34034  * changed.
34035  *
34036  * Since GSettings performs no locking operations for itself, this call
34037  * will always be made in response to external events.
34038  *
34039  * Since: 2.26
34040  */
34041
34042
34043 /**
34044  * g_settings_backend_writable_changed:
34045  * @backend: a #GSettingsBackend implementation
34046  * @key: the name of the key
34047  *
34048  * Signals that the writability of a single key has possibly changed.
34049  *
34050  * Since GSettings performs no locking operations for itself, this call
34051  * will always be made in response to external events.
34052  *
34053  * Since: 2.26
34054  */
34055
34056
34057 /**
34058  * g_settings_bind:
34059  * @settings: a #GSettings object
34060  * @key: the key to bind
34061  * @object: (type GObject.Object): a #GObject
34062  * @property: the name of the property to bind
34063  * @flags: flags for the binding
34064  *
34065  * Create a binding between the @key in the @settings object
34066  * and the property @property of @object.
34067  *
34068  * The binding uses the default GIO mapping functions to map
34069  * between the settings and property values. These functions
34070  * handle booleans, numeric types and string types in a
34071  * straightforward way. Use g_settings_bind_with_mapping() if
34072  * you need a custom mapping, or map between types that are not
34073  * supported by the default mapping functions.
34074  *
34075  * Unless the @flags include %G_SETTINGS_BIND_NO_SENSITIVITY, this
34076  * function also establishes a binding between the writability of
34077  * @key and the "sensitive" property of @object (if @object has
34078  * a boolean property by that name). See g_settings_bind_writable()
34079  * for more details about writable bindings.
34080  *
34081  * Note that the lifecycle of the binding is tied to the object,
34082  * and that you can have only one binding per object property.
34083  * If you bind the same property twice on the same object, the second
34084  * binding overrides the first one.
34085  *
34086  * Since: 2.26
34087  */
34088
34089
34090 /**
34091  * g_settings_bind_with_mapping: (skip)
34092  * @settings: a #GSettings object
34093  * @key: the key to bind
34094  * @object: (type GObject.Object): a #GObject
34095  * @property: the name of the property to bind
34096  * @flags: flags for the binding
34097  * @get_mapping: a function that gets called to convert values from @settings to @object, or %NULL to use the default GIO mapping
34098  * @set_mapping: a function that gets called to convert values from @object to @settings, or %NULL to use the default GIO mapping
34099  * @user_data: data that gets passed to @get_mapping and @set_mapping
34100  * @destroy: #GDestroyNotify function for @user_data
34101  *
34102  * Create a binding between the @key in the @settings object
34103  * and the property @property of @object.
34104  *
34105  * The binding uses the provided mapping functions to map between
34106  * settings and property values.
34107  *
34108  * Note that the lifecycle of the binding is tied to the object,
34109  * and that you can have only one binding per object property.
34110  * If you bind the same property twice on the same object, the second
34111  * binding overrides the first one.
34112  *
34113  * Since: 2.26
34114  */
34115
34116
34117 /**
34118  * g_settings_bind_writable:
34119  * @settings: a #GSettings object
34120  * @key: the key to bind
34121  * @object: (type GObject.Object): a #GObject
34122  * @property: the name of a boolean property to bind
34123  * @inverted: whether to 'invert' the value
34124  *
34125  * Create a binding between the writability of @key in the
34126  * @settings object and the property @property of @object.
34127  * The property must be boolean; "sensitive" or "visible"
34128  * properties of widgets are the most likely candidates.
34129  *
34130  * Writable bindings are always uni-directional; changes of the
34131  * writability of the setting will be propagated to the object
34132  * property, not the other way.
34133  *
34134  * When the @inverted argument is %TRUE, the binding inverts the
34135  * value as it passes from the setting to the object, i.e. @property
34136  * will be set to %TRUE if the key is <emphasis>not</emphasis>
34137  * writable.
34138  *
34139  * Note that the lifecycle of the binding is tied to the object,
34140  * and that you can have only one binding per object property.
34141  * If you bind the same property twice on the same object, the second
34142  * binding overrides the first one.
34143  *
34144  * Since: 2.26
34145  */
34146
34147
34148 /**
34149  * g_settings_create_action:
34150  * @settings: a #GSettings
34151  * @key: the name of a key in @settings
34152  *
34153  * Creates a #GAction corresponding to a given #GSettings key.
34154  *
34155  * The action has the same name as the key.
34156  *
34157  * The value of the key becomes the state of the action and the action
34158  * is enabled when the key is writable.  Changing the state of the
34159  * action results in the key being written to.  Changes to the value or
34160  * writability of the key cause appropriate change notifications to be
34161  * emitted for the action.
34162  *
34163  * For boolean-valued keys, action activations take no parameter and
34164  * result in the toggling of the value.  For all other types,
34165  * activations take the new value for the key (which must have the
34166  * correct type).
34167  *
34168  * Returns: (transfer full): a new #GAction
34169  * Since: 2.32
34170  */
34171
34172
34173 /**
34174  * g_settings_delay:
34175  * @settings: a #GSettings object
34176  *
34177  * Changes the #GSettings object into 'delay-apply' mode. In this
34178  * mode, changes to @settings are not immediately propagated to the
34179  * backend, but kept locally until g_settings_apply() is called.
34180  *
34181  * Since: 2.26
34182  */
34183
34184
34185 /**
34186  * g_settings_get:
34187  * @settings: a #GSettings object
34188  * @key: the key to get the value for
34189  * @format: a #GVariant format string
34190  * @...: arguments as per @format
34191  *
34192  * Gets the value that is stored at @key in @settings.
34193  *
34194  * A convenience function that combines g_settings_get_value() with
34195  * g_variant_get().
34196  *
34197  * It is a programmer error to give a @key that isn't contained in the
34198  * schema for @settings or for the #GVariantType of @format to mismatch
34199  * the type given in the schema.
34200  *
34201  * Since: 2.26
34202  */
34203
34204
34205 /**
34206  * g_settings_get_boolean:
34207  * @settings: a #GSettings object
34208  * @key: the key to get the value for
34209  *
34210  * Gets the value that is stored at @key in @settings.
34211  *
34212  * A convenience variant of g_settings_get() for booleans.
34213  *
34214  * It is a programmer error to give a @key that isn't specified as
34215  * having a boolean type in the schema for @settings.
34216  *
34217  * Returns: a boolean
34218  * Since: 2.26
34219  */
34220
34221
34222 /**
34223  * g_settings_get_child:
34224  * @settings: a #GSettings object
34225  * @name: the name of the 'child' schema
34226  *
34227  * Creates a 'child' settings object which has a base path of
34228  * <replaceable>base-path</replaceable>/@name, where
34229  * <replaceable>base-path</replaceable> is the base path of @settings.
34230  *
34231  * The schema for the child settings object must have been declared
34232  * in the schema of @settings using a <tag class="starttag">child</tag> element.
34233  *
34234  * Returns: (transfer full): a 'child' settings object
34235  * Since: 2.26
34236  */
34237
34238
34239 /**
34240  * g_settings_get_double:
34241  * @settings: a #GSettings object
34242  * @key: the key to get the value for
34243  *
34244  * Gets the value that is stored at @key in @settings.
34245  *
34246  * A convenience variant of g_settings_get() for doubles.
34247  *
34248  * It is a programmer error to give a @key that isn't specified as
34249  * having a 'double' type in the schema for @settings.
34250  *
34251  * Returns: a double
34252  * Since: 2.26
34253  */
34254
34255
34256 /**
34257  * g_settings_get_enum:
34258  * @settings: a #GSettings object
34259  * @key: the key to get the value for
34260  *
34261  * Gets the value that is stored in @settings for @key and converts it
34262  * to the enum value that it represents.
34263  *
34264  * In order to use this function the type of the value must be a string
34265  * and it must be marked in the schema file as an enumerated type.
34266  *
34267  * It is a programmer error to give a @key that isn't contained in the
34268  * schema for @settings or is not marked as an enumerated type.
34269  *
34270  * If the value stored in the configuration database is not a valid
34271  * value for the enumerated type then this function will return the
34272  * default value.
34273  *
34274  * Returns: the enum value
34275  * Since: 2.26
34276  */
34277
34278
34279 /**
34280  * g_settings_get_flags:
34281  * @settings: a #GSettings object
34282  * @key: the key to get the value for
34283  *
34284  * Gets the value that is stored in @settings for @key and converts it
34285  * to the flags value that it represents.
34286  *
34287  * In order to use this function the type of the value must be an array
34288  * of strings and it must be marked in the schema file as an flags type.
34289  *
34290  * It is a programmer error to give a @key that isn't contained in the
34291  * schema for @settings or is not marked as a flags type.
34292  *
34293  * If the value stored in the configuration database is not a valid
34294  * value for the flags type then this function will return the default
34295  * value.
34296  *
34297  * Returns: the flags value
34298  * Since: 2.26
34299  */
34300
34301
34302 /**
34303  * g_settings_get_has_unapplied:
34304  * @settings: a #GSettings object
34305  *
34306  * Returns whether the #GSettings object has any unapplied
34307  * changes.  This can only be the case if it is in 'delayed-apply' mode.
34308  *
34309  * Returns: %TRUE if @settings has unapplied changes
34310  * Since: 2.26
34311  */
34312
34313
34314 /**
34315  * g_settings_get_int:
34316  * @settings: a #GSettings object
34317  * @key: the key to get the value for
34318  *
34319  * Gets the value that is stored at @key in @settings.
34320  *
34321  * A convenience variant of g_settings_get() for 32-bit integers.
34322  *
34323  * It is a programmer error to give a @key that isn't specified as
34324  * having a int32 type in the schema for @settings.
34325  *
34326  * Returns: an integer
34327  * Since: 2.26
34328  */
34329
34330
34331 /**
34332  * g_settings_get_mapped:
34333  * @settings: a #GSettings object
34334  * @key: the key to get the value for
34335  * @mapping: (scope call): the function to map the value in the settings database to the value used by the application
34336  * @user_data: user data for @mapping
34337  *
34338  * Gets the value that is stored at @key in @settings, subject to
34339  * application-level validation/mapping.
34340  *
34341  * You should use this function when the application needs to perform
34342  * some processing on the value of the key (for example, parsing).  The
34343  * @mapping function performs that processing.  If the function
34344  * indicates that the processing was unsuccessful (due to a parse error,
34345  * for example) then the mapping is tried again with another value.
34346  *
34347  * This allows a robust 'fall back to defaults' behaviour to be
34348  * implemented somewhat automatically.
34349  *
34350  * The first value that is tried is the user's setting for the key.  If
34351  * the mapping function fails to map this value, other values may be
34352  * tried in an unspecified order (system or site defaults, translated
34353  * schema default values, untranslated schema default values, etc).
34354  *
34355  * If the mapping function fails for all possible values, one additional
34356  * attempt is made: the mapping function is called with a %NULL value.
34357  * If the mapping function still indicates failure at this point then
34358  * the application will be aborted.
34359  *
34360  * The result parameter for the @mapping function is pointed to a
34361  * #gpointer which is initially set to %NULL.  The same pointer is given
34362  * to each invocation of @mapping.  The final value of that #gpointer is
34363  * what is returned by this function.  %NULL is valid; it is returned
34364  * just as any other value would be.
34365  *
34366  * Returns: (transfer full): the result, which may be %NULL
34367  */
34368
34369
34370 /**
34371  * g_settings_get_range:
34372  * @settings: a #GSettings
34373  * @key: the key to query the range of
34374  *
34375  * Queries the range of a key.
34376  *
34377  * This function will return a #GVariant that fully describes the range
34378  * of values that are valid for @key.
34379  *
34380  * The type of #GVariant returned is <literal>(sv)</literal>.  The
34381  * string describes the type of range restriction in effect.  The type
34382  * and meaning of the value contained in the variant depends on the
34383  * string.
34384  *
34385  * If the string is <literal>'type'</literal> then the variant contains
34386  * an empty array.  The element type of that empty array is the expected
34387  * type of value and all values of that type are valid.
34388  *
34389  * If the string is <literal>'enum'</literal> then the variant contains
34390  * an array enumerating the possible values.  Each item in the array is
34391  * a possible valid value and no other values are valid.
34392  *
34393  * If the string is <literal>'flags'</literal> then the variant contains
34394  * an array.  Each item in the array is a value that may appear zero or
34395  * one times in an array to be used as the value for this key.  For
34396  * example, if the variant contained the array <literal>['x',
34397  * 'y']</literal> then the valid values for the key would be
34398  * <literal>[]</literal>, <literal>['x']</literal>,
34399  * <literal>['y']</literal>, <literal>['x', 'y']</literal> and
34400  * <literal>['y', 'x']</literal>.
34401  *
34402  * Finally, if the string is <literal>'range'</literal> then the variant
34403  * contains a pair of like-typed values -- the minimum and maximum
34404  * permissible values for this key.
34405  *
34406  * This information should not be used by normal programs.  It is
34407  * considered to be a hint for introspection purposes.  Normal programs
34408  * should already know what is permitted by their own schema.  The
34409  * format may change in any way in the future -- but particularly, new
34410  * forms may be added to the possibilities described above.
34411  *
34412  * It is a programmer error to give a @key that isn't contained in the
34413  * schema for @settings.
34414  *
34415  * You should free the returned value with g_variant_unref() when it is
34416  * no longer needed.
34417  *
34418  * Returns: a #GVariant describing the range
34419  * Since: 2.28
34420  */
34421
34422
34423 /**
34424  * g_settings_get_string:
34425  * @settings: a #GSettings object
34426  * @key: the key to get the value for
34427  *
34428  * Gets the value that is stored at @key in @settings.
34429  *
34430  * A convenience variant of g_settings_get() for strings.
34431  *
34432  * It is a programmer error to give a @key that isn't specified as
34433  * having a string type in the schema for @settings.
34434  *
34435  * Returns: a newly-allocated string
34436  * Since: 2.26
34437  */
34438
34439
34440 /**
34441  * g_settings_get_strv:
34442  * @settings: a #GSettings object
34443  * @key: the key to get the value for
34444  *
34445  * A convenience variant of g_settings_get() for string arrays.
34446  *
34447  * It is a programmer error to give a @key that isn't specified as
34448  * having an array of strings type in the schema for @settings.
34449  *
34450  * newly-allocated, %NULL-terminated array of strings, the value that
34451  * is stored at @key in @settings.
34452  *
34453  * Returns: (array zero-terminated=1) (transfer full): a
34454  * Since: 2.26
34455  */
34456
34457
34458 /**
34459  * g_settings_get_uint:
34460  * @settings: a #GSettings object
34461  * @key: the key to get the value for
34462  *
34463  * Gets the value that is stored at @key in @settings.
34464  *
34465  * A convenience variant of g_settings_get() for 32-bit unsigned
34466  * integers.
34467  *
34468  * It is a programmer error to give a @key that isn't specified as
34469  * having a uint32 type in the schema for @settings.
34470  *
34471  * Returns: an unsigned integer
34472  * Since: 2.30
34473  */
34474
34475
34476 /**
34477  * g_settings_get_value:
34478  * @settings: a #GSettings object
34479  * @key: the key to get the value for
34480  *
34481  * Gets the value that is stored in @settings for @key.
34482  *
34483  * It is a programmer error to give a @key that isn't contained in the
34484  * schema for @settings.
34485  *
34486  * Returns: a new #GVariant
34487  * Since: 2.26
34488  */
34489
34490
34491 /**
34492  * g_settings_is_writable:
34493  * @settings: a #GSettings object
34494  * @name: the name of a key
34495  *
34496  * Finds out if a key can be written or not
34497  *
34498  * Returns: %TRUE if the key @name is writable
34499  * Since: 2.26
34500  */
34501
34502
34503 /**
34504  * g_settings_list_children:
34505  * @settings: a #GSettings object
34506  *
34507  * Gets the list of children on @settings.
34508  *
34509  * The list is exactly the list of strings for which it is not an error
34510  * to call g_settings_get_child().
34511  *
34512  * For GSettings objects that are lists, this value can change at any
34513  * time and you should connect to the "children-changed" signal to watch
34514  * for those changes.  Note that there is a race condition here: you may
34515  * request a child after listing it only for it to have been destroyed
34516  * in the meantime.  For this reason, g_settings_get_child() may return
34517  * %NULL even for a child that was listed by this function.
34518  *
34519  * For GSettings objects that are not lists, you should probably not be
34520  * calling this function from "normal" code (since you should already
34521  * know what children are in your schema).  This function may still be
34522  * useful there for introspection reasons, however.
34523  *
34524  * You should free the return value with g_strfreev() when you are done
34525  * with it.
34526  *
34527  * Returns: (transfer full) (element-type utf8): a list of the children on @settings
34528  */
34529
34530
34531 /**
34532  * g_settings_list_keys:
34533  * @settings: a #GSettings object
34534  *
34535  * Introspects the list of keys on @settings.
34536  *
34537  * You should probably not be calling this function from "normal" code
34538  * (since you should already know what keys are in your schema).  This
34539  * function is intended for introspection reasons.
34540  *
34541  * You should free the return value with g_strfreev() when you are done
34542  * with it.
34543  *
34544  * Returns: (transfer full) (element-type utf8): a list of the keys on @settings
34545  */
34546
34547
34548 /**
34549  * g_settings_list_relocatable_schemas:
34550  *
34551  * Gets a list of the relocatable #GSettings schemas installed on the
34552  * system.  These are schemas that do not provide their own path.  It is
34553  * usual to instantiate these schemas directly, but if you want to you
34554  * can use g_settings_new_with_path() to specify the path.
34555  *
34556  * The output of this function, taken together with the output of
34557  * g_settings_list_schemas() represents the complete list of all
34558  * installed schemas.
34559  *
34560  * #GSettings schemas that are available.  The list must not be
34561  * modified or freed.
34562  *
34563  * Returns: (element-type utf8) (transfer none): a list of relocatable
34564  * Since: 2.28
34565  */
34566
34567
34568 /**
34569  * g_settings_list_schemas:
34570  *
34571  * Gets a list of the #GSettings schemas installed on the system.  The
34572  * returned list is exactly the list of schemas for which you may call
34573  * g_settings_new() without adverse effects.
34574  *
34575  * This function does not list the schemas that do not provide their own
34576  * paths (ie: schemas for which you must use
34577  * g_settings_new_with_path()).  See
34578  * g_settings_list_relocatable_schemas() for that.
34579  *
34580  * schemas that are available.  The list must not be modified or
34581  * freed.
34582  *
34583  * Returns: (element-type utf8) (transfer none): a list of #GSettings
34584  * Since: 2.26
34585  */
34586
34587
34588 /**
34589  * g_settings_new:
34590  * @schema_id: the id of the schema
34591  *
34592  * Creates a new #GSettings object with the schema specified by
34593  * @schema_id.
34594  *
34595  * Signals on the newly created #GSettings object will be dispatched
34596  * via the thread-default #GMainContext in effect at the time of the
34597  * call to g_settings_new().  The new #GSettings will hold a reference
34598  * on the context.  See g_main_context_push_thread_default().
34599  *
34600  * Returns: a new #GSettings object
34601  * Since: 2.26
34602  */
34603
34604
34605 /**
34606  * g_settings_new_full:
34607  * @schema: a #GSettingsSchema
34608  * @backend: (allow-none): a #GSettingsBackend
34609  * @path: (allow-none): the path to use
34610  *
34611  * Creates a new #GSettings object with a given schema, backend and
34612  * path.
34613  *
34614  * It should be extremely rare that you ever want to use this function.
34615  * It is made available for advanced use-cases (such as plugin systems
34616  * that want to provide access to schemas loaded from custom locations,
34617  * etc).
34618  *
34619  * At the most basic level, a #GSettings object is a pure composition of
34620  * 4 things: a #GSettingsSchema, a #GSettingsBackend, a path within that
34621  * backend, and a #GMainContext to which signals are dispatched.
34622  *
34623  * This constructor therefore gives you full control over constructing
34624  * #GSettings instances.  The first 4 parameters are given directly as
34625  * @schema, @backend and @path, and the main context is taken from the
34626  * thread-default (as per g_settings_new()).
34627  *
34628  * If @backend is %NULL then the default backend is used.
34629  *
34630  * If @path is %NULL then the path from the schema is used.  It is an
34631  * error f @path is %NULL and the schema has no path of its own or if
34632  * @path is non-%NULL and not equal to the path that the schema does
34633  * have.
34634  *
34635  * Returns: a new #GSettings object
34636  * Since: 2.32
34637  */
34638
34639
34640 /**
34641  * g_settings_new_with_backend:
34642  * @schema_id: the id of the schema
34643  * @backend: the #GSettingsBackend to use
34644  *
34645  * Creates a new #GSettings object with the schema specified by
34646  * @schema_id and a given #GSettingsBackend.
34647  *
34648  * Creating a #GSettings object with a different backend allows accessing
34649  * settings from a database other than the usual one. For example, it may make
34650  * sense to pass a backend corresponding to the "defaults" settings database on
34651  * the system to get a settings object that modifies the system default
34652  * settings instead of the settings for this user.
34653  *
34654  * Returns: a new #GSettings object
34655  * Since: 2.26
34656  */
34657
34658
34659 /**
34660  * g_settings_new_with_backend_and_path:
34661  * @schema_id: the id of the schema
34662  * @backend: the #GSettingsBackend to use
34663  * @path: the path to use
34664  *
34665  * Creates a new #GSettings object with the schema specified by
34666  * @schema_id and a given #GSettingsBackend and path.
34667  *
34668  * This is a mix of g_settings_new_with_backend() and
34669  * g_settings_new_with_path().
34670  *
34671  * Returns: a new #GSettings object
34672  * Since: 2.26
34673  */
34674
34675
34676 /**
34677  * g_settings_new_with_path:
34678  * @schema_id: the id of the schema
34679  * @path: the path to use
34680  *
34681  * Creates a new #GSettings object with the relocatable schema specified
34682  * by @schema_id and a given path.
34683  *
34684  * You only need to do this if you want to directly create a settings
34685  * object with a schema that doesn't have a specified path of its own.
34686  * That's quite rare.
34687  *
34688  * It is a programmer error to call this function for a schema that
34689  * has an explicitly specified path.
34690  *
34691  * Returns: a new #GSettings object
34692  * Since: 2.26
34693  */
34694
34695
34696 /**
34697  * g_settings_range_check:
34698  * @settings: a #GSettings
34699  * @key: the key to check
34700  * @value: the value to check
34701  *
34702  * Checks if the given @value is of the correct type and within the
34703  * permitted range for @key.
34704  *
34705  * This API is not intended to be used by normal programs -- they should
34706  * already know what is permitted by their own schemas.  This API is
34707  * meant to be used by programs such as editors or commandline tools.
34708  *
34709  * It is a programmer error to give a @key that isn't contained in the
34710  * schema for @settings.
34711  *
34712  * Returns: %TRUE if @value is valid for @key
34713  * Since: 2.28
34714  */
34715
34716
34717 /**
34718  * g_settings_reset:
34719  * @settings: a #GSettings object
34720  * @key: the name of a key
34721  *
34722  * Resets @key to its default value.
34723  *
34724  * This call resets the key, as much as possible, to its default value.
34725  * That might the value specified in the schema or the one set by the
34726  * administrator.
34727  */
34728
34729
34730 /**
34731  * g_settings_revert:
34732  * @settings: a #GSettings instance
34733  *
34734  * Reverts all non-applied changes to the settings.  This function
34735  * does nothing unless @settings is in 'delay-apply' mode; see
34736  * g_settings_delay().  In the normal case settings are always applied
34737  * immediately.
34738  *
34739  * Change notifications will be emitted for affected keys.
34740  */
34741
34742
34743 /**
34744  * g_settings_schema_get_id:
34745  * @schema: a #GSettingsSchema
34746  *
34747  * Get the ID of @schema.
34748  *
34749  * Returns: (transfer none): the ID
34750  */
34751
34752
34753 /**
34754  * g_settings_schema_get_path:
34755  * @schema: a #GSettingsSchema
34756  *
34757  * Gets the path associated with @schema, or %NULL.
34758  *
34759  * Schemas may be single-instance or relocatable.  Single-instance
34760  * schemas correspond to exactly one set of keys in the backend
34761  * database: those located at the path returned by this function.
34762  *
34763  * Relocatable schemas can be referenced by other schemas and can
34764  * threfore describe multiple sets of keys at different locations.  For
34765  * relocatable schemas, this function will return %NULL.
34766  *
34767  * Returns: (transfer none): the path of the schema, or %NULL
34768  * Since: 2.32
34769  */
34770
34771
34772 /**
34773  * g_settings_schema_ref:
34774  * @schema: a #GSettingsSchema
34775  *
34776  * Increase the reference count of @schema, returning a new reference.
34777  *
34778  * Returns: a new reference to @schema
34779  * Since: 2.32
34780  */
34781
34782
34783 /**
34784  * g_settings_schema_source_get_default:
34785  *
34786  * Gets the default system schema source.
34787  *
34788  * This function is not required for normal uses of #GSettings but it
34789  * may be useful to authors of plugin management systems or to those who
34790  * want to introspect the content of schemas.
34791  *
34792  * If no schemas are installed, %NULL will be returned.
34793  *
34794  * The returned source may actually consist of multiple schema sources
34795  * from different directories, depending on which directories were given
34796  * in <envar>XDG_DATA_DIRS</envar> and
34797  * <envar>GSETTINGS_SCHEMA_DIR</envar>.  For this reason, all lookups
34798  * performed against the default source should probably be done
34799  * recursively.
34800  *
34801  * Returns: (transfer none): the default schema source
34802  * Since: 2.32
34803  */
34804
34805
34806 /**
34807  * g_settings_schema_source_lookup:
34808  * @source: a #GSettingsSchemaSource
34809  * @schema_id: a schema ID
34810  * @recursive: %TRUE if the lookup should be recursive
34811  *
34812  * Looks up a schema with the identifier @schema_id in @source.
34813  *
34814  * This function is not required for normal uses of #GSettings but it
34815  * may be useful to authors of plugin management systems or to those who
34816  * want to introspect the content of schemas.
34817  *
34818  * If the schema isn't found directly in @source and @recursive is %TRUE
34819  * then the parent sources will also be checked.
34820  *
34821  * If the schema isn't found, %NULL is returned.
34822  *
34823  * Returns: (transfer full): a new #GSettingsSchema
34824  * Since: 2.32
34825  */
34826
34827
34828 /**
34829  * g_settings_schema_source_new_from_directory:
34830  * @directory: the filename of a directory
34831  * @parent: (allow-none): a #GSettingsSchemaSource, or %NULL
34832  * @trusted: %TRUE, if the directory is trusted
34833  * @error: a pointer to a #GError pointer set to %NULL, or %NULL
34834  *
34835  * Attempts to create a new schema source corresponding to the contents
34836  * of the given directory.
34837  *
34838  * This function is not required for normal uses of #GSettings but it
34839  * may be useful to authors of plugin management systems.
34840  *
34841  * The directory should contain a file called
34842  * <filename>gschemas.compiled</filename> as produced by
34843  * <command>glib-compile-schemas</command>.
34844  *
34845  * If @trusted is %TRUE then <filename>gschemas.compiled</filename> is
34846  * trusted not to be corrupted.  This assumption has a performance
34847  * advantage, but can result in crashes or inconsistent behaviour in the
34848  * case of a corrupted file.  Generally, you should set @trusted to
34849  * %TRUE for files installed by the system and to %FALSE for files in
34850  * the home directory.
34851  *
34852  * If @parent is non-%NULL then there are two effects.
34853  *
34854  * First, if g_settings_schema_source_lookup() is called with the
34855  * @recursive flag set to %TRUE and the schema can not be found in the
34856  * source, the lookup will recurse to the parent.
34857  *
34858  * Second, any references to other schemas specified within this
34859  * source (ie: <literal>child</literal> or <literal>extents</literal>)
34860  * references may be resolved from the @parent.
34861  *
34862  * For this second reason, except in very unusual situations, the
34863  * @parent should probably be given as the default schema source, as
34864  * returned by g_settings_schema_source_get_default().
34865  *
34866  * Since: 2.32
34867  */
34868
34869
34870 /**
34871  * g_settings_schema_source_ref:
34872  * @source: a #GSettingsSchemaSource
34873  *
34874  * Increase the reference count of @source, returning a new reference.
34875  *
34876  * Returns: a new reference to @source
34877  * Since: 2.32
34878  */
34879
34880
34881 /**
34882  * g_settings_schema_source_unref:
34883  * @source: a #GSettingsSchemaSource
34884  *
34885  * Decrease the reference count of @source, possibly freeing it.
34886  *
34887  * Since: 2.32
34888  */
34889
34890
34891 /**
34892  * g_settings_schema_unref:
34893  * @schema: a #GSettingsSchema
34894  *
34895  * Decrease the reference count of @schema, possibly freeing it.
34896  *
34897  * Since: 2.32
34898  */
34899
34900
34901 /**
34902  * g_settings_set:
34903  * @settings: a #GSettings object
34904  * @key: the name of the key to set
34905  * @format: a #GVariant format string
34906  * @...: arguments as per @format
34907  *
34908  * Sets @key in @settings to @value.
34909  *
34910  * A convenience function that combines g_settings_set_value() with
34911  * g_variant_new().
34912  *
34913  * It is a programmer error to give a @key that isn't contained in the
34914  * schema for @settings or for the #GVariantType of @format to mismatch
34915  * the type given in the schema.
34916  *
34917  * %FALSE if the key was not writable
34918  *
34919  * Returns: %TRUE if setting the key succeeded,
34920  * Since: 2.26
34921  */
34922
34923
34924 /**
34925  * g_settings_set_boolean:
34926  * @settings: a #GSettings object
34927  * @key: the name of the key to set
34928  * @value: the value to set it to
34929  *
34930  * Sets @key in @settings to @value.
34931  *
34932  * A convenience variant of g_settings_set() for booleans.
34933  *
34934  * It is a programmer error to give a @key that isn't specified as
34935  * having a boolean type in the schema for @settings.
34936  *
34937  * %FALSE if the key was not writable
34938  *
34939  * Returns: %TRUE if setting the key succeeded,
34940  * Since: 2.26
34941  */
34942
34943
34944 /**
34945  * g_settings_set_double:
34946  * @settings: a #GSettings object
34947  * @key: the name of the key to set
34948  * @value: the value to set it to
34949  *
34950  * Sets @key in @settings to @value.
34951  *
34952  * A convenience variant of g_settings_set() for doubles.
34953  *
34954  * It is a programmer error to give a @key that isn't specified as
34955  * having a 'double' type in the schema for @settings.
34956  *
34957  * %FALSE if the key was not writable
34958  *
34959  * Returns: %TRUE if setting the key succeeded,
34960  * Since: 2.26
34961  */
34962
34963
34964 /**
34965  * g_settings_set_enum:
34966  * @settings: a #GSettings object
34967  * @key: a key, within @settings
34968  * @value: an enumerated value
34969  *
34970  * Looks up the enumerated type nick for @value and writes it to @key,
34971  * within @settings.
34972  *
34973  * It is a programmer error to give a @key that isn't contained in the
34974  * schema for @settings or is not marked as an enumerated type, or for
34975  * @value not to be a valid value for the named type.
34976  *
34977  * After performing the write, accessing @key directly with
34978  * g_settings_get_string() will return the 'nick' associated with
34979  * @value.
34980  *
34981  * Returns: %TRUE, if the set succeeds
34982  */
34983
34984
34985 /**
34986  * g_settings_set_flags:
34987  * @settings: a #GSettings object
34988  * @key: a key, within @settings
34989  * @value: a flags value
34990  *
34991  * Looks up the flags type nicks for the bits specified by @value, puts
34992  * them in an array of strings and writes the array to @key, within
34993  * @settings.
34994  *
34995  * It is a programmer error to give a @key that isn't contained in the
34996  * schema for @settings or is not marked as a flags type, or for @value
34997  * to contain any bits that are not value for the named type.
34998  *
34999  * After performing the write, accessing @key directly with
35000  * g_settings_get_strv() will return an array of 'nicks'; one for each
35001  * bit in @value.
35002  *
35003  * Returns: %TRUE, if the set succeeds
35004  */
35005
35006
35007 /**
35008  * g_settings_set_int:
35009  * @settings: a #GSettings object
35010  * @key: the name of the key to set
35011  * @value: the value to set it to
35012  *
35013  * Sets @key in @settings to @value.
35014  *
35015  * A convenience variant of g_settings_set() for 32-bit integers.
35016  *
35017  * It is a programmer error to give a @key that isn't specified as
35018  * having a int32 type in the schema for @settings.
35019  *
35020  * %FALSE if the key was not writable
35021  *
35022  * Returns: %TRUE if setting the key succeeded,
35023  * Since: 2.26
35024  */
35025
35026
35027 /**
35028  * g_settings_set_string:
35029  * @settings: a #GSettings object
35030  * @key: the name of the key to set
35031  * @value: the value to set it to
35032  *
35033  * Sets @key in @settings to @value.
35034  *
35035  * A convenience variant of g_settings_set() for strings.
35036  *
35037  * It is a programmer error to give a @key that isn't specified as
35038  * having a string type in the schema for @settings.
35039  *
35040  * %FALSE if the key was not writable
35041  *
35042  * Returns: %TRUE if setting the key succeeded,
35043  * Since: 2.26
35044  */
35045
35046
35047 /**
35048  * g_settings_set_strv:
35049  * @settings: a #GSettings object
35050  * @key: the name of the key to set
35051  * @value: (allow-none) (array zero-terminated=1): the value to set it to, or %NULL
35052  *
35053  * Sets @key in @settings to @value.
35054  *
35055  * A convenience variant of g_settings_set() for string arrays.  If
35056  * @value is %NULL, then @key is set to be the empty array.
35057  *
35058  * It is a programmer error to give a @key that isn't specified as
35059  * having an array of strings type in the schema for @settings.
35060  *
35061  * %FALSE if the key was not writable
35062  *
35063  * Returns: %TRUE if setting the key succeeded,
35064  * Since: 2.26
35065  */
35066
35067
35068 /**
35069  * g_settings_set_uint:
35070  * @settings: a #GSettings object
35071  * @key: the name of the key to set
35072  * @value: the value to set it to
35073  *
35074  * Sets @key in @settings to @value.
35075  *
35076  * A convenience variant of g_settings_set() for 32-bit unsigned
35077  * integers.
35078  *
35079  * It is a programmer error to give a @key that isn't specified as
35080  * having a uint32 type in the schema for @settings.
35081  *
35082  * %FALSE if the key was not writable
35083  *
35084  * Returns: %TRUE if setting the key succeeded,
35085  * Since: 2.30
35086  */
35087
35088
35089 /**
35090  * g_settings_set_value:
35091  * @settings: a #GSettings object
35092  * @key: the name of the key to set
35093  * @value: a #GVariant of the correct type
35094  *
35095  * Sets @key in @settings to @value.
35096  *
35097  * It is a programmer error to give a @key that isn't contained in the
35098  * schema for @settings or for @value to have the incorrect type, per
35099  * the schema.
35100  *
35101  * If @value is floating then this function consumes the reference.
35102  *
35103  * %FALSE if the key was not writable
35104  *
35105  * Returns: %TRUE if setting the key succeeded,
35106  * Since: 2.26
35107  */
35108
35109
35110 /**
35111  * g_settings_sync:
35112  *
35113  * Ensures that all pending operations for the given are complete for
35114  * the default backend.
35115  *
35116  * Writes made to a #GSettings are handled asynchronously.  For this
35117  * reason, it is very unlikely that the changes have it to disk by the
35118  * time g_settings_set() returns.
35119  *
35120  * This call will block until all of the writes have made it to the
35121  * backend.  Since the mainloop is not running, no change notifications
35122  * will be dispatched during this call (but some may be queued by the
35123  * time the call is done).
35124  */
35125
35126
35127 /**
35128  * g_settings_unbind:
35129  * @object: the object
35130  * @property: the property whose binding is removed
35131  *
35132  * Removes an existing binding for @property on @object.
35133  *
35134  * Note that bindings are automatically removed when the
35135  * object is finalized, so it is rarely necessary to call this
35136  * function.
35137  *
35138  * Since: 2.26
35139  */
35140
35141
35142 /**
35143  * g_signal_connect:
35144  * @instance: the instance to connect to.
35145  * @detailed_signal: a string of the form "signal-name::detail".
35146  * @c_handler: the #GCallback to connect.
35147  * @data: data to pass to @c_handler calls.
35148  *
35149  * Connects a #GCallback function to a signal for a particular object.
35150  *
35151  * The handler will be called before the default handler of the signal.
35152  *
35153  * Returns: the handler id
35154  */
35155
35156
35157 /**
35158  * g_signal_connect_after:
35159  * @instance: the instance to connect to.
35160  * @detailed_signal: a string of the form "signal-name::detail".
35161  * @c_handler: the #GCallback to connect.
35162  * @data: data to pass to @c_handler calls.
35163  *
35164  * Connects a #GCallback function to a signal for a particular object.
35165  *
35166  * The handler will be called after the default handler of the signal.
35167  *
35168  * Returns: the handler id
35169  */
35170
35171
35172 /**
35173  * g_signal_connect_swapped:
35174  * @instance: the instance to connect to.
35175  * @detailed_signal: a string of the form "signal-name::detail".
35176  * @c_handler: the #GCallback to connect.
35177  * @data: data to pass to @c_handler calls.
35178  *
35179  * Connects a #GCallback function to a signal for a particular object.
35180  *
35181  * The instance on which the signal is emitted and @data will be swapped when
35182  * calling the handler.
35183  *
35184  * Returns: the handler id
35185  */
35186
35187
35188 /**
35189  * g_signal_handlers_block_by_func:
35190  * @instance: The instance to block handlers from.
35191  * @func: The C closure callback of the handlers (useless for non-C closures).
35192  * @data: The closure data of the handlers' closures.
35193  *
35194  * Blocks all handlers on an instance that match @func and @data.
35195  *
35196  * Returns: The number of handlers that matched.
35197  */
35198
35199
35200 /**
35201  * g_signal_handlers_disconnect_by_data:
35202  * @instance: The instance to remove handlers from
35203  * @data: the closure data of the handlers' closures
35204  *
35205  * Disconnects all handlers on an instance that match @data.
35206  *
35207  * Returns: The number of handlers that matched.
35208  * Since: 2.32
35209  */
35210
35211
35212 /**
35213  * g_signal_handlers_disconnect_by_func:
35214  * @instance: The instance to remove handlers from.
35215  * @func: The C closure callback of the handlers (useless for non-C closures).
35216  * @data: The closure data of the handlers' closures.
35217  *
35218  * Disconnects all handlers on an instance that match @func and @data.
35219  *
35220  * Returns: The number of handlers that matched.
35221  */
35222
35223
35224 /**
35225  * g_signal_handlers_unblock_by_func:
35226  * @instance: The instance to unblock handlers from.
35227  * @func: The C closure callback of the handlers (useless for non-C closures).
35228  * @data: The closure data of the handlers' closures.
35229  *
35230  * Unblocks all handlers on an instance that match @func and @data.
35231  *
35232  * Returns: The number of handlers that matched.
35233  */
35234
35235
35236 /**
35237  * g_simple_action_group_add_entries:
35238  * @simple: a #GSimpleActionGroup
35239  * @entries: (array length=n_entries): a pointer to the first item in an array of #GActionEntry structs
35240  * @n_entries: the length of @entries, or -1
35241  * @user_data: the user data for signal connections
35242  *
35243  * A convenience function for creating multiple #GSimpleAction instances
35244  * and adding them to the action group.
35245  *
35246  * Since: 2.30
35247  */
35248
35249
35250 /**
35251  * g_simple_action_group_insert:
35252  * @simple: a #GSimpleActionGroup
35253  * @action: a #GAction
35254  *
35255  * Adds an action to the action group.
35256  *
35257  * If the action group already contains an action with the same name as
35258  * @action then the old action is dropped from the group.
35259  *
35260  * The action group takes its own reference on @action.
35261  *
35262  * Since: 2.28
35263  */
35264
35265
35266 /**
35267  * g_simple_action_group_lookup:
35268  * @simple: a #GSimpleActionGroup
35269  * @action_name: the name of an action
35270  *
35271  * Looks up the action with the name @action_name in the group.
35272  *
35273  * If no such action exists, returns %NULL.
35274  *
35275  * Returns: (transfer none): a #GAction, or %NULL
35276  * Since: 2.28
35277  */
35278
35279
35280 /**
35281  * g_simple_action_group_new:
35282  *
35283  * Creates a new, empty, #GSimpleActionGroup.
35284  *
35285  * Returns: a new #GSimpleActionGroup
35286  * Since: 2.28
35287  */
35288
35289
35290 /**
35291  * g_simple_action_group_remove:
35292  * @simple: a #GSimpleActionGroup
35293  * @action_name: the name of the action
35294  *
35295  * Removes the named action from the action group.
35296  *
35297  * If no action of this name is in the group then nothing happens.
35298  *
35299  * Since: 2.28
35300  */
35301
35302
35303 /**
35304  * g_simple_action_new:
35305  * @name: the name of the action
35306  * @parameter_type: (allow-none): the type of parameter to the activate function
35307  *
35308  * Creates a new action.
35309  *
35310  * The created action is stateless.  See g_simple_action_new_stateful().
35311  *
35312  * Returns: a new #GSimpleAction
35313  * Since: 2.28
35314  */
35315
35316
35317 /**
35318  * g_simple_action_new_stateful:
35319  * @name: the name of the action
35320  * @parameter_type: (allow-none): the type of the parameter to the activate function
35321  * @state: the initial state of the action
35322  *
35323  * Creates a new stateful action.
35324  *
35325  * @state is the initial state of the action.  All future state values
35326  * must have the same #GVariantType as the initial state.
35327  *
35328  * If the @state GVariant is floating, it is consumed.
35329  *
35330  * Returns: a new #GSimpleAction
35331  * Since: 2.28
35332  */
35333
35334
35335 /**
35336  * g_simple_action_set_enabled:
35337  * @simple: a #GSimpleAction
35338  * @enabled: whether the action is enabled
35339  *
35340  * Sets the action as enabled or not.
35341  *
35342  * An action must be enabled in order to be activated or in order to
35343  * have its state changed from outside callers.
35344  *
35345  * This should only be called by the implementor of the action.  Users
35346  * of the action should not attempt to modify its enabled flag.
35347  *
35348  * Since: 2.28
35349  */
35350
35351
35352 /**
35353  * g_simple_action_set_state:
35354  * @simple: a #GSimpleAction
35355  * @value: the new #GVariant for the state
35356  *
35357  * Sets the state of the action.
35358  *
35359  * This directly updates the 'state' property to the given value.
35360  *
35361  * This should only be called by the implementor of the action.  Users
35362  * of the action should not attempt to directly modify the 'state'
35363  * property.  Instead, they should call g_action_change_state() to
35364  * request the change.
35365  *
35366  * Since: 2.30
35367  */
35368
35369
35370 /**
35371  * g_simple_async_report_error_in_idle: (skip)
35372  * @object: (allow-none): a #GObject, or %NULL.
35373  * @callback: a #GAsyncReadyCallback.
35374  * @user_data: user data passed to @callback.
35375  * @domain: a #GQuark containing the error domain (usually #G_IO_ERROR).
35376  * @code: a specific error code.
35377  * @format: a formatted error reporting string.
35378  * @...: a list of variables to fill in @format.
35379  *
35380  * Reports an error in an asynchronous function in an idle function by
35381  * directly setting the contents of the #GAsyncResult with the given error
35382  * information.
35383  */
35384
35385
35386 /**
35387  * g_simple_async_report_gerror_in_idle:
35388  * @object: (allow-none): a #GObject, or %NULL
35389  * @callback: (scope async): a #GAsyncReadyCallback.
35390  * @user_data: (closure): user data passed to @callback.
35391  * @error: the #GError to report
35392  *
35393  * Reports an error in an idle function. Similar to
35394  * g_simple_async_report_error_in_idle(), but takes a #GError rather
35395  * than building a new one.
35396  */
35397
35398
35399 /**
35400  * g_simple_async_report_take_gerror_in_idle: (skip)
35401  * @object: (allow-none): a #GObject, or %NULL
35402  * @callback: a #GAsyncReadyCallback.
35403  * @user_data: user data passed to @callback.
35404  * @error: the #GError to report
35405  *
35406  * Reports an error in an idle function. Similar to
35407  * g_simple_async_report_gerror_in_idle(), but takes over the caller's
35408  * ownership of @error, so the caller does not have to free it any more.
35409  *
35410  * Since: 2.28
35411  */
35412
35413
35414 /**
35415  * g_simple_async_result_complete:
35416  * @simple: a #GSimpleAsyncResult.
35417  *
35418  * Completes an asynchronous I/O job immediately. Must be called in
35419  * the thread where the asynchronous result was to be delivered, as it
35420  * invokes the callback directly. If you are in a different thread use
35421  * g_simple_async_result_complete_in_idle().
35422  *
35423  * Calling this function takes a reference to @simple for as long as
35424  * is needed to complete the call.
35425  */
35426
35427
35428 /**
35429  * g_simple_async_result_complete_in_idle:
35430  * @simple: a #GSimpleAsyncResult.
35431  *
35432  * Completes an asynchronous function in an idle handler in the <link
35433  * linkend="g-main-context-push-thread-default">thread-default main
35434  * loop</link> of the thread that @simple was initially created in
35435  * (and re-pushes that context around the invocation of the callback).
35436  *
35437  * Calling this function takes a reference to @simple for as long as
35438  * is needed to complete the call.
35439  */
35440
35441
35442 /**
35443  * g_simple_async_result_get_op_res_gboolean:
35444  * @simple: a #GSimpleAsyncResult.
35445  *
35446  * Gets the operation result boolean from within the asynchronous result.
35447  *
35448  * if the operation's result was %FALSE.
35449  *
35450  * Returns: %TRUE if the operation's result was %TRUE, %FALSE
35451  */
35452
35453
35454 /**
35455  * g_simple_async_result_get_op_res_gpointer: (skip)
35456  * @simple: a #GSimpleAsyncResult.
35457  *
35458  * Gets a pointer result as returned by the asynchronous function.
35459  *
35460  * Returns: a pointer from the result.
35461  */
35462
35463
35464 /**
35465  * g_simple_async_result_get_op_res_gssize:
35466  * @simple: a #GSimpleAsyncResult.
35467  *
35468  * Gets a gssize from the asynchronous result.
35469  *
35470  * Returns: a gssize returned from the asynchronous function.
35471  */
35472
35473
35474 /**
35475  * g_simple_async_result_get_source_tag: (skip)
35476  * @simple: a #GSimpleAsyncResult.
35477  *
35478  * Gets the source tag for the #GSimpleAsyncResult.
35479  *
35480  * Returns: a #gpointer to the source object for the #GSimpleAsyncResult.
35481  */
35482
35483
35484 /**
35485  * g_simple_async_result_is_valid:
35486  * @result: the #GAsyncResult passed to the _finish function.
35487  * @source: the #GObject passed to the _finish function.
35488  * @source_tag: the asynchronous function.
35489  *
35490  * Ensures that the data passed to the _finish function of an async
35491  * operation is consistent.  Three checks are performed.
35492  *
35493  * First, @result is checked to ensure that it is really a
35494  * #GSimpleAsyncResult.  Second, @source is checked to ensure that it
35495  * matches the source object of @result.  Third, @source_tag is
35496  * checked to ensure that it is either %NULL (as it is when the result was
35497  * created by g_simple_async_report_error_in_idle() or
35498  * g_simple_async_report_gerror_in_idle()) or equal to the
35499  * @source_tag argument given to g_simple_async_result_new() (which, by
35500  * convention, is a pointer to the _async function corresponding to the
35501  * _finish function from which this function is called).
35502  *
35503  * Returns: #TRUE if all checks passed or #FALSE if any failed.
35504  * Since: 2.20
35505  */
35506
35507
35508 /**
35509  * g_simple_async_result_new:
35510  * @source_object: (allow-none): a #GObject, or %NULL.
35511  * @callback: (scope async): a #GAsyncReadyCallback.
35512  * @user_data: (closure): user data passed to @callback.
35513  * @source_tag: the asynchronous function.
35514  *
35515  * Creates a #GSimpleAsyncResult.
35516  *
35517  * Returns: a #GSimpleAsyncResult.
35518  */
35519
35520
35521 /**
35522  * g_simple_async_result_new_error:
35523  * @source_object: (allow-none): a #GObject, or %NULL.
35524  * @callback: (scope async): a #GAsyncReadyCallback.
35525  * @user_data: (closure): user data passed to @callback.
35526  * @domain: a #GQuark.
35527  * @code: an error code.
35528  * @format: a string with format characters.
35529  * @...: a list of values to insert into @format.
35530  *
35531  * Creates a new #GSimpleAsyncResult with a set error.
35532  *
35533  * Returns: a #GSimpleAsyncResult.
35534  */
35535
35536
35537 /**
35538  * g_simple_async_result_new_from_error:
35539  * @source_object: (allow-none): a #GObject, or %NULL.
35540  * @callback: (scope async): a #GAsyncReadyCallback.
35541  * @user_data: (closure): user data passed to @callback.
35542  * @error: a #GError
35543  *
35544  * Creates a #GSimpleAsyncResult from an error condition.
35545  *
35546  * Returns: a #GSimpleAsyncResult.
35547  */
35548
35549
35550 /**
35551  * g_simple_async_result_new_take_error: (skip)
35552  * @source_object: (allow-none): a #GObject, or %NULL
35553  * @callback: (scope async): a #GAsyncReadyCallback
35554  * @user_data: (closure): user data passed to @callback
35555  * @error: a #GError
35556  *
35557  * Creates a #GSimpleAsyncResult from an error condition, and takes over the
35558  * caller's ownership of @error, so the caller does not need to free it anymore.
35559  *
35560  * Returns: a #GSimpleAsyncResult
35561  * Since: 2.28
35562  */
35563
35564
35565 /**
35566  * g_simple_async_result_propagate_error:
35567  * @simple: a #GSimpleAsyncResult.
35568  * @dest: (out): a location to propagate the error to.
35569  *
35570  * Propagates an error from within the simple asynchronous result to
35571  * a given destination.
35572  *
35573  * Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise.
35574  */
35575
35576
35577 /**
35578  * g_simple_async_result_run_in_thread: (skip)
35579  * @simple: a #GSimpleAsyncResult.
35580  * @func: a #GSimpleAsyncThreadFunc.
35581  * @io_priority: the io priority of the request.
35582  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
35583  *
35584  * Runs the asynchronous job in a separate thread and then calls
35585  * g_simple_async_result_complete_in_idle() on @simple to return
35586  * the result to the appropriate main loop.
35587  *
35588  * Calling this function takes a reference to @simple for as long as
35589  * is needed to run the job and report its completion.
35590  */
35591
35592
35593 /**
35594  * g_simple_async_result_set_error: (skip)
35595  * @simple: a #GSimpleAsyncResult.
35596  * @domain: a #GQuark (usually #G_IO_ERROR).
35597  * @code: an error code.
35598  * @format: a formatted error reporting string.
35599  * @...: a list of variables to fill in @format.
35600  *
35601  * Sets an error within the asynchronous result without a #GError.
35602  */
35603
35604
35605 /**
35606  * g_simple_async_result_set_error_va: (skip)
35607  * @simple: a #GSimpleAsyncResult.
35608  * @domain: a #GQuark (usually #G_IO_ERROR).
35609  * @code: an error code.
35610  * @format: a formatted error reporting string.
35611  * @args: va_list of arguments.
35612  *
35613  * Sets an error within the asynchronous result without a #GError.
35614  * Unless writing a binding, see g_simple_async_result_set_error().
35615  */
35616
35617
35618 /**
35619  * g_simple_async_result_set_from_error:
35620  * @simple: a #GSimpleAsyncResult.
35621  * @error: #GError.
35622  *
35623  * Sets the result from a #GError.
35624  */
35625
35626
35627 /**
35628  * g_simple_async_result_set_handle_cancellation:
35629  * @simple: a #GSimpleAsyncResult.
35630  * @handle_cancellation: a #gboolean.
35631  *
35632  * Sets whether to handle cancellation within the asynchronous operation.
35633  */
35634
35635
35636 /**
35637  * g_simple_async_result_set_op_res_gboolean:
35638  * @simple: a #GSimpleAsyncResult.
35639  * @op_res: a #gboolean.
35640  *
35641  * Sets the operation result to a boolean within the asynchronous result.
35642  */
35643
35644
35645 /**
35646  * g_simple_async_result_set_op_res_gpointer: (skip)
35647  * @simple: a #GSimpleAsyncResult.
35648  * @op_res: a pointer result from an asynchronous function.
35649  * @destroy_op_res: a #GDestroyNotify function.
35650  *
35651  * Sets the operation result within the asynchronous result to a pointer.
35652  */
35653
35654
35655 /**
35656  * g_simple_async_result_set_op_res_gssize:
35657  * @simple: a #GSimpleAsyncResult.
35658  * @op_res: a #gssize.
35659  *
35660  * Sets the operation result within the asynchronous result to
35661  * the given @op_res.
35662  */
35663
35664
35665 /**
35666  * g_simple_async_result_take_error: (skip)
35667  * @simple: a #GSimpleAsyncResult
35668  * @error: a #GError
35669  *
35670  * Sets the result from @error, and takes over the caller's ownership
35671  * of @error, so the caller does not need to free it any more.
35672  *
35673  * Since: 2.28
35674  */
35675
35676
35677 /**
35678  * g_simple_permission_new:
35679  * @allowed: %TRUE if the action is allowed
35680  *
35681  * Creates a new #GPermission instance that represents an action that is
35682  * either always or never allowed.
35683  *
35684  * Returns: the #GSimplePermission, as a #GPermission
35685  * Since: 2.26
35686  */
35687
35688
35689 /**
35690  * g_socket_accept:
35691  * @socket: a #GSocket.
35692  * @cancellable: (allow-none): a %GCancellable or %NULL
35693  * @error: #GError for error reporting, or %NULL to ignore.
35694  *
35695  * Accept incoming connections on a connection-based socket. This removes
35696  * the first outstanding connection request from the listening socket and
35697  * creates a #GSocket object for it.
35698  *
35699  * The @socket must be bound to a local address with g_socket_bind() and
35700  * must be listening for incoming connections (g_socket_listen()).
35701  *
35702  * If there are no outstanding connections then the operation will block
35703  * or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.
35704  * To be notified of an incoming connection, wait for the %G_IO_IN condition.
35705  *
35706  * Free the returned object with g_object_unref().
35707  *
35708  * Returns: (transfer full): a new #GSocket, or %NULL on error.
35709  * Since: 2.22
35710  */
35711
35712
35713 /**
35714  * g_socket_address_enumerator_next:
35715  * @enumerator: a #GSocketAddressEnumerator
35716  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
35717  * @error: a #GError.
35718  *
35719  * Retrieves the next #GSocketAddress from @enumerator. Note that this
35720  * may block for some amount of time. (Eg, a #GNetworkAddress may need
35721  * to do a DNS lookup before it can return an address.) Use
35722  * g_socket_address_enumerator_next_async() if you need to avoid
35723  * blocking.
35724  *
35725  * If @enumerator is expected to yield addresses, but for some reason
35726  * is unable to (eg, because of a DNS error), then the first call to
35727  * g_socket_address_enumerator_next() will return an appropriate error
35728  * in *@error. However, if the first call to
35729  * g_socket_address_enumerator_next() succeeds, then any further
35730  * internal errors (other than @cancellable being triggered) will be
35731  * ignored.
35732  *
35733  * error (in which case *@error will be set) or if there are no
35734  * more addresses.
35735  *
35736  * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
35737  */
35738
35739
35740 /**
35741  * g_socket_address_enumerator_next_async:
35742  * @enumerator: a #GSocketAddressEnumerator
35743  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
35744  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
35745  * @user_data: (closure): the data to pass to callback function
35746  *
35747  * Asynchronously retrieves the next #GSocketAddress from @enumerator
35748  * and then calls @callback, which must call
35749  * g_socket_address_enumerator_next_finish() to get the result.
35750  */
35751
35752
35753 /**
35754  * g_socket_address_enumerator_next_finish:
35755  * @enumerator: a #GSocketAddressEnumerator
35756  * @result: a #GAsyncResult
35757  * @error: a #GError
35758  *
35759  * Retrieves the result of a completed call to
35760  * g_socket_address_enumerator_next_async(). See
35761  * g_socket_address_enumerator_next() for more information about
35762  * error handling.
35763  *
35764  * error (in which case *@error will be set) or if there are no
35765  * more addresses.
35766  *
35767  * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
35768  */
35769
35770
35771 /**
35772  * g_socket_address_get_family:
35773  * @address: a #GSocketAddress
35774  *
35775  * Gets the socket family type of @address.
35776  *
35777  * Returns: the socket family type of @address.
35778  * Since: 2.22
35779  */
35780
35781
35782 /**
35783  * g_socket_address_get_native_size:
35784  * @address: a #GSocketAddress
35785  *
35786  * Gets the size of @address's native <type>struct sockaddr</type>.
35787  * You can use this to allocate memory to pass to
35788  * g_socket_address_to_native().
35789  *
35790  * @address represents
35791  *
35792  * Returns: the size of the native <type>struct sockaddr</type> that
35793  * Since: 2.22
35794  */
35795
35796
35797 /**
35798  * g_socket_address_new_from_native:
35799  * @native: a pointer to a <type>struct sockaddr</type>
35800  * @len: the size of the memory location pointed to by @native
35801  *
35802  * Creates a #GSocketAddress subclass corresponding to the native
35803  * <type>struct sockaddr</type> @native.
35804  *
35805  * otherwise %NULL.
35806  *
35807  * Returns: a new #GSocketAddress if @native could successfully be converted,
35808  * Since: 2.22
35809  */
35810
35811
35812 /**
35813  * g_socket_address_to_native:
35814  * @address: a #GSocketAddress
35815  * @dest: a pointer to a memory location that will contain the native <type>struct sockaddr</type>.
35816  * @destlen: the size of @dest. Must be at least as large as g_socket_address_get_native_size().
35817  * @error: #GError for error reporting, or %NULL to ignore.
35818  *
35819  * Converts a #GSocketAddress to a native <type>struct
35820  * sockaddr</type>, which can be passed to low-level functions like
35821  * connect() or bind().
35822  *
35823  * If not enough space is available, a %G_IO_ERROR_NO_SPACE error is
35824  * returned. If the address type is not known on the system
35825  * then a %G_IO_ERROR_NOT_SUPPORTED error is returned.
35826  *
35827  * Returns: %TRUE if @dest was filled in, %FALSE on error
35828  * Since: 2.22
35829  */
35830
35831
35832 /**
35833  * g_socket_bind:
35834  * @socket: a #GSocket.
35835  * @address: a #GSocketAddress specifying the local address.
35836  * @allow_reuse: whether to allow reusing this address
35837  * @error: #GError for error reporting, or %NULL to ignore.
35838  *
35839  * When a socket is created it is attached to an address family, but it
35840  * doesn't have an address in this family. g_socket_bind() assigns the
35841  * address (sometimes called name) of the socket.
35842  *
35843  * It is generally required to bind to a local address before you can
35844  * receive connections. (See g_socket_listen() and g_socket_accept() ).
35845  * In certain situations, you may also want to bind a socket that will be
35846  * used to initiate connections, though this is not normally required.
35847  *
35848  * @allow_reuse should be %TRUE for server sockets (sockets that you will
35849  * eventually call g_socket_accept() on), and %FALSE for client sockets.
35850  * (Specifically, if it is %TRUE, then g_socket_bind() will set the
35851  * %SO_REUSEADDR flag on the socket, allowing it to bind @address even if
35852  * that address was previously used by another socket that has not yet been
35853  * fully cleaned-up by the kernel. Failing to set this flag on a server
35854  * socket may cause the bind call to return %G_IO_ERROR_ADDRESS_IN_USE if
35855  * the server program is stopped and then immediately restarted.)
35856  *
35857  * Returns: %TRUE on success, %FALSE on error.
35858  * Since: 2.22
35859  */
35860
35861
35862 /**
35863  * g_socket_check_connect_result:
35864  * @socket: a #GSocket
35865  * @error: #GError for error reporting, or %NULL to ignore.
35866  *
35867  * Checks and resets the pending connect error for the socket.
35868  * This is used to check for errors when g_socket_connect() is
35869  * used in non-blocking mode.
35870  *
35871  * Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error
35872  * Since: 2.22
35873  */
35874
35875
35876 /**
35877  * g_socket_client_add_application_proxy:
35878  * @client: a #GSocketClient
35879  * @protocol: The proxy protocol
35880  *
35881  * Enable proxy protocols to be handled by the application. When the
35882  * indicated proxy protocol is returned by the #GProxyResolver,
35883  * #GSocketClient will consider this protocol as supported but will
35884  * not try to find a #GProxy instance to handle handshaking. The
35885  * application must check for this case by calling
35886  * g_socket_connection_get_remote_address() on the returned
35887  * #GSocketConnection, and seeing if it's a #GProxyAddress of the
35888  * appropriate type, to determine whether or not it needs to handle
35889  * the proxy handshaking itself.
35890  *
35891  * This should be used for proxy protocols that are dialects of
35892  * another protocol such as HTTP proxy. It also allows cohabitation of
35893  * proxy protocols that are reused between protocols. A good example
35894  * is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also
35895  * be use as generic socket proxy through the HTTP CONNECT method.
35896  *
35897  * When the proxy is detected as being an application proxy, TLS handshake
35898  * will be skipped. This is required to let the application do the proxy
35899  * specific handshake.
35900  */
35901
35902
35903 /**
35904  * g_socket_client_connect:
35905  * @client: a #GSocketClient.
35906  * @connectable: a #GSocketConnectable specifying the remote address.
35907  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
35908  * @error: #GError for error reporting, or %NULL to ignore.
35909  *
35910  * Tries to resolve the @connectable and make a network connection to it.
35911  *
35912  * Upon a successful connection, a new #GSocketConnection is constructed
35913  * and returned.  The caller owns this new object and must drop their
35914  * reference to it when finished with it.
35915  *
35916  * The type of the #GSocketConnection object returned depends on the type of
35917  * the underlying socket that is used. For instance, for a TCP/IP connection
35918  * it will be a #GTcpConnection.
35919  *
35920  * The socket created will be the same family as the address that the
35921  * @connectable resolves to, unless family is set with g_socket_client_set_family()
35922  * or indirectly via g_socket_client_set_local_address(). The socket type
35923  * defaults to %G_SOCKET_TYPE_STREAM but can be set with
35924  * g_socket_client_set_socket_type().
35925  *
35926  * If a local address is specified with g_socket_client_set_local_address() the
35927  * socket will be bound to this address before connecting.
35928  *
35929  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
35930  * Since: 2.22
35931  */
35932
35933
35934 /**
35935  * g_socket_client_connect_async:
35936  * @client: a #GSocketClient
35937  * @connectable: a #GSocketConnectable specifying the remote address.
35938  * @cancellable: (allow-none): a #GCancellable, or %NULL
35939  * @callback: (scope async): a #GAsyncReadyCallback
35940  * @user_data: (closure): user data for the callback
35941  *
35942  * This is the asynchronous version of g_socket_client_connect().
35943  *
35944  * When the operation is finished @callback will be
35945  * called. You can then call g_socket_client_connect_finish() to get
35946  * the result of the operation.
35947  *
35948  * Since: 2.22
35949  */
35950
35951
35952 /**
35953  * g_socket_client_connect_finish:
35954  * @client: a #GSocketClient.
35955  * @result: a #GAsyncResult.
35956  * @error: a #GError location to store the error occurring, or %NULL to ignore.
35957  *
35958  * Finishes an async connect operation. See g_socket_client_connect_async()
35959  *
35960  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
35961  * Since: 2.22
35962  */
35963
35964
35965 /**
35966  * g_socket_client_connect_to_host:
35967  * @client: a #GSocketClient
35968  * @host_and_port: the name and optionally port of the host to connect to
35969  * @default_port: the default port to connect to
35970  * @cancellable: (allow-none): a #GCancellable, or %NULL
35971  * @error: a pointer to a #GError, or %NULL
35972  *
35973  * This is a helper function for g_socket_client_connect().
35974  *
35975  * Attempts to create a TCP connection to the named host.
35976  *
35977  * @host_and_port may be in any of a number of recognized formats; an IPv6
35978  * address, an IPv4 address, or a domain name (in which case a DNS
35979  * lookup is performed).  Quoting with [] is supported for all address
35980  * types.  A port override may be specified in the usual way with a
35981  * colon.  Ports may be given as decimal numbers or symbolic names (in
35982  * which case an /etc/services lookup is performed).
35983  *
35984  * If no port override is given in @host_and_port then @default_port will be
35985  * used as the port number to connect to.
35986  *
35987  * In general, @host_and_port is expected to be provided by the user (allowing
35988  * them to give the hostname, and a port override if necessary) and
35989  * @default_port is expected to be provided by the application.
35990  *
35991  * In the case that an IP address is given, a single connection
35992  * attempt is made.  In the case that a name is given, multiple
35993  * connection attempts may be made, in turn and according to the
35994  * number of address records in DNS, until a connection succeeds.
35995  *
35996  * Upon a successful connection, a new #GSocketConnection is constructed
35997  * and returned.  The caller owns this new object and must drop their
35998  * reference to it when finished with it.
35999  *
36000  * In the event of any failure (DNS error, service not found, no hosts
36001  * connectable) %NULL is returned and @error (if non-%NULL) is set
36002  * accordingly.
36003  *
36004  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
36005  * Since: 2.22
36006  */
36007
36008
36009 /**
36010  * g_socket_client_connect_to_host_async:
36011  * @client: a #GSocketClient
36012  * @host_and_port: the name and optionally the port of the host to connect to
36013  * @default_port: the default port to connect to
36014  * @cancellable: (allow-none): a #GCancellable, or %NULL
36015  * @callback: (scope async): a #GAsyncReadyCallback
36016  * @user_data: (closure): user data for the callback
36017  *
36018  * This is the asynchronous version of g_socket_client_connect_to_host().
36019  *
36020  * When the operation is finished @callback will be
36021  * called. You can then call g_socket_client_connect_to_host_finish() to get
36022  * the result of the operation.
36023  *
36024  * Since: 2.22
36025  */
36026
36027
36028 /**
36029  * g_socket_client_connect_to_host_finish:
36030  * @client: a #GSocketClient.
36031  * @result: a #GAsyncResult.
36032  * @error: a #GError location to store the error occurring, or %NULL to ignore.
36033  *
36034  * Finishes an async connect operation. See g_socket_client_connect_to_host_async()
36035  *
36036  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
36037  * Since: 2.22
36038  */
36039
36040
36041 /**
36042  * g_socket_client_connect_to_service:
36043  * @client: a #GSocketConnection
36044  * @domain: a domain name
36045  * @service: the name of the service to connect to
36046  * @cancellable: (allow-none): a #GCancellable, or %NULL
36047  * @error: a pointer to a #GError, or %NULL
36048  *
36049  * Attempts to create a TCP connection to a service.
36050  *
36051  * This call looks up the SRV record for @service at @domain for the
36052  * "tcp" protocol.  It then attempts to connect, in turn, to each of
36053  * the hosts providing the service until either a connection succeeds
36054  * or there are no hosts remaining.
36055  *
36056  * Upon a successful connection, a new #GSocketConnection is constructed
36057  * and returned.  The caller owns this new object and must drop their
36058  * reference to it when finished with it.
36059  *
36060  * In the event of any failure (DNS error, service not found, no hosts
36061  * connectable) %NULL is returned and @error (if non-%NULL) is set
36062  * accordingly.
36063  *
36064  * Returns: (transfer full): a #GSocketConnection if successful, or %NULL on error
36065  */
36066
36067
36068 /**
36069  * g_socket_client_connect_to_service_async:
36070  * @client: a #GSocketClient
36071  * @domain: a domain name
36072  * @service: the name of the service to connect to
36073  * @cancellable: (allow-none): a #GCancellable, or %NULL
36074  * @callback: (scope async): a #GAsyncReadyCallback
36075  * @user_data: (closure): user data for the callback
36076  *
36077  * This is the asynchronous version of
36078  * g_socket_client_connect_to_service().
36079  *
36080  * Since: 2.22
36081  */
36082
36083
36084 /**
36085  * g_socket_client_connect_to_service_finish:
36086  * @client: a #GSocketClient.
36087  * @result: a #GAsyncResult.
36088  * @error: a #GError location to store the error occurring, or %NULL to ignore.
36089  *
36090  * Finishes an async connect operation. See g_socket_client_connect_to_service_async()
36091  *
36092  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
36093  * Since: 2.22
36094  */
36095
36096
36097 /**
36098  * g_socket_client_connect_to_uri:
36099  * @client: a #GSocketClient
36100  * @uri: A network URI
36101  * @default_port: the default port to connect to
36102  * @cancellable: (allow-none): a #GCancellable, or %NULL
36103  * @error: a pointer to a #GError, or %NULL
36104  *
36105  * This is a helper function for g_socket_client_connect().
36106  *
36107  * Attempts to create a TCP connection with a network URI.
36108  *
36109  * @uri may be any valid URI containing an "authority" (hostname/port)
36110  * component. If a port is not specified in the URI, @default_port
36111  * will be used. TLS will be negotiated if #GSocketClient:tls is %TRUE.
36112  * (#GSocketClient does not know to automatically assume TLS for
36113  * certain URI schemes.)
36114  *
36115  * Using this rather than g_socket_client_connect() or
36116  * g_socket_client_connect_to_host() allows #GSocketClient to
36117  * determine when to use application-specific proxy protocols.
36118  *
36119  * Upon a successful connection, a new #GSocketConnection is constructed
36120  * and returned.  The caller owns this new object and must drop their
36121  * reference to it when finished with it.
36122  *
36123  * In the event of any failure (DNS error, service not found, no hosts
36124  * connectable) %NULL is returned and @error (if non-%NULL) is set
36125  * accordingly.
36126  *
36127  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
36128  * Since: 2.26
36129  */
36130
36131
36132 /**
36133  * g_socket_client_connect_to_uri_async:
36134  * @client: a #GSocketClient
36135  * @uri: a network uri
36136  * @default_port: the default port to connect to
36137  * @cancellable: (allow-none): a #GCancellable, or %NULL
36138  * @callback: (scope async): a #GAsyncReadyCallback
36139  * @user_data: (closure): user data for the callback
36140  *
36141  * This is the asynchronous version of g_socket_client_connect_to_uri().
36142  *
36143  * When the operation is finished @callback will be
36144  * called. You can then call g_socket_client_connect_to_uri_finish() to get
36145  * the result of the operation.
36146  *
36147  * Since: 2.26
36148  */
36149
36150
36151 /**
36152  * g_socket_client_connect_to_uri_finish:
36153  * @client: a #GSocketClient.
36154  * @result: a #GAsyncResult.
36155  * @error: a #GError location to store the error occurring, or %NULL to ignore.
36156  *
36157  * Finishes an async connect operation. See g_socket_client_connect_to_uri_async()
36158  *
36159  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
36160  * Since: 2.26
36161  */
36162
36163
36164 /**
36165  * g_socket_client_get_enable_proxy:
36166  * @client: a #GSocketClient.
36167  *
36168  * Gets the proxy enable state; see g_socket_client_set_enable_proxy()
36169  *
36170  * Returns: whether proxying is enabled
36171  * Since: 2.26
36172  */
36173
36174
36175 /**
36176  * g_socket_client_get_family:
36177  * @client: a #GSocketClient.
36178  *
36179  * Gets the socket family of the socket client.
36180  *
36181  * See g_socket_client_set_family() for details.
36182  *
36183  * Returns: a #GSocketFamily
36184  * Since: 2.22
36185  */
36186
36187
36188 /**
36189  * g_socket_client_get_local_address:
36190  * @client: a #GSocketClient.
36191  *
36192  * Gets the local address of the socket client.
36193  *
36194  * See g_socket_client_set_local_address() for details.
36195  *
36196  * Returns: (transfer none): a #GSocketAddress or %NULL. Do not free.
36197  * Since: 2.22
36198  */
36199
36200
36201 /**
36202  * g_socket_client_get_protocol:
36203  * @client: a #GSocketClient
36204  *
36205  * Gets the protocol name type of the socket client.
36206  *
36207  * See g_socket_client_set_protocol() for details.
36208  *
36209  * Returns: a #GSocketProtocol
36210  * Since: 2.22
36211  */
36212
36213
36214 /**
36215  * g_socket_client_get_socket_type:
36216  * @client: a #GSocketClient.
36217  *
36218  * Gets the socket type of the socket client.
36219  *
36220  * See g_socket_client_set_socket_type() for details.
36221  *
36222  * Returns: a #GSocketFamily
36223  * Since: 2.22
36224  */
36225
36226
36227 /**
36228  * g_socket_client_get_timeout:
36229  * @client: a #GSocketClient
36230  *
36231  * Gets the I/O timeout time for sockets created by @client.
36232  *
36233  * See g_socket_client_set_timeout() for details.
36234  *
36235  * Returns: the timeout in seconds
36236  * Since: 2.26
36237  */
36238
36239
36240 /**
36241  * g_socket_client_get_tls:
36242  * @client: a #GSocketClient.
36243  *
36244  * Gets whether @client creates TLS connections. See
36245  * g_socket_client_set_tls() for details.
36246  *
36247  * Returns: whether @client uses TLS
36248  * Since: 2.28
36249  */
36250
36251
36252 /**
36253  * g_socket_client_get_tls_validation_flags:
36254  * @client: a #GSocketClient.
36255  *
36256  * Gets the TLS validation flags used creating TLS connections via
36257  * @client.
36258  *
36259  * Returns: the TLS validation flags
36260  * Since: 2.28
36261  */
36262
36263
36264 /**
36265  * g_socket_client_new:
36266  *
36267  * Creates a new #GSocketClient with the default options.
36268  *
36269  * Free the returned object with g_object_unref().
36270  *
36271  * Returns: a #GSocketClient.
36272  * Since: 2.22
36273  */
36274
36275
36276 /**
36277  * g_socket_client_set_enable_proxy:
36278  * @client: a #GSocketClient.
36279  * @enable: whether to enable proxies
36280  *
36281  * Sets whether or not @client attempts to make connections via a
36282  * proxy server. When enabled (the default), #GSocketClient will use a
36283  * #GProxyResolver to determine if a proxy protocol such as SOCKS is
36284  * needed, and automatically do the necessary proxy negotiation.
36285  *
36286  * Since: 2.26
36287  */
36288
36289
36290 /**
36291  * g_socket_client_set_family:
36292  * @client: a #GSocketClient.
36293  * @family: a #GSocketFamily
36294  *
36295  * Sets the socket family of the socket client.
36296  * If this is set to something other than %G_SOCKET_FAMILY_INVALID
36297  * then the sockets created by this object will be of the specified
36298  * family.
36299  *
36300  * This might be useful for instance if you want to force the local
36301  * connection to be an ipv4 socket, even though the address might
36302  * be an ipv6 mapped to ipv4 address.
36303  *
36304  * Since: 2.22
36305  */
36306
36307
36308 /**
36309  * g_socket_client_set_local_address:
36310  * @client: a #GSocketClient.
36311  * @address: a #GSocketAddress, or %NULL
36312  *
36313  * Sets the local address of the socket client.
36314  * The sockets created by this object will bound to the
36315  * specified address (if not %NULL) before connecting.
36316  *
36317  * This is useful if you want to ensure that the local
36318  * side of the connection is on a specific port, or on
36319  * a specific interface.
36320  *
36321  * Since: 2.22
36322  */
36323
36324
36325 /**
36326  * g_socket_client_set_protocol:
36327  * @client: a #GSocketClient.
36328  * @protocol: a #GSocketProtocol
36329  *
36330  * Sets the protocol of the socket client.
36331  * The sockets created by this object will use of the specified
36332  * protocol.
36333  *
36334  * If @protocol is %0 that means to use the default
36335  * protocol for the socket family and type.
36336  *
36337  * Since: 2.22
36338  */
36339
36340
36341 /**
36342  * g_socket_client_set_socket_type:
36343  * @client: a #GSocketClient.
36344  * @type: a #GSocketType
36345  *
36346  * Sets the socket type of the socket client.
36347  * The sockets created by this object will be of the specified
36348  * type.
36349  *
36350  * It doesn't make sense to specify a type of %G_SOCKET_TYPE_DATAGRAM,
36351  * as GSocketClient is used for connection oriented services.
36352  *
36353  * Since: 2.22
36354  */
36355
36356
36357 /**
36358  * g_socket_client_set_timeout:
36359  * @client: a #GSocketClient.
36360  * @timeout: the timeout
36361  *
36362  * Sets the I/O timeout for sockets created by @client. @timeout is a
36363  * time in seconds, or 0 for no timeout (the default).
36364  *
36365  * The timeout value affects the initial connection attempt as well,
36366  * so setting this may cause calls to g_socket_client_connect(), etc,
36367  * to fail with %G_IO_ERROR_TIMED_OUT.
36368  *
36369  * Since: 2.26
36370  */
36371
36372
36373 /**
36374  * g_socket_client_set_tls:
36375  * @client: a #GSocketClient.
36376  * @tls: whether to use TLS
36377  *
36378  * Sets whether @client creates TLS (aka SSL) connections. If @tls is
36379  * %TRUE, @client will wrap its connections in a #GTlsClientConnection
36380  * and perform a TLS handshake when connecting.
36381  *
36382  * Note that since #GSocketClient must return a #GSocketConnection,
36383  * but #GTlsClientConnection is not a #GSocketConnection, this
36384  * actually wraps the resulting #GTlsClientConnection in a
36385  * #GTcpWrapperConnection when returning it. You can use
36386  * g_tcp_wrapper_connection_get_base_io_stream() on the return value
36387  * to extract the #GTlsClientConnection.
36388  *
36389  * If you need to modify the behavior of the TLS handshake (eg, by
36390  * setting a client-side certificate to use, or connecting to the
36391  * #GTlsConnection::accept-certificate signal), you can connect to
36392  * @client's #GSocketClient::event signal and wait for it to be
36393  * emitted with %G_SOCKET_CLIENT_TLS_HANDSHAKING, which will give you
36394  * a chance to see the #GTlsClientConnection before the handshake
36395  * starts.
36396  *
36397  * Since: 2.28
36398  */
36399
36400
36401 /**
36402  * g_socket_client_set_tls_validation_flags:
36403  * @client: a #GSocketClient.
36404  * @flags: the validation flags
36405  *
36406  * Sets the TLS validation flags used when creating TLS connections
36407  * via @client. The default value is %G_TLS_CERTIFICATE_VALIDATE_ALL.
36408  *
36409  * Since: 2.28
36410  */
36411
36412
36413 /**
36414  * g_socket_close:
36415  * @socket: a #GSocket
36416  * @error: #GError for error reporting, or %NULL to ignore.
36417  *
36418  * Closes the socket, shutting down any active connection.
36419  *
36420  * Closing a socket does not wait for all outstanding I/O operations
36421  * to finish, so the caller should not rely on them to be guaranteed
36422  * to complete even if the close returns with no error.
36423  *
36424  * Once the socket is closed, all other operations will return
36425  * %G_IO_ERROR_CLOSED. Closing a socket multiple times will not
36426  * return an error.
36427  *
36428  * Sockets will be automatically closed when the last reference
36429  * is dropped, but you might want to call this function to make sure
36430  * resources are released as early as possible.
36431  *
36432  * Beware that due to the way that TCP works, it is possible for
36433  * recently-sent data to be lost if either you close a socket while the
36434  * %G_IO_IN condition is set, or else if the remote connection tries to
36435  * send something to you after you close the socket but before it has
36436  * finished reading all of the data you sent. There is no easy generic
36437  * way to avoid this problem; the easiest fix is to design the network
36438  * protocol such that the client will never send data "out of turn".
36439  * Another solution is for the server to half-close the connection by
36440  * calling g_socket_shutdown() with only the @shutdown_write flag set,
36441  * and then wait for the client to notice this and close its side of the
36442  * connection, after which the server can safely call g_socket_close().
36443  * (This is what #GTcpConnection does if you call
36444  * g_tcp_connection_set_graceful_disconnect(). But of course, this
36445  * only works if the client will close its connection after the server
36446  * does.)
36447  *
36448  * Returns: %TRUE on success, %FALSE on error
36449  * Since: 2.22
36450  */
36451
36452
36453 /**
36454  * g_socket_condition_check:
36455  * @socket: a #GSocket
36456  * @condition: a #GIOCondition mask to check
36457  *
36458  * Checks on the readiness of @socket to perform operations.
36459  * The operations specified in @condition are checked for and masked
36460  * against the currently-satisfied conditions on @socket. The result
36461  * is returned.
36462  *
36463  * Note that on Windows, it is possible for an operation to return
36464  * %G_IO_ERROR_WOULD_BLOCK even immediately after
36465  * g_socket_condition_check() has claimed that the socket is ready for
36466  * writing. Rather than calling g_socket_condition_check() and then
36467  * writing to the socket if it succeeds, it is generally better to
36468  * simply try writing to the socket right away, and try again later if
36469  * the initial attempt returns %G_IO_ERROR_WOULD_BLOCK.
36470  *
36471  * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition;
36472  * these conditions will always be set in the output if they are true.
36473  *
36474  * This call never blocks.
36475  *
36476  * Returns: the @GIOCondition mask of the current state
36477  * Since: 2.22
36478  */
36479
36480
36481 /**
36482  * g_socket_condition_wait:
36483  * @socket: a #GSocket
36484  * @condition: a #GIOCondition mask to wait for
36485  * @cancellable: (allow-none): a #GCancellable, or %NULL
36486  * @error: a #GError pointer, or %NULL
36487  *
36488  * Waits for @condition to become true on @socket. When the condition
36489  * is met, %TRUE is returned.
36490  *
36491  * If @cancellable is cancelled before the condition is met, or if the
36492  * socket has a timeout set and it is reached before the condition is
36493  * met, then %FALSE is returned and @error, if non-%NULL, is set to
36494  * the appropriate value (%G_IO_ERROR_CANCELLED or
36495  * %G_IO_ERROR_TIMED_OUT).
36496  *
36497  * Returns: %TRUE if the condition was met, %FALSE otherwise
36498  * Since: 2.22
36499  */
36500
36501
36502 /**
36503  * g_socket_connect:
36504  * @socket: a #GSocket.
36505  * @address: a #GSocketAddress specifying the remote address.
36506  * @cancellable: (allow-none): a %GCancellable or %NULL
36507  * @error: #GError for error reporting, or %NULL to ignore.
36508  *
36509  * Connect the socket to the specified remote address.
36510  *
36511  * For connection oriented socket this generally means we attempt to make
36512  * a connection to the @address. For a connection-less socket it sets
36513  * the default address for g_socket_send() and discards all incoming datagrams
36514  * from other sources.
36515  *
36516  * Generally connection oriented sockets can only connect once, but
36517  * connection-less sockets can connect multiple times to change the
36518  * default address.
36519  *
36520  * If the connect call needs to do network I/O it will block, unless
36521  * non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
36522  * and the user can be notified of the connection finishing by waiting
36523  * for the G_IO_OUT condition. The result of the connection must then be
36524  * checked with g_socket_check_connect_result().
36525  *
36526  * Returns: %TRUE if connected, %FALSE on error.
36527  * Since: 2.22
36528  */
36529
36530
36531 /**
36532  * g_socket_connectable_enumerate:
36533  * @connectable: a #GSocketConnectable
36534  *
36535  * Creates a #GSocketAddressEnumerator for @connectable.
36536  *
36537  * Returns: (transfer full): a new #GSocketAddressEnumerator.
36538  * Since: 2.22
36539  */
36540
36541
36542 /**
36543  * g_socket_connectable_proxy_enumerate:
36544  * @connectable: a #GSocketConnectable
36545  *
36546  * Creates a #GSocketAddressEnumerator for @connectable that will
36547  * return #GProxyAddress<!-- -->es for addresses that you must connect
36548  * to via a proxy.
36549  *
36550  * If @connectable does not implement
36551  * g_socket_connectable_proxy_enumerate(), this will fall back to
36552  * calling g_socket_connectable_enumerate().
36553  *
36554  * Returns: (transfer full): a new #GSocketAddressEnumerator.
36555  * Since: 2.26
36556  */
36557
36558
36559 /**
36560  * g_socket_connection_connect:
36561  * @connection: a #GSocketConnection
36562  * @address: a #GSocketAddress specifying the remote address.
36563  * @cancellable: (allow-none): a %GCancellable or %NULL
36564  * @error: #GError for error reporting, or %NULL to ignore.
36565  *
36566  * Connect @connection to the specified remote address.
36567  *
36568  * Returns: %TRUE if the connection succeeded, %FALSE on error
36569  * Since: 2.32
36570  */
36571
36572
36573 /**
36574  * g_socket_connection_connect_async:
36575  * @connection: a #GSocketConnection
36576  * @address: a #GSocketAddress specifying the remote address.
36577  * @cancellable: (allow-none): a %GCancellable or %NULL
36578  * @callback: (scope async): a #GAsyncReadyCallback
36579  * @user_data: (closure): user data for the callback
36580  *
36581  * Asynchronously connect @connection to the specified remote address.
36582  *
36583  * This clears the #GSocket:blocking flag on @connection's underlying
36584  * socket if it is currently set.
36585  *
36586  * Use g_socket_connection_connect_finish() to retrieve the result.
36587  *
36588  * Since: 2.32
36589  */
36590
36591
36592 /**
36593  * g_socket_connection_connect_finish:
36594  * @connection: a #GSocketConnection
36595  * @result: the #GAsyncResult
36596  * @error: #GError for error reporting, or %NULL to ignore.
36597  *
36598  * Gets the result of a g_socket_connection_connect_async() call.
36599  *
36600  * Returns: %TRUE if the connection succeeded, %FALSE on error
36601  * Since: 2.32
36602  */
36603
36604
36605 /**
36606  * g_socket_connection_factory_create_connection:
36607  * @socket: a #GSocket
36608  *
36609  * Creates a #GSocketConnection subclass of the right type for
36610  * @socket.
36611  *
36612  * Returns: (transfer full): a #GSocketConnection
36613  * Since: 2.22
36614  */
36615
36616
36617 /**
36618  * g_socket_connection_factory_lookup_type:
36619  * @family: a #GSocketFamily
36620  * @type: a #GSocketType
36621  * @protocol_id: a protocol id
36622  *
36623  * Looks up the #GType to be used when creating socket connections on
36624  * sockets with the specified @family, @type and @protocol_id.
36625  *
36626  * If no type is registered, the #GSocketConnection base type is returned.
36627  *
36628  * Returns: a #GType
36629  * Since: 2.22
36630  */
36631
36632
36633 /**
36634  * g_socket_connection_factory_register_type:
36635  * @g_type: a #GType, inheriting from %G_TYPE_SOCKET_CONNECTION
36636  * @family: a #GSocketFamily
36637  * @type: a #GSocketType
36638  * @protocol: a protocol id
36639  *
36640  * Looks up the #GType to be used when creating socket connections on
36641  * sockets with the specified @family, @type and @protocol.
36642  *
36643  * If no type is registered, the #GSocketConnection base type is returned.
36644  *
36645  * Since: 2.22
36646  */
36647
36648
36649 /**
36650  * g_socket_connection_get_local_address:
36651  * @connection: a #GSocketConnection
36652  * @error: #GError for error reporting, or %NULL to ignore.
36653  *
36654  * Try to get the local address of a socket connection.
36655  *
36656  * Free the returned object with g_object_unref().
36657  *
36658  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
36659  * Since: 2.22
36660  */
36661
36662
36663 /**
36664  * g_socket_connection_get_remote_address:
36665  * @connection: a #GSocketConnection
36666  * @error: #GError for error reporting, or %NULL to ignore.
36667  *
36668  * Try to get the remote address of a socket connection.
36669  *
36670  * Free the returned object with g_object_unref().
36671  *
36672  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
36673  * Since: 2.22
36674  */
36675
36676
36677 /**
36678  * g_socket_connection_get_socket:
36679  * @connection: a #GSocketConnection
36680  *
36681  * Gets the underlying #GSocket object of the connection.
36682  * This can be useful if you want to do something unusual on it
36683  * not supported by the #GSocketConnection APIs.
36684  *
36685  * Returns: (transfer none): a #GSocketAddress or %NULL on error.
36686  * Since: 2.22
36687  */
36688
36689
36690 /**
36691  * g_socket_connection_is_connected:
36692  * @connection: a #GSocketConnection
36693  *
36694  * Checks if @connection is connected. This is equivalent to calling
36695  * g_socket_is_connected() on @connection's underlying #GSocket.
36696  *
36697  * Returns: whether @connection is connected
36698  * Since: 2.32
36699  */
36700
36701
36702 /**
36703  * g_socket_control_message_deserialize:
36704  * @level: a socket level
36705  * @type: a socket control message type for the given @level
36706  * @size: the size of the data in bytes
36707  * @data: (array length=size) (element-type guint8): pointer to the message data
36708  *
36709  * Tries to deserialize a socket control message of a given
36710  * @level and @type. This will ask all known (to GType) subclasses
36711  * of #GSocketControlMessage if they can understand this kind
36712  * of message and if so deserialize it into a #GSocketControlMessage.
36713  *
36714  * If there is no implementation for this kind of control message, %NULL
36715  * will be returned.
36716  *
36717  * Returns: (transfer full): the deserialized message or %NULL
36718  * Since: 2.22
36719  */
36720
36721
36722 /**
36723  * g_socket_control_message_get_level:
36724  * @message: a #GSocketControlMessage
36725  *
36726  * Returns the "level" (i.e. the originating protocol) of the control message.
36727  * This is often SOL_SOCKET.
36728  *
36729  * Returns: an integer describing the level
36730  * Since: 2.22
36731  */
36732
36733
36734 /**
36735  * g_socket_control_message_get_msg_type:
36736  * @message: a #GSocketControlMessage
36737  *
36738  * Returns the protocol specific type of the control message.
36739  * For instance, for UNIX fd passing this would be SCM_RIGHTS.
36740  *
36741  * Returns: an integer describing the type of control message
36742  * Since: 2.22
36743  */
36744
36745
36746 /**
36747  * g_socket_control_message_get_size:
36748  * @message: a #GSocketControlMessage
36749  *
36750  * Returns the space required for the control message, not including
36751  * headers or alignment.
36752  *
36753  * Returns: The number of bytes required.
36754  * Since: 2.22
36755  */
36756
36757
36758 /**
36759  * g_socket_control_message_serialize:
36760  * @message: a #GSocketControlMessage
36761  * @data: A buffer to write data to
36762  *
36763  * Converts the data in the message to bytes placed in the
36764  * message.
36765  *
36766  * @data is guaranteed to have enough space to fit the size
36767  * returned by g_socket_control_message_get_size() on this
36768  * object.
36769  *
36770  * Since: 2.22
36771  */
36772
36773
36774 /**
36775  * g_socket_create_source: (skip)
36776  * @socket: a #GSocket
36777  * @condition: a #GIOCondition mask to monitor
36778  * @cancellable: (allow-none): a %GCancellable or %NULL
36779  *
36780  * Creates a %GSource that can be attached to a %GMainContext to monitor
36781  * for the availibility of the specified @condition on the socket.
36782  *
36783  * The callback on the source is of the #GSocketSourceFunc type.
36784  *
36785  * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition;
36786  * these conditions will always be reported output if they are true.
36787  *
36788  * @cancellable if not %NULL can be used to cancel the source, which will
36789  * cause the source to trigger, reporting the current condition (which
36790  * is likely 0 unless cancellation happened at the same time as a
36791  * condition change). You can check for this in the callback using
36792  * g_cancellable_is_cancelled().
36793  *
36794  * If @socket has a timeout set, and it is reached before @condition
36795  * occurs, the source will then trigger anyway, reporting %G_IO_IN or
36796  * %G_IO_OUT depending on @condition. However, @socket will have been
36797  * marked as having had a timeout, and so the next #GSocket I/O method
36798  * you call will then fail with a %G_IO_ERROR_TIMED_OUT.
36799  *
36800  * Returns: (transfer full): a newly allocated %GSource, free with g_source_unref().
36801  * Since: 2.22
36802  */
36803
36804
36805 /**
36806  * g_socket_get_available_bytes:
36807  * @socket: a #GSocket
36808  *
36809  * Get the amount of data pending in the OS input buffer.
36810  *
36811  * without blocking or -1 on error.
36812  *
36813  * Returns: the number of bytes that can be read from the socket
36814  * Since: 2.32
36815  */
36816
36817
36818 /**
36819  * g_socket_get_blocking:
36820  * @socket: a #GSocket.
36821  *
36822  * Gets the blocking mode of the socket. For details on blocking I/O,
36823  * see g_socket_set_blocking().
36824  *
36825  * Returns: %TRUE if blocking I/O is used, %FALSE otherwise.
36826  * Since: 2.22
36827  */
36828
36829
36830 /**
36831  * g_socket_get_broadcast:
36832  * @socket: a #GSocket.
36833  *
36834  * Gets the broadcast setting on @socket; if %TRUE,
36835  * it is possible to send packets to broadcast
36836  * addresses or receive from broadcast addresses.
36837  *
36838  * Returns: the broadcast setting on @socket
36839  * Since: 2.32
36840  */
36841
36842
36843 /**
36844  * g_socket_get_credentials:
36845  * @socket: a #GSocket.
36846  * @error: #GError for error reporting, or %NULL to ignore.
36847  *
36848  * Returns the credentials of the foreign process connected to this
36849  * socket, if any (e.g. it is only supported for %G_SOCKET_FAMILY_UNIX
36850  * sockets).
36851  *
36852  * If this operation isn't supported on the OS, the method fails with
36853  * the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented
36854  * by reading the %SO_PEERCRED option on the underlying socket.
36855  *
36856  * Other ways to obtain credentials from a foreign peer includes the
36857  * #GUnixCredentialsMessage type and
36858  * g_unix_connection_send_credentials() /
36859  * g_unix_connection_receive_credentials() functions.
36860  *
36861  * that must be freed with g_object_unref().
36862  *
36863  * Returns: (transfer full): %NULL if @error is set, otherwise a #GCredentials object
36864  * Since: 2.26
36865  */
36866
36867
36868 /**
36869  * g_socket_get_family:
36870  * @socket: a #GSocket.
36871  *
36872  * Gets the socket family of the socket.
36873  *
36874  * Returns: a #GSocketFamily
36875  * Since: 2.22
36876  */
36877
36878
36879 /**
36880  * g_socket_get_fd:
36881  * @socket: a #GSocket.
36882  *
36883  * Returns the underlying OS socket object. On unix this
36884  * is a socket file descriptor, and on windows this is
36885  * a Winsock2 SOCKET handle. This may be useful for
36886  * doing platform specific or otherwise unusual operations
36887  * on the socket.
36888  *
36889  * Returns: the file descriptor of the socket.
36890  * Since: 2.22
36891  */
36892
36893
36894 /**
36895  * g_socket_get_keepalive:
36896  * @socket: a #GSocket.
36897  *
36898  * Gets the keepalive mode of the socket. For details on this,
36899  * see g_socket_set_keepalive().
36900  *
36901  * Returns: %TRUE if keepalive is active, %FALSE otherwise.
36902  * Since: 2.22
36903  */
36904
36905
36906 /**
36907  * g_socket_get_listen_backlog:
36908  * @socket: a #GSocket.
36909  *
36910  * Gets the listen backlog setting of the socket. For details on this,
36911  * see g_socket_set_listen_backlog().
36912  *
36913  * Returns: the maximum number of pending connections.
36914  * Since: 2.22
36915  */
36916
36917
36918 /**
36919  * g_socket_get_local_address:
36920  * @socket: a #GSocket.
36921  * @error: #GError for error reporting, or %NULL to ignore.
36922  *
36923  * Try to get the local address of a bound socket. This is only
36924  * useful if the socket has been bound to a local address,
36925  * either explicitly or implicitly when connecting.
36926  *
36927  * Free the returned object with g_object_unref().
36928  *
36929  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
36930  * Since: 2.22
36931  */
36932
36933
36934 /**
36935  * g_socket_get_multicast_loopback:
36936  * @socket: a #GSocket.
36937  *
36938  * Gets the multicast loopback setting on @socket; if %TRUE (the
36939  * default), outgoing multicast packets will be looped back to
36940  * multicast listeners on the same host.
36941  *
36942  * Returns: the multicast loopback setting on @socket
36943  * Since: 2.32
36944  */
36945
36946
36947 /**
36948  * g_socket_get_multicast_ttl:
36949  * @socket: a #GSocket.
36950  *
36951  * Gets the multicast time-to-live setting on @socket; see
36952  * g_socket_set_multicast_ttl() for more details.
36953  *
36954  * Returns: the multicast time-to-live setting on @socket
36955  * Since: 2.32
36956  */
36957
36958
36959 /**
36960  * g_socket_get_protocol:
36961  * @socket: a #GSocket.
36962  *
36963  * Gets the socket protocol id the socket was created with.
36964  * In case the protocol is unknown, -1 is returned.
36965  *
36966  * Returns: a protocol id, or -1 if unknown
36967  * Since: 2.22
36968  */
36969
36970
36971 /**
36972  * g_socket_get_remote_address:
36973  * @socket: a #GSocket.
36974  * @error: #GError for error reporting, or %NULL to ignore.
36975  *
36976  * Try to get the remove address of a connected socket. This is only
36977  * useful for connection oriented sockets that have been connected.
36978  *
36979  * Free the returned object with g_object_unref().
36980  *
36981  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
36982  * Since: 2.22
36983  */
36984
36985
36986 /**
36987  * g_socket_get_socket_type:
36988  * @socket: a #GSocket.
36989  *
36990  * Gets the socket type of the socket.
36991  *
36992  * Returns: a #GSocketType
36993  * Since: 2.22
36994  */
36995
36996
36997 /**
36998  * g_socket_get_timeout:
36999  * @socket: a #GSocket.
37000  *
37001  * Gets the timeout setting of the socket. For details on this, see
37002  * g_socket_set_timeout().
37003  *
37004  * Returns: the timeout in seconds
37005  * Since: 2.26
37006  */
37007
37008
37009 /**
37010  * g_socket_get_ttl:
37011  * @socket: a #GSocket.
37012  *
37013  * Gets the unicast time-to-live setting on @socket; see
37014  * g_socket_set_ttl() for more details.
37015  *
37016  * Returns: the time-to-live setting on @socket
37017  * Since: 2.32
37018  */
37019
37020
37021 /**
37022  * g_socket_is_closed:
37023  * @socket: a #GSocket
37024  *
37025  * Checks whether a socket is closed.
37026  *
37027  * Returns: %TRUE if socket is closed, %FALSE otherwise
37028  * Since: 2.22
37029  */
37030
37031
37032 /**
37033  * g_socket_is_connected:
37034  * @socket: a #GSocket.
37035  *
37036  * Check whether the socket is connected. This is only useful for
37037  * connection-oriented sockets.
37038  *
37039  * Returns: %TRUE if socket is connected, %FALSE otherwise.
37040  * Since: 2.22
37041  */
37042
37043
37044 /**
37045  * g_socket_join_multicast_group:
37046  * @socket: a #GSocket.
37047  * @group: a #GInetAddress specifying the group address to join.
37048  * @iface: (allow-none): Name of the interface to use, or %NULL
37049  * @source_specific: %TRUE if source-specific multicast should be used
37050  * @error: #GError for error reporting, or %NULL to ignore.
37051  *
37052  * Registers @socket to receive multicast messages sent to @group.
37053  * @socket must be a %G_SOCKET_TYPE_DATAGRAM socket, and must have
37054  * been bound to an appropriate interface and port with
37055  * g_socket_bind().
37056  *
37057  * If @iface is %NULL, the system will automatically pick an interface
37058  * to bind to based on @group.
37059  *
37060  * If @source_specific is %TRUE, source-specific multicast as defined
37061  * in RFC 4604 is used. Note that on older platforms this may fail
37062  * with a %G_IO_ERROR_NOT_SUPPORTED error.
37063  *
37064  * Returns: %TRUE on success, %FALSE on error.
37065  * Since: 2.32
37066  */
37067
37068
37069 /**
37070  * g_socket_leave_multicast_group:
37071  * @socket: a #GSocket.
37072  * @group: a #GInetAddress specifying the group address to leave.
37073  * @iface: (allow-none): Interface used
37074  * @source_specific: %TRUE if source-specific multicast was used
37075  * @error: #GError for error reporting, or %NULL to ignore.
37076  *
37077  * Removes @socket from the multicast group defined by @group, @iface,
37078  * and @source_specific (which must all have the same values they had
37079  * when you joined the group).
37080  *
37081  * @socket remains bound to its address and port, and can still receive
37082  * unicast messages after calling this.
37083  *
37084  * Returns: %TRUE on success, %FALSE on error.
37085  * Since: 2.32
37086  */
37087
37088
37089 /**
37090  * g_socket_listen:
37091  * @socket: a #GSocket.
37092  * @error: #GError for error reporting, or %NULL to ignore.
37093  *
37094  * Marks the socket as a server socket, i.e. a socket that is used
37095  * to accept incoming requests using g_socket_accept().
37096  *
37097  * Before calling this the socket must be bound to a local address using
37098  * g_socket_bind().
37099  *
37100  * To set the maximum amount of outstanding clients, use
37101  * g_socket_set_listen_backlog().
37102  *
37103  * Returns: %TRUE on success, %FALSE on error.
37104  * Since: 2.22
37105  */
37106
37107
37108 /**
37109  * g_socket_listener_accept:
37110  * @listener: a #GSocketListener
37111  * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL
37112  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
37113  * @error: #GError for error reporting, or %NULL to ignore.
37114  *
37115  * Blocks waiting for a client to connect to any of the sockets added
37116  * to the listener. Returns a #GSocketConnection for the socket that was
37117  * accepted.
37118  *
37119  * If @source_object is not %NULL it will be filled out with the source
37120  * object specified when the corresponding socket or address was added
37121  * to the listener.
37122  *
37123  * If @cancellable is not %NULL, then the operation can be cancelled by
37124  * triggering the cancellable object from another thread. If the operation
37125  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
37126  *
37127  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
37128  * Since: 2.22
37129  */
37130
37131
37132 /**
37133  * g_socket_listener_accept_async:
37134  * @listener: a #GSocketListener
37135  * @cancellable: (allow-none): a #GCancellable, or %NULL
37136  * @callback: (scope async): a #GAsyncReadyCallback
37137  * @user_data: (closure): user data for the callback
37138  *
37139  * This is the asynchronous version of g_socket_listener_accept().
37140  *
37141  * When the operation is finished @callback will be
37142  * called. You can then call g_socket_listener_accept_socket()
37143  * to get the result of the operation.
37144  *
37145  * Since: 2.22
37146  */
37147
37148
37149 /**
37150  * g_socket_listener_accept_finish:
37151  * @listener: a #GSocketListener
37152  * @result: a #GAsyncResult.
37153  * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
37154  * @error: a #GError location to store the error occurring, or %NULL to ignore.
37155  *
37156  * Finishes an async accept operation. See g_socket_listener_accept_async()
37157  *
37158  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
37159  * Since: 2.22
37160  */
37161
37162
37163 /**
37164  * g_socket_listener_accept_socket:
37165  * @listener: a #GSocketListener
37166  * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL.
37167  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
37168  * @error: #GError for error reporting, or %NULL to ignore.
37169  *
37170  * Blocks waiting for a client to connect to any of the sockets added
37171  * to the listener. Returns the #GSocket that was accepted.
37172  *
37173  * If you want to accept the high-level #GSocketConnection, not a #GSocket,
37174  * which is often the case, then you should use g_socket_listener_accept()
37175  * instead.
37176  *
37177  * If @source_object is not %NULL it will be filled out with the source
37178  * object specified when the corresponding socket or address was added
37179  * to the listener.
37180  *
37181  * If @cancellable is not %NULL, then the operation can be cancelled by
37182  * triggering the cancellable object from another thread. If the operation
37183  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
37184  *
37185  * Returns: (transfer full): a #GSocket on success, %NULL on error.
37186  * Since: 2.22
37187  */
37188
37189
37190 /**
37191  * g_socket_listener_accept_socket_async:
37192  * @listener: a #GSocketListener
37193  * @cancellable: (allow-none): a #GCancellable, or %NULL
37194  * @callback: (scope async): a #GAsyncReadyCallback
37195  * @user_data: (closure): user data for the callback
37196  *
37197  * This is the asynchronous version of g_socket_listener_accept_socket().
37198  *
37199  * When the operation is finished @callback will be
37200  * called. You can then call g_socket_listener_accept_socket_finish()
37201  * to get the result of the operation.
37202  *
37203  * Since: 2.22
37204  */
37205
37206
37207 /**
37208  * g_socket_listener_accept_socket_finish:
37209  * @listener: a #GSocketListener
37210  * @result: a #GAsyncResult.
37211  * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
37212  * @error: a #GError location to store the error occurring, or %NULL to ignore.
37213  *
37214  * Finishes an async accept operation. See g_socket_listener_accept_socket_async()
37215  *
37216  * Returns: (transfer full): a #GSocket on success, %NULL on error.
37217  * Since: 2.22
37218  */
37219
37220
37221 /**
37222  * g_socket_listener_add_address:
37223  * @listener: a #GSocketListener
37224  * @address: a #GSocketAddress
37225  * @type: a #GSocketType
37226  * @protocol: a #GSocketProtocol
37227  * @source_object: (allow-none): Optional #GObject identifying this source
37228  * @effective_address: (out) (allow-none): location to store the address that was bound to, or %NULL.
37229  * @error: #GError for error reporting, or %NULL to ignore.
37230  *
37231  * Creates a socket of type @type and protocol @protocol, binds
37232  * it to @address and adds it to the set of sockets we're accepting
37233  * sockets from.
37234  *
37235  * Note that adding an IPv6 address, depending on the platform,
37236  * may or may not result in a listener that also accepts IPv4
37237  * connections.  For more deterministic behavior, see
37238  * g_socket_listener_add_inet_port().
37239  *
37240  * @source_object will be passed out in the various calls
37241  * to accept to identify this particular source, which is
37242  * useful if you're listening on multiple addresses and do
37243  * different things depending on what address is connected to.
37244  *
37245  * If successful and @effective_address is non-%NULL then it will
37246  * be set to the address that the binding actually occurred at.  This
37247  * is helpful for determining the port number that was used for when
37248  * requesting a binding to port 0 (ie: "any port").  This address, if
37249  * requested, belongs to the caller and must be freed.
37250  *
37251  * Returns: %TRUE on success, %FALSE on error.
37252  * Since: 2.22
37253  */
37254
37255
37256 /**
37257  * g_socket_listener_add_any_inet_port:
37258  * @listener: a #GSocketListener
37259  * @source_object: (allow-none): Optional #GObject identifying this source
37260  * @error: a #GError location to store the error occurring, or %NULL to ignore.
37261  *
37262  * Listens for TCP connections on any available port number for both
37263  * IPv6 and IPv4 (if each is available).
37264  *
37265  * This is useful if you need to have a socket for incoming connections
37266  * but don't care about the specific port number.
37267  *
37268  * @source_object will be passed out in the various calls
37269  * to accept to identify this particular source, which is
37270  * useful if you're listening on multiple addresses and do
37271  * different things depending on what address is connected to.
37272  *
37273  * Returns: the port number, or 0 in case of failure.
37274  * Since: 2.24
37275  */
37276
37277
37278 /**
37279  * g_socket_listener_add_inet_port:
37280  * @listener: a #GSocketListener
37281  * @port: an IP port number (non-zero)
37282  * @source_object: (allow-none): Optional #GObject identifying this source
37283  * @error: #GError for error reporting, or %NULL to ignore.
37284  *
37285  * Helper function for g_socket_listener_add_address() that
37286  * creates a TCP/IP socket listening on IPv4 and IPv6 (if
37287  * supported) on the specified port on all interfaces.
37288  *
37289  * @source_object will be passed out in the various calls
37290  * to accept to identify this particular source, which is
37291  * useful if you're listening on multiple addresses and do
37292  * different things depending on what address is connected to.
37293  *
37294  * Returns: %TRUE on success, %FALSE on error.
37295  * Since: 2.22
37296  */
37297
37298
37299 /**
37300  * g_socket_listener_add_socket:
37301  * @listener: a #GSocketListener
37302  * @socket: a listening #GSocket
37303  * @source_object: (allow-none): Optional #GObject identifying this source
37304  * @error: #GError for error reporting, or %NULL to ignore.
37305  *
37306  * Adds @socket to the set of sockets that we try to accept
37307  * new clients from. The socket must be bound to a local
37308  * address and listened to.
37309  *
37310  * @source_object will be passed out in the various calls
37311  * to accept to identify this particular source, which is
37312  * useful if you're listening on multiple addresses and do
37313  * different things depending on what address is connected to.
37314  *
37315  * Returns: %TRUE on success, %FALSE on error.
37316  * Since: 2.22
37317  */
37318
37319
37320 /**
37321  * g_socket_listener_close:
37322  * @listener: a #GSocketListener
37323  *
37324  * Closes all the sockets in the listener.
37325  *
37326  * Since: 2.22
37327  */
37328
37329
37330 /**
37331  * g_socket_listener_new:
37332  *
37333  * Creates a new #GSocketListener with no sockets to listen for.
37334  * New listeners can be added with e.g. g_socket_listener_add_address()
37335  * or g_socket_listener_add_inet_port().
37336  *
37337  * Returns: a new #GSocketListener.
37338  * Since: 2.22
37339  */
37340
37341
37342 /**
37343  * g_socket_listener_set_backlog:
37344  * @listener: a #GSocketListener
37345  * @listen_backlog: an integer
37346  *
37347  * Sets the listen backlog on the sockets in the listener.
37348  *
37349  * See g_socket_set_listen_backlog() for details
37350  *
37351  * Since: 2.22
37352  */
37353
37354
37355 /**
37356  * g_socket_new:
37357  * @family: the socket family to use, e.g. %G_SOCKET_FAMILY_IPV4.
37358  * @type: the socket type to use.
37359  * @protocol: the id of the protocol to use, or 0 for default.
37360  * @error: #GError for error reporting, or %NULL to ignore.
37361  *
37362  * Creates a new #GSocket with the defined family, type and protocol.
37363  * If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type
37364  * for the family and type is used.
37365  *
37366  * The @protocol is a family and type specific int that specifies what
37367  * kind of protocol to use. #GSocketProtocol lists several common ones.
37368  * Many families only support one protocol, and use 0 for this, others
37369  * support several and using 0 means to use the default protocol for
37370  * the family and type.
37371  *
37372  * The protocol id is passed directly to the operating
37373  * system, so you can use protocols not listed in #GSocketProtocol if you
37374  * know the protocol number used for it.
37375  *
37376  * Free the returned object with g_object_unref().
37377  *
37378  * Returns: a #GSocket or %NULL on error.
37379  * Since: 2.22
37380  */
37381
37382
37383 /**
37384  * g_socket_new_from_fd:
37385  * @fd: a native socket file descriptor.
37386  * @error: #GError for error reporting, or %NULL to ignore.
37387  *
37388  * Creates a new #GSocket from a native file descriptor
37389  * or winsock SOCKET handle.
37390  *
37391  * This reads all the settings from the file descriptor so that
37392  * all properties should work. Note that the file descriptor
37393  * will be set to non-blocking mode, independent on the blocking
37394  * mode of the #GSocket.
37395  *
37396  * Free the returned object with g_object_unref().
37397  *
37398  * Returns: a #GSocket or %NULL on error.
37399  * Since: 2.22
37400  */
37401
37402
37403 /**
37404  * g_socket_receive:
37405  * @socket: a #GSocket
37406  * @buffer: a buffer to read data into (which should be at least @size bytes long).
37407  * @size: the number of bytes you want to read from the socket
37408  * @cancellable: (allow-none): a %GCancellable or %NULL
37409  * @error: #GError for error reporting, or %NULL to ignore.
37410  *
37411  * Receive data (up to @size bytes) from a socket. This is mainly used by
37412  * connection-oriented sockets; it is identical to g_socket_receive_from()
37413  * with @address set to %NULL.
37414  *
37415  * For %G_SOCKET_TYPE_DATAGRAM and %G_SOCKET_TYPE_SEQPACKET sockets,
37416  * g_socket_receive() will always read either 0 or 1 complete messages from
37417  * the socket. If the received message is too large to fit in @buffer, then
37418  * the data beyond @size bytes will be discarded, without any explicit
37419  * indication that this has occurred.
37420  *
37421  * For %G_SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any
37422  * number of bytes, up to @size. If more than @size bytes have been
37423  * received, the additional data will be returned in future calls to
37424  * g_socket_receive().
37425  *
37426  * If the socket is in blocking mode the call will block until there
37427  * is some data to receive, the connection is closed, or there is an
37428  * error. If there is no data available and the socket is in
37429  * non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error will be
37430  * returned. To be notified when data is available, wait for the
37431  * %G_IO_IN condition.
37432  *
37433  * On error -1 is returned and @error is set accordingly.
37434  *
37435  * the peer, or -1 on error
37436  *
37437  * Returns: Number of bytes read, or 0 if the connection was closed by
37438  * Since: 2.22
37439  */
37440
37441
37442 /**
37443  * g_socket_receive_from:
37444  * @socket: a #GSocket
37445  * @address: (out) (allow-none): a pointer to a #GSocketAddress pointer, or %NULL
37446  * @buffer: (array length=size) (element-type guint8): a buffer to read data into (which should be at least @size bytes long).
37447  * @size: the number of bytes you want to read from the socket
37448  * @cancellable: (allow-none): a %GCancellable or %NULL
37449  * @error: #GError for error reporting, or %NULL to ignore.
37450  *
37451  * Receive data (up to @size bytes) from a socket.
37452  *
37453  * If @address is non-%NULL then @address will be set equal to the
37454  * source address of the received packet.
37455  * @address is owned by the caller.
37456  *
37457  * See g_socket_receive() for additional information.
37458  *
37459  * the peer, or -1 on error
37460  *
37461  * Returns: Number of bytes read, or 0 if the connection was closed by
37462  * Since: 2.22
37463  */
37464
37465
37466 /**
37467  * g_socket_receive_message:
37468  * @socket: a #GSocket
37469  * @address: (out) (allow-none): a pointer to a #GSocketAddress pointer, or %NULL
37470  * @vectors: (array length=num_vectors): an array of #GInputVector structs
37471  * @num_vectors: the number of elements in @vectors, or -1
37472  * @messages: (array length=num_messages) (allow-none): a pointer which may be filled with an array of #GSocketControlMessages, or %NULL
37473  * @num_messages: a pointer which will be filled with the number of elements in @messages, or %NULL
37474  * @flags: a pointer to an int containing #GSocketMsgFlags flags
37475  * @cancellable: (allow-none): a %GCancellable or %NULL
37476  * @error: a #GError pointer, or %NULL
37477  *
37478  * Receive data from a socket.  This is the most complicated and
37479  * fully-featured version of this call. For easier use, see
37480  * g_socket_receive() and g_socket_receive_from().
37481  *
37482  * If @address is non-%NULL then @address will be set equal to the
37483  * source address of the received packet.
37484  * @address is owned by the caller.
37485  *
37486  * @vector must point to an array of #GInputVector structs and
37487  * @num_vectors must be the length of this array.  These structs
37488  * describe the buffers that received data will be scattered into.
37489  * If @num_vectors is -1, then @vectors is assumed to be terminated
37490  * by a #GInputVector with a %NULL buffer pointer.
37491  *
37492  * As a special case, if @num_vectors is 0 (in which case, @vectors
37493  * may of course be %NULL), then a single byte is received and
37494  * discarded. This is to facilitate the common practice of sending a
37495  * single '\0' byte for the purposes of transferring ancillary data.
37496  *
37497  * @messages, if non-%NULL, will be set to point to a newly-allocated
37498  * array of #GSocketControlMessage instances or %NULL if no such
37499  * messages was received. These correspond to the control messages
37500  * received from the kernel, one #GSocketControlMessage per message
37501  * from the kernel. This array is %NULL-terminated and must be freed
37502  * by the caller using g_free() after calling g_object_unref() on each
37503  * element. If @messages is %NULL, any control messages received will
37504  * be discarded.
37505  *
37506  * @num_messages, if non-%NULL, will be set to the number of control
37507  * messages received.
37508  *
37509  * If both @messages and @num_messages are non-%NULL, then
37510  * @num_messages gives the number of #GSocketControlMessage instances
37511  * in @messages (ie: not including the %NULL terminator).
37512  *
37513  * @flags is an in/out parameter. The commonly available arguments
37514  * for this are available in the #GSocketMsgFlags enum, but the
37515  * values there are the same as the system values, and the flags
37516  * are passed in as-is, so you can pass in system-specific flags too
37517  * (and g_socket_receive_message() may pass system-specific flags out).
37518  *
37519  * As with g_socket_receive(), data may be discarded if @socket is
37520  * %G_SOCKET_TYPE_DATAGRAM or %G_SOCKET_TYPE_SEQPACKET and you do not
37521  * provide enough buffer space to read a complete message. You can pass
37522  * %G_SOCKET_MSG_PEEK in @flags to peek at the current message without
37523  * removing it from the receive queue, but there is no portable way to find
37524  * out the length of the message other than by reading it into a
37525  * sufficiently-large buffer.
37526  *
37527  * If the socket is in blocking mode the call will block until there
37528  * is some data to receive, the connection is closed, or there is an
37529  * error. If there is no data available and the socket is in
37530  * non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error will be
37531  * returned. To be notified when data is available, wait for the
37532  * %G_IO_IN condition.
37533  *
37534  * On error -1 is returned and @error is set accordingly.
37535  *
37536  * the peer, or -1 on error
37537  *
37538  * Returns: Number of bytes read, or 0 if the connection was closed by
37539  * Since: 2.22
37540  */
37541
37542
37543 /**
37544  * g_socket_receive_with_blocking:
37545  * @socket: a #GSocket
37546  * @buffer: a buffer to read data into (which should be at least @size bytes long).
37547  * @size: the number of bytes you want to read from the socket
37548  * @blocking: whether to do blocking or non-blocking I/O
37549  * @cancellable: (allow-none): a %GCancellable or %NULL
37550  * @error: #GError for error reporting, or %NULL to ignore.
37551  *
37552  * This behaves exactly the same as g_socket_receive(), except that
37553  * the choice of blocking or non-blocking behavior is determined by
37554  * the @blocking argument rather than by @socket's properties.
37555  *
37556  * the peer, or -1 on error
37557  *
37558  * Returns: Number of bytes read, or 0 if the connection was closed by
37559  * Since: 2.26
37560  */
37561
37562
37563 /**
37564  * g_socket_send:
37565  * @socket: a #GSocket
37566  * @buffer: (array length=size) (element-type guint8): the buffer containing the data to send.
37567  * @size: the number of bytes to send
37568  * @cancellable: (allow-none): a %GCancellable or %NULL
37569  * @error: #GError for error reporting, or %NULL to ignore.
37570  *
37571  * Tries to send @size bytes from @buffer on the socket. This is
37572  * mainly used by connection-oriented sockets; it is identical to
37573  * g_socket_send_to() with @address set to %NULL.
37574  *
37575  * If the socket is in blocking mode the call will block until there is
37576  * space for the data in the socket queue. If there is no space available
37577  * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
37578  * will be returned. To be notified when space is available, wait for the
37579  * %G_IO_OUT condition. Note though that you may still receive
37580  * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
37581  * notified of a %G_IO_OUT condition. (On Windows in particular, this is
37582  * very common due to the way the underlying APIs work.)
37583  *
37584  * On error -1 is returned and @error is set accordingly.
37585  *
37586  * on error
37587  *
37588  * Returns: Number of bytes written (which may be less than @size), or -1
37589  * Since: 2.22
37590  */
37591
37592
37593 /**
37594  * g_socket_send_message:
37595  * @socket: a #GSocket
37596  * @address: a #GSocketAddress, or %NULL
37597  * @vectors: (array length=num_vectors): an array of #GOutputVector structs
37598  * @num_vectors: the number of elements in @vectors, or -1
37599  * @messages: (array length=num_messages) (allow-none): a pointer to an array of #GSocketControlMessages, or %NULL.
37600  * @num_messages: number of elements in @messages, or -1.
37601  * @flags: an int containing #GSocketMsgFlags flags
37602  * @cancellable: (allow-none): a %GCancellable or %NULL
37603  * @error: #GError for error reporting, or %NULL to ignore.
37604  *
37605  * Send data to @address on @socket.  This is the most complicated and
37606  * fully-featured version of this call. For easier use, see
37607  * g_socket_send() and g_socket_send_to().
37608  *
37609  * If @address is %NULL then the message is sent to the default receiver
37610  * (set by g_socket_connect()).
37611  *
37612  * @vectors must point to an array of #GOutputVector structs and
37613  * @num_vectors must be the length of this array. (If @num_vectors is -1,
37614  * then @vectors is assumed to be terminated by a #GOutputVector with a
37615  * %NULL buffer pointer.) The #GOutputVector structs describe the buffers
37616  * that the sent data will be gathered from. Using multiple
37617  * #GOutputVector<!-- -->s is more memory-efficient than manually copying
37618  * data from multiple sources into a single buffer, and more
37619  * network-efficient than making multiple calls to g_socket_send().
37620  *
37621  * @messages, if non-%NULL, is taken to point to an array of @num_messages
37622  * #GSocketControlMessage instances. These correspond to the control
37623  * messages to be sent on the socket.
37624  * If @num_messages is -1 then @messages is treated as a %NULL-terminated
37625  * array.
37626  *
37627  * @flags modify how the message is sent. The commonly available arguments
37628  * for this are available in the #GSocketMsgFlags enum, but the
37629  * values there are the same as the system values, and the flags
37630  * are passed in as-is, so you can pass in system-specific flags too.
37631  *
37632  * If the socket is in blocking mode the call will block until there is
37633  * space for the data in the socket queue. If there is no space available
37634  * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
37635  * will be returned. To be notified when space is available, wait for the
37636  * %G_IO_OUT condition. Note though that you may still receive
37637  * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
37638  * notified of a %G_IO_OUT condition. (On Windows in particular, this is
37639  * very common due to the way the underlying APIs work.)
37640  *
37641  * On error -1 is returned and @error is set accordingly.
37642  *
37643  * on error
37644  *
37645  * Returns: Number of bytes written (which may be less than @size), or -1
37646  * Since: 2.22
37647  */
37648
37649
37650 /**
37651  * g_socket_send_to:
37652  * @socket: a #GSocket
37653  * @address: a #GSocketAddress, or %NULL
37654  * @buffer: (array length=size) (element-type guint8): the buffer containing the data to send.
37655  * @size: the number of bytes to send
37656  * @cancellable: (allow-none): a %GCancellable or %NULL
37657  * @error: #GError for error reporting, or %NULL to ignore.
37658  *
37659  * Tries to send @size bytes from @buffer to @address. If @address is
37660  * %NULL then the message is sent to the default receiver (set by
37661  * g_socket_connect()).
37662  *
37663  * See g_socket_send() for additional information.
37664  *
37665  * on error
37666  *
37667  * Returns: Number of bytes written (which may be less than @size), or -1
37668  * Since: 2.22
37669  */
37670
37671
37672 /**
37673  * g_socket_send_with_blocking:
37674  * @socket: a #GSocket
37675  * @buffer: (array length=size) (element-type guint8): the buffer containing the data to send.
37676  * @size: the number of bytes to send
37677  * @blocking: whether to do blocking or non-blocking I/O
37678  * @cancellable: (allow-none): a %GCancellable or %NULL
37679  * @error: #GError for error reporting, or %NULL to ignore.
37680  *
37681  * This behaves exactly the same as g_socket_send(), except that
37682  * the choice of blocking or non-blocking behavior is determined by
37683  * the @blocking argument rather than by @socket's properties.
37684  *
37685  * on error
37686  *
37687  * Returns: Number of bytes written (which may be less than @size), or -1
37688  * Since: 2.26
37689  */
37690
37691
37692 /**
37693  * g_socket_service_is_active:
37694  * @service: a #GSocketService
37695  *
37696  * Check whether the service is active or not. An active
37697  * service will accept new clients that connect, while
37698  * a non-active service will let connecting clients queue
37699  * up until the service is started.
37700  *
37701  * Returns: %TRUE if the service is active, %FALSE otherwise
37702  * Since: 2.22
37703  */
37704
37705
37706 /**
37707  * g_socket_service_new:
37708  *
37709  * Creates a new #GSocketService with no sockets to listen for.
37710  * New listeners can be added with e.g. g_socket_listener_add_address()
37711  * or g_socket_listener_add_inet_port().
37712  *
37713  * Returns: a new #GSocketService.
37714  * Since: 2.22
37715  */
37716
37717
37718 /**
37719  * g_socket_service_start:
37720  * @service: a #GSocketService
37721  *
37722  * Starts the service, i.e. start accepting connections
37723  * from the added sockets when the mainloop runs.
37724  *
37725  * This call is thread-safe, so it may be called from a thread
37726  * handling an incoming client request.
37727  *
37728  * Since: 2.22
37729  */
37730
37731
37732 /**
37733  * g_socket_service_stop:
37734  * @service: a #GSocketService
37735  *
37736  * Stops the service, i.e. stops accepting connections
37737  * from the added sockets when the mainloop runs.
37738  *
37739  * This call is thread-safe, so it may be called from a thread
37740  * handling an incoming client request.
37741  *
37742  * Since: 2.22
37743  */
37744
37745
37746 /**
37747  * g_socket_set_blocking:
37748  * @socket: a #GSocket.
37749  * @blocking: Whether to use blocking I/O or not.
37750  *
37751  * Sets the blocking mode of the socket. In blocking mode
37752  * all operations block until they succeed or there is an error. In
37753  * non-blocking mode all functions return results immediately or
37754  * with a %G_IO_ERROR_WOULD_BLOCK error.
37755  *
37756  * All sockets are created in blocking mode. However, note that the
37757  * platform level socket is always non-blocking, and blocking mode
37758  * is a GSocket level feature.
37759  *
37760  * Since: 2.22
37761  */
37762
37763
37764 /**
37765  * g_socket_set_broadcast:
37766  * @socket: a #GSocket.
37767  * @broadcast: whether @socket should allow sending to and receiving from broadcast addresses
37768  *
37769  * Sets whether @socket should allow sending to and receiving from
37770  * broadcast addresses. This is %FALSE by default.
37771  *
37772  * Since: 2.32
37773  */
37774
37775
37776 /**
37777  * g_socket_set_keepalive:
37778  * @socket: a #GSocket.
37779  * @keepalive: Value for the keepalive flag
37780  *
37781  * Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When
37782  * this flag is set on a socket, the system will attempt to verify that the
37783  * remote socket endpoint is still present if a sufficiently long period of
37784  * time passes with no data being exchanged. If the system is unable to
37785  * verify the presence of the remote endpoint, it will automatically close
37786  * the connection.
37787  *
37788  * This option is only functional on certain kinds of sockets. (Notably,
37789  * %G_SOCKET_PROTOCOL_TCP sockets.)
37790  *
37791  * The exact time between pings is system- and protocol-dependent, but will
37792  * normally be at least two hours. Most commonly, you would set this flag
37793  * on a server socket if you want to allow clients to remain idle for long
37794  * periods of time, but also want to ensure that connections are eventually
37795  * garbage-collected if clients crash or become unreachable.
37796  *
37797  * Since: 2.22
37798  */
37799
37800
37801 /**
37802  * g_socket_set_listen_backlog:
37803  * @socket: a #GSocket.
37804  * @backlog: the maximum number of pending connections.
37805  *
37806  * Sets the maximum number of outstanding connections allowed
37807  * when listening on this socket. If more clients than this are
37808  * connecting to the socket and the application is not handling them
37809  * on time then the new connections will be refused.
37810  *
37811  * Note that this must be called before g_socket_listen() and has no
37812  * effect if called after that.
37813  *
37814  * Since: 2.22
37815  */
37816
37817
37818 /**
37819  * g_socket_set_multicast_loopback:
37820  * @socket: a #GSocket.
37821  * @loopback: whether @socket should receive messages sent to its multicast groups from the local host
37822  *
37823  * Sets whether outgoing multicast packets will be received by sockets
37824  * listening on that multicast address on the same host. This is %TRUE
37825  * by default.
37826  *
37827  * Since: 2.32
37828  */
37829
37830
37831 /**
37832  * g_socket_set_multicast_ttl:
37833  * @socket: a #GSocket.
37834  * @ttl: the time-to-live value for all multicast datagrams on @socket
37835  *
37836  * Sets the time-to-live for outgoing multicast datagrams on @socket.
37837  * By default, this is 1, meaning that multicast packets will not leave
37838  * the local network.
37839  *
37840  * Since: 2.32
37841  */
37842
37843
37844 /**
37845  * g_socket_set_timeout:
37846  * @socket: a #GSocket.
37847  * @timeout: the timeout for @socket, in seconds, or 0 for none
37848  *
37849  * Sets the time in seconds after which I/O operations on @socket will
37850  * time out if they have not yet completed.
37851  *
37852  * On a blocking socket, this means that any blocking #GSocket
37853  * operation will time out after @timeout seconds of inactivity,
37854  * returning %G_IO_ERROR_TIMED_OUT.
37855  *
37856  * On a non-blocking socket, calls to g_socket_condition_wait() will
37857  * also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources
37858  * created with g_socket_create_source() will trigger after
37859  * @timeout seconds of inactivity, with the requested condition
37860  * set, at which point calling g_socket_receive(), g_socket_send(),
37861  * g_socket_check_connect_result(), etc, will fail with
37862  * %G_IO_ERROR_TIMED_OUT.
37863  *
37864  * If @timeout is 0 (the default), operations will never time out
37865  * on their own.
37866  *
37867  * Note that if an I/O operation is interrupted by a signal, this may
37868  * cause the timeout to be reset.
37869  *
37870  * Since: 2.26
37871  */
37872
37873
37874 /**
37875  * g_socket_set_ttl:
37876  * @socket: a #GSocket.
37877  * @ttl: the time-to-live value for all unicast packets on @socket
37878  *
37879  * Sets the time-to-live for outgoing unicast packets on @socket.
37880  * By default the platform-specific default value is used.
37881  *
37882  * Since: 2.32
37883  */
37884
37885
37886 /**
37887  * g_socket_shutdown:
37888  * @socket: a #GSocket
37889  * @shutdown_read: whether to shut down the read side
37890  * @shutdown_write: whether to shut down the write side
37891  * @error: #GError for error reporting, or %NULL to ignore.
37892  *
37893  * Shut down part of a full-duplex connection.
37894  *
37895  * If @shutdown_read is %TRUE then the receiving side of the connection
37896  * is shut down, and further reading is disallowed.
37897  *
37898  * If @shutdown_write is %TRUE then the sending side of the connection
37899  * is shut down, and further writing is disallowed.
37900  *
37901  * It is allowed for both @shutdown_read and @shutdown_write to be %TRUE.
37902  *
37903  * One example where this is used is graceful disconnect for TCP connections
37904  * where you close the sending side, then wait for the other side to close
37905  * the connection, thus ensuring that the other side saw all sent data.
37906  *
37907  * Returns: %TRUE on success, %FALSE on error
37908  * Since: 2.22
37909  */
37910
37911
37912 /**
37913  * g_socket_speaks_ipv4:
37914  * @socket: a #GSocket
37915  *
37916  * Checks if a socket is capable of speaking IPv4.
37917  *
37918  * IPv4 sockets are capable of speaking IPv4.  On some operating systems
37919  * and under some combinations of circumstances IPv6 sockets are also
37920  * capable of speaking IPv4.  See RFC 3493 section 3.7 for more
37921  * information.
37922  *
37923  * No other types of sockets are currently considered as being capable
37924  * of speaking IPv4.
37925  *
37926  * Returns: %TRUE if this socket can be used with IPv4.
37927  * Since: 2.22
37928  */
37929
37930
37931 /**
37932  * g_srv_target_copy:
37933  * @target: a #GSrvTarget
37934  *
37935  * Copies @target
37936  *
37937  * Returns: a copy of @target
37938  * Since: 2.22
37939  */
37940
37941
37942 /**
37943  * g_srv_target_free:
37944  * @target: a #GSrvTarget
37945  *
37946  * Frees @target
37947  *
37948  * Since: 2.22
37949  */
37950
37951
37952 /**
37953  * g_srv_target_get_hostname:
37954  * @target: a #GSrvTarget
37955  *
37956  * Gets @target's hostname (in ASCII form; if you are going to present
37957  * this to the user, you should use g_hostname_is_ascii_encoded() to
37958  * check if it contains encoded Unicode segments, and use
37959  * g_hostname_to_unicode() to convert it if it does.)
37960  *
37961  * Returns: @target's hostname
37962  * Since: 2.22
37963  */
37964
37965
37966 /**
37967  * g_srv_target_get_port:
37968  * @target: a #GSrvTarget
37969  *
37970  * Gets @target's port
37971  *
37972  * Returns: @target's port
37973  * Since: 2.22
37974  */
37975
37976
37977 /**
37978  * g_srv_target_get_priority:
37979  * @target: a #GSrvTarget
37980  *
37981  * Gets @target's priority. You should not need to look at this;
37982  * #GResolver already sorts the targets according to the algorithm in
37983  * RFC 2782.
37984  *
37985  * Returns: @target's priority
37986  * Since: 2.22
37987  */
37988
37989
37990 /**
37991  * g_srv_target_get_weight:
37992  * @target: a #GSrvTarget
37993  *
37994  * Gets @target's weight. You should not need to look at this;
37995  * #GResolver already sorts the targets according to the algorithm in
37996  * RFC 2782.
37997  *
37998  * Returns: @target's weight
37999  * Since: 2.22
38000  */
38001
38002
38003 /**
38004  * g_srv_target_list_sort: (skip)
38005  * @targets: a #GList of #GSrvTarget
38006  *
38007  * Sorts @targets in place according to the algorithm in RFC 2782.
38008  *
38009  * Returns: (transfer full): the head of the sorted list.
38010  * Since: 2.22
38011  */
38012
38013
38014 /**
38015  * g_srv_target_new:
38016  * @hostname: the host that the service is running on
38017  * @port: the port that the service is running on
38018  * @priority: the target's priority
38019  * @weight: the target's weight
38020  *
38021  * Creates a new #GSrvTarget with the given parameters.
38022  *
38023  * You should not need to use this; normally #GSrvTarget<!-- -->s are
38024  * created by #GResolver.
38025  *
38026  * Returns: a new #GSrvTarget.
38027  * Since: 2.22
38028  */
38029
38030
38031 /**
38032  * g_tcp_connection_get_graceful_disconnect:
38033  * @connection: a #GTcpConnection
38034  *
38035  * Checks if graceful disconnects are used. See
38036  * g_tcp_connection_set_graceful_disconnect().
38037  *
38038  * Returns: %TRUE if graceful disconnect is used on close, %FALSE otherwise
38039  * Since: 2.22
38040  */
38041
38042
38043 /**
38044  * g_tcp_connection_set_graceful_disconnect:
38045  * @connection: a #GTcpConnection
38046  * @graceful_disconnect: Whether to do graceful disconnects or not
38047  *
38048  * This enabled graceful disconnects on close. A graceful disconnect
38049  * means that we signal the receiving end that the connection is terminated
38050  * and wait for it to close the connection before closing the connection.
38051  *
38052  * A graceful disconnect means that we can be sure that we successfully sent
38053  * all the outstanding data to the other end, or get an error reported.
38054  * However, it also means we have to wait for all the data to reach the
38055  * other side and for it to acknowledge this by closing the socket, which may
38056  * take a while. For this reason it is disabled by default.
38057  *
38058  * Since: 2.22
38059  */
38060
38061
38062 /**
38063  * g_tcp_wrapper_connection_get_base_io_stream:
38064  * @conn: a #GTcpWrapperConnection
38065  *
38066  * Get's @conn's base #GIOStream
38067  *
38068  * Returns: (transfer none): @conn's base #GIOStream
38069  */
38070
38071
38072 /**
38073  * g_tcp_wrapper_connection_new:
38074  * @base_io_stream: the #GIOStream to wrap
38075  * @socket: the #GSocket associated with @base_io_stream
38076  *
38077  * Wraps @base_io_stream and @socket together as a #GSocketConnection.
38078  *
38079  * Returns: the new #GSocketConnection.
38080  * Since: 2.28
38081  */
38082
38083
38084 /**
38085  * g_themed_icon_append_name:
38086  * @icon: a #GThemedIcon
38087  * @iconname: name of icon to append to list of icons from within @icon.
38088  *
38089  * Append a name to the list of icons from within @icon.
38090  *
38091  * <note><para>
38092  * Note that doing so invalidates the hash computed by prior calls
38093  * to g_icon_hash().
38094  * </para></note>
38095  */
38096
38097
38098 /**
38099  * g_themed_icon_get_names:
38100  * @icon: a #GThemedIcon.
38101  *
38102  * Gets the names of icons from within @icon.
38103  *
38104  * Returns: (transfer none): a list of icon names.
38105  */
38106
38107
38108 /**
38109  * g_themed_icon_new:
38110  * @iconname: a string containing an icon name.
38111  *
38112  * Creates a new themed icon for @iconname.
38113  *
38114  * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon.
38115  */
38116
38117
38118 /**
38119  * g_themed_icon_new_from_names:
38120  * @iconnames: (array length=len): an array of strings containing icon names.
38121  * @len: the length of the @iconnames array, or -1 if @iconnames is %NULL-terminated
38122  *
38123  * Creates a new themed icon for @iconnames.
38124  *
38125  * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon
38126  */
38127
38128
38129 /**
38130  * g_themed_icon_new_with_default_fallbacks:
38131  * @iconname: a string containing an icon name
38132  *
38133  * Creates a new themed icon for @iconname, and all the names
38134  * that can be created by shortening @iconname at '-' characters.
38135  *
38136  * In the following example, @icon1 and @icon2 are equivalent:
38137  * |[
38138  * const char *names[] = {
38139  * "gnome-dev-cdrom-audio",
38140  * "gnome-dev-cdrom",
38141  * "gnome-dev",
38142  * "gnome"
38143  * };
38144  *
38145  * icon1 = g_themed_icon_new_from_names (names, 4);
38146  * icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
38147  * ]|
38148  *
38149  * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon.
38150  */
38151
38152
38153 /**
38154  * g_themed_icon_prepend_name:
38155  * @icon: a #GThemedIcon
38156  * @iconname: name of icon to prepend to list of icons from within @icon.
38157  *
38158  * Prepend a name to the list of icons from within @icon.
38159  *
38160  * <note><para>
38161  * Note that doing so invalidates the hash computed by prior calls
38162  * to g_icon_hash().
38163  * </para></note>
38164  *
38165  * Since: 2.18
38166  */
38167
38168
38169 /**
38170  * g_threaded_socket_service_new:
38171  * @max_threads: the maximal number of threads to execute concurrently handling incoming clients, -1 means no limit
38172  *
38173  * Creates a new #GThreadedSocketService with no listeners. Listeners
38174  * must be added with one of the #GSocketListener "add" methods.
38175  *
38176  * Returns: a new #GSocketService.
38177  * Since: 2.22
38178  */
38179
38180
38181 /**
38182  * g_tls_backend_get_certificate_type:
38183  * @backend: the #GTlsBackend
38184  *
38185  * Gets the #GType of @backend's #GTlsCertificate implementation.
38186  *
38187  * implementation.
38188  *
38189  * Returns: the #GType of @backend's #GTlsCertificate
38190  * Since: 2.28
38191  */
38192
38193
38194 /**
38195  * g_tls_backend_get_client_connection_type:
38196  * @backend: the #GTlsBackend
38197  *
38198  * Gets the #GType of @backend's #GTlsClientConnection implementation.
38199  *
38200  * implementation.
38201  *
38202  * Returns: the #GType of @backend's #GTlsClientConnection
38203  * Since: 2.28
38204  */
38205
38206
38207 /**
38208  * g_tls_backend_get_default:
38209  *
38210  * Gets the default #GTlsBackend for the system.
38211  *
38212  * Returns: (transfer none): a #GTlsBackend
38213  * Since: 2.28
38214  */
38215
38216
38217 /**
38218  * g_tls_backend_get_default_database:
38219  * @backend: the #GTlsBackend
38220  *
38221  * Gets the default #GTlsDatabase used to verify TLS connections.
38222  *
38223  * unreffed when done.
38224  *
38225  * Returns: (transfer full): the default database, which should be
38226  * Since: 2.30
38227  */
38228
38229
38230 /**
38231  * g_tls_backend_get_file_database_type:
38232  * @backend: the #GTlsBackend
38233  *
38234  * Gets the #GTyep of @backend's #GTlsFileDatabase implementation.
38235  *
38236  * Returns: the #GType of backend's #GTlsFileDatabase implementation.
38237  * Since: 2.30
38238  */
38239
38240
38241 /**
38242  * g_tls_backend_get_server_connection_type:
38243  * @backend: the #GTlsBackend
38244  *
38245  * Gets the #GType of @backend's #GTlsServerConnection implementation.
38246  *
38247  * implementation.
38248  *
38249  * Returns: the #GType of @backend's #GTlsServerConnection
38250  * Since: 2.28
38251  */
38252
38253
38254 /**
38255  * g_tls_backend_supports_tls:
38256  * @backend: the #GTlsBackend
38257  *
38258  * Checks if TLS is supported; if this returns %FALSE for the default
38259  * #GTlsBackend, it means no "real" TLS backend is available.
38260  *
38261  * Returns: whether or not TLS is supported
38262  * Since: 2.28
38263  */
38264
38265
38266 /**
38267  * g_tls_certificate_get_issuer:
38268  * @cert: a #GTlsCertificate
38269  *
38270  * Gets the #GTlsCertificate representing @cert's issuer, if known
38271  *
38272  * or %NULL if @cert is self-signed or signed with an unknown
38273  * certificate.
38274  *
38275  * Returns: (transfer none): The certificate of @cert's issuer,
38276  * Since: 2.28
38277  */
38278
38279
38280 /**
38281  * g_tls_certificate_list_new_from_file:
38282  * @file: file containing PEM-encoded certificates to import
38283  * @error: #GError for error reporting, or %NULL to ignore.
38284  *
38285  * Creates one or more #GTlsCertificate<!-- -->s from the PEM-encoded
38286  * data in @file. If @file cannot be read or parsed, the function will
38287  * return %NULL and set @error. If @file does not contain any
38288  * PEM-encoded certificates, this will return an empty list and not
38289  * set @error.
38290  *
38291  * #GList containing #GTlsCertificate objects. You must free the list
38292  * and its contents when you are done with it.
38293  *
38294  * Returns: (element-type Gio.TlsCertificate) (transfer full): a
38295  * Since: 2.28
38296  */
38297
38298
38299 /**
38300  * g_tls_certificate_new_from_file:
38301  * @file: file containing a PEM-encoded certificate to import
38302  * @error: #GError for error reporting, or %NULL to ignore.
38303  *
38304  * Creates a #GTlsCertificate from the PEM-encoded data in @file. If
38305  * @file cannot be read or parsed, the function will return %NULL and
38306  * set @error. Otherwise, this behaves like
38307  * g_tls_certificate_new_from_pem().
38308  *
38309  * Returns: the new certificate, or %NULL on error
38310  * Since: 2.28
38311  */
38312
38313
38314 /**
38315  * g_tls_certificate_new_from_files:
38316  * @cert_file: file containing a PEM-encoded certificate to import
38317  * @key_file: file containing a PEM-encoded private key to import
38318  * @error: #GError for error reporting, or %NULL to ignore.
38319  *
38320  * Creates a #GTlsCertificate from the PEM-encoded data in @cert_file
38321  * and @key_file. If either file cannot be read or parsed, the
38322  * function will return %NULL and set @error. Otherwise, this behaves
38323  * like g_tls_certificate_new_from_pem().
38324  *
38325  * Returns: the new certificate, or %NULL on error
38326  * Since: 2.28
38327  */
38328
38329
38330 /**
38331  * g_tls_certificate_new_from_pem:
38332  * @data: PEM-encoded certificate data
38333  * @length: the length of @data, or -1 if it's 0-terminated.
38334  * @error: #GError for error reporting, or %NULL to ignore.
38335  *
38336  * Creates a new #GTlsCertificate from the PEM-encoded data in @data.
38337  * If @data includes both a certificate and a private key, then the
38338  * returned certificate will include the private key data as well. (See
38339  * the #GTlsCertificate:private-key-pem property for information about
38340  * supported formats.)
38341  *
38342  * If @data includes multiple certificates, only the first one will be
38343  * parsed.
38344  *
38345  * Returns: the new certificate, or %NULL if @data is invalid
38346  * Since: 2.28
38347  */
38348
38349
38350 /**
38351  * g_tls_certificate_verify:
38352  * @cert: a #GTlsCertificate
38353  * @identity: (allow-none): the expected peer identity
38354  * @trusted_ca: (allow-none): the certificate of a trusted authority
38355  *
38356  * This verifies @cert and returns a set of #GTlsCertificateFlags
38357  * indicating any problems found with it. This can be used to verify a
38358  * certificate outside the context of making a connection, or to
38359  * check a certificate against a CA that is not part of the system
38360  * CA database.
38361  *
38362  * If @identity is not %NULL, @cert's name(s) will be compared against
38363  * it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return
38364  * value if it does not match. If @identity is %NULL, that bit will
38365  * never be set in the return value.
38366  *
38367  * If @trusted_ca is not %NULL, then @cert (or one of the certificates
38368  * in its chain) must be signed by it, or else
38369  * %G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If
38370  * @trusted_ca is %NULL, that bit will never be set in the return
38371  * value.
38372  *
38373  * (All other #GTlsCertificateFlags values will always be set or unset
38374  * as appropriate.)
38375  *
38376  * Returns: the appropriate #GTlsCertificateFlags
38377  * Since: 2.28
38378  */
38379
38380
38381 /**
38382  * g_tls_client_connection_get_accepted_cas:
38383  * @conn: the #GTlsClientConnection
38384  *
38385  * Gets the list of distinguished names of the Certificate Authorities
38386  * that the server will accept certificates from. This will be set
38387  * during the TLS handshake if the server requests a certificate.
38388  * Otherwise, it will be %NULL.
38389  *
38390  * Each item in the list is a #GByteArray which contains the complete
38391  * subject DN of the certificate authority.
38392  *
38393  * CA DNs. You should unref each element with g_byte_array_unref() and then
38394  * the free the list with g_list_free().
38395  *
38396  * Returns: (element-type GByteArray) (transfer full): the list of
38397  * Since: 2.28
38398  */
38399
38400
38401 /**
38402  * g_tls_client_connection_get_server_identity:
38403  * @conn: the #GTlsClientConnection
38404  *
38405  * Gets @conn's expected server identity
38406  *
38407  * expected server identity, or %NULL if the expected identity is not
38408  * known.
38409  *
38410  * Returns: (transfer none): a #GSocketConnectable describing the
38411  * Since: 2.28
38412  */
38413
38414
38415 /**
38416  * g_tls_client_connection_get_use_ssl3:
38417  * @conn: the #GTlsClientConnection
38418  *
38419  * Gets whether @conn will use SSL 3.0 rather than the
38420  * highest-supported version of TLS; see
38421  * g_tls_client_connection_set_use_ssl3().
38422  *
38423  * Returns: whether @conn will use SSL 3.0
38424  * Since: 2.28
38425  */
38426
38427
38428 /**
38429  * g_tls_client_connection_get_validation_flags:
38430  * @conn: the #GTlsClientConnection
38431  *
38432  * Gets @conn's validation flags
38433  *
38434  * Returns: the validation flags
38435  * Since: 2.28
38436  */
38437
38438
38439 /**
38440  * g_tls_client_connection_new:
38441  * @base_io_stream: the #GIOStream to wrap
38442  * @server_identity: (allow-none): the expected identity of the server
38443  * @error: #GError for error reporting, or %NULL to ignore.
38444  *
38445  * Creates a new #GTlsClientConnection wrapping @base_io_stream (which
38446  * must have pollable input and output streams) which is assumed to
38447  * communicate with the server identified by @server_identity.
38448  *
38449  * #GTlsClientConnection, or %NULL on error
38450  *
38451  * Returns: (transfer full) (type GTlsClientConnection): the new
38452  * Since: 2.28
38453  */
38454
38455
38456 /**
38457  * g_tls_client_connection_set_server_identity:
38458  * @conn: the #GTlsClientConnection
38459  * @identity: a #GSocketConnectable describing the expected server identity
38460  *
38461  * Sets @conn's expected server identity, which is used both to tell
38462  * servers on virtual hosts which certificate to present, and also
38463  * to let @conn know what name to look for in the certificate when
38464  * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.
38465  *
38466  * Since: 2.28
38467  */
38468
38469
38470 /**
38471  * g_tls_client_connection_set_use_ssl3:
38472  * @conn: the #GTlsClientConnection
38473  * @use_ssl3: whether to use SSL 3.0
38474  *
38475  * If @use_ssl3 is %TRUE, this forces @conn to use SSL 3.0 rather than
38476  * trying to properly negotiate the right version of TLS or SSL to use.
38477  * This can be used when talking to servers that do not implement the
38478  * fallbacks correctly and which will therefore fail to handshake with
38479  * a "modern" TLS handshake attempt.
38480  *
38481  * Since: 2.28
38482  */
38483
38484
38485 /**
38486  * g_tls_client_connection_set_validation_flags:
38487  * @conn: the #GTlsClientConnection
38488  * @flags: the #GTlsCertificateFlags to use
38489  *
38490  * Sets @conn's validation flags, to override the default set of
38491  * checks performed when validating a server certificate. By default,
38492  * %G_TLS_CERTIFICATE_VALIDATE_ALL is used.
38493  *
38494  * Since: 2.28
38495  */
38496
38497
38498 /**
38499  * g_tls_connection_emit_accept_certificate:
38500  * @conn: a #GTlsConnection
38501  * @peer_cert: the peer's #GTlsCertificate
38502  * @errors: the problems with @peer_cert
38503  *
38504  * Used by #GTlsConnection implementations to emit the
38505  * #GTlsConnection::accept-certificate signal.
38506  *
38507  * %TRUE to accept @peer_cert
38508  *
38509  * Returns: %TRUE if one of the signal handlers has returned
38510  * Since: 2.28
38511  */
38512
38513
38514 /**
38515  * g_tls_connection_get_certificate:
38516  * @conn: a #GTlsConnection
38517  *
38518  * Gets @conn's certificate, as set by
38519  * g_tls_connection_set_certificate().
38520  *
38521  * Returns: (transfer none): @conn's certificate, or %NULL
38522  * Since: 2.28
38523  */
38524
38525
38526 /**
38527  * g_tls_connection_get_database:
38528  * @conn: a #GTlsConnection
38529  *
38530  * Gets the certificate database that @conn uses to verify
38531  * peer certificates. See g_tls_connection_set_database().
38532  *
38533  * Returns: (transfer none): the certificate database that @conn uses or %NULL
38534  * Since: 2.30
38535  */
38536
38537
38538 /**
38539  * g_tls_connection_get_interaction:
38540  * @conn: a connection
38541  *
38542  * Get the object that will be used to interact with the user. It will be used
38543  * for things like prompting the user for passwords. If %NULL is returned, then
38544  * no user interaction will occur for this connection.
38545  *
38546  * Returns: (transfer none): The interaction object.
38547  * Since: 2.30
38548  */
38549
38550
38551 /**
38552  * g_tls_connection_get_peer_certificate:
38553  * @conn: a #GTlsConnection
38554  *
38555  * Gets @conn's peer's certificate after the handshake has completed.
38556  * (It is not set during the emission of
38557  * #GTlsConnection::accept-certificate.)
38558  *
38559  * Returns: (transfer none): @conn's peer's certificate, or %NULL
38560  * Since: 2.28
38561  */
38562
38563
38564 /**
38565  * g_tls_connection_get_peer_certificate_errors:
38566  * @conn: a #GTlsConnection
38567  *
38568  * Gets the errors associated with validating @conn's peer's
38569  * certificate, after the handshake has completed. (It is not set
38570  * during the emission of #GTlsConnection::accept-certificate.)
38571  *
38572  * Returns: @conn's peer's certificate errors
38573  * Since: 2.28
38574  */
38575
38576
38577 /**
38578  * g_tls_connection_get_rehandshake_mode:
38579  * @conn: a #GTlsConnection
38580  *
38581  * Gets @conn rehandshaking mode. See
38582  * g_tls_connection_set_rehandshake_mode() for details.
38583  *
38584  * Returns: @conn's rehandshaking mode
38585  * Since: 2.28
38586  */
38587
38588
38589 /**
38590  * g_tls_connection_get_require_close_notify:
38591  * @conn: a #GTlsConnection
38592  *
38593  * Tests whether or not @conn expects a proper TLS close notification
38594  * when the connection is closed. See
38595  * g_tls_connection_set_require_close_notify() for details.
38596  *
38597  * notification.
38598  *
38599  * Returns: %TRUE if @conn requires a proper TLS close
38600  * Since: 2.28
38601  */
38602
38603
38604 /**
38605  * g_tls_connection_get_use_system_certdb:
38606  * @conn: a #GTlsConnection
38607  *
38608  * Gets whether @conn uses the system certificate database to verify
38609  * peer certificates. See g_tls_connection_set_use_system_certdb().
38610  *
38611  * Returns: whether @conn uses the system certificate database
38612  * Deprecated: 2.30: Use g_tls_connection_get_database() instead
38613  */
38614
38615
38616 /**
38617  * g_tls_connection_handshake:
38618  * @conn: a #GTlsConnection
38619  * @cancellable: a #GCancellable, or %NULL
38620  * @error: a #GError, or %NULL
38621  *
38622  * Attempts a TLS handshake on @conn.
38623  *
38624  * On the client side, it is never necessary to call this method;
38625  * although the connection needs to perform a handshake after
38626  * connecting (or after sending a "STARTTLS"-type command) and may
38627  * need to rehandshake later if the server requests it,
38628  * #GTlsConnection will handle this for you automatically when you try
38629  * to send or receive data on the connection. However, you can call
38630  * g_tls_connection_handshake() manually if you want to know for sure
38631  * whether the initial handshake succeeded or failed (as opposed to
38632  * just immediately trying to write to @conn's output stream, in which
38633  * case if it fails, it may not be possible to tell if it failed
38634  * before or after completing the handshake).
38635  *
38636  * Likewise, on the server side, although a handshake is necessary at
38637  * the beginning of the communication, you do not need to call this
38638  * function explicitly unless you want clearer error reporting.
38639  * However, you may call g_tls_connection_handshake() later on to
38640  * renegotiate parameters (encryption methods, etc) with the client.
38641  *
38642  * #GTlsConnection::accept_certificate may be emitted during the
38643  * handshake.
38644  *
38645  * Returns: success or failure
38646  * Since: 2.28
38647  */
38648
38649
38650 /**
38651  * g_tls_connection_handshake_async:
38652  * @conn: a #GTlsConnection
38653  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
38654  * @cancellable: a #GCancellable, or %NULL
38655  * @callback: callback to call when the handshake is complete
38656  * @user_data: the data to pass to the callback function
38657  *
38658  * Asynchronously performs a TLS handshake on @conn. See
38659  * g_tls_connection_handshake() for more information.
38660  *
38661  * Since: 2.28
38662  */
38663
38664
38665 /**
38666  * g_tls_connection_handshake_finish:
38667  * @conn: a #GTlsConnection
38668  * @result: a #GAsyncResult.
38669  * @error: a #GError pointer, or %NULL
38670  *
38671  * Finish an asynchronous TLS handshake operation. See
38672  * g_tls_connection_handshake() for more information.
38673  *
38674  * case @error will be set.
38675  *
38676  * Returns: %TRUE on success, %FALSE on failure, in which
38677  * Since: 2.28
38678  */
38679
38680
38681 /**
38682  * g_tls_connection_set_certificate:
38683  * @conn: a #GTlsConnection
38684  * @certificate: the certificate to use for @conn
38685  *
38686  * This sets the certificate that @conn will present to its peer
38687  * during the TLS handshake. For a #GTlsServerConnection, it is
38688  * mandatory to set this, and that will normally be done at construct
38689  * time.
38690  *
38691  * For a #GTlsClientConnection, this is optional. If a handshake fails
38692  * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server
38693  * requires a certificate, and if you try connecting again, you should
38694  * call this method first. You can call
38695  * g_tls_client_connection_get_accepted_cas() on the failed connection
38696  * to get a list of Certificate Authorities that the server will
38697  * accept certificates from.
38698  *
38699  * (It is also possible that a server will allow the connection with
38700  * or without a certificate; in that case, if you don't provide a
38701  * certificate, you can tell that the server requested one by the fact
38702  * that g_tls_client_connection_get_accepted_cas() will return
38703  * non-%NULL.)
38704  *
38705  * Since: 2.28
38706  */
38707
38708
38709 /**
38710  * g_tls_connection_set_database:
38711  * @conn: a #GTlsConnection
38712  * @database: a #GTlsDatabase
38713  *
38714  * Sets the certificate database that is used to verify peer certificates.
38715  * This is set to the default database by default. See
38716  * g_tls_backend_get_default_database(). If set to %NULL, then
38717  * peer certificate validation will always set the
38718  * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
38719  * #GTlsConnection::accept-certificate will always be emitted on
38720  * client-side connections, unless that bit is not set in
38721  * #GTlsClientConnection:validation-flags).
38722  *
38723  * Since: 2.30
38724  */
38725
38726
38727 /**
38728  * g_tls_connection_set_interaction:
38729  * @conn: a connection
38730  * @interaction: (allow-none): an interaction object, or %NULL
38731  *
38732  * Set the object that will be used to interact with the user. It will be used
38733  * for things like prompting the user for passwords.
38734  *
38735  * The @interaction argument will normally be a derived subclass of
38736  * #GTlsInteraction. %NULL can also be provided if no user interaction
38737  * should occur for this connection.
38738  *
38739  * Since: 2.30
38740  */
38741
38742
38743 /**
38744  * g_tls_connection_set_rehandshake_mode:
38745  * @conn: a #GTlsConnection
38746  * @mode: the rehandshaking mode
38747  *
38748  * Sets how @conn behaves with respect to rehandshaking requests.
38749  *
38750  * %G_TLS_REHANDSHAKE_NEVER means that it will never agree to
38751  * rehandshake after the initial handshake is complete. (For a client,
38752  * this means it will refuse rehandshake requests from the server, and
38753  * for a server, this means it will close the connection with an error
38754  * if the client attempts to rehandshake.)
38755  *
38756  * %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a
38757  * rehandshake only if the other end of the connection supports the
38758  * TLS <literal>renegotiation_info</literal> extension. This is the
38759  * default behavior, but means that rehandshaking will not work
38760  * against older implementations that do not support that extension.
38761  *
38762  * %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow
38763  * rehandshaking even without the
38764  * <literal>renegotiation_info</literal> extension. On the server side
38765  * in particular, this is not recommended, since it leaves the server
38766  * open to certain attacks. However, this mode is necessary if you
38767  * need to allow renegotiation with older client software.
38768  *
38769  * Since: 2.28
38770  */
38771
38772
38773 /**
38774  * g_tls_connection_set_require_close_notify:
38775  * @conn: a #GTlsConnection
38776  * @require_close_notify: whether or not to require close notification
38777  *
38778  * Sets whether or not @conn expects a proper TLS close notification
38779  * before the connection is closed. If this is %TRUE (the default),
38780  * then @conn will expect to receive a TLS close notification from its
38781  * peer before the connection is closed, and will return a
38782  * %G_TLS_ERROR_EOF error if the connection is closed without proper
38783  * notification (since this may indicate a network error, or
38784  * man-in-the-middle attack).
38785  *
38786  * In some protocols, the application will know whether or not the
38787  * connection was closed cleanly based on application-level data
38788  * (because the application-level data includes a length field, or is
38789  * somehow self-delimiting); in this case, the close notify is
38790  * redundant and sometimes omitted. (TLS 1.1 explicitly allows this;
38791  * in TLS 1.0 it is technically an error, but often done anyway.) You
38792  * can use g_tls_connection_set_require_close_notify() to tell @conn
38793  * to allow an "unannounced" connection close, in which case the close
38794  * will show up as a 0-length read, as in a non-TLS
38795  * #GSocketConnection, and it is up to the application to check that
38796  * the data has been fully received.
38797  *
38798  * Note that this only affects the behavior when the peer closes the
38799  * connection; when the application calls g_io_stream_close() itself
38800  * on @conn, this will send a close notification regardless of the
38801  * setting of this property. If you explicitly want to do an unclean
38802  * close, you can close @conn's #GTlsConnection:base-io-stream rather
38803  * than closing @conn itself.
38804  *
38805  * Since: 2.28
38806  */
38807
38808
38809 /**
38810  * g_tls_connection_set_use_system_certdb:
38811  * @conn: a #GTlsConnection
38812  * @use_system_certdb: whether to use the system certificate database
38813  *
38814  * Sets whether @conn uses the system certificate database to verify
38815  * peer certificates. This is %TRUE by default. If set to %FALSE, then
38816  * peer certificate validation will always set the
38817  * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
38818  * #GTlsConnection::accept-certificate will always be emitted on
38819  * client-side connections, unless that bit is not set in
38820  * #GTlsClientConnection:validation-flags).
38821  *
38822  * Deprecated: 2.30: Use g_tls_connection_set_database() instead
38823  */
38824
38825
38826 /**
38827  * g_tls_database_create_certificate_handle:
38828  * @self: a #GTlsDatabase
38829  * @certificate: certificate for which to create a handle.
38830  *
38831  * Create a handle string for the certificate. The database will only be able
38832  * to create a handle for certificates that originate from the database. In
38833  * cases where the database cannot create a handle for a certificate, %NULL
38834  * will be returned.
38835  *
38836  * This handle should be stable across various instances of the application,
38837  * and between applications. If a certificate is modified in the database,
38838  * then it is not guaranteed that this handle will continue to point to it.
38839  *
38840  * Returns: (allow-none): a newly allocated string containing the handle.
38841  * Since: 2.30
38842  */
38843
38844
38845 /**
38846  * g_tls_database_lookup_certificate_for_handle:
38847  * @self: a #GTlsDatabase
38848  * @handle: a certificate handle
38849  * @interaction: (allow-none): used to interact with the user if necessary
38850  * @flags: Flags which affect the lookup.
38851  * @cancellable: (allow-none): a #GCancellable, or %NULL
38852  * @error: (allow-none): a #GError, or %NULL
38853  *
38854  * Lookup a certificate by its handle.
38855  *
38856  * The handle should have been created by calling g_tls_database_create_handle()
38857  * on a #GTlsDatabase object of the same TLS backend. The handle is designed
38858  * to remain valid across instantiations of the database.
38859  *
38860  * If the handle is no longer valid, or does not point to a certificate in
38861  * this database, then %NULL will be returned.
38862  *
38863  * This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform
38864  * the lookup operation asynchronously.
38865  *
38866  * #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate.
38867  *
38868  * Returns: (transfer full) (allow-none): a newly allocated
38869  * Since: 2.30
38870  */
38871
38872
38873 /**
38874  * g_tls_database_lookup_certificate_for_handle_async:
38875  * @self: a #GTlsDatabase
38876  * @handle: a certificate handle
38877  * @interaction: (allow-none): used to interact with the user if necessary
38878  * @flags: Flags which affect the lookup.
38879  * @cancellable: (allow-none): a #GCancellable, or %NULL
38880  * @callback: callback to call when the operation completes
38881  * @user_data: the data to pass to the callback function
38882  *
38883  * Asynchronously lookup a certificate by its handle in the database. See
38884  * g_tls_database_lookup_handle() for more information.
38885  *
38886  * Since: 2.30
38887  */
38888
38889
38890 /**
38891  * g_tls_database_lookup_certificate_for_handle_finish:
38892  * @self: a #GTlsDatabase
38893  * @result: a #GAsyncResult.
38894  * @error: a #GError pointer, or %NULL
38895  *
38896  * Finish an asynchronous lookup of a certificate by its handle. See
38897  * g_tls_database_lookup_handle() for more information.
38898  *
38899  * If the handle is no longer valid, or does not point to a certificate in
38900  * this database, then %NULL will be returned.
38901  *
38902  * Use g_object_unref() to release the certificate.
38903  *
38904  * Returns: (transfer full): a newly allocated #GTlsCertificate object.
38905  * Since: 2.30
38906  */
38907
38908
38909 /**
38910  * g_tls_database_lookup_certificate_issuer:
38911  * @self: a #GTlsDatabase
38912  * @certificate: a #GTlsCertificate
38913  * @interaction: (allow-none): used to interact with the user if necessary
38914  * @flags: flags which affect the lookup operation
38915  * @cancellable: (allow-none): a #GCancellable, or %NULL
38916  * @error: (allow-none): a #GError, or %NULL
38917  *
38918  * Lookup the issuer of @certificate in the database.
38919  *
38920  * The %issuer property
38921  * of @certificate is not modified, and the two certificates are not hooked
38922  * into a chain.
38923  *
38924  * This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform
38925  * the lookup operation asynchronously.
38926  *
38927  * or %NULL. Use g_object_unref() to release the certificate.
38928  *
38929  * Returns: (transfer full): a newly allocated issuer #GTlsCertificate,
38930  * Since: 2.30
38931  */
38932
38933
38934 /**
38935  * g_tls_database_lookup_certificate_issuer_async:
38936  * @self: a #GTlsDatabase
38937  * @certificate: a #GTlsCertificate
38938  * @interaction: (allow-none): used to interact with the user if necessary
38939  * @flags: flags which affect the lookup operation
38940  * @cancellable: (allow-none): a #GCancellable, or %NULL
38941  * @callback: callback to call when the operation completes
38942  * @user_data: the data to pass to the callback function
38943  *
38944  * Asynchronously lookup the issuer of @certificate in the database. See
38945  * g_tls_database_lookup_certificate_issuer() for more information.
38946  *
38947  * Since: 2.30
38948  */
38949
38950
38951 /**
38952  * g_tls_database_lookup_certificate_issuer_finish:
38953  * @self: a #GTlsDatabase
38954  * @result: a #GAsyncResult.
38955  * @error: a #GError pointer, or %NULL
38956  *
38957  * Finish an asynchronous lookup issuer operation. See
38958  * g_tls_database_lookup_certificate_issuer() for more information.
38959  *
38960  * or %NULL. Use g_object_unref() to release the certificate.
38961  *
38962  * Returns: (transfer full): a newly allocated issuer #GTlsCertificate,
38963  * Since: 2.30
38964  */
38965
38966
38967 /**
38968  * g_tls_database_lookup_certificates_issued_by:
38969  * @self: a #GTlsDatabase
38970  * @issuer_raw_dn: a #GByteArray which holds the DER encoded issuer DN.
38971  * @interaction: (allow-none): used to interact with the user if necessary
38972  * @flags: Flags which affect the lookup operation.
38973  * @cancellable: (allow-none): a #GCancellable, or %NULL
38974  * @error: (allow-none): a #GError, or %NULL
38975  *
38976  * Lookup certificates issued by this issuer in the database.
38977  *
38978  * This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform
38979  * the lookup operation asynchronously.
38980  *
38981  * objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list.
38982  *
38983  * Returns: (transfer full) (element-type GTlsCertificate): a newly allocated list of #GTlsCertificate
38984  * Since: 2.30
38985  */
38986
38987
38988 /**
38989  * g_tls_database_lookup_certificates_issued_by_async:
38990  * @self: a #GTlsDatabase
38991  * @issuer_raw_dn: a #GByteArray which holds the DER encoded issuer DN.
38992  * @interaction: (allow-none): used to interact with the user if necessary
38993  * @flags: Flags which affect the lookup operation.
38994  * @cancellable: (allow-none): a #GCancellable, or %NULL
38995  * @callback: callback to call when the operation completes
38996  * @user_data: the data to pass to the callback function
38997  *
38998  * Asynchronously lookup certificates issued by this issuer in the database. See
38999  * g_tls_database_lookup_certificates_issued_by() for more information.
39000  *
39001  * The database may choose to hold a reference to the issuer byte array for the duration
39002  * of of this asynchronous operation. The byte array should not be modified during
39003  * this time.
39004  *
39005  * Since: 2.30
39006  */
39007
39008
39009 /**
39010  * g_tls_database_lookup_certificates_issued_by_finish:
39011  * @self: a #GTlsDatabase
39012  * @result: a #GAsyncResult.
39013  * @error: a #GError pointer, or %NULL
39014  *
39015  * Finish an asynchronous lookup of certificates. See
39016  * g_tls_database_lookup_certificates_issued_by() for more information.
39017  *
39018  * Use g_object_unref() on each certificate, and g_list_free() on the release the list.
39019  *
39020  * Returns: (transfer full): a newly allocated list of #GTlsCertificate objects.
39021  * Since: 2.30
39022  */
39023
39024
39025 /**
39026  * g_tls_database_verify_chain:
39027  * @self: a #GTlsDatabase
39028  * @chain: a #GTlsCertificate chain
39029  * @purpose: the purpose that this certificate chain will be used for.
39030  * @identity: (allow-none): the expected peer identity
39031  * @interaction: (allow-none): used to interact with the user if necessary
39032  * @flags: additional verify flags
39033  * @cancellable: (allow-none): a #GCancellable, or %NULL
39034  * @error: (allow-none): a #GError, or %NULL
39035  *
39036  * Verify's a certificate chain after looking up and adding any missing
39037  * certificates to the chain.
39038  *
39039  * @chain is a chain of #GTlsCertificate objects each pointing to the next
39040  * certificate in the chain by its %issuer property. The chain may initially
39041  * consist of one or more certificates. After the verification process is
39042  * complete, @chain may be modified by adding missing certificates, or removing
39043  * extra certificates. If a certificate anchor was found, then it is added to
39044  * the @chain.
39045  *
39046  * @purpose describes the purpose (or usage) for which the certificate
39047  * is being used. Typically @purpose will be set to #G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER
39048  * which means that the certificate is being used to authenticate a server
39049  * (and we are acting as the client).
39050  *
39051  * The @identity is used to check for pinned certificates (trust exceptions)
39052  * in the database. These will override the normal verification process on a
39053  * host by host basis.
39054  *
39055  * Currently there are no @flags, and %G_TLS_DATABASE_VERIFY_NONE should be
39056  * used.
39057  *
39058  * This function can block, use g_tls_database_verify_chain_async() to perform
39059  * the verification operation asynchronously.
39060  *
39061  * result of verification.
39062  *
39063  * Returns: the appropriate #GTlsCertificateFlags which represents the
39064  * Since: 2.30
39065  */
39066
39067
39068 /**
39069  * g_tls_database_verify_chain_async:
39070  * @self: a #GTlsDatabase
39071  * @chain: a #GTlsCertificate chain
39072  * @purpose: the purpose that this certificate chain will be used for.
39073  * @identity: (allow-none): the expected peer identity
39074  * @interaction: (allow-none): used to interact with the user if necessary
39075  * @flags: additional verify flags
39076  * @cancellable: (allow-none): a #GCancellable, or %NULL
39077  * @callback: callback to call when the operation completes
39078  * @user_data: the data to pass to the callback function
39079  *
39080  * Asynchronously verify's a certificate chain after looking up and adding
39081  * any missing certificates to the chain. See g_tls_database_verify_chain()
39082  * for more information.
39083  *
39084  * Since: 2.30
39085  */
39086
39087
39088 /**
39089  * g_tls_database_verify_chain_finish:
39090  * @self: a #GTlsDatabase
39091  * @result: a #GAsyncResult.
39092  * @error: a #GError pointer, or %NULL
39093  *
39094  * Finish an asynchronous verify chain operation. See
39095  * g_tls_database_verify_chain() for more information. *
39096  * result of verification.
39097  *
39098  * Returns: the appropriate #GTlsCertificateFlags which represents the
39099  * Since: 2.30
39100  */
39101
39102
39103 /**
39104  * g_tls_error_quark:
39105  *
39106  * Gets the TLS error quark.
39107  *
39108  * Returns: a #GQuark.
39109  * Since: 2.28
39110  */
39111
39112
39113 /**
39114  * g_tls_file_database_new:
39115  * @anchors: filename of anchor certificate authorities.
39116  * @error: #GError for error reporting, or %NULL to ignore.
39117  *
39118  * Creates a new #GTlsFileDatabase which uses anchor certificate authorities
39119  * in @anchors to verify certificate chains.
39120  *
39121  * The certificates in @anchors must be PEM encoded.
39122  *
39123  * #GTlsFileDatabase, or %NULL on error
39124  *
39125  * Returns: (transfer full) (type GTlsFileDatabase): the new
39126  * Since: 2.30
39127  */
39128
39129
39130 /**
39131  * g_tls_interaction_ask_password:
39132  * @interaction: a #GTlsInteraction object
39133  * @password: a #GTlsPassword object
39134  * @cancellable: an optional #GCancellable cancellation object
39135  * @error: an optional location to place an error on failure
39136  *
39137  * Run synchronous interaction to ask the user for a password. In general,
39138  * g_tls_interaction_invoke_ask_password() should be used instead of this
39139  * function.
39140  *
39141  * Derived subclasses usually implement a password prompt, although they may
39142  * also choose to provide a password from elsewhere. The @password value will
39143  * be filled in and then @callback will be called. Alternatively the user may
39144  * abort this password request, which will usually abort the TLS connection.
39145  *
39146  * If the interaction is cancelled by the cancellation object, or by the
39147  * user then %G_TLS_INTERACTION_FAILED will be returned with an error that
39148  * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
39149  * not support immediate cancellation.
39150  *
39151  * Returns: The status of the ask password interaction.
39152  * Since: 2.30
39153  */
39154
39155
39156 /**
39157  * g_tls_interaction_ask_password_async:
39158  * @interaction: a #GTlsInteraction object
39159  * @password: a #GTlsPassword object
39160  * @cancellable: an optional #GCancellable cancellation object
39161  * @callback: (allow-none): will be called when the interaction completes
39162  * @user_data: (allow-none): data to pass to the @callback
39163  *
39164  * Run asynchronous interaction to ask the user for a password. In general,
39165  * g_tls_interaction_invoke_ask_password() should be used instead of this
39166  * function.
39167  *
39168  * Derived subclasses usually implement a password prompt, although they may
39169  * also choose to provide a password from elsewhere. The @password value will
39170  * be filled in and then @callback will be called. Alternatively the user may
39171  * abort this password request, which will usually abort the TLS connection.
39172  *
39173  * If the interaction is cancelled by the cancellation object, or by the
39174  * user then %G_TLS_INTERACTION_FAILED will be returned with an error that
39175  * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
39176  * not support immediate cancellation.
39177  *
39178  * Certain implementations may not support immediate cancellation.
39179  *
39180  * Since: 2.30
39181  */
39182
39183
39184 /**
39185  * g_tls_interaction_ask_password_finish:
39186  * @interaction: a #GTlsInteraction object
39187  * @result: the result passed to the callback
39188  * @error: an optional location to place an error on failure
39189  *
39190  * Complete an ask password user interaction request. This should be once
39191  * the g_tls_interaction_ask_password_async() completion callback is called.
39192  *
39193  * If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsPassword passed
39194  * to g_tls_interaction_ask_password() will have its password filled in.
39195  *
39196  * If the interaction is cancelled by the cancellation object, or by the
39197  * user then %G_TLS_INTERACTION_FAILED will be returned with an error that
39198  * contains a %G_IO_ERROR_CANCELLED error code.
39199  *
39200  * Returns: The status of the ask password interaction.
39201  * Since: 2.30
39202  */
39203
39204
39205 /**
39206  * g_tls_interaction_invoke_ask_password:
39207  * @interaction: a #GTlsInteraction object
39208  * @password: a #GTlsPassword object
39209  * @cancellable: an optional #GCancellable cancellation object
39210  * @error: an optional location to place an error on failure
39211  *
39212  * Invoke the interaction to ask the user for a password. It invokes this
39213  * interaction in the main loop, specifically the #GMainContext returned by
39214  * g_main_context_get_thread_default() when the interaction is created. This
39215  * is called by called by #GTlsConnection or #GTlsDatabase to ask the user
39216  * for a password.
39217  *
39218  * Derived subclasses usually implement a password prompt, although they may
39219  * also choose to provide a password from elsewhere. The @password value will
39220  * be filled in and then @callback will be called. Alternatively the user may
39221  * abort this password request, which will usually abort the TLS connection.
39222  *
39223  * The implementation can either be a synchronous (eg: modal dialog) or an
39224  * asynchronous one (eg: modeless dialog). This function will take care of
39225  * calling which ever one correctly.
39226  *
39227  * If the interaction is cancelled by the cancellation object, or by the
39228  * user then %G_TLS_INTERACTION_FAILED will be returned with an error that
39229  * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
39230  * not support immediate cancellation.
39231  *
39232  * Returns: The status of the ask password interaction.
39233  * Since: 2.30
39234  */
39235
39236
39237 /**
39238  * g_tls_password_get_description:
39239  * @password: a #GTlsPassword object
39240  *
39241  * Get a description string about what the password will be used for.
39242  *
39243  * Returns: The description of the password.
39244  * Since: 2.30
39245  */
39246
39247
39248 /**
39249  * g_tls_password_get_flags:
39250  * @password: a #GTlsPassword object
39251  *
39252  * Get flags about the password.
39253  *
39254  * Returns: The flags about the password.
39255  * Since: 2.30
39256  */
39257
39258
39259 /**
39260  * g_tls_password_get_value:
39261  * @password: a #GTlsPassword object
39262  * @length: (allow-none): location to place the length of the password.
39263  *
39264  * Get the password value. If @length is not %NULL then it will be
39265  * filled in with the length of the password value. (Note that the
39266  * password value is not nul-terminated, so you can only pass %NULL
39267  * for @length in contexts where you know the password will have a
39268  * certain fixed length.)
39269  *
39270  * Returns: The password value (owned by the password object).
39271  * Since: 2.30
39272  */
39273
39274
39275 /**
39276  * g_tls_password_get_warning:
39277  * @password: a #GTlsPassword object
39278  *
39279  * Get a user readable translated warning. Usually this warning is a
39280  * representation of the password flags returned from
39281  * g_tls_password_get_flags().
39282  *
39283  * Returns: The warning.
39284  * Since: 2.30
39285  */
39286
39287
39288 /**
39289  * g_tls_password_new:
39290  * @flags: the password flags
39291  * @description: description of what the password is for
39292  *
39293  * Create a new #GTlsPassword object.
39294  *
39295  * Returns: (transfer full): The newly allocated password object
39296  */
39297
39298
39299 /**
39300  * g_tls_password_set_description:
39301  * @password: a #GTlsPassword object
39302  * @description: The description of the password
39303  *
39304  * Set a description string about what the password will be used for.
39305  *
39306  * Since: 2.30
39307  */
39308
39309
39310 /**
39311  * g_tls_password_set_flags:
39312  * @password: a #GTlsPassword object
39313  * @flags: The flags about the password
39314  *
39315  * Set flags about the password.
39316  *
39317  * Since: 2.30
39318  */
39319
39320
39321 /**
39322  * g_tls_password_set_value:
39323  * @password: a #GTlsPassword object
39324  * @value: the new password value
39325  * @length: the length of the password, or -1
39326  *
39327  * Set the value for this password. The @value will be copied by the password
39328  * object.
39329  *
39330  * Specify the @length, for a non-nul-terminated password. Pass -1 as
39331  * @length if using a nul-terminated password, and @length will be
39332  * calculated automatically. (Note that the terminating nul is not
39333  * considered part of the password in this case.)
39334  *
39335  * Since: 2.30
39336  */
39337
39338
39339 /**
39340  * g_tls_password_set_value_full:
39341  * @password: a #GTlsPassword object
39342  * @value: the value for the password
39343  * @length: the length of the password, or -1
39344  * @destroy: (allow-none): a function to use to free the password.
39345  *
39346  * Provide the value for this password.
39347  *
39348  * The @value will be owned by the password object, and later freed using
39349  * the @destroy function callback.
39350  *
39351  * Specify the @length, for a non-nul-terminated password. Pass -1 as
39352  * @length if using a nul-terminated password, and @length will be
39353  * calculated automatically. (Note that the terminating nul is not
39354  * considered part of the password in this case.)
39355  *
39356  * Virtual: set_value
39357  * Since: 2.30
39358  */
39359
39360
39361 /**
39362  * g_tls_password_set_warning:
39363  * @password: a #GTlsPassword object
39364  * @warning: The user readable warning
39365  *
39366  * Set a user readable translated warning. Usually this warning is a
39367  * representation of the password flags returned from
39368  * g_tls_password_get_flags().
39369  *
39370  * Since: 2.30
39371  */
39372
39373
39374 /**
39375  * g_tls_server_connection_new:
39376  * @base_io_stream: the #GIOStream to wrap
39377  * @certificate: (allow-none): the default server certificate, or %NULL
39378  * @error: #GError for error reporting, or %NULL to ignore.
39379  *
39380  * Creates a new #GTlsServerConnection wrapping @base_io_stream (which
39381  * must have pollable input and output streams).
39382  *
39383  * #GTlsServerConnection, or %NULL on error
39384  *
39385  * Returns: (transfer full) (type GTlsServerConnection): the new
39386  * Since: 2.28
39387  */
39388
39389
39390 /**
39391  * g_try_new:
39392  * @struct_type: the type of the elements to allocate
39393  * @n_structs: the number of elements to allocate
39394  *
39395  * Attempts to allocate @n_structs elements of type @struct_type, and returns
39396  * %NULL on failure. Contrast with g_new(), which aborts the program on failure.
39397  * The returned pointer is cast to a pointer to the given type.
39398  * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
39399  *
39400  * Since: 2.8
39401  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
39402  */
39403
39404
39405 /**
39406  * g_try_new0:
39407  * @struct_type: the type of the elements to allocate
39408  * @n_structs: the number of elements to allocate
39409  *
39410  * Attempts to allocate @n_structs elements of type @struct_type, initialized
39411  * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts
39412  * the program on failure.
39413  * The returned pointer is cast to a pointer to the given type.
39414  * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
39415  *
39416  * Since: 2.8
39417  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
39418  */
39419
39420
39421 /**
39422  * g_try_renew:
39423  * @struct_type: the type of the elements to allocate
39424  * @mem: the currently allocated memory
39425  * @n_structs: the number of elements to allocate
39426  *
39427  * Attempts to reallocate the memory pointed to by @mem, so that it now has
39428  * space for @n_structs elements of type @struct_type, and returns %NULL on
39429  * failure. Contrast with g_renew(), which aborts the program on failure.
39430  * It returns the new address of the memory, which may have been moved.
39431  * The function returns %NULL if an overflow occurs.
39432  *
39433  * Since: 2.8
39434  * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
39435  */
39436
39437
39438 /**
39439  * g_unix_connection_receive_credentials:
39440  * @connection: A #GUnixConnection.
39441  * @cancellable: (allow-none): A #GCancellable or %NULL.
39442  * @error: Return location for error or %NULL.
39443  *
39444  * Receives credentials from the sending end of the connection.  The
39445  * sending end has to call g_unix_connection_send_credentials() (or
39446  * similar) for this to work.
39447  *
39448  * As well as reading the credentials this also reads (and discards) a
39449  * single byte from the stream, as this is required for credentials
39450  * passing to work on some implementations.
39451  *
39452  * Other ways to exchange credentials with a foreign peer includes the
39453  * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
39454  *
39455  * g_object_unref()), %NULL if @error is set.
39456  *
39457  * Returns: (transfer full): Received credentials on success (free with
39458  * Since: 2.26
39459  */
39460
39461
39462 /**
39463  * g_unix_connection_receive_credentials_async:
39464  * @connection: A #GUnixConnection.
39465  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
39466  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
39467  * @user_data: (closure): the data to pass to callback function
39468  *
39469  * Asynchronously receive credentials.
39470  *
39471  * For more details, see g_unix_connection_receive_credentials() which is
39472  * the synchronous version of this call.
39473  *
39474  * When the operation is finished, @callback will be called. You can then call
39475  * g_unix_connection_receive_credentials_finish() to get the result of the operation.
39476  *
39477  * Since: 2.32
39478  */
39479
39480
39481 /**
39482  * g_unix_connection_receive_credentials_finish:
39483  * @connection: A #GUnixConnection.
39484  * @result: a #GAsyncResult.
39485  * @error: a #GError, or %NULL
39486  *
39487  * Finishes an asynchronous receive credentials operation started with
39488  * g_unix_connection_receive_credentials_async().
39489  *
39490  * Free the returned object with g_object_unref().
39491  *
39492  * Returns: (transfer full): a #GCredentials, or %NULL on error.
39493  * Since: 2.32
39494  */
39495
39496
39497 /**
39498  * g_unix_connection_receive_fd:
39499  * @connection: a #GUnixConnection
39500  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
39501  * @error: (allow-none): #GError for error reporting, or %NULL to ignore
39502  *
39503  * Receives a file descriptor from the sending end of the connection.
39504  * The sending end has to call g_unix_connection_send_fd() for this
39505  * to work.
39506  *
39507  * As well as reading the fd this also reads a single byte from the
39508  * stream, as this is required for fd passing to work on some
39509  * implementations.
39510  *
39511  * Returns: a file descriptor on success, -1 on error.
39512  * Since: 2.22
39513  */
39514
39515
39516 /**
39517  * g_unix_connection_send_credentials:
39518  * @connection: A #GUnixConnection.
39519  * @cancellable: (allow-none): A #GCancellable or %NULL.
39520  * @error: Return location for error or %NULL.
39521  *
39522  * Passes the credentials of the current user the receiving side
39523  * of the connection. The receiving end has to call
39524  * g_unix_connection_receive_credentials() (or similar) to accept the
39525  * credentials.
39526  *
39527  * As well as sending the credentials this also writes a single NUL
39528  * byte to the stream, as this is required for credentials passing to
39529  * work on some implementations.
39530  *
39531  * Other ways to exchange credentials with a foreign peer includes the
39532  * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
39533  *
39534  * Returns: %TRUE on success, %FALSE if @error is set.
39535  * Since: 2.26
39536  */
39537
39538
39539 /**
39540  * g_unix_connection_send_credentials_async:
39541  * @connection: A #GUnixConnection.
39542  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
39543  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
39544  * @user_data: (closure): the data to pass to callback function
39545  *
39546  * Asynchronously send credentials.
39547  *
39548  * For more details, see g_unix_connection_send_credentials() which is
39549  * the synchronous version of this call.
39550  *
39551  * When the operation is finished, @callback will be called. You can then call
39552  * g_unix_connection_send_credentials_finish() to get the result of the operation.
39553  *
39554  * Since: 2.32
39555  */
39556
39557
39558 /**
39559  * g_unix_connection_send_credentials_finish:
39560  * @connection: A #GUnixConnection.
39561  * @result: a #GAsyncResult.
39562  * @error: a #GError, or %NULL
39563  *
39564  * Finishes an asynchronous send credentials operation started with
39565  * g_unix_connection_send_credentials_async().
39566  *
39567  * Returns: %TRUE if the operation was successful, otherwise %FALSE.
39568  * Since: 2.32
39569  */
39570
39571
39572 /**
39573  * g_unix_connection_send_fd:
39574  * @connection: a #GUnixConnection
39575  * @fd: a file descriptor
39576  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
39577  * @error: (allow-none): #GError for error reporting, or %NULL to ignore.
39578  *
39579  * Passes a file descriptor to the receiving side of the
39580  * connection. The receiving end has to call g_unix_connection_receive_fd()
39581  * to accept the file descriptor.
39582  *
39583  * As well as sending the fd this also writes a single byte to the
39584  * stream, as this is required for fd passing to work on some
39585  * implementations.
39586  *
39587  * Returns: a %TRUE on success, %NULL on error.
39588  * Since: 2.22
39589  */
39590
39591
39592 /**
39593  * g_unix_credentials_message_get_credentials:
39594  * @message: A #GUnixCredentialsMessage.
39595  *
39596  * Gets the credentials stored in @message.
39597  *
39598  * Returns: (transfer none): A #GCredentials instance. Do not free, it is owned by @message.
39599  * Since: 2.26
39600  */
39601
39602
39603 /**
39604  * g_unix_credentials_message_is_supported:
39605  *
39606  * Checks if passing #GCredentials on a #GSocket is supported on this platform.
39607  *
39608  * Returns: %TRUE if supported, %FALSE otherwise
39609  * Since: 2.26
39610  */
39611
39612
39613 /**
39614  * g_unix_credentials_message_new:
39615  *
39616  * Creates a new #GUnixCredentialsMessage with credentials matching the current processes.
39617  *
39618  * Returns: a new #GUnixCredentialsMessage
39619  * Since: 2.26
39620  */
39621
39622
39623 /**
39624  * g_unix_credentials_message_new_with_credentials:
39625  * @credentials: A #GCredentials object.
39626  *
39627  * Creates a new #GUnixCredentialsMessage holding @credentials.
39628  *
39629  * Returns: a new #GUnixCredentialsMessage
39630  * Since: 2.26
39631  */
39632
39633
39634 /**
39635  * g_unix_fd_list_append:
39636  * @list: a #GUnixFDList
39637  * @fd: a valid open file descriptor
39638  * @error: a #GError pointer
39639  *
39640  * Adds a file descriptor to @list.
39641  *
39642  * The file descriptor is duplicated using dup(). You keep your copy
39643  * of the descriptor and the copy contained in @list will be closed
39644  * when @list is finalized.
39645  *
39646  * A possible cause of failure is exceeding the per-process or
39647  * system-wide file descriptor limit.
39648  *
39649  * The index of the file descriptor in the list is returned.  If you use
39650  * this index with g_unix_fd_list_get() then you will receive back a
39651  * duplicated copy of the same file descriptor.
39652  *
39653  * (and @error is set)
39654  *
39655  * Returns: the index of the appended fd in case of success, else -1
39656  * Since: 2.24
39657  */
39658
39659
39660 /**
39661  * g_unix_fd_list_get:
39662  * @list: a #GUnixFDList
39663  * @index_: the index into the list
39664  * @error: a #GError pointer
39665  *
39666  * Gets a file descriptor out of @list.
39667  *
39668  * @index_ specifies the index of the file descriptor to get.  It is a
39669  * programmer error for @index_ to be out of range; see
39670  * g_unix_fd_list_get_length().
39671  *
39672  * The file descriptor is duplicated using dup() and set as
39673  * close-on-exec before being returned.  You must call close() on it
39674  * when you are done.
39675  *
39676  * A possible cause of failure is exceeding the per-process or
39677  * system-wide file descriptor limit.
39678  *
39679  * Returns: the file descriptor, or -1 in case of error
39680  * Since: 2.24
39681  */
39682
39683
39684 /**
39685  * g_unix_fd_list_get_length:
39686  * @list: a #GUnixFDList
39687  *
39688  * Gets the length of @list (ie: the number of file descriptors
39689  * contained within).
39690  *
39691  * Returns: the length of @list
39692  * Since: 2.24
39693  */
39694
39695
39696 /**
39697  * g_unix_fd_list_new:
39698  *
39699  * Creates a new #GUnixFDList containing no file descriptors.
39700  *
39701  * Returns: a new #GUnixFDList
39702  * Since: 2.24
39703  */
39704
39705
39706 /**
39707  * g_unix_fd_list_new_from_array:
39708  * @fds: (array length=n_fds): the initial list of file descriptors
39709  * @n_fds: the length of #fds, or -1
39710  *
39711  * Creates a new #GUnixFDList containing the file descriptors given in
39712  * @fds.  The file descriptors become the property of the new list and
39713  * may no longer be used by the caller.  The array itself is owned by
39714  * the caller.
39715  *
39716  * Each file descriptor in the array should be set to close-on-exec.
39717  *
39718  * If @n_fds is -1 then @fds must be terminated with -1.
39719  *
39720  * Returns: a new #GUnixFDList
39721  * Since: 2.24
39722  */
39723
39724
39725 /**
39726  * g_unix_fd_list_peek_fds:
39727  * @list: a #GUnixFDList
39728  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
39729  *
39730  * Returns the array of file descriptors that is contained in this
39731  * object.
39732  *
39733  * After this call, the descriptors remain the property of @list.  The
39734  * caller must not close them and must not free the array.  The array is
39735  * valid only until @list is changed in any way.
39736  *
39737  * If @length is non-%NULL then it is set to the number of file
39738  * descriptors in the returned array. The returned array is also
39739  * terminated with -1.
39740  *
39741  * This function never returns %NULL. In case there are no file
39742  * descriptors contained in @list, an empty array is returned.
39743  *
39744  * descriptors
39745  *
39746  * Returns: (array length=length) (transfer none): an array of file
39747  * Since: 2.24
39748  */
39749
39750
39751 /**
39752  * g_unix_fd_list_steal_fds:
39753  * @list: a #GUnixFDList
39754  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
39755  *
39756  * Returns the array of file descriptors that is contained in this
39757  * object.
39758  *
39759  * After this call, the descriptors are no longer contained in
39760  * @list. Further calls will return an empty list (unless more
39761  * descriptors have been added).
39762  *
39763  * The return result of this function must be freed with g_free().
39764  * The caller is also responsible for closing all of the file
39765  * descriptors.  The file descriptors in the array are set to
39766  * close-on-exec.
39767  *
39768  * If @length is non-%NULL then it is set to the number of file
39769  * descriptors in the returned array. The returned array is also
39770  * terminated with -1.
39771  *
39772  * This function never returns %NULL. In case there are no file
39773  * descriptors contained in @list, an empty array is returned.
39774  *
39775  * descriptors
39776  *
39777  * Returns: (array length=length) (transfer full): an array of file
39778  * Since: 2.24
39779  */
39780
39781
39782 /**
39783  * g_unix_fd_message_append_fd:
39784  * @message: a #GUnixFDMessage
39785  * @fd: a valid open file descriptor
39786  * @error: a #GError pointer
39787  *
39788  * Adds a file descriptor to @message.
39789  *
39790  * The file descriptor is duplicated using dup(). You keep your copy
39791  * of the descriptor and the copy contained in @message will be closed
39792  * when @message is finalized.
39793  *
39794  * A possible cause of failure is exceeding the per-process or
39795  * system-wide file descriptor limit.
39796  *
39797  * Returns: %TRUE in case of success, else %FALSE (and @error is set)
39798  * Since: 2.22
39799  */
39800
39801
39802 /**
39803  * g_unix_fd_message_get_fd_list:
39804  * @message: a #GUnixFDMessage
39805  *
39806  * Gets the #GUnixFDList contained in @message.  This function does not
39807  * return a reference to the caller, but the returned list is valid for
39808  * the lifetime of @message.
39809  *
39810  * Returns: (transfer none): the #GUnixFDList from @message
39811  * Since: 2.24
39812  */
39813
39814
39815 /**
39816  * g_unix_fd_message_new:
39817  *
39818  * Creates a new #GUnixFDMessage containing an empty file descriptor
39819  * list.
39820  *
39821  * Returns: a new #GUnixFDMessage
39822  * Since: 2.22
39823  */
39824
39825
39826 /**
39827  * g_unix_fd_message_new_with_fd_list:
39828  * @fd_list: a #GUnixFDList
39829  *
39830  * Creates a new #GUnixFDMessage containing @list.
39831  *
39832  * Returns: a new #GUnixFDMessage
39833  * Since: 2.24
39834  */
39835
39836
39837 /**
39838  * g_unix_fd_message_steal_fds:
39839  * @message: a #GUnixFDMessage
39840  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
39841  *
39842  * Returns the array of file descriptors that is contained in this
39843  * object.
39844  *
39845  * After this call, the descriptors are no longer contained in
39846  * @message. Further calls will return an empty list (unless more
39847  * descriptors have been added).
39848  *
39849  * The return result of this function must be freed with g_free().
39850  * The caller is also responsible for closing all of the file
39851  * descriptors.
39852  *
39853  * If @length is non-%NULL then it is set to the number of file
39854  * descriptors in the returned array. The returned array is also
39855  * terminated with -1.
39856  *
39857  * This function never returns %NULL. In case there are no file
39858  * descriptors contained in @message, an empty array is returned.
39859  *
39860  * descriptors
39861  *
39862  * Returns: (array length=length) (transfer full): an array of file
39863  * Since: 2.22
39864  */
39865
39866
39867 /**
39868  * g_unix_input_stream_get_close_fd:
39869  * @stream: a #GUnixInputStream
39870  *
39871  * Returns whether the file descriptor of @stream will be
39872  * closed when the stream is closed.
39873  *
39874  * Returns: %TRUE if the file descriptor is closed when done
39875  * Since: 2.20
39876  */
39877
39878
39879 /**
39880  * g_unix_input_stream_get_fd:
39881  * @stream: a #GUnixInputStream
39882  *
39883  * Return the UNIX file descriptor that the stream reads from.
39884  *
39885  * Returns: The file descriptor of @stream
39886  * Since: 2.20
39887  */
39888
39889
39890 /**
39891  * g_unix_input_stream_new:
39892  * @fd: a UNIX file descriptor
39893  * @close_fd: %TRUE to close the file descriptor when done
39894  *
39895  * Creates a new #GUnixInputStream for the given @fd.
39896  *
39897  * If @close_fd is %TRUE, the file descriptor will be closed
39898  * when the stream is closed.
39899  *
39900  * Returns: a new #GUnixInputStream
39901  */
39902
39903
39904 /**
39905  * g_unix_input_stream_set_close_fd:
39906  * @stream: a #GUnixInputStream
39907  * @close_fd: %TRUE to close the file descriptor when done
39908  *
39909  * Sets whether the file descriptor of @stream shall be closed
39910  * when the stream is closed.
39911  *
39912  * Since: 2.20
39913  */
39914
39915
39916 /**
39917  * g_unix_is_mount_path_system_internal:
39918  * @mount_path: a mount path, e.g. <filename>/media/disk</filename> or <filename>/usr</filename>
39919  *
39920  * Determines if @mount_path is considered an implementation of the
39921  * OS. This is primarily used for hiding mountable and mounted volumes
39922  * that only are used in the OS and has little to no relevance to the
39923  * casual user.
39924  *
39925  * of the OS.
39926  *
39927  * Returns: %TRUE if @mount_path is considered an implementation detail
39928  */
39929
39930
39931 /**
39932  * g_unix_mount_at: (skip)
39933  * @mount_path: path for a possible unix mount.
39934  * @time_read: (out) (allow-none): guint64 to contain a timestamp.
39935  *
39936  * Gets a #GUnixMountEntry for a given mount path. If @time_read
39937  * is set, it will be filled with a unix timestamp for checking
39938  * if the mounts have changed since with g_unix_mounts_changed_since().
39939  *
39940  * Returns: (transfer full): a #GUnixMountEntry.
39941  */
39942
39943
39944 /**
39945  * g_unix_mount_compare:
39946  * @mount1: first #GUnixMountEntry to compare.
39947  * @mount2: second #GUnixMountEntry to compare.
39948  *
39949  * Compares two unix mounts.
39950  *
39951  * or less than @mount2, respectively.
39952  *
39953  * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
39954  */
39955
39956
39957 /**
39958  * g_unix_mount_free:
39959  * @mount_entry: a #GUnixMount.
39960  *
39961  * Frees a unix mount.
39962  */
39963
39964
39965 /**
39966  * g_unix_mount_get_device_path:
39967  * @mount_entry: a #GUnixMount.
39968  *
39969  * Gets the device path for a unix mount.
39970  *
39971  * Returns: a string containing the device path.
39972  */
39973
39974
39975 /**
39976  * g_unix_mount_get_fs_type:
39977  * @mount_entry: a #GUnixMount.
39978  *
39979  * Gets the filesystem type for the unix mount.
39980  *
39981  * Returns: a string containing the file system type.
39982  */
39983
39984
39985 /**
39986  * g_unix_mount_get_mount_path:
39987  * @mount_entry: input #GUnixMountEntry to get the mount path for.
39988  *
39989  * Gets the mount path for a unix mount.
39990  *
39991  * Returns: the mount path for @mount_entry.
39992  */
39993
39994
39995 /**
39996  * g_unix_mount_guess_can_eject:
39997  * @mount_entry: a #GUnixMountEntry
39998  *
39999  * Guesses whether a Unix mount can be ejected.
40000  *
40001  * Returns: %TRUE if @mount_entry is deemed to be ejectable.
40002  */
40003
40004
40005 /**
40006  * g_unix_mount_guess_icon:
40007  * @mount_entry: a #GUnixMountEntry
40008  *
40009  * Guesses the icon of a Unix mount.
40010  *
40011  * Returns: (transfer full): a #GIcon
40012  */
40013
40014
40015 /**
40016  * g_unix_mount_guess_name:
40017  * @mount_entry: a #GUnixMountEntry
40018  *
40019  * Guesses the name of a Unix mount.
40020  * The result is a translated string.
40021  *
40022  * be freed with g_free()
40023  *
40024  * Returns: A newly allocated string that must
40025  */
40026
40027
40028 /**
40029  * g_unix_mount_guess_should_display:
40030  * @mount_entry: a #GUnixMountEntry
40031  *
40032  * Guesses whether a Unix mount should be displayed in the UI.
40033  *
40034  * Returns: %TRUE if @mount_entry is deemed to be displayable.
40035  */
40036
40037
40038 /**
40039  * g_unix_mount_is_readonly:
40040  * @mount_entry: a #GUnixMount.
40041  *
40042  * Checks if a unix mount is mounted read only.
40043  *
40044  * Returns: %TRUE if @mount_entry is read only.
40045  */
40046
40047
40048 /**
40049  * g_unix_mount_is_system_internal:
40050  * @mount_entry: a #GUnixMount.
40051  *
40052  * Checks if a unix mount is a system path.
40053  *
40054  * Returns: %TRUE if the unix mount is for a system path.
40055  */
40056
40057
40058 /**
40059  * g_unix_mount_monitor_new:
40060  *
40061  * Gets a new #GUnixMountMonitor. The default rate limit for which the
40062  * monitor will report consecutive changes for the mount and mount
40063  * point entry files is the default for a #GFileMonitor. Use
40064  * g_unix_mount_monitor_set_rate_limit() to change this.
40065  *
40066  * Returns: a #GUnixMountMonitor.
40067  */
40068
40069
40070 /**
40071  * g_unix_mount_monitor_set_rate_limit:
40072  * @mount_monitor: a #GUnixMountMonitor
40073  * @limit_msec: a integer with the limit in milliseconds to poll for changes.
40074  *
40075  * Sets the rate limit to which the @mount_monitor will report
40076  * consecutive change events to the mount and mount point entry files.
40077  *
40078  * Since: 2.18
40079  */
40080
40081
40082 /**
40083  * g_unix_mount_point_compare:
40084  * @mount1: a #GUnixMount.
40085  * @mount2: a #GUnixMount.
40086  *
40087  * Compares two unix mount points.
40088  *
40089  * or less than @mount2, respectively.
40090  *
40091  * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
40092  */
40093
40094
40095 /**
40096  * g_unix_mount_point_free:
40097  * @mount_point: unix mount point to free.
40098  *
40099  * Frees a unix mount point.
40100  */
40101
40102
40103 /**
40104  * g_unix_mount_point_get_device_path:
40105  * @mount_point: a #GUnixMountPoint.
40106  *
40107  * Gets the device path for a unix mount point.
40108  *
40109  * Returns: a string containing the device path.
40110  */
40111
40112
40113 /**
40114  * g_unix_mount_point_get_fs_type:
40115  * @mount_point: a #GUnixMountPoint.
40116  *
40117  * Gets the file system type for the mount point.
40118  *
40119  * Returns: a string containing the file system type.
40120  */
40121
40122
40123 /**
40124  * g_unix_mount_point_get_mount_path:
40125  * @mount_point: a #GUnixMountPoint.
40126  *
40127  * Gets the mount path for a unix mount point.
40128  *
40129  * Returns: a string containing the mount path.
40130  */
40131
40132
40133 /**
40134  * g_unix_mount_point_get_options:
40135  * @mount_point: a #GUnixMountPoint.
40136  *
40137  * Gets the options for the mount point.
40138  *
40139  * Returns: a string containing the options.
40140  * Since: 2.32
40141  */
40142
40143
40144 /**
40145  * g_unix_mount_point_guess_can_eject:
40146  * @mount_point: a #GUnixMountPoint
40147  *
40148  * Guesses whether a Unix mount point can be ejected.
40149  *
40150  * Returns: %TRUE if @mount_point is deemed to be ejectable.
40151  */
40152
40153
40154 /**
40155  * g_unix_mount_point_guess_icon:
40156  * @mount_point: a #GUnixMountPoint
40157  *
40158  * Guesses the icon of a Unix mount point.
40159  *
40160  * Returns: (transfer full): a #GIcon
40161  */
40162
40163
40164 /**
40165  * g_unix_mount_point_guess_name:
40166  * @mount_point: a #GUnixMountPoint
40167  *
40168  * Guesses the name of a Unix mount point.
40169  * The result is a translated string.
40170  *
40171  * be freed with g_free()
40172  *
40173  * Returns: A newly allocated string that must
40174  */
40175
40176
40177 /**
40178  * g_unix_mount_point_is_loopback:
40179  * @mount_point: a #GUnixMountPoint.
40180  *
40181  * Checks if a unix mount point is a loopback device.
40182  *
40183  * Returns: %TRUE if the mount point is a loopback. %FALSE otherwise.
40184  */
40185
40186
40187 /**
40188  * g_unix_mount_point_is_readonly:
40189  * @mount_point: a #GUnixMountPoint.
40190  *
40191  * Checks if a unix mount point is read only.
40192  *
40193  * Returns: %TRUE if a mount point is read only.
40194  */
40195
40196
40197 /**
40198  * g_unix_mount_point_is_user_mountable:
40199  * @mount_point: a #GUnixMountPoint.
40200  *
40201  * Checks if a unix mount point is mountable by the user.
40202  *
40203  * Returns: %TRUE if the mount point is user mountable.
40204  */
40205
40206
40207 /**
40208  * g_unix_mount_points_changed_since:
40209  * @time: guint64 to contain a timestamp.
40210  *
40211  * Checks if the unix mount points have changed since a given unix time.
40212  *
40213  * Returns: %TRUE if the mount points have changed since @time.
40214  */
40215
40216
40217 /**
40218  * g_unix_mount_points_get: (skip)
40219  * @time_read: (out) (allow-none): guint64 to contain a timestamp.
40220  *
40221  * Gets a #GList of #GUnixMountPoint containing the unix mount points.
40222  * If @time_read is set, it will be filled with the mount timestamp,
40223  * allowing for checking if the mounts have changed with
40224  * g_unix_mount_points_changed_since().
40225  *
40226  * a #GList of the UNIX mountpoints.
40227  *
40228  * Returns: (element-type GUnixMountPoint) (transfer full):
40229  */
40230
40231
40232 /**
40233  * g_unix_mounts_changed_since:
40234  * @time: guint64 to contain a timestamp.
40235  *
40236  * Checks if the unix mounts have changed since a given unix time.
40237  *
40238  * Returns: %TRUE if the mounts have changed since @time.
40239  */
40240
40241
40242 /**
40243  * g_unix_mounts_get: (skip)
40244  * @time_read: (out) (allow-none): guint64 to contain a timestamp, or %NULL
40245  *
40246  * Gets a #GList of #GUnixMountEntry containing the unix mounts.
40247  * If @time_read is set, it will be filled with the mount
40248  * timestamp, allowing for checking if the mounts have changed
40249  * with g_unix_mounts_changed_since().
40250  *
40251  * a #GList of the UNIX mounts.
40252  *
40253  * Returns: (element-type GUnixMountEntry) (transfer full):
40254  */
40255
40256
40257 /**
40258  * g_unix_output_stream_get_close_fd:
40259  * @stream: a #GUnixOutputStream
40260  *
40261  * Returns whether the file descriptor of @stream will be
40262  * closed when the stream is closed.
40263  *
40264  * Returns: %TRUE if the file descriptor is closed when done
40265  * Since: 2.20
40266  */
40267
40268
40269 /**
40270  * g_unix_output_stream_get_fd:
40271  * @stream: a #GUnixOutputStream
40272  *
40273  * Return the UNIX file descriptor that the stream writes to.
40274  *
40275  * Returns: The file descriptor of @stream
40276  * Since: 2.20
40277  */
40278
40279
40280 /**
40281  * g_unix_output_stream_new:
40282  * @fd: a UNIX file descriptor
40283  * @close_fd: %TRUE to close the file descriptor when done
40284  *
40285  * Creates a new #GUnixOutputStream for the given @fd.
40286  *
40287  * If @close_fd, is %TRUE, the file descriptor will be closed when
40288  * the output stream is destroyed.
40289  *
40290  * Returns: a new #GOutputStream
40291  */
40292
40293
40294 /**
40295  * g_unix_output_stream_set_close_fd:
40296  * @stream: a #GUnixOutputStream
40297  * @close_fd: %TRUE to close the file descriptor when done
40298  *
40299  * Sets whether the file descriptor of @stream shall be closed
40300  * when the stream is closed.
40301  *
40302  * Since: 2.20
40303  */
40304
40305
40306 /**
40307  * g_unix_socket_address_abstract_names_supported:
40308  *
40309  * Checks if abstract unix domain socket names are supported.
40310  *
40311  * Returns: %TRUE if supported, %FALSE otherwise
40312  * Since: 2.22
40313  */
40314
40315
40316 /**
40317  * g_unix_socket_address_get_address_type:
40318  * @address: a #GInetSocketAddress
40319  *
40320  * Gets @address's type.
40321  *
40322  * Returns: a #GUnixSocketAddressType
40323  * Since: 2.26
40324  */
40325
40326
40327 /**
40328  * g_unix_socket_address_get_is_abstract:
40329  * @address: a #GInetSocketAddress
40330  *
40331  * Tests if @address is abstract.
40332  *
40333  * Returns: %TRUE if the address is abstract, %FALSE otherwise
40334  * Since: 2.22
40335  * Deprecated: Use g_unix_socket_address_get_address_type()
40336  */
40337
40338
40339 /**
40340  * g_unix_socket_address_get_path:
40341  * @address: a #GInetSocketAddress
40342  *
40343  * Gets @address's path, or for abstract sockets the "name".
40344  *
40345  * Guaranteed to be zero-terminated, but an abstract socket
40346  * may contain embedded zeros, and thus you should use
40347  * g_unix_socket_address_get_path_len() to get the true length
40348  * of this string.
40349  *
40350  * Returns: the path for @address
40351  * Since: 2.22
40352  */
40353
40354
40355 /**
40356  * g_unix_socket_address_get_path_len:
40357  * @address: a #GInetSocketAddress
40358  *
40359  * Gets the length of @address's path.
40360  *
40361  * For details, see g_unix_socket_address_get_path().
40362  *
40363  * Returns: the length of the path
40364  * Since: 2.22
40365  */
40366
40367
40368 /**
40369  * g_unix_socket_address_new:
40370  * @path: the socket path
40371  *
40372  * Creates a new #GUnixSocketAddress for @path.
40373  *
40374  * To create abstract socket addresses, on systems that support that,
40375  * use g_unix_socket_address_new_abstract().
40376  *
40377  * Returns: a new #GUnixSocketAddress
40378  * Since: 2.22
40379  */
40380
40381
40382 /**
40383  * g_unix_socket_address_new_abstract:
40384  * @path: (array length=path_len) (element-type gchar): the abstract name
40385  * @path_len: the length of @path, or -1
40386  *
40387  * Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
40388  * #GUnixSocketAddress for @path.
40389  *
40390  * Returns: a new #GUnixSocketAddress
40391  * Deprecated: Use g_unix_socket_address_new_with_type().
40392  */
40393
40394
40395 /**
40396  * g_unix_socket_address_new_with_type:
40397  * @path: (array length=path_len) (element-type gchar): the name
40398  * @path_len: the length of @path, or -1
40399  * @type: a #GUnixSocketAddressType
40400  *
40401  * Creates a new #GUnixSocketAddress of type @type with name @path.
40402  *
40403  * If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to
40404  * calling g_unix_socket_address_new().
40405  *
40406  * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len
40407  * bytes of @path will be copied to the socket's path, and only those
40408  * bytes will be considered part of the name. (If @path_len is -1,
40409  * then @path is assumed to be NUL-terminated.) For example, if @path
40410  * was "test", then calling g_socket_address_get_native_size() on the
40411  * returned socket would return 7 (2 bytes of overhead, 1 byte for the
40412  * abstract-socket indicator byte, and 4 bytes for the name "test").
40413  *
40414  * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then
40415  * @path_len bytes of @path will be copied to the socket's path, the
40416  * rest of the path will be padded with 0 bytes, and the entire
40417  * zero-padded buffer will be considered the name. (As above, if
40418  * @path_len is -1, then @path is assumed to be NUL-terminated.) In
40419  * this case, g_socket_address_get_native_size() will always return
40420  * the full size of a <literal>struct sockaddr_un</literal>, although
40421  * g_unix_socket_address_get_path_len() will still return just the
40422  * length of @path.
40423  *
40424  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over
40425  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course,
40426  * when connecting to a server created by another process, you must
40427  * use the appropriate type corresponding to how that process created
40428  * its listening socket.
40429  *
40430  * Returns: a new #GUnixSocketAddress
40431  * Since: 2.26
40432  */
40433
40434
40435 /**
40436  * g_utf8_next_char:
40437  * @p: Pointer to the start of a valid UTF-8 character
40438  *
40439  * Skips to the next character in a UTF-8 string. The string must be
40440  * valid; this macro is as fast as possible, and has no error-checking.
40441  * You would use this macro to iterate over a string character by
40442  * character. The macro returns the start of the next UTF-8 character.
40443  * Before using this macro, use g_utf8_validate() to validate strings
40444  * that may contain invalid UTF-8.
40445  */
40446
40447
40448 /**
40449  * g_vfs_get_default:
40450  *
40451  * Gets the default #GVfs for the system.
40452  *
40453  * Returns: (transfer none): a #GVfs.
40454  */
40455
40456
40457 /**
40458  * g_vfs_get_file_for_path:
40459  * @vfs: a #GVfs.
40460  * @path: a string containing a VFS path.
40461  *
40462  * Gets a #GFile for @path.
40463  *
40464  * Free the returned object with g_object_unref().
40465  *
40466  * Returns: (transfer full): a #GFile.
40467  */
40468
40469
40470 /**
40471  * g_vfs_get_file_for_uri:
40472  * @vfs: a#GVfs.
40473  * @uri: a string containing a URI
40474  *
40475  * Gets a #GFile for @uri.
40476  *
40477  * This operation never fails, but the returned object
40478  * might not support any I/O operation if the URI
40479  * is malformed or if the URI scheme is not supported.
40480  *
40481  * Free the returned object with g_object_unref().
40482  *
40483  * Returns: (transfer full): a #GFile.
40484  */
40485
40486
40487 /**
40488  * g_vfs_get_local:
40489  *
40490  * Gets the local #GVfs for the system.
40491  *
40492  * Returns: (transfer none): a #GVfs.
40493  */
40494
40495
40496 /**
40497  * g_vfs_get_supported_uri_schemes:
40498  * @vfs: a #GVfs.
40499  *
40500  * Gets a list of URI schemes supported by @vfs.
40501  *
40502  * The returned array belongs to GIO and must
40503  * not be freed or modified.
40504  *
40505  * Returns: (transfer none): a %NULL-terminated array of strings.
40506  */
40507
40508
40509 /**
40510  * g_vfs_is_active:
40511  * @vfs: a #GVfs.
40512  *
40513  * Checks if the VFS is active.
40514  *
40515  * Returns: %TRUE if construction of the @vfs was successful and it is now active.
40516  */
40517
40518
40519 /**
40520  * g_vfs_parse_name:
40521  * @vfs: a #GVfs.
40522  * @parse_name: a string to be parsed by the VFS module.
40523  *
40524  * This operation never fails, but the returned object might
40525  * not support any I/O operations if the @parse_name cannot
40526  * be parsed by the #GVfs module.
40527  *
40528  * Free the returned object with g_object_unref().
40529  *
40530  * Returns: (transfer full): a #GFile for the given @parse_name.
40531  */
40532
40533
40534 /**
40535  * g_volume_can_eject:
40536  * @volume: a #GVolume.
40537  *
40538  * Checks if a volume can be ejected.
40539  *
40540  * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise.
40541  */
40542
40543
40544 /**
40545  * g_volume_can_mount:
40546  * @volume: a #GVolume.
40547  *
40548  * Checks if a volume can be mounted.
40549  *
40550  * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise.
40551  */
40552
40553
40554 /**
40555  * g_volume_eject:
40556  * @volume: a #GVolume.
40557  * @flags: flags affecting the unmount if required for eject
40558  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
40559  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
40560  * @user_data: user data that gets passed to @callback
40561  *
40562  * Ejects a volume. This is an asynchronous operation, and is
40563  * finished by calling g_volume_eject_finish() with the @volume
40564  * and #GAsyncResult returned in the @callback.
40565  *
40566  * Deprecated: 2.22: Use g_volume_eject_with_operation() instead.
40567  */
40568
40569
40570 /**
40571  * g_volume_eject_finish:
40572  * @volume: pointer to a #GVolume.
40573  * @result: a #GAsyncResult.
40574  * @error: a #GError location to store an error, or %NULL to ignore
40575  *
40576  * Finishes ejecting a volume. If any errors occurred during the operation,
40577  * @error will be set to contain the errors and %FALSE will be returned.
40578  *
40579  * Returns: %TRUE, %FALSE if operation failed.
40580  * Deprecated: 2.22: Use g_volume_eject_with_operation_finish() instead.
40581  */
40582
40583
40584 /**
40585  * g_volume_eject_with_operation:
40586  * @volume: a #GVolume.
40587  * @flags: flags affecting the unmount if required for eject
40588  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
40589  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
40590  * @callback: a #GAsyncReadyCallback, or %NULL.
40591  * @user_data: user data passed to @callback.
40592  *
40593  * Ejects a volume. This is an asynchronous operation, and is
40594  * finished by calling g_volume_eject_with_operation_finish() with the @volume
40595  * and #GAsyncResult data returned in the @callback.
40596  *
40597  * Since: 2.22
40598  */
40599
40600
40601 /**
40602  * g_volume_eject_with_operation_finish:
40603  * @volume: a #GVolume.
40604  * @result: a #GAsyncResult.
40605  * @error: a #GError location to store the error occurring, or %NULL to ignore.
40606  *
40607  * Finishes ejecting a volume. If any errors occurred during the operation,
40608  * @error will be set to contain the errors and %FALSE will be returned.
40609  *
40610  * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise.
40611  * Since: 2.22
40612  */
40613
40614
40615 /**
40616  * g_volume_enumerate_identifiers:
40617  * @volume: a #GVolume
40618  *
40619  * Gets the kinds of <link linkend="volume-identifier">identifiers</link>
40620  * that @volume has. Use g_volume_get_identifer() to obtain
40621  * the identifiers themselves.
40622  *
40623  * of strings containing kinds of identifiers. Use g_strfreev() to free.
40624  *
40625  * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated array
40626  */
40627
40628
40629 /**
40630  * g_volume_get_activation_root:
40631  * @volume: a #GVolume
40632  *
40633  * Gets the activation root for a #GVolume if it is known ahead of
40634  * mount time. Returns %NULL otherwise. If not %NULL and if @volume
40635  * is mounted, then the result of g_mount_get_root() on the
40636  * #GMount object obtained from g_volume_get_mount() will always
40637  * either be equal or a prefix of what this function returns. In
40638  * other words, in code
40639  *
40640  * <programlisting>
40641  * GMount *mount;
40642  * GFile *mount_root
40643  * GFile *volume_activation_root;
40644  *
40645  * mount = g_volume_get_mount (volume); /&ast; mounted, so never NULL &ast;/
40646  * mount_root = g_mount_get_root (mount);
40647  * volume_activation_root = g_volume_get_activation_root(volume); /&ast; assume not NULL &ast;/
40648  * </programlisting>
40649  *
40650  * then the expression
40651  *
40652  * <programlisting>
40653  * (g_file_has_prefix (volume_activation_root, mount_root) ||
40654  * </programlisting>
40655  *
40656  * will always be %TRUE.
40657  *
40658  * Activation roots are typically used in #GVolumeMonitor
40659  * implementations to find the underlying mount to shadow, see
40660  * g_mount_is_shadowed() for more details.
40661  *
40662  * g_object_unref() to free.
40663  *
40664  * Returns: (transfer full): the activation root of @volume or %NULL. Use
40665  * Since: 2.18
40666  */
40667
40668
40669 /**
40670  * g_volume_get_drive:
40671  * @volume: a #GVolume.
40672  *
40673  * Gets the drive for the @volume.
40674  *
40675  * The returned object should be unreffed with g_object_unref()
40676  * when no longer needed.
40677  *
40678  * Returns: (transfer full): a #GDrive or %NULL if @volume is not associated with a drive.
40679  */
40680
40681
40682 /**
40683  * g_volume_get_icon:
40684  * @volume: a #GVolume.
40685  *
40686  * Gets the icon for @volume.
40687  *
40688  * The returned object should be unreffed with g_object_unref()
40689  * when no longer needed.
40690  *
40691  * Returns: (transfer full): a #GIcon.
40692  */
40693
40694
40695 /**
40696  * g_volume_get_identifier:
40697  * @volume: a #GVolume
40698  * @kind: the kind of identifier to return
40699  *
40700  * Gets the identifier of the given kind for @volume.
40701  * See the <link linkend="volume-identifier">introduction</link>
40702  * for more information about volume identifiers.
40703  *
40704  * requested identfier, or %NULL if the #GVolume
40705  * doesn't have this kind of identifier
40706  *
40707  * Returns: a newly allocated string containing the
40708  */
40709
40710
40711 /**
40712  * g_volume_get_mount:
40713  * @volume: a #GVolume.
40714  *
40715  * Gets the mount for the @volume.
40716  *
40717  * The returned object should be unreffed with g_object_unref()
40718  * when no longer needed.
40719  *
40720  * Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted.
40721  */
40722
40723
40724 /**
40725  * g_volume_get_name:
40726  * @volume: a #GVolume.
40727  *
40728  * Gets the name of @volume.
40729  *
40730  * be freed with g_free() when no longer needed.
40731  *
40732  * Returns: the name for the given @volume. The returned string should
40733  */
40734
40735
40736 /**
40737  * g_volume_get_sort_key:
40738  * @volume: A #GVolume.
40739  *
40740  * Gets the sort key for @volume, if any.
40741  *
40742  * Returns: Sorting key for @volume or %NULL if no such key is available.
40743  * Since: 2.32
40744  */
40745
40746
40747 /**
40748  * g_volume_get_uuid:
40749  * @volume: a #GVolume.
40750  *
40751  * Gets the UUID for the @volume. The reference is typically based on
40752  * the file system UUID for the volume in question and should be
40753  * considered an opaque string. Returns %NULL if there is no UUID
40754  * available.
40755  *
40756  * The returned string should be freed with g_free()
40757  * when no longer needed.
40758  *
40759  * Returns: the UUID for @volume or %NULL if no UUID can be computed.
40760  */
40761
40762
40763 /**
40764  * g_volume_monitor_adopt_orphan_mount:
40765  * @mount: a #GMount object to find a parent for
40766  *
40767  * This function should be called by any #GVolumeMonitor
40768  * implementation when a new #GMount object is created that is not
40769  * associated with a #GVolume object. It must be called just before
40770  * emitting the @mount_added signal.
40771  *
40772  * If the return value is not %NULL, the caller must associate the
40773  * returned #GVolume object with the #GMount. This involves returning
40774  * it in its g_mount_get_volume() implementation. The caller must
40775  * also listen for the "removed" signal on the returned object
40776  * and give up its reference when handling that signal
40777  *
40778  * Similary, if implementing g_volume_monitor_adopt_orphan_mount(),
40779  * the implementor must take a reference to @mount and return it in
40780  * its g_volume_get_mount() implemented. Also, the implementor must
40781  * listen for the "unmounted" signal on @mount and give up its
40782  * reference upon handling that signal.
40783  *
40784  * There are two main use cases for this function.
40785  *
40786  * One is when implementing a user space file system driver that reads
40787  * blocks of a block device that is already represented by the native
40788  * volume monitor (for example a CD Audio file system driver). Such
40789  * a driver will generate its own #GMount object that needs to be
40790  * associated with the #GVolume object that represents the volume.
40791  *
40792  * The other is for implementing a #GVolumeMonitor whose sole purpose
40793  * is to return #GVolume objects representing entries in the users
40794  * "favorite servers" list or similar.
40795  *
40796  * if no wants to adopt the #GMount.
40797  *
40798  * implementations should instead create shadow mounts with the URI of
40799  * the mount they intend to adopt. See the proxy volume monitor in
40800  * gvfs for an example of this. Also see g_mount_is_shadowed(),
40801  * g_mount_shadow() and g_mount_unshadow() functions.
40802  *
40803  * Returns: (transfer full): the #GVolume object that is the parent for @mount or %NULL
40804  * Deprecated: 2.20: Instead of using this function, #GVolumeMonitor
40805  */
40806
40807
40808 /**
40809  * g_volume_monitor_get:
40810  *
40811  * Gets the volume monitor used by gio.
40812  *
40813  * g_object_unref() when done with it.
40814  *
40815  * Returns: (transfer full): a reference to the #GVolumeMonitor used by gio. Call
40816  */
40817
40818
40819 /**
40820  * g_volume_monitor_get_connected_drives:
40821  * @volume_monitor: a #GVolumeMonitor.
40822  *
40823  * Gets a list of drives connected to the system.
40824  *
40825  * The returned list should be freed with g_list_free(), after
40826  * its elements have been unreffed with g_object_unref().
40827  *
40828  * Returns: (element-type GDrive) (transfer full): a #GList of connected #GDrive objects.
40829  */
40830
40831
40832 /**
40833  * g_volume_monitor_get_mount_for_uuid:
40834  * @volume_monitor: a #GVolumeMonitor.
40835  * @uuid: the UUID to look for
40836  *
40837  * Finds a #GMount object by its UUID (see g_mount_get_uuid())
40838  *
40839  * Free the returned object with g_object_unref().
40840  *
40841  * Returns: (transfer full): a #GMount or %NULL if no such mount is available.
40842  */
40843
40844
40845 /**
40846  * g_volume_monitor_get_mounts:
40847  * @volume_monitor: a #GVolumeMonitor.
40848  *
40849  * Gets a list of the mounts on the system.
40850  *
40851  * The returned list should be freed with g_list_free(), after
40852  * its elements have been unreffed with g_object_unref().
40853  *
40854  * Returns: (element-type GMount) (transfer full): a #GList of #GMount objects.
40855  */
40856
40857
40858 /**
40859  * g_volume_monitor_get_volume_for_uuid:
40860  * @volume_monitor: a #GVolumeMonitor.
40861  * @uuid: the UUID to look for
40862  *
40863  * Finds a #GVolume object by its UUID (see g_volume_get_uuid())
40864  *
40865  * Free the returned object with g_object_unref().
40866  *
40867  * Returns: (transfer full): a #GVolume or %NULL if no such volume is available.
40868  */
40869
40870
40871 /**
40872  * g_volume_monitor_get_volumes:
40873  * @volume_monitor: a #GVolumeMonitor.
40874  *
40875  * Gets a list of the volumes on the system.
40876  *
40877  * The returned list should be freed with g_list_free(), after
40878  * its elements have been unreffed with g_object_unref().
40879  *
40880  * Returns: (element-type GVolume) (transfer full): a #GList of #GVolume objects.
40881  */
40882
40883
40884 /**
40885  * g_volume_mount:
40886  * @volume: a #GVolume.
40887  * @flags: flags affecting the operation
40888  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
40889  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
40890  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
40891  * @user_data: user data that gets passed to @callback
40892  *
40893  * Mounts a volume. This is an asynchronous operation, and is
40894  * finished by calling g_volume_mount_finish() with the @volume
40895  * and #GAsyncResult returned in the @callback.
40896  *
40897  * Virtual: mount_fn
40898  */
40899
40900
40901 /**
40902  * g_volume_mount_finish:
40903  * @volume: a #GVolume
40904  * @result: a #GAsyncResult
40905  * @error: a #GError location to store an error, or %NULL to ignore
40906  *
40907  * Finishes mounting a volume. If any errors occurred during the operation,
40908  * @error will be set to contain the errors and %FALSE will be returned.
40909  *
40910  * If the mount operation succeeded, g_volume_get_mount() on @volume
40911  * is guaranteed to return the mount right after calling this
40912  * function; there's no need to listen for the 'mount-added' signal on
40913  * #GVolumeMonitor.
40914  *
40915  * Returns: %TRUE, %FALSE if operation failed.
40916  */
40917
40918
40919 /**
40920  * g_volume_should_automount:
40921  * @volume: a #GVolume
40922  *
40923  * Returns whether the volume should be automatically mounted.
40924  *
40925  * Returns: %TRUE if the volume should be automatically mounted.
40926  */
40927
40928
40929 /**
40930  * g_warn_if_fail:
40931  * @expr: the expression to check
40932  *
40933  * Logs a warning if the expression is not true.
40934  *
40935  * Since: 2.16
40936  */
40937
40938
40939 /**
40940  * g_warn_if_reached:
40941  *
40942  * Logs a critical warning.
40943  *
40944  * Since: 2.16
40945  */
40946
40947
40948 /**
40949  * g_win32_input_stream_get_close_handle:
40950  * @stream: a #GWin32InputStream
40951  *
40952  * Returns whether the handle of @stream will be
40953  * closed when the stream is closed.
40954  *
40955  * Returns: %TRUE if the handle is closed when done
40956  * Since: 2.26
40957  */
40958
40959
40960 /**
40961  * g_win32_input_stream_get_handle:
40962  * @stream: a #GWin32InputStream
40963  *
40964  * Return the Windows file handle that the stream reads from.
40965  *
40966  * Returns: The file handle of @stream
40967  * Since: 2.26
40968  */
40969
40970
40971 /**
40972  * g_win32_input_stream_new:
40973  * @handle: a Win32 file handle
40974  * @close_fd: %TRUE to close the handle when done
40975  *
40976  * Creates a new #GWin32InputStream for the given @fd.
40977  *
40978  * If @close_handle is %TRUE, the handle will be closed
40979  * when the stream is closed.
40980  *
40981  * Note that "handle" here means a Win32 HANDLE, not a "file descriptor"
40982  * as used in the Windows C libraries.
40983  *
40984  * Returns: a new #GWin32InputStream
40985  */
40986
40987
40988 /**
40989  * g_win32_input_stream_set_close_handle:
40990  * @stream: a #GWin32InputStream
40991  * @close_handle: %TRUE to close the handle when done
40992  *
40993  * Sets whether the handle of @stream shall be closed
40994  * when the stream is closed.
40995  *
40996  * Since: 2.26
40997  */
40998
40999
41000 /**
41001  * g_win32_output_stream_get_close_handle:
41002  * @stream: a #GWin32OutputStream
41003  *
41004  * Returns whether the handle of @stream will be closed when the
41005  * stream is closed.
41006  *
41007  * Returns: %TRUE if the handle is closed when done
41008  * Since: 2.26
41009  */
41010
41011
41012 /**
41013  * g_win32_output_stream_get_handle:
41014  * @stream: a #GWin32OutputStream
41015  *
41016  * Return the Windows handle that the stream writes to.
41017  *
41018  * Returns: The handle descriptor of @stream
41019  * Since: 2.26
41020  */
41021
41022
41023 /**
41024  * g_win32_output_stream_new:
41025  * @handle: a Win32 file handle
41026  * @close_handle: %TRUE to close the handle when done
41027  *
41028  * Creates a new #GWin32OutputStream for the given @handle.
41029  *
41030  * If @close_handle, is %TRUE, the handle will be closed when the
41031  * output stream is destroyed.
41032  *
41033  * Returns: a new #GOutputStream
41034  * Since: 2.26
41035  */
41036
41037
41038 /**
41039  * g_win32_output_stream_set_close_handle:
41040  * @stream: a #GWin32OutputStream
41041  * @close_handle: %TRUE to close the handle when done
41042  *
41043  * Sets whether the handle of @stream shall be closed when the stream
41044  * is closed.
41045  *
41046  * Since: 2.26
41047  */
41048
41049
41050 /**
41051  * g_zlib_compressor_get_file_info:
41052  * @compressor: a #GZlibCompressor
41053  *
41054  * Returns the #GZlibCompressor:file-info property.
41055  *
41056  * Returns: (transfer none): a #GFileInfo, or %NULL
41057  * Since: 2.26
41058  */
41059
41060
41061 /**
41062  * g_zlib_compressor_new:
41063  * @format: The format to use for the compressed data
41064  * @level: compression level (0-9), -1 for default
41065  *
41066  * Creates a new #GZlibCompressor.
41067  *
41068  * Returns: a new #GZlibCompressor
41069  * Since: 2.24
41070  */
41071
41072
41073 /**
41074  * g_zlib_compressor_set_file_info:
41075  * @compressor: a #GZlibCompressor
41076  * @file_info: (allow-none): a #GFileInfo
41077  *
41078  * Sets @file_info in @compressor. If non-%NULL, and @compressor's
41079  * #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
41080  * it will be used to set the file name and modification time in
41081  * the GZIP header of the compressed data.
41082  *
41083  * Note: it is an error to call this function while a compression is in
41084  * progress; it may only be called immediately after creation of @compressor,
41085  * or after resetting it with g_converter_reset().
41086  *
41087  * Since: 2.26
41088  */
41089
41090
41091 /**
41092  * g_zlib_decompressor_get_file_info:
41093  * @decompressor: a #GZlibDecompressor
41094  *
41095  * Retrieves the #GFileInfo constructed from the GZIP header data
41096  * of compressed data processed by @compressor, or %NULL if @decompressor's
41097  * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
41098  * or the header data was not fully processed yet, or it not present in the
41099  * data stream at all.
41100  *
41101  * Returns: (transfer none): a #GFileInfo, or %NULL
41102  * Since: 2.26
41103  */
41104
41105
41106 /**
41107  * g_zlib_decompressor_new:
41108  * @format: The format to use for the compressed data
41109  *
41110  * Creates a new #GZlibDecompressor.
41111  *
41112  * Returns: a new #GZlibDecompressor
41113  * Since: 2.24
41114  */
41115
41116
41117 /**
41118  * gchararray:
41119  *
41120  * A C representable type name for #G_TYPE_STRING.
41121  */
41122
41123
41124 /**
41125  * get_all_desktop_entries_for_mime_type:
41126  * @mime_type: a mime type.
41127  * @except: NULL or a strv list
41128  *
41129  * Returns all the desktop ids for @mime_type. The desktop files
41130  * are listed in an order so that default applications are listed before
41131  * non-default ones, and handlers for inherited mimetypes are listed
41132  * after the base ones.
41133  *
41134  * Optionally doesn't list the desktop ids given in the @except
41135  *
41136  * to handle @mime_type.
41137  *
41138  * Returns: a #GList containing the desktop ids which claim
41139  */
41140
41141
41142 /**
41143  * gunichar:
41144  *
41145  * A type which can hold any UTF-32 or UCS-4 character code,
41146  * also known as a Unicode code point.
41147  *
41148  * If you want to produce the UTF-8 representation of a #gunichar,
41149  * use g_ucs4_to_utf8(). See also g_utf8_to_ucs4() for the reverse
41150  * process.
41151  *
41152  * To print/scan values of this type as integer, use
41153  * %G_GINT32_MODIFIER and/or %G_GUINT32_FORMAT.
41154  *
41155  * The notation to express a Unicode code point in running text is
41156  * as a hexadecimal number with four to six digits and uppercase
41157  * letters, prefixed by the string "U+". Leading zeros are omitted,
41158  * unless the code point would have fewer than four hexadecimal digits.
41159  * For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point
41160  * in the U+-notation, use the format string "U+\%04"G_GINT32_FORMAT"X".
41161  * To scan, use the format string "U+\%06"G_GINT32_FORMAT"X".
41162  *
41163  * |[
41164  * gunichar c;
41165  * sscanf ("U+0041", "U+%06"G_GINT32_FORMAT"X", &amp;c)
41166  * g_print ("Read U+%04"G_GINT32_FORMAT"X", c);
41167  * ]|
41168  */
41169
41170
41171 /**
41172  * gunichar2:
41173  *
41174  * A type which can hold any UTF-16 code
41175  * point<footnote id="utf16_surrogate_pairs">UTF-16 also has so called
41176  * <firstterm>surrogate pairs</firstterm> to encode characters beyond
41177  * the BMP as pairs of 16bit numbers. Surrogate pairs cannot be stored
41178  * in a single gunichar2 field, but all GLib functions accepting gunichar2
41179  * arrays will correctly interpret surrogate pairs.</footnote>.
41180  *
41181  * To print/scan values of this type to/from text you need to convert
41182  * to/from UTF-8, using g_utf16_to_utf8()/g_utf8_to_utf16().
41183  *
41184  * To print/scan values of this type as integer, use
41185  * %G_GINT16_MODIFIER and/or %G_GUINT16_FORMAT.
41186  */
41187
41188
41189 /**
41190  * mime_info_cache_reload:
41191  * @dir: directory path which needs reloading.
41192  *
41193  * Reload the mime information for the @dir.
41194  */
41195
41196
41197
41198 /************************************************************/
41199 /* THIS FILE IS GENERATED DO NOT EDIT */
41200 /************************************************************/