Sort gio/gobject annotations
[platform/upstream/gobject-introspection.git] / gir / gio-2.0.c
1 /************************************************************/
2 /* THIS FILE IS GENERATED DO NOT EDIT */
3 /************************************************************/
4
5 /**
6  * GAction:enabled:
7  *
8  * If @action is currently enabled.
9  * If the action is disabled then calls to g_action_activate() and
10  * g_action_set_state() have no effect.
11  *
12  * Since: 2.28
13  */
14
15
16 /**
17  * GAction:name:
18  *
19  * The name of the action.  This is mostly meaningful for identifying
20  * the action once it has been added to a #GActionGroup.
21  *
22  * Since: 2.28
23  */
24
25
26 /**
27  * GAction:parameter-type:
28  *
29  * The type of the parameter that must be given when activating the
30  * action.
31  *
32  * Since: 2.28
33  */
34
35
36 /**
37  * GAction:state:
38  *
39  * The state of the action, or %NULL if the action is stateless.
40  *
41  * Since: 2.28
42  */
43
44
45 /**
46  * GAction:state-type:
47  *
48  * The #GVariantType of the state that the action has, or %NULL if the
49  * action is stateless.
50  *
51  * Since: 2.28
52  */
53
54
55 /**
56  * GActionGroup::action-added:
57  * @action_group: the #GActionGroup that changed
58  * @action_name: the name of the action in @action_group
59  *
60  * Signals that a new action was just added to the group.  This signal
61  * is emitted after the action has been added and is now visible.
62  *
63  * Since: 2.28
64  */
65
66
67 /**
68  * GActionGroup::action-enabled-changed:
69  * @action_group: the #GActionGroup that changed
70  * @action_name: the name of the action in @action_group
71  * @enabled: whether the action is enabled or not
72  *
73  * Signals that the enabled status of the named action has changed.
74  *
75  * Since: 2.28
76  */
77
78
79 /**
80  * GActionGroup::action-removed:
81  * @action_group: the #GActionGroup that changed
82  * @action_name: the name of the action in @action_group
83  *
84  * Signals that an action is just about to be removed from the group.
85  * This signal is emitted before the action is removed, so the action
86  * is still visible and can be queried from the signal handler.
87  *
88  * Since: 2.28
89  */
90
91
92 /**
93  * GActionGroup::action-state-changed:
94  * @action_group: the #GActionGroup that changed
95  * @action_name: the name of the action in @action_group
96  * @value: the new value of the state
97  *
98  * Signals that the state of the named action has changed.
99  *
100  * Since: 2.28
101  */
102
103
104 /**
105  * GActionGroupInterface:
106  * @has_action: the virtual function pointer for g_action_group_has_action()
107  * @list_actions: the virtual function pointer for g_action_group_list_actions()
108  * @get_parameter_type: the virtual function pointer for g_action_group_get_parameter_type()
109  * @get_state_type: the virtual function pointer for g_action_group_get_state_type()
110  * @get_state_hint: the virtual function pointer for g_action_group_get_state_hint()
111  * @get_enabled: the virtual function pointer for g_action_group_get_enabled()
112  * @get_state: the virtual function pointer for g_action_group_get_state()
113  * @set_state: the virtual function pointer for g_action_group_set_state()
114  * @activate: the virtual function pointer for g_action_group_activate()
115  * @action_added: the class closure for the action-added signal
116  * @action_removed: the class closure for the action-removed signal
117  * @action_enabled_changed: the class closure for the action-enabled-changed signal
118  * @action_state_changed: the class closure for the action-enabled-changed signal
119  *
120  * The virtual function table for #GActionGroup.
121  *
122  * Since: 2.26
123  */
124
125
126 /**
127  * GActionInterface:
128  * @get_name: the virtual function pointer for g_action_get_name()
129  * @get_parameter_type: the virtual function pointer for g_action_get_parameter_type()
130  * @get_state_type: the virtual function pointer for g_action_get_state_type()
131  * @get_state_hint: the virtual function pointer for g_action_get_state_hint()
132  * @get_enabled: the virtual function pointer for g_action_get_enabled()
133  * @get_state: the virtual function pointer for g_action_get_state()
134  * @set_state: the virtual function pointer for g_action_set_state()
135  * @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.
136  *
137  *
138  *
139  * Since: 2.26
140  */
141
142
143 /**
144  * GAppInfo:
145  *
146  * Information about an installed application and methods to launch
147  * it (with file arguments).
148  */
149
150
151 /**
152  * GAppInfoCreateFlags:
153  * @G_APP_INFO_CREATE_NONE: No flags.
154  * @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window.
155  * @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments.
156  * @G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION: Application supports startup notification. Since 2.26
157  *
158  * Flags used when creating a #GAppInfo.
159  */
160
161
162 /**
163  * GAppInfoIface:
164  * @g_iface: The parent interface.
165  * @dup: Copies a #GAppInfo.
166  * @equal: Checks two #GAppInfo<!-- -->s for equality.
167  * @get_id: Gets a string identifier for a #GAppInfo.
168  * @get_name: Gets the name of the application for a #GAppInfo.
169  * @get_description: Gets a short description for the application described by the #GAppInfo.
170  * @get_executable: Gets the executable name for the #GAppInfo.
171  * @get_icon: Gets the #GIcon for the #GAppInfo.
172  * @launch: Launches an application specified by the #GAppInfo.
173  * @supports_uris: Indicates whether the application specified supports launching URIs.
174  * @supports_files: Indicates whether the application specified accepts filename arguments.
175  * @launch_uris: Launches an application with a list of URIs.
176  * @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>.
177  * @set_as_default_for_type: Sets an application as default for a given content type.
178  * @set_as_default_for_extension: Sets an application as default for a given file extension.
179  * @add_supports_type: Adds to the #GAppInfo information about supported file types.
180  * @can_remove_supports_type: Checks for support for removing supported file types from a #GAppInfo.
181  * @remove_supports_type: Removes a supported application type from a #GAppInfo.
182  * @can_delete: Checks if a #GAppInfo can be deleted. Since 2.20
183  * @do_delete: Deletes a #GAppInfo. Since 2.20
184  * @get_commandline: Gets the commandline for the #GAppInfo. Since 2.20
185  * @get_display_name: Gets the display name for the #GAppInfo. Since 2.24
186  *
187  * Application Information interface, for operating system portability.
188  */
189
190
191 /**
192  * GAppLaunchContext:
193  *
194  * Integrating the launch with the launching application. This is used to
195  * handle for instance startup notification and launching the new application
196  * on the same screen as the launching window.
197  */
198
199
200 /**
201  * GApplication:
202  *
203  * The <structname>GApplication</structname> structure contains private
204  * data and should only be accessed using the provided API
205  *
206  * Since: 2.26
207  */
208
209
210 /**
211  * GApplication::activate:
212  * @application: the application
213  *
214  * The ::activate signal is emitted on the primary instance when an
215  * activation occurs. See g_application_activate().
216  */
217
218
219 /**
220  * GApplication::command-line:
221  * @application: the application
222  * @command_line: a #GApplicationCommandLine representing the passed commandline
223  *
224  * The ::command-line signal is emitted on the primary instance when
225  * a commandline is not handled locally. See g_application_run() for
226  * more information.
227  */
228
229
230 /**
231  * GApplication::open:
232  * @application: the application
233  * @files: (array length=n_files) (element-type GFile): an array of #GFiles
234  * @n_files: the length of @files
235  * @hint: a hint provided by the calling instance
236  *
237  * The ::open signal is emitted on the primary instance when there are
238  * files to open. See g_application_open() for more information.
239  */
240
241
242 /**
243  * GApplication::startup:
244  * @application: the application
245  *
246  * The ::startup signal is emitted on the primary instance immediately
247  * after registration. See g_activation_register().
248  */
249
250
251 /**
252  * GApplicationClass:
253  * @startup: invoked on the primary instance immediately after registration
254  * @activate: invoked on the primary instance when an activation occurs
255  * @open: invoked on the primary instance when there are files to open
256  * @command_line: invoked on the primary instance when a command-line is not handled locally
257  * @local_command_line: invoked (locally) when the process has been invoked via commandline execution.  The virtual function has the chance to inspect (and possibly replace) the list of command line arguments. See g_application_run() for more information.
258  * @before_emit: invoked on the primary instance before 'activate', 'open' or any action invocation
259  * @after_emit: invoked on the primary instance after 'activate', 'open' or any action invocation
260  * @add_platform_data: invoked (locally) to add 'platform data' to be sent to the primary instance when activating, opening or invoking actions
261  * @quit_mainloop: invoked on the primary instance when the use count of the application drops to zero (and after any inactivity timeout, if requested)
262  * @run_mainloop: invoked on the primary instance from g_application_run() if the use-count is non-zero
263  *
264  *
265  *
266  * Since: 2.26
267  */
268
269
270 /**
271  * GApplicationCommandLine:
272  *
273  * The <structname>GApplicationCommandLine</structname> structure contains private
274  * data and should only be accessed using the provided API
275  *
276  * Since: 2.26
277  */
278
279
280 /**
281  * GApplicationCommandLineClass:
282  *
283  * The <structname>GApplicationCommandLineClass</structname> structure contains
284  * private data only
285  *
286  * Since: 2.26
287  */
288
289
290 /**
291  * GApplicationFlags:
292  * @G_APPLICATION_FLAGS_NONE: Default
293  * @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.
294  * @G_APPLICATION_IS_LAUNCHER: Don't try to become the primary instance.
295  * @G_APPLICATION_HANDLES_OPEN: This application handles opening files (in the primary instance)
296  * @G_APPLICATION_HANDLES_COMMAND_LINE: This application handles command line arguments (in the primary instance)
297  * @G_APPLICATION_SEND_ENVIRONMENT: Send the environment of the launching process to the primary instance
298  *
299  * Flags used to define the behaviour of a #GApplication.
300  *
301  * Since: 2.26
302  */
303
304
305 /**
306  * GAskPasswordFlags:
307  * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password.
308  * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username.
309  * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain.
310  * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings.
311  * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users.
312  *
313  * #GAskPasswordFlags are used to request specific information from the
314  * user, or to notify the user of their choices in an authentication
315  * situation.
316  */
317
318
319 /**
320  * GAsyncInitable:
321  *
322  * Interface for asynchronously initializable objects.
323  *
324  * Since: 2.22
325  */
326
327
328 /**
329  * GAsyncInitableIface:
330  * @g_iface: The parent interface.
331  * @init_async: Starts initialization of the object.
332  * @init_finish: Finishes initialization of the object.
333  *
334  * Provides an interface for asynchronous initializing object such that
335  * initialization may fail.
336  *
337  * Since: 2.22
338  */
339
340
341 /**
342  * GAsyncReadyCallback:
343  * @source_object: the object the asynchronous operation was started with.
344  * @res: a #GAsyncResult.
345  * @user_data: user data passed to the callback.
346  *
347  * Type definition for a function that will be called back when an asynchronous
348  * operation within GIO has been completed.
349  */
350
351
352 /**
353  * GAsyncResult:
354  *
355  * Holds results information for an asynchronous operation,
356  * usually passed directly to a asynchronous _finish() operation.
357  */
358
359
360 /**
361  * GAsyncResultIface:
362  * @g_iface: The parent interface.
363  * @get_user_data: Gets the user data passed to the callback.
364  * @get_source_object: Gets the source object that issued the asynchronous operation.
365  *
366  * Interface definition for #GAsyncResult.
367  */
368
369
370 /**
371  * GBaseFinalizeFunc:
372  * @g_class: The #GTypeClass structure to finalize.
373  *
374  * A callback function used by the type system to finalize those portions
375  * of a derived types class structure that were setup from the corresponding
376  * GBaseInitFunc() function. Class finalization basically works the inverse
377  * way in which class intialization is performed.
378  * See GClassInitFunc() for a discussion of the class intialization process.
379  */
380
381
382 /**
383  * GBaseInitFunc:
384  * @g_class: The #GTypeClass structure to initialize.
385  *
386  * A callback function used by the type system to do base initialization
387  * of the class structures of derived types. It is called as part of the
388  * initialization process of all derived classes and should reallocate
389  * or reset all dynamic class members copied over from the parent class.
390  * For example, class members (such as strings) that are not sufficiently
391  * handled by a plain memory copy of the parent class into the derived class
392  * have to be altered. See GClassInitFunc() for a discussion of the class
393  * intialization process.
394  */
395
396
397 /**
398  * GBinding:
399  *
400  * <structname>GBinding</structname> is an opaque structure whose members
401  * cannot be accessed directly.
402  *
403  * Since: 2.26
404  */
405
406
407 /**
408  * GBindingFlags:
409  * @G_BINDING_DEFAULT: The default binding; if the source property changes, the target property is updated with its value.
410  * @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the property of the source or the property of the target changes, the other is updated.
411  * @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.
412  * @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().
413  *
414  * Flags to be passed to g_object_bind_property() or
415  * g_object_bind_property_full().
416  * This enumeration can be extended at later date.
417  *
418  * Since: 2.26
419  */
420
421
422 /**
423  * GBindingTransformFunc:
424  * @binding: a #GBinding
425  * @source_value: the value of the source property
426  * @target_value: the value of the target property
427  * @user_data: data passed to the transform function
428  *
429  * A function to be called to transform the source property of @source
430  * from @source_value into the target property of @target
431  * using @target_value.
432  * otherwise
433  *
434  * Returns: %TRUE if the transformation was successful, and %FALSE
435  * Since: 2.26
436  */
437
438
439 /**
440  * GBookmarkFile:
441  *
442  * The <structname>GBookmarkFile</structname> struct contains only
443  * private data and should not be directly accessed.
444  */
445
446
447 /**
448  * GBookmarkFileError:
449  * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed
450  * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found
451  * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did not register a bookmark
452  * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found
453  * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed
454  * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an unknown encoding
455  * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing
456  * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found
457  *
458  * Error codes returned by bookmark file parsing.
459  */
460
461
462 /**
463  * GBoxedCopyFunc:
464  * @boxed: The boxed structure to be copied.
465  *
466  * This function is provided by the user and should produce a copy of the passed
467  * in boxed structure.
468  *
469  * Returns: The newly created copy of the boxed structure.
470  */
471
472
473 /**
474  * GBoxedFreeFunc:
475  * @boxed: The boxed structure to be freed.
476  *
477  * This function is provided by the user and should free the boxed
478  * structure passed.
479  */
480
481
482 /**
483  * GBufferedInputStream:
484  *
485  * Implements #GFilterInputStream with a sized input buffer.
486  */
487
488
489 /**
490  * GBufferedOutputStream:
491  *
492  * An implementation of #GFilterOutputStream with a sized buffer.
493  */
494
495
496 /**
497  * GBusAcquiredCallback:
498  * @connection: The #GDBusConnection to a message bus.
499  * @name: The name that is requested to be owned.
500  * @user_data: User data passed to g_bus_own_name().
501  *
502  * Invoked when a connection to a message bus has been obtained.
503  *
504  * Since: 2.26
505  */
506
507
508 /**
509  * GBusNameAcquiredCallback:
510  * @connection: The #GDBusConnection on which to acquired the name.
511  * @name: The name being owned.
512  * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
513  *
514  * Invoked when the name is acquired.
515  *
516  * Since: 2.26
517  */
518
519
520 /**
521  * GBusNameAppearedCallback:
522  * @connection: The #GDBusConnection the name is being watched on.
523  * @name: The name being watched.
524  * @name_owner: Unique name of the owner of the name being watched.
525  * @user_data: User data passed to g_bus_watch_name().
526  *
527  * Invoked when the name being watched is known to have to have a owner.
528  *
529  * Since: 2.26
530  */
531
532
533 /**
534  * GBusNameLostCallback:
535  * @connection: The #GDBusConnection on which to acquire the name or %NULL if the connection was disconnected.
536  * @name: The name being owned.
537  * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
538  *
539  * Invoked when the name is lost or @connection has been closed.
540  *
541  * Since: 2.26
542  */
543
544
545 /**
546  * GBusNameOwnerFlags:
547  * @G_BUS_NAME_OWNER_FLAGS_NONE: No flags set.
548  * @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the the name.
549  * @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.
550  *
551  * Flags used in g_bus_own_name().
552  *
553  * Since: 2.26
554  */
555
556
557 /**
558  * GBusNameVanishedCallback:
559  * @connection: The #GDBusConnection the name is being watched on.
560  * @name: The name being watched.
561  * @user_data: User data passed to g_bus_watch_name().
562  *
563  * Invoked when the name being watched is known not to have to have a owner.
564  *
565  * Since: 2.26
566  */
567
568
569 /**
570  * GBusNameWatcherFlags:
571  * @G_BUS_NAME_WATCHER_FLAGS_NONE: No flags set.
572  * @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.
573  *
574  * Flags used in g_bus_watch_name().
575  *
576  * Since: 2.26
577  */
578
579
580 /**
581  * GBusType:
582  * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any.
583  * @G_BUS_TYPE_NONE: Not a message bus.
584  * @G_BUS_TYPE_SYSTEM: The system-wide message bus.
585  * @G_BUS_TYPE_SESSION: The login session message bus.
586  *
587  * An enumeration for well-known message buses.
588  *
589  * Since: 2.26
590  */
591
592
593 /**
594  * GCClosure:
595  * @closure: the #GClosure
596  * @callback: the callback function
597  *
598  * A #GCClosure is a specialization of #GClosure for C function callbacks.
599  */
600
601
602 /**
603  * GCallback:
604  *
605  * The type used for callback functions in structure definitions and function
606  * signatures. This doesn't mean that all callback functions must take no
607  * parameters and return void. The required signature of a callback function
608  * is determined by the context in which is used (e.g. the signal to which it
609  * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
610  */
611
612
613 /**
614  * GCancellable:
615  *
616  * Allows actions to be cancelled.
617  */
618
619
620 /**
621  * GCancellable::cancelled:
622  * @cancellable: a #GCancellable.
623  *
624  * Emitted when the operation has been cancelled.
625  * Can be used by implementations of cancellable operations. If the
626  * operation is cancelled from another thread, the signal will be
627  * emitted in the thread that cancelled the operation, not the
628  * thread that is running the operation.
629  * Note that disconnecting from this signal (or any signal) in a
630  * multi-threaded program is prone to race conditions. For instance
631  * it is possible that a signal handler may be invoked even
632  * <emphasis>after</emphasis> a call to
633  * g_signal_handler_disconnect() for that handler has already
634  * returned.
635  * There is also a problem when cancellation happen
636  * right before connecting to the signal. If this happens the
637  * signal will unexpectedly not be emitted, and checking before
638  * connecting to the signal leaves a race condition where this is
639  * still happening.
640  * In order to make it safe and easy to connect handlers there
641  * g_cancellable_disconnect() which protect against problems
642  * like this.
643  * An example of how to us this:
644  * |[
645  * /<!-- -->* Make sure we don't do any unnecessary work if already cancelled *<!-- -->/
646  * if (g_cancellable_set_error_if_cancelled (cancellable))
647  * return;
648  * /<!-- -->* Set up all the data needed to be able to
649  * * handle cancellation of the operation *<!-- -->/
650  * my_data = my_data_new (...);
651  * id = 0;
652  * if (cancellable)
653  * id = g_cancellable_connect (cancellable,
654  * G_CALLBACK (cancelled_handler)
655  * data, NULL);
656  * /<!-- -->* cancellable operation here... *<!-- -->/
657  * g_cancellable_disconnect (cancellable, id);
658  * /<!-- -->* cancelled_handler is never called after this, it
659  * * is now safe to free the data *<!-- -->/
660  * my_data_free (my_data);
661  * ]|
662  * Note that the cancelled signal is emitted in the thread that
663  * the user cancelled from, which may be the main thread. So, the
664  * cancellable signal should not do something that can block.
665  *
666  * Are two helper functions: g_cancellable_connect() and
667  */
668
669
670 /**
671  * GCancellableSourceFunc:
672  * @cancellable: the #GCancellable
673  * @user_data: data passed in by the user.
674  *
675  * This is the function type of the callback used for the #GSource
676  * returned by g_cancellable_source_new().
677  *
678  * Returns: it should return %FALSE if the source should be removed.
679  * Since: 2.28
680  */
681
682
683 /**
684  * GCharsetConverter:
685  *
686  * Conversions between character sets.
687  */
688
689
690 /**
691  * GChecksum:
692  *
693  * An opaque structure representing a checksumming operation.
694  * To create a new GChecksum, use g_checksum_new(). To free
695  * a GChecksum, use g_checksum_free().
696  *
697  * Since: 2.16
698  */
699
700
701 /**
702  * GChecksumType:
703  * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
704  * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
705  * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
706  *
707  * The hashing algorithm to be used by #GChecksum when performing the
708  * digest of some data.
709  * Note that the #GChecksumType enumeration may be extended at a later
710  * date to include new hashing algorithm types.
711  *
712  * Since: 2.16
713  */
714
715
716 /**
717  * GChildWatchFunc:
718  * @pid: the process id of the child process
719  * @status: Status information about the child process, see waitpid(2) for more information about this field
720  * @data: user data passed to g_child_watch_add()
721  *
722  * The type of functions to be called when a child exists.
723  */
724
725
726 /**
727  * GClassFinalizeFunc:
728  * @g_class: The #GTypeClass structure to finalize.
729  * @class_data: The @class_data member supplied via the #GTypeInfo structure.
730  *
731  * A callback function used by the type system to finalize a class.
732  * This function is rarely needed, as dynamically allocated class resources
733  * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
734  * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
735  * structure of a static type is invalid, because classes of static types
736  * will never be finalized (they are artificially kept alive when their
737  * reference count drops to zero).
738  */
739
740
741 /**
742  * GClassInitFunc:
743  * @g_class: The #GTypeClass structure to initialize.
744  * @class_data: The @class_data member supplied via the #GTypeInfo structure.
745  *
746  * A callback function used by the type system to initialize the class
747  * of a specific type. This function should initialize all static class
748  * members.
749  * The initialization process of a class involves:
750  * <itemizedlist>
751  * <listitem><para>
752  * 1 - Copying common members from the parent class over to the
753  * derived class structure.
754  * </para></listitem>
755  * <listitem><para>
756  * 2 -  Zero initialization of the remaining members not copied
757  * over from the parent class.
758  * </para></listitem>
759  * <listitem><para>
760  * 3 - Invocation of the GBaseInitFunc() initializers of all parent
761  * types and the class' type.
762  * </para></listitem>
763  * <listitem><para>
764  * 4 - Invocation of the class' GClassInitFunc() initializer.
765  * </para></listitem>
766  * </itemizedlist>
767  * Since derived classes are partially initialized through a memory copy
768  * of the parent class, the general rule is that GBaseInitFunc() and
769  * GBaseFinalizeFunc() should take care of necessary reinitialization
770  * and release of those class members that were introduced by the type
771  * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
772  * GClassInitFunc() should only care about initializing static
773  * class members, while dynamic class members (such as allocated strings
774  * or reference counted resources) are better handled by a GBaseInitFunc()
775  * for this type, so proper initialization of the dynamic class members
776  * is performed for class initialization of derived types as well.
777  * An example may help to correspond the intend of the different class
778  * initializers:
779  * |[
780  * typedef struct {
781  * GObjectClass parent_class;
782  * gint         static_integer;
783  * gchar       *dynamic_string;
784  * } TypeAClass;
785  * static void
786  * type_a_base_class_init (TypeAClass *class)
787  * {
788  * class->dynamic_string = g_strdup ("some string");
789  * }
790  * static void
791  * type_a_base_class_finalize (TypeAClass *class)
792  * {
793  * g_free (class->dynamic_string);
794  * }
795  * static void
796  * type_a_class_init (TypeAClass *class)
797  * {
798  * class->static_integer = 42;
799  * }
800  * typedef struct {
801  * TypeAClass   parent_class;
802  * gfloat       static_float;
803  * GString     *dynamic_gstring;
804  * } TypeBClass;
805  * static void
806  * type_b_base_class_init (TypeBClass *class)
807  * {
808  * class->dynamic_gstring = g_string_new ("some other string");
809  * }
810  * static void
811  * type_b_base_class_finalize (TypeBClass *class)
812  * {
813  * g_string_free (class->dynamic_gstring);
814  * }
815  * static void
816  * type_b_class_init (TypeBClass *class)
817  * {
818  * class->static_float = 3.14159265358979323846;
819  * }
820  * ]|
821  * Initialization of TypeBClass will first cause initialization of
822  * TypeAClass (derived classes reference their parent classes, see
823  * g_type_class_ref() on this).
824  * Initialization of TypeAClass roughly involves zero-initializing its fields,
825  * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
826  * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
827  * type_a_class_init() to initialize its static members (static_integer).
828  * The first step in the initialization process of TypeBClass is then
829  * a plain memory copy of the contents of TypeAClass into TypeBClass and
830  * zero-initialization of the remaining fields in TypeBClass.
831  * The dynamic members of TypeAClass within TypeBClass now need
832  * reinitialization which is performed by calling type_a_base_class_init()
833  * with an argument of TypeBClass.
834  * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
835  * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
836  * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
837  * is called to complete the initialization process with the static members
838  * (static_float).
839  * Corresponding finalization counter parts to the GBaseInitFunc() functions
840  * have to be provided to release allocated resources at class finalization
841  * time.
842  */
843
844
845 /**
846  * GClosure:
847  * @in_marshal: Indicates whether the closure is currently being invoked with g_closure_invoke()
848  * @is_invalid: Indicates whether the closure has been invalidated by g_closure_invalidate()
849  *
850  * A #GClosure represents a callback supplied by the programmer.
851  */
852
853
854 /**
855  * GClosureMarshal:
856  * @closure: the #GClosure to which the marshaller belongs
857  * @return_value: a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
858  * @n_param_values: the length of the @param_values array
859  * @param_values: an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
860  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
861  * @marshal_data: additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
862  *
863  * The type used for marshaller functions.
864  */
865
866
867 /**
868  * GClosureNotify:
869  * @data: data specified when registering the notification callback
870  * @closure: the #GClosure on which the notification is emitted
871  *
872  * The type used for the various notification callbacks which can be registered
873  * on closures.
874  */
875
876
877 /**
878  * GConnectFlags:
879  * @G_CONNECT_AFTER: whether the handler should be called before or after the default handler of the signal.
880  * @G_CONNECT_SWAPPED: whether the instance and data should be swapped when calling the handler.
881  *
882  * The connection flags are used to specify the behaviour of a signal's
883  * connection.
884  */
885
886
887 /**
888  * GConvertError:
889  * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character sets is not supported.
890  * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input.
891  * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason.
892  * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input.
893  * @G_CONVERT_ERROR_BAD_URI: URI is invalid.
894  * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path.
895  *
896  * Error codes returned by character set conversion routines.
897  */
898
899
900 /**
901  * GConverter:
902  *
903  * Seek object for streaming operations.
904  *
905  * Since: 2.24
906  */
907
908
909 /**
910  * GConverterFlags:
911  * @G_CONVERTER_NO_FLAGS: No flags.
912  * @G_CONVERTER_INPUT_AT_END: At end of input data
913  * @G_CONVERTER_FLUSH: Flush data
914  *
915  * Flags used when calling a g_converter_convert().
916  *
917  * Since: 2.24
918  */
919
920
921 /**
922  * GConverterIface:
923  * @g_iface: The parent interface.
924  * @convert: Converts data.
925  * @reset: Reverts the internal state of the converter to its initial state.
926  *
927  * Provides an interface for converting data from one type
928  * to another type. The conversion can be stateful
929  * and may fail at any place.
930  *
931  * Since: 2.24
932  */
933
934
935 /**
936  * GConverterInputStream:
937  *
938  * An implementation of #GFilterInputStream that allows data
939  * conversion.
940  */
941
942
943 /**
944  * GConverterOutputStream:
945  *
946  * An implementation of #GFilterOutputStream that allows data
947  * conversion.
948  */
949
950
951 /**
952  * GConverterResult:
953  * @G_CONVERTER_ERROR: There was an error during conversion.
954  * @G_CONVERTER_CONVERTED: Some data was consumed or produced
955  * @G_CONVERTER_FINISHED: The conversion is finished
956  * @G_CONVERTER_FLUSHED: Flushing is finished
957  *
958  * Results returned from g_converter_convert().
959  *
960  * Since: 2.24
961  */
962
963
964 /**
965  * GCopyFunc:
966  * @src: A pointer to the data which should be copied
967  * @data: Additional data
968  *
969  * A function of this signature is used to copy the node data
970  * when doing a deep-copy of a tree.
971  *
972  * Returns: A pointer to the copy
973  * Since: 2.4
974  */
975
976
977 /**
978  * GCredentials:
979  *
980  * The #GCredentials structure contains only private data and
981  * should only be accessed using the provided API.
982  *
983  * Since: 2.26
984  */
985
986
987 /**
988  * GCredentialsClass:
989  *
990  * Class structure for #GCredentials.
991  *
992  * Since: 2.26
993  */
994
995
996 /**
997  * GCredentialsType:
998  * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type.
999  * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a <type>struct ucred</type>.
1000  * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a <type>struct cmsgcred</type>.
1001  *
1002  * Enumeration describing different kinds of native credential types.
1003  *
1004  * Since: 2.26
1005  */
1006
1007
1008 /**
1009  * GDBusAnnotationInfo:
1010  * @ref_count: The reference count or -1 if statically allocated.
1011  * @key: The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".
1012  * @value: The value of the annotation.
1013  * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1014  *
1015  * Information about an annotation.
1016  *
1017  * Since: 2.26
1018  */
1019
1020
1021 /**
1022  * GDBusArgInfo:
1023  * @ref_count: The reference count or -1 if statically allocated.
1024  * @name: Name of the argument, e.g. @unix_user_id.
1025  * @signature: D-Bus signature of the argument (a single complete type).
1026  * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1027  *
1028  * Information about an argument for a method or a signal.
1029  *
1030  * Since: 2.26
1031  */
1032
1033
1034 /**
1035  * GDBusAuthMechanism:credentials:
1036  *
1037  * If authenticating as a server, this property contains the
1038  * received credentials, if any.
1039  * If authenticating as a client, the property contains the
1040  * credentials that were sent, if any.
1041  */
1042
1043
1044 /**
1045  * GDBusAuthObserver:
1046  *
1047  * The #GDBusAuthObserver structure contains only private data and
1048  * should only be accessed using the provided API.
1049  *
1050  * Since: 2.26
1051  */
1052
1053
1054 /**
1055  * GDBusAuthObserver::authorize-authenticated-peer:
1056  * @observer: The #GDBusAuthObserver emitting the signal.
1057  * @stream: A #GIOStream for the #GDBusConnection.
1058  * @credentials: Credentials received from the peer or %NULL.
1059  *
1060  * Emitted to check if a peer that is successfully authenticated
1061  * is authorized.
1062  *
1063  * Returns: %TRUE if the peer is authorized, %FALSE if not.
1064  * Since: 2.26
1065  */
1066
1067
1068 /**
1069  * GDBusAuthObserverClass:
1070  * @authorize_authenticated_peer: Signal class handler for the #GDBusAuthObserver::authorize-authenticated-peer signal.
1071  *
1072  * Class structure for #GDBusAuthObserverClass.
1073  *
1074  * Since: 2.26
1075  */
1076
1077
1078 /**
1079  * GDBusCallFlags:
1080  * @G_DBUS_CALL_FLAGS_NONE: No flags set.
1081  * @G_DBUS_CALL_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this method invocation.
1082  *
1083  * Flags used in g_dbus_connection_call() and similar APIs.
1084  *
1085  * Since: 2.26
1086  */
1087
1088
1089 /**
1090  * GDBusCapabilityFlags:
1091  * @G_DBUS_CAPABILITY_FLAGS_NONE: No flags set.
1092  * @G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING: The connection supports exchanging UNIX file descriptors with the remote peer.
1093  *
1094  * Capabilities negotiated with the remote peer.
1095  *
1096  * Since: 2.26
1097  */
1098
1099
1100 /**
1101  * GDBusConnection:
1102  *
1103  * The #GDBusConnection structure contains only private data and
1104  * should only be accessed using the provided API.
1105  *
1106  * Since: 2.26
1107  */
1108
1109
1110 /**
1111  * GDBusConnection::closed:
1112  * @connection: The #GDBusConnection emitting the signal.
1113  * @remote_peer_vanished: %TRUE if @connection is closed because the remote peer closed its end of the connection.
1114  * @error: A #GError with more details about the event or %NULL.
1115  *
1116  * Emitted when the connection is closed.
1117  * The cause of this event can be
1118  * <itemizedlist>
1119  * <listitem><para>
1120  * If g_dbus_connection_close() is called. In this case
1121  * </para></listitem>
1122  * <listitem><para>
1123  * If the remote peer closes the connection. In this case
1124  * </para></listitem>
1125  * <listitem><para>
1126  * If the remote peer sends invalid or malformed data. In this
1127  * case @remote_peer_vanished is set to %FALSE and @error
1128  * is set.
1129  * </para></listitem>
1130  * </itemizedlist>
1131  * Upon receiving this signal, you should give up your reference to
1132  * once.
1133  *
1134  * Since: 2.26
1135  */
1136
1137
1138 /**
1139  * GDBusConnection:address:
1140  *
1141  * A D-Bus address specifying potential endpoints that can be used
1142  * when establishing the connection.
1143  *
1144  * Since: 2.26
1145  */
1146
1147
1148 /**
1149  * GDBusConnection:authentication-observer:
1150  *
1151  * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
1152  *
1153  * Since: 2.26
1154  */
1155
1156
1157 /**
1158  * GDBusConnection:capabilities:
1159  *
1160  * Flags from the #GDBusCapabilityFlags enumeration
1161  * representing connection features negotiated with the other peer.
1162  *
1163  * Since: 2.26
1164  */
1165
1166
1167 /**
1168  * GDBusConnection:closed:
1169  *
1170  * A boolean specifying whether the connection has been closed.
1171  *
1172  * Since: 2.26
1173  */
1174
1175
1176 /**
1177  * GDBusConnection:exit-on-close:
1178  *
1179  * A boolean specifying whether the process will be terminated (by
1180  * calling <literal>raise(SIGTERM)</literal>) if the connection
1181  * is closed by the remote peer.
1182  *
1183  * Since: 2.26
1184  */
1185
1186
1187 /**
1188  * GDBusConnection:flags:
1189  *
1190  * Flags from the #GDBusConnectionFlags enumeration.
1191  *
1192  * Since: 2.26
1193  */
1194
1195
1196 /**
1197  * GDBusConnection:guid:
1198  *
1199  * The GUID of the peer performing the role of server when
1200  * authenticating.
1201  * If you are constructing a #GDBusConnection and pass
1202  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the
1203  * #GDBusConnection:flags property then you MUST also set this
1204  * property to a valid guid.
1205  * If you are constructing a #GDBusConnection and pass
1206  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
1207  * #GDBusConnection:flags property you will be able to read the GUID
1208  * of the other peer here after the connection has been successfully
1209  * initialized.
1210  *
1211  * Since: 2.26
1212  */
1213
1214
1215 /**
1216  * GDBusConnection:locked:
1217  *
1218  * A boolean specifying whether the message is locked.
1219  *
1220  * Since: 2.26
1221  */
1222
1223
1224 /**
1225  * GDBusConnection:stream:
1226  *
1227  * The underlying #GIOStream used for I/O.
1228  *
1229  * Since: 2.26
1230  */
1231
1232
1233 /**
1234  * GDBusConnection:unique-name:
1235  *
1236  * The unique name as assigned by the message bus or %NULL if the
1237  * connection is not open or not a message bus connection.
1238  *
1239  * Since: 2.26
1240  */
1241
1242
1243 /**
1244  * GDBusConnectionClass:
1245  * @closed: Signal class handler for the #GDBusConnection::closed signal.
1246  *
1247  * Class structure for #GDBusConnection.
1248  *
1249  * Since: 2.26
1250  */
1251
1252
1253 /**
1254  * GDBusConnectionFlags:
1255  * @G_DBUS_CONNECTION_FLAGS_NONE: No flags set.
1256  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT: Perform authentication against server.
1257  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER: Perform authentication against client.
1258  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: When authenticating as a server, allow the anonymous authentication method.
1259  * @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.
1260  * @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.
1261  *
1262  * Flags used when creating a new #GDBusConnection.
1263  *
1264  * Since: 2.26
1265  */
1266
1267
1268 /**
1269  * GDBusError:
1270  *
1271  * A generic error; "something went wrong" - see the error message for
1272  * more.
1273  * There was not enough memory to complete an operation.
1274  * The bus doesn't know how to launch a service to supply the bus name
1275  * you wanted.
1276  * The bus name you referenced doesn't exist (i.e. no application owns
1277  * it).
1278  * No reply to a message expecting one, usually means a timeout occurred.
1279  * Something went wrong reading or writing to a socket, for example.
1280  * A D-Bus bus address was malformed.
1281  * Requested operation isn't supported (like ENOSYS on UNIX).
1282  * Some limited resource is exhausted.
1283  * Security restrictions don't allow doing what you're trying to do.
1284  * Authentication didn't work.
1285  * Unable to connect to server (probably caused by ECONNREFUSED on a
1286  * socket).
1287  * Certain timeout errors, possibly ETIMEDOUT on a socket.  Note that
1288  * %G_DBUS_ERROR_NO_REPLY is used for message reply timeouts. Warning:
1289  * this is confusingly-named given that %G_DBUS_ERROR_TIMED_OUT also
1290  * exists. We can't fix it for compatibility reasons so just be
1291  * careful.
1292  * No network access (probably ENETUNREACH on a socket).
1293  * Can't bind a socket since its address is in use (i.e. EADDRINUSE).
1294  * The connection is disconnected and you're trying to use it.
1295  * Invalid arguments passed to a method call.
1296  * Missing file.
1297  * Existing file and the operation you're using does not silently overwrite.
1298  * Method name you invoked isn't known by the object you invoked it on.
1299  * confusingly-named given that %G_DBUS_ERROR_TIMEOUT also exists. We
1300  * can't fix it for compatibility reasons so just be careful.
1301  * Tried to remove or modify a match rule that didn't exist.
1302  * The match rule isn't syntactically valid.
1303  * While starting a new process, the exec() call failed.
1304  * While starting a new process, the fork() call failed.
1305  * While starting a new process, the child exited with a status code.
1306  * While starting a new process, the child exited on a signal.
1307  * While starting a new process, something went wrong.
1308  * We failed to setup the environment correctly.
1309  * We failed to setup the config parser correctly.
1310  * Bus name was not valid.
1311  * Service file not found in system-services directory.
1312  * Permissions are incorrect on the setuid helper.
1313  * Service file invalid (Name, User or Exec missing).
1314  * Tried to get a UNIX process ID and it wasn't available.
1315  * Tried to get a UNIX process ID and it wasn't available.
1316  * A type signature is not valid.
1317  * A file contains invalid syntax or is otherwise broken.
1318  * Asked for SELinux security context and it wasn't available.
1319  * Asked for ADT audit data and it wasn't available.
1320  * There's already an object with the requested object path.
1321  * Error codes for the %G_DBUS_ERROR error domain.
1322  *
1323  * Certain timeout errors, e.g. while starting a service. warning: this is
1324  * Since: 2.26
1325  */
1326
1327
1328 /**
1329  * GDBusErrorEntry:
1330  * @error_code: An error code.
1331  * @dbus_error_name: The D-Bus error name to associate with @error_code.
1332  *
1333  * Struct used in g_dbus_error_register_error_domain().
1334  *
1335  * Since: 2.26
1336  */
1337
1338
1339 /**
1340  * GDBusInterfaceGetPropertyFunc:
1341  * @connection: A #GDBusConnection.
1342  * @sender: The unique bus name of the remote caller.
1343  * @object_path: The object path that the method was invoked on.
1344  * @interface_name: The D-Bus interface name for the property.
1345  * @property_name: The name of the property to get the value of.
1346  * @error: Return location for error.
1347  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1348  *
1349  * The type of the @get_property function in #GDBusInterfaceVTable.
1350  * consumed - otherwise its reference count is decreased by one.
1351  *
1352  * Returns: A #GVariant with the value for @property_name or %NULL if
1353  * Since: 2.26
1354  */
1355
1356
1357 /**
1358  * GDBusInterfaceInfo:
1359  * @ref_count: The reference count or -1 if statically allocated.
1360  * @name: The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".
1361  * @methods: A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods.
1362  * @signals: A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals.
1363  * @properties: A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties.
1364  * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1365  *
1366  * Information about a D-Bus interface.
1367  *
1368  * Since: 2.26
1369  */
1370
1371
1372 /**
1373  * GDBusInterfaceMethodCallFunc:
1374  * @connection: A #GDBusConnection.
1375  * @sender: The unique bus name of the remote caller.
1376  * @object_path: The object path that the method was invoked on.
1377  * @interface_name: The D-Bus interface name the method was invoked on.
1378  * @method_name: The name of the method that was invoked.
1379  * @parameters: A #GVariant tuple with parameters.
1380  * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
1381  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1382  *
1383  * The type of the @method_call function in #GDBusInterfaceVTable.
1384  *
1385  * Since: 2.26
1386  */
1387
1388
1389 /**
1390  * GDBusInterfaceSetPropertyFunc:
1391  * @connection: A #GDBusConnection.
1392  * @sender: The unique bus name of the remote caller.
1393  * @object_path: The object path that the method was invoked on.
1394  * @interface_name: The D-Bus interface name for the property.
1395  * @property_name: The name of the property to get the value of.
1396  * @value: The value to set the property to.
1397  * @error: Return location for error.
1398  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1399  *
1400  * The type of the @set_property function in #GDBusInterfaceVTable.
1401  *
1402  * Returns: %TRUE if the property was set to @value, %FALSE if @error is set.
1403  * Since: 2.26
1404  */
1405
1406
1407 /**
1408  * GDBusInterfaceVTable:
1409  * @method_call: Function for handling incoming method calls.
1410  * @get_property: Function for getting a property.
1411  * @set_property: Function for setting a property.
1412  *
1413  * Virtual table for handling properties and method calls for a D-Bus
1414  * interface.
1415  * If you want to handle getting/setting D-Bus properties asynchronously, simply
1416  * register an object with the <literal>org.freedesktop.DBus.Properties</literal>
1417  * D-Bus interface using g_dbus_connection_register_object().
1418  *
1419  * Since: 2.26
1420  */
1421
1422
1423 /**
1424  * GDBusMessage:
1425  *
1426  * The #GDBusMessage structure contains only private data and should
1427  * only be accessed using the provided API.
1428  *
1429  * Since: 2.26
1430  */
1431
1432
1433 /**
1434  * GDBusMessageByteOrder:
1435  * @G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN: The byte order is big endian.
1436  * @G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN: The byte order is little endian.
1437  *
1438  * Enumeration used to describe the byte order of a D-Bus message.
1439  *
1440  * Since: 2.26
1441  */
1442
1443
1444 /**
1445  * GDBusMessageClass:
1446  *
1447  * Class structure for #GDBusMessage.
1448  *
1449  * Since: 2.26
1450  */
1451
1452
1453 /**
1454  * GDBusMessageFilterFunction:
1455  * @connection: (transfer none): A #GDBusConnection.
1456  * @message: (transfer full): A locked #GDBusMessage that the filter function takes ownership of.
1457  * @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.
1458  * @user_data: User data passed when adding the filter.
1459  *
1460  * Signature for function used in g_dbus_connection_add_filter().
1461  * A filter function is passed a #GDBusMessage and expected to return
1462  * a #GDBusMessage too. Passive filter functions that don't modify the
1463  * message can simply return the @message object:
1464  * |[
1465  * static GDBusMessage *
1466  * passive_filter (GDBusConnection *connection
1467  * GDBusMessage    *message,
1468  * gboolean         incoming,
1469  * gpointer         user_data)
1470  * {
1471  * /<!-- -->* inspect @message *<!-- -->/
1472  * return message;
1473  * }
1474  * ]|
1475  * Filter functions that wants to drop a message can simply return %NULL:
1476  * |[
1477  * static GDBusMessage *
1478  * drop_filter (GDBusConnection *connection
1479  * GDBusMessage    *message,
1480  * gboolean         incoming,
1481  * gpointer         user_data)
1482  * {
1483  * if (should_drop_message)
1484  * {
1485  * g_object_unref (message);
1486  * message = NULL;
1487  * }
1488  * return message;
1489  * }
1490  * ]|
1491  * Finally, a filter function may modify a message by copying it:
1492  * |[
1493  * static GDBusMessage *
1494  * modifying_filter (GDBusConnection *connection
1495  * GDBusMessage    *message,
1496  * gboolean         incoming,
1497  * gpointer         user_data)
1498  * {
1499  * GDBusMessage *copy;
1500  * GError *error;
1501  * error = NULL;
1502  * copy = g_dbus_message_copy (message, &error);
1503  * /<!-- -->* handle @error being is set *<!-- -->/
1504  * g_object_unref (message);
1505  * /<!-- -->* modify @copy *<!-- -->/
1506  * return copy;
1507  * }
1508  * ]|
1509  * If the returned #GDBusMessage is different from @message and cannot
1510  * be sent on @connection (it could use features, such as file
1511  * descriptors, not compatible with @connection), then a warning is
1512  * logged to <emphasis>standard error</emphasis>. Applications can
1513  * check this ahead of time using g_dbus_message_to_blob() passing a
1514  * #GDBusCapabilityFlags value obtained from @connection.
1515  * g_object_unref() or %NULL to drop the message. Passive filter
1516  * functions can simply return the passed @message object.
1517  *
1518  * Returns: (transfer full) (allow-none): A #GDBusMessage that will be freed with
1519  * Since: 2.26
1520  */
1521
1522
1523 /**
1524  * GDBusMessageFlags:
1525  * @G_DBUS_MESSAGE_FLAGS_NONE: No flags set.
1526  * @G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED: A reply is not expected.
1527  * @G_DBUS_MESSAGE_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this message.
1528  *
1529  * Message flags used in #GDBusMessage.
1530  *
1531  * Since: 2.26
1532  */
1533
1534
1535 /**
1536  * GDBusMessageHeaderField:
1537  * @G_DBUS_MESSAGE_HEADER_FIELD_INVALID: Not a valid header field.
1538  * @G_DBUS_MESSAGE_HEADER_FIELD_PATH: The object path.
1539  * @G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE: The interface name.
1540  * @G_DBUS_MESSAGE_HEADER_FIELD_MEMBER: The method or signal name.
1541  * @G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME: The name of the error that occurred.
1542  * @G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL: The serial number the message is a reply to.
1543  * @G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION: The name the message is intended for.
1544  * @G_DBUS_MESSAGE_HEADER_FIELD_SENDER: Unique name of the sender of the message (filled in by the bus).
1545  * @G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE: The signature of the message body.
1546  * @G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS: The number of UNIX file descriptors that accompany the message.
1547  *
1548  * Header fields used in #GDBusMessage.
1549  *
1550  * Since: 2.26
1551  */
1552
1553
1554 /**
1555  * GDBusMessageType:
1556  * @G_DBUS_MESSAGE_TYPE_INVALID: Message is of invalid type.
1557  * @G_DBUS_MESSAGE_TYPE_METHOD_CALL: Method call.
1558  * @G_DBUS_MESSAGE_TYPE_METHOD_RETURN: Method reply.
1559  * @G_DBUS_MESSAGE_TYPE_ERROR: Error reply.
1560  * @G_DBUS_MESSAGE_TYPE_SIGNAL: Signal emission.
1561  *
1562  * Message types used in #GDBusMessage.
1563  *
1564  * Since: 2.26
1565  */
1566
1567
1568 /**
1569  * GDBusMethodInfo:
1570  * @ref_count: The reference count or -1 if statically allocated.
1571  * @name: The name of the D-Bus method, e.g. @RequestName.
1572  * @in_args: A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no in arguments.
1573  * @out_args: A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no out arguments.
1574  * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1575  *
1576  * Information about a method on an D-Bus interface.
1577  *
1578  * Since: 2.26
1579  */
1580
1581
1582 /**
1583  * GDBusMethodInvocation:
1584  *
1585  * The #GDBusMethodInvocation structure contains only private data and
1586  * should only be accessed using the provided API.
1587  *
1588  * Since: 2.26
1589  */
1590
1591
1592 /**
1593  * GDBusMethodInvocationClass:
1594  *
1595  * Class structure for #GDBusMethodInvocation.
1596  *
1597  * Since: 2.26
1598  */
1599
1600
1601 /**
1602  * GDBusNodeInfo:
1603  * @ref_count: The reference count or -1 if statically allocated.
1604  * @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.
1605  * @interfaces: A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces.
1606  * @nodes: A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes.
1607  * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1608  *
1609  * Information about nodes in a remote object hierarchy.
1610  *
1611  * Since: 2.26
1612  */
1613
1614
1615 /**
1616  * GDBusPropertyInfo:
1617  * @ref_count: The reference count or -1 if statically allocated.
1618  * @name: The name of the D-Bus property, e.g. "SupportedFilesystems".
1619  * @signature: The D-Bus signature of the property (a single complete type).
1620  * @flags: Access control flags for the property.
1621  * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1622  *
1623  * Information about a D-Bus property on a D-Bus interface.
1624  *
1625  * Since: 2.26
1626  */
1627
1628
1629 /**
1630  * GDBusPropertyInfoFlags:
1631  * @G_DBUS_PROPERTY_INFO_FLAGS_NONE: No flags set.
1632  * @G_DBUS_PROPERTY_INFO_FLAGS_READABLE: Property is readable.
1633  * @G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE: Property is writable.
1634  *
1635  * Flags describing the access control of a D-Bus property.
1636  *
1637  * Since: 2.26
1638  */
1639
1640
1641 /**
1642  * GDBusProxy:
1643  *
1644  * The #GDBusProxy structure contains only private data and
1645  * should only be accessed using the provided API.
1646  *
1647  * Since: 2.26
1648  */
1649
1650
1651 /**
1652  * GDBusProxy::g-properties-changed:
1653  * @proxy: The #GDBusProxy emitting the signal.
1654  * @changed_properties: A #GVariant containing the properties that changed
1655  * @invalidated_properties: A %NULL terminated array of properties that was invalidated
1656  *
1657  * Emitted when one or more D-Bus properties on @proxy changes. The
1658  * local cache has already been updated when this signal fires. Note
1659  * that both @changed_properties and @invalidated_properties are
1660  * guaranteed to never be %NULL (either may be empty though).
1661  * This signal corresponds to the
1662  * <literal>PropertiesChanged</literal> D-Bus signal on the
1663  * <literal>org.freedesktop.DBus.Properties</literal> interface.
1664  *
1665  * Since: 2.26
1666  */
1667
1668
1669 /**
1670  * GDBusProxy::g-signal:
1671  * @proxy: The #GDBusProxy emitting the signal.
1672  * @sender_name: The sender of the signal or %NULL if the connection is not a bus connection.
1673  * @signal_name: The name of the signal.
1674  * @parameters: A #GVariant tuple with parameters for the signal.
1675  *
1676  * Emitted when a signal from the remote object and interface that @proxy is for, has been received.
1677  *
1678  * Since: 2.26
1679  */
1680
1681
1682 /**
1683  * GDBusProxy:g-bus-type:
1684  *
1685  * If this property is not %G_BUS_TYPE_NONE, then
1686  * #GDBusProxy:g-connection must be %NULL and will be set to the
1687  * #GDBusConnection obtained by calling g_bus_get() with the value
1688  * of this property.
1689  *
1690  * Since: 2.26
1691  */
1692
1693
1694 /**
1695  * GDBusProxy:g-connection:
1696  *
1697  * The #GDBusConnection the proxy is for.
1698  *
1699  * Since: 2.26
1700  */
1701
1702
1703 /**
1704  * GDBusProxy:g-default-timeout:
1705  *
1706  * The timeout to use if -1 (specifying default timeout) is passed
1707  * as @timeout_msec in the g_dbus_proxy_call() and
1708  * g_dbus_proxy_call_sync() functions.
1709  * This allows applications to set a proxy-wide timeout for all
1710  * remote method invocations on the proxy. If this property is -1,
1711  * the default timeout (typically 25 seconds) is used. If set to
1712  * %G_MAXINT, then no timeout is used.
1713  *
1714  * Since: 2.26
1715  */
1716
1717
1718 /**
1719  * GDBusProxy:g-flags:
1720  *
1721  * Flags from the #GDBusProxyFlags enumeration.
1722  *
1723  * Since: 2.26
1724  */
1725
1726
1727 /**
1728  * GDBusProxy:g-interface-info:
1729  *
1730  * Ensure that interactions with this proxy conform to the given
1731  * interface.  For example, when completing a method call, if the
1732  * type signature of the message isn't what's expected, the given
1733  * #GError is set.  Signals that have a type signature mismatch are
1734  * simply dropped.
1735  *
1736  * Since: 2.26
1737  */
1738
1739
1740 /**
1741  * GDBusProxy:g-interface-name:
1742  *
1743  * The D-Bus interface name the proxy is for.
1744  *
1745  * Since: 2.26
1746  */
1747
1748
1749 /**
1750  * GDBusProxy:g-name:
1751  *
1752  * The well-known or unique name that the proxy is for.
1753  *
1754  * Since: 2.26
1755  */
1756
1757
1758 /**
1759  * GDBusProxy:g-name-owner:
1760  *
1761  * The unique name that owns #GDBusProxy:name or %NULL if no-one
1762  * currently owns that name. You may connect to #GObject::notify signal to
1763  * track changes to this property.
1764  *
1765  * Since: 2.26
1766  */
1767
1768
1769 /**
1770  * GDBusProxy:g-object-path:
1771  *
1772  * The object path the proxy is for.
1773  *
1774  * Since: 2.26
1775  */
1776
1777
1778 /**
1779  * GDBusProxyClass:
1780  * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal.
1781  * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal.
1782  *
1783  * Class structure for #GDBusProxy.
1784  *
1785  * Since: 2.26
1786  */
1787
1788
1789 /**
1790  * GDBusProxyFlags:
1791  * @G_DBUS_PROXY_FLAGS_NONE: No flags set.
1792  * @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties.
1793  * @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object.
1794  * @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.
1795  *
1796  * Flags used when constructing an instance of a #GDBusProxy derived class.
1797  *
1798  * Since: 2.26
1799  */
1800
1801
1802 /**
1803  * GDBusSendMessageFlags:
1804  * @G_DBUS_SEND_MESSAGE_FLAGS_NONE: No flags set.
1805  * @G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL: Do not automatically assign a serial number from the #GDBusConnection object when sending a message.
1806  *
1807  * Flags used when sending #GDBusMessage<!-- -->s on a #GDBusConnection.
1808  *
1809  * Since: 2.26
1810  */
1811
1812
1813 /**
1814  * GDBusServer:
1815  *
1816  * The #GDBusServer structure contains only private data and
1817  * should only be accessed using the provided API.
1818  *
1819  * Since: 2.26
1820  */
1821
1822
1823 /**
1824  * GDBusServer::new-connection:
1825  * @server: The #GDBusServer emitting the signal.
1826  * @connection: A #GDBusConnection for the new connection.
1827  *
1828  * Emitted when a new authenticated connection has been made. Use
1829  * g_dbus_connection_get_peer_credentials() to figure out what
1830  * identity (if any), was authenticated.
1831  * If you want to accept the connection, take a reference to the
1832  * connection call g_dbus_connection_close() and give up your
1833  * reference. Note that the other peer may disconnect at any time -
1834  * a typical thing to do when accepting a connection is to listen to
1835  * the #GDBusConnection::closed signal.
1836  * If #GDBusServer:flags contains %G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
1837  * then the signal is emitted in a new thread dedicated to the
1838  * connection. Otherwise the signal is emitted in the <link
1839  * linkend="g-main-context-push-thread-default">thread-default main
1840  * loop</link> of the thread that @server was constructed in.
1841  * You are guaranteed that signal handlers for this signal runs
1842  * before incoming messages on @connection are processed. This means
1843  * that it's suitable to call g_dbus_connection_register_object() or
1844  * similar from the signal handler.
1845  * run.
1846  *
1847  * Returns: %TRUE to claim @connection, %FALSE to let other handlers
1848  * Since: 2.26
1849  */
1850
1851
1852 /**
1853  * GDBusServer:active:
1854  *
1855  * Whether the server is currently active.
1856  *
1857  * Since: 2.26
1858  */
1859
1860
1861 /**
1862  * GDBusServer:address:
1863  *
1864  * The D-Bus address to listen on.
1865  *
1866  * Since: 2.26
1867  */
1868
1869
1870 /**
1871  * GDBusServer:authentication-observer:
1872  *
1873  * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
1874  *
1875  * Since: 2.26
1876  */
1877
1878
1879 /**
1880  * GDBusServer:client-address:
1881  *
1882  * The D-Bus address that clients can use.
1883  *
1884  * Since: 2.26
1885  */
1886
1887
1888 /**
1889  * GDBusServer:flags:
1890  *
1891  * Flags from the #GDBusServerFlags enumeration.
1892  *
1893  * Since: 2.26
1894  */
1895
1896
1897 /**
1898  * GDBusServer:guid:
1899  *
1900  * The guid of the server.
1901  *
1902  * Since: 2.26
1903  */
1904
1905
1906 /**
1907  * GDBusServerClass:
1908  * @new_connection: Signal class handler for the #GDBusServer::new-connection signal.
1909  *
1910  * Class structure for #GDBusServer.
1911  *
1912  * Since: 2.26
1913  */
1914
1915
1916 /**
1917  * GDBusServerFlags:
1918  * @G_DBUS_SERVER_FLAGS_NONE: No flags set.
1919  * @G_DBUS_SERVER_FLAGS_RUN_IN_THREAD: All #GDBusServer::new-connection signals will run in separated dedicated threads (see signal for details).
1920  * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: Allow the anonymous authentication method.
1921  *
1922  * Flags used when creating a #GDBusServer.
1923  *
1924  * Since: 2.26
1925  */
1926
1927
1928 /**
1929  * GDBusSignalCallback:
1930  * @connection: A #GDBusConnection.
1931  * @sender_name: The unique bus name of the sender of the signal.
1932  * @object_path: The object path that the signal was emitted on.
1933  * @interface_name: The name of the interface.
1934  * @signal_name: The name of the signal.
1935  * @parameters: A #GVariant tuple with parameters for the signal.
1936  * @user_data: User data passed when subscribing to the signal.
1937  *
1938  * Signature for callback function used in g_dbus_connection_signal_subscribe().
1939  *
1940  * Since: 2.26
1941  */
1942
1943
1944 /**
1945  * GDBusSignalFlags:
1946  * @G_DBUS_SIGNAL_FLAGS_NONE: No flags set.
1947  * @G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE: Don't actually send the AddMatch DBus call for this signal subscription.  This gives you more control over which match rules you add (but you must add them manually).
1948  *
1949  * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe().
1950  *
1951  * Since: 2.26
1952  */
1953
1954
1955 /**
1956  * GDBusSignalInfo:
1957  * @ref_count: The reference count or -1 if statically allocated.
1958  * @name: The name of the D-Bus signal, e.g. "NameOwnerChanged".
1959  * @args: A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments.
1960  * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1961  *
1962  * Information about a signal on a D-Bus interface.
1963  *
1964  * Since: 2.26
1965  */
1966
1967
1968 /**
1969  * GDBusSubtreeDispatchFunc:
1970  * @connection: A #GDBusConnection.
1971  * @sender: The unique bus name of the remote caller.
1972  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
1973  * @interface_name: The D-Bus interface name that the method call or property access is for.
1974  * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
1975  * @out_user_data: Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL).
1976  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
1977  *
1978  * The type of the @dispatch function in #GDBusSubtreeVTable.
1979  * Subtrees are flat.  @node, if non-%NULL, is always exactly one
1980  *
1981  * Segment of the object path (ie: it never contains a slash).
1982  * Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.
1983  * Since: 2.26
1984  */
1985
1986
1987 /**
1988  * GDBusSubtreeEnumerateFunc:
1989  * @connection: A #GDBusConnection.
1990  * @sender: The unique bus name of the remote caller.
1991  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
1992  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
1993  *
1994  * The type of the @enumerate function in #GDBusSubtreeVTable.
1995  * This function is called when generating introspection data and also
1996  * when preparing to dispatch incoming messages in the event that the
1997  * %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not
1998  * Hierarchies are not supported; the items that you return should not
1999  * contain the '/' character.
2000  * The return value will be freed with g_strfreev().
2001  *
2002  * Specified (ie: to verify that the object path is valid).
2003  * Returns: A newly allocated array of strings for node names that are children of @object_path.
2004  * Since: 2.26
2005  */
2006
2007
2008 /**
2009  * GDBusSubtreeFlags:
2010  * @G_DBUS_SUBTREE_FLAGS_NONE: No flags set.
2011  * @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.
2012  *
2013  * Flags passed to g_dbus_connection_register_subtree().
2014  *
2015  * Since: 2.26
2016  */
2017
2018
2019 /**
2020  * GDBusSubtreeIntrospectFunc:
2021  * @connection: A #GDBusConnection.
2022  * @sender: The unique bus name of the remote caller.
2023  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2024  * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
2025  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2026  *
2027  * The type of the @introspect function in #GDBusSubtreeVTable.
2028  * Subtrees are flat.  @node, if non-%NULL, is always exactly one
2029  * This function should return %NULL to indicate that there is no object
2030  * at this node.
2031  * If this function returns non-%NULL, the return value is expected to
2032  * be a %NULL-terminated array of pointers to #GDBusInterfaceInfo
2033  * structures describing the interfaces implemented by @node.  This
2034  * array will have g_dbus_interface_info_unref() called on each item
2035  * before being freed with g_free().
2036  * The difference between returning %NULL and an array containing zero
2037  * items is that the standard DBus interfaces will returned to the
2038  * remote introspector in the empty array case, but not in the %NULL
2039  * case.
2040  *
2041  * Segment of the object path (ie: it never contains a slash).
2042  * Returns: A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL.
2043  * Since: 2.26
2044  */
2045
2046
2047 /**
2048  * GDBusSubtreeVTable:
2049  * @enumerate: Function for enumerating child nodes.
2050  * @introspect: Function for introspecting a child node.
2051  * @dispatch: Function for dispatching a remote call on a child node.
2052  *
2053  * Virtual table for handling subtrees registered with g_dbus_connection_register_subtree().
2054  *
2055  * Since: 2.26
2056  */
2057
2058
2059 /**
2060  * GDataInputStream:
2061  *
2062  * An implementation of #GBufferedInputStream that allows for high-level
2063  * data manipulation of arbitrary data (including binary operations).
2064  */
2065
2066
2067 /**
2068  * GDataOutputStream:
2069  *
2070  * An implementation of #GBufferedOutputStream that allows for high-level
2071  * data manipulation of arbitrary data (including binary operations).
2072  */
2073
2074
2075 /**
2076  * GDataOutputStream:byte-order:
2077  *
2078  * Determines the byte ordering that is used when writing
2079  * multi-byte entities (such as integers) to the stream.
2080  */
2081
2082
2083 /**
2084  * GDataStream:byte-order:
2085  *
2086  * The ::byte-order property determines the byte ordering that
2087  * is used when reading multi-byte entities (such as integers)
2088  * from the stream.
2089  */
2090
2091
2092 /**
2093  * GDataStream:newline-type:
2094  *
2095  * The :newline-type property determines what is considered
2096  * as a line ending when reading complete lines from the stream.
2097  */
2098
2099
2100 /**
2101  * GDataStreamByteOrder:
2102  * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order.
2103  * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order.
2104  * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture.
2105  *
2106  * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources
2107  * across various machine architectures.
2108  */
2109
2110
2111 /**
2112  * GDataStreamNewlineType:
2113  * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms.
2114  * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings.
2115  * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows.
2116  * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type.
2117  *
2118  * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file.
2119  */
2120
2121
2122 /**
2123  * GDateTime:
2124  *
2125  * <structname>GDateTime</structname> is an opaque structure whose members
2126  * cannot be accessed directly.
2127  *
2128  * Since: 2.26
2129  */
2130
2131
2132 /**
2133  * GDesktopAppInfo:
2134  *
2135  * Information about an installed application from a desktop file.
2136  */
2137
2138
2139 /**
2140  * GDesktopAppInfoLookup:
2141  *
2142  * Interface that is used by backends to associate default
2143  * handlers with URI schemes.
2144  */
2145
2146
2147 /**
2148  * GDesktopAppLaunchCallback:
2149  * @appinfo: a #GDesktopAppInfo
2150  * @pid: Process identifier
2151  * @user_data: User data
2152  *
2153  * During invocation, g_desktop_app_info_launch_uris_as_manager() may
2154  * create one or more child processes.  This callback is invoked once
2155  * for each, providing the process ID.
2156  */
2157
2158
2159 /**
2160  * GDrive:
2161  *
2162  * Opaque drive object.
2163  */
2164
2165
2166 /**
2167  * GDrive::changed:
2168  * @drive: a #GDrive.
2169  *
2170  * Emitted when the drive's state has changed.
2171  */
2172
2173
2174 /**
2175  * GDrive::disconnected:
2176  * @drive: a #GDrive.
2177  *
2178  * This signal is emitted when the #GDrive have been
2179  * disconnected. If the recipient is holding references to the
2180  * object they should release them so the object can be
2181  * finalized.
2182  */
2183
2184
2185 /**
2186  * GDrive::eject-button:
2187  * @drive: a #GDrive.
2188  *
2189  * Emitted when the physical eject button (if any) of a drive has
2190  * been pressed.
2191  */
2192
2193
2194 /**
2195  * GDrive::stop-button:
2196  * @drive: a #GDrive.
2197  *
2198  * Emitted when the physical stop button (if any) of a drive has
2199  * been pressed.
2200  *
2201  * Since: 2.22
2202  */
2203
2204
2205 /**
2206  * GDriveIface:
2207  * @g_iface: The parent interface.
2208  * @changed: Signal emitted when the drive is changed.
2209  * @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.
2210  * @eject_button: Signal emitted when the physical eject button (if any) of a drive have been pressed.
2211  * @get_name: Returns the name for the given #GDrive.
2212  * @get_icon: Returns a #GIcon for the given #GDrive.
2213  * @has_volumes: Returns %TRUE if the #GDrive has mountable volumes.
2214  * @get_volumes: Returns a list #GList of #GVolume for the #GDrive.
2215  * @is_media_removable: Returns %TRUE if the #GDrive supports removal and insertion of media.
2216  * @has_media: Returns %TRUE if the #GDrive has media inserted.
2217  * @is_media_check_automatic: Returns %TRUE if the #GDrive is capabable of automatically detecting media changes.
2218  * @can_poll_for_media: Returns %TRUE if the #GDrive is capable of manually polling for media change.
2219  * @can_eject: Returns %TRUE if the #GDrive can eject media.
2220  * @eject: Ejects a #GDrive.
2221  * @eject_finish: Finishes an eject operation.
2222  * @poll_for_media: Poll for media insertion/removal on a #GDrive.
2223  * @poll_for_media_finish: Finishes a media poll operation.
2224  * @get_identifier: Returns the identifier of the given kind, or %NULL if the #GDrive doesn't have one.
2225  * @enumerate_identifiers: Returns an array strings listing the kinds of identifiers which the #GDrive has.
2226  * @get_start_stop_type: Gets a #GDriveStartStopType with details about starting/stopping the drive. Since 2.22.
2227  * @can_stop: Returns %TRUE if a #GDrive can be stopped. Since 2.22.
2228  * @stop: Stops a #GDrive. Since 2.22.
2229  * @stop_finish: Finishes a stop operation. Since 2.22.
2230  * @can_start: Returns %TRUE if a #GDrive can be started. Since 2.22.
2231  * @can_start_degraded: Returns %TRUE if a #GDrive can be started degraded. Since 2.22.
2232  * @start: Starts a #GDrive. Since 2.22.
2233  * @start_finish: Finishes a start operation. Since 2.22.
2234  * @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.
2235  * @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22.
2236  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
2237  *
2238  * Interface for creating #GDrive implementations.
2239  */
2240
2241
2242 /**
2243  * GDriveStartFlags:
2244  * @G_DRIVE_START_NONE: No flags set.
2245  *
2246  * Flags used when starting a drive.
2247  *
2248  * Since: 2.22
2249  */
2250
2251
2252 /**
2253  * GDriveStartStopType:
2254  * @G_DRIVE_START_STOP_TYPE_UNKNOWN: Unknown or drive doesn't support start/stop.
2255  * @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.
2256  * @G_DRIVE_START_STOP_TYPE_NETWORK: The start/stop methods are used for connecting/disconnect to the drive over the network.
2257  * @G_DRIVE_START_STOP_TYPE_MULTIDISK: The start/stop methods will assemble/disassemble a virtual drive from several physical drives.
2258  * @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)
2259  *
2260  * Enumeration describing how a drive can be started/stopped.
2261  *
2262  * Since: 2.22
2263  */
2264
2265
2266 /**
2267  * GEmblem:
2268  *
2269  * An object for Emblems
2270  */
2271
2272
2273 /**
2274  * GEmblemOrigin:
2275  * @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin
2276  * @G_EMBLEM_ORIGIN_DEVICE: Emblem adds device-specific information
2277  * @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly"
2278  * @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)
2279  *
2280  * GEmblemOrigin is used to add information about the origin of the emblem
2281  * to #GEmblem.
2282  *
2283  * Since: 2.18
2284  */
2285
2286
2287 /**
2288  * GEmblemedIcon:
2289  *
2290  * An implementation of #GIcon for icons with emblems.
2291  */
2292
2293
2294 /**
2295  * GEnumClass:
2296  * @g_type_class: the parent class
2297  * @minimum: the smallest possible value.
2298  * @maximum: the largest possible value.
2299  * @n_values: the number of possible values.
2300  * @values: an array of #GEnumValue structs describing the individual values.
2301  *
2302  * The class of an enumeration type holds information about its
2303  * possible values.
2304  */
2305
2306
2307 /**
2308  * GEnumValue:
2309  * @value: the enum value
2310  * @value_name: the name of the value
2311  * @value_nick: the nickname of the value
2312  *
2313  * A structure which contains a single enum value, its name, and its
2314  * nickname.
2315  */
2316
2317
2318 /**
2319  * GFile:
2320  *
2321  * A handle to an object implementing the #GFileIface interface.
2322  * Generally stores a location within the file system. Handles do not
2323  * necessarily represent files or directories that currently exist.
2324  */
2325
2326
2327 /**
2328  * GFileAttributeInfo:
2329  * @name: the name of the attribute.
2330  * @type: the #GFileAttributeType type of the attribute.
2331  * @flags: a set of #GFileAttributeInfoFlags.
2332  *
2333  * Information about a specific attribute.
2334  */
2335
2336
2337 /**
2338  * GFileAttributeInfoFlags:
2339  * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set.
2340  * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied.
2341  * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved.
2342  *
2343  * Flags specifying the behaviour of an attribute.
2344  */
2345
2346
2347 /**
2348  * GFileAttributeInfoList:
2349  * @infos: an array of #GFileAttributeInfo<!-- -->s.
2350  * @n_infos: the number of values in the array.
2351  *
2352  * Acts as a lightweight registry for possible valid file attributes.
2353  * The registry stores Key-Value pair formats as #GFileAttributeInfo<!-- -->s.
2354  */
2355
2356
2357 /**
2358  * GFileAttributeMatcher:
2359  *
2360  * Determines if a string matches a file attribute.
2361  */
2362
2363
2364 /**
2365  * GFileAttributeStatus:
2366  * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty).
2367  * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set.
2368  * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value.
2369  *
2370  * Used by g_file_set_attributes_from_info() when setting file attributes.
2371  */
2372
2373
2374 /**
2375  * GFileAttributeType:
2376  * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitalized type.
2377  * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string.
2378  * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes.
2379  * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value.
2380  * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer.
2381  * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer.
2382  * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer.
2383  * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer.
2384  * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject.
2385  * @G_FILE_ATTRIBUTE_TYPE_STRINGV: a %NULL terminated char **. Since 2.22
2386  *
2387  * The data types for file attributes.
2388  */
2389
2390
2391 /**
2392  * GFileCopyFlags:
2393  * @G_FILE_COPY_NONE: No flags set.
2394  * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
2395  * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
2396  * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
2397  * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
2398  * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
2399  * @G_FILE_COPY_TARGET_DEFAULT_PERMS: Leaves target file with default perms, instead of setting the source file perms.
2400  *
2401  * Flags used when copying or moving files.
2402  */
2403
2404
2405 /**
2406  * GFileCreateFlags:
2407  * @G_FILE_CREATE_NONE: No flags set.
2408  * @G_FILE_CREATE_PRIVATE: Create a file that can only be accessed by the current user.
2409  * @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
2410  *
2411  * Flags used when an operation may create a file.
2412  */
2413
2414
2415 /**
2416  * GFileDescriptorBased:
2417  *
2418  * An interface for file descriptor based io objects.
2419  */
2420
2421
2422 /**
2423  * GFileDescriptorBasedIface:
2424  * @g_iface: The parent interface.
2425  *
2426  *
2427  */
2428
2429
2430 /**
2431  * GFileEnumerator:
2432  *
2433  * A per matched file iterator.
2434  */
2435
2436
2437 /**
2438  * GFileIOStream:
2439  *
2440  * A subclass of GIOStream for opened files. This adds
2441  * a few file-specific operations and seeking and truncating.
2442  * #GFileIOStream implements GSeekable.
2443  */
2444
2445
2446 /**
2447  * GFileIcon:
2448  *
2449  * Gets an icon for a #GFile. Implements #GLoadableIcon.
2450  */
2451
2452
2453 /**
2454  * GFileIcon:file:
2455  *
2456  * The file containing the icon.
2457  */
2458
2459
2460 /**
2461  * GFileIface:
2462  * @g_iface: The parent interface.
2463  * @dup: Duplicates a #GFile.
2464  * @hash: Creates a hash of a #GFile.
2465  * @equal: Checks equality of two given #GFile<!-- -->s.
2466  * @is_native: Checks to see if a file is native to the system.
2467  * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
2468  * @get_uri_scheme: Gets the URI scheme for a #GFile.
2469  * @get_basename: Gets the basename for a given #GFile.
2470  * @get_path: Gets the current path within a #GFile.
2471  * @get_uri: Gets a URI for the path within a #GFile.
2472  * @get_parse_name: Gets the parsed name for the #GFile.
2473  * @get_parent: Gets the parent directory for the #GFile.
2474  * @prefix_matches: Checks whether a #GFile contains a specified file.
2475  * @get_relative_path: Gets the path for a #GFile relative to a given path.
2476  * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
2477  * @get_child_for_display_name: Gets the child #GFile for a given display name.
2478  * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
2479  * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
2480  * @enumerate_children_finish: Finishes asynchronously enumerating the children.
2481  * @query_info: Gets the #GFileInfo for a #GFile.
2482  * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
2483  * @query_info_finish: Finishes an asynchronous query info operation.
2484  * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
2485  * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
2486  * @query_filesystem_info_finish: Finishes asynchronously getting the file system info.
2487  * @find_enclosing_mount: Gets a #GMount for the #GFile.
2488  * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
2489  * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
2490  * @set_display_name: Sets the display name for a #GFile.
2491  * @set_display_name_async: Asynchronously sets a #GFile's display name.
2492  * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
2493  * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
2494  * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
2495  * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
2496  * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
2497  * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
2498  * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
2499  * @set_attribute: Sets a #GFileAttribute.
2500  * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
2501  * @set_attributes_async: Asynchronously sets a file's attributes.
2502  * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
2503  * @read_fn: Reads a file asynchronously.
2504  * @read_async: Asynchronously reads a file.
2505  * @read_finish: Finishes asynchronously reading a file.
2506  * @append_to: Writes to the end of a file.
2507  * @append_to_async: Asynchronously writes to the end of a file.
2508  * @append_to_finish: Finishes an asynchronous file append operation.
2509  * @create: Creates a new file.
2510  * @create_async: Asynchronously creates a file.
2511  * @create_finish: Finishes asynchronously creating a file.
2512  * @replace: Replaces the contents of a file.
2513  * @replace_async: Asynchronously replaces the contents of a file.
2514  * @replace_finish: Finishes asynchronously replacing a file.
2515  * @delete_file: Deletes a file.
2516  * @_delete_file_async: Asynchronously deletes a file.
2517  * @_delete_file_finish: Finishes an asynchronous delete.
2518  * @trash: Sends a #GFile to the Trash location.
2519  * @_trash_async: Asynchronously sends a #GFile to the Trash location.
2520  * @_trash_finish: Finishes an asynchronous file trashing operation.
2521  * @make_directory: Makes a directory.
2522  * @_make_directory_async: Asynchronously makes a directory.
2523  * @_make_directory_finish: Finishes making a directory asynchronously.
2524  * @make_symbolic_link: Makes a symbolic link.
2525  * @_make_symbolic_link_async: Asynchronously makes a symbolic link
2526  * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
2527  * @copy: Copies a file.
2528  * @copy_async: Asynchronously copies a file.
2529  * @copy_finish: Finishes an asynchronous copy operation.
2530  * @move: Moves a file.
2531  * @_move_async: Asynchronously moves a file.
2532  * @_move_finish: Finishes an asynchronous move operation.
2533  * @mount_mountable: Mounts a mountable object.
2534  * @mount_mountable_finish: Finishes a mounting operation.
2535  * @unmount_mountable: Unmounts a mountable object.
2536  * @unmount_mountable_finish: Finishes an unmount operation.
2537  * @eject_mountable: Ejects a mountable.
2538  * @eject_mountable_finish: Finishes an eject operation.
2539  * @mount_enclosing_volume: Mounts a specified location.
2540  * @mount_enclosing_volume_finish: Finishes mounting a specified location.
2541  * @monitor_dir: Creates a #GFileMonitor for the location.
2542  * @monitor_file: Creates a #GFileMonitor for the location.
2543  * @open_readwrite: Open file read/write. Since 2.22.
2544  * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22.
2545  * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22.
2546  * @create_readwrite: Creates file read/write. Since 2.22.
2547  * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22.
2548  * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22.
2549  * @replace_readwrite: Replaces file read/write. Since 2.22.
2550  * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22.
2551  * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22.
2552  * @start_mountable: Starts a mountable object. Since 2.22.
2553  * @start_mountable_finish: Finishes an start operation. Since 2.22.
2554  * @stop_mountable: Stops a mountable. Since 2.22.
2555  * @stop_mountable_finish: Finishes an stop operation. Since 2.22.
2556  * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22.
2557  * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22.
2558  * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22.
2559  * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22.
2560  * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
2561  * @poll_mountable: Polls a mountable object for media changes. Since 2.22.
2562  * @poll_mountable_finish: Finishes an poll operation for media changes. Since 2.22.
2563  *
2564  * An interface for writing VFS file handles.
2565  */
2566
2567
2568 /**
2569  * GFileInfo:
2570  *
2571  * Stores information about a file system object referenced by a #GFile.
2572  */
2573
2574
2575 /**
2576  * GFileInputStream:
2577  *
2578  * A subclass of GInputStream for opened files. This adds
2579  * a few file-specific operations and seeking.
2580  * #GFileInputStream implements #GSeekable.
2581  */
2582
2583
2584 /**
2585  * GFileMonitor:
2586  *
2587  * Watches for changes to a file.
2588  */
2589
2590
2591 /**
2592  * GFileMonitor::changed:
2593  * @monitor: a #GFileMonitor.
2594  * @file: a #GFile.
2595  * @other_file: a #GFile or #NULL.
2596  * @event_type: a #GFileMonitorEvent.
2597  *
2598  * Emitted when @file has been changed.
2599  * If using #G_FILE_MONITOR_SEND_MOVED flag and @event_type is
2600  * #G_FILE_MONITOR_SEND_MOVED, @file will be set to a #GFile containing the
2601  * old path, and @other_file will be set to a #GFile containing the new path.
2602  * In all the other cases, @other_file will be set to #NULL.
2603  */
2604
2605
2606 /**
2607  * GFileMonitorEvent:
2608  * @G_FILE_MONITOR_EVENT_CHANGED: a file changed.
2609  * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes.
2610  * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted.
2611  * @G_FILE_MONITOR_EVENT_CREATED: a file was created.
2612  * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed.
2613  * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted.
2614  * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted.
2615  * @G_FILE_MONITOR_EVENT_MOVED: the file was moved.
2616  *
2617  * Specifies what type of event a monitor event is.
2618  */
2619
2620
2621 /**
2622  * GFileMonitorFlags:
2623  * @G_FILE_MONITOR_NONE: No flags set.
2624  * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
2625  * @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).
2626  *
2627  * Flags used to set what a #GFileMonitor will watch for.
2628  */
2629
2630
2631 /**
2632  * GFileOutputStream:
2633  *
2634  * A subclass of GOutputStream for opened files. This adds
2635  * a few file-specific operations and seeking and truncating.
2636  * #GFileOutputStream implements GSeekable.
2637  */
2638
2639
2640 /**
2641  * GFileProgressCallback:
2642  * @current_num_bytes: the current number of bytes in the operation.
2643  * @total_num_bytes: the total number of bytes in the operation.
2644  * @user_data: user data passed to the callback.
2645  *
2646  * When doing file operations that may take a while, such as moving
2647  * a file or copying a file, a progress callback is used to pass how
2648  * far along that operation is to the application.
2649  */
2650
2651
2652 /**
2653  * GFileQueryInfoFlags:
2654  * @G_FILE_QUERY_INFO_NONE: No flags set.
2655  * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
2656  *
2657  * Flags used when querying a #GFileInfo.
2658  */
2659
2660
2661 /**
2662  * GFileReadMoreCallback:
2663  * @file_contents: the data as currently read.
2664  * @file_size: the size of the data currently read.
2665  * @callback_data: data passed to the callback.
2666  *
2667  * When loading the partial contents of a file with g_file_load_partial_contents_async(),
2668  * it may become necessary to determine if any more data from the file should be loaded.
2669  * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
2670  * should be read, or %FALSE otherwise.
2671  *
2672  * Returns: %TRUE if more data should be read back. %FALSE otherwise.
2673  */
2674
2675
2676 /**
2677  * GFileType:
2678  * @G_FILE_TYPE_UNKNOWN: File's type is unknown.
2679  * @G_FILE_TYPE_REGULAR: File handle represents a regular file.
2680  * @G_FILE_TYPE_DIRECTORY: File handle represents a directory.
2681  * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link (Unix systems).
2682  * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo, block device, or character device.
2683  * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems).
2684  * @G_FILE_TYPE_MOUNTABLE: File is a mountable location.
2685  *
2686  * Indicates the file's on-disk type.
2687  */
2688
2689
2690 /**
2691  * GFilenameCompleter:
2692  *
2693  * Completes filenames based on files that exist within the file system.
2694  */
2695
2696
2697 /**
2698  * GFilenameCompleter::got-completion-data:
2699  *
2700  * Emitted when the file name completion information comes available.
2701  */
2702
2703
2704 /**
2705  * GFilesystemPreviewType:
2706  * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it.
2707  * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files.
2708  * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files.
2709  *
2710  * Indicates a hint from the file system whether files should be
2711  * previewed in a file manager. Returned as the value of the key
2712  * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW.
2713  */
2714
2715
2716 /**
2717  * GFilterInputStream:
2718  *
2719  * A base class for all input streams that work on an underlying stream.
2720  */
2721
2722
2723 /**
2724  * GFilterOutputStream:
2725  *
2726  * A base class for all output streams that work on an underlying stream.
2727  */
2728
2729
2730 /**
2731  * GFlagsClass:
2732  * @g_type_class: the parent class
2733  * @mask: a mask covering all possible values.
2734  * @n_values: the number of possible values.
2735  * @values: an array of #GFlagsValue structs describing the individual values.
2736  *
2737  * The class of a flags type holds information about its
2738  * possible values.
2739  */
2740
2741
2742 /**
2743  * GFlagsValue:
2744  * @value: the flags value
2745  * @value_name: the name of the value
2746  * @value_nick: the nickname of the value
2747  *
2748  * A structure which contains a single flags value, its name, and its
2749  * nickname.
2750  */
2751
2752
2753 /**
2754  * GIOErrorEnum:
2755  * @G_IO_ERROR_FAILED: Generic error condition for when any operation fails.
2756  * @G_IO_ERROR_NOT_FOUND: File not found error.
2757  * @G_IO_ERROR_EXISTS: File already exists error.
2758  * @G_IO_ERROR_IS_DIRECTORY: File is a directory error.
2759  * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory.
2760  * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty.
2761  * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file.
2762  * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link.
2763  * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted.
2764  * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters.
2765  * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters.
2766  * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links.
2767  * @G_IO_ERROR_NO_SPACE: No space left on drive.
2768  * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument.
2769  * @G_IO_ERROR_PERMISSION_DENIED: Permission denied.
2770  * @G_IO_ERROR_NOT_SUPPORTED: Operation not supported for the current backend.
2771  * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted.
2772  * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted.
2773  * @G_IO_ERROR_CLOSED: File was closed.
2774  * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable.
2775  * @G_IO_ERROR_PENDING: Operations are still pending.
2776  * @G_IO_ERROR_READ_ONLY: File is read only.
2777  * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created.
2778  * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect.
2779  * @G_IO_ERROR_TIMED_OUT: Operation timed out.
2780  * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive.
2781  * @G_IO_ERROR_BUSY: File is busy.
2782  * @G_IO_ERROR_WOULD_BLOCK: Operation would block.
2783  * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
2784  * @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
2785  * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has already interacted with the user. Do not display any error dialog.
2786  * @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
2787  * @G_IO_ERROR_NOT_INITIALIZED: The object has not been initialized. Since 2.22
2788  * @G_IO_ERROR_ADDRESS_IN_USE: The requested address is already in use. Since 2.22
2789  * @G_IO_ERROR_PARTIAL_INPUT: Need more input to finish operation. Since 2.24
2790  * @G_IO_ERROR_INVALID_DATA: There input data was invalid. Since 2.24
2791  * @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.
2792  * @G_IO_ERROR_HOST_UNREACHABLE: Host unreachable. Since 2.26
2793  * @G_IO_ERROR_NETWORK_UNREACHABLE: Network unreachable. Since 2.26
2794  * @G_IO_ERROR_CONNECTION_REFUSED: Connection refused. Since 2.26
2795  * @G_IO_ERROR_PROXY_FAILED: Connection to proxy server failed. Since 2.26
2796  * @G_IO_ERROR_PROXY_AUTH_FAILED: Proxy authentication failed. Since 2.26
2797  * @G_IO_ERROR_PROXY_NEED_AUTH: Proxy server needs authentication. Since 2.26
2798  * @G_IO_ERROR_PROXY_NOT_ALLOWED: Proxy connection is not allowed by ruleset. Since 2.26
2799  *
2800  * Error codes returned by GIO functions.
2801  */
2802
2803
2804 /**
2805  * GIOModule:
2806  *
2807  * Opaque module base class for extending GIO.
2808  */
2809
2810
2811 /**
2812  * GIOSchedulerJob:
2813  *
2814  * Opaque class for definining and scheduling IO jobs.
2815  */
2816
2817
2818 /**
2819  * GIOSchedulerJobFunc:
2820  * @job: a #GIOSchedulerJob.
2821  * @cancellable: optional #GCancellable object, %NULL to ignore.
2822  * @user_data: the data to pass to callback function
2823  *
2824  * I/O Job function.
2825  * Note that depending on whether threads are available, the
2826  * #GIOScheduler may run jobs in separate threads or in an idle
2827  * in the mainloop.
2828  * Long-running jobs should periodically check the @cancellable
2829  * to see if they have been cancelled.
2830  * complete the job, %FALSE if the job is complete (or cancelled)
2831  *
2832  * Returns: %TRUE if this function should be called again to
2833  */
2834
2835
2836 /**
2837  * GIOStream:
2838  *
2839  * Base class for read-write streams.
2840  */
2841
2842
2843 /**
2844  * GIOStreamSpliceFlags:
2845  * @G_IO_STREAM_SPLICE_NONE: Do not close either stream.
2846  * @G_IO_STREAM_SPLICE_CLOSE_STREAM1: Close the first stream after the splice.
2847  * @G_IO_STREAM_SPLICE_CLOSE_STREAM2: Close the second stream after the splice.
2848  * @G_IO_STREAM_SPLICE_WAIT_FOR_BOTH: Wait for both splice operations to finish before calling the callback.
2849  *
2850  * GIOStreamSpliceFlags determine how streams should be spliced.
2851  *
2852  * Since: 2.28
2853  */
2854
2855
2856 /**
2857  * GIcon:
2858  *
2859  * An abstract type that specifies an icon.
2860  */
2861
2862
2863 /**
2864  * GIconIface:
2865  * @g_iface: The parent interface.
2866  * @hash: A hash for a given #GIcon.
2867  * @equal: Checks if two #GIcon<!-- -->s are equal.
2868  * @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).
2869  * @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).
2870  *
2871  * GIconIface is used to implement GIcon types for various
2872  * different systems. See #GThemedIcon and #GLoadableIcon for
2873  * examples of how to implement this interface.
2874  */
2875
2876
2877 /**
2878  * GIconv:
2879  *
2880  * The <structname>GIConv</structname> struct wraps an
2881  * iconv() conversion descriptor. It contains private data
2882  * and should only be accessed using the following functions.
2883  */
2884
2885
2886 /**
2887  * GInetAddress:
2888  *
2889  * An IPv4 or IPv6 internet address.
2890  */
2891
2892
2893 /**
2894  * GInetAddress:is-any:
2895  *
2896  * Whether this is the "any" address for its family.
2897  * See g_inet_address_get_is_any().
2898  *
2899  * Since: 2.22
2900  */
2901
2902
2903 /**
2904  * GInetAddress:is-link-local:
2905  *
2906  * Whether this is a link-local address.
2907  * See g_inet_address_get_is_link_local().
2908  *
2909  * Since: 2.22
2910  */
2911
2912
2913 /**
2914  * GInetAddress:is-loopback:
2915  *
2916  * Whether this is the loopback address for its family.
2917  * See g_inet_address_get_is_loopback().
2918  *
2919  * Since: 2.22
2920  */
2921
2922
2923 /**
2924  * GInetAddress:is-mc-global:
2925  *
2926  * Whether this is a global multicast address.
2927  * See g_inet_address_get_is_mc_global().
2928  *
2929  * Since: 2.22
2930  */
2931
2932
2933 /**
2934  * GInetAddress:is-mc-link-local:
2935  *
2936  * Whether this is a link-local multicast address.
2937  * See g_inet_address_get_is_mc_link_local().
2938  *
2939  * Since: 2.22
2940  */
2941
2942
2943 /**
2944  * GInetAddress:is-mc-node-local:
2945  *
2946  * Whether this is a node-local multicast address.
2947  * See g_inet_address_get_is_mc_node_local().
2948  *
2949  * Since: 2.22
2950  */
2951
2952
2953 /**
2954  * GInetAddress:is-mc-org-local:
2955  *
2956  * Whether this is an organization-local multicast address.
2957  * See g_inet_address_get_is_mc_org_local().
2958  *
2959  * Since: 2.22
2960  */
2961
2962
2963 /**
2964  * GInetAddress:is-mc-site-local:
2965  *
2966  * Whether this is a site-local multicast address.
2967  * See g_inet_address_get_is_mc_site_local().
2968  *
2969  * Since: 2.22
2970  */
2971
2972
2973 /**
2974  * GInetAddress:is-multicast:
2975  *
2976  * Whether this is a multicast address.
2977  * See g_inet_address_get_is_multicast().
2978  *
2979  * Since: 2.22
2980  */
2981
2982
2983 /**
2984  * GInetAddress:is-site-local:
2985  *
2986  * Whether this is a site-local address.
2987  * See g_inet_address_get_is_loopback().
2988  *
2989  * Since: 2.22
2990  */
2991
2992
2993 /**
2994  * GInetSocketAddress:
2995  *
2996  * An IPv4 or IPv6 socket address, corresponding to a <type>struct
2997  * sockaddr_in</type> or <type>struct sockaddr_in6</type>.
2998  */
2999
3000
3001 /**
3002  * GInitable:
3003  *
3004  * Interface for initializable objects.
3005  *
3006  * Since: 2.22
3007  */
3008
3009
3010 /**
3011  * GInitableIface:
3012  * @g_iface: The parent interface.
3013  * @init: Initializes the object.
3014  *
3015  * Provides an interface for initializing object such that initialization
3016  * may fail.
3017  *
3018  * Since: 2.22
3019  */
3020
3021
3022 /**
3023  * GInitiallyUnowned:
3024  *
3025  * All the fields in the <structname>GInitiallyUnowned</structname> structure
3026  * are private to the #GInitiallyUnowned implementation and should never be
3027  * accessed directly.
3028  */
3029
3030
3031 /**
3032  * GInitiallyUnownedClass:
3033  *
3034  * The class structure for the <structname>GInitiallyUnowned</structname> type.
3035  */
3036
3037
3038 /**
3039  * GInputStream:
3040  *
3041  * Base class for streaming input operations.
3042  */
3043
3044
3045 /**
3046  * GInputVector:
3047  * @buffer: Pointer to a buffer where data will be written.
3048  * @size: the available size in @buffer.
3049  *
3050  * Structure used for scatter/gather data input.
3051  * You generally pass in an array of #GInputVector<!-- -->s
3052  * and the operation will store the read data starting in the
3053  * first buffer, switching to the next as needed.
3054  *
3055  * Since: 2.22
3056  */
3057
3058
3059 /**
3060  * GInstanceInitFunc:
3061  * @instance: The instance to initialize.
3062  * @g_class: The class of the type the instance is created for.
3063  *
3064  * A callback function used by the type system to initialize a new
3065  * instance of a type. This function initializes all instance members and
3066  * allocates any resources required by it.
3067  * Initialization of a derived instance involves calling all its parent
3068  * types instance initializers, so the class member of the instance
3069  * is altered during its initialization to always point to the class that
3070  * belongs to the type the current initializer was introduced for.
3071  */
3072
3073
3074 /**
3075  * GInterfaceFinalizeFunc:
3076  * @g_iface: The interface structure to finalize.
3077  * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3078  *
3079  * A callback function used by the type system to finalize an interface.
3080  * This function should destroy any internal data and release any resources
3081  * allocated by the corresponding GInterfaceInitFunc() function.
3082  */
3083
3084
3085 /**
3086  * GInterfaceInfo:
3087  * @interface_init: location of the interface initialization function
3088  * @interface_finalize: location of the interface finalization function
3089  * @interface_data: user-supplied data passed to the interface init/finalize functions
3090  *
3091  * A structure that provides information to the type system which is
3092  * used specifically for managing interface types.
3093  */
3094
3095
3096 /**
3097  * GInterfaceInitFunc:
3098  * @g_iface: The interface structure to initialize.
3099  * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3100  *
3101  * A callback function used by the type system to initialize a new
3102  * interface.  This function should initialize all internal data and
3103  * allocate any resources required by the interface.
3104  */
3105
3106
3107 /**
3108  * GLoadableIcon:
3109  *
3110  * Generic type for all kinds of icons that can be loaded
3111  * as a stream.
3112  */
3113
3114
3115 /**
3116  * GLoadableIconIface:
3117  * @g_iface: The parent interface.
3118  * @load: Loads an icon.
3119  * @load_async: Loads an icon asynchronously.
3120  * @load_finish: Finishes an asynchronous icon load.
3121  *
3122  * Interface for icons that can be loaded as a stream.
3123  */
3124
3125
3126 /**
3127  * GMainContext:
3128  *
3129  * The <structname>GMainContext</structname> struct is an opaque data
3130  * type representing a set of sources to be handled in a main loop.
3131  */
3132
3133
3134 /**
3135  * GMainLoop:
3136  *
3137  * The <structname>GMainLoop</structname> struct is an opaque data type
3138  * representing the main event loop of a GLib or GTK+ application.
3139  */
3140
3141
3142 /**
3143  * GMarkupError:
3144  * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8
3145  * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace
3146  * @G_MARKUP_ERROR_PARSE: document was ill-formed
3147  * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser functions; element wasn't known
3148  * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser functions; attribute wasn't known
3149  * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser functions; content was invalid
3150  * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser functions; a required attribute was missing
3151  *
3152  * Error codes returned by markup parsing.
3153  */
3154
3155
3156 /**
3157  * GMarkupParseContext:
3158  *
3159  * A parse context is used to parse a stream of bytes that
3160  * you expect to contain marked-up text.
3161  * See g_markup_parse_context_new(), #GMarkupParser, and so
3162  * on for more details.
3163  */
3164
3165
3166 /**
3167  * GMarkupParseFlags:
3168  * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use
3169  * @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
3170  * @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
3171  *
3172  * Flags that affect the behaviour of the parser.
3173  */
3174
3175
3176 /**
3177  * GMarkupParser:
3178  * @start_element: Callback to invoke when the opening tag of an element is seen.
3179  * @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>.
3180  * @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.
3181  * @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.
3182  * @error: Callback to invoke when an error occurs.
3183  *
3184  * Any of the fields in #GMarkupParser can be %NULL, in which case they
3185  * will be ignored. Except for the @error function, any of these callbacks
3186  * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT,
3187  * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT
3188  * errors are intended to be set from these callbacks. If you set an error
3189  * from a callback, g_markup_parse_context_parse() will report that error
3190  * back to its caller.
3191  */
3192
3193
3194 /**
3195  * GMemVTable:
3196  * @malloc: function to use for allocating memory.
3197  * @realloc: function to use for reallocating memory.
3198  * @free: function to use to free memory.
3199  * @calloc: function to use for allocating zero-filled memory.
3200  * @try_malloc: function to use for allocating memory without a default error handler.
3201  * @try_realloc: function to use for reallocating memory without a default error handler.
3202  *
3203  * A set of functions used to perform memory allocation. The same #GMemVTable must
3204  * be used for all allocations in the same program; a call to g_mem_set_vtable(),
3205  * if it exists, should be prior to any use of GLib.
3206  */
3207
3208
3209 /**
3210  * GMemoryInputStream:
3211  *
3212  * Implements #GInputStream for arbitrary memory chunks.
3213  */
3214
3215
3216 /**
3217  * GMemoryOutputStream:
3218  *
3219  * Implements #GOutputStream for arbitrary memory chunks.
3220  */
3221
3222
3223 /**
3224  * GMemoryOutputStream:data:
3225  *
3226  * Pointer to buffer where data will be written.
3227  *
3228  * Since: 2.24
3229  */
3230
3231
3232 /**
3233  * GMemoryOutputStream:data-size:
3234  *
3235  * Size of data written to the buffer.
3236  *
3237  * Since: 2.24
3238  */
3239
3240
3241 /**
3242  * GMemoryOutputStream:destroy-function: (skip)
3243  *
3244  * Function called with the buffer as argument when the stream is destroyed.
3245  *
3246  * Since: 2.24
3247  */
3248
3249
3250 /**
3251  * GMemoryOutputStream:realloc-function: (skip)
3252  *
3253  * Function with realloc semantics called to enlarge the buffer.
3254  *
3255  * Since: 2.24
3256  */
3257
3258
3259 /**
3260  * GMemoryOutputStream:size:
3261  *
3262  * Current size of the data buffer.
3263  *
3264  * Since: 2.24
3265  */
3266
3267
3268 /**
3269  * GMount:
3270  *
3271  * A handle to an object implementing the #GMountIface interface.
3272  */
3273
3274
3275 /**
3276  * GMount::changed:
3277  * @mount: the object on which the signal is emitted
3278  *
3279  * Emitted when the mount has been changed.
3280  */
3281
3282
3283 /**
3284  * GMount::pre-unmount:
3285  * @mount: the object on which the signal is emitted
3286  *
3287  * This signal is emitted when the #GMount is about to be
3288  * unmounted.
3289  *
3290  * Since: 2.22
3291  */
3292
3293
3294 /**
3295  * GMount::unmounted:
3296  * @mount: the object on which the signal is emitted
3297  *
3298  * This signal is emitted when the #GMount have been
3299  * unmounted. If the recipient is holding references to the
3300  * object they should release them so the object can be
3301  * finalized.
3302  */
3303
3304
3305 /**
3306  * GMountIface:
3307  * @g_iface: The parent interface.
3308  * @changed: Changed signal that is emitted when the mount's state has changed.
3309  * @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.
3310  * @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.
3311  * @get_root: Gets a #GFile to the root directory of the #GMount.
3312  * @get_name: Gets a string containing the name of the #GMount.
3313  * @get_icon: Gets a #GIcon for the #GMount.
3314  * @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.
3315  * @get_volume: Gets a #GVolume the mount is located on. Returns %NULL if the #GMount is not associated with a #GVolume.
3316  * @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.
3317  * @can_unmount: Checks if a #GMount can be unmounted.
3318  * @can_eject: Checks if a #GMount can be ejected.
3319  * @unmount: Starts unmounting a #GMount.
3320  * @unmount_finish: Finishes an unmounting operation.
3321  * @eject: Starts ejecting a #GMount.
3322  * @eject_finish: Finishes an eject operation.
3323  * @remount: Starts remounting a #GMount.
3324  * @remount_finish: Finishes a remounting operation.
3325  * @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.
3326  * @guess_content_type_finish: Finishes a contenet type guessing operation. Added in 2.18.
3327  * @guess_content_type_sync: Synchronous variant of @guess_content_type. Added in 2.18
3328  * @unmount_with_operation: Starts unmounting a #GMount using a #GMountOperation. Since 2.22.
3329  * @unmount_with_operation_finish: Finishes an unmounting operation using a #GMountOperation. Since 2.22.
3330  * @eject_with_operation: Starts ejecting a #GMount using a #GMountOperation. Since 2.22.
3331  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
3332  * @get_default_location: Gets a #GFile indication a start location that can be use as the entry point for this mount. Since 2.24.
3333  *
3334  * Interface for implementing operations for mounts.
3335  */
3336
3337
3338 /**
3339  * GMountMountFlags:
3340  * @G_MOUNT_MOUNT_NONE: No flags set.
3341  *
3342  * Flags used when mounting a mount.
3343  */
3344
3345
3346 /**
3347  * GMountOperation:
3348  *
3349  * Class for providing authentication methods for mounting operations,
3350  * such as mounting a file locally, or authenticating with a server.
3351  */
3352
3353
3354 /**
3355  * GMountOperation::aborted:
3356  *
3357  * Emitted by the backend when e.g. a device becomes unavailable
3358  * while a mount operation is in progress.
3359  * Implementations of GMountOperation should handle this signal
3360  * by dismissing open password dialogs.
3361  *
3362  * Since: 2.20
3363  */
3364
3365
3366 /**
3367  * GMountOperation::ask-password:
3368  * @op: a #GMountOperation requesting a password.
3369  * @message: string containing a message to display to the user.
3370  * @default_user: string containing the default user name.
3371  * @default_domain: string containing the default domain.
3372  * @flags: a set of #GAskPasswordFlags.
3373  *
3374  * Emitted when a mount operation asks the user for a password.
3375  * If the message contains a line break, the first line should be
3376  * presented as a heading. For example, it may be used as the
3377  * primary text in a #GtkMessageDialog.
3378  */
3379
3380
3381 /**
3382  * GMountOperation::ask-question:
3383  * @op: a #GMountOperation asking a question.
3384  * @message: string containing a message to display to the user.
3385  * @choices: an array of strings for each possible choice.
3386  *
3387  * Emitted when asking the user a question and gives a list of
3388  * choices for the user to choose from.
3389  * If the message contains a line break, the first line should be
3390  * presented as a heading. For example, it may be used as the
3391  * primary text in a #GtkMessageDialog.
3392  */
3393
3394
3395 /**
3396  * GMountOperation::reply:
3397  * @op: a #GMountOperation.
3398  * @result: a #GMountOperationResult indicating how the request was handled
3399  *
3400  * Emitted when the user has replied to the mount operation.
3401  */
3402
3403
3404 /**
3405  * GMountOperation::show-processes:
3406  * @op: a #GMountOperation.
3407  * @message: string containing a message to display to the user.
3408  * @processes: an array of #GPid for processes blocking the operation.
3409  * @choices: an array of strings for each possible choice.
3410  *
3411  * Emitted when one or more processes are blocking an operation
3412  * e.g. unmounting/ejecting a #GMount or stopping a #GDrive.
3413  * Note that this signal may be emitted several times to update the
3414  * list of blocking processes as processes close files. The
3415  * application should only respond with g_mount_operation_reply() to
3416  * the latest signal (setting #GMountOperation:choice to the choice
3417  * the user made).
3418  * If the message contains a line break, the first line should be
3419  * presented as a heading. For example, it may be used as the
3420  * primary text in a #GtkMessageDialog.
3421  *
3422  * Since: 2.22
3423  */
3424
3425
3426 /**
3427  * GMountOperation:anonymous:
3428  *
3429  * Whether to use an anonymous user when authenticating.
3430  */
3431
3432
3433 /**
3434  * GMountOperation:choice:
3435  *
3436  * The index of the user's choice when a question is asked during the
3437  * mount operation. See the #GMountOperation::ask-question signal.
3438  */
3439
3440
3441 /**
3442  * GMountOperation:domain:
3443  *
3444  * The domain to use for the mount operation.
3445  */
3446
3447
3448 /**
3449  * GMountOperation:password:
3450  *
3451  * The password that is used for authentication when carrying out
3452  * the mount operation.
3453  */
3454
3455
3456 /**
3457  * GMountOperation:password-save:
3458  *
3459  * Determines if and how the password information should be saved.
3460  */
3461
3462
3463 /**
3464  * GMountOperation:username:
3465  *
3466  * The user name that is used for authentication when carrying out
3467  * the mount operation.
3468  */
3469
3470
3471 /**
3472  * GMountOperationResult:
3473  * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the user specified data is now available
3474  * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation to be aborted
3475  * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not implemented)
3476  *
3477  * #GMountOperationResult is returned as a result when a request for
3478  * information is send by the mounting operation.
3479  */
3480
3481
3482 /**
3483  * GMountUnmountFlags:
3484  * @G_MOUNT_UNMOUNT_NONE: No flags set.
3485  * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding file operations on the mount.
3486  *
3487  * Flags used when an unmounting a mount.
3488  */
3489
3490
3491 /**
3492  * GNetworkAddress:
3493  *
3494  * A #GSocketConnectable for resolving a hostname and connecting to
3495  * that host.
3496  */
3497
3498
3499 /**
3500  * GNetworkService:
3501  *
3502  * A #GSocketConnectable for resolving a SRV record and connecting to
3503  * that service.
3504  */
3505
3506
3507 /**
3508  * GObject:
3509  *
3510  * All the fields in the <structname>GObject</structname> structure are private
3511  * to the #GObject implementation and should never be accessed directly.
3512  */
3513
3514
3515 /**
3516  * GObjectClass:
3517  * @g_type_class: the parent class
3518  * @constructor: the @constructor function is called by g_object_new () to complete the object initialization after all the construction properties are set. The first thing a @constructor implementation must do is chain up to the needed, e.g. to handle construct properties, or to implement singletons.
3519  * @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.
3520  * @get_property: the generic getter for all properties of this type. Should be overridden for every type with properties.
3521  * @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.
3522  * @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.
3523  * @dispatch_properties_changed: emits property change notification for a bunch of properties. Overriding @dispatch_properties_changed should be rarely needed.
3524  * @notify: the class closure for the notify signal
3525  * @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.
3526  *
3527  * The class structure for the <structname>GObject</structname> type.
3528  * <example>
3529  * <title>Implementing singletons using a constructor</title>
3530  * <programlisting>
3531  * static MySingleton *the_singleton = NULL;
3532  * static GObject*
3533  * my_singleton_constructor (GType                  type,
3534  * guint                  n_construct_params,
3535  * GObjectConstructParam *construct_params)
3536  * {
3537  * GObject *object;
3538  * if (!the_singleton)
3539  * {
3540  * object = G_OBJECT_CLASS (parent_class)->constructor (type,
3541  * n_construct_params,
3542  * construct_params);
3543  * the_singleton = MY_SINGLETON (object);
3544  * }
3545  * else
3546  * object = g_object_ref (G_OBJECT (the_singleton));
3547  * return object;
3548  * }
3549  * </programlisting></example>
3550  */
3551
3552
3553 /**
3554  * GObjectConstructParam:
3555  * @pspec: the #GParamSpec of the construct parameter
3556  * @value: the value to set the parameter to
3557  *
3558  * The <structname>GObjectConstructParam</structname> struct is an auxiliary
3559  * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
3560  * a #GObjectClass.
3561  */
3562
3563
3564 /**
3565  * GObjectFinalizeFunc:
3566  * @object: the #GObject being finalized
3567  *
3568  * The type of the @finalize function of #GObjectClass.
3569  */
3570
3571
3572 /**
3573  * GObjectGetPropertyFunc:
3574  * @object: a #GObject
3575  * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
3576  * @value: a #GValue to return the property value in
3577  * @pspec: the #GParamSpec describing the property
3578  *
3579  * The type of the @get_property function of #GObjectClass.
3580  */
3581
3582
3583 /**
3584  * GObjectSetPropertyFunc:
3585  * @object: a #GObject
3586  * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
3587  * @value: the new value for the property
3588  * @pspec: the #GParamSpec describing the property
3589  *
3590  * The type of the @set_property function of #GObjectClass.
3591  */
3592
3593
3594 /**
3595  * GOptionArg:
3596  * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags.
3597  * @G_OPTION_ARG_STRING: The option takes a string argument.
3598  * @G_OPTION_ARG_INT: The option takes an integer argument.
3599  * @G_OPTION_ARG_CALLBACK: The option provides a callback to parse the extra argument.
3600  * @G_OPTION_ARG_FILENAME: The option takes a filename as argument.
3601  * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple uses of the option are collected into an array of strings.
3602  * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, multiple uses of the option are collected into an array of strings.
3603  * @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
3604  * @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
3605  *
3606  * The #GOptionArg enum values determine which type of extra argument the
3607  * options expect to find. If an option expects an extra argument, it
3608  * can be specified in several ways; with a short option:
3609  * <option>-x arg</option>, with a long option: <option>--name arg</option>
3610  *
3611  * Or combined in a single argument: <option>--name=arg</option>.
3612  */
3613
3614
3615 /**
3616  * GOptionArgFunc:
3617  * @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.
3618  * @value: The value to be parsed.
3619  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
3620  * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED is intended to be used for errors in #GOptionArgFunc callbacks.
3621  *
3622  * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK
3623  * options.
3624  * occurred, in which case @error should be set with g_set_error()
3625  *
3626  * Returns: %TRUE if the option was successfully parsed, %FALSE if an error
3627  */
3628
3629
3630 /**
3631  * GOptionContext:
3632  *
3633  * A <structname>GOptionContext</structname> struct defines which options
3634  * are accepted by the commandline option parser. The struct has only private
3635  * fields and should not be directly accessed.
3636  */
3637
3638
3639 /**
3640  * GOptionEntry:
3641  * @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>.
3642  * @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.
3643  * @flags: Flags from #GOptionFlags.
3644  * @arg: The type of the option, as a #GOptionArg.
3645  * @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().
3646  * @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().
3647  * @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().
3648  *
3649  * A <structname>GOptionEntry</structname> defines a single option.
3650  * To have an effect, they must be added to a #GOptionGroup with
3651  * g_option_context_add_main_entries() or g_option_group_add_entries().
3652  */
3653
3654
3655 /**
3656  * GOptionError:
3657  * @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().
3658  * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed.
3659  * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed.
3660  *
3661  * Error codes returned by option parsing.
3662  */
3663
3664
3665 /**
3666  * GOptionErrorFunc:
3667  * @context: The active #GOptionContext
3668  * @group: The group to which the function belongs
3669  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
3670  * @error: The #GError containing details about the parse error
3671  *
3672  * The type of function to be used as callback when a parse error occurs.
3673  */
3674
3675
3676 /**
3677  * GOptionFlags:
3678  * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in <option>--help</option> output.
3679  * @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.
3680  * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this flag indicates that the sense of the option is reversed.
3681  * @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
3682  * @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
3683  * @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
3684  * @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.
3685  *
3686  * Flags which modify individual options.
3687  */
3688
3689
3690 /**
3691  * GOptionGroup:
3692  *
3693  * A <structname>GOptionGroup</structname> struct defines the options in a single
3694  * group. The struct has only private fields and should not be directly accessed.
3695  * All options in a group share the same translation function. Libraries which
3696  * need to parse commandline options are expected to provide a function for
3697  * getting a <structname>GOptionGroup</structname> holding their options, which
3698  * the application can then add to its #GOptionContext.
3699  */
3700
3701
3702 /**
3703  * GOptionParseFunc:
3704  * @context: The active #GOptionContext
3705  * @group: The group to which the function belongs
3706  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
3707  * @error: A return location for error details
3708  *
3709  * The type of function that can be called before and after parsing.
3710  * occurred, in which case @error should be set with g_set_error()
3711  *
3712  * Returns: %TRUE if the function completed successfully, %FALSE if an error
3713  */
3714
3715
3716 /**
3717  * GOutputStream:
3718  *
3719  * Base class for writing output.
3720  * All classes derived from GOutputStream should implement synchronous
3721  * writing, splicing, flushing and closing streams, but may implement
3722  * asynchronous versions.
3723  */
3724
3725
3726 /**
3727  * GOutputStreamSpliceFlags:
3728  * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream.
3729  * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after the splice.
3730  * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after the splice.
3731  *
3732  * GOutputStreamSpliceFlags determine how streams should be spliced.
3733  */
3734
3735
3736 /**
3737  * GOutputVector:
3738  * @buffer: Pointer to a buffer of data to read.
3739  * @size: the size of @buffer.
3740  *
3741  * Structure used for scatter/gather data output.
3742  * You generally pass in an array of #GOutputVector<!-- -->s
3743  * and the operation will use all the buffers as if they were
3744  * one buffer.
3745  *
3746  * Since: 2.22
3747  */
3748
3749
3750 /**
3751  * GParamFlags:
3752  * @G_PARAM_READABLE: the parameter is readable
3753  * @G_PARAM_WRITABLE: the parameter is writable
3754  * @G_PARAM_CONSTRUCT: the parameter will be set upon object construction
3755  * @G_PARAM_CONSTRUCT_ONLY: the parameter will only be set upon object construction
3756  * @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) strict validation is not required
3757  * @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
3758  * @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
3759  * @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
3760  * @G_PARAM_PRIVATE: internal
3761  * @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
3762  *
3763  * Through the #GParamFlags flag values, certain aspects of parameters
3764  * can be configured.
3765  */
3766
3767
3768 /**
3769  * GParamSpec:
3770  * @g_type_instance: private #GTypeInstance portion
3771  * @name: name of this parameter
3772  * @flags: #GParamFlags flags for this parameter
3773  * @value_type: the #GValue type for this parameter
3774  * @owner_type: #GType type that uses (introduces) this parameter
3775  *
3776  * All other fields of the <structname>GParamSpec</structname> struct are private and
3777  * should not be used directly.
3778  */
3779
3780
3781 /**
3782  * GParamSpecBoolean:
3783  * @parent_instance: private #GParamSpec portion
3784  * @default_value: default value for the property specified
3785  *
3786  * A #GParamSpec derived structure that contains the meta data for boolean properties.
3787  */
3788
3789
3790 /**
3791  * GParamSpecBoxed:
3792  * @parent_instance: private #GParamSpec portion
3793  *
3794  * A #GParamSpec derived structure that contains the meta data for boxed properties.
3795  */
3796
3797
3798 /**
3799  * GParamSpecChar:
3800  * @parent_instance: private #GParamSpec portion
3801  * @minimum: minimum value for the property specified
3802  * @maximum: maximum value for the property specified
3803  * @default_value: default value for the property specified
3804  *
3805  * A #GParamSpec derived structure that contains the meta data for character properties.
3806  */
3807
3808
3809 /**
3810  * GParamSpecClass:
3811  * @g_type_class: the parent class
3812  * @value_type: the #GValue type for this parameter
3813  * @finalize: The instance finalization function (optional), should chain up to the finalize method of the parent class.
3814  * @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().
3815  * @value_validate: Ensures that the contents of @value comply with the specifications set out by this type (optional), see g_param_value_set_validate().
3816  * @values_cmp: Compares @value1 with @value2 according to this type (recommended, the default is memcmp()), see g_param_values_cmp().
3817  *
3818  * The class structure for the <structname>GParamSpec</structname> type.
3819  * Normally, <structname>GParamSpec</structname> classes are filled by
3820  * g_param_type_register_static().
3821  */
3822
3823
3824 /**
3825  * GParamSpecDouble:
3826  * @parent_instance: private #GParamSpec portion
3827  * @minimum: minimum value for the property specified
3828  * @maximum: maximum value for the property specified
3829  * @default_value: default value for the property specified
3830  * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-90.
3831  *
3832  * A #GParamSpec derived structure that contains the meta data for double properties.
3833  */
3834
3835
3836 /**
3837  * GParamSpecEnum:
3838  * @parent_instance: private #GParamSpec portion
3839  * @enum_class: the #GEnumClass for the enum
3840  * @default_value: default value for the property specified
3841  *
3842  * A #GParamSpec derived structure that contains the meta data for enum
3843  * properties.
3844  */
3845
3846
3847 /**
3848  * GParamSpecFlags:
3849  * @parent_instance: private #GParamSpec portion
3850  * @flags_class: the #GFlagsClass for the flags
3851  * @default_value: default value for the property specified
3852  *
3853  * A #GParamSpec derived structure that contains the meta data for flags
3854  * properties.
3855  */
3856
3857
3858 /**
3859  * GParamSpecFloat:
3860  * @parent_instance: private #GParamSpec portion
3861  * @minimum: minimum value for the property specified
3862  * @maximum: maximum value for the property specified
3863  * @default_value: default value for the property specified
3864  * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-30.
3865  *
3866  * A #GParamSpec derived structure that contains the meta data for float properties.
3867  */
3868
3869
3870 /**
3871  * GParamSpecGType:
3872  * @parent_instance: private #GParamSpec portion
3873  * @is_a_type: a #GType whose subtypes can occur as values
3874  *
3875  * A #GParamSpec derived structure that contains the meta data for #GType properties.
3876  *
3877  * Since: 2.10
3878  */
3879
3880
3881 /**
3882  * GParamSpecInt:
3883  * @parent_instance: private #GParamSpec portion
3884  * @minimum: minimum value for the property specified
3885  * @maximum: maximum value for the property specified
3886  * @default_value: default value for the property specified
3887  *
3888  * A #GParamSpec derived structure that contains the meta data for integer properties.
3889  */
3890
3891
3892 /**
3893  * GParamSpecInt64:
3894  * @parent_instance: private #GParamSpec portion
3895  * @minimum: minimum value for the property specified
3896  * @maximum: maximum value for the property specified
3897  * @default_value: default value for the property specified
3898  *
3899  * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
3900  */
3901
3902
3903 /**
3904  * GParamSpecLong:
3905  * @parent_instance: private #GParamSpec portion
3906  * @minimum: minimum value for the property specified
3907  * @maximum: maximum value for the property specified
3908  * @default_value: default value for the property specified
3909  *
3910  * A #GParamSpec derived structure that contains the meta data for long integer properties.
3911  */
3912
3913
3914 /**
3915  * GParamSpecObject:
3916  * @parent_instance: private #GParamSpec portion
3917  *
3918  * A #GParamSpec derived structure that contains the meta data for object properties.
3919  */
3920
3921
3922 /**
3923  * GParamSpecOverride:
3924  *
3925  * This is a type of #GParamSpec type that simply redirects operations to
3926  * another paramspec.  All operations other than getting or
3927  * setting the value are redirected, including accessing the nick and
3928  * blurb, validating a value, and so forth. See
3929  * g_param_spec_get_redirect_target() for retrieving the overidden
3930  * property. #GParamSpecOverride is used in implementing
3931  * g_object_class_override_property(), and will not be directly useful
3932  * unless you are implementing a new base type similar to GObject.
3933  *
3934  * Since: 2.4
3935  */
3936
3937
3938 /**
3939  * GParamSpecParam:
3940  * @parent_instance: private #GParamSpec portion
3941  *
3942  * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
3943  * properties.
3944  */
3945
3946
3947 /**
3948  * GParamSpecPointer:
3949  * @parent_instance: private #GParamSpec portion
3950  *
3951  * A #GParamSpec derived structure that contains the meta data for pointer properties.
3952  */
3953
3954
3955 /**
3956  * GParamSpecString:
3957  * @parent_instance: private #GParamSpec portion
3958  * @default_value: default value for the property specified
3959  * @cset_first: a string containing the allowed values for the first byte
3960  * @cset_nth: a string containing the allowed values for the subsequent bytes
3961  * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
3962  * @null_fold_if_empty: replace empty string by %NULL
3963  * @ensure_non_null: replace %NULL strings by an empty string
3964  *
3965  * A #GParamSpec derived structure that contains the meta data for string
3966  * properties.
3967  */
3968
3969
3970 /**
3971  * GParamSpecTypeInfo:
3972  * @instance_size: Size of the instance (object) structure.
3973  * @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.
3974  * @instance_init: Location of the instance initialization function (optional).
3975  * @value_type: The #GType of values conforming to this #GParamSpec
3976  * @finalize: The instance finalization function (optional).
3977  * @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().
3978  * @value_validate: Ensures that the contents of @value comply with the specifications set out by @pspec (optional), see g_param_value_set_validate().
3979  * @values_cmp: Compares @value1 with @value2 according to @pspec (recommended, the default is memcmp()), see g_param_values_cmp().
3980  *
3981  * This structure is used to provide the type system with the information
3982  * required to initialize and destruct (finalize) a parameter's class and
3983  * instances thereof.
3984  * The initialized structure is passed to the g_param_type_register_static()
3985  * The type system will perform a deep copy of this structure, so its memory
3986  * does not need to be persistent across invocation of
3987  * g_param_type_register_static().
3988  */
3989
3990
3991 /**
3992  * GParamSpecUChar:
3993  * @parent_instance: private #GParamSpec portion
3994  * @minimum: minimum value for the property specified
3995  * @maximum: maximum value for the property specified
3996  * @default_value: default value for the property specified
3997  *
3998  * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
3999  */
4000
4001
4002 /**
4003  * GParamSpecUInt:
4004  * @parent_instance: private #GParamSpec portion
4005  * @minimum: minimum value for the property specified
4006  * @maximum: maximum value for the property specified
4007  * @default_value: default value for the property specified
4008  *
4009  * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
4010  */
4011
4012
4013 /**
4014  * GParamSpecUInt64:
4015  * @parent_instance: private #GParamSpec portion
4016  * @minimum: minimum value for the property specified
4017  * @maximum: maximum value for the property specified
4018  * @default_value: default value for the property specified
4019  *
4020  * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
4021  */
4022
4023
4024 /**
4025  * GParamSpecULong:
4026  * @parent_instance: private #GParamSpec portion
4027  * @minimum: minimum value for the property specified
4028  * @maximum: maximum value for the property specified
4029  * @default_value: default value for the property specified
4030  *
4031  * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
4032  */
4033
4034
4035 /**
4036  * GParamSpecUnichar:
4037  * @parent_instance: private #GParamSpec portion
4038  * @default_value: default value for the property specified
4039  *
4040  * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
4041  */
4042
4043
4044 /**
4045  * GParamSpecValueArray:
4046  * @parent_instance: private #GParamSpec portion
4047  * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
4048  * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
4049  *
4050  * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
4051  */
4052
4053
4054 /**
4055  * GParamSpecVariant:
4056  * @parent_instance: private #GParamSpec portion
4057  * @type: a #GVariantType, or %NULL
4058  * @default_value: a #GVariant, or %NULL
4059  *
4060  * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
4061  *
4062  * Since: 2.26
4063  */
4064
4065
4066 /**
4067  * GParameter:
4068  * @name: the parameter name
4069  * @value: the parameter value
4070  *
4071  * The <structname>GParameter</structname> struct is an auxiliary structure used
4072  * to hand parameter name/value pairs to g_object_newv().
4073  */
4074
4075
4076 /**
4077  * GPasswordSave:
4078  * @G_PASSWORD_SAVE_NEVER: never save a password.
4079  * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session.
4080  * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently.
4081  *
4082  * #GPasswordSave is used to indicate the lifespan of a saved password.
4083  * #Gvfs stores passwords in the Gnome keyring when this flag allows it
4084  * to, and later retrieves it again from there.
4085  */
4086
4087
4088 /**
4089  * GPermission:
4090  *
4091  * #GPermission is an opaque data structure and can only be accessed
4092  * using the following functions.
4093  */
4094
4095
4096 /**
4097  * GPermission:allowed:
4098  *
4099  * %TRUE if the caller currently has permission to perform the action that
4100  */
4101
4102
4103 /**
4104  * GPermission:can-acquire:
4105  *
4106  * %TRUE if it is generally possible to acquire the permission by calling
4107  * g_permission_acquire().
4108  */
4109
4110
4111 /**
4112  * GPermission:can-release:
4113  *
4114  * %TRUE if it is generally possible to release the permission by calling
4115  * g_permission_release().
4116  */
4117
4118
4119 /**
4120  * GPid:
4121  *
4122  * A type which is used to hold a process identification.
4123  * On UNIX, processes are identified by a process id (an integer),
4124  * while Windows uses process handles (which are pointers).
4125  */
4126
4127
4128 /**
4129  * GPollFD:
4130  * @fd: the file descriptor to poll (or a <type>HANDLE</type> on Win32)
4131  * @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.
4132  * @revents: a bitwise combination of flags from #GIOCondition, returned from the poll() function to indicate which events occurred.
4133  *
4134  *
4135  */
4136
4137
4138 /**
4139  * GPollFunc:
4140  * @ufds: an array of #GPollFD elements
4141  * @nfsd: the number of elements in @ufds
4142  * @timeout_: the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout.
4143  *
4144  * Specifies the type of function passed to g_main_context_set_poll_func().
4145  * The semantics of the function should match those of the poll() system call.
4146  * reported, or -1 if an error occurred.
4147  *
4148  * Returns: the number of #GPollFD elements which have events or errors
4149  */
4150
4151
4152 /**
4153  * GPollableInputStream:
4154  *
4155  * An interface for a #GInputStream that can be polled for readability.
4156  *
4157  * Since: 2.28
4158  */
4159
4160
4161 /**
4162  * GPollableInputStreamInterface:
4163  * @g_iface: The parent interface.
4164  * @can_poll: Checks if the #GPollableInputStream instance is actually pollable
4165  * @is_readable: Checks if the stream is readable
4166  * @create_source: Creates a #GSource to poll the stream
4167  * @read_nonblocking: Does a non-blocking read or returns %G_IO_ERROR_WOULD_BLOCK
4168  *
4169  * The interface for pollable input streams.
4170  * The default implementation of @can_poll always returns %TRUE.
4171  * The default implementation of @read_nonblocking calls
4172  * g_pollable_input_stream_is_readable(), and then calls
4173  * g_input_stream_read() if it returns %TRUE. This means you only need
4174  * to override it if it is possible that your @is_readable
4175  * implementation may return %TRUE when the stream is not actually
4176  * readable.
4177  *
4178  * Since: 2.28
4179  */
4180
4181
4182 /**
4183  * GPollableOutputStream:
4184  *
4185  * An interface for a #GOutputStream that can be polled for readability.
4186  *
4187  * Since: 2.28
4188  */
4189
4190
4191 /**
4192  * GPollableOutputStreamInterface:
4193  * @g_iface: The parent interface.
4194  * @can_poll: Checks if the #GPollableOutputStream instance is actually pollable
4195  * @is_writable: Checks if the stream is writable
4196  * @create_source: Creates a #GSource to poll the stream
4197  * @write_nonblocking: Does a non-blocking write or returns %G_IO_ERROR_WOULD_BLOCK
4198  *
4199  * The interface for pollable output streams.
4200  * The default implementation of @can_poll always returns %TRUE.
4201  * The default implementation of @write_nonblocking calls
4202  * g_pollable_output_stream_is_writable(), and then calls
4203  * g_output_stream_write() if it returns %TRUE. This means you only
4204  * need to override it if it is possible that your @is_writable
4205  * implementation may return %TRUE when the stream is not actually
4206  * writable.
4207  *
4208  * Since: 2.28
4209  */
4210
4211
4212 /**
4213  * GPollableSourceFunc:
4214  * @pollable_stream: the #GPollableInputStream or #GPollableOutputStream
4215  * @user_data: data passed in by the user.
4216  *
4217  * This is the function type of the callback used for the #GSource
4218  * returned by g_pollable_input_stream_create_source() and
4219  * g_pollable_output_stream_create_source().
4220  *
4221  * Returns: it should return %FALSE if the source should be removed.
4222  * Since: 2.28
4223  */
4224
4225
4226 /**
4227  * GProxy:
4228  *
4229  * Interface that handles proxy connection and payload.
4230  *
4231  * Since: 2.26
4232  */
4233
4234
4235 /**
4236  * GProxyAddress:
4237  *
4238  * A #GInetSocketAddress representing a connection via a proxy server
4239  *
4240  * Since: 2.26
4241  */
4242
4243
4244 /**
4245  * GProxyAddressEnumerator:
4246  *
4247  * A subclass of #GSocketAddressEnumerator that takes another address
4248  * enumerator and wraps its results in #GProxyAddress<!-- -->es as
4249  * directed by the default #GProxyResolver.
4250  */
4251
4252
4253 /**
4254  * GProxyInterface:
4255  * @g_iface: The parent interface.
4256  * @connect: Connect to proxy server and wrap (if required) the #connection to handle payload.
4257  * @connect_async: Same has connect() but asynchronous.
4258  * @connect_finish: Returns the result of connect_async()
4259  *
4260  * Provides an interface for handling proxy connection and payload.
4261  *
4262  * Since: 2.26
4263  */
4264
4265
4266 /**
4267  * GProxyResolver:
4268  *
4269  * Interface that can be used to resolve proxy address.
4270  */
4271
4272
4273 /**
4274  * GReallocFunc:
4275  * @data: memory block to reallocate
4276  * @size: size to reallocate @data to
4277  *
4278  * Changes the size of the memory block pointed to by @data to
4279  * The function should have the same semantics as realloc().
4280  *
4281  * Returns: a pointer to the reallocated memory
4282  */
4283
4284
4285 /**
4286  * GRegex:
4287  *
4288  * A GRegex is the "compiled" form of a regular expression pattern. This
4289  * structure is opaque and its fields cannot be accessed directly.
4290  *
4291  * Since: 2.14
4292  */
4293
4294
4295 /**
4296  * GRegexCompileFlags:
4297  * @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.
4298  * @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.
4299  * @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.
4300  * @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.
4301  * @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.
4302  * @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.
4303  * @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.
4304  * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this flag they are considered as a raw sequence of bytes.
4305  * @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).
4306  * @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.
4307  * @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.
4308  * @G_REGEX_NEWLINE_CR: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\r'.
4309  * @G_REGEX_NEWLINE_LF: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\n'.
4310  * @G_REGEX_NEWLINE_CRLF: Usually any newline character is recognized, if this option is set, the only recognized newline character sequence is '\r\n'.
4311  *
4312  * Flags specifying compile-time options.
4313  *
4314  * Since: 2.14
4315  */
4316
4317
4318 /**
4319  * GRegexError:
4320  * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed.
4321  * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed.
4322  * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement string.
4323  * @G_REGEX_ERROR_MATCH: The match process failed.
4324  * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. Since 2.16
4325  * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16
4326  * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16
4327  * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". Since 2.16
4328  * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" quantifier. Since 2.16
4329  * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. Since 2.16
4330  * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for character class. Since 2.16
4331  * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence in character class. Since 2.16
4332  * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. Since 2.16
4333  * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16
4334  * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", "(?&lt;" or "(?P". Since 2.16
4335  * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are supported only within a class. Since 2.16
4336  * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" without opening "(". Since 2.16
4337  * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent subpattern. Since 2.16
4338  * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. Since 2.16
4339  * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. Since 2.16
4340  * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16
4341  * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not fixed length. Since 2.16
4342  * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". Since 2.16
4343  * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains more than two branches. Since 2.16
4344  * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". Since 2.16
4345  * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. Since 2.16
4346  * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating elements are not supported. Since 2.16
4347  * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence is too large. Since 2.16
4348  * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16
4349  * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in lookbehind assertion. Since 2.16
4350  * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. Since 2.16
4351  * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator in subpattern name. Since 2.16
4352  * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have the same name. Since 2.16
4353  * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. Since 2.16
4354  * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or "\\p". Since 2.16
4355  * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long (maximum 32 characters). Since 2.16
4356  * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum 10,000). Since 2.16
4357  * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". Since 2.16
4358  * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more than one branch. Since 2.16
4359  * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. Since 2.16
4360  * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. Since 2.16
4361  * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced name or an optionally braced non-zero number. Since 2.16
4362  *
4363  * Error codes returned by regular expressions functions.
4364  *
4365  * Since: 2.14
4366  */
4367
4368
4369 /**
4370  * GRegexEvalCallback:
4371  * @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.
4372  * @result: a #GString containing the new string
4373  * @user_data: user data passed to g_regex_replace_eval()
4374  *
4375  * Specifies the type of the function passed to g_regex_replace_eval().
4376  * It is called for each occurance of the pattern in the string passed
4377  * to g_regex_replace_eval(), and it should append the replacement to
4378  *
4379  * Returns: %FALSE to continue the replacement process, %TRUE to stop it
4380  * Since: 2.14
4381  */
4382
4383
4384 /**
4385  * GRegexMatchFlags:
4386  * @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.
4387  * @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".
4388  * @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".
4389  * @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".
4390  * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().
4391  * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when creating a new #GRegex, setting the '\r' character as line terminator.
4392  * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when creating a new #GRegex, setting the '\n' character as line terminator.
4393  * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when creating a new #GRegex, setting the '\r\n' characters as line terminator.
4394  * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when creating a new #GRegex, any newline character or character sequence is recognized.
4395  *
4396  * Flags specifying match-time options.
4397  *
4398  * Since: 2.14
4399  */
4400
4401
4402 /**
4403  * GResolver:
4404  *
4405  * The object that handles DNS resolution. Use g_resolver_get_default()
4406  * to get the default resolver.
4407  */
4408
4409
4410 /**
4411  * GResolver::reload:
4412  * @resolver: a #GResolver
4413  *
4414  * Emitted when the resolver notices that the system resolver
4415  * configuration has changed.
4416  */
4417
4418
4419 /**
4420  * GResolverError:
4421  * @G_RESOLVER_ERROR_NOT_FOUND: the requested name/address/service was not found
4422  * @G_RESOLVER_ERROR_TEMPORARY_FAILURE: the requested information could not be looked up due to a network error or similar problem
4423  * @G_RESOLVER_ERROR_INTERNAL: unknown error
4424  *
4425  * An error code used with %G_RESOLVER_ERROR in a #GError returned
4426  * from a #GResolver routine.
4427  *
4428  * Since: 2.22
4429  */
4430
4431
4432 /**
4433  * GSeekable:
4434  *
4435  * Seek object for streaming operations.
4436  */
4437
4438
4439 /**
4440  * GSeekableIface:
4441  * @g_iface: The parent interface.
4442  * @tell: Tells the current location within a stream.
4443  * @can_seek: Checks if seeking is supported by the stream.
4444  * @seek: Seeks to a location within a stream.
4445  * @can_truncate: Chekcs if truncation is suppored by the stream.
4446  * @truncate_fn: Truncates a stream.
4447  *
4448  * Provides an interface for implementing seekable functionality on I/O Streams.
4449  */
4450
4451
4452 /**
4453  * GSettings::change-event:
4454  * @settings: the object on which the signal was emitted
4455  * @keys: (array length=n_keys) (element-type GQuark) (allow-none):  an array of #GQuark<!-- -->s for the changed keys, or %NULL
4456  * @n_keys: the length of the @keys array, or 0
4457  * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
4458  *
4459  * The "change-event" signal is emitted once per change event that
4460  * affects this settings object.  You should connect to this signal
4461  * only if you are interested in viewing groups of changes before they
4462  * are split out into multiple emissions of the "changed" signal.
4463  * For most use cases it is more appropriate to use the "changed" signal.
4464  * In the event that the change event applies to one or more specified
4465  * keys, @keys will be an array of #GQuark of length @n_keys.  In the
4466  * event that the change event applies to the #GSettings object as a
4467  * be %NULL and @n_keys will be 0.
4468  * The default handler for this signal invokes the "changed" signal
4469  * for each affected key.  If any other connected handler returns
4470  * %TRUE then this default functionality will be supressed.
4471  *
4472  * Whole (ie: potentially every key has been changed) then @keys will
4473  */
4474
4475
4476 /**
4477  * GSettings::changed:
4478  * @settings: the object on which the signal was emitted
4479  * @key: the name of the key that changed
4480  *
4481  * The "changed" signal is emitted when a key has potentially changed.
4482  * You should call one of the g_settings_get() calls to check the new
4483  * value.
4484  * This signal supports detailed connections.  You can connect to the
4485  * detailed signal "changed::x" in order to only receive callbacks
4486  * when key "x" changes.
4487  */
4488
4489
4490 /**
4491  * GSettings::writable-change-event:
4492  * @settings: the object on which the signal was emitted
4493  * @key: the quark of the key, or 0
4494  * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
4495  *
4496  * The "writable-change-event" signal is emitted once per writability
4497  * change event that affects this settings object.  You should connect
4498  * to this signal if you are interested in viewing groups of changes
4499  * before they are split out into multiple emissions of the
4500  * "writable-changed" signal.  For most use cases it is more
4501  * appropriate to use the "writable-changed" signal.
4502  * In the event that the writability change applies only to a single
4503  * key, @key will be set to the #GQuark for that key.  In the event
4504  * that the writability change affects the entire settings object,
4505  * The default handler for this signal invokes the "writable-changed"
4506  * and "changed" signals for each affected key.  This is done because
4507  * changes in writability might also imply changes in value (if for
4508  * example, a new mandatory setting is introduced).  If any other
4509  * connected handler returns %TRUE then this default functionality
4510  * will be supressed.
4511  */
4512
4513
4514 /**
4515  * GSettings::writable-changed:
4516  * @settings: the object on which the signal was emitted
4517  * @key: the key
4518  *
4519  * The "writable-changed" signal is emitted when the writability of a
4520  * key has potentially changed.  You should call
4521  * g_settings_is_writable() in order to determine the new status.
4522  * This signal supports detailed connections.  You can connect to the
4523  * detailed signal "writable-changed::x" in order to only receive
4524  * callbacks when the writability of "x" changes.
4525  */
4526
4527
4528 /**
4529  * GSettings:context:
4530  *
4531  * The name of the context that the settings are stored in.
4532  */
4533
4534
4535 /**
4536  * GSettings:delay-apply:
4537  *
4538  * Whether the #GSettings object is in 'delay-apply' mode. See
4539  * g_settings_delay() for details.
4540  *
4541  * Since: 2.28
4542  */
4543
4544
4545 /**
4546  * GSettings:has-unapplied:
4547  *
4548  * If this property is %TRUE, the #GSettings object has outstanding
4549  * changes that will be applied when g_settings_apply() is called.
4550  */
4551
4552
4553 /**
4554  * GSettings:path:
4555  *
4556  * The path within the backend where the settings are stored.
4557  */
4558
4559
4560 /**
4561  * GSettings:schema:
4562  *
4563  * The name of the schema that describes the types of keys
4564  * for this #GSettings object.
4565  */
4566
4567
4568 /**
4569  * GSettingsBackend:
4570  *
4571  * An implementation of a settings storage repository.
4572  */
4573
4574
4575 /**
4576  * GSettingsBindFlags:
4577  * @G_SETTINGS_BIND_DEFAULT: Equivalent to <literal>G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET</literal>
4578  * @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.
4579  * @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.
4580  * @G_SETTINGS_BIND_NO_SENSITIVITY: Do not try to bind a "sensitivity" property to the writability of the setting
4581  * @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
4582  * @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 can not pass this flag to g_settings_bind_with_mapping().
4583  *
4584  * Flags used when creating a binding. These flags determine in which
4585  * direction the binding works. The default is to synchronize in both
4586  * directions.
4587  */
4588
4589
4590 /**
4591  * GSettingsBindGetMapping:
4592  * @value: return location for the property value
4593  * @variant: the #GVariant
4594  * @user_data: user data that was specified when the binding was created
4595  * @returns: %TRUE if the conversion succeeded, %FALSE in case of an error
4596  *
4597  * The type for the function that is used to convert from #GSettings to
4598  * an object property. The @value is already initialized to hold values
4599  * of the appropriate type.
4600  */
4601
4602
4603 /**
4604  * GSettingsBindSetMapping:
4605  * @value: a #GValue containing the property value to map
4606  * @expected_type: the #GVariantType to create
4607  * @user_data: user data that was specified when the binding was created
4608  * @returns: a new #GVariant holding the data from @value, or %NULL in case of an error
4609  *
4610  * The type for the function that is used to convert an object property
4611  * value to a #GVariant for storing it in #GSettings.
4612  */
4613
4614
4615 /**
4616  * GSettingsGetMapping:
4617  * @value: the #GVariant to map, or %NULL
4618  * @result: (out): the result of the mapping
4619  * @user_data: (closure): the user data that was passed to g_settings_get_mapped()
4620  * @returns: %TRUE if the conversion succeeded, %FALSE in case of an error
4621  *
4622  * The type of the function that is used to convert from a value stored
4623  * in a #GSettings to a value that is useful to the application.
4624  * If the value is successfully mapped, the result should be stored at
4625  * is not in the right format) then %FALSE should be returned.
4626  * If @value is %NULL then it means that the mapping function is being
4627  * given a "last chance" to successfully return a valid value.  %TRUE
4628  * must be returned in this case.
4629  */
4630
4631
4632 /**
4633  * GSignalAccumulator:
4634  * @ihint: Signal invocation hint, see #GSignalInvocationHint.
4635  * @return_accu: Accumulator to collect callback return values in, this is the return value of the current signal emission.
4636  * @handler_return: A #GValue holding the return value of the signal handler.
4637  * @data: Callback data that was specified when creating the signal.
4638  *
4639  * The signal accumulator is a special callback function that can be used
4640  * to collect return values of the various callbacks that are called
4641  * during a signal emission. The signal accumulator is specified at signal
4642  * creation time, if it is left %NULL, no accumulation of callback return
4643  * values is performed. The return value of signal emissions is then the
4644  * value returned by the last callback.
4645  * should be aborted. Returning %FALSE means to abort the
4646  * current emission and %TRUE is returned for continuation.
4647  *
4648  * Returns: The accumulator function returns whether the signal emission
4649  */
4650
4651
4652 /**
4653  * GSignalCMarshaller:
4654  *
4655  * This is the signature of marshaller functions, required to marshall
4656  * arrays of parameter values to signal emissions into C language callback
4657  * invocations. It is merely an alias to #GClosureMarshal since the #GClosure
4658  * mechanism takes over responsibility of actual function invocation for the
4659  * signal system.
4660  */
4661
4662
4663 /**
4664  * GSignalEmissionHook:
4665  * @ihint: Signal invocation hint, see #GSignalInvocationHint.
4666  * @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
4667  * @param_values: the instance on which the signal was emitted, followed by the parameters of the emission.
4668  * @data: user data associated with the hook.
4669  *
4670  * A simple function pointer to get invoked when the signal is emitted. This
4671  * allows you to tie a hook to the signal type, so that it will trap all
4672  * emissions of that signal, from any object.
4673  * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
4674  * hook is disconnected (and destroyed).
4675  *
4676  * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
4677  */
4678
4679
4680 /**
4681  * GSignalFlags:
4682  * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage.
4683  * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage.
4684  * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage.
4685  * @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.
4686  * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name upon handler connections and emissions.
4687  * @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.
4688  * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
4689  *
4690  * The signal flags are used to specify a signal's behaviour, the overall
4691  * signal description outlines how especially the RUN flags control the
4692  * stages of a signal emission.
4693  */
4694
4695
4696 /**
4697  * GSignalInvocationHint:
4698  * @signal_id: The signal id of the signal invoking the callback
4699  * @detail: The detail passed on for this emission
4700  * @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.
4701  *
4702  * The #GSignalInvocationHint structure is used to pass on additional information
4703  * to callbacks during a signal emission.
4704  */
4705
4706
4707 /**
4708  * GSignalMatchType:
4709  * @G_SIGNAL_MATCH_ID: The signal id must be equal.
4710  * @G_SIGNAL_MATCH_DETAIL: The signal detail be equal.
4711  * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same.
4712  * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same.
4713  * @G_SIGNAL_MATCH_DATA: The closure data must be the same.
4714  * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may matched.
4715  *
4716  * The match types specify what g_signal_handlers_block_matched(),
4717  * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
4718  * match signals by.
4719  */
4720
4721
4722 /**
4723  * GSignalQuery:
4724  * @signal_id: The signal id of the signal being queried, or 0 if the signal to be queried was unknown.
4725  * @signal_name: The signal name.
4726  * @itype: The interface/instance type that this signal can be emitted for.
4727  * @signal_flags: The signal flags as passed in to g_signal_new().
4728  * @return_type: The return type for user callbacks.
4729  * @n_params: The number of parameters that user callbacks take.
4730  * @param_types: The individual parameter types for user callbacks, note that the effective callback signature is: <programlisting> [#param_types param_names,] #gpointer     data2); </programlisting>
4731  *
4732  * A structure holding in-depth information for a specific signal. It is
4733  * filled in by the g_signal_query() function.
4734  */
4735
4736
4737 /**
4738  * GSimpleAction:
4739  *
4740  * The <structname>GSimpleAction</structname> structure contains private
4741  * data and should only be accessed using the provided API
4742  *
4743  * Since: 2.26
4744  */
4745
4746
4747 /**
4748  * GSimpleAction::activate:
4749  * @simple: the #GSimpleAction
4750  * @parameter: (allow-none): the parameter to the activation
4751  *
4752  * Indicates that the action was just activated.
4753  * an incorrect type was given, no signal will be emitted.
4754  *
4755  * Since: 2.28
4756  */
4757
4758
4759 /**
4760  * GSimpleAction:enabled:
4761  *
4762  * If @action is currently enabled.
4763  * If the action is disabled then calls to g_simple_action_activate() and
4764  * g_simple_action_set_state() have no effect.
4765  *
4766  * Since: 2.28
4767  */
4768
4769
4770 /**
4771  * GSimpleAction:name:
4772  *
4773  * The name of the action.  This is mostly meaningful for identifying
4774  * the action once it has been added to a #GSimpleActionGroup.
4775  *
4776  * Since: 2.28
4777  */
4778
4779
4780 /**
4781  * GSimpleAction:parameter-type:
4782  *
4783  * The type of the parameter that must be given when activating the
4784  * action.
4785  *
4786  * Since: 2.28
4787  */
4788
4789
4790 /**
4791  * GSimpleAction:state:
4792  *
4793  * The state of the action, or %NULL if the action is stateless.
4794  *
4795  * Since: 2.28
4796  */
4797
4798
4799 /**
4800  * GSimpleAction:state-type:
4801  *
4802  * The #GVariantType of the state that the action has, or %NULL if the
4803  * action is stateless.
4804  *
4805  * Since: 2.28
4806  */
4807
4808
4809 /**
4810  * GSimpleActionClass:
4811  * @activate: the class closure for the activate signal
4812  *
4813  *
4814  *
4815  * Since: 2.26
4816  */
4817
4818
4819 /**
4820  * GSimpleActionGroup:
4821  *
4822  * The #GSimpleActionGroup structure contains private data and should only be accessed using the provided API.
4823  *
4824  * Since: 2.26
4825  */
4826
4827
4828 /**
4829  * GSimpleAsyncResult:
4830  *
4831  * A simple implementation of #GAsyncResult.
4832  */
4833
4834
4835 /**
4836  * GSimpleAsyncThreadFunc:
4837  * @res: a #GSimpleAsyncResult.
4838  * @object: a #GObject.
4839  * @cancellable: optional #GCancellable object, %NULL to ignore.
4840  *
4841  * Simple thread function that runs an asynchronous operation and
4842  * checks for cancellation.
4843  */
4844
4845
4846 /**
4847  * GSimplePermission:
4848  *
4849  * #GSimplePermission is an opaque data structure.  There are no methods
4850  * except for those defined by #GPermission.
4851  */
4852
4853
4854 /**
4855  * GSocket:
4856  *
4857  * A lowlevel network socket object.
4858  *
4859  * Since: 2.22
4860  */
4861
4862
4863 /**
4864  * GSocket:timeout:
4865  *
4866  * The timeout in seconds on socket I/O
4867  *
4868  * Since: 2.26
4869  */
4870
4871
4872 /**
4873  * GSocketAddress:
4874  *
4875  * A socket endpoint address, corresponding to <type>struct sockaddr</type>
4876  * or one of its subtypes.
4877  */
4878
4879
4880 /**
4881  * GSocketAddressEnumerator:
4882  *
4883  * Enumerator type for objects that contain or generate
4884  * #GSocketAddress<!-- -->es.
4885  */
4886
4887
4888 /**
4889  * GSocketClient:
4890  *
4891  * A helper class for network servers to listen for and accept connections.
4892  *
4893  * Since: 2.22
4894  */
4895
4896
4897 /**
4898  * GSocketConnectable:
4899  *
4900  * Interface for objects that contain or generate #GSocketAddress<!-- -->es.
4901  */
4902
4903
4904 /**
4905  * GSocketConnectableIface:
4906  * @g_iface: The parent interface.
4907  * @enumerate: Creates a #GSocketAddressEnumerator
4908  * @proxy_enumerate: Creates a #GProxyAddressEnumerator
4909  *
4910  * Provides an interface for returning a #GSocketAddressEnumerator
4911  * and #GProxyAddressEnumerator
4912  */
4913
4914
4915 /**
4916  * GSocketConnection:
4917  *
4918  * A socket connection GIOStream object for connection-oriented sockets.
4919  *
4920  * Since: 2.22
4921  */
4922
4923
4924 /**
4925  * GSocketControlMessage:
4926  *
4927  * Base class for socket-type specific control messages that can be sent and
4928  * received over #GSocket.
4929  */
4930
4931
4932 /**
4933  * GSocketControlMessageClass:
4934  * @get_size: gets the size of the message.
4935  * @get_level: gets the protocol of the message.
4936  * @get_type: gets the protocol specific type of the message.
4937  * @serialize: Writes out the message data.
4938  * @deserialize: Tries to deserialize a message.
4939  *
4940  *
4941  */
4942
4943
4944 /**
4945  * GSocketFamily:
4946  * @G_SOCKET_FAMILY_INVALID: no address family
4947  * @G_SOCKET_FAMILY_IPV4: the IPv4 family
4948  * @G_SOCKET_FAMILY_IPV6: the IPv6 family
4949  * @G_SOCKET_FAMILY_UNIX: the UNIX domain family
4950  *
4951  * The protocol family of a #GSocketAddress. (These values are
4952  * identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX,
4953  * if available.)
4954  *
4955  * Since: 2.22
4956  */
4957
4958
4959 /**
4960  * GSocketListenerClass:
4961  * @changed: virtual method called when the set of socket listened to changes
4962  *
4963  *
4964  */
4965
4966
4967 /**
4968  * GSocketMsgFlags:
4969  * @G_SOCKET_MSG_NONE: No flags.
4970  * @G_SOCKET_MSG_OOB: Request to send/receive out of band data.
4971  * @G_SOCKET_MSG_PEEK: Read data from the socket without removing it from the queue.
4972  * @G_SOCKET_MSG_DONTROUTE: Don't use a gateway to send out the packet, only send to hosts on directly connected networks.
4973  *
4974  * Flags used in g_socket_receive_message() and g_socket_send_message().
4975  * The flags listed in the enum are some commonly available flags, but the
4976  * values used for them are the same as on the platform, and any other flags
4977  * are passed in/out as is. So to use a platform specific flag, just include
4978  * the right system header and pass in the flag.
4979  *
4980  * Since: 2.22
4981  */
4982
4983
4984 /**
4985  * GSocketProtocol:
4986  * @G_SOCKET_PROTOCOL_UNKNOWN: The protocol type is unknown
4987  * @G_SOCKET_PROTOCOL_DEFAULT: The default protocol for the family/type
4988  * @G_SOCKET_PROTOCOL_TCP: TCP over IP
4989  * @G_SOCKET_PROTOCOL_UDP: UDP over IP
4990  * @G_SOCKET_PROTOCOL_SCTP: SCTP over IP
4991  *
4992  * A protocol identifier is specified when creating a #GSocket, which is a
4993  * family/type specific identifier, where 0 means the default protocol for
4994  * the particular family/type.
4995  * This enum contains a set of commonly available and used protocols. You
4996  * can also pass any other identifiers handled by the platform in order to
4997  * use protocols not listed here.
4998  *
4999  * Since: 2.22
5000  */
5001
5002
5003 /**
5004  * GSocketService:
5005  *
5006  * A helper class for handling accepting incomming connections in the
5007  * glib mainloop.
5008  *
5009  * Since: 2.22
5010  */
5011
5012
5013 /**
5014  * GSocketService::incoming:
5015  * @service: the #GSocketService.
5016  * @connection: a new #GSocketConnection object.
5017  * @source_object: the source_object passed to g_socket_listener_add_address().
5018  *
5019  * The ::incoming signal is emitted when a new incoming connection
5020  * to @service needs to be handled. The handler must initiate the
5021  * handling of @connection, but may not block; in essence,
5022  * asynchronous operations must be used.
5023  *
5024  * Returns: %TRUE to stop other handlers from being called
5025  * Since: 2.22
5026  */
5027
5028
5029 /**
5030  * GSocketServiceClass:
5031  * @incomming: signal emitted when new connections are accepted
5032  *
5033  *
5034  */
5035
5036
5037 /**
5038  * GSocketSourceFunc:
5039  * @socket: the #GSocket
5040  * @condition: the current condition at the source fired.
5041  * @user_data: data passed in by the user.
5042  *
5043  * This is the function type of the callback used for the #GSource
5044  * returned by g_socket_create_source().
5045  *
5046  * Returns: it should return %FALSE if the source should be removed.
5047  * Since: 2.22
5048  */
5049
5050
5051 /**
5052  * GSocketType:
5053  * @G_SOCKET_TYPE_INVALID: Type unknown or wrong
5054  * @G_SOCKET_TYPE_STREAM: Reliable connection-based byte streams (e.g. TCP).
5055  * @G_SOCKET_TYPE_DATAGRAM: Connectionless, unreliable datagram passing. (e.g. UDP)
5056  * @G_SOCKET_TYPE_SEQPACKET: Reliable connection-based passing of datagrams of fixed maximum length (e.g. SCTP).
5057  *
5058  * Flags used when creating a #GSocket. Some protocols may not implement
5059  * all the socket types.
5060  *
5061  * Since: 2.22
5062  */
5063
5064
5065 /**
5066  * GSource:
5067  *
5068  * The <structname>GSource</structname> struct is an opaque data type
5069  * representing an event source.
5070  */
5071
5072
5073 /**
5074  * GSourceCallbackFuncs:
5075  * @ref: Called when a reference is added to the callback object
5076  * @unref: Called when a reference to the callback object is dropped
5077  * @get: Called to extract the callback function and data from the callback object.
5078  *
5079  * The <structname>GSourceCallbackFuncs</structname> struct contains
5080  * functions for managing callback objects.
5081  */
5082
5083
5084 /**
5085  * GSourceFuncs:
5086  * @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
5087  * @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.
5088  * @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.
5089  * @finalize: Called when the source is finalized.
5090  *
5091  * The <structname>GSourceFuncs</structname> struct contains a table of
5092  * functions used to handle event sources in a generic manner.
5093  * For idle sources, the prepare and check functions always return %TRUE
5094  * to indicate that the source is always ready to be processed. The prepare
5095  * function also returns a timeout value of 0 to ensure that the poll() call
5096  * doesn't block (since that would be time wasted which could have been spent
5097  * running the idle function).
5098  * For timeout sources, the prepare and check functions both return %TRUE
5099  * if the timeout interval has expired. The prepare function also returns
5100  * a timeout value to ensure that the poll() call doesn't block too long
5101  * and miss the next timeout.
5102  * For file descriptor sources, the prepare function typically returns %FALSE,
5103  * since it must wait until poll() has been called before it knows whether
5104  * any events need to be processed. It sets the returned timeout to -1 to
5105  * indicate that it doesn't mind how long the poll() call blocks. In the
5106  * check function, it tests the results of the poll() call to see if the
5107  * required condition has been met, and returns %TRUE if so.
5108  */
5109
5110
5111 /**
5112  * GSrvTarget:
5113  *
5114  * A single target host/port that a network service is running on.
5115  */
5116
5117
5118 /**
5119  * GStrv:
5120  *
5121  * A C representable type name for #G_TYPE_STRV.
5122  */
5123
5124
5125 /**
5126  * GTcpConnection:
5127  *
5128  * A #GSocketConnection for UNIX domain socket connections.
5129  *
5130  * Since: 2.22
5131  */
5132
5133
5134 /**
5135  * GTestLogFatalFunc:
5136  * @log_domain: the log domain of the message
5137  * @log_level: the log level of the message (including the fatal and recursion flags)
5138  * @message: the message to process
5139  * @user_data: user data, set in g_test_log_set_fatal_handler()
5140  *
5141  * Specifies the prototype of fatal log handler functions.
5142  *
5143  * Returns: %TRUE if the program should abort, %FALSE otherwise
5144  * Since: 2.22
5145  */
5146
5147
5148 /**
5149  * GThemedIcon:
5150  *
5151  * An implementation of #GIcon for themed icons.
5152  */
5153
5154
5155 /**
5156  * GThemedIcon:name:
5157  *
5158  * The icon name.
5159  */
5160
5161
5162 /**
5163  * GThemedIcon:names:
5164  *
5165  * A %NULL-terminated array of icon names.
5166  */
5167
5168
5169 /**
5170  * GThemedIcon:use-default-fallbacks:
5171  *
5172  * Whether to use the default fallbacks found by shortening the icon name
5173  * at '-' characters. If the "names" array has more than one element,
5174  * ignores any past the first.
5175  * For example, if the icon name was "gnome-dev-cdrom-audio", the array
5176  * would become
5177  * |[
5178  * {
5179  * "gnome-dev-cdrom-audio",
5180  * "gnome-dev-cdrom",
5181  * "gnome-dev",
5182  * "gnome",
5183  * NULL
5184  * };
5185  * ]|
5186  */
5187
5188
5189 /**
5190  * GThreadedSocketService:
5191  *
5192  * A helper class for handling accepting incomming connections in the
5193  * glib mainloop and handling them in a thread.
5194  *
5195  * Since: 2.22
5196  */
5197
5198
5199 /**
5200  * GThreadedSocketService::run:
5201  * @service: the #GThreadedSocketService.
5202  * @connection: a new #GSocketConnection object.
5203  * @source_object: the source_object passed to g_socket_listener_add_address().
5204  *
5205  * The ::run signal is emitted in a worker thread in response to an
5206  * incoming connection. This thread is dedicated to handling
5207  * not return until the connection is closed.
5208  *
5209  * Returns: %TRUE to stope further signal handlers from being called
5210  */
5211
5212
5213 /**
5214  * GTimeSpan:
5215  *
5216  * A value representing an interval of time, in microseconds.
5217  *
5218  * Since: 2.26
5219  */
5220
5221
5222 /**
5223  * GTimeType:
5224  * @G_TIME_TYPE_STANDARD: the time is in local standard time
5225  * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time
5226  * @G_TIME_TYPE_UNIVERSAL: the time is in UTC
5227  *
5228  * Disambiguates a given time in two ways.
5229  * First, specifies if the given time is in universal or local time.
5230  * Second, if the time is in local time, specifies if it is local
5231  * standard time or local daylight time.  This is important for the case
5232  * where the same local time occurs twice (during daylight savings time
5233  * transitions, for example).
5234  */
5235
5236
5237 /**
5238  * GTlsAuthenticationMode:
5239  * @G_TLS_AUTHENTICATION_NONE: client authentication not required
5240  * @G_TLS_AUTHENTICATION_REQUESTED: client authentication is requested
5241  * @G_TLS_AUTHENTICATION_REQUIRED: client authentication is required
5242  *
5243  * The client authentication mode for a #GTlsServerConnection.
5244  *
5245  * Since: 2.28
5246  */
5247
5248
5249 /**
5250  * GTlsBackend:
5251  *
5252  * TLS (Transport Layer Security, aka SSL) backend. This is an
5253  * internal type used to coordinate the different classes implemented
5254  * by a TLS backend.
5255  *
5256  * Since: 2.28
5257  */
5258
5259
5260 /**
5261  * GTlsBackendInterface:
5262  * @g_iface: The parent interface.
5263  * @get_certificate_type: returns the #GTlsCertificate implementation type
5264  * @get_client_connection_type: returns the #GTlsClientConnection implementation type
5265  * @get_server_connection_type: returns the #GTlsServerConnection implementation type
5266  *
5267  * Provides an interface for describing TLS-related types.
5268  *
5269  * Since: 2.28
5270  */
5271
5272
5273 /**
5274  * GTlsCertificate:
5275  *
5276  * Abstract base class for TLS certificate types.
5277  *
5278  * Since: 2.28
5279  */
5280
5281
5282 /**
5283  * GTlsCertificate:certificate:
5284  *
5285  * The DER (binary) encoded representation of the certificate's
5286  * public key. This property and the
5287  * #GTlsCertificate:certificate-pem property represent the same
5288  * data, just in different forms.
5289  *
5290  * Since: 2.28
5291  */
5292
5293
5294 /**
5295  * GTlsCertificate:certificate-pem:
5296  *
5297  * The PEM (ASCII) encoded representation of the certificate's
5298  * public key. This property and the #GTlsCertificate:certificate
5299  * property represent the same data, just in different forms.
5300  *
5301  * Since: 2.28
5302  */
5303
5304
5305 /**
5306  * GTlsCertificate:issuer:
5307  *
5308  * A #GTlsCertificate representing the entity that issued this
5309  * certificate. If %NULL, this means that the certificate is either
5310  * self-signed, or else the certificate of the issuer is not
5311  * available.
5312  *
5313  * Since: 2.28
5314  */
5315
5316
5317 /**
5318  * GTlsCertificate:private-key:
5319  *
5320  * The DER (binary) encoded representation of the certificate's
5321  * private key. This property (or the
5322  * #GTlsCertificate:private-key-pem property) can be set when
5323  * constructing a key (eg, from a file), but cannot be read.
5324  *
5325  * Since: 2.28
5326  */
5327
5328
5329 /**
5330  * GTlsCertificate:private-key-pem:
5331  *
5332  * The PEM (ASCII) encoded representation of the certificate's
5333  * private key. This property (or the #GTlsCertificate:private-key
5334  * property) can be set when constructing a key (eg, from a file),
5335  * but cannot be read.
5336  *
5337  * Since: 2.28
5338  */
5339
5340
5341 /**
5342  * GTlsCertificateFlags:
5343  * @G_TLS_CERTIFICATE_UNKNOWN_CA: The signing certificate authority is not known.
5344  * @G_TLS_CERTIFICATE_BAD_IDENTITY: The certificate does not match the expected identity of the site that it was retrieved from.
5345  * @G_TLS_CERTIFICATE_NOT_ACTIVATED: The certificate's activation time is still in the future
5346  * @G_TLS_CERTIFICATE_EXPIRED: The certificate has expired
5347  * @G_TLS_CERTIFICATE_REVOKED: The certificate has been revoked according to the #GTlsContext's certificate revocation list.
5348  * @G_TLS_CERTIFICATE_INSECURE: The certificate's algorithm is considered insecure.
5349  * @G_TLS_CERTIFICATE_GENERIC_ERROR: Some other error occurred validating the certificate
5350  * @G_TLS_CERTIFICATE_VALIDATE_ALL: the combination of all of the above flags
5351  *
5352  * A set of flags describing TLS certification validation. This can be
5353  * used to set which validation steps to perform (eg, with
5354  * g_tls_client_connection_set_validation_flags()), or to describe why
5355  * a particular certificate was rejected (eg, in
5356  * #GTlsConnection::accept-certificate).
5357  *
5358  * Since: 2.28
5359  */
5360
5361
5362 /**
5363  * GTlsClientConnection:
5364  *
5365  * TLS client-side connection; the client-side implementation of a
5366  * #GTlsConnection
5367  *
5368  * Since: 2.28
5369  */
5370
5371
5372 /**
5373  * GTlsClientConnection:accepted-cas:
5374  *
5375  * A list of the distinguished names of the Certificate Authorities
5376  * that the server will accept client certificates signed by. If the
5377  * server requests a client certificate during the handshake, then
5378  * this property will be set after the handshake completes.
5379  * Each item in the list is a #GByteArray which contains the complete
5380  * subject DN of the certificate authority.
5381  *
5382  * Since: 2.28
5383  */
5384
5385
5386 /**
5387  * GTlsClientConnection:server-identity:
5388  *
5389  * A #GSocketConnectable describing the identity of the server that
5390  * is expected on the other end of the connection.
5391  * If the %G_TLS_CERTIFICATE_BAD_IDENTITY flag is set in
5392  * #GTlsClientConnection:validation-flags, this object will be used
5393  * to determine the expected identify of the remote end of the
5394  * connection; if #GTlsClientConnection:server-identity is not set,
5395  * or does not match the identity presented by the server, then the
5396  * %G_TLS_CERTIFICATE_BAD_IDENTITY validation will fail.
5397  * In addition to its use in verifying the server certificate,
5398  * this is also used to give a hint to the server about what
5399  * certificate we expect, which is useful for servers that serve
5400  * virtual hosts.
5401  *
5402  * Since: 2.28
5403  */
5404
5405
5406 /**
5407  * GTlsClientConnection:use-ssl3:
5408  *
5409  * If %TRUE, tells the connection to use SSL 3.0 rather than trying
5410  * to negotiate the best version of TLS or SSL to use. This can be
5411  * used when talking to servers that don't implement version
5412  * negotiation correctly and therefore refuse to handshake at all with
5413  * a "modern" TLS handshake.
5414  *
5415  * Since: 2.28
5416  */
5417
5418
5419 /**
5420  * GTlsClientConnection:validation-flags:
5421  *
5422  * What steps to perform when validating a certificate received from
5423  * a server. Server certificates that fail to validate in all of the
5424  * ways indicated here will be rejected unless the application
5425  * overrides the default via #GTlsConnection::accept-certificate.
5426  *
5427  * Since: 2.28
5428  */
5429
5430
5431 /**
5432  * GTlsConnection:
5433  *
5434  * TLS connection. This is an abstract type that will be subclassed by
5435  * a TLS-library-specific subtype.
5436  *
5437  * Since: 2.28
5438  */
5439
5440
5441 /**
5442  * GTlsConnection::accept-certificate:
5443  * @conn: a #GTlsConnection
5444  * @peer_cert: the peer's #GTlsCertificate
5445  * @errors: the problems with @peer_cert.
5446  *
5447  * Emitted during the TLS handshake after the peer certificate has
5448  * been received. You can examine @peer_cert's certification path by
5449  * calling g_tls_certificate_get_issuer() on it.
5450  * For a client-side connection, @peer_cert is the server's
5451  * certificate, and the signal will only be emitted if the
5452  * certificate was not acceptable according to @conn's
5453  * #GTlsClientConnection:validation_flags. If you would like the
5454  * certificate to be accepted despite @errors, return %TRUE from the
5455  * signal handler. Otherwise, if no handler accepts the certificate,
5456  * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE.
5457  * For a server-side connection, @peer_cert is the certificate
5458  * presented by the client, if this was requested via the server's
5459  * #GTlsServerConnection:authentication_mode. On the server side,
5460  * the signal is always emitted when the client presents a
5461  * certificate, and the certificate will only be accepted if a
5462  * handler returns %TRUE.
5463  * Note that if this signal is emitted as part of asynchronous I/O
5464  * in the main thread, then you should not attempt to interact with
5465  * the user before returning from the signal handler. If you want to
5466  * let the user decide whether or not to accept the certificate, you
5467  * would have to return %FALSE from the signal handler on the first
5468  * attempt, and then after the connection attempt returns a
5469  * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if
5470  * the user decides to accept the certificate, remember that fact,
5471  * create a new connection, and return %TRUE from the signal handler
5472  * the next time.
5473  * If you are doing I/O in another thread, you do not
5474  * need to worry about this, and can simply block in the signal
5475  * handler until the UI thread returns an answer.
5476  * immediately end the signal emission). %FALSE to allow the signal
5477  * emission to continue, which will cause the handshake to fail if
5478  * no one else overrides it.
5479  *
5480  * Returns: %TRUE to accept @peer_cert (which will also
5481  * Since: 2.28
5482  */
5483
5484
5485 /**
5486  * GTlsConnection:base-io-stream:
5487  *
5488  * The #GIOStream that the connection wraps
5489  *
5490  * Since: 2.28
5491  */
5492
5493
5494 /**
5495  * GTlsConnection:certificate:
5496  *
5497  * The connection's certificate; see
5498  * g_tls_connection_set_certificate().
5499  *
5500  * Since: 2.28
5501  */
5502
5503
5504 /**
5505  * GTlsConnection:peer-certificate:
5506  *
5507  * The connection's peer's certificate, after the TLS handshake has
5508  * completed and the certificate has been accepted. Note in
5509  * particular that this is not yet set during the emission of
5510  * #GTlsConnection::accept-certificate.
5511  * (You can watch for a #GObject::notify signal on this property to
5512  * detect when a handshake has occurred.)
5513  *
5514  * Since: 2.28
5515  */
5516
5517
5518 /**
5519  * GTlsConnection:peer-certificate-errors:
5520  *
5521  * The errors noticed-and-ignored while verifying
5522  * #GTlsConnection:peer-certificate. Normally this should be %0, but
5523  * it may not be if #GTlsClientConnection::validation-flags is not
5524  * %G_TLS_CERTIFICATE_VALIDATE_ALL, or if
5525  * #GTlsConnection::accept-certificate overrode the default
5526  * behavior.
5527  *
5528  * Since: 2.28
5529  */
5530
5531
5532 /**
5533  * GTlsConnection:rehandshake-mode:
5534  *
5535  * The rehandshaking mode. See
5536  * g_tls_connection_set_rehandshake_mode().
5537  *
5538  * Since: 2.28
5539  */
5540
5541
5542 /**
5543  * GTlsConnection:require-close-notify:
5544  *
5545  * Whether or not proper TLS close notification is required.
5546  * See g_tls_connection_set_require_close_notify().
5547  *
5548  * Since: 2.28
5549  */
5550
5551
5552 /**
5553  * GTlsConnection:use-system-certdb:
5554  *
5555  * Whether or not the system certificate database will be used to
5556  * verify peer certificates. See
5557  * g_tls_connection_set_use_system_certdb().
5558  *
5559  * Since: 2.28
5560  */
5561
5562
5563 /**
5564  * GTlsError:
5565  * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available
5566  * @G_TLS_ERROR_MISC: Miscellaneous TLS error
5567  * @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed
5568  * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the peer does not seem to be a TLS server.
5569  * @G_TLS_ERROR_HANDSHAKE: The TLS handshake failed because the peer's certificate was not acceptable.
5570  * @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().
5571  * @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().
5572  *
5573  * An error code used with %G_TLS_ERROR in a #GError returned from a
5574  * TLS-related routine.
5575  *
5576  * Since: 2.28
5577  */
5578
5579
5580 /**
5581  * GTlsRehandshakeMode:
5582  * @G_TLS_REHANDSHAKE_NEVER: Never allow rehandshaking
5583  * @G_TLS_REHANDSHAKE_SAFELY: Allow safe rehandshaking only
5584  * @G_TLS_REHANDSHAKE_UNSAFELY: Allow unsafe rehandshaking
5585  *
5586  * When to allow rehandshaking. See
5587  * g_tls_connection_set_rehandshake_mode().
5588  *
5589  * Since: 2.28
5590  */
5591
5592
5593 /**
5594  * GTlsServerConnection:
5595  *
5596  * TLS server-side connection. This is the server-side implementation
5597  * of a #GTlsConnection.
5598  *
5599  * Since: 2.28
5600  */
5601
5602
5603 /**
5604  * GTlsServerConnection:authentication-mode:
5605  *
5606  * The #GTlsAuthenticationMode for the server. This can be changed
5607  * before calling g_tls_connection_handshake() if you want to
5608  * rehandshake with a different mode from the initial handshake.
5609  *
5610  * Since: 2.28
5611  */
5612
5613
5614 /**
5615  * GToggleNotify:
5616  * @data: Callback data passed to g_object_add_toggle_ref()
5617  * @object: The object on which g_object_add_toggle_ref() was called.
5618  * @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.
5619  *
5620  * A callback function used for notification when the state
5621  * of a toggle reference changes. See g_object_add_toggle_ref().
5622  */
5623
5624
5625 /**
5626  * GTranslateFunc:
5627  * @str: the untranslated string
5628  * @data: user data specified when installing the function, e.g. in g_option_group_set_translate_func()
5629  *
5630  * The type of functions which are used to translate user-visible
5631  * strings, for <option>--help</option> output.
5632  * The returned string is owned by GLib and must not be freed.
5633  *
5634  * Returns: a translation of the string for the current locale.
5635  */
5636
5637
5638 /**
5639  * GType:
5640  *
5641  * A numerical value which represents the unique identifier of a registered
5642  * type.
5643  */
5644
5645
5646 /**
5647  * GTypeClass:
5648  *
5649  * An opaque structure used as the base of all classes.
5650  */
5651
5652
5653 /**
5654  * GTypeClassCacheFunc:
5655  * @cache_data: data that was given to the g_type_add_class_cache_func() call
5656  * @g_class: The #GTypeClass structure which is unreferenced
5657  *
5658  * A callback function which is called when the reference count of a class
5659  * drops to zero. It may use g_type_class_ref() to prevent the class from
5660  * being freed. You should not call g_type_class_unref() from a
5661  * #GTypeClassCacheFunc function to prevent infinite recursion, use
5662  * g_type_class_unref_uncached() instead.
5663  * The functions have to check the class id passed in to figure
5664  * whether they actually want to cache the class of this type, since all
5665  * classes are routed through the same #GTypeClassCacheFunc chain.
5666  * called, %FALSE to continue.
5667  *
5668  * Returns: %TRUE to stop further #GTypeClassCacheFunc<!-- -->s from being
5669  */
5670
5671
5672 /**
5673  * GTypeDebugFlags:
5674  * @G_TYPE_DEBUG_NONE: Print no messages.
5675  * @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping.
5676  * @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions.
5677  * @G_TYPE_DEBUG_MASK: Mask covering all debug flags.
5678  *
5679  * The <type>GTypeDebugFlags</type> enumeration values can be passed to
5680  * g_type_init_with_debug_flags() to trigger debugging messages during runtime.
5681  * Note that the messages can also be triggered by setting the
5682  * <envar>GOBJECT_DEBUG</envar> environment variable to a ':'-separated list of
5683  * "objects" and "signals".
5684  */
5685
5686
5687 /**
5688  * GTypeFlags:
5689  * @G_TYPE_FLAG_ABSTRACT: Indicates an abstract type. No instances can be created for an abstract type.
5690  * @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().
5691  *
5692  * Bit masks used to check or determine characteristics of a type.
5693  */
5694
5695
5696 /**
5697  * GTypeFundamentalFlags:
5698  * @G_TYPE_FLAG_CLASSED: Indicates a classed type.
5699  * @G_TYPE_FLAG_INSTANTIATABLE: Indicates an instantiable type (implies classed).
5700  * @G_TYPE_FLAG_DERIVABLE: Indicates a flat derivable type.
5701  * @G_TYPE_FLAG_DEEP_DERIVABLE: Indicates a deep derivable type (implies derivable).
5702  *
5703  * Bit masks used to check or determine specific characteristics of a
5704  * fundamental type.
5705  */
5706
5707
5708 /**
5709  * GTypeFundamentalInfo:
5710  * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type
5711  *
5712  * A structure that provides information to the type system which is
5713  * used specifically for managing fundamental types.
5714  */
5715
5716
5717 /**
5718  * GTypeInfo:
5719  * @class_size: Size of the class structure (required for interface, classed and instantiatable types).
5720  * @base_init: Location of the base initialization function (optional).
5721  * @base_finalize: Location of the base finalization function (optional).
5722  * @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.
5723  * @class_finalize: Location of the class finalization function for classed and instantiatable types. Location fo the default vtable finalization function for interface types. (optional)
5724  * @class_data: User-supplied data passed to the class init/finalize functions.
5725  * @instance_size: Size of the instance (object) structure (required for instantiatable types only).
5726  * @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.
5727  * @instance_init: Location of the instance initialization function (optional, for instantiatable types only).
5728  * @value_table: A #GTypeValueTable function table for generic handling of GValues of this type (usually only useful for fundamental types).
5729  *
5730  * This structure is used to provide the type system with the information
5731  * required to initialize and destruct (finalize) a type's class and
5732  * its instances.
5733  * The initialized structure is passed to the g_type_register_static() function
5734  * (or is copied into the provided #GTypeInfo structure in the
5735  * g_type_plugin_complete_type_info()). The type system will perform a deep
5736  * copy of this structure, so its memory does not need to be persistent
5737  * across invocation of g_type_register_static().
5738  */
5739
5740
5741 /**
5742  * GTypeInstance:
5743  *
5744  * An opaque structure used as the base of all type instances.
5745  */
5746
5747
5748 /**
5749  * GTypeInterface:
5750  *
5751  * An opaque structure used as the base of all interface types.
5752  */
5753
5754
5755 /**
5756  * GTypeInterfaceCheckFunc:
5757  * @check_data: data passed to g_type_add_interface_check().
5758  * @g_iface: the interface that has been initialized
5759  *
5760  * A callback called after an interface vtable is initialized.
5761  * See g_type_add_interface_check().
5762  *
5763  * Since: 2.4
5764  */
5765
5766
5767 /**
5768  * GTypeModule:
5769  * @name: the name of the module
5770  *
5771  * The members of the <structname>GTypeModule</structname> structure should not
5772  * be accessed directly, except for the @name field.
5773  */
5774
5775
5776 /**
5777  * GTypeModuleClass:
5778  * @parent_class: the parent class
5779  * @load: loads the module and registers one or more types using g_type_module_register_type().
5780  * @unload: unloads the module
5781  *
5782  * In order to implement dynamic loading of types based on #GTypeModule,
5783  * the @load and @unload functions in #GTypeModuleClass must be implemented.
5784  */
5785
5786
5787 /**
5788  * GTypePlugin:
5789  *
5790  * The <structname>GTypePlugin</structname> typedef is used as a placeholder
5791  * for objects that implement the <structname>GTypePlugin</structname>
5792  * interface.
5793  */
5794
5795
5796 /**
5797  * GTypePluginClass:
5798  * @use_plugin: Increases the use count of the plugin.
5799  * @unuse_plugin: Decreases the use count of the plugin.
5800  * @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.
5801  * @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.
5802  *
5803  * The #GTypePlugin interface is used by the type system in order to handle
5804  * the lifecycle of dynamically loaded types.
5805  */
5806
5807
5808 /**
5809  * GTypePluginCompleteInterfaceInfo:
5810  * @plugin: the #GTypePlugin
5811  * @instance_type: the #GType of an instantiable type to which the interface is added
5812  * @interface_type: the #GType of the interface whose info is completed
5813  * @info: the #GInterfaceInfo to fill in
5814  *
5815  * The type of the @complete_interface_info function of #GTypePluginClass.
5816  */
5817
5818
5819 /**
5820  * GTypePluginCompleteTypeInfo:
5821  * @plugin: the #GTypePlugin
5822  * @g_type: the #GType whose info is completed
5823  * @info: the #GTypeInfo struct to fill in
5824  * @value_table: the #GTypeValueTable to fill in
5825  *
5826  * The type of the @complete_type_info function of #GTypePluginClass.
5827  */
5828
5829
5830 /**
5831  * GTypePluginUnuse:
5832  * @plugin: the #GTypePlugin whose use count should be decreased
5833  *
5834  * The type of the @unuse_plugin function of #GTypePluginClass.
5835  */
5836
5837
5838 /**
5839  * GTypePluginUse:
5840  * @plugin: the #GTypePlugin whose use count should be increased
5841  *
5842  * The type of the @use_plugin function of #GTypePluginClass, which gets called
5843  * to increase the use count of @plugin.
5844  */
5845
5846
5847 /**
5848  * GTypeQuery:
5849  * @type: the #GType value of the type.
5850  * @type_name: the name of the type.
5851  * @class_size: the size of the class structure.
5852  * @instance_size: the size of the instance structure.
5853  *
5854  * A structure holding information for a specific type. It is
5855  * filled in by the g_type_query() function.
5856  */
5857
5858
5859 /**
5860  * GTypeValueTable:
5861  * @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 (""); ]|
5862  * @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); ]|
5863  * @value_copy: @dest_value is a #GValue with zero-filled data section and @src_value is a properly setup #GValue of same or derived type. The purpose of this function is to copy the contents of remain valid. String type example: |[ dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); ]|
5864  * @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; ]|
5865  * @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'.
5866  * @collect_value: The collect_value() function is responsible for converting the values collected from a variable argument list into contents suitable for storage in a GValue. This function should setup does not allow %NULL pointers, it needs to either spew an error, or do an implicit conversion by storing an empty string. The @value passed in to this function has a zero-filled data array, so just like for value_init() it is guaranteed to not contain any old contents that might need freeing. and @collect_values is an array of unions #GTypeCValue with length @n_collect_values, containing the collected values according to @collect_format. It may contain the flag %G_VALUE_NOCOPY_CONTENTS indicating, that the collected value contents may be considered "static" for the duration of the @value lifetime. Thus an extra copy of the contents stored in @collect_values is not required for assignment to @value. For our above string example, we continue with: |[ if (!collect_values[0].v_pointer) value->data[0].v_pointer = g_strdup (""); else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { value->data[0].v_pointer = collect_values[0].v_pointer; // keep a flag for the value_free() implementation to not free this string value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS; } else value->data[0].v_pointer = g_strdup (collect_values[0].v_pointer); return NULL; ]| It should be noted, that it is generally a bad idea to follow the #G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to reentrancy requirements and reference count assertions performed by the #GSignal code, reference counts should always be incremented for reference counted contents stored in the value->data array. To deviate from our string example for a moment, and taking a look at an exemplary implementation for collect_value() of #GObject: |[ if (collect_values[0].v_pointer) { GObject *object = G_OBJECT (collect_values[0].v_pointer); // never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types value->data[0].v_pointer = g_object_ref (object); return NULL; } else return g_strdup_printf ("Object passed as invalid NULL pointer"); } ]| The reference count for valid objects is always incremented, regardless of @collect_flags. For invalid objects, the example returns a newly allocated string without altering @value. Upon success, collect_value() needs to return %NULL. If, however, an error condition occurred, collect_value() may spew an error by returning a newly allocated non-%NULL string, giving a suitable description of the error condition. The calling code makes no assumptions about the @value contents being valid upon error returns, @value is simply thrown away without further freeing. As such, it is a good idea to not allocate #GValue contents, prior to returning an error, however, collect_values() is not obliged to return a correctly setup @value for error returns, simply because any non-%NULL return is considered a fatal condition so further program behaviour is undefined.
5867  * @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.
5868  * @lcopy_value: This function is responsible for storing the @value contents into arguments passed through a variable argument list which got collected into @collect_values according to @lcopy_format. and @collect_flags may contain %G_VALUE_NOCOPY_CONTENTS. In contrast to collect_value(), lcopy_value() is obliged to always properly support %G_VALUE_NOCOPY_CONTENTS. Similar to collect_value() the function may prematurely abort by returning a newly allocated string describing an error condition. To complete the string example: |[ gchar **string_p = collect_values[0].v_pointer; if (!string_p) return g_strdup_printf ("string location passed as NULL"); if (collect_flags & G_VALUE_NOCOPY_CONTENTS) *string_p = value->data[0].v_pointer; else *string_p = g_strdup (value->data[0].v_pointer); ]| And an illustrative version of lcopy_value() for reference-counted types: |[ GObject **object_p = collect_values[0].v_pointer; if (!object_p) return g_strdup_printf ("object location passed as NULL"); if (!value->data[0].v_pointer) *object_p = NULL; else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) // always honour *object_p = value->data[0].v_pointer; else *object_p = g_object_ref (value->data[0].v_pointer); return NULL; ]|
5869  *
5870  * The #GTypeValueTable provides the functions required by the #GValue implementation,
5871  * to serve as a container for values of a type.
5872  */
5873
5874
5875 /**
5876  * GUnixCredentialsMessage:
5877  *
5878  * The #GUnixCredentialsMessage structure contains only private data
5879  * and should only be accessed using the provided API.
5880  *
5881  * Since: 2.26
5882  */
5883
5884
5885 /**
5886  * GUnixCredentialsMessage:credentials:
5887  *
5888  * The credentials stored in the message.
5889  *
5890  * Since: 2.26
5891  */
5892
5893
5894 /**
5895  * GUnixCredentialsMessageClass:
5896  *
5897  * Class structure for #GUnixCredentialsMessage.
5898  *
5899  * Since: 2.26
5900  */
5901
5902
5903 /**
5904  * GUnixInputStream:
5905  *
5906  * Implements #GInputStream for reading from selectable unix file descriptors
5907  */
5908
5909
5910 /**
5911  * GUnixInputStream:close-fd:
5912  *
5913  * Whether to close the file descriptor when the stream is closed.
5914  *
5915  * Since: 2.20
5916  */
5917
5918
5919 /**
5920  * GUnixInputStream:fd:
5921  *
5922  * The file descriptor that the stream reads from.
5923  *
5924  * Since: 2.20
5925  */
5926
5927
5928 /**
5929  * GUnixMount:
5930  *
5931  * Implementation of the #GMount interface for Unix systems.
5932  */
5933
5934
5935 /**
5936  * GUnixMountEntry:
5937  *
5938  * Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>).
5939  * This corresponds roughly to a mtab entry.
5940  */
5941
5942
5943 /**
5944  * GUnixMountMonitor:
5945  *
5946  * Watches #GUnixMount<!-- -->s for changes.
5947  */
5948
5949
5950 /**
5951  * GUnixMountMonitor::mountpoints-changed:
5952  * @monitor: the object on which the signal is emitted
5953  *
5954  * Emitted when the unix mount points have changed.
5955  */
5956
5957
5958 /**
5959  * GUnixMountMonitor::mounts-changed:
5960  * @monitor: the object on which the signal is emitted
5961  *
5962  * Emitted when the unix mounts have changed.
5963  */
5964
5965
5966 /**
5967  * GUnixMountPoint:
5968  *
5969  * Defines a Unix mount point (e.g. <filename>/dev</filename>).
5970  * This corresponds roughly to a fstab entry.
5971  */
5972
5973
5974 /**
5975  * GUnixOutputStream:
5976  *
5977  * Implements #GOutputStream for outputting to selectable unix file descriptors
5978  */
5979
5980
5981 /**
5982  * GUnixOutputStream:close-fd:
5983  *
5984  * Whether to close the file descriptor when the stream is closed.
5985  *
5986  * Since: 2.20
5987  */
5988
5989
5990 /**
5991  * GUnixOutputStream:fd:
5992  *
5993  * The file descriptor that the stream writes to.
5994  *
5995  * Since: 2.20
5996  */
5997
5998
5999 /**
6000  * GUnixSocketAddress:
6001  *
6002  * A UNIX-domain (local) socket address, corresponding to a
6003  * <type>struct sockaddr_un</type>.
6004  */
6005
6006
6007 /**
6008  * GUnixSocketAddress:abstract:
6009  *
6010  * Whether or not this is an abstract address
6011  * distinguishes between zero-padded and non-zero-padded
6012  * abstract addresses.
6013  *
6014  * Deprecated: Use #GUnixSocketAddress:address-type, which
6015  */
6016
6017
6018 /**
6019  * GUnixSocketAddressType:
6020  * @G_UNIX_SOCKET_ADDRESS_INVALID: invalid
6021  * @G_UNIX_SOCKET_ADDRESS_ANONYMOUS: anonymous
6022  * @G_UNIX_SOCKET_ADDRESS_PATH: a filesystem path
6023  * @G_UNIX_SOCKET_ADDRESS_ABSTRACT: an abstract name
6024  * @G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED: an abstract name, 0-padded to the full length of a unix socket name
6025  *
6026  * The type of name used by a #GUnixSocketAddress.
6027  * %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain
6028  * socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS
6029  * indicates a socket not bound to any name (eg, a client-side socket,
6030  * or a socket created with socketpair()).
6031  * For abstract sockets, there are two incompatible ways of naming
6032  * sockaddr_un</literal> as the name, padding the unused parts of the
6033  * %sun_path field with zeroes; this corresponds to
6034  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED. However, many programs
6035  * instead just use a portion of %sun_path, and pass an appropriate
6036  * smaller length to bind() or connect(). This is
6037  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT.
6038  *
6039  * Them: the man pages suggest using the entire <literal>struct
6040  * Since: 2.26
6041  */
6042
6043
6044 /**
6045  * GUserDirectory:
6046  * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory
6047  * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory
6048  * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory
6049  * @G_USER_DIRECTORY_MUSIC: the user's Music directory
6050  * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory
6051  * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory
6052  * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory
6053  * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory
6054  * @G_USER_N_DIRECTORIES: the number of enum values
6055  *
6056  * These are logical ids for special directories which are defined
6057  * depending on the platform used. You should use g_get_user_special_dir()
6058  * to retrieve the full path associated to the logical id.
6059  * The #GUserDirectory enumeration can be extended at later date. Not
6060  * every platform has a directory for every logical id in this
6061  * enumeration.
6062  *
6063  * Since: 2.14
6064  */
6065
6066
6067 /**
6068  * GValue:
6069  *
6070  * An opaque structure used to hold different types of values.
6071  * to functions within a #GTypeValueTable structure, or implementations of
6072  * the g_value_*() API. That is, code portions which implement new fundamental
6073  * types.
6074  * #GValue users can not make any assumptions about how data is stored
6075  * within the 2 element @data union, and the @g_type member should
6076  * only be accessed through the G_VALUE_TYPE() macro.
6077  *
6078  * The data within the structure has protected scope: it is accessible only
6079  */
6080
6081
6082 /**
6083  * GValueArray:
6084  * @n_values: number of values contained in the array
6085  * @values: array of values
6086  *
6087  * A #GValueArray contains an array of #GValue elements.
6088  */
6089
6090
6091 /**
6092  * GValueTransform:
6093  * @src_value: Source value.
6094  * @dest_value: Target value.
6095  *
6096  * The type of value transformation functions which can be registered with
6097  * g_value_register_transform_func().
6098  */
6099
6100
6101 /**
6102  * GVariantType:
6103  *
6104  * A type in the GVariant type system.
6105  * Two types may not be compared by value; use g_variant_type_equal() or
6106  * g_variant_type_is_subtype().  May be copied using
6107  * g_variant_type_copy() and freed using g_variant_type_free().
6108  */
6109
6110
6111 /**
6112  * GVfs:
6113  *
6114  * Virtual File System object.
6115  */
6116
6117
6118 /**
6119  * GVolume:
6120  *
6121  * Opaque mountable volume object.
6122  */
6123
6124
6125 /**
6126  * GVolume::changed:
6127  *
6128  * Emitted when the volume has been changed.
6129  */
6130
6131
6132 /**
6133  * GVolume::removed:
6134  *
6135  * This signal is emitted when the #GVolume have been removed. If
6136  * the recipient is holding references to the object they should
6137  * release them so the object can be finalized.
6138  */
6139
6140
6141 /**
6142  * GVolumeIface:
6143  * @g_iface: The parent interface.
6144  * @changed: Changed signal that is emitted when the volume's state has changed.
6145  * @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.
6146  * @get_name: Gets a string containing the name of the #GVolume.
6147  * @get_icon: Gets a #GIcon for the #GVolume.
6148  * @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.
6149  * @get_drive: Gets a #GDrive the volume is located on. Returns %NULL if the #GVolume is not associated with a #GDrive.
6150  * @get_mount: Gets a #GMount representing the mounted volume. Returns %NULL if the #GVolume is not mounted.
6151  * @can_mount: Returns %TRUE if the #GVolume can be mounted.
6152  * @can_eject: Checks if a #GVolume can be ejected.
6153  * @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.
6154  * @mount_finish: Finishes a mount operation.
6155  * @eject: Ejects a given #GVolume.
6156  * @eject_finish: Finishes an eject operation.
6157  * @get_identifier: Returns the <link linkend="volume-identifier">identifier</link> of the given kind, or %NULL if the #GVolume doesn't have one.
6158  * @enumerate_identifiers: Returns an array strings listing the kinds of <link linkend="volume-identifier">identifiers</link> which the #GVolume has.
6159  * @should_automount: Returns %TRUE if the #GVolume should be automatically mounted.
6160  * @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if it is not known.
6161  * @eject_with_operation: Starts ejecting a #GVolume using a #GMountOperation. Since 2.22.
6162  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
6163  *
6164  * Interface for implementing operations for mountable volumes.
6165  */
6166
6167
6168 /**
6169  * GVolumeMonitor:
6170  *
6171  * A Volume Monitor that watches for volume events.
6172  */
6173
6174
6175 /**
6176  * GVolumeMonitor::drive-changed:
6177  * @volume_monitor: The volume monitor emitting the signal.
6178  * @drive: the drive that changed
6179  *
6180  * Emitted when a drive changes.
6181  */
6182
6183
6184 /**
6185  * GVolumeMonitor::drive-connected:
6186  * @volume_monitor: The volume monitor emitting the signal.
6187  * @drive: a #GDrive that was connected.
6188  *
6189  * Emitted when a drive is connected to the system.
6190  */
6191
6192
6193 /**
6194  * GVolumeMonitor::drive-disconnected:
6195  * @volume_monitor: The volume monitor emitting the signal.
6196  * @drive: a #GDrive that was disconnected.
6197  *
6198  * Emitted when a drive is disconnected from the system.
6199  */
6200
6201
6202 /**
6203  * GVolumeMonitor::drive-eject-button:
6204  * @volume_monitor: The volume monitor emitting the signal.
6205  * @drive: the drive where the eject button was pressed
6206  *
6207  * Emitted when the eject button is pressed on @drive.
6208  *
6209  * Since: 2.18
6210  */
6211
6212
6213 /**
6214  * GVolumeMonitor::drive-stop-button:
6215  * @volume_monitor: The volume monitor emitting the signal.
6216  * @drive: the drive where the stop button was pressed
6217  *
6218  * Emitted when the stop button is pressed on @drive.
6219  *
6220  * Since: 2.22
6221  */
6222
6223
6224 /**
6225  * GVolumeMonitor::mount-added:
6226  * @volume_monitor: The volume monitor emitting the signal.
6227  * @mount: a #GMount that was added.
6228  *
6229  * Emitted when a mount is added.
6230  */
6231
6232
6233 /**
6234  * GVolumeMonitor::mount-changed:
6235  * @volume_monitor: The volume monitor emitting the signal.
6236  * @mount: a #GMount that changed.
6237  *
6238  * Emitted when a mount changes.
6239  */
6240
6241
6242 /**
6243  * GVolumeMonitor::mount-pre-unmount:
6244  * @volume_monitor: The volume monitor emitting the signal.
6245  * @mount: a #GMount that is being unmounted.
6246  *
6247  * Emitted when a mount is about to be removed.
6248  */
6249
6250
6251 /**
6252  * GVolumeMonitor::mount-removed:
6253  * @volume_monitor: The volume monitor emitting the signal.
6254  * @mount: a #GMount that was removed.
6255  *
6256  * Emitted when a mount is removed.
6257  */
6258
6259
6260 /**
6261  * GVolumeMonitor::volume-added:
6262  * @volume_monitor: The volume monitor emitting the signal.
6263  * @volume: a #GVolume that was added.
6264  *
6265  * Emitted when a mountable volume is added to the system.
6266  */
6267
6268
6269 /**
6270  * GVolumeMonitor::volume-changed:
6271  * @volume_monitor: The volume monitor emitting the signal.
6272  * @volume: a #GVolume that changed.
6273  *
6274  * Emitted when mountable volume is changed.
6275  */
6276
6277
6278 /**
6279  * GVolumeMonitor::volume-removed:
6280  * @volume_monitor: The volume monitor emitting the signal.
6281  * @volume: a #GVolume that was removed.
6282  *
6283  * Emitted when a mountable volume is removed from the system.
6284  */
6285
6286
6287 /**
6288  * GWeakNotify:
6289  * @data: data that was provided when the weak reference was established
6290  * @where_the_object_was: the object being finalized
6291  *
6292  * A #GWeakNotify function can be added to an object as a callback that gets
6293  * triggered when the object is finalized. Since the object is already being
6294  * finalized when the #GWeakNotify is called, there's not much you could do
6295  * with the object, apart from e.g. using its adress as hash-index or the like.
6296  */
6297
6298
6299 /**
6300  * GWin32InputStream:
6301  *
6302  * Implements #GInputStream for reading from selectable Windows file handles
6303  */
6304
6305
6306 /**
6307  * GWin32InputStream:close-handle:
6308  *
6309  * Whether to close the file handle when the stream is closed.
6310  *
6311  * Since: 2.26
6312  */
6313
6314
6315 /**
6316  * GWin32InputStream:handle:
6317  *
6318  * The handle that the stream reads from.
6319  *
6320  * Since: 2.26
6321  */
6322
6323
6324 /**
6325  * GWin32Mount:
6326  *
6327  * Implementation of the #GMount interface for Win32 systems.
6328  */
6329
6330
6331 /**
6332  * GWin32OutputStream:
6333  *
6334  * Implements #GOutputStream for outputting to Windows file handles
6335  */
6336
6337
6338 /**
6339  * GWin32OutputStream:close-handle:
6340  *
6341  * Whether to close the file handle when the stream is closed.
6342  *
6343  * Since: 2.26
6344  */
6345
6346
6347 /**
6348  * GWin32OutputStream:handle:
6349  *
6350  * The file handle that the stream writes to.
6351  *
6352  * Since: 2.26
6353  */
6354
6355
6356 /**
6357  * GZlibCompressor:
6358  *
6359  * Zlib decompression
6360  */
6361
6362
6363 /**
6364  * GZlibCompressor:file-info:
6365  *
6366  * If set to a non-%NULL #GFileInfo object, and #GZlibCompressor:format is
6367  * %G_ZLIB_COMPRESSOR_FORMAT_GZIP, the compressor will write the file name
6368  * and modification time from the file info to the the GZIP header.
6369  *
6370  * Since: 2.26
6371  */
6372
6373
6374 /**
6375  * GZlibCompressorFormat:
6376  * @G_ZLIB_COMPRESSOR_FORMAT_ZLIB: deflate compression with zlib header
6377  * @G_ZLIB_COMPRESSOR_FORMAT_GZIP: gzip file format
6378  * @G_ZLIB_COMPRESSOR_FORMAT_RAW: deflate compression with no header
6379  *
6380  * Used to select the type of data format to use for #GZlibDecompressor
6381  * and #GZlibCompressor.
6382  *
6383  * Since: 2.24
6384  */
6385
6386
6387 /**
6388  * GZlibDecompressor:
6389  *
6390  * Zlib decompression
6391  */
6392
6393
6394 /**
6395  * GZlibDecompressor:file-info:
6396  *
6397  * A #GFileInfo containing the information found in the GZIP header
6398  * of the data stream processed, or %NULL if the header was not yet
6399  * fully processed, is not present at all, or the compressor's
6400  * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP.
6401  *
6402  * Since: 2.26
6403  */
6404
6405
6406 /**
6407  * G_BOOKMARK_FILE_ERROR:
6408  *
6409  * Error domain for bookmark file parsing.
6410  * Errors in this domain will be from the #GBookmarkFileError
6411  * enumeration. See #GError for information on error domains.
6412  */
6413
6414
6415 /**
6416  * G_CALLBACK:
6417  * @f: a function pointer.
6418  *
6419  * Cast a function pointer to a #GCallback.
6420  */
6421
6422
6423 /**
6424  * G_CCLOSURE_SWAP_DATA:
6425  * @cclosure: a #GCClosure
6426  *
6427  * Checks whether the user data of the #GCClosure should be passed as the
6428  * first parameter to the callback. See g_cclosure_new_swap().
6429  *
6430  * Returns: %TRUE if data has to be swapped.
6431  */
6432
6433
6434 /**
6435  * G_CLOSURE_NEEDS_MARSHAL:
6436  * @closure: a #GClosure
6437  *
6438  * Check if the closure still needs a marshaller. See g_closure_set_marshal().
6439  *
6440  * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on
6441  */
6442
6443
6444 /**
6445  * G_CLOSURE_N_NOTIFIERS:
6446  * @cl: a #GClosure
6447  *
6448  * Get the total number of notifiers connected with the closure @cl.
6449  * The count includes the meta marshaller, the finalize and invalidate notifiers
6450  * and the marshal guards. Note that each guard counts as two notifiers.
6451  * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
6452  * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
6453  *
6454  * Returns: number of notifiers
6455  */
6456
6457
6458 /**
6459  * G_CONVERT_ERROR:
6460  *
6461  * Error domain for character set conversions. Errors in this domain will
6462  * be from the #GConvertError enumeration. See #GError for information on
6463  * error domains.
6464  */
6465
6466
6467 /**
6468  * G_DATALIST_FLAGS_MASK:
6469  *
6470  * A bitmask that restricts the possible flags passed to
6471  * g_datalist_set_flags(). Passing a flags value where
6472  * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.
6473  */
6474
6475
6476 /**
6477  * G_DBUS_ERROR:
6478  *
6479  * Error domain for errors generated by a remote message bus. Errors
6480  * in this domain will be from the #GDBusError enumeration.  See
6481  * #GError for more information on error domains.
6482  * Note that errors in this error domain is intended only for
6483  * returning errors from a remote message bus process. Errors
6484  * generated locally in-process by e.g. #GDBusConnection is from the
6485  * %G_IO_ERROR domain.
6486  *
6487  * Since: 2.26
6488  */
6489
6490
6491 /**
6492  * G_DEFINE_ABSTRACT_TYPE:
6493  * @TN: The name of the new type, in Camel case.
6494  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6495  * @T_P: The #GType of the parent type.
6496  *
6497  * A convenience macro for type implementations.
6498  * Similar to G_DEFINE_TYPE(), but defines an abstract type.
6499  * See G_DEFINE_TYPE_EXTENDED() for an example.
6500  *
6501  * Since: 2.4
6502  */
6503
6504
6505 /**
6506  * G_DEFINE_ABSTRACT_TYPE_WITH_CODE:
6507  * @TN: The name of the new type, in Camel case.
6508  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6509  * @T_P: The #GType of the parent type.
6510  * @_C_: Custom code that gets inserted in the @type_name_get_type() function.
6511  *
6512  * A convenience macro for type implementations.
6513  * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows you to
6514  * insert custom code into the *_get_type() function, e.g. interface implementations
6515  * via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
6516  *
6517  * Since: 2.4
6518  */
6519
6520
6521 /**
6522  * G_DEFINE_BOXED_TYPE:
6523  * @TypeName: The name of the new type, in Camel case.
6524  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6525  * @copy_func: the #GBoxedCopyFunc for the new type
6526  * @free_func: the #GBoxedFreeFunc for the new type
6527  *
6528  * A convenience macro for boxed type implementations, which defines a
6529  * type_name_get_type() function registering the boxed type.
6530  *
6531  * Since: 2.26
6532  */
6533
6534
6535 /**
6536  * G_DEFINE_BOXED_TYPE_WITH_CODE:
6537  * @TypeName: The name of the new type, in Camel case.
6538  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6539  * @copy_func: the #GBoxedCopyFunc for the new type
6540  * @free_func: the #GBoxedFreeFunc for the new type
6541  * @_C_: Custom code that gets inserted in the *_get_type() function.
6542  *
6543  * A convenience macro for boxed type implementations.
6544  * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the
6545  * type_name_get_type() function, e.g. to register value transformations with
6546  * g_value_register_transform_func().
6547  *
6548  * Since: 2.26
6549  */
6550
6551
6552 /**
6553  * G_DEFINE_DYNAMIC_TYPE:
6554  * @TN: The name of the new type, in Camel case.
6555  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6556  * @T_P: The #GType of the parent type.
6557  *
6558  * A convenience macro for dynamic type implementations, which declares a
6559  * class initialization function, an instance initialization function (see
6560  * #GTypeInfo for information about these) and a static variable named
6561  * it defines a <function>*_get_type()</function> and a static
6562  * <function>*_register_type()</function> function for use in your
6563  * <function>module_init()</function>.
6564  * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.
6565  *
6566  * Since: 2.14
6567  */
6568
6569
6570 /**
6571  * G_DEFINE_DYNAMIC_TYPE_EXTENDED:
6572  * @TypeName: The name of the new type, in Camel case.
6573  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6574  * @TYPE_PARENT: The #GType of the parent type.
6575  * @flags: #GTypeFlags to pass to g_type_module_register_type()
6576  * @CODE: Custom code that gets inserted in the *_get_type() function.
6577  *
6578  * A more general version of G_DEFINE_DYNAMIC_TYPE() which
6579  * allows to specify #GTypeFlags and custom code.
6580  * |[
6581  * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
6582  * gtk_gadget,
6583  * GTK_TYPE_THING,
6584  * 0,
6585  * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO,
6586  * gtk_gadget_gizmo_init));
6587  * ]|
6588  * expands to
6589  * |[
6590  * static void     gtk_gadget_init              (GtkGadget      *self);
6591  * static void     gtk_gadget_class_init        (GtkGadgetClass *klass);
6592  * static void     gtk_gadget_class_finalize    (GtkGadgetClass *klass);
6593  * static gpointer gtk_gadget_parent_class = NULL;
6594  * static GType    gtk_gadget_type_id = 0;
6595  * static void     gtk_gadget_class_intern_init (gpointer klass)
6596  * {
6597  * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
6598  * gtk_gadget_class_init ((GtkGadgetClass*) klass);
6599  * }
6600  * GType
6601  * gtk_gadget_get_type (void)
6602  * {
6603  * return gtk_gadget_type_id;
6604  * }
6605  * static void
6606  * gtk_gadget_register_type (GTypeModule *type_module)
6607  * {
6608  * const GTypeInfo g_define_type_info = {
6609  * sizeof (GtkGadgetClass),
6610  * (GBaseInitFunc) NULL,
6611  * (GBaseFinalizeFunc) NULL,
6612  * (GClassInitFunc) gtk_gadget_class_intern_init,
6613  * (GClassFinalizeFunc) gtk_gadget_class_finalize,
6614  * NULL,   // class_data
6615  * sizeof (GtkGadget),
6616  * 0,      // n_preallocs
6617  * (GInstanceInitFunc) gtk_gadget_init,
6618  * NULL    // value_table
6619  * };
6620  * gtk_gadget_type_id = g_type_module_register_type (type_module,
6621  * GTK_TYPE_THING,
6622  * GtkGadget,
6623  * &g_define_type_info,
6624  * (GTypeFlags) flags);
6625  * {
6626  * const GInterfaceInfo g_implement_interface_info = {
6627  * (GInterfaceInitFunc) gtk_gadget_gizmo_init
6628  * };
6629  * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
6630  * }
6631  * }
6632  * ]|
6633  *
6634  * Since: 2.14
6635  */
6636
6637
6638 /**
6639  * G_DEFINE_INTERFACE:
6640  * @TN: The name of the new type, in Camel case.
6641  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6642  * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
6643  *
6644  * A convenience macro for #GTypeInterface definitions, which declares
6645  * a default vtable initialization function and defines a *_get_type()
6646  * function.
6647  * The macro expects the interface initialization function to have the
6648  * name <literal>t_n ## _default_init</literal>, and the interface
6649  * structure to have the name <literal>TN ## Interface</literal>.
6650  *
6651  * Since: 2.24
6652  */
6653
6654
6655 /**
6656  * G_DEFINE_INTERFACE_WITH_CODE:
6657  * @TN: The name of the new type, in Camel case.
6658  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6659  * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
6660  * @_C_: Custom code that gets inserted in the *_get_type() function.
6661  *
6662  * A convenience macro for #GTypeInterface definitions. Similar to
6663  * G_DEFINE_INTERFACE(), but allows you to insert custom code into the
6664  * *_get_type() function, e.g. additional interface implementations
6665  * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See
6666  * G_DEFINE_TYPE_EXTENDED() for a similar example using
6667  * G_DEFINE_TYPE_WITH_CODE().
6668  *
6669  * Since: 2.24
6670  */
6671
6672
6673 /**
6674  * G_DEFINE_POINTER_TYPE:
6675  * @TypeName: The name of the new type, in Camel case.
6676  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6677  *
6678  * A convenience macro for pointer type implementations, which defines a
6679  * type_name_get_type() function registering the pointer type.
6680  *
6681  * Since: 2.26
6682  */
6683
6684
6685 /**
6686  * G_DEFINE_POINTER_TYPE_WITH_CODE:
6687  * @TypeName: The name of the new type, in Camel case.
6688  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6689  * @_C_: Custom code that gets inserted in the *_get_type() function.
6690  *
6691  * A convenience macro for pointer type implementations.
6692  * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert custom code into the
6693  * type_name_get_type() function.
6694  *
6695  * Since: 2.26
6696  */
6697
6698
6699 /**
6700  * G_DEFINE_TYPE:
6701  * @TN: The name of the new type, in Camel case.
6702  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6703  * @T_P: The #GType of the parent type.
6704  *
6705  * A convenience macro for type implementations, which declares a
6706  * class initialization function, an instance initialization function (see #GTypeInfo for information about
6707  * these) and a static variable named @t_n<!-- -->_parent_class pointing to the parent class. Furthermore, it defines
6708  * a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() for an example.
6709  *
6710  * Since: 2.4
6711  */
6712
6713
6714 /**
6715  * G_DEFINE_TYPE_EXTENDED:
6716  * @TN: The name of the new type, in Camel case.
6717  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6718  * @T_P: The #GType of the parent type.
6719  * @_f_: #GTypeFlags to pass to g_type_register_static()
6720  * @_C_: Custom code that gets inserted in the *_get_type() function.
6721  *
6722  * The most general convenience macro for type implementations, on which
6723  * G_DEFINE_TYPE(), etc are based.
6724  * |[
6725  * G_DEFINE_TYPE_EXTENDED (GtkGadget,
6726  * gtk_gadget,
6727  * GTK_TYPE_WIDGET,
6728  * 0,
6729  * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
6730  * gtk_gadget_gizmo_init));
6731  * ]|
6732  * expands to
6733  * |[
6734  * static void     gtk_gadget_init       (GtkGadget      *self);
6735  * static void     gtk_gadget_class_init (GtkGadgetClass *klass);
6736  * static gpointer gtk_gadget_parent_class = NULL;
6737  * static void     gtk_gadget_class_intern_init (gpointer klass)
6738  * {
6739  * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
6740  * gtk_gadget_class_init ((GtkGadgetClass*) klass);
6741  * }
6742  * GType
6743  * gtk_gadget_get_type (void)
6744  * {
6745  * static volatile gsize g_define_type_id__volatile = 0;
6746  * if (g_once_init_enter (&g_define_type_id__volatile))
6747  * {
6748  * GType g_define_type_id =
6749  * g_type_register_static_simple (GTK_TYPE_WIDGET,
6750  * g_intern_static_string ("GtkGadget"),
6751  * sizeof (GtkGadgetClass),
6752  * (GClassInitFunc) gtk_gadget_class_intern_init,
6753  * sizeof (GtkGadget),
6754  * (GInstanceInitFunc) gtk_gadget_init,
6755  * (GTypeFlags) flags);
6756  * {
6757  * static const GInterfaceInfo g_implement_interface_info = {
6758  * (GInterfaceInitFunc) gtk_gadget_gizmo_init
6759  * };
6760  * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
6761  * }
6762  * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
6763  * }
6764  * return g_define_type_id__volatile;
6765  * }
6766  * ]|
6767  * The only pieces which have to be manually provided are the definitions of
6768  * the instance and class structure and the definitions of the instance and
6769  * class init functions.
6770  *
6771  * Since: 2.4
6772  */
6773
6774
6775 /**
6776  * G_DEFINE_TYPE_WITH_CODE:
6777  * @TN: The name of the new type, in Camel case.
6778  * @t_n: The name of the new type in lowercase, with words separated by '_'.
6779  * @T_P: The #GType of the parent type.
6780  * @_C_: Custom code that gets inserted in the *_get_type() function.
6781  *
6782  * A convenience macro for type implementations.
6783  * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the
6784  * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
6785  * See G_DEFINE_TYPE_EXTENDED() for an example.
6786  *
6787  * Since: 2.4
6788  */
6789
6790
6791 /**
6792  * G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME:
6793  *
6794  * Extension point for default handler to URI association. See
6795  * <link linkend="extending-gio">Extending GIO</link>.
6796  */
6797
6798
6799 /**
6800  * G_ENUM_CLASS:
6801  * @class: a valid #GEnumClass
6802  *
6803  * Casts a derived #GEnumClass structure into a #GEnumClass structure.
6804  */
6805
6806
6807 /**
6808  * G_ENUM_CLASS_TYPE:
6809  * @class: a #GEnumClass
6810  *
6811  * Get the type identifier from a given #GEnumClass structure.
6812  *
6813  * Returns: the #GType
6814  */
6815
6816
6817 /**
6818  * G_ENUM_CLASS_TYPE_NAME:
6819  * @class: a #GEnumClass
6820  *
6821  * Get the static type name from a given #GEnumClass structure.
6822  *
6823  * Returns: the type name.
6824  */
6825
6826
6827 /**
6828  * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE:
6829  *
6830  * A key in the "access" namespace for checking deletion privileges.
6831  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6832  * This attribute will be %TRUE if the user is able to delete the file.
6833  */
6834
6835
6836 /**
6837  * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE:
6838  *
6839  * A key in the "access" namespace for getting execution privileges.
6840  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6841  * This attribute will be %TRUE if the user is able to execute the file.
6842  */
6843
6844
6845 /**
6846  * G_FILE_ATTRIBUTE_ACCESS_CAN_READ:
6847  *
6848  * A key in the "access" namespace for getting read privileges.
6849  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6850  * This attribute will be %TRUE if the user is able to read the file.
6851  */
6852
6853
6854 /**
6855  * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME:
6856  *
6857  * A key in the "access" namespace for checking renaming privileges.
6858  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6859  * This attribute will be %TRUE if the user is able to rename the file.
6860  */
6861
6862
6863 /**
6864  * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH:
6865  *
6866  * A key in the "access" namespace for checking trashing privileges.
6867  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6868  * This attribute will be %TRUE if the user is able to move the file to
6869  * the trash.
6870  */
6871
6872
6873 /**
6874  * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE:
6875  *
6876  * A key in the "access" namespace for getting write privileges.
6877  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6878  * This attribute will be %TRUE if the user is able to write to the file.
6879  */
6880
6881
6882 /**
6883  * G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE:
6884  *
6885  * A key in the "dos" namespace for checking if the file's archive flag
6886  * is set. This attribute is %TRUE if the archive flag is set. This attribute
6887  * is only available for DOS file systems. Corresponding #GFileAttributeType
6888  * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6889  */
6890
6891
6892 /**
6893  * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM:
6894  *
6895  * A key in the "dos" namespace for checking if the file's backup flag
6896  * is set. This attribute is %TRUE if the backup flag is set. This attribute
6897  * is only available for DOS file systems. Corresponding #GFileAttributeType
6898  * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6899  */
6900
6901
6902 /**
6903  * G_FILE_ATTRIBUTE_ETAG_VALUE:
6904  *
6905  * A key in the "etag" namespace for getting the value of the file's
6906  * entity tag. Corresponding #GFileAttributeType is
6907  * %G_FILE_ATTRIBUTE_TYPE_STRING.
6908  */
6909
6910
6911 /**
6912  * G_FILE_ATTRIBUTE_FILESYSTEM_FREE:
6913  *
6914  * A key in the "filesystem" namespace for getting the number of bytes of free space left on the
6915  * file system. Corresponding #GFileAttributeType is
6916  * %G_FILE_ATTRIBUTE_TYPE_UINT64.
6917  */
6918
6919
6920 /**
6921  * G_FILE_ATTRIBUTE_FILESYSTEM_READONLY:
6922  *
6923  * A key in the "filesystem" namespace for checking if the file system
6924  * is read only. Is set to %TRUE if the file system is read only.
6925  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6926  */
6927
6928
6929 /**
6930  * G_FILE_ATTRIBUTE_FILESYSTEM_SIZE:
6931  *
6932  * A key in the "filesystem" namespace for getting the total size (in bytes) of the file system,
6933  * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType
6934  * is %G_FILE_ATTRIBUTE_TYPE_UINT64.
6935  */
6936
6937
6938 /**
6939  * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE:
6940  *
6941  * A key in the "filesystem" namespace for getting the file system's type.
6942  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
6943  */
6944
6945
6946 /**
6947  * G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW:
6948  *
6949  * A key in the "filesystem" namespace for hinting a file manager
6950  * application whether it should preview (e.g. thumbnail) files on the
6951  * file system. The value for this key contain a
6952  * #GFilesystemPreviewType.
6953  */
6954
6955
6956 /**
6957  * G_FILE_ATTRIBUTE_GVFS_BACKEND:
6958  *
6959  * A key in the "gvfs" namespace that gets the name of the current
6960  * GVFS backend in use. Corresponding #GFileAttributeType is
6961  * %G_FILE_ATTRIBUTE_TYPE_STRING.
6962  */
6963
6964
6965 /**
6966  * G_FILE_ATTRIBUTE_ID_FILE:
6967  *
6968  * A key in the "id" namespace for getting a file identifier.
6969  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
6970  * An example use would be during listing files, to avoid recursive
6971  * directory scanning.
6972  */
6973
6974
6975 /**
6976  * G_FILE_ATTRIBUTE_ID_FILESYSTEM:
6977  *
6978  * A key in the "id" namespace for getting the file system identifier.
6979  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
6980  * An example use would be during drag and drop to see if the source
6981  * and target are on the same filesystem (default to move) or not (default
6982  * to copy).
6983  */
6984
6985
6986 /**
6987  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT:
6988  *
6989  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
6990  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6991  */
6992
6993
6994 /**
6995  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT:
6996  *
6997  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
6998  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6999  */
7000
7001
7002 /**
7003  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL:
7004  *
7005  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
7006  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7007  *
7008  * Since: 2.22
7009  */
7010
7011
7012 /**
7013  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START:
7014  *
7015  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
7016  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7017  *
7018  * Since: 2.22
7019  */
7020
7021
7022 /**
7023  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED:
7024  *
7025  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started
7026  * degraded.
7027  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7028  *
7029  * Since: 2.22
7030  */
7031
7032
7033 /**
7034  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP:
7035  *
7036  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
7037  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7038  *
7039  * Since: 2.22
7040  */
7041
7042
7043 /**
7044  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT:
7045  *
7046  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)  is unmountable.
7047  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7048  */
7049
7050
7051 /**
7052  * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI:
7053  *
7054  * A key in the "mountable" namespace for getting the HAL UDI for the mountable
7055  * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7056  */
7057
7058
7059 /**
7060  * G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC:
7061  *
7062  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)
7063  * is automatically polled for media.
7064  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7065  *
7066  * Since: 2.22
7067  */
7068
7069
7070 /**
7071  * G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE:
7072  *
7073  * A key in the "mountable" namespace for getting the #GDriveStartStopType.
7074  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7075  *
7076  * Since: 2.22
7077  */
7078
7079
7080 /**
7081  * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE:
7082  *
7083  * A key in the "mountable" namespace for getting the unix device.
7084  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7085  */
7086
7087
7088 /**
7089  * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE:
7090  *
7091  * A key in the "mountable" namespace for getting the unix device file.
7092  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7093  *
7094  * Since: 2.22
7095  */
7096
7097
7098 /**
7099  * G_FILE_ATTRIBUTE_OWNER_GROUP:
7100  *
7101  * A key in the "owner" namespace for getting the file owner's group.
7102  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7103  */
7104
7105
7106 /**
7107  * G_FILE_ATTRIBUTE_OWNER_USER:
7108  *
7109  * A key in the "owner" namespace for getting the user name of the
7110  * file's owner. Corresponding #GFileAttributeType is
7111  * %G_FILE_ATTRIBUTE_TYPE_STRING.
7112  */
7113
7114
7115 /**
7116  * G_FILE_ATTRIBUTE_OWNER_USER_REAL:
7117  *
7118  * A key in the "owner" namespace for getting the real name of the
7119  * user that owns the file. Corresponding #GFileAttributeType is
7120  * %G_FILE_ATTRIBUTE_TYPE_STRING.
7121  */
7122
7123
7124 /**
7125  * G_FILE_ATTRIBUTE_PREVIEW_ICON:
7126  *
7127  * A key in the "preview" namespace for getting a #GIcon that can be
7128  * used to get preview of the file. For example, it may be a low
7129  * resolution thumbnail without metadata. Corresponding
7130  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.  The value
7131  * for this key should contain a #GIcon.
7132  *
7133  * Since: 2.20
7134  */
7135
7136
7137 /**
7138  * G_FILE_ATTRIBUTE_SELINUX_CONTEXT:
7139  *
7140  * A key in the "selinux" namespace for getting the file's SELinux
7141  * context. Corresponding #GFileAttributeType is
7142  * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only
7143  * available if GLib has been built with SELinux support.
7144  */
7145
7146
7147 /**
7148  * G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE:
7149  *
7150  * A key in the "standard" namespace for getting the amount of disk space
7151  * that is consumed by the file (in bytes).  This will generally be larger
7152  * than the file size (due to block size overhead) but can occasionally be
7153  * smaller (for example, for sparse files).
7154  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7155  *
7156  * Since: 2.20
7157  */
7158
7159
7160 /**
7161  * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE:
7162  *
7163  * A key in the "standard" namespace for getting the content type of the file.
7164  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7165  * The value for this key should contain a valid content type.
7166  */
7167
7168
7169 /**
7170  * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME:
7171  *
7172  * A key in the "standard" namespace for getting the copy name of the file.
7173  * The copy name is an optional version of the name. If available it's always
7174  * in UTF8, and corresponds directly to the original filename (only transcoded to
7175  * UTF8). This is useful if you want to copy the file to another filesystem that
7176  * might have a different encoding. If the filename is not a valid string in the
7177  * encoding selected for the filesystem it is in then the copy name will not be set.
7178  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7179  */
7180
7181
7182 /**
7183  * G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION:
7184  *
7185  * A key in the "standard" namespace for getting the description of the file.
7186  * The description is a utf8 string that describes the file, generally containing
7187  * the filename, but can also contain furter information. Example descriptions
7188  * could be "filename (on hostname)" for a remote file or "filename (in trash)"
7189  * for a file in the trash. This is useful for instance as the window title
7190  * when displaying a directory or for a bookmarks menu.
7191  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7192  */
7193
7194
7195 /**
7196  * G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME:
7197  *
7198  * A key in the "standard" namespace for getting the display name of the file.
7199  * A display name is guaranteed to be in UTF8 and can thus be displayed in
7200  * the UI.
7201  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7202  */
7203
7204
7205 /**
7206  * G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME:
7207  *
7208  * A key in the "standard" namespace for edit name of the file.
7209  * An edit name is similar to the display name, but it is meant to be
7210  * used when you want to rename the file in the UI. The display name
7211  * might contain information you don't want in the new filename (such as
7212  * "(invalid unicode)" if the filename was in an invalid encoding).
7213  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7214  */
7215
7216
7217 /**
7218  * G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE:
7219  *
7220  * A key in the "standard" namespace for getting the fast content type.
7221  * The fast content type isn't as reliable as the regular one, as it
7222  * only uses the filename to guess it, but it is faster to calculate than the
7223  * regular content type.
7224  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7225  */
7226
7227
7228 /**
7229  * G_FILE_ATTRIBUTE_STANDARD_ICON:
7230  *
7231  * A key in the "standard" namespace for getting the icon for the file.
7232  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
7233  * The value for this key should contain a #GIcon.
7234  */
7235
7236
7237 /**
7238  * G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP:
7239  *
7240  * A key in the "standard" namespace for checking if a file is a backup file.
7241  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7242  */
7243
7244
7245 /**
7246  * G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN:
7247  *
7248  * A key in the "standard" namespace for checking if a file is hidden.
7249  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7250  */
7251
7252
7253 /**
7254  * G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK:
7255  *
7256  * A key in the "standard" namespace for checking if the file is a symlink.
7257  * Typically the actual type is something else, if we followed the symlink
7258  * to get the type.
7259  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7260  */
7261
7262
7263 /**
7264  * G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL:
7265  *
7266  * A key in the "standard" namespace for checking if a file is virtual.
7267  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7268  */
7269
7270
7271 /**
7272  * G_FILE_ATTRIBUTE_STANDARD_NAME:
7273  *
7274  * A key in the "standard" namespace for getting the name of the file.
7275  * The name is the on-disk filename which may not be in any known encoding,
7276  * and can thus not be generally displayed as is.
7277  * Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
7278  * name in a user interface.
7279  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7280  */
7281
7282
7283 /**
7284  * G_FILE_ATTRIBUTE_STANDARD_SIZE:
7285  *
7286  * A key in the "standard" namespace for getting the file's size (in bytes).
7287  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7288  */
7289
7290
7291 /**
7292  * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER:
7293  *
7294  * A key in the "standard" namespace for setting the sort order of a file.
7295  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
7296  * An example use would be in file managers, which would use this key
7297  * to set the order files are displayed. Files with smaller sort order
7298  * should be sorted first, and files without sort order as if sort order
7299  * was zero.
7300  */
7301
7302
7303 /**
7304  * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET:
7305  *
7306  * A key in the "standard" namespace for getting the symlink target, if the file
7307  * is a symlink. Corresponding #GFileAttributeType is
7308  * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7309  */
7310
7311
7312 /**
7313  * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI:
7314  *
7315  * A key in the "standard" namespace for getting the target URI for the file, in
7316  * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
7317  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7318  */
7319
7320
7321 /**
7322  * G_FILE_ATTRIBUTE_STANDARD_TYPE:
7323  *
7324  * A key in the "standard" namespace for storing file types.
7325  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7326  * The value for this key should contain a #GFileType.
7327  */
7328
7329
7330 /**
7331  * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED:
7332  *
7333  * A key in the "thumbnail" namespace for checking if thumbnailing failed.
7334  * This attribute is %TRUE if thumbnailing failed. Corresponding
7335  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7336  */
7337
7338
7339 /**
7340  * G_FILE_ATTRIBUTE_THUMBNAIL_PATH:
7341  *
7342  * A key in the "thumbnail" namespace for getting the path to the thumbnail
7343  * image. Corresponding #GFileAttributeType is
7344  * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7345  */
7346
7347
7348 /**
7349  * G_FILE_ATTRIBUTE_TIME_ACCESS:
7350  *
7351  * A key in the "time" namespace for getting the time the file was last
7352  * accessed. Corresponding #GFileAttributeType is
7353  * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
7354  * file was last accessed.
7355  */
7356
7357
7358 /**
7359  * G_FILE_ATTRIBUTE_TIME_ACCESS_USEC:
7360  *
7361  * A key in the "time" namespace for getting the microseconds of the time
7362  * the file was last accessed. This should be used in conjunction with
7363  * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is
7364  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7365  */
7366
7367
7368 /**
7369  * G_FILE_ATTRIBUTE_TIME_CHANGED:
7370  *
7371  * A key in the "time" namespace for getting the time the file was last
7372  * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
7373  * and contains the UNIX time since the file was last changed.
7374  * This corresponds to the traditional UNIX ctime.
7375  */
7376
7377
7378 /**
7379  * G_FILE_ATTRIBUTE_TIME_CHANGED_USEC:
7380  *
7381  * A key in the "time" namespace for getting the microseconds of the time
7382  * the file was last changed. This should be used in conjunction with
7383  * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is
7384  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7385  */
7386
7387
7388 /**
7389  * G_FILE_ATTRIBUTE_TIME_CREATED:
7390  *
7391  * A key in the "time" namespace for getting the time the file was created.
7392  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
7393  * and contains the UNIX time since the file was created.
7394  * This corresponds to the NTFS ctime.
7395  */
7396
7397
7398 /**
7399  * G_FILE_ATTRIBUTE_TIME_CREATED_USEC:
7400  *
7401  * A key in the "time" namespace for getting the microseconds of the time
7402  * the file was created. This should be used in conjunction with
7403  * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is
7404  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7405  */
7406
7407
7408 /**
7409  * G_FILE_ATTRIBUTE_TIME_MODIFIED:
7410  *
7411  * A key in the "time" namespace for getting the time the file was last
7412  * modified. Corresponding #GFileAttributeType is
7413  * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
7414  * file was modified.
7415  */
7416
7417
7418 /**
7419  * G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC:
7420  *
7421  * A key in the "time" namespace for getting the miliseconds of the time
7422  * the file was last modified. This should be used in conjunction with
7423  * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is
7424  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7425  */
7426
7427
7428 /**
7429  * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE:
7430  *
7431  * A key in the "trash" namespace.  When requested against
7432  * items in "trash:///", will return the date and time when the file
7433  * was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss.
7434  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7435  *
7436  * Since: 2.24.
7437  */
7438
7439
7440 /**
7441  * G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT:
7442  *
7443  * A key in the "trash" namespace.  When requested against
7444  * "trash:///" returns the number of (toplevel) items in the trash folder.
7445  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7446  */
7447
7448
7449 /**
7450  * G_FILE_ATTRIBUTE_TRASH_ORIG_PATH:
7451  *
7452  * A key in the "trash" namespace.  When requested against
7453  * items in "trash:///", will return the original path to the file before it
7454  * was trashed. Corresponding #GFileAttributeType is
7455  * %G_FILE_ATTRIBUTE_TYPE_STRING.
7456  *
7457  * Since: 2.24.
7458  */
7459
7460
7461 /**
7462  * G_FILE_ATTRIBUTE_UNIX_BLOCKS:
7463  *
7464  * A key in the "unix" namespace for getting the number of blocks allocated
7465  * for the file. This attribute is only available for UNIX file systems.
7466  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7467  */
7468
7469
7470 /**
7471  * G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE:
7472  *
7473  * A key in the "unix" namespace for getting the block size for the file
7474  * system. This attribute is only available for UNIX file systems.
7475  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7476  */
7477
7478
7479 /**
7480  * G_FILE_ATTRIBUTE_UNIX_DEVICE:
7481  *
7482  * A key in the "unix" namespace for getting the device id of the device the
7483  * file is located on (see stat() documentation). This attribute is only
7484  * available for UNIX file systems. Corresponding #GFileAttributeType is
7485  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7486  */
7487
7488
7489 /**
7490  * G_FILE_ATTRIBUTE_UNIX_GID:
7491  *
7492  * A key in the "unix" namespace for getting the group ID for the file.
7493  * This attribute is only available for UNIX file systems.
7494  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7495  */
7496
7497
7498 /**
7499  * G_FILE_ATTRIBUTE_UNIX_INODE:
7500  *
7501  * A key in the "unix" namespace for getting the inode of the file.
7502  * This attribute is only available for UNIX file systems. Corresponding
7503  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7504  */
7505
7506
7507 /**
7508  * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT:
7509  *
7510  * A key in the "unix" namespace for checking if the file represents a
7511  * UNIX mount point. This attribute is %TRUE if the file is a UNIX mount
7512  * point. This attribute is only available for UNIX file systems.
7513  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7514  */
7515
7516
7517 /**
7518  * G_FILE_ATTRIBUTE_UNIX_MODE:
7519  *
7520  * A key in the "unix" namespace for getting the mode of the file
7521  * (e.g. whether the file is a regular file, symlink, etc). See lstat()
7522  * documentation. This attribute is only available for UNIX file systems.
7523  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7524  */
7525
7526
7527 /**
7528  * G_FILE_ATTRIBUTE_UNIX_NLINK:
7529  *
7530  * A key in the "unix" namespace for getting the number of hard links
7531  * for a file. See lstat() documentation. This attribute is only available
7532  * for UNIX file systems. Corresponding #GFileAttributeType is
7533  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7534  */
7535
7536
7537 /**
7538  * G_FILE_ATTRIBUTE_UNIX_RDEV:
7539  *
7540  * A key in the "unix" namespace for getting the device ID for the file
7541  * (if it is a special file). See lstat() documentation. This attribute
7542  * is only available for UNIX file systems. Corresponding #GFileAttributeType
7543  * is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7544  */
7545
7546
7547 /**
7548  * G_FILE_ATTRIBUTE_UNIX_UID:
7549  *
7550  * A key in the "unix" namespace for getting the user ID for the file.
7551  * This attribute is only available for UNIX file systems.
7552  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7553  */
7554
7555
7556 /**
7557  * G_FLAGS_CLASS:
7558  * @class: a valid #GFlagsClass
7559  *
7560  * Casts a derived #GFlagsClass structure into a #GFlagsClass structure.
7561  */
7562
7563
7564 /**
7565  * G_FLAGS_CLASS_TYPE:
7566  * @class: a #GFlagsClass
7567  *
7568  * Get the type identifier from a given #GFlagsClass structure.
7569  *
7570  * Returns: the #GType
7571  */
7572
7573
7574 /**
7575  * G_FLAGS_CLASS_TYPE_NAME:
7576  * @class: a #GFlagsClass
7577  *
7578  * Get the static type name from a given #GFlagsClass structure.
7579  *
7580  * Returns: the type name.
7581  */
7582
7583
7584 /**
7585  * G_IMPLEMENT_INTERFACE:
7586  * @TYPE_IFACE: The #GType of the interface to add
7587  * @iface_init: The interface init function
7588  *
7589  * A convenience macro to ease interface addition in the @_C_ section
7590  * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE().
7591  * See G_DEFINE_TYPE_EXTENDED() for an example.
7592  * Note that this macro can only be used together with the G_DEFINE_TYPE_*
7593  * macros, since it depends on variable names from those macros.
7594  *
7595  * Since: 2.4
7596  */
7597
7598
7599 /**
7600  * G_IMPLEMENT_INTERFACE_DYNAMIC:
7601  * @TYPE_IFACE: The #GType of the interface to add
7602  * @iface_init: The interface init function
7603  *
7604  * A convenience macro to ease interface addition in the @_C_ section
7605  * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED()
7606  * for an example.
7607  * Note that this macro can only be used together with the
7608  * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable
7609  * names from that macro.
7610  *
7611  * Since: 2.24
7612  */
7613
7614
7615 /**
7616  * G_INITIALLY_UNOWNED:
7617  * @object: Object which is subject to casting.
7618  *
7619  * Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*)
7620  * pointer. Depending on the current debugging level, this function may invoke
7621  * certain runtime checks to identify invalid casts.
7622  */
7623
7624
7625 /**
7626  * G_INITIALLY_UNOWNED_CLASS:
7627  * @class: a valid #GInitiallyUnownedClass
7628  *
7629  * Casts a derived #GInitiallyUnownedClass structure into a
7630  * #GInitiallyUnownedClass structure.
7631  */
7632
7633
7634 /**
7635  * G_INITIALLY_UNOWNED_GET_CLASS:
7636  * @object: a #GInitiallyUnowned instance.
7637  *
7638  * Get the class structure associated to a #GInitiallyUnowned instance.
7639  *
7640  * Returns: pointer to object class structure.
7641  */
7642
7643
7644 /**
7645  * G_IO_ERROR:
7646  *
7647  * Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration.
7648  * See #GError for more information on error domains.
7649  */
7650
7651
7652 /**
7653  * G_IS_ENUM_CLASS:
7654  * @class: a #GEnumClass
7655  *
7656  * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM
7657  * or derived.
7658  */
7659
7660
7661 /**
7662  * G_IS_FLAGS_CLASS:
7663  * @class: a #GFlagsClass
7664  *
7665  * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS
7666  * or derived.
7667  */
7668
7669
7670 /**
7671  * G_IS_INITIALLY_UNOWNED:
7672  * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED.
7673  *
7674  * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED.
7675  */
7676
7677
7678 /**
7679  * G_IS_INITIALLY_UNOWNED_CLASS:
7680  * @class: a #GInitiallyUnownedClass
7681  *
7682  * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type
7683  * %G_TYPE_INITIALLY_UNOWNED or derived.
7684  */
7685
7686
7687 /**
7688  * G_IS_OBJECT:
7689  * @object: Instance to check for being a %G_TYPE_OBJECT.
7690  *
7691  * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT.
7692  */
7693
7694
7695 /**
7696  * G_IS_OBJECT_CLASS:
7697  * @class: a #GObjectClass
7698  *
7699  * Checks whether @class "is a" valid #GObjectClass structure of type
7700  * %G_TYPE_OBJECT or derived.
7701  */
7702
7703
7704 /**
7705  * G_IS_PARAM_SPEC:
7706  * @pspec: a #GParamSpec
7707  *
7708  * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM
7709  * or derived.
7710  */
7711
7712
7713 /**
7714  * G_IS_PARAM_SPEC_BOOLEAN:
7715  * @pspec: a valid #GParamSpec instance
7716  *
7717  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
7718  *
7719  * Returns: %TRUE on success.
7720  */
7721
7722
7723 /**
7724  * G_IS_PARAM_SPEC_BOXED:
7725  * @pspec: a valid #GParamSpec instance
7726  *
7727  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
7728  *
7729  * Returns: %TRUE on success.
7730  */
7731
7732
7733 /**
7734  * G_IS_PARAM_SPEC_CHAR:
7735  * @pspec: a valid #GParamSpec instance
7736  *
7737  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
7738  *
7739  * Returns: %TRUE on success.
7740  */
7741
7742
7743 /**
7744  * G_IS_PARAM_SPEC_CLASS:
7745  * @pclass: a #GParamSpecClass
7746  *
7747  * Checks whether @pclass "is a" valid #GParamSpecClass structure of type
7748  * %G_TYPE_PARAM or derived.
7749  */
7750
7751
7752 /**
7753  * G_IS_PARAM_SPEC_DOUBLE:
7754  * @pspec: a valid #GParamSpec instance
7755  *
7756  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
7757  *
7758  * Returns: %TRUE on success.
7759  */
7760
7761
7762 /**
7763  * G_IS_PARAM_SPEC_ENUM:
7764  * @pspec: a valid #GParamSpec instance
7765  *
7766  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
7767  *
7768  * Returns: %TRUE on success.
7769  */
7770
7771
7772 /**
7773  * G_IS_PARAM_SPEC_FLAGS:
7774  * @pspec: a valid #GParamSpec instance
7775  *
7776  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
7777  *
7778  * Returns: %TRUE on success.
7779  */
7780
7781
7782 /**
7783  * G_IS_PARAM_SPEC_FLOAT:
7784  * @pspec: a valid #GParamSpec instance
7785  *
7786  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
7787  *
7788  * Returns: %TRUE on success.
7789  */
7790
7791
7792 /**
7793  * G_IS_PARAM_SPEC_GTYPE:
7794  * @pspec: a #GParamSpec
7795  *
7796  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
7797  *
7798  * Since: 2.10
7799  * Returns: %TRUE on success.
7800  */
7801
7802
7803 /**
7804  * G_IS_PARAM_SPEC_INT:
7805  * @pspec: a valid #GParamSpec instance
7806  *
7807  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
7808  *
7809  * Returns: %TRUE on success.
7810  */
7811
7812
7813 /**
7814  * G_IS_PARAM_SPEC_INT64:
7815  * @pspec: a valid #GParamSpec instance
7816  *
7817  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
7818  *
7819  * Returns: %TRUE on success.
7820  */
7821
7822
7823 /**
7824  * G_IS_PARAM_SPEC_LONG:
7825  * @pspec: a valid #GParamSpec instance
7826  *
7827  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
7828  *
7829  * Returns: %TRUE on success.
7830  */
7831
7832
7833 /**
7834  * G_IS_PARAM_SPEC_OBJECT:
7835  * @pspec: a valid #GParamSpec instance
7836  *
7837  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
7838  *
7839  * Returns: %TRUE on success.
7840  */
7841
7842
7843 /**
7844  * G_IS_PARAM_SPEC_OVERRIDE:
7845  * @pspec: a #GParamSpec
7846  *
7847  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
7848  *
7849  * Since: 2.4
7850  * Returns: %TRUE on success.
7851  */
7852
7853
7854 /**
7855  * G_IS_PARAM_SPEC_PARAM:
7856  * @pspec: a valid #GParamSpec instance
7857  *
7858  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
7859  *
7860  * Returns: %TRUE on success.
7861  */
7862
7863
7864 /**
7865  * G_IS_PARAM_SPEC_POINTER:
7866  * @pspec: a valid #GParamSpec instance
7867  *
7868  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
7869  *
7870  * Returns: %TRUE on success.
7871  */
7872
7873
7874 /**
7875  * G_IS_PARAM_SPEC_STRING:
7876  * @pspec: a valid #GParamSpec instance
7877  *
7878  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
7879  *
7880  * Returns: %TRUE on success.
7881  */
7882
7883
7884 /**
7885  * G_IS_PARAM_SPEC_UCHAR:
7886  * @pspec: a valid #GParamSpec instance
7887  *
7888  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
7889  *
7890  * Returns: %TRUE on success.
7891  */
7892
7893
7894 /**
7895  * G_IS_PARAM_SPEC_UINT:
7896  * @pspec: a valid #GParamSpec instance
7897  *
7898  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
7899  *
7900  * Returns: %TRUE on success.
7901  */
7902
7903
7904 /**
7905  * G_IS_PARAM_SPEC_UINT64:
7906  * @pspec: a valid #GParamSpec instance
7907  *
7908  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
7909  *
7910  * Returns: %TRUE on success.
7911  */
7912
7913
7914 /**
7915  * G_IS_PARAM_SPEC_ULONG:
7916  * @pspec: a valid #GParamSpec instance
7917  *
7918  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
7919  *
7920  * Returns: %TRUE on success.
7921  */
7922
7923
7924 /**
7925  * G_IS_PARAM_SPEC_UNICHAR:
7926  * @pspec: a valid #GParamSpec instance
7927  *
7928  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
7929  *
7930  * Returns: %TRUE on success.
7931  */
7932
7933
7934 /**
7935  * G_IS_PARAM_SPEC_VALUE_ARRAY:
7936  * @pspec: a valid #GParamSpec instance
7937  *
7938  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
7939  *
7940  * Returns: %TRUE on success.
7941  */
7942
7943
7944 /**
7945  * G_IS_PARAM_SPEC_VARIANT:
7946  * @pspec: a #GParamSpec
7947  *
7948  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
7949  *
7950  * Returns: %TRUE on success
7951  * Since: 2.26
7952  */
7953
7954
7955 /**
7956  * G_IS_VALUE:
7957  * @value: A #GValue structure.
7958  *
7959  * Checks if @value is a valid and initialized #GValue structure.
7960  *
7961  * Returns: %TRUE on success.
7962  */
7963
7964
7965 /**
7966  * G_MARKUP_ERROR:
7967  *
7968  * Error domain for markup parsing.
7969  * Errors in this domain will be from the #GMarkupError enumeration.
7970  * See #GError for information on error domains.
7971  */
7972
7973
7974 /**
7975  * G_NODE_IS_LEAF:
7976  * @node: a #GNode
7977  *
7978  * Returns %TRUE if a #GNode is a leaf node.
7979  * (i.e. it has no children)
7980  *
7981  * Returns: %TRUE if the #GNode is a leaf node
7982  */
7983
7984
7985 /**
7986  * G_NODE_IS_ROOT:
7987  * @node: a #GNode
7988  *
7989  * Returns %TRUE if a #GNode is the root of a tree.
7990  * (i.e. it has no parent or siblings)
7991  *
7992  * Returns: %TRUE if the #GNode is the root of a tree
7993  */
7994
7995
7996 /**
7997  * G_OBJECT:
7998  * @object: Object which is subject to casting.
7999  *
8000  * Casts a #GObject or derived pointer into a (GObject*) pointer.
8001  * Depending on the current debugging level, this function may invoke
8002  * certain runtime checks to identify invalid casts.
8003  */
8004
8005
8006 /**
8007  * G_OBJECT_CLASS:
8008  * @class: a valid #GObjectClass
8009  *
8010  * Casts a derived #GObjectClass structure into a #GObjectClass structure.
8011  */
8012
8013
8014 /**
8015  * G_OBJECT_CLASS_NAME:
8016  * @class: a valid #GObjectClass
8017  *
8018  * Return the name of a class structure's type.
8019  * should not be freed.
8020  *
8021  * Returns: Type name of @class. The string is owned by the type system and
8022  */
8023
8024
8025 /**
8026  * G_OBJECT_CLASS_TYPE:
8027  * @class: a valid #GObjectClass
8028  *
8029  * Get the type id of a class structure.
8030  *
8031  * Returns: Type id of @class.
8032  */
8033
8034
8035 /**
8036  * G_OBJECT_GET_CLASS:
8037  * @object: a #GObject instance.
8038  *
8039  * Get the class structure associated to a #GObject instance.
8040  *
8041  * Returns: pointer to object class structure.
8042  */
8043
8044
8045 /**
8046  * G_OBJECT_TYPE:
8047  * @object: Object to return the type id for.
8048  *
8049  * Get the type id of an object.
8050  *
8051  * Returns: Type id of @object.
8052  */
8053
8054
8055 /**
8056  * G_OBJECT_TYPE_NAME:
8057  * @object: Object to return the type name for.
8058  *
8059  * Get the name of an object's type.
8060  * should not be freed.
8061  *
8062  * Returns: Type name of @object. The string is owned by the type system and
8063  */
8064
8065
8066 /**
8067  * G_OBJECT_WARN_INVALID_PROPERTY_ID:
8068  * @object: the #GObject on which set_property() or get_property() was called
8069  * @property_id: the numeric id of the property
8070  * @pspec: the #GParamSpec of the property
8071  *
8072  * This macro should be used to emit a standard warning about unexpected
8073  * properties in set_property() and get_property() implementations.
8074  */
8075
8076
8077 /**
8078  * G_OPTION_ERROR:
8079  *
8080  * Error domain for option parsing. Errors in this domain will
8081  * be from the #GOptionError enumeration. See #GError for information on
8082  * error domains.
8083  */
8084
8085
8086 /**
8087  * G_OPTION_REMAINING:
8088  *
8089  * If a long option in the main group has this name, it is not treated as a
8090  * regular option. Instead it collects all non-option arguments which would
8091  * otherwise be left in <literal>argv</literal>. The option must be of type
8092  * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY
8093  * or %G_OPTION_ARG_FILENAME_ARRAY.
8094  * Using #G_OPTION_REMAINING instead of simply scanning <literal>argv</literal>
8095  * for leftover arguments has the advantage that GOption takes care of
8096  * necessary encoding conversions for strings or filenames.
8097  *
8098  * Since: 2.6
8099  */
8100
8101
8102 /**
8103  * G_PARAM_MASK:
8104  *
8105  * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
8106  */
8107
8108
8109 /**
8110  * G_PARAM_READWRITE:
8111  *
8112  * #GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.
8113  */
8114
8115
8116 /**
8117  * G_PARAM_SPEC:
8118  * @pspec: a valid #GParamSpec
8119  *
8120  * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into
8121  * a #GParamSpec object.
8122  */
8123
8124
8125 /**
8126  * G_PARAM_SPEC_BOOLEAN:
8127  * @pspec: a valid #GParamSpec instance
8128  *
8129  * Cast a #GParamSpec instance into a #GParamSpecBoolean.
8130  */
8131
8132
8133 /**
8134  * G_PARAM_SPEC_BOXED:
8135  * @pspec: a valid #GParamSpec instance
8136  *
8137  * Cast a #GParamSpec instance into a #GParamSpecBoxed.
8138  */
8139
8140
8141 /**
8142  * G_PARAM_SPEC_CHAR:
8143  * @pspec: a valid #GParamSpec instance
8144  *
8145  * Cast a #GParamSpec instance into a #GParamSpecChar.
8146  */
8147
8148
8149 /**
8150  * G_PARAM_SPEC_CLASS:
8151  * @pclass: a valid #GParamSpecClass
8152  *
8153  * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure.
8154  */
8155
8156
8157 /**
8158  * G_PARAM_SPEC_DOUBLE:
8159  * @pspec: a valid #GParamSpec instance
8160  *
8161  * Cast a #GParamSpec instance into a #GParamSpecDouble.
8162  */
8163
8164
8165 /**
8166  * G_PARAM_SPEC_ENUM:
8167  * @pspec: a valid #GParamSpec instance
8168  *
8169  * Cast a #GParamSpec instance into a #GParamSpecEnum.
8170  */
8171
8172
8173 /**
8174  * G_PARAM_SPEC_FLAGS:
8175  * @pspec: a valid #GParamSpec instance
8176  *
8177  * Cast a #GParamSpec instance into a #GParamSpecFlags.
8178  */
8179
8180
8181 /**
8182  * G_PARAM_SPEC_FLOAT:
8183  * @pspec: a valid #GParamSpec instance
8184  *
8185  * Cast a #GParamSpec instance into a #GParamSpecFloat.
8186  */
8187
8188
8189 /**
8190  * G_PARAM_SPEC_GET_CLASS:
8191  * @pspec: a valid #GParamSpec
8192  *
8193  * Retrieves the #GParamSpecClass of a #GParamSpec.
8194  */
8195
8196
8197 /**
8198  * G_PARAM_SPEC_GTYPE:
8199  * @pspec: a #GParamSpec
8200  *
8201  * Casts a #GParamSpec into a #GParamSpecGType.
8202  *
8203  * Since: 2.10
8204  */
8205
8206
8207 /**
8208  * G_PARAM_SPEC_INT:
8209  * @pspec: a valid #GParamSpec instance
8210  *
8211  * Cast a #GParamSpec instance into a #GParamSpecInt.
8212  */
8213
8214
8215 /**
8216  * G_PARAM_SPEC_INT64:
8217  * @pspec: a valid #GParamSpec instance
8218  *
8219  * Cast a #GParamSpec instance into a #GParamSpecInt64.
8220  */
8221
8222
8223 /**
8224  * G_PARAM_SPEC_LONG:
8225  * @pspec: a valid #GParamSpec instance
8226  *
8227  * Cast a #GParamSpec instance into a #GParamSpecLong.
8228  */
8229
8230
8231 /**
8232  * G_PARAM_SPEC_OBJECT:
8233  * @pspec: a valid #GParamSpec instance
8234  *
8235  * Casts a #GParamSpec instance into a #GParamSpecObject.
8236  */
8237
8238
8239 /**
8240  * G_PARAM_SPEC_OVERRIDE:
8241  * @pspec: a #GParamSpec
8242  *
8243  * Casts a #GParamSpec into a #GParamSpecOverride.
8244  *
8245  * Since: 2.4
8246  */
8247
8248
8249 /**
8250  * G_PARAM_SPEC_PARAM:
8251  * @pspec: a valid #GParamSpec instance
8252  *
8253  * Casts a #GParamSpec instance into a #GParamSpecParam.
8254  */
8255
8256
8257 /**
8258  * G_PARAM_SPEC_POINTER:
8259  * @pspec: a valid #GParamSpec instance
8260  *
8261  * Casts a #GParamSpec instance into a #GParamSpecPointer.
8262  */
8263
8264
8265 /**
8266  * G_PARAM_SPEC_STRING:
8267  * @pspec: a valid #GParamSpec instance
8268  *
8269  * Casts a #GParamSpec instance into a #GParamSpecString.
8270  */
8271
8272
8273 /**
8274  * G_PARAM_SPEC_TYPE:
8275  * @pspec: a valid #GParamSpec
8276  *
8277  * Retrieves the #GType of this @pspec.
8278  */
8279
8280
8281 /**
8282  * G_PARAM_SPEC_TYPE_NAME:
8283  * @pspec: a valid #GParamSpec
8284  *
8285  * Retrieves the #GType name of this @pspec.
8286  */
8287
8288
8289 /**
8290  * G_PARAM_SPEC_UCHAR:
8291  * @pspec: a valid #GParamSpec instance
8292  *
8293  * Cast a #GParamSpec instance into a #GParamSpecUChar.
8294  */
8295
8296
8297 /**
8298  * G_PARAM_SPEC_UINT:
8299  * @pspec: a valid #GParamSpec instance
8300  *
8301  * Cast a #GParamSpec instance into a #GParamSpecUInt.
8302  */
8303
8304
8305 /**
8306  * G_PARAM_SPEC_UINT64:
8307  * @pspec: a valid #GParamSpec instance
8308  *
8309  * Cast a #GParamSpec instance into a #GParamSpecUInt64.
8310  */
8311
8312
8313 /**
8314  * G_PARAM_SPEC_ULONG:
8315  * @pspec: a valid #GParamSpec instance
8316  *
8317  * Cast a #GParamSpec instance into a #GParamSpecULong.
8318  */
8319
8320
8321 /**
8322  * G_PARAM_SPEC_UNICHAR:
8323  * @pspec: a valid #GParamSpec instance
8324  *
8325  * Cast a #GParamSpec instance into a #GParamSpecUnichar.
8326  */
8327
8328
8329 /**
8330  * G_PARAM_SPEC_VALUE_ARRAY:
8331  * @pspec: a valid #GParamSpec instance
8332  *
8333  * Cast a #GParamSpec instance into a #GParamSpecValueArray.
8334  */
8335
8336
8337 /**
8338  * G_PARAM_SPEC_VALUE_TYPE:
8339  * @pspec: a valid #GParamSpec
8340  *
8341  * Retrieves the #GType to initialize a #GValue for this parameter.
8342  */
8343
8344
8345 /**
8346  * G_PARAM_SPEC_VARIANT:
8347  * @pspec: a #GParamSpec
8348  *
8349  * Casts a #GParamSpec into a #GParamSpecVariant.
8350  *
8351  * Since: 2.26
8352  */
8353
8354
8355 /**
8356  * G_PARAM_STATIC_STRINGS:
8357  *
8358  * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
8359  * Since 2.13.0
8360  */
8361
8362
8363 /**
8364  * G_PARAM_USER_SHIFT:
8365  *
8366  * Minimum shift count to be used for user defined flags, to be stored in
8367  * #GParamSpec.flags. The maximum allowed is 30 + G_PARAM_USER_SHIFT.
8368  */
8369
8370
8371 /**
8372  * G_PRIORITY_DEFAULT:
8373  *
8374  * Use this for default priority event sources.
8375  * In GLib this priority is used when adding timeout functions
8376  * with g_timeout_add(). In GDK this priority is used for events
8377  * from the X server.
8378  */
8379
8380
8381 /**
8382  * G_PRIORITY_DEFAULT_IDLE:
8383  *
8384  * Use this for default priority idle functions.
8385  * In GLib this priority is used when adding idle functions with
8386  * g_idle_add().
8387  */
8388
8389
8390 /**
8391  * G_PRIORITY_HIGH:
8392  *
8393  * Use this for high priority event sources.
8394  * It is not used within GLib or GTK+.
8395  */
8396
8397
8398 /**
8399  * G_PRIORITY_HIGH_IDLE:
8400  *
8401  * Use this for high priority idle functions.
8402  * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations,
8403  * and #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is
8404  * done to ensure that any pending resizes are processed before any
8405  * pending redraws, so that widgets are not redrawn twice unnecessarily.)
8406  */
8407
8408
8409 /**
8410  * G_PRIORITY_LOW:
8411  *
8412  * Use this for very low priority background tasks.
8413  * It is not used within GLib or GTK+.
8414  */
8415
8416
8417 /**
8418  * G_PROXY_EXTENSION_POINT_NAME:
8419  *
8420  * Extension point for proxy functionality.
8421  * See <link linkend="extending-gio">Extending GIO</link>.
8422  *
8423  * Since: 2.26
8424  */
8425
8426
8427 /**
8428  * G_PROXY_RESOLVER_EXTENSION_POINT_NAME:
8429  *
8430  * Extension point for proxy resolving functionality.
8431  * See <link linkend="extending-gio">Extending GIO</link>.
8432  */
8433
8434
8435 /**
8436  * G_REGEX_ERROR:
8437  *
8438  * Error domain for regular expressions. Errors in this domain will be
8439  * from the #GRegexError enumeration. See #GError for information on
8440  * error domains.
8441  *
8442  * Since: 2.14
8443  */
8444
8445
8446 /**
8447  * G_RESOLVER_ERROR:
8448  *
8449  * Error domain for #GResolver. Errors in this domain will be from the
8450  * #GResolverError enumeration. See #GError for more information on
8451  * error domains.
8452  */
8453
8454
8455 /**
8456  * G_SETTINGS_BACKEND_EXTENSION_POINT_NAME:
8457  *
8458  * Extension point for #GSettingsBackend functionality.
8459  */
8460
8461
8462 /**
8463  * G_SIGNAL_FLAGS_MASK:
8464  *
8465  * A mask for all #GSignalFlags bits.
8466  */
8467
8468
8469 /**
8470  * G_SIGNAL_MATCH_MASK:
8471  *
8472  * A mask for all #GSignalMatchType bits.
8473  */
8474
8475
8476 /**
8477  * G_SIGNAL_TYPE_STATIC_SCOPE:
8478  *
8479  * This macro flags signal argument types for which the signal system may
8480  * assume that instances thereof remain persistent across all signal emissions
8481  * they are used in. This is only useful for non ref-counted, value-copy types.
8482  * To flag a signal argument in this way, add
8483  * <literal>| G_SIGNAL_TYPE_STATIC_SCOPE</literal> to the corresponding argument
8484  * of g_signal_new().
8485  * |[
8486  * g_signal_new ("size_request",
8487  * G_TYPE_FROM_CLASS (gobject_class),
8488  * G_SIGNAL_RUN_FIRST,
8489  * G_STRUCT_OFFSET (GtkWidgetClass, size_request),
8490  * NULL, NULL,
8491  * _gtk_marshal_VOID__BOXED,
8492  * G_TYPE_NONE, 1,
8493  * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
8494  * ]|
8495  */
8496
8497
8498 /**
8499  * G_TIME_SPAN_DAY:
8500  *
8501  * Evaluates to a time span of one day.
8502  *
8503  * Since: 2.26
8504  */
8505
8506
8507 /**
8508  * G_TIME_SPAN_HOUR:
8509  *
8510  * Evaluates to a time span of one hour.
8511  *
8512  * Since: 2.26
8513  */
8514
8515
8516 /**
8517  * G_TIME_SPAN_MILLISECOND:
8518  *
8519  * Evaluates to a time span of one millisecond.
8520  *
8521  * Since: 2.26
8522  */
8523
8524
8525 /**
8526  * G_TIME_SPAN_MINUTE:
8527  *
8528  * Evaluates to a time span of one minute.
8529  *
8530  * Since: 2.26
8531  */
8532
8533
8534 /**
8535  * G_TIME_SPAN_SECOND:
8536  *
8537  * Evaluates to a time span of one second.
8538  *
8539  * Since: 2.26
8540  */
8541
8542
8543 /**
8544  * G_TLS_BACKEND_EXTENSION_POINT_NAME:
8545  *
8546  * Extension point for TLS functionality via #GTlsBackend.
8547  * See <link linkend="extending-gio">Extending GIO</link>.
8548  */
8549
8550
8551 /**
8552  * G_TLS_ERROR:
8553  *
8554  * Error domain for TLS. Errors in this domain will be from the
8555  * #GTlsError enumeration. See #GError for more information on error
8556  * domains.
8557  */
8558
8559
8560 /**
8561  * G_TYPE_ARRAY:
8562  *
8563  * The #GType for a boxed type holding a #GArray reference.
8564  *
8565  * Since: 2.22
8566  */
8567
8568
8569 /**
8570  * G_TYPE_BOOLEAN:
8571  *
8572  * The fundamental type corresponding to #gboolean.
8573  */
8574
8575
8576 /**
8577  * G_TYPE_BOXED:
8578  *
8579  * The fundamental type from which all boxed types are derived.
8580  */
8581
8582
8583 /**
8584  * G_TYPE_BYTE_ARRAY:
8585  *
8586  * The #GType for a boxed type holding a #GByteArray reference.
8587  *
8588  * Since: 2.22
8589  */
8590
8591
8592 /**
8593  * G_TYPE_CHAR:
8594  *
8595  * The fundamental type corresponding to #gchar.
8596  * The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
8597  * This may or may not be the same type a the C type "gchar".
8598  */
8599
8600
8601 /**
8602  * G_TYPE_CHECK_CLASS_CAST:
8603  * @g_class: Location of a #GTypeClass structure.
8604  * @g_type: The type to be returned.
8605  * @c_type: The corresponding C type of class structure of @g_type.
8606  *
8607  * Checks that @g_class is a class structure of the type identified by @g_type
8608  * and issues a warning if this is not the case. Returns @g_class casted
8609  * to a pointer to @c_type.
8610  * This macro should only be used in type implementations.
8611  */
8612
8613
8614 /**
8615  * G_TYPE_CHECK_CLASS_TYPE:
8616  * @g_class: Location of a #GTypeClass structure.
8617  * @g_type: The type to be checked.
8618  *
8619  * Checks if @g_class is a class structure of the type identified by
8620  * This macro should only be used in type implementations.
8621  *
8622  * Returns: %TRUE on success.
8623  */
8624
8625
8626 /**
8627  * G_TYPE_CHECK_INSTANCE:
8628  * @instance: Location of a #GTypeInstance structure.
8629  *
8630  * Checks if @instance is a valid #GTypeInstance structure,
8631  * otherwise issues a warning and returns %FALSE.
8632  * This macro should only be used in type implementations.
8633  *
8634  * Returns: %TRUE on success.
8635  */
8636
8637
8638 /**
8639  * G_TYPE_CHECK_INSTANCE_CAST:
8640  * @instance: Location of a #GTypeInstance structure.
8641  * @g_type: The type to be returned.
8642  * @c_type: The corresponding C type of @g_type.
8643  *
8644  * Checks that @instance is an instance of the type identified by @g_type
8645  * and issues a warning if this is not the case. Returns @instance casted
8646  * to a pointer to @c_type.
8647  * This macro should only be used in type implementations.
8648  */
8649
8650
8651 /**
8652  * G_TYPE_CHECK_INSTANCE_TYPE:
8653  * @instance: Location of a #GTypeInstance structure.
8654  * @g_type: The type to be checked
8655  *
8656  * Checks if @instance is an instance of the type identified by @g_type.
8657  * This macro should only be used in type implementations.
8658  *
8659  * Returns: %TRUE on success.
8660  */
8661
8662
8663 /**
8664  * G_TYPE_CHECK_VALUE:
8665  * @value: a #GValue
8666  *
8667  * Checks if @value has been initialized to hold values
8668  * of a value type.
8669  * This macro should only be used in type implementations.
8670  *
8671  * Returns: %TRUE on success.
8672  */
8673
8674
8675 /**
8676  * G_TYPE_CHECK_VALUE_TYPE:
8677  * @value: a #GValue
8678  * @g_type: The type to be checked.
8679  *
8680  * Checks if @value has been initialized to hold values
8681  * of type @g_type.
8682  * This macro should only be used in type implementations.
8683  *
8684  * Returns: %TRUE on success.
8685  */
8686
8687
8688 /**
8689  * G_TYPE_CLASS_GET_PRIVATE:
8690  * @klass: the class of a type deriving from @private_type.
8691  * @g_type: the type identifying which private data to retrieve.
8692  * @c_type: The C type for the private structure.
8693  *
8694  * Gets the private class structure for a particular type.
8695  * The private structure must have been registered in the
8696  * get_type() function with g_type_add_class_private().
8697  * This macro should only be used in type implementations.
8698  *
8699  * Since: 2.24
8700  * Returns: a pointer to the private data structure.
8701  */
8702
8703
8704 /**
8705  * G_TYPE_CLOSURE:
8706  *
8707  * The #GType for #GClosure.
8708  */
8709
8710
8711 /**
8712  * G_TYPE_DATE:
8713  *
8714  * The #GType for #GDate.
8715  */
8716
8717
8718 /**
8719  * G_TYPE_DATE_TIME:
8720  *
8721  * The #GType for a boxed type holding a #GDateTime.
8722  *
8723  * Since: 2.26
8724  */
8725
8726
8727 /**
8728  * G_TYPE_DBUS_ANNOTATION_INFO:
8729  *
8730  * The #GType for a boxed type holding a #GDBusAnnotationInfo.
8731  *
8732  * Since: 2.26
8733  */
8734
8735
8736 /**
8737  * G_TYPE_DBUS_ARG_INFO:
8738  *
8739  * The #GType for a boxed type holding a #GDBusArgInfo.
8740  *
8741  * Since: 2.26
8742  */
8743
8744
8745 /**
8746  * G_TYPE_DBUS_INTERFACE_INFO:
8747  *
8748  * The #GType for a boxed type holding a #GDBusInterfaceInfo.
8749  *
8750  * Since: 2.26
8751  */
8752
8753
8754 /**
8755  * G_TYPE_DBUS_METHOD_INFO:
8756  *
8757  * The #GType for a boxed type holding a #GDBusMethodInfo.
8758  *
8759  * Since: 2.26
8760  */
8761
8762
8763 /**
8764  * G_TYPE_DBUS_NODE_INFO:
8765  *
8766  * The #GType for a boxed type holding a #GDBusNodeInfo.
8767  *
8768  * Since: 2.26
8769  */
8770
8771
8772 /**
8773  * G_TYPE_DBUS_PROPERTY_INFO:
8774  *
8775  * The #GType for a boxed type holding a #GDBusPropertyInfo.
8776  *
8777  * Since: 2.26
8778  */
8779
8780
8781 /**
8782  * G_TYPE_DBUS_SIGNAL_INFO:
8783  *
8784  * The #GType for a boxed type holding a #GDBusSignalInfo.
8785  *
8786  * Since: 2.26
8787  */
8788
8789
8790 /**
8791  * G_TYPE_DOUBLE:
8792  *
8793  * The fundamental type corresponding to #gdouble.
8794  */
8795
8796
8797 /**
8798  * G_TYPE_ENUM:
8799  *
8800  * The fundamental type from which all enumeration types are derived.
8801  */
8802
8803
8804 /**
8805  * G_TYPE_ERROR:
8806  *
8807  * The #GType for a boxed type holding a #GError.
8808  *
8809  * Since: 2.26
8810  */
8811
8812
8813 /**
8814  * G_TYPE_FLAGS:
8815  *
8816  * The fundamental type from which all flags types are derived.
8817  */
8818
8819
8820 /**
8821  * G_TYPE_FLAG_RESERVED_ID_BIT:
8822  *
8823  * A bit in the type number that's supposed to be left untouched.
8824  */
8825
8826
8827 /**
8828  * G_TYPE_FLOAT:
8829  *
8830  * The fundamental type corresponding to #gfloat.
8831  */
8832
8833
8834 /**
8835  * G_TYPE_FROM_CLASS:
8836  * @g_class: Location of a valid #GTypeClass structure.
8837  *
8838  * Get the type identifier from a given @class structure.
8839  * This macro should only be used in type implementations.
8840  *
8841  * Returns: the #GType
8842  */
8843
8844
8845 /**
8846  * G_TYPE_FROM_INSTANCE:
8847  * @instance: Location of a valid #GTypeInstance structure.
8848  *
8849  * Get the type identifier from a given @instance structure.
8850  * This macro should only be used in type implementations.
8851  *
8852  * Returns: the #GType
8853  */
8854
8855
8856 /**
8857  * G_TYPE_FROM_INTERFACE:
8858  * @g_iface: Location of a valid #GTypeInterface structure.
8859  *
8860  * Get the type identifier from a given @interface structure.
8861  * This macro should only be used in type implementations.
8862  *
8863  * Returns: the #GType
8864  */
8865
8866
8867 /**
8868  * G_TYPE_FUNDAMENTAL:
8869  * @type: A #GType value.
8870  *
8871  * The fundamental type which is the ancestor of @type.
8872  * Fundamental types are types that serve as ultimate bases for the derived types,
8873  * thus they are the roots of distinct inheritance hierarchies.
8874  */
8875
8876
8877 /**
8878  * G_TYPE_FUNDAMENTAL_MAX:
8879  *
8880  * An integer constant that represents the number of identifiers reserved
8881  * for types that are assigned at compile-time.
8882  */
8883
8884
8885 /**
8886  * G_TYPE_FUNDAMENTAL_SHIFT:
8887  *
8888  * Shift value used in converting numbers to type IDs.
8889  */
8890
8891
8892 /**
8893  * G_TYPE_GSTRING:
8894  *
8895  * The #GType for #GString.
8896  */
8897
8898
8899 /**
8900  * G_TYPE_GTYPE:
8901  *
8902  * The type for #GType.
8903  */
8904
8905
8906 /**
8907  * G_TYPE_HASH_TABLE:
8908  *
8909  * The #GType for a boxed type holding a #GHashTable reference.
8910  *
8911  * Since: 2.10
8912  */
8913
8914
8915 /**
8916  * G_TYPE_HAS_VALUE_TABLE:
8917  * @type: A #GType value.
8918  *
8919  * Checks if @type has a #GTypeValueTable.
8920  *
8921  * Returns: %TRUE on success.
8922  */
8923
8924
8925 /**
8926  * G_TYPE_INITIALLY_UNOWNED:
8927  *
8928  * The type for #GInitiallyUnowned.
8929  */
8930
8931
8932 /**
8933  * G_TYPE_INSTANCE_GET_CLASS:
8934  * @instance: Location of the #GTypeInstance structure.
8935  * @g_type: The #GType of the class to be returned.
8936  * @c_type: The C type of the class structure.
8937  *
8938  * Get the class structure of a given @instance, casted
8939  * to a specified ancestor type @g_type of the instance.
8940  * Note that while calling a GInstanceInitFunc(), the class pointer gets
8941  * modified, so it might not always return the expected pointer.
8942  * This macro should only be used in type implementations.
8943  *
8944  * Returns: a pointer to the class structure
8945  */
8946
8947
8948 /**
8949  * G_TYPE_INSTANCE_GET_INTERFACE:
8950  * @instance: Location of the #GTypeInstance structure.
8951  * @g_type: The #GType of the interface to be returned.
8952  * @c_type: The C type of the interface structure.
8953  *
8954  * Get the interface structure for interface @g_type of a given @instance.
8955  * This macro should only be used in type implementations.
8956  *
8957  * Returns: a pointer to the interface structure
8958  */
8959
8960
8961 /**
8962  * G_TYPE_INSTANCE_GET_PRIVATE:
8963  * @instance: the instance of a type deriving from @private_type.
8964  * @g_type: the type identifying which private data to retrieve.
8965  * @c_type: The C type for the private structure.
8966  *
8967  * Gets the private structure for a particular type.
8968  * The private structure must have been registered in the
8969  * class_init function with g_type_class_add_private().
8970  * This macro should only be used in type implementations.
8971  *
8972  * Since: 2.4
8973  * Returns: a pointer to the private data structure.
8974  */
8975
8976
8977 /**
8978  * G_TYPE_INT:
8979  *
8980  * The fundamental type corresponding to #gint.
8981  */
8982
8983
8984 /**
8985  * G_TYPE_INT64:
8986  *
8987  * The fundamental type corresponding to #gint64.
8988  */
8989
8990
8991 /**
8992  * G_TYPE_INTERFACE:
8993  *
8994  * The fundamental type from which all interfaces are derived.
8995  */
8996
8997
8998 /**
8999  * G_TYPE_INVALID:
9000  *
9001  * An invalid #GType used as error return value in some functions which return
9002  * a #GType.
9003  */
9004
9005
9006 /**
9007  * G_TYPE_IO_CHANNEL:
9008  *
9009  * The #GType for #GIOChannel.
9010  */
9011
9012
9013 /**
9014  * G_TYPE_IO_CONDITION:
9015  *
9016  * The #GType for #GIOCondition.
9017  */
9018
9019
9020 /**
9021  * G_TYPE_IS_ABSTRACT:
9022  * @type: A #GType value.
9023  *
9024  * Checks if @type is an abstract type.  An abstract type can not be
9025  * instantiated and is normally used as an abstract base class for
9026  * derived classes.
9027  *
9028  * Returns: %TRUE on success.
9029  */
9030
9031
9032 /**
9033  * G_TYPE_IS_CLASSED:
9034  * @type: A #GType value.
9035  *
9036  * Checks if @type is a classed type.
9037  *
9038  * Returns: %TRUE on success.
9039  */
9040
9041
9042 /**
9043  * G_TYPE_IS_DEEP_DERIVABLE:
9044  * @type: A #GType value.
9045  *
9046  * Checks if @type is a deep derivable type.  A deep derivable type
9047  * can be used as the base class of a deep (multi-level) class hierarchy.
9048  *
9049  * Returns: %TRUE on success.
9050  */
9051
9052
9053 /**
9054  * G_TYPE_IS_DERIVABLE:
9055  * @type: A #GType value.
9056  *
9057  * Checks if @type is a derivable type.  A derivable type can
9058  * be used as the base class of a flat (single-level) class hierarchy.
9059  *
9060  * Returns: %TRUE on success.
9061  */
9062
9063
9064 /**
9065  * G_TYPE_IS_DERIVED:
9066  * @type: A #GType value.
9067  *
9068  * Checks if @type is derived (or in object-oriented terminology:
9069  * inherited) from another type (this holds true for all non-fundamental
9070  * types).
9071  *
9072  * Returns: %TRUE on success.
9073  */
9074
9075
9076 /**
9077  * G_TYPE_IS_ENUM:
9078  * @type: a #GType ID.
9079  *
9080  * Checks whether @type "is a" %G_TYPE_ENUM.
9081  *
9082  * Returns: %TRUE if @type "is a" %G_TYPE_ENUM.
9083  */
9084
9085
9086 /**
9087  * G_TYPE_IS_FLAGS:
9088  * @type: a #GType ID.
9089  *
9090  * Checks whether @type "is a" %G_TYPE_FLAGS.
9091  *
9092  * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS.
9093  */
9094
9095
9096 /**
9097  * G_TYPE_IS_FUNDAMENTAL:
9098  * @type: A #GType value.
9099  *
9100  * Checks if @type is a fundamental type.
9101  *
9102  * Returns: %TRUE on success.
9103  */
9104
9105
9106 /**
9107  * G_TYPE_IS_INSTANTIATABLE:
9108  * @type: A #GType value.
9109  *
9110  * Checks if @type can be instantiated.  Instantiation is the
9111  * process of creating an instance (object) of this type.
9112  *
9113  * Returns: %TRUE on success.
9114  */
9115
9116
9117 /**
9118  * G_TYPE_IS_INTERFACE:
9119  * @type: A #GType value.
9120  *
9121  * Checks if @type is an interface type.
9122  * An interface type provides a pure API, the implementation
9123  * of which is provided by another type (which is then said to conform
9124  * to the interface).  GLib interfaces are somewhat analogous to Java
9125  * interfaces and C++ classes containing only pure virtual functions,
9126  * with the difference that GType interfaces are not derivable (but see
9127  * g_type_interface_add_prerequisite() for an alternative).
9128  *
9129  * Returns: %TRUE on success.
9130  */
9131
9132
9133 /**
9134  * G_TYPE_IS_OBJECT:
9135  * @type: Type id to check
9136  *
9137  * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it.
9138  *
9139  * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT.
9140  */
9141
9142
9143 /**
9144  * G_TYPE_IS_PARAM:
9145  * @type: a #GType ID
9146  *
9147  * Checks whether @type "is a" %G_TYPE_PARAM.
9148  */
9149
9150
9151 /**
9152  * G_TYPE_IS_VALUE:
9153  * @type: A #GType value.
9154  *
9155  * Checks whether the passed in type ID can be used for g_value_init().
9156  * That is, this macro checks whether this type provides an implementation
9157  * of the #GTypeValueTable functions required for a type to create a #GValue of.
9158  *
9159  * Returns: Whether @type is suitable as a #GValue type.
9160  */
9161
9162
9163 /**
9164  * G_TYPE_IS_VALUE_ABSTRACT:
9165  * @type: A #GType value.
9166  *
9167  * Checks if @type is an abstract value type.  An abstract value type introduces
9168  * a value table, but can't be used for g_value_init() and is normally used as
9169  * an abstract base type for derived value types.
9170  *
9171  * Returns: %TRUE on success.
9172  */
9173
9174
9175 /**
9176  * G_TYPE_IS_VALUE_TYPE:
9177  * @type: A #GType value.
9178  *
9179  * Checks if @type is a value type and can be used with g_value_init().
9180  *
9181  * Returns: %TRUE on success.
9182  */
9183
9184
9185 /**
9186  * G_TYPE_LONG:
9187  *
9188  * The fundamental type corresponding to #glong.
9189  */
9190
9191
9192 /**
9193  * G_TYPE_MAKE_FUNDAMENTAL:
9194  * @x: the fundamental type number.
9195  *
9196  * Get the type ID for the fundamental type number @x.
9197  * Use g_type_fundamental_next() instead of this macro to create new fundamental
9198  * types.
9199  *
9200  * Returns: the GType
9201  */
9202
9203
9204 /**
9205  * G_TYPE_NONE:
9206  *
9207  * A fundamental type which is used as a replacement for the C
9208  * <literal>void</literal> return type.
9209  */
9210
9211
9212 /**
9213  * G_TYPE_OBJECT:
9214  *
9215  * The fundamental type for #GObject.
9216  */
9217
9218
9219 /**
9220  * G_TYPE_PARAM:
9221  *
9222  * The fundamental type from which all #GParamSpec types are derived.
9223  */
9224
9225
9226 /**
9227  * G_TYPE_PARAM_BOOLEAN:
9228  *
9229  * The #GType of #GParamSpecBoolean.
9230  */
9231
9232
9233 /**
9234  * G_TYPE_PARAM_BOXED:
9235  *
9236  * The #GType of #GParamSpecBoxed.
9237  */
9238
9239
9240 /**
9241  * G_TYPE_PARAM_CHAR:
9242  *
9243  * The #GType of #GParamSpecChar.
9244  */
9245
9246
9247 /**
9248  * G_TYPE_PARAM_DOUBLE:
9249  *
9250  * The #GType of #GParamSpecDouble.
9251  */
9252
9253
9254 /**
9255  * G_TYPE_PARAM_ENUM:
9256  *
9257  * The #GType of #GParamSpecEnum.
9258  */
9259
9260
9261 /**
9262  * G_TYPE_PARAM_FLAGS:
9263  *
9264  * The #GType of #GParamSpecFlags.
9265  */
9266
9267
9268 /**
9269  * G_TYPE_PARAM_FLOAT:
9270  *
9271  * The #GType of #GParamSpecFloat.
9272  */
9273
9274
9275 /**
9276  * G_TYPE_PARAM_GTYPE:
9277  *
9278  * The #GType of #GParamSpecGType.
9279  *
9280  * Since: 2.10
9281  */
9282
9283
9284 /**
9285  * G_TYPE_PARAM_INT:
9286  *
9287  * The #GType of #GParamSpecInt.
9288  */
9289
9290
9291 /**
9292  * G_TYPE_PARAM_INT64:
9293  *
9294  * The #GType of #GParamSpecInt64.
9295  */
9296
9297
9298 /**
9299  * G_TYPE_PARAM_LONG:
9300  *
9301  * The #GType of #GParamSpecLong.
9302  */
9303
9304
9305 /**
9306  * G_TYPE_PARAM_OBJECT:
9307  *
9308  * The #GType of #GParamSpecObject.
9309  */
9310
9311
9312 /**
9313  * G_TYPE_PARAM_OVERRIDE:
9314  *
9315  * The #GType of #GParamSpecOverride.
9316  *
9317  * Since: 2.4
9318  */
9319
9320
9321 /**
9322  * G_TYPE_PARAM_PARAM:
9323  *
9324  * The #GType of #GParamSpecParam.
9325  */
9326
9327
9328 /**
9329  * G_TYPE_PARAM_POINTER:
9330  *
9331  * The #GType of #GParamSpecPointer.
9332  */
9333
9334
9335 /**
9336  * G_TYPE_PARAM_STRING:
9337  *
9338  * The #GType of #GParamSpecString.
9339  */
9340
9341
9342 /**
9343  * G_TYPE_PARAM_UCHAR:
9344  *
9345  * The #GType of #GParamSpecUChar.
9346  */
9347
9348
9349 /**
9350  * G_TYPE_PARAM_UINT:
9351  *
9352  * The #GType of #GParamSpecUInt.
9353  */
9354
9355
9356 /**
9357  * G_TYPE_PARAM_UINT64:
9358  *
9359  * The #GType of #GParamSpecUInt64.
9360  */
9361
9362
9363 /**
9364  * G_TYPE_PARAM_ULONG:
9365  *
9366  * The #GType of #GParamSpecULong.
9367  */
9368
9369
9370 /**
9371  * G_TYPE_PARAM_UNICHAR:
9372  *
9373  * The #GType of #GParamSpecUnichar.
9374  */
9375
9376
9377 /**
9378  * G_TYPE_PARAM_VALUE_ARRAY:
9379  *
9380  * The #GType of #GParamSpecValueArray.
9381  */
9382
9383
9384 /**
9385  * G_TYPE_PARAM_VARIANT:
9386  *
9387  * The #GType of #GParamSpecVariant.
9388  *
9389  * Since: 2.26
9390  */
9391
9392
9393 /**
9394  * G_TYPE_POINTER:
9395  *
9396  * The fundamental type corresponding to #gpointer.
9397  */
9398
9399
9400 /**
9401  * G_TYPE_PTR_ARRAY:
9402  *
9403  * The #GType for a boxed type holding a #GPtrArray reference.
9404  *
9405  * Since: 2.22
9406  */
9407
9408
9409 /**
9410  * G_TYPE_REGEX:
9411  *
9412  * The #GType for a boxed type holding a #GRegex reference.
9413  *
9414  * Since: 2.14
9415  */
9416
9417
9418 /**
9419  * G_TYPE_RESERVED_BSE_FIRST:
9420  *
9421  * First fundamental type number to create a new fundamental type id with
9422  * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
9423  */
9424
9425
9426 /**
9427  * G_TYPE_RESERVED_BSE_LAST:
9428  *
9429  * Last fundamental type number reserved for BSE.
9430  */
9431
9432
9433 /**
9434  * G_TYPE_RESERVED_GLIB_FIRST:
9435  *
9436  * First fundamental type number to create a new fundamental type id with
9437  * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
9438  */
9439
9440
9441 /**
9442  * G_TYPE_RESERVED_GLIB_LAST:
9443  *
9444  * Last fundamental type number reserved for GLib.
9445  */
9446
9447
9448 /**
9449  * G_TYPE_RESERVED_USER_FIRST:
9450  *
9451  * First available fundamental type number to create new fundamental
9452  * type id with G_TYPE_MAKE_FUNDAMENTAL().
9453  */
9454
9455
9456 /**
9457  * G_TYPE_STRING:
9458  *
9459  * The fundamental type corresponding to nul-terminated C strings.
9460  */
9461
9462
9463 /**
9464  * G_TYPE_STRV:
9465  *
9466  * The #GType for a boxed type holding a %NULL-terminated array of strings.
9467  * The code fragments in the following example show the use of a property of
9468  * type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
9469  * and g_object_get().
9470  * |[
9471  * g_object_class_install_property (object_class,
9472  * PROP_AUTHORS,
9473  * g_param_spec_boxed ("authors",
9474  * _("Authors"),
9475  * _("List of authors"),
9476  * G_TYPE_STRV,
9477  * G_PARAM_READWRITE));
9478  * gchar *authors[] = { "Owen", "Tim", NULL };
9479  * g_object_set (obj, "authors", authors, NULL);
9480  * gchar *writers[];
9481  * g_object_get (obj, "authors", &writers, NULL);
9482  * // do something with writers
9483  * g_strfreev (writers);
9484  * ]|
9485  *
9486  * Since: 2.4
9487  */
9488
9489
9490 /**
9491  * G_TYPE_UCHAR:
9492  *
9493  * The fundamental type corresponding to #guchar.
9494  */
9495
9496
9497 /**
9498  * G_TYPE_UINT:
9499  *
9500  * The fundamental type corresponding to #guint.
9501  */
9502
9503
9504 /**
9505  * G_TYPE_UINT64:
9506  *
9507  * The fundamental type corresponding to #guint64.
9508  */
9509
9510
9511 /**
9512  * G_TYPE_ULONG:
9513  *
9514  * The fundamental type corresponding to #gulong.
9515  */
9516
9517
9518 /**
9519  * G_TYPE_VALUE:
9520  *
9521  * The type ID of the "GValue" type which is a boxed type,
9522  * used to pass around pointers to GValues.
9523  */
9524
9525
9526 /**
9527  * G_TYPE_VALUE_ARRAY:
9528  *
9529  * The type ID of the "GValueArray" type which is a boxed type,
9530  * used to pass around pointers to GValueArrays.
9531  */
9532
9533
9534 /**
9535  * G_TYPE_VARIANT:
9536  *
9537  * The fundamental type corresponding to #GVariant.
9538  * All floating #GVariant instances passed through the #GType system are
9539  * consumed.
9540  * Note that callbacks in closures, and signal handlers
9541  * for signals of return type %G_TYPE_VARIANT, must never return floating
9542  * variants.
9543  * with this fundamental type in 2.26.
9544  *
9545  * Note: GLib 2.24 did include a boxed type with this name. It was replaced
9546  * Since: 2.26
9547  */
9548
9549
9550 /**
9551  * G_TYPE_VARIANT_TYPE:
9552  *
9553  * The #GType for a boxed type holding a #GVariantType.
9554  *
9555  * Since: 2.24
9556  */
9557
9558
9559 /**
9560  * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH:
9561  *
9562  * Allowed characters in a path. Includes "!$&'()*+,;=:@/".
9563  */
9564
9565
9566 /**
9567  * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT:
9568  *
9569  * Allowed characters in path elements. Includes "!$&'()*+,;=:@".
9570  */
9571
9572
9573 /**
9574  * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO:
9575  *
9576  * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".
9577  */
9578
9579
9580 /**
9581  * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS:
9582  *
9583  * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".
9584  */
9585
9586
9587 /**
9588  * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITER:
9589  *
9590  * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
9591  */
9592
9593
9594 /**
9595  * G_VALUE_HOLDS:
9596  * @value: A #GValue structure.
9597  * @type: A #GType value.
9598  *
9599  * Checks if @value holds (or contains) a value of @type.
9600  * This macro will also check for @value != %NULL and issue a
9601  * warning if the check fails.
9602  *
9603  * Returns: %TRUE if @value holds the @type.
9604  */
9605
9606
9607 /**
9608  * G_VALUE_HOLDS_BOOLEAN:
9609  * @value: a valid #GValue structure
9610  *
9611  * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN.
9612  *
9613  * Returns: %TRUE on success.
9614  */
9615
9616
9617 /**
9618  * G_VALUE_HOLDS_BOXED:
9619  * @value: a valid #GValue structure
9620  *
9621  * Checks whether the given #GValue can hold values derived from type %G_TYPE_BOXED.
9622  *
9623  * Returns: %TRUE on success.
9624  */
9625
9626
9627 /**
9628  * G_VALUE_HOLDS_CHAR:
9629  * @value: a valid #GValue structure
9630  *
9631  * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR.
9632  *
9633  * Returns: %TRUE on success.
9634  */
9635
9636
9637 /**
9638  * G_VALUE_HOLDS_DOUBLE:
9639  * @value: a valid #GValue structure
9640  *
9641  * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE.
9642  *
9643  * Returns: %TRUE on success.
9644  */
9645
9646
9647 /**
9648  * G_VALUE_HOLDS_ENUM:
9649  * @value: a valid #GValue structure
9650  *
9651  * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM.
9652  *
9653  * Returns: %TRUE on success.
9654  */
9655
9656
9657 /**
9658  * G_VALUE_HOLDS_FLAGS:
9659  * @value: a valid #GValue structure
9660  *
9661  * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS.
9662  *
9663  * Returns: %TRUE on success.
9664  */
9665
9666
9667 /**
9668  * G_VALUE_HOLDS_FLOAT:
9669  * @value: a valid #GValue structure
9670  *
9671  * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT.
9672  *
9673  * Returns: %TRUE on success.
9674  */
9675
9676
9677 /**
9678  * G_VALUE_HOLDS_GTYPE:
9679  * @value: a valid #GValue structure
9680  *
9681  * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE.
9682  *
9683  * Since: 2.12
9684  * Returns: %TRUE on success.
9685  */
9686
9687
9688 /**
9689  * G_VALUE_HOLDS_INT:
9690  * @value: a valid #GValue structure
9691  *
9692  * Checks whether the given #GValue can hold values of type %G_TYPE_INT.
9693  *
9694  * Returns: %TRUE on success.
9695  */
9696
9697
9698 /**
9699  * G_VALUE_HOLDS_INT64:
9700  * @value: a valid #GValue structure
9701  *
9702  * Checks whether the given #GValue can hold values of type %G_TYPE_INT64.
9703  *
9704  * Returns: %TRUE on success.
9705  */
9706
9707
9708 /**
9709  * G_VALUE_HOLDS_LONG:
9710  * @value: a valid #GValue structure
9711  *
9712  * Checks whether the given #GValue can hold values of type %G_TYPE_LONG.
9713  *
9714  * Returns: %TRUE on success.
9715  */
9716
9717
9718 /**
9719  * G_VALUE_HOLDS_OBJECT:
9720  * @value: a valid #GValue structure
9721  *
9722  * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT.
9723  *
9724  * Returns: %TRUE on success.
9725  */
9726
9727
9728 /**
9729  * G_VALUE_HOLDS_PARAM:
9730  * @value: a valid #GValue structure
9731  *
9732  * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM.
9733  *
9734  * Returns: %TRUE on success.
9735  */
9736
9737
9738 /**
9739  * G_VALUE_HOLDS_POINTER:
9740  * @value: a valid #GValue structure
9741  *
9742  * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER.
9743  *
9744  * Returns: %TRUE on success.
9745  */
9746
9747
9748 /**
9749  * G_VALUE_HOLDS_STRING:
9750  * @value: a valid #GValue structure
9751  *
9752  * Checks whether the given #GValue can hold values of type %G_TYPE_STRING.
9753  *
9754  * Returns: %TRUE on success.
9755  */
9756
9757
9758 /**
9759  * G_VALUE_HOLDS_UCHAR:
9760  * @value: a valid #GValue structure
9761  *
9762  * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR.
9763  *
9764  * Returns: %TRUE on success.
9765  */
9766
9767
9768 /**
9769  * G_VALUE_HOLDS_UINT:
9770  * @value: a valid #GValue structure
9771  *
9772  * Checks whether the given #GValue can hold values of type %G_TYPE_UINT.
9773  *
9774  * Returns: %TRUE on success.
9775  */
9776
9777
9778 /**
9779  * G_VALUE_HOLDS_UINT64:
9780  * @value: a valid #GValue structure
9781  *
9782  * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64.
9783  *
9784  * Returns: %TRUE on success.
9785  */
9786
9787
9788 /**
9789  * G_VALUE_HOLDS_ULONG:
9790  * @value: a valid #GValue structure
9791  *
9792  * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG.
9793  *
9794  * Returns: %TRUE on success.
9795  */
9796
9797
9798 /**
9799  * G_VALUE_HOLDS_VARIANT:
9800  * @value: a valid #GValue structure
9801  *
9802  * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT.
9803  *
9804  * Returns: %TRUE on success.
9805  * Since: 2.26
9806  */
9807
9808
9809 /**
9810  * G_VALUE_TYPE:
9811  * @value: A #GValue structure.
9812  *
9813  * Get the type identifier of @value.
9814  *
9815  * Returns: the #GType.
9816  */
9817
9818
9819 /**
9820  * G_VALUE_TYPE_NAME:
9821  * @value: A #GValue structure.
9822  *
9823  * Gets the the type name of @value.
9824  *
9825  * Returns: the type name.
9826  */
9827
9828
9829 /**
9830  * G_VARIANT_TYPE:
9831  * @type_string: a well-formed #GVariantType type string
9832  *
9833  * Converts a string to a const #GVariantType.  Depending on the
9834  * current debugging level, this function may perform a runtime check
9835  * to ensure that @string is a valid GVariant type string.
9836  * It is always a programmer error to use this macro with an invalid
9837  * type string.
9838  * Since 2.24
9839  */
9840
9841
9842 /**
9843  * G_VARIANT_TYPE_ANY:
9844  *
9845  * An indefinite type that is a supertype of every type (including
9846  * itself).
9847  */
9848
9849
9850 /**
9851  * G_VARIANT_TYPE_ARRAY:
9852  *
9853  * An indefinite type that is a supertype of every array type.
9854  */
9855
9856
9857 /**
9858  * G_VARIANT_TYPE_BASIC:
9859  *
9860  * An indefinite type that is a supertype of every basic (ie:
9861  * non-container) type.
9862  */
9863
9864
9865 /**
9866  * G_VARIANT_TYPE_BOOLEAN:
9867  *
9868  * The type of a value that can be either %TRUE or %FALSE.
9869  */
9870
9871
9872 /**
9873  * G_VARIANT_TYPE_BYTE:
9874  *
9875  * The type of an integer value that can range from 0 to 255.
9876  */
9877
9878
9879 /**
9880  * G_VARIANT_TYPE_BYTESTRING:
9881  *
9882  * The type of an array of bytes.  This type is commonly used to pass
9883  * around strings that may not be valid utf8.  In that case, the
9884  * convention is that the nul terminator character should be included as
9885  * the last character in the array.
9886  */
9887
9888
9889 /**
9890  * G_VARIANT_TYPE_BYTESTRING_ARRAY:
9891  *
9892  * The type of an array of byte strings (an array of arrays of bytes).
9893  */
9894
9895
9896 /**
9897  * G_VARIANT_TYPE_DICTIONARY:
9898  *
9899  * An indefinite type that is a supertype of every dictionary type --
9900  * that is, any array type that has an element type equal to any
9901  * dictionary entry type.
9902  */
9903
9904
9905 /**
9906  * G_VARIANT_TYPE_DICT_ENTRY:
9907  *
9908  * An indefinite type that is a supertype of every dictionary entry
9909  * type.
9910  */
9911
9912
9913 /**
9914  * G_VARIANT_TYPE_DOUBLE:
9915  *
9916  * The type of a double precision IEEE754 floating point number.
9917  * These guys go up to about 1.80e308 (plus and minus) but miss out on
9918  * some numbers in between.  In any case, that's far greater than the
9919  * estimated number of fundamental particles in the observable
9920  * universe.
9921  */
9922
9923
9924 /**
9925  * G_VARIANT_TYPE_HANDLE:
9926  *
9927  * The type of a 32bit signed integer value, that by convention, is used
9928  * as an index into an array of file descriptors that are sent alongside
9929  * a DBus message.
9930  * If you are not interacting with DBus, then there is no reason to make
9931  * use of this type.
9932  */
9933
9934
9935 /**
9936  * G_VARIANT_TYPE_INT16:
9937  *
9938  * The type of an integer value that can range from -32768 to 32767.
9939  */
9940
9941
9942 /**
9943  * G_VARIANT_TYPE_INT32:
9944  *
9945  * The type of an integer value that can range from -2147483648 to
9946  * 2147483647.
9947  */
9948
9949
9950 /**
9951  * G_VARIANT_TYPE_INT64:
9952  *
9953  * The type of an integer value that can range from
9954  * -9223372036854775808 to 9223372036854775807.
9955  */
9956
9957
9958 /**
9959  * G_VARIANT_TYPE_MAYBE:
9960  *
9961  * An indefinite type that is a supertype of every maybe type.
9962  */
9963
9964
9965 /**
9966  * G_VARIANT_TYPE_OBJECT_PATH:
9967  *
9968  * The type of a DBus object reference.  These are strings of a
9969  * specific format used to identify objects at a given destination on
9970  * the bus.
9971  * If you are not interacting with DBus, then there is no reason to make
9972  * use of this type.  If you are, then the DBus specification contains a
9973  * precise description of valid object paths.
9974  */
9975
9976
9977 /**
9978  * G_VARIANT_TYPE_SIGNATURE:
9979  *
9980  * The type of a DBus type signature.  These are strings of a specific
9981  * format used as type signatures for DBus methods and messages.
9982  * If you are not interacting with DBus, then there is no reason to make
9983  * use of this type.  If you are, then the DBus specification contains a
9984  * precise description of valid signature strings.
9985  */
9986
9987
9988 /**
9989  * G_VARIANT_TYPE_STRING:
9990  *
9991  * The type of a string.  "" is a string.  %NULL is not a string.
9992  */
9993
9994
9995 /**
9996  * G_VARIANT_TYPE_STRING_ARRAY:
9997  *
9998  * The type of an array of strings.
9999  */
10000
10001
10002 /**
10003  * G_VARIANT_TYPE_TUPLE:
10004  *
10005  * An indefinite type that is a supertype of every tuple type,
10006  * regardless of the number of items in the tuple.
10007  */
10008
10009
10010 /**
10011  * G_VARIANT_TYPE_UINT16:
10012  *
10013  * The type of an integer value that can range from 0 to 65535.
10014  * There were about this many people living in Toronto in the 1870s.
10015  */
10016
10017
10018 /**
10019  * G_VARIANT_TYPE_UINT32:
10020  *
10021  * The type of an integer value that can range from 0 to 4294967295.
10022  * That's one number for everyone who was around in the late 1970s.
10023  */
10024
10025
10026 /**
10027  * G_VARIANT_TYPE_UINT64:
10028  *
10029  * The type of an integer value that can range from 0 to
10030  * 18446744073709551616.  That's a really big number, but a Rubik's
10031  * cube can have a bit more than twice as many possible positions.
10032  */
10033
10034
10035 /**
10036  * G_VARIANT_TYPE_UNIT:
10037  *
10038  * The empty tuple type.  Has only one instance.  Known also as "triv"
10039  * or "void".
10040  */
10041
10042
10043 /**
10044  * G_VARIANT_TYPE_VARIANT:
10045  *
10046  * The type of a box that contains any other value (including another
10047  * variant).
10048  */
10049
10050
10051 /**
10052  * G_VFS_EXTENSION_POINT_NAME:
10053  *
10054  * Extension point for #GVfs functionality.
10055  * See <link linkend="extending-gio">Extending GIO</link>.
10056  */
10057
10058
10059 /**
10060  * G_VOLUME_IDENTIFIER_KIND_HAL_UDI:
10061  *
10062  * The string used to obtain a Hal UDI with g_volume_get_identifier().
10063  */
10064
10065
10066 /**
10067  * G_VOLUME_IDENTIFIER_KIND_LABEL:
10068  *
10069  * The string used to obtain a filesystem label with g_volume_get_identifier().
10070  */
10071
10072
10073 /**
10074  * G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT:
10075  *
10076  * The string used to obtain a NFS mount with g_volume_get_identifier().
10077  */
10078
10079
10080 /**
10081  * G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE:
10082  *
10083  * The string used to obtain a Unix device path with g_volume_get_identifier().
10084  */
10085
10086
10087 /**
10088  * G_VOLUME_IDENTIFIER_KIND_UUID:
10089  *
10090  * The string used to obtain a UUID with g_volume_get_identifier().
10091  */
10092
10093
10094 /**
10095  * G_VOLUME_MONITOR_EXTENSION_POINT_NAME:
10096  *
10097  * Extension point for volume monitor functionality.
10098  * See <link linkend="extending-gio">Extending GIO</link>.
10099  */
10100
10101
10102 /**
10103  * SECTION:
10104  * @title: GUnixFDMessage
10105  * @short_description: A GSocketControlMessage containing a GUnixFDList
10106  * @include: gio/gunixfdmessage.h
10107  * @see_also: #GUnixConnection, #GUnixFDList, #GSocketControlMessage
10108  *
10109  * This #GSocketControlMessage contains a #GUnixFDList.
10110  * It may be sent using g_socket_send_message() and received using
10111  * %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied
10112  * between processes by the kernel.
10113  * For an easier way to send and receive file descriptors over
10114  * stream-oriented UNIX sockets, see g_unix_connection_send_fd() and
10115  * g_unix_connection_receive_fd().
10116  * Note that <filename>&lt;gio/gunixfdmessage.h&gt;</filename> belongs to
10117  * the UNIX-specific GIO interfaces, thus you have to use the
10118  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
10119  *
10120  * G_socket_receive_message() over unix sockets (ie: sockets in the
10121  */
10122
10123
10124 /**
10125  * SECTION:extensionpoint:
10126  * @short_description: Extension Points
10127  * @include: gio.h
10128  * @see_also: <link linkend="extending-gio">Extending GIO</link>
10129  *
10130  * #GIOExtensionPoint provides a mechanism for modules to extend the
10131  * functionality of the library or application that loaded it in an
10132  * organized fashion.
10133  * An extension point is identified by a name, and it may optionally
10134  * require that any implementation must by of a certain type (or derived
10135  * thereof). Use g_io_extension_point_register() to register an
10136  * extension point, and g_io_extension_point_set_required_type() to
10137  * set a required type.
10138  * A module can implement an extension point by specifying the #GType
10139  * that implements the functionality. Additionally, each implementation
10140  * of an extension point has a name, and a priority. Use
10141  * g_io_extension_point_implement() to implement an extension point.
10142  * |[
10143  * GIOExtensionPoint *ep;
10144  * /&ast; Register an extension point &ast;/
10145  * ep = g_io_extension_point_register ("my-extension-point");
10146  * g_io_extension_point_set_required_type (ep, MY_TYPE_EXAMPLE);
10147  * ]|
10148  * |[
10149  * /&ast; Implement an extension point &ast;/
10150  * G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE);
10151  * g_io_extension_point_implement ("my-extension-point",
10152  * my_example_impl_get_type (),
10153  * "my-example",
10154  * 10);
10155  * ]|
10156  * It is up to the code that registered the extension point how
10157  * it uses the implementations that have been associated with it.
10158  * Depending on the use case, it may use all implementations, or
10159  * only the one with the highest priority, or pick a specific
10160  * one by name.
10161  * To avoid opening all modules just to find out what extension
10162  * points they implement, GIO makes use of a caching mechanism,
10163  * see <link linkend="gio-querymodules">gio-querymodules</link>.
10164  * You are expected to run this command after installing a
10165  * GIO module.
10166  */
10167
10168
10169 /**
10170  * SECTION:gactio:
10171  * @title: GAction
10172  * @short_description: An action
10173  *
10174  * #GAction represents a single named action.
10175  * The main interface to an action is that it can be activated with
10176  * g_action_activate().  This results in the 'activate' signal being
10177  * emitted.  An activation has a #GVariant parameter (which may be
10178  * %NULL).  The correct type for the parameter is determined by a static
10179  * parameter type (which is given at construction time).
10180  * An action may optionally have a state, in which case the state may be
10181  * set with g_action_set_state().  This call takes a #GVariant.  The
10182  * correct type for the state is determined by a static state type
10183  * (which is given at construction time).
10184  * The state may have a hint associated with it, specifying its valid
10185  * range.
10186  * #GAction is merely the interface to the concept of an action, as
10187  * described above.  Various implementations of actions exist, including
10188  * #GSimpleAction and #GtkAction.
10189  * In all cases, the implementing class is responsible for storing the
10190  * name of the action, the parameter type, the enabled state, the
10191  * optional state type and the state and emitting the appropriate
10192  * signals when these change.  The implementor responsible for filtering
10193  * calls to g_action_activate() and g_action_set_state() for type safety
10194  * and for the state being enabled.
10195  * Probably the only useful thing to do with a #GAction is to put it
10196  * inside of a #GSimpleActionGroup.
10197  */
10198
10199
10200 /**
10201  * SECTION:gactiongrou:
10202  * @title: GActionGroup
10203  * @short_description: A group of actions
10204  *
10205  * #GActionGroup represents a group of actions.
10206  * Each action in the group has a unique name (which is a string).  All
10207  * method calls, except g_action_group_list_actions() take the name of
10208  * an action as an argument.
10209  * The #GActionGroup API is meant to be the 'public' API to the action
10210  * group.  The calls here are exactly the interaction that 'external
10211  * the action group implementation) are found on subclasses.  This is
10212  * why you will find -- for example -- g_action_group_get_enabled() but
10213  * not an equivalent <function>set()</function> call.
10214  * Signals are emitted on the action group in response to state changes
10215  * on individual actions.
10216  *
10217  * Forces' (eg: UI, incoming D-Bus messages, etc.) are supposed to have
10218  * With actions.  'internal' apis (ie: ones meant only to be accessed by
10219  */
10220
10221
10222 /**
10223  * SECTION:gappinf:
10224  * @short_description: Application information and launch contexts
10225  * @include: gio/gio.h
10226  *
10227  * #GAppInfo and #GAppLaunchContext are used for describing and launching
10228  * applications installed on the system.
10229  * As of GLib 2.20, URIs will always be converted to POSIX paths
10230  * (using g_file_get_path()) when using g_app_info_launch() even if
10231  * the application requested an URI and not a POSIX path. For example
10232  * for an desktop-file based application with Exec key <literal>totem
10233  * %%U</literal> and a single URI,
10234  * <literal>sftp://foo/file.avi</literal>, then
10235  * <literal>/home/user/.gvfs/sftp on foo/file.avi</literal> will be
10236  * passed. This will only work if a set of suitable GIO extensions
10237  * (such as gvfs 2.26 compiled with FUSE support), is available and
10238  * operational; if this is not the case, the URI will be passed
10239  * unmodified to the application. Some URIs, such as
10240  * <literal>mailto:</literal>, of course cannot be mapped to a POSIX
10241  * path (in gvfs there's no FUSE mount for it); such URIs will be
10242  * passed unmodified to the application.
10243  * Specifically for gvfs 2.26 and later, the POSIX URI will be mapped
10244  * back to the GIO URI in the #GFile constructors (since gvfs
10245  * implements the #GVfs extension point). As such, if the application
10246  * needs to examine the URI, it needs to use g_file_get_uri() or
10247  * similar on #GFile. In other words, an application cannot assume
10248  * that the URI passed to e.g. g_file_new_for_commandline_arg() is
10249  * equal to the result of g_file_get_uri(). The following snippet
10250  * illustrates this:
10251  * <programlisting>
10252  * GFile *f;
10253  * char *uri;
10254  * file = g_file_new_for_commandline_arg (uri_from_commandline);
10255  * uri = g_file_get_uri (file);
10256  * strcmp (uri, uri_from_commandline) == 0; // FALSE
10257  * g_free (uri);
10258  * if (g_file_has_uri_scheme (file, "cdda"))
10259  * {
10260  * // do something special with uri
10261  * }
10262  * g_object_unref (file);
10263  * </programlisting>
10264  * This code will work when both <literal>cdda://sr0/Track
10265  * 1.wav</literal> and <literal>/home/user/.gvfs/cdda on sr0/Track
10266  * 1.wav</literal> is passed to the application. It should be noted
10267  * that it's generally not safe for applications to rely on the format
10268  * of a particular URIs. Different launcher applications (e.g. file
10269  * managers) may have different ideas of what a given URI means.
10270  */
10271
10272
10273 /**
10274  * SECTION:gapplicationcommandlin:
10275  * @title: GApplicationCommandLine
10276  * @short_description: A command-line invocation of an application
10277  * @see_also: #GApplication
10278  *
10279  * #GApplicationCommandLine represents a command-line invocation of
10280  * an application.  It is created by #GApplication and emitted
10281  * in the #GApplication::command-line signal and virtual function.
10282  * The class contains the list of arguments that the program was invoked
10283  * with.  It is also possible to query if the commandline invocation was
10284  * commandline to this process).
10285  * The exit status of the originally-invoked process may be set and
10286  * messages can be printed to stdout or stderr of that process.  The
10287  * lifecycle of the originally-invoked process is tied to the lifecycle
10288  * dropped).
10289  * <example id="gapplication-example-cmdline"><title>Handling commandline arguments with GApplication</title>
10290  * <programlisting>
10291  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline.c">
10292  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10293  * </xi:include>
10294  * </programlisting>
10295  * </example>
10296  * <example id="gapplication-example-cmdline2"><title>Complicated commandline handling</title>
10297  * <programlisting>
10298  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline2.c">
10299  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10300  * </xi:include>
10301  * </programlisting>
10302  * </example>
10303  *
10304  * Local (ie: the current process is running in direct response to the
10305  * Invocation) or remote (ie: some other process forwarded the
10306  * Of this object (ie: the process exits when the last reference is
10307  */
10308
10309
10310 /**
10311  * SECTION:gasynchelpe:
10312  * @short_description: Asynchronous Helper Functions
10313  * @include: gio/gio.h
10314  * @see_also: #GAsyncReady
10315  *
10316  * Provides helper functions for asynchronous operations.
10317  */
10318
10319
10320 /**
10321  * SECTION:gasyncinitabl:
10322  * @short_description: Asynchronously failable object initialization interface
10323  * @include: gio/gio.h
10324  * @see_also: #GInitable
10325  *
10326  * This is the asynchronous version of #GInitable; it behaves the same
10327  * in all ways except that initialization is asynchronous. For more details
10328  * see the descriptions on #GInitable.
10329  * A class may implement both the #GInitable and #GAsyncInitable interfaces.
10330  * Users of objects implementing this are not intended to use the interface
10331  * method directly; instead it will be used automatically in various ways.
10332  * For C applications you generally just call g_async_initable_new_async()
10333  * directly, or indirectly via a foo_thing_new_async() wrapper. This will call
10334  * g_async_initable_init_async() under the cover, calling back with %NULL and
10335  * a set %GError on failure.
10336  * A typical implementation might look something like this:
10337  * |[
10338  * enum {
10339  * NOT_INITIALIZED,
10340  * INITIALIZING,
10341  * INITIALIZED
10342  * };
10343  * static void
10344  * _foo_ready_cb (Foo *self)
10345  * {
10346  * GList *l;
10347  * self->priv->state = INITIALIZED;
10348  * for (l = self->priv->init_results; l != NULL; l = l->next)
10349  * {
10350  * GSimpleAsyncResult *simple = l->data;
10351  * if (!self->priv->success)
10352  * g_simple_async_result_set_error (simple, ...);
10353  * g_simple_async_result_complete (simple);
10354  * g_object_unref (simple);
10355  * }
10356  * g_list_free (self->priv->init_results);
10357  * self->priv->init_results = NULL;
10358  * }
10359  * static void
10360  * foo_init_async (GAsyncInitable       *initable,
10361  * int                   io_priority,
10362  * GCancellable         *cancellable,
10363  * GAsyncReadyCallback   callback,
10364  * gpointer              user_data)
10365  * {
10366  * Foo *self = FOO (initable);
10367  * GSimpleAsyncResult *simple;
10368  * simple = g_simple_async_result_new (G_OBJECT (initable)
10369  * callback,
10370  * user_data,
10371  * foo_init_async);
10372  * switch (self->priv->state)
10373  * {
10374  * case NOT_INITIALIZED:
10375  * _foo_get_ready (self);
10376  * self->priv->init_results = g_list_append (self->priv->init_results,
10377  * simple);
10378  * self->priv->state = INITIALIZING;
10379  * break;
10380  * case INITIALIZING:
10381  * self->priv->init_results = g_list_append (self->priv->init_results,
10382  * simple);
10383  * break;
10384  * case INITIALIZED:
10385  * if (!self->priv->success)
10386  * g_simple_async_result_set_error (simple, ...);
10387  * g_simple_async_result_complete_in_idle (simple);
10388  * g_object_unref (simple);
10389  * break;
10390  * }
10391  * }
10392  * static gboolean
10393  * foo_init_finish (GAsyncInitable       *initable,
10394  * GAsyncResult         *result,
10395  * GError              **error)
10396  * {
10397  * g_return_val_if_fail (g_simple_async_result_is_valid (result,
10398  * G_OBJECT (initable), foo_init_async), FALSE);
10399  * if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
10400  * error))
10401  * return FALSE;
10402  * return TRUE;
10403  * }
10404  * static void
10405  * foo_async_initable_iface_init (gpointer g_iface,
10406  * gpointer data)
10407  * {
10408  * GAsyncInitableIface *iface = g_iface;
10409  * iface->init_async = foo_init_async;
10410  * iface->init_finish = foo_init_finish;
10411  * }
10412  * ]|
10413  */
10414
10415
10416 /**
10417  * SECTION:gasyncresul:
10418  * @short_description: Asynchronous Function Results
10419  * @include: gio/gio.h
10420  * @see_also: #GSimpleAsyncResult
10421  *
10422  * Provides a base class for implementing asynchronous function results.
10423  * Asynchronous operations are broken up into two separate operations
10424  * which are chained together by a #GAsyncReadyCallback. To begin
10425  * an asynchronous operation, provide a #GAsyncReadyCallback to the
10426  * asynchronous function. This callback will be triggered when the
10427  * operation has completed, and will be passed a #GAsyncResult instance
10428  * filled with the details of the operation's success or failure, the
10429  * object the asynchronous function was started for and any error codes
10430  * returned. The asynchronous callback function is then expected to call
10431  * the corresponding "_finish()" function, passing the object the
10432  * function was called for, the #GAsyncResult instance, and (optionally)
10433  * an @error to grab any error conditions that may have occurred.
10434  * The "_finish()" function for an operation takes the generic result
10435  * (of type #GAsyncResult) and returns the specific result that the
10436  * operation in question yields (e.g. a #GFileEnumerator for a
10437  * "enumerate children" operation). If the result or error status of the
10438  * operation is not needed, there is no need to call the "_finish()"
10439  * function; GIO will take care of cleaning up the result and error
10440  * information after the #GAsyncReadyCallback returns. Applications may
10441  * also take a reference to the #GAsyncResult and call "_finish()"
10442  * later; however, the "_finish()" function may be called at most once.
10443  * Example of a typical asynchronous operation flow:
10444  * |[
10445  * void _theoretical_frobnitz_async (Theoretical         *t,
10446  * GCancellable        *c,
10447  * GAsyncReadyCallback *cb,
10448  * gpointer             u);
10449  * gboolean _theoretical_frobnitz_finish (Theoretical   *t,
10450  * GAsyncResult  *res,
10451  * GError       **e);
10452  * static void
10453  * frobnitz_result_func (GObject      *source_object,
10454  * GAsyncResult *res,
10455  * gpointer      user_data)
10456  * {
10457  * gboolean success = FALSE;
10458  * success = _theoretical_frobnitz_finish (source_object, res, NULL);
10459  * if (success)
10460  * g_printf ("Hurray!\n");
10461  * else
10462  * g_printf ("Uh oh!\n");
10463  * /<!-- -->* ... *<!-- -->/
10464  * }
10465  * int main (int argc, void *argv[])
10466  * {
10467  * /<!-- -->* ... *<!-- -->/
10468  * _theoretical_frobnitz_async (theoretical_data,
10469  * NULL,
10470  * frobnitz_result_func,
10471  * NULL);
10472  * /<!-- -->* ... *<!-- -->/
10473  * }
10474  * ]|
10475  * The callback for an asynchronous operation is called only once, and is
10476  * always called, even in the case of a cancelled operation. On cancellation
10477  * the result is a %G_IO_ERROR_CANCELLED error.
10478  * Some asynchronous operations are implemented using synchronous calls.
10479  * These are run in a separate thread, if #GThread has been initialized, but
10480  * otherwise they are sent to the Main Event Loop and processed in an idle
10481  * function. So, if you truly need asynchronous operations, make sure to
10482  * initialize #GThread.
10483  */
10484
10485
10486 /**
10487  * SECTION:gbufferedinputstrea:
10488  * @short_description: Buffered Input Stream
10489  * @include: gio/gio.h
10490  * @see_also: #GFilterInputStream, #GInputStream
10491  *
10492  * Buffered input stream implements #GFilterInputStream and provides
10493  * for buffered reads.
10494  * By default, #GBufferedInputStream's buffer size is set at 4 kilobytes.
10495  * To create a buffered input stream, use g_buffered_input_stream_new(),
10496  * or g_buffered_input_stream_new_sized() to specify the buffer's size at
10497  * construction.
10498  * To get the size of a buffer within a buffered input stream, use
10499  * g_buffered_input_stream_get_buffer_size(). To change the size of a
10500  * buffered input stream's buffer, use
10501  * g_buffered_input_stream_set_buffer_size(). Note that the buffer's size
10502  * cannot be reduced below the size of the data within the buffer.
10503  */
10504
10505
10506 /**
10507  * SECTION:gbufferedoutputstrea:
10508  * @short_description: Buffered Output Stream
10509  * @include: gio/gio.h
10510  * @see_also: #GFilterOutputStream, #GOutputStream
10511  *
10512  * Buffered output stream implements #GFilterOutputStream and provides
10513  * for buffered writes.
10514  * By default, #GBufferedOutputStream's buffer size is set at 4 kilobytes.
10515  * To create a buffered output stream, use g_buffered_output_stream_new(),
10516  * or g_buffered_output_stream_new_sized() to specify the buffer's size
10517  * at construction.
10518  * To get the size of a buffer within a buffered input stream, use
10519  * g_buffered_output_stream_get_buffer_size(). To change the size of a
10520  * buffered output stream's buffer, use
10521  * g_buffered_output_stream_set_buffer_size(). Note that the buffer's
10522  * size cannot be reduced below the size of the data within the buffer.
10523  */
10524
10525
10526 /**
10527  * SECTION:gcancellabl:
10528  * @short_description: Thread-safe Operation Cancellation Stack
10529  * @include: gio/gio.h
10530  *
10531  * GCancellable is a thread-safe operation cancellation stack used
10532  * throughout GIO to allow for cancellation of synchronous and
10533  * asynchronous operations.
10534  */
10535
10536
10537 /**
10538  * SECTION:gcharsetconverte:
10539  * @short_description: Convert between charsets
10540  * @include: gio/gio.h
10541  *
10542  * #GCharsetConverter is an implementation of #GConverter based on
10543  * GIConv.
10544  */
10545
10546
10547 /**
10548  * SECTION:gcontenttyp:
10549  * @short_description: Platform-specific content typing
10550  * @include: gio/gio.h
10551  *
10552  * A content type is a platform specific string that defines the type
10553  * of a file. On unix it is a mime type, on win32 it is an extension string
10554  * like ".doc", ".txt" or a percieved string like "audio". Such strings
10555  * can be looked up in the registry at HKEY_CLASSES_ROOT.
10556  */
10557
10558
10559 /**
10560  * SECTION:gconverte:
10561  * @short_description: Data conversion interface
10562  * @include: gio/gio.h
10563  * @see_also: #GInputStream, #GOutputStream
10564  *
10565  * #GConverter is implemented by objects that convert
10566  * binary data in various ways. The conversion can be
10567  * stateful and may fail at any place.
10568  * compression, decompression and regular expression
10569  * replace.
10570  *
10571  * Some example conversions are: character set conversion,
10572  * Since: 2.24
10573  */
10574
10575
10576 /**
10577  * SECTION:gconverterinputstrea:
10578  * @short_description: Converter Input Stream
10579  * @include: gio/gio.h
10580  * @see_also: #GInputStream, #GConverter
10581  *
10582  * Converter input stream implements #GInputStream and allows
10583  * conversion of data of various types during reading.
10584  */
10585
10586
10587 /**
10588  * SECTION:gconverteroutputstrea:
10589  * @short_description: Converter Output Stream
10590  * @include: gio/gio.h
10591  * @see_also: #GOutputStream, #GConverter
10592  *
10593  * Converter output stream implements #GOutputStream and allows
10594  * conversion of data of various types during reading.
10595  */
10596
10597
10598 /**
10599  * SECTION:gcredential:
10600  * @short_description: An object containing credentials
10601  * @include: gio/gio.h
10602  *
10603  * The #GCredentials type is a reference-counted wrapper for native
10604  * credentials. This information is typically used for identifying,
10605  * authenticating and authorizing other processes.
10606  * Some operating systems supports looking up the credentials of the
10607  * remote peer of a communication endpoint - see e.g.
10608  * g_socket_get_credentials().
10609  * Some operating systems supports securely sending and receiving
10610  * credentials over a Unix Domain Socket, see
10611  * #GUnixCredentialsMessage, g_unix_connection_send_credentials() and
10612  * g_unix_connection_receive_credentials() for details.
10613  * On Linux, the native credential type is a <type>struct ucred</type>
10614  * - see the
10615  * <citerefentry><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>
10616  * man page for details. This corresponds to
10617  * %G_CREDENTIALS_TYPE_LINUX_UCRED.
10618  * On FreeBSD, the native credential type is a <type>struct cmsgcred</type>.
10619  * This corresponds to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED.
10620  */
10621
10622
10623 /**
10624  * SECTION:gdatainputstrea:
10625  * @short_description: Data Input Stream
10626  * @include: gio/gio.h
10627  * @see_also: #GInputStream
10628  *
10629  * Data input stream implements #GInputStream and includes functions for
10630  * reading structured data directly from a binary input stream.
10631  */
10632
10633
10634 /**
10635  * SECTION:gdataoutputstrea:
10636  * @short_description: Data Output Stream
10637  * @include: gio/gio.h
10638  * @see_also: #GOutputStream
10639  *
10640  * Data output stream implements #GOutputStream and includes functions for
10641  * writing data directly to an output stream.
10642  */
10643
10644
10645 /**
10646  * SECTION:gdbusaddres:
10647  * @title: D-Bus Addresses
10648  * @short_description: D-Bus connection endpoints
10649  * @include: gio/gio.h
10650  *
10651  * Routines for working with D-Bus addresses. A D-Bus address is a string
10652  * like "unix:tmpdir=/tmp/my-app-name". The exact format of addresses
10653  * is explained in detail in the <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html&num;addresses">D-Bus specification</link>.
10654  */
10655
10656
10657 /**
10658  * SECTION:gdbusauthobserve:
10659  * @short_description: Object used for authenticating connections
10660  * @include: gio/gio.h
10661  *
10662  * The #GDBusAuthObserver type provides a mechanism for participating
10663  * in how a #GDBusServer (or a #GDBusConnection) authenticates remote
10664  * peers. Simply instantiate a #GDBusAuthObserver and connect to the
10665  * signals you are interested in. Note that new signals may be added
10666  * in the future
10667  * For example, if you only want to allow D-Bus connections from
10668  * processes owned by the same uid as the server, you would use a
10669  * signal handler like the following:
10670  * <example id="auth-observer"><title>Controlling Authentication</title><programlisting>
10671  * static gboolean
10672  * on_authorize_authenticated_peer (GDBusAuthObserver *observer,
10673  * GIOStream         *stream,
10674  * GCredentials      *credentials,
10675  * gpointer           user_data)
10676  * {
10677  * gboolean authorized;
10678  * authorized = FALSE;
10679  * if (credentials != NULL)
10680  * {
10681  * GCredentials *own_credentials;
10682  * own_credentials = g_credentials_new ();
10683  * if (g_credentials_is_same_user (credentials, own_credentials, NULL))
10684  * authorized = TRUE;
10685  * g_object_unref (own_credentials);
10686  * }
10687  * return authorized;
10688  * }
10689  * </programlisting></example>
10690  */
10691
10692
10693 /**
10694  * SECTION:gdbusconnectio:
10695  * @short_description: D-Bus Connections
10696  * @include: gio/gio.h
10697  *
10698  * The #GDBusConnection type is used for D-Bus connections to remote
10699  * peers such as a message buses. It is a low-level API that offers a
10700  * lot of flexibility. For instance, it lets you establish a connection
10701  * over any transport that can by represented as an #GIOStream.
10702  * This class is rarely used directly in D-Bus clients. If you are writing
10703  * an D-Bus client, it is often easier to use the g_bus_own_name(),
10704  * g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs.
10705  * <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>
10706  * <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>
10707  * <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>
10708  * <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>
10709  */
10710
10711
10712 /**
10713  * SECTION:gdbuserro:
10714  * @title: GDBusError
10715  * @short_description: Mapping D-Bus errors to and from GError
10716  * @include: gio/gio.h
10717  *
10718  * All facilities that return errors from remote methods (such as
10719  * g_dbus_connection_call_sync()) use #GError to represent both D-Bus
10720  * errors (e.g. errors returned from the other peer) and locally
10721  * in-process generated errors.
10722  * To check if a returned #GError is an error from a remote peer, use
10723  * g_dbus_error_is_remote_error(). To get the actual D-Bus error name,
10724  * use g_dbus_error_get_remote_error(). Before presenting an error,
10725  * always use g_dbus_error_strip_remote_error().
10726  * In addition, facilities used to return errors to a remote peer also
10727  * use #GError. See g_dbus_method_invocation_return_error() for
10728  * discussion about how the D-Bus error name is set.
10729  * Applications can associate a #GError error domain with a set of D-Bus errors in order to
10730  * automatically map from D-Bus errors to #GError and back. This
10731  * is typically done in the function returning the #GQuark for the
10732  * error domain:
10733  * <example id="error-registration"><title>Error Registration</title><programlisting>
10734  * /<!-- -->* foo-bar-error.h: *<!-- -->/
10735  * #define FOO_BAR_ERROR (foo_bar_error_quark ())
10736  * GQuark foo_bar_error_quark (void);
10737  * typedef enum
10738  * {
10739  * FOO_BAR_ERROR_FAILED,
10740  * FOO_BAR_ERROR_ANOTHER_ERROR,
10741  * FOO_BAR_ERROR_SOME_THIRD_ERROR,
10742  * } FooBarError;
10743  * /<!-- -->* foo-bar-error.c: *<!-- -->/
10744  * static const GDBusErrorEntry foo_bar_error_entries[] =
10745  * {
10746  * {FOO_BAR_ERROR_FAILED,           "org.project.Foo.Bar.Error.Failed"},
10747  * {FOO_BAR_ERROR_ANOTHER_ERROR,    "org.project.Foo.Bar.Error.AnotherError"},
10748  * {FOO_BAR_ERROR_SOME_THIRD_ERROR, "org.project.Foo.Bar.Error.SomeThirdError"},
10749  * };
10750  * GQuark
10751  * foo_bar_error_quark (void)
10752  * {
10753  * static volatile gsize quark_volatile = 0;
10754  * g_dbus_error_register_error_domain ("foo-bar-error-quark",
10755  * &quark_volatile,
10756  * foo_bar_error_entries,
10757  * G_N_ELEMENTS (foo_bar_error_entries));
10758  * G_STATIC_ASSERT (G_N_ELEMENTS (foo_bar_error_entries) - 1 == FOO_BAR_ERROR_SOME_THIRD_ERROR);
10759  * return (GQuark) quark_volatile;
10760  * }
10761  * </programlisting></example>
10762  * With this setup, a D-Bus peer can transparently pass e.g. %FOO_BAR_ERROR_ANOTHER_ERROR and
10763  * other peers will see the D-Bus error name <literal>org.project.Foo.Bar.Error.AnotherError</literal>.
10764  * If the other peer is using GDBus, the peer will see also %FOO_BAR_ERROR_ANOTHER_ERROR instead
10765  * of %G_IO_ERROR_DBUS_ERROR. Note that GDBus clients can still recover
10766  * <literal>org.project.Foo.Bar.Error.AnotherError</literal> using g_dbus_error_get_remote_error().
10767  * Note that errors in the %G_DBUS_ERROR error domain is intended only
10768  * for returning errors from a remote message bus process. Errors
10769  * generated locally in-process by e.g. #GDBusConnection is from the
10770  * %G_IO_ERROR domain.
10771  */
10772
10773
10774 /**
10775  * SECTION:gdbusintrospectio:
10776  * @title: D-Bus Introspection Data
10777  * @short_description: Node and interface description data structures
10778  * @include: gio/gio.h
10779  *
10780  * Various data structures and convenience routines to parse and
10781  * generate D-Bus introspection XML. Introspection information is
10782  * used when registering objects with g_dbus_connection_register_object().
10783  * The format of D-Bus introspection XML is specified in the
10784  * <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html&num;introspection-format">D-Bus specification</link>.
10785  */
10786
10787
10788 /**
10789  * SECTION:gdbusmessag:
10790  * @short_description: D-Bus Message
10791  * @include: gio/gio.h
10792  *
10793  * A type for representing D-Bus messages that can be sent or received
10794  * on a #GDBusConnection.
10795  */
10796
10797
10798 /**
10799  * SECTION:gdbusmethodinvocatio:
10800  * @short_description: Object for handling remote calls
10801  * @include: gio/gio.h
10802  *
10803  * Instances of the #GDBusMethodInvocation class are used when
10804  * handling D-Bus method calls. It provides a way to asynchronously
10805  * return results and errors.
10806  * The normal way to obtain a #GDBusMethodInvocation object is to receive
10807  * it as an argument to the handle_method_call() function in a
10808  * #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object().
10809  */
10810
10811
10812 /**
10813  * SECTION:gdbusnameownin:
10814  * @title: Owning Bus Names
10815  * @short_description: Simple API for owning bus names
10816  * @include: gio/gio.h
10817  *
10818  * Convenience API for owning bus names.
10819  * <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>
10820  */
10821
10822
10823 /**
10824  * SECTION:gdbusnamewatchin:
10825  * @title: Watching Bus Names
10826  * @short_description: Simple API for watching bus names
10827  * @include: gio/gio.h
10828  *
10829  * Convenience API for watching bus names.
10830  * <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>
10831  */
10832
10833
10834 /**
10835  * SECTION:gdbusprox:
10836  * @short_description: Client-side proxies
10837  * @include: gio/gio.h
10838  *
10839  * #GDBusProxy is a base class used for proxies to access a D-Bus
10840  * interface on a remote object. A #GDBusProxy can be constructed for
10841  * both well-known and unique names.
10842  * By default, #GDBusProxy will cache all properties (and listen to
10843  * changes) of the remote object, and proxy all signals that gets
10844  * emitted. This behaviour can be changed by passing suitable
10845  * #GDBusProxyFlags when the proxy is created. If the proxy is for a
10846  * well-known name, the property cache is flushed when the name owner
10847  * vanishes and reloaded when a name owner appears.
10848  * If a #GDBusProxy is used for a well-known name, the owner of the
10849  * name is tracked and can be read from
10850  * #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to
10851  * get notified of changes. Additionally, only signals and property
10852  * changes emitted from the current name owner are considered and
10853  * calls are always sent to the current name owner. This avoids a
10854  * number of race conditions when the name is lost by one owner and
10855  * claimed by another. However, if no name owner currently exists,
10856  * then calls will be sent to the well-known name which may result in
10857  * the message bus launching an owner (unless
10858  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set).
10859  * The generic #GDBusProxy::g-properties-changed and #GDBusProxy::g-signal
10860  * signals are not very convenient to work with. Therefore, the recommended
10861  * way of working with proxies is to subclass #GDBusProxy, and have
10862  * more natural properties and signals in your derived class.
10863  * See <xref linkend="gdbus-example-proxy-subclass"/> for an example.
10864  * <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>
10865  */
10866
10867
10868 /**
10869  * SECTION:gdbusserve:
10870  * @short_description: Helper for accepting connections
10871  * @include: gio/gio.h
10872  *
10873  * #GDBusServer is a helper for listening to and accepting D-Bus
10874  * connections.
10875  * <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>
10876  */
10877
10878
10879 /**
10880  * SECTION:gdbusutil:
10881  * @title: D-Bus Utilities
10882  * @short_description: Various utilities related to D-Bus.
10883  * @include: gio/gio.h
10884  *
10885  * Various utility routines related to D-Bus.
10886  */
10887
10888
10889 /**
10890  * SECTION:gdesktopappinf:
10891  * @title: GDesktopAppInfo
10892  * @short_description: Application information from desktop files
10893  * @include: gio/gdesktopappinfo.h
10894  *
10895  * #GDesktopAppInfo is an implementation of #GAppInfo based on
10896  * desktop files.
10897  * Note that <filename>&lt;gio/gdesktopappinfo.h&gt;</filename> belongs to
10898  * the UNIX-specific GIO interfaces, thus you have to use the
10899  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
10900  */
10901
10902
10903 /**
10904  * SECTION:gdriv:
10905  * @short_description: Drive management
10906  * @include: gio/gio.h
10907  *
10908  * #GDrive - this represent a piece of hardware connected to the machine.
10909  * It's generally only created for removable hardware or hardware with
10910  * removable media.
10911  * #GDrive is a container class for #GVolume objects that stem from
10912  * the same piece of media. As such, #GDrive abstracts a drive with
10913  * (or without) removable media and provides operations for querying
10914  * whether media is available, determing whether media change is
10915  * automatically detected and ejecting the media.
10916  * If the #GDrive reports that media isn't automatically detected, one
10917  * can poll for media; typically one should not do this periodically
10918  * as a poll for media operation is potententially expensive and may
10919  * spin up the drive creating noise.
10920  * #GDrive supports starting and stopping drives with authentication
10921  * support for the former. This can be used to support a diverse set
10922  * of use cases including connecting/disconnecting iSCSI devices,
10923  * powering down external disk enclosures and starting/stopping
10924  * multi-disk devices such as RAID devices. Note that the actual
10925  * semantics and side-effects of starting/stopping a #GDrive may vary
10926  * according to implementation. To choose the correct verbs in e.g. a
10927  * file manager, use g_drive_get_start_stop_type().
10928  * For porting from GnomeVFS note that there is no equivalent of
10929  * #GDrive in that API.
10930  */
10931
10932
10933 /**
10934  * SECTION:gemble:
10935  * @short_description: An object for emblems
10936  * @include: gio/gio.h
10937  * @see_also: #GIcon, #GEmblemedIcon, #GLoadableIcon, #GThemedIcon
10938  *
10939  * #GEmblem is an implementation of #GIcon that supports
10940  * having an emblem, which is an icon with additional properties.
10941  * It can than be added to a #GEmblemedIcon.
10942  * Currently, only metainformation about the emblem's origin is
10943  * supported. More may be added in the future.
10944  */
10945
10946
10947 /**
10948  * SECTION:gemblemedico:
10949  * @short_description: Icon with emblems
10950  * @include: gio/gio.h
10951  * @see_also: #GIcon, #GLoadableIcon, #GThemedIcon, #GEmblem
10952  *
10953  * #GEmblemedIcon is an implementation of #GIcon that supports
10954  * adding an emblem to an icon. Adding multiple emblems to an
10955  * icon is ensured via g_emblemed_icon_add_emblem().
10956  * Note that #GEmblemedIcon allows no control over the position
10957  * of the emblems. See also #GEmblem for more information.
10958  */
10959
10960
10961 /**
10962  * SECTION:gfil:
10963  * @short_description: File and Directory Handling
10964  * @include: gio/gio.h
10965  * @see_also: #GFileInfo, #GFileEnumerator
10966  *
10967  * #GFile is a high level abstraction for manipulating files on a
10968  * virtual file system. #GFile<!-- -->s are lightweight, immutable
10969  * objects that do no I/O upon creation. It is necessary to understand that
10970  * #GFile objects do not represent files, merely an identifier for a file. All
10971  * file content I/O is implemented as streaming operations (see #GInputStream and
10972  * #GOutputStream).
10973  * g_file_new_for_path() if you have a path.
10974  * g_file_new_for_uri() if you have a URI.
10975  * g_file_new_for_commandline_arg() for a command line argument.
10976  * g_file_parse_name() from a utf8 string gotten from g_file_get_parse_name().
10977  * One way to think of a #GFile is as an abstraction of a pathname. For normal
10978  * files the system pathname is what is stored internally, but as #GFile<!-- -->s
10979  * are extensible it could also be something else that corresponds to a pathname
10980  * in a userspace implementation of a filesystem.
10981  * #GFile<!-- -->s make up hierarchies of directories and files that correspond to the
10982  * files on a filesystem. You can move through the file system with #GFile using
10983  * g_file_get_parent() to get an identifier for the parent directory, g_file_get_child()
10984  * to get a child within a directory, g_file_resolve_relative_path() to resolve a relative
10985  * path between two #GFile<!-- -->s. There can be multiple hierarchies, so you may not
10986  * end up at the same root if you repeatedly call g_file_get_parent() on two different
10987  * files.
10988  * All #GFile<!-- -->s have a basename (get with g_file_get_basename()). These names
10989  * are byte strings that are used to identify the file on the filesystem (relative to
10990  * its parent directory) and there is no guarantees that they have any particular charset
10991  * encoding or even make any sense at all. If you want to use filenames in a user
10992  * interface you should use the display name that you can get by requesting the
10993  * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info().
10994  * This is guaranteed to be in utf8 and can be used in a user interface. But always
10995  * store the real basename or the #GFile to use to actually access the file, because
10996  * there is no way to go from a display name to the actual name.
10997  * Using #GFile as an identifier has the same weaknesses as using a path in that
10998  * there may be multiple aliases for the same file. For instance, hard or
10999  * soft links may cause two different #GFile<!-- -->s to refer to the same file.
11000  * and long names on Fat/NTFS, or bind mounts in Linux. If you want to check if
11001  * two #GFile<!-- -->s point to the same file you can query for the
11002  * %G_FILE_ATTRIBUTE_ID_FILE attribute. Note that #GFile does some trivial
11003  * canonicalization of pathnames passed in, so that trivial differences in the
11004  * path string used at creation (duplicated slashes, slash at end of path, "."
11005  * or ".." path segments, etc) does not create different #GFile<!-- -->s.
11006  * Many #GFile operations have both synchronous and asynchronous versions
11007  * to suit your application. Asynchronous versions of synchronous functions
11008  * simply have _async() appended to their function names. The asynchronous
11009  * I/O functions call a #GAsyncReadyCallback which is then used to finalize
11010  * the operation, producing a GAsyncResult which is then passed to the
11011  * function's matching _finish() operation.
11012  * Some #GFile operations do not have synchronous analogs, as they may
11013  * take a very long time to finish, and blocking may leave an application
11014  * unusable. Notable cases include:
11015  * g_file_mount_mountable() to mount a mountable file.
11016  * g_file_unmount_mountable_with_operation() to unmount a mountable file.
11017  * g_file_eject_mountable_with_operation() to eject a mountable file.
11018  * <para id="gfile-etag"><indexterm><primary>entity tag</primary></indexterm>
11019  * One notable feature of #GFile<!-- -->s are entity tags, or "etags" for
11020  * short. Entity tags are somewhat like a more abstract version of the
11021  * traditional mtime, and can be used to quickly determine if the file has
11022  * been modified from the version on the file system. See the HTTP 1.1
11023  * <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">specification</ulink>
11024  * for HTTP Etag headers, which are a very similar concept.
11025  * </para>
11026  *
11027  * To construct a #gfile, you can use:
11028  * Other possible causes for aliases are: case insensitive filesystems, short
11029  */
11030
11031
11032 /**
11033  * SECTION:gfileattribut:
11034  * @short_description: Key-Value Paired File Attributes
11035  * @include: gio/gio.h
11036  * @see_also: #GFile, #GFileInfo
11037  *
11038  * File attributes in GIO consist of a list of key-value pairs.
11039  * Keys are strings that contain a key namespace and a key name, separated
11040  * by a colon, e.g. "namespace:keyname". Namespaces are included to sort
11041  * key-value pairs by namespaces for relevance. Keys can be retrived
11042  * using wildcards, e.g. "standard::*" will return all of the keys in the
11043  * "standard" namespace.
11044  * Values are stored within the list in #GFileAttributeValue structures.
11045  * Values can store different types, listed in the enum #GFileAttributeType.
11046  * Upon creation of a #GFileAttributeValue, the type will be set to
11047  * %G_FILE_ATTRIBUTE_TYPE_INVALID.
11048  * The list of possible attributes for a filesystem (pointed to by a #GFile) is
11049  * availible as a #GFileAttributeInfoList. This list is queryable by key names
11050  * as indicated earlier.
11051  * Classes that implement #GFileIface will create a #GFileAttributeInfoList and
11052  * install default keys and values for their given file system, architecture,
11053  * and other possible implementation details (e.g., on a UNIX system, a file
11054  * attribute key will be registered for the user id for a given file).
11055  * <para>
11056  * <table>
11057  * <title>GFileAttributes Default Namespaces</title>
11058  * <tgroup cols='2' align='left'><thead>
11059  * <row><entry>Namspace</entry><entry>Description</entry></row>
11060  * </thead>
11061  * <tbody>
11062  * <row><entry>"standard"</entry><entry>The "Standard" namespace. General file
11063  * information that any application may need should be put in this namespace.
11064  * Examples include the file's name, type, and size.</entry></row>
11065  * <row><entry>"etag"</entry><entry>The <link linkend="gfile-etag">"Entity Tag"</link>
11066  * namespace. Currently, the only key in this namespace is "value", which contains
11067  * the value of the current entity tag.</entry></row>
11068  * <row><entry>"id"</entry><entry>The "Identification" namespace. This
11069  * namespace is used by file managers and applications that list directories
11070  * to check for loops and to uniquely identify files.</entry></row>
11071  * <row><entry>"access"</entry><entry>The "Access" namespace. Used to check
11072  * if a user has the proper privilidges to access files and perform
11073  * file operations. Keys in this namespace are made to be generic
11074  * and easily understood, e.g. the "can_read" key is %TRUE if
11075  * the current user has permission to read the file. UNIX permissions and
11076  * NTFS ACLs in Windows should be mapped to these values.</entry></row>
11077  * <row><entry>"mountable"</entry><entry>The "Mountable" namespace. Includes
11078  * simple boolean keys for checking if a file or path supports mount operations, e.g.
11079  * mount, unmount, eject. These are used for files of type %G_FILE_TYPE_MOUNTABLE.</entry></row>
11080  * <row><entry>"time"</entry><entry>The "Time" namespace. Includes file
11081  * access, changed, created times. </entry></row>
11082  * <row><entry>"unix"</entry><entry>The "Unix" namespace. Includes UNIX-specific
11083  * information and may not be available for all files. Examples include
11084  * the UNIX "UID", "GID", etc.</entry></row>
11085  * <row><entry>"dos"</entry><entry>The "DOS" namespace. Includes DOS-specific
11086  * information and may not be available for all files. Examples include
11087  * "is_system" for checking if a file is marked as a system file, and "is_archive"
11088  * for checking if a file is marked as an archive file.</entry></row>
11089  * <row><entry>"owner"</entry><entry>The "Owner" namespace. Includes information
11090  * about who owns a file. May not be available for all file systems. Examples include
11091  * "user" for getting the user name of the file owner. This information is often mapped from
11092  * some backend specific data such as a unix UID.</entry></row>
11093  * <row><entry>"thumbnail"</entry><entry>The "Thumbnail" namespace. Includes
11094  * information about file thumbnails and their location within the file system. Exaples of
11095  * keys in this namespace include "path" to get the location of a thumbnail, and "failed"
11096  * to check if thumbnailing of the file failed.</entry></row>
11097  * <row><entry>"filesystem"</entry><entry>The "Filesystem" namespace. Gets information
11098  * about the file system where a file is located, such as its type, how much
11099  * space is left available, and the overall size of the file system.</entry></row>
11100  * <row><entry>"gvfs"</entry><entry>The "GVFS" namespace. Keys in this namespace
11101  * contain information about the current GVFS backend in use. </entry></row>
11102  * <row><entry>"xattr"</entry><entry>The "xattr" namespace. Gets information
11103  * about extended user attributes. See attr(5). The "user." prefix of the
11104  * extended user attribute name is stripped away when constructing keys in
11105  * this namespace, e.g. "xattr::mime_type" for the extended attribute with
11106  * the name "user.mime_type". Note that this information is only available
11107  * if GLib has been built with extended attribute support.</entry></row>
11108  * <row><entry>"xattr-sys"</entry><entry>The "xattr-sys" namespace.
11109  * Gets information about extended attributes which are not user-specific.
11110  * See attr(5). Note that this information is only available if GLib
11111  * has been built with extended attribute support.</entry></row>
11112  * <row><entry>"selinux"</entry><entry>The "SELinux" namespace. Includes
11113  * information about the SELinux context of files. Note that this information
11114  * is only available if GLib has been built with SELinux support.</entry></row>
11115  * </tbody>
11116  * </tgroup>
11117  * </table>
11118  * </para>
11119  * Please note that these are not all of the possible namespaces.
11120  * More namespaces can be added from GIO modules or by individual applications.
11121  * For more information about writing GIO modules, see #GIOModule.
11122  * <!-- TODO: Implementation note about using extended attributes on supported
11123  * file systems -->
11124  * <para><table>
11125  * <title>GFileAttributes Built-in Keys and Value Types</title>
11126  * <tgroup cols='3' align='left'><thead>
11127  * <row><entry>Enum Value</entry><entry>Namespace:Key</entry><entry>Value Type</entry></row>
11128  * </thead><tbody>
11129  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TYPE</entry><entry>standard::type</entry><entry>uint32 (#GFileType)</entry></row>
11130  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</entry><entry>standard::is-hidden</entry><entry>boolean</entry></row>
11131  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP</entry><entry>standard::is-backup</entry><entry>boolean</entry></row>
11132  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</entry><entry>standard::is-symlink</entry><entry>boolean</entry></row>
11133  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</entry><entry>standard::is-virtual</entry><entry>boolean</entry></row>
11134  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_NAME</entry><entry>standard::name</entry><entry>byte string</entry></row>
11135  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</entry><entry>standard::display-name</entry><entry>string</entry></row>
11136  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</entry><entry>standard::edit-name</entry><entry>string</entry></row>
11137  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ICON</entry><entry>standard::icon</entry><entry>object (#GIcon)</entry></row>
11138  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</entry><entry>standard::content-type</entry><entry>string</entry></row>
11139  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</entry><entry>standard::fast-content-type</entry><entry>string</entry></row>
11140  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SIZE</entry><entry>standard::size</entry><entry>uint64</entry></row>
11141  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE</entry><entry>standard::allocated-size</entry><entry>uint64</entry></row>
11142  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</entry><entry>standard::symlink-target</entry><entry>byte string</entry></row>
11143  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TARGET_URI</entry><entry>standard::target-uri</entry><entry>string</entry></row>
11144  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER</entry><entry>standard::sort-order</entry><entry>int32</entry></row>
11145  * <row><entry>%G_FILE_ATTRIBUTE_ETAG_VALUE</entry><entry>etag::value</entry><entry>string</entry></row>
11146  * <row><entry>%G_FILE_ATTRIBUTE_ID_FILE</entry><entry>id::file</entry><entry>string</entry></row>
11147  * <row><entry>%G_FILE_ATTRIBUTE_ID_FILESYSTEM</entry><entry>id::filesystem</entry><entry>string</entry></row>
11148  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_READ</entry><entry>access::can-read</entry><entry>boolean</entry></row>
11149  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE</entry><entry>access::can-write</entry><entry>boolean</entry></row>
11150  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</entry><entry>access::can-execute</entry><entry>boolean</entry></row>
11151  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE</entry><entry>access::can-delete</entry><entry>boolean</entry></row>
11152  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH</entry><entry>access::can-trash</entry><entry>boolean</entry></row>
11153  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME</entry><entry>access::can-rename</entry><entry>boolean</entry></row>
11154  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</entry><entry>mountable::can-mount</entry><entry>boolean</entry></row>
11155  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</entry><entry>mountable::can-unmount</entry><entry>boolean</entry></row>
11156  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</entry><entry>mountable::can-eject</entry><entry>boolean</entry></row>
11157  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</entry><entry>mountable::unix-device</entry><entry>uint32</entry></row>
11158  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE</entry><entry>mountable::unix-device-file</entry><entry>string</entry></row>
11159  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</entry><entry>mountable::hal-udi</entry><entry>string</entry></row>
11160  * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED</entry><entry>time::modified</entry><entry>uint64</entry></row>
11161  * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC</entry><entry>time::modified-usec</entry><entry>uint32</entry></row>
11162  * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS</entry><entry>time::access</entry><entry>uint64</entry></row>
11163  * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS_USEC</entry><entry>time::access-usec</entry><entry>uint32</entry></row>
11164  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED</entry><entry>time::changed</entry><entry>uint64</entry></row>
11165  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED_USEC</entry><entry>time::changed-usec</entry><entry>uint32</entry></row>
11166  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED</entry><entry>time::created</entry><entry>uint64</entry></row>
11167  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED_USEC</entry><entry>time::created-usec</entry><entry>uint32</entry></row>
11168  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_DEVICE</entry><entry>unix::device</entry><entry>uint32</entry></row>
11169  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_INODE</entry><entry>unix::inode</entry><entry>uint64</entry></row>
11170  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_MODE</entry><entry>unix::mode</entry><entry>uint32</entry></row>
11171  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_NLINK</entry><entry>unix::nlink</entry><entry>uint32</entry></row>
11172  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_UID</entry><entry>unix::uid</entry><entry>uint32</entry></row>
11173  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_GID</entry><entry>unix::gid</entry><entry>uint32</entry></row>
11174  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_RDEV</entry><entry>unix::rdev</entry><entry>uint32</entry></row>
11175  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</entry><entry>unix::block-size</entry><entry>uint32</entry></row>
11176  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCKS</entry><entry>unix::blocks</entry><entry>uint64</entry></row>
11177  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</entry><entry>unix::is-mountpoint</entry><entry>boolean</entry></row>
11178  * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE</entry><entry>dos::is-archive</entry><entry>boolean</entry></row>
11179  * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_SYSTEM</entry><entry>dos::is-system</entry><entry>boolean</entry></row>
11180  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER</entry><entry>owner::user</entry><entry>string</entry></row>
11181  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER_REAL</entry><entry>owner::user-real</entry><entry>string</entry></row>
11182  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_GROUP</entry><entry>owner::group</entry><entry>string</entry></row>
11183  * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAIL_PATH</entry><entry>thumbnail::path</entry><entry>bytestring</entry></row>
11184  * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAILING_FAILED</entry><entry>thumbnail::failed</entry><entry>boolean</entry></row>
11185  * <row><entry>%G_FILE_ATTRIBUTE_PREVIEW_ICON</entry><entry>preview::icon</entry><entry>object (#GIcon)</entry></row>
11186  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_SIZE</entry><entry>filesystem::size</entry><entry>uint64</entry></row>
11187  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_FREE</entry><entry>filesystem::free</entry><entry>uint64</entry></row>
11188  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_TYPE</entry><entry>filesystem::type</entry><entry>string</entry></row>
11189  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_READONLY</entry><entry>filesystem::readonly</entry><entry>boolean</entry></row>
11190  * <row><entry>%G_FILE_ATTRIBUTE_GVFS_BACKEND</entry><entry>gvfs::backend</entry><entry>string</entry></row>
11191  * <row><entry>%G_FILE_ATTRIBUTE_SELINUX_CONTEXT</entry><entry>selinux::context</entry><entry>string</entry></row>
11192  * </tbody></tgroup></table></para>
11193  * Note that there are no predefined keys in the "xattr" and "xattr-sys"
11194  * namespaces. Keys for the "xattr" namespace are constructed by stripping
11195  * away the "user." prefix from the extended user attribute, and prepending
11196  * "xattr::". Keys for the "xattr-sys" namespace are constructed by
11197  * concatenating "xattr-sys::" with the extended attribute name. All extended
11198  * attribute values are returned as hex-encoded strings in which bytes outside
11199  * the ASCII range are encoded as hexadecimal escape sequences of the form
11200  * \x<replaceable>nn</replaceable>.
11201  */
11202
11203
11204 /**
11205  * SECTION:gfiledescriptorbase:
11206  * @short_description: Interface for file descriptor based IO
11207  * @include: gio/gfiledescriptorbased.h
11208  * @see_also: #GInputStream, #GOutputStream
11209  *
11210  * #GFileDescriptorBased is implemented by streams (implementations of
11211  * #GInputStream or #GOutputStream) that are based on file descriptors.
11212  * Note that <filename>&lt;gio/gfiledescriptorbased.h&gt;</filename> belongs to
11213  * the UNIX-specific GIO interfaces, thus you have to use the
11214  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
11215  *
11216  * Since: 2.24
11217  */
11218
11219
11220 /**
11221  * SECTION:gfileenumerato:
11222  * @short_description: Enumerated Files Routines
11223  * @include: gio/gio.h
11224  *
11225  * #GFileEnumerator allows you to operate on a set of #GFile<!-- -->s,
11226  * returning a #GFileInfo structure for each file enumerated (e.g.
11227  * g_file_enumerate_children() will return a #GFileEnumerator for each
11228  * of the children within a directory).
11229  * To get the next file's information from a #GFileEnumerator, use
11230  * g_file_enumerator_next_file() or its asynchronous version,
11231  * g_file_enumerator_next_files_async(). Note that the asynchronous
11232  * version will return a list of #GFileInfo<!---->s, whereas the
11233  * synchronous will only return the next file in the enumerator.
11234  * To close a #GFileEnumerator, use g_file_enumerator_close(), or
11235  * its asynchronous version, g_file_enumerator_close_async(). Once
11236  * a #GFileEnumerator is closed, no further actions may be performed
11237  * on it, and it should be freed with g_object_unref().
11238  */
11239
11240
11241 /**
11242  * SECTION:gfileico:
11243  * @short_description: Icons pointing to an image file
11244  * @include: gio/gio.h
11245  * @see_also: #GIcon, #GLoadableIcon
11246  *
11247  * #GFileIcon specifies an icon by pointing to an image file
11248  * to be used as icon.
11249  */
11250
11251
11252 /**
11253  * SECTION:gfileinf:
11254  * @short_description: File Information and Attributes
11255  * @include: gio/gio.h
11256  * @see_also: #GFile, <link linkend="gio-GFileAttribute">GFileAttribute</link>
11257  *
11258  * Functionality for manipulating basic metadata for files. #GFileInfo
11259  * implements methods for getting information that all files should
11260  * contain, and allows for manipulation of extended attributes.
11261  * See <link linkend="gio-GFileAttribute">GFileAttribute</link> for more
11262  * information on how GIO handles file attributes.
11263  * To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its
11264  * async variant). To obtain a #GFileInfo for a file input or output
11265  * stream, use g_file_input_stream_query_info() or
11266  * g_file_output_stream_query_info() (or their async variants).
11267  * To change the actual attributes of a file, you should then set the
11268  * attribute in the #GFileInfo and call g_file_set_attributes_from_info()
11269  * or g_file_set_attributes_async() on a GFile.
11270  * However, not all attributes can be changed in the file. For instance,
11271  * the actual size of a file cannot be changed via g_file_info_set_size().
11272  * You may call g_file_query_settable_attributes() and
11273  * g_file_query_writable_namespaces() to discover the settable attributes
11274  * of a particular file at runtime.
11275  * #GFileAttributeMatcher allows for searching through a #GFileInfo for
11276  * attributes.
11277  */
11278
11279
11280 /**
11281  * SECTION:gfileinputstrea:
11282  * @short_description: File input streaming operations
11283  * @include: gio/gio.h
11284  * @see_also: #GInputStream, #GDataInputStream, #GSeekable
11285  *
11286  * GFileInputStream provides input streams that take their
11287  * content from a file.
11288  * GFileInputStream implements #GSeekable, which allows the input
11289  * stream to jump to arbitrary positions in the file, provided the
11290  * filesystem of the file allows it. To find the position of a file
11291  * input stream, use g_seekable_tell(). To find out if a file input
11292  * stream supports seeking, use g_seekable_stream_can_seek().
11293  * To position a file input stream, use g_seekable_seek().
11294  */
11295
11296
11297 /**
11298  * SECTION:gfileiostrea:
11299  * @short_description: File read and write streaming operations
11300  * @include: gio/gio.h
11301  * @see_also: #GIOStream, #GFileInputStream, #GFileOutputStream, #GSeekable
11302  *
11303  * GFileIOStream provides io streams that both read and write to the same
11304  * file handle.
11305  * GFileIOStream implements #GSeekable, which allows the io
11306  * stream to jump to arbitrary positions in the file and to truncate
11307  * the file, provided the filesystem of the file supports these
11308  * operations.
11309  * To find the position of a file io stream, use
11310  * g_seekable_tell().
11311  * To find out if a file io stream supports seeking, use g_seekable_can_seek().
11312  * To position a file io stream, use g_seekable_seek().
11313  * To find out if a file io stream supports truncating, use
11314  * g_seekable_can_truncate(). To truncate a file io
11315  * stream, use g_seekable_truncate().
11316  * The default implementation of all the #GFileIOStream operations
11317  * and the implementation of #GSeekable just call into the same operations
11318  * on the output stream.
11319  *
11320  * Since: 2.22
11321  */
11322
11323
11324 /**
11325  * SECTION:gfilemonito:
11326  * @short_description: File Monitor
11327  * @include: gio/gio.h
11328  *
11329  * Monitors a file or directory for changes.
11330  * To obtain a #GFileMonitor for a file or directory, use
11331  * g_file_monitor(), g_file_monitor_file(), or
11332  * g_file_monitor_directory().
11333  * To get informed about changes to the file or directory you are
11334  * monitoring, connect to the #GFileMonitor::changed signal. The
11335  * signal will be emitted in the <link
11336  * linkend="g-main-context-push-thread-default">thread-default main
11337  * context</link> of the thread that the monitor was created in
11338  * (though if the global default main context is blocked, this may
11339  * cause notifications to be blocked even if the thread-default
11340  * context is still running).
11341  */
11342
11343
11344 /**
11345  * SECTION:gfilenamecomplete:
11346  * @short_description: Filename Completer
11347  * @include: gio/gio.h
11348  *
11349  * Completes partial file and directory names given a partial string by
11350  * looking in the file system for clues. Can return a list of possible
11351  * completion strings for widget implementations.
11352  */
11353
11354
11355 /**
11356  * SECTION:gfileoutputstrea:
11357  * @short_description: File output streaming operations
11358  * @include: gio/gio.h
11359  * @see_also: #GOutputStream, #GDataOutputStream, #GSeekable
11360  *
11361  * GFileOutputStream provides output streams that write their
11362  * content to a file.
11363  * GFileOutputStream implements #GSeekable, which allows the output
11364  * stream to jump to arbitrary positions in the file and to truncate
11365  * the file, provided the filesystem of the file supports these
11366  * operations.
11367  * To find the position of a file output stream, use g_seekable_tell().
11368  * To find out if a file output stream supports seeking, use
11369  * g_seekable_can_seek().To position a file output stream, use
11370  * g_seekable_seek(). To find out if a file output stream supports
11371  * truncating, use g_seekable_can_truncate(). To truncate a file output
11372  * stream, use g_seekable_truncate().
11373  */
11374
11375
11376 /**
11377  * SECTION:gfilterinputstrea:
11378  * @short_description: Filter Input Stream
11379  * @include: gio/gio.h
11380  *
11381  * Base class for input stream implementations that perform some
11382  * kind of filtering operation on a base stream. Typical examples
11383  * of filtering operations are character set conversion, compression
11384  * and byte order flipping.
11385  */
11386
11387
11388 /**
11389  * SECTION:gfilteroutputstrea:
11390  * @short_description: Filter Output Stream
11391  * @include: gio/gio.h
11392  *
11393  * Base class for output stream implementations that perform some
11394  * kind of filtering operation on a base stream. Typical examples
11395  * of filtering operations are character set conversion, compression
11396  * and byte order flipping.
11397  */
11398
11399
11400 /**
11401  * SECTION:gico:
11402  * @short_description: Interface for icons
11403  * @include: gio/gio.h
11404  *
11405  * #GIcon is a very minimal interface for icons. It provides functions
11406  * for checking the equality of two icons, hashing of icons and
11407  * serializing an icon to and from strings.
11408  * #GIcon does not provide the actual pixmap for the icon as this is out
11409  * of GIO's scope, however implementations of #GIcon may contain the name
11410  * of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon).
11411  * To obtain a hash of a #GIcon, see g_icon_hash().
11412  * To check if two #GIcons are equal, see g_icon_equal().
11413  * For serializing a #GIcon, use g_icon_to_string() and
11414  * g_icon_new_for_string().
11415  * If your application or library provides one or more #GIcon
11416  * implementations you need to ensure that each #GType is registered
11417  * with the type system prior to calling g_icon_new_for_string().
11418  */
11419
11420
11421 /**
11422  * SECTION:ginetaddres:
11423  * @short_description: An IPv4/IPv6 address
11424  *
11425  * #GInetAddress represents an IPv4 or IPv6 internet address. Use
11426  * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_async() to
11427  * look up the #GInetAddress for a hostname. Use
11428  * g_resolver_lookup_by_address() or
11429  * g_resolver_lookup_by_address_async() to look up the hostname for a
11430  * #GInetAddress.
11431  * To actually connect to a remote host, you will need a
11432  * #GInetSocketAddress (which includes a #GInetAddress as well as a
11433  * port number).
11434  */
11435
11436
11437 /**
11438  * SECTION:ginetsocketaddres:
11439  * @short_description: Internet GSocketAddress
11440  *
11441  * An IPv4 or IPv6 socket address; that is, the combination of a
11442  * #GInetAddress and a port number.
11443  */
11444
11445
11446 /**
11447  * SECTION:ginitabl:
11448  * @short_description: Failable object initialization interface
11449  * @include: gio/gio.h
11450  * @see_also: #GAsyncInitable
11451  *
11452  * #GInitable is implemented by objects that can fail during
11453  * initialization. If an object implements this interface the
11454  * g_initable_init() function must be called as the first thing
11455  * after construction. If g_initable_init() is not called, or if
11456  * it returns an error, all further operations on the object
11457  * should fail, generally with a %G_IO_ERROR_NOT_INITIALIZED error.
11458  * Users of objects implementing this are not intended to use
11459  * the interface method directly, instead it will be used automatically
11460  * in various ways. For C applications you generally just call
11461  * g_initable_new() directly, or indirectly via a foo_thing_new() wrapper.
11462  * This will call g_initable_init() under the cover, returning %NULL and
11463  * setting a %GError on failure.
11464  * For bindings in languages where the native constructor supports
11465  * exceptions the binding could check for objects implemention %GInitable
11466  * during normal construction and automatically initialize them, throwing
11467  * an exception on failure.
11468  */
11469
11470
11471 /**
11472  * SECTION:ginputstrea:
11473  * @short_description: Base class for implementing streaming input
11474  * @include: gio/gio.h
11475  *
11476  * GInputStream has functions to read from a stream (g_input_stream_read()),
11477  * to close a stream (g_input_stream_close()) and to skip some content
11478  * (g_input_stream_skip()).
11479  * To copy the content of an input stream to an output stream without
11480  * manually handling the reads and writes, use g_output_stream_splice().
11481  * All of these functions have async variants too.
11482  */
11483
11484
11485 /**
11486  * SECTION:gioerro:
11487  * @short_description: Error helper functions
11488  * @include: gio/gio.h
11489  *
11490  * Contains helper functions for reporting errors to the user.
11491  */
11492
11493
11494 /**
11495  * SECTION:giomodul:
11496  * @short_description: Loadable GIO Modules
11497  * @include: gio/gio.h
11498  *
11499  * Provides an interface and default functions for loading and unloading
11500  * modules. This is used internally to make GIO extensible, but can also
11501  * be used by others to implement module loading.
11502  */
11503
11504
11505 /**
11506  * SECTION:gioschedule:
11507  * @short_description: I/O Scheduler
11508  * @include: gio/gio.h
11509  *
11510  * Schedules asynchronous I/O operations. #GIOScheduler integrates
11511  * into the main event loop (#GMainLoop) and may use threads if they
11512  * are available.
11513  * <para id="io-priority"><indexterm><primary>I/O priority</primary></indexterm>
11514  * Each I/O operation has a priority, and the scheduler uses the priorities
11515  * to determine the order in which operations are executed. They are
11516  * <emphasis>not</emphasis> used to determine system-wide I/O scheduling.
11517  * Priorities are integers, with lower numbers indicating higher priority.
11518  * It is recommended to choose priorities between %G_PRIORITY_LOW and
11519  * %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT as a default.
11520  * </para>
11521  */
11522
11523
11524 /**
11525  * SECTION:giostrea:
11526  * @short_description: Base class for implementing read/write streams
11527  * @include: gio/gio.h
11528  * @see_also: #GInputStream, #GOutputStream
11529  *
11530  * GIOStream represents an object that has both read and write streams.
11531  * Generally the two streams acts as separate input and output streams,
11532  * but they share some common resources and state. For instance, for
11533  * seekable streams they may use the same position in both streams.
11534  * Examples of #GIOStream objects are #GSocketConnection which represents
11535  * a two-way network connection, and #GFileIOStream which represent a
11536  * file handle opened in read-write mode.
11537  * To do the actual reading and writing you need to get the substreams
11538  * with g_io_stream_get_input_stream() and g_io_stream_get_output_stream().
11539  * The #GIOStream object owns the input and the output streams, not the other
11540  * way around, so keeping the substreams alive will not keep the #GIOStream
11541  * object alive. If the #GIOStream object is freed it will be closed, thus
11542  * closing the substream, so even if the substreams stay alive they will
11543  * always just return a %G_IO_ERROR_CLOSED for all operations.
11544  * To close a stream use g_io_stream_close() which will close the common
11545  * stream object and also the individual substreams. You can also close
11546  * the substreams themselves. In most cases this only marks the
11547  * substream as closed, so further I/O on it fails. However, some streams
11548  * may support "half-closed" states where one direction of the stream
11549  * is actually shut down.
11550  *
11551  * Since: 2.22
11552  */
11553
11554
11555 /**
11556  * SECTION:gloadableico:
11557  * @short_description: Loadable Icons
11558  * @include: gio/gio.h
11559  * @see_also: #GIcon, #GThemedIcon
11560  *
11561  * Extends the #GIcon interface and adds the ability to
11562  * load icons from streams.
11563  */
11564
11565
11566 /**
11567  * SECTION:gmemoryinputstrea:
11568  * @short_description: Streaming input operations on memory chunks
11569  * @include: gio/gio.h
11570  * @see_also: #GMemoryOutputStream
11571  *
11572  * #GMemoryInputStream is a class for using arbitrary
11573  * memory chunks as input for GIO streaming input operations.
11574  */
11575
11576
11577 /**
11578  * SECTION:gmemoryoutputstrea:
11579  * @short_description: Streaming output operations on memory chunks
11580  * @include: gio/gio.h
11581  * @see_also: #GMemoryInputStream
11582  *
11583  * #GMemoryOutputStream is a class for using arbitrary
11584  * memory chunks as output for GIO streaming output operations.
11585  */
11586
11587
11588 /**
11589  * SECTION:gmoun:
11590  * @short_description: Mount management
11591  * @include: gio/gio.h
11592  * @see_also: GVolume, GUnixMount
11593  *
11594  * The #GMount interface represents user-visible mounts. Note, when
11595  * porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.
11596  * #GMount is a "mounted" filesystem that you can access. Mounted is in
11597  * quotes because it's not the same as a unix mount, it might be a gvfs
11598  * mount, but you can still access the files on it if you use GIO. Might or
11599  * might not be related to a volume object.
11600  * Unmounting a #GMount instance is an asynchronous operation. For
11601  * more information about asynchronous operations, see #GAsyncReady
11602  * and #GSimpleAsyncReady. To unmount a #GMount instance, first call
11603  * g_mount_unmount_with_operation() with (at least) the #GMount instance and a
11604  * #GAsyncReadyCallback.  The callback will be fired when the
11605  * operation has resolved (either with success or failure), and a
11606  * #GAsyncReady structure will be passed to the callback.  That
11607  * callback should then call g_mount_unmount_with_operation_finish() with the #GMount
11608  * and the #GAsyncReady data to see if the operation was completed
11609  * successfully.  If an @error is present when g_mount_unmount_with_operation_finish()
11610  * is called, then it will be filled with any error information.
11611  */
11612
11613
11614 /**
11615  * SECTION:gmountoperatio:
11616  * @short_description: Object used for authentication and user interaction
11617  * @include: gio/gio.h
11618  *
11619  * #GMountOperation provides a mechanism for interacting with the user.
11620  * It can be used for authenticating mountable operations, such as loop
11621  * mounting files, hard drive partitions or server locations. It can
11622  * also be used to ask the user questions or show a list of applications
11623  * preventing unmount or eject operations from completing.
11624  * Note that #GMountOperation is used for more than just #GMount
11625  * objects â€“ for example it is also used in g_drive_start() and
11626  * g_drive_stop().
11627  * Users should instantiate a subclass of this that implements all the
11628  * various callbacks to show the required dialogs, such as
11629  * #GtkMountOperation. If no user interaction is desired (for example
11630  * when automounting filesystems at login time), usually %NULL can be
11631  * passed, see each method taking a #GMountOperation for details.
11632  */
11633
11634
11635 /**
11636  * SECTION:gnetworkaddres:
11637  * @short_description: A GSocketConnectable for resolving hostnames
11638  * @include: gio/gio.h
11639  *
11640  * #GNetworkAddress provides an easy way to resolve a hostname and
11641  * then attempt to connect to that host, handling the possibility of
11642  * multiple IP addresses and multiple address families.
11643  * See #GSocketConnectable for and example of using the connectable
11644  * interface.
11645  */
11646
11647
11648 /**
11649  * SECTION:gnetworkservic:
11650  * @short_description: A GSocketConnectable for resolving SRV records
11651  * @include: gio/gio.h
11652  *
11653  * Like #GNetworkAddress does with hostnames, #GNetworkService
11654  * provides an easy way to resolve a SRV record, and then attempt to
11655  * connect to one of the hosts that implements that service, handling
11656  * service priority/weighting, multiple IP addresses, and multiple
11657  * address families.
11658  * See #GSrvTarget for more information about SRV records, and see
11659  * #GSocketConnectable for and example of using the connectable
11660  * interface.
11661  */
11662
11663
11664 /**
11665  * SECTION:goutputstrea:
11666  * @short_description: Base class for implementing streaming output
11667  * @include: gio/gio.h
11668  *
11669  * GOutputStream has functions to write to a stream (g_output_stream_write()),
11670  * to close a stream (g_output_stream_close()) and to flush pending writes
11671  * (g_output_stream_flush()).
11672  * To copy the content of an input stream to an output stream without
11673  * manually handling the reads and writes, use g_output_stream_splice().
11674  * All of these functions have async variants too.
11675  */
11676
11677
11678 /**
11679  * SECTION:gpermissio:
11680  * @title: GPermission
11681  * @short_description: An object representing the permission to perform a certain action
11682  *
11683  * A #GPermission represents the status of the caller's permission to
11684  * perform a certain action.
11685  * You can query if the action is currently allowed and if it is
11686  * possible to acquire the permission so that the action will be allowed
11687  * in the future.
11688  * There is also an API to actually acquire the permission and one to
11689  * release it.
11690  * As an example, a #GPermission might represent the ability for the
11691  * user to write to a #GSettings object.  This #GPermission object could
11692  * then be used to decide if it is appropriate to show a "Click here to
11693  * unlock" button in a dialog and to provide the mechanism to invoke
11694  * when that button is clicked.
11695  */
11696
11697
11698 /**
11699  * SECTION:gpollableinputstrea:
11700  * @short_description: Interface for pollable input streams
11701  * @include: gio/gio.h
11702  * @see_also: #GInputStream, #GPollableOutputStream, #GFileDescriptorBased
11703  *
11704  * #GPollableInputStream is implemented by #GInputStream<!-- -->s that
11705  * can be polled for readiness to read. This can be used when
11706  * interfacing with a non-GIO API that expects
11707  * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
11708  *
11709  * Since: 2.28
11710  */
11711
11712
11713 /**
11714  * SECTION:gpollableoutputstrea:
11715  * @short_description: Interface for pollable output streams
11716  * @include: gio/gio.h
11717  * @see_also: #GOutputStream, #GFileDescriptorBased, #GPollableInputStream
11718  *
11719  * #GPollableOutputStream is implemented by #GOutputStream<!-- -->s that
11720  * can be polled for readiness to write. This can be used when
11721  * interfacing with a non-GIO API that expects
11722  * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
11723  *
11724  * Since: 2.28
11725  */
11726
11727
11728 /**
11729  * SECTION:gprox:
11730  * @short_description: Interface for proxy handling
11731  *
11732  * A #GProxy handles connecting to a remote host via a given type of
11733  * proxy server. It is implemented by the 'gio-proxy' extension point.
11734  * The extensions are named after their proxy protocol name. As an
11735  * example, a SOCKS5 proxy implementation can be retrieved with the
11736  * name 'socks5' using the function
11737  * g_io_extension_point_get_extension_by_name().
11738  *
11739  * Since: 2.26
11740  */
11741
11742
11743 /**
11744  * SECTION:gproxyaddres:
11745  * @short_description: An internet address with proxy information
11746  *
11747  * Support for proxied #GInetSocketAddress.
11748  */
11749
11750
11751 /**
11752  * SECTION:gproxyresolve:
11753  * @short_description: Asynchronous and cancellable network proxy resolver
11754  * @include: gio/gio.h
11755  *
11756  * #GProxyResolver provides synchronous and asynchronous network proxy
11757  * resolution. #GProxyResolver is used within #GClientSocket through
11758  * the method g_socket_connectable_proxy_enumerate().
11759  */
11760
11761
11762 /**
11763  * SECTION:gresolve:
11764  * @short_description: Asynchronous and cancellable DNS resolver
11765  * @include: gio/gio.h
11766  *
11767  * #GResolver provides cancellable synchronous and asynchronous DNS
11768  * resolution, for hostnames (g_resolver_lookup_by_address(),
11769  * g_resolver_lookup_by_name() and their async variants) and SRV
11770  * (service) records (g_resolver_lookup_service()).
11771  * #GNetworkAddress and #GNetworkService provide wrappers around
11772  * #GResolver functionality that also implement #GSocketConnectable,
11773  * making it easy to connect to a remote host/service.
11774  */
11775
11776
11777 /**
11778  * SECTION:gseekabl:
11779  * @short_description: Stream seeking interface
11780  * @include: gio/gio.h
11781  * @see_also: #GInputStream, #GOutputStream
11782  *
11783  * #GSeekable is implemented by streams (implementations of
11784  * #GInputStream or #GOutputStream) that support seeking.
11785  */
11786
11787
11788 /**
11789  * SECTION:gsetting:
11790  * @short_description: High-level API for application settings
11791  *
11792  * The #GSettings class provides a convenient API for storing and retrieving
11793  * application settings.
11794  * When creating a GSettings instance, you have to specify a schema
11795  * that describes the keys in your settings and their types and default
11796  * values, as well as some other information.
11797  * Normally, a schema has as fixed path that determines where the settings
11798  * are stored in the conceptual global tree of settings. However, schemas
11799  * can also be 'relocatable', i.e. not equipped with a fixed path. This is
11800  * useful e.g. when the schema describes an 'account', and you want to be
11801  * able to store a arbitrary number of accounts.
11802  * Unlike other configuration systems (like GConf), GSettings does not
11803  * restrict keys to basic types like strings and numbers. GSettings stores
11804  * values as #GVariant, and allows any #GVariantType for keys. Key names
11805  * are restricted to lowercase characters, numbers and '-'. Furthermore,
11806  * the names must begin with a lowercase character, must not end
11807  * with a '-', and must not contain consecutive dashes. Key names can
11808  * be up to 32 characters long.
11809  * Similar to GConf, the default values in GSettings schemas can be
11810  * localized, but the localized values are stored in gettext catalogs
11811  * and looked up with the domain that is specified in the
11812  * <tag class="attribute">gettext-domain</tag> attribute of the
11813  * <tag class="starttag">schemalist</tag> or <tag class="starttag">schema</tag>
11814  * elements and the category that is specified in the l10n attribute of the
11815  * <tag class="starttag">key</tag> element.
11816  * GSettings uses schemas in a compact binary form that is created
11817  * by the <link linkend="glib-compile-schemas">glib-compile-schemas</link>
11818  * utility. The input is a schema description in an XML format that can be
11819  * described by the following DTD:
11820  * |[<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>]|
11821  * At runtime, schemas are identified by their id (as specified
11822  * in the <tag class="attribute">id</tag> attribute of the
11823  * <tag class="starttag">schema</tag> element). The
11824  * convention for schema ids is to use a dotted name, similar in
11825  * style to a D-Bus bus name, e.g. "org.gnome.SessionManager". In particular,
11826  * if the settings are for a specific service that owns a D-Bus bus name,
11827  * the D-Bus bus name and schema id should match. For schemas which deal
11828  * with settings not associated with one named application, the id should
11829  * not use StudlyCaps, e.g. "org.gnome.font-rendering".
11830  * In addition to #GVariant types, keys can have types that have enumerated
11831  * types. These can be described by a <tag class="starttag">choice</tag>,
11832  * <tag class="starttag">enum</tag> or <tag class="starttag">flags</tag> element, see
11833  * <xref linkend="schema-enumerated"/>. The underlying type of
11834  * such a key is string, but you can use g_settings_get_enum(),
11835  * g_settings_set_enum(), g_settings_get_flags(), g_settings_set_flags()
11836  * access the numeric values corresponding to the string value of enum
11837  * and flags keys.
11838  * <example id="schema-default-values"><title>Default values</title>
11839  * <programlisting><![CDATA[
11840  * <schemalist>
11841  * <schema id="org.gtk.Test" path="/tests/" gettext-domain="test">
11842  * <key name="greeting" type="s">
11843  * <default l10n="messages">"Hello, earthlings"</default>
11844  * <summary>A greeting</summary>
11845  * <description>
11846  * Greeting of the invading martians
11847  * </description>
11848  * </key>
11849  * <key name="box" type="(ii)">
11850  * <default>(20,30)</default>
11851  * </key>
11852  * </schema>
11853  * </schemalist>
11854  * ]]></programlisting></example>
11855  * <example id="schema-enumerated"><title>Ranges, choices and enumerated types</title>
11856  * <programlisting><![CDATA[
11857  * <schemalist>
11858  * <enum id="myenum">
11859  * <value nick="first" value="1"/>
11860  * <value nick="second" value="2"/>
11861  * </enum>
11862  * <enum id="myflags">
11863  * <value nick="flag1" value="1"/>
11864  * <value nick="flag2" value="2"/>
11865  * <value nick="flag3" value="4"/>
11866  * </enum>
11867  * <schema id="org.gtk.Test">
11868  * <key name="key-with-range" type="i">
11869  * <range min="1" max="100"/>
11870  * <default>10</default>
11871  * </key>
11872  * <key name="key-with-choices" type="s">
11873  * <choices>
11874  * <choice value='Elisabeth'/>
11875  * <choice value='Annabeth'/>
11876  * <choice value='Joe'/>
11877  * </choices>
11878  * <aliases>
11879  * <alias value='Anna' target='Annabeth'/>
11880  * <alias value='Beth' target='Elisabeth'/>
11881  * </aliases>
11882  * <default>'Joe'</default>
11883  * </key>
11884  * <key name='enumerated-key' enum='myenum'>
11885  * <default>'first'</default>
11886  * </key>
11887  * <key name='flags-key' flags='myflags'>
11888  * <default>["flag1",flag2"]</default>
11889  * </key>
11890  * </schema>
11891  * </schemalist>
11892  * ]]></programlisting></example>
11893  * <refsect2>
11894  * <title>Vendor overrides</title>
11895  * <para>
11896  * Default values are defined in the schemas that get installed by
11897  * an application. Sometimes, it is necessary for a vendor or distributor
11898  * to adjust these defaults. Since patching the XML source for the schema
11899  * is inconvenient and error-prone,
11900  * <link linkend="glib-compile-schemas">glib-compile-schemas</link> reads
11901  * so-called 'vendor override' files. These are keyfiles in the same
11902  * directory as the XML schema sources which can override default values.
11903  * The schema id serves as the group name in the key file, and the values
11904  * are expected in serialized GVariant form, as in the following example:
11905  * <informalexample><programlisting>
11906  * [org.gtk.Example]
11907  * key1='string'
11908  * key2=1.5
11909  * </programlisting></informalexample>
11910  * </para>
11911  * </refsect2>
11912  * <refsect2>
11913  * <title>Binding</title>
11914  * <para>
11915  * A very convenient feature of GSettings lets you bind #GObject properties
11916  * directly to settings, using g_settings_bind(). Once a GObject property
11917  * has been bound to a setting, changes on either side are automatically
11918  * propagated to the other side. GSettings handles details like
11919  * mapping between GObject and GVariant types, and preventing infinite
11920  * cycles.
11921  * </para>
11922  * <para>
11923  * This makes it very easy to hook up a preferences dialog to the
11924  * underlying settings. To make this even more convenient, GSettings
11925  * looks for a boolean property with the name "sensitivity" and
11926  * automatically binds it to the writability of the bound setting.
11927  * If this 'magic' gets in the way, it can be suppressed with the
11928  * #G_SETTINGS_BIND_NO_SENSITIVITY flag.
11929  * </para>
11930  * </refsect2>
11931  */
11932
11933
11934 /**
11935  * SECTION:gsettingsbacken:
11936  * @title: GSettingsBackend
11937  * @short_description: Interface for settings backend implementations
11938  * @include: gio/gsettingsbackend.h
11939  * @see_also: #GSettings, #GIOExtensionPoint
11940  *
11941  * The #GSettingsBackend interface defines a generic interface for
11942  * non-strictly-typed data that is stored in a hierarchy. To implement
11943  * an alternative storage backend for #GSettings, you need to implement
11944  * the #GSettingsBackend interface and then make it implement the
11945  * extension point #G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.
11946  * The interface defines methods for reading and writing values, a
11947  * method for determining if writing of certain values will fail
11948  * (lockdown) and a change notification mechanism.
11949  * The semantics of the interface are very precisely defined and
11950  * implementations must carefully adhere to the expectations of
11951  * callers that are documented on each of the interface methods.
11952  * Some of the GSettingsBackend functions accept or return a #GTree.
11953  * These trees always have strings as keys and #GVariant as values.
11954  * g_settings_backend_create_tree() is a convenience function to create
11955  * suitable trees.
11956  * <note><para>
11957  * The #GSettingsBackend API is exported to allow third-party
11958  * implementations, but does not carry the same stability guarantees
11959  * as the public GIO API. For this reason, you have to define the
11960  * C preprocessor symbol #G_SETTINGS_ENABLE_BACKEND before including
11961  * <filename>gio/gsettingsbackend.h</filename>
11962  * </para></note>
11963  */
11964
11965
11966 /**
11967  * SECTION:gsimpleactio:
11968  * @title: GSimpleAction
11969  * @short_description: A simple GSimpleAction
11970  *
11971  * A #GSimpleAction is the obvious simple implementation of the #GSimpleAction
11972  * interface.  This is the easiest way to create an action for purposes of
11973  * adding it to a #GSimpleActionGroup.
11974  * See also #GtkAction.
11975  */
11976
11977
11978 /**
11979  * SECTION:gsimpleactiongrou:
11980  * @title: GSimpleActionGroup
11981  * @short_description: A simple GActionGroup implementation
11982  *
11983  * #GSimpleActionGroup is a hash table filled with #GAction objects,
11984  * implementing the #GActionGroup interface.
11985  */
11986
11987
11988 /**
11989  * SECTION:gsimpleasyncresul:
11990  * @short_description: Simple asynchronous results implementation
11991  * @include: gio/gio.h
11992  * @see_also: #GAsyncResult
11993  *
11994  * Implements #GAsyncResult for simple cases. Most of the time, this
11995  * will be all an application needs, and will be used transparently.
11996  * Because of this, #GSimpleAsyncResult is used throughout GIO for
11997  * handling asynchronous functions.
11998  * GSimpleAsyncResult handles #GAsyncReadyCallback<!-- -->s, error
11999  * reporting, operation cancellation and the final state of an operation,
12000  * completely transparent to the application. Results can be returned
12001  * as a pointer e.g. for functions that return data that is collected
12002  * asynchronously, a boolean value for checking the success or failure
12003  * of an operation, or a #gssize for operations which return the number
12004  * of bytes modified by the operation; all of the simple return cases
12005  * are covered.
12006  * Most of the time, an application will not need to know of the details
12007  * of this API; it is handled transparently, and any necessary operations
12008  * are handled by #GAsyncResult's interface. However, if implementing a
12009  * new GIO module, for writing language bindings, or for complex
12010  * applications that need better control of how asynchronous operations
12011  * are completed, it is important to understand this functionality.
12012  * GSimpleAsyncResults are tagged with the calling function to ensure
12013  * that asynchronous functions and their finishing functions are used
12014  * together correctly.
12015  * To create a new #GSimpleAsyncResult, call g_simple_async_result_new().
12016  * If the result needs to be created for a #GError, use
12017  * g_simple_async_result_new_from_error() or
12018  * g_simple_async_result_new_take_error(). If a #GError is not available
12019  * (e.g. the asynchronous operation's doesn't take a #GError argument),
12020  * but the result still needs to be created for an error condition, use
12021  * g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
12022  * if your application or binding requires passing a variable argument list
12023  * directly), and the error can then be propagated through the use of
12024  * g_simple_async_result_propagate_error().
12025  * An asynchronous operation can be made to ignore a cancellation event by
12026  * calling g_simple_async_result_set_handle_cancellation() with a
12027  * #GSimpleAsyncResult for the operation and %FALSE. This is useful for
12028  * operations that are dangerous to cancel, such as close (which would
12029  * cause a leak if cancelled before being run).
12030  * GSimpleAsyncResult can integrate into GLib's event loop, #GMainLoop,
12031  * or it can use #GThread<!-- -->s if available.
12032  * g_simple_async_result_complete() will finish an I/O task directly
12033  * from the point where it is called. g_simple_async_result_complete_in_idle()
12034  * will finish it from an idle handler in the <link
12035  * linkend="g-main-context-push-thread-default">thread-default main
12036  * context</link>. g_simple_async_result_run_in_thread() will run the
12037  * job in a separate thread and then deliver the result to the
12038  * thread-default main context.
12039  * To set the results of an asynchronous function,
12040  * g_simple_async_result_set_op_res_gpointer(),
12041  * g_simple_async_result_set_op_res_gboolean(), and
12042  * g_simple_async_result_set_op_res_gssize()
12043  * are provided, setting the operation's result to a gpointer, gboolean, or
12044  * gssize, respectively.
12045  * Likewise, to get the result of an asynchronous function,
12046  * g_simple_async_result_get_op_res_gpointer(),
12047  * g_simple_async_result_get_op_res_gboolean(), and
12048  * g_simple_async_result_get_op_res_gssize() are
12049  * provided, getting the operation's result as a gpointer, gboolean, and
12050  * gssize, respectively.
12051  * For the details of the requirements implementations must respect, see
12052  * #GAsyncResult.  A typical implementation of an asynchronous operation
12053  * using GSimpleAsyncResult looks something like this:
12054  * |[
12055  * static void
12056  * baked_cb (Cake    *cake,
12057  * gpointer user_data)
12058  * {
12059  * /&ast; In this example, this callback is not given a reference to the cake, so
12060  * &ast; the GSimpleAsyncResult has to take a reference to it.
12061  * &ast;/
12062  * GSimpleAsyncResult *result = user_data;
12063  * if (cake == NULL)
12064  * g_simple_async_result_set_error (result,
12065  * BAKER_ERRORS,
12066  * BAKER_ERROR_NO_FLOUR,
12067  * "Go to the supermarket");
12068  * else
12069  * g_simple_async_result_set_op_res_gpointer (result,
12070  * g_object_ref (cake),
12071  * g_object_unref);
12072  * /&ast; In this example, we assume that baked_cb is called as a callback from
12073  * &ast; the mainloop, so it's safe to complete the operation synchronously here.
12074  * &ast; If, however, _baker_prepare_cake () might call its callback without
12075  * &ast; first returning to the mainloop â€” inadvisable, but some APIs do so â€”
12076  * &ast; we would need to use g_simple_async_result_complete_in_idle().
12077  * &ast;/
12078  * g_simple_async_result_complete (result);
12079  * g_object_unref (result);
12080  * }
12081  * void
12082  * baker_bake_cake_async (Baker              *self,
12083  * guint               radius,
12084  * GAsyncReadyCallback callback,
12085  * gpointer            user_data)
12086  * {
12087  * GSimpleAsyncResult *simple;
12088  * Cake               *cake;
12089  * if (radius < 3)
12090  * {
12091  * g_simple_async_report_error_in_idle (G_OBJECT (self),
12092  * callback,
12093  * user_data,
12094  * BAKER_ERRORS,
12095  * BAKER_ERROR_TOO_SMALL,
12096  * "%ucm radius cakes are silly",
12097  * radius);
12098  * return;
12099  * }
12100  * simple = g_simple_async_result_new (G_OBJECT (self),
12101  * callback,
12102  * user_data,
12103  * baker_bake_cake_async);
12104  * cake = _baker_get_cached_cake (self, radius);
12105  * if (cake != NULL)
12106  * {
12107  * g_simple_async_result_set_op_res_gpointer (simple,
12108  * g_object_ref (cake),
12109  * g_object_unref);
12110  * g_simple_async_result_complete_in_idle (simple);
12111  * g_object_unref (simple);
12112  * /&ast; Drop the reference returned by _baker_get_cached_cake(); the
12113  * &ast; GSimpleAsyncResult has taken its own reference.
12114  * &ast;/
12115  * g_object_unref (cake);
12116  * return;
12117  * }
12118  * _baker_prepare_cake (self, radius, baked_cb, simple);
12119  * }
12120  * Cake *
12121  * baker_bake_cake_finish (Baker        *self,
12122  * GAsyncResult *result,
12123  * GError      **error)
12124  * {
12125  * GSimpleAsyncResult *simple;
12126  * Cake               *cake;
12127  * g_return_val_if_fail (g_simple_async_result_is_valid (result,
12128  * G_OBJECT (self),
12129  * baker_bake_cake_async),
12130  * NULL);
12131  * simple = (GSimpleAsyncResult *) result;
12132  * if (g_simple_async_result_propagate_error (simple, error))
12133  * return NULL;
12134  * cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple));
12135  * return g_object_ref (cake);
12136  * }
12137  * ]|
12138  */
12139
12140
12141 /**
12142  * SECTION:gsimplepermissio:
12143  * @title: GSimplePermission
12144  * @short_description: A GPermission that doesn't change value
12145  *
12146  * #GSimplePermission is a trivial implementation of #GPermission that
12147  * represents a permission that is either always or never allowed.  The
12148  * value is given at constuction and doesn't change.
12149  * Calling request or release will result in errors.
12150  */
12151
12152
12153 /**
12154  * SECTION:gsocke:
12155  * @short_description: Low-level socket object
12156  * @include: gio/gio.h
12157  * @see_also: #GInitable
12158  *
12159  * A #GSocket is a low-level networking primitive. It is a more or less
12160  * direct mapping of the BSD socket API in a portable GObject based API.
12161  * It supports both the UNIX socket implementations and winsock2 on Windows.
12162  * #GSocket is the platform independent base upon which the higher level
12163  * network primitives are based. Applications are not typically meant to
12164  * use it directly, but rather through classes like #GSocketClient,
12165  * #GSocketService and #GSocketConnection. However there may be cases where
12166  * direct use of #GSocket is useful.
12167  * #GSocket implements the #GInitable interface, so if it is manually constructed
12168  * by e.g. g_object_new() you must call g_initable_init() and check the
12169  * results before using the object. This is done automatically in
12170  * g_socket_new() and g_socket_new_from_fd(), so these functions can return
12171  * %NULL.
12172  * Sockets operate in two general modes, blocking or non-blocking. When
12173  * in blocking mode all operations block until the requested operation
12174  * is finished or there is an error. In non-blocking mode all calls that
12175  * would block return immediately with a %G_IO_ERROR_WOULD_BLOCK error.
12176  * To know when a call would successfully run you can call g_socket_condition_check(),
12177  * or g_socket_condition_wait(). You can also use g_socket_create_source() and
12178  * attach it to a #GMainContext to get callbacks when I/O is possible.
12179  * Note that all sockets are always set to non blocking mode in the system, and
12180  * blocking mode is emulated in GSocket.
12181  * When working in non-blocking mode applications should always be able to
12182  * handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other
12183  * function said that I/O was possible. This can easily happen in case
12184  * of a race condition in the application, but it can also happen for other
12185  * reasons. For instance, on Windows a socket is always seen as writable
12186  * until a write returns %G_IO_ERROR_WOULD_BLOCK.
12187  * #GSocket<!-- -->s can be either connection oriented or datagram based.
12188  * For connection oriented types you must first establish a connection by
12189  * either connecting to an address or accepting a connection from another
12190  * address. For connectionless socket types the target/source address is
12191  * specified or received in each I/O operation.
12192  * All socket file descriptors are set to be close-on-exec.
12193  * Note that creating a #GSocket causes the signal %SIGPIPE to be
12194  * ignored for the remainder of the program. If you are writing a
12195  * command-line utility that uses #GSocket, you may need to take into
12196  * account the fact that your program will not automatically be killed
12197  * if it tries to write to %stdout after it has been closed.
12198  *
12199  * Since: 2.22
12200  */
12201
12202
12203 /**
12204  * SECTION:gsocketaddres:
12205  * @short_description: Abstract base class representing endpoints for socket communication
12206  *
12207  * #GSocketAddress is the equivalent of <type>struct sockaddr</type>
12208  * in the BSD sockets API. This is an abstract class; use
12209  * #GInetSocketAddress for internet sockets, or #GUnixSocketAddress
12210  * for UNIX domain sockets.
12211  */
12212
12213
12214 /**
12215  * SECTION:gsocketclien:
12216  * @short_description: Helper for connecting to a network service
12217  * @include: gio/gio.h
12218  * @see_also: #GSocketConnection, #GSocketListener
12219  *
12220  * #GSocketClient is a high-level utility class for connecting to a
12221  * network host using a connection oriented socket type.
12222  * You create a #GSocketClient object, set any options you want, then
12223  * call a sync or async connect operation, which returns a #GSocketConnection
12224  * subclass on success.
12225  * The type of the #GSocketConnection object returned depends on the type of
12226  * the underlying socket that is in use. For instance, for a TCP/IP connection
12227  * it will be a #GTcpConnection.
12228  *
12229  * Since: 2.22
12230  */
12231
12232
12233 /**
12234  * SECTION:gsocketconnectabl:
12235  * @short_description: Interface for potential socket endpoints
12236  *
12237  * Objects that describe one or more potential socket endpoints
12238  * implement #GSocketConnectable. Callers can then use
12239  * g_socket_connectable_enumerate() to get a #GSocketAddressEnumerator
12240  * to try out each socket address in turn until one succeeds, as shown
12241  * in the sample code below.
12242  * |[
12243  * MyConnectionType *
12244  * connect_to_host (const char    *hostname,
12245  * guint16        port,
12246  * GCancellable  *cancellable,
12247  * GError       **error)
12248  * {
12249  * MyConnection *conn = NULL;
12250  * GSocketConnectable *addr;
12251  * GSocketAddressEnumerator *enumerator;
12252  * GSocketAddress *sockaddr;
12253  * GError *conn_error = NULL;
12254  * addr = g_network_address_new ("www.gnome.org", 80);
12255  * enumerator = g_socket_connectable_enumerate (addr);
12256  * g_object_unref (addr);
12257  * /<!-- -->* Try each sockaddr until we succeed. Record the first
12258  * * connection error, but not any further ones (since they'll probably
12259  * * be basically the same as the first).
12260  * *<!-- -->/
12261  * while (!conn && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
12262  * {
12263  * g_object_unref (sockaddr);
12264  * }
12265  * g_object_unref (enumerator);
12266  * if (conn)
12267  * {
12268  * if (conn_error)
12269  * {
12270  * /<!-- -->* We couldn't connect to the first address, but we succeeded
12271  * * in connecting to a later address.
12272  * *<!-- -->/
12273  * g_error_free (conn_error);
12274  * }
12275  * return conn;
12276  * }
12277  * else if (error)
12278  * {
12279  * /<!-- -->* Either the initial lookup failed, or else the caller
12280  * * cancelled us.
12281  * *<!-- -->/
12282  * if (conn_error)
12283  * g_error_free (conn_error);
12284  * return NULL;
12285  * }
12286  * else
12287  * {
12288  * g_error_propagate (error, conn_error);
12289  * return NULL;
12290  * }
12291  * }
12292  * ]|
12293  *
12294  * Conn = connect_to_sockaddr (sockaddr, conn_error ? null : &conn_error);
12295  */
12296
12297
12298 /**
12299  * SECTION:gsocketconnectio:
12300  * @short_description: A socket connection
12301  * @include: gio/gio.h
12302  * @see_also: #GIOStream, #GSocketClient, #GSocketListener
12303  *
12304  * #GSocketConnection is a #GIOStream for a connected socket. They
12305  * can be created either by #GSocketClient when connecting to a host,
12306  * or by #GSocketListener when accepting a new client.
12307  * The type of the #GSocketConnection object returned from these calls
12308  * depends on the type of the underlying socket that is in use. For
12309  * instance, for a TCP/IP connection it will be a #GTcpConnection.
12310  * Chosing what type of object to construct is done with the socket
12311  * connection factory, and it is possible for 3rd parties to register
12312  * custom socket connection types for specific combination of socket
12313  * family/type/protocol using g_socket_connection_factory_register_type().
12314  *
12315  * Since: 2.22
12316  */
12317
12318
12319 /**
12320  * SECTION:gsrvtarge:
12321  * @short_description: DNS SRV record target
12322  * @include: gio/gio.h
12323  *
12324  * SRV (service) records are used by some network protocols to provide
12325  * service-specific aliasing and load-balancing. For example, XMPP
12326  * (Jabber) uses SRV records to locate the XMPP server for a domain;
12327  * rather than connecting directly to "example.com" or assuming a
12328  * specific server hostname like "xmpp.example.com", an XMPP client
12329  * would look up the "xmpp-client" SRV record for "example.com", and
12330  * then connect to whatever host was pointed to by that record.
12331  * You can use g_resolver_lookup_service() or
12332  * g_resolver_lookup_service_async() to find the #GSrvTarget<!-- -->s
12333  * for a given service. However, if you are simply planning to connect
12334  * to the remote service, you can use #GNetworkService's
12335  * #GSocketConnectable interface and not need to worry about
12336  * #GSrvTarget at all.
12337  */
12338
12339
12340 /**
12341  * SECTION:gthemedico:
12342  * @short_description: Icon theming support
12343  * @include: gio/gio.h
12344  * @see_also: #GIcon, #GLoadableIcon
12345  *
12346  * #GThemedIcon is an implementation of #GIcon that supports icon themes.
12347  * #GThemedIcon contains a list of all of the icons present in an icon
12348  * theme, so that icons can be looked up quickly. #GThemedIcon does
12349  * not provide actual pixmaps for icons, just the icon names.
12350  * Ideally something like gtk_icon_theme_choose_icon() should be used to
12351  * resolve the list of names so that fallback icons work nicely with
12352  * themes that inherit other themes.
12353  */
12354
12355
12356 /**
12357  * SECTION:gtl:
12358  * @title: TLS Overview
12359  * @short_description: TLS (aka SSL) support for GSocketConnection
12360  * @include: gio/gio.h
12361  *
12362  * #GTlsConnection and related classes provide TLS (Transport Layer
12363  * Security, previously known as SSL, Secure Sockets Layer) support for
12364  * gio-based network streams.
12365  * In the simplest case, for a client connection, you can just set the
12366  * #GSocketClient:tls flag on a #GSocketClient, and then any
12367  * connections created by that client will have TLS negotiated
12368  * automatically, using appropriate default settings, and rejecting
12369  * any invalid or self-signed certificates (unless you change that
12370  * default by setting the #GSocketClient:tls-validation-flags
12371  * property). The returned object will be a #GTcpWrapperConnection,
12372  * which wraps the underlying #GTlsClientConnection.
12373  * For greater control, you can create your own #GTlsClientConnection,
12374  * wrapping a #GSocketConnection (or an arbitrary #GIOStream with
12375  * pollable input and output streams) and then connect to its signals,
12376  * such as #GTlsConnection::accept-certificate, before starting the
12377  * handshake.
12378  * Server-side TLS is similar, using #GTlsServerConnection. At the
12379  * moment, there is no support for automatically wrapping server-side
12380  * connections in the way #GSocketClient does for client-side
12381  * connections.
12382  */
12383
12384
12385 /**
12386  * SECTION:gtlsbacken:
12387  * @title: GTlsBackend
12388  * @short_description: TLS backend implementation
12389  * @include: gio/gio.h
12390  *
12391  *
12392  */
12393
12394
12395 /**
12396  * SECTION:gtlsclientconnectio:
12397  * @short_description: TLS client-side connection
12398  * @include: gio/gio.h
12399  *
12400  * #GTlsClientConnection is the client-side subclass of
12401  * #GTlsConnection, representing a client-side TLS connection.
12402  */
12403
12404
12405 /**
12406  * SECTION:gtlsconnectio:
12407  * @short_description: TLS connection type
12408  * @include: gio/gio.h
12409  *
12410  * #GTlsConnection is the base TLS connection class type, which wraps
12411  * a #GIOStream and provides TLS encryption on top of it. Its
12412  * subclasses, #GTlsClientConnection and #GTlsServerConnection,
12413  * implement client-side and server-side TLS, respectively.
12414  *
12415  * Since: 2.28
12416  */
12417
12418
12419 /**
12420  * SECTION:gtlsserverconnectio:
12421  * @short_description: TLS server-side connection
12422  * @include: gio/gio.h
12423  *
12424  * #GTlsServerConnection is the server-side subclass of #GTlsConnection,
12425  * representing a server-side TLS connection.
12426  *
12427  * Since: 2.28
12428  */
12429
12430
12431 /**
12432  * SECTION:gunixinputstrea:
12433  * @short_description: Streaming input operations for UNIX file descriptors
12434  * @include: gio/gunixinputstream.h
12435  * @see_also: #GInputStream
12436  *
12437  * #GUnixInputStream implements #GInputStream for reading from a
12438  * UNIX file descriptor, including asynchronous operations. The file
12439  * descriptor must be selectable, so it doesn't work with opened files.
12440  * Note that <filename>&lt;gio/gunixinputstream.h&gt;</filename> belongs
12441  * to the UNIX-specific GIO interfaces, thus you have to use the
12442  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12443  */
12444
12445
12446 /**
12447  * SECTION:gunixmount:
12448  * @include: gio/gunixmounts.h
12449  * @short_description: UNIX mounts
12450  *
12451  * Routines for managing mounted UNIX mount points and paths.
12452  * Note that <filename>&lt;gio/gunixmounts.h&gt;</filename> belongs to the
12453  * UNIX-specific GIO interfaces, thus you have to use the
12454  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12455  */
12456
12457
12458 /**
12459  * SECTION:gunixoutputstrea:
12460  * @short_description: Streaming output operations for UNIX file descriptors
12461  * @include: gio/gunixoutputstream.h
12462  * @see_also: #GOutputStream
12463  *
12464  * #GUnixOutputStream implements #GOutputStream for writing to a
12465  * UNIX file descriptor, including asynchronous operations. The file
12466  * descriptor must be selectable, so it doesn't work with opened files.
12467  * Note that <filename>&lt;gio/gunixoutputstream.h&gt;</filename> belongs
12468  * to the UNIX-specific GIO interfaces, thus you have to use the
12469  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12470  */
12471
12472
12473 /**
12474  * SECTION:gunixsocketaddres:
12475  * @short_description: UNIX GSocketAddress
12476  * @include: gio/gunixsocketaddress.h
12477  *
12478  * Support for UNIX-domain (also known as local) sockets.
12479  * UNIX domain sockets are generally visible in the filesystem.
12480  * However, some systems support abstract socket names which are not
12481  * visible in the filesystem and not affected by the filesystem
12482  * permissions, visibility, etc. Currently this is only supported
12483  * under Linux. If you attempt to use abstract sockets on other
12484  * systems, function calls may return %G_IO_ERROR_NOT_SUPPORTED
12485  * errors. You can use g_unix_socket_address_abstract_names_supported()
12486  * to see if abstract names are supported.
12487  * Note that <filename>&lt;gio/gunixsocketaddress.h&gt;</filename> belongs to
12488  * the UNIX-specific GIO interfaces, thus you have to use the
12489  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12490  */
12491
12492
12493 /**
12494  * SECTION:gvf:
12495  * @short_description: Virtual File System
12496  * @include: gio/gio.h
12497  *
12498  * Entry point for using GIO functionality.
12499  */
12500
12501
12502 /**
12503  * SECTION:gvolum:
12504  * @short_description: Volume management
12505  * @include: gio/gio.h
12506  *
12507  * The #GVolume interface represents user-visible objects that can be
12508  * mounted. Note, when porting from GnomeVFS, #GVolume is the moral
12509  * equivalent of #GnomeVFSDrive.
12510  * Mounting a #GVolume instance is an asynchronous operation. For more
12511  * information about asynchronous operations, see #GAsyncReady and
12512  * #GSimpleAsyncReady. To mount a #GVolume, first call
12513  * g_volume_mount() with (at least) the #GVolume instance, optionally
12514  * a #GMountOperation object and a #GAsyncReadyCallback.
12515  * Typically, one will only want to pass %NULL for the
12516  * #GMountOperation if automounting all volumes when a desktop session
12517  * starts since it's not desirable to put up a lot of dialogs asking
12518  * for credentials.
12519  * The callback will be fired when the operation has resolved (either
12520  * with success or failure), and a #GAsyncReady structure will be
12521  * passed to the callback.  That callback should then call
12522  * g_volume_mount_finish() with the #GVolume instance and the
12523  * #GAsyncReady data to see if the operation was completed
12524  * successfully.  If an @error is present when g_volume_mount_finish()
12525  * is called, then it will be filled with any error information.
12526  * <para id="volume-identifier">
12527  * It is sometimes necessary to directly access the underlying
12528  * operating system object behind a volume (e.g. for passing a volume
12529  * to an application via the commandline). For this purpose, GIO
12530  * allows to obtain an 'identifier' for the volume. There can be
12531  * different kinds of identifiers, such as Hal UDIs, filesystem labels,
12532  * traditional Unix devices (e.g. <filename>/dev/sda2</filename>),
12533  * uuids. GIO uses predefind strings as names for the different kinds
12534  * #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. Use g_volume_get_identifier()
12535  * to obtain an identifier for a volume.
12536  * </para>
12537  * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available
12538  * when the gvfs hal volume monitor is in use. Other volume monitors
12539  * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
12540  * identifier, which can be used to obtain a hal device by means of
12541  * libhal_manger_find_device_string_match().
12542  *
12543  * Of identifiers: #G_VOLUME_IDENTIFIER_KIND_HAL_UDI,
12544  */
12545
12546
12547 /**
12548  * SECTION:gvolumemonito:
12549  * @short_description: Volume Monitor
12550  * @include: gio/gio.h
12551  * @see_also: #GFileMonitor
12552  *
12553  * #GVolumeMonitor is for listing the user interesting devices and volumes
12554  * on the computer. In other words, what a file selector or file manager
12555  * would show in a sidebar.
12556  * #GVolumeMonitor is not <link
12557  * linkend="g-main-context-push-thread-default">thread-default-context
12558  * aware</link>, and so should not be used other than from the main
12559  * thread, with no thread-default-context active.
12560  */
12561
12562
12563 /**
12564  * SECTION:gwin32inputstrea:
12565  * @short_description: Streaming input operations for Windows file handles
12566  * @include: gio/gwin32inputstream.h
12567  * @see_also: #GInputStream
12568  *
12569  * #GWin32InputStream implements #GInputStream for reading from a
12570  * Windows file handle.
12571  * Note that <filename>&lt;gio/gwin32inputstream.h&gt;</filename> belongs
12572  * to the Windows-specific GIO interfaces, thus you have to use the
12573  * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
12574  */
12575
12576
12577 /**
12578  * SECTION:gwin32outputstrea:
12579  * @short_description: Streaming output operations for Windows file handles
12580  * @include: gio/gwin32outputstream.h
12581  * @see_also: #GOutputStream
12582  *
12583  * #GWin32OutputStream implements #GOutputStream for writing to a
12584  * Windows file handle.
12585  * Note that <filename>&lt;gio/gwin32outputstream.h&gt;</filename> belongs
12586  * to the Windows-specific GIO interfaces, thus you have to use the
12587  * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
12588  */
12589
12590
12591 /**
12592  * SECTION:gzcompresso:
12593  * @short_description: Zlib compressor
12594  * @include: gio/gio.h
12595  *
12596  * #GZlibCompressor is an implementation of #GConverter that
12597  * compresses data using zlib.
12598  */
12599
12600
12601 /**
12602  * SECTION:gzdecompresso:
12603  * @short_description: Zlib decompressor
12604  * @include: gio/gio.h
12605  *
12606  * #GZlibDecompressor is an implementation of #GConverter that
12607  * decompresses data compressed with zlib.
12608  */
12609
12610
12611 /**
12612  * The string info map is an efficient data structure designed to b:
12613  *
12614  * used with a small set of items.  It is used by GSettings schemas for
12615  * three purposes:
12616  * 1) Implement <choices> with a list of valid strings
12617  * 2) Implement <alias> by mapping one string to another
12618  * 3) Implement enumerated types by mapping strings to integer values
12619  * (and back).
12620  * The map is made out of an array of uint32s.  Each entry in the array
12621  * is an integer value, followed by a specially formatted string value:
12622  * The string starts with the byte 0xff or 0xfe, followed by the
12623  * content of the string, followed by a nul byte, followed by
12624  * additional nul bytes for padding, followed by a 0xff byte.
12625  * Padding is added so that the entire formatted string takes up a
12626  * multiple of 4 bytes, and not less than 8 bytes.  The requirement
12627  * for a string to take up 8 bytes is so that the scanner doesn't lose
12628  * synch and mistake a string for an integer value.
12629  * The first byte of the formatted string depends on if the integer is
12630  * an enum value (0xff) or an alias (0xfe).  If it is an alias then the
12631  * number refers to the word offset within the info map at which the
12632  * integer corresponding to the "target" value is stored.
12633  * For example, consider the case of the string info map representing an
12634  * enumerated type of 'foo' (value 1) and 'bar' (value 2) and 'baz'
12635  * (alias for 'bar').  Note that string info maps are always little
12636  * endian.
12637  * x01 x00 x00 x00   xff 'f' 'o' 'o'   x00 x00 x00 xff   x02 x00 x00 x00
12638  * xff 'b' 'a' 'r'   x00 x00 x00 xff   x03 x00 x00 x00   xfe 'b' 'a' 'z'
12639  * x00 x00 x00 xff
12640  * The operations that someone may want to perform with the map:
12641  * - lookup if a string is valid (and not an alias)
12642  * - lookup the integer value for a enum 'nick'
12643  * - lookup the integer value for the target of an alias
12644  * - lookup an alias and convert it to its target string
12645  * - lookup the enum nick for a given value
12646  * In order to lookup if a string is valid, it is padded on either side
12647  * (as described) and scanned for in the array.  For example, you might
12648  * look for "foo":
12649  * xff 'f' 'o' 'o'   x00 x00 x00 xff
12650  * In order to lookup the integer value for a nick, the string is padded
12651  * on either side and scanned for in the array, as above.  Instead of
12652  * merely succeeding, we look at the integer value to the left of the
12653  * match.  This is the enum value.
12654  * In order to lookup an alias and convert it to its target enum value,
12655  * the string is padded on either side (as described, with 0xfe) and
12656  * scanned for.  For example, you might look for "baz":
12657  * xfe 'b' 'a' 'z'  x00 x00 x00 xff
12658  * The integer immediately preceeding the match then contains the offset
12659  * of the integer value of the target.  In our example, that's '3'.
12660  * This index is dereferenced to find the enum value of '2'.
12661  * To convert the alias to its target string, 5 bytes just need to be
12662  * added past the start of the integer value to find the start of the
12663  * string.
12664  * To lookup the enum nick for a given value, the value is searched for
12665  * in the array.  To ensure that the value isn't matching the inside of a
12666  * string, we must check that it is either the first item in the array or
12667  * immediately preceeded by the byte 0xff.  It must also be immediately
12668  * followed by the byte 0xff.
12669  * Because strings always take up a minimum of 2 words, because 0xff or
12670  * 0xfe never appear inside of a utf-8 string and because no two integer
12671  * values ever appear in sequence, the only way we can have the
12672  * sequence:
12673  * xff __ __ __ __ xff (or 0xfe)
12674  * is in the event of an integer nested between two strings.
12675  * For implementation simplicity/efficiency, strings may not be more
12676  * the value of each choice is set to zero and ignored.
12677  *
12678  * Than 65 characters in length (ie: 17 32bit words after padding).
12679  * In the event that we are doing <choices> (ie: not an enum type) then
12680  */
12681
12682
12683 /**
12684  * g_action_activate:
12685  * @action: a #GAction
12686  * @parameter: (allow-none): the parameter to the activation
12687  *
12688  * Activates the action.
12689  * the parameter type given at construction time).  If the parameter
12690  * type was %NULL then @parameter must also be %NULL.
12691  *
12692  * Since: 2.28
12693  */
12694
12695
12696 /**
12697  * g_action_get_enabled:
12698  * @action: a #GAction
12699  *
12700  * Checks if @action is currently enabled.
12701  * An action must be enabled in order to be activated or in order to
12702  * have its state changed from outside callers.
12703  *
12704  * Returns: whether the action is enabled
12705  * Since: 2.28
12706  */
12707
12708
12709 /**
12710  * g_action_get_name:
12711  * @action: a #GAction
12712  *
12713  * Queries the name of @action.
12714  *
12715  * Returns: the name of the action
12716  * Since: 2.28
12717  */
12718
12719
12720 /**
12721  * g_action_get_parameter_type:
12722  * @action: a #GAction
12723  *
12724  * Queries the type of the parameter that must be given when activating
12725  * When activating the action using g_action_activate(), the #GVariant
12726  * given to that function must be of the type returned by this function.
12727  * In the case that this function returns %NULL, you must not give any
12728  * #GVariant, but %NULL instead.
12729  *
12730  * Returns: (allow-none): the parameter type
12731  * Since: 2.28
12732  */
12733
12734
12735 /**
12736  * g_action_get_state:
12737  * @action: a #GAction
12738  *
12739  * Queries the current state of @action.
12740  * If the action is not stateful then %NULL will be returned.  If the
12741  * action is stateful then the type of the return value is the type
12742  * given by g_action_get_state_type().
12743  * The return value (if non-%NULL) should be freed with
12744  * g_variant_unref() when it is no longer required.
12745  *
12746  * Returns: (transfer full): the current state of the action
12747  * Since: 2.28
12748  */
12749
12750
12751 /**
12752  * g_action_get_state_hint:
12753  * @action: a #GAction
12754  *
12755  * Requests a hint about the valid range of values for the state of
12756  * If %NULL is returned it either means that the action is not stateful
12757  * or that there is no hint about the valid range of values for the
12758  * state of the action.
12759  * If a #GVariant array is returned then each item in the array is a
12760  * returned then the tuple specifies the inclusive lower and upper bound
12761  * of valid values for the state.
12762  * In any case, the information is merely a hint.  It may be possible to
12763  * have a state value outside of the hinted range and setting a value
12764  * within the range may fail.
12765  * The return value (if non-%NULL) should be freed with
12766  * g_variant_unref() when it is no longer required.
12767  *
12768  * Possible value for the state.  if a #gvariant pair (ie: two-tuple) is
12769  * Returns: (transfer full): the state range hint
12770  * Since: 2.28
12771  */
12772
12773
12774 /**
12775  * g_action_get_state_type:
12776  * @action: a #GAction
12777  *
12778  * Queries the type of the state of @action.
12779  * g_action_new_stateful()) then this function returns the #GVariantType
12780  * of the state.  This is the type of the initial value given as the
12781  * state.  All calls to g_action_set_state() must give a #GVariant of
12782  * this type and g_action_get_state() will return a #GVariant of the
12783  * same type.
12784  * this function will return %NULL.  In that case, g_action_get_state()
12785  * will return %NULL and you must not call g_action_set_state().
12786  *
12787  * If the action is stateful (ie: was created with
12788  * If the action is not stateful (ie: created with g_action_new()) then
12789  * Returns: (allow-none): the state type, if the action is stateful
12790  * Since: 2.28
12791  */
12792
12793
12794 /**
12795  * g_action_group_action_added:
12796  * @action_group: a #GActionGroup
12797  * @action_name: the name of an action in the group
12798  *
12799  * Emits the #GActionGroup::action-added signal on @action_group.
12800  * This function should only be called by #GActionGroup implementations.
12801  *
12802  * Since: 2.28
12803  */
12804
12805
12806 /**
12807  * g_action_group_action_enabled_changed:
12808  * @action_group: a #GActionGroup
12809  * @action_name: the name of an action in the group
12810  * @enabled: whether or not the action is now enabled
12811  *
12812  * Emits the #GActionGroup::action-enabled-changed signal on @action_group.
12813  * This function should only be called by #GActionGroup implementations.
12814  *
12815  * Since: 2.28
12816  */
12817
12818
12819 /**
12820  * g_action_group_action_removed:
12821  * @action_group: a #GActionGroup
12822  * @action_name: the name of an action in the group
12823  *
12824  * Emits the #GActionGroup::action-removed signal on @action_group.
12825  * This function should only be called by #GActionGroup implementations.
12826  *
12827  * Since: 2.28
12828  */
12829
12830
12831 /**
12832  * g_action_group_action_state_changed:
12833  * @action_group: a #GActionGroup
12834  * @action_name: the name of an action in the group
12835  * @state: the new state of the named action
12836  *
12837  * Emits the #GActionGroup::action-state-changed signal on @action_group.
12838  * This function should only be called by #GActionGroup implementations.
12839  *
12840  * Since: 2.28
12841  */
12842
12843
12844 /**
12845  * g_action_group_activate_action:
12846  * @action_group: a #GActionGroup
12847  * @action_name: the name of the action to activate
12848  * @parameter: (allow-none): parameters to the activation
12849  *
12850  * Activate the named action within @action_group.
12851  * If the action is expecting a parameter, then the correct type of
12852  * parameter must be given as @parameter.  If the action is expecting no
12853  * parameters then @parameter must be %NULL.  See
12854  * g_action_group_get_parameter_type().
12855  *
12856  * Since: 2.28
12857  */
12858
12859
12860 /**
12861  * g_action_group_change_action_state:
12862  * @action_group: a #GActionGroup
12863  * @action_name: the name of the action to request the change on
12864  * @value: the new state
12865  *
12866  * Request for the state of the named action within @action_group to be
12867  * changed to @value.
12868  * The action must be stateful and @value must be of the correct type.
12869  * See g_action_group_get_state_type().
12870  * This call merely requests a change.  The action may refuse to change
12871  * its state or may change its state to something other than @value.
12872  * See g_action_group_get_state_hint().
12873  * If the @value GVariant is floating, it is consumed.
12874  *
12875  * Since: 2.28
12876  */
12877
12878
12879 /**
12880  * g_action_group_get_action_enabled:
12881  * @action_group: a #GActionGroup
12882  * @action_name: the name of the action to query
12883  *
12884  * Checks if the named action within @action_group is currently enabled.
12885  * An action must be enabled in order to be activated or in order to
12886  * have its state changed from outside callers.
12887  *
12888  * Returns: whether or not the action is currently enabled
12889  * Since: 2.28
12890  */
12891
12892
12893 /**
12894  * g_action_group_get_action_parameter_type:
12895  * @action_group: a #GActionGroup
12896  * @action_name: the name of the action to query
12897  *
12898  * Queries the type of the parameter that must be given when activating
12899  * the named action within @action_group.
12900  * When activating the action using g_action_group_activate(), the
12901  * #GVariant given to that function must be of the type returned by this
12902  * function.
12903  * In the case that this function returns %NULL, you must not give any
12904  * #GVariant, but %NULL instead.
12905  * The parameter type of a particular action will never change but it is
12906  * possible for an action to be removed and for a new action to be added
12907  * with the same name but a different parameter type.
12908  *
12909  * Returns: the parameter type
12910  * Since: 2.28
12911  */
12912
12913
12914 /**
12915  * g_action_group_get_action_state:
12916  * @action_group: a #GActionGroup
12917  * @action_name: the name of the action to query
12918  *
12919  * Queries the current state of the named action within @action_group.
12920  * If the action is not stateful then %NULL will be returned.  If the
12921  * action is stateful then the type of the return value is the type
12922  * given by g_action_group_get_state_type().
12923  * The return value (if non-%NULL) should be freed with
12924  * g_variant_unref() when it is no longer required.
12925  *
12926  * Returns: (allow-none): the current state of the action
12927  * Since: 2.28
12928  */
12929
12930
12931 /**
12932  * g_action_group_get_action_state_hint:
12933  * @action_group: a #GActionGroup
12934  * @action_name: the name of the action to query
12935  *
12936  * Requests a hint about the valid range of values for the state of the
12937  * named action within @action_group.
12938  * If %NULL is returned it either means that the action is not stateful
12939  * or that there is no hint about the valid range of values for the
12940  * state of the action.
12941  * If a #GVariant array is returned then each item in the array is a
12942  * returned then the tuple specifies the inclusive lower and upper bound
12943  * of valid values for the state.
12944  * In any case, the information is merely a hint.  It may be possible to
12945  * have a state value outside of the hinted range and setting a value
12946  * within the range may fail.
12947  * The return value (if non-%NULL) should be freed with
12948  * g_variant_unref() when it is no longer required.
12949  *
12950  * Possible value for the state.  if a #gvariant pair (ie: two-tuple) is
12951  * Returns: (transfer full): the state range hint
12952  * Since: 2.28
12953  */
12954
12955
12956 /**
12957  * g_action_group_get_action_state_type:
12958  * @action_group: a #GActionGroup
12959  * @action_name: the name of the action to query
12960  *
12961  * Queries the type of the state of the named action within
12962  * If the action is stateful then this function returns the
12963  * #GVariantType of the state.  All calls to g_action_group_set_state()
12964  * must give a #GVariant of this type and g_action_group_get_state()
12965  * will return a #GVariant of the same type.
12966  * If the action is not stateful then this function will return %NULL.
12967  * In that case, g_action_group_get_state() will return %NULL and you
12968  * must not call g_action_group_set_state().
12969  * The state type of a particular action will never change but it is
12970  * possible for an action to be removed and for a new action to be added
12971  * with the same name but a different state type.
12972  *
12973  * Returns: (transfer full): the state type, if the action is stateful
12974  * Since: 2.28
12975  */
12976
12977
12978 /**
12979  * g_action_group_has_action:
12980  * @action_group: a #GActionGroup
12981  * @action_name: the name of the action to check for
12982  *
12983  * Checks if the named action exists within @action_group.
12984  *
12985  * Returns: whether the named action exists
12986  * Since: 2.28
12987  */
12988
12989
12990 /**
12991  * g_action_group_list_actions:
12992  * @action_group: a #GActionGroup
12993  *
12994  * Lists the actions contained within @action_group.
12995  * The caller is responsible for freeing the list with g_strfreev() when
12996  * it is no longer required.
12997  * actions in the groupb
12998  *
12999  * Returns: (transfer full): a %NULL-terminated array of the names of the
13000  * Since: 2.28
13001  */
13002
13003
13004 /**
13005  * g_action_set_state:
13006  * @action: a #GAction
13007  * @value: the new state
13008  *
13009  * Request for the state of @action to be changed to @value.
13010  * The action must be stateful and @value must be of the correct type.
13011  * See g_action_get_state_type().
13012  * This call merely requests a change.  The action may refuse to change
13013  * its state or may change its state to something other than @value.
13014  * See g_action_get_state_hint().
13015  * If the @value GVariant is floating, it is consumed.
13016  *
13017  * Since: 2.28
13018  */
13019
13020
13021 /**
13022  * g_alloca:
13023  * @size: number of bytes to allocate.
13024  *
13025  * Allocates @size bytes on the stack; these bytes will be freed when the current
13026  * stack frame is cleaned up. This macro essentially just wraps the alloca()
13027  * function present on most UNIX variants.
13028  * Thus it provides the same advantages and pitfalls as alloca():
13029  * <variablelist>
13030  * <varlistentry><term></term><listitem><para>
13031  * + alloca() is very fast, as on most systems it's implemented by just adjusting
13032  * the stack pointer register.
13033  * </para></listitem></varlistentry>
13034  * <varlistentry><term></term><listitem><para>
13035  * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
13036  * blocks just build up and are released together at function end.
13037  * </para></listitem></varlistentry>
13038  * <varlistentry><term></term><listitem><para>
13039  * - Allocation sizes have to fit into the current stack frame. For instance in a
13040  * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
13041  * so be sparse with alloca() uses.
13042  * </para></listitem></varlistentry>
13043  * <varlistentry><term></term><listitem><para>
13044  * - Allocation failure due to insufficient stack space is not indicated with a %NULL
13045  * return like e.g. with malloc(). Instead, most systems probably handle it the same
13046  * way as out of stack space situations from infinite function recursion, i.e.
13047  * with a segmentation fault.
13048  * </para></listitem></varlistentry>
13049  * <varlistentry><term></term><listitem><para>
13050  * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
13051  * Stack space allocated with alloca() in the same scope as a variable sized array
13052  * will be freed together with the variable sized array upon exit of that scope, and
13053  * not upon exit of the enclosing function scope.
13054  * </para></listitem></varlistentry>
13055  * </variablelist>
13056  *
13057  * Returns: space for @size bytes, allocated on the stack
13058  */
13059
13060
13061 /**
13062  * g_app_info_add_supports_type:
13063  * @appinfo: a #GAppInfo.
13064  * @content_type: a string.
13065  * @error: a #GError.
13066  *
13067  * Adds a content type to the application information to indicate the
13068  * application is capable of opening files with the given content type.
13069  *
13070  * Returns: %TRUE on success, %FALSE on error.
13071  */
13072
13073
13074 /**
13075  * g_app_info_can_delete:
13076  * @appinfo: a #GAppInfo
13077  *
13078  * Obtains the information whether the #GAppInfo can be deleted.
13079  * See g_app_info_delete().
13080  *
13081  * Returns: %TRUE if @appinfo can be deleted
13082  * Since: 2.20
13083  */
13084
13085
13086 /**
13087  * g_app_info_can_remove_supports_type:
13088  * @appinfo: a #GAppInfo.
13089  *
13090  * Checks if a supported content type can be removed from an application.
13091  * content types from a given @appinfo, %FALSE if not.
13092  *
13093  * Returns: %TRUE if it is possible to remove supported
13094  */
13095
13096
13097 /**
13098  * g_app_info_create_from_commandline:
13099  * @commandline: the commandline to use
13100  * @application_name: (allow-none): the application name, or %NULL to use @commandline
13101  * @flags: flags that can specify details of the created #GAppInfo
13102  * @error: a #GError location to store the error occuring, %NULL to ignore.
13103  *
13104  * Creates a new #GAppInfo from the given information.
13105  *
13106  * Returns: (transfer full): new #GAppInfo for given command.
13107  */
13108
13109
13110 /**
13111  * g_app_info_delete:
13112  * @appinfo: a #GAppInfo
13113  *
13114  * Tries to delete a #GAppInfo.
13115  * On some platforms, there may be a difference between user-defined
13116  * #GAppInfo<!-- -->s which can be deleted, and system-wide ones which
13117  * cannot. See g_app_info_can_delete().
13118  *
13119  * Virtual: do_delete
13120  * Returns: %TRUE if @appinfo has been deleted
13121  * Since: 2.20
13122  */
13123
13124
13125 /**
13126  * g_app_info_dup:
13127  * @appinfo: a #GAppInfo.
13128  *
13129  * Creates a duplicate of a #GAppInfo.
13130  *
13131  * Returns: (transfer full): a duplicate of @appinfo.
13132  */
13133
13134
13135 /**
13136  * g_app_info_equal:
13137  * @appinfo1: the first #GAppInfo.
13138  * @appinfo2: the second #GAppInfo.
13139  *
13140  * Checks if two #GAppInfo<!-- -->s are equal.
13141  *
13142  * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.
13143  */
13144
13145
13146 /**
13147  * g_app_info_get_all:
13148  *
13149  * Gets a list of all of the applications currently registered
13150  * on this system.
13151  * For desktop files, this includes applications that have
13152  * <literal>NoDisplay=true</literal> set or are excluded from
13153  * display by means of <literal>OnlyShowIn</literal> or
13154  * <literal>NotShowIn</literal>. See g_app_info_should_show().
13155  * The returned list does not include applications which have
13156  * the <literal>Hidden</literal> key set.
13157  *
13158  * Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfo<!---->s.
13159  */
13160
13161
13162 /**
13163  * g_app_info_get_all_for_type:
13164  * @content_type: the content type to find a #GAppInfo for
13165  *
13166  * Gets a list of all #GAppInfos for a given content type.
13167  * for given @content_type or %NULL on error.
13168  *
13169  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
13170  */
13171
13172
13173 /**
13174  * g_app_info_get_commandline:
13175  * @appinfo: a #GAppInfo
13176  *
13177  * Gets the commandline with which the application will be
13178  * started.
13179  * or %NULL if this information is not available
13180  *
13181  * Returns: a string containing the @appinfo's commandline,
13182  * Since: 2.20
13183  */
13184
13185
13186 /**
13187  * g_app_info_get_default_for_type:
13188  * @content_type: the content type to find a #GAppInfo for
13189  * @must_support_uris: if %TRUE, the #GAppInfo is expected to support URIs
13190  *
13191  * Gets the #GAppInfo that corresponds to a given content type.
13192  * %NULL on error.
13193  *
13194  * Returns: (transfer full): #GAppInfo for given @content_type or
13195  */
13196
13197
13198 /**
13199  * g_app_info_get_default_for_uri_scheme:
13200  * @uri_scheme: a string containing a URI scheme.
13201  *
13202  * Gets the default application for launching applications
13203  * using this URI scheme. A URI scheme is the initial part
13204  * of the URI, up to but not including the ':', e.g. "http",
13205  * "ftp" or "sip".
13206  *
13207  * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
13208  */
13209
13210
13211 /**
13212  * g_app_info_get_description:
13213  * @appinfo: a #GAppInfo.
13214  *
13215  * Gets a human-readable description of an installed application.
13216  * application @appinfo, or %NULL if none.
13217  *
13218  * Returns: a string containing a description of the
13219  */
13220
13221
13222 /**
13223  * g_app_info_get_display_name:
13224  * @appinfo: a #GAppInfo.
13225  *
13226  * Gets the display name of the application. The display name is often more
13227  * descriptive to the user than the name itself.
13228  * no display name is available.
13229  *
13230  * Returns: the display name of the application for @appinfo, or the name if
13231  * Since: 2.24
13232  */
13233
13234
13235 /**
13236  * g_app_info_get_executable:
13237  * @appinfo: a #GAppInfo
13238  *
13239  * Gets the executable's name for the installed application.
13240  * binaries name
13241  *
13242  * Returns: a string containing the @appinfo's application
13243  */
13244
13245
13246 /**
13247  * g_app_info_get_fallback_for_type:
13248  * @content_type: the content type to find a #GAppInfo for
13249  *
13250  * Gets a list of fallback #GAppInfos for a given content type, i.e.
13251  * those applications which claim to support the given content type
13252  * by MIME type subclassing and not directly.
13253  * for given @content_type or %NULL on error.
13254  *
13255  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
13256  * Since: 2.28
13257  */
13258
13259
13260 /**
13261  * g_app_info_get_icon:
13262  * @appinfo: a #GAppInfo.
13263  *
13264  * Gets the icon for the application.
13265  *
13266  * Returns: (transfer none): the default #GIcon for @appinfo.
13267  */
13268
13269
13270 /**
13271  * g_app_info_get_id:
13272  * @appinfo: a #GAppInfo.
13273  *
13274  * Gets the ID of an application. An id is a string that
13275  * identifies the application. The exact format of the id is
13276  * platform dependent. For instance, on Unix this is the
13277  * desktop file id from the xdg menu specification.
13278  * Note that the returned ID may be %NULL, depending on how
13279  * the @appinfo has been constructed.
13280  *
13281  * Returns: a string containing the application's ID.
13282  */
13283
13284
13285 /**
13286  * g_app_info_get_name:
13287  * @appinfo: a #GAppInfo.
13288  *
13289  * Gets the installed name of the application.
13290  *
13291  * Returns: the name of the application for @appinfo.
13292  */
13293
13294
13295 /**
13296  * g_app_info_get_recommended_for_type:
13297  * @content_type: the content type to find a #GAppInfo for
13298  *
13299  * Gets a list of recommended #GAppInfos for a given content type, i.e.
13300  * those applications which claim to support the given content type exactly,
13301  * and not by MIME type subclassing.
13302  * Note that the first application of the list is the last used one, i.e.
13303  * the last one for which #g_app_info_set_as_last_used_for_type has been
13304  * called.
13305  * for given @content_type or %NULL on error.
13306  *
13307  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
13308  * Since: 2.28
13309  */
13310
13311
13312 /**
13313  * g_app_info_launch:
13314  * @appinfo: a #GAppInfo
13315  * @files: (element-type GFile): a #GList of #GFile objects
13316  * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
13317  * @error: a #GError
13318  *
13319  * Launches the application. Passes @files to the launched application
13320  * as arguments, using the optional @launch_context to get information
13321  * about the details of the launcher (like what screen it is on).
13322  * On error, @error will be set accordingly.
13323  * To launch the application without arguments pass a %NULL @files list.
13324  * Note that even if the launch is successful the application launched
13325  * can fail to start if it runs into problems during startup. There is
13326  * no way to detect this.
13327  * Some URIs can be changed when passed through a GFile (for instance
13328  * unsupported uris with strange formats like mailto:), so if you have
13329  * a textual uri you want to pass in as argument, consider using
13330  * g_app_info_launch_uris() instead.
13331  * On UNIX, this function sets the <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>
13332  * environment variable with the path of the launched desktop file and
13333  * <envar>GIO_LAUNCHED_DESKTOP_FILE_PID</envar> to the process
13334  * id of the launched process. This can be used to ignore
13335  * <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>, should it be inherited
13336  * by further processes. The <envar>DISPLAY</envar> and
13337  * <envar>DESKTOP_STARTUP_ID</envar> environment variables are also
13338  * set, based on information provided in @launch_context.
13339  *
13340  * Returns: %TRUE on successful launch, %FALSE otherwise.
13341  */
13342
13343
13344 /**
13345  * g_app_info_launch_default_for_uri:
13346  * @uri: the uri to show
13347  * @launch_context: (allow-none): an optional #GAppLaunchContext.
13348  * @error: a #GError.
13349  *
13350  * Utility function that launches the default application
13351  * registered to handle the specified uri. Synchronous I/O
13352  * is done on the uri to detect the type of the file if
13353  * required.
13354  *
13355  * Returns: %TRUE on success, %FALSE on error.
13356  */
13357
13358
13359 /**
13360  * g_app_info_launch_uris:
13361  * @appinfo: a #GAppInfo
13362  * @uris: (element-type utf8): a #GList containing URIs to launch.
13363  * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
13364  * @error: a #GError
13365  *
13366  * Launches the application. Passes @uris to the launched application
13367  * as arguments, using the optional @launch_context to get information
13368  * about the details of the launcher (like what screen it is on).
13369  * On error, @error will be set accordingly.
13370  * To lauch the application without arguments pass a %NULL @uris list.
13371  * Note that even if the launch is successful the application launched
13372  * can fail to start if it runs into problems during startup. There is
13373  * no way to detect this.
13374  *
13375  * Returns: %TRUE on successful launch, %FALSE otherwise.
13376  */
13377
13378
13379 /**
13380  * g_app_info_remove_supports_type:
13381  * @appinfo: a #GAppInfo.
13382  * @content_type: a string.
13383  * @error: a #GError.
13384  *
13385  * Removes a supported type from an application, if possible.
13386  *
13387  * Returns: %TRUE on success, %FALSE on error.
13388  */
13389
13390
13391 /**
13392  * g_app_info_reset_type_associations:
13393  * @content_type: a content type
13394  *
13395  * Removes all changes to the type associations done by
13396  * g_app_info_set_as_default_for_type(),
13397  * g_app_info_set_as_default_for_extension(),
13398  * g_app_info_add_supports_type() or g_app_info_remove_supports_type().
13399  *
13400  * Since: 2.20
13401  */
13402
13403
13404 /**
13405  * g_app_info_set_as_default_for_extension:
13406  * @appinfo: a #GAppInfo.
13407  * @extension: a string containing the file extension (without the dot).
13408  * @error: a #GError.
13409  *
13410  * Sets the application as the default handler for the given file extension.
13411  *
13412  * Returns: %TRUE on success, %FALSE on error.
13413  */
13414
13415
13416 /**
13417  * g_app_info_set_as_default_for_type:
13418  * @appinfo: a #GAppInfo.
13419  * @content_type: the content type.
13420  * @error: a #GError.
13421  *
13422  * Sets the application as the default handler for a given type.
13423  *
13424  * Returns: %TRUE on success, %FALSE on error.
13425  */
13426
13427
13428 /**
13429  * g_app_info_set_as_last_used_for_type:
13430  * @appinfo: a #GAppInfo.
13431  * @content_type: the content type.
13432  * @error: a #GError.
13433  *
13434  * Sets the application as the last used application for a given type.
13435  * This will make the application appear as first in the list returned by
13436  * #g_app_info_get_recommended_for_type, regardless of the default application
13437  * for that content type.
13438  *
13439  * Returns: %TRUE on success, %FALSE on error.
13440  */
13441
13442
13443 /**
13444  * g_app_info_should_show:
13445  * @appinfo: a #GAppInfo.
13446  *
13447  * Checks if the application info should be shown in menus that
13448  * list available applications.
13449  *
13450  * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise.
13451  */
13452
13453
13454 /**
13455  * g_app_info_supports_files:
13456  * @appinfo: a #GAppInfo.
13457  *
13458  * Checks if the application accepts files as arguments.
13459  *
13460  * Returns: %TRUE if the @appinfo supports files.
13461  */
13462
13463
13464 /**
13465  * g_app_info_supports_uris:
13466  * @appinfo: a #GAppInfo.
13467  *
13468  * Checks if the application supports reading files and directories from URIs.
13469  *
13470  * Returns: %TRUE if the @appinfo supports URIs.
13471  */
13472
13473
13474 /**
13475  * g_app_launch_context_get_display:
13476  * @context: a #GAppLaunchContext
13477  * @info: a #GAppInfo
13478  * @files: (element-type GFile): a #GList of #GFile objects
13479  *
13480  * Gets the display string for the @context. This is used to ensure new
13481  * applications are started on the same display as the launching
13482  * application, by setting the <envar>DISPLAY</envar> environment variable.
13483  *
13484  * Returns: a display string for the display.
13485  */
13486
13487
13488 /**
13489  * g_app_launch_context_get_startup_notify_id:
13490  * @context: a #GAppLaunchContext
13491  * @info: a #GAppInfo
13492  * @files: (element-type GFile): a #GList of of #GFile objects
13493  *
13494  * Initiates startup notification for the application and returns the
13495  * <envar>DESKTOP_STARTUP_ID</envar> for the launched operation,
13496  * if supported.
13497  * Startup notification IDs are defined in the <ulink
13498  * url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">
13499  * FreeDesktop.Org Startup Notifications standard</ulink>.
13500  * not supported.
13501  *
13502  * Returns: a startup notification ID for the application, or %NULL if
13503  */
13504
13505
13506 /**
13507  * g_app_launch_context_launch_failed:
13508  * @context: a #GAppLaunchContext.
13509  * @startup_notify_id: the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
13510  *
13511  * Called when an application has failed to launch, so that it can cancel
13512  * the application startup notification started in g_app_launch_context_get_startup_notify_id().
13513  */
13514
13515
13516 /**
13517  * g_app_launch_context_new:
13518  *
13519  * Creates a new application launch context. This is not normally used,
13520  * instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
13521  *
13522  * Returns: a #GAppLaunchContext.
13523  */
13524
13525
13526 /**
13527  * g_application_activate:
13528  * @application: a #GApplication
13529  *
13530  * Activates the application.
13531  * In essence, this results in the #GApplication::activate() signal being
13532  * emitted in the primary instance.
13533  * The application must be registered before calling this function.
13534  *
13535  * Since: 2.28
13536  */
13537
13538
13539 /**
13540  * g_application_command_line_get_arguments:
13541  * @cmdline: a #GApplicationCommandLine
13542  * @argc: (out): the length of the arguments array, or %NULL
13543  *
13544  * Gets the list of arguments that was passed on the command line.
13545  * The strings in the array may contain non-utf8 data.
13546  * The return value is %NULL-terminated and should be freed using
13547  * g_strfreev().
13548  * containing the arguments (the argv)
13549  *
13550  * Returns: (array length=argc) (transfer full): the string array
13551  * Since: 2.28
13552  */
13553
13554
13555 /**
13556  * g_application_command_line_get_cwd:
13557  * @cmdline: a #GApplicationCommandLine
13558  *
13559  * Gets the working directory of the command line invocation.  The
13560  * string may contain non-utf8 data.
13561  * It is possible that the remote application did not send a working
13562  * directory, so this may be %NULL.
13563  * The return value should not be modified or freed and is valid for as
13564  * long as @cmdline exists.
13565  *
13566  * Returns: the current directory, or %NULL
13567  * Since: 2.28
13568  */
13569
13570
13571 /**
13572  * g_application_command_line_get_environ:
13573  * @cmdline: a #GApplicationCommandLine
13574  *
13575  * Gets the contents of the 'environ' variable of the command line
13576  * invocation, as would be returned by g_get_environ().  The strings may
13577  * contain non-utf8 data.
13578  * The remote application usually does not send an environment.  Use
13579  * %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
13580  * set it is possible that the environment is still not available (due
13581  * to invocation messages from other applications).
13582  * The return value should not be modified or freed and is valid for as
13583  * long as @cmdline exists.
13584  * strings, or %NULL if they were not sent
13585  *
13586  * Returns: (array zero-terminated=1) (transfer none): the environment
13587  * Since: 2.28
13588  */
13589
13590
13591 /**
13592  * g_application_command_line_get_exit_status:
13593  * @cmdline: a #GApplicationCommandLine
13594  *
13595  * Gets the exit status of @cmdline.  See
13596  * g_application_command_line_set_exit_status() for more information.
13597  *
13598  * Returns: the exit status
13599  * Since: 2.28
13600  */
13601
13602
13603 /**
13604  * g_application_command_line_get_is_remote:
13605  * @cmdline: a #GApplicationCommandLine
13606  *
13607  * Determines if @cmdline represents a remote invocation.
13608  *
13609  * Returns: %TRUE if the invocation was remote
13610  * Since: 2.28
13611  */
13612
13613
13614 /**
13615  * g_application_command_line_get_platform_data:
13616  * @cmdline: #GApplicationCommandLine
13617  *
13618  * Gets the platform data associated with the invocation of @cmdline.
13619  * This is a #GVariant dictionary containing information about the
13620  * context in which the invocation occured.  It typically contains
13621  * information like the current working directory and the startup
13622  * notification ID.
13623  * For local invocation, it will be %NULL.
13624  *
13625  * Returns: the platform data, or %NULL
13626  * Since: 2.28
13627  */
13628
13629
13630 /**
13631  * g_application_command_line_getenv:
13632  * @cmdline: a #GApplicationCommandLine
13633  * @name: the environment variable to get
13634  *
13635  * Gets the value of a particular environment variable of the command
13636  * line invocation, as would be returned by g_getenv().  The strings may
13637  * contain non-utf8 data.
13638  * The remote application usually does not send an environment.  Use
13639  * %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
13640  * set it is possible that the environment is still not available (due
13641  * to invocation messages from other applications).
13642  * The return value should not be modified or freed and is valid for as
13643  * long as @cmdline exists.
13644  *
13645  * Returns: the value of the variable, or %NULL if unset or unsent
13646  * Since: 2.28
13647  */
13648
13649
13650 /**
13651  * g_application_command_line_print:
13652  * @cmdline: a #GApplicationCommandLine
13653  * @format: a printf-style format string
13654  * @...: arguments, as per @format
13655  *
13656  * Formats a message and prints it using the stdout print handler in the
13657  * invoking process.
13658  * If @cmdline is a local invocation then this is exactly equivalent to
13659  * g_print().  If @cmdline is remote then this is equivalent to calling
13660  * g_print() in the invoking process.
13661  *
13662  * Since: 2.28
13663  */
13664
13665
13666 /**
13667  * g_application_command_line_printerr:
13668  * @cmdline: a #GApplicationCommandLine
13669  * @format: a printf-style format string
13670  * @...: arguments, as per @format
13671  *
13672  * Formats a message and prints it using the stderr print handler in the
13673  * invoking process.
13674  * If @cmdline is a local invocation then this is exactly equivalent to
13675  * g_printerr().  If @cmdline is remote then this is equivalent to
13676  * calling g_printerr() in the invoking process.
13677  *
13678  * Since: 2.28
13679  */
13680
13681
13682 /**
13683  * g_application_command_line_set_exit_status:
13684  * @cmdline: a #GApplicationCommandLine
13685  * @exit_status: the exit status
13686  *
13687  * Sets the exit status that will be used when the invoking process
13688  * exits.
13689  * The return value of the #GApplication::command-line signal is
13690  * passed to this function when the handler returns.  This is the usual
13691  * way of setting the exit status.
13692  * In the event that you want the remote invocation to continue running
13693  * and want to decide on the exit status in the future, you can use this
13694  * call.  For the case of a remote invocation, the remote process will
13695  * typically exit when the last reference is dropped on @cmdline.  The
13696  * exit status of the remote process will be equal to the last value
13697  * that was set with this function.
13698  * In the case that the commandline invocation is local, the situation
13699  * is slightly more complicated.  If the commandline invocation results
13700  * increased to a non-zero value) then the application is considered to
13701  * have been 'successful' in a certain sense, and the exit status is
13702  * always zero.  If the application use count is zero, though, the exit
13703  * status of the local #GApplicationCommandLine is used.
13704  *
13705  * In the mainloop running (ie: because the use-count of the application
13706  * Since: 2.28
13707  */
13708
13709
13710 /**
13711  * g_application_get_application_id:
13712  * @application: a #GApplication
13713  * @returns: the identifier for @application, owned by @application
13714  *
13715  * Gets the unique identifier for @application.
13716  *
13717  * Since: 2.28
13718  */
13719
13720
13721 /**
13722  * g_application_get_flags:
13723  * @application: a #GApplication
13724  * @returns: the flags for @application
13725  *
13726  * Gets the flags for @application.
13727  * See #GApplicationFlags.
13728  *
13729  * Since: 2.28
13730  */
13731
13732
13733 /**
13734  * g_application_get_inactivity_timeout:
13735  * @application: a #GApplication
13736  *
13737  * Gets the current inactivity timeout for the application.
13738  * This is the amount of time (in milliseconds) after the last call to
13739  * g_application_release() before the application stops running.
13740  *
13741  * Returns: the timeout, in milliseconds
13742  * Since: 2.28
13743  */
13744
13745
13746 /**
13747  * g_application_get_is_registered:
13748  * @application: a #GApplication
13749  * @returns: %TRUE if @application is registered
13750  *
13751  * Checks if @application is registered.
13752  * An application is registered if g_application_register() has been
13753  * successfully called.
13754  *
13755  * Since: 2.28
13756  */
13757
13758
13759 /**
13760  * g_application_get_is_remote:
13761  * @application: a #GApplication
13762  * @returns: %TRUE if @application is remote
13763  *
13764  * Checks if @application is remote.
13765  * If @application is remote then it means that another instance of
13766  * application already exists (the 'primary' instance).  Calls to
13767  * perform actions on @application will result in the actions being
13768  * performed by the primary instance.
13769  * The value of this property can not be accessed before
13770  * g_application_register() has been called.  See
13771  * g_application_get_is_registered().
13772  *
13773  * Since: 2.28
13774  */
13775
13776
13777 /**
13778  * g_application_hold:
13779  * @application: a #GApplication
13780  *
13781  * Increases the use count of @application.
13782  * Use this function to indicate that the application has a reason to
13783  * continue to run.  For example, g_application_hold() is called by GTK+
13784  * when a toplevel window is on the screen.
13785  * To cancel the hold, call g_application_release().
13786  */
13787
13788
13789 /**
13790  * g_application_id_is_valid:
13791  * @application_id: a potential application identifier
13792  * @returns: %TRUE if @application_id is valid
13793  *
13794  * Checks if @application_id is a valid application identifier.
13795  * A valid ID is required for calls to g_application_new() and
13796  * g_application_set_application_id().
13797  * For convenience, the restrictions on application identifiers are
13798  * reproduced here:
13799  * <itemizedlist>
13800  * <listitem>Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-" and must not begin with a digit.</listitem>
13801  * <listitem>Application identifiers must contain at least one '.' (period) character (and thus at least two elements).</listitem>
13802  * <listitem>Application identifiers must not begin with a '.' (period) character.</listitem>
13803  * <listitem>Application identifiers must not contain consecutive '.' (period) characters.</listitem>
13804  * <listitem>Application identifiers must not exceed 255 characters.</listitem>
13805  * </itemizedlist>
13806  */
13807
13808
13809 /**
13810  * g_application_new:
13811  * @application_id: the application id
13812  * @flags: the application flags
13813  * @returns: a new #GApplication instance
13814  *
13815  * Creates a new #GApplication instance.
13816  * This function calls g_type_init() for you.
13817  * The application id must be valid.  See g_application_id_is_valid().
13818  */
13819
13820
13821 /**
13822  * g_application_open:
13823  * @application: a #GApplication
13824  * @files: (array length=n_files): an array of #GFiles to open
13825  * @n_files: the length of the @files array
13826  * @hint: a hint (or ""), but never %NULL
13827  *
13828  * Opens the given files.
13829  * In essence, this results in the #GApplication::open signal being emitted
13830  * in the primary instance.
13831  * intended to be used by applications that have multiple modes for
13832  * for this functionality, you should use "".
13833  * The application must be registered before calling this function
13834  * and it must have the %G_APPLICATION_HANDLES_OPEN flag set.
13835  *
13836  * Opening files (eg: "view" vs "edit", etc).  Unless you have a need
13837  * Since: 2.28
13838  */
13839
13840
13841 /**
13842  * g_application_register:
13843  * @application: a #GApplication
13844  * @cancellable: a #GCancellable, or %NULL
13845  * @error: a pointer to a NULL #GError, or %NULL
13846  * @returns: %TRUE if registration succeeded
13847  *
13848  * Attempts registration of the application.
13849  * This is the point at which the application discovers if it is the
13850  * primary instance or merely acting as a remote for an already-existing
13851  * primary instance.  This is implemented by attempting to acquire the
13852  * application identifier as a uniue bus name on the session bus using
13853  * GDBus.
13854  * Due to the internal architecture of GDBus, method calls can be
13855  * dispatched at any time (even if a main loop is not running).  For
13856  * this reason, you must ensure that any object paths that you wish to
13857  * register are registered before calling this function.
13858  * If the application has already been registered then %TRUE is
13859  * returned with no work performed.
13860  * The #GApplication::startup signal is emitted if registration succeeds
13861  * and @application is the primary instance.
13862  * In the event of an error (such as @cancellable being cancelled, or a
13863  * failure to connect to the session bus), %FALSE is returned and @error
13864  * is set appropriately.
13865  * instance is or is not the primary instance of the application.  See
13866  * g_application_get_is_remote() for that.
13867  *
13868  * Note: the return value of this function is not an indicator that this
13869  * Since: 2.28
13870  */
13871
13872
13873 /**
13874  * g_application_release:
13875  * @application: a #GApplication
13876  *
13877  * Decrease the use count of @application.
13878  * When the use count reaches zero, the application will stop running.
13879  * Never call this function except to cancel the effect of a previous
13880  * call to g_application_hold().
13881  */
13882
13883
13884 /**
13885  * g_application_run:
13886  * @application: a #GApplication
13887  * @argc: the argc from main()
13888  * @argv: (array length=argc): the argv from main()
13889  * @returns: the exit status
13890  *
13891  * Runs the application.
13892  * This function is intended to be run from main() and its return value
13893  * is intended to be returned by main().
13894  * First, the local_command_line() virtual function is invoked.  This
13895  * function always runs on the local instance.  If that function returns
13896  * %FALSE then the application is registered and the #GApplication::command-line
13897  * signal is emitted in the primary instance (which may or may not be
13898  * this instance).
13899  * If the application has the %G_APPLICATION_HANDLES_COMMAND_LINE
13900  * flag set then the default implementation of local_command_line()
13901  * always returns %FALSE immediately, resulting in the commandline
13902  * always being handled in the primary instance.
13903  * Otherwise, the default implementation of local_command_line() tries
13904  * to do a couple of things that are probably reasonable for most
13905  * applications.  First, g_application_register() is called to attempt
13906  * to register the application.  If that works, then the command line
13907  * arguments are inspected.  If no commandline arguments are given, then
13908  * g_application_activate() is called.  If commandline arguments are
13909  * given and the %G_APPLICATION_HANDLES_OPEN flag is set then they
13910  * are assumed to be filenames and g_application_open() is called.
13911  * If you are interested in doing more complicated local handling of the
13912  * commandline then you should implement your own #GApplication subclass
13913  * and override local_command_line(). See
13914  * <xref linkend="gapplication-example-cmdline2"/> for an example.
13915  * If, after the above is done, the use count of the application is zero
13916  * then the exit status is returned immediately.  If the use count is
13917  * non-zero then the mainloop is run until the use count falls to zero,
13918  * at which point 0 is returned.
13919  * If the %G_APPLICATION_IS_SERVICE flag is set, then the exiting at
13920  * around to provide its <emphasis>service</emphasis> to others).
13921  *
13922  * Use count of zero is delayed for a while (ie: the instance stays
13923  * Since: 2.28
13924  */
13925
13926
13927 /**
13928  * g_application_set_action_group:
13929  * @application: a #GApplication
13930  * @action_group: (allow-none): a #GActionGroup, or %NULL
13931  *
13932  * Sets or unsets the group of actions associated with the application.
13933  * These actions are the actions that can be remotely invoked.
13934  * It is an error to call this function after the application has been
13935  * registered.
13936  *
13937  * Since: 2.28
13938  */
13939
13940
13941 /**
13942  * g_application_set_application_id:
13943  * @application: a #GApplication
13944  * @application_id: the identifier for @application
13945  *
13946  * Sets the unique identifier for @application.
13947  * The application id can only be modified if @application has not yet
13948  * been registered.
13949  * The application id must be valid.  See g_application_id_is_valid().
13950  *
13951  * Since: 2.28
13952  */
13953
13954
13955 /**
13956  * g_application_set_flags:
13957  * @application: a #GApplication
13958  * @flags: the flags for @application
13959  *
13960  * Sets the flags for @application.
13961  * The flags can only be modified if @application has not yet been
13962  * registered.
13963  * See #GApplicationFlags.
13964  *
13965  * Since: 2.28
13966  */
13967
13968
13969 /**
13970  * g_application_set_inactivity_timeout:
13971  * @application: a #GApplication
13972  * @inactivity_timeout: the timeout, in milliseconds
13973  *
13974  * Sets the current inactivity timeout for the application.
13975  * This is the amount of time (in milliseconds) after the last call to
13976  * g_application_release() before the application stops running.
13977  * This call has no side effects of its own.  The value set here is only
13978  * used for next time g_application_release() drops the use count to
13979  * zero.  Any timeouts currently in progress are not impacted.
13980  *
13981  * Returns: the timeout, in milliseconds
13982  * Since: 2.28
13983  */
13984
13985
13986 /**
13987  * g_async_initable_init_async:
13988  * @initable: a #GAsyncInitable.
13989  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
13990  * @cancellable: optional #GCancellable object, %NULL to ignore.
13991  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
13992  * @user_data: the data to pass to callback function
13993  *
13994  * Starts asynchronous initialization of the object implementing the
13995  * interface. This must be done before any real use of the object after
13996  * initial construction. If the object also implements #GInitable you can
13997  * optionally call g_initable_init() instead.
13998  * When the initialization is finished, @callback will be called. You can
13999  * then call g_async_initable_init_finish() to get the result of the
14000  * initialization.
14001  * Implementations may also support cancellation. If @cancellable is not
14002  * %NULL, then initialization can be cancelled by triggering the cancellable
14003  * object from another thread. If the operation was cancelled, the error
14004  * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
14005  * the object doesn't support cancellable initialization, the error
14006  * %G_IO_ERROR_NOT_SUPPORTED will be returned.
14007  * If this function is not called, or returns with an error, then all
14008  * operations on the object should fail, generally returning the
14009  * error %G_IO_ERROR_NOT_INITIALIZED.
14010  * to this function with the same argument should return the same results.
14011  * Only the first call initializes the object; further calls return the result
14012  * of the first call. This is so that it's safe to implement the singleton
14013  * pattern in the GObject constructor function.
14014  * For classes that also support the #GInitable interface, the default
14015  * implementation of this method will run the g_initable_init() function
14016  * in a thread, so if you want to support asynchronous initialization via
14017  * threads, just implement the #GAsyncInitable interface without overriding
14018  * any interface methods.
14019  *
14020  * Implementations of this method must be idempotent: i.e. multiple calls
14021  * Since: 2.22
14022  */
14023
14024
14025 /**
14026  * g_async_initable_init_finish:
14027  * @initable: a #GAsyncInitable.
14028  * @res: a #GAsyncResult.
14029  * @error: a #GError location to store the error occuring, or %NULL to ignore.
14030  *
14031  * Finishes asynchronous initialization and returns the result.
14032  * See g_async_initable_init_async().
14033  * will return %FALSE and set @error appropriately if present.
14034  *
14035  * Returns: %TRUE if successful. If an error has occurred, this function
14036  * Since: 2.22
14037  */
14038
14039
14040 /**
14041  * g_async_initable_new_async:
14042  * @object_type: a #GType supporting #GAsyncInitable.
14043  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14044  * @cancellable: optional #GCancellable object, %NULL to ignore.
14045  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
14046  * @user_data: the data to pass to callback function
14047  * @first_property_name: the name of the first property, or %NULL if no properties
14048  * @...: the value of the first property, followed by other property value pairs, and ended by %NULL.
14049  *
14050  * Helper function for constructing #GAsyncInitiable object. This is
14051  * similar to g_object_new() but also initializes the object asynchronously.
14052  * When the initialization is finished, @callback will be called. You can
14053  * then call g_async_initable_new_finish() to get the new object and check
14054  * for any errors.
14055  *
14056  * Since: 2.22
14057  */
14058
14059
14060 /**
14061  * g_async_initable_new_finish:
14062  * @initable: the #GAsyncInitable from the callback
14063  * @res: the #GAsyncResult.from the callback
14064  * @error: a #GError location to store the error occuring, or %NULL to ignore.
14065  *
14066  * Finishes the async construction for the various g_async_initable_new calls,
14067  * returning the created object or %NULL on error.
14068  * g_object_unref().
14069  *
14070  * Returns: (transfer full): a newly created #GObject, or %NULL on error. Free with
14071  * Since: 2.22
14072  */
14073
14074
14075 /**
14076  * g_async_initable_new_valist_async:
14077  * @object_type: a #GType supporting #GAsyncInitable.
14078  * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
14079  * @var_args: The var args list generated from @first_property_name.
14080  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14081  * @cancellable: optional #GCancellable object, %NULL to ignore.
14082  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
14083  * @user_data: the data to pass to callback function
14084  *
14085  * Helper function for constructing #GAsyncInitiable object. This is
14086  * similar to g_object_new_valist() but also initializes the object
14087  * asynchronously.
14088  * When the initialization is finished, @callback will be called. You can
14089  * then call g_async_initable_new_finish() to get the new object and check
14090  * for any errors.
14091  *
14092  * Since: 2.22
14093  */
14094
14095
14096 /**
14097  * g_async_initable_newv_async:
14098  * @object_type: a #GType supporting #GAsyncInitable.
14099  * @n_parameters: the number of parameters in @parameters
14100  * @parameters: the parameters to use to construct the object
14101  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14102  * @cancellable: optional #GCancellable object, %NULL to ignore.
14103  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
14104  * @user_data: the data to pass to callback function
14105  *
14106  * Helper function for constructing #GAsyncInitiable object. This is
14107  * similar to g_object_newv() but also initializes the object asynchronously.
14108  * When the initialization is finished, @callback will be called. You can
14109  * then call g_async_initable_new_finish() to get the new object and check
14110  * for any errors.
14111  *
14112  * Since: 2.22
14113  */
14114
14115
14116 /**
14117  * g_async_result_get_source_object:
14118  * @res: a #GAsyncResult
14119  *
14120  * Gets the source object from a #GAsyncResult.
14121  * or %NULL if there is none.
14122  *
14123  * Returns: (transfer full): a new reference to the source object for the @res,
14124  */
14125
14126
14127 /**
14128  * g_async_result_get_user_data:
14129  * @res: a #GAsyncResult.
14130  *
14131  * Gets the user data from a #GAsyncResult.
14132  *
14133  * Returns: (transfer full): the user data for @res.
14134  */
14135
14136
14137 /**
14138  * g_atomic_int_dec_and_test:
14139  * @atomic: a pointer to an integer
14140  *
14141  * Atomically decrements the integer pointed to by @atomic by 1.
14142  * after decrementing it
14143  *
14144  * Returns: %TRUE if the integer pointed to by @atomic is 0
14145  * Since: 2.4
14146  */
14147
14148
14149 /**
14150  * g_atomic_int_inc:
14151  * @atomic: a pointer to an integer.
14152  *
14153  * Atomically increments the integer pointed to by @atomic by 1.
14154  *
14155  * Since: 2.4
14156  */
14157
14158
14159 /**
14160  * g_buffered_input_stream_fill:
14161  * @stream: a #GBufferedInputStream
14162  * @count: the number of bytes that will be read from the stream
14163  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
14164  * @error: location to store the error occuring, or %NULL to ignore
14165  *
14166  * Tries to read @count bytes from the stream into the buffer.
14167  * Will block during this read.
14168  * If @count is zero, returns zero and does nothing. A value of @count
14169  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
14170  * On success, the number of bytes read into the buffer is returned.
14171  * It is not an error if this is not the same as the requested size, as it
14172  * can happen e.g. near the end of a file. Zero is returned on end of file
14173  * (or if @count is zero),  but never otherwise.
14174  * If @count is -1 then the attempted read size is equal to the number of
14175  * bytes that are required to fill the buffer.
14176  * If @cancellable is not %NULL, then the operation can be cancelled by
14177  * triggering the cancellable object from another thread. If the operation
14178  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
14179  * operation was partially finished when the operation was cancelled the
14180  * partial result will be returned, without an error.
14181  * On error -1 is returned and @error is set accordingly.
14182  * For the asynchronous, non-blocking, version of this function, see
14183  * g_buffered_input_stream_fill_async().
14184  * or -1 on error.
14185  *
14186  * Returns: the number of bytes read into @stream's buffer, up to @count,
14187  */
14188
14189
14190 /**
14191  * g_buffered_input_stream_fill_async:
14192  * @stream: a #GBufferedInputStream
14193  * @count: the number of bytes that will be read from the stream
14194  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
14195  * @cancellable: (allow-none): optional #GCancellable object
14196  * @callback: (scope async): a #GAsyncReadyCallback
14197  * @user_data: (closure): a #gpointer
14198  *
14199  * Reads data into @stream's buffer asynchronously, up to @count size.
14200  * version of this function, see g_buffered_input_stream_fill().
14201  * If @count is -1 then the attempted read size is equal to the number
14202  * of bytes that are required to fill the buffer.
14203  */
14204
14205
14206 /**
14207  * g_buffered_input_stream_fill_finish:
14208  * @stream: a #GBufferedInputStream
14209  * @result: a #GAsyncResult
14210  * @error: a #GError
14211  *
14212  * Finishes an asynchronous read.
14213  *
14214  * Returns: a #gssize of the read stream, or %-1 on an error.
14215  */
14216
14217
14218 /**
14219  * g_buffered_input_stream_get_available:
14220  * @stream: #GBufferedInputStream
14221  *
14222  * Gets the size of the available data within the stream.
14223  *
14224  * Returns: size of the available stream.
14225  */
14226
14227
14228 /**
14229  * g_buffered_input_stream_get_buffer_size:
14230  * @stream: a #GBufferedInputStream
14231  *
14232  * Gets the size of the input buffer.
14233  *
14234  * Returns: the current buffer size.
14235  */
14236
14237
14238 /**
14239  * g_buffered_input_stream_new:
14240  * @base_stream: a #GInputStream
14241  *
14242  * Creates a new #GInputStream from the given @base_stream, with
14243  * a buffer set to the default size (4 kilobytes).
14244  *
14245  * Returns: a #GInputStream for the given @base_stream.
14246  */
14247
14248
14249 /**
14250  * g_buffered_input_stream_new_sized:
14251  * @base_stream: a #GInputStream
14252  * @size: a #gsize
14253  *
14254  * Creates a new #GBufferedInputStream from the given @base_stream,
14255  * with a buffer set to @size.
14256  *
14257  * Returns: a #GInputStream.
14258  */
14259
14260
14261 /**
14262  * g_buffered_input_stream_peek:
14263  * @stream: a #GBufferedInputStream
14264  * @buffer: a pointer to an allocated chunk of memory
14265  * @offset: a #gsize
14266  * @count: a #gsize
14267  *
14268  * Peeks in the buffer, copying data of size @count into @buffer,
14269  * offset @offset bytes.
14270  *
14271  * Returns: a #gsize of the number of bytes peeked, or -1 on error.
14272  */
14273
14274
14275 /**
14276  * g_buffered_input_stream_peek_buffer:
14277  * @stream: a #GBufferedInputStream
14278  * @count: (out): a #gsize to get the number of bytes available in the buffer
14279  *
14280  * Returns the buffer with the currently available bytes. The returned
14281  * buffer must not be modified and will become invalid when reading from
14282  * the stream or filling the buffer.
14283  * read-only buffer
14284  *
14285  * Returns: (array length=count) (element-type guint8) (transfer none):
14286  */
14287
14288
14289 /**
14290  * g_buffered_input_stream_read_byte:
14291  * @stream: a #GBufferedInputStream
14292  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
14293  * @error: location to store the error occuring, or %NULL to ignore
14294  *
14295  * Tries to read a single byte from the stream or the buffer. Will block
14296  * during this read.
14297  * On success, the byte read from the stream is returned. On end of stream
14298  * -1 is returned but it's not an exceptional error and @error is not set.
14299  * If @cancellable is not %NULL, then the operation can be cancelled by
14300  * triggering the cancellable object from another thread. If the operation
14301  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
14302  * operation was partially finished when the operation was cancelled the
14303  * partial result will be returned, without an error.
14304  * On error -1 is returned and @error is set accordingly.
14305  *
14306  * Returns: the byte read from the @stream, or -1 on end of stream or error.
14307  */
14308
14309
14310 /**
14311  * g_buffered_input_stream_set_buffer_size:
14312  * @stream: a #GBufferedInputStream
14313  * @size: a #gsize
14314  *
14315  * Sets the size of the internal buffer of @stream to @size, or to the
14316  * size of the contents of the buffer. The buffer can never be resized
14317  * smaller than its current contents.
14318  */
14319
14320
14321 /**
14322  * g_buffered_output_stream_get_auto_grow:
14323  * @stream: a #GBufferedOutputStream.
14324  *
14325  * Checks if the buffer automatically grows as data is added.
14326  * %FALSE otherwise.
14327  *
14328  * Returns: %TRUE if the @stream's buffer automatically grows,
14329  */
14330
14331
14332 /**
14333  * g_buffered_output_stream_get_buffer_size:
14334  * @stream: a #GBufferedOutputStream.
14335  *
14336  * Gets the size of the buffer in the @stream.
14337  *
14338  * Returns: the current size of the buffer.
14339  */
14340
14341
14342 /**
14343  * g_buffered_output_stream_new:
14344  * @base_stream: a #GOutputStream.
14345  *
14346  * Creates a new buffered output stream for a base stream.
14347  *
14348  * Returns: a #GOutputStream for the given @base_stream.
14349  */
14350
14351
14352 /**
14353  * g_buffered_output_stream_new_sized:
14354  * @base_stream: a #GOutputStream.
14355  * @size: a #gsize.
14356  *
14357  * Creates a new buffered output stream with a given buffer size.
14358  *
14359  * Returns: a #GOutputStream with an internal buffer set to @size.
14360  */
14361
14362
14363 /**
14364  * g_buffered_output_stream_set_auto_grow:
14365  * @stream: a #GBufferedOutputStream.
14366  * @auto_grow: a #gboolean.
14367  *
14368  * Sets whether or not the @stream's buffer should automatically grow.
14369  * If @auto_grow is true, then each write will just make the buffer
14370  * larger, and you must manually flush the buffer to actually write out
14371  * the data to the underlying stream.
14372  */
14373
14374
14375 /**
14376  * g_buffered_output_stream_set_buffer_size:
14377  * @stream: a #GBufferedOutputStream.
14378  * @size: a #gsize.
14379  *
14380  * Sets the size of the internal buffer to @size.
14381  */
14382
14383
14384 /**
14385  * g_bus_get:
14386  * @bus_type: A #GBusType.
14387  * @cancellable: A #GCancellable or %NULL.
14388  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
14389  * @user_data: The data to pass to @callback.
14390  *
14391  * Asynchronously connects to the message bus specified by @bus_type.
14392  * When the operation is finished, @callback will be invoked. You can
14393  * then call g_bus_get_finish() to get the result of the operation.
14394  * This is a asynchronous failable function. See g_bus_get_sync() for
14395  * the synchronous version.
14396  *
14397  * Since: 2.26
14398  */
14399
14400
14401 /**
14402  * g_bus_get_finish:
14403  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_bus_get().
14404  * @error: Return location for error or %NULL.
14405  *
14406  * Finishes an operation started with g_bus_get().
14407  * The returned object is a singleton, that is, shared with other
14408  * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
14409  * event that you need a private message bus connection, use
14410  * g_dbus_address_get_for_bus() and
14411  * g_dbus_connection_new_for_address().
14412  * Note that the returned #GDBusConnection object will (usually) have
14413  * the #GDBusConnection:exit-on-close property set to %TRUE.
14414  *
14415  * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
14416  * Since: 2.26
14417  */
14418
14419
14420 /**
14421  * g_bus_get_sync:
14422  * @bus_type: A #GBusType.
14423  * @cancellable: A #GCancellable or %NULL.
14424  * @error: Return location for error or %NULL.
14425  *
14426  * Synchronously connects to the message bus specified by @bus_type.
14427  * Note that the returned object may shared with other callers,
14428  * e.g. if two separate parts of a process calls this function with
14429  * the same @bus_type, they will share the same object.
14430  * This is a synchronous failable function. See g_bus_get() and
14431  * g_bus_get_finish() for the asynchronous version.
14432  * The returned object is a singleton, that is, shared with other
14433  * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
14434  * event that you need a private message bus connection, use
14435  * g_dbus_address_get_for_bus_sync() and
14436  * g_dbus_connection_new_for_address().
14437  * Note that the returned #GDBusConnection object will (usually) have
14438  * the #GDBusConnection:exit-on-close property set to %TRUE.
14439  *
14440  * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
14441  * Since: 2.26
14442  */
14443
14444
14445 /**
14446  * g_bus_own_name:
14447  * @bus_type: The type of bus to own a name on.
14448  * @name: The well-known name to own.
14449  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14450  * @bus_acquired_handler: Handler to invoke when connected to the bus of type @bus_type or %NULL.
14451  * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
14452  * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
14453  * @user_data: User data to pass to handlers.
14454  * @user_data_free_func: Function for freeing @user_data or %NULL.
14455  *
14456  * Starts acquiring @name on the bus specified by @bus_type and calls
14457  * acquired respectively lost. Callbacks will be invoked in the <link
14458  * linkend="g-main-context-push-thread-default">thread-default main
14459  * loop</link> of the thread you are calling this function from.
14460  * You are guaranteed that one of the @name_acquired_handler and @name_lost_handler
14461  * callbacks will be invoked after calling this function - there are three
14462  * possible cases:
14463  * <itemizedlist>
14464  * <listitem><para>
14465  * </para></listitem>
14466  * <listitem><para>
14467  * </para></listitem>
14468  * <listitem><para>
14469  * </para></listitem>
14470  * </itemizedlist>
14471  * When you are done owning the name, just call g_bus_unown_name()
14472  * with the owner id this function returns.
14473  * If the name is acquired or lost (for example another application
14474  * could acquire the name if you allow replacement or the application
14475  * currently owning the name exits), the handlers are also invoked. If the
14476  * #GDBusConnection that is used for attempting to own the name
14477  * closes, then @name_lost_handler is invoked since it is no
14478  * longer possible for other processes to access the process.
14479  * You cannot use g_bus_own_name() several times for the same name (unless
14480  * interleaved with calls to g_bus_unown_name()) - only the first call
14481  * will work.
14482  * Another guarantee is that invocations of @name_acquired_handler
14483  * and @name_lost_handler are guaranteed to alternate; that
14484  * is, if @name_acquired_handler is invoked then you are
14485  * guaranteed that the next time one of the handlers is invoked, it
14486  * will be @name_lost_handler. The reverse is also true.
14487  * If you plan on exporting objects (using e.g.
14488  * g_dbus_connection_register_object()), note that it is generally too late
14489  * to export the objects in @name_acquired_handler. Instead, you can do this
14490  * in @bus_acquired_handler since you are guaranteed that this will run
14491  * before @name is requested from the bus.
14492  * This behavior makes it very simple to write applications that wants
14493  * to own names and export objects, see <xref linkend="gdbus-owning-names"/>.
14494  * Simply register objects to be exported in @bus_acquired_handler and
14495  * unregister the objects (if any) in @name_lost_handler.
14496  * g_bus_unown_name() to stop owning the name.
14497  *
14498  * Returns: An identifier (never 0) that an be used with
14499  * Since: 2.26
14500  */
14501
14502
14503 /**
14504  * g_bus_own_name_on_connection:
14505  * @connection: A #GDBusConnection.
14506  * @name: The well-known name to own.
14507  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14508  * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
14509  * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
14510  * @user_data: User data to pass to handlers.
14511  * @user_data_free_func: Function for freeing @user_data or %NULL.
14512  *
14513  * Like g_bus_own_name() but takes a #GDBusConnection instead of a
14514  * #GBusType.
14515  * g_bus_unown_name() to stop owning the name.
14516  *
14517  * Returns: An identifier (never 0) that an be used with
14518  * Since: 2.26
14519  */
14520
14521
14522 /**
14523  * g_bus_own_name_on_connection_with_closures:
14524  * @connection: A #GDBusConnection.
14525  * @name: The well-known name to own.
14526  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14527  * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
14528  * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
14529  *
14530  * Version of g_bus_own_name_on_connection() using closures instead of callbacks for
14531  * easier binding in other languages.
14532  * g_bus_unown_name() to stop owning the name.
14533  *
14534  * Returns: An identifier (never 0) that an be used with
14535  * Rename to: g_bus_own_name_on_connection
14536  * Since: 2.26
14537  */
14538
14539
14540 /**
14541  * g_bus_own_name_with_closures:
14542  * @bus_type: The type of bus to own a name on.
14543  * @name: The well-known name to own.
14544  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14545  * @bus_acquired_closure: (allow-none): #GClosure to invoke when connected to the bus of type @bus_type or %NULL.
14546  * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
14547  * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
14548  *
14549  * Version of g_bus_own_name() using closures instead of callbacks for
14550  * easier binding in other languages.
14551  * g_bus_unown_name() to stop owning the name.
14552  *
14553  * Returns: An identifier (never 0) that an be used with
14554  * Rename to: g_bus_own_name
14555  * Since: 2.26
14556  */
14557
14558
14559 /**
14560  * g_bus_unown_name:
14561  * @owner_id: An identifier obtained from g_bus_own_name()
14562  *
14563  * Stops owning a name.
14564  *
14565  * Since: 2.26
14566  */
14567
14568
14569 /**
14570  * g_bus_unwatch_name:
14571  * @watcher_id: An identifier obtained from g_bus_watch_name()
14572  *
14573  * Stops watching a name.
14574  *
14575  * Since: 2.26
14576  */
14577
14578
14579 /**
14580  * g_bus_watch_name:
14581  * @bus_type: The type of bus to watch a name on.
14582  * @name: The name (well-known or unique) to watch.
14583  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
14584  * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
14585  * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
14586  * @user_data: User data to pass to handlers.
14587  * @user_data_free_func: Function for freeing @user_data or %NULL.
14588  *
14589  * Starts watching @name on the bus specified by @bus_type and calls
14590  * known to have a owner respectively known to lose its
14591  * owner. Callbacks will be invoked in the <link
14592  * linkend="g-main-context-push-thread-default">thread-default main
14593  * loop</link> of the thread you are calling this function from.
14594  * You are guaranteed that one of the handlers will be invoked after
14595  * calling this function. When you are done watching the name, just
14596  * call g_bus_unwatch_name() with the watcher id this function
14597  * returns.
14598  * If the name vanishes or appears (for example the application owning
14599  * the name could restart), the handlers are also invoked. If the
14600  * #GDBusConnection that is used for watching the name disconnects, then
14601  * possible to access the name.
14602  * Another guarantee is that invocations of @name_appeared_handler
14603  * and @name_vanished_handler are guaranteed to alternate; that
14604  * is, if @name_appeared_handler is invoked then you are
14605  * guaranteed that the next time one of the handlers is invoked, it
14606  * will be @name_vanished_handler. The reverse is also true.
14607  * This behavior makes it very simple to write applications that wants
14608  * to take action when a certain name exists, see <xref
14609  * linkend="gdbus-watching-names"/>. Basically, the application
14610  * should create object proxies in @name_appeared_handler and destroy
14611  * them again (if any) in @name_vanished_handler.
14612  * g_bus_unwatch_name() to stop watching the name.
14613  *
14614  * Returns: An identifier (never 0) that an be used with
14615  * Since: 2.26
14616  */
14617
14618
14619 /**
14620  * g_bus_watch_name_on_connection:
14621  * @connection: A #GDBusConnection.
14622  * @name: The name (well-known or unique) to watch.
14623  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
14624  * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
14625  * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
14626  * @user_data: User data to pass to handlers.
14627  * @user_data_free_func: Function for freeing @user_data or %NULL.
14628  *
14629  * Like g_bus_watch_name() but takes a #GDBusConnection instead of a
14630  * #GBusType.
14631  * g_bus_unwatch_name() to stop watching the name.
14632  *
14633  * Returns: An identifier (never 0) that an be used with
14634  * Since: 2.26
14635  */
14636
14637
14638 /**
14639  * g_bus_watch_name_on_connection_with_closures:
14640  * @connection: A #GDBusConnection.
14641  * @name: The name (well-known or unique) to watch.
14642  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
14643  * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
14644  * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
14645  *
14646  * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for
14647  * easier binding in other languages.
14648  * g_bus_unwatch_name() to stop watching the name.
14649  *
14650  * Returns: An identifier (never 0) that an be used with
14651  * Rename to: g_bus_watch_name_on_connection
14652  * Since: 2.26
14653  */
14654
14655
14656 /**
14657  * g_bus_watch_name_with_closures:
14658  * @bus_type: The type of bus to watch a name on.
14659  * @name: The name (well-known or unique) to watch.
14660  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
14661  * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
14662  * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
14663  *
14664  * Version of g_bus_watch_name() using closures instead of callbacks for
14665  * easier binding in other languages.
14666  * g_bus_unwatch_name() to stop watching the name.
14667  *
14668  * Returns: An identifier (never 0) that an be used with
14669  * Rename to: g_bus_watch_name
14670  * Since: 2.26
14671  */
14672
14673
14674 /**
14675  * g_cancellable_cancel:
14676  * @cancellable: a #GCancellable object.
14677  *
14678  * Will set @cancellable to cancelled, and will emit the
14679  * #GCancellable::cancelled signal. (However, see the warning about
14680  * race conditions in the documentation for that signal if you are
14681  * planning to connect to it.)
14682  * This function is thread-safe. In other words, you can safely call
14683  * it from a thread other than the one running the operation that was
14684  * passed the @cancellable.
14685  * The convention within gio is that cancelling an asynchronous
14686  * operation causes it to complete asynchronously. That is, if you
14687  * cancel the operation from the same thread in which it is running,
14688  * then the operation's #GAsyncReadyCallback will not be invoked until
14689  * the application returns to the main loop.
14690  */
14691
14692
14693 /**
14694  * g_cancellable_connect:
14695  * @cancellable: A #GCancellable.
14696  * @callback: The #GCallback to connect.
14697  * @data: Data to pass to @callback.
14698  * @data_destroy_func: Free function for @data or %NULL.
14699  *
14700  * Convenience function to connect to the #GCancellable::cancelled
14701  * signal. Also handles the race condition that may happen
14702  * if the cancellable is cancelled right before connecting.
14703  * time of the connect if @cancellable is already cancelled,
14704  * or when @cancellable is cancelled in some thread.
14705  * disconnected, or immediately if the cancellable is already
14706  * cancelled.
14707  * See #GCancellable::cancelled for details on how to use this.
14708  * been cancelled.
14709  *
14710  * Returns: The id of the signal handler or 0 if @cancellable has already
14711  * Since: 2.22
14712  */
14713
14714
14715 /**
14716  * g_cancellable_disconnect:
14717  * @cancellable: A #GCancellable or %NULL.
14718  * @handler_id: Handler id of the handler to be disconnected, or %0.
14719  *
14720  * Disconnects a handler from a cancellable instance similar to
14721  * g_signal_handler_disconnect().  Additionally, in the event that a
14722  * signal handler is currently running, this call will block until the
14723  * handler has finished.  Calling this function from a
14724  * #GCancellable::cancelled signal handler will therefore result in a
14725  * deadlock.
14726  * This avoids a race condition where a thread cancels at the
14727  * same time as the cancellable operation is finished and the
14728  * signal handler is removed. See #GCancellable::cancelled for
14729  * details on how to use this.
14730  * If @cancellable is %NULL or @handler_id is %0 this function does
14731  * nothing.
14732  *
14733  * Since: 2.22
14734  */
14735
14736
14737 /**
14738  * g_cancellable_get_current:
14739  *
14740  * Gets the top cancellable from the stack.
14741  * if the stack is empty.
14742  *
14743  * Returns: (transfer none): a #GCancellable from the top of the stack, or %NULL
14744  */
14745
14746
14747 /**
14748  * g_cancellable_get_fd:
14749  * @cancellable: a #GCancellable.
14750  *
14751  * Gets the file descriptor for a cancellable job. This can be used to
14752  * implement cancellable operations on Unix systems. The returned fd will
14753  * turn readable when @cancellable is cancelled.
14754  * You are not supposed to read from the fd yourself, just check for
14755  * readable status. Reading to unset the readable status is done
14756  * with g_cancellable_reset().
14757  * After a successful return from this function, you should use
14758  * g_cancellable_release_fd() to free up resources allocated for
14759  * the returned file descriptor.
14760  * See also g_cancellable_make_pollfd().
14761  * is not supported, or on errors.
14762  *
14763  * Returns: A valid file descriptor. %-1 if the file descriptor
14764  */
14765
14766
14767 /**
14768  * g_cancellable_is_cancelled:
14769  * @cancellable: a #GCancellable or NULL.
14770  *
14771  * Checks if a cancellable job has been cancelled.
14772  * FALSE if called with %NULL or if item is not cancelled.
14773  *
14774  * Returns: %TRUE if @cancellable is cancelled,
14775  */
14776
14777
14778 /**
14779  * g_cancellable_make_pollfd:
14780  * @cancellable: a #GCancellable or %NULL
14781  * @pollfd: a pointer to a #GPollFD
14782  *
14783  * Creates a #GPollFD corresponding to @cancellable; this can be passed
14784  * to g_poll() and used to poll for cancellation. This is useful both
14785  * for unix systems without a native poll and for portability to
14786  * windows.
14787  * When this function returns %TRUE, you should use
14788  * g_cancellable_release_fd() to free up resources allocated for the
14789  * If this function returns %FALSE, either no @cancellable was given or
14790  * resource limits prevent this function from allocating the necessary
14791  * structures for polling. (On Linux, you will likely have reached
14792  * the maximum number of file descriptors.) The suggested way to handle
14793  * these cases is to ignore the @cancellable.
14794  * You are not supposed to read from the fd yourself, just check for
14795  * readable status. Reading to unset the readable status is done
14796  * with g_cancellable_reset().
14797  * failure to prepare the cancellable.
14798  *
14799  * Returns: %TRUE if @pollfd was successfully initialized, %FALSE on
14800  * Since: 2.22
14801  */
14802
14803
14804 /**
14805  * g_cancellable_new:
14806  *
14807  * Creates a new #GCancellable object.
14808  * Applications that want to start one or more operations
14809  * that should be cancellable should create a #GCancellable
14810  * and pass it to the operations.
14811  * One #GCancellable can be used in multiple consecutive
14812  * operations, but not in multiple concurrent operations.
14813  *
14814  * Returns: a #GCancellable.
14815  */
14816
14817
14818 /**
14819  * g_cancellable_pop_current:
14820  * @cancellable: a #GCancellable object
14821  *
14822  * Pops @cancellable off the cancellable stack (verifying that @cancellable
14823  * is on the top of the stack).
14824  */
14825
14826
14827 /**
14828  * g_cancellable_push_current:
14829  * @cancellable: a #GCancellable object
14830  *
14831  * Pushes @cancellable onto the cancellable stack. The current
14832  * cancellable can then be recieved using g_cancellable_get_current().
14833  * This is useful when implementing cancellable operations in
14834  * code that does not allow you to pass down the cancellable object.
14835  * This is typically called automatically by e.g. #GFile operations,
14836  * so you rarely have to call this yourself.
14837  */
14838
14839
14840 /**
14841  * g_cancellable_release_fd:
14842  * @cancellable: a #GCancellable
14843  *
14844  * Releases a resources previously allocated by g_cancellable_get_fd()
14845  * or g_cancellable_make_pollfd().
14846  * For compatibility reasons with older releases, calling this function
14847  * is not strictly required, the resources will be automatically freed
14848  * when the @cancellable is finalized. However, the @cancellable will
14849  * block scarce file descriptors until it is finalized if this function
14850  * is not called. This can cause the application to run out of file
14851  * descriptors when many #GCancellables are used at the same time.
14852  *
14853  * Since: 2.22
14854  */
14855
14856
14857 /**
14858  * g_cancellable_reset:
14859  * @cancellable: a #GCancellable object.
14860  *
14861  * Resets @cancellable to its uncancelled state.
14862  */
14863
14864
14865 /**
14866  * g_cancellable_set_error_if_cancelled:
14867  * @cancellable: a #GCancellable object.
14868  * @error: #GError to append error state to.
14869  *
14870  * If the @cancellable is cancelled, sets the error to notify
14871  * that the operation was cancelled.
14872  *
14873  * Returns: %TRUE if @cancellable was cancelled, %FALSE if it was not.
14874  */
14875
14876
14877 /**
14878  * g_cancellable_source_new: (skip)
14879  * @cancellable: a #GCancellable, or %NULL
14880  *
14881  * Creates a source that triggers if @cancellable is cancelled and
14882  * calls its callback of type #GCancellableSourceFunc. This is
14883  * primarily useful for attaching to another (non-cancellable) source
14884  * with g_source_add_child_source() to add cancellability to it.
14885  * For convenience, you can call this with a %NULL #GCancellable,
14886  * in which case the source will never trigger.
14887  *
14888  * Returns: (transfer full): the new #GSource.
14889  * Since: 2.28
14890  */
14891
14892
14893 /**
14894  * g_charset_converter_get_num_fallbacks:
14895  * @converter: a #GCharsetConverter
14896  *
14897  * Gets the number of fallbacks that @converter has applied so far.
14898  *
14899  * Returns: the number of fallbacks that @converter has applied
14900  * Since: 2.24
14901  */
14902
14903
14904 /**
14905  * g_charset_converter_get_use_fallback:
14906  * @converter: a #GCharsetConverter
14907  *
14908  * Gets the #GCharsetConverter:use-fallback property.
14909  *
14910  * Returns: %TRUE if fallbacks are used by @converter
14911  * Since: 2.24
14912  */
14913
14914
14915 /**
14916  * g_charset_converter_new:
14917  * @to_charset: destination charset
14918  * @from_charset: source charset
14919  * @error: #GError for error reporting, or %NULL to ignore.
14920  *
14921  * Creates a new #GCharsetConverter.
14922  *
14923  * Returns: a new #GCharsetConverter or %NULL on error.
14924  * Since: 2.24
14925  */
14926
14927
14928 /**
14929  * g_charset_converter_set_use_fallback:
14930  * @converter: a #GCharsetConverter
14931  * @use_fallback: %TRUE to use fallbacks
14932  *
14933  * Sets the #GCharsetConverter:use-fallback property.
14934  *
14935  * Since: 2.24
14936  */
14937
14938
14939 /**
14940  * g_content_type_can_be_executable:
14941  * @type: a content type string
14942  *
14943  * Checks if a content type can be executable. Note that for instance
14944  * things like text files can be executables (i.e. scripts and batch files).
14945  * can be executable, %FALSE otherwise.
14946  *
14947  * Returns: %TRUE if the file type corresponds to a type that
14948  */
14949
14950
14951 /**
14952  * g_content_type_equals:
14953  * @type1: a content type string
14954  * @type2: a content type string
14955  *
14956  * Compares two content types for equality.
14957  * %FALSE otherwise.
14958  *
14959  * Returns: %TRUE if the two strings are identical or equivalent,
14960  */
14961
14962
14963 /**
14964  * g_content_type_from_mime_type:
14965  * @mime_type: a mime type string
14966  *
14967  * Tries to find a content type based on the mime type name.
14968  * or %NULL. Free with g_free()
14969  *
14970  * Returns: (allow-none): Newly allocated string with content type
14971  * Since: 2.18
14972  */
14973
14974
14975 /**
14976  * g_content_type_get_description:
14977  * @type: a content type string
14978  *
14979  * Gets the human readable description of the content type.
14980  * returned string with g_free()
14981  *
14982  * Returns: a short description of the content type @type. Free the
14983  */
14984
14985
14986 /**
14987  * g_content_type_get_icon:
14988  * @type: a content type string
14989  *
14990  * Gets the icon for a content type.
14991  * object with g_object_unref()
14992  *
14993  * Returns: (transfer full): #GIcon corresponding to the content type. Free the returned
14994  */
14995
14996
14997 /**
14998  * g_content_type_get_mime_type:
14999  * @type: a content type string
15000  *
15001  * Gets the mime type for the content type, if one is registered.
15002  * or %NULL if unknown.
15003  *
15004  * Returns: (allow-none): the registered mime type for the given @type,
15005  */
15006
15007
15008 /**
15009  * g_content_type_guess:
15010  * @filename: (allow-none): a string, or %NULL
15011  * @data: (allow-none) (array length=data_size): a stream of data, or %NULL
15012  * @data_size: the size of @data
15013  * @result_uncertain: (allow-none) (out): return location for the certainty of the result, or %NULL
15014  *
15015  * Guesses the content type based on example data. If the function is
15016  * uncertain, @result_uncertain will be set to %TRUE. Either @filename
15017  * or @data may be %NULL, in which case the guess will be based solely
15018  * on the other argument.
15019  * given data. Free with g_free()
15020  *
15021  * Returns: a string indicating a guessed content type for the
15022  */
15023
15024
15025 /**
15026  * g_content_type_guess_for_tree:
15027  * @root: the root of the tree to guess a type for
15028  *
15029  * Tries to guess the type of the tree with root @root, by
15030  * looking at the files it contains. The result is an array
15031  * of content types, with the best guess coming first.
15032  * The types returned all have the form x-content/foo, e.g.
15033  * x-content/audio-cdda (for audio CDs) or x-content/image-dcf
15034  * (for a camera memory card). See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
15035  * specification for more on x-content types.
15036  * This function is useful in the implementation of
15037  * g_mount_guess_content_type().
15038  * array of zero or more content types, or %NULL. Free with g_strfreev()
15039  *
15040  * Returns: (transfer full) (array zero-terminated=1): an %NULL-terminated
15041  * Since: 2.18
15042  */
15043
15044
15045 /**
15046  * g_content_type_is_a:
15047  * @type: a content type string
15048  * @supertype: a content type string
15049  *
15050  * Determines if @type is a subset of @supertype.
15051  * %FALSE otherwise.
15052  *
15053  * Returns: %TRUE if @type is a kind of @supertype,
15054  */
15055
15056
15057 /**
15058  * g_content_type_is_unknown:
15059  * @type: a content type string
15060  *
15061  * Checks if the content type is the generic "unknown" type.
15062  * On UNIX this is the "application/octet-stream" mimetype,
15063  * while on win32 it is "*".
15064  *
15065  * Returns: %TRUE if the type is the unknown type.
15066  */
15067
15068
15069 /**
15070  * g_content_types_get_registered:
15071  *
15072  * Gets a list of strings containing all the registered content types
15073  * known to the system. The list and its data should be freed using
15074  * <programlisting>
15075  * g_list_foreach (list, g_free, NULL);
15076  * g_list_free (list);
15077  * </programlisting>
15078  *
15079  * Returns: (element-type utf8) (transfer full): #GList of the registered content types
15080  */
15081
15082
15083 /**
15084  * g_converter_convert:
15085  * @converter: a #GConverter.
15086  * @inbuf: (array length=inbuf_size) (element-type guint8): the buffer containing the data to convert.
15087  * @inbuf_size: the number of bytes in @inbuf
15088  * @outbuf: a buffer to write converted data in.
15089  * @outbuf_size: the number of bytes in @outbuf, must be at least one
15090  * @flags: a #GConvertFlags controlling the conversion details
15091  * @bytes_read: (out): will be set to the number of bytes read from @inbuf on success
15092  * @bytes_written: (out): will be set to the number of bytes written to @outbuf on success
15093  * @error: location to store the error occuring, or %NULL to ignore
15094  *
15095  * This is the main operation used when converting data. It is to be called
15096  * multiple times in a loop, and each time it will do some work, i.e.
15097  * producing some output (in @outbuf) or consuming some input (from @inbuf) or
15098  * both. If its not possible to do any work an error is returned.
15099  * Note that a single call may not consume all input (or any input at all).
15100  * Also a call may produce output even if given no input, due to state stored
15101  * in the converter producing output.
15102  * If any data was either produced or consumed, and then an error happens, then
15103  * only the successful conversion is reported and the error is returned on the
15104  * next call.
15105  * A full conversion loop involves calling this method repeatedly, each time
15106  * giving it new input and space output space. When there is no more input
15107  * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set.
15108  * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED
15109  * each time until all data is consumed and all output is produced, then
15110  * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED
15111  * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance
15112  * in a decompression converter where the end of data is detectable from the
15113  * data (and there might even be other data after the end of the compressed data).
15114  * When some data has successfully been converted @bytes_read and is set to
15115  * the number of bytes read from @inbuf, and @bytes_written is set to indicate
15116  * how many bytes was written to @outbuf. If there are more data to output
15117  * or consume (i.e. unless the G_CONVERTER_INPUT_AT_END is specified) then
15118  * G_CONVERTER_CONVERTED is returned, and if no more data is to be output
15119  * then G_CONVERTER_FINISHED is returned.
15120  * On error %G_CONVERTER_ERROR is returned and @error is set accordingly.
15121  * Some errors need special handling:
15122  * %G_IO_ERROR_NO_SPACE is returned if there is not enough space
15123  * to write the resulting converted data, the application should
15124  * call the function again with a larger @outbuf to continue.
15125  * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough
15126  * input to fully determine what the conversion should produce,
15127  * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for
15128  * example with an incomplete multibyte sequence when converting text,
15129  * or when a regexp matches up to the end of the input (and may match
15130  * further input). It may also happen when @inbuf_size is zero and
15131  * there is no more data to produce.
15132  * When this happens the application should read more input and then
15133  * call the function again. If further input shows that there is no
15134  * more data call the function again with the same data but with
15135  * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion
15136  * to finish as e.g. in the regexp match case (or, to fail again with
15137  * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the
15138  * input is actually partial).
15139  * After g_converter_convert() has returned %G_CONVERTER_FINISHED the
15140  * converter object is in an invalid state where its not allowed
15141  * to call g_converter_convert() anymore. At this time you can only
15142  * free the object or call g_converter_reset() to reset it to the
15143  * initial state.
15144  * If the flag %G_CONVERTER_FLUSH is set then conversion is modified
15145  * to try to write out all internal state to the output. The application
15146  * has to call the function multiple times with the flag set, and when
15147  * the availible input has been consumed and all internal state has
15148  * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if
15149  * really at the end) is returned instead of %G_CONVERTER_CONVERTED.
15150  * This is somewhat similar to what happens at the end of the input stream,
15151  * but done in the middle of the data.
15152  * This has different meanings for different conversions. For instance
15153  * in a compression converter it would mean that we flush all the
15154  * compression state into output such that if you uncompress the
15155  * compressed data you get back all the input data. Doing this may
15156  * make the final file larger due to padding though. Another example
15157  * is a regexp conversion, where if you at the end of the flushed data
15158  * have a match, but there is also a potential longer match. In the
15159  * non-flushed case we would ask for more input, but when flushing we
15160  * treat this as the end of input and do the match.
15161  * Flushing is not always possible (like if a charset converter flushes
15162  * at a partial multibyte sequence). Converters are supposed to try
15163  * to produce as much output as possible and then return an error
15164  * (typically %G_IO_ERROR_PARTIAL_INPUT).
15165  *
15166  * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error.
15167  * Since: 2.24
15168  */
15169
15170
15171 /**
15172  * g_converter_input_stream_get_converter:
15173  * @converter_stream: a #GConverterInputStream
15174  *
15175  * Gets the #GConverter that is used by @converter_stream.
15176  *
15177  * Returns: (transfer none): the converter of the converter input stream
15178  * Since: 2.24
15179  */
15180
15181
15182 /**
15183  * g_converter_input_stream_new:
15184  * @base_stream: a #GInputStream
15185  * @converter: a #GConverter
15186  *
15187  * Creates a new converter input stream for the @base_stream.
15188  *
15189  * Returns: a new #GInputStream.
15190  */
15191
15192
15193 /**
15194  * g_converter_output_stream_get_converter:
15195  * @converter_stream: a #GConverterOutputStream
15196  *
15197  * Gets the #GConverter that is used by @converter_stream.
15198  *
15199  * Returns: (transfer none): the converter of the converter output stream
15200  * Since: 2.24
15201  */
15202
15203
15204 /**
15205  * g_converter_output_stream_new:
15206  * @base_stream: a #GOutputStream
15207  * @converter: a #GConverter
15208  *
15209  * Creates a new converter output stream for the @base_stream.
15210  *
15211  * Returns: a new #GOutputStream.
15212  */
15213
15214
15215 /**
15216  * g_converter_reset:
15217  * @converter: a #GConverter.
15218  *
15219  * Resets all internal state in the converter, making it behave
15220  * as if it was just created. If the converter has any internal
15221  * state that would produce output then that output is lost.
15222  *
15223  * Since: 2.24
15224  */
15225
15226
15227 /**
15228  * g_credentials_get_native: (skip)
15229  * @credentials: A #GCredentials.
15230  * @native_type: The type of native credentials to get.
15231  *
15232  * Gets a pointer to native credentials of type @native_type from
15233  * It is a programming error (which will cause an warning to be
15234  * logged) to use this method if there is no #GCredentials support for
15235  * the OS or if @native_type isn't supported by the OS.
15236  * operation there is no #GCredentials support for the OS or if
15237  * data, it is owned by @credentials.
15238  *
15239  * Returns: The pointer to native credentials or %NULL if the
15240  * Since: 2.26
15241  */
15242
15243
15244 /**
15245  * g_credentials_get_unix_user:
15246  * @credentials: A #GCredentials
15247  * @error: Return location for error or %NULL.
15248  *
15249  * Tries to get the UNIX user identifier from @credentials. This
15250  * method is only available on UNIX platforms.
15251  * This operation can fail if #GCredentials is not supported on the
15252  * OS or if the native credentials type does not contain information
15253  * about the UNIX user.
15254  *
15255  * Returns: The UNIX user identifier or -1 if @error is set.
15256  * Since: 2.26
15257  */
15258
15259
15260 /**
15261  * g_credentials_is_same_user:
15262  * @credentials: A #GCredentials.
15263  * @other_credentials: A #GCredentials.
15264  * @error: Return location for error or %NULL.
15265  *
15266  * Checks if @credentials and @other_credentials is the same user.
15267  * This operation can fail if #GCredentials is not supported on the
15268  * the OS.
15269  * user, %FALSE otherwise or if @error is set.
15270  *
15271  * Returns: %TRUE if @credentials and @other_credentials has the same
15272  * Since: 2.26
15273  */
15274
15275
15276 /**
15277  * g_credentials_new:
15278  *
15279  * Creates a new #GCredentials object with credentials matching the
15280  * the current process.
15281  *
15282  * Returns: A #GCredentials. Free with g_object_unref().
15283  * Since: 2.26
15284  */
15285
15286
15287 /**
15288  * g_credentials_set_native:
15289  * @credentials: A #GCredentials.
15290  * @native_type: The type of native credentials to set.
15291  * @native: A pointer to native credentials.
15292  *
15293  * Copies the native credentials of type @native_type from @native
15294  * into @credentials.
15295  * It is a programming error (which will cause an warning to be
15296  * logged) to use this method if there is no #GCredentials support for
15297  * the OS or if @native_type isn't supported by the OS.
15298  *
15299  * Since: 2.26
15300  */
15301
15302
15303 /**
15304  * g_credentials_set_unix_user:
15305  * @credentials: A #GCredentials.
15306  * @uid: The UNIX user identifier to set.
15307  * @error: Return location for error or %NULL.
15308  *
15309  * Tries to set the UNIX user identifier on @credentials. This method
15310  * is only available on UNIX platforms.
15311  * This operation can fail if #GCredentials is not supported on the
15312  * OS or if the native credentials type does not contain information
15313  * about the UNIX user.
15314  *
15315  * Returns: %TRUE if @uid was set, %FALSE if error is set.
15316  * Since: 2.26
15317  */
15318
15319
15320 /**
15321  * g_credentials_to_string:
15322  * @credentials: A #GCredentials object.
15323  *
15324  * Creates a human-readable textual representation of @credentials
15325  * that can be used in logging and debug messages. The format of the
15326  * returned string may change in future GLib release.
15327  *
15328  * Returns: A string that should be freed with g_free().
15329  * Since: 2.26
15330  */
15331
15332
15333 /**
15334  * g_data_input_stream_get_byte_order:
15335  * @stream: a given #GDataInputStream.
15336  *
15337  * Gets the byte order for the data input stream.
15338  *
15339  * Returns: the @stream's current #GDataStreamByteOrder.
15340  */
15341
15342
15343 /**
15344  * g_data_input_stream_get_newline_type:
15345  * @stream: a given #GDataInputStream.
15346  *
15347  * Gets the current newline type for the @stream.
15348  *
15349  * Returns: #GDataStreamNewlineType for the given @stream.
15350  */
15351
15352
15353 /**
15354  * g_data_input_stream_new:
15355  * @base_stream: a #GInputStream.
15356  *
15357  * Creates a new data input stream for the @base_stream.
15358  *
15359  * Returns: a new #GDataInputStream.
15360  */
15361
15362
15363 /**
15364  * g_data_input_stream_read_byte:
15365  * @stream: a given #GDataInputStream.
15366  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15367  * @error: #GError for error reporting.
15368  *
15369  * Reads an unsigned 8-bit/1-byte value from @stream.
15370  * if an error occurred.
15371  *
15372  * Returns: an unsigned 8-bit/1-byte value read from the @stream or %0
15373  */
15374
15375
15376 /**
15377  * g_data_input_stream_read_int16:
15378  * @stream: a given #GDataInputStream.
15379  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15380  * @error: #GError for error reporting.
15381  *
15382  * Reads a 16-bit/2-byte value from @stream.
15383  * In order to get the correct byte order for this read operation,
15384  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15385  * an error occurred.
15386  *
15387  * Returns: a signed 16-bit/2-byte value read from @stream or %0 if
15388  */
15389
15390
15391 /**
15392  * g_data_input_stream_read_int32:
15393  * @stream: a given #GDataInputStream.
15394  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15395  * @error: #GError for error reporting.
15396  *
15397  * Reads a signed 32-bit/4-byte value from @stream.
15398  * In order to get the correct byte order for this read operation,
15399  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15400  * If @cancellable is not %NULL, then the operation can be cancelled by
15401  * triggering the cancellable object from another thread. If the operation
15402  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15403  * an error occurred.
15404  *
15405  * Returns: a signed 32-bit/4-byte value read from the @stream or %0 if
15406  */
15407
15408
15409 /**
15410  * g_data_input_stream_read_int64:
15411  * @stream: a given #GDataInputStream.
15412  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15413  * @error: #GError for error reporting.
15414  *
15415  * Reads a 64-bit/8-byte value from @stream.
15416  * In order to get the correct byte order for this read operation,
15417  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15418  * If @cancellable is not %NULL, then the operation can be cancelled by
15419  * triggering the cancellable object from another thread. If the operation
15420  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15421  * an error occurred.
15422  *
15423  * Returns: a signed 64-bit/8-byte value read from @stream or %0 if
15424  */
15425
15426
15427 /**
15428  * g_data_input_stream_read_line:
15429  * @stream: a given #GDataInputStream.
15430  * @length: (out): a #gsize to get the length of the data read in.
15431  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15432  * @error: #GError for error reporting.
15433  *
15434  * Reads a line from the data input stream.
15435  * If @cancellable is not %NULL, then the operation can be cancelled by
15436  * triggering the cancellable object from another thread. If the operation
15437  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15438  * (without the newlines).  Set @length to a #gsize to get the
15439  * length of the read line.  On an error, it will return %NULL and
15440  * still return %NULL, but @error won't be set.
15441  *
15442  * Returns: (transfer full): a string with the line that was read in
15443  */
15444
15445
15446 /**
15447  * g_data_input_stream_read_line_async:
15448  * @stream: a given #GDataInputStream.
15449  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
15450  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15451  * @callback: (scope async): callback to call when the request is satisfied.
15452  * @user_data: (closure): the data to pass to callback function.
15453  *
15454  * The asynchronous version of g_data_input_stream_read_line().  It is
15455  * an error to have two outstanding calls to this function.
15456  * When the operation is finished, @callback will be called. You
15457  * can then call g_data_input_stream_read_line_finish() to get
15458  * the result of the operation.
15459  *
15460  * Since: 2.20
15461  */
15462
15463
15464 /**
15465  * g_data_input_stream_read_line_finish:
15466  * @stream: a given #GDataInputStream.
15467  * @result: the #GAsyncResult that was provided to the callback.
15468  * @length: (out): a #gsize to get the length of the data read in.
15469  * @error: #GError for error reporting.
15470  *
15471  * Finish an asynchronous call started by
15472  * g_data_input_stream_read_line_async().
15473  * (without the newlines).  Set @length to a #gsize to get the
15474  * length of the read line.  On an error, it will return %NULL and
15475  * still return %NULL, but @error won't be set.
15476  *
15477  * Returns: (transfer full): a string with the line that was read in
15478  * Since: 2.20
15479  */
15480
15481
15482 /**
15483  * g_data_input_stream_read_uint16:
15484  * @stream: a given #GDataInputStream.
15485  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15486  * @error: #GError for error reporting.
15487  *
15488  * Reads an unsigned 16-bit/2-byte value from @stream.
15489  * In order to get the correct byte order for this read operation,
15490  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15491  * an error occurred.
15492  *
15493  * Returns: an unsigned 16-bit/2-byte value read from the @stream or %0 if
15494  */
15495
15496
15497 /**
15498  * g_data_input_stream_read_uint32:
15499  * @stream: a given #GDataInputStream.
15500  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15501  * @error: #GError for error reporting.
15502  *
15503  * Reads an unsigned 32-bit/4-byte value from @stream.
15504  * In order to get the correct byte order for this read operation,
15505  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15506  * If @cancellable is not %NULL, then the operation can be cancelled by
15507  * triggering the cancellable object from another thread. If the operation
15508  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15509  * an error occurred.
15510  *
15511  * Returns: an unsigned 32-bit/4-byte value read from the @stream or %0 if
15512  */
15513
15514
15515 /**
15516  * g_data_input_stream_read_uint64:
15517  * @stream: a given #GDataInputStream.
15518  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15519  * @error: #GError for error reporting.
15520  *
15521  * Reads an unsigned 64-bit/8-byte value from @stream.
15522  * In order to get the correct byte order for this read operation,
15523  * see g_data_input_stream_get_byte_order().
15524  * If @cancellable is not %NULL, then the operation can be cancelled by
15525  * triggering the cancellable object from another thread. If the operation
15526  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15527  * an error occurred.
15528  *
15529  * Returns: an unsigned 64-bit/8-byte read from @stream or %0 if
15530  */
15531
15532
15533 /**
15534  * g_data_input_stream_read_until:
15535  * @stream: a given #GDataInputStream.
15536  * @stop_chars: characters to terminate the read.
15537  * @length: (out): a #gsize to get the length of the data read in.
15538  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15539  * @error: #GError for error reporting.
15540  *
15541  * Reads a string from the data input stream, up to the first
15542  * occurrence of any of the stop characters.
15543  * Note that, in contrast to g_data_input_stream_read_until_async(),
15544  * this function consumes the stop character that it finds.
15545  * Don't use this function in new code.  Its functionality is
15546  * inconsistent with g_data_input_stream_read_until_async().  Both
15547  * functions will be marked as deprecated in a future release.  Use
15548  * g_data_input_stream_read_upto() instead, but note that that function
15549  * does not consume the stop character.
15550  * before encountering any of the stop characters. Set @length to
15551  * a #gsize to get the length of the string. This function will
15552  * return %NULL on an error.
15553  *
15554  * Returns: (transfer full): a string with the data that was read
15555  */
15556
15557
15558 /**
15559  * g_data_input_stream_read_until_async:
15560  * @stream: a given #GDataInputStream.
15561  * @stop_chars: characters to terminate the read.
15562  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
15563  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15564  * @callback: (scope async): callback to call when the request is satisfied.
15565  * @user_data: (closure): the data to pass to callback function.
15566  *
15567  * The asynchronous version of g_data_input_stream_read_until().
15568  * It is an error to have two outstanding calls to this function.
15569  * Note that, in contrast to g_data_input_stream_read_until(),
15570  * this function does not consume the stop character that it finds.  You
15571  * must read it for yourself.
15572  * When the operation is finished, @callback will be called. You
15573  * can then call g_data_input_stream_read_until_finish() to get
15574  * the result of the operation.
15575  * Don't use this function in new code.  Its functionality is
15576  * inconsistent with g_data_input_stream_read_until().  Both functions
15577  * will be marked as deprecated in a future release.  Use
15578  * g_data_input_stream_read_upto_async() instead.
15579  *
15580  * Since: 2.20
15581  */
15582
15583
15584 /**
15585  * g_data_input_stream_read_until_finish:
15586  * @stream: a given #GDataInputStream.
15587  * @result: the #GAsyncResult that was provided to the callback.
15588  * @length: (out): a #gsize to get the length of the data read in.
15589  * @error: #GError for error reporting.
15590  *
15591  * Finish an asynchronous call started by
15592  * g_data_input_stream_read_until_async().
15593  * before encountering any of the stop characters. Set @length to
15594  * a #gsize to get the length of the string. This function will
15595  * return %NULL on an error.
15596  *
15597  * Since: 2.20
15598  * Returns: (transfer full): a string with the data that was read
15599  */
15600
15601
15602 /**
15603  * g_data_input_stream_read_upto:
15604  * @stream: a #GDataInputStream
15605  * @stop_chars: characters to terminate the read
15606  * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
15607  * @length: (out): a #gsize to get the length of the data read in
15608  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
15609  * @error: #GError for error reporting
15610  *
15611  * Reads a string from the data input stream, up to the first
15612  * occurrence of any of the stop characters.
15613  * In contrast to g_data_input_stream_read_until(), this function
15614  * does <emphasis>not</emphasis> consume the stop character. You have
15615  * to use g_data_input_stream_read_byte() to get it before calling
15616  * g_data_input_stream_read_upto() again.
15617  * Note that @stop_chars may contain '\0' if @stop_chars_len is
15618  * specified.
15619  * before encountering any of the stop characters. Set @length to
15620  * a #gsize to get the length of the string. This function will
15621  * return %NULL on an error
15622  *
15623  * Returns: (transfer full): a string with the data that was read
15624  * Since: 2.24
15625  */
15626
15627
15628 /**
15629  * g_data_input_stream_read_upto_async:
15630  * @stream: a #GDataInputStream
15631  * @stop_chars: characters to terminate the read
15632  * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
15633  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
15634  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
15635  * @callback: (scope async): callback to call when the request is satisfied
15636  * @user_data: (closure): the data to pass to callback function
15637  *
15638  * The asynchronous version of g_data_input_stream_read_upto().
15639  * It is an error to have two outstanding calls to this function.
15640  * In contrast to g_data_input_stream_read_until(), this function
15641  * does <emphasis>not</emphasis> consume the stop character. You have
15642  * to use g_data_input_stream_read_byte() to get it before calling
15643  * g_data_input_stream_read_upto() again.
15644  * Note that @stop_chars may contain '\0' if @stop_chars_len is
15645  * specified.
15646  * When the operation is finished, @callback will be called. You
15647  * can then call g_data_input_stream_read_upto_finish() to get
15648  * the result of the operation.
15649  *
15650  * Since: 2.24
15651  */
15652
15653
15654 /**
15655  * g_data_input_stream_read_upto_finish:
15656  * @stream: a #GDataInputStream
15657  * @result: the #GAsyncResult that was provided to the callback
15658  * @length: (out): a #gsize to get the length of the data read in
15659  * @error: #GError for error reporting
15660  *
15661  * Finish an asynchronous call started by
15662  * g_data_input_stream_read_upto_async().
15663  * Note that this function does <emphasis>not</emphasis> consume the
15664  * stop character. You have to use g_data_input_stream_read_byte() to
15665  * get it before calling g_data_input_stream_read_upto_async() again.
15666  * before encountering any of the stop characters. Set @length to
15667  * a #gsize to get the length of the string. This function will
15668  * return %NULL on an error.
15669  *
15670  * Returns: (transfer full): a string with the data that was read
15671  * Since: 2.24
15672  */
15673
15674
15675 /**
15676  * g_data_input_stream_set_byte_order:
15677  * @stream: a given #GDataInputStream.
15678  * @order: a #GDataStreamByteOrder to set.
15679  *
15680  * This function sets the byte order for the given @stream. All subsequent
15681  * reads from the @stream will be read in the given @order.
15682  */
15683
15684
15685 /**
15686  * g_data_input_stream_set_newline_type:
15687  * @stream: a #GDataInputStream.
15688  * @type: the type of new line return as #GDataStreamNewlineType.
15689  *
15690  * Sets the newline type for the @stream.
15691  * Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read
15692  * chunk ends in "CR" we must read an additional byte to know if this is "CR" or
15693  * "CR LF", and this might block if there is no more data availible.
15694  */
15695
15696
15697 /**
15698  * g_data_output_stream_get_byte_order:
15699  * @stream: a #GDataOutputStream.
15700  *
15701  * Gets the byte order for the stream.
15702  *
15703  * Returns: the #GDataStreamByteOrder for the @stream.
15704  */
15705
15706
15707 /**
15708  * g_data_output_stream_new:
15709  * @base_stream: a #GOutputStream.
15710  *
15711  * Creates a new data output stream for @base_stream.
15712  *
15713  * Returns: #GDataOutputStream.
15714  */
15715
15716
15717 /**
15718  * g_data_output_stream_put_byte:
15719  * @stream: a #GDataOutputStream.
15720  * @data: a #guchar.
15721  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15722  * @error: a #GError, %NULL to ignore.
15723  *
15724  * Puts a byte into the output stream.
15725  *
15726  * Returns: %TRUE if @data was successfully added to the @stream.
15727  */
15728
15729
15730 /**
15731  * g_data_output_stream_put_int16:
15732  * @stream: a #GDataOutputStream.
15733  * @data: a #gint16.
15734  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15735  * @error: a #GError, %NULL to ignore.
15736  *
15737  * Puts a signed 16-bit integer into the output stream.
15738  *
15739  * Returns: %TRUE if @data was successfully added to the @stream.
15740  */
15741
15742
15743 /**
15744  * g_data_output_stream_put_int32:
15745  * @stream: a #GDataOutputStream.
15746  * @data: a #gint32.
15747  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15748  * @error: a #GError, %NULL to ignore.
15749  *
15750  * Puts a signed 32-bit integer into the output stream.
15751  *
15752  * Returns: %TRUE if @data was successfully added to the @stream.
15753  */
15754
15755
15756 /**
15757  * g_data_output_stream_put_int64:
15758  * @stream: a #GDataOutputStream.
15759  * @data: a #gint64.
15760  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15761  * @error: a #GError, %NULL to ignore.
15762  *
15763  * Puts a signed 64-bit integer into the stream.
15764  *
15765  * Returns: %TRUE if @data was successfully added to the @stream.
15766  */
15767
15768
15769 /**
15770  * g_data_output_stream_put_string:
15771  * @stream: a #GDataOutputStream.
15772  * @str: a string.
15773  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15774  * @error: a #GError, %NULL to ignore.
15775  *
15776  * Puts a string into the output stream.
15777  *
15778  * Returns: %TRUE if @string was successfully added to the @stream.
15779  */
15780
15781
15782 /**
15783  * g_data_output_stream_put_uint16:
15784  * @stream: a #GDataOutputStream.
15785  * @data: a #guint16.
15786  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15787  * @error: a #GError, %NULL to ignore.
15788  *
15789  * Puts an unsigned 16-bit integer into the output stream.
15790  *
15791  * Returns: %TRUE if @data was successfully added to the @stream.
15792  */
15793
15794
15795 /**
15796  * g_data_output_stream_put_uint32:
15797  * @stream: a #GDataOutputStream.
15798  * @data: a #guint32.
15799  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15800  * @error: a #GError, %NULL to ignore.
15801  *
15802  * Puts an unsigned 32-bit integer into the stream.
15803  *
15804  * Returns: %TRUE if @data was successfully added to the @stream.
15805  */
15806
15807
15808 /**
15809  * g_data_output_stream_put_uint64:
15810  * @stream: a #GDataOutputStream.
15811  * @data: a #guint64.
15812  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15813  * @error: a #GError, %NULL to ignore.
15814  *
15815  * Puts an unsigned 64-bit integer into the stream.
15816  *
15817  * Returns: %TRUE if @data was successfully added to the @stream.
15818  */
15819
15820
15821 /**
15822  * g_data_output_stream_set_byte_order:
15823  * @stream: a #GDataOutputStream.
15824  * @order: a %GDataStreamByteOrder.
15825  *
15826  * Sets the byte order of the data output stream to @order.
15827  */
15828
15829
15830 /**
15831  * g_dbus_address_get_for_bus_sync:
15832  * @bus_type: A #GBusType.
15833  * @cancellable: A #GCancellable or %NULL.
15834  * @error: Return location for error or %NULL.
15835  *
15836  * Synchronously looks up the D-Bus address for the well-known message
15837  * bus instance specified by @bus_type. This may involve using various
15838  * platform specific mechanisms.
15839  *
15840  * Returns: A valid D-Bus address string for @bus_type or %NULL if @error is set.
15841  * Since: 2.26
15842  */
15843
15844
15845 /**
15846  * g_dbus_address_get_stream:
15847  * @address: A valid D-Bus address.
15848  * @cancellable: A #GCancellable or %NULL.
15849  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
15850  * @user_data: Data to pass to @callback.
15851  *
15852  * Asynchronously connects to an endpoint specified by @address and
15853  * sets up the connection so it is in a state to run the client-side
15854  * of the D-Bus authentication conversation.
15855  * When the operation is finished, @callback will be invoked. You can
15856  * then call g_dbus_address_get_stream_finish() to get the result of
15857  * the operation.
15858  * This is an asynchronous failable function. See
15859  * g_dbus_address_get_stream_sync() for the synchronous version.
15860  *
15861  * Since: 2.26
15862  */
15863
15864
15865 /**
15866  * g_dbus_address_get_stream_finish:
15867  * @res: A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().
15868  * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
15869  * @error: Return location for error or %NULL.
15870  *
15871  * Finishes an operation started with g_dbus_address_get_stream().
15872  *
15873  * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
15874  * Since: 2.26
15875  */
15876
15877
15878 /**
15879  * g_dbus_address_get_stream_sync:
15880  * @address: A valid D-Bus address.
15881  * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
15882  * @cancellable: A #GCancellable or %NULL.
15883  * @error: Return location for error or %NULL.
15884  *
15885  * Synchronously connects to an endpoint specified by @address and
15886  * sets up the connection so it is in a state to run the client-side
15887  * of the D-Bus authentication conversation.
15888  * This is a synchronous failable function. See
15889  * g_dbus_address_get_stream() for the asynchronous version.
15890  *
15891  * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
15892  * Since: 2.26
15893  */
15894
15895
15896 /**
15897  * g_dbus_annotation_info_lookup:
15898  * @annotations: A %NULL-terminated array of annotations or %NULL.
15899  * @name: The name of the annotation to look up.
15900  *
15901  * Looks up the value of an annotation.
15902  * This cost of this function is O(n) in number of annotations.
15903  *
15904  * Returns: The value or %NULL if not found. Do not free, it is owned by @annotations.
15905  * Since: 2.26
15906  */
15907
15908
15909 /**
15910  * g_dbus_annotation_info_ref:
15911  * @info: A #GDBusNodeInfo
15912  *
15913  * If @info is statically allocated does nothing. Otherwise increases
15914  * the reference count.
15915  *
15916  * Returns: The same @info.
15917  * Since: 2.26
15918  */
15919
15920
15921 /**
15922  * g_dbus_annotation_info_unref:
15923  * @info: A #GDBusAnnotationInfo.
15924  *
15925  * If @info is statically allocated, does nothing. Otherwise decreases
15926  * the reference count of @info. When its reference count drops to 0,
15927  * the memory used is freed.
15928  *
15929  * Since: 2.26
15930  */
15931
15932
15933 /**
15934  * g_dbus_arg_info_ref:
15935  * @info: A #GDBusArgInfo
15936  *
15937  * If @info is statically allocated does nothing. Otherwise increases
15938  * the reference count.
15939  *
15940  * Returns: The same @info.
15941  * Since: 2.26
15942  */
15943
15944
15945 /**
15946  * g_dbus_arg_info_unref:
15947  * @info: A #GDBusArgInfo.
15948  *
15949  * If @info is statically allocated, does nothing. Otherwise decreases
15950  * the reference count of @info. When its reference count drops to 0,
15951  * the memory used is freed.
15952  *
15953  * Since: 2.26
15954  */
15955
15956
15957 /**
15958  * g_dbus_auth_observer_authorize_authenticated_peer:
15959  * @observer: A #GDBusAuthObserver.
15960  * @stream: A #GIOStream for the #GDBusConnection.
15961  * @credentials: Credentials received from the peer or %NULL.
15962  *
15963  * Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.
15964  *
15965  * Returns: %TRUE if the peer is authorized, %FALSE if not.
15966  * Since: 2.26
15967  */
15968
15969
15970 /**
15971  * g_dbus_auth_observer_new:
15972  *
15973  * Creates a new #GDBusAuthObserver object.
15974  *
15975  * Returns: A #GDBusAuthObserver. Free with g_object_unref().
15976  * Since: 2.26
15977  */
15978
15979
15980 /**
15981  * g_dbus_connection_add_filter:
15982  * @connection: A #GDBusConnection.
15983  * @filter_function: A filter function.
15984  * @user_data: User data to pass to @filter_function.
15985  * @user_data_free_func: Function to free @user_data with when filter is removed or %NULL.
15986  *
15987  * Adds a message filter. Filters are handlers that are run on all
15988  * incoming and outgoing messages, prior to standard dispatch. Filters
15989  * are run in the order that they were added.  The same handler can be
15990  * added as a filter more than once, in which case it will be run more
15991  * than once.  Filters added during a filter callback won't be run on
15992  * the message being processed. Filter functions are allowed to modify
15993  * and even drop messages - see the #GDBusMessageFilterResult
15994  * enumeration for details.
15995  * Note that filters are run in a dedicated message handling thread so
15996  * they can't block and, generally, can't do anything but signal a
15997  * worker thread. Also note that filters are rarely needed - use API
15998  * such as g_dbus_connection_send_message_with_reply(),
15999  * g_dbus_connection_signal_subscribe() or
16000  * g_dbus_connection_call() instead.
16001  * If a filter consumes an incoming message the message is not
16002  * dispatched anywhere else - not even the standard dispatch machinery
16003  * (that API such as g_dbus_connection_signal_subscribe() and
16004  * g_dbus_connection_send_message_with_reply() relies on) will see the
16005  * message. Similary, if a filter consumes an outgoing message, the
16006  * message will not be sent to the other peer.
16007  * g_dbus_connection_remove_filter().
16008  *
16009  * Returns: A filter identifier that can be used with
16010  * Since: 2.26
16011  */
16012
16013
16014 /**
16015  * g_dbus_connection_call:
16016  * @connection: A #GDBusConnection.
16017  * @bus_name: A unique or well-known bus name or %NULL if @connection is not a message bus connection.
16018  * @object_path: Path of remote object.
16019  * @interface_name: D-Bus interface to invoke method on.
16020  * @method_name: The name of the method to invoke.
16021  * @parameters: A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
16022  * @reply_type: The expected type of the reply, or %NULL.
16023  * @flags: Flags from the #GDBusCallFlags enumeration.
16024  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
16025  * @cancellable: A #GCancellable or %NULL.
16026  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
16027  * @user_data: The data to pass to @callback.
16028  *
16029  * Asynchronously invokes the @method_name method on the
16030  * If @connection is closed then the operation will fail with
16031  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
16032  * fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value
16033  * not compatible with the D-Bus protocol, the operation fails with
16034  * %G_IO_ERROR_INVALID_ARGUMENT.
16035  * If @reply_type is non-%NULL then the reply will be checked for having this type and an
16036  * error will be raised if it does not match.  Said another way, if you give a @reply_type
16037  * then any non-%NULL return value will be of this type.
16038  * If the @parameters #GVariant is floating, it is consumed. This allows
16039  * convenient 'inline' use of g_variant_new(), e.g.:
16040  * |[
16041  * g_dbus_connection_call (connection,
16042  * "org.freedesktop.StringThings",
16043  * "/org/freedesktop/StringThings",
16044  * "org.freedesktop.StringThings",
16045  * "TwoStrings",
16046  * g_variant_new ("(ss)",
16047  * "Thing One",
16048  * "Thing Two"),
16049  * NULL,
16050  * G_DBUS_CALL_FLAGS_NONE,
16051  * -1,
16052  * NULL,
16053  * (GAsyncReadyCallback) two_strings_done,
16054  * NULL);
16055  * ]|
16056  * This is an asynchronous method. When the operation is finished, @callback will be invoked
16057  * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
16058  * of the thread you are calling this method from. You can then call
16059  * g_dbus_connection_call_finish() to get the result of the operation.
16060  * See g_dbus_connection_call_sync() for the synchronous version of this
16061  * function.
16062  *
16063  * Since: 2.26
16064  */
16065
16066
16067 /**
16068  * g_dbus_connection_call_finish:
16069  * @connection: A #GDBusConnection.
16070  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call().
16071  * @error: Return location for error or %NULL.
16072  *
16073  * Finishes an operation started with g_dbus_connection_call().
16074  * return values. Free with g_variant_unref().
16075  *
16076  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
16077  * Since: 2.26
16078  */
16079
16080
16081 /**
16082  * g_dbus_connection_call_sync:
16083  * @connection: A #GDBusConnection.
16084  * @bus_name: A unique or well-known bus name.
16085  * @object_path: Path of remote object.
16086  * @interface_name: D-Bus interface to invoke method on.
16087  * @method_name: The name of the method to invoke.
16088  * @parameters: A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
16089  * @reply_type: The expected type of the reply, or %NULL.
16090  * @flags: Flags from the #GDBusCallFlags enumeration.
16091  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
16092  * @cancellable: A #GCancellable or %NULL.
16093  * @error: Return location for error or %NULL.
16094  *
16095  * Synchronously invokes the @method_name method on the
16096  * If @connection is closed then the operation will fail with
16097  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the
16098  * operation will fail with %G_IO_ERROR_CANCELLED. If @parameters
16099  * contains a value not compatible with the D-Bus protocol, the operation
16100  * fails with %G_IO_ERROR_INVALID_ARGUMENT.
16101  * If @reply_type is non-%NULL then the reply will be checked for having
16102  * this type and an error will be raised if it does not match.  Said
16103  * another way, if you give a @reply_type then any non-%NULL return
16104  * value will be of this type.
16105  * If the @parameters #GVariant is floating, it is consumed.
16106  * This allows convenient 'inline' use of g_variant_new(), e.g.:
16107  * |[
16108  * g_dbus_connection_call_sync (connection,
16109  * "org.freedesktop.StringThings",
16110  * "/org/freedesktop/StringThings",
16111  * "org.freedesktop.StringThings",
16112  * "TwoStrings",
16113  * g_variant_new ("(ss)",
16114  * "Thing One",
16115  * "Thing Two"),
16116  * NULL,
16117  * G_DBUS_CALL_FLAGS_NONE,
16118  * -1,
16119  * NULL,
16120  * &amp;error);
16121  * ]|
16122  * The calling thread is blocked until a reply is received. See
16123  * g_dbus_connection_call() for the asynchronous version of
16124  * this method.
16125  * return values. Free with g_variant_unref().
16126  *
16127  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
16128  * Since: 2.26
16129  */
16130
16131
16132 /**
16133  * g_dbus_connection_close:
16134  * @connection: A #GDBusConnection.
16135  * @cancellable: A #GCancellable or %NULL.
16136  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
16137  * @user_data: The data to pass to @callback.
16138  *
16139  * Closes @connection. Note that this never causes the process to
16140  * exit (this might only happen if the other end of a shared message
16141  * bus connection disconnects, see #GDBusConnection:exit-on-close).
16142  * Once the connection is closed, operations such as sending a message
16143  * will return with the error %G_IO_ERROR_CLOSED. Closing a connection
16144  * will not automatically flush the connection so queued messages may
16145  * be lost. Use g_dbus_connection_flush() if you need such guarantees.
16146  * If @connection is already closed, this method fails with
16147  * %G_IO_ERROR_CLOSED.
16148  * When @connection has been closed, the #GDBusConnection::closed
16149  * signal is emitted in the <link
16150  * linkend="g-main-context-push-thread-default">thread-default main
16151  * loop</link> of the thread that @connection was constructed in.
16152  * This is an asynchronous method. When the operation is finished,
16153  * linkend="g-main-context-push-thread-default">thread-default main
16154  * loop</link> of the thread you are calling this method from. You can
16155  * then call g_dbus_connection_close_finish() to get the result of the
16156  * operation.  See g_dbus_connection_close_sync() for the synchronous
16157  * version.
16158  *
16159  * Since: 2.26
16160  */
16161
16162
16163 /**
16164  * g_dbus_connection_close_finish:
16165  * @connection: A #GDBusConnection.
16166  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_close().
16167  * @error: Return location for error or %NULL.
16168  *
16169  * Finishes an operation started with g_dbus_connection_close().
16170  *
16171  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16172  * Since: 2.26
16173  */
16174
16175
16176 /**
16177  * g_dbus_connection_close_sync:
16178  * @connection: A #GDBusConnection.
16179  * @cancellable: A #GCancellable or %NULL.
16180  * @error: Return location for error or %NULL.
16181  *
16182  * Synchronously closees @connection. The calling thread is blocked
16183  * until this is done. See g_dbus_connection_close() for the
16184  * asynchronous version of this method and more details about what it
16185  * does.
16186  *
16187  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16188  * Since: 2.26
16189  */
16190
16191
16192 /**
16193  * g_dbus_connection_emit_signal:
16194  * @connection: A #GDBusConnection.
16195  * @destination_bus_name: The unique bus name for the destination for the signal or %NULL to emit to all listeners.
16196  * @object_path: Path of remote object.
16197  * @interface_name: D-Bus interface to emit a signal on.
16198  * @signal_name: The name of the signal to emit.
16199  * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
16200  * @error: Return location for error or %NULL.
16201  *
16202  * Emits a signal.
16203  * If the parameters GVariant is floating, it is consumed.
16204  * This can only fail if @parameters is not compatible with the D-Bus protocol.
16205  *
16206  * Returns: %TRUE unless @error is set.
16207  * Since: 2.26
16208  */
16209
16210
16211 /**
16212  * g_dbus_connection_flush:
16213  * @connection: A #GDBusConnection.
16214  * @cancellable: A #GCancellable or %NULL.
16215  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
16216  * @user_data: The data to pass to @callback.
16217  *
16218  * Asynchronously flushes @connection, that is, writes all queued
16219  * outgoing message to the transport and then flushes the transport
16220  * (using g_output_stream_flush_async()). This is useful in programs
16221  * that wants to emit a D-Bus signal and then exit
16222  * immediately. Without flushing the connection, there is no guarantee
16223  * that the message has been sent to the networking buffers in the OS
16224  * kernel.
16225  * This is an asynchronous method. When the operation is finished,
16226  * linkend="g-main-context-push-thread-default">thread-default main
16227  * loop</link> of the thread you are calling this method from. You can
16228  * then call g_dbus_connection_flush_finish() to get the result of the
16229  * operation.  See g_dbus_connection_flush_sync() for the synchronous
16230  * version.
16231  *
16232  * Since: 2.26
16233  */
16234
16235
16236 /**
16237  * g_dbus_connection_flush_finish:
16238  * @connection: A #GDBusConnection.
16239  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_flush().
16240  * @error: Return location for error or %NULL.
16241  *
16242  * Finishes an operation started with g_dbus_connection_flush().
16243  *
16244  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16245  * Since: 2.26
16246  */
16247
16248
16249 /**
16250  * g_dbus_connection_flush_sync:
16251  * @connection: A #GDBusConnection.
16252  * @cancellable: A #GCancellable or %NULL.
16253  * @error: Return location for error or %NULL.
16254  *
16255  * Synchronously flushes @connection. The calling thread is blocked
16256  * until this is done. See g_dbus_connection_flush() for the
16257  * asynchronous version of this method and more details about what it
16258  * does.
16259  *
16260  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16261  * Since: 2.26
16262  */
16263
16264
16265 /**
16266  * g_dbus_connection_get_capabilities:
16267  * @connection: A #GDBusConnection.
16268  *
16269  * Gets the capabilities negotiated with the remote peer
16270  *
16271  * Returns: Zero or more flags from the #GDBusCapabilityFlags enumeration.
16272  * Since: 2.26
16273  */
16274
16275
16276 /**
16277  * g_dbus_connection_get_exit_on_close:
16278  * @connection: A #GDBusConnection.
16279  *
16280  * Gets whether the process is terminated when @connection is
16281  * closed by the remote peer. See
16282  * #GDBusConnection:exit-on-close for more details.
16283  * closed by the remote peer.
16284  *
16285  * Returns: Whether the process is terminated when @connection is
16286  * Since: 2.26
16287  */
16288
16289
16290 /**
16291  * g_dbus_connection_get_guid:
16292  * @connection: A #GDBusConnection.
16293  *
16294  * The GUID of the peer performing the role of server when
16295  * authenticating. See #GDBusConnection:guid for more details.
16296  *
16297  * Returns: The GUID. Do not free this string, it is owned by
16298  * Since: 2.26
16299  */
16300
16301
16302 /**
16303  * g_dbus_connection_get_peer_credentials:
16304  * @connection: A #GDBusConnection.
16305  *
16306  * Gets the credentials of the authenticated peer. This will always
16307  * return %NULL unless @connection acted as a server
16308  * (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed)
16309  * when set up and the client passed credentials as part of the
16310  * authentication process.
16311  * In a message bus setup, the message bus is always the server and
16312  * each application is a client. So this method will always return
16313  * %NULL for message bus clients.
16314  * this object, it is owned by @connection.
16315  *
16316  * Returns: (transfer none): A #GCredentials or %NULL if not available. Do not free
16317  * Since: 2.26
16318  */
16319
16320
16321 /**
16322  * g_dbus_connection_get_stream:
16323  * @connection: a #GDBusConnection
16324  *
16325  * Gets the underlying stream used for IO.
16326  *
16327  * Returns: (transfer none): the stream used for IO
16328  * Since: 2.26
16329  */
16330
16331
16332 /**
16333  * g_dbus_connection_get_unique_name:
16334  * @connection: A #GDBusConnection.
16335  *
16336  * Gets the unique name of @connection as assigned by the message
16337  * bus. This can also be used to figure out if @connection is a
16338  * message bus connection.
16339  * bus connection. Do not free this string, it is owned by
16340  *
16341  * Returns: The unique name or %NULL if @connection is not a message
16342  * Since: 2.26
16343  */
16344
16345
16346 /**
16347  * g_dbus_connection_is_closed:
16348  * @connection: A #GDBusConnection.
16349  *
16350  * Gets whether @connection is closed.
16351  *
16352  * Returns: %TRUE if the connection is closed, %FALSE otherwise.
16353  * Since: 2.26
16354  */
16355
16356
16357 /**
16358  * g_dbus_connection_new:
16359  * @stream: A #GIOStream.
16360  * @guid: The GUID to use if a authenticating as a server or %NULL.
16361  * @flags: Flags describing how to make the connection.
16362  * @observer: A #GDBusAuthObserver or %NULL.
16363  * @cancellable: A #GCancellable or %NULL.
16364  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
16365  * @user_data: The data to pass to @callback.
16366  *
16367  * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
16368  * with the end represented by @stream.
16369  * If @observer is not %NULL it may be used to control the
16370  * authentication process.
16371  * When the operation is finished, @callback will be invoked. You can
16372  * then call g_dbus_connection_new_finish() to get the result of the
16373  * operation.
16374  * This is a asynchronous failable constructor. See
16375  * g_dbus_connection_new_sync() for the synchronous
16376  * version.
16377  *
16378  * Since: 2.26
16379  */
16380
16381
16382 /**
16383  * g_dbus_connection_new_finish:
16384  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
16385  * @error: Return location for error or %NULL.
16386  *
16387  * Finishes an operation started with g_dbus_connection_new().
16388  *
16389  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16390  * Since: 2.26
16391  */
16392
16393
16394 /**
16395  * g_dbus_connection_new_for_address:
16396  * @address: A D-Bus address.
16397  * @flags: Flags describing how to make the connection.
16398  * @observer: A #GDBusAuthObserver or %NULL.
16399  * @cancellable: A #GCancellable or %NULL.
16400  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
16401  * @user_data: The data to pass to @callback.
16402  *
16403  * Asynchronously connects and sets up a D-Bus client connection for
16404  * exchanging D-Bus messages with an endpoint specified by @address
16405  * which must be in the D-Bus address format.
16406  * This constructor can only be used to initiate client-side
16407  * connections - use g_dbus_connection_new() if you need to act as the
16408  * server. In particular, @flags cannot contain the
16409  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
16410  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
16411  * When the operation is finished, @callback will be invoked. You can
16412  * then call g_dbus_connection_new_finish() to get the result of the
16413  * operation.
16414  * If @observer is not %NULL it may be used to control the
16415  * authentication process.
16416  * This is a asynchronous failable constructor. See
16417  * g_dbus_connection_new_for_address_sync() for the synchronous
16418  * version.
16419  *
16420  * Since: 2.26
16421  */
16422
16423
16424 /**
16425  * g_dbus_connection_new_for_address_finish:
16426  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
16427  * @error: Return location for error or %NULL.
16428  *
16429  * Finishes an operation started with g_dbus_connection_new_for_address().
16430  *
16431  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16432  * Since: 2.26
16433  */
16434
16435
16436 /**
16437  * g_dbus_connection_new_for_address_sync:
16438  * @address: A D-Bus address.
16439  * @flags: Flags describing how to make the connection.
16440  * @observer: A #GDBusAuthObserver or %NULL.
16441  * @cancellable: A #GCancellable or %NULL.
16442  * @error: Return location for error or %NULL.
16443  *
16444  * Synchronously connects and sets up a D-Bus client connection for
16445  * exchanging D-Bus messages with an endpoint specified by @address
16446  * which must be in the D-Bus address format.
16447  * This constructor can only be used to initiate client-side
16448  * connections - use g_dbus_connection_new_sync() if you need to act
16449  * as the server. In particular, @flags cannot contain the
16450  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
16451  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
16452  * This is a synchronous failable constructor. See
16453  * g_dbus_connection_new_for_address() for the asynchronous version.
16454  * If @observer is not %NULL it may be used to control the
16455  * authentication process.
16456  *
16457  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16458  * Since: 2.26
16459  */
16460
16461
16462 /**
16463  * g_dbus_connection_new_sync:
16464  * @stream: A #GIOStream.
16465  * @guid: The GUID to use if a authenticating as a server or %NULL.
16466  * @flags: Flags describing how to make the connection.
16467  * @observer: A #GDBusAuthObserver or %NULL.
16468  * @cancellable: A #GCancellable or %NULL.
16469  * @error: Return location for error or %NULL.
16470  *
16471  * Synchronously sets up a D-Bus connection for exchanging D-Bus messages
16472  * with the end represented by @stream.
16473  * If @observer is not %NULL it may be used to control the
16474  * authentication process.
16475  * This is a synchronous failable constructor. See
16476  * g_dbus_connection_new() for the asynchronous version.
16477  *
16478  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16479  * Since: 2.26
16480  */
16481
16482
16483 /**
16484  * g_dbus_connection_register_object:
16485  * @connection: A #GDBusConnection.
16486  * @object_path: The object path to register at.
16487  * @interface_info: Introspection data for the interface.
16488  * @vtable: A #GDBusInterfaceVTable to call into or %NULL.
16489  * @user_data: Data to pass to functions in @vtable.
16490  * @user_data_free_func: Function to call when the object path is unregistered.
16491  * @error: Return location for error or %NULL.
16492  *
16493  * Registers callbacks for exported objects at @object_path with the
16494  * D-Bus interface that is described in @interface_info.
16495  * Calls to functions in @vtable (and @user_data_free_func) will
16496  * happen in the <link linkend="g-main-context-push-thread-default">thread-default main
16497  * loop</link> of the thread you are calling this method from.
16498  * Note that all #GVariant values passed to functions in @vtable will match
16499  * the signature given in @interface_info - if a remote caller passes
16500  * incorrect values, the <literal>org.freedesktop.DBus.Error.InvalidArgs</literal>
16501  * is returned to the remote caller.
16502  * Additionally, if the remote caller attempts to invoke methods or
16503  * access properties not mentioned in @interface_info the
16504  * <literal>org.freedesktop.DBus.Error.UnknownMethod</literal> resp.
16505  * <literal>org.freedesktop.DBus.Error.InvalidArgs</literal> errors
16506  * are returned to the caller.
16507  * It is considered a programming error if the
16508  * #GDBusInterfaceGetPropertyFunc function in @vtable returns a
16509  * #GVariant of incorrect type.
16510  * If an existing callback is already registered at @object_path and
16511  * GDBus automatically implements the standard D-Bus interfaces
16512  * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
16513  * and org.freedesktop.Peer, so you don't have to implement those for
16514  * the objects you export. You <emphasis>can</emphasis> implement
16515  * org.freedesktop.DBus.Properties yourself, e.g. to handle getting
16516  * and setting of properties asynchronously.
16517  * Note that the reference count on @interface_info will be
16518  * incremented by 1 (unless allocated statically, e.g. if the
16519  * reference count is -1, see g_dbus_interface_info_ref()) for as long
16520  * as the object is exported. Also note that @vtable will be copied.
16521  * See <xref linkend="gdbus-server"/> for an example of how to use this method.
16522  * that can be used with g_dbus_connection_unregister_object() .
16523  *
16524  * Returns: 0 if @error is set, otherwise a registration id (never 0)
16525  * Since: 2.26
16526  */
16527
16528
16529 /**
16530  * g_dbus_connection_register_subtree:
16531  * @connection: A #GDBusConnection.
16532  * @object_path: The object path to register the subtree at.
16533  * @vtable: A #GDBusSubtreeVTable to enumerate, introspect and dispatch nodes in the subtree.
16534  * @flags: Flags used to fine tune the behavior of the subtree.
16535  * @user_data: Data to pass to functions in @vtable.
16536  * @user_data_free_func: Function to call when the subtree is unregistered.
16537  * @error: Return location for error or %NULL.
16538  *
16539  * Registers a whole subtree of <quote>dynamic</quote> objects.
16540  * The @enumerate and @introspection functions in @vtable are used to
16541  * convey, to remote callers, what nodes exist in the subtree rooted
16542  * by @object_path.
16543  * When handling remote calls into any node in the subtree, first the
16544  * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set
16545  * the @introspection function is used to check if the node supports the
16546  * requested method. If so, the @dispatch function is used to determine
16547  * where to dispatch the call. The collected #GDBusInterfaceVTable and
16548  * #gpointer will be used to call into the interface vtable for processing
16549  * the request.
16550  * All calls into user-provided code will be invoked in the <link
16551  * linkend="g-main-context-push-thread-default">thread-default main
16552  * loop</link> of the thread you are calling this method from.
16553  * If an existing subtree is already registered at @object_path or
16554  * then @error is set to #G_IO_ERROR_EXISTS.
16555  * Note that it is valid to register regular objects (using
16556  * g_dbus_connection_register_object()) in a subtree registered with
16557  * g_dbus_connection_register_subtree() - if so, the subtree handler
16558  * is tried as the last resort. One way to think about a subtree
16559  * handler is to consider it a <quote>fallback handler</quote>
16560  * for object paths not registered via g_dbus_connection_register_object()
16561  * or other bindings.
16562  * Note that @vtable will be copied so you cannot change it after
16563  * registration.
16564  * See <xref linkend="gdbus-subtree-server"/> for an example of how to use this method.
16565  * that can be used with g_dbus_connection_unregister_subtree() .
16566  *
16567  * Returns: 0 if @error is set, otherwise a subtree registration id (never 0)
16568  * Since: 2.26
16569  */
16570
16571
16572 /**
16573  * g_dbus_connection_remove_filter:
16574  * @connection: a #GDBusConnection
16575  * @filter_id: an identifier obtained from g_dbus_connection_add_filter()
16576  *
16577  * Removes a filter.
16578  *
16579  * Since: 2.26
16580  */
16581
16582
16583 /**
16584  * g_dbus_connection_send_message:
16585  * @connection: A #GDBusConnection.
16586  * @message: A #GDBusMessage
16587  * @flags: Flags affecting how the message is sent.
16588  * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
16589  * @error: Return location for error or %NULL.
16590  *
16591  * Asynchronously sends @message to the peer represented by @connection.
16592  * Unless @flags contain the
16593  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
16594  * will be assigned by @connection and set on @message via
16595  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
16596  * serial number used will be written to this location prior to
16597  * submitting the message to the underlying transport.
16598  * If @connection is closed then the operation will fail with
16599  * %G_IO_ERROR_CLOSED. If @message is not well-formed,
16600  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
16601  * See <xref linkend="gdbus-server"/> and <xref
16602  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
16603  * low-level API to send and receive UNIX file descriptors.
16604  * Note that @message must be unlocked, unless @flags contain the
16605  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
16606  * transmission, %FALSE if @error is set.
16607  *
16608  * Returns: %TRUE if the message was well-formed and queued for
16609  * Since: 2.26
16610  */
16611
16612
16613 /**
16614  * g_dbus_connection_send_message_with_reply:
16615  * @connection: A #GDBusConnection.
16616  * @message: A #GDBusMessage.
16617  * @flags: Flags affecting how the message is sent.
16618  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
16619  * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
16620  * @cancellable: A #GCancellable or %NULL.
16621  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
16622  * @user_data: The data to pass to @callback.
16623  *
16624  * Asynchronously sends @message to the peer represented by @connection.
16625  * Unless @flags contain the
16626  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
16627  * will be assigned by @connection and set on @message via
16628  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
16629  * serial number used will be written to this location prior to
16630  * submitting the message to the underlying transport.
16631  * If @connection is closed then the operation will fail with
16632  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
16633  * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
16634  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
16635  * This is an asynchronous method. When the operation is finished, @callback will be invoked
16636  * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
16637  * of the thread you are calling this method from. You can then call
16638  * g_dbus_connection_send_message_with_reply_finish() to get the result of the operation.
16639  * See g_dbus_connection_send_message_with_reply_sync() for the synchronous version.
16640  * Note that @message must be unlocked, unless @flags contain the
16641  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
16642  * See <xref linkend="gdbus-server"/> and <xref
16643  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
16644  * low-level API to send and receive UNIX file descriptors.
16645  *
16646  * Since: 2.26
16647  */
16648
16649
16650 /**
16651  * g_dbus_connection_send_message_with_reply_finish:
16652  * @connection: a #GDBusConnection
16653  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_send_message_with_reply().
16654  * @error: Return location for error or %NULL.
16655  *
16656  * Finishes an operation started with g_dbus_connection_send_message_with_reply().
16657  * Note that @error is only set if a local in-process error
16658  * occured. That is to say that the returned #GDBusMessage object may
16659  * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
16660  * g_dbus_message_to_gerror() to transcode this to a #GError.
16661  * See <xref linkend="gdbus-server"/> and <xref
16662  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
16663  * low-level API to send and receive UNIX file descriptors.
16664  *
16665  * Returns: (transfer full): A locked #GDBusMessage or %NULL if @error is set.
16666  * Since: 2.26
16667  */
16668
16669
16670 /**
16671  * g_dbus_connection_send_message_with_reply_sync:
16672  * @connection: A #GDBusConnection.
16673  * @message: A #GDBusMessage.
16674  * @flags: Flags affecting how the message is sent.
16675  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
16676  * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
16677  * @cancellable: A #GCancellable or %NULL.
16678  * @error: Return location for error or %NULL.
16679  *
16680  * Synchronously sends @message to the peer represented by @connection
16681  * and blocks the calling thread until a reply is received or the
16682  * timeout is reached. See g_dbus_connection_send_message_with_reply()
16683  * for the asynchronous version of this method.
16684  * Unless @flags contain the
16685  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
16686  * will be assigned by @connection and set on @message via
16687  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
16688  * serial number used will be written to this location prior to
16689  * submitting the message to the underlying transport.
16690  * If @connection is closed then the operation will fail with
16691  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
16692  * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
16693  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
16694  * Note that @error is only set if a local in-process error
16695  * occured. That is to say that the returned #GDBusMessage object may
16696  * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
16697  * g_dbus_message_to_gerror() to transcode this to a #GError.
16698  * See <xref linkend="gdbus-server"/> and <xref
16699  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
16700  * low-level API to send and receive UNIX file descriptors.
16701  * Note that @message must be unlocked, unless @flags contain the
16702  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
16703  *
16704  * Returns: (transfer full): A locked #GDBusMessage that is the reply to @message or %NULL if @error is set.
16705  * Since: 2.26
16706  */
16707
16708
16709 /**
16710  * g_dbus_connection_set_exit_on_close:
16711  * @connection: A #GDBusConnection.
16712  * @exit_on_close: Whether the process should be terminated when @connection is closed by the remote peer.
16713  *
16714  * Sets whether the process should be terminated when @connection is
16715  * closed by the remote peer. See #GDBusConnection:exit-on-close for
16716  * more details.
16717  *
16718  * Since: 2.26
16719  */
16720
16721
16722 /**
16723  * g_dbus_connection_signal_subscribe:
16724  * @connection: A #GDBusConnection.
16725  * @sender: Sender name to match on (unique or well-known name) or %NULL to listen from all senders.
16726  * @interface_name: D-Bus interface name to match on or %NULL to match on all interfaces.
16727  * @member: D-Bus signal name to match on or %NULL to match on all signals.
16728  * @object_path: Object path to match on or %NULL to match on all object paths.
16729  * @arg0: Contents of first string argument to match on or %NULL to match on all kinds of arguments.
16730  * @flags: Flags describing how to subscribe to the signal (currently unused).
16731  * @callback: Callback to invoke when there is a signal matching the requested data.
16732  * @user_data: User data to pass to @callback.
16733  * @user_data_free_func: Function to free @user_data with when subscription is removed or %NULL.
16734  *
16735  * Subscribes to signals on @connection and invokes @callback with a
16736  * whenever the signal is received. Note that @callback
16737  * will be invoked in the <link
16738  * linkend="g-main-context-push-thread-default">thread-default main
16739  * loop</link> of the thread you are calling this method from.
16740  * If @connection is not a message bus connection, @sender must be
16741  * %NULL.
16742  * If @sender is a well-known name note that @callback is invoked with
16743  * the unique name for the owner of @sender, not the well-known name
16744  * as one would expect. This is because the message bus rewrites the
16745  * name. As such, to avoid certain race conditions, users should be
16746  * tracking the name owner of the well-known name and use that when
16747  * processing the received signal.
16748  *
16749  * Returns: A subscription identifier that can be used with g_dbus_connection_signal_unsubscribe().
16750  * Since: 2.26
16751  */
16752
16753
16754 /**
16755  * g_dbus_connection_signal_unsubscribe:
16756  * @connection: A #GDBusConnection.
16757  * @subscription_id: A subscription id obtained from g_dbus_connection_signal_subscribe().
16758  *
16759  * Unsubscribes from signals.
16760  *
16761  * Since: 2.26
16762  */
16763
16764
16765 /**
16766  * g_dbus_connection_start_message_processing:
16767  * @connection: A #GDBusConnection.
16768  *
16769  * If @connection was created with
16770  * %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method
16771  * starts processing messages. Does nothing on if @connection wasn't
16772  * created with this flag or if the method has already been called.
16773  *
16774  * Since: 2.26
16775  */
16776
16777
16778 /**
16779  * g_dbus_connection_unregister_object:
16780  * @connection: A #GDBusConnection.
16781  * @registration_id: A registration id obtained from g_dbus_connection_register_object().
16782  *
16783  * Unregisters an object.
16784  *
16785  * Returns: %TRUE if the object was unregistered, %FALSE otherwise.
16786  * Since: 2.26
16787  */
16788
16789
16790 /**
16791  * g_dbus_connection_unregister_subtree:
16792  * @connection: A #GDBusConnection.
16793  * @registration_id: A subtree registration id obtained from g_dbus_connection_register_subtree().
16794  *
16795  * Unregisters a subtree.
16796  *
16797  * Returns: %TRUE if the subtree was unregistered, %FALSE otherwise.
16798  * Since: 2.26
16799  */
16800
16801
16802 /**
16803  * g_dbus_error_encode_gerror:
16804  * @error: A #GError.
16805  *
16806  * Creates a D-Bus error name to use for @error. If @error matches
16807  * a registered error (cf. g_dbus_error_register_error()), the corresponding
16808  * D-Bus error name will be returned.
16809  * Otherwise the a name of the form
16810  * <literal>org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE</literal>
16811  * will be used. This allows other GDBus applications to map the error
16812  * on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
16813  * This function is typically only used in object mappings to put a
16814  * #GError on the wire. Regular applications should not use it.
16815  *
16816  * Returns: A D-Bus error name (never %NULL). Free with g_free().
16817  * Since: 2.26
16818  */
16819
16820
16821 /**
16822  * g_dbus_error_get_remote_error:
16823  * @error: A #GError.
16824  *
16825  * Gets the D-Bus error name used for @error, if any.
16826  * This function is guaranteed to return a D-Bus error name for all
16827  * #GError<!-- -->s returned from functions handling remote method
16828  * calls (e.g. g_dbus_connection_call_finish()) unless
16829  * g_dbus_error_strip_remote_error() has been used on @error.
16830  *
16831  * Returns: An allocated string or %NULL if the D-Bus error name could not be found. Free with g_free().
16832  * Since: 2.26
16833  */
16834
16835
16836 /**
16837  * g_dbus_error_is_remote_error:
16838  * @error: A #GError.
16839  *
16840  * Checks if @error represents an error received via D-Bus from a remote peer. If so,
16841  * use g_dbus_error_get_remote_error() to get the name of the error.
16842  * %FALSE otherwise.
16843  *
16844  * Returns: %TRUE if @error represents an error from a remote peer,
16845  * Since: 2.26
16846  */
16847
16848
16849 /**
16850  * g_dbus_error_new_for_dbus_error:
16851  * @dbus_error_name: D-Bus error name.
16852  * @dbus_error_message: D-Bus error message.
16853  *
16854  * Creates a #GError based on the contents of @dbus_error_name and
16855  * Errors registered with g_dbus_error_register_error() will be looked
16856  * up using @dbus_error_name and if a match is found, the error domain
16857  * and code is used. Applications can use g_dbus_error_get_remote_error()
16858  * to recover @dbus_error_name.
16859  * If a match against a registered error is not found and the D-Bus
16860  * error name is in a form as returned by g_dbus_error_encode_gerror()
16861  * the error domain and code encoded in the name is used to
16862  * create the #GError. Also, @dbus_error_name is added to the error message
16863  * such that it can be recovered with g_dbus_error_get_remote_error().
16864  * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR
16865  * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is
16866  * added to the error message such that it can be recovered with
16867  * g_dbus_error_get_remote_error().
16868  * In all three cases, @dbus_error_name can always be recovered from the
16869  * returned #GError using the g_dbus_error_get_remote_error() function
16870  * (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
16871  * This function is typically only used in object mappings to prepare
16872  * #GError instances for applications. Regular applications should not use
16873  * it.
16874  *
16875  * Returns: An allocated #GError. Free with g_error_free().
16876  * Since: 2.26
16877  */
16878
16879
16880 /**
16881  * g_dbus_error_register_error:
16882  * @error_domain: A #GQuark for a error domain.
16883  * @error_code: An error code.
16884  * @dbus_error_name: A D-Bus error name.
16885  *
16886  * Creates an association to map between @dbus_error_name and
16887  * #GError<!-- -->s specified by @error_domain and @error_code.
16888  * This is typically done in the routine that returns the #GQuark for
16889  * an error domain.
16890  * exists.
16891  *
16892  * Returns: %TRUE if the association was created, %FALSE if it already
16893  * Since: 2.26
16894  */
16895
16896
16897 /**
16898  * g_dbus_error_register_error_domain:
16899  * @error_domain_quark_name: The error domain name.
16900  * @quark_volatile: A pointer where to store the #GQuark.
16901  * @entries: A pointer to @num_entries #GDBusErrorEntry struct items.
16902  * @num_entries: Number of items to register.
16903  *
16904  * Helper function for associating a #GError error domain with D-Bus error names.
16905  *
16906  * Since: 2.26
16907  */
16908
16909
16910 /**
16911  * g_dbus_error_set_dbus_error:
16912  * @error: A pointer to a #GError or %NULL.
16913  * @dbus_error_name: D-Bus error name.
16914  * @dbus_error_message: D-Bus error message.
16915  * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
16916  * @...: Arguments for @format.
16917  *
16918  * Does nothing if @error is %NULL. Otherwise sets *@error to
16919  * a new #GError created with g_dbus_error_new_for_dbus_error()
16920  * with @dbus_error_message prepend with @format (unless %NULL).
16921  *
16922  * Since: 2.26
16923  */
16924
16925
16926 /**
16927  * g_dbus_error_set_dbus_error_valist:
16928  * @error: A pointer to a #GError or %NULL.
16929  * @dbus_error_name: D-Bus error name.
16930  * @dbus_error_message: D-Bus error message.
16931  * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
16932  * @var_args: Arguments for @format.
16933  *
16934  * Like g_dbus_error_set_dbus_error() but intended for language bindings.
16935  *
16936  * Since: 2.26
16937  */
16938
16939
16940 /**
16941  * g_dbus_error_strip_remote_error:
16942  * @error: A #GError.
16943  *
16944  * Looks for extra information in the error message used to recover
16945  * the D-Bus error name and strips it if found. If stripped, the
16946  * message field in @error will correspond exactly to what was
16947  * received on the wire.
16948  * This is typically used when presenting errors to the end user.
16949  *
16950  * Returns: %TRUE if information was stripped, %FALSE otherwise.
16951  * Since: 2.26
16952  */
16953
16954
16955 /**
16956  * g_dbus_error_unregister_error:
16957  * @error_domain: A #GQuark for a error domain.
16958  * @error_code: An error code.
16959  * @dbus_error_name: A D-Bus error name.
16960  *
16961  * Destroys an association previously set up with g_dbus_error_register_error().
16962  *
16963  * Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found.
16964  * Since: 2.26
16965  */
16966
16967
16968 /**
16969  * g_dbus_generate_guid:
16970  *
16971  * Generate a D-Bus GUID that can be used with
16972  * e.g. g_dbus_connection_new().
16973  * See the D-Bus specification regarding what strings are valid D-Bus
16974  * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
16975  *
16976  * Returns: A valid D-Bus GUID. Free with g_free().
16977  * Since: 2.26
16978  */
16979
16980
16981 /**
16982  * g_dbus_interface_info_generate_xml:
16983  * @info: A #GDBusNodeInfo
16984  * @indent: Indentation level.
16985  * @string_builder: A #GString to to append XML data to.
16986  *
16987  * Appends an XML representation of @info (and its children) to @string_builder.
16988  * This function is typically used for generating introspection XML
16989  * documents at run-time for handling the
16990  * <literal>org.freedesktop.DBus.Introspectable.Introspect</literal>
16991  * method.
16992  *
16993  * Since: 2.26
16994  */
16995
16996
16997 /**
16998  * g_dbus_interface_info_lookup_method:
16999  * @info: A #GDBusInterfaceInfo.
17000  * @name: A D-Bus method name (typically in CamelCase)
17001  *
17002  * Looks up information about a method.
17003  * This cost of this function is O(n) in number of methods.
17004  *
17005  * Returns: A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info.
17006  * Since: 2.26
17007  */
17008
17009
17010 /**
17011  * g_dbus_interface_info_lookup_property:
17012  * @info: A #GDBusInterfaceInfo.
17013  * @name: A D-Bus property name (typically in CamelCase).
17014  *
17015  * Looks up information about a property.
17016  * This cost of this function is O(n) in number of properties.
17017  *
17018  * Returns: A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info.
17019  * Since: 2.26
17020  */
17021
17022
17023 /**
17024  * g_dbus_interface_info_lookup_signal:
17025  * @info: A #GDBusInterfaceInfo.
17026  * @name: A D-Bus signal name (typically in CamelCase)
17027  *
17028  * Looks up information about a signal.
17029  * This cost of this function is O(n) in number of signals.
17030  *
17031  * Returns: A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info.
17032  * Since: 2.26
17033  */
17034
17035
17036 /**
17037  * g_dbus_interface_info_ref:
17038  * @info: A #GDBusInterfaceInfo
17039  *
17040  * If @info is statically allocated does nothing. Otherwise increases
17041  * the reference count.
17042  *
17043  * Returns: The same @info.
17044  * Since: 2.26
17045  */
17046
17047
17048 /**
17049  * g_dbus_interface_info_unref:
17050  * @info: A #GDBusInterfaceInfo.
17051  *
17052  * If @info is statically allocated, does nothing. Otherwise decreases
17053  * the reference count of @info. When its reference count drops to 0,
17054  * the memory used is freed.
17055  *
17056  * Since: 2.26
17057  */
17058
17059
17060 /**
17061  * g_dbus_is_address:
17062  * @string: A string.
17063  *
17064  * Checks if @string is a D-Bus address.
17065  * This doesn't check if @string is actually supported by #GDBusServer
17066  * or #GDBusConnection - use g_dbus_is_supported_address() to do more
17067  * checks.
17068  *
17069  * Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise.
17070  * Since: 2.26
17071  */
17072
17073
17074 /**
17075  * g_dbus_is_guid:
17076  * @string: The string to check.
17077  *
17078  * Checks if @string is a D-Bus GUID.
17079  * See the D-Bus specification regarding what strings are valid D-Bus
17080  * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
17081  *
17082  * Returns: %TRUE if @string is a guid, %FALSE otherwise.
17083  * Since: 2.26
17084  */
17085
17086
17087 /**
17088  * g_dbus_is_interface_name:
17089  * @string: The string to check.
17090  *
17091  * Checks if @string is a valid D-Bus interface name.
17092  *
17093  * Returns: %TRUE if valid, %FALSE otherwise.
17094  * Since: 2.26
17095  */
17096
17097
17098 /**
17099  * g_dbus_is_member_name:
17100  * @string: The string to check.
17101  *
17102  * Checks if @string is a valid D-Bus member (e.g. signal or method) name.
17103  *
17104  * Returns: %TRUE if valid, %FALSE otherwise.
17105  * Since: 2.26
17106  */
17107
17108
17109 /**
17110  * g_dbus_is_name:
17111  * @string: The string to check.
17112  *
17113  * Checks if @string is a valid D-Bus bus name (either unique or well-known).
17114  *
17115  * Returns: %TRUE if valid, %FALSE otherwise.
17116  * Since: 2.26
17117  */
17118
17119
17120 /**
17121  * g_dbus_is_supported_address:
17122  * @string: A string.
17123  * @error: Return location for error or %NULL.
17124  *
17125  * Like g_dbus_is_address() but also checks if the library suppors the
17126  * transports in @string and that key/value pairs for each transport
17127  * are valid.
17128  * supported by this library, %FALSE if @error is set.
17129  *
17130  * Returns: %TRUE if @string is a valid D-Bus address that is
17131  * Since: 2.26
17132  */
17133
17134
17135 /**
17136  * g_dbus_is_unique_name:
17137  * @string: The string to check.
17138  *
17139  * Checks if @string is a valid D-Bus unique bus name.
17140  *
17141  * Returns: %TRUE if valid, %FALSE otherwise.
17142  * Since: 2.26
17143  */
17144
17145
17146 /**
17147  * g_dbus_message_bytes_needed:
17148  * @blob: A blob represent a binary D-Bus message.
17149  * @blob_len: The length of @blob (must be at least 16).
17150  * @error: Return location for error or %NULL.
17151  *
17152  * Utility function to calculate how many bytes are needed to
17153  * completely deserialize the D-Bus message stored at @blob.
17154  * determine the size).
17155  *
17156  * Returns: Number of bytes needed or -1 if @error is set (e.g. if
17157  * Since: 2.26
17158  */
17159
17160
17161 /**
17162  * g_dbus_message_copy:
17163  * @message: A #GDBusMessage.
17164  * @error: Return location for error or %NULL.
17165  *
17166  * Copies @message. The copy is a deep copy and the returned
17167  * #GDBusMessage is completely identical except that it is guaranteed
17168  * to not be locked.
17169  * This operation can fail if e.g. @message contains file descriptors
17170  * and the per-process or system-wide open files limit is reached.
17171  * g_object_unref().
17172  *
17173  * Returns: (transfer full): A new #GDBusMessage or %NULL if @error is set. Free with
17174  * Since: 2.26
17175  */
17176
17177
17178 /**
17179  * g_dbus_message_get_arg0:
17180  * @message: A #GDBusMessage.
17181  *
17182  * Convenience to get the first item in the body of @message.
17183  *
17184  * Returns: The string item or %NULL if the first item in the body of
17185  * Since: 2.26
17186  */
17187
17188
17189 /**
17190  * g_dbus_message_get_body:
17191  * @message: A #GDBusMessage.
17192  *
17193  * Gets the body of a message.
17194  *
17195  * Returns: A #GVariant or %NULL if the body is empty. Do not free, it is owned by @message.
17196  * Since: 2.26
17197  */
17198
17199
17200 /**
17201  * g_dbus_message_get_byte_order:
17202  * @message: A #GDBusMessage.
17203  *
17204  * Gets the byte order of @message.
17205  *
17206  * Returns: The byte order.
17207  */
17208
17209
17210 /**
17211  * g_dbus_message_get_destination:
17212  * @message: A #GDBusMessage.
17213  *
17214  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
17215  *
17216  * Returns: The value.
17217  * Since: 2.26
17218  */
17219
17220
17221 /**
17222  * g_dbus_message_get_error_name:
17223  * @message: A #GDBusMessage.
17224  *
17225  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
17226  *
17227  * Returns: The value.
17228  * Since: 2.26
17229  */
17230
17231
17232 /**
17233  * g_dbus_message_get_flags:
17234  * @message: A #GDBusMessage.
17235  *
17236  * Gets the flags for @message.
17237  *
17238  * Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
17239  * Since: 2.26
17240  */
17241
17242
17243 /**
17244  * g_dbus_message_get_header:
17245  * @message: A #GDBusMessage.
17246  * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
17247  *
17248  * Gets a header field on @message.
17249  * otherwise. Do not free, it is owned by @message.
17250  *
17251  * Returns: A #GVariant with the value if the header was found, %NULL
17252  * Since: 2.26
17253  */
17254
17255
17256 /**
17257  * g_dbus_message_get_header_fields:
17258  * @message: A #GDBusMessage.
17259  *
17260  * Gets an array of all header fields on @message that are set.
17261  * %G_DBUS_MESSAGE_HEADER_FIELD_INVALID.  Each element is a
17262  * #guchar. Free with g_free().
17263  *
17264  * Returns: An array of header fields terminated by
17265  * Since: 2.26
17266  */
17267
17268
17269 /**
17270  * g_dbus_message_get_interface:
17271  * @message: A #GDBusMessage.
17272  *
17273  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
17274  *
17275  * Returns: The value.
17276  * Since: 2.26
17277  */
17278
17279
17280 /**
17281  * g_dbus_message_get_locked:
17282  * @message: A #GDBusMessage.
17283  *
17284  * Checks whether @message is locked. To monitor changes to this
17285  * value, conncet to the #GObject::notify signal to listen for changes
17286  * on the #GDBusMessage:locked property.
17287  *
17288  * Returns: %TRUE if @message is locked, %FALSE otherwise.
17289  * Since: 2.26
17290  */
17291
17292
17293 /**
17294  * g_dbus_message_get_member:
17295  * @message: A #GDBusMessage.
17296  *
17297  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
17298  *
17299  * Returns: The value.
17300  * Since: 2.26
17301  */
17302
17303
17304 /**
17305  * g_dbus_message_get_message_type:
17306  * @message: A #GDBusMessage.
17307  *
17308  * Gets the type of @message.
17309  *
17310  * Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
17311  * Since: 2.26
17312  */
17313
17314
17315 /**
17316  * g_dbus_message_get_num_unix_fds:
17317  * @message: A #GDBusMessage.
17318  *
17319  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
17320  *
17321  * Returns: The value.
17322  * Since: 2.26
17323  */
17324
17325
17326 /**
17327  * g_dbus_message_get_path:
17328  * @message: A #GDBusMessage.
17329  *
17330  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
17331  *
17332  * Returns: The value.
17333  * Since: 2.26
17334  */
17335
17336
17337 /**
17338  * g_dbus_message_get_reply_serial:
17339  * @message: A #GDBusMessage.
17340  *
17341  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
17342  *
17343  * Returns: The value.
17344  * Since: 2.26
17345  */
17346
17347
17348 /**
17349  * g_dbus_message_get_sender:
17350  * @message: A #GDBusMessage.
17351  *
17352  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
17353  *
17354  * Returns: The value.
17355  * Since: 2.26
17356  */
17357
17358
17359 /**
17360  * g_dbus_message_get_serial:
17361  * @message: A #GDBusMessage.
17362  *
17363  * Gets the serial for @message.
17364  *
17365  * Returns: A #guint32.
17366  * Since: 2.26
17367  */
17368
17369
17370 /**
17371  * g_dbus_message_get_signature:
17372  * @message: A #GDBusMessage.
17373  *
17374  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
17375  *
17376  * Returns: The value.
17377  * Since: 2.26
17378  */
17379
17380
17381 /**
17382  * g_dbus_message_get_unix_fd_list:
17383  * @message: A #GDBusMessage.
17384  *
17385  * Gets the UNIX file descriptors associated with @message, if any.
17386  * This method is only available on UNIX.
17387  * associated. Do not free, this object is owned by @message.
17388  *
17389  * Returns: (transfer none): A #GUnixFDList or %NULL if no file descriptors are
17390  * Since: 2.26
17391  */
17392
17393
17394 /**
17395  * g_dbus_message_lock:
17396  * @message: A #GDBusMessage.
17397  *
17398  * If @message is locked, does nothing. Otherwise locks the message.
17399  *
17400  * Since: 2.26
17401  */
17402
17403
17404 /**
17405  * g_dbus_message_new:
17406  *
17407  * Creates a new empty #GDBusMessage.
17408  *
17409  * Returns: A #GDBusMessage. Free with g_object_unref().
17410  * Since: 2.26
17411  */
17412
17413
17414 /**
17415  * g_dbus_message_new_from_blob:
17416  * @blob: A blob represent a binary D-Bus message.
17417  * @blob_len: The length of @blob.
17418  * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
17419  * @error: Return location for error or %NULL.
17420  *
17421  * Creates a new #GDBusMessage from the data stored at @blob. The byte
17422  * order that the message was in can be retrieved using
17423  * g_dbus_message_get_byte_order().
17424  * g_object_unref().
17425  *
17426  * Returns: A new #GDBusMessage or %NULL if @error is set. Free with
17427  * Since: 2.26
17428  */
17429
17430
17431 /**
17432  * g_dbus_message_new_method_call:
17433  * @name: A valid D-Bus name or %NULL.
17434  * @path: A valid object path.
17435  * @interface_: A valid D-Bus interface name or %NULL.
17436  * @method: A valid method name.
17437  *
17438  * Creates a new #GDBusMessage for a method call.
17439  *
17440  * Returns: A #GDBusMessage. Free with g_object_unref().
17441  * Since: 2.26
17442  */
17443
17444
17445 /**
17446  * g_dbus_message_new_method_error:
17447  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17448  * @error_name: A valid D-Bus error name.
17449  * @error_message_format: The D-Bus error message in a printf() format.
17450  * @...: Arguments for @error_message_format.
17451  *
17452  * Creates a new #GDBusMessage that is an error reply to @method_call_message.
17453  *
17454  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
17455  * Since: 2.26
17456  */
17457
17458
17459 /**
17460  * g_dbus_message_new_method_error_literal:
17461  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17462  * @error_name: A valid D-Bus error name.
17463  * @error_message: The D-Bus error message.
17464  *
17465  * Creates a new #GDBusMessage that is an error reply to @method_call_message.
17466  *
17467  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
17468  * Since: 2.26
17469  */
17470
17471
17472 /**
17473  * g_dbus_message_new_method_error_valist:
17474  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17475  * @error_name: A valid D-Bus error name.
17476  * @error_message_format: The D-Bus error message in a printf() format.
17477  * @var_args: Arguments for @error_message_format.
17478  *
17479  * Like g_dbus_message_new_method_error() but intended for language bindings.
17480  *
17481  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
17482  * Since: 2.26
17483  */
17484
17485
17486 /**
17487  * g_dbus_message_new_method_reply:
17488  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17489  *
17490  * Creates a new #GDBusMessage that is a reply to @method_call_message.
17491  *
17492  * Returns: (transfer full): #GDBusMessage. Free with g_object_unref().
17493  * Since: 2.26
17494  */
17495
17496
17497 /**
17498  * g_dbus_message_new_signal:
17499  * @path: A valid object path.
17500  * @interface_: A valid D-Bus interface name.
17501  * @signal: A valid signal name.
17502  *
17503  * Creates a new #GDBusMessage for a signal emission.
17504  *
17505  * Returns: A #GDBusMessage. Free with g_object_unref().
17506  * Since: 2.26
17507  */
17508
17509
17510 /**
17511  * g_dbus_message_print:
17512  * @message: A #GDBusMessage.
17513  * @indent: Indentation level.
17514  *
17515  * Produces a human-readable multi-line description of @message.
17516  * The contents of the description has no ABI guarantees, the contents
17517  * and formatting is subject to change at any time. Typical output
17518  * looks something like this:
17519  * <programlisting>
17520  * Headers:
17521  * path -> objectpath '/org/gtk/GDBus/TestObject'
17522  * interface -> 'org.gtk.GDBus.TestInterface'
17523  * member -> 'GimmeStdout'
17524  * destination -> ':1.146'
17525  * UNIX File Descriptors:
17526  * (none)
17527  * </programlisting>
17528  * or
17529  * <programlisting>
17530  * Headers:
17531  * reply-serial -> uint32 4
17532  * destination -> ':1.159'
17533  * sender -> ':1.146'
17534  * num-unix-fds -> uint32 1
17535  * UNIX File Descriptors:
17536  * </programlisting>
17537  *
17538  * Type:    method-return
17539  * Flags:   no-reply-expected
17540  * Version: 0
17541  * Serial:  477
17542  * Body: ()
17543  * Fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
17544  * Returns: A string that should be freed with g_free().
17545  * Since: 2.26
17546  */
17547
17548
17549 /**
17550  * g_dbus_message_set_body:
17551  * @message: A #GDBusMessage.
17552  * @body: Either %NULL or a #GVariant that is a tuple.
17553  *
17554  * Sets the body @message. As a side-effect the
17555  * %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the
17556  * type string of @body (or cleared if @body is %NULL).
17557  * If @body is floating, @message assumes ownership of @body.
17558  *
17559  * Since: 2.26
17560  */
17561
17562
17563 /**
17564  * g_dbus_message_set_byte_order:
17565  * @message: A #GDBusMessage.
17566  * @byte_order: The byte order.
17567  *
17568  * Sets the byte order of @message.
17569  */
17570
17571
17572 /**
17573  * g_dbus_message_set_destination:
17574  * @message: A #GDBusMessage.
17575  * @value: The value to set.
17576  *
17577  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
17578  *
17579  * Since: 2.26
17580  */
17581
17582
17583 /**
17584  * g_dbus_message_set_error_name:
17585  * @message: A #GDBusMessage.
17586  * @value: The value to set.
17587  *
17588  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
17589  *
17590  * Since: 2.26
17591  */
17592
17593
17594 /**
17595  * g_dbus_message_set_flags:
17596  * @message: A #GDBusMessage.
17597  * @flags: Flags for @message that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
17598  *
17599  * Sets the flags to set on @message.
17600  *
17601  * Since: 2.26
17602  */
17603
17604
17605 /**
17606  * g_dbus_message_set_header:
17607  * @message: A #GDBusMessage.
17608  * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
17609  * @value: A #GVariant to set the header field or %NULL to clear the header field.
17610  *
17611  * Sets a header field on @message.
17612  * If @value is floating, @message assumes ownership of @value.
17613  *
17614  * Since: 2.26
17615  */
17616
17617
17618 /**
17619  * g_dbus_message_set_interface:
17620  * @message: A #GDBusMessage.
17621  * @value: The value to set.
17622  *
17623  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
17624  *
17625  * Since: 2.26
17626  */
17627
17628
17629 /**
17630  * g_dbus_message_set_member:
17631  * @message: A #GDBusMessage.
17632  * @value: The value to set.
17633  *
17634  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
17635  *
17636  * Since: 2.26
17637  */
17638
17639
17640 /**
17641  * g_dbus_message_set_message_type:
17642  * @message: A #GDBusMessage.
17643  * @type: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
17644  *
17645  * Sets @message to be of @type.
17646  *
17647  * Since: 2.26
17648  */
17649
17650
17651 /**
17652  * g_dbus_message_set_num_unix_fds:
17653  * @message: A #GDBusMessage.
17654  * @value: The value to set.
17655  *
17656  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
17657  *
17658  * Since: 2.26
17659  */
17660
17661
17662 /**
17663  * g_dbus_message_set_path:
17664  * @message: A #GDBusMessage.
17665  * @value: The value to set.
17666  *
17667  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
17668  *
17669  * Since: 2.26
17670  */
17671
17672
17673 /**
17674  * g_dbus_message_set_reply_serial:
17675  * @message: A #GDBusMessage.
17676  * @value: The value to set.
17677  *
17678  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
17679  *
17680  * Since: 2.26
17681  */
17682
17683
17684 /**
17685  * g_dbus_message_set_sender:
17686  * @message: A #GDBusMessage.
17687  * @value: The value to set.
17688  *
17689  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
17690  *
17691  * Since: 2.26
17692  */
17693
17694
17695 /**
17696  * g_dbus_message_set_serial:
17697  * @message: A #GDBusMessage.
17698  * @serial: A #guint32.
17699  *
17700  * Sets the serial for @message.
17701  *
17702  * Since: 2.26
17703  */
17704
17705
17706 /**
17707  * g_dbus_message_set_signature:
17708  * @message: A #GDBusMessage.
17709  * @value: The value to set.
17710  *
17711  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
17712  *
17713  * Since: 2.26
17714  */
17715
17716
17717 /**
17718  * g_dbus_message_set_unix_fd_list:
17719  * @message: A #GDBusMessage.
17720  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
17721  *
17722  * Sets the UNIX file descriptors associated with @message. As a
17723  * side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header
17724  * field is set to the number of fds in @fd_list (or cleared if
17725  * This method is only available on UNIX.
17726  *
17727  * Since: 2.26
17728  */
17729
17730
17731 /**
17732  * g_dbus_message_to_blob:
17733  * @message: A #GDBusMessage.
17734  * @out_size: Return location for size of generated blob.
17735  * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
17736  * @error: Return location for error.
17737  *
17738  * Serializes @message to a blob. The byte order returned by
17739  * g_dbus_message_get_byte_order() will be used.
17740  * generated by @message or %NULL if @error is set. Free with g_free().
17741  *
17742  * Returns: A pointer to a valid binary D-Bus message of @out_size bytes
17743  * Since: 2.26
17744  */
17745
17746
17747 /**
17748  * g_dbus_message_to_gerror:
17749  * @message: A #GDBusMessage.
17750  * @error: The #GError to set.
17751  *
17752  * If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does
17753  * nothing and returns %FALSE.
17754  * Otherwise this method encodes the error in @message as a #GError
17755  * using g_dbus_error_set_dbus_error() using the information in the
17756  * %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as
17757  * well as the first string item in @message's body.
17758  *
17759  * Returns: %TRUE if @error was set, %FALSE otherwise.
17760  * Since: 2.26
17761  */
17762
17763
17764 /**
17765  * g_dbus_method_info_ref:
17766  * @info: A #GDBusMethodInfo
17767  *
17768  * If @info is statically allocated does nothing. Otherwise increases
17769  * the reference count.
17770  *
17771  * Returns: The same @info.
17772  * Since: 2.26
17773  */
17774
17775
17776 /**
17777  * g_dbus_method_info_unref:
17778  * @info: A #GDBusMethodInfo.
17779  *
17780  * If @info is statically allocated, does nothing. Otherwise decreases
17781  * the reference count of @info. When its reference count drops to 0,
17782  * the memory used is freed.
17783  *
17784  * Since: 2.26
17785  */
17786
17787
17788 /**
17789  * g_dbus_method_invocation_get_connection:
17790  * @invocation: A #GDBusMethodInvocation.
17791  *
17792  * Gets the #GDBusConnection the method was invoked on.
17793  *
17794  * Returns: (transfer none): A #GDBusConnection. Do not free, it is owned by @invocation.
17795  * Since: 2.26
17796  */
17797
17798
17799 /**
17800  * g_dbus_method_invocation_get_interface_name:
17801  * @invocation: A #GDBusMethodInvocation.
17802  *
17803  * Gets the name of the D-Bus interface the method was invoked on.
17804  *
17805  * Returns: A string. Do not free, it is owned by @invocation.
17806  * Since: 2.26
17807  */
17808
17809
17810 /**
17811  * g_dbus_method_invocation_get_message:
17812  * @invocation: A #GDBusMethodInvocation.
17813  *
17814  * Gets the #GDBusMessage for the method invocation. This is useful if
17815  * you need to use low-level protocol features, such as UNIX file
17816  * descriptor passing, that cannot be properly expressed in the
17817  * #GVariant API.
17818  * See <xref linkend="gdbus-server"/> and <xref
17819  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17820  * low-level API to send and receive UNIX file descriptors.
17821  *
17822  * Returns: (transfer none): #GDBusMessage. Do not free, it is owned by @invocation.
17823  * Since: 2.26
17824  */
17825
17826
17827 /**
17828  * g_dbus_method_invocation_get_method_info:
17829  * @invocation: A #GDBusMethodInvocation.
17830  *
17831  * Gets information about the method call, if any.
17832  *
17833  * Returns: A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation.
17834  * Since: 2.26
17835  */
17836
17837
17838 /**
17839  * g_dbus_method_invocation_get_method_name:
17840  * @invocation: A #GDBusMethodInvocation.
17841  *
17842  * Gets the name of the method that was invoked.
17843  *
17844  * Returns: A string. Do not free, it is owned by @invocation.
17845  * Since: 2.26
17846  */
17847
17848
17849 /**
17850  * g_dbus_method_invocation_get_object_path:
17851  * @invocation: A #GDBusMethodInvocation.
17852  *
17853  * Gets the object path the method was invoked on.
17854  *
17855  * Returns: A string. Do not free, it is owned by @invocation.
17856  * Since: 2.26
17857  */
17858
17859
17860 /**
17861  * g_dbus_method_invocation_get_parameters:
17862  * @invocation: A #GDBusMethodInvocation.
17863  *
17864  * Gets the parameters of the method invocation.
17865  *
17866  * Returns: A #GVariant. Do not free, it is owned by @invocation.
17867  * Since: 2.26
17868  */
17869
17870
17871 /**
17872  * g_dbus_method_invocation_get_sender:
17873  * @invocation: A #GDBusMethodInvocation.
17874  *
17875  * Gets the bus name that invoked the method.
17876  *
17877  * Returns: A string. Do not free, it is owned by @invocation.
17878  * Since: 2.26
17879  */
17880
17881
17882 /**
17883  * g_dbus_method_invocation_get_user_data: (skip)
17884  * @invocation: A #GDBusMethodInvocation.
17885  *
17886  * Gets the @user_data #gpointer passed to g_dbus_connection_register_object().
17887  *
17888  * Returns: A #gpointer.
17889  * Since: 2.26
17890  */
17891
17892
17893 /**
17894  * g_dbus_method_invocation_return_dbus_error:
17895  * @invocation: A #GDBusMethodInvocation.
17896  * @error_name: A valid D-Bus error name.
17897  * @error_message: A valid D-Bus error message.
17898  *
17899  * Finishes handling a D-Bus method call by returning an error.
17900  * This method will free @invocation, you cannot use it afterwards.
17901  *
17902  * Since: 2.26
17903  */
17904
17905
17906 /**
17907  * g_dbus_method_invocation_return_error:
17908  * @invocation: A #GDBusMethodInvocation.
17909  * @domain: A #GQuark for the #GError error domain.
17910  * @code: The error code.
17911  * @format: printf()-style format.
17912  * @...: Parameters for @format.
17913  *
17914  * Finishes handling a D-Bus method call by returning an error.
17915  * See g_dbus_error_encode_gerror() for details about what error name
17916  * will be returned on the wire. In a nutshell, if the given error is
17917  * registered using g_dbus_error_register_error() the name given
17918  * during registration is used. Otherwise, a name of the form
17919  * <literal>org.gtk.GDBus.UnmappedGError.Quark...</literal> is
17920  * used. This provides transparent mapping of #GError between
17921  * applications using GDBus.
17922  * If you are writing an application intended to be portable,
17923  * <emphasis>always</emphasis> register errors with g_dbus_error_register_error()
17924  * or use g_dbus_method_invocation_return_dbus_error().
17925  * This method will free @invocation, you cannot use it afterwards.
17926  *
17927  * Since: 2.26
17928  */
17929
17930
17931 /**
17932  * g_dbus_method_invocation_return_error_literal:
17933  * @invocation: A #GDBusMethodInvocation.
17934  * @domain: A #GQuark for the #GError error domain.
17935  * @code: The error code.
17936  * @message: The error message.
17937  *
17938  * Like g_dbus_method_invocation_return_error() but without printf()-style formatting.
17939  * This method will free @invocation, you cannot use it afterwards.
17940  *
17941  * Since: 2.26
17942  */
17943
17944
17945 /**
17946  * g_dbus_method_invocation_return_error_valist:
17947  * @invocation: A #GDBusMethodInvocation.
17948  * @domain: A #GQuark for the #GError error domain.
17949  * @code: The error code.
17950  * @format: printf()-style format.
17951  * @var_args: #va_list of parameters for @format.
17952  *
17953  * Like g_dbus_method_invocation_return_error() but intended for
17954  * language bindings.
17955  * This method will free @invocation, you cannot use it afterwards.
17956  *
17957  * Since: 2.26
17958  */
17959
17960
17961 /**
17962  * g_dbus_method_invocation_return_gerror:
17963  * @invocation: A #GDBusMethodInvocation.
17964  * @error: A #GError.
17965  *
17966  * Like g_dbus_method_invocation_return_error() but takes a #GError
17967  * instead of the error domain, error code and message.
17968  * This method will free @invocation, you cannot use it afterwards.
17969  *
17970  * Since: 2.26
17971  */
17972
17973
17974 /**
17975  * g_dbus_method_invocation_return_value:
17976  * @invocation: A #GDBusMethodInvocation.
17977  * @parameters: A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
17978  *
17979  * Finishes handling a D-Bus method call by returning @parameters.
17980  * If the @parameters GVariant is floating, it is consumed.
17981  * It is an error if @parameters is not of the right format.
17982  * This method will free @invocation, you cannot use it afterwards.
17983  *
17984  * Since: 2.26
17985  */
17986
17987
17988 /**
17989  * g_dbus_node_info_generate_xml:
17990  * @info: A #GDBusNodeInfo.
17991  * @indent: Indentation level.
17992  * @string_builder: A #GString to to append XML data to.
17993  *
17994  * Appends an XML representation of @info (and its children) to @string_builder.
17995  * This function is typically used for generating introspection XML documents at run-time for
17996  * handling the <literal>org.freedesktop.DBus.Introspectable.Introspect</literal> method.
17997  *
17998  * Since: 2.26
17999  */
18000
18001
18002 /**
18003  * g_dbus_node_info_lookup_interface:
18004  * @info: A #GDBusNodeInfo.
18005  * @name: A D-Bus interface name.
18006  *
18007  * Looks up information about an interface.
18008  * This cost of this function is O(n) in number of interfaces.
18009  *
18010  * Returns: A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info.
18011  * Since: 2.26
18012  */
18013
18014
18015 /**
18016  * g_dbus_node_info_new_for_xml:
18017  * @xml_data: Valid D-Bus introspection XML.
18018  * @error: Return location for error.
18019  *
18020  * Parses @xml_data and returns a #GDBusNodeInfo representing the data.
18021  * with g_dbus_node_info_unref().
18022  *
18023  * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free
18024  * Since: 2.26
18025  */
18026
18027
18028 /**
18029  * g_dbus_node_info_ref:
18030  * @info: A #GDBusNodeInfo
18031  *
18032  * If @info is statically allocated does nothing. Otherwise increases
18033  * the reference count.
18034  *
18035  * Returns: The same @info.
18036  * Since: 2.26
18037  */
18038
18039
18040 /**
18041  * g_dbus_node_info_unref:
18042  * @info: A #GDBusNodeInfo.
18043  *
18044  * If @info is statically allocated, does nothing. Otherwise decreases
18045  * the reference count of @info. When its reference count drops to 0,
18046  * the memory used is freed.
18047  *
18048  * Since: 2.26
18049  */
18050
18051
18052 /**
18053  * g_dbus_property_info_ref:
18054  * @info: A #GDBusPropertyInfo
18055  *
18056  * If @info is statically allocated does nothing. Otherwise increases
18057  * the reference count.
18058  *
18059  * Returns: The same @info.
18060  * Since: 2.26
18061  */
18062
18063
18064 /**
18065  * g_dbus_property_info_unref:
18066  * @info: A #GDBusPropertyInfo.
18067  *
18068  * If @info is statically allocated, does nothing. Otherwise decreases
18069  * the reference count of @info. When its reference count drops to 0,
18070  * the memory used is freed.
18071  *
18072  * Since: 2.26
18073  */
18074
18075
18076 /**
18077  * g_dbus_proxy_call:
18078  * @proxy: A #GDBusProxy.
18079  * @method_name: Name of method to invoke.
18080  * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
18081  * @flags: Flags from the #GDBusCallFlags enumeration.
18082  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
18083  * @cancellable: A #GCancellable or %NULL.
18084  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
18085  * @user_data: The data to pass to @callback.
18086  *
18087  * Asynchronously invokes the @method_name method on @proxy.
18088  * If @method_name contains any dots, then @name is split into interface and
18089  * method name parts. This allows using @proxy for invoking methods on
18090  * other interfaces.
18091  * If the #GDBusConnection associated with @proxy is closed then
18092  * the operation will fail with %G_IO_ERROR_CLOSED. If
18093  * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
18094  * compatible with the D-Bus protocol, the operation fails with
18095  * %G_IO_ERROR_INVALID_ARGUMENT.
18096  * If the @parameters #GVariant is floating, it is consumed. This allows
18097  * convenient 'inline' use of g_variant_new(), e.g.:
18098  * |[
18099  * g_dbus_proxy_call (proxy,
18100  * "TwoStrings",
18101  * g_variant_new ("(ss)",
18102  * "Thing One",
18103  * "Thing Two"),
18104  * G_DBUS_CALL_FLAGS_NONE,
18105  * -1,
18106  * NULL,
18107  * (GAsyncReadyCallback) two_strings_done,
18108  * &amp;data);
18109  * ]|
18110  * This is an asynchronous method. When the operation is finished,
18111  * <link linkend="g-main-context-push-thread-default">thread-default
18112  * main loop</link> of the thread you are calling this method from.
18113  * You can then call g_dbus_proxy_call_finish() to get the result of
18114  * the operation. See g_dbus_proxy_call_sync() for the synchronous
18115  * version of this method.
18116  *
18117  * Since: 2.26
18118  */
18119
18120
18121 /**
18122  * g_dbus_proxy_call_finish:
18123  * @proxy: A #GDBusProxy.
18124  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call().
18125  * @error: Return location for error or %NULL.
18126  *
18127  * Finishes an operation started with g_dbus_proxy_call().
18128  * return values. Free with g_variant_unref().
18129  *
18130  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
18131  * Since: 2.26
18132  */
18133
18134
18135 /**
18136  * g_dbus_proxy_call_sync:
18137  * @proxy: A #GDBusProxy.
18138  * @method_name: Name of method to invoke.
18139  * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
18140  * @flags: Flags from the #GDBusCallFlags enumeration.
18141  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
18142  * @cancellable: A #GCancellable or %NULL.
18143  * @error: Return location for error or %NULL.
18144  *
18145  * Synchronously invokes the @method_name method on @proxy.
18146  * If @method_name contains any dots, then @name is split into interface and
18147  * method name parts. This allows using @proxy for invoking methods on
18148  * other interfaces.
18149  * If the #GDBusConnection associated with @proxy is disconnected then
18150  * the operation will fail with %G_IO_ERROR_CLOSED. If
18151  * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
18152  * compatible with the D-Bus protocol, the operation fails with
18153  * %G_IO_ERROR_INVALID_ARGUMENT.
18154  * If the @parameters #GVariant is floating, it is consumed. This allows
18155  * convenient 'inline' use of g_variant_new(), e.g.:
18156  * |[
18157  * g_dbus_proxy_call_sync (proxy,
18158  * "TwoStrings",
18159  * g_variant_new ("(ss)",
18160  * "Thing One",
18161  * "Thing Two"),
18162  * G_DBUS_CALL_FLAGS_NONE,
18163  * -1,
18164  * NULL,
18165  * &amp;error);
18166  * ]|
18167  * The calling thread is blocked until a reply is received. See
18168  * g_dbus_proxy_call() for the asynchronous version of this
18169  * method.
18170  * return values. Free with g_variant_unref().
18171  *
18172  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
18173  * Since: 2.26
18174  */
18175
18176
18177 /**
18178  * g_dbus_proxy_get_cached_property:
18179  * @proxy: A #GDBusProxy.
18180  * @property_name: Property name.
18181  *
18182  * Looks up the value for a property from the cache. This call does no
18183  * blocking IO.
18184  * If @proxy has an expected interface (see
18185  * #GDBusProxy:g-interface-info), then @property_name (for existence)
18186  * is checked against it.
18187  * for @property_name or %NULL if the value is not in the cache. The
18188  * returned reference must be freed with g_variant_unref().
18189  *
18190  * Returns: A reference to the #GVariant instance that holds the value
18191  * Since: 2.26
18192  */
18193
18194
18195 /**
18196  * g_dbus_proxy_get_cached_property_names:
18197  * @proxy: A #GDBusProxy.
18198  *
18199  * Gets the names of all cached properties on @proxy.
18200  * no cached properties. Free the returned array with g_strfreev().
18201  *
18202  * Returns: A %NULL-terminated array of strings or %NULL if @proxy has
18203  * Since: 2.26
18204  */
18205
18206
18207 /**
18208  * g_dbus_proxy_get_connection:
18209  * @proxy: A #GDBusProxy.
18210  *
18211  * Gets the connection @proxy is for.
18212  *
18213  * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free.
18214  * Since: 2.26
18215  */
18216
18217
18218 /**
18219  * g_dbus_proxy_get_default_timeout:
18220  * @proxy: A #GDBusProxy.
18221  *
18222  * Gets the timeout to use if -1 (specifying default timeout) is
18223  * passed as @timeout_msec in the g_dbus_proxy_call() and
18224  * g_dbus_proxy_call_sync() functions.
18225  * See the #GDBusProxy:g-default-timeout property for more details.
18226  *
18227  * Returns: Timeout to use for @proxy.
18228  * Since: 2.26
18229  */
18230
18231
18232 /**
18233  * g_dbus_proxy_get_flags:
18234  * @proxy: A #GDBusProxy.
18235  *
18236  * Gets the flags that @proxy was constructed with.
18237  *
18238  * Returns: Flags from the #GDBusProxyFlags enumeration.
18239  * Since: 2.26
18240  */
18241
18242
18243 /**
18244  * g_dbus_proxy_get_interface_info:
18245  * @proxy: A #GDBusProxy
18246  *
18247  * Returns the #GDBusInterfaceInfo, if any, specifying the minimal
18248  * interface that @proxy conforms to.
18249  * See the #GDBusProxy:g-interface-info property for more details.
18250  * object, it is owned by @proxy.
18251  *
18252  * Returns: A #GDBusInterfaceInfo or %NULL. Do not unref the returned
18253  * Since: 2.26
18254  */
18255
18256
18257 /**
18258  * g_dbus_proxy_get_interface_name:
18259  * @proxy: A #GDBusProxy.
18260  *
18261  * Gets the D-Bus interface name @proxy is for.
18262  *
18263  * Returns: A string owned by @proxy. Do not free.
18264  * Since: 2.26
18265  */
18266
18267
18268 /**
18269  * g_dbus_proxy_get_name:
18270  * @proxy: A #GDBusProxy.
18271  *
18272  * Gets the name that @proxy was constructed for.
18273  *
18274  * Returns: A string owned by @proxy. Do not free.
18275  * Since: 2.26
18276  */
18277
18278
18279 /**
18280  * g_dbus_proxy_get_name_owner:
18281  * @proxy: A #GDBusProxy.
18282  *
18283  * The unique name that owns the name that @proxy is for or %NULL if
18284  * no-one currently owns that name. You may connect to the
18285  * #GObject::notify signal to track changes to the
18286  * #GDBusProxy:g-name-owner property.
18287  *
18288  * Returns: The name owner or %NULL if no name owner exists. Free with g_free().
18289  * Since: 2.26
18290  */
18291
18292
18293 /**
18294  * g_dbus_proxy_get_object_path:
18295  * @proxy: A #GDBusProxy.
18296  *
18297  * Gets the object path @proxy is for.
18298  *
18299  * Returns: A string owned by @proxy. Do not free.
18300  * Since: 2.26
18301  */
18302
18303
18304 /**
18305  * g_dbus_proxy_new:
18306  * @connection: A #GDBusConnection.
18307  * @flags: Flags used when constructing the proxy.
18308  * @info: A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18309  * @name: A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
18310  * @object_path: An object path.
18311  * @interface_name: A D-Bus interface name.
18312  * @cancellable: A #GCancellable or %NULL.
18313  * @callback: Callback function to invoke when the proxy is ready.
18314  * @user_data: User data to pass to @callback.
18315  *
18316  * Creates a proxy for accessing @interface_name on the remote object
18317  * at @object_path owned by @name at @connection and asynchronously
18318  * loads D-Bus properties unless the
18319  * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to
18320  * the #GDBusProxy::g-properties-changed signal to get notified about
18321  * property changes.
18322  * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
18323  * match rules for signals. Connect to the #GDBusProxy::g-signal signal
18324  * to handle signals from the remote object.
18325  * If @name is a well-known name and the
18326  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
18327  * owner currently exists, the message bus will be requested to launch
18328  * a name owner for the name.
18329  * This is a failable asynchronous constructor - when the proxy is
18330  * ready, @callback will be invoked and you can use
18331  * g_dbus_proxy_new_finish() to get the result.
18332  * See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.
18333  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18334  *
18335  * Since: 2.26
18336  */
18337
18338
18339 /**
18340  * g_dbus_proxy_new_finish:
18341  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new().
18342  * @error: Return location for error or %NULL.
18343  *
18344  * Finishes creating a #GDBusProxy.
18345  *
18346  * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
18347  * Since: 2.26
18348  */
18349
18350
18351 /**
18352  * g_dbus_proxy_new_for_bus:
18353  * @bus_type: A #GBusType.
18354  * @flags: Flags used when constructing the proxy.
18355  * @info: A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18356  * @name: A bus name (well-known or unique).
18357  * @object_path: An object path.
18358  * @interface_name: A D-Bus interface name.
18359  * @cancellable: A #GCancellable or %NULL.
18360  * @callback: Callback function to invoke when the proxy is ready.
18361  * @user_data: User data to pass to @callback.
18362  *
18363  * Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
18364  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18365  *
18366  * Since: 2.26
18367  */
18368
18369
18370 /**
18371  * g_dbus_proxy_new_for_bus_finish:
18372  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus().
18373  * @error: Return location for error or %NULL.
18374  *
18375  * Finishes creating a #GDBusProxy.
18376  *
18377  * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
18378  * Since: 2.26
18379  */
18380
18381
18382 /**
18383  * g_dbus_proxy_new_for_bus_sync:
18384  * @bus_type: A #GBusType.
18385  * @flags: Flags used when constructing the proxy.
18386  * @info: A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18387  * @name: A bus name (well-known or unique).
18388  * @object_path: An object path.
18389  * @interface_name: A D-Bus interface name.
18390  * @cancellable: A #GCancellable or %NULL.
18391  * @error: Return location for error or %NULL.
18392  *
18393  * Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
18394  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18395  *
18396  * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
18397  * Since: 2.26
18398  */
18399
18400
18401 /**
18402  * g_dbus_proxy_new_sync:
18403  * @connection: A #GDBusConnection.
18404  * @flags: Flags used when constructing the proxy.
18405  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18406  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
18407  * @object_path: An object path.
18408  * @interface_name: A D-Bus interface name.
18409  * @cancellable: (allow-none): A #GCancellable or %NULL.
18410  * @error: (allow-none): Return location for error or %NULL.
18411  *
18412  * Creates a proxy for accessing @interface_name on the remote object
18413  * at @object_path owned by @name at @connection and synchronously
18414  * loads D-Bus properties unless the
18415  * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.
18416  * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
18417  * match rules for signals. Connect to the #GDBusProxy::g-signal signal
18418  * to handle signals from the remote object.
18419  * If @name is a well-known name and the
18420  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
18421  * owner currently exists, the message bus will be requested to launch
18422  * a name owner for the name.
18423  * This is a synchronous failable constructor. See g_dbus_proxy_new()
18424  * and g_dbus_proxy_new_finish() for the asynchronous version.
18425  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18426  *
18427  * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
18428  * Since: 2.26
18429  */
18430
18431
18432 /**
18433  * g_dbus_proxy_set_cached_property:
18434  * @proxy: A #GDBusProxy
18435  * @property_name: Property name.
18436  * @value: Value for the property or %NULL to remove it from the cache.
18437  *
18438  * If @value is not %NULL, sets the cached value for the property with
18439  * name @property_name to the value in @value.
18440  * If @value is %NULL, then the cached value is removed from the
18441  * property cache.
18442  * If @proxy has an expected interface (see
18443  * #GDBusProxy:g-interface-info), then @property_name (for existence)
18444  * and @value (for the type) is checked against it.
18445  * If the @value #GVariant is floating, it is consumed. This allows
18446  * convenient 'inline' use of g_variant_new(), e.g.
18447  * |[
18448  * g_dbus_proxy_set_cached_property (proxy,
18449  * "SomeProperty",
18450  * g_variant_new ("(si)",
18451  * "A String",
18452  * 42));
18453  * ]|
18454  * Normally you will not need to use this method since @proxy is
18455  * tracking changes using the
18456  * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
18457  * D-Bus signal. However, for performance reasons an object may decide
18458  * to not use this signal for some properties and instead use a
18459  * proprietary out-of-band mechanism to transmit changes.
18460  * As a concrete example, consider an object with a property
18461  * <literal>ChatroomParticipants</literal> which is an array of
18462  * strings. Instead of transmitting the same (long) array every time
18463  * the property changes, it is more efficient to only transmit the
18464  * delta using e.g. signals <literal>ChatroomParticipantJoined(String
18465  * name)</literal> and <literal>ChatroomParticipantParted(String
18466  * name)</literal>.
18467  *
18468  * Since: 2.26
18469  */
18470
18471
18472 /**
18473  * g_dbus_proxy_set_default_timeout:
18474  * @proxy: A #GDBusProxy.
18475  * @timeout_msec: Timeout in milliseconds.
18476  *
18477  * Sets the timeout to use if -1 (specifying default timeout) is
18478  * passed as @timeout_msec in the g_dbus_proxy_call() and
18479  * g_dbus_proxy_call_sync() functions.
18480  * See the #GDBusProxy:g-default-timeout property for more details.
18481  *
18482  * Since: 2.26
18483  */
18484
18485
18486 /**
18487  * g_dbus_proxy_set_interface_info:
18488  * @proxy: A #GDBusProxy
18489  * @info: Minimum interface this proxy conforms to or %NULL to unset.
18490  *
18491  * Ensure that interactions with @proxy conform to the given
18492  * interface.  For example, when completing a method call, if the type
18493  * signature of the message isn't what's expected, the given #GError
18494  * is set.  Signals that have a type signature mismatch are simply
18495  * dropped.
18496  * See the #GDBusProxy:g-interface-info property for more details.
18497  *
18498  * Since: 2.26
18499  */
18500
18501
18502 /**
18503  * g_dbus_server_get_client_address:
18504  * @server: A #GDBusServer.
18505  *
18506  * Gets a D-Bus address string that can be used by clients to connect
18507  * to @server.
18508  * by @server.
18509  *
18510  * Returns: A D-Bus address string. Do not free, the string is owned
18511  * Since: 2.26
18512  */
18513
18514
18515 /**
18516  * g_dbus_server_get_flags:
18517  * @server: A #GDBusServer.
18518  *
18519  * Gets the flags for @server.
18520  *
18521  * Returns: A set of flags from the #GDBusServerFlags enumeration.
18522  * Since: 2.26
18523  */
18524
18525
18526 /**
18527  * g_dbus_server_get_guid:
18528  * @server: A #GDBusServer.
18529  *
18530  * Gets the GUID for @server.
18531  *
18532  * Returns: A D-Bus GUID. Do not free this string, it is owned by @server.
18533  * Since: 2.26
18534  */
18535
18536
18537 /**
18538  * g_dbus_server_is_active:
18539  * @server: A #GDBusServer.
18540  *
18541  * Gets whether @server is active.
18542  *
18543  * Returns: %TRUE if server is active, %FALSE otherwise.
18544  * Since: 2.26
18545  */
18546
18547
18548 /**
18549  * g_dbus_server_new_sync:
18550  * @address: A D-Bus address.
18551  * @flags: Flags from the #GDBusServerFlags enumeration.
18552  * @guid: A D-Bus GUID.
18553  * @observer: A #GDBusAuthObserver or %NULL.
18554  * @cancellable: A #GCancellable or %NULL.
18555  * @error: Return location for server or %NULL.
18556  *
18557  * Creates a new D-Bus server that listens on the first address in
18558  * Once constructed, you can use g_dbus_server_get_client_address() to
18559  * get a D-Bus address string that clients can use to connect.
18560  * Connect to the #GDBusServer::new-connection signal to handle
18561  * incoming connections.
18562  * The returned #GDBusServer isn't active - you have to start it with
18563  * g_dbus_server_start().
18564  * See <xref linkend="gdbus-peer-to-peer"/> for how #GDBusServer can
18565  * be used.
18566  * This is a synchronous failable constructor. See
18567  * g_dbus_server_new() for the asynchronous version.
18568  * g_object_unref().
18569  *
18570  * Returns: A #GDBusServer or %NULL if @error is set. Free with
18571  * Since: 2.26
18572  */
18573
18574
18575 /**
18576  * g_dbus_server_start:
18577  * @server: A #GDBusServer.
18578  *
18579  * Starts @server.
18580  *
18581  * Since: 2.26
18582  */
18583
18584
18585 /**
18586  * g_dbus_server_stop:
18587  * @server: A #GDBusServer.
18588  *
18589  * Stops @server.
18590  *
18591  * Since: 2.26
18592  */
18593
18594
18595 /**
18596  * g_dbus_signal_info_ref:
18597  * @info: A #GDBusSignalInfo
18598  *
18599  * If @info is statically allocated does nothing. Otherwise increases
18600  * the reference count.
18601  *
18602  * Returns: The same @info.
18603  * Since: 2.26
18604  */
18605
18606
18607 /**
18608  * g_dbus_signal_info_unref:
18609  * @info: A #GDBusSignalInfo.
18610  *
18611  * If @info is statically allocated, does nothing. Otherwise decreases
18612  * the reference count of @info. When its reference count drops to 0,
18613  * the memory used is freed.
18614  *
18615  * Since: 2.26
18616  */
18617
18618
18619 /**
18620  * g_desktop_app_info_get_filename:
18621  * @info: a #GDesktopAppInfo
18622  *
18623  * When @info was created from a known filename, return it.  In some
18624  * situations such as the #GDesktopAppInfo returned from
18625  * g_desktop_app_info_new_from_keyfile(), this function will return %NULL.
18626  *
18627  * Returns: The full path to the file for @info, or %NULL if not known.
18628  * Since: 2.24
18629  */
18630
18631
18632 /**
18633  * g_desktop_app_info_get_is_hidden:
18634  * @info: a #GDesktopAppInfo.
18635  *
18636  * A desktop file is hidden if the Hidden key in it is
18637  * set to True.
18638  *
18639  * Returns: %TRUE if hidden, %FALSE otherwise.
18640  */
18641
18642
18643 /**
18644  * g_desktop_app_info_launch_uris_as_manager:
18645  * @appinfo: a #GDesktopAppInfo
18646  * @uris: (element-type utf8): List of URIs
18647  * @launch_context: a #GAppLaunchContext
18648  * @spawn_flags: #GSpawnFlags, used for each process
18649  * @user_setup: (scope call): a #GSpawnChildSetupFunc, used once for each process.
18650  * @user_setup_data: (closure user_setup): User data for @user_setup
18651  * @pid_callback: (scope call): Callback for child processes
18652  * @pid_callback_data: (closure pid_callback): User data for @callback
18653  * @error: a #GError
18654  *
18655  * This function performs the equivalent of g_app_info_launch_uris(),
18656  * but is intended primarily for operating system components that
18657  * launch applications.  Ordinary applications should use
18658  * g_app_info_launch_uris().
18659  * In contrast to g_app_info_launch_uris(), all processes created will
18660  * always be run directly as children as if by the UNIX fork()/exec()
18661  * calls.
18662  * This guarantee allows additional control over the exact environment
18663  * of the child processes, which is provided via a setup function
18664  * semantics of the @setup function.
18665  */
18666
18667
18668 /**
18669  * g_desktop_app_info_lookup_get_default_for_uri_scheme:
18670  * @lookup: a #GDesktopAppInfoLookup
18671  * @uri_scheme: a string containing a URI scheme.
18672  *
18673  * Gets the default application for launching applications
18674  * using this URI scheme for a particular GDesktopAppInfoLookup
18675  * implementation.
18676  * The GDesktopAppInfoLookup interface and this function is used
18677  * to implement g_app_info_get_default_for_uri_scheme() backends
18678  * in a GIO module. There is no reason for applications to use it
18679  * directly. Applications should use g_app_info_get_default_for_uri_scheme().
18680  *
18681  * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
18682  * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
18683  */
18684
18685
18686 /**
18687  * g_desktop_app_info_new:
18688  * @desktop_id: the desktop file id
18689  *
18690  * Creates a new #GDesktopAppInfo based on a desktop file id.
18691  * A desktop file id is the basename of the desktop file, including the
18692  * .desktop extension. GIO is looking for a desktop file with this name
18693  * in the <filename>applications</filename> subdirectories of the XDG data
18694  * directories (i.e. the directories specified in the
18695  * <envar>XDG_DATA_HOME</envar> and <envar>XDG_DATA_DIRS</envar> environment
18696  * variables). GIO also supports the prefix-to-subdirectory mapping that is
18697  * described in the <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Menu Spec</ulink>
18698  * (i.e. a desktop id of kde-foo.desktop will match
18699  * <filename>/usr/share/applications/kde/foo.desktop</filename>).
18700  *
18701  * Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id
18702  */
18703
18704
18705 /**
18706  * g_desktop_app_info_new_from_filename:
18707  * @filename: the path of a desktop file, in the GLib filename encoding
18708  *
18709  * Creates a new #GDesktopAppInfo.
18710  *
18711  * Returns: a new #GDesktopAppInfo or %NULL on error.
18712  */
18713
18714
18715 /**
18716  * g_desktop_app_info_new_from_keyfile:
18717  * @key_file: an opened #GKeyFile
18718  *
18719  * Creates a new #GDesktopAppInfo.
18720  *
18721  * Returns: a new #GDesktopAppInfo or %NULL on error.
18722  * Since: 2.18
18723  */
18724
18725
18726 /**
18727  * g_desktop_app_info_set_desktop_env:
18728  * @desktop_env: a string specifying what desktop this is
18729  *
18730  * Sets the name of the desktop that the application is running in.
18731  * This is used by g_app_info_should_show() to evaluate the
18732  * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal>
18733  * desktop entry fields.
18734  * The <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Desktop
18735  * Menu specification</ulink> recognizes the following:
18736  * <simplelist>
18737  * <member>GNOME</member>
18738  * <member>KDE</member>
18739  * <member>ROX</member>
18740  * <member>XFCE</member>
18741  * <member>Old</member>
18742  * </simplelist>
18743  * Should be called only once; subsequent calls are ignored.
18744  */
18745
18746
18747 /**
18748  * g_drive_can_eject:
18749  * @drive: a #GDrive.
18750  *
18751  * Checks if a drive can be ejected.
18752  *
18753  * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise.
18754  */
18755
18756
18757 /**
18758  * g_drive_can_poll_for_media:
18759  * @drive: a #GDrive.
18760  *
18761  * Checks if a drive can be polled for media changes.
18762  * %FALSE otherwise.
18763  *
18764  * Returns: %TRUE if the @drive can be polled for media changes,
18765  */
18766
18767
18768 /**
18769  * g_drive_can_start:
18770  * @drive: a #GDrive.
18771  *
18772  * Checks if a drive can be started.
18773  *
18774  * Returns: %TRUE if the @drive can be started, %FALSE otherwise.
18775  * Since: 2.22
18776  */
18777
18778
18779 /**
18780  * g_drive_can_start_degraded:
18781  * @drive: a #GDrive.
18782  *
18783  * Checks if a drive can be started degraded.
18784  *
18785  * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise.
18786  * Since: 2.22
18787  */
18788
18789
18790 /**
18791  * g_drive_can_stop:
18792  * @drive: a #GDrive.
18793  *
18794  * Checks if a drive can be stopped.
18795  *
18796  * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise.
18797  * Since: 2.22
18798  */
18799
18800
18801 /**
18802  * g_drive_eject:
18803  * @drive: a #GDrive.
18804  * @flags: flags affecting the unmount if required for eject
18805  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18806  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
18807  * @user_data: user data to pass to @callback
18808  *
18809  * Asynchronously ejects a drive.
18810  * When the operation is finished, @callback will be called.
18811  * You can then call g_drive_eject_finish() to obtain the
18812  * result of the operation.
18813  *
18814  * Deprecated: 2.22: Use g_drive_eject_with_operation() instead.
18815  */
18816
18817
18818 /**
18819  * g_drive_eject_finish:
18820  * @drive: a #GDrive.
18821  * @result: a #GAsyncResult.
18822  * @error: a #GError, or %NULL
18823  *
18824  * Finishes ejecting a drive.
18825  * %FALSE otherwise.
18826  *
18827  * Returns: %TRUE if the drive has been ejected successfully,
18828  * Deprecated: 2.22: Use g_drive_eject_with_operation_finish() instead.
18829  */
18830
18831
18832 /**
18833  * g_drive_eject_with_operation:
18834  * @drive: a #GDrive.
18835  * @flags: flags affecting the unmount if required for eject
18836  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
18837  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18838  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
18839  * @user_data: user data passed to @callback.
18840  *
18841  * Ejects a drive. This is an asynchronous operation, and is
18842  * finished by calling g_drive_eject_with_operation_finish() with the @drive
18843  * and #GAsyncResult data returned in the @callback.
18844  *
18845  * Since: 2.22
18846  */
18847
18848
18849 /**
18850  * g_drive_eject_with_operation_finish:
18851  * @drive: a #GDrive.
18852  * @result: a #GAsyncResult.
18853  * @error: a #GError location to store the error occuring, or %NULL to ignore.
18854  *
18855  * Finishes ejecting a drive. If any errors occurred during the operation,
18856  *
18857  * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise.
18858  * Since: 2.22
18859  */
18860
18861
18862 /**
18863  * g_drive_enumerate_identifiers:
18864  * @drive: a #GDrive
18865  *
18866  * Gets the kinds of identifiers that @drive has.
18867  * Use g_drive_get_identifer() to obtain the identifiers
18868  * themselves.
18869  * array of strings containing kinds of identifiers. Use g_strfreev()
18870  * to free.
18871  *
18872  * Returns: (transfer full) (array zero-terminated=1): a %NULL-terminated
18873  */
18874
18875
18876 /**
18877  * g_drive_get_icon:
18878  * @drive: a #GDrive.
18879  *
18880  * Gets the icon for @drive.
18881  * Free the returned object with g_object_unref().
18882  *
18883  * Returns: (transfer full): #GIcon for the @drive.
18884  */
18885
18886
18887 /**
18888  * g_drive_get_identifier:
18889  * @drive: a #GDrive
18890  * @kind: the kind of identifier to return
18891  *
18892  * Gets the identifier of the given kind for @drive.
18893  * requested identfier, or %NULL if the #GDrive
18894  * doesn't have this kind of identifier.
18895  *
18896  * Returns: a newly allocated string containing the
18897  */
18898
18899
18900 /**
18901  * g_drive_get_name:
18902  * @drive: a #GDrive.
18903  *
18904  * Gets the name of @drive.
18905  * string should be freed when no longer needed.
18906  *
18907  * Returns: a string containing @drive's name. The returned
18908  */
18909
18910
18911 /**
18912  * g_drive_get_start_stop_type:
18913  * @drive: a #GDrive.
18914  *
18915  * Gets a hint about how a drive can be started/stopped.
18916  *
18917  * Returns: A value from the #GDriveStartStopType enumeration.
18918  * Since: 2.22
18919  */
18920
18921
18922 /**
18923  * g_drive_get_volumes:
18924  * @drive: a #GDrive.
18925  *
18926  * Get a list of mountable volumes for @drive.
18927  * The returned list should be freed with g_list_free(), after
18928  * its elements have been unreffed with g_object_unref().
18929  *
18930  * Returns: (element-type GVolume) (transfer full): #GList containing any #GVolume objects on the given @drive.
18931  */
18932
18933
18934 /**
18935  * g_drive_has_media:
18936  * @drive: a #GDrive.
18937  *
18938  * Checks if the @drive has media. Note that the OS may not be polling
18939  * the drive for media changes; see g_drive_is_media_check_automatic()
18940  * for more details.
18941  *
18942  * Returns: %TRUE if @drive has media, %FALSE otherwise.
18943  */
18944
18945
18946 /**
18947  * g_drive_has_volumes:
18948  * @drive: a #GDrive.
18949  *
18950  * Check if @drive has any mountable volumes.
18951  *
18952  * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise.
18953  */
18954
18955
18956 /**
18957  * g_drive_is_media_check_automatic:
18958  * @drive: a #GDrive.
18959  *
18960  * Checks if @drive is capabable of automatically detecting media changes.
18961  * media changes, %FALSE otherwise.
18962  *
18963  * Returns: %TRUE if the @drive is capabable of automatically detecting
18964  */
18965
18966
18967 /**
18968  * g_drive_is_media_removable:
18969  * @drive: a #GDrive.
18970  *
18971  * Checks if the @drive supports removable media.
18972  *
18973  * Returns: %TRUE if @drive supports removable media, %FALSE otherwise.
18974  */
18975
18976
18977 /**
18978  * g_drive_poll_for_media:
18979  * @drive: a #GDrive.
18980  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
18981  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
18982  * @user_data: user data to pass to @callback
18983  *
18984  * Asynchronously polls @drive to see if media has been inserted or removed.
18985  * When the operation is finished, @callback will be called.
18986  * You can then call g_drive_poll_for_media_finish() to obtain the
18987  * result of the operation.
18988  */
18989
18990
18991 /**
18992  * g_drive_poll_for_media_finish:
18993  * @drive: a #GDrive.
18994  * @result: a #GAsyncResult.
18995  * @error: a #GError, or %NULL
18996  *
18997  * Finishes an operation started with g_drive_poll_for_media() on a drive.
18998  * %FALSE otherwise.
18999  *
19000  * Returns: %TRUE if the drive has been poll_for_mediaed successfully,
19001  */
19002
19003
19004 /**
19005  * g_drive_start:
19006  * @drive: a #GDrive.
19007  * @flags: flags affecting the start operation.
19008  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
19009  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19010  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
19011  * @user_data: user data to pass to @callback
19012  *
19013  * Asynchronously starts a drive.
19014  * When the operation is finished, @callback will be called.
19015  * You can then call g_drive_start_finish() to obtain the
19016  * result of the operation.
19017  *
19018  * Since: 2.22
19019  */
19020
19021
19022 /**
19023  * g_drive_start_finish:
19024  * @drive: a #GDrive.
19025  * @result: a #GAsyncResult.
19026  * @error: a #GError, or %NULL
19027  *
19028  * Finishes starting a drive.
19029  * %FALSE otherwise.
19030  *
19031  * Returns: %TRUE if the drive has been started successfully,
19032  * Since: 2.22
19033  */
19034
19035
19036 /**
19037  * g_drive_stop:
19038  * @drive: a #GDrive.
19039  * @flags: flags affecting the unmount if required for stopping.
19040  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
19041  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19042  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
19043  * @user_data: user data to pass to @callback
19044  *
19045  * Asynchronously stops a drive.
19046  * When the operation is finished, @callback will be called.
19047  * You can then call g_drive_stop_finish() to obtain the
19048  * result of the operation.
19049  *
19050  * Since: 2.22
19051  */
19052
19053
19054 /**
19055  * g_drive_stop_finish:
19056  * @drive: a #GDrive.
19057  * @result: a #GAsyncResult.
19058  * @error: a #GError, or %NULL
19059  *
19060  * Finishes stopping a drive.
19061  * %FALSE otherwise.
19062  *
19063  * Returns: %TRUE if the drive has been stopped successfully,
19064  * Since: 2.22
19065  */
19066
19067
19068 /**
19069  * g_emblem_get_icon:
19070  * @emblem: a #GEmblem from which the icon should be extracted.
19071  *
19072  * Gives back the icon from @emblem.
19073  * the emblem and should not be modified or freed.
19074  *
19075  * Returns: (transfer none): a #GIcon. The returned object belongs to
19076  * Since: 2.18
19077  */
19078
19079
19080 /**
19081  * g_emblem_get_origin:
19082  * @emblem: a #GEmblem
19083  *
19084  * Gets the origin of the emblem.
19085  *
19086  * Returns: (transfer none): the origin of the emblem
19087  * Since: 2.18
19088  */
19089
19090
19091 /**
19092  * g_emblem_new:
19093  * @icon: a GIcon containing the icon.
19094  *
19095  * Creates a new emblem for @icon.
19096  *
19097  * Returns: a new #GEmblem.
19098  * Since: 2.18
19099  */
19100
19101
19102 /**
19103  * g_emblem_new_with_origin:
19104  * @icon: a GIcon containing the icon.
19105  * @origin: a GEmblemOrigin enum defining the emblem's origin
19106  *
19107  * Creates a new emblem for @icon.
19108  *
19109  * Returns: a new #GEmblem.
19110  * Since: 2.18
19111  */
19112
19113
19114 /**
19115  * g_emblemed_icon_add_emblem:
19116  * @emblemed: a #GEmblemedIcon
19117  * @emblem: a #GEmblem
19118  *
19119  * Adds @emblem to the #GList of #GEmblem <!-- -->s.
19120  *
19121  * Since: 2.18
19122  */
19123
19124
19125 /**
19126  * g_emblemed_icon_clear_emblems:
19127  * @emblemed: a #GEmblemedIcon
19128  *
19129  * Removes all the emblems from @icon.
19130  *
19131  * Since: 2.28
19132  */
19133
19134
19135 /**
19136  * g_emblemed_icon_get_emblems:
19137  * @emblemed: a #GEmblemedIcon
19138  *
19139  * Gets the list of emblems for the @icon.
19140  * #GEmblem <!-- -->s that is owned by @emblemed
19141  *
19142  * Returns: (element-type Gio.Emblem) (transfer none): a #GList of
19143  * Since: 2.18
19144  */
19145
19146
19147 /**
19148  * g_emblemed_icon_get_icon:
19149  * @emblemed: a #GEmblemedIcon
19150  *
19151  * Gets the main icon for @emblemed.
19152  *
19153  * Returns: (transfer none): a #GIcon that is owned by @emblemed
19154  * Since: 2.18
19155  */
19156
19157
19158 /**
19159  * g_emblemed_icon_new:
19160  * @icon: a #GIcon
19161  * @emblem: (allow-none): a #GEmblem, or %NULL
19162  *
19163  * Creates a new emblemed icon for @icon with the emblem @emblem.
19164  *
19165  * Returns: (transfer full): a new #GIcon
19166  * Since: 2.18
19167  */
19168
19169
19170 /**
19171  * g_file_append_to:
19172  * @file: input #GFile.
19173  * @flags: a set of #GFileCreateFlags.
19174  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19175  * @error: a #GError, or %NULL
19176  *
19177  * Gets an output stream for appending data to the file. If
19178  * the file doesn't already exist it is created.
19179  * By default files created are generally readable by everyone,
19180  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
19181  * will be made readable only to the current user, to the level that
19182  * is supported on the target filesystem.
19183  * If @cancellable is not %NULL, then the operation can be cancelled by
19184  * triggering the cancellable object from another thread. If the operation
19185  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19186  * Some file systems don't allow all file names, and may
19187  * return an %G_IO_ERROR_INVALID_FILENAME error.
19188  * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will be
19189  * returned. Other errors are possible too, and depend on what kind of
19190  * filesystem the file is on.
19191  * Free the returned object with g_object_unref().
19192  *
19193  * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
19194  */
19195
19196
19197 /**
19198  * g_file_append_to_async:
19199  * @file: input #GFile.
19200  * @flags: a set of #GFileCreateFlags.
19201  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19202  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19203  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19204  * @user_data: (closure): the data to pass to callback function
19205  *
19206  * Asynchronously opens @file for appending.
19207  * For more details, see g_file_append_to() which is
19208  * the synchronous version of this call.
19209  * When the operation is finished, @callback will be called. You can then call
19210  * g_file_append_to_finish() to get the result of the operation.
19211  */
19212
19213
19214 /**
19215  * g_file_append_to_finish:
19216  * @file: input #GFile.
19217  * @res: #GAsyncResult
19218  * @error: a #GError, or %NULL
19219  *
19220  * Finishes an asynchronous file append operation started with
19221  * g_file_append_to_async().
19222  * Free the returned object with g_object_unref().
19223  *
19224  * Returns: (transfer full): a valid #GFileOutputStream or %NULL on error.
19225  */
19226
19227
19228 /**
19229  * g_file_attribute_info_list_add:
19230  * @list: a #GFileAttributeInfoList.
19231  * @name: the name of the attribute to add.
19232  * @type: the #GFileAttributeType for the attribute.
19233  * @flags: #GFileAttributeInfoFlags for the attribute.
19234  *
19235  * Adds a new attribute with @name to the @list, setting
19236  * its @type and @flags.
19237  */
19238
19239
19240 /**
19241  * g_file_attribute_info_list_dup:
19242  * @list: a #GFileAttributeInfoList to duplicate.
19243  *
19244  * Makes a duplicate of a file attribute info list.
19245  *
19246  * Returns: a copy of the given @list.
19247  */
19248
19249
19250 /**
19251  * g_file_attribute_info_list_lookup:
19252  * @list: a #GFileAttributeInfoList.
19253  * @name: the name of the attribute to lookup.
19254  *
19255  * Gets the file attribute with the name @name from @list.
19256  * attribute isn't found.
19257  *
19258  * Returns: a #GFileAttributeInfo for the @name, or %NULL if an
19259  */
19260
19261
19262 /**
19263  * g_file_attribute_info_list_new:
19264  *
19265  * Creates a new file attribute info list.
19266  *
19267  * Returns: a #GFileAttributeInfoList.
19268  */
19269
19270
19271 /**
19272  * g_file_attribute_info_list_ref:
19273  * @list: a #GFileAttributeInfoList to reference.
19274  *
19275  * References a file attribute info list.
19276  *
19277  * Returns: #GFileAttributeInfoList or %NULL on error.
19278  */
19279
19280
19281 /**
19282  * g_file_attribute_info_list_unref:
19283  * @list: The #GFileAttributeInfoList to unreference.
19284  *
19285  * Removes a reference from the given @list. If the reference count
19286  * falls to zero, the @list is deleted.
19287  */
19288
19289
19290 /**
19291  * g_file_attribute_matcher_enumerate_namespace:
19292  * @matcher: a #GFileAttributeMatcher.
19293  * @ns: a string containing a file attribute namespace.
19294  *
19295  * Checks if the matcher will match all of the keys in a given namespace.
19296  * This will always return %TRUE if a wildcard character is in use (e.g. if
19297  * matcher was created with "standard::*" and @ns is "standard", or if matcher was created
19298  * using "*" and namespace is anything.)
19299  * in the given @ns, %FALSE otherwise.
19300  *
19301  * Todo: this is awkwardly worded.
19302  * Returns: %TRUE if the matcher matches all of the entries
19303  */
19304
19305
19306 /**
19307  * g_file_attribute_matcher_enumerate_next:
19308  * @matcher: a #GFileAttributeMatcher.
19309  *
19310  * Gets the next matched attribute from a #GFileAttributeMatcher.
19311  * no more attribute exist.
19312  *
19313  * Returns: a string containing the next attribute or %NULL if
19314  */
19315
19316
19317 /**
19318  * g_file_attribute_matcher_matches:
19319  * @matcher: a #GFileAttributeMatcher.
19320  * @attribute: a file attribute key.
19321  *
19322  * Checks if an attribute will be matched by an attribute matcher. If
19323  * the matcher was created with the "*" matching string, this function
19324  * will always return %TRUE.
19325  *
19326  * Returns: %TRUE if @attribute matches @matcher. %FALSE otherwise.
19327  */
19328
19329
19330 /**
19331  * g_file_attribute_matcher_matches_only:
19332  * @matcher: a #GFileAttributeMatcher.
19333  * @attribute: a file attribute key.
19334  *
19335  * Checks if a attribute matcher only matches a given attribute. Always
19336  * returns %FALSE if "*" was used when creating the matcher.
19337  *
19338  * Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise.
19339  */
19340
19341
19342 /**
19343  * g_file_attribute_matcher_new:
19344  * @attributes: an attribute string to match.
19345  *
19346  * Creates a new file attribute matcher, which matches attributes
19347  * against a given string. #GFileAttributeMatcher<!-- -->s are reference
19348  * counted structures, and are created with a reference count of 1. If
19349  * the number of references falls to 0, the #GFileAttributeMatcher is
19350  * automatically destroyed.
19351  * The @attribute string should be formatted with specific keys separated
19352  * from namespaces with a double colon. Several "namespace::key" strings may be
19353  * concatenated with a single comma (e.g. "standard::type,standard::is-hidden").
19354  * The wildcard "*" may be used to match all keys and namespaces, or
19355  * "namespace::*" will match all keys in a given namespace.
19356  * Examples of strings to use:
19357  * <table>
19358  * <title>File Attribute Matcher strings and results</title>
19359  * <tgroup cols='2' align='left'><thead>
19360  * <row><entry> Matcher String </entry><entry> Matches </entry></row></thead>
19361  * <tbody>
19362  * <row><entry>"*"</entry><entry>matches all attributes.</entry></row>
19363  * <row><entry>"standard::is-hidden"</entry><entry>matches only the key is-hidden in the standard namespace.</entry></row>
19364  * <row><entry>"standard::type,unix::*"</entry><entry>matches the type key in the standard namespace and
19365  * all keys in the unix namespace.</entry></row>
19366  * </tbody></tgroup>
19367  * </table>
19368  *
19369  * Returns: a #GFileAttributeMatcher.
19370  */
19371
19372
19373 /**
19374  * g_file_attribute_matcher_ref:
19375  * @matcher: a #GFileAttributeMatcher.
19376  *
19377  * References a file attribute matcher.
19378  *
19379  * Returns: a #GFileAttributeMatcher.
19380  */
19381
19382
19383 /**
19384  * g_file_attribute_matcher_unref:
19385  * @matcher: a #GFileAttributeMatcher.
19386  *
19387  * Unreferences @matcher. If the reference count falls below 1,
19388  * the @matcher is automatically freed.
19389  */
19390
19391
19392 /**
19393  * g_file_copy:
19394  * @source: input #GFile.
19395  * @destination: destination #GFile
19396  * @flags: set of #GFileCopyFlags
19397  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19398  * @progress_callback: (scope call): function to callback with progress information
19399  * @progress_callback_data: (closure): user data to pass to @progress_callback
19400  * @error: #GError to set on error, or %NULL
19401  *
19402  * Copies the file @source to the location specified by @destination.
19403  * Can not handle recursive copies of directories.
19404  * If the flag #G_FILE_COPY_OVERWRITE is specified an already
19405  * existing @destination file is overwritten.
19406  * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
19407  * will be copied as symlinks, otherwise the target of the
19408  * If @cancellable is not %NULL, then the operation can be cancelled by
19409  * triggering the cancellable object from another thread. If the operation
19410  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19411  * If @progress_callback is not %NULL, then the operation can be monitored by
19412  * setting this to a #GFileProgressCallback function. @progress_callback_data
19413  * will be passed to this function. It is guaranteed that this callback will
19414  * be called after all data has been transferred with the total number of bytes
19415  * copied during the operation.
19416  * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
19417  * error is returned, independent on the status of the @destination.
19418  * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
19419  * error G_IO_ERROR_EXISTS is returned.
19420  * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
19421  * error is returned. If trying to overwrite a directory with a directory the
19422  * G_IO_ERROR_WOULD_MERGE error is returned.
19423  * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
19424  * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
19425  * is returned.
19426  * If you are interested in copying the #GFile object itself (not the on-disk
19427  * file), see g_file_dup().
19428  *
19429  * Returns: %TRUE on success, %FALSE otherwise.
19430  */
19431
19432
19433 /**
19434  * g_file_copy_async: (skip)
19435  * @source: input #GFile.
19436  * @destination: destination #GFile
19437  * @flags: set of #GFileCopyFlags
19438  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19439  * @cancellable: optional #GCancellable object, %NULL to ignore.
19440  * @progress_callback: function to callback with progress information
19441  * @progress_callback_data: user data to pass to @progress_callback
19442  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
19443  * @user_data: the data to pass to callback function
19444  *
19445  * Copies the file @source to the location specified by @destination
19446  * asynchronously. For details of the behaviour, see g_file_copy().
19447  * If @progress_callback is not %NULL, then that function that will be called
19448  * just like in g_file_copy(), however the callback will run in the main loop,
19449  * not in the thread that is doing the I/O operation.
19450  * When the operation is finished, @callback will be called. You can then call
19451  * g_file_copy_finish() to get the result of the operation.
19452  */
19453
19454
19455 /**
19456  * g_file_copy_attributes:
19457  * @source: a #GFile with attributes.
19458  * @destination: a #GFile to copy attributes to.
19459  * @flags: a set of #GFileCopyFlags.
19460  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19461  * @error: a #GError, %NULL to ignore.
19462  *
19463  * Copies the file attributes from @source to @destination.
19464  * Normally only a subset of the file attributes are copied,
19465  * those that are copies in a normal file copy operation
19466  * (which for instance does not include e.g. owner). However
19467  * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then
19468  * all the metadata that is possible to copy is copied. This
19469  * is useful when implementing move by copy + delete source.
19470  *
19471  * Returns: %TRUE if the attributes were copied successfully, %FALSE otherwise.
19472  */
19473
19474
19475 /**
19476  * g_file_copy_finish:
19477  * @file: input #GFile.
19478  * @res: a #GAsyncResult.
19479  * @error: a #GError, or %NULL
19480  *
19481  * Finishes copying the file started with
19482  * g_file_copy_async().
19483  *
19484  * Returns: a %TRUE on success, %FALSE on error.
19485  */
19486
19487
19488 /**
19489  * g_file_create:
19490  * @file: input #GFile.
19491  * @flags: a set of #GFileCreateFlags.
19492  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19493  * @error: a #GError, or %NULL
19494  *
19495  * Creates a new file and returns an output stream for writing to it.
19496  * The file must not already exist.
19497  * By default files created are generally readable by everyone,
19498  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
19499  * will be made readable only to the current user, to the level that
19500  * is supported on the target filesystem.
19501  * If @cancellable is not %NULL, then the operation can be cancelled by
19502  * triggering the cancellable object from another thread. If the operation
19503  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19504  * If a file or directory with this name already exists the G_IO_ERROR_EXISTS
19505  * error will be returned.
19506  * Some file systems don't allow all file names, and may
19507  * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
19508  * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
19509  * Other errors are possible too, and depend on what kind of
19510  * filesystem the file is on.
19511  * %NULL on error.
19512  * Free the returned object with g_object_unref().
19513  *
19514  * Returns: (transfer full): a #GFileOutputStream for the newly created file, or
19515  */
19516
19517
19518 /**
19519  * g_file_create_async:
19520  * @file: input #GFile.
19521  * @flags: a set of #GFileCreateFlags.
19522  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19523  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19524  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19525  * @user_data: (closure): the data to pass to callback function
19526  *
19527  * Asynchronously creates a new file and returns an output stream for writing to it.
19528  * The file must not already exist.
19529  * For more details, see g_file_create() which is
19530  * the synchronous version of this call.
19531  * When the operation is finished, @callback will be called. You can then call
19532  * g_file_create_finish() to get the result of the operation.
19533  */
19534
19535
19536 /**
19537  * g_file_create_finish:
19538  * @file: input #GFile.
19539  * @res: a #GAsyncResult.
19540  * @error: a #GError, or %NULL
19541  *
19542  * Finishes an asynchronous file create operation started with
19543  * g_file_create_async().
19544  * Free the returned object with g_object_unref().
19545  *
19546  * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
19547  */
19548
19549
19550 /**
19551  * g_file_create_readwrite:
19552  * @file: a #GFile
19553  * @flags: a set of #GFileCreateFlags
19554  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
19555  * @error: return location for a #GError, or %NULL
19556  *
19557  * Creates a new file and returns a stream for reading and writing to it.
19558  * The file must not already exist.
19559  * By default files created are generally readable by everyone,
19560  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
19561  * will be made readable only to the current user, to the level that
19562  * is supported on the target filesystem.
19563  * If @cancellable is not %NULL, then the operation can be cancelled by
19564  * triggering the cancellable object from another thread. If the operation
19565  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19566  * If a file or directory with this name already exists the %G_IO_ERROR_EXISTS
19567  * error will be returned. Some file systems don't allow all file names,
19568  * and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name
19569  * is too long, %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors
19570  * are possible too, and depend on what kind of filesystem the file is on.
19571  * Note that in many non-local file cases read and write streams are not
19572  * supported, so make sure you really need to do read and write streaming,
19573  * rather than just opening for reading or writing.
19574  * Free the returned object with g_object_unref().
19575  *
19576  * Returns: (transfer full): a #GFileIOStream for the newly created file, or %NULL on error.
19577  * Since: 2.22
19578  */
19579
19580
19581 /**
19582  * g_file_create_readwrite_async:
19583  * @file: input #GFile
19584  * @flags: a set of #GFileCreateFlags
19585  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
19586  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
19587  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19588  * @user_data: (closure): the data to pass to callback function
19589  *
19590  * Asynchronously creates a new file and returns a stream for reading and
19591  * writing to it. The file must not already exist.
19592  * For more details, see g_file_create_readwrite() which is
19593  * the synchronous version of this call.
19594  * When the operation is finished, @callback will be called. You can then
19595  * call g_file_create_readwrite_finish() to get the result of the operation.
19596  *
19597  * Since: 2.22
19598  */
19599
19600
19601 /**
19602  * g_file_create_readwrite_finish:
19603  * @file: input #GFile
19604  * @res: a #GAsyncResult
19605  * @error: a #GError, or %NULL
19606  *
19607  * Finishes an asynchronous file create operation started with
19608  * g_file_create_readwrite_async().
19609  * Free the returned object with g_object_unref().
19610  *
19611  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
19612  * Since: 2.22
19613  */
19614
19615
19616 /**
19617  * g_file_delete:
19618  * @file: input #GFile.
19619  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19620  * @error: a #GError, or %NULL
19621  *
19622  * Deletes a file. If the @file is a directory, it will only be deleted if it
19623  * is empty.
19624  * If @cancellable is not %NULL, then the operation can be cancelled by
19625  * triggering the cancellable object from another thread. If the operation
19626  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19627  *
19628  * Virtual: delete_file
19629  * Returns: %TRUE if the file was deleted. %FALSE otherwise.
19630  */
19631
19632
19633 /**
19634  * g_file_descriptor_based_get_fd:
19635  * @fd_based: a #GFileDescriptorBased.
19636  *
19637  * Gets the underlying file descriptor.
19638  *
19639  * Returns: The file descriptor
19640  * Since: 2.24
19641  */
19642
19643
19644 /**
19645  * g_file_dup:
19646  * @file: input #GFile.
19647  *
19648  * Duplicates a #GFile handle. This operation does not duplicate
19649  * the actual file or directory represented by the #GFile; see
19650  * g_file_copy() if attempting to copy a file.
19651  * This call does no blocking i/o.
19652  *
19653  * Returns: (transfer full): a new #GFile that is a duplicate of the given #GFile.
19654  */
19655
19656
19657 /**
19658  * g_file_eject_mountable:
19659  * @file: input #GFile.
19660  * @flags: flags affecting the operation
19661  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19662  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
19663  * @user_data: (closure): the data to pass to callback function
19664  *
19665  * Starts an asynchronous eject on a mountable.
19666  * When this operation has completed, @callback will be called with
19667  * g_file_eject_mountable_finish().
19668  * If @cancellable is not %NULL, then the operation can be cancelled by
19669  * triggering the cancellable object from another thread. If the operation
19670  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19671  *
19672  * Deprecated: 2.22: Use g_file_eject_mountable_with_operation() instead.
19673  */
19674
19675
19676 /**
19677  * g_file_eject_mountable_finish:
19678  * @file: input #GFile.
19679  * @result: a #GAsyncResult.
19680  * @error: a #GError, or %NULL
19681  *
19682  * Finishes an asynchronous eject operation started by
19683  * g_file_eject_mountable().
19684  * otherwise.
19685  *
19686  * Returns: %TRUE if the @file was ejected successfully. %FALSE
19687  * Deprecated: 2.22: Use g_file_eject_mountable_with_operation_finish() instead.
19688  */
19689
19690
19691 /**
19692  * g_file_eject_mountable_with_operation:
19693  * @file: input #GFile.
19694  * @flags: flags affecting the operation
19695  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
19696  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19697  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
19698  * @user_data: (closure): the data to pass to callback function
19699  *
19700  * Starts an asynchronous eject on a mountable.
19701  * When this operation has completed, @callback will be called with
19702  * g_file_eject_mountable_with_operation_finish().
19703  * If @cancellable is not %NULL, then the operation can be cancelled by
19704  * triggering the cancellable object from another thread. If the operation
19705  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19706  *
19707  * Since: 2.22
19708  */
19709
19710
19711 /**
19712  * g_file_eject_mountable_with_operation_finish:
19713  * @file: input #GFile.
19714  * @result: a #GAsyncResult.
19715  * @error: a #GError, or %NULL
19716  *
19717  * Finishes an asynchronous eject operation started by
19718  * g_file_eject_mountable_with_operation().
19719  * otherwise.
19720  *
19721  * Returns: %TRUE if the @file was ejected successfully. %FALSE
19722  * Since: 2.22
19723  */
19724
19725
19726 /**
19727  * g_file_enumerate_children:
19728  * @file: input #GFile.
19729  * @attributes: an attribute query string.
19730  * @flags: a set of #GFileQueryInfoFlags.
19731  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19732  * @error: #GError for error reporting.
19733  *
19734  * Gets the requested information about the files in a directory. The result
19735  * is a #GFileEnumerator object that will give out #GFileInfo objects for
19736  * all the files in the directory.
19737  * The @attributes value is a string that specifies the file attributes that
19738  * should be gathered. It is not an error if it's not possible to read a particular
19739  * requested attribute from a file - it just won't be set. @attributes should
19740  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
19741  * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
19742  * namespace. An example attribute query be "standard::*,owner::user".
19743  * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
19744  * If @cancellable is not %NULL, then the operation can be cancelled by
19745  * triggering the cancellable object from another thread. If the operation
19746  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19747  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
19748  * If the file is not a directory, the G_FILE_ERROR_NOTDIR error will be returned.
19749  * Other errors are possible too.
19750  * Free the returned object with g_object_unref().
19751  *
19752  * Returns: (transfer full): A #GFileEnumerator if successful, %NULL on error.
19753  */
19754
19755
19756 /**
19757  * g_file_enumerate_children_async:
19758  * @file: input #GFile.
19759  * @attributes: an attribute query string.
19760  * @flags: a set of #GFileQueryInfoFlags.
19761  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19762  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19763  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19764  * @user_data: (closure): the data to pass to callback function
19765  *
19766  * Asynchronously gets the requested information about the files in a directory. The result
19767  * is a #GFileEnumerator object that will give out #GFileInfo objects for
19768  * all the files in the directory.
19769  * For more details, see g_file_enumerate_children() which is
19770  * the synchronous version of this call.
19771  * When the operation is finished, @callback will be called. You can then call
19772  * g_file_enumerate_children_finish() to get the result of the operation.
19773  */
19774
19775
19776 /**
19777  * g_file_enumerate_children_finish:
19778  * @file: input #GFile.
19779  * @res: a #GAsyncResult.
19780  * @error: a #GError.
19781  *
19782  * Finishes an async enumerate children operation.
19783  * See g_file_enumerate_children_async().
19784  * Free the returned object with g_object_unref().
19785  *
19786  * Returns: (transfer full): a #GFileEnumerator or %NULL if an error occurred.
19787  */
19788
19789
19790 /**
19791  * g_file_enumerator_close:
19792  * @enumerator: a #GFileEnumerator.
19793  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19794  * @error: location to store the error occuring, or %NULL to ignore
19795  *
19796  * Releases all resources used by this enumerator, making the
19797  * enumerator return %G_IO_ERROR_CLOSED on all calls.
19798  * This will be automatically called when the last reference
19799  * is dropped, but you might want to call this function to make
19800  * sure resources are released as early as possible.
19801  *
19802  * Returns: #TRUE on success or #FALSE on error.
19803  */
19804
19805
19806 /**
19807  * g_file_enumerator_close_async:
19808  * @enumerator: a #GFileEnumerator.
19809  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19810  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19811  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19812  * @user_data: (closure): the data to pass to callback function
19813  *
19814  * Asynchronously closes the file enumerator.
19815  * If @cancellable is not %NULL, then the operation can be cancelled by
19816  * triggering the cancellable object from another thread. If the operation
19817  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in
19818  * g_file_enumerator_close_finish().
19819  */
19820
19821
19822 /**
19823  * g_file_enumerator_close_finish:
19824  * @enumerator: a #GFileEnumerator.
19825  * @result: a #GAsyncResult.
19826  * @error: a #GError location to store the error occuring, or %NULL to ignore.
19827  *
19828  * Finishes closing a file enumerator, started from g_file_enumerator_close_async().
19829  * If the file enumerator was already closed when g_file_enumerator_close_async()
19830  * was called, then this function will report %G_IO_ERROR_CLOSED in @error, and
19831  * return %FALSE. If the file enumerator had pending operation when the close
19832  * operation was started, then this function will report %G_IO_ERROR_PENDING, and
19833  * return %FALSE.  If @cancellable was not %NULL, then the operation may have been
19834  * cancelled by triggering the cancellable object from another thread. If the operation
19835  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
19836  * returned.
19837  *
19838  * Returns: %TRUE if the close operation has finished successfully.
19839  */
19840
19841
19842 /**
19843  * g_file_enumerator_get_container:
19844  * @enumerator: a #GFileEnumerator
19845  *
19846  * Get the #GFile container which is being enumerated.
19847  *
19848  * Returns: (transfer full): the #GFile which is being enumerated.
19849  * Since: 2.18
19850  */
19851
19852
19853 /**
19854  * g_file_enumerator_has_pending:
19855  * @enumerator: a #GFileEnumerator.
19856  *
19857  * Checks if the file enumerator has pending operations.
19858  *
19859  * Returns: %TRUE if the @enumerator has pending operations.
19860  */
19861
19862
19863 /**
19864  * g_file_enumerator_is_closed:
19865  * @enumerator: a #GFileEnumerator.
19866  *
19867  * Checks if the file enumerator has been closed.
19868  *
19869  * Returns: %TRUE if the @enumerator is closed.
19870  */
19871
19872
19873 /**
19874  * g_file_enumerator_next_file:
19875  * @enumerator: a #GFileEnumerator.
19876  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19877  * @error: location to store the error occuring, or %NULL to ignore
19878  *
19879  * Returns information for the next file in the enumerated object.
19880  * Will block until the information is available. The #GFileInfo
19881  * returned from this function will contain attributes that match the
19882  * attribute string that was passed when the #GFileEnumerator was created.
19883  * On error, returns %NULL and sets @error to the error. If the
19884  * enumerator is at the end, %NULL will be returned and @error will
19885  * be unset.
19886  * Free the returned object with g_object_unref() when no longer needed.
19887  *
19888  * Returns: (transfer full): A #GFileInfo or %NULL on error or end of enumerator.
19889  */
19890
19891
19892 /**
19893  * g_file_enumerator_next_files_async:
19894  * @enumerator: a #GFileEnumerator.
19895  * @num_files: the number of file info objects to request
19896  * @io_priority: the <link linkend="gioscheduler">io priority</link> of the request.
19897  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19898  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19899  * @user_data: (closure): the data to pass to callback function
19900  *
19901  * Request information for a number of files from the enumerator asynchronously.
19902  * When all i/o for the operation is finished the @callback will be called with
19903  * the requested information.
19904  * The callback can be called with less than @num_files files in case of error
19905  * or at the end of the enumerator. In case of a partial error the callback will
19906  * be called with any succeeding items and no error, and on the next request the
19907  * error will be reported. If a request is cancelled the callback will be called
19908  * with %G_IO_ERROR_CANCELLED.
19909  * During an async request no other sync and async calls are allowed, and will
19910  * result in %G_IO_ERROR_PENDING errors.
19911  * Any outstanding i/o request with higher priority (lower numerical value) will
19912  * be executed before an outstanding request with lower priority. Default
19913  * priority is %G_PRIORITY_DEFAULT.
19914  */
19915
19916
19917 /**
19918  * g_file_enumerator_next_files_finish:
19919  * @enumerator: a #GFileEnumerator.
19920  * @result: a #GAsyncResult.
19921  * @error: a #GError location to store the error occuring, or %NULL to ignore.
19922  *
19923  * Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
19924  * g_list_free() and unref the infos with g_object_unref() when you're
19925  * done with them.
19926  *
19927  * Returns: (transfer full) (element-type Gio.FileInfo): a #GList of #GFileInfo<!---->s. You must free the list with
19928  */
19929
19930
19931 /**
19932  * g_file_enumerator_set_pending:
19933  * @enumerator: a #GFileEnumerator.
19934  * @pending: a boolean value.
19935  *
19936  * Sets the file enumerator as having pending operations.
19937  */
19938
19939
19940 /**
19941  * g_file_equal:
19942  * @file1: the first #GFile.
19943  * @file2: the second #GFile.
19944  *
19945  * Checks equality of two given #GFile<!-- -->s. Note that two
19946  * #GFile<!-- -->s that differ can still refer to the same
19947  * file on the filesystem due to various forms of filename
19948  * aliasing.
19949  * This call does no blocking i/o.
19950  * %FALSE if either is not a #GFile.
19951  *
19952  * Returns: %TRUE if @file1 and @file2 are equal.
19953  */
19954
19955
19956 /**
19957  * g_file_find_enclosing_mount:
19958  * @file: input #GFile.
19959  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19960  * @error: a #GError.
19961  *
19962  * Gets a #GMount for the #GFile.
19963  * If the #GFileIface for @file does not have a mount (e.g. possibly a
19964  * remote share), @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL
19965  * will be returned.
19966  * If @cancellable is not %NULL, then the operation can be cancelled by
19967  * triggering the cancellable object from another thread. If the operation
19968  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19969  * Free the returned object with g_object_unref().
19970  *
19971  * Returns: (transfer full): a #GMount where the @file is located or %NULL on error.
19972  */
19973
19974
19975 /**
19976  * g_file_find_enclosing_mount_async:
19977  * @file: a #GFile
19978  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19979  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19980  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19981  * @user_data: (closure): the data to pass to callback function
19982  *
19983  * Asynchronously gets the mount for the file.
19984  * For more details, see g_file_find_enclosing_mount() which is
19985  * the synchronous version of this call.
19986  * When the operation is finished, @callback will be called. You can then call
19987  * g_file_find_enclosing_mount_finish() to get the result of the operation.
19988  */
19989
19990
19991 /**
19992  * g_file_find_enclosing_mount_finish:
19993  * @file: a #GFile
19994  * @res: a #GAsyncResult
19995  * @error: a #GError
19996  *
19997  * Finishes an asynchronous find mount request.
19998  * See g_file_find_enclosing_mount_async().
19999  * Free the returned object with g_object_unref().
20000  *
20001  * Returns: (transfer full): #GMount for given @file or %NULL on error.
20002  */
20003
20004
20005 /**
20006  * g_file_get_basename:
20007  * @file: input #GFile.
20008  *
20009  * Gets the base name (the last component of the path) for a given #GFile.
20010  * If called for the top level of a system (such as the filesystem root
20011  * or a uri like sftp://host/) it will return a single directory separator
20012  * (and on Windows, possibly a drive letter).
20013  * The base name is a byte string (*not* UTF-8). It has no defined encoding
20014  * or rules other than it may not contain zero bytes.  If you want to use
20015  * filenames in a user interface you should use the display name that you
20016  * can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
20017  * attribute with g_file_query_info().
20018  * This call does no blocking i/o.
20019  * if given #GFile is invalid. The returned string should be
20020  * freed with g_free() when no longer needed.
20021  *
20022  * Returns: string containing the #GFile's base name, or %NULL
20023  */
20024
20025
20026 /**
20027  * g_file_get_child:
20028  * @file: input #GFile.
20029  * @name: string containing the child's basename.
20030  *
20031  * Gets a child of @file with basename equal to @name.
20032  * Note that the file with that specific name might not exist, but
20033  * you can still have a #GFile that points to it. You can use this
20034  * for instance to create that file.
20035  * This call does no blocking i/o.
20036  * Free the returned object with g_object_unref().
20037  *
20038  * Returns: (transfer full): a #GFile to a child specified by @name.
20039  */
20040
20041
20042 /**
20043  * g_file_get_child_for_display_name:
20044  * @file: input #GFile.
20045  * @display_name: string to a possible child.
20046  * @error: #GError.
20047  *
20048  * Gets the child of @file for a given @display_name (i.e. a UTF8
20049  * version of the name). If this function fails, it returns %NULL and @error will be
20050  * set. This is very useful when constructing a GFile for a new file
20051  * and the user entered the filename in the user interface, for instance
20052  * when you select a directory and type a filename in the file selector.
20053  * This call does no blocking i/o.
20054  * %NULL if the display name couldn't be converted.
20055  * Free the returned object with g_object_unref().
20056  *
20057  * Returns: (transfer full): a #GFile to the specified child, or
20058  */
20059
20060
20061 /**
20062  * g_file_get_parent:
20063  * @file: input #GFile.
20064  *
20065  * Gets the parent directory for the @file.
20066  * If the @file represents the root directory of the
20067  * file system, then %NULL will be returned.
20068  * This call does no blocking i/o.
20069  * #GFile or %NULL if there is no parent.
20070  * Free the returned object with g_object_unref().
20071  *
20072  * Returns: (transfer full): a #GFile structure to the parent of the given
20073  */
20074
20075
20076 /**
20077  * g_file_get_parse_name:
20078  * @file: input #GFile.
20079  *
20080  * Gets the parse name of the @file.
20081  * A parse name is a UTF-8 string that describes the
20082  * file such that one can get the #GFile back using
20083  * g_file_parse_name().
20084  * This is generally used to show the #GFile as a nice
20085  * full-pathname kind of string in a user interface,
20086  * like in a location entry.
20087  * For local files with names that can safely be converted
20088  * to UTF8 the pathname is used, otherwise the IRI is used
20089  * (a form of URI that allows UTF8 characters unescaped).
20090  * This call does no blocking i/o.
20091  * string should be freed with g_free() when no longer needed.
20092  *
20093  * Returns: a string containing the #GFile's parse name. The returned
20094  */
20095
20096
20097 /**
20098  * g_file_get_path:
20099  * @file: input #GFile.
20100  *
20101  * Gets the local pathname for #GFile, if one exists.
20102  * This call does no blocking i/o.
20103  * no such path exists. The returned string should be
20104  * freed with g_free() when no longer needed.
20105  *
20106  * Returns: string containing the #GFile's path, or %NULL if
20107  */
20108
20109
20110 /**
20111  * g_file_get_relative_path:
20112  * @parent: input #GFile.
20113  * @descendant: input #GFile.
20114  *
20115  * Gets the path for @descendant relative to @parent.
20116  * This call does no blocking i/o.
20117  * to @parent, or %NULL if @descendant doesn't have @parent as prefix.
20118  * The returned string should be freed with g_free() when no longer needed.
20119  *
20120  * Returns: string with the relative path from @descendant
20121  */
20122
20123
20124 /**
20125  * g_file_get_uri:
20126  * @file: input #GFile.
20127  *
20128  * Gets the URI for the @file.
20129  * This call does no blocking i/o.
20130  * The returned string should be freed with g_free() when no longer needed.
20131  *
20132  * Returns: a string containing the #GFile's URI.
20133  */
20134
20135
20136 /**
20137  * g_file_get_uri_scheme:
20138  * @file: input #GFile.
20139  *
20140  * Gets the URI scheme for a #GFile.
20141  * RFC 3986 decodes the scheme as:
20142  * <programlisting>
20143  * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
20144  * </programlisting>
20145  * Common schemes include "file", "http", "ftp", etc.
20146  * This call does no blocking i/o.
20147  * #GFile. The returned string should be freed with g_free()
20148  * when no longer needed.
20149  *
20150  * Returns: a string containing the URI scheme for the given
20151  */
20152
20153
20154 /**
20155  * g_file_has_parent:
20156  * @file: input #GFile
20157  * @parent: the parent to check for, or %NULL
20158  *
20159  * Checks if @file has a parent, and optionally, if it is @parent.
20160  * If @parent is %NULL then this function returns %TRUE if @file has any
20161  * parent at all.  If @parent is non-%NULL then %TRUE is only returned
20162  * if @file is a child of @parent.
20163  * case that @parent is %NULL).
20164  *
20165  * Returns: %TRUE if @file is a child of @parent (or any parent in the
20166  * Since: 2.24
20167  */
20168
20169
20170 /**
20171  * g_file_has_prefix:
20172  * @file: input #GFile.
20173  * @prefix: input #GFile.
20174  *
20175  * Checks whether @file has the prefix specified by @prefix. In other word,
20176  * if the names of inital elements of @file<!-- -->s pathname match @prefix.
20177  * Only full pathname elements are matched, so a path like /foo is not
20178  * considered a prefix of /foobar, only of /foo/bar.
20179  * This call does no i/o, as it works purely on names. As such it can
20180  * sometimes return %FALSE even if @file is inside a @prefix (from a
20181  * filesystem point of view), because the prefix of @file is an alias
20182  * of @prefix.
20183  * %FALSE otherwise.
20184  *
20185  * Virtual: prefix_matches
20186  * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix.
20187  */
20188
20189
20190 /**
20191  * g_file_has_uri_scheme:
20192  * @file: input #GFile.
20193  * @uri_scheme: a string containing a URI scheme.
20194  *
20195  * Checks to see if a #GFile has a given URI scheme.
20196  * This call does no blocking i/o.
20197  * given URI scheme, %FALSE if URI scheme is %NULL,
20198  * not supported, or #GFile is invalid.
20199  *
20200  * Returns: %TRUE if #GFile's backend supports the
20201  */
20202
20203
20204 /**
20205  * g_file_hash:
20206  * @file: #gconstpointer to a #GFile.
20207  *
20208  * Creates a hash value for a #GFile.
20209  * This call does no blocking i/o.
20210  * integer that can be used as hash value for the #GFile.
20211  * This function is intended for easily hashing a #GFile to
20212  * add to a #GHashTable or similar data structure.
20213  *
20214  * Virtual: hash
20215  * Returns: 0 if @file is not a valid #GFile, otherwise an
20216  */
20217
20218
20219 /**
20220  * g_file_icon_get_file:
20221  * @icon: a #GIcon.
20222  *
20223  * Gets the #GFile associated with the given @icon.
20224  *
20225  * Returns: (transfer none): a #GFile, or %NULL.
20226  */
20227
20228
20229 /**
20230  * g_file_icon_new:
20231  * @file: a #GFile.
20232  *
20233  * Creates a new icon for a file.
20234  *
20235  * Returns: (transfer full): a #GIcon for the given @file, or %NULL on error.
20236  */
20237
20238
20239 /**
20240  * g_file_info_clear_status:
20241  * @info: a #GFileInfo.
20242  *
20243  * Clears the status information from @info.
20244  */
20245
20246
20247 /**
20248  * g_file_info_copy_into:
20249  * @src_info: source to copy attributes from.
20250  * @dest_info: destination to copy attributes to.
20251  *
20252  * Copies all of the #GFileAttribute<!-- -->s from @src_info to @dest_info.
20253  */
20254
20255
20256 /**
20257  * g_file_info_dup:
20258  * @other: a #GFileInfo.
20259  *
20260  * Duplicates a file info structure.
20261  *
20262  * Returns: (transfer full): a duplicate #GFileInfo of @other.
20263  */
20264
20265
20266 /**
20267  * g_file_info_get_attribute_as_string:
20268  * @info: a #GFileInfo.
20269  * @attribute: a file attribute key.
20270  *
20271  * Gets the value of a attribute, formated as a string.
20272  * This escapes things as needed to make the string valid
20273  * utf8.
20274  * When you're done with the string it must be freed with g_free().
20275  *
20276  * Returns: a UTF-8 string associated with the given @attribute.
20277  */
20278
20279
20280 /**
20281  * g_file_info_get_attribute_boolean:
20282  * @info: a #GFileInfo.
20283  * @attribute: a file attribute key.
20284  *
20285  * Gets the value of a boolean attribute. If the attribute does not
20286  * contain a boolean value, %FALSE will be returned.
20287  *
20288  * Returns: the boolean value contained within the attribute.
20289  */
20290
20291
20292 /**
20293  * g_file_info_get_attribute_byte_string:
20294  * @info: a #GFileInfo.
20295  * @attribute: a file attribute key.
20296  *
20297  * Gets the value of a byte string attribute. If the attribute does
20298  * not contain a byte string, %NULL will be returned.
20299  * %NULL otherwise.
20300  *
20301  * Returns: the contents of the @attribute value as a byte string, or
20302  */
20303
20304
20305 /**
20306  * g_file_info_get_attribute_data:
20307  * @info: a #GFileInfo
20308  * @attribute: a file attribute key
20309  * @type: (out) (allow-none): return location for the attribute type, or %NULL
20310  * @value_pp: (out) (allow-none): return location for the attribute value, or %NULL
20311  * @status: (out) (allow-none): return location for the attribute status, or %NULL
20312  *
20313  * Gets the attribute type, value and status for an attribute key.
20314  * %FALSE otherwise.
20315  *
20316  * Returns: (transfer none): %TRUE if @info has an attribute named @attribute,
20317  */
20318
20319
20320 /**
20321  * g_file_info_get_attribute_int32:
20322  * @info: a #GFileInfo.
20323  * @attribute: a file attribute key.
20324  *
20325  * Gets a signed 32-bit integer contained within the attribute. If the
20326  * attribute does not contain a signed 32-bit integer, or is invalid,
20327  * 0 will be returned.
20328  *
20329  * Returns: a signed 32-bit integer from the attribute.
20330  */
20331
20332
20333 /**
20334  * g_file_info_get_attribute_int64:
20335  * @info: a #GFileInfo.
20336  * @attribute: a file attribute key.
20337  *
20338  * Gets a signed 64-bit integer contained within the attribute. If the
20339  * attribute does not contain an signed 64-bit integer, or is invalid,
20340  * 0 will be returned.
20341  *
20342  * Returns: a signed 64-bit integer from the attribute.
20343  */
20344
20345
20346 /**
20347  * g_file_info_get_attribute_object:
20348  * @info: a #GFileInfo.
20349  * @attribute: a file attribute key.
20350  *
20351  * Gets the value of a #GObject attribute. If the attribute does
20352  * not contain a #GObject, %NULL will be returned.
20353  * %NULL otherwise.
20354  *
20355  * Returns: (transfer none): a #GObject associated with the given @attribute, or
20356  */
20357
20358
20359 /**
20360  * g_file_info_get_attribute_status:
20361  * @info: a #GFileInfo
20362  * @attribute: a file attribute key
20363  *
20364  * Gets the attribute status for an attribute key.
20365  * %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.
20366  *
20367  * Returns: a #GFileAttributeStatus for the given @attribute, or
20368  */
20369
20370
20371 /**
20372  * g_file_info_get_attribute_string:
20373  * @info: a #GFileInfo.
20374  * @attribute: a file attribute key.
20375  *
20376  * Gets the value of a string attribute. If the attribute does
20377  * not contain a string, %NULL will be returned.
20378  * %NULL otherwise.
20379  *
20380  * Returns: the contents of the @attribute value as a string, or
20381  */
20382
20383
20384 /**
20385  * g_file_info_get_attribute_stringv:
20386  * @info: a #GFileInfo.
20387  * @attribute: a file attribute key.
20388  *
20389  * Gets the value of a stringv attribute. If the attribute does
20390  * not contain a stringv, %NULL will be returned.
20391  * %NULL otherwise. Do not free.
20392  *
20393  * Returns: (transfer none): the contents of the @attribute value as a stringv, or
20394  * Since: 2.22
20395  */
20396
20397
20398 /**
20399  * g_file_info_get_attribute_type:
20400  * @info: a #GFileInfo.
20401  * @attribute: a file attribute key.
20402  *
20403  * Gets the attribute type for an attribute key.
20404  * %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.
20405  *
20406  * Returns: a #GFileAttributeType for the given @attribute, or
20407  */
20408
20409
20410 /**
20411  * g_file_info_get_attribute_uint32:
20412  * @info: a #GFileInfo.
20413  * @attribute: a file attribute key.
20414  *
20415  * Gets an unsigned 32-bit integer contained within the attribute. If the
20416  * attribute does not contain an unsigned 32-bit integer, or is invalid,
20417  * 0 will be returned.
20418  *
20419  * Returns: an unsigned 32-bit integer from the attribute.
20420  */
20421
20422
20423 /**
20424  * g_file_info_get_attribute_uint64:
20425  * @info: a #GFileInfo.
20426  * @attribute: a file attribute key.
20427  *
20428  * Gets a unsigned 64-bit integer contained within the attribute. If the
20429  * attribute does not contain an unsigned 64-bit integer, or is invalid,
20430  * 0 will be returned.
20431  *
20432  * Returns: a unsigned 64-bit integer from the attribute.
20433  */
20434
20435
20436 /**
20437  * g_file_info_get_content_type:
20438  * @info: a #GFileInfo.
20439  *
20440  * Gets the file's content type.
20441  *
20442  * Returns: a string containing the file's content type.
20443  */
20444
20445
20446 /**
20447  * g_file_info_get_display_name:
20448  * @info: a #GFileInfo.
20449  *
20450  * Gets a display name for a file.
20451  *
20452  * Returns: a string containing the display name.
20453  */
20454
20455
20456 /**
20457  * g_file_info_get_edit_name:
20458  * @info: a #GFileInfo.
20459  *
20460  * Gets the edit name for a file.
20461  *
20462  * Returns: a string containing the edit name.
20463  */
20464
20465
20466 /**
20467  * g_file_info_get_etag:
20468  * @info: a #GFileInfo.
20469  *
20470  * Gets the <link linkend="gfile-etag">entity tag</link> for a given
20471  * #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.
20472  *
20473  * Returns: a string containing the value of the "etag:value" attribute.
20474  */
20475
20476
20477 /**
20478  * g_file_info_get_file_type:
20479  * @info: a #GFileInfo.
20480  *
20481  * Gets a file's type (whether it is a regular file, symlink, etc).
20482  * This is different from the file's content type, see g_file_info_get_content_type().
20483  *
20484  * Returns: a #GFileType for the given file.
20485  */
20486
20487
20488 /**
20489  * g_file_info_get_icon:
20490  * @info: a #GFileInfo.
20491  *
20492  * Gets the icon for a file.
20493  *
20494  * Returns: (transfer none): #GIcon for the given @info.
20495  */
20496
20497
20498 /**
20499  * g_file_info_get_is_backup:
20500  * @info: a #GFileInfo.
20501  *
20502  * Checks if a file is a backup file.
20503  *
20504  * Returns: %TRUE if file is a backup file, %FALSE otherwise.
20505  */
20506
20507
20508 /**
20509  * g_file_info_get_is_hidden:
20510  * @info: a #GFileInfo.
20511  *
20512  * Checks if a file is hidden.
20513  *
20514  * Returns: %TRUE if the file is a hidden file, %FALSE otherwise.
20515  */
20516
20517
20518 /**
20519  * g_file_info_get_is_symlink:
20520  * @info: a #GFileInfo.
20521  *
20522  * Checks if a file is a symlink.
20523  *
20524  * Returns: %TRUE if the given @info is a symlink.
20525  */
20526
20527
20528 /**
20529  * g_file_info_get_modification_time:
20530  * @info: a #GFileInfo.
20531  * @result: a #GTimeVal.
20532  *
20533  * Gets the modification time of the current @info and sets it
20534  * in @result.
20535  */
20536
20537
20538 /**
20539  * g_file_info_get_name:
20540  * @info: a #GFileInfo.
20541  *
20542  * Gets the name for a file.
20543  *
20544  * Returns: a string containing the file name.
20545  */
20546
20547
20548 /**
20549  * g_file_info_get_size:
20550  * @info: a #GFileInfo.
20551  *
20552  * Gets the file's size.
20553  *
20554  * Returns: a #goffset containing the file's size.
20555  */
20556
20557
20558 /**
20559  * g_file_info_get_sort_order:
20560  * @info: a #GFileInfo.
20561  *
20562  * Gets the value of the sort_order attribute from the #GFileInfo.
20563  * See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
20564  *
20565  * Returns: a #gint32 containing the value of the "standard::sort_order" attribute.
20566  */
20567
20568
20569 /**
20570  * g_file_info_get_symlink_target:
20571  * @info: a #GFileInfo.
20572  *
20573  * Gets the symlink target for a given #GFileInfo.
20574  *
20575  * Returns: a string containing the symlink target.
20576  */
20577
20578
20579 /**
20580  * g_file_info_has_attribute:
20581  * @info: a #GFileInfo.
20582  * @attribute: a file attribute key.
20583  *
20584  * Checks if a file info structure has an attribute named @attribute.
20585  * %FALSE otherwise.
20586  *
20587  * Returns: %TRUE if @Ginfo has an attribute named @attribute,
20588  */
20589
20590
20591 /**
20592  * g_file_info_has_namespace:
20593  * @info: a #GFileInfo.
20594  * @name_space: a file attribute namespace.
20595  *
20596  * Checks if a file info structure has an attribute in the
20597  * specified @name_space.
20598  * %FALSE otherwise.
20599  *
20600  * Returns: %TRUE if @Ginfo has an attribute in @name_space,
20601  * Since: 2.22
20602  */
20603
20604
20605 /**
20606  * g_file_info_list_attributes:
20607  * @info: a #GFileInfo.
20608  * @name_space: a file attribute key's namespace.
20609  *
20610  * Lists the file info structure's attributes.
20611  * possible attribute types for the given @name_space, or
20612  * %NULL on error.
20613  *
20614  * Returns: (array zero-terminated=1) (transfer full): a null-terminated array of strings of all of the
20615  */
20616
20617
20618 /**
20619  * g_file_info_new:
20620  *
20621  * Creates a new file info structure.
20622  *
20623  * Returns: a #GFileInfo.
20624  */
20625
20626
20627 /**
20628  * g_file_info_remove_attribute:
20629  * @info: a #GFileInfo.
20630  * @attribute: a file attribute key.
20631  *
20632  * Removes all cases of @attribute from @info if it exists.
20633  */
20634
20635
20636 /**
20637  * g_file_info_set_attribute:
20638  * @info: a #GFileInfo.
20639  * @attribute: a file attribute key.
20640  * @type: a #GFileAttributeType
20641  * @value_p: pointer to the value
20642  *
20643  * Sets the @attribute to contain the given value, if possible.
20644  */
20645
20646
20647 /**
20648  * g_file_info_set_attribute_boolean:
20649  * @info: a #GFileInfo.
20650  * @attribute: a file attribute key.
20651  * @attr_value: a boolean value.
20652  *
20653  * Sets the @attribute to contain the given @attr_value,
20654  * if possible.
20655  */
20656
20657
20658 /**
20659  * g_file_info_set_attribute_byte_string:
20660  * @info: a #GFileInfo.
20661  * @attribute: a file attribute key.
20662  * @attr_value: a byte string.
20663  *
20664  * Sets the @attribute to contain the given @attr_value,
20665  * if possible.
20666  */
20667
20668
20669 /**
20670  * g_file_info_set_attribute_int32:
20671  * @info: a #GFileInfo.
20672  * @attribute: a file attribute key.
20673  * @attr_value: a signed 32-bit integer
20674  *
20675  * Sets the @attribute to contain the given @attr_value,
20676  * if possible.
20677  */
20678
20679
20680 /**
20681  * g_file_info_set_attribute_int64:
20682  * @info: a #GFileInfo.
20683  * @attribute: attribute name to set.
20684  * @attr_value: int64 value to set attribute to.
20685  *
20686  * Sets the @attribute to contain the given @attr_value,
20687  * if possible.
20688  */
20689
20690
20691 /**
20692  * g_file_info_set_attribute_mask:
20693  * @info: a #GFileInfo.
20694  * @mask: a #GFileAttributeMatcher.
20695  *
20696  * Sets @mask on @info to match specific attribute types.
20697  */
20698
20699
20700 /**
20701  * g_file_info_set_attribute_object:
20702  * @info: a #GFileInfo.
20703  * @attribute: a file attribute key.
20704  * @attr_value: a #GObject.
20705  *
20706  * Sets the @attribute to contain the given @attr_value,
20707  * if possible.
20708  */
20709
20710
20711 /**
20712  * g_file_info_set_attribute_status:
20713  * @info: a #GFileInfo
20714  * @attribute: a file attribute key
20715  * @status: a #GFileAttributeStatus
20716  *
20717  * Sets the attribute status for an attribute key. This is only
20718  * needed by external code that implement g_file_set_attributes_from_info()
20719  * or similar functions.
20720  * The attribute must exist in @info for this to work. Otherwise %FALSE
20721  * is returned and @info is unchanged.
20722  *
20723  * Returns: %TRUE if the status was changed, %FALSE if the key was not set.
20724  * Since: 2.22
20725  */
20726
20727
20728 /**
20729  * g_file_info_set_attribute_string:
20730  * @info: a #GFileInfo.
20731  * @attribute: a file attribute key.
20732  * @attr_value: a string.
20733  *
20734  * Sets the @attribute to contain the given @attr_value,
20735  * if possible.
20736  */
20737
20738
20739 /**
20740  * g_file_info_set_attribute_stringv:
20741  * @info: a #GFileInfo.
20742  * @attribute: a file attribute key.
20743  * @attr_value: a %NULL terminated string array
20744  *
20745  * Sets the @attribute to contain the given @attr_value,
20746  * if possible.
20747  *
20748  * Sinze: 2.22
20749  */
20750
20751
20752 /**
20753  * g_file_info_set_attribute_uint32:
20754  * @info: a #GFileInfo.
20755  * @attribute: a file attribute key.
20756  * @attr_value: an unsigned 32-bit integer.
20757  *
20758  * Sets the @attribute to contain the given @attr_value,
20759  * if possible.
20760  */
20761
20762
20763 /**
20764  * g_file_info_set_attribute_uint64:
20765  * @info: a #GFileInfo.
20766  * @attribute: a file attribute key.
20767  * @attr_value: an unsigned 64-bit integer.
20768  *
20769  * Sets the @attribute to contain the given @attr_value,
20770  * if possible.
20771  */
20772
20773
20774 /**
20775  * g_file_info_set_content_type:
20776  * @info: a #GFileInfo.
20777  * @content_type: a content type. See #GContentType.
20778  *
20779  * Sets the content type attribute for a given #GFileInfo.
20780  * See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
20781  */
20782
20783
20784 /**
20785  * g_file_info_set_display_name:
20786  * @info: a #GFileInfo.
20787  * @display_name: a string containing a display name.
20788  *
20789  * Sets the display name for the current #GFileInfo.
20790  * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
20791  */
20792
20793
20794 /**
20795  * g_file_info_set_edit_name:
20796  * @info: a #GFileInfo.
20797  * @edit_name: a string containing an edit name.
20798  *
20799  * Sets the edit name for the current file.
20800  * See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
20801  */
20802
20803
20804 /**
20805  * g_file_info_set_file_type:
20806  * @info: a #GFileInfo.
20807  * @type: a #GFileType.
20808  *
20809  * Sets the file type in a #GFileInfo to @type.
20810  * See %G_FILE_ATTRIBUTE_STANDARD_TYPE.
20811  */
20812
20813
20814 /**
20815  * g_file_info_set_icon:
20816  * @info: a #GFileInfo.
20817  * @icon: a #GIcon.
20818  *
20819  * Sets the icon for a given #GFileInfo.
20820  * See %G_FILE_ATTRIBUTE_STANDARD_ICON.
20821  */
20822
20823
20824 /**
20825  * g_file_info_set_is_hidden:
20826  * @info: a #GFileInfo.
20827  * @is_hidden: a #gboolean.
20828  *
20829  * Sets the "is_hidden" attribute in a #GFileInfo according to @is_symlink.
20830  * See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
20831  */
20832
20833
20834 /**
20835  * g_file_info_set_is_symlink:
20836  * @info: a #GFileInfo.
20837  * @is_symlink: a #gboolean.
20838  *
20839  * Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
20840  * See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
20841  */
20842
20843
20844 /**
20845  * g_file_info_set_modification_tim:
20846  * @info: a #GFileInfo.
20847  * @mtime: a #GTimeVal.
20848  *
20849  * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
20850  * info to the given time value.
20851  */
20852
20853
20854 /**
20855  * g_file_info_set_name:
20856  * @info: a #GFileInfo.
20857  * @name: a string containing a name.
20858  *
20859  * Sets the name attribute for the current #GFileInfo.
20860  * See %G_FILE_ATTRIBUTE_STANDARD_NAME.
20861  */
20862
20863
20864 /**
20865  * g_file_info_set_size:
20866  * @info: a #GFileInfo.
20867  * @size: a #goffset containing the file's size.
20868  *
20869  * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
20870  * to the given size.
20871  */
20872
20873
20874 /**
20875  * g_file_info_set_sort_order:
20876  * @info: a #GFileInfo.
20877  * @sort_order: a sort order integer.
20878  *
20879  * Sets the sort order attribute in the file info structure. See
20880  * %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
20881  */
20882
20883
20884 /**
20885  * g_file_info_set_symlink_target:
20886  * @info: a #GFileInfo.
20887  * @symlink_target: a static string containing a path to a symlink target.
20888  *
20889  * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
20890  * to the given symlink target.
20891  */
20892
20893
20894 /**
20895  * g_file_info_unset_attribute_mask:
20896  * @info: #GFileInfo.
20897  *
20898  * Unsets a mask set by g_file_info_set_attribute_mask(), if one
20899  * is set.
20900  */
20901
20902
20903 /**
20904  * g_file_input_stream_query_info:
20905  * @stream: a #GFileInputStream.
20906  * @attributes: a file attribute query string.
20907  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20908  * @error: a #GError location to store the error occuring, or %NULL to ignore.
20909  *
20910  * Queries a file input stream the given @attributes. This function blocks
20911  * while querying the stream. For the asynchronous (non-blocking) version
20912  * of this function, see g_file_input_stream_query_info_async(). While the
20913  * stream is blocked, the stream will set the pending flag internally, and
20914  * any other operations on the stream will fail with %G_IO_ERROR_PENDING.
20915  *
20916  * Returns: (transfer full): a #GFileInfo, or %NULL on error.
20917  */
20918
20919
20920 /**
20921  * g_file_input_stream_query_info_async:
20922  * @stream: a #GFileInputStream.
20923  * @attributes: a file attribute query string.
20924  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
20925  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20926  * @callback: (scope async): callback to call when the request is satisfied
20927  * @user_data: (closure): the data to pass to callback function
20928  *
20929  * Queries the stream information asynchronously.
20930  * When the operation is finished @callback will be called.
20931  * You can then call g_file_input_stream_query_info_finish()
20932  * to get the result of the operation.
20933  * For the synchronous version of this function,
20934  * see g_file_input_stream_query_info().
20935  * If @cancellable is not %NULL, then the operation can be cancelled by
20936  * triggering the cancellable object from another thread. If the operation
20937  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set
20938  */
20939
20940
20941 /**
20942  * g_file_input_stream_query_info_finish:
20943  * @stream: a #GFileInputStream.
20944  * @result: a #GAsyncResult.
20945  * @error: a #GError location to store the error occuring, or %NULL to ignore.
20946  *
20947  * Finishes an asynchronous info query operation.
20948  *
20949  * Returns: (transfer full): #GFileInfo.
20950  */
20951
20952
20953 /**
20954  * g_file_io_stream_get_etag:
20955  * @stream: a #GFileIOStream.
20956  *
20957  * Gets the entity tag for the file when it has been written.
20958  * This must be called after the stream has been written
20959  * and closed, as the etag can change while writing.
20960  *
20961  * Returns: the entity tag for the stream.
20962  * Since: 2.22
20963  */
20964
20965
20966 /**
20967  * g_file_io_stream_query_info:
20968  * @stream: a #GFileIOStream.
20969  * @attributes: a file attribute query string.
20970  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20971  * @error: a #GError, %NULL to ignore.
20972  *
20973  * Queries a file io stream for the given @attributes.
20974  * This function blocks while querying the stream. For the asynchronous
20975  * version of this function, see g_file_io_stream_query_info_async().
20976  * While the stream is blocked, the stream will set the pending flag
20977  * internally, and any other operations on the stream will fail with
20978  * %G_IO_ERROR_PENDING.
20979  * Can fail if the stream was already closed (with @error being set to
20980  * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
20981  * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
20982  * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I
20983  * all cases of failure, %NULL will be returned.
20984  * If @cancellable is not %NULL, then the operation can be cancelled by
20985  * triggering the cancellable object from another thread. If the operation
20986  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
20987  * be returned.
20988  *
20989  * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
20990  * Since: 2.22
20991  */
20992
20993
20994 /**
20995  * g_file_io_stream_query_info_async:
20996  * @stream: a #GFileIOStream.
20997  * @attributes: a file attribute query string.
20998  * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
20999  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21000  * @callback: (scope async): callback to call when the request is satisfied
21001  * @user_data: (closure): the data to pass to callback function
21002  *
21003  * Asynchronously queries the @stream for a #GFileInfo. When completed,
21004  * finish the operation with g_file_io_stream_query_info_finish().
21005  * For the synchronous version of this function, see
21006  * g_file_io_stream_query_info().
21007  *
21008  * Since: 2.22
21009  */
21010
21011
21012 /**
21013  * g_file_io_stream_query_info_finish:
21014  * @stream: a #GFileIOStream.
21015  * @result: a #GAsyncResult.
21016  * @error: a #GError, %NULL to ignore.
21017  *
21018  * Finalizes the asynchronous query started
21019  * by g_file_io_stream_query_info_async().
21020  *
21021  * Returns: (transfer full): A #GFileInfo for the finished query.
21022  * Since: 2.22
21023  */
21024
21025
21026 /**
21027  * g_file_is_native:
21028  * @file: input #GFile.
21029  *
21030  * Checks to see if a file is native to the platform.
21031  * A native file s one expressed in the platform-native filename format,
21032  * e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
21033  * as it might be on a locally mounted remote filesystem.
21034  * On some systems non-native files may be available using
21035  * the native filesystem via a userspace filesystem (FUSE), in
21036  * these cases this call will return %FALSE, but g_file_get_path()
21037  * will still return a native path.
21038  * This call does no blocking i/o.
21039  *
21040  * Returns: %TRUE if file is native.
21041  */
21042
21043
21044 /**
21045  * g_file_load_contents:
21046  * @file: input #GFile.
21047  * @cancellable: optional #GCancellable object, %NULL to ignore.
21048  * @contents: (out) (transfer full): a location to place the contents of the file.
21049  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
21050  * @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
21051  * @error: a #GError, or %NULL
21052  *
21053  * Loads the content of the file into memory. The data is always
21054  * zero-terminated, but this is not included in the resultant @length.
21055  * The returned @content should be freed with g_free() when no longer
21056  * needed.
21057  * If @cancellable is not %NULL, then the operation can be cancelled by
21058  * triggering the cancellable object from another thread. If the operation
21059  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21060  * %FALSE if there were errors.
21061  *
21062  * Returns: %TRUE if the @file's contents were successfully loaded.
21063  */
21064
21065
21066 /**
21067  * g_file_load_contents_async:
21068  * @file: input #GFile.
21069  * @cancellable: optional #GCancellable object, %NULL to ignore.
21070  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
21071  * @user_data: the data to pass to callback function
21072  *
21073  * Starts an asynchronous load of the @file's contents.
21074  * For more details, see g_file_load_contents() which is
21075  * the synchronous version of this call.
21076  * When the load operation has completed, @callback will be called
21077  * with @user data. To finish the operation, call
21078  * g_file_load_contents_finish() with the #GAsyncResult returned by
21079  * the @callback.
21080  * If @cancellable is not %NULL, then the operation can be cancelled by
21081  * triggering the cancellable object from another thread. If the operation
21082  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21083  */
21084
21085
21086 /**
21087  * g_file_load_contents_finish:
21088  * @file: input #GFile.
21089  * @res: a #GAsyncResult.
21090  * @contents: (out) (transfer full): a location to place the contents of the file.
21091  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
21092  * @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
21093  * @error: a #GError, or %NULL
21094  *
21095  * Finishes an asynchronous load of the @file's contents.
21096  * The contents are placed in @contents, and @length is set to the
21097  * size of the @contents string. The @content should be freed with
21098  * g_free() when no longer needed. If @etag_out is present, it will be
21099  * set to the new entity tag for the @file.
21100  * present, it will be set appropriately.
21101  *
21102  * Returns: %TRUE if the load was successful. If %FALSE and @error is
21103  */
21104
21105
21106 /**
21107  * g_file_load_partial_contents_async: (skip)
21108  * @file: input #GFile.
21109  * @cancellable: optional #GCancellable object, %NULL to ignore.
21110  * @read_more_callback: a #GFileReadMoreCallback to receive partial data and to specify whether further data should be read.
21111  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
21112  * @user_data: the data to pass to the callback functions.
21113  *
21114  * Reads the partial contents of a file. A #GFileReadMoreCallback should be
21115  * used to stop reading from the file when appropriate, else this function
21116  * will behave exactly as g_file_load_contents_async(). This operation
21117  * can be finished by g_file_load_partial_contents_finish().
21118  * Users of this function should be aware that @user_data is passed to
21119  * both the @read_more_callback and the @callback.
21120  * If @cancellable is not %NULL, then the operation can be cancelled by
21121  * triggering the cancellable object from another thread. If the operation
21122  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21123  */
21124
21125
21126 /**
21127  * g_file_load_partial_contents_finish:
21128  * @file: input #GFile.
21129  * @res: a #GAsyncResult.
21130  * @contents: (out) (transfer full): a location to place the contents of the file.
21131  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
21132  * @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
21133  * @error: a #GError, or %NULL
21134  *
21135  * Finishes an asynchronous partial load operation that was started
21136  * with g_file_load_partial_contents_async(). The data is always
21137  * zero-terminated, but this is not included in the resultant @length.
21138  * The returned @content should be freed with g_free() when no longer
21139  * needed.
21140  * present, it will be set appropriately.
21141  *
21142  * Returns: %TRUE if the load was successful. If %FALSE and @error is
21143  */
21144
21145
21146 /**
21147  * g_file_make_director:
21148  * @file: input #GFile.
21149  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21150  * @error: a #GError, or %NULL
21151  *
21152  * Creates a directory. Note that this will only create a child directory of
21153  * the immediate parent directory of the path or URI given by the #GFile. To
21154  * recursively create directories, see g_file_make_directory_with_parents().
21155  * This function will fail if the parent directory does not exist, setting
21156  * directories, this function will fail, setting @error to
21157  * %G_IO_ERROR_NOT_SUPPORTED.
21158  * For a local #GFile the newly created directory will have the default
21159  * (current) ownership and permissions of the current process.
21160  * If @cancellable is not %NULL, then the operation can be cancelled by
21161  * triggering the cancellable object from another thread. If the operation
21162  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21163  *
21164  * Returns: %TRUE on successful creation, %FALSE otherwise.
21165  */
21166
21167
21168 /**
21169  * g_file_make_directory_with_parents:
21170  * @file: input #GFile.
21171  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21172  * @error: a #GError, or %NULL
21173  *
21174  * Creates a directory and any parent directories that may not exist similar to
21175  * 'mkdir -p'. If the file system does not support creating directories, this
21176  * function will fail, setting @error to %G_IO_ERROR_NOT_SUPPORTED.
21177  * For a local #GFile the newly created directories will have the default
21178  * (current) ownership and permissions of the current process.
21179  * If @cancellable is not %NULL, then the operation can be cancelled by
21180  * triggering the cancellable object from another thread. If the operation
21181  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21182  * otherwise.
21183  *
21184  * Returns: %TRUE if all directories have been successfully created, %FALSE
21185  * Since: 2.18
21186  */
21187
21188
21189 /**
21190  * g_file_make_symbolic_link:
21191  * @file: a #GFile with the name of the symlink to create
21192  * @symlink_value: a string with the path for the target of the new symlink
21193  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21194  * @error: a #GError.
21195  *
21196  * Creates a symbolic link named @file which contains the string
21197  * If @cancellable is not %NULL, then the operation can be cancelled by
21198  * triggering the cancellable object from another thread. If the operation
21199  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21200  *
21201  * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise.
21202  */
21203
21204
21205 /**
21206  * g_file_monitor:
21207  * @file: input #GFile
21208  * @flags: a set of #GFileMonitorFlags
21209  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
21210  * @error: a #GError, or %NULL
21211  *
21212  * Obtains a file or directory monitor for the given file, depending
21213  * on the type of the file.
21214  * If @cancellable is not %NULL, then the operation can be cancelled by
21215  * triggering the cancellable object from another thread. If the operation
21216  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21217  * Free the returned object with g_object_unref().
21218  *
21219  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
21220  * Since: 2.18
21221  */
21222
21223
21224 /**
21225  * g_file_monitor_cancel:
21226  * @monitor: a #GFileMonitor.
21227  *
21228  * Cancels a file monitor.
21229  *
21230  * Returns: %TRUE if monitor was cancelled.
21231  */
21232
21233
21234 /**
21235  * g_file_monitor_directory:
21236  * @file: input #GFile.
21237  * @flags: a set of #GFileMonitorFlags.
21238  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21239  * @error: a #GError, or %NULL.
21240  *
21241  * Obtains a directory monitor for the given file.
21242  * This may fail if directory monitoring is not supported.
21243  * If @cancellable is not %NULL, then the operation can be cancelled by
21244  * triggering the cancellable object from another thread. If the operation
21245  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21246  * Free the returned object with g_object_unref().
21247  *
21248  * Virtual: monitor_dir
21249  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
21250  */
21251
21252
21253 /**
21254  * g_file_monitor_emit_event:
21255  * @monitor: a #GFileMonitor.
21256  * @child: a #GFile.
21257  * @other_file: a #GFile.
21258  * @event_type: a set of #GFileMonitorEvent flags.
21259  *
21260  * Emits the #GFileMonitor::changed signal if a change
21261  * has taken place. Should be called from file monitor
21262  * implementations only.
21263  * The signal will be emitted from an idle handler (in the <link
21264  * linkend="g-main-context-push-thread-default">thread-default main
21265  * context</link>).
21266  */
21267
21268
21269 /**
21270  * g_file_monitor_file:
21271  * @file: input #GFile.
21272  * @flags: a set of #GFileMonitorFlags.
21273  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21274  * @error: a #GError, or %NULL.
21275  *
21276  * Obtains a file monitor for the given file. If no file notification
21277  * mechanism exists, then regular polling of the file is used.
21278  * If @cancellable is not %NULL, then the operation can be cancelled by
21279  * triggering the cancellable object from another thread. If the operation
21280  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21281  * Free the returned object with g_object_unref().
21282  *
21283  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
21284  */
21285
21286
21287 /**
21288  * g_file_monitor_is_cancelled:
21289  * @monitor: a #GFileMonitor
21290  *
21291  * Returns whether the monitor is canceled.
21292  *
21293  * Returns: %TRUE if monitor is canceled. %FALSE otherwise.
21294  */
21295
21296
21297 /**
21298  * g_file_monitor_set_rate_limit:
21299  * @monitor: a #GFileMonitor.
21300  * @limit_msecs: a non-negative integer with the limit in milliseconds to poll for changes
21301  *
21302  * Sets the rate limit to which the @monitor will report
21303  * consecutive change events to the same file.
21304  */
21305
21306
21307 /**
21308  * g_file_mount_enclosing_volume:
21309  * @location: input #GFile.
21310  * @flags: flags affecting the operation
21311  * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
21312  * @cancellable: optional #GCancellable object, %NULL to ignore.
21313  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
21314  * @user_data: the data to pass to callback function
21315  *
21316  * Starts a @mount_operation, mounting the volume that contains the file @location.
21317  * When this operation has completed, @callback will be called with
21318  * g_file_mount_enclosing_volume_finish().
21319  * If @cancellable is not %NULL, then the operation can be cancelled by
21320  * triggering the cancellable object from another thread. If the operation
21321  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21322  */
21323
21324
21325 /**
21326  * g_file_mount_enclosing_volume_finish:
21327  * @location: input #GFile.
21328  * @result: a #GAsyncResult.
21329  * @error: a #GError, or %NULL
21330  *
21331  * Finishes a mount operation started by g_file_mount_enclosing_volume().
21332  * has occurred, this function will return %FALSE and set @error
21333  * appropriately if present.
21334  *
21335  * Returns: %TRUE if successful. If an error
21336  */
21337
21338
21339 /**
21340  * g_file_mount_mountable:
21341  * @file: input #GFile.
21342  * @flags: flags affecting the operation
21343  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
21344  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21345  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
21346  * @user_data: (closure): the data to pass to callback function
21347  *
21348  * Mounts a file of type G_FILE_TYPE_MOUNTABLE.
21349  * Using @mount_operation, you can request callbacks when, for instance,
21350  * passwords are needed during authentication.
21351  * If @cancellable is not %NULL, then the operation can be cancelled by
21352  * triggering the cancellable object from another thread. If the operation
21353  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21354  * When the operation is finished, @callback will be called. You can then call
21355  * g_file_mount_mountable_finish() to get the result of the operation.
21356  */
21357
21358
21359 /**
21360  * g_file_mount_mountable_finish:
21361  * @file: input #GFile.
21362  * @result: a #GAsyncResult.
21363  * @error: a #GError, or %NULL
21364  *
21365  * Finishes a mount operation. See g_file_mount_mountable() for details.
21366  * Finish an asynchronous mount operation that was started
21367  * with g_file_mount_mountable().
21368  * Free the returned object with g_object_unref().
21369  *
21370  * Returns: (transfer full): a #GFile or %NULL on error.
21371  */
21372
21373
21374 /**
21375  * g_file_move:
21376  * @source: #GFile pointing to the source location.
21377  * @destination: #GFile pointing to the destination location.
21378  * @flags: set of #GFileCopyFlags.
21379  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21380  * @progress_callback: (scope call): #GFileProgressCallback function for updates.
21381  * @progress_callback_data: (closure): gpointer to user data for the callback function.
21382  * @error: #GError for returning error conditions, or %NULL
21383  *
21384  * Tries to move the file or directory @source to the location specified by @destination.
21385  * If native move operations are supported then this is used, otherwise a copy + delete
21386  * fallback is used. The native implementation may support moving directories (for instance
21387  * on moves inside the same filesystem), but the fallback code does not.
21388  * If the flag #G_FILE_COPY_OVERWRITE is specified an already
21389  * existing @destination file is overwritten.
21390  * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
21391  * will be copied as symlinks, otherwise the target of the
21392  * If @cancellable is not %NULL, then the operation can be cancelled by
21393  * triggering the cancellable object from another thread. If the operation
21394  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21395  * If @progress_callback is not %NULL, then the operation can be monitored by
21396  * setting this to a #GFileProgressCallback function. @progress_callback_data
21397  * will be passed to this function. It is guaranteed that this callback will
21398  * be called after all data has been transferred with the total number of bytes
21399  * copied during the operation.
21400  * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
21401  * error is returned, independent on the status of the @destination.
21402  * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
21403  * error G_IO_ERROR_EXISTS is returned.
21404  * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
21405  * error is returned. If trying to overwrite a directory with a directory the
21406  * G_IO_ERROR_WOULD_MERGE error is returned.
21407  * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
21408  * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
21409  * may be returned (if the native move operation isn't available).
21410  *
21411  * Returns: %TRUE on successful move, %FALSE otherwise.
21412  */
21413
21414
21415 /**
21416  * g_file_new_for_commandline_arg:
21417  * @arg: a command line string.
21418  *
21419  * Creates a #GFile with the given argument from the command line. The value of
21420  * relative to the current working directory.
21421  * This operation never fails, but the returned object might not support any
21422  * I/O operation if @arg points to a malformed path.
21423  *
21424  * Returns: (transfer full): a new #GFile.
21425  */
21426
21427
21428 /**
21429  * g_file_new_for_path:
21430  * @path: a string containing a relative or absolute path. The string must be encoded in the glib filename encoding.
21431  *
21432  * Constructs a #GFile for a given path. This operation never
21433  * fails, but the returned object might not support any I/O
21434  * operation if @path is malformed.
21435  *
21436  * Returns: (transfer full): a new #GFile for the given @path.
21437  */
21438
21439
21440 /**
21441  * g_file_new_for_uri:
21442  * @uri: a UTF8 string containing a URI.
21443  *
21444  * Constructs a #GFile for a given URI. This operation never
21445  * fails, but the returned object might not support any I/O
21446  * operation if @uri is malformed or if the uri type is
21447  * not supported.
21448  *
21449  * Returns: (transfer full): a #GFile for the given @uri.
21450  */
21451
21452
21453 /**
21454  * g_file_open_readwrite:
21455  * @file: #GFile to open
21456  * @cancellable: (allow-none): a #GCancellable
21457  * @error: a #GError, or %NULL
21458  *
21459  * Opens an existing file for reading and writing. The result is
21460  * a #GFileIOStream that can be used to read and write the contents of the file.
21461  * If @cancellable is not %NULL, then the operation can be cancelled by
21462  * triggering the cancellable object from another thread. If the operation
21463  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21464  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
21465  * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
21466  * Other errors are possible too, and depend on what kind of filesystem the file is on.
21467  * Note that in many non-local file cases read and write streams are not supported,
21468  * so make sure you really need to do read and write streaming, rather than
21469  * just opening for reading or writing.
21470  * Free the returned object with g_object_unref().
21471  *
21472  * Returns: (transfer full): #GFileIOStream or %NULL on error.
21473  * Since: 2.22
21474  */
21475
21476
21477 /**
21478  * g_file_open_readwrite_async:
21479  * @file: input #GFile.
21480  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21481  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21482  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21483  * @user_data: (closure): the data to pass to callback function
21484  *
21485  * Asynchronously opens @file for reading and writing.
21486  * For more details, see g_file_open_readwrite() which is
21487  * the synchronous version of this call.
21488  * When the operation is finished, @callback will be called. You can then call
21489  * g_file_open_readwrite_finish() to get the result of the operation.
21490  *
21491  * Since: 2.22
21492  */
21493
21494
21495 /**
21496  * g_file_open_readwrite_finish:
21497  * @file: input #GFile.
21498  * @res: a #GAsyncResult.
21499  * @error: a #GError, or %NULL
21500  *
21501  * Finishes an asynchronous file read operation started with
21502  * g_file_open_readwrite_async().
21503  * Free the returned object with g_object_unref().
21504  *
21505  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
21506  * Since: 2.22
21507  */
21508
21509
21510 /**
21511  * g_file_output_stream_get_etag:
21512  * @stream: a #GFileOutputStream.
21513  *
21514  * Gets the entity tag for the file when it has been written.
21515  * This must be called after the stream has been written
21516  * and closed, as the etag can change while writing.
21517  *
21518  * Returns: the entity tag for the stream.
21519  */
21520
21521
21522 /**
21523  * g_file_output_stream_query_info:
21524  * @stream: a #GFileOutputStream.
21525  * @attributes: a file attribute query string.
21526  * @cancellable: optional #GCancellable object, %NULL to ignore.
21527  * @error: a #GError, %NULL to ignore.
21528  *
21529  * Queries a file output stream for the given @attributes.
21530  * This function blocks while querying the stream. For the asynchronous
21531  * version of this function, see g_file_output_stream_query_info_async().
21532  * While the stream is blocked, the stream will set the pending flag
21533  * internally, and any other operations on the stream will fail with
21534  * %G_IO_ERROR_PENDING.
21535  * Can fail if the stream was already closed (with @error being set to
21536  * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
21537  * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
21538  * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
21539  * all cases of failure, %NULL will be returned.
21540  * If @cancellable is not %NULL, then the operation can be cancelled by
21541  * triggering the cancellable object from another thread. If the operation
21542  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
21543  * be returned.
21544  *
21545  * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
21546  */
21547
21548
21549 /**
21550  * g_file_output_stream_query_info_async:
21551  * @stream: a #GFileOutputStream.
21552  * @attributes: a file attribute query string.
21553  * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
21554  * @cancellable: optional #GCancellable object, %NULL to ignore.
21555  * @callback: callback to call when the request is satisfied
21556  * @user_data: the data to pass to callback function
21557  *
21558  * Asynchronously queries the @stream for a #GFileInfo. When completed,
21559  * finish the operation with g_file_output_stream_query_info_finish().
21560  * For the synchronous version of this function, see
21561  * g_file_output_stream_query_info().
21562  */
21563
21564
21565 /**
21566  * g_file_output_stream_query_info_finish:
21567  * @stream: a #GFileOutputStream.
21568  * @result: a #GAsyncResult.
21569  * @error: a #GError, %NULL to ignore.
21570  *
21571  * Finalizes the asynchronous query started
21572  * by g_file_output_stream_query_info_async().
21573  *
21574  * Returns: (transfer full): A #GFileInfo for the finished query.
21575  */
21576
21577
21578 /**
21579  * g_file_parse_name:
21580  * @parse_name: a file name or path to be parsed.
21581  *
21582  * Constructs a #GFile with the given @parse_name (i.e. something given by g_file_get_parse_name()).
21583  * This operation never fails, but the returned object might not support any I/O
21584  * operation if the @parse_name cannot be parsed.
21585  *
21586  * Returns: (transfer full): a new #GFile.
21587  */
21588
21589
21590 /**
21591  * g_file_poll_mountable:
21592  * @file: input #GFile.
21593  * @cancellable: optional #GCancellable object, %NULL to ignore.
21594  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
21595  * @user_data: the data to pass to callback function
21596  *
21597  * Polls a file of type G_FILE_TYPE_MOUNTABLE.
21598  * If @cancellable is not %NULL, then the operation can be cancelled by
21599  * triggering the cancellable object from another thread. If the operation
21600  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21601  * When the operation is finished, @callback will be called. You can then call
21602  * g_file_mount_mountable_finish() to get the result of the operation.
21603  *
21604  * Since: 2.22
21605  */
21606
21607
21608 /**
21609  * g_file_poll_mountable_finish:
21610  * @file: input #GFile.
21611  * @result: a #GAsyncResult.
21612  * @error: a #GError, or %NULL
21613  *
21614  * Finishes a poll operation. See g_file_poll_mountable() for details.
21615  * Finish an asynchronous poll operation that was polled
21616  * with g_file_poll_mountable().
21617  * otherwise.
21618  *
21619  * Returns: %TRUE if the operation finished successfully. %FALSE
21620  * Since: 2.22
21621  */
21622
21623
21624 /**
21625  * g_file_query_default_handler:
21626  * @file: a #GFile to open.
21627  * @cancellable: optional #GCancellable object, %NULL to ignore.
21628  * @error: a #GError, or %NULL
21629  *
21630  * Returns the #GAppInfo that is registered as the default
21631  * application to handle the file specified by @file.
21632  * If @cancellable is not %NULL, then the operation can be cancelled by
21633  * triggering the cancellable object from another thread. If the operation
21634  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21635  * When you are done with it, release it with g_object_unref()
21636  *
21637  * Returns: (transfer full): a #GAppInfo if the handle was found, %NULL if there were errors.
21638  */
21639
21640
21641 /**
21642  * g_file_query_exists:
21643  * @file: input #GFile.
21644  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21645  *
21646  * Utility function to check if a particular file exists. This is
21647  * implemented using g_file_query_info() and as such does blocking I/O.
21648  * Note that in many cases it is racy to first check for file existence
21649  * and then execute something based on the outcome of that, because the
21650  * file might have been created or removed in between the operations. The
21651  * general approach to handling that is to not check, but just do the
21652  * operation and handle the errors as they come.
21653  * As an example of race-free checking, take the case of reading a file, and
21654  * can both result in two processes creating the file (with perhaps a partially
21655  * written file as the result). The correct approach is to always try to create
21656  * the file with g_file_create() which will either atomically create the file
21657  * or fail with a G_IO_ERROR_EXISTS error.
21658  * However, in many cases an existence check is useful in a user
21659  * interface, for instance to make a menu item sensitive/insensitive, so that
21660  * you don't have to fool users that something is possible and then just show
21661  * and error dialog. If you do this, you should make sure to also handle the
21662  * errors that can happen due to races when you execute the operation.
21663  *
21664  * If it doesn't exist, creating it. there are two racy versions: read it, and
21665  * On error create it; and: check if it exists, if not create it. These
21666  * Returns: %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled).
21667  */
21668
21669
21670 /**
21671  * g_file_query_file_type:
21672  * @file: input #GFile.
21673  * @flags: a set of #GFileQueryInfoFlags passed to g_file_query_info().
21674  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21675  *
21676  * Utility function to inspect the #GFileType of a file. This is
21677  * implemented using g_file_query_info() and as such does blocking I/O.
21678  * The primary use case of this method is to check if a file is a regular file,
21679  * directory, or symlink.
21680  * does not exist
21681  *
21682  * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN if the file
21683  * Since: 2.18
21684  */
21685
21686
21687 /**
21688  * g_file_query_filesystem_info:
21689  * @file: input #GFile.
21690  * @attributes: an attribute query string.
21691  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21692  * @error: a #GError.
21693  *
21694  * Similar to g_file_query_info(), but obtains information
21695  * about the filesystem the @file is on, rather than the file itself.
21696  * For instance the amount of space available and the type of
21697  * the filesystem.
21698  * The @attributes value is a string that specifies the file attributes that
21699  * should be gathered. It is not an error if it's not possible to read a particular
21700  * requested attribute from a file - it just won't be set. @attributes should
21701  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
21702  * means all attributes, and a wildcard like "fs:*" means all attributes in the fs
21703  * namespace. The standard namespace for filesystem attributes is "fs".
21704  * Common attributes of interest are #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE
21705  * (the total size of the filesystem in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of
21706  * bytes available), and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
21707  * If @cancellable is not %NULL, then the operation can be cancelled by
21708  * triggering the cancellable object from another thread. If the operation
21709  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21710  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
21711  * Other errors are possible too, and depend on what kind of filesystem the file is on.
21712  * Free the returned object with g_object_unref().
21713  *
21714  * Returns: (transfer full): a #GFileInfo or %NULL if there was an error.
21715  */
21716
21717
21718 /**
21719  * g_file_query_filesystem_info_async:
21720  * @file: input #GFile.
21721  * @attributes: an attribute query string.
21722  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21723  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21724  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21725  * @user_data: (closure): the data to pass to callback function
21726  *
21727  * Asynchronously gets the requested information about the filesystem
21728  * that the specified @file is on. The result is a #GFileInfo object
21729  * that contains key-value attributes (such as type or size for the
21730  * file).
21731  * For more details, see g_file_query_filesystem_info() which is the
21732  * synchronous version of this call.
21733  * When the operation is finished, @callback will be called. You can
21734  * then call g_file_query_info_finish() to get the result of the
21735  * operation.
21736  */
21737
21738
21739 /**
21740  * g_file_query_filesystem_info_finish:
21741  * @file: input #GFile.
21742  * @res: a #GAsyncResult.
21743  * @error: a #GError.
21744  *
21745  * Finishes an asynchronous filesystem info query.  See
21746  * g_file_query_filesystem_info_async().
21747  * Free the returned object with g_object_unref().
21748  *
21749  * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
21750  */
21751
21752
21753 /**
21754  * g_file_query_info:
21755  * @file: input #GFile.
21756  * @attributes: an attribute query string.
21757  * @flags: a set of #GFileQueryInfoFlags.
21758  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21759  * @error: a #GError.
21760  *
21761  * Gets the requested information about specified @file. The result
21762  * is a #GFileInfo object that contains key-value attributes (such as
21763  * the type or size of the file).
21764  * The @attributes value is a string that specifies the file attributes that
21765  * should be gathered. It is not an error if it's not possible to read a particular
21766  * requested attribute from a file - it just won't be set. @attributes should
21767  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
21768  * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
21769  * namespace. An example attribute query be "standard::*,owner::user".
21770  * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
21771  * If @cancellable is not %NULL, then the operation can be cancelled by
21772  * triggering the cancellable object from another thread. If the operation
21773  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21774  * For symlinks, normally the information about the target of the
21775  * symlink is returned, rather than information about the symlink itself.
21776  * However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in @flags the
21777  * information about the symlink itself will be returned. Also, for symlinks
21778  * that point to non-existing files the information about the symlink itself
21779  * will be returned.
21780  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
21781  * Other errors are possible too, and depend on what kind of filesystem the file is on.
21782  * Free the returned object with g_object_unref().
21783  *
21784  * Returns: (transfer full): a #GFileInfo for the given @file, or %NULL on error.
21785  */
21786
21787
21788 /**
21789  * g_file_query_info_async:
21790  * @file: input #GFile.
21791  * @attributes: an attribute query string.
21792  * @flags: a set of #GFileQueryInfoFlags.
21793  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21794  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21795  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21796  * @user_data: (closure): the data to pass to callback function
21797  *
21798  * Asynchronously gets the requested information about specified @file. The result
21799  * is a #GFileInfo object that contains key-value attributes (such as type or size
21800  * for the file).
21801  * For more details, see g_file_query_info() which is
21802  * the synchronous version of this call.
21803  * When the operation is finished, @callback will be called. You can then call
21804  * g_file_query_info_finish() to get the result of the operation.
21805  */
21806
21807
21808 /**
21809  * g_file_query_info_finish:
21810  * @file: input #GFile.
21811  * @res: a #GAsyncResult.
21812  * @error: a #GError.
21813  *
21814  * Finishes an asynchronous file info query.
21815  * See g_file_query_info_async().
21816  * Free the returned object with g_object_unref().
21817  *
21818  * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
21819  */
21820
21821
21822 /**
21823  * g_file_query_settable_attributes:
21824  * @file: input #GFile.
21825  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21826  * @error: a #GError, or %NULL
21827  *
21828  * Obtain the list of settable attributes for the file.
21829  * Returns the type and full attribute name of all the attributes
21830  * that can be set on this file. This doesn't mean setting it will always
21831  * succeed though, you might get an access failure, or some specific
21832  * file may not support a specific attribute.
21833  * If @cancellable is not %NULL, then the operation can be cancelled by
21834  * triggering the cancellable object from another thread. If the operation
21835  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21836  * When you are done with it, release it with g_file_attribute_info_list_unref()
21837  *
21838  * Returns: a #GFileAttributeInfoList describing the settable attributes.
21839  */
21840
21841
21842 /**
21843  * g_file_query_writable_namespaces:
21844  * @file: input #GFile.
21845  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21846  * @error: a #GError, or %NULL
21847  *
21848  * Obtain the list of attribute namespaces where new attributes
21849  * can be created by a user. An example of this is extended
21850  * attributes (in the "xattr" namespace).
21851  * If @cancellable is not %NULL, then the operation can be cancelled by
21852  * triggering the cancellable object from another thread. If the operation
21853  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21854  * When you are done with it, release it with g_file_attribute_info_list_unref()
21855  *
21856  * Returns: a #GFileAttributeInfoList describing the writable namespaces.
21857  */
21858
21859
21860 /**
21861  * g_file_read:
21862  * @file: #GFile to read.
21863  * @cancellable: (allow-none): a #GCancellable
21864  * @error: a #GError, or %NULL
21865  *
21866  * Opens a file for reading. The result is a #GFileInputStream that
21867  * can be used to read the contents of the file.
21868  * If @cancellable is not %NULL, then the operation can be cancelled by
21869  * triggering the cancellable object from another thread. If the operation
21870  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21871  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
21872  * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
21873  * Other errors are possible too, and depend on what kind of filesystem the file is on.
21874  * Free the returned object with g_object_unref().
21875  *
21876  * Virtual: read_fn
21877  * Returns: (transfer full): #GFileInputStream or %NULL on error.
21878  */
21879
21880
21881 /**
21882  * g_file_read_async:
21883  * @file: input #GFile
21884  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21885  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21886  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21887  * @user_data: (closure): the data to pass to callback function
21888  *
21889  * Asynchronously opens @file for reading.
21890  * For more details, see g_file_read() which is
21891  * the synchronous version of this call.
21892  * When the operation is finished, @callback will be called. You can then call
21893  * g_file_read_finish() to get the result of the operation.
21894  */
21895
21896
21897 /**
21898  * g_file_read_finish:
21899  * @file: input #GFile.
21900  * @res: a #GAsyncResult.
21901  * @error: a #GError, or %NULL
21902  *
21903  * Finishes an asynchronous file read operation started with
21904  * g_file_read_async().
21905  * Free the returned object with g_object_unref().
21906  *
21907  * Returns: (transfer full): a #GFileInputStream or %NULL on error.
21908  */
21909
21910
21911 /**
21912  * g_file_replace:
21913  * @file: input #GFile.
21914  * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore.
21915  * @make_backup: %TRUE if a backup should be created.
21916  * @flags: a set of #GFileCreateFlags.
21917  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21918  * @error: a #GError, or %NULL
21919  *
21920  * Returns an output stream for overwriting the file, possibly
21921  * creating a backup copy of the file first. If the file doesn't exist,
21922  * it will be created.
21923  * This will try to replace the file in the safest way possible so
21924  * that any errors during the writing will not affect an already
21925  * existing copy of the file. For instance, for local files it
21926  * may write to a temporary file and then atomically rename over
21927  * the destination when the stream is closed.
21928  * By default files created are generally readable by everyone,
21929  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
21930  * will be made readable only to the current user, to the level that
21931  * is supported on the target filesystem.
21932  * If @cancellable is not %NULL, then the operation can be cancelled by
21933  * triggering the cancellable object from another thread. If the operation
21934  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21935  * If you pass in a non-#NULL @etag value, then this value is
21936  * compared to the current entity tag of the file, and if they differ
21937  * an G_IO_ERROR_WRONG_ETAG error is returned. This generally means
21938  * that the file has been changed since you last read it. You can get
21939  * the new etag from g_file_output_stream_get_etag() after you've
21940  * finished writing and closed the #GFileOutputStream. When you load
21941  * a new file you can use g_file_input_stream_query_info() to get
21942  * the etag of the file.
21943  * If @make_backup is %TRUE, this function will attempt to make a backup
21944  * of the current file before overwriting it. If this fails a G_IO_ERROR_CANT_CREATE_BACKUP
21945  * error will be returned. If you want to replace anyway, try again with
21946  * If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned,
21947  * and if the file is some other form of non-regular file then a
21948  * G_IO_ERROR_NOT_REGULAR_FILE error will be returned.
21949  * Some file systems don't allow all file names, and may
21950  * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
21951  * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
21952  * Other errors are possible too, and depend on what kind of
21953  * filesystem the file is on.
21954  * Free the returned object with g_object_unref().
21955  *
21956  * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
21957  */
21958
21959
21960 /**
21961  * g_file_replace_async:
21962  * @file: input #GFile.
21963  * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
21964  * @make_backup: %TRUE if a backup should be created.
21965  * @flags: a set of #GFileCreateFlags.
21966  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21967  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21968  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21969  * @user_data: (closure): the data to pass to callback function
21970  *
21971  * Asynchronously overwrites the file, replacing the contents, possibly
21972  * creating a backup copy of the file first.
21973  * For more details, see g_file_replace() which is
21974  * the synchronous version of this call.
21975  * When the operation is finished, @callback will be called. You can then call
21976  * g_file_replace_finish() to get the result of the operation.
21977  */
21978
21979
21980 /**
21981  * g_file_replace_contents:
21982  * @file: input #GFile.
21983  * @contents: a string containing the new contents for @file.
21984  * @length: the length of @contents in bytes.
21985  * @etag: (allow-none): the old <link linkend="gfile-etag">entity tag</link> for the document, or %NULL
21986  * @make_backup: %TRUE if a backup should be created.
21987  * @flags: a set of #GFileCreateFlags.
21988  * @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
21989  * @cancellable: optional #GCancellable object, %NULL to ignore.
21990  * @error: a #GError, or %NULL
21991  *
21992  * Replaces the contents of @file with @contents of @length bytes.
21993  * If @etag is specified (not %NULL) any existing file must have that etag, or
21994  * the error %G_IO_ERROR_WRONG_ETAG will be returned.
21995  * If @make_backup is %TRUE, this function will attempt to make a backup of @file.
21996  * If @cancellable is not %NULL, then the operation can be cancelled by
21997  * triggering the cancellable object from another thread. If the operation
21998  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21999  * The returned @new_etag can be used to verify that the file hasn't changed the
22000  * next time it is saved over.
22001  * has occurred, this function will return %FALSE and set @error
22002  * appropriately if present.
22003  *
22004  * Returns: %TRUE if successful. If an error
22005  */
22006
22007
22008 /**
22009  * g_file_replace_contents_async:
22010  * @file: input #GFile.
22011  * @contents: string of contents to replace the file with.
22012  * @length: the length of @contents in bytes.
22013  * @etag: (allow-none): a new <link linkend="gfile-etag">entity tag</link> for the @file, or %NULL
22014  * @make_backup: %TRUE if a backup should be created.
22015  * @flags: a set of #GFileCreateFlags.
22016  * @cancellable: optional #GCancellable object, %NULL to ignore.
22017  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
22018  * @user_data: the data to pass to callback function
22019  *
22020  * Starts an asynchronous replacement of @file with the given
22021  * current entity tag.
22022  * When this operation has completed, @callback will be called with
22023  * g_file_replace_contents_finish().
22024  * If @cancellable is not %NULL, then the operation can be cancelled by
22025  * triggering the cancellable object from another thread. If the operation
22026  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22027  * If @make_backup is %TRUE, this function will attempt to
22028  * make a backup of @file.
22029  */
22030
22031
22032 /**
22033  * g_file_replace_contents_finish:
22034  * @file: input #GFile.
22035  * @res: a #GAsyncResult.
22036  * @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
22037  * @error: a #GError, or %NULL
22038  *
22039  * Finishes an asynchronous replace of the given @file. See
22040  * g_file_replace_contents_async(). Sets @new_etag to the new entity
22041  * tag for the document, if present.
22042  *
22043  * Returns: %TRUE on success, %FALSE on failure.
22044  */
22045
22046
22047 /**
22048  * g_file_replace_finish:
22049  * @file: input #GFile.
22050  * @res: a #GAsyncResult.
22051  * @error: a #GError, or %NULL
22052  *
22053  * Finishes an asynchronous file replace operation started with
22054  * g_file_replace_async().
22055  * Free the returned object with g_object_unref().
22056  *
22057  * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
22058  */
22059
22060
22061 /**
22062  * g_file_replace_readwrite:
22063  * @file: a #GFile
22064  * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore
22065  * @make_backup: %TRUE if a backup should be created
22066  * @flags: a set of #GFileCreateFlags
22067  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
22068  * @error: return location for a #GError, or %NULL
22069  *
22070  * Returns an output stream for overwriting the file in readwrite mode,
22071  * possibly creating a backup copy of the file first. If the file doesn't
22072  * exist, it will be created.
22073  * For details about the behaviour, see g_file_replace() which does the same
22074  * thing but returns an output stream only.
22075  * Note that in many non-local file cases read and write streams are not
22076  * supported, so make sure you really need to do read and write streaming,
22077  * rather than just opening for reading or writing.
22078  * Free the returned object with g_object_unref().
22079  *
22080  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
22081  * Since: 2.22
22082  */
22083
22084
22085 /**
22086  * g_file_replace_readwrite_async:
22087  * @file: input #GFile.
22088  * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
22089  * @make_backup: %TRUE if a backup should be created.
22090  * @flags: a set of #GFileCreateFlags.
22091  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22092  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22093  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22094  * @user_data: (closure): the data to pass to callback function
22095  *
22096  * Asynchronously overwrites the file in read-write mode, replacing the
22097  * contents, possibly creating a backup copy of the file first.
22098  * For more details, see g_file_replace_readwrite() which is
22099  * the synchronous version of this call.
22100  * When the operation is finished, @callback will be called. You can then
22101  * call g_file_replace_readwrite_finish() to get the result of the operation.
22102  *
22103  * Since: 2.22
22104  */
22105
22106
22107 /**
22108  * g_file_replace_readwrite_finish:
22109  * @file: input #GFile.
22110  * @res: a #GAsyncResult.
22111  * @error: a #GError, or %NULL
22112  *
22113  * Finishes an asynchronous file replace operation started with
22114  * g_file_replace_readwrite_async().
22115  * Free the returned object with g_object_unref().
22116  *
22117  * Returns: (transfer full): a #GFileIOStream, or %NULL on error.
22118  * Since: 2.22
22119  */
22120
22121
22122 /**
22123  * g_file_resolve_relative_path:
22124  * @file: input #GFile.
22125  * @relative_path: a given relative path string.
22126  *
22127  * Resolves a relative path for @file to an absolute path.
22128  * This call does no blocking i/o.
22129  * is %NULL or if @file is invalid.
22130  * Free the returned object with g_object_unref().
22131  *
22132  * Returns: (transfer full): #GFile to the resolved path. %NULL if @relative_path
22133  */
22134
22135
22136 /**
22137  * g_file_set_attribute:
22138  * @file: input #GFile.
22139  * @attribute: a string containing the attribute's name.
22140  * @type: The type of the attribute
22141  * @value_p: a pointer to the value (or the pointer itself if the type is a pointer type)
22142  * @flags: a set of #GFileQueryInfoFlags.
22143  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22144  * @error: a #GError, or %NULL
22145  *
22146  * Sets an attribute in the file with attribute name @attribute to @value.
22147  * If @cancellable is not %NULL, then the operation can be cancelled by
22148  * triggering the cancellable object from another thread. If the operation
22149  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22150  *
22151  * Returns: %TRUE if the attribute was set, %FALSE otherwise.
22152  */
22153
22154
22155 /**
22156  * g_file_set_attribute_byte_string:
22157  * @file: input #GFile.
22158  * @attribute: a string containing the attribute's name.
22159  * @value: a string containing the attribute's new value.
22160  * @flags: a #GFileQueryInfoFlags.
22161  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22162  * @error: a #GError, or %NULL
22163  *
22164  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value.
22165  * If @attribute is of a different type, this operation will fail,
22166  * returning %FALSE.
22167  * If @cancellable is not %NULL, then the operation can be cancelled by
22168  * triggering the cancellable object from another thread. If the operation
22169  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22170  * in the @file, %FALSE otherwise.
22171  *
22172  * Returns: %TRUE if the @attribute was successfully set to @value
22173  */
22174
22175
22176 /**
22177  * g_file_set_attribute_int32:
22178  * @file: input #GFile.
22179  * @attribute: a string containing the attribute's name.
22180  * @value: a #gint32 containing the attribute's new value.
22181  * @flags: a #GFileQueryInfoFlags.
22182  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22183  * @error: a #GError, or %NULL
22184  *
22185  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value.
22186  * If @attribute is of a different type, this operation will fail.
22187  * If @cancellable is not %NULL, then the operation can be cancelled by
22188  * triggering the cancellable object from another thread. If the operation
22189  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22190  * in the @file, %FALSE otherwise.
22191  *
22192  * Returns: %TRUE if the @attribute was successfully set to @value
22193  */
22194
22195
22196 /**
22197  * g_file_set_attribute_int64:
22198  * @file: input #GFile.
22199  * @attribute: a string containing the attribute's name.
22200  * @value: a #guint64 containing the attribute's new value.
22201  * @flags: a #GFileQueryInfoFlags.
22202  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22203  * @error: a #GError, or %NULL
22204  *
22205  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value.
22206  * If @attribute is of a different type, this operation will fail.
22207  * If @cancellable is not %NULL, then the operation can be cancelled by
22208  * triggering the cancellable object from another thread. If the operation
22209  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22210  *
22211  * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
22212  */
22213
22214
22215 /**
22216  * g_file_set_attribute_string:
22217  * @file: input #GFile.
22218  * @attribute: a string containing the attribute's name.
22219  * @value: a string containing the attribute's value.
22220  * @flags: #GFileQueryInfoFlags.
22221  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22222  * @error: a #GError, or %NULL
22223  *
22224  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value.
22225  * If @attribute is of a different type, this operation will fail.
22226  * If @cancellable is not %NULL, then the operation can be cancelled by
22227  * triggering the cancellable object from another thread. If the operation
22228  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22229  *
22230  * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
22231  */
22232
22233
22234 /**
22235  * g_file_set_attribute_uint32:
22236  * @file: input #GFile.
22237  * @attribute: a string containing the attribute's name.
22238  * @value: a #guint32 containing the attribute's new value.
22239  * @flags: a #GFileQueryInfoFlags.
22240  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22241  * @error: a #GError, or %NULL
22242  *
22243  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value.
22244  * If @attribute is of a different type, this operation will fail.
22245  * If @cancellable is not %NULL, then the operation can be cancelled by
22246  * triggering the cancellable object from another thread. If the operation
22247  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22248  * in the @file, %FALSE otherwise.
22249  *
22250  * Returns: %TRUE if the @attribute was successfully set to @value
22251  */
22252
22253
22254 /**
22255  * g_file_set_attribute_uint64:
22256  * @file: input #GFile.
22257  * @attribute: a string containing the attribute's name.
22258  * @value: a #guint64 containing the attribute's new value.
22259  * @flags: a #GFileQueryInfoFlags.
22260  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22261  * @error: a #GError, or %NULL
22262  *
22263  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value.
22264  * If @attribute is of a different type, this operation will fail.
22265  * If @cancellable is not %NULL, then the operation can be cancelled by
22266  * triggering the cancellable object from another thread. If the operation
22267  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22268  * in the @file, %FALSE otherwise.
22269  *
22270  * Returns: %TRUE if the @attribute was successfully set to @value
22271  */
22272
22273
22274 /**
22275  * g_file_set_attributes_async:
22276  * @file: input #GFile.
22277  * @info: a #GFileInfo.
22278  * @flags: a #GFileQueryInfoFlags.
22279  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22280  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22281  * @callback: (scope async): a #GAsyncReadyCallback.
22282  * @user_data: (closure): a #gpointer.
22283  *
22284  * Asynchronously sets the attributes of @file with @info.
22285  * For more details, see g_file_set_attributes_from_info() which is
22286  * the synchronous version of this call.
22287  * When the operation is finished, @callback will be called. You can then call
22288  * g_file_set_attributes_finish() to get the result of the operation.
22289  */
22290
22291
22292 /**
22293  * g_file_set_attributes_finish:
22294  * @file: input #GFile.
22295  * @result: a #GAsyncResult.
22296  * @info: (out) (transfer full): a #GFileInfo.
22297  * @error: a #GError, or %NULL
22298  *
22299  * Finishes setting an attribute started in g_file_set_attributes_async().
22300  *
22301  * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise.
22302  */
22303
22304
22305 /**
22306  * g_file_set_attributes_from_info:
22307  * @file: input #GFile.
22308  * @info: a #GFileInfo.
22309  * @flags: #GFileQueryInfoFlags
22310  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22311  * @error: a #GError, or %NULL
22312  *
22313  * Tries to set all attributes in the #GFileInfo on the target values,
22314  * not stopping on the first error.
22315  * If there is any error during this operation then @error will be set to
22316  * the first error. Error on particular fields are flagged by setting
22317  * the "status" field in the attribute value to
22318  * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can also detect
22319  * further errors.
22320  * If @cancellable is not %NULL, then the operation can be cancelled by
22321  * triggering the cancellable object from another thread. If the operation
22322  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22323  *
22324  * Returns: %TRUE if there was any error, %FALSE otherwise.
22325  */
22326
22327
22328 /**
22329  * g_file_set_display_name:
22330  * @file: input #GFile.
22331  * @display_name: a string.
22332  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22333  * @error: a #GError, or %NULL
22334  *
22335  * Renames @file to the specified display name.
22336  * The display name is converted from UTF8 to the correct encoding for the target
22337  * filesystem if possible and the @file is renamed to this.
22338  * If you want to implement a rename operation in the user interface the edit name
22339  * (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the initial value in the rename
22340  * widget, and then the result after editing should be passed to g_file_set_display_name().
22341  * On success the resulting converted filename is returned.
22342  * If @cancellable is not %NULL, then the operation can be cancelled by
22343  * triggering the cancellable object from another thread. If the operation
22344  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22345  * if there was an error.
22346  * Free the returned object with g_object_unref().
22347  *
22348  * Returns: (transfer full): a #GFile specifying what @file was renamed to, or %NULL
22349  */
22350
22351
22352 /**
22353  * g_file_set_display_name_async:
22354  * @file: input #GFile.
22355  * @display_name: a string.
22356  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22357  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22358  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22359  * @user_data: (closure): the data to pass to callback function
22360  *
22361  * Asynchronously sets the display name for a given #GFile.
22362  * For more details, see g_file_set_display_name() which is
22363  * the synchronous version of this call.
22364  * When the operation is finished, @callback will be called. You can then call
22365  * g_file_set_display_name_finish() to get the result of the operation.
22366  */
22367
22368
22369 /**
22370  * g_file_set_display_name_finish:
22371  * @file: input #GFile.
22372  * @res: a #GAsyncResult.
22373  * @error: a #GError, or %NULL
22374  *
22375  * Finishes setting a display name started with
22376  * g_file_set_display_name_async().
22377  * Free the returned object with g_object_unref().
22378  *
22379  * Returns: (transfer full): a #GFile or %NULL on error.
22380  */
22381
22382
22383 /**
22384  * g_file_start_mountable:
22385  * @file: input #GFile.
22386  * @flags: flags affecting the operation
22387  * @start_operation: a #GMountOperation, or %NULL to avoid user interaction.
22388  * @cancellable: optional #GCancellable object, %NULL to ignore.
22389  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22390  * @user_data: the data to pass to callback function
22391  *
22392  * Starts a file of type G_FILE_TYPE_MOUNTABLE.
22393  * Using @start_operation, you can request callbacks when, for instance,
22394  * passwords are needed during authentication.
22395  * If @cancellable is not %NULL, then the operation can be cancelled by
22396  * triggering the cancellable object from another thread. If the operation
22397  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22398  * When the operation is finished, @callback will be called. You can then call
22399  * g_file_mount_mountable_finish() to get the result of the operation.
22400  *
22401  * Since: 2.22
22402  */
22403
22404
22405 /**
22406  * g_file_start_mountable_finish:
22407  * @file: input #GFile.
22408  * @result: a #GAsyncResult.
22409  * @error: a #GError, or %NULL
22410  *
22411  * Finishes a start operation. See g_file_start_mountable() for details.
22412  * Finish an asynchronous start operation that was started
22413  * with g_file_start_mountable().
22414  * otherwise.
22415  *
22416  * Returns: %TRUE if the operation finished successfully. %FALSE
22417  * Since: 2.22
22418  */
22419
22420
22421 /**
22422  * g_file_stop_mountable:
22423  * @file: input #GFile.
22424  * @flags: flags affecting the operation
22425  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
22426  * @cancellable: optional #GCancellable object, %NULL to ignore.
22427  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22428  * @user_data: the data to pass to callback function
22429  *
22430  * Stops a file of type G_FILE_TYPE_MOUNTABLE.
22431  * If @cancellable is not %NULL, then the operation can be cancelled by
22432  * triggering the cancellable object from another thread. If the operation
22433  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22434  * When the operation is finished, @callback will be called. You can then call
22435  * g_file_stop_mountable_finish() to get the result of the operation.
22436  *
22437  * Since: 2.22
22438  */
22439
22440
22441 /**
22442  * g_file_stop_mountable_finish:
22443  * @file: input #GFile.
22444  * @result: a #GAsyncResult.
22445  * @error: a #GError, or %NULL
22446  *
22447  * Finishes an stop operation, see g_file_stop_mountable() for details.
22448  * Finish an asynchronous stop operation that was started
22449  * with g_file_stop_mountable().
22450  * otherwise.
22451  *
22452  * Returns: %TRUE if the operation finished successfully. %FALSE
22453  * Since: 2.22
22454  */
22455
22456
22457 /**
22458  * g_file_supports_thread_contexts:
22459  * @file: a #GFile.
22460  *
22461  * Checks if @file supports <link
22462  * linkend="g-main-context-push-thread-default-context">thread-default
22463  * contexts</link>. If this returns %FALSE, you cannot perform
22464  * asynchronous operations on @file in a thread that has a
22465  * thread-default context.
22466  *
22467  * Returns: Whether or not @file supports thread-default contexts.
22468  * Since: 2.22
22469  */
22470
22471
22472 /**
22473  * g_file_trash:
22474  * @file: #GFile to send to trash.
22475  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22476  * @error: a #GError, or %NULL
22477  *
22478  * Sends @file to the "Trashcan", if possible. This is similar to
22479  * deleting it, but the user can recover it before emptying the trashcan.
22480  * Not all file systems support trashing, so this call can return the
22481  * %G_IO_ERROR_NOT_SUPPORTED error.
22482  * If @cancellable is not %NULL, then the operation can be cancelled by
22483  * triggering the cancellable object from another thread. If the operation
22484  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22485  *
22486  * Returns: %TRUE on successful trash, %FALSE otherwise.
22487  */
22488
22489
22490 /**
22491  * g_file_unmount_mountable:
22492  * @file: input #GFile.
22493  * @flags: flags affecting the operation
22494  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22495  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22496  * @user_data: (closure): the data to pass to callback function
22497  *
22498  * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
22499  * If @cancellable is not %NULL, then the operation can be cancelled by
22500  * triggering the cancellable object from another thread. If the operation
22501  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22502  * When the operation is finished, @callback will be called. You can then call
22503  * g_file_unmount_mountable_finish() to get the result of the operation.
22504  *
22505  * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation() instead.
22506  */
22507
22508
22509 /**
22510  * g_file_unmount_mountable_finish:
22511  * @file: input #GFile.
22512  * @result: a #GAsyncResult.
22513  * @error: a #GError, or %NULL
22514  *
22515  * Finishes an unmount operation, see g_file_unmount_mountable() for details.
22516  * Finish an asynchronous unmount operation that was started
22517  * with g_file_unmount_mountable().
22518  * otherwise.
22519  *
22520  * Returns: %TRUE if the operation finished successfully. %FALSE
22521  * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation_finish() instead.
22522  */
22523
22524
22525 /**
22526  * g_file_unmount_mountable_with_operation:
22527  * @file: input #GFile.
22528  * @flags: flags affecting the operation
22529  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
22530  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22531  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22532  * @user_data: (closure): the data to pass to callback function
22533  *
22534  * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
22535  * If @cancellable is not %NULL, then the operation can be cancelled by
22536  * triggering the cancellable object from another thread. If the operation
22537  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22538  * When the operation is finished, @callback will be called. You can then call
22539  * g_file_unmount_mountable_finish() to get the result of the operation.
22540  *
22541  * Since: 2.22
22542  */
22543
22544
22545 /**
22546  * g_file_unmount_mountable_with_operation_finish:
22547  * @file: input #GFile.
22548  * @result: a #GAsyncResult.
22549  * @error: a #GError, or %NULL
22550  *
22551  * Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.
22552  * Finish an asynchronous unmount operation that was started
22553  * with g_file_unmount_mountable_with_operation().
22554  * otherwise.
22555  *
22556  * Returns: %TRUE if the operation finished successfully. %FALSE
22557  * Since: 2.22
22558  */
22559
22560
22561 /**
22562  * g_filename_completer_get_completion_suffix:
22563  * @completer: the filename completer.
22564  * @initial_text: text to be completed.
22565  *
22566  * Obtains a completion for @initial_text from @completer.
22567  * This string is not owned by GIO, so remember to g_free() it
22568  * when finished.
22569  *
22570  * Returns: a completed string, or %NULL if no completion exists.
22571  */
22572
22573
22574 /**
22575  * g_filename_completer_get_completions:
22576  * @completer: the filename completer.
22577  * @initial_text: text to be completed.
22578  *
22579  * Gets an array of completion strings for a given initial text.
22580  * This array must be freed by g_strfreev() when finished.
22581  *
22582  * Returns: (array zero-terminated=1) (transfer full): array of strings with possible completions for @initial_text.
22583  */
22584
22585
22586 /**
22587  * g_filename_completer_new:
22588  *
22589  * Creates a new filename completer.
22590  *
22591  * Returns: a #GFilenameCompleter.
22592  */
22593
22594
22595 /**
22596  * g_filename_completer_set_dirs_only:
22597  * @completer: the filename completer.
22598  * @dirs_only: a #gboolean.
22599  *
22600  * If @dirs_only is %TRUE, @completer will only
22601  * complete directory names, and not file names.
22602  */
22603
22604
22605 /**
22606  * g_filter_input_stream_get_base_stream:
22607  * @stream: a #GFilterInputStream.
22608  *
22609  * Gets the base stream for the filter stream.
22610  *
22611  * Returns: (transfer none): a #GInputStream.
22612  */
22613
22614
22615 /**
22616  * g_filter_input_stream_get_close_base_stream:
22617  * @stream: a #GFilterInputStream.
22618  *
22619  * Returns whether the base stream will be closed when @stream is
22620  * closed.
22621  *
22622  * Returns: %TRUE if the base stream will be closed.
22623  */
22624
22625
22626 /**
22627  * g_filter_input_stream_set_close_base_stream:
22628  * @stream: a #GFilterInputStream.
22629  * @close_base: %TRUE to close the base stream.
22630  *
22631  * Sets whether the base stream will be closed when @stream is closed.
22632  */
22633
22634
22635 /**
22636  * g_filter_output_stream_get_base_stream:
22637  * @stream: a #GFilterOutputStream.
22638  *
22639  * Gets the base stream for the filter stream.
22640  *
22641  * Returns: (transfer none): a #GOutputStream.
22642  */
22643
22644
22645 /**
22646  * g_filter_output_stream_get_close_base_stream:
22647  * @stream: a #GFilterOutputStream.
22648  *
22649  * Returns whether the base stream will be closed when @stream is
22650  * closed.
22651  *
22652  * Returns: %TRUE if the base stream will be closed.
22653  */
22654
22655
22656 /**
22657  * g_filter_output_stream_set_close_base_stream:
22658  * @stream: a #GFilterOutputStream.
22659  * @close_base: %TRUE to close the base stream.
22660  *
22661  * Sets whether the base stream will be closed when @stream is closed.
22662  */
22663
22664
22665 /**
22666  * g_hash_table_freeze:
22667  * @hash_table: a #GHashTable
22668  *
22669  * This function is deprecated and will be removed in the next major
22670  * release of GLib. It does nothing.
22671  */
22672
22673
22674 /**
22675  * g_hash_table_thaw:
22676  * @hash_table: a #GHashTable
22677  *
22678  * This function is deprecated and will be removed in the next major
22679  * release of GLib. It does nothing.
22680  */
22681
22682
22683 /**
22684  * g_icon_equal:
22685  * @icon1: pointer to the first #GIcon.
22686  * @icon2: pointer to the second #GIcon.
22687  *
22688  * Checks if two icons are equal.
22689  *
22690  * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise.
22691  */
22692
22693
22694 /**
22695  * g_icon_hash:
22696  * @icon: #gconstpointer to an icon object.
22697  *
22698  * Gets a hash for an icon.
22699  * use in a #GHashTable or similar data structure.
22700  *
22701  * Virtual: hash
22702  * Returns: a #guint containing a hash for the @icon, suitable for
22703  */
22704
22705
22706 /**
22707  * g_icon_new_for_string:
22708  * @str: A string obtained via g_icon_to_string().
22709  * @error: Return location for error.
22710  *
22711  * Generate a #GIcon instance from @str. This function can fail if
22712  * If your application or library provides one or more #GIcon
22713  * implementations you need to ensure that each #GType is registered
22714  * with the type system prior to calling g_icon_new_for_string().
22715  * interface or %NULL if @error is set.
22716  *
22717  * Returns: (transfer full): An object implementing the #GIcon
22718  * Since: 2.20
22719  */
22720
22721
22722 /**
22723  * g_icon_to_string:
22724  * @icon: a #GIcon.
22725  *
22726  * Generates a textual representation of @icon that can be used for
22727  * serialization such as when passing @icon to a different process or
22728  * saving it to persistent storage. Use g_icon_new_for_string() to
22729  * get @icon back from the returned string.
22730  * The encoding of the returned string is proprietary to #GIcon except
22731  * in the following two cases
22732  * <itemizedlist>
22733  * <listitem><para>
22734  * If @icon is a #GFileIcon, the returned string is a native path
22735  * (such as <literal>/path/to/my icon.png</literal>) without escaping
22736  * if the #GFile for @icon is a native file.  If the file is not
22737  * native, the returned string is the result of g_file_get_uri()
22738  * (such as <literal>sftp://path/to/my%%20icon.png</literal>).
22739  * </para></listitem>
22740  * <listitem><para>
22741  * If @icon is a #GThemedIcon with exactly one name, the encoding is
22742  * simply the name (such as <literal>network-server</literal>).
22743  * </para></listitem>
22744  * </itemizedlist>
22745  * be serialized. Use g_free() to free.
22746  *
22747  * Virtual: to_tokens
22748  * Returns: An allocated NUL-terminated UTF8 string or %NULL if @icon can't
22749  * Since: 2.20
22750  */
22751
22752
22753 /**
22754  * g_inet_address_get_family:
22755  * @address: a #GInetAddress
22756  *
22757  * Gets @address's family
22758  *
22759  * Returns: @address's family
22760  * Since: 2.22
22761  */
22762
22763
22764 /**
22765  * g_inet_address_get_is_any:
22766  * @address: a #GInetAddress
22767  *
22768  * Tests whether @address is the "any" address for its family.
22769  *
22770  * Returns: %TRUE if @address is the "any" address for its family.
22771  * Since: 2.22
22772  */
22773
22774
22775 /**
22776  * g_inet_address_get_is_link_local:
22777  * @address: a #GInetAddress
22778  *
22779  * Tests whether @address is a link-local address (that is, if it
22780  * identifies a host on a local network that is not connected to the
22781  * Internet).
22782  *
22783  * Returns: %TRUE if @address is a link-local address.
22784  * Since: 2.22
22785  */
22786
22787
22788 /**
22789  * g_inet_address_get_is_loopback:
22790  * @address: a #GInetAddress
22791  *
22792  * Tests whether @address is the loopback address for its family.
22793  *
22794  * Returns: %TRUE if @address is the loopback address for its family.
22795  * Since: 2.22
22796  */
22797
22798
22799 /**
22800  * g_inet_address_get_is_mc_global:
22801  * @address: a #GInetAddress
22802  *
22803  * Tests whether @address is a global multicast address.
22804  *
22805  * Returns: %TRUE if @address is a global multicast address.
22806  * Since: 2.22
22807  */
22808
22809
22810 /**
22811  * g_inet_address_get_is_mc_link_local:
22812  * @address: a #GInetAddress
22813  *
22814  * Tests whether @address is a link-local multicast address.
22815  *
22816  * Returns: %TRUE if @address is a link-local multicast address.
22817  * Since: 2.22
22818  */
22819
22820
22821 /**
22822  * g_inet_address_get_is_mc_node_local:
22823  * @address: a #GInetAddress
22824  *
22825  * Tests whether @address is a node-local multicast address.
22826  *
22827  * Returns: %TRUE if @address is a node-local multicast address.
22828  * Since: 2.22
22829  */
22830
22831
22832 /**
22833  * g_inet_address_get_is_mc_org_local:
22834  * @address: a #GInetAddress
22835  *
22836  * Tests whether @address is an organization-local multicast address.
22837  *
22838  * Returns: %TRUE if @address is an organization-local multicast address.
22839  * Since: 2.22
22840  */
22841
22842
22843 /**
22844  * g_inet_address_get_is_mc_site_local:
22845  * @address: a #GInetAddress
22846  *
22847  * Tests whether @address is a site-local multicast address.
22848  *
22849  * Returns: %TRUE if @address is a site-local multicast address.
22850  * Since: 2.22
22851  */
22852
22853
22854 /**
22855  * g_inet_address_get_is_multicast:
22856  * @address: a #GInetAddress
22857  *
22858  * Tests whether @address is a multicast address.
22859  *
22860  * Returns: %TRUE if @address is a multicast address.
22861  * Since: 2.22
22862  */
22863
22864
22865 /**
22866  * g_inet_address_get_is_site_local:
22867  * @address: a #GInetAddress
22868  *
22869  * Tests whether @address is a site-local address such as 10.0.0.1
22870  * (that is, the address identifies a host on a local network that can
22871  * not be reached directly from the Internet, but which may have
22872  * outgoing Internet connectivity via a NAT or firewall).
22873  *
22874  * Returns: %TRUE if @address is a site-local address.
22875  * Since: 2.22
22876  */
22877
22878
22879 /**
22880  * g_inet_address_get_native_size:
22881  * @address: a #GInetAddress
22882  *
22883  * Gets the size of the native raw binary address for @address. This
22884  * is the size of the data that you get from g_inet_address_to_bytes().
22885  *
22886  * Returns: the number of bytes used for the native version of @address.
22887  * Since: 2.22
22888  */
22889
22890
22891 /**
22892  * g_inet_address_new_any:
22893  * @family: the address family
22894  *
22895  * Creates a #GInetAddress for the "any" address (unassigned/"don't
22896  * care") for @family.
22897  * for @family.
22898  *
22899  * Returns: a new #GInetAddress corresponding to the "any" address
22900  * Since: 2.22
22901  */
22902
22903
22904 /**
22905  * g_inet_address_new_from_bytes:
22906  * @bytes: raw address data
22907  * @family: the address family of @bytes
22908  *
22909  * Creates a new #GInetAddress from the given @family and @bytes.
22910  * %G_INET_ADDRESS_IPV6.
22911  *
22912  * Returns: a new #GInetAddress corresponding to @family and @bytes.
22913  * Since: 2.22
22914  */
22915
22916
22917 /**
22918  * g_inet_address_new_from_string:
22919  * @string: a string representation of an IP address
22920  *
22921  * Parses @string as an IP address and creates a new #GInetAddress.
22922  *
22923  * Returns: a new #GInetAddress corresponding to @string, or %NULL if
22924  * Since: 2.22
22925  */
22926
22927
22928 /**
22929  * g_inet_address_new_loopback:
22930  * @family: the address family
22931  *
22932  * Creates a #GInetAddress for the loopback address for @family.
22933  * for @family.
22934  *
22935  * Returns: a new #GInetAddress corresponding to the loopback address
22936  * Since: 2.22
22937  */
22938
22939
22940 /**
22941  * g_inet_address_to_bytes: (skip)
22942  * @address: a #GInetAddress
22943  *
22944  * Gets the raw binary address data from @address.
22945  * which should not be modified, stored, or freed. The size of this
22946  * array can be gotten with g_inet_address_get_native_size().
22947  *
22948  * Returns: a pointer to an internal array of the bytes in @address,
22949  * Since: 2.22
22950  */
22951
22952
22953 /**
22954  * g_inet_address_to_string:
22955  * @address: a #GInetAddress
22956  *
22957  * Converts @address to string form.
22958  * freed after use.
22959  *
22960  * Returns: a representation of @address as a string, which should be
22961  * Since: 2.22
22962  */
22963
22964
22965 /**
22966  * g_inet_socket_address_get_address:
22967  * @address: a #GInetSocketAddress
22968  *
22969  * Gets @address's #GInetAddress.
22970  * g_object_ref()'d if it will be stored
22971  *
22972  * Returns: (transfer none): the #GInetAddress for @address, which must be
22973  * Since: 2.22
22974  */
22975
22976
22977 /**
22978  * g_inet_socket_address_get_port:
22979  * @address: a #GInetSocketAddress
22980  *
22981  * Gets @address's port.
22982  *
22983  * Returns: the port for @address
22984  * Since: 2.22
22985  */
22986
22987
22988 /**
22989  * g_inet_socket_address_new:
22990  * @address: a #GInetAddress
22991  * @port: a port number
22992  *
22993  * Creates a new #GInetSocketAddress for @address and @port.
22994  *
22995  * Returns: a new #GInetSocketAddress
22996  * Since: 2.22
22997  */
22998
22999
23000 /**
23001  * g_initable_init:
23002  * @initable: a #GInitable.
23003  * @cancellable: optional #GCancellable object, %NULL to ignore.
23004  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23005  *
23006  * Initializes the object implementing the interface. This must be
23007  * done before any real use of the object after initial construction.
23008  * Implementations may also support cancellation. If @cancellable is not %NULL,
23009  * then initialization can be cancelled by triggering the cancellable object
23010  * from another thread. If the operation was cancelled, the error
23011  * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
23012  * the object doesn't support cancellable initialization the error
23013  * %G_IO_ERROR_NOT_SUPPORTED will be returned.
23014  * If this function is not called, or returns with an error then all
23015  * operations on the object should fail, generally returning the
23016  * error %G_IO_ERROR_NOT_INITIALIZED.
23017  * Implementations of this method must be idempotent, i.e. multiple calls
23018  * to this function with the same argument should return the same results.
23019  * Only the first call initializes the object, further calls return the result
23020  * of the first call. This is so that its safe to implement the singleton
23021  * pattern in the GObject constructor function.
23022  * return %FALSE and set @error appropriately if present.
23023  *
23024  * Returns: %TRUE if successful. If an error has occurred, this function will
23025  * Since: 2.22
23026  */
23027
23028
23029 /**
23030  * g_initable_new:
23031  * @object_type: a #GType supporting #GInitable.
23032  * @cancellable: optional #GCancellable object, %NULL to ignore.
23033  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23034  * @first_property_name: the name of the first property, or %NULL if no properties
23035  * @...: the value if the first property, followed by and other property value pairs, and ended by %NULL.
23036  *
23037  * Helper function for constructing #GInitiable object. This is
23038  * similar to g_object_new() but also initializes the object
23039  * and returns %NULL, setting an error on failure.
23040  *
23041  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
23042  * Since: 2.22
23043  */
23044
23045
23046 /**
23047  * g_initable_new_valist:
23048  * @object_type: a #GType supporting #GInitable.
23049  * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
23050  * @var_args: The var args list generated from @first_property_name.
23051  * @cancellable: optional #GCancellable object, %NULL to ignore.
23052  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23053  *
23054  * Helper function for constructing #GInitiable object. This is
23055  * similar to g_object_new_valist() but also initializes the object
23056  * and returns %NULL, setting an error on failure.
23057  *
23058  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
23059  * Since: 2.22
23060  */
23061
23062
23063 /**
23064  * g_initable_newv:
23065  * @object_type: a #GType supporting #GInitable.
23066  * @n_parameters: the number of parameters in @parameters
23067  * @parameters: the parameters to use to construct the object
23068  * @cancellable: optional #GCancellable object, %NULL to ignore.
23069  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23070  *
23071  * Helper function for constructing #GInitiable object. This is
23072  * similar to g_object_newv() but also initializes the object
23073  * and returns %NULL, setting an error on failure.
23074  *
23075  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
23076  * Since: 2.22
23077  */
23078
23079
23080 /**
23081  * g_input_stream_clear_pending:
23082  * @stream: input stream
23083  *
23084  * Clears the pending flag on @stream.
23085  */
23086
23087
23088 /**
23089  * g_input_stream_close:
23090  * @stream: A #GInputStream.
23091  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23092  * @error: location to store the error occuring, or %NULL to ignore
23093  *
23094  * Closes the stream, releasing resources related to it.
23095  * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
23096  * Closing a stream multiple times will not return an error.
23097  * Streams will be automatically closed when the last reference
23098  * is dropped, but you might want to call this function to make sure
23099  * resources are released as early as possible.
23100  * Some streams might keep the backing store of the stream (e.g. a file descriptor)
23101  * open after the stream is closed. See the documentation for the individual
23102  * stream for details.
23103  * On failure the first error that happened will be reported, but the close
23104  * operation will finish as much as possible. A stream that failed to
23105  * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
23106  * is important to check and report the error to the user.
23107  * If @cancellable is not NULL, then the operation can be cancelled by
23108  * triggering the cancellable object from another thread. If the operation
23109  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23110  * Cancelling a close will still leave the stream closed, but some streams
23111  * can use a faster close that doesn't block to e.g. check errors.
23112  *
23113  * Returns: %TRUE on success, %FALSE on failure
23114  */
23115
23116
23117 /**
23118  * g_input_stream_close_async:
23119  * @stream: A #GInputStream.
23120  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23121  * @cancellable: (allow-none): optional cancellable object
23122  * @callback: (scope async): callback to call when the request is satisfied
23123  * @user_data: (closure): the data to pass to callback function
23124  *
23125  * Requests an asynchronous closes of the stream, releasing resources related to it.
23126  * When the operation is finished @callback will be called.
23127  * You can then call g_input_stream_close_finish() to get the result of the
23128  * operation.
23129  * For behaviour details see g_input_stream_close().
23130  * The asyncronous methods have a default fallback that uses threads to implement
23131  * asynchronicity, so they are optional for inheriting classes. However, if you
23132  * override one you must override all.
23133  */
23134
23135
23136 /**
23137  * g_input_stream_close_finish:
23138  * @stream: a #GInputStream.
23139  * @result: a #GAsyncResult.
23140  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23141  *
23142  * Finishes closing a stream asynchronously, started from g_input_stream_close_async().
23143  *
23144  * Returns: %TRUE if the stream was closed successfully.
23145  */
23146
23147
23148 /**
23149  * g_input_stream_has_pending:
23150  * @stream: input stream.
23151  *
23152  * Checks if an input stream has pending actions.
23153  *
23154  * Returns: %TRUE if @stream has pending actions.
23155  */
23156
23157
23158 /**
23159  * g_input_stream_is_closed:
23160  * @stream: input stream.
23161  *
23162  * Checks if an input stream is closed.
23163  *
23164  * Returns: %TRUE if the stream is closed.
23165  */
23166
23167
23168 /**
23169  * g_input_stream_read:
23170  * @stream: a #GInputStream.
23171  * @buffer: a buffer to read data into (which should be at least count bytes long).
23172  * @count: the number of bytes that will be read from the stream
23173  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23174  * @error: location to store the error occuring, or %NULL to ignore
23175  *
23176  * Tries to read @count bytes from the stream into the buffer starting at
23177  * If count is zero returns zero and does nothing. A value of @count
23178  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
23179  * On success, the number of bytes read into the buffer is returned.
23180  * It is not an error if this is not the same as the requested size, as it
23181  * can happen e.g. near the end of a file. Zero is returned on end of file
23182  * (or if @count is zero),  but never otherwise.
23183  * If @cancellable is not NULL, then the operation can be cancelled by
23184  * triggering the cancellable object from another thread. If the operation
23185  * was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an
23186  * operation was partially finished when the operation was cancelled the
23187  * partial result will be returned, without an error.
23188  * On error -1 is returned and @error is set accordingly.
23189  *
23190  * Returns: Number of bytes read, or -1 on error
23191  */
23192
23193
23194 /**
23195  * g_input_stream_read_all:
23196  * @stream: a #GInputStream.
23197  * @buffer: a buffer to read data into (which should be at least count bytes long).
23198  * @count: the number of bytes that will be read from the stream
23199  * @bytes_read: (out): location to store the number of bytes that was read from the stream
23200  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23201  * @error: location to store the error occuring, or %NULL to ignore
23202  *
23203  * Tries to read @count bytes from the stream into the buffer starting at
23204  * This function is similar to g_input_stream_read(), except it tries to
23205  * read as many bytes as requested, only stopping on an error or end of stream.
23206  * On a successful read of @count bytes, or if we reached the end of the
23207  * stream,  %TRUE is returned, and @bytes_read is set to the number of bytes
23208  * read into @buffer.
23209  * If there is an error during the operation %FALSE is returned and @error
23210  * is set to indicate the error status, @bytes_read is updated to contain
23211  * the number of bytes read into @buffer before the error occurred.
23212  *
23213  * Returns: %TRUE on success, %FALSE if there was an error
23214  */
23215
23216
23217 /**
23218  * g_input_stream_read_async:
23219  * @stream: A #GInputStream.
23220  * @buffer: a buffer to read data into (which should be at least count bytes long).
23221  * @count: the number of bytes that will be read from the stream
23222  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23223  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23224  * @callback: (scope async): callback to call when the request is satisfied
23225  * @user_data: (closure): the data to pass to callback function
23226  *
23227  * Request an asynchronous read of @count bytes from the stream into the buffer
23228  * starting at @buffer. When the operation is finished @callback will be called.
23229  * You can then call g_input_stream_read_finish() to get the result of the
23230  * operation.
23231  * During an async request no other sync and async calls are allowed on @stream, and will
23232  * result in %G_IO_ERROR_PENDING errors.
23233  * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
23234  * On success, the number of bytes read into the buffer will be passed to the
23235  * callback. It is not an error if this is not the same as the requested size, as it
23236  * can happen e.g. near the end of a file, but generally we try to read
23237  * as many bytes as requested. Zero is returned on end of file
23238  * (or if @count is zero),  but never otherwise.
23239  * Any outstanding i/o request with higher priority (lower numerical value) will
23240  * be executed before an outstanding request with lower priority. Default
23241  * priority is %G_PRIORITY_DEFAULT.
23242  * The asyncronous methods have a default fallback that uses threads to implement
23243  * asynchronicity, so they are optional for inheriting classes. However, if you
23244  * override one you must override all.
23245  */
23246
23247
23248 /**
23249  * g_input_stream_read_finish:
23250  * @stream: a #GInputStream.
23251  * @result: a #GAsyncResult.
23252  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23253  *
23254  * Finishes an asynchronous stream read operation.
23255  *
23256  * Returns: number of bytes read in, or -1 on error.
23257  */
23258
23259
23260 /**
23261  * g_input_stream_set_pending:
23262  * @stream: input stream
23263  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23264  *
23265  * Sets @stream to have actions pending. If the pending flag is
23266  * already set or @stream is closed, it will return %FALSE and set
23267  *
23268  * Returns: %TRUE if pending was previously unset and is now set.
23269  */
23270
23271
23272 /**
23273  * g_input_stream_skip:
23274  * @stream: a #GInputStream.
23275  * @count: the number of bytes that will be skipped from the stream
23276  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23277  * @error: location to store the error occuring, or %NULL to ignore
23278  *
23279  * Tries to skip @count bytes from the stream. Will block during the operation.
23280  * This is identical to g_input_stream_read(), from a behaviour standpoint,
23281  * but the bytes that are skipped are not returned to the user. Some
23282  * streams have an implementation that is more efficient than reading the data.
23283  * This function is optional for inherited classes, as the default implementation
23284  * emulates it using read.
23285  * If @cancellable is not %NULL, then the operation can be cancelled by
23286  * triggering the cancellable object from another thread. If the operation
23287  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
23288  * operation was partially finished when the operation was cancelled the
23289  * partial result will be returned, without an error.
23290  *
23291  * Returns: Number of bytes skipped, or -1 on error
23292  */
23293
23294
23295 /**
23296  * g_input_stream_skip_async:
23297  * @stream: A #GInputStream.
23298  * @count: the number of bytes that will be skipped from the stream
23299  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23300  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23301  * @callback: (scope async): callback to call when the request is satisfied
23302  * @user_data: (closure): the data to pass to callback function
23303  *
23304  * Request an asynchronous skip of @count bytes from the stream.
23305  * When the operation is finished @callback will be called.
23306  * You can then call g_input_stream_skip_finish() to get the result
23307  * of the operation.
23308  * During an async request no other sync and async calls are allowed,
23309  * and will result in %G_IO_ERROR_PENDING errors.
23310  * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
23311  * On success, the number of bytes skipped will be passed to the callback.
23312  * It is not an error if this is not the same as the requested size, as it
23313  * can happen e.g. near the end of a file, but generally we try to skip
23314  * as many bytes as requested. Zero is returned on end of file
23315  * (or if @count is zero), but never otherwise.
23316  * Any outstanding i/o request with higher priority (lower numerical value)
23317  * will be executed before an outstanding request with lower priority.
23318  * Default priority is %G_PRIORITY_DEFAULT.
23319  * The asynchronous methods have a default fallback that uses threads to
23320  * implement asynchronicity, so they are optional for inheriting classes.
23321  * However, if you override one, you must override all.
23322  */
23323
23324
23325 /**
23326  * g_input_stream_skip_finish:
23327  * @stream: a #GInputStream.
23328  * @result: a #GAsyncResult.
23329  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23330  *
23331  * Finishes a stream skip operation.
23332  *
23333  * Returns: the size of the bytes skipped, or %-1 on error.
23334  */
23335
23336
23337 /**
23338  * g_io_error_from_errno:
23339  * @err_no: Error number as defined in errno.h.
23340  *
23341  * Converts errno.h error codes into GIO error codes.
23342  *
23343  * Returns: #GIOErrorEnum value for the given errno.h error number.
23344  */
23345
23346
23347 /**
23348  * g_io_error_from_win32_error:
23349  * @error_code: Windows error number.
23350  *
23351  * Converts some common error codes into GIO error codes. The
23352  * fallback value G_IO_ERROR_FAILED is returned for error codes not
23353  * handled.
23354  *
23355  * Returns: #GIOErrorEnum value for the given error number.
23356  * Since: 2.26
23357  */
23358
23359
23360 /**
23361  * g_io_error_quark:
23362  *
23363  * Gets the GIO Error Quark.
23364  *
23365  * Returns: a #GQuark.
23366  */
23367
23368
23369 /**
23370  * g_io_extension_get_name:
23371  * @extension: a #GIOExtension
23372  *
23373  * Gets the name under which @extension was registered.
23374  * Note that the same type may be registered as extension
23375  * for multiple extension points, under different names.
23376  *
23377  * Returns: the name of @extension.
23378  */
23379
23380
23381 /**
23382  * g_io_extension_get_priority:
23383  * @extension: a #GIOExtension
23384  *
23385  * Gets the priority with which @extension was registered.
23386  *
23387  * Returns: the priority of @extension
23388  */
23389
23390
23391 /**
23392  * g_io_extension_get_type:
23393  * @extension: a #GIOExtension
23394  *
23395  * Gets the type associated with @extension.
23396  *
23397  * Returns: the type of @extension
23398  */
23399
23400
23401 /**
23402  * g_io_extension_point_get_extension_by_name:
23403  * @extension_point: a #GIOExtensionPoint
23404  * @name: the name of the extension to get
23405  *
23406  * Finds a #GIOExtension for an extension point by name.
23407  * given name, or %NULL if there is no extension with that name
23408  *
23409  * Returns: (transfer none): the #GIOExtension for @extension_point that has the
23410  */
23411
23412
23413 /**
23414  * g_io_extension_point_get_extensions:
23415  * @extension_point: a #GIOExtensionPoint
23416  *
23417  * Gets a list of all extensions that implement this extension point.
23418  * The list is sorted by priority, beginning with the highest priority.
23419  * #GIOExtension<!-- -->s. The list is owned by GIO and should not be
23420  * modified.
23421  *
23422  * Returns: (element-type GIOExtension) (transfer none): a #GList of
23423  */
23424
23425
23426 /**
23427  * g_io_extension_point_get_required_type:
23428  * @extension_point: a #GIOExtensionPoint
23429  *
23430  * Gets the required type for @extension_point.
23431  * or #G_TYPE_INVALID if the extension point has no required type
23432  *
23433  * Returns: the #GType that all implementations must have,
23434  */
23435
23436
23437 /**
23438  * g_io_extension_point_implement:
23439  * @extension_point_name: the name of the extension point
23440  * @type: the #GType to register as extension
23441  * @extension_name: the name for the extension
23442  * @priority: the priority for the extension
23443  *
23444  * Registers @type as extension for the extension point with name
23445  * If @type has already been registered as an extension for this
23446  * extension point, the existing #GIOExtension object is returned.
23447  *
23448  * Returns: a #GIOExtension object for #GType
23449  */
23450
23451
23452 /**
23453  * g_io_extension_point_lookup:
23454  * @name: the name of the extension point
23455  *
23456  * Looks up an existing extension point.
23457  * registered extension point with the given name
23458  *
23459  * Returns: the #GIOExtensionPoint, or %NULL if there is no
23460  */
23461
23462
23463 /**
23464  * g_io_extension_point_register:
23465  * @name: The name of the extension point
23466  *
23467  * Registers an extension point.
23468  * and should not be freed
23469  *
23470  * Returns: the new #GIOExtensionPoint. This object is owned by GIO
23471  */
23472
23473
23474 /**
23475  * g_io_extension_point_set_required_type:
23476  * @extension_point: a #GIOExtensionPoint
23477  * @type: the #GType to require
23478  *
23479  * Sets the required type for @extension_point to @type.
23480  * All implementations must henceforth have this type.
23481  */
23482
23483
23484 /**
23485  * g_io_extension_ref_class:
23486  * @extension: a #GIOExtension
23487  *
23488  * Gets a reference to the class for the type that is
23489  * associated with @extension.
23490  *
23491  * Returns: (transfer full): the #GTypeClass for the type of @extension
23492  */
23493
23494
23495 /**
23496  * g_io_module_load:
23497  * @module: a #GIOModule.
23498  *
23499  * Required API for GIO modules to implement.
23500  * This function is ran after the module has been loaded into GIO,
23501  * to initialize the module.
23502  */
23503
23504
23505 /**
23506  * g_io_module_new:
23507  * @filename: filename of the shared library module.
23508  *
23509  * Creates a new GIOModule that will load the specific
23510  * shared library when in use.
23511  * or %NULL on error.
23512  *
23513  * Returns: a #GIOModule from given @filename,
23514  */
23515
23516
23517 /**
23518  * g_io_module_query:
23519  *
23520  * Optional API for GIO modules to implement.
23521  * Should return a list of all the extension points that may be
23522  * implemented in this module.
23523  * This method will not be called in normal use, however it may be
23524  * called when probing existing modules and recording which extension
23525  * points that this modle is used for. This means we won't have to
23526  * load and initialze this module unless its needed.
23527  * If this function is not implemented by the module the module will
23528  * always be loaded, initialized and then unloaded on application startup
23529  * so that it can register its extension points during init.
23530  * Note that a module need not actually implement all the extension points
23531  * that g_io_module_query returns, since the exact list of extension may
23532  * depend on runtime issues. However all extension points actually implemented
23533  * must be returned by g_io_module_query() (if defined).
23534  * When installing a module that implements g_io_module_query you must
23535  * run gio-querymodules in order to build the cache files required for
23536  * lazy loading.
23537  * extension points of the module. The array must be suitable for
23538  * freeing with g_strfreev().
23539  *
23540  * Returns: (transfer full): A %NULL-terminated array of strings, listing the supported
23541  * Since: 2.24
23542  */
23543
23544
23545 /**
23546  * g_io_module_unload:
23547  * @module: a #GIOModule.
23548  *
23549  * Required API for GIO modules to implement.
23550  * This function is ran when the module is being unloaded from GIO,
23551  * to finalize the module.
23552  */
23553
23554
23555 /**
23556  * g_io_modules_load_all_in_directory:
23557  * @dirname: pathname for a directory containing modules to load.
23558  *
23559  * Loads all the modules in the specified directory.
23560  * If don't require all modules to be initialized (and thus registering
23561  * all gtypes) then you can use g_io_modules_scan_all_in_directory()
23562  * which allows delayed/lazy loading of modules.
23563  * from the directory,
23564  * All the modules are loaded into memory, if you want to
23565  * unload them (enabling on-demand loading) you must call
23566  * g_type_module_unuse() on all the modules. Free the list
23567  * with g_list_free().
23568  *
23569  * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded
23570  */
23571
23572
23573 /**
23574  * g_io_modules_scan_all_in_directory:
23575  * @dirname: pathname for a directory containing modules to scan.
23576  *
23577  * Scans all the modules in the specified directory, ensuring that
23578  * any extension point implemented by a module is registered.
23579  * This may not actually load and initialize all the types in each
23580  * module, some modules may be lazily loaded and initialized when
23581  * an extension point it implementes is used with e.g.
23582  * g_io_extension_point_get_extensions() or
23583  * g_io_extension_point_get_extension_by_name().
23584  * If you need to guarantee that all types are loaded in all the modules,
23585  * use g_io_modules_load_all_in_directory().
23586  *
23587  * Since: 2.24
23588  */
23589
23590
23591 /**
23592  * g_io_scheduler_cancel_all_jobs:
23593  *
23594  * Cancels all cancellable I/O jobs.
23595  * A job is cancellable if a #GCancellable was passed into
23596  * g_io_scheduler_push_job().
23597  */
23598
23599
23600 /**
23601  * g_io_scheduler_job_send_to_mainloop:
23602  * @job: a #GIOSchedulerJob
23603  * @func: a #GSourceFunc callback that will be called in the original thread
23604  * @user_data: data to pass to @func
23605  * @notify: a #GDestroyNotify for @user_data, or %NULL
23606  *
23607  * Used from an I/O job to send a callback to be run in the thread
23608  * that the job was started from, waiting for the result (and thus
23609  * blocking the I/O job).
23610  *
23611  * Returns: The return value of @func
23612  */
23613
23614
23615 /**
23616  * g_io_scheduler_job_send_to_mainloop_async:
23617  * @job: a #GIOSchedulerJob
23618  * @func: a #GSourceFunc callback that will be called in the original thread
23619  * @user_data: data to pass to @func
23620  * @notify: a #GDestroyNotify for @user_data, or %NULL
23621  *
23622  * Used from an I/O job to send a callback to be run asynchronously in
23623  * the thread that the job was started from. The callback will be run
23624  * when the main loop is available, but at that time the I/O job might
23625  * have finished. The return value from the callback is ignored.
23626  * Note that if you are passing the @user_data from g_io_scheduler_push_job()
23627  * on to this function you have to ensure that it is not freed before
23628  * g_io_scheduler_push_job() or by using refcounting for @user_data.
23629  */
23630
23631
23632 /**
23633  * g_io_scheduler_push_job:
23634  * @job_func: a #GIOSchedulerJobFunc.
23635  * @user_data: data to pass to @job_func
23636  * @notify: a #GDestroyNotify for @user_data, or %NULL
23637  * @io_priority: the <link linkend="gioscheduler">I/O priority</link> of the request.
23638  * @cancellable: optional #GCancellable object, %NULL to ignore.
23639  *
23640  * Schedules the I/O job to run.
23641  * regardless whether the job was cancelled or has run to completion.
23642  * If @cancellable is not %NULL, it can be used to cancel the I/O job
23643  * by calling g_cancellable_cancel() or by calling
23644  * g_io_scheduler_cancel_all_jobs().
23645  */
23646
23647
23648 /**
23649  * g_io_stream_clear_pending:
23650  * @stream: a #GIOStream
23651  *
23652  * Clears the pending flag on @stream.
23653  *
23654  * Since: 2.22
23655  */
23656
23657
23658 /**
23659  * g_io_stream_close:
23660  * @stream: a #GIOStream
23661  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
23662  * @error: location to store the error occuring, or %NULL to ignore
23663  *
23664  * Closes the stream, releasing resources related to it. This will also
23665  * closes the individual input and output streams, if they are not already
23666  * closed.
23667  * Once the stream is closed, all other operations will return
23668  * %G_IO_ERROR_CLOSED. Closing a stream multiple times will not
23669  * return an error.
23670  * Closing a stream will automatically flush any outstanding buffers
23671  * in the stream.
23672  * Streams will be automatically closed when the last reference
23673  * is dropped, but you might want to call this function to make sure
23674  * resources are released as early as possible.
23675  * Some streams might keep the backing store of the stream (e.g. a file
23676  * descriptor) open after the stream is closed. See the documentation for
23677  * the individual stream for details.
23678  * On failure the first error that happened will be reported, but the
23679  * close operation will finish as much as possible. A stream that failed
23680  * to close will still return %G_IO_ERROR_CLOSED for all operations.
23681  * Still, it is important to check and report the error to the user,
23682  * otherwise there might be a loss of data as all data might not be written.
23683  * If @cancellable is not NULL, then the operation can be cancelled by
23684  * triggering the cancellable object from another thread. If the operation
23685  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23686  * Cancelling a close will still leave the stream closed, but some streams
23687  * can use a faster close that doesn't block to e.g. check errors.
23688  * The default implementation of this method just calls close on the
23689  * individual input/output streams.
23690  *
23691  * Returns: %TRUE on success, %FALSE on failure
23692  * Since: 2.22
23693  */
23694
23695
23696 /**
23697  * g_io_stream_close_async:
23698  * @stream: a #GIOStream
23699  * @io_priority: the io priority of the request
23700  * @cancellable: (allow-none): optional cancellable object
23701  * @callback: (scope async): callback to call when the request is satisfied
23702  * @user_data: (closure): the data to pass to callback function
23703  *
23704  * Requests an asynchronous close of the stream, releasing resources
23705  * related to it. When the operation is finished @callback will be
23706  * called. You can then call g_io_stream_close_finish() to get
23707  * the result of the operation.
23708  * For behaviour details see g_io_stream_close().
23709  * The asynchronous methods have a default fallback that uses threads
23710  * to implement asynchronicity, so they are optional for inheriting
23711  * classes. However, if you override one you must override all.
23712  *
23713  * Since: 2.22
23714  */
23715
23716
23717 /**
23718  * g_io_stream_close_finish:
23719  * @stream: a #GIOStream
23720  * @result: a #GAsyncResult
23721  * @error: a #GError location to store the error occuring, or %NULL to ignore
23722  *
23723  * Closes a stream.
23724  *
23725  * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
23726  * Since: 2.22
23727  */
23728
23729
23730 /**
23731  * g_io_stream_get_input_stream:
23732  * @stream: a #GIOStream
23733  *
23734  * Gets the input stream for this object. This is used
23735  * for reading.
23736  * Do not free.
23737  *
23738  * Returns: (transfer none): a #GInputStream, owned by the #GIOStream.
23739  * Since: 2.22
23740  */
23741
23742
23743 /**
23744  * g_io_stream_get_output_stream:
23745  * @stream: a #GIOStream
23746  *
23747  * Gets the output stream for this object. This is used for
23748  * writing.
23749  * Do not free.
23750  *
23751  * Returns: (transfer none): a #GOutputStream, owned by the #GIOStream.
23752  * Since: 2.22
23753  */
23754
23755
23756 /**
23757  * g_io_stream_has_pending:
23758  * @stream: a #GIOStream
23759  *
23760  * Checks if a stream has pending actions.
23761  *
23762  * Returns: %TRUE if @stream has pending actions.
23763  * Since: 2.22
23764  */
23765
23766
23767 /**
23768  * g_io_stream_is_closed:
23769  * @stream: a #GIOStream
23770  *
23771  * Checks if a stream is closed.
23772  *
23773  * Returns: %TRUE if the stream is closed.
23774  * Since: 2.22
23775  */
23776
23777
23778 /**
23779  * g_io_stream_set_pending:
23780  * @stream: a #GIOStream
23781  * @error: a #GError location to store the error occuring, or %NULL to ignore
23782  *
23783  * Sets @stream to have actions pending. If the pending flag is
23784  * already set or @stream is closed, it will return %FALSE and set
23785  *
23786  * Returns: %TRUE if pending was previously unset and is now set.
23787  * Since: 2.22
23788  */
23789
23790
23791 /**
23792  * g_io_stream_splice_async:
23793  * @stream1: a #GIOStream.
23794  * @stream2: a #GIOStream.
23795  * @flags: a set of #GIOStreamSpliceFlags.
23796  * @io_priority: the io priority of the request.
23797  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23798  * @callback: (scope async): a #GAsyncReadyCallback.
23799  * @user_data: (closure): user data passed to @callback.
23800  *
23801  * Asyncronously splice the output stream of @stream1 to the input stream of
23802  * When the operation is finished @callback will be called.
23803  * You can then call g_io_stream_splice_finish() to get the
23804  * result of the operation.
23805  *
23806  * Since: 2.28
23807  */
23808
23809
23810 /**
23811  * g_io_stream_splice_finish:
23812  * @result: a #GAsyncResult.
23813  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23814  *
23815  * Finishes an asynchronous io stream splice operation.
23816  *
23817  * Returns: %TRUE on success, %FALSE otherwise.
23818  * Since: 2.28
23819  */
23820
23821
23822 /**
23823  * g_keyfile_settings_backend_new:
23824  * @filename: the filename of the keyfile
23825  * @root_path: the path under which all settings keys appear
23826  * @root_group: (allow-none): the group name corresponding to
23827  * @returns: (transfer full): a keyfile-backed #GSettingsBackend
23828  *
23829  * Creates a keyfile-backed #GSettingsBackend.
23830  * The filename of the keyfile to use is given by @filename.
23831  * All settings read to or written from the backend must fall under the
23832  * path given in @root_path (which must start and end with a slash and
23833  * not contain two consecutive slashes).  @root_path may be "/".
23834  * If @root_group is non-%NULL then it specifies the name of the keyfile
23835  * group used for keys that are written directly below @root_path.  For
23836  * example, if @root_path is "/apps/example/" and @root_group is
23837  * "toplevel", then settings the key "/apps/example/enabled" to a value
23838  * of %TRUE will cause the following to appear in the keyfile:
23839  * |[
23840  * [toplevel]
23841  * enabled=true
23842  * ]|
23843  * If @root_group is %NULL then it is not permitted to store keys
23844  * directly below the @root_path.
23845  * the name of the subpath (with the final slash stripped) is used as
23846  * the name of the keyfile group.  To continue the example, if
23847  * "/apps/example/profiles/default/font-size" were set to
23848  * 12 then the following would appear in the keyfile:
23849  * |[
23850  * [profiles/default]
23851  * font-size=12
23852  * ]|
23853  * The backend will refuse writes (and return writability as being
23854  * %FALSE) for keys outside of @root_path and, in the event that
23855  * Writes will also be refused if the backend detects that it has the
23856  * writable).
23857  * There is no checking done for your key namespace clashing with the
23858  * syntax of the key file format.  For example, if you have '[' or ']'
23859  * characters in your path names or '=' in your key names you may be in
23860  * trouble.
23861  *
23862  * For keys not stored directly below @root_path (ie: in a sub-path),
23863  * Inability to rewrite the keyfile (ie: the containing directory is not
23864  */
23865
23866
23867 /**
23868  * g_loadable_icon_load:
23869  * @icon: a #GLoadableIcon.
23870  * @size: an integer.
23871  * @type: (out) (allow-none): a location to store the type of the loaded icon, %NULL to ignore.
23872  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23873  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23874  *
23875  * Loads a loadable icon. For the asynchronous version of this function,
23876  * see g_loadable_icon_load_async().
23877  *
23878  * Returns: (transfer full): a #GInputStream to read the icon from.
23879  */
23880
23881
23882 /**
23883  * g_loadable_icon_load_async:
23884  * @icon: a #GLoadableIcon.
23885  * @size: an integer.
23886  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23887  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
23888  * @user_data: (closure): the data to pass to callback function
23889  *
23890  * Loads an icon asynchronously. To finish this function, see
23891  * g_loadable_icon_load_finish(). For the synchronous, blocking
23892  * version of this function, see g_loadable_icon_load().
23893  */
23894
23895
23896 /**
23897  * g_loadable_icon_load_finish:
23898  * @icon: a #GLoadableIcon.
23899  * @res: a #GAsyncResult.
23900  * @type: a location to store the type of the loaded icon, %NULL to ignore.
23901  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23902  *
23903  * Finishes an asynchronous icon load started in g_loadable_icon_load_async().
23904  *
23905  * Returns: (transfer full): a #GInputStream to read the icon from.
23906  */
23907
23908
23909 /**
23910  * g_local_vfs_new:
23911  *
23912  * Returns a new #GVfs handle for a local vfs.
23913  *
23914  * Returns: a new #GVfs handle.
23915  */
23916
23917
23918 /**
23919  * g_main_destroy:
23920  * @loop: a #GMainLoop
23921  *
23922  * Frees the memory allocated for the #GMainLoop.
23923  *
23924  * Deprecated: 2.2: Use g_main_loop_unref() instead
23925  */
23926
23927
23928 /**
23929  * g_main_is_running:
23930  * @loop: a #GMainLoop
23931  *
23932  * Checks if the main loop is running.
23933  *
23934  * Returns: %TRUE if the main loop is running
23935  * Deprecated: 2.2: Use g_main_loop_is_running() instead
23936  */
23937
23938
23939 /**
23940  * g_main_iteration:
23941  * @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.
23942  *
23943  * Runs a single iteration for the default #GMainContext.
23944  *
23945  * Returns: %TRUE if more events are pending.
23946  * Deprecated: 2.2: Use g_main_context_iteration() instead.
23947  */
23948
23949
23950 /**
23951  * g_main_new:
23952  * @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.
23953  *
23954  * Creates a new #GMainLoop for th default main context.
23955  *
23956  * Returns: a new #GMainLoop
23957  * Deprecated: 2.2: Use g_main_loop_new() instead
23958  */
23959
23960
23961 /**
23962  * g_main_pending:
23963  *
23964  * Checks if any events are pending for the default #GMainContext
23965  * (i.e. ready to be processed).
23966  *
23967  * Returns: %TRUE if any events are pending.
23968  * Deprected: 2.2: Use g_main_context_pending() instead.
23969  */
23970
23971
23972 /**
23973  * g_main_quit:
23974  * @loop: a #GMainLoop
23975  *
23976  * Stops the #GMainLoop.
23977  * If g_main_run() was called to run the #GMainLoop, it will now return.
23978  *
23979  * Deprecated: 2.2: Use g_main_loop_quit() instead
23980  */
23981
23982
23983 /**
23984  * g_main_run:
23985  * @loop: a #GMainLoop
23986  *
23987  * Runs a main loop until it stops running.
23988  *
23989  * Deprecated: 2.2: Use g_main_loop_run() instead
23990  */
23991
23992
23993 /**
23994  * g_main_set_poll_func:
23995  * @func: the function to call to poll all file descriptors
23996  *
23997  * Sets the function to use for the handle polling of file descriptors
23998  * for the default main context.
23999  *
24000  * Deprecated: 2.2: Use g_main_context_set_poll_func() again
24001  */
24002
24003
24004 /**
24005  * g_memory_input_stream_add_data:
24006  * @stream: a #GMemoryInputStream
24007  * @data: (array length=len) (element-type guint8): input data
24008  * @len: length of the data, may be -1 if @data is a nul-terminated string
24009  * @destroy: (allow-none): function that is called to free @data, or %NULL
24010  *
24011  * Appends @data to data that can be read from the input stream
24012  */
24013
24014
24015 /**
24016  * g_memory_input_stream_new:
24017  *
24018  * Creates a new empty #GMemoryInputStream.
24019  *
24020  * Returns: a new #GInputStream
24021  */
24022
24023
24024 /**
24025  * g_memory_input_stream_new_from_data:
24026  * @data: (array length=len) (element-type guint8): input data
24027  * @len: length of the data, may be -1 if @data is a nul-terminated string
24028  * @destroy: (allow-none): function that is called to free @data, or %NULL
24029  *
24030  * Creates a new #GMemoryInputStream with data in memory of a given size.
24031  *
24032  * Returns: new #GInputStream read from @data of @len bytes.
24033  */
24034
24035
24036 /**
24037  * g_memory_output_stream_get_data:
24038  * @ostream: a #GMemoryOutputStream
24039  *
24040  * Gets any loaded data from the @ostream.
24041  * Note that the returned pointer may become invalid on the next
24042  * write or truncate operation on the stream.
24043  *
24044  * Returns: (transfer none): pointer to the stream's data
24045  */
24046
24047
24048 /**
24049  * g_memory_output_stream_get_data_size:
24050  * @ostream: a #GMemoryOutputStream
24051  *
24052  * Returns the number of bytes from the start up
24053  * to including the last byte written in the stream
24054  * that has not been truncated away.
24055  *
24056  * Returns: the number of bytes written to the stream
24057  * Since: 2.18
24058  */
24059
24060
24061 /**
24062  * g_memory_output_stream_get_size:
24063  * @ostream: a #GMemoryOutputStream
24064  *
24065  * Gets the size of the currently allocated data area (available from
24066  * g_memory_output_stream_get_data()). If the stream isn't
24067  * growable (no realloc was passed to g_memory_output_stream_new()) then
24068  * this is the maximum size of the stream and further writes
24069  * will return %G_IO_ERROR_NO_SPACE.
24070  * Note that for growable streams the returned size may become invalid on
24071  * the next write or truncate operation on the stream.
24072  * If you want the number of bytes currently written to the stream, use
24073  * g_memory_output_stream_get_data_size().
24074  *
24075  * Returns: the number of bytes allocated for the data buffer
24076  */
24077
24078
24079 /**
24080  * g_memory_output_stream_new: (skip)
24081  * @data: pointer to a chunk of memory to use, or %NULL
24082  * @size: the size of @data
24083  * @realloc_function: a function with realloc() semantics (like g_realloc()) to be called when @data needs to be grown, or %NULL
24084  * @destroy_function: a function to be called on @data when the stream is finalized, or %NULL
24085  *
24086  * Creates a new #GMemoryOutputStream.
24087  * If @data is non-%NULL, the stream  will use that for its internal storage.
24088  * If @realloc_fn is non-%NULL, it will be used for resizing the internal
24089  * storage when necessary. To construct a fixed-size output stream,
24090  * pass %NULL as @realloc_fn.
24091  * |[
24092  * /&ast; a stream that can grow &ast;/
24093  * stream = g_memory_output_stream_new (NULL, 0, realloc, free);
24094  * /&ast; another stream that can grow &ast;/
24095  * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
24096  * /&ast; a fixed-size stream &ast;/
24097  * data = malloc (200);
24098  * stream3 = g_memory_output_stream_new (data, 200, NULL, free);
24099  * ]|
24100  *
24101  * Returns: A newly created #GMemoryOutputStream object.
24102  */
24103
24104
24105 /**
24106  * g_memory_output_stream_steal_data:
24107  * @ostream: a #GMemoryOutputStream
24108  *
24109  * Gets any loaded data from the @ostream. Ownership of the data
24110  * is transferred to the caller; when no longer needed it must be
24111  * freed using the free function set in @ostream's
24112  * #GMemoryOutputStream:destroy-function property.
24113  *
24114  * Returns: (transfer full): the stream's data
24115  * Since: 2.26
24116  */
24117
24118
24119 /**
24120  * g_mount_can_eject:
24121  * @mount: a #GMount.
24122  *
24123  * Checks if @mount can be eject.
24124  *
24125  * Returns: %TRUE if the @mount can be ejected.
24126  */
24127
24128
24129 /**
24130  * g_mount_can_unmount:
24131  * @mount: a #GMount.
24132  *
24133  * Checks if @mount can be mounted.
24134  *
24135  * Returns: %TRUE if the @mount can be unmounted.
24136  */
24137
24138
24139 /**
24140  * g_mount_eject:
24141  * @mount: a #GMount.
24142  * @flags: flags affecting the unmount if required for eject
24143  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24144  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24145  * @user_data: user data passed to @callback.
24146  *
24147  * Ejects a mount. This is an asynchronous operation, and is
24148  * finished by calling g_mount_eject_finish() with the @mount
24149  * and #GAsyncResult data returned in the @callback.
24150  *
24151  * Deprecated: 2.22: Use g_mount_eject_with_operation() instead.
24152  */
24153
24154
24155 /**
24156  * g_mount_eject_finish:
24157  * @mount: a #GMount.
24158  * @result: a #GAsyncResult.
24159  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24160  *
24161  * Finishes ejecting a mount. If any errors occurred during the operation,
24162  *
24163  * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
24164  * Deprecated: 2.22: Use g_mount_eject_with_operation_finish() instead.
24165  */
24166
24167
24168 /**
24169  * g_mount_eject_with_operation:
24170  * @mount: a #GMount.
24171  * @flags: flags affecting the unmount if required for eject
24172  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24173  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24174  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24175  * @user_data: user data passed to @callback.
24176  *
24177  * Ejects a mount. This is an asynchronous operation, and is
24178  * finished by calling g_mount_eject_with_operation_finish() with the @mount
24179  * and #GAsyncResult data returned in the @callback.
24180  *
24181  * Since: 2.22
24182  */
24183
24184
24185 /**
24186  * g_mount_eject_with_operation_finish:
24187  * @mount: a #GMount.
24188  * @result: a #GAsyncResult.
24189  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24190  *
24191  * Finishes ejecting a mount. If any errors occurred during the operation,
24192  *
24193  * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
24194  * Since: 2.22
24195  */
24196
24197
24198 /**
24199  * g_mount_get_default_location:
24200  * @mount: a #GMount.
24201  *
24202  * Gets the default location of @mount. The default location of the given
24203  * the home directory, or the root of the volume).
24204  * The returned object should be unreffed with
24205  * g_object_unref() when no longer needed.
24206  *
24207  * Returns: (transfer full): a #GFile.
24208  */
24209
24210
24211 /**
24212  * g_mount_get_drive:
24213  * @mount: a #GMount.
24214  *
24215  * Gets the drive for the @mount.
24216  * This is a convenience method for getting the #GVolume and then
24217  * using that object to get the #GDrive.
24218  * The returned object should be unreffed with
24219  * g_object_unref() when no longer needed.
24220  *
24221  * Returns: (transfer full): a #GDrive or %NULL if @mount is not associated with a volume or a drive.
24222  */
24223
24224
24225 /**
24226  * g_mount_get_icon:
24227  * @mount: a #GMount.
24228  *
24229  * Gets the icon for @mount.
24230  * The returned object should be unreffed with
24231  * g_object_unref() when no longer needed.
24232  *
24233  * Returns: (transfer full): a #GIcon.
24234  */
24235
24236
24237 /**
24238  * g_mount_get_name:
24239  * @mount: a #GMount.
24240  *
24241  * Gets the name of @mount.
24242  * The returned string should be freed with g_free()
24243  * when no longer needed.
24244  *
24245  * Returns: the name for the given @mount.
24246  */
24247
24248
24249 /**
24250  * g_mount_get_root:
24251  * @mount: a #GMount.
24252  *
24253  * Gets the root directory on @mount.
24254  * The returned object should be unreffed with
24255  * g_object_unref() when no longer needed.
24256  *
24257  * Returns: (transfer full): a #GFile.
24258  */
24259
24260
24261 /**
24262  * g_mount_get_uuid:
24263  * @mount: a #GMount.
24264  *
24265  * Gets the UUID for the @mount. The reference is typically based on
24266  * the file system UUID for the mount in question and should be
24267  * considered an opaque string. Returns %NULL if there is no UUID
24268  * available.
24269  * The returned string should be freed with g_free()
24270  * when no longer needed.
24271  *
24272  * Returns: the UUID for @mount or %NULL if no UUID can be computed.
24273  */
24274
24275
24276 /**
24277  * g_mount_get_volume:
24278  * @mount: a #GMount.
24279  *
24280  * Gets the volume for the @mount.
24281  * The returned object should be unreffed with
24282  * g_object_unref() when no longer needed.
24283  *
24284  * Returns: (transfer full): a #GVolume or %NULL if @mount is not associated with a volume.
24285  */
24286
24287
24288 /**
24289  * g_mount_guess_content_type:
24290  * @mount: a #GMount
24291  * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
24292  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
24293  * @callback: a #GAsyncReadyCallback
24294  * @user_data: user data passed to @callback
24295  *
24296  * Tries to guess the type of content stored on @mount. Returns one or
24297  * more textual identifiers of well-known content types (typically
24298  * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
24299  * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
24300  * specification for more on x-content types.
24301  * This is an asynchronous operation (see
24302  * g_mount_guess_content_type_sync() for the synchronous version), and
24303  * is finished by calling g_mount_guess_content_type_finish() with the
24304  *
24305  * Since: 2.18
24306  */
24307
24308
24309 /**
24310  * g_mount_guess_content_type_finish:
24311  * @mount: a #GMount
24312  * @result: a #GAsyncResult
24313  * @error: a #GError location to store the error occuring, or %NULL to ignore
24314  *
24315  * Finishes guessing content types of @mount. If any errors occured
24316  * during the operation, @error will be set to contain the errors and
24317  * %FALSE will be returned. In particular, you may get an
24318  * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
24319  * guessing.
24320  * Caller should free this array with g_strfreev() when done with it.
24321  *
24322  * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
24323  * Since: 2.18
24324  */
24325
24326
24327 /**
24328  * g_mount_guess_content_type_sync:
24329  * @mount: a #GMount
24330  * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
24331  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
24332  * @error: a #GError location to store the error occuring, or %NULL to ignore
24333  *
24334  * Tries to guess the type of content stored on @mount. Returns one or
24335  * more textual identifiers of well-known content types (typically
24336  * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
24337  * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
24338  * specification for more on x-content types.
24339  * This is an synchronous operation and as such may block doing IO;
24340  * see g_mount_guess_content_type() for the asynchronous version.
24341  * Caller should free this array with g_strfreev() when done with it.
24342  *
24343  * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
24344  * Since: 2.18
24345  */
24346
24347
24348 /**
24349  * g_mount_is_shadowed:
24350  * @mount: A #GMount.
24351  *
24352  * Determines if @mount is shadowed. Applications or libraries should
24353  * avoid displaying @mount in the user interface if it is shadowed.
24354  * A mount is said to be shadowed if there exists one or more user
24355  * visible objects (currently #GMount objects) with a root that is
24356  * inside the root of @mount.
24357  * One application of shadow mounts is when exposing a single file
24358  * system that is used to address several logical volumes. In this
24359  * situation, a #GVolumeMonitor implementation would create two
24360  * #GVolume objects (for example, one for the camera functionality of
24361  * the device and one for a SD card reader on the device) with
24362  * activation URIs <literal>gphoto2://[usb:001,002]/store1/</literal>
24363  * and <literal>gphoto2://[usb:001,002]/store2/</literal>. When the
24364  * underlying mount (with root
24365  * <literal>gphoto2://[usb:001,002]/</literal>) is mounted, said
24366  * #GVolumeMonitor implementation would create two #GMount objects
24367  * (each with their root matching the corresponding volume activation
24368  * root) that would shadow the original mount.
24369  * The proxy monitor in GVfs 2.26 and later, automatically creates and
24370  * manage shadow mounts (and shadows the underlying mount) if the
24371  * activation root on a #GVolume is set.
24372  *
24373  * Returns: %TRUE if @mount is shadowed.
24374  * Since: 2.20
24375  */
24376
24377
24378 /**
24379  * g_mount_operation_get_anonymous:
24380  * @op: a #GMountOperation.
24381  *
24382  * Check to see whether the mount operation is being used
24383  * for an anonymous user.
24384  *
24385  * Returns: %TRUE if mount operation is anonymous.
24386  */
24387
24388
24389 /**
24390  * g_mount_operation_get_choice:
24391  * @op: a #GMountOperation.
24392  *
24393  * Gets a choice from the mount operation.
24394  * the choice's list, or %0.
24395  *
24396  * Returns: an integer containing an index of the user's choice from
24397  */
24398
24399
24400 /**
24401  * g_mount_operation_get_domain:
24402  * @op: a #GMountOperation.
24403  *
24404  * Gets the domain of the mount operation.
24405  *
24406  * Returns: a string set to the domain.
24407  */
24408
24409
24410 /**
24411  * g_mount_operation_get_password:
24412  * @op: a #GMountOperation.
24413  *
24414  * Gets a password from the mount operation.
24415  *
24416  * Returns: a string containing the password within @op.
24417  */
24418
24419
24420 /**
24421  * g_mount_operation_get_password_save:
24422  * @op: a #GMountOperation.
24423  *
24424  * Gets the state of saving passwords for the mount operation.
24425  *
24426  * Returns: a #GPasswordSave flag.
24427  */
24428
24429
24430 /**
24431  * g_mount_operation_get_usernam:
24432  * @op: a #GMountOperation.
24433  *
24434  * Get the user name from the mount operation.
24435  *
24436  * Returns: a string containing the user name.
24437  */
24438
24439
24440 /**
24441  * g_mount_operation_new:
24442  *
24443  * Creates a new mount operation.
24444  *
24445  * Returns: a #GMountOperation.
24446  */
24447
24448
24449 /**
24450  * g_mount_operation_reply:
24451  * @op: a #GMountOperation
24452  * @result: a #GMountOperationResult
24453  *
24454  * Emits the #GMountOperation::reply signal.
24455  */
24456
24457
24458 /**
24459  * g_mount_operation_set_anonymous:
24460  * @op: a #GMountOperation.
24461  * @anonymous: boolean value.
24462  *
24463  * Sets the mount operation to use an anonymous user if @anonymous is %TRUE.
24464  */
24465
24466
24467 /**
24468  * g_mount_operation_set_choice:
24469  * @op: a #GMountOperation.
24470  * @choice: an integer.
24471  *
24472  * Sets a default choice for the mount operation.
24473  */
24474
24475
24476 /**
24477  * g_mount_operation_set_domain:
24478  * @op: a #GMountOperation.
24479  * @domain: the domain to set.
24480  *
24481  * Sets the mount operation's domain.
24482  */
24483
24484
24485 /**
24486  * g_mount_operation_set_password:
24487  * @op: a #GMountOperation.
24488  * @password: password to set.
24489  *
24490  * Sets the mount operation's password to @password.
24491  */
24492
24493
24494 /**
24495  * g_mount_operation_set_password_save:
24496  * @op: a #GMountOperation.
24497  * @save: a set of #GPasswordSave flags.
24498  *
24499  * Sets the state of saving passwords for the mount operation.
24500  */
24501
24502
24503 /**
24504  * g_mount_operation_set_username:
24505  * @op: a #GMountOperation.
24506  * @username: input username.
24507  *
24508  * Sets the user name within @op to @username.
24509  */
24510
24511
24512 /**
24513  * g_mount_remount:
24514  * @mount: a #GMount.
24515  * @flags: flags affecting the operation
24516  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24517  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24518  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24519  * @user_data: user data passed to @callback.
24520  *
24521  * Remounts a mount. This is an asynchronous operation, and is
24522  * finished by calling g_mount_remount_finish() with the @mount
24523  * and #GAsyncResults data returned in the @callback.
24524  * Remounting is useful when some setting affecting the operation
24525  * of the volume has been changed, as these may need a remount to
24526  * take affect. While this is semantically equivalent with unmounting
24527  * and then remounting not all backends might need to actually be
24528  * unmounted.
24529  */
24530
24531
24532 /**
24533  * g_mount_remount_finish:
24534  * @mount: a #GMount.
24535  * @result: a #GAsyncResult.
24536  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24537  *
24538  * Finishes remounting a mount. If any errors occurred during the operation,
24539  *
24540  * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise.
24541  */
24542
24543
24544 /**
24545  * g_mount_shadow:
24546  * @mount: A #GMount.
24547  *
24548  * Increments the shadow count on @mount. Usually used by
24549  * #GVolumeMonitor implementations when creating a shadow mount for
24550  * will need to emit the #GMount::changed signal on @mount manually.
24551  *
24552  * Since: 2.20
24553  */
24554
24555
24556 /**
24557  * g_mount_unmount:
24558  * @mount: a #GMount.
24559  * @flags: flags affecting the operation
24560  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24561  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24562  * @user_data: user data passed to @callback.
24563  *
24564  * Unmounts a mount. This is an asynchronous operation, and is
24565  * finished by calling g_mount_unmount_finish() with the @mount
24566  * and #GAsyncResult data returned in the @callback.
24567  *
24568  * Deprecated: 2.22: Use g_mount_unmount_with_operation() instead.
24569  */
24570
24571
24572 /**
24573  * g_mount_unmount_finish:
24574  * @mount: a #GMount.
24575  * @result: a #GAsyncResult.
24576  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24577  *
24578  * Finishes unmounting a mount. If any errors occurred during the operation,
24579  *
24580  * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
24581  * Deprecated: 2.22: Use g_mount_unmount_with_operation_finish() instead.
24582  */
24583
24584
24585 /**
24586  * g_mount_unmount_with_operation:
24587  * @mount: a #GMount.
24588  * @flags: flags affecting the operation
24589  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24590  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24591  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24592  * @user_data: user data passed to @callback.
24593  *
24594  * Unmounts a mount. This is an asynchronous operation, and is
24595  * finished by calling g_mount_unmount_with_operation_finish() with the @mount
24596  * and #GAsyncResult data returned in the @callback.
24597  *
24598  * Since: 2.22
24599  */
24600
24601
24602 /**
24603  * g_mount_unmount_with_operation_finish:
24604  * @mount: a #GMount.
24605  * @result: a #GAsyncResult.
24606  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24607  *
24608  * Finishes unmounting a mount. If any errors occurred during the operation,
24609  *
24610  * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
24611  * Since: 2.22
24612  */
24613
24614
24615 /**
24616  * g_mount_unshadow:
24617  * @mount: A #GMount.
24618  *
24619  * Decrements the shadow count on @mount. Usually used by
24620  * #GVolumeMonitor implementations when destroying a shadow mount for
24621  * will need to emit the #GMount::changed signal on @mount manually.
24622  *
24623  * Since: 2.20
24624  */
24625
24626
24627 /**
24628  * g_network_address_get_hostname:
24629  * @addr: a #GNetworkAddress
24630  *
24631  * Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded,
24632  * depending on what @addr was created with.
24633  *
24634  * Returns: @addr's hostname
24635  * Since: 2.22
24636  */
24637
24638
24639 /**
24640  * g_network_address_get_port:
24641  * @addr: a #GNetworkAddress
24642  *
24643  * Gets @addr's port number
24644  *
24645  * Returns: @addr's port (which may be 0)
24646  * Since: 2.22
24647  */
24648
24649
24650 /**
24651  * g_network_address_get_scheme:
24652  * @addr: a #GNetworkAddress
24653  *
24654  * Gets @addr's scheme
24655  *
24656  * Returns: @addr's scheme (%NULL if not built from URI)
24657  * Since: 2.26
24658  */
24659
24660
24661 /**
24662  * g_network_address_new:
24663  * @hostname: the hostname
24664  * @port: the port
24665  *
24666  * Creates a new #GSocketConnectable for connecting to the given
24667  *
24668  * Returns: (transfer full): the new #GNetworkAddress
24669  * Since: 2.22
24670  */
24671
24672
24673 /**
24674  * g_network_address_parse:
24675  * @host_and_port: the hostname and optionally a port
24676  * @default_port: the default port if not in @host_and_port
24677  * @error: a pointer to a #GError, or %NULL
24678  *
24679  * Creates a new #GSocketConnectable for connecting to the given
24680  * parsing @host_and_port fails.
24681  * address, an IPv4 address, or a domain name (in which case a DNS
24682  * lookup is performed). Quoting with [] is supported for all address
24683  * types. A port override may be specified in the usual way with a
24684  * colon. Ports may be given as decimal numbers or symbolic names (in
24685  * which case an /etc/services lookup is performed).
24686  * If no port is specified in @host_and_port then @default_port will be
24687  * used as the port number to connect to.
24688  * In general, @host_and_port is expected to be provided by the user
24689  * (allowing them to give the hostname, and a port overide if necessary)
24690  * and @default_port is expected to be provided by the application.
24691  *
24692  * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
24693  * Since: 2.22
24694  */
24695
24696
24697 /**
24698  * g_network_address_parse_uri:
24699  * @uri: the hostname and optionally a port
24700  * @default_port: The default port if none is found in the URI
24701  * @error: a pointer to a #GError, or %NULL
24702  *
24703  * Creates a new #GSocketConnectable for connecting to the given
24704  * Using this rather than g_network_address_new() or
24705  * g_network_address_parse_host() allows #GSocketClient to determine
24706  * when to use application-specific proxy protocols.
24707  *
24708  * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
24709  * Since: 2.26
24710  */
24711
24712
24713 /**
24714  * g_network_service_get_domain:
24715  * @srv: a #GNetworkService
24716  *
24717  * Gets the domain that @srv serves. This might be either UTF-8 or
24718  * ASCII-encoded, depending on what @srv was created with.
24719  *
24720  * Returns: @srv's domain name
24721  * Since: 2.22
24722  */
24723
24724
24725 /**
24726  * g_network_service_get_protocol:
24727  * @srv: a #GNetworkService
24728  *
24729  * Gets @srv's protocol name (eg, "tcp").
24730  *
24731  * Returns: @srv's protocol name
24732  * Since: 2.22
24733  */
24734
24735
24736 /**
24737  * g_network_service_get_scheme:
24738  * @srv: a #GNetworkService
24739  *
24740  * Get's the URI scheme used to resolve proxies. By default, the service name
24741  * is used as scheme.
24742  *
24743  * Returns: @srv's scheme name
24744  * Since: 2.26
24745  */
24746
24747
24748 /**
24749  * g_network_service_get_service:
24750  * @srv: a #GNetworkService
24751  *
24752  * Gets @srv's service name (eg, "ldap").
24753  *
24754  * Returns: @srv's service name
24755  * Since: 2.22
24756  */
24757
24758
24759 /**
24760  * g_network_service_new:
24761  * @service: the service type to look up (eg, "ldap")
24762  * @protocol: the networking protocol to use for @service (eg, "tcp")
24763  * @domain: the DNS domain to look up the service in
24764  *
24765  * Creates a new #GNetworkService representing the given @service,
24766  * #GSocketConnectable interface to resolve it.
24767  *
24768  * Returns: (transfer full): a new #GNetworkService
24769  * Since: 2.22
24770  */
24771
24772
24773 /**
24774  * g_network_service_set_scheme:
24775  * @srv: a #GNetworkService
24776  * @scheme: a URI scheme
24777  *
24778  * Set's the URI scheme used to resolve proxies. By default, the service name
24779  * is used as scheme.
24780  *
24781  * Since: 2.26
24782  */
24783
24784
24785 /**
24786  * g_new:
24787  * @struct_type: the type of the elements to allocate
24788  * @n_structs: the number of elements to allocate
24789  *
24790  * Allocates @n_structs elements of type @struct_type.
24791  * The returned pointer is cast to a pointer to the given type.
24792  * If @n_structs is 0 it returns %NULL.
24793  * Care is taken to avoid overflow when calculating the size of the allocated block.
24794  * Since the returned pointer is already casted to the right type,
24795  * it is normally unnecessary to cast it explicitly, and doing
24796  * so might hide memory allocation errors.
24797  *
24798  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
24799  */
24800
24801
24802 /**
24803  * g_new0:
24804  * @struct_type: the type of the elements to allocate.
24805  * @n_structs: the number of elements to allocate.
24806  *
24807  * Allocates @n_structs elements of type @struct_type, initialized to 0's.
24808  * The returned pointer is cast to a pointer to the given type.
24809  * If @n_structs is 0 it returns %NULL.
24810  * Care is taken to avoid overflow when calculating the size of the allocated block.
24811  * Since the returned pointer is already casted to the right type,
24812  * it is normally unnecessary to cast it explicitly, and doing
24813  * so might hide memory allocation errors.
24814  *
24815  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
24816  */
24817
24818
24819 /**
24820  * g_newa:
24821  * @struct_type: Type of memory chunks to be allocated
24822  * @n_structs: Number of chunks to be allocated
24823  *
24824  * Wraps g_alloca() in a more typesafe manner.
24825  *
24826  * Returns: Pointer to stack space for @n_structs chunks of type @struct_type
24827  */
24828
24829
24830 /**
24831  * g_node_append:
24832  * @parent: the #GNode to place the new #GNode under
24833  * @node: the #GNode to insert
24834  *
24835  * Inserts a #GNode as the last child of the given parent.
24836  *
24837  * Returns: the inserted #GNode
24838  */
24839
24840
24841 /**
24842  * g_node_append_data:
24843  * @parent: the #GNode to place the new #GNode under
24844  * @data: the data for the new #GNode
24845  *
24846  * Inserts a new #GNode as the last child of the given parent.
24847  *
24848  * Returns: the new #GNode
24849  */
24850
24851
24852 /**
24853  * g_node_first_child:
24854  * @node: a #GNode
24855  *
24856  * Gets the first child of a #GNode.
24857  * or has no children
24858  *
24859  * Returns: the first child of @node, or %NULL if @node is %NULL
24860  */
24861
24862
24863 /**
24864  * g_node_insert_data:
24865  * @parent: the #GNode to place the new #GNode under
24866  * @position: the position to place the new #GNode at. If position is -1, the new #GNode is inserted as the last child of @parent
24867  * @data: the data for the new #GNode
24868  *
24869  * Inserts a new #GNode at the given position.
24870  *
24871  * Returns: the new #GNode
24872  */
24873
24874
24875 /**
24876  * g_node_insert_data_before:
24877  * @parent: the #GNode to place the new #GNode under
24878  * @sibling: the sibling #GNode to place the new #GNode before
24879  * @data: the data for the new #GNode
24880  *
24881  * Inserts a new #GNode before the given sibling.
24882  *
24883  * Returns: the new #GNode
24884  */
24885
24886
24887 /**
24888  * g_node_next_sibling:
24889  * @node: a #GNode
24890  *
24891  * Gets the next sibling of a #GNode.
24892  * or %NULL
24893  *
24894  * Returns: the next sibling of @node, or %NULL if @node is the last node
24895  */
24896
24897
24898 /**
24899  * g_node_prepend_data:
24900  * @parent: the #GNode to place the new #GNode under
24901  * @data: the data for the new #GNode
24902  *
24903  * Inserts a new #GNode as the first child of the given parent.
24904  *
24905  * Returns: the new #GNode
24906  */
24907
24908
24909 /**
24910  * g_node_prev_sibling:
24911  * @node: a #GNode
24912  *
24913  * Gets the previous sibling of a #GNode.
24914  * node or %NULL
24915  *
24916  * Returns: the previous sibling of @node, or %NULL if @node is the first
24917  */
24918
24919
24920 /**
24921  * g_output_stream_clear_pending:
24922  * @stream: output stream
24923  *
24924  * Clears the pending flag on @stream.
24925  */
24926
24927
24928 /**
24929  * g_output_stream_close:
24930  * @stream: A #GOutputStream.
24931  * @cancellable: (allow-none): optional cancellable object
24932  * @error: location to store the error occuring, or %NULL to ignore
24933  *
24934  * Closes the stream, releasing resources related to it.
24935  * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
24936  * Closing a stream multiple times will not return an error.
24937  * Closing a stream will automatically flush any outstanding buffers in the
24938  * stream.
24939  * Streams will be automatically closed when the last reference
24940  * is dropped, but you might want to call this function to make sure
24941  * resources are released as early as possible.
24942  * Some streams might keep the backing store of the stream (e.g. a file descriptor)
24943  * open after the stream is closed. See the documentation for the individual
24944  * stream for details.
24945  * On failure the first error that happened will be reported, but the close
24946  * operation will finish as much as possible. A stream that failed to
24947  * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
24948  * is important to check and report the error to the user, otherwise
24949  * there might be a loss of data as all data might not be written.
24950  * If @cancellable is not NULL, then the operation can be cancelled by
24951  * triggering the cancellable object from another thread. If the operation
24952  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24953  * Cancelling a close will still leave the stream closed, but there some streams
24954  * can use a faster close that doesn't block to e.g. check errors. On
24955  * cancellation (as with any error) there is no guarantee that all written
24956  * data will reach the target.
24957  *
24958  * Returns: %TRUE on success, %FALSE on failure
24959  */
24960
24961
24962 /**
24963  * g_output_stream_close_async:
24964  * @stream: A #GOutputStream.
24965  * @io_priority: the io priority of the request.
24966  * @cancellable: (allow-none): optional cancellable object
24967  * @callback: (scope async): callback to call when the request is satisfied
24968  * @user_data: (closure): the data to pass to callback function
24969  *
24970  * Requests an asynchronous close of the stream, releasing resources
24971  * related to it. When the operation is finished @callback will be
24972  * called. You can then call g_output_stream_close_finish() to get
24973  * the result of the operation.
24974  * For behaviour details see g_output_stream_close().
24975  * The asyncronous methods have a default fallback that uses threads
24976  * to implement asynchronicity, so they are optional for inheriting
24977  * classes. However, if you override one you must override all.
24978  */
24979
24980
24981 /**
24982  * g_output_stream_close_finish:
24983  * @stream: a #GOutputStream.
24984  * @result: a #GAsyncResult.
24985  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24986  *
24987  * Closes an output stream.
24988  *
24989  * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
24990  */
24991
24992
24993 /**
24994  * g_output_stream_flush:
24995  * @stream: a #GOutputStream.
24996  * @cancellable: (allow-none): optional cancellable object
24997  * @error: location to store the error occuring, or %NULL to ignore
24998  *
24999  * Flushed any outstanding buffers in the stream. Will block during
25000  * the operation. Closing the stream will implicitly cause a flush.
25001  * This function is optional for inherited classes.
25002  * If @cancellable is not %NULL, then the operation can be cancelled by
25003  * triggering the cancellable object from another thread. If the operation
25004  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25005  *
25006  * Returns: %TRUE on success, %FALSE on error
25007  */
25008
25009
25010 /**
25011  * g_output_stream_flush_async:
25012  * @stream: a #GOutputStream.
25013  * @io_priority: the io priority of the request.
25014  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25015  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25016  * @user_data: (closure): the data to pass to callback function
25017  *
25018  * Flushes a stream asynchronously.
25019  * For behaviour details see g_output_stream_flush().
25020  * When the operation is finished @callback will be
25021  * called. You can then call g_output_stream_flush_finish() to get the
25022  * result of the operation.
25023  */
25024
25025
25026 /**
25027  * g_output_stream_flush_finish:
25028  * @stream: a #GOutputStream.
25029  * @result: a GAsyncResult.
25030  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25031  *
25032  * Finishes flushing an output stream.
25033  *
25034  * Returns: %TRUE if flush operation suceeded, %FALSE otherwise.
25035  */
25036
25037
25038 /**
25039  * g_output_stream_has_pending:
25040  * @stream: a #GOutputStream.
25041  *
25042  * Checks if an ouput stream has pending actions.
25043  *
25044  * Returns: %TRUE if @stream has pending actions.
25045  */
25046
25047
25048 /**
25049  * g_output_stream_is_closed:
25050  * @stream: a #GOutputStream.
25051  *
25052  * Checks if an output stream has already been closed.
25053  *
25054  * Returns: %TRUE if @stream is closed. %FALSE otherwise.
25055  */
25056
25057
25058 /**
25059  * g_output_stream_is_closing:
25060  * @stream: a #GOutputStream.
25061  *
25062  * Checks if an output stream is being closed. This can be
25063  * used inside e.g. a flush implementation to see if the
25064  * flush (or other i/o operation) is called from within
25065  * the closing operation.
25066  *
25067  * Returns: %TRUE if @stream is being closed. %FALSE otherwise.
25068  * Since: 2.24
25069  */
25070
25071
25072 /**
25073  * g_output_stream_set_pending:
25074  * @stream: a #GOutputStream.
25075  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25076  *
25077  * Sets @stream to have actions pending. If the pending flag is
25078  * already set or @stream is closed, it will return %FALSE and set
25079  *
25080  * Returns: %TRUE if pending was previously unset and is now set.
25081  */
25082
25083
25084 /**
25085  * g_output_stream_splice:
25086  * @stream: a #GOutputStream.
25087  * @source: a #GInputStream.
25088  * @flags: a set of #GOutputStreamSpliceFlags.
25089  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25090  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25091  *
25092  * Splices an input stream into an output stream.
25093  * -1 if an error occurred.
25094  *
25095  * Returns: a #gssize containing the size of the data spliced, or
25096  */
25097
25098
25099 /**
25100  * g_output_stream_splice_async:
25101  * @stream: a #GOutputStream.
25102  * @source: a #GInputStream.
25103  * @flags: a set of #GOutputStreamSpliceFlags.
25104  * @io_priority: the io priority of the request.
25105  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25106  * @callback: (scope async): a #GAsyncReadyCallback.
25107  * @user_data: (closure): user data passed to @callback.
25108  *
25109  * Splices a stream asynchronously.
25110  * When the operation is finished @callback will be called.
25111  * You can then call g_output_stream_splice_finish() to get the
25112  * result of the operation.
25113  * For the synchronous, blocking version of this function, see
25114  * g_output_stream_splice().
25115  */
25116
25117
25118 /**
25119  * g_output_stream_splice_finish:
25120  * @stream: a #GOutputStream.
25121  * @result: a #GAsyncResult.
25122  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25123  *
25124  * Finishes an asynchronous stream splice operation.
25125  *
25126  * Returns: a #gssize of the number of bytes spliced.
25127  */
25128
25129
25130 /**
25131  * g_output_stream_write:
25132  * @stream: a #GOutputStream.
25133  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
25134  * @count: the number of bytes to write
25135  * @cancellable: (allow-none): optional cancellable object
25136  * @error: location to store the error occuring, or %NULL to ignore
25137  *
25138  * Tries to write @count bytes from @buffer into the stream. Will block
25139  * during the operation.
25140  * If count is 0, returns 0 and does nothing. A value of @count
25141  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
25142  * On success, the number of bytes written to the stream is returned.
25143  * It is not an error if this is not the same as the requested size, as it
25144  * can happen e.g. on a partial I/O error, or if there is not enough
25145  * storage in the stream. All writes block until at least one byte
25146  * is written or an error occurs; 0 is never returned (unless
25147  * If @cancellable is not NULL, then the operation can be cancelled by
25148  * triggering the cancellable object from another thread. If the operation
25149  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
25150  * operation was partially finished when the operation was cancelled the
25151  * partial result will be returned, without an error.
25152  * On error -1 is returned and @error is set accordingly.
25153  *
25154  * Returns: Number of bytes written, or -1 on error
25155  */
25156
25157
25158 /**
25159  * g_output_stream_write_all:
25160  * @stream: a #GOutputStream.
25161  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
25162  * @count: the number of bytes to write
25163  * @bytes_written: (out): location to store the number of bytes that was written to the stream
25164  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25165  * @error: location to store the error occuring, or %NULL to ignore
25166  *
25167  * Tries to write @count bytes from @buffer into the stream. Will block
25168  * during the operation.
25169  * This function is similar to g_output_stream_write(), except it tries to
25170  * write as many bytes as requested, only stopping on an error.
25171  * On a successful write of @count bytes, %TRUE is returned, and @bytes_written
25172  * is set to @count.
25173  * If there is an error during the operation FALSE is returned and @error
25174  * is set to indicate the error status, @bytes_written is updated to contain
25175  * the number of bytes written into the stream before the error occurred.
25176  *
25177  * Returns: %TRUE on success, %FALSE if there was an error
25178  */
25179
25180
25181 /**
25182  * g_output_stream_write_async:
25183  * @stream: A #GOutputStream.
25184  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
25185  * @count: the number of bytes to write
25186  * @io_priority: the io priority of the request.
25187  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25188  * @callback: (scope async): callback to call when the request is satisfied
25189  * @user_data: (closure): the data to pass to callback function
25190  *
25191  * Request an asynchronous write of @count bytes from @buffer into
25192  * the stream. When the operation is finished @callback will be called.
25193  * You can then call g_output_stream_write_finish() to get the result of the
25194  * operation.
25195  * During an async request no other sync and async calls are allowed,
25196  * and will result in %G_IO_ERROR_PENDING errors.
25197  * A value of @count larger than %G_MAXSSIZE will cause a
25198  * %G_IO_ERROR_INVALID_ARGUMENT error.
25199  * On success, the number of bytes written will be passed to the
25200  * requested size, as it can happen e.g. on a partial I/O error,
25201  * but generally we try to write as many bytes as requested.
25202  * You are guaranteed that this method will never fail with
25203  * %G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the
25204  * method will just wait until this changes.
25205  * Any outstanding I/O request with higher priority (lower numerical
25206  * value) will be executed before an outstanding request with lower
25207  * priority. Default priority is %G_PRIORITY_DEFAULT.
25208  * The asyncronous methods have a default fallback that uses threads
25209  * to implement asynchronicity, so they are optional for inheriting
25210  * classes. However, if you override one you must override all.
25211  * For the synchronous, blocking version of this function, see
25212  * g_output_stream_write().
25213  */
25214
25215
25216 /**
25217  * g_output_stream_write_finish:
25218  * @stream: a #GOutputStream.
25219  * @result: a #GAsyncResult.
25220  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25221  *
25222  * Finishes a stream write operation.
25223  *
25224  * Returns: a #gssize containing the number of bytes written to the stream.
25225  */
25226
25227
25228 /**
25229  * g_permission_acquire:
25230  * @permission: a #GPermission instance
25231  * @cancellable: a #GCancellable, or %NULL
25232  * @error: a pointer to a %NULL #GError, or %NULL
25233  * @returns: %TRUE if the permission was successfully acquired
25234  *
25235  * Attempts to acquire the permission represented by @permission.
25236  * The precise method by which this happens depends on the permission
25237  * and the underlying authentication mechanism.  A simple example is
25238  * that a dialog may appear asking the user to enter their password.
25239  * You should check with g_permission_get_can_acquire() before calling
25240  * this function.
25241  * If the permission is acquired then %TRUE is returned.  Otherwise,
25242  * %FALSE is returned and @error is set appropriately.
25243  * This call is blocking, likely for a very long time (in the case that
25244  * user interaction is required).  See g_permission_acquire_async() for
25245  * the non-blocking version.
25246  *
25247  * Since: 2.26
25248  */
25249
25250
25251 /**
25252  * g_permission_acquire_async:
25253  * @permission: a #GPermission instance
25254  * @cancellable: a #GCancellable, or %NULL
25255  * @callback: the #GAsyncReadyCallback to call when done
25256  * @user_data: the user data to pass to @callback
25257  *
25258  * Attempts to acquire the permission represented by @permission.
25259  * This is the first half of the asynchronous version of
25260  * g_permission_acquire().
25261  *
25262  * Since: 2.26
25263  */
25264
25265
25266 /**
25267  * g_permission_acquire_finish:
25268  * @permission: a #GPermission instance
25269  * @result: the #GAsyncResult given to the #GAsyncReadyCallback
25270  * @error: a pointer to a %NULL #GError, or %NULL
25271  * @returns: %TRUE if the permission was successfully acquired
25272  *
25273  * Collects the result of attempting to acquire the permission
25274  * represented by @permission.
25275  * This is the second half of the asynchronous version of
25276  * g_permission_acquire().
25277  *
25278  * Since: 2.26
25279  */
25280
25281
25282 /**
25283  * g_permission_get_allowed:
25284  * @permission: a #GPermission instance
25285  * @returns: the value of the 'allowed' property
25286  *
25287  * Gets the value of the 'allowed' property.  This property is %TRUE if
25288  * the caller currently has permission to perform the action that
25289  *
25290  * Since: 2.26
25291  */
25292
25293
25294 /**
25295  * g_permission_get_can_acquire:
25296  * @permission: a #GPermission instance
25297  * @returns: the value of the 'can-acquire' property
25298  *
25299  * Gets the value of the 'can-acquire' property.  This property is %TRUE
25300  * if it is generally possible to acquire the permission by calling
25301  * g_permission_acquire().
25302  *
25303  * Since: 2.26
25304  */
25305
25306
25307 /**
25308  * g_permission_get_can_release:
25309  * @permission: a #GPermission instance
25310  * @returns: the value of the 'can-release' property
25311  *
25312  * Gets the value of the 'can-release' property.  This property is %TRUE
25313  * if it is generally possible to release the permission by calling
25314  * g_permission_release().
25315  *
25316  * Since: 2.26
25317  */
25318
25319
25320 /**
25321  * g_permission_impl_update:
25322  * @permission: a #GPermission instance
25323  * @allowed: the new value for the 'allowed' property
25324  * @can_acquire: the new value for the 'can-acquire' property
25325  * @can_release: the new value for the 'can-release' property
25326  *
25327  * This function is called by the #GPermission implementation to update
25328  * the properties of the permission.  You should never call this
25329  * function except from a #GPermission implementation.
25330  * GObject notify signals are generated, as appropriate.
25331  *
25332  * Since: 2.26
25333  */
25334
25335
25336 /**
25337  * g_permission_release:
25338  * @permission: a #GPermission instance
25339  * @cancellable: a #GCancellable, or %NULL
25340  * @error: a pointer to a %NULL #GError, or %NULL
25341  * @returns: %TRUE if the permission was successfully released
25342  *
25343  * Attempts to release the permission represented by @permission.
25344  * The precise method by which this happens depends on the permission
25345  * and the underlying authentication mechanism.  In most cases the
25346  * permission will be dropped immediately without further action.
25347  * You should check with g_permission_get_can_release() before calling
25348  * this function.
25349  * If the permission is released then %TRUE is returned.  Otherwise,
25350  * %FALSE is returned and @error is set appropriately.
25351  * This call is blocking, likely for a very long time (in the case that
25352  * user interaction is required).  See g_permission_release_async() for
25353  * the non-blocking version.
25354  *
25355  * Since: 2.26
25356  */
25357
25358
25359 /**
25360  * g_permission_release_async:
25361  * @permission: a #GPermission instance
25362  * @cancellable: a #GCancellable, or %NULL
25363  * @callback: the #GAsyncReadyCallback to call when done
25364  * @user_data: the user data to pass to @callback
25365  *
25366  * Attempts to release the permission represented by @permission.
25367  * This is the first half of the asynchronous version of
25368  * g_permission_release().
25369  *
25370  * Since: 2.26
25371  */
25372
25373
25374 /**
25375  * g_permission_release_finish:
25376  * @permission: a #GPermission instance
25377  * @result: the #GAsyncResult given to the #GAsyncReadyCallback
25378  * @error: a pointer to a %NULL #GError, or %NULL
25379  * @returns: %TRUE if the permission was successfully released
25380  *
25381  * Collects the result of attempting to release the permission
25382  * represented by @permission.
25383  * This is the second half of the asynchronous version of
25384  * g_permission_release().
25385  *
25386  * Since: 2.26
25387  */
25388
25389
25390 /**
25391  * g_poll_file_monitor_new:
25392  * @file: a #GFile.
25393  *
25394  * Polls @file for changes.
25395  *
25396  * Returns: a new #GFileMonitor for the given #GFile.
25397  */
25398
25399
25400 /**
25401  * g_pollable_input_stream_can_poll:
25402  * @stream: a #GPollableInputStream.
25403  *
25404  * Checks if @stream is actually pollable. Some classes may implement
25405  * #GPollableInputStream but have only certain instances of that class
25406  * be pollable. If this method returns %FALSE, then the behavior of
25407  * other #GPollableInputStream methods is undefined.
25408  * For any given stream, the value returned by this method is constant;
25409  * a stream cannot switch from pollable to non-pollable or vice versa.
25410  *
25411  * Returns: %TRUE if @stream is pollable, %FALSE if not.
25412  * Since: 2.28
25413  */
25414
25415
25416 /**
25417  * g_pollable_input_stream_create_source: (skip)
25418  * @stream: a #GPollableInputStream.
25419  * @cancellable: (allow-none): a #GCancellable, or %NULL
25420  *
25421  * Creates a #GSource that triggers when @stream can be read, or
25422  * source is of the #GPollableSourceFunc type.
25423  * As with g_pollable_input_stream_is_readable(), it is possible that
25424  * the stream may not actually be readable even after the source
25425  * triggers, so you should use g_pollable_input_stream_read_nonblocking()
25426  * rather than g_input_stream_read() from the callback.
25427  *
25428  * Returns: (transfer full): a new #GSource
25429  * Since: 2.28
25430  */
25431
25432
25433 /**
25434  * g_pollable_input_stream_is_readable:
25435  * @stream: a #GPollableInputStream.
25436  *
25437  * Checks if @stream can be read.
25438  * Note that some stream types may not be able to implement this 100%
25439  * reliably, and it is possible that a call to g_input_stream_read()
25440  * after this returns %TRUE would still block. To guarantee
25441  * non-blocking behavior, you should always use
25442  * g_pollable_input_stream_read_nonblocking(), which will return a
25443  * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
25444  * has occurred on @stream, this will result in
25445  * g_pollable_input_stream_is_readable() returning %TRUE, and the
25446  * next attempt to read will return the error.
25447  *
25448  * Returns: %TRUE if @stream is readable, %FALSE if not. If an error
25449  * Since: 2.28
25450  */
25451
25452
25453 /**
25454  * g_pollable_input_stream_read_nonblocking:
25455  * @stream: a #GPollableInputStream
25456  * @buffer: a buffer to read data into (which should be at least @size bytes long).
25457  * @size: the number of bytes you want to read
25458  * @cancellable: (allow-none): a #GCancellable, or %NULL
25459  * @error: #GError for error reporting, or %NULL to ignore.
25460  *
25461  * Attempts to read up to @size bytes from @stream into @buffer, as
25462  * with g_input_stream_read(). If @stream is not currently readable,
25463  * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
25464  * use g_pollable_input_stream_create_source() to create a #GSource
25465  * that will be triggered when @stream is readable.
25466  * Note that since this method never blocks, you cannot actually
25467  * use @cancellable to cancel it. However, it will return an error
25468  * if @cancellable has already been cancelled when you call, which
25469  * may happen if you call this method after a source triggers due
25470  * to having been cancelled.
25471  * %G_IO_ERROR_WOULD_BLOCK).
25472  *
25473  * Virtual: read_nonblocking
25474  * Returns: the number of bytes read, or -1 on error (including
25475  */
25476
25477
25478 /**
25479  * g_pollable_output_stream_can_poll:
25480  * @stream: a #GPollableOutputStream.
25481  *
25482  * Checks if @stream is actually pollable. Some classes may implement
25483  * #GPollableOutputStream but have only certain instances of that
25484  * class be pollable. If this method returns %FALSE, then the behavior
25485  * of other #GPollableOutputStream methods is undefined.
25486  * For any given stream, the value returned by this method is constant;
25487  * a stream cannot switch from pollable to non-pollable or vice versa.
25488  *
25489  * Returns: %TRUE if @stream is pollable, %FALSE if not.
25490  * Since: 2.28
25491  */
25492
25493
25494 /**
25495  * g_pollable_output_stream_create_source: (skip)
25496  * @stream: a #GPollableOutputStream.
25497  * @cancellable: (allow-none): a #GCancellable, or %NULL
25498  *
25499  * Creates a #GSource that triggers when @stream can be written, or
25500  * source is of the #GPollableSourceFunc type.
25501  * As with g_pollable_output_stream_is_writable(), it is possible that
25502  * the stream may not actually be writable even after the source
25503  * triggers, so you should use g_pollable_output_stream_write_nonblocking()
25504  * rather than g_output_stream_write() from the callback.
25505  *
25506  * Returns: (transfer full): a new #GSource
25507  * Since: 2.28
25508  */
25509
25510
25511 /**
25512  * g_pollable_output_stream_is_writable:
25513  * @stream: a #GPollableOutputStream.
25514  *
25515  * Checks if @stream can be written.
25516  * Note that some stream types may not be able to implement this 100%
25517  * reliably, and it is possible that a call to g_output_stream_write()
25518  * after this returns %TRUE would still block. To guarantee
25519  * non-blocking behavior, you should always use
25520  * g_pollable_output_stream_write_nonblocking(), which will return a
25521  * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
25522  * has occurred on @stream, this will result in
25523  * g_pollable_output_stream_is_writable() returning %TRUE, and the
25524  * next attempt to write will return the error.
25525  *
25526  * Returns: %TRUE if @stream is writable, %FALSE if not. If an error
25527  * Since: 2.28
25528  */
25529
25530
25531 /**
25532  * g_pollable_output_stream_write_nonblocking:
25533  * @stream: a #GPollableOutputStream
25534  * @buffer: (array length=size) (element-type guint8): a buffer to write data from
25535  * @size: the number of bytes you want to write
25536  * @cancellable: (allow-none): a #GCancellable, or %NULL
25537  * @error: #GError for error reporting, or %NULL to ignore.
25538  *
25539  * Attempts to write up to @size bytes from @buffer to @stream, as
25540  * with g_output_stream_write(). If @stream is not currently writable,
25541  * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
25542  * use g_pollable_output_stream_create_source() to create a #GSource
25543  * that will be triggered when @stream is writable.
25544  * Note that since this method never blocks, you cannot actually
25545  * use @cancellable to cancel it. However, it will return an error
25546  * if @cancellable has already been cancelled when you call, which
25547  * may happen if you call this method after a source triggers due
25548  * to having been cancelled.
25549  * %G_IO_ERROR_WOULD_BLOCK).
25550  *
25551  * Virtual: write_nonblocking
25552  * Returns: the number of bytes written, or -1 on error (including
25553  */
25554
25555
25556 /**
25557  * g_pollable_source_new: (skip)
25558  * @pollable_stream: the stream associated with the new source
25559  *
25560  * Utility method for #GPollableInputStream and #GPollableOutputStream
25561  * implementations. Creates a new #GSource that expects a callback of
25562  * type #GPollableSourceFunc. The new source does not actually do
25563  * anything on its own; use g_source_add_child_source() to add other
25564  * sources to it to cause it to trigger.
25565  *
25566  * Returns: (transfer full): the new #GSource.
25567  * Since: 2.28
25568  */
25569
25570
25571 /**
25572  * g_proxy_address_get_destination_hostnam:
25573  * @proxy: a #GProxyAddress
25574  *
25575  * Gets @proxy's destination hostname.
25576  *
25577  * Returns: the @proxy's destination hostname
25578  * Since: 2.26
25579  */
25580
25581
25582 /**
25583  * g_proxy_address_get_destination_por:
25584  * @proxy: a #GProxyAddress
25585  *
25586  * Gets @proxy's destination port.
25587  *
25588  * Returns: the @proxy's destination port
25589  * Since: 2.26
25590  */
25591
25592
25593 /**
25594  * g_proxy_address_get_passwor:
25595  * @proxy: a #GProxyAddress
25596  *
25597  * Gets @proxy's password.
25598  *
25599  * Returns: the @proxy's password
25600  * Since: 2.26
25601  */
25602
25603
25604 /**
25605  * g_proxy_address_get_protocol:
25606  * @proxy: a #GProxyAddress
25607  *
25608  * Gets @proxy's protocol.
25609  *
25610  * Returns: the @proxy's protocol
25611  * Since: 2.26
25612  */
25613
25614
25615 /**
25616  * g_proxy_address_get_usernam:
25617  * @proxy: a #GProxyAddress
25618  *
25619  * Gets @proxy's username.
25620  *
25621  * Returns: the @proxy's username
25622  * Since: 2.26
25623  */
25624
25625
25626 /**
25627  * g_proxy_address_new:
25628  * @inetaddr: The proxy server #GInetAddress.
25629  * @port: The proxy server port.
25630  * @protocol: The proxy protocol to support, in lower case (e.g. socks, http).
25631  * @dest_hostname: The destination hostname the the proxy should tunnel to.
25632  * @dest_port: The destination port to tunnel to.
25633  * @username: (allow-none): The username to authenticate to the proxy server (or %NULL).
25634  * @password: (allow-none): The password to authenticate to the proxy server (or %NULL).
25635  *
25636  * Creates a new #GProxyAddress for @inetaddr with @protocol that should
25637  * tunnel through @dest_hostname and @dest_port.
25638  *
25639  * Returns: a new #GProxyAddress
25640  * Since: 2.26
25641  */
25642
25643
25644 /**
25645  * g_proxy_connect:
25646  * @proxy: a #GProxy
25647  * @connection: a #GIOStream
25648  * @proxy_address: a #GProxyAddress
25649  * @cancellable: (allow-none): a #GCancellable
25650  * @error: return #GError
25651  *
25652  * Given @connection to communicate with a proxy (eg, a
25653  * #GSocketConnection that is connected to the proxy server), this
25654  * does the necessary handshake to connect to @proxy_address, and if
25655  * required, wraps the #GIOStream to handle proxy payload.
25656  * be the same as @connection, in which case a reference
25657  * will be added.
25658  *
25659  * Returns: (transfer full): a #GIOStream that will replace @connection. This might
25660  * Since: 2.26
25661  */
25662
25663
25664 /**
25665  * g_proxy_connect_async:
25666  * @proxy: a #GProxy
25667  * @connection: a #GIOStream
25668  * @proxy_address: a #GProxyAddress
25669  * @cancellable: (allow-none): a #GCancellable
25670  * @callback: (scope async): a #GAsyncReadyCallback
25671  * @user_data: (closure): callback data
25672  *
25673  * Asynchronous version of g_proxy_connect().
25674  *
25675  * Since: 2.26
25676  */
25677
25678
25679 /**
25680  * g_proxy_connect_finish:
25681  * @proxy: a #GProxy
25682  * @result: a #GAsyncRetult
25683  * @error: return #GError
25684  *
25685  * See g_proxy_connect().
25686  *
25687  * Returns: (transfer full): a #GIOStream.
25688  * Since: 2.26
25689  */
25690
25691
25692 /**
25693  * g_proxy_get_default_for_protocol:
25694  * @protocol: the proxy protocol name (e.g. http, socks, etc)
25695  *
25696  * Lookup "gio-proxy" extension point for a proxy implementation that supports
25697  * specified protocol.
25698  * is not supported.
25699  *
25700  * Returns: (transfer full): return a #GProxy or NULL if protocol
25701  * Since: 2.26
25702  */
25703
25704
25705 /**
25706  * g_proxy_resolver_get_default:
25707  *
25708  * Gets the default #GProxyResolver for the system.
25709  *
25710  * Returns: (transfer none): the default #GProxyResolver.
25711  * Since: 2.26
25712  */
25713
25714
25715 /**
25716  * g_proxy_resolver_is_supported:
25717  * @resolver: a #GProxyResolver
25718  *
25719  * Checks if @resolver can be used on this system. (This is used
25720  * internally; g_proxy_resolver_get_default() will only return a proxy
25721  * resolver that returns %TRUE for this method.)
25722  *
25723  * Returns: %TRUE if @resolver is supported.
25724  * Since: 2.26
25725  */
25726
25727
25728 /**
25729  * g_proxy_resolver_lookup:
25730  * @resolver: a #GProxyResolver
25731  * @uri: a URI representing the destination to connect to
25732  * @cancellable: (allow-none): a #GCancellable, or %NULL
25733  * @error: return location for a #GError, or %NULL
25734  *
25735  * Looks into the system proxy configuration to determine what proxy,
25736  * if any, to use to connect to @uri. The returned proxy URIs are of the
25737  * form <literal>&lt;protocol&gt;://[user[:password]@]host:port</literal>
25738  * or <literal>direct://</literal>, where &lt;protocol&gt; could be
25739  * http, rtsp, socks or other proxying protocol.
25740  * If you don't know what network protocol is being used on the
25741  * socket, you should use <literal>none</literal> as the URI protocol.
25742  * In this case, the resolver might still return a generic proxy type
25743  * (such as SOCKS), but would not return protocol-specific proxy types
25744  * (such as http).
25745  * <literal>direct://</literal> is used when no proxy is needed.
25746  * Direct connection should not be attempted unless it is part of the
25747  * returned array of proxies.
25748  * NULL-terminated array of proxy URIs. Must be freed
25749  * with g_strfreev().
25750  *
25751  * Returns: (transfer full) (array zero-terminated=1): A
25752  * Since: 2.26
25753  */
25754
25755
25756 /**
25757  * g_proxy_resolver_lookup_async:
25758  * @resolver: a #GProxyResolver
25759  * @uri: a URI representing the destination to connect to
25760  * @cancellable: (allow-none): a #GCancellable, or %NULL
25761  * @callback: (scope async): callback to call after resolution completes
25762  * @user_data: (closure): data for @callback
25763  *
25764  * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
25765  * details.
25766  *
25767  * Since: 2.26
25768  */
25769
25770
25771 /**
25772  * g_proxy_resolver_lookup_finish:
25773  * @resolver: a #GProxyResolver
25774  * @result: the result passed to your #GAsyncReadyCallback
25775  * @error: return location for a #GError, or %NULL
25776  *
25777  * Call this function to obtain the array of proxy URIs when
25778  * g_proxy_resolver_lookup_async() is complete. See
25779  * g_proxy_resolver_lookup() for more details.
25780  * NULL-terminated array of proxy URIs. Must be freed
25781  * with g_strfreev().
25782  *
25783  * Returns: (transfer full) (array zero-terminated=1): A
25784  * Since: 2.26
25785  */
25786
25787
25788 /**
25789  * g_proxy_supports_hostname:
25790  * @proxy: a #GProxy
25791  *
25792  * Some proxy protocols expect to be passed a hostname, which they
25793  * will resolve to an IP address themselves. Others, like SOCKS4, do
25794  * not allow this. This function will return %FALSE if @proxy is
25795  * implementing such a protocol. When %FALSE is returned, the caller
25796  * should resolve the destination hostname first, and then pass a
25797  * #GProxyAddress containing the stringified IP address to
25798  * g_proxy_connect() or g_proxy_connect_async().
25799  *
25800  * Returns: %TRUE if hostname resolution is supported.
25801  * Since: 2.26
25802  */
25803
25804
25805 /**
25806  * g_renew:
25807  * @struct_type: the type of the elements to allocate
25808  * @mem: the currently allocated memory
25809  * @n_structs: the number of elements to allocate
25810  *
25811  * Reallocates the memory pointed to by @mem, so that it now has space for
25812  * the memory, which may have been moved.
25813  * Care is taken to avoid overflow when calculating the size of the allocated block.
25814  *
25815  * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
25816  */
25817
25818
25819 /**
25820  * g_resolver_error_quark:
25821  *
25822  * Gets the #GResolver Error Quark.
25823  *
25824  * Returns: a #GQuark.
25825  * Since: 2.22
25826  */
25827
25828
25829 /**
25830  * g_resolver_free_addresses: (skip)
25831  * @addresses: a #GList of #GInetAddress
25832  *
25833  * Frees @addresses (which should be the return value from
25834  * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()).
25835  * (This is a convenience method; you can also simply free the results
25836  * by hand.)
25837  *
25838  * Since: 2.22
25839  */
25840
25841
25842 /**
25843  * g_resolver_free_targets: (skip)
25844  * @targets: a #GList of #GSrvTarget
25845  *
25846  * Frees @targets (which should be the return value from
25847  * g_resolver_lookup_service() or g_resolver_lookup_service_finish()).
25848  * (This is a convenience method; you can also simply free the
25849  * results by hand.)
25850  *
25851  * Since: 2.22
25852  */
25853
25854
25855 /**
25856  * g_resolver_get_default:
25857  *
25858  * Gets the default #GResolver. You should unref it when you are done
25859  * with it. #GResolver may use its reference count as a hint about how
25860  * many threads/processes, etc it should allocate for concurrent DNS
25861  * resolutions.
25862  *
25863  * Returns: (transfer full): the default #GResolver.
25864  * Since: 2.22
25865  */
25866
25867
25868 /**
25869  * g_resolver_lookup_by_address:
25870  * @resolver: a #GResolver
25871  * @address: the address to reverse-resolve
25872  * @cancellable: (allow-none): a #GCancellable, or %NULL
25873  * @error: return location for a #GError, or %NULL
25874  *
25875  * Synchronously reverse-resolves @address to determine its
25876  * associated hostname.
25877  * If the DNS resolution fails, @error (if non-%NULL) will be set to
25878  * a value from #GResolverError.
25879  * If @cancellable is non-%NULL, it can be used to cancel the
25880  * operation, in which case @error (if non-%NULL) will be set to
25881  * %G_IO_ERROR_CANCELLED.
25882  * form), or %NULL on error.
25883  *
25884  * Returns: a hostname (either ASCII-only, or in ASCII-encoded
25885  * Since: 2.22
25886  */
25887
25888
25889 /**
25890  * g_resolver_lookup_by_address_async:
25891  * @resolver: a #GResolver
25892  * @address: the address to reverse-resolve
25893  * @cancellable: (allow-none): a #GCancellable, or %NULL
25894  * @callback: (scope async): callback to call after resolution completes
25895  * @user_data: (closure): data for @callback
25896  *
25897  * Begins asynchronously reverse-resolving @address to determine its
25898  * associated hostname, and eventually calls @callback, which must
25899  * call g_resolver_lookup_by_address_finish() to get the final result.
25900  *
25901  * Since: 2.22
25902  */
25903
25904
25905 /**
25906  * g_resolver_lookup_by_address_finish:
25907  * @resolver: a #GResolver
25908  * @result: the result passed to your #GAsyncReadyCallback
25909  * @error: return location for a #GError, or %NULL
25910  *
25911  * Retrieves the result of a previous call to
25912  * g_resolver_lookup_by_address_async().
25913  * If the DNS resolution failed, @error (if non-%NULL) will be set to
25914  * a value from #GResolverError. If the operation was cancelled,
25915  * form), or %NULL on error.
25916  *
25917  * Returns: a hostname (either ASCII-only, or in ASCII-encoded
25918  * Since: 2.22
25919  */
25920
25921
25922 /**
25923  * g_resolver_lookup_by_name:
25924  * @resolver: a #GResolver
25925  * @hostname: the hostname to look up
25926  * @cancellable: (allow-none): a #GCancellable, or %NULL
25927  * @error: return location for a #GError, or %NULL
25928  *
25929  * Synchronously resolves @hostname to determine its associated IP
25930  * address(es). @hostname may be an ASCII-only or UTF-8 hostname, or
25931  * the textual form of an IP address (in which case this just becomes
25932  * a wrapper around g_inet_address_new_from_string()).
25933  * On success, g_resolver_lookup_by_name() will return a #GList of
25934  * #GInetAddress, sorted in order of preference. (That is, you should
25935  * attempt to connect to the first address first, then the second if
25936  * the first fails, etc.)
25937  * If the DNS resolution fails, @error (if non-%NULL) will be set to a
25938  * value from #GResolverError.
25939  * If @cancellable is non-%NULL, it can be used to cancel the
25940  * operation, in which case @error (if non-%NULL) will be set to
25941  * %G_IO_ERROR_CANCELLED.
25942  * If you are planning to connect to a socket on the resolved IP
25943  * address, it may be easier to create a #GNetworkAddress and use its
25944  * #GSocketConnectable interface.
25945  * of #GInetAddress, or %NULL on error. You
25946  * must unref each of the addresses and free the list when you are
25947  * done with it. (You can use g_resolver_free_addresses() to do this.)
25948  *
25949  * Returns: (element-type GInetAddress) (transfer full): a #GList
25950  * Since: 2.22
25951  */
25952
25953
25954 /**
25955  * g_resolver_lookup_by_name_async:
25956  * @resolver: a #GResolver
25957  * @hostname: the hostname to look up the address of
25958  * @cancellable: (allow-none): a #GCancellable, or %NULL
25959  * @callback: (scope async): callback to call after resolution completes
25960  * @user_data: (closure): data for @callback
25961  *
25962  * Begins asynchronously resolving @hostname to determine its
25963  * associated IP address(es), and eventually calls @callback, which
25964  * must call g_resolver_lookup_by_name_finish() to get the result.
25965  * See g_resolver_lookup_by_name() for more details.
25966  *
25967  * Since: 2.22
25968  */
25969
25970
25971 /**
25972  * g_resolver_lookup_by_name_finish:
25973  * @resolver: a #GResolver
25974  * @result: the result passed to your #GAsyncReadyCallback
25975  * @error: return location for a #GError, or %NULL
25976  *
25977  * Retrieves the result of a call to
25978  * g_resolver_lookup_by_name_async().
25979  * If the DNS resolution failed, @error (if non-%NULL) will be set to
25980  * a value from #GResolverError. If the operation was cancelled,
25981  * of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name()
25982  * for more details.
25983  *
25984  * Returns: (element-type GInetAddress) (transfer full): a #GList
25985  * Since: 2.22
25986  */
25987
25988
25989 /**
25990  * g_resolver_lookup_service:
25991  * @resolver: a #GResolver
25992  * @service: the service type to look up (eg, "ldap")
25993  * @protocol: the networking protocol to use for @service (eg, "tcp")
25994  * @domain: the DNS domain to look up the service in
25995  * @cancellable: (allow-none): a #GCancellable, or %NULL
25996  * @error: return location for a #GError, or %NULL
25997  *
25998  * Synchronously performs a DNS SRV lookup for the given @service and
25999  * include the leading underscore that appears in the actual DNS
26000  * entry.
26001  * On success, g_resolver_lookup_service() will return a #GList of
26002  * #GSrvTarget, sorted in order of preference. (That is, you should
26003  * attempt to connect to the first target first, then the second if
26004  * the first fails, etc.)
26005  * If the DNS resolution fails, @error (if non-%NULL) will be set to
26006  * a value from #GResolverError.
26007  * If @cancellable is non-%NULL, it can be used to cancel the
26008  * operation, in which case @error (if non-%NULL) will be set to
26009  * %G_IO_ERROR_CANCELLED.
26010  * If you are planning to connect to the service, it is usually easier
26011  * to create a #GNetworkService and use its #GSocketConnectable
26012  * interface.
26013  * or %NULL on error. You must free each of the targets and the list when you are
26014  * done with it. (You can use g_resolver_free_targets() to do this.)
26015  *
26016  * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
26017  * Since: 2.22
26018  */
26019
26020
26021 /**
26022  * g_resolver_lookup_service_async:
26023  * @resolver: a #GResolver
26024  * @service: the service type to look up (eg, "ldap")
26025  * @protocol: the networking protocol to use for @service (eg, "tcp")
26026  * @domain: the DNS domain to look up the service in
26027  * @cancellable: (allow-none): a #GCancellable, or %NULL
26028  * @callback: (scope async): callback to call after resolution completes
26029  * @user_data: (closure): data for @callback
26030  *
26031  * Begins asynchronously performing a DNS SRV lookup for the given
26032  * get the final result. See g_resolver_lookup_service() for more
26033  * details.
26034  *
26035  * Since: 2.22
26036  */
26037
26038
26039 /**
26040  * g_resolver_lookup_service_finish:
26041  * @resolver: a #GResolver
26042  * @result: the result passed to your #GAsyncReadyCallback
26043  * @error: return location for a #GError, or %NULL
26044  *
26045  * Retrieves the result of a previous call to
26046  * g_resolver_lookup_service_async().
26047  * If the DNS resolution failed, @error (if non-%NULL) will be set to
26048  * a value from #GResolverError. If the operation was cancelled,
26049  * or %NULL on error. See g_resolver_lookup_service() for more details.
26050  *
26051  * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
26052  * Since: 2.22
26053  */
26054
26055
26056 /**
26057  * g_resolver_set_default:
26058  * @resolver: the new default #GResolver
26059  *
26060  * Sets @resolver to be the application's default resolver (reffing
26061  * Future calls to g_resolver_get_default() will return this resolver.
26062  * This can be used if an application wants to perform any sort of DNS
26063  * caching or "pinning"; it can implement its own #GResolver that
26064  * calls the original default resolver for DNS operations, and
26065  * implements its own cache policies on top of that, and then set
26066  * itself as the default resolver for all later code to use.
26067  *
26068  * Since: 2.22
26069  */
26070
26071
26072 /**
26073  * g_seekable_can_seek:
26074  * @seekable: a #GSeekable.
26075  *
26076  * Tests if the stream supports the #GSeekableIface.
26077  *
26078  * Returns: %TRUE if @seekable can be seeked. %FALSE otherwise.
26079  */
26080
26081
26082 /**
26083  * g_seekable_can_truncate:
26084  * @seekable: a #GSeekable.
26085  *
26086  * Tests if the stream can be truncated.
26087  *
26088  * Returns: %TRUE if the stream can be truncated, %FALSE otherwise.
26089  */
26090
26091
26092 /**
26093  * g_seekable_seek:
26094  * @seekable: a #GSeekable.
26095  * @offset: a #goffset.
26096  * @type: a #GSeekType.
26097  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26098  * @error: a #GError location to store the error occuring, or %NULL to ignore.
26099  *
26100  * Seeks in the stream by the given @offset, modified by @type.
26101  * If @cancellable is not %NULL, then the operation can be cancelled by
26102  * triggering the cancellable object from another thread. If the operation
26103  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26104  * has occurred, this function will return %FALSE and set @error
26105  * appropriately if present.
26106  *
26107  * Returns: %TRUE if successful. If an error
26108  */
26109
26110
26111 /**
26112  * g_seekable_tell:
26113  * @seekable: a #GSeekable.
26114  *
26115  * Tells the current position within the stream.
26116  *
26117  * Returns: the offset from the beginning of the buffer.
26118  */
26119
26120
26121 /**
26122  * g_seekable_truncate:
26123  * @seekable: a #GSeekable.
26124  * @offset: a #goffset.
26125  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26126  * @error: a #GError location to store the error occuring, or %NULL to ignore.
26127  *
26128  * Truncates a stream with a given #offset.
26129  * If @cancellable is not %NULL, then the operation can be cancelled by
26130  * triggering the cancellable object from another thread. If the operation
26131  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
26132  * operation was partially finished when the operation was cancelled the
26133  * partial result will be returned, without an error.
26134  * has occurred, this function will return %FALSE and set @error
26135  * appropriately if present.
26136  *
26137  * Virtual: truncate_fn
26138  * Returns: %TRUE if successful. If an error
26139  */
26140
26141
26142 /**
26143  * g_settings_apply:
26144  * @settings: a #GSettings instance
26145  *
26146  * Applies any changes that have been made to the settings.  This
26147  * function does nothing unless @settings is in 'delay-apply' mode;
26148  * see g_settings_delay().  In the normal case settings are always
26149  * applied immediately.
26150  */
26151
26152
26153 /**
26154  * g_settings_backend_changed:
26155  * @backend: a #GSettingsBackend implementation
26156  * @key: the name of the key
26157  * @origin_tag: the origin tag
26158  *
26159  * Signals that a single key has possibly changed.  Backend
26160  * implementations should call this if a key has possibly changed its
26161  * value.
26162  * '//', and not ending with a slash).
26163  * The implementation must call this function during any call to
26164  * g_settings_backend_write(), before the call returns (except in the
26165  * case that no keys are actually changed and it cares to detect this
26166  * fact).  It may not rely on the existence of a mainloop for
26167  * dispatching the signal later.
26168  * The implementation may call this function at any other time it likes
26169  * in response to other events (such as changes occuring outside of the
26170  * program).  These calls may originate from a mainloop or may originate
26171  * in response to any other action (including from calls to
26172  * g_settings_backend_write()).
26173  * In the case that this call is in response to a call to
26174  * g_settings_backend_write() then @origin_tag must be set to the same
26175  * value that was passed to that call.
26176  *
26177  * Since: 2.26
26178  */
26179
26180
26181 /**
26182  * g_settings_backend_changed_tree:
26183  * @backend: a #GSettingsBackend implementation
26184  * @tree: a #GTree containing the changes
26185  * @origin_tag: the origin tag
26186  *
26187  * This call is a convenience wrapper.  It gets the list of changes from
26188  * g_settings_backend_changed().
26189  *
26190  * Since: 2.26
26191  */
26192
26193
26194 /**
26195  * g_settings_backend_flatten_tree:
26196  * @tree: a #GTree containing the changes
26197  * @path: (out): the location to save the path
26198  * @keys: (out) (transfer container) (array zero-terminated=1): the location to save the relative keys
26199  * @values: (out) (allow-none) (transfer container) (array zero-terminated=1):  the location to save the values, or %NULL
26200  *
26201  * Calculate the longest common prefix of all keys in a tree and write
26202  * out an array of the key names relative to that prefix and,
26203  * optionally, the value to store at each of those keys.
26204  * You must free the value returned in @path, @keys and @values using
26205  * g_free().  You should not attempt to free or unref the contents of
26206  *
26207  * Since: 2.26
26208  */
26209
26210
26211 /**
26212  * g_settings_backend_get_default:
26213  * @returns: (transfer full): the default #GSettingsBackend
26214  *
26215  * Returns the default #GSettingsBackend. It is possible to override
26216  * the default by setting the <envar>GSETTINGS_BACKEND</envar>
26217  * environment variable to the name of a settings backend.
26218  * The user gets a reference to the backend.
26219  *
26220  * Since: 2.28
26221  */
26222
26223
26224 /**
26225  * g_settings_backend_keys_changed:
26226  * @backend: a #GSettingsBackend implementation
26227  * @path: the path containing the changes
26228  * @items: (array zero-terminated=1): the %NULL-terminated list of changed keys
26229  * @origin_tag: the origin tag
26230  *
26231  * Signals that a list of keys have possibly changed.  Backend
26232  * implementations should call this if keys have possibly changed their
26233  * values.
26234  * not containing '//').  Each string in @items must form a valid key
26235  * end with '/' and must not contain '//').
26236  * The meaning of this signal is that any of the key names resulting
26237  * from the contatenation of @path with each item in @items may have
26238  * changed.
26239  * The same rules for when notifications must occur apply as per
26240  * g_settings_backend_changed().  These two calls can be used
26241  * interchangeably if exactly one item has changed (although in that
26242  * case g_settings_backend_changed() is definitely preferred).
26243  * For efficiency reasons, the implementation should strive for @path to
26244  * keys that were changed) but this is not strictly required.
26245  *
26246  * Name when @path is prefixed to it (ie: each item must not start or
26247  * Be as long as possible (ie: the longest common prefix of all of the
26248  * Since: 2.26
26249  */
26250
26251
26252 /**
26253  * g_settings_backend_path_changed:
26254  * @backend: a #GSettingsBackend implementation
26255  * @path: the path containing the changes
26256  * @origin_tag: the origin tag
26257  *
26258  * Signals that all keys below a given path may have possibly changed.
26259  * Backend implementations should call this if an entire path of keys
26260  * have possibly changed their values.
26261  * not containing '//').
26262  * The meaning of this signal is that any of the key which has a name
26263  * starting with @path may have changed.
26264  * The same rules for when notifications must occur apply as per
26265  * g_settings_backend_changed().  This call might be an appropriate
26266  * reasponse to a 'reset' call but implementations are also free to
26267  * explicitly list the keys that were affected by that call if they can
26268  * easily do so.
26269  * For efficiency reasons, the implementation should strive for @path to
26270  * keys that were changed) but this is not strictly required.  As an
26271  * example, if this function is called with the path of "/" then every
26272  * single key in the application will be notified of a possible change.
26273  *
26274  * Be as long as possible (ie: the longest common prefix of all of the
26275  * Since: 2.26
26276  */
26277
26278
26279 /**
26280  * g_settings_backend_path_writable_changed:
26281  * @backend: a #GSettingsBackend implementation
26282  * @path: the name of the path
26283  *
26284  * Signals that the writability of all keys below a given path may have
26285  * changed.
26286  * Since GSettings performs no locking operations for itself, this call
26287  * will always be made in response to external events.
26288  *
26289  * Since: 2.26
26290  */
26291
26292
26293 /**
26294  * g_settings_backend_writable_changed:
26295  * @backend: a #GSettingsBackend implementation
26296  * @key: the name of the key
26297  *
26298  * Signals that the writability of a single key has possibly changed.
26299  * Since GSettings performs no locking operations for itself, this call
26300  * will always be made in response to external events.
26301  *
26302  * Since: 2.26
26303  */
26304
26305
26306 /**
26307  * g_settings_bind:
26308  * @settings: a #GSettings object
26309  * @key: the key to bind
26310  * @object: (type GObject.Object): a #GObject
26311  * @property: the name of the property to bind
26312  * @flags: flags for the binding
26313  *
26314  * Create a binding between the @key in the @settings object
26315  * and the property @property of @object.
26316  * The binding uses the default GIO mapping functions to map
26317  * between the settings and property values. These functions
26318  * handle booleans, numeric types and string types in a
26319  * straightforward way. Use g_settings_bind_with_mapping() if
26320  * you need a custom mapping, or map between types that are not
26321  * supported by the default mapping functions.
26322  * Unless the @flags include %G_SETTINGS_BIND_NO_SENSITIVITY, this
26323  * function also establishes a binding between the writability of
26324  * a boolean property by that name). See g_settings_bind_writable()
26325  * for more details about writable bindings.
26326  * Note that the lifecycle of the binding is tied to the object,
26327  * and that you can have only one binding per object property.
26328  * If you bind the same property twice on the same object, the second
26329  * binding overrides the first one.
26330  *
26331  * Since: 2.26
26332  */
26333
26334
26335 /**
26336  * g_settings_bind_with_mapping: (skip)
26337  * @settings: a #GSettings object
26338  * @key: the key to bind
26339  * @object: (type GObject.Object): a #GObject
26340  * @property: the name of the property to bind
26341  * @flags: flags for the binding
26342  * @get_mapping: a function that gets called to convert values from @settings to @object, or %NULL to use the default GIO mapping
26343  * @set_mapping: a function that gets called to convert values from @object to @settings, or %NULL to use the default GIO mapping
26344  * @user_data: data that gets passed to @get_mapping and @set_mapping
26345  * @destroy: #GDestroyNotify function for @user_data
26346  *
26347  * Create a binding between the @key in the @settings object
26348  * and the property @property of @object.
26349  * The binding uses the provided mapping functions to map between
26350  * settings and property values.
26351  * Note that the lifecycle of the binding is tied to the object,
26352  * and that you can have only one binding per object property.
26353  * If you bind the same property twice on the same object, the second
26354  * binding overrides the first one.
26355  *
26356  * Since: 2.26
26357  */
26358
26359
26360 /**
26361  * g_settings_bind_writable:
26362  * @settings: a #GSettings object
26363  * @key: the key to bind
26364  * @object: (type GObject.Object): a #GObject
26365  * @property: the name of a boolean property to bind
26366  * @inverted: whether to 'invert' the value
26367  *
26368  * Create a binding between the writability of @key in the
26369  * The property must be boolean; "sensitive" or "visible"
26370  * properties of widgets are the most likely candidates.
26371  * Writable bindings are always uni-directional; changes of the
26372  * writability of the setting will be propagated to the object
26373  * property, not the other way.
26374  * When the @inverted argument is %TRUE, the binding inverts the
26375  * value as it passes from the setting to the object, i.e. @property
26376  * will be set to %TRUE if the key is <emphasis>not</emphasis>
26377  * writable.
26378  * Note that the lifecycle of the binding is tied to the object,
26379  * and that you can have only one binding per object property.
26380  * If you bind the same property twice on the same object, the second
26381  * binding overrides the first one.
26382  *
26383  * Since: 2.26
26384  */
26385
26386
26387 /**
26388  * g_settings_delay:
26389  * @settings: a #GSettings object
26390  *
26391  * Changes the #GSettings object into 'delay-apply' mode. In this
26392  * mode, changes to @settings are not immediately propagated to the
26393  * backend, but kept locally until g_settings_apply() is called.
26394  *
26395  * Since: 2.26
26396  */
26397
26398
26399 /**
26400  * g_settings_get:
26401  * @settings: a #GSettings object
26402  * @key: the key to get the value for
26403  * @format: a #GVariant format string
26404  * @...: arguments as per @format
26405  *
26406  * Gets the value that is stored at @key in @settings.
26407  * A convenience function that combines g_settings_get_value() with
26408  * g_variant_get().
26409  * It is a programmer error to give a @key that isn't contained in the
26410  * schema for @settings or for the #GVariantType of @format to mismatch
26411  * the type given in the schema.
26412  *
26413  * Since: 2.26
26414  */
26415
26416
26417 /**
26418  * g_settings_get_boolean:
26419  * @settings: a #GSettings object
26420  * @key: the key to get the value for
26421  * @returns: a boolean
26422  *
26423  * Gets the value that is stored at @key in @settings.
26424  * A convenience variant of g_settings_get() for booleans.
26425  * It is a programmer error to give a @key that isn't specified as
26426  * having a boolean type in the schema for @settings.
26427  *
26428  * Since: 2.26
26429  */
26430
26431
26432 /**
26433  * g_settings_get_child:
26434  * @settings: a #GSettings object
26435  * @name: the name of the 'child' schema
26436  * @returns: (transfer full): a 'child' settings object
26437  *
26438  * Creates a 'child' settings object which has a base path of
26439  * <replaceable>base-path</replaceable>/@name, where
26440  * <replaceable>base-path</replaceable> is the base path of @settings.
26441  * The schema for the child settings object must have been declared
26442  * in the schema of @settings using a <tag class="starttag">child</tag> element.
26443  *
26444  * Since: 2.26
26445  */
26446
26447
26448 /**
26449  * g_settings_get_double:
26450  * @settings: a #GSettings object
26451  * @key: the key to get the value for
26452  * @returns: a double
26453  *
26454  * Gets the value that is stored at @key in @settings.
26455  * A convenience variant of g_settings_get() for doubles.
26456  * It is a programmer error to give a @key that isn't specified as
26457  * having a 'double' type in the schema for @settings.
26458  *
26459  * Since: 2.26
26460  */
26461
26462
26463 /**
26464  * g_settings_get_enum:
26465  * @settings: a #GSettings object
26466  * @key: the key to get the value for
26467  * @returns: the enum value
26468  *
26469  * Gets the value that is stored in @settings for @key and converts it
26470  * to the enum value that it represents.
26471  * In order to use this function the type of the value must be a string
26472  * and it must be marked in the schema file as an enumerated type.
26473  * It is a programmer error to give a @key that isn't contained in the
26474  * schema for @settings or is not marked as an enumerated type.
26475  * If the value stored in the configuration database is not a valid
26476  * value for the enumerated type then this function will return the
26477  * default value.
26478  *
26479  * Since: 2.26
26480  */
26481
26482
26483 /**
26484  * g_settings_get_flags:
26485  * @settings: a #GSettings object
26486  * @key: the key to get the value for
26487  * @returns: the flags value
26488  *
26489  * Gets the value that is stored in @settings for @key and converts it
26490  * to the flags value that it represents.
26491  * In order to use this function the type of the value must be an array
26492  * of strings and it must be marked in the schema file as an flags type.
26493  * It is a programmer error to give a @key that isn't contained in the
26494  * schema for @settings or is not marked as a flags type.
26495  * If the value stored in the configuration database is not a valid
26496  * value for the flags type then this function will return the default
26497  * value.
26498  *
26499  * Since: 2.26
26500  */
26501
26502
26503 /**
26504  * g_settings_get_has_unapplied:
26505  * @settings: a #GSettings object
26506  * @returns: %TRUE if @settings has unapplied changes
26507  *
26508  * Returns whether the #GSettings object has any unapplied
26509  * changes.  This can only be the case if it is in 'delayed-apply' mode.
26510  *
26511  * Since: 2.26
26512  */
26513
26514
26515 /**
26516  * g_settings_get_int:
26517  * @settings: a #GSettings object
26518  * @key: the key to get the value for
26519  * @returns: an integer
26520  *
26521  * Gets the value that is stored at @key in @settings.
26522  * A convenience variant of g_settings_get() for 32-bit integers.
26523  * It is a programmer error to give a @key that isn't specified as
26524  * having a int32 type in the schema for @settings.
26525  *
26526  * Since: 2.26
26527  */
26528
26529
26530 /**
26531  * g_settings_get_mapped:
26532  * @settings: a #GSettings object
26533  * @key: the key to get the value for
26534  * @mapping: (scope call): the function to map the value in the settings database to the value used by the application
26535  * @user_data: user data for @mapping
26536  * @returns: (transfer full): the result, which may be %NULL
26537  *
26538  * Gets the value that is stored at @key in @settings, subject to
26539  * application-level validation/mapping.
26540  * You should use this function when the application needs to perform
26541  * some processing on the value of the key (for example, parsing).  The
26542  * indicates that the processing was unsuccessful (due to a parse error,
26543  * for example) then the mapping is tried again with another value.
26544  * This allows a robust 'fall back to defaults' behaviour to be
26545  * implemented somewhat automatically.
26546  * The first value that is tried is the user's setting for the key.  If
26547  * the mapping function fails to map this value, other values may be
26548  * tried in an unspecified order (system or site defaults, translated
26549  * schema default values, untranslated schema default values, etc).
26550  * If the mapping function fails for all possible values, one additional
26551  * If the mapping function still indicates failure at this point then
26552  * the application will be aborted.
26553  * The result parameter for the @mapping function is pointed to a
26554  * #gpointer which is initially set to %NULL.  The same pointer is given
26555  * to each invocation of @mapping.  The final value of that #gpointer is
26556  * what is returned by this function.  %NULL is valid; it is returned
26557  * just as any other value would be.
26558  *
26559  * Attempt is made: the mapping function is called with a %NULL value.
26560  */
26561
26562
26563 /**
26564  * g_settings_get_range:
26565  * @settings: a #GSettings
26566  * @key: the key to query the range of
26567  * @returns: a #GVariant describing the range
26568  *
26569  * Queries the range of a key.
26570  * This function will return a #GVariant that fully describes the range
26571  * of values that are valid for @key.
26572  * The type of #GVariant returned is <literal>(sv)</literal>.  The
26573  * string describes the type of range restriction in effect.  The type
26574  * and meaning of the value contained in the variant depends on the
26575  * string.
26576  * If the string is <literal>'type'</literal> then the variant contains
26577  * an empty array.  The element type of that empty array is the expected
26578  * type of value and all values of that type are valid.
26579  * If the string is <literal>'enum'</literal> then the variant contains
26580  * an array enumerating the possible values.  Each item in the array is
26581  * a possible valid value and no other values are valid.
26582  * If the string is <literal>'flags'</literal> then the variant contains
26583  * an array.  Each item in the array is a value that may appear zero or
26584  * one times in an array to be used as the value for this key.  For
26585  * example, if the variant contained the array <literal>['x',
26586  * 'y']</literal> then the valid values for the key would be
26587  * <literal>[]</literal>, <literal>['x']</literal>,
26588  * <literal>['y']</literal>, <literal>['x', 'y']</literal> and
26589  * <literal>['y', 'x']</literal>.
26590  * Finally, if the string is <literal>'range'</literal> then the variant
26591  * contains a pair of like-typed values -- the minimum and maximum
26592  * permissible values for this key.
26593  * This information should not be used by normal programs.  It is
26594  * considered to be a hint for introspection purposes.  Normal programs
26595  * should already know what is permitted by their own schema.  The
26596  * format may change in any way in the future -- but particularly, new
26597  * forms may be added to the possibilities described above.
26598  * It is a programmer error to give a @key that isn't contained in the
26599  * schema for @settings.
26600  * You should free the returned value with g_variant_unref() when it is
26601  * no longer needed.
26602  *
26603  * Since: 2.28
26604  */
26605
26606
26607 /**
26608  * g_settings_get_string:
26609  * @settings: a #GSettings object
26610  * @key: the key to get the value for
26611  * @returns: a newly-allocated string
26612  *
26613  * Gets the value that is stored at @key in @settings.
26614  * A convenience variant of g_settings_get() for strings.
26615  * It is a programmer error to give a @key that isn't specified as
26616  * having a string type in the schema for @settings.
26617  *
26618  * Since: 2.26
26619  */
26620
26621
26622 /**
26623  * g_settings_get_strv:
26624  * @settings: a #GSettings object
26625  * @key: the key to get the value for
26626  * @returns: (array zero-terminated=1) (transfer full): a newly-allocated, %NULL-terminated array of strings, the value that is stored at @key in @settings.
26627  *
26628  * A convenience variant of g_settings_get() for string arrays.
26629  * It is a programmer error to give a @key that isn't specified as
26630  * having an array of strings type in the schema for @settings.
26631  *
26632  * Since: 2.26
26633  */
26634
26635
26636 /**
26637  * g_settings_get_value:
26638  * @settings: a #GSettings object
26639  * @key: the key to get the value for
26640  * @returns: a new #GVariant
26641  *
26642  * Gets the value that is stored in @settings for @key.
26643  * It is a programmer error to give a @key that isn't contained in the
26644  * schema for @settings.
26645  *
26646  * Since: 2.26
26647  */
26648
26649
26650 /**
26651  * g_settings_is_writable:
26652  * @settings: a #GSettings object
26653  * @name: the name of a key
26654  * @returns: %TRUE if the key @name is writable
26655  *
26656  * Finds out if a key can be written or not
26657  *
26658  * Since: 2.26
26659  */
26660
26661
26662 /**
26663  * g_settings_list_children:
26664  * @settings: a #GSettings object
26665  * @returns: (transfer full) (element-type utf8): a list of the children on @settings
26666  *
26667  * Gets the list of children on @settings.
26668  * The list is exactly the list of strings for which it is not an error
26669  * to call g_settings_get_child().
26670  * For GSettings objects that are lists, this value can change at any
26671  * time and you should connect to the "children-changed" signal to watch
26672  * request a child after listing it only for it to have been destroyed
26673  * in the meantime.  For this reason, g_settings_get_child() may return
26674  * %NULL even for a child that was listed by this function.
26675  * For GSettings objects that are not lists, you should probably not be
26676  * calling this function from "normal" code (since you should already
26677  * know what children are in your schema).  This function may still be
26678  * useful there for introspection reasons, however.
26679  * You should free the return value with g_strfreev() when you are done
26680  * with it.
26681  *
26682  * For those changes.  note that there is a race condition here: you may
26683  */
26684
26685
26686 /**
26687  * g_settings_list_keys:
26688  * @settings: a #GSettings object
26689  * @returns: (transfer full) (element-type utf8): a list of the keys on @settings
26690  *
26691  * Introspects the list of keys on @settings.
26692  * You should probably not be calling this function from "normal" code
26693  * (since you should already know what keys are in your schema).  This
26694  * function is intended for introspection reasons.
26695  * You should free the return value with g_strfreev() when you are done
26696  * with it.
26697  */
26698
26699
26700 /**
26701  * g_settings_list_relocatable_schemas:
26702  *
26703  * Gets a list of the relocatable #GSettings schemas installed on the
26704  * system.  These are schemas that do not provide their own path.  It is
26705  * usual to instantiate these schemas directly, but if you want to you
26706  * can use g_settings_new_with_path() to specify the path.
26707  * The output of this function, tTaken together with the output of
26708  * g_settings_list_schemas() represents the complete list of all
26709  * installed schemas.
26710  * #GSettings schemas that are available.  The list must not be
26711  * modified or freed.
26712  *
26713  * Returns: (element-type utf8) (transfer none): a list of relocatable
26714  * Since: 2.28
26715  */
26716
26717
26718 /**
26719  * g_settings_list_schemas:
26720  *
26721  * Gets a list of the #GSettings schemas installed on the system.  The
26722  * returned list is exactly the list of schemas for which you may call
26723  * g_settings_new() without adverse effects.
26724  * This function does not list the schemas that do not provide their own
26725  * g_settings_new_with_path()).  See
26726  * g_settings_list_relocatable_schemas() for that.
26727  * schemas that are available.  The list must not be modified or
26728  * freed.
26729  *
26730  * Paths (ie: schemas for which you must use
26731  * Returns: (element-type utf8) (transfer none): a list of #GSettings
26732  * Since: 2.26
26733  */
26734
26735
26736 /**
26737  * g_settings_new:
26738  * @schema: the name of the schema
26739  * @returns: a new #GSettings object
26740  *
26741  * Creates a new #GSettings object with a given schema.
26742  * Signals on the newly created #GSettings object will be dispatched
26743  * via the thread-default #GMainContext in effect at the time of the
26744  * call to g_settings_new().  The new #GSettings will hold a reference
26745  * on the context.  See g_main_context_push_thread_default().
26746  *
26747  * Since: 2.26
26748  */
26749
26750
26751 /**
26752  * g_settings_new_with_backend:
26753  * @schema: the name of the schema
26754  * @backend: the #GSettingsBackend to use
26755  * @returns: a new #GSettings object
26756  *
26757  * Creates a new #GSettings object with a given schema and backend.
26758  * Creating settings objects with an different backend allows accessing settings
26759  * from a database other than the usual one.  For example, it may make
26760  * sense to pass a backend corresponding to the "defaults" settings database on
26761  * the system to get a settings object that modifies the system default
26762  * settings instead of the settings for this user.
26763  *
26764  * Since: 2.26
26765  */
26766
26767
26768 /**
26769  * g_settings_new_with_backend_and_path:
26770  * @schema: the name of the schema
26771  * @backend: the #GSettingsBackend to use
26772  * @path: the path to use
26773  * @returns: a new #GSettings object
26774  *
26775  * Creates a new #GSettings object with a given schema, backend and
26776  * path.
26777  * This is a mix of g_settings_new_with_backend() and
26778  * g_settings_new_with_path().
26779  *
26780  * Since: 2.26
26781  */
26782
26783
26784 /**
26785  * g_settings_new_with_path:
26786  * @schema: the name of the schema
26787  * @path: the path to use
26788  * @returns: a new #GSettings object
26789  *
26790  * Creates a new #GSettings object with a given schema and path.
26791  * You only need to do this if you want to directly create a settings
26792  * object with a schema that doesn't have a specified path of its own.
26793  * That's quite rare.
26794  * It is a programmer error to call this function for a schema that
26795  * has an explicitly specified path.
26796  *
26797  * Since: 2.26
26798  */
26799
26800
26801 /**
26802  * g_settings_range_check:
26803  * @settings: a #GSettings
26804  * @key: the key to check
26805  * @value: the value to check
26806  * @returns: %TRUE if @value is valid for @key
26807  *
26808  * Checks if the given @value is of the correct type and within the
26809  * permitted range for @key.
26810  * This API is not intended to be used by normal programs -- they should
26811  * already know what is permitted by their own schemas.  This API is
26812  * meant to be used by programs such as editors or commandline tools.
26813  * It is a programmer error to give a @key that isn't contained in the
26814  * schema for @settings.
26815  *
26816  * Since: 2.28
26817  */
26818
26819
26820 /**
26821  * g_settings_reset:
26822  * @settings: a #GSettings object
26823  * @key: the name of a key
26824  *
26825  * Resets @key to its default value.
26826  * This call resets the key, as much as possible, to its default value.
26827  * That might the value specified in the schema or the one set by the
26828  * administrator.
26829  */
26830
26831
26832 /**
26833  * g_settings_revert:
26834  * @settings: a #GSettings instance
26835  *
26836  * Reverts all non-applied changes to the settings.  This function
26837  * does nothing unless @settings is in 'delay-apply' mode; see
26838  * g_settings_delay().  In the normal case settings are always applied
26839  * immediately.
26840  * Change notifications will be emitted for affected keys.
26841  */
26842
26843
26844 /**
26845  * g_settings_set:
26846  * @settings: a #GSettings object
26847  * @key: the name of the key to set
26848  * @format: a #GVariant format string
26849  * @...: arguments as per @format
26850  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
26851  *
26852  * Sets @key in @settings to @value.
26853  * A convenience function that combines g_settings_set_value() with
26854  * g_variant_new().
26855  * It is a programmer error to give a @key that isn't contained in the
26856  * schema for @settings or for the #GVariantType of @format to mismatch
26857  * the type given in the schema.
26858  *
26859  * Since: 2.26
26860  */
26861
26862
26863 /**
26864  * g_settings_set_boolean:
26865  * @settings: a #GSettings object
26866  * @key: the name of the key to set
26867  * @value: the value to set it to
26868  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
26869  *
26870  * Sets @key in @settings to @value.
26871  * A convenience variant of g_settings_set() for booleans.
26872  * It is a programmer error to give a @key that isn't specified as
26873  * having a boolean type in the schema for @settings.
26874  *
26875  * Since: 2.26
26876  */
26877
26878
26879 /**
26880  * g_settings_set_double:
26881  * @settings: a #GSettings object
26882  * @key: the name of the key to set
26883  * @value: the value to set it to
26884  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
26885  *
26886  * Sets @key in @settings to @value.
26887  * A convenience variant of g_settings_set() for doubles.
26888  * It is a programmer error to give a @key that isn't specified as
26889  * having a 'double' type in the schema for @settings.
26890  *
26891  * Since: 2.26
26892  */
26893
26894
26895 /**
26896  * g_settings_set_enum:
26897  * @settings: a #GSettings object
26898  * @key: a key, within @settings
26899  * @value: an enumerated value
26900  * @returns: %TRUE, if the set succeeds
26901  *
26902  * Looks up the enumerated type nick for @value and writes it to @key,
26903  * within @settings.
26904  * It is a programmer error to give a @key that isn't contained in the
26905  * schema for @settings or is not marked as an enumerated type, or for
26906  * After performing the write, accessing @key directly with
26907  * g_settings_get_string() will return the 'nick' associated with
26908  */
26909
26910
26911 /**
26912  * g_settings_set_flags:
26913  * @settings: a #GSettings object
26914  * @key: a key, within @settings
26915  * @value: a flags value
26916  * @returns: %TRUE, if the set succeeds
26917  *
26918  * Looks up the flags type nicks for the bits specified by @value, puts
26919  * them in an array of strings and writes the array to @key, withing
26920  * It is a programmer error to give a @key that isn't contained in the
26921  * schema for @settings or is not marked as a flags type, or for @value
26922  * to contain any bits that are not value for the named type.
26923  * After performing the write, accessing @key directly with
26924  * g_settings_get_strv() will return an array of 'nicks'; one for each
26925  * bit in @value.
26926  */
26927
26928
26929 /**
26930  * g_settings_set_int:
26931  * @settings: a #GSettings object
26932  * @key: the name of the key to set
26933  * @value: the value to set it to
26934  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
26935  *
26936  * Sets @key in @settings to @value.
26937  * A convenience variant of g_settings_set() for 32-bit integers.
26938  * It is a programmer error to give a @key that isn't specified as
26939  * having a int32 type in the schema for @settings.
26940  *
26941  * Since: 2.26
26942  */
26943
26944
26945 /**
26946  * g_settings_set_string:
26947  * @settings: a #GSettings object
26948  * @key: the name of the key to set
26949  * @value: the value to set it to
26950  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
26951  *
26952  * Sets @key in @settings to @value.
26953  * A convenience variant of g_settings_set() for strings.
26954  * It is a programmer error to give a @key that isn't specified as
26955  * having a string type in the schema for @settings.
26956  *
26957  * Since: 2.26
26958  */
26959
26960
26961 /**
26962  * g_settings_set_strv:
26963  * @settings: a #GSettings object
26964  * @key: the name of the key to set
26965  * @value: (allow-none) (array zero-terminated=1): the value to set it to, or %NULL
26966  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
26967  *
26968  * Sets @key in @settings to @value.
26969  * A convenience variant of g_settings_set() for string arrays.  If
26970  * It is a programmer error to give a @key that isn't specified as
26971  * having an array of strings type in the schema for @settings.
26972  *
26973  * Since: 2.26
26974  */
26975
26976
26977 /**
26978  * g_settings_set_value:
26979  * @settings: a #GSettings object
26980  * @key: the name of the key to set
26981  * @value: a #GVariant of the correct type
26982  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
26983  *
26984  * Sets @key in @settings to @value.
26985  * It is a programmer error to give a @key that isn't contained in the
26986  * schema for @settings or for @value to have the incorrect type, per
26987  * the schema.
26988  * If @value is floating then this function consumes the reference.
26989  *
26990  * Since: 2.26
26991  */
26992
26993
26994 /**
26995  * g_settings_sync:
26996  *
26997  * Ensures that all pending operations for the given are complete for
26998  * the default backend.
26999  * Writes made to a #GSettings are handled asynchronously.  For this
27000  * reason, it is very unlikely that the changes have it to disk by the
27001  * time g_settings_set() returns.
27002  * This call will block until all of the writes have made it to the
27003  * backend.  Since the mainloop is not running, no change notifications
27004  * will be dispatched during this call (but some may be queued by the
27005  * time the call is done).
27006  */
27007
27008
27009 /**
27010  * g_settings_unbind:
27011  * @object: the object
27012  * @property: the property whose binding is removed
27013  *
27014  * Removes an existing binding for @property on @object.
27015  * Note that bindings are automatically removed when the
27016  * object is finalized, so it is rarely necessary to call this
27017  * function.
27018  *
27019  * Since: 2.26
27020  */
27021
27022
27023 /**
27024  * g_signal_connect:
27025  * @instance: the instance to connect to.
27026  * @detailed_signal: a string of the form "signal-name::detail".
27027  * @c_handler: the #GCallback to connect.
27028  * @data: data to pass to @c_handler calls.
27029  *
27030  * Connects a #GCallback function to a signal for a particular object.
27031  * The handler will be called before the default handler of the signal.
27032  *
27033  * Returns: the handler id
27034  */
27035
27036
27037 /**
27038  * g_signal_connect_after:
27039  * @instance: the instance to connect to.
27040  * @detailed_signal: a string of the form "signal-name::detail".
27041  * @c_handler: the #GCallback to connect.
27042  * @data: data to pass to @c_handler calls.
27043  *
27044  * Connects a #GCallback function to a signal for a particular object.
27045  * The handler will be called after the default handler of the signal.
27046  *
27047  * Returns: the handler id
27048  */
27049
27050
27051 /**
27052  * g_signal_connect_swapped:
27053  * @instance: the instance to connect to.
27054  * @detailed_signal: a string of the form "signal-name::detail".
27055  * @c_handler: the #GCallback to connect.
27056  * @data: data to pass to @c_handler calls.
27057  *
27058  * Connects a #GCallback function to a signal for a particular object.
27059  * The instance on which the signal is emitted and @data will be swapped when
27060  * calling the handler.
27061  *
27062  * Returns: the handler id
27063  */
27064
27065
27066 /**
27067  * g_signal_handlers_block_by_func:
27068  * @instance: The instance to block handlers from.
27069  * @func: The C closure callback of the handlers (useless for non-C closures).
27070  * @data: The closure data of the handlers' closures.
27071  *
27072  * Blocks all handlers on an instance that match @func and @data.
27073  *
27074  * Returns: The number of handlers that matched.
27075  */
27076
27077
27078 /**
27079  * g_signal_handlers_disconnect_by_func:
27080  * @instance: The instance to remove handlers from.
27081  * @func: The C closure callback of the handlers (useless for non-C closures).
27082  * @data: The closure data of the handlers' closures.
27083  *
27084  * Disconnects all handlers on an instance that match @func and @data.
27085  *
27086  * Returns: The number of handlers that matched.
27087  */
27088
27089
27090 /**
27091  * g_signal_handlers_unblock_by_func:
27092  * @instance: The instance to unblock handlers from.
27093  * @func: The C closure callback of the handlers (useless for non-C closures).
27094  * @data: The closure data of the handlers' closures.
27095  *
27096  * Unblocks all handlers on an instance that match @func and @data.
27097  *
27098  * Returns: The number of handlers that matched.
27099  */
27100
27101
27102 /**
27103  * g_simple_action_group_insert:
27104  * @simple: a #GSimpleActionGroup
27105  * @action: a #GAction
27106  *
27107  * Adds an action to the action group.
27108  * If the action group already contains an action with the same name as
27109  * The action group takes its own reference on @action.
27110  *
27111  * Since: 2.28
27112  */
27113
27114
27115 /**
27116  * g_simple_action_group_lookup:
27117  * @simple: a #GSimpleActionGroup
27118  * @action_name: the name of an action
27119  *
27120  * Looks up the action with the name @action_name in the group.
27121  * If no such action exists, returns %NULL.
27122  *
27123  * Returns: (transfer none): a #GAction, or %NULL
27124  * Since: 2.28
27125  */
27126
27127
27128 /**
27129  * g_simple_action_group_new:
27130  *
27131  * Creates a new, empty, #GSimpleActionGroup.
27132  *
27133  * Returns: a new #GSimpleActionGroup
27134  * Since: 2.28
27135  */
27136
27137
27138 /**
27139  * g_simple_action_group_remove:
27140  * @simple: a #GSimpleActionGroup
27141  * @action_name: the name of the action
27142  *
27143  * Removes the named action from the action group.
27144  * If no action of this name is in the group then nothing happens.
27145  *
27146  * Since: 2.28
27147  */
27148
27149
27150 /**
27151  * g_simple_action_new:
27152  * @name: the name of the action
27153  * @parameter_type: (allow-none): the type of parameter to the activate function
27154  *
27155  * Creates a new action.
27156  * The created action is stateless.  See g_simple_action_new_stateful().
27157  *
27158  * Returns: a new #GSimpleAction
27159  * Since: 2.28
27160  */
27161
27162
27163 /**
27164  * g_simple_action_new_stateful:
27165  * @name: the name of the action
27166  * @parameter_type: (allow-none): the type of the parameter to the activate function
27167  * @state: the initial state of the action
27168  *
27169  * Creates a new stateful action.
27170  * must have the same #GVariantType as the initial state.
27171  * If the @state GVariant is floating, it is consumed.
27172  *
27173  * Returns: a new #GSimpleAction
27174  * Since: 2.28
27175  */
27176
27177
27178 /**
27179  * g_simple_action_set_enabled:
27180  * @simple: a #GSimpleAction
27181  * @enabled: whether the action is enabled
27182  *
27183  * Sets the action as enabled or not.
27184  * An action must be enabled in order to be activated or in order to
27185  * have its state changed from outside callers.
27186  *
27187  * Since: 2.28
27188  */
27189
27190
27191 /**
27192  * g_simple_async_report_error_in_idle: (skip)
27193  * @object: (allow-none): a #GObject, or %NULL.
27194  * @callback: a #GAsyncReadyCallback.
27195  * @user_data: user data passed to @callback.
27196  * @domain: a #GQuark containing the error domain (usually #G_IO_ERROR).
27197  * @code: a specific error code.
27198  * @format: a formatted error reporting string.
27199  * @...: a list of variables to fill in @format.
27200  *
27201  * Reports an error in an asynchronous function in an idle function by
27202  * directly setting the contents of the #GAsyncResult with the given error
27203  * information.
27204  */
27205
27206
27207 /**
27208  * g_simple_async_report_gerror_in_idle:
27209  * @object: (allow-none): a #GObject, or %NULL
27210  * @callback: (scope async): a #GAsyncReadyCallback.
27211  * @user_data: (closure): user data passed to @callback.
27212  * @error: the #GError to report
27213  *
27214  * Reports an error in an idle function. Similar to
27215  * g_simple_async_report_error_in_idle(), but takes a #GError rather
27216  * than building a new one.
27217  */
27218
27219
27220 /**
27221  * g_simple_async_report_take_gerror_in_idle: (skip)
27222  * @object: (allow-none): a #GObject, or %NULL
27223  * @callback: a #GAsyncReadyCallback.
27224  * @user_data: user data passed to @callback.
27225  * @error: the #GError to report
27226  *
27227  * Reports an error in an idle function. Similar to
27228  * g_simple_async_report_gerror_in_idle(), but takes over the caller's
27229  * ownership of @error, so the caller does not have to free it any more.
27230  *
27231  * Since: 2.28
27232  */
27233
27234
27235 /**
27236  * g_simple_async_result_complete:
27237  * @simple: a #GSimpleAsyncResult.
27238  *
27239  * Completes an asynchronous I/O job immediately. Must be called in
27240  * the thread where the asynchronous result was to be delivered, as it
27241  * invokes the callback directly. If you are in a different thread use
27242  * g_simple_async_result_complete_in_idle().
27243  * Calling this function takes a reference to @simple for as long as
27244  * is needed to complete the call.
27245  */
27246
27247
27248 /**
27249  * g_simple_async_result_complete_in_idle:
27250  * @simple: a #GSimpleAsyncResult.
27251  *
27252  * Completes an asynchronous function in an idle handler in the <link
27253  * linkend="g-main-context-push-thread-default">thread-default main
27254  * loop</link> of the thread that @simple was initially created in.
27255  * Calling this function takes a reference to @simple for as long as
27256  * is needed to complete the call.
27257  */
27258
27259
27260 /**
27261  * g_simple_async_result_get_op_res_gboolean:
27262  * @simple: a #GSimpleAsyncResult.
27263  *
27264  * Gets the operation result boolean from within the asynchronous result.
27265  * if the operation's result was %FALSE.
27266  *
27267  * Returns: %TRUE if the operation's result was %TRUE, %FALSE
27268  */
27269
27270
27271 /**
27272  * g_simple_async_result_get_op_res_gpointer: (skip)
27273  * @simple: a #GSimpleAsyncResult.
27274  *
27275  * Gets a pointer result as returned by the asynchronous function.
27276  *
27277  * Returns: a pointer from the result.
27278  */
27279
27280
27281 /**
27282  * g_simple_async_result_get_op_res_gssize:
27283  * @simple: a #GSimpleAsyncResult.
27284  *
27285  * Gets a gssize from the asynchronous result.
27286  *
27287  * Returns: a gssize returned from the asynchronous function.
27288  */
27289
27290
27291 /**
27292  * g_simple_async_result_get_source_tag: (skip)
27293  * @simple: a #GSimpleAsyncResult.
27294  *
27295  * Gets the source tag for the #GSimpleAsyncResult.
27296  *
27297  * Returns: a #gpointer to the source object for the #GSimpleAsyncResult.
27298  */
27299
27300
27301 /**
27302  * g_simple_async_result_is_valid:
27303  * @result: the #GAsyncResult passed to the _finish function.
27304  * @source: the #GObject passed to the _finish function.
27305  * @source_tag: the asynchronous function.
27306  *
27307  * Ensures that the data passed to the _finish function of an async
27308  * operation is consistent.  Three checks are performed.
27309  * First, @result is checked to ensure that it is really a
27310  * #GSimpleAsyncResult.  Second, @source is checked to ensure that it
27311  * matches the source object of @result.  Third, @source_tag is
27312  * checked to ensure that it is either %NULL (as it is when the result was
27313  * created by g_simple_async_report_error_in_idle() or
27314  * g_simple_async_report_gerror_in_idle()) or equal to the
27315  * convention, is a pointer to the _async function corresponding to the
27316  * _finish function from which this function is called).
27317  *
27318  * Returns: #TRUE if all checks passed or #FALSE if any failed.
27319  * Since: 2.20
27320  */
27321
27322
27323 /**
27324  * g_simple_async_result_new:
27325  * @source_object: (allow-none): a #GObject, or %NULL.
27326  * @callback: (scope async): a #GAsyncReadyCallback.
27327  * @user_data: (closure): user data passed to @callback.
27328  * @source_tag: the asynchronous function.
27329  *
27330  * Creates a #GSimpleAsyncResult.
27331  *
27332  * Returns: a #GSimpleAsyncResult.
27333  */
27334
27335
27336 /**
27337  * g_simple_async_result_new_error:
27338  * @source_object: (allow-none): a #GObject, or %NULL.
27339  * @callback: (scope async): a #GAsyncReadyCallback.
27340  * @user_data: (closure): user data passed to @callback.
27341  * @domain: a #GQuark.
27342  * @code: an error code.
27343  * @format: a string with format characters.
27344  * @...: a list of values to insert into @format.
27345  *
27346  * Creates a new #GSimpleAsyncResult with a set error.
27347  *
27348  * Returns: a #GSimpleAsyncResult.
27349  */
27350
27351
27352 /**
27353  * g_simple_async_result_new_from_error:
27354  * @source_object: (allow-none): a #GObject, or %NULL.
27355  * @callback: (scope async): a #GAsyncReadyCallback.
27356  * @user_data: (closure): user data passed to @callback.
27357  * @error: a #GError
27358  *
27359  * Creates a #GSimpleAsyncResult from an error condition.
27360  *
27361  * Returns: a #GSimpleAsyncResult.
27362  */
27363
27364
27365 /**
27366  * g_simple_async_result_new_take_error: (skip)
27367  * @source_object: (allow-none): a #GObject, or %NULL
27368  * @callback: (scope async): a #GAsyncReadyCallback
27369  * @user_data: (closure): user data passed to @callback
27370  * @error: a #GError
27371  *
27372  * Creates a #GSimpleAsyncResult from an error condition, and takes over the
27373  * caller's ownership of @error, so the caller does not need to free it anymore.
27374  *
27375  * Returns: a #GSimpleAsyncResult
27376  * Since: 2.28
27377  */
27378
27379
27380 /**
27381  * g_simple_async_result_propagate_error:
27382  * @simple: a #GSimpleAsyncResult.
27383  * @dest: (out): a location to propagate the error to.
27384  *
27385  * Propagates an error from within the simple asynchronous result to
27386  * a given destination.
27387  *
27388  * Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise.
27389  */
27390
27391
27392 /**
27393  * g_simple_async_result_run_in_thread: (skip)
27394  * @simple: a #GSimpleAsyncResult.
27395  * @func: a #GSimpleAsyncThreadFunc.
27396  * @io_priority: the io priority of the request.
27397  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27398  *
27399  * Runs the asynchronous job in a separate thread and then calls
27400  * g_simple_async_result_complete_in_idle() on @simple to return
27401  * the result to the appropriate main loop.
27402  * Calling this function takes a reference to @simple for as long as
27403  * is needed to run the job and report its completion.
27404  */
27405
27406
27407 /**
27408  * g_simple_async_result_set_error: (skip)
27409  * @simple: a #GSimpleAsyncResult.
27410  * @domain: a #GQuark (usually #G_IO_ERROR).
27411  * @code: an error code.
27412  * @format: a formatted error reporting string.
27413  * @...: a list of variables to fill in @format.
27414  *
27415  * Sets an error within the asynchronous result without a #GError.
27416  */
27417
27418
27419 /**
27420  * g_simple_async_result_set_error_va: (skip)
27421  * @simple: a #GSimpleAsyncResult.
27422  * @domain: a #GQuark (usually #G_IO_ERROR).
27423  * @code: an error code.
27424  * @format: a formatted error reporting string.
27425  * @args: va_list of arguments.
27426  *
27427  * Sets an error within the asynchronous result without a #GError.
27428  * Unless writing a binding, see g_simple_async_result_set_error().
27429  */
27430
27431
27432 /**
27433  * g_simple_async_result_set_from_error:
27434  * @simple: a #GSimpleAsyncResult.
27435  * @error: #GError.
27436  *
27437  * Sets the result from a #GError.
27438  */
27439
27440
27441 /**
27442  * g_simple_async_result_set_handle_cancellation:
27443  * @simple: a #GSimpleAsyncResult.
27444  * @handle_cancellation: a #gboolean.
27445  *
27446  * Sets whether to handle cancellation within the asynchronous operation.
27447  */
27448
27449
27450 /**
27451  * g_simple_async_result_set_op_res_gboolean:
27452  * @simple: a #GSimpleAsyncResult.
27453  * @op_res: a #gboolean.
27454  *
27455  * Sets the operation result to a boolean within the asynchronous result.
27456  */
27457
27458
27459 /**
27460  * g_simple_async_result_set_op_res_gpointer: (skip)
27461  * @simple: a #GSimpleAsyncResult.
27462  * @op_res: a pointer result from an asynchronous function.
27463  * @destroy_op_res: a #GDestroyNotify function.
27464  *
27465  * Sets the operation result within the asynchronous result to a pointer.
27466  */
27467
27468
27469 /**
27470  * g_simple_async_result_set_op_res_gssize:
27471  * @simple: a #GSimpleAsyncResult.
27472  * @op_res: a #gssize.
27473  *
27474  * Sets the operation result within the asynchronous result to
27475  * the given @op_res.
27476  */
27477
27478
27479 /**
27480  * g_simple_async_result_take_error: (skip)
27481  * @simple: a #GSimpleAsyncResult
27482  * @error: a #GError
27483  *
27484  * Sets the result from @error, and takes over the caller's ownership
27485  * of @error, so the caller does not need to free it any more.
27486  *
27487  * Since: 2.28
27488  */
27489
27490
27491 /**
27492  * g_simple_permission_new:
27493  * @allowed: %TRUE if the action is allowed
27494  * @returns: the #GSimplePermission, as a #GPermission
27495  *
27496  * Creates a new #GPermission instance that represents an action that is
27497  * either always or never allowed.
27498  *
27499  * Since: 2.26
27500  */
27501
27502
27503 /**
27504  * g_socket_accept:
27505  * @socket: a #GSocket.
27506  * @cancellable: (allow-none): a %GCancellable or %NULL
27507  * @error: #GError for error reporting, or %NULL to ignore.
27508  *
27509  * Accept incoming connections on a connection-based socket. This removes
27510  * the first outstanding connection request from the listening socket and
27511  * creates a #GSocket object for it.
27512  * The @socket must be bound to a local address with g_socket_bind() and
27513  * must be listening for incoming connections (g_socket_listen()).
27514  * If there are no outstanding connections then the operation will block
27515  * or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.
27516  * To be notified of an incoming connection, wait for the %G_IO_IN condition.
27517  * Free the returned object with g_object_unref().
27518  *
27519  * Returns: (transfer full): a new #GSocket, or %NULL on error.
27520  * Since: 2.22
27521  */
27522
27523
27524 /**
27525  * g_socket_address_enumerator_next:
27526  * @enumerator: a #GSocketAddressEnumerator
27527  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27528  * @error: a #GError.
27529  *
27530  * Retrieves the next #GSocketAddress from @enumerator. Note that this
27531  * may block for some amount of time. (Eg, a #GNetworkAddress may need
27532  * to do a DNS lookup before it can return an address.) Use
27533  * g_socket_address_enumerator_next_async() if you need to avoid
27534  * blocking.
27535  * If @enumerator is expected to yield addresses, but for some reason
27536  * is unable to (eg, because of a DNS error), then the first call to
27537  * g_socket_address_enumerator_next() will return an appropriate error
27538  * in *@error. However, if the first call to
27539  * g_socket_address_enumerator_next() succeeds, then any further
27540  * internal errors (other than @cancellable being triggered) will be
27541  * ignored.
27542  * error (in which case *@error will be set) or if there are no
27543  * more addresses.
27544  *
27545  * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
27546  */
27547
27548
27549 /**
27550  * g_socket_address_enumerator_next_async:
27551  * @enumerator: a #GSocketAddressEnumerator
27552  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27553  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
27554  * @user_data: (closure): the data to pass to callback function
27555  *
27556  * Asynchronously retrieves the next #GSocketAddress from @enumerator
27557  * and then calls @callback, which must call
27558  * g_socket_address_enumerator_next_finish() to get the result.
27559  */
27560
27561
27562 /**
27563  * g_socket_address_enumerator_next_finish:
27564  * @enumerator: a #GSocketAddressEnumerator
27565  * @result: a #GAsyncResult
27566  * @error: a #GError
27567  *
27568  * Retrieves the result of a completed call to
27569  * g_socket_address_enumerator_next_async(). See
27570  * g_socket_address_enumerator_next() for more information about
27571  * error handling.
27572  * error (in which case *@error will be set) or if there are no
27573  * more addresses.
27574  *
27575  * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
27576  */
27577
27578
27579 /**
27580  * g_socket_address_get_family:
27581  * @address: a #GSocketAddress
27582  *
27583  * Gets the socket family type of @address.
27584  *
27585  * Returns: the socket family type of @address.
27586  * Since: 2.22
27587  */
27588
27589
27590 /**
27591  * g_socket_address_get_native_size:
27592  * @address: a #GSocketAddress
27593  *
27594  * Gets the size of @address's native <type>struct sockaddr</type>.
27595  * You can use this to allocate memory to pass to
27596  * g_socket_address_to_native().
27597  *
27598  * Returns: the size of the native <type>struct sockaddr</type> that
27599  * Since: 2.22
27600  */
27601
27602
27603 /**
27604  * g_socket_address_new_from_native:
27605  * @native: a pointer to a <type>struct sockaddr</type>
27606  * @len: the size of the memory location pointed to by @native
27607  *
27608  * Creates a #GSocketAddress subclass corresponding to the native
27609  * <type>struct sockaddr</type> @native.
27610  * otherwise %NULL.
27611  *
27612  * Returns: a new #GSocketAddress if @native could successfully be converted,
27613  * Since: 2.22
27614  */
27615
27616
27617 /**
27618  * g_socket_address_to_native:
27619  * @address: a #GSocketAddress
27620  * @dest: a pointer to a memory location that will contain the native <type>struct sockaddr</type>.
27621  * @destlen: the size of @dest. Must be at least as large as g_socket_address_get_native_size().
27622  * @error: #GError for error reporting, or %NULL to ignore.
27623  *
27624  * Converts a #GSocketAddress to a native <type>struct
27625  * sockaddr</type>, which can be passed to low-level functions like
27626  * connect() or bind().
27627  * If not enough space is availible, a %G_IO_ERROR_NO_SPACE error is
27628  * returned. If the address type is not known on the system
27629  * then a %G_IO_ERROR_NOT_SUPPORTED error is returned.
27630  *
27631  * Returns: %TRUE if @dest was filled in, %FALSE on error
27632  * Since: 2.22
27633  */
27634
27635
27636 /**
27637  * g_socket_bind:
27638  * @socket: a #GSocket.
27639  * @address: a #GSocketAddress specifying the local address.
27640  * @allow_reuse: whether to allow reusing this address
27641  * @error: #GError for error reporting, or %NULL to ignore.
27642  *
27643  * When a socket is created it is attached to an address family, but it
27644  * doesn't have an address in this family. g_socket_bind() assigns the
27645  * address (sometimes called name) of the socket.
27646  * It is generally required to bind to a local address before you can
27647  * receive connections. (See g_socket_listen() and g_socket_accept() ).
27648  * In certain situations, you may also want to bind a socket that will be
27649  * used to initiate connections, though this is not normally required.
27650  * eventually call g_socket_accept() on), and %FALSE for client sockets.
27651  * (Specifically, if it is %TRUE, then g_socket_bind() will set the
27652  * %SO_REUSEADDR flag on the socket, allowing it to bind @address even if
27653  * that address was previously used by another socket that has not yet been
27654  * fully cleaned-up by the kernel. Failing to set this flag on a server
27655  * socket may cause the bind call to return %G_IO_ERROR_ADDRESS_IN_USE if
27656  * the server program is stopped and then immediately restarted.)
27657  *
27658  * Returns: %TRUE on success, %FALSE on error.
27659  * Since: 2.22
27660  */
27661
27662
27663 /**
27664  * g_socket_check_connect_result:
27665  * @socket: a #GSocket
27666  * @error: #GError for error reporting, or %NULL to ignore.
27667  *
27668  * Checks and resets the pending connect error for the socket.
27669  * This is used to check for errors when g_socket_connect() is
27670  * used in non-blocking mode.
27671  *
27672  * Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error
27673  * Since: 2.22
27674  */
27675
27676
27677 /**
27678  * g_socket_client_add_application_proxy:
27679  * @client: a #GSocketClient
27680  * @protocol: The proxy protocol
27681  *
27682  * Enable proxy protocols to be handled by the application. When the
27683  * indicated proxy protocol is returned by the #GProxyResolver,
27684  * #GSocketClient will consider this protocol as supported but will
27685  * not try find a #GProxy instance to handle handshaking. The
27686  * application must check for this case by calling
27687  * g_socket_connection_get_remote_address() on the returned
27688  * #GSocketConnection, and seeing if it's a #GProxyAddress of the
27689  * appropriate type, to determine whether or not it needs to handle
27690  * the proxy handshaking itself.
27691  * This should be used for proxy protocols that are dialects of
27692  * another protocol such as HTTP proxy. It also allows cohabitation of
27693  * proxy protocols that are reused between protocols. A good example
27694  * is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also
27695  * be use as generic socket proxy through the HTTP CONNECT method.
27696  */
27697
27698
27699 /**
27700  * g_socket_client_connect:
27701  * @client: a #GSocketClient.
27702  * @connectable: a #GSocketConnectable specifying the remote address.
27703  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27704  * @error: #GError for error reporting, or %NULL to ignore.
27705  *
27706  * Tries to resolve the @connectable and make a network connection to it..
27707  * Upon a successful connection, a new #GSocketConnection is constructed
27708  * and returned.  The caller owns this new object and must drop their
27709  * reference to it when finished with it.
27710  * The type of the #GSocketConnection object returned depends on the type of
27711  * the underlying socket that is used. For instance, for a TCP/IP connection
27712  * it will be a #GTcpConnection.
27713  * The socket created will be the same family as the the address that the
27714  * or indirectly via g_socket_client_set_local_address(). The socket type
27715  * defaults to %G_SOCKET_TYPE_STREAM but can be set with
27716  * g_socket_client_set_socket_type().
27717  * If a local address is specified with g_socket_client_set_local_address() the
27718  * socket will be bound to this address before connecting.
27719  *
27720  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
27721  * Since: 2.22
27722  */
27723
27724
27725 /**
27726  * g_socket_client_connect_async:
27727  * @client: a #GTcpClient
27728  * @connectable: a #GSocketConnectable specifying the remote address.
27729  * @cancellable: (allow-none): a #GCancellable, or %NULL
27730  * @callback: (scope async): a #GAsyncReadyCallback
27731  * @user_data: (closure): user data for the callback
27732  *
27733  * This is the asynchronous version of g_socket_client_connect().
27734  * When the operation is finished @callback will be
27735  * called. You can then call g_socket_client_connect_finish() to get
27736  * the result of the operation.
27737  *
27738  * Since: 2.22
27739  */
27740
27741
27742 /**
27743  * g_socket_client_connect_finish:
27744  * @client: a #GSocketClient.
27745  * @result: a #GAsyncResult.
27746  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27747  *
27748  * Finishes an async connect operation. See g_socket_client_connect_async()
27749  *
27750  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
27751  * Since: 2.22
27752  */
27753
27754
27755 /**
27756  * g_socket_client_connect_to_host:
27757  * @client: a #GSocketClient
27758  * @host_and_port: the name and optionally port of the host to connect to
27759  * @default_port: the default port to connect to
27760  * @cancellable: (allow-none): a #GCancellable, or %NULL
27761  * @error: a pointer to a #GError, or %NULL
27762  *
27763  * This is a helper function for g_socket_client_connect().
27764  * Attempts to create a TCP connection to the named host.
27765  * address, an IPv4 address, or a domain name (in which case a DNS
27766  * lookup is performed).  Quoting with [] is supported for all address
27767  * types.  A port override may be specified in the usual way with a
27768  * colon.  Ports may be given as decimal numbers or symbolic names (in
27769  * which case an /etc/services lookup is performed).
27770  * If no port override is given in @host_and_port then @default_port will be
27771  * used as the port number to connect to.
27772  * In general, @host_and_port is expected to be provided by the user (allowing
27773  * them to give the hostname, and a port overide if necessary) and
27774  * In the case that an IP address is given, a single connection
27775  * attempt is made.  In the case that a name is given, multiple
27776  * connection attempts may be made, in turn and according to the
27777  * number of address records in DNS, until a connection succeeds.
27778  * Upon a successful connection, a new #GSocketConnection is constructed
27779  * and returned.  The caller owns this new object and must drop their
27780  * reference to it when finished with it.
27781  * In the event of any failure (DNS error, service not found, no hosts
27782  * connectable) %NULL is returned and @error (if non-%NULL) is set
27783  * accordingly.
27784  *
27785  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
27786  * Since: 2.22
27787  */
27788
27789
27790 /**
27791  * g_socket_client_connect_to_host_async:
27792  * @client: a #GTcpClient
27793  * @host_and_port: the name and optionally the port of the host to connect to
27794  * @default_port: the default port to connect to
27795  * @cancellable: (allow-none): a #GCancellable, or %NULL
27796  * @callback: (scope async): a #GAsyncReadyCallback
27797  * @user_data: (closure): user data for the callback
27798  *
27799  * This is the asynchronous version of g_socket_client_connect_to_host().
27800  * When the operation is finished @callback will be
27801  * called. You can then call g_socket_client_connect_to_host_finish() to get
27802  * the result of the operation.
27803  *
27804  * Since: 2.22
27805  */
27806
27807
27808 /**
27809  * g_socket_client_connect_to_host_finish:
27810  * @client: a #GSocketClient.
27811  * @result: a #GAsyncResult.
27812  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27813  *
27814  * Finishes an async connect operation. See g_socket_client_connect_to_host_async()
27815  *
27816  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
27817  * Since: 2.22
27818  */
27819
27820
27821 /**
27822  * g_socket_client_connect_to_service:
27823  * @client: a #GSocketConnection
27824  * @domain: a domain name
27825  * @service: the name of the service to connect to
27826  * @cancellable: (allow-none): a #GCancellable, or %NULL
27827  * @error: a pointer to a #GError, or %NULL
27828  * @returns: (transfer full): a #GSocketConnection if successful, or %NULL on error
27829  *
27830  * Attempts to create a TCP connection to a service.
27831  * This call looks up the SRV record for @service at @domain for the
27832  * "tcp" protocol.  It then attempts to connect, in turn, to each of
27833  * the hosts providing the service until either a connection succeeds
27834  * or there are no hosts remaining.
27835  * Upon a successful connection, a new #GSocketConnection is constructed
27836  * and returned.  The caller owns this new object and must drop their
27837  * reference to it when finished with it.
27838  * In the event of any failure (DNS error, service not found, no hosts
27839  * connectable) %NULL is returned and @error (if non-%NULL) is set
27840  * accordingly.
27841  */
27842
27843
27844 /**
27845  * g_socket_client_connect_to_service_async:
27846  * @client: a #GSocketClient
27847  * @domain: a domain name
27848  * @service: the name of the service to connect to
27849  * @cancellable: (allow-none): a #GCancellable, or %NULL
27850  * @callback: (scope async): a #GAsyncReadyCallback
27851  * @user_data: (closure): user data for the callback
27852  *
27853  * This is the asynchronous version of
27854  * g_socket_client_connect_to_service().
27855  *
27856  * Since: 2.22
27857  */
27858
27859
27860 /**
27861  * g_socket_client_connect_to_service_finish:
27862  * @client: a #GSocketClient.
27863  * @result: a #GAsyncResult.
27864  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27865  *
27866  * Finishes an async connect operation. See g_socket_client_connect_to_service_async()
27867  *
27868  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
27869  * Since: 2.22
27870  */
27871
27872
27873 /**
27874  * g_socket_client_connect_to_uri:
27875  * @client: a #GSocketClient
27876  * @uri: A network URI
27877  * @default_port: the default port to connect to
27878  * @cancellable: (allow-none): a #GCancellable, or %NULL
27879  * @error: a pointer to a #GError, or %NULL
27880  *
27881  * This is a helper function for g_socket_client_connect().
27882  * Attempts to create a TCP connection with a network URI.
27883  * component. If a port is not specified in the URI, @default_port
27884  * will be used. TLS will be negotiated if #GSocketClient:tls is %TRUE.
27885  * (#GSocketClient does not know to automatically assume TLS for
27886  * certain URI schemes.)
27887  * Using this rather than g_socket_client_connect() or
27888  * g_socket_client_connect_to_host() allows #GSocketClient to
27889  * determine when to use application-specific proxy protocols.
27890  * Upon a successful connection, a new #GSocketConnection is constructed
27891  * and returned.  The caller owns this new object and must drop their
27892  * reference to it when finished with it.
27893  * In the event of any failure (DNS error, service not found, no hosts
27894  * connectable) %NULL is returned and @error (if non-%NULL) is set
27895  * accordingly.
27896  *
27897  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
27898  * Since: 2.26
27899  */
27900
27901
27902 /**
27903  * g_socket_client_connect_to_uri_async:
27904  * @client: a #GSocketClient
27905  * @uri: a network uri
27906  * @default_port: the default port to connect to
27907  * @cancellable: (allow-none): a #GCancellable, or %NULL
27908  * @callback: (scope async): a #GAsyncReadyCallback
27909  * @user_data: (closure): user data for the callback
27910  *
27911  * This is the asynchronous version of g_socket_client_connect_to_uri().
27912  * When the operation is finished @callback will be
27913  * called. You can then call g_socket_client_connect_to_uri_finish() to get
27914  * the result of the operation.
27915  *
27916  * Since: 2.26
27917  */
27918
27919
27920 /**
27921  * g_socket_client_connect_to_uri_finish:
27922  * @client: a #GSocketClient.
27923  * @result: a #GAsyncResult.
27924  * @error: a #GError location to store the error occuring, or %NULL to ignore.
27925  *
27926  * Finishes an async connect operation. See g_socket_client_connect_to_uri_async()
27927  *
27928  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
27929  * Since: 2.26
27930  */
27931
27932
27933 /**
27934  * g_socket_client_get_enable_proxy:
27935  * @client: a #GSocketClient.
27936  *
27937  * Gets the proxy enable state; see g_socket_client_set_enable_proxy()
27938  *
27939  * Returns: whether proxying is enabled
27940  * Since: 2.26
27941  */
27942
27943
27944 /**
27945  * g_socket_client_get_family:
27946  * @client: a #GSocketClient.
27947  *
27948  * Gets the socket family of the socket client.
27949  * See g_socket_client_set_family() for details.
27950  *
27951  * Returns: a #GSocketFamily
27952  * Since: 2.22
27953  */
27954
27955
27956 /**
27957  * g_socket_client_get_local_address:
27958  * @client: a #GSocketClient.
27959  *
27960  * Gets the local address of the socket client.
27961  * See g_socket_client_set_local_address() for details.
27962  *
27963  * Returns: (transfer none): a #GSocketAddres or %NULL. don't free
27964  * Since: 2.22
27965  */
27966
27967
27968 /**
27969  * g_socket_client_get_protocol:
27970  * @client: a #GSocketClient
27971  *
27972  * Gets the protocol name type of the socket client.
27973  * See g_socket_client_set_protocol() for details.
27974  *
27975  * Returns: a #GSocketProtocol
27976  * Since: 2.22
27977  */
27978
27979
27980 /**
27981  * g_socket_client_get_socket_type:
27982  * @client: a #GSocketClient.
27983  *
27984  * Gets the socket type of the socket client.
27985  * See g_socket_client_set_socket_type() for details.
27986  *
27987  * Returns: a #GSocketFamily
27988  * Since: 2.22
27989  */
27990
27991
27992 /**
27993  * g_socket_client_get_timeout:
27994  * @client: a #GSocketClient
27995  *
27996  * Gets the I/O timeout time for sockets created by @client.
27997  * See g_socket_client_set_timeout() for details.
27998  *
27999  * Returns: the timeout in seconds
28000  * Since: 2.26
28001  */
28002
28003
28004 /**
28005  * g_socket_client_get_tls:
28006  * @client: a #GSocketClient.
28007  *
28008  * Gets whether @client creates TLS connections. See
28009  * g_socket_client_set_tls() for details.
28010  *
28011  * Returns: whether @client uses TLS
28012  * Since: 2.28
28013  */
28014
28015
28016 /**
28017  * g_socket_client_get_tls_validation_flags:
28018  * @client: a #GSocketClient.
28019  *
28020  * Gets the TLS validation flags used creating TLS connections via
28021  *
28022  * Returns: the TLS validation flags
28023  * Since: 2.28
28024  */
28025
28026
28027 /**
28028  * g_socket_client_new:
28029  *
28030  * Creates a new #GSocketClient with the default options.
28031  * Free the returned object with g_object_unref().
28032  *
28033  * Returns: a #GSocketClient.
28034  * Since: 2.22
28035  */
28036
28037
28038 /**
28039  * g_socket_client_set_enable_proxy:
28040  * @client: a #GSocketClient.
28041  * @enable: whether to enable proxies
28042  *
28043  * Sets whether or not @client attempts to make connections via a
28044  * proxy server. When enabled (the default), #GSocketClient will use a
28045  * #GProxyResolver to determine if a proxy protocol such as SOCKS is
28046  * needed, and automatically do the necessary proxy negotiation.
28047  *
28048  * Since: 2.26
28049  */
28050
28051
28052 /**
28053  * g_socket_client_set_family:
28054  * @client: a #GSocketClient.
28055  * @family: a #GSocketFamily
28056  *
28057  * Sets the socket family of the socket client.
28058  * If this is set to something other than %G_SOCKET_FAMILY_INVALID
28059  * then the sockets created by this object will be of the specified
28060  * family.
28061  * This might be useful for instance if you want to force the local
28062  * connection to be an ipv4 socket, even though the address might
28063  * be an ipv6 mapped to ipv4 address.
28064  *
28065  * Since: 2.22
28066  */
28067
28068
28069 /**
28070  * g_socket_client_set_local_address:
28071  * @client: a #GSocketClient.
28072  * @address: a #GSocketAddress, or %NULL
28073  *
28074  * Sets the local address of the socket client.
28075  * The sockets created by this object will bound to the
28076  * specified address (if not %NULL) before connecting.
28077  * This is useful if you want to ensure the the local
28078  * side of the connection is on a specific port, or on
28079  * a specific interface.
28080  *
28081  * Since: 2.22
28082  */
28083
28084
28085 /**
28086  * g_socket_client_set_protocol:
28087  * @client: a #GSocketClient.
28088  * @protocol: a #GSocketProtocol
28089  *
28090  * Sets the protocol of the socket client.
28091  * The sockets created by this object will use of the specified
28092  * protocol.
28093  * If @protocol is %0 that means to use the default
28094  * protocol for the socket family and type.
28095  *
28096  * Since: 2.22
28097  */
28098
28099
28100 /**
28101  * g_socket_client_set_socket_type:
28102  * @client: a #GSocketClient.
28103  * @type: a #GSocketType
28104  *
28105  * Sets the socket type of the socket client.
28106  * The sockets created by this object will be of the specified
28107  * type.
28108  * It doesn't make sense to specify a type of %G_SOCKET_TYPE_DATAGRAM,
28109  * as GSocketClient is used for connection oriented services.
28110  *
28111  * Since: 2.22
28112  */
28113
28114
28115 /**
28116  * g_socket_client_set_timeout:
28117  * @client: a #GSocketClient.
28118  * @timeout: the timeout
28119  *
28120  * Sets the I/O timeout for sockets created by @client. @timeout is a
28121  * time in seconds, or 0 for no timeout (the default).
28122  * The timeout value affects the initial connection attempt as well,
28123  * so setting this may cause calls to g_socket_client_connect(), etc,
28124  * to fail with %G_IO_ERROR_TIMED_OUT.
28125  *
28126  * Since: 2.26
28127  */
28128
28129
28130 /**
28131  * g_socket_client_set_tls:
28132  * @client: a #GSocketClient.
28133  * @tls: whether to use TLS
28134  *
28135  * Sets whether @client creates TLS (aka SSL) connections. If @tls is
28136  * %TRUE, @client will wrap its connections in a #GTlsClientConnection
28137  * and perform a TLS handshake when connecting.
28138  * Note that since #GSocketClient must return a #GSocketConnection,
28139  * but #GTlsClientConnection is not a #GSocketConnection, this
28140  * actually wraps the resulting #GTlsClientConnection in a
28141  * #GTcpWrapperConnection when returning it. You can use
28142  * g_tcp_wrapper_connection_get_base_io_stream() on the return value
28143  * to extract the #GTlsClientConnection.
28144  *
28145  * Since: 2.28
28146  */
28147
28148
28149 /**
28150  * g_socket_client_set_tls_validation_flags:
28151  * @client: a #GSocketClient.
28152  * @flags: the validation flags
28153  *
28154  * Sets the TLS validation flags used when creating TLS connections
28155  * via @client. The default value is %G_TLS_CERTIFICATE_VALIDATE_ALL.
28156  *
28157  * Since: 2.28
28158  */
28159
28160
28161 /**
28162  * g_socket_close:
28163  * @socket: a #GSocket
28164  * @error: #GError for error reporting, or %NULL to ignore.
28165  *
28166  * Closes the socket, shutting down any active connection.
28167  * Closing a socket does not wait for all outstanding I/O operations
28168  * to finish, so the caller should not rely on them to be guaranteed
28169  * to complete even if the close returns with no error.
28170  * Once the socket is closed, all other operations will return
28171  * %G_IO_ERROR_CLOSED. Closing a socket multiple times will not
28172  * return an error.
28173  * Sockets will be automatically closed when the last reference
28174  * is dropped, but you might want to call this function to make sure
28175  * resources are released as early as possible.
28176  * Beware that due to the way that TCP works, it is possible for
28177  * recently-sent data to be lost if either you close a socket while the
28178  * %G_IO_IN condition is set, or else if the remote connection tries to
28179  * send something to you after you close the socket but before it has
28180  * finished reading all of the data you sent. There is no easy generic
28181  * way to avoid this problem; the easiest fix is to design the network
28182  * protocol such that the client will never send data "out of turn".
28183  * Another solution is for the server to half-close the connection by
28184  * calling g_socket_shutdown() with only the @shutdown_write flag set,
28185  * and then wait for the client to notice this and close its side of the
28186  * connection, after which the server can safely call g_socket_close().
28187  * (This is what #GTcpConnection does if you call
28188  * g_tcp_connection_set_graceful_disconnect(). But of course, this
28189  * only works if the client will close its connection after the server
28190  * does.)
28191  *
28192  * Returns: %TRUE on success, %FALSE on error
28193  * Since: 2.22
28194  */
28195
28196
28197 /**
28198  * g_socket_condition_check:
28199  * @socket: a #GSocket
28200  * @condition: a #GIOCondition mask to check
28201  *
28202  * Checks on the readiness of @socket to perform operations.
28203  * The operations specified in @condition are checked for and masked
28204  * against the currently-satisfied conditions on @socket. The result
28205  * is returned.
28206  * Note that on Windows, it is possible for an operation to return
28207  * %G_IO_ERROR_WOULD_BLOCK even immediately after
28208  * g_socket_condition_check() has claimed that the socket is ready for
28209  * writing. Rather than calling g_socket_condition_check() and then
28210  * writing to the socket if it succeeds, it is generally better to
28211  * simply try writing to the socket right away, and try again later if
28212  * the initial attempt returns %G_IO_ERROR_WOULD_BLOCK.
28213  * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition;
28214  * these conditions will always be set in the output if they are true.
28215  * This call never blocks.
28216  *
28217  * Returns: the @GIOCondition mask of the current state
28218  * Since: 2.22
28219  */
28220
28221
28222 /**
28223  * g_socket_condition_wait:
28224  * @socket: a #GSocket
28225  * @condition: a #GIOCondition mask to wait for
28226  * @cancellable: (allow-none): a #GCancellable, or %NULL
28227  * @error: a #GError pointer, or %NULL
28228  *
28229  * Waits for @condition to become true on @socket. When the condition
28230  * is met, %TRUE is returned.
28231  * If @cancellable is cancelled before the condition is met, or if the
28232  * socket has a timeout set and it is reached before the condition is
28233  * met, then %FALSE is returned and @error, if non-%NULL, is set to
28234  * the appropriate value (%G_IO_ERROR_CANCELLED or
28235  * %G_IO_ERROR_TIMED_OUT).
28236  *
28237  * Returns: %TRUE if the condition was met, %FALSE otherwise
28238  * Since: 2.22
28239  */
28240
28241
28242 /**
28243  * g_socket_connect:
28244  * @socket: a #GSocket.
28245  * @address: a #GSocketAddress specifying the remote address.
28246  * @cancellable: (allow-none): a %GCancellable or %NULL
28247  * @error: #GError for error reporting, or %NULL to ignore.
28248  *
28249  * Connect the socket to the specified remote address.
28250  * For connection oriented socket this generally means we attempt to make
28251  * a connection to the @address. For a connection-less socket it sets
28252  * the default address for g_socket_send() and discards all incoming datagrams
28253  * from other sources.
28254  * Generally connection oriented sockets can only connect once, but
28255  * connection-less sockets can connect multiple times to change the
28256  * default address.
28257  * If the connect call needs to do network I/O it will block, unless
28258  * non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
28259  * and the user can be notified of the connection finishing by waiting
28260  * for the G_IO_OUT condition. The result of the connection can then be
28261  * checked with g_socket_check_connect_result().
28262  *
28263  * Returns: %TRUE if connected, %FALSE on error.
28264  * Since: 2.22
28265  */
28266
28267
28268 /**
28269  * g_socket_connectable_enumerate:
28270  * @connectable: a #GSocketConnectable
28271  *
28272  * Creates a #GSocketAddressEnumerator for @connectable.
28273  *
28274  * Returns: (transfer full): a new #GSocketAddressEnumerator.
28275  * Since: 2.22
28276  */
28277
28278
28279 /**
28280  * g_socket_connectable_proxy_enumerate:
28281  * @connectable: a #GSocketConnectable
28282  *
28283  * Creates a #GSocketAddressEnumerator for @connectable that will
28284  * return #GProxyAddress<!-- -->es for addresses that you must connect
28285  * to via a proxy.
28286  * If @connectable does not implement
28287  * g_socket_connectable_proxy_enumerate(), this will fall back to
28288  * calling g_socket_connectable_enumerate().
28289  *
28290  * Returns: (transfer full): a new #GSocketAddressEnumerator.
28291  * Since: 2.26
28292  */
28293
28294
28295 /**
28296  * g_socket_connection_factory_create_connection:
28297  * @socket: a #GSocket
28298  *
28299  * Creates a #GSocketConnection subclass of the right type for
28300  *
28301  * Returns: (transfer full): a #GSocketConnection
28302  * Since: 2.22
28303  */
28304
28305
28306 /**
28307  * g_socket_connection_factory_lookup_type:
28308  * @family: a #GSocketFamily
28309  * @type: a #GSocketType
28310  * @protocol_id: a protocol id
28311  *
28312  * Looks up the #GType to be used when creating socket connections on
28313  * sockets with the specified @family,@type and @protocol_id.
28314  * If no type is registered, the #GSocketConnection base type is returned.
28315  *
28316  * Returns: a #GType
28317  * Since: 2.22
28318  */
28319
28320
28321 /**
28322  * g_socket_connection_factory_register_type:
28323  * @g_type: a #GType, inheriting from %G_TYPE_SOCKET_CONNECTION
28324  * @family: a #GSocketFamily
28325  * @type: a #GSocketType
28326  * @protocol: a protocol id
28327  *
28328  * Looks up the #GType to be used when creating socket connections on
28329  * sockets with the specified @family,@type and @protocol.
28330  * If no type is registered, the #GSocketConnection base type is returned.
28331  *
28332  * Since: 2.22
28333  */
28334
28335
28336 /**
28337  * g_socket_connection_get_local_address:
28338  * @connection: a #GSocketConnection
28339  * @error: #GError for error reporting, or %NULL to ignore.
28340  *
28341  * Try to get the local address of a socket connection.
28342  * Free the returned object with g_object_unref().
28343  *
28344  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
28345  * Since: 2.22
28346  */
28347
28348
28349 /**
28350  * g_socket_connection_get_remote_address:
28351  * @connection: a #GSocketConnection
28352  * @error: #GError for error reporting, or %NULL to ignore.
28353  *
28354  * Try to get the remote address of a socket connection.
28355  * Free the returned object with g_object_unref().
28356  *
28357  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
28358  * Since: 2.22
28359  */
28360
28361
28362 /**
28363  * g_socket_connection_get_socket:
28364  * @connection: a #GSocketConnection
28365  *
28366  * Gets the underlying #GSocket object of the connection.
28367  * This can be useful if you want to do something unusual on it
28368  * not supported by the #GSocketConnection APIs.
28369  *
28370  * Returns: (transfer none): a #GSocketAddress or %NULL on error.
28371  * Since: 2.22
28372  */
28373
28374
28375 /**
28376  * g_socket_control_message_deserialize:
28377  * @level: a socket level
28378  * @type: a socket control message type for the given @level
28379  * @size: the size of the data in bytes
28380  * @data: (array length=size) (element-type guint8): pointer to the message data
28381  *
28382  * Tries to deserialize a socket control message of a given
28383  * of #GSocketControlMessage if they can understand this kind
28384  * of message and if so deserialize it into a #GSocketControlMessage.
28385  * If there is no implementation for this kind of control message, %NULL
28386  * will be returned.
28387  *
28388  * Returns: (transfer full): the deserialized message or %NULL
28389  * Since: 2.22
28390  */
28391
28392
28393 /**
28394  * g_socket_control_message_get_level:
28395  * @message: a #GSocketControlMessage
28396  *
28397  * Returns the "level" (i.e. the originating protocol) of the control message.
28398  * This is often SOL_SOCKET.
28399  *
28400  * Returns: an integer describing the level
28401  * Since: 2.22
28402  */
28403
28404
28405 /**
28406  * g_socket_control_message_get_msg_type:
28407  * @message: a #GSocketControlMessage
28408  *
28409  * Returns the protocol specific type of the control message.
28410  * For instance, for UNIX fd passing this would be SCM_RIGHTS.
28411  *
28412  * Returns: an integer describing the type of control message
28413  * Since: 2.22
28414  */
28415
28416
28417 /**
28418  * g_socket_control_message_get_size:
28419  * @message: a #GSocketControlMessage
28420  *
28421  * Returns the space required for the control message, not including
28422  * headers or alignment.
28423  *
28424  * Returns: The number of bytes required.
28425  * Since: 2.22
28426  */
28427
28428
28429 /**
28430  * g_socket_control_message_serialize:
28431  * @message: a #GSocketControlMessage
28432  * @data: A buffer to write data to
28433  *
28434  * Converts the data in the message to bytes placed in the
28435  * message.
28436  * returned by g_socket_control_message_get_size() on this
28437  * object.
28438  *
28439  * Since: 2.22
28440  */
28441
28442
28443 /**
28444  * g_socket_create_source: (skip)
28445  * @socket: a #GSocket
28446  * @condition: a #GIOCondition mask to monitor
28447  * @cancellable: (allow-none): a %GCancellable or %NULL
28448  *
28449  * Creates a %GSource that can be attached to a %GMainContext to monitor
28450  * for the availibility of the specified @condition on the socket.
28451  * The callback on the source is of the #GSocketSourceFunc type.
28452  * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition;
28453  * these conditions will always be reported output if they are true.
28454  * cause the source to trigger, reporting the current condition (which
28455  * is likely 0 unless cancellation happened at the same time as a
28456  * condition change). You can check for this in the callback using
28457  * g_cancellable_is_cancelled().
28458  * If @socket has a timeout set, and it is reached before @condition
28459  * occurs, the source will then trigger anyway, reporting %G_IO_IN or
28460  * %G_IO_OUT depending on @condition. However, @socket will have been
28461  * marked as having had a timeout, and so the next #GSocket I/O method
28462  * you call will then fail with a %G_IO_ERROR_TIMED_OUT.
28463  *
28464  * Returns: (transfer full): a newly allocated %GSource, free with g_source_unref().
28465  * Since: 2.22
28466  */
28467
28468
28469 /**
28470  * g_socket_get_blocking:
28471  * @socket: a #GSocket.
28472  *
28473  * Gets the blocking mode of the socket. For details on blocking I/O,
28474  * see g_socket_set_blocking().
28475  *
28476  * Returns: %TRUE if blocking I/O is used, %FALSE otherwise.
28477  * Since: 2.22
28478  */
28479
28480
28481 /**
28482  * g_socket_get_credentials:
28483  * @socket: a #GSocket.
28484  * @error: #GError for error reporting, or %NULL to ignore.
28485  *
28486  * Returns the credentials of the foreign process connected to this
28487  * socket, if any (e.g. it is only supported for %G_SOCKET_FAMILY_UNIX
28488  * sockets).
28489  * If this operation isn't supported on the OS, the method fails with
28490  * the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented
28491  * by reading the %SO_PEERCRED option on the underlying socket.
28492  * Other ways to obtain credentials from a foreign peer includes the
28493  * #GUnixCredentialsMessage type and
28494  * g_unix_connection_send_credentials() /
28495  * g_unix_connection_receive_credentials() functions.
28496  * that must be freed with g_object_unref().
28497  *
28498  * Returns: (transfer full): %NULL if @error is set, otherwise a #GCredentials object
28499  * Since: 2.26
28500  */
28501
28502
28503 /**
28504  * g_socket_get_family:
28505  * @socket: a #GSocket.
28506  *
28507  * Gets the socket family of the socket.
28508  *
28509  * Returns: a #GSocketFamily
28510  * Since: 2.22
28511  */
28512
28513
28514 /**
28515  * g_socket_get_fd:
28516  * @socket: a #GSocket.
28517  *
28518  * Returns the underlying OS socket object. On unix this
28519  * is a socket file descriptor, and on windows this is
28520  * a Winsock2 SOCKET handle. This may be useful for
28521  * doing platform specific or otherwise unusual operations
28522  * on the socket.
28523  *
28524  * Returns: the file descriptor of the socket.
28525  * Since: 2.22
28526  */
28527
28528
28529 /**
28530  * g_socket_get_keepalive:
28531  * @socket: a #GSocket.
28532  *
28533  * Gets the keepalive mode of the socket. For details on this,
28534  * see g_socket_set_keepalive().
28535  *
28536  * Returns: %TRUE if keepalive is active, %FALSE otherwise.
28537  * Since: 2.22
28538  */
28539
28540
28541 /**
28542  * g_socket_get_listen_backlog:
28543  * @socket: a #GSocket.
28544  *
28545  * Gets the listen backlog setting of the socket. For details on this,
28546  * see g_socket_set_listen_backlog().
28547  *
28548  * Returns: the maximum number of pending connections.
28549  * Since: 2.22
28550  */
28551
28552
28553 /**
28554  * g_socket_get_local_address:
28555  * @socket: a #GSocket.
28556  * @error: #GError for error reporting, or %NULL to ignore.
28557  *
28558  * Try to get the local address of a bound socket. This is only
28559  * useful if the socket has been bound to a local address,
28560  * either explicitly or implicitly when connecting.
28561  * Free the returned object with g_object_unref().
28562  *
28563  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
28564  * Since: 2.22
28565  */
28566
28567
28568 /**
28569  * g_socket_get_protocol:
28570  * @socket: a #GSocket.
28571  *
28572  * Gets the socket protocol id the socket was created with.
28573  * In case the protocol is unknown, -1 is returned.
28574  *
28575  * Returns: a protocol id, or -1 if unknown
28576  * Since: 2.22
28577  */
28578
28579
28580 /**
28581  * g_socket_get_remote_address:
28582  * @socket: a #GSocket.
28583  * @error: #GError for error reporting, or %NULL to ignore.
28584  *
28585  * Try to get the remove address of a connected socket. This is only
28586  * useful for connection oriented sockets that have been connected.
28587  * Free the returned object with g_object_unref().
28588  *
28589  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
28590  * Since: 2.22
28591  */
28592
28593
28594 /**
28595  * g_socket_get_socket_type:
28596  * @socket: a #GSocket.
28597  *
28598  * Gets the socket type of the socket.
28599  *
28600  * Returns: a #GSocketType
28601  * Since: 2.22
28602  */
28603
28604
28605 /**
28606  * g_socket_get_timeout:
28607  * @socket: a #GSocket.
28608  *
28609  * Gets the timeout setting of the socket. For details on this, see
28610  * g_socket_set_timeout().
28611  *
28612  * Returns: the timeout in seconds
28613  * Since: 2.26
28614  */
28615
28616
28617 /**
28618  * g_socket_is_closed:
28619  * @socket: a #GSocket
28620  *
28621  * Checks whether a socket is closed.
28622  *
28623  * Returns: %TRUE if socket is closed, %FALSE otherwise
28624  * Since: 2.22
28625  */
28626
28627
28628 /**
28629  * g_socket_is_connected:
28630  * @socket: a #GSocket.
28631  *
28632  * Check whether the socket is connected. This is only useful for
28633  * connection-oriented sockets.
28634  *
28635  * Returns: %TRUE if socket is connected, %FALSE otherwise.
28636  * Since: 2.22
28637  */
28638
28639
28640 /**
28641  * g_socket_listen:
28642  * @socket: a #GSocket.
28643  * @error: #GError for error reporting, or %NULL to ignore.
28644  *
28645  * Marks the socket as a server socket, i.e. a socket that is used
28646  * to accept incoming requests using g_socket_accept().
28647  * Before calling this the socket must be bound to a local address using
28648  * g_socket_bind().
28649  * To set the maximum amount of outstanding clients, use
28650  * g_socket_set_listen_backlog().
28651  *
28652  * Returns: %TRUE on success, %FALSE on error.
28653  * Since: 2.22
28654  */
28655
28656
28657 /**
28658  * g_socket_listener_accept:
28659  * @listener: a #GSocketListener
28660  * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL
28661  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28662  * @error: #GError for error reporting, or %NULL to ignore.
28663  *
28664  * Blocks waiting for a client to connect to any of the sockets added
28665  * to the listener. Returns a #GSocketConnection for the socket that was
28666  * accepted.
28667  * If @source_object is not %NULL it will be filled out with the source
28668  * object specified when the corresponding socket or address was added
28669  * to the listener.
28670  * If @cancellable is not %NULL, then the operation can be cancelled by
28671  * triggering the cancellable object from another thread. If the operation
28672  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28673  *
28674  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28675  * Since: 2.22
28676  */
28677
28678
28679 /**
28680  * g_socket_listener_accept_async:
28681  * @listener: a #GSocketListener
28682  * @cancellable: (allow-none): a #GCancellable, or %NULL
28683  * @callback: (scope async): a #GAsyncReadyCallback
28684  * @user_data: (closure): user data for the callback
28685  *
28686  * This is the asynchronous version of g_socket_listener_accept().
28687  * When the operation is finished @callback will be
28688  * called. You can then call g_socket_listener_accept_socket()
28689  * to get the result of the operation.
28690  *
28691  * Since: 2.22
28692  */
28693
28694
28695 /**
28696  * g_socket_listener_accept_finish:
28697  * @listener: a #GSocketListener
28698  * @result: a #GAsyncResult.
28699  * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
28700  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28701  *
28702  * Finishes an async accept operation. See g_socket_listener_accept_async()
28703  *
28704  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28705  * Since: 2.22
28706  */
28707
28708
28709 /**
28710  * g_socket_listener_accept_socket:
28711  * @listener: a #GSocketListener
28712  * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL.
28713  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28714  * @error: #GError for error reporting, or %NULL to ignore.
28715  *
28716  * Blocks waiting for a client to connect to any of the sockets added
28717  * to the listener. Returns the #GSocket that was accepted.
28718  * If you want to accept the high-level #GSocketConnection, not a #GSocket,
28719  * which is often the case, then you should use g_socket_listener_accept()
28720  * instead.
28721  * If @source_object is not %NULL it will be filled out with the source
28722  * object specified when the corresponding socket or address was added
28723  * to the listener.
28724  * If @cancellable is not %NULL, then the operation can be cancelled by
28725  * triggering the cancellable object from another thread. If the operation
28726  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28727  *
28728  * Returns: (transfer full): a #GSocket on success, %NULL on error.
28729  * Since: 2.22
28730  */
28731
28732
28733 /**
28734  * g_socket_listener_accept_socket_async:
28735  * @listener: a #GSocketListener
28736  * @cancellable: (allow-none): a #GCancellable, or %NULL
28737  * @callback: (scope async): a #GAsyncReadyCallback
28738  * @user_data: (closure): user data for the callback
28739  *
28740  * This is the asynchronous version of g_socket_listener_accept_socket().
28741  * When the operation is finished @callback will be
28742  * called. You can then call g_socket_listener_accept_socket_finish()
28743  * to get the result of the operation.
28744  *
28745  * Since: 2.22
28746  */
28747
28748
28749 /**
28750  * g_socket_listener_accept_socket_finish:
28751  * @listener: a #GSocketListener
28752  * @result: a #GAsyncResult.
28753  * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
28754  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28755  *
28756  * Finishes an async accept operation. See g_socket_listener_accept_socket_async()
28757  *
28758  * Returns: (transfer full): a #GSocket on success, %NULL on error.
28759  * Since: 2.22
28760  */
28761
28762
28763 /**
28764  * g_socket_listener_add_address:
28765  * @listener: a #GSocketListener
28766  * @address: a #GSocketAddress
28767  * @type: a #GSocketType
28768  * @protocol: a #GSocketProtocol
28769  * @source_object: (allow-none): Optional #GObject identifying this source
28770  * @effective_address: (out) (allow-none): location to store the address that was bound to, or %NULL.
28771  * @error: #GError for error reporting, or %NULL to ignore.
28772  *
28773  * Creates a socket of type @type and protocol @protocol, binds
28774  * it to @address and adds it to the set of sockets we're accepting
28775  * sockets from.
28776  * Note that adding an IPv6 address, depending on the platform,
28777  * may or may not result in a listener that also accepts IPv4
28778  * connections.  For more determinstic behaviour, see
28779  * g_socket_listener_add_inet_port().
28780  * to accept to identify this particular source, which is
28781  * useful if you're listening on multiple addresses and do
28782  * different things depending on what address is connected to.
28783  * If successful and @effective_address is non-%NULL then it will
28784  * be set to the address that the binding actually occured at.  This
28785  * is helpful for determining the port number that was used for when
28786  * requested, belongs to the caller and must be freed.
28787  *
28788  * Requesting a binding to port 0 (ie: "any port").  This address, if
28789  * Returns: %TRUE on success, %FALSE on error.
28790  * Since: 2.22
28791  */
28792
28793
28794 /**
28795  * g_socket_listener_add_any_inet_port:
28796  * @listener: a #GSocketListener
28797  * @source_object: (allow-none): Optional #GObject identifying this source
28798  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28799  *
28800  * Listens for TCP connections on any available port number for both
28801  * IPv6 and IPv4 (if each are available).
28802  * This is useful if you need to have a socket for incoming connections
28803  * but don't care about the specific port number.
28804  * to accept to identify this particular source, which is
28805  * useful if you're listening on multiple addresses and do
28806  * different things depending on what address is connected to.
28807  *
28808  * Returns: the port number, or 0 in case of failure.
28809  * Since: 2.24
28810  */
28811
28812
28813 /**
28814  * g_socket_listener_add_inet_port:
28815  * @listener: a #GSocketListener
28816  * @port: an IP port number (non-zero)
28817  * @source_object: (allow-none): Optional #GObject identifying this source
28818  * @error: #GError for error reporting, or %NULL to ignore.
28819  *
28820  * Helper function for g_socket_listener_add_address() that
28821  * creates a TCP/IP socket listening on IPv4 and IPv6 (if
28822  * supported) on the specified port on all interfaces.
28823  * to accept to identify this particular source, which is
28824  * useful if you're listening on multiple addresses and do
28825  * different things depending on what address is connected to.
28826  *
28827  * Returns: %TRUE on success, %FALSE on error.
28828  * Since: 2.22
28829  */
28830
28831
28832 /**
28833  * g_socket_listener_add_socket:
28834  * @listener: a #GSocketListener
28835  * @socket: a listening #GSocket
28836  * @source_object: (allow-none): Optional #GObject identifying this source
28837  * @error: #GError for error reporting, or %NULL to ignore.
28838  *
28839  * Adds @socket to the set of sockets that we try to accept
28840  * new clients from. The socket must be bound to a local
28841  * address and listened to.
28842  * to accept to identify this particular source, which is
28843  * useful if you're listening on multiple addresses and do
28844  * different things depending on what address is connected to.
28845  *
28846  * Returns: %TRUE on success, %FALSE on error.
28847  * Since: 2.22
28848  */
28849
28850
28851 /**
28852  * g_socket_listener_close:
28853  * @listener: a #GSocketListener
28854  *
28855  * Closes all the sockets in the listener.
28856  *
28857  * Since: 2.22
28858  */
28859
28860
28861 /**
28862  * g_socket_listener_new:
28863  *
28864  * Creates a new #GSocketListener with no sockets to listen for.
28865  * New listeners can be added with e.g. g_socket_listener_add_address()
28866  * or g_socket_listener_add_inet_port().
28867  *
28868  * Returns: a new #GSocketListener.
28869  * Since: 2.22
28870  */
28871
28872
28873 /**
28874  * g_socket_listener_set_backlog:
28875  * @listener: a #GSocketListener
28876  * @listen_backlog: an integer
28877  *
28878  * Sets the listen backlog on the sockets in the listener.
28879  * See g_socket_set_listen_backlog() for details
28880  *
28881  * Since: 2.22
28882  */
28883
28884
28885 /**
28886  * g_socket_new:
28887  * @family: the socket family to use, e.g. %G_SOCKET_FAMILY_IPV4.
28888  * @type: the socket type to use.
28889  * @protocol: the id of the protocol to use, or 0 for default.
28890  * @error: #GError for error reporting, or %NULL to ignore.
28891  *
28892  * Creates a new #GSocket with the defined family, type and protocol.
28893  * If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type
28894  * for the family and type is used.
28895  * The @protocol is a family and type specific int that specifies what
28896  * kind of protocol to use. #GSocketProtocol lists several common ones.
28897  * Many families only support one protocol, and use 0 for this, others
28898  * support several and using 0 means to use the default protocol for
28899  * the family and type.
28900  * The protocol id is passed directly to the operating
28901  * system, so you can use protocols not listed in #GSocketProtocol if you
28902  * know the protocol number used for it.
28903  * Free the returned object with g_object_unref().
28904  *
28905  * Returns: a #GSocket or %NULL on error.
28906  * Since: 2.22
28907  */
28908
28909
28910 /**
28911  * g_socket_new_from_fd:
28912  * @fd: a native socket file descriptor.
28913  * @error: #GError for error reporting, or %NULL to ignore.
28914  *
28915  * Creates a new #GSocket from a native file descriptor
28916  * or winsock SOCKET handle.
28917  * This reads all the settings from the file descriptor so that
28918  * all properties should work. Note that the file descriptor
28919  * will be set to non-blocking mode, independent on the blocking
28920  * mode of the #GSocket.
28921  * Free the returned object with g_object_unref().
28922  *
28923  * Returns: a #GSocket or %NULL on error.
28924  * Since: 2.22
28925  */
28926
28927
28928 /**
28929  * g_socket_receive:
28930  * @socket: a #GSocket
28931  * @buffer: a buffer to read data into (which should be at least @size bytes long).
28932  * @size: the number of bytes you want to read from the socket
28933  * @cancellable: (allow-none): a %GCancellable or %NULL
28934  * @error: #GError for error reporting, or %NULL to ignore.
28935  *
28936  * Receive data (up to @size bytes) from a socket. This is mainly used by
28937  * connection-oriented sockets; it is identical to g_socket_receive_from()
28938  * with @address set to %NULL.
28939  * For %G_SOCKET_TYPE_DATAGRAM and %G_SOCKET_TYPE_SEQPACKET sockets,
28940  * g_socket_receive() will always read either 0 or 1 complete messages from
28941  * the socket. If the received message is too large to fit in @buffer, then
28942  * the data beyond @size bytes will be discarded, without any explicit
28943  * indication that this has occurred.
28944  * For %G_SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any
28945  * number of bytes, up to @size. If more than @size bytes have been
28946  * received, the additional data will be returned in future calls to
28947  * g_socket_receive().
28948  * If the socket is in blocking mode the call will block until there is
28949  * some data to receive or there is an error. If there is no data available
28950  * and the socket is in non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error
28951  * will be returned. To be notified when data is available, wait for the
28952  * %G_IO_IN condition.
28953  * On error -1 is returned and @error is set accordingly.
28954  *
28955  * Returns: Number of bytes read, or -1 on error
28956  * Since: 2.22
28957  */
28958
28959
28960 /**
28961  * g_socket_receive_from:
28962  * @socket: a #GSocket
28963  * @address: a pointer to a #GSocketAddress pointer, or %NULL
28964  * @buffer: a buffer to read data into (which should be at least @size bytes long).
28965  * @size: the number of bytes you want to read from the socket
28966  * @cancellable: (allow-none): a %GCancellable or %NULL
28967  * @error: #GError for error reporting, or %NULL to ignore.
28968  *
28969  * Receive data (up to @size bytes) from a socket.
28970  * If @address is non-%NULL then @address will be set equal to the
28971  * source address of the received packet.
28972  * See g_socket_receive() for additional information.
28973  *
28974  * Returns: Number of bytes read, or -1 on error
28975  * Since: 2.22
28976  */
28977
28978
28979 /**
28980  * g_socket_receive_message:
28981  * @socket: a #GSocket
28982  * @address: a pointer to a #GSocketAddress pointer, or %NULL
28983  * @vectors: (array length=num_vectors): an array of #GInputVector structs
28984  * @num_vectors: the number of elements in @vectors, or -1
28985  * @messages: (array length=num_messages) (allow-none): a pointer which may be filled with an array of #GSocketControlMessages, or %NULL
28986  * @num_messages: a pointer which will be filled with the number of elements in @messages, or %NULL
28987  * @flags: a pointer to an int containing #GSocketMsgFlags flags
28988  * @cancellable: (allow-none): a %GCancellable or %NULL
28989  * @error: a #GError pointer, or %NULL
28990  *
28991  * Receive data from a socket.  This is the most complicated and
28992  * fully-featured version of this call. For easier use, see
28993  * g_socket_receive() and g_socket_receive_from().
28994  * If @address is non-%NULL then @address will be set equal to the
28995  * source address of the received packet.
28996  * describe the buffers that received data will be scattered into.
28997  * If @num_vectors is -1, then @vectors is assumed to be terminated
28998  * by a #GInputVector with a %NULL buffer pointer.
28999  * As a special case, if @num_vectors is 0 (in which case, @vectors
29000  * may of course be %NULL), then a single byte is received and
29001  * discarded. This is to facilitate the common practice of sending a
29002  * single '\0' byte for the purposes of transferring ancillary data.
29003  * array of #GSocketControlMessage instances or %NULL if no such
29004  * messages was received. These correspond to the control messages
29005  * received from the kernel, one #GSocketControlMessage per message
29006  * from the kernel. This array is %NULL-terminated and must be freed
29007  * by the caller using g_free() after calling g_object_unref() on each
29008  * element. If @messages is %NULL, any control messages received will
29009  * be discarded.
29010  * messages received.
29011  * If both @messages and @num_messages are non-%NULL, then
29012  * for this are available in the #GSocketMsgFlags enum, but the
29013  * values there are the same as the system values, and the flags
29014  * are passed in as-is, so you can pass in system-specific flags too
29015  * (and g_socket_receive_message() may pass system-specific flags out).
29016  * As with g_socket_receive(), data may be discarded if @socket is
29017  * %G_SOCKET_TYPE_DATAGRAM or %G_SOCKET_TYPE_SEQPACKET and you do not
29018  * provide enough buffer space to read a complete message. You can pass
29019  * %G_SOCKET_MSG_PEEK in @flags to peek at the current message without
29020  * removing it from the receive queue, but there is no portable way to find
29021  * out the length of the message other than by reading it into a
29022  * sufficiently-large buffer.
29023  * If the socket is in blocking mode the call will block until there
29024  * is some data to receive or there is an error. If there is no data
29025  * available and the socket is in non-blocking mode, a
29026  * %G_IO_ERROR_WOULD_BLOCK error will be returned. To be notified when
29027  * data is available, wait for the %G_IO_IN condition.
29028  * On error -1 is returned and @error is set accordingly.
29029  *
29030  * In @messages (ie: not including the %NULL terminator).
29031  * Returns: Number of bytes read, or -1 on error
29032  * Since: 2.22
29033  */
29034
29035
29036 /**
29037  * g_socket_receive_with_blocking:
29038  * @socket: a #GSocket
29039  * @buffer: a buffer to read data into (which should be at least @size bytes long).
29040  * @size: the number of bytes you want to read from the socket
29041  * @blocking: whether to do blocking or non-blocking I/O
29042  * @cancellable: (allow-none): a %GCancellable or %NULL
29043  * @error: #GError for error reporting, or %NULL to ignore.
29044  *
29045  * This behaves exactly the same as g_socket_receive(), except that
29046  * the choice of blocking or non-blocking behavior is determined by
29047  * the @blocking argument rather than by @socket's properties.
29048  *
29049  * Returns: Number of bytes read, or -1 on error
29050  * Since: 2.26
29051  */
29052
29053
29054 /**
29055  * g_socket_send:
29056  * @socket: a #GSocket
29057  * @buffer: (array length=size): the buffer containing the data to send.
29058  * @size: the number of bytes to send
29059  * @cancellable: (allow-none): a %GCancellable or %NULL
29060  * @error: #GError for error reporting, or %NULL to ignore.
29061  *
29062  * Tries to send @size bytes from @buffer on the socket. This is
29063  * mainly used by connection-oriented sockets; it is identical to
29064  * g_socket_send_to() with @address set to %NULL.
29065  * If the socket is in blocking mode the call will block until there is
29066  * space for the data in the socket queue. If there is no space available
29067  * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
29068  * will be returned. To be notified when space is available, wait for the
29069  * %G_IO_OUT condition. Note though that you may still receive
29070  * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
29071  * notified of a %G_IO_OUT condition. (On Windows in particular, this is
29072  * very common due to the way the underlying APIs work.)
29073  * On error -1 is returned and @error is set accordingly.
29074  * on error
29075  *
29076  * Returns: Number of bytes written (which may be less than @size), or -1
29077  * Since: 2.22
29078  */
29079
29080
29081 /**
29082  * g_socket_send_message:
29083  * @socket: a #GSocket
29084  * @address: a #GSocketAddress, or %NULL
29085  * @vectors: (array length=num_vectors): an array of #GOutputVector structs
29086  * @num_vectors: the number of elements in @vectors, or -1
29087  * @messages: (array length=num_messages) (allow-none): a pointer to an array of #GSocketControlMessages, or %NULL.
29088  * @num_messages: number of elements in @messages, or -1.
29089  * @flags: an int containing #GSocketMsgFlags flags
29090  * @cancellable: (allow-none): a %GCancellable or %NULL
29091  * @error: #GError for error reporting, or %NULL to ignore.
29092  *
29093  * Send data to @address on @socket.  This is the most complicated and
29094  * fully-featured version of this call. For easier use, see
29095  * g_socket_send() and g_socket_send_to().
29096  * If @address is %NULL then the message is sent to the default receiver
29097  * (set by g_socket_connect()).
29098  * then @vectors is assumed to be terminated by a #GOutputVector with a
29099  * %NULL buffer pointer.) The #GOutputVector structs describe the buffers
29100  * that the sent data will be gathered from. Using multiple
29101  * #GOutputVector<!-- -->s is more memory-efficient than manually copying
29102  * data from multiple sources into a single buffer, and more
29103  * network-efficient than making multiple calls to g_socket_send().
29104  * #GSocketControlMessage instances. These correspond to the control
29105  * messages to be sent on the socket.
29106  * If @num_messages is -1 then @messages is treated as a %NULL-terminated
29107  * array.
29108  * for this are available in the #GSocketMsgFlags enum, but the
29109  * values there are the same as the system values, and the flags
29110  * are passed in as-is, so you can pass in system-specific flags too.
29111  * If the socket is in blocking mode the call will block until there is
29112  * space for the data in the socket queue. If there is no space available
29113  * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
29114  * will be returned. To be notified when space is available, wait for the
29115  * %G_IO_OUT condition. Note though that you may still receive
29116  * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
29117  * notified of a %G_IO_OUT condition. (On Windows in particular, this is
29118  * very common due to the way the underlying APIs work.)
29119  * On error -1 is returned and @error is set accordingly.
29120  * on error
29121  *
29122  * Returns: Number of bytes written (which may be less than @size), or -1
29123  * Since: 2.22
29124  */
29125
29126
29127 /**
29128  * g_socket_send_to:
29129  * @socket: a #GSocket
29130  * @address: a #GSocketAddress, or %NULL
29131  * @buffer: (array length=size): the buffer containing the data to send.
29132  * @size: the number of bytes to send
29133  * @cancellable: (allow-none): a %GCancellable or %NULL
29134  * @error: #GError for error reporting, or %NULL to ignore.
29135  *
29136  * Tries to send @size bytes from @buffer to @address. If @address is
29137  * %NULL then the message is sent to the default receiver (set by
29138  * g_socket_connect()).
29139  * See g_socket_send() for additional information.
29140  * on error
29141  *
29142  * Returns: Number of bytes written (which may be less than @size), or -1
29143  * Since: 2.22
29144  */
29145
29146
29147 /**
29148  * g_socket_send_with_blocking:
29149  * @socket: a #GSocket
29150  * @buffer: (array length=size): the buffer containing the data to send.
29151  * @size: the number of bytes to send
29152  * @blocking: whether to do blocking or non-blocking I/O
29153  * @cancellable: (allow-none): a %GCancellable or %NULL
29154  * @error: #GError for error reporting, or %NULL to ignore.
29155  *
29156  * This behaves exactly the same as g_socket_send(), except that
29157  * the choice of blocking or non-blocking behavior is determined by
29158  * the @blocking argument rather than by @socket's properties.
29159  * on error
29160  *
29161  * Returns: Number of bytes written (which may be less than @size), or -1
29162  * Since: 2.26
29163  */
29164
29165
29166 /**
29167  * g_socket_service_is_active:
29168  * @service: a #GSocketService
29169  *
29170  * Check whether the service is active or not. An active
29171  * service will accept new clients that connect, while
29172  * a non-active service will let connecting clients queue
29173  * up until the service is started.
29174  *
29175  * Returns: %TRUE if the service is active, %FALSE otherwise
29176  * Since: 2.22
29177  */
29178
29179
29180 /**
29181  * g_socket_service_new:
29182  *
29183  * Creates a new #GSocketService with no sockets to listen for.
29184  * New listeners can be added with e.g. g_socket_listener_add_address()
29185  * or g_socket_listener_add_inet_port().
29186  *
29187  * Returns: a new #GSocketService.
29188  * Since: 2.22
29189  */
29190
29191
29192 /**
29193  * g_socket_service_start:
29194  * @service: a #GSocketService
29195  *
29196  * Starts the service, i.e. start accepting connections
29197  * from the added sockets when the mainloop runs.
29198  * This call is threadsafe, so it may be called from a thread
29199  * handling an incomming client request.
29200  *
29201  * Since: 2.22
29202  */
29203
29204
29205 /**
29206  * g_socket_service_stop:
29207  * @service: a #GSocketService
29208  *
29209  * Stops the service, i.e. stops accepting connections
29210  * from the added sockets when the mainloop runs.
29211  * This call is threadsafe, so it may be called from a thread
29212  * handling an incomming client request.
29213  *
29214  * Since: 2.22
29215  */
29216
29217
29218 /**
29219  * g_socket_set_blocking:
29220  * @socket: a #GSocket.
29221  * @blocking: Whether to use blocking I/O or not.
29222  *
29223  * Sets the blocking mode of the socket. In blocking mode
29224  * all operations block until they succeed or there is an error. In
29225  * non-blocking mode all functions return results immediately or
29226  * with a %G_IO_ERROR_WOULD_BLOCK error.
29227  * All sockets are created in blocking mode. However, note that the
29228  * platform level socket is always non-blocking, and blocking mode
29229  * is a GSocket level feature.
29230  *
29231  * Since: 2.22
29232  */
29233
29234
29235 /**
29236  * g_socket_set_keepalive:
29237  * @socket: a #GSocket.
29238  * @keepalive: Value for the keepalive flag
29239  *
29240  * Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When
29241  * this flag is set on a socket, the system will attempt to verify that the
29242  * remote socket endpoint is still present if a sufficiently long period of
29243  * time passes with no data being exchanged. If the system is unable to
29244  * verify the presence of the remote endpoint, it will automatically close
29245  * the connection.
29246  * This option is only functional on certain kinds of sockets. (Notably,
29247  * %G_SOCKET_PROTOCOL_TCP sockets.)
29248  * The exact time between pings is system- and protocol-dependent, but will
29249  * normally be at least two hours. Most commonly, you would set this flag
29250  * on a server socket if you want to allow clients to remain idle for long
29251  * periods of time, but also want to ensure that connections are eventually
29252  * garbage-collected if clients crash or become unreachable.
29253  *
29254  * Since: 2.22
29255  */
29256
29257
29258 /**
29259  * g_socket_set_listen_backlog:
29260  * @socket: a #GSocket.
29261  * @backlog: the maximum number of pending connections.
29262  *
29263  * Sets the maximum number of outstanding connections allowed
29264  * when listening on this socket. If more clients than this are
29265  * connecting to the socket and the application is not handling them
29266  * on time then the new connections will be refused.
29267  * Note that this must be called before g_socket_listen() and has no
29268  * effect if called after that.
29269  *
29270  * Since: 2.22
29271  */
29272
29273
29274 /**
29275  * g_socket_set_timeout:
29276  * @socket: a #GSocket.
29277  * @timeout: the timeout for @socket, in seconds, or 0 for none
29278  *
29279  * Sets the time in seconds after which I/O operations on @socket will
29280  * time out if they have not yet completed.
29281  * On a blocking socket, this means that any blocking #GSocket
29282  * operation will time out after @timeout seconds of inactivity,
29283  * returning %G_IO_ERROR_TIMED_OUT.
29284  * On a non-blocking socket, calls to g_socket_condition_wait() will
29285  * also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources
29286  * created with g_socket_create_source() will trigger after
29287  * set, at which point calling g_socket_receive(), g_socket_send(),
29288  * g_socket_check_connect_result(), etc, will fail with
29289  * %G_IO_ERROR_TIMED_OUT.
29290  * If @timeout is 0 (the default), operations will never time out
29291  * on their own.
29292  * Note that if an I/O operation is interrupted by a signal, this may
29293  * cause the timeout to be reset.
29294  *
29295  * Since: 2.26
29296  */
29297
29298
29299 /**
29300  * g_socket_shutdown:
29301  * @socket: a #GSocket
29302  * @shutdown_read: whether to shut down the read side
29303  * @shutdown_write: whether to shut down the write side
29304  * @error: #GError for error reporting, or %NULL to ignore.
29305  *
29306  * Shut down part of a full-duplex connection.
29307  * If @shutdown_read is %TRUE then the recieving side of the connection
29308  * is shut down, and further reading is disallowed.
29309  * If @shutdown_write is %TRUE then the sending side of the connection
29310  * is shut down, and further writing is disallowed.
29311  * It is allowed for both @shutdown_read and @shutdown_write to be %TRUE.
29312  * One example where this is used is graceful disconnect for TCP connections
29313  * where you close the sending side, then wait for the other side to close
29314  * the connection, thus ensuring that the other side saw all sent data.
29315  *
29316  * Returns: %TRUE on success, %FALSE on error
29317  * Since: 2.22
29318  */
29319
29320
29321 /**
29322  * g_socket_speaks_ipv4:
29323  * @socket: a #GSocket
29324  *
29325  * Checks if a socket is capable of speaking IPv4.
29326  * IPv4 sockets are capable of speaking IPv4.  On some operating systems
29327  * and under some combinations of circumstances IPv6 sockets are also
29328  * capable of speaking IPv4.  See RFC 3493 section 3.7 for more
29329  * information.
29330  * No other types of sockets are currently considered as being capable
29331  * of speaking IPv4.
29332  *
29333  * Returns: %TRUE if this socket can be used with IPv4.
29334  * Since: 2.22
29335  */
29336
29337
29338 /**
29339  * g_srv_target_copy:
29340  * @target: a #GSrvTarget
29341  *
29342  * Copies @target
29343  *
29344  * Returns: a copy of @target
29345  * Since: 2.22
29346  */
29347
29348
29349 /**
29350  * g_srv_target_free:
29351  * @target: a #GSrvTarget
29352  *
29353  * Frees @target
29354  *
29355  * Since: 2.22
29356  */
29357
29358
29359 /**
29360  * g_srv_target_get_hostname:
29361  * @target: a #GSrvTarget
29362  *
29363  * Gets @target's hostname (in ASCII form; if you are going to present
29364  * this to the user, you should use g_hostname_is_ascii_encoded() to
29365  * check if it contains encoded Unicode segments, and use
29366  * g_hostname_to_unicode() to convert it if it does.)
29367  *
29368  * Returns: @target's hostname
29369  * Since: 2.22
29370  */
29371
29372
29373 /**
29374  * g_srv_target_get_port:
29375  * @target: a #GSrvTarget
29376  *
29377  * Gets @target's port
29378  *
29379  * Returns: @target's port
29380  * Since: 2.22
29381  */
29382
29383
29384 /**
29385  * g_srv_target_get_priority:
29386  * @target: a #GSrvTarget
29387  *
29388  * Gets @target's priority. You should not need to look at this;
29389  * #GResolver already sorts the targets according to the algorithm in
29390  * RFC 2782.
29391  *
29392  * Returns: @target's priority
29393  * Since: 2.22
29394  */
29395
29396
29397 /**
29398  * g_srv_target_get_weight:
29399  * @target: a #GSrvTarget
29400  *
29401  * Gets @target's weight. You should not need to look at this;
29402  * #GResolver already sorts the targets according to the algorithm in
29403  * RFC 2782.
29404  *
29405  * Returns: @target's weight
29406  * Since: 2.22
29407  */
29408
29409
29410 /**
29411  * g_srv_target_list_sort: (skip)
29412  * @targets: a #GList of #GSrvTarget
29413  *
29414  * Sorts @targets in place according to the algorithm in RFC 2782.
29415  *
29416  * Returns: (transfer full): the head of the sorted list.
29417  * Since: 2.22
29418  */
29419
29420
29421 /**
29422  * g_srv_target_new:
29423  * @hostname: the host that the service is running on
29424  * @port: the port that the service is running on
29425  * @priority: the target's priority
29426  * @weight: the target's weight
29427  *
29428  * Creates a new #GSrvTarget with the given parameters.
29429  * You should not need to use this; normally #GSrvTarget<!-- -->s are
29430  * created by #GResolver.
29431  *
29432  * Returns: a new #GSrvTarget.
29433  * Since: 2.22
29434  */
29435
29436
29437 /**
29438  * g_tcp_connection_get_graceful_disconnect:
29439  * @connection: a #GTcpConnection
29440  *
29441  * Checks if graceful disconnects are used. See
29442  * g_tcp_connection_set_graceful_disconnect().
29443  *
29444  * Returns: %TRUE if graceful disconnect is used on close, %FALSE otherwise
29445  * Since: 2.22
29446  */
29447
29448
29449 /**
29450  * g_tcp_connection_set_graceful_disconnect:
29451  * @connection: a #GTcpConnection
29452  * @graceful_disconnect: Whether to do graceful disconnects or not
29453  *
29454  * This enabled graceful disconnects on close. A graceful disconnect
29455  * means that we signal the recieving end that the connection is terminated
29456  * and wait for it to close the connection before closing the connection.
29457  * A graceful disconnect means that we can be sure that we successfully sent
29458  * all the outstanding data to the other end, or get an error reported.
29459  * However, it also means we have to wait for all the data to reach the
29460  * other side and for it to acknowledge this by closing the socket, which may
29461  * take a while. For this reason it is disabled by default.
29462  *
29463  * Since: 2.22
29464  */
29465
29466
29467 /**
29468  * g_tcp_wrapper_connection_get_base_io_stream:
29469  * @conn: a #GTcpWrapperConnection
29470  *
29471  * Get's @conn's base #GIOStream
29472  *
29473  * Returns: (transfer none): @conn's base #GIOStream
29474  */
29475
29476
29477 /**
29478  * g_tcp_wrapper_connection_new:
29479  * @base_io_stream: the #GIOStream to wrap
29480  * @socket: the #GSocket associated with @base_io_stream
29481  *
29482  * Wraps @base_io_stream and @socket together as a #GSocketConnection.
29483  *
29484  * Returns: the new #GSocketConnection.
29485  * Since: 2.28
29486  */
29487
29488
29489 /**
29490  * g_themed_icon_append_name:
29491  * @icon: a #GThemedIcon
29492  * @iconname: name of icon to append to list of icons from within @icon.
29493  *
29494  * Append a name to the list of icons from within @icon.
29495  * <note><para>
29496  * Note that doing so invalidates the hash computed by prior calls
29497  * to g_icon_hash().
29498  * </para></note>
29499  */
29500
29501
29502 /**
29503  * g_themed_icon_get_names:
29504  * @icon: a #GThemedIcon.
29505  *
29506  * Gets the names of icons from within @icon.
29507  *
29508  * Returns: (transfer none): a list of icon names.
29509  */
29510
29511
29512 /**
29513  * g_themed_icon_new:
29514  * @iconname: a string containing an icon name.
29515  *
29516  * Creates a new themed icon for @iconname.
29517  *
29518  * Returns: (transfer full): a new #GThemedIcon.
29519  */
29520
29521
29522 /**
29523  * g_themed_icon_new_from_names:
29524  * @iconnames: (array length=len): an array of strings containing icon names.
29525  * @len: the length of the @iconnames array, or -1 if @iconnames is %NULL-terminated
29526  *
29527  * Creates a new themed icon for @iconnames.
29528  *
29529  * Returns: (transfer full): a new #GThemedIcon
29530  */
29531
29532
29533 /**
29534  * g_themed_icon_new_with_default_fallbacks:
29535  * @iconname: a string containing an icon name
29536  *
29537  * Creates a new themed icon for @iconname, and all the names
29538  * that can be created by shortening @iconname at '-' characters.
29539  * In the following example, @icon1 and @icon2 are equivalent:
29540  * |[
29541  * const char *names[] = {
29542  * "gnome-dev-cdrom-audio",
29543  * "gnome-dev-cdrom",
29544  * "gnome-dev",
29545  * "gnome"
29546  * };
29547  * icon1 = g_themed_icon_new_from_names (names, 4);
29548  * icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
29549  * ]|
29550  *
29551  * Returns: (transfer full): a new #GThemedIcon.
29552  */
29553
29554
29555 /**
29556  * g_themed_icon_prepend_name:
29557  * @icon: a #GThemedIcon
29558  * @iconname: name of icon to prepend to list of icons from within @icon.
29559  *
29560  * Prepend a name to the list of icons from within @icon.
29561  * <note><para>
29562  * Note that doing so invalidates the hash computed by prior calls
29563  * to g_icon_hash().
29564  * </para></note>
29565  *
29566  * Since: 2.18
29567  */
29568
29569
29570 /**
29571  * g_threaded_socket_service_new:
29572  * @max_threads: the maximal number of threads to execute concurrently handling incoming clients, -1 means no limit
29573  *
29574  * Creates a new #GThreadedSocketService with no listeners. Listeners
29575  * must be added with g_socket_service_add_listeners().
29576  *
29577  * Returns: a new #GSocketService.
29578  * Since: 2.22
29579  */
29580
29581
29582 /**
29583  * g_tls_backend_get_certificate_type:
29584  * @backend: the #GTlsBackend
29585  *
29586  * Gets the #GType of @backend's #GTlsCertificate implementation.
29587  * implementation.
29588  *
29589  * Returns: the #GType of @backend's #GTlsCertificate
29590  * Since: 2.28
29591  */
29592
29593
29594 /**
29595  * g_tls_backend_get_client_connection_type:
29596  * @backend: the #GTlsBackend
29597  *
29598  * Gets the #GType of @backend's #GTlsClientConnection implementation.
29599  * implementation.
29600  *
29601  * Returns: the #GType of @backend's #GTlsClientConnection
29602  * Since: 2.28
29603  */
29604
29605
29606 /**
29607  * g_tls_backend_get_default:
29608  *
29609  * Gets the default #GTlsBackend for the system.
29610  *
29611  * Returns: a #GTlsBackend
29612  * Since: 2.28
29613  */
29614
29615
29616 /**
29617  * g_tls_backend_get_server_connection_type:
29618  * @backend: the #GTlsBackend
29619  *
29620  * Gets the #GType of @backend's #GTlsServerConnection implementation.
29621  * implementation.
29622  *
29623  * Returns: the #GType of @backend's #GTlsServerConnection
29624  * Since: 2.28
29625  */
29626
29627
29628 /**
29629  * g_tls_backend_supports_tls:
29630  * @backend: the #GTlsBackend
29631  *
29632  * Checks if TLS is supported; if this returns %FALSE for the default
29633  * #GTlsBackend, it means no "real" TLS backend is available.
29634  *
29635  * Returns: whether or not TLS is supported
29636  * Since: 2.28
29637  */
29638
29639
29640 /**
29641  * g_tls_certificate_get_issuer:
29642  * @cert: a #GTlsCertificate
29643  *
29644  * Gets the #GTlsCertificate representing @cert's issuer, if known
29645  * or %NULL if @cert is self-signed or signed with an unknown
29646  * certificate.
29647  *
29648  * Returns: (transfer none): The certificate of @cert's issuer,
29649  * Since: 2.28
29650  */
29651
29652
29653 /**
29654  * g_tls_certificate_list_new_from_file:
29655  * @file: file containing PEM-encoded certificates to import
29656  * @error: #GError for error reporting, or %NULL to ignore.
29657  *
29658  * Creates one or more #GTlsCertificate<!-- -->s from the PEM-encoded
29659  * data in @file. If @file cannot be read or parsed, the function will
29660  * return %NULL and set @error. If @file does not contain any
29661  * PEM-encoded certificates, this will return an empty list and not
29662  * set @error.
29663  * #GList containing #GTlsCertificate objects. You must free the list
29664  * and its contents when you are done with it.
29665  *
29666  * Returns: (element-type Gio.TlsCertificate) (transfer full): a
29667  * Since: 2.28
29668  */
29669
29670
29671 /**
29672  * g_tls_certificate_new_from_file:
29673  * @file: file containing a PEM-encoded certificate to import
29674  * @error: #GError for error reporting, or %NULL to ignore.
29675  *
29676  * Creates a #GTlsCertificate from the PEM-encoded data in @file. If
29677  * set @error. Otherwise, this behaves like g_tls_certificate_new().
29678  *
29679  * Returns: the new certificate, or %NULL on error
29680  * Since: 2.28
29681  */
29682
29683
29684 /**
29685  * g_tls_certificate_new_from_files:
29686  * @cert_file: file containing a PEM-encoded certificate to import
29687  * @key_file: file containing a PEM-encoded private key to import
29688  * @error: #GError for error reporting, or %NULL to ignore.
29689  *
29690  * Creates a #GTlsCertificate from the PEM-encoded data in @cert_file
29691  * and @key_file. If either file cannot be read or parsed, the
29692  * function will return %NULL and set @error. Otherwise, this behaves
29693  * like g_tls_certificate_new().
29694  *
29695  * Returns: the new certificate, or %NULL on error
29696  * Since: 2.28
29697  */
29698
29699
29700 /**
29701  * g_tls_certificate_new_from_pem:
29702  * @data: PEM-encoded certificate data
29703  * @length: the length of @data, or -1 if it's 0-terminated.
29704  * @error: #GError for error reporting, or %NULL to ignore.
29705  *
29706  * Creates a new #GTlsCertificate from the PEM-encoded data in @data.
29707  * If @data includes both a certificate and a private key, then the
29708  * returned certificate will include the private key data as well.
29709  * If @data includes multiple certificates, only the first one will be
29710  * parsed.
29711  *
29712  * Returns: the new certificate, or %NULL if @data is invalid
29713  * Since: 2.28
29714  */
29715
29716
29717 /**
29718  * g_tls_certificate_verify:
29719  * @cert: a #GTlsCertificate
29720  * @identity: (allow-none): the expected peer identity
29721  * @trusted_ca: (allow-none): the certificate of a trusted authority
29722  *
29723  * This verifies @cert and returns a set of #GTlsCertificateFlags
29724  * indicating any problems found with it. This can be used to verify a
29725  * certificate outside the context of making a connection, or to
29726  * check a certificate against a CA that is not part of the system
29727  * CA database.
29728  * If @identity is not %NULL, @cert's name(s) will be compared against
29729  * it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return
29730  * value if it does not match. If @identity is %NULL, that bit will
29731  * never be set in the return value.
29732  * If @trusted_ca is not %NULL, then @cert (or one of the certificates
29733  * in its chain) must be signed by it, or else
29734  * %G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If
29735  * value.
29736  * (All other #GTlsCertificateFlags values will always be set or unset
29737  * as appropriate.)
29738  *
29739  * Returns: the appropriate #GTlsCertificateFlags
29740  * Since: 2.28
29741  */
29742
29743
29744 /**
29745  * g_tls_client_connection_get_accepted_cas:
29746  * @conn: the #GTlsClientConnection
29747  *
29748  * Gets the list of distinguished names of the Certificate Authorities
29749  * that the server will accept certificates from. This will be set
29750  * during the TLS handshake if the server requests a certificate.
29751  * Otherwise, it will be %NULL.
29752  * Each item in the list is a #GByteArray which contains the complete
29753  * subject DN of the certificate authority.
29754  * CA DNs. You should unref each element with g_byte_array_unref() and then
29755  * the free the list with g_list_free().
29756  *
29757  * Returns: (element-type GByteArray) (transfer full): the list of
29758  * Since: 2.28
29759  */
29760
29761
29762 /**
29763  * g_tls_client_connection_get_server_identity:
29764  * @conn: the #GTlsClientConnection
29765  *
29766  * Gets @conn's expected server identity
29767  * expected server identity, or %NULL if the expected identity is not
29768  * known.
29769  *
29770  * Returns: a #GSocketConnectable describing the
29771  * Since: 2.28
29772  */
29773
29774
29775 /**
29776  * g_tls_client_connection_get_use_ssl3:
29777  * @conn: the #GTlsClientConnection
29778  *
29779  * Gets whether @conn will use SSL 3.0 rather than the
29780  * highest-supported version of TLS; see
29781  * g_tls_client_connection_set_use_ssl3().
29782  *
29783  * Returns: whether @conn will use SSL 3.0
29784  * Since: 2.28
29785  */
29786
29787
29788 /**
29789  * g_tls_client_connection_get_validation_flags:
29790  * @conn: the #GTlsClientConnection
29791  *
29792  * Gets @conn's validation flags
29793  *
29794  * Returns: the validation flags
29795  * Since: 2.28
29796  */
29797
29798
29799 /**
29800  * g_tls_client_connection_new:
29801  * @base_io_stream: the #GIOStream to wrap
29802  * @server_identity: (allow-none): the expected identity of the server
29803  * @error: #GError for error reporting, or %NULL to ignore.
29804  *
29805  * Creates a new #GTlsClientConnection wrapping @base_io_stream (which
29806  * must have pollable input and output streams) which is assumed to
29807  * communicate with the server identified by @server_identity.
29808  *
29809  * Returns: the new #GTlsClientConnection, or %NULL on error
29810  * Since: 2.28
29811  */
29812
29813
29814 /**
29815  * g_tls_client_connection_set_server_identity:
29816  * @conn: the #GTlsClientConnection
29817  * @identity: a #GSocketConnectable describing the expected server identity
29818  *
29819  * Sets @conn's expected server identity, which is used both to tell
29820  * servers on virtual hosts which certificate to present, and also
29821  * to let @conn know what name to look for in the certificate when
29822  * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.
29823  *
29824  * Since: 2.28
29825  */
29826
29827
29828 /**
29829  * g_tls_client_connection_set_use_ssl3:
29830  * @conn: the #GTlsClientConnection
29831  * @use_ssl3: whether to use SSL 3.0
29832  *
29833  * If @use_ssl3 is %TRUE, this forces @conn to use SSL 3.0 rather than
29834  * trying to properly negotiate the right version of TLS or SSL to use.
29835  * This can be used when talking to servers that do not implement the
29836  * fallbacks correctly and which will therefore fail to handshake with
29837  * a "modern" TLS handshake attempt.
29838  *
29839  * Since: 2.28
29840  */
29841
29842
29843 /**
29844  * g_tls_client_connection_set_validation_flags:
29845  * @conn: the #GTlsClientConnection
29846  * @flags: the #GTlsCertificateFlags to use
29847  *
29848  * Sets @conn's validation flags, to override the default set of
29849  * checks performed when validating a server certificate. By default,
29850  * %G_TLS_CERTIFICATE_VALIDATE_ALL is used.
29851  *
29852  * Since: 2.28
29853  */
29854
29855
29856 /**
29857  * g_tls_connection_emit_accept_certificate:
29858  * @conn: a #GTlsConnection
29859  * @peer_cert: the peer's #GTlsCertificate
29860  * @errors: the problems with @peer_cert
29861  *
29862  * Used by #GTlsConnection implementations to emit the
29863  * #GTlsConnection::accept-certificate signal.
29864  * %TRUE to accept @peer_cert
29865  *
29866  * Returns: %TRUE if one of the signal handlers has returned
29867  * Since: 2.28
29868  */
29869
29870
29871 /**
29872  * g_tls_connection_get_certificate:
29873  * @conn: a #GTlsConnection
29874  *
29875  * Gets @conn's certificate, as set by
29876  * g_tls_connection_set_certificate().
29877  *
29878  * Returns: (transfer none): @conn's certificate, or %NULL
29879  * Since: 2.28
29880  */
29881
29882
29883 /**
29884  * g_tls_connection_get_peer_certificate:
29885  * @conn: a #GTlsConnection
29886  *
29887  * Gets @conn's peer's certificate after the handshake has completed.
29888  * (It is not set during the emission of
29889  * #GTlsConnection::accept-certificate.)
29890  *
29891  * Returns: (transfer none): @conn's peer's certificate, or %NULL
29892  * Since: 2.28
29893  */
29894
29895
29896 /**
29897  * g_tls_connection_get_peer_certificate_errors:
29898  * @conn: a #GTlsConnection
29899  *
29900  * Gets the errors associated with validating @conn's peer's
29901  * certificate, after the handshake has completed. (It is not set
29902  * during the emission of #GTlsConnection::accept-certificate.)
29903  *
29904  * Returns: @conn's peer's certificate errors
29905  * Since: 2.28
29906  */
29907
29908
29909 /**
29910  * g_tls_connection_get_rehandshake_mode:
29911  * @conn: a #GTlsConnection
29912  *
29913  * Gets @conn rehandshaking mode. See
29914  * g_tls_connection_set_rehandshake() for details.
29915  *
29916  * Returns: @conn's rehandshaking mode
29917  * Since: 2.28
29918  */
29919
29920
29921 /**
29922  * g_tls_connection_get_require_close_notify:
29923  * @conn: a #GTlsConnection
29924  *
29925  * Tests whether or not @conn expects a proper TLS close notification
29926  * when the connection is closed. See
29927  * g_tls_connection_set_require_close_notify() for details.
29928  * notification.
29929  *
29930  * Returns: %TRUE if @conn requires a proper TLS close
29931  * Since: 2.28
29932  */
29933
29934
29935 /**
29936  * g_tls_connection_get_use_system_certdb:
29937  * @conn: a #GTlsConnection
29938  *
29939  * Gets whether @conn uses the system certificate database to verify
29940  * peer certificates. See g_tls_connection_set_use_system_certdb().
29941  *
29942  * Returns: whether @conn uses the system certificate database
29943  * Since: 2.28
29944  */
29945
29946
29947 /**
29948  * g_tls_connection_handshake:
29949  * @conn: a #GTlsConnection
29950  * @cancellable: a #GCancellable, or %NULL
29951  * @error: a #GError, or %NULL
29952  *
29953  * Attempts a TLS handshake on @conn.
29954  * On the client side, it is never necessary to call this method;
29955  * although the connection needs to perform a handshake after
29956  * connecting (or after sending a "STARTTLS"-type command) and may
29957  * need to rehandshake later if the server requests it,
29958  * #GTlsConnection will handle this for you automatically when you try
29959  * to send or receive data on the connection. However, you can call
29960  * g_tls_connection_handshake() manually if you want to know for sure
29961  * whether the initial handshake succeeded or failed (as opposed to
29962  * just immediately trying to write to @conn's output stream, in which
29963  * case if it fails, it may not be possible to tell if it failed
29964  * before or after completing the handshake).
29965  * Likewise, on the server side, although a handshake is necessary at
29966  * the beginning of the communication, you do not need to call this
29967  * function explicitly unless you want clearer error reporting.
29968  * However, you may call g_tls_connection_handshake() later on to
29969  * renegotiate parameters (encryption methods, etc) with the client.
29970  * #GTlsConnection::accept_certificate may be emitted during the
29971  * handshake.
29972  *
29973  * Returns: success or failure
29974  * Since: 2.28
29975  */
29976
29977
29978 /**
29979  * g_tls_connection_handshake_async:
29980  * @conn: a #GTlsConnection
29981  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
29982  * @cancellable: a #GCancellable, or %NULL
29983  * @callback: callback to call when the handshake is complete
29984  * @user_data: the data to pass to the callback function
29985  *
29986  * Asynchronously performs a TLS handshake on @conn. See
29987  * g_tls_connection_handshake() for more information.
29988  *
29989  * Since: 2.28
29990  */
29991
29992
29993 /**
29994  * g_tls_connection_handshake_finish:
29995  * @conn: a #GTlsConnection
29996  * @result: a #GAsyncResult.
29997  * @error: a #GError pointer, or %NULL
29998  *
29999  * Finish an asynchronous TLS handshake operation. See
30000  * g_tls_connection_handshake() for more information.
30001  * case @error will be set.
30002  *
30003  * Returns: %TRUE on success, %FALSE on failure, in which
30004  * Since: 2.28
30005  */
30006
30007
30008 /**
30009  * g_tls_connection_set_certificate:
30010  * @conn: a #GTlsConnection
30011  * @certificate: the certificate to use for @conn
30012  *
30013  * This sets the certificate that @conn will present to its peer
30014  * during the TLS handshake. For a #GTlsServerConnection, it is
30015  * mandatory to set this, and that will normally be done at construct
30016  * time.
30017  * For a #GTlsClientConnection, this is optional. If a handshake fails
30018  * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server
30019  * requires a certificate, and if you try connecting again, you should
30020  * call this method first. You can call
30021  * g_tls_client_connection_get_accepted_cas() on the failed connection
30022  * to get a list of Certificate Authorities that the server will
30023  * accept certificates from.
30024  * (It is also possible that a server will allow the connection with
30025  * or without a certificate; in that case, if you don't provide a
30026  * certificate, you can tell that the server requested one by the fact
30027  * that g_tls_client_connection_get_accepted_cas() will return
30028  * non-%NULL.)
30029  *
30030  * Since: 2.28
30031  */
30032
30033
30034 /**
30035  * g_tls_connection_set_rehandshake_mode:
30036  * @conn: a #GTlsConnection
30037  * @mode: the rehandshaking mode
30038  *
30039  * Sets how @conn behaves with respect to rehandshaking requests.
30040  * %G_TLS_REHANDSHAKE_NEVER means that it will never agree to
30041  * rehandshake after the initial handshake is complete. (For a client,
30042  * this means it will refuse rehandshake requests from the server, and
30043  * for a server, this means it will close the connection with an error
30044  * if the client attempts to rehandshake.)
30045  * %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a
30046  * rehandshake only if the other end of the connection supports the
30047  * TLS <literal>renegotiation_info</literal> extension. This is the
30048  * default behavior, but means that rehandshaking will not work
30049  * against older implementations that do not support that extension.
30050  * %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow
30051  * rehandshaking even without the
30052  * <literal>renegotiation_info</literal> extension. On the server side
30053  * in particular, this is not recommended, since it leaves the server
30054  * open to certain attacks. However, this mode is necessary if you
30055  * need to allow renegotiation with older client software.
30056  *
30057  * Since: 2.28
30058  */
30059
30060
30061 /**
30062  * g_tls_connection_set_require_close_notify:
30063  * @conn: a #GTlsConnection
30064  * @require_close_notify: whether or not to require close notification
30065  *
30066  * Sets whether or not @conn expects a proper TLS close notification
30067  * before the connection is closed. If this is %TRUE (the default),
30068  * then @conn will expect to receive a TLS close notification from its
30069  * peer before the connection is closed, and will return a
30070  * %G_TLS_ERROR_EOF error if the connection is closed without proper
30071  * notification (since this may indicate a network error, or
30072  * man-in-the-middle attack).
30073  * In some protocols, the application will know whether or not the
30074  * connection was closed cleanly based on application-level data
30075  * (because the application-level data includes a length field, or is
30076  * somehow self-delimiting); in this case, the close notify is
30077  * redundant and sometimes omitted. (TLS 1.1 explicitly allows this;
30078  * in TLS 1.0 it is technically an error, but often done anyway.) You
30079  * can use g_tls_connection_set_require_close_notify() to tell @conn
30080  * to allow an "unannounced" connection close, in which case the close
30081  * will show up as a 0-length read, as in a non-TLS
30082  * #GSocketConnection, and it is up to the application to check that
30083  * the data has been fully received.
30084  * Note that this only affects the behavior when the peer closes the
30085  * connection; when the application calls g_io_stream_close() itself
30086  * on @conn, this will send a close notification regardless of the
30087  * setting of this property. If you explicitly want to do an unclean
30088  * close, you can close @conn's #GTlsConnection:base-io-stream rather
30089  * than closing @conn itself.
30090  *
30091  * Since: 2.28
30092  */
30093
30094
30095 /**
30096  * g_tls_connection_set_use_system_certdb:
30097  * @conn: a #GTlsConnection
30098  * @use_system_certdb: whether to use the system certificate database
30099  *
30100  * Sets whether @conn uses the system certificate database to verify
30101  * peer certificates. This is %TRUE by default. If set to %FALSE, then
30102  * peer certificate validation will always set the
30103  * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
30104  * #GTlsConnection::accept-certificate will always be emitted on
30105  * client-side connections, unless that bit is not set in
30106  * #GTlsClientConnection:validation-flags).
30107  *
30108  * Since: 2.28
30109  */
30110
30111
30112 /**
30113  * g_tls_error_quark:
30114  *
30115  * Gets the TLS error quark.
30116  *
30117  * Returns: a #GQuark.
30118  * Since: 2.28
30119  */
30120
30121
30122 /**
30123  * g_tls_server_connection_new:
30124  * @base_io_stream: the #GIOStream to wrap
30125  * @certificate: (allow-none): the default server certificate, or %NULL
30126  * @error: #GError for error reporting, or %NULL to ignore.
30127  *
30128  * Creates a new #GTlsServerConnection wrapping @base_io_stream (which
30129  * must have pollable input and output streams).
30130  *
30131  * Returns: the new #GTlsServerConnection, or %NULL on error
30132  * Since: 2.28
30133  */
30134
30135
30136 /**
30137  * g_try_new:
30138  * @struct_type: the type of the elements to allocate
30139  * @n_structs: the number of elements to allocate
30140  *
30141  * Attempts to allocate @n_structs elements of type @struct_type, and returns
30142  * %NULL on failure. Contrast with g_new(), which aborts the program on failure.
30143  * The returned pointer is cast to a pointer to the given type.
30144  * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
30145  *
30146  * Since: 2.8
30147  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
30148  */
30149
30150
30151 /**
30152  * g_try_new0:
30153  * @struct_type: the type of the elements to allocate
30154  * @n_structs: the number of elements to allocate
30155  *
30156  * Attempts to allocate @n_structs elements of type @struct_type, initialized
30157  * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts
30158  * the program on failure.
30159  * The returned pointer is cast to a pointer to the given type.
30160  * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
30161  *
30162  * Since: 2.8
30163  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
30164  */
30165
30166
30167 /**
30168  * g_try_renew:
30169  * @struct_type: the type of the elements to allocate
30170  * @mem: the currently allocated memory
30171  * @n_structs: the number of elements to allocate
30172  *
30173  * Attempts to reallocate the memory pointed to by @mem, so that it now has
30174  * space for @n_structs elements of type @struct_type, and returns %NULL on
30175  * failure. Contrast with g_renew(), which aborts the program on failure.
30176  * It returns the new address of the memory, which may have been moved.
30177  * The function returns %NULL if an overflow occurs.
30178  *
30179  * Since: 2.8
30180  * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
30181  */
30182
30183
30184 /**
30185  * g_unix_connection_receive_credentials:
30186  * @connection: A #GUnixConnection.
30187  * @cancellable: (allow-none): A #GCancellable or %NULL.
30188  * @error: Return location for error or %NULL.
30189  *
30190  * Receives credentials from the sending end of the connection.  The
30191  * sending end has to call g_unix_connection_send_credentials() (or
30192  * similar) for this to work.
30193  * As well as reading the credentials this also reads (and discards) a
30194  * single byte from the stream, as this is required for credentials
30195  * passing to work on some implementations.
30196  * Other ways to exchange credentials with a foreign peer includes the
30197  * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
30198  * g_object_unref()), %NULL if @error is set.
30199  *
30200  * Returns: (transfer full): Received credentials on success (free with
30201  * Since: 2.26
30202  */
30203
30204
30205 /**
30206  * g_unix_connection_receive_fd:
30207  * @connection: a #GUnixConnection
30208  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
30209  * @error: (allow-none): #GError for error reporting, or %NULL to ignore
30210  *
30211  * Receives a file descriptor from the sending end of the connection.
30212  * The sending end has to call g_unix_connection_send_fd() for this
30213  * to work.
30214  * As well as reading the fd this also reads a single byte from the
30215  * stream, as this is required for fd passing to work on some
30216  * implementations.
30217  *
30218  * Returns: a file descriptor on success, -1 on error.
30219  * Since: 2.22
30220  */
30221
30222
30223 /**
30224  * g_unix_connection_send_credentials:
30225  * @connection: A #GUnixConnection.
30226  * @cancellable: (allow-none): A #GCancellable or %NULL.
30227  * @error: Return location for error or %NULL.
30228  *
30229  * Passes the credentials of the current user the receiving side
30230  * of the connection. The recieving end has to call
30231  * g_unix_connection_receive_credentials() (or similar) to accept the
30232  * credentials.
30233  * As well as sending the credentials this also writes a single NUL
30234  * byte to the stream, as this is required for credentials passing to
30235  * work on some implementations.
30236  * Other ways to exchange credentials with a foreign peer includes the
30237  * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
30238  *
30239  * Returns: %TRUE on success, %FALSE if @error is set.
30240  * Since: 2.26
30241  */
30242
30243
30244 /**
30245  * g_unix_connection_send_fd:
30246  * @connection: a #GUnixConnection
30247  * @fd: a file descriptor
30248  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
30249  * @error: (allow-none): #GError for error reporting, or %NULL to ignore.
30250  *
30251  * Passes a file descriptor to the recieving side of the
30252  * connection. The recieving end has to call g_unix_connection_receive_fd()
30253  * to accept the file descriptor.
30254  * As well as sending the fd this also writes a single byte to the
30255  * stream, as this is required for fd passing to work on some
30256  * implementations.
30257  *
30258  * Returns: a %TRUE on success, %NULL on error.
30259  * Since: 2.22
30260  */
30261
30262
30263 /**
30264  * g_unix_credentials_message_get_credentials:
30265  * @message: A #GUnixCredentialsMessage.
30266  *
30267  * Gets the credentials stored in @message.
30268  *
30269  * Returns: (transfer none): A #GCredentials instance. Do not free, it is owned by @message.
30270  * Since: 2.26
30271  */
30272
30273
30274 /**
30275  * g_unix_credentials_message_is_supported:
30276  *
30277  * Checks if passing a #GCredential on a #GSocket is supported on this platform.
30278  *
30279  * Returns: %TRUE if supported, %FALSE otherwise
30280  * Since: 2.26
30281  */
30282
30283
30284 /**
30285  * g_unix_credentials_message_new:
30286  *
30287  * Creates a new #GUnixCredentialsMessage with credentials matching the current processes.
30288  *
30289  * Returns: a new #GUnixCredentialsMessage
30290  * Since: 2.26
30291  */
30292
30293
30294 /**
30295  * g_unix_credentials_message_new_with_credentials:
30296  * @credentials: A #GCredentials object.
30297  *
30298  * Creates a new #GUnixCredentialsMessage holding @credentials.
30299  *
30300  * Returns: a new #GUnixCredentialsMessage
30301  * Since: 2.26
30302  */
30303
30304
30305 /**
30306  * g_unix_fd_list_append:
30307  * @list: a #GUnixFDList
30308  * @fd: a valid open file descriptor
30309  * @error: a #GError pointer
30310  *
30311  * Adds a file descriptor to @list.
30312  * The file descriptor is duplicated using dup(). You keep your copy
30313  * of the descriptor and the copy contained in @list will be closed
30314  * when @list is finalized.
30315  * A possible cause of failure is exceeding the per-process or
30316  * system-wide file descriptor limit.
30317  * The index of the file descriptor in the list is returned.  If you use
30318  * this index with g_unix_fd_list_get() then you will receive back a
30319  * duplicated copy of the same file descriptor.
30320  * (and @error is set)
30321  *
30322  * Returns: the index of the appended fd in case of success, else -1
30323  * Since: 2.24
30324  */
30325
30326
30327 /**
30328  * g_unix_fd_list_get:
30329  * @list: a #GUnixFDList
30330  * @index_: the index into the list
30331  * @error: a #GError pointer
30332  *
30333  * Gets a file descriptor out of @list.
30334  * programmer error for @index_ to be out of range; see
30335  * g_unix_fd_list_get_length().
30336  * The file descriptor is duplicated using dup() and set as
30337  * close-on-exec before being returned.  You must call close() on it
30338  * when you are done.
30339  * A possible cause of failure is exceeding the per-process or
30340  * system-wide file descriptor limit.
30341  *
30342  * Returns: the file descriptor, or -1 in case of error
30343  * Since: 2.24
30344  */
30345
30346
30347 /**
30348  * g_unix_fd_list_get_length:
30349  * @list: a #GUnixFDList
30350  *
30351  * contained within).
30352  *
30353  * Gets the length of @list (ie: the number of file descriptors
30354  * Returns: the length of @list
30355  * Since: 2.24
30356  */
30357
30358
30359 /**
30360  * g_unix_fd_list_new:
30361  *
30362  * Creates a new #GUnixFDList containing no file descriptors.
30363  *
30364  * Returns: a new #GUnixFDList
30365  * Since: 2.24
30366  */
30367
30368
30369 /**
30370  * g_unix_fd_list_new_from_array:
30371  * @fds: (array length=n_fds): the initial list of file descriptors
30372  * @n_fds: the length of #fds, or -1
30373  *
30374  * Creates a new #GUnixFDList containing the file descriptors given in
30375  * may no longer be used by the caller.  The array itself is owned by
30376  * the caller.
30377  * Each file descriptor in the array should be set to close-on-exec.
30378  * If @n_fds is -1 then @fds must be terminated with -1.
30379  *
30380  * Returns: a new #GUnixFDList
30381  * Since: 2.24
30382  */
30383
30384
30385 /**
30386  * g_unix_fd_list_peek_fds:
30387  * @list: a #GUnixFDList
30388  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
30389  *
30390  * Returns the array of file descriptors that is contained in this
30391  * object.
30392  * After this call, the descriptors remain the property of @list.  The
30393  * caller must not close them and must not free the array.  The array is
30394  * valid only until @list is changed in any way.
30395  * If @length is non-%NULL then it is set to the number of file
30396  * descriptors in the returned array. The returned array is also
30397  * terminated with -1.
30398  * This function never returns %NULL. In case there are no file
30399  * descriptors contained in @list, an empty array is returned.
30400  * descriptors
30401  *
30402  * Returns: (array length=length) (transfer none): an array of file
30403  * Since: 2.24
30404  */
30405
30406
30407 /**
30408  * g_unix_fd_list_steal_fds:
30409  * @list: a #GUnixFDList
30410  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
30411  *
30412  * Returns the array of file descriptors that is contained in this
30413  * object.
30414  * After this call, the descriptors are no longer contained in
30415  * descriptors have been added).
30416  * The return result of this function must be freed with g_free().
30417  * The caller is also responsible for closing all of the file
30418  * descriptors.  The file descriptors in the array are set to
30419  * close-on-exec.
30420  * If @length is non-%NULL then it is set to the number of file
30421  * descriptors in the returned array. The returned array is also
30422  * terminated with -1.
30423  * This function never returns %NULL. In case there are no file
30424  * descriptors contained in @list, an empty array is returned.
30425  * descriptors
30426  *
30427  * Returns: (array length=length) (transfer full): an array of file
30428  * Since: 2.24
30429  */
30430
30431
30432 /**
30433  * g_unix_fd_message_append_fd:
30434  * @message: a #GUnixFDMessage
30435  * @fd: a valid open file descriptor
30436  * @error: a #GError pointer
30437  *
30438  * Adds a file descriptor to @message.
30439  * The file descriptor is duplicated using dup(). You keep your copy
30440  * of the descriptor and the copy contained in @message will be closed
30441  * when @message is finalized.
30442  * A possible cause of failure is exceeding the per-process or
30443  * system-wide file descriptor limit.
30444  *
30445  * Returns: %TRUE in case of success, else %FALSE (and @error is set)
30446  * Since: 2.22
30447  */
30448
30449
30450 /**
30451  * g_unix_fd_message_get_fd_list:
30452  * @message: a #GUnixFDMessage
30453  *
30454  * Gets the #GUnixFDList contained in @message.  This function does not
30455  * return a reference to the caller, but the returned list is valid for
30456  * the lifetime of @message.
30457  *
30458  * Returns: (transfer none): the #GUnixFDList from @message
30459  * Since: 2.24
30460  */
30461
30462
30463 /**
30464  * g_unix_fd_message_new:
30465  *
30466  * Creates a new #GUnixFDMessage containing an empty file descriptor
30467  * list.
30468  *
30469  * Returns: a new #GUnixFDMessage
30470  * Since: 2.22
30471  */
30472
30473
30474 /**
30475  * g_unix_fd_message_new_with_fd_list:
30476  * @fd_list: a #GUnixFDList
30477  *
30478  * Creates a new #GUnixFDMessage containing @list.
30479  *
30480  * Returns: a new #GUnixFDMessage
30481  * Since: 2.24
30482  */
30483
30484
30485 /**
30486  * g_unix_fd_message_steal_fds:
30487  * @message: a #GUnixFDMessage
30488  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
30489  *
30490  * Returns the array of file descriptors that is contained in this
30491  * object.
30492  * After this call, the descriptors are no longer contained in
30493  * descriptors have been added).
30494  * The return result of this function must be freed with g_free().
30495  * The caller is also responsible for closing all of the file
30496  * descriptors.
30497  * If @length is non-%NULL then it is set to the number of file
30498  * descriptors in the returned array. The returned array is also
30499  * terminated with -1.
30500  * This function never returns %NULL. In case there are no file
30501  * descriptors contained in @message, an empty array is returned.
30502  * descriptors
30503  *
30504  * Returns: (array length=length) (transfer full): an array of file
30505  * Since: 2.22
30506  */
30507
30508
30509 /**
30510  * g_unix_input_stream_get_close_fd:
30511  * @stream: a #GUnixInputStream
30512  *
30513  * Returns whether the file descriptor of @stream will be
30514  * closed when the stream is closed.
30515  *
30516  * Returns: %TRUE if the file descriptor is closed when done
30517  * Since: 2.20
30518  */
30519
30520
30521 /**
30522  * g_unix_input_stream_get_fd:
30523  * @stream: a #GUnixInputStream
30524  *
30525  * Return the UNIX file descriptor that the stream reads from.
30526  *
30527  * Returns: The file descriptor of @stream
30528  * Since: 2.20
30529  */
30530
30531
30532 /**
30533  * g_unix_input_stream_new:
30534  * @fd: a UNIX file descriptor
30535  * @close_fd: %TRUE to close the file descriptor when done
30536  *
30537  * Creates a new #GUnixInputStream for the given @fd.
30538  * If @close_fd is %TRUE, the file descriptor will be closed
30539  * when the stream is closed.
30540  *
30541  * Returns: a new #GUnixInputStream
30542  */
30543
30544
30545 /**
30546  * g_unix_input_stream_set_close_fd:
30547  * @stream: a #GUnixInputStream
30548  * @close_fd: %TRUE to close the file descriptor when done
30549  *
30550  * Sets whether the file descriptor of @stream shall be closed
30551  * when the stream is closed.
30552  *
30553  * Since: 2.20
30554  */
30555
30556
30557 /**
30558  * g_unix_is_mount_path_system_internal:
30559  * @mount_path: a mount path, e.g. <filename>/media/disk</filename> or <filename>/usr</filename>
30560  *
30561  * Determines if @mount_path is considered an implementation of the
30562  * OS. This is primarily used for hiding mountable and mounted volumes
30563  * that only are used in the OS and has little to no relevance to the
30564  * casual user.
30565  * of the OS.
30566  *
30567  * Returns: %TRUE if @mount_path is considered an implementation detail
30568  */
30569
30570
30571 /**
30572  * g_unix_mount_at: (skip)
30573  * @mount_path: path for a possible unix mount.
30574  * @time_read: (out) (allow-none): guint64 to contain a timestamp.
30575  *
30576  * Gets a #GUnixMountEntry for a given mount path. If @time_read
30577  * is set, it will be filled with a unix timestamp for checking
30578  * if the mounts have changed since with g_unix_mounts_changed_since().
30579  *
30580  * Returns: (transfer full): a #GUnixMountEntry.
30581  */
30582
30583
30584 /**
30585  * g_unix_mount_compare:
30586  * @mount1: first #GUnixMountEntry to compare.
30587  * @mount2: second #GUnixMountEntry to compare.
30588  *
30589  * Compares two unix mounts.
30590  * or less than @mount2, respectively.
30591  *
30592  * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
30593  */
30594
30595
30596 /**
30597  * g_unix_mount_free:
30598  * @mount_entry: a #GUnixMount.
30599  *
30600  * Frees a unix mount.
30601  */
30602
30603
30604 /**
30605  * g_unix_mount_get_device_path:
30606  * @mount_entry: a #GUnixMount.
30607  *
30608  * Gets the device path for a unix mount.
30609  *
30610  * Returns: a string containing the device path.
30611  */
30612
30613
30614 /**
30615  * g_unix_mount_get_fs_type:
30616  * @mount_entry: a #GUnixMount.
30617  *
30618  * Gets the filesystem type for the unix mount.
30619  *
30620  * Returns: a string containing the file system type.
30621  */
30622
30623
30624 /**
30625  * g_unix_mount_get_mount_path:
30626  * @mount_entry: input #GUnixMountEntry to get the mount path for.
30627  *
30628  * Gets the mount path for a unix mount.
30629  *
30630  * Returns: the mount path for @mount_entry.
30631  */
30632
30633
30634 /**
30635  * g_unix_mount_guess_can_eject:
30636  * @mount_entry: a #GUnixMountEntry
30637  *
30638  * Guesses whether a Unix mount can be ejected.
30639  *
30640  * Returns: %TRUE if @mount_entry is deemed to be ejectable.
30641  */
30642
30643
30644 /**
30645  * g_unix_mount_guess_icon:
30646  * @mount_entry: a #GUnixMountEntry
30647  *
30648  * Guesses the icon of a Unix mount.
30649  *
30650  * Returns: (transfer full): a #GIcon
30651  */
30652
30653
30654 /**
30655  * g_unix_mount_guess_name:
30656  * @mount_entry: a #GUnixMountEntry
30657  *
30658  * Guesses the name of a Unix mount.
30659  * The result is a translated string.
30660  * be freed with g_free()
30661  *
30662  * Returns: A newly allocated string that must
30663  */
30664
30665
30666 /**
30667  * g_unix_mount_guess_should_display:
30668  * @mount_entry: a #GUnixMountEntry
30669  *
30670  * Guesses whether a Unix mount should be displayed in the UI.
30671  *
30672  * Returns: %TRUE if @mount_entry is deemed to be displayable.
30673  */
30674
30675
30676 /**
30677  * g_unix_mount_is_readonly:
30678  * @mount_entry: a #GUnixMount.
30679  *
30680  * Checks if a unix mount is mounted read only.
30681  *
30682  * Returns: %TRUE if @mount_entry is read only.
30683  */
30684
30685
30686 /**
30687  * g_unix_mount_is_system_internal:
30688  * @mount_entry: a #GUnixMount.
30689  *
30690  * Checks if a unix mount is a system path.
30691  *
30692  * Returns: %TRUE if the unix mount is for a system path.
30693  */
30694
30695
30696 /**
30697  * g_unix_mount_monitor_new:
30698  *
30699  * Gets a new #GUnixMountMonitor. The default rate limit for which the
30700  * monitor will report consecutive changes for the mount and mount
30701  * point entry files is the default for a #GFileMonitor. Use
30702  * g_unix_mount_monitor_set_rate_limit() to change this.
30703  *
30704  * Returns: a #GUnixMountMonitor.
30705  */
30706
30707
30708 /**
30709  * g_unix_mount_monitor_set_rate_limit:
30710  * @mount_monitor: a #GUnixMountMonitor
30711  * @limit_msec: a integer with the limit in milliseconds to poll for changes.
30712  *
30713  * Sets the rate limit to which the @mount_monitor will report
30714  * consecutive change events to the mount and mount point entry files.
30715  *
30716  * Since: 2.18
30717  */
30718
30719
30720 /**
30721  * g_unix_mount_point_compare:
30722  * @mount1: a #GUnixMount.
30723  * @mount2: a #GUnixMount.
30724  *
30725  * Compares two unix mount points.
30726  * or less than @mount2, respectively.
30727  *
30728  * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
30729  */
30730
30731
30732 /**
30733  * g_unix_mount_point_free:
30734  * @mount_point: unix mount point to free.
30735  *
30736  * Frees a unix mount point.
30737  */
30738
30739
30740 /**
30741  * g_unix_mount_point_get_device_path:
30742  * @mount_point: a #GUnixMountPoint.
30743  *
30744  * Gets the device path for a unix mount point.
30745  *
30746  * Returns: a string containing the device path.
30747  */
30748
30749
30750 /**
30751  * g_unix_mount_point_get_fs_type:
30752  * @mount_point: a #GUnixMountPoint.
30753  *
30754  * Gets the file system type for the mount point.
30755  *
30756  * Returns: a string containing the file system type.
30757  */
30758
30759
30760 /**
30761  * g_unix_mount_point_get_mount_path:
30762  * @mount_point: a #GUnixMountPoint.
30763  *
30764  * Gets the mount path for a unix mount point.
30765  *
30766  * Returns: a string containing the mount path.
30767  */
30768
30769
30770 /**
30771  * g_unix_mount_point_guess_can_eject:
30772  * @mount_point: a #GUnixMountPoint
30773  *
30774  * Guesses whether a Unix mount point can be ejected.
30775  *
30776  * Returns: %TRUE if @mount_point is deemed to be ejectable.
30777  */
30778
30779
30780 /**
30781  * g_unix_mount_point_guess_icon:
30782  * @mount_point: a #GUnixMountPoint
30783  *
30784  * Guesses the icon of a Unix mount point.
30785  *
30786  * Returns: (transfer full): a #GIcon
30787  */
30788
30789
30790 /**
30791  * g_unix_mount_point_guess_name:
30792  * @mount_point: a #GUnixMountPoint
30793  *
30794  * Guesses the name of a Unix mount point.
30795  * The result is a translated string.
30796  * be freed with g_free()
30797  *
30798  * Returns: A newly allocated string that must
30799  */
30800
30801
30802 /**
30803  * g_unix_mount_point_is_loopback:
30804  * @mount_point: a #GUnixMountPoint.
30805  *
30806  * Checks if a unix mount point is a loopback device.
30807  *
30808  * Returns: %TRUE if the mount point is a loopback. %FALSE otherwise.
30809  */
30810
30811
30812 /**
30813  * g_unix_mount_point_is_readonly:
30814  * @mount_point: a #GUnixMountPoint.
30815  *
30816  * Checks if a unix mount point is read only.
30817  *
30818  * Returns: %TRUE if a mount point is read only.
30819  */
30820
30821
30822 /**
30823  * g_unix_mount_point_is_user_mountable:
30824  * @mount_point: a #GUnixMountPoint.
30825  *
30826  * Checks if a unix mount point is mountable by the user.
30827  *
30828  * Returns: %TRUE if the mount point is user mountable.
30829  */
30830
30831
30832 /**
30833  * g_unix_mount_points_changed_since:
30834  * @time: guint64 to contain a timestamp.
30835  *
30836  * Checks if the unix mount points have changed since a given unix time.
30837  *
30838  * Returns: %TRUE if the mount points have changed since @time.
30839  */
30840
30841
30842 /**
30843  * g_unix_mount_points_get: (skip)
30844  * @time_read: (out) (allow-none): guint64 to contain a timestamp.
30845  *
30846  * Gets a #GList of #GUnixMountPoint containing the unix mount points.
30847  * If @time_read is set, it will be filled with the mount timestamp,
30848  * allowing for checking if the mounts have changed with
30849  * g_unix_mounts_points_changed_since().
30850  * a #GList of the UNIX mountpoints.
30851  *
30852  * Returns: (element-type GUnixMountPoint) (transfer full):
30853  */
30854
30855
30856 /**
30857  * g_unix_mounts_changed_since:
30858  * @time: guint64 to contain a timestamp.
30859  *
30860  * Checks if the unix mounts have changed since a given unix time.
30861  *
30862  * Returns: %TRUE if the mounts have changed since @time.
30863  */
30864
30865
30866 /**
30867  * g_unix_mounts_get: (skip)
30868  * @time_read: (out) (allow-none): guint64 to contain a timestamp, or %NULL
30869  *
30870  * Gets a #GList of #GUnixMountEntry containing the unix mounts.
30871  * If @time_read is set, it will be filled with the mount
30872  * timestamp, allowing for checking if the mounts have changed
30873  * with g_unix_mounts_changed_since().
30874  * a #GList of the UNIX mounts.
30875  *
30876  * Returns: (element-type GUnixMountEntry) (transfer full):
30877  */
30878
30879
30880 /**
30881  * g_unix_output_stream_get_close_fd:
30882  * @stream: a #GUnixOutputStream
30883  *
30884  * Returns whether the file descriptor of @stream will be
30885  * closed when the stream is closed.
30886  *
30887  * Returns: %TRUE if the file descriptor is closed when done
30888  * Since: 2.20
30889  */
30890
30891
30892 /**
30893  * g_unix_output_stream_get_fd:
30894  * @stream: a #GUnixOutputStream
30895  *
30896  * Return the UNIX file descriptor that the stream writes to.
30897  *
30898  * Returns: The file descriptor of @stream
30899  * Since: 2.20
30900  */
30901
30902
30903 /**
30904  * g_unix_output_stream_new:
30905  * @fd: a UNIX file descriptor
30906  * @close_fd: %TRUE to close the file descriptor when done
30907  *
30908  * Creates a new #GUnixOutputStream for the given @fd.
30909  * If @close_fd, is %TRUE, the file descriptor will be closed when
30910  * the output stream is destroyed.
30911  *
30912  * Returns: a new #GOutputStream
30913  */
30914
30915
30916 /**
30917  * g_unix_output_stream_set_close_fd:
30918  * @stream: a #GUnixOutputStream
30919  * @close_fd: %TRUE to close the file descriptor when done
30920  *
30921  * Sets whether the file descriptor of @stream shall be closed
30922  * when the stream is closed.
30923  *
30924  * Since: 2.20
30925  */
30926
30927
30928 /**
30929  * g_unix_socket_address_abstract_names_supported:
30930  *
30931  * Checks if abstract unix domain socket names are supported.
30932  *
30933  * Returns: %TRUE if supported, %FALSE otherwise
30934  * Since: 2.22
30935  */
30936
30937
30938 /**
30939  * g_unix_socket_address_get_address_type:
30940  * @address: a #GInetSocketAddress
30941  *
30942  * Gets @address's type.
30943  *
30944  * Returns: a #GUnixSocketAddressType
30945  * Since: 2.26
30946  */
30947
30948
30949 /**
30950  * g_unix_socket_address_get_is_abstract:
30951  * @address: a #GInetSocketAddress
30952  *
30953  * Tests if @address is abstract.
30954  *
30955  * Returns: %TRUE if the address is abstract, %FALSE otherwise
30956  * Since: 2.22
30957  * Deprecated: Use g_unix_socket_address_get_address_type()
30958  */
30959
30960
30961 /**
30962  * g_unix_socket_address_get_path:
30963  * @address: a #GInetSocketAddress
30964  *
30965  * Gets @address's path, or for abstract sockets the "name".
30966  * Guaranteed to be zero-terminated, but an abstract socket
30967  * may contain embedded zeros, and thus you should use
30968  * g_unix_socket_address_get_path_len() to get the true length
30969  * of this string.
30970  *
30971  * Returns: the path for @address
30972  * Since: 2.22
30973  */
30974
30975
30976 /**
30977  * g_unix_socket_address_get_path_len:
30978  * @address: a #GInetSocketAddress
30979  *
30980  * Gets the length of @address's path.
30981  * For details, see g_unix_socket_address_get_path().
30982  *
30983  * Returns: the length of the path
30984  * Since: 2.22
30985  */
30986
30987
30988 /**
30989  * g_unix_socket_address_new:
30990  * @path: the socket path
30991  *
30992  * Creates a new #GUnixSocketAddress for @path.
30993  * To create abstract socket addresses, on systems that support that,
30994  * use g_unix_socket_address_new_abstract().
30995  *
30996  * Returns: a new #GUnixSocketAddress
30997  * Since: 2.22
30998  */
30999
31000
31001 /**
31002  * g_unix_socket_address_new_abstract:
31003  * @path: (array length=path_len) (element-type gchar): the abstract name
31004  * @path_len: the length of @path, or -1
31005  *
31006  * Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
31007  * #GUnixSocketAddress for @path.
31008  *
31009  * Returns: a new #GUnixSocketAddress
31010  * Deprecated: Use g_unix_socket_address_new_with_type().
31011  */
31012
31013
31014 /**
31015  * g_unix_socket_address_new_with_type:
31016  * @path: (array length=path_len) (element-type gchar): the name
31017  * @path_len: the length of @path, or -1
31018  * @type: a #GUnixSocketAddressType
31019  *
31020  * Creates a new #GUnixSocketAddress of type @type with name @path.
31021  * If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to
31022  * calling g_unix_socket_address_new().
31023  * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len
31024  * bytes of @path will be copied to the socket's path, and only those
31025  * bytes will be considered part of the name. (If @path_len is -1,
31026  * then @path is assumed to be NUL-terminated.) For example, if @path
31027  * was "test", then calling g_socket_address_get_native_size() on the
31028  * returned socket would return 7 (2 bytes of overhead, 1 byte for the
31029  * abstract-socket indicator byte, and 4 bytes for the name "test").
31030  * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then
31031  * rest of the path will be padded with 0 bytes, and the entire
31032  * zero-padded buffer will be considered the name. (As above, if
31033  * this case, g_socket_address_get_native_size() will always return
31034  * the full size of a <literal>struct sockaddr_un</literal>, although
31035  * g_unix_socket_address_get_path_len() will still return just the
31036  * length of @path.
31037  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over
31038  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course,
31039  * when connecting to a server created by another process, you must
31040  * use the appropriate type corresponding to how that process created
31041  * its listening socket.
31042  *
31043  * Returns: a new #GUnixSocketAddress
31044  * Since: 2.26
31045  */
31046
31047
31048 /**
31049  * g_vfs_get_default:
31050  *
31051  * Gets the default #GVfs for the system.
31052  *
31053  * Returns: (transfer none): a #GVfs.
31054  */
31055
31056
31057 /**
31058  * g_vfs_get_file_for_path:
31059  * @vfs: a #GVfs.
31060  * @path: a string containing a VFS path.
31061  *
31062  * Gets a #GFile for @path.
31063  * Free the returned object with g_object_unref().
31064  *
31065  * Returns: (transfer full): a #GFile.
31066  */
31067
31068
31069 /**
31070  * g_vfs_get_file_for_uri:
31071  * @vfs: a#GVfs.
31072  * @uri: a string containing a URI
31073  *
31074  * Gets a #GFile for @uri.
31075  * This operation never fails, but the returned object
31076  * might not support any I/O operation if the URI
31077  * is malformed or if the URI scheme is not supported.
31078  * Free the returned object with g_object_unref().
31079  *
31080  * Returns: (transfer full): a #GFile.
31081  */
31082
31083
31084 /**
31085  * g_vfs_get_local:
31086  *
31087  * Gets the local #GVfs for the system.
31088  *
31089  * Returns: (transfer none): a #GVfs.
31090  */
31091
31092
31093 /**
31094  * g_vfs_get_supported_uri_schemes:
31095  * @vfs: a #GVfs.
31096  *
31097  * Gets a list of URI schemes supported by @vfs.
31098  * The returned array belongs to GIO and must
31099  * not be freed or modified.
31100  *
31101  * Returns: (transfer none): a %NULL-terminated array of strings.
31102  */
31103
31104
31105 /**
31106  * g_vfs_is_active:
31107  * @vfs: a #GVfs.
31108  *
31109  * Checks if the VFS is active.
31110  *
31111  * Returns: %TRUE if construction of the @vfs was successful and it is now active.
31112  */
31113
31114
31115 /**
31116  * g_vfs_parse_name:
31117  * @vfs: a #GVfs.
31118  * @parse_name: a string to be parsed by the VFS module.
31119  *
31120  * This operation never fails, but the returned object might
31121  * not support any I/O operations if the @parse_name cannot
31122  * be parsed by the #GVfs module.
31123  * Free the returned object with g_object_unref().
31124  *
31125  * Returns: (transfer full): a #GFile for the given @parse_name.
31126  */
31127
31128
31129 /**
31130  * g_volume_can_eject:
31131  * @volume: a #GVolume.
31132  *
31133  * Checks if a volume can be ejected.
31134  *
31135  * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise.
31136  */
31137
31138
31139 /**
31140  * g_volume_can_mount:
31141  * @volume: a #GVolume.
31142  *
31143  * Checks if a volume can be mounted.
31144  *
31145  * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise.
31146  */
31147
31148
31149 /**
31150  * g_volume_eject:
31151  * @volume: a #GVolume.
31152  * @flags: flags affecting the unmount if required for eject
31153  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31154  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31155  * @user_data: user data that gets passed to @callback
31156  *
31157  * Ejects a volume. This is an asynchronous operation, and is
31158  * finished by calling g_volume_eject_finish() with the @volume
31159  * and #GAsyncResult returned in the @callback.
31160  *
31161  * Deprecated: 2.22: Use g_volume_eject_with_operation() instead.
31162  */
31163
31164
31165 /**
31166  * g_volume_eject_finish:
31167  * @volume: pointer to a #GVolume.
31168  * @result: a #GAsyncResult.
31169  * @error: a #GError location to store an error, or %NULL to ignore
31170  *
31171  * Finishes ejecting a volume. If any errors occured during the operation,
31172  *
31173  * Returns: %TRUE, %FALSE if operation failed.
31174  * Deprecated: 2.22: Use g_volume_eject_with_operation_finish() instead.
31175  */
31176
31177
31178 /**
31179  * g_volume_eject_with_operation:
31180  * @volume: a #GVolume.
31181  * @flags: flags affecting the unmount if required for eject
31182  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
31183  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31184  * @callback: a #GAsyncReadyCallback, or %NULL.
31185  * @user_data: user data passed to @callback.
31186  *
31187  * Ejects a volume. This is an asynchronous operation, and is
31188  * finished by calling g_volume_eject_with_operation_finish() with the @volume
31189  * and #GAsyncResult data returned in the @callback.
31190  *
31191  * Since: 2.22
31192  */
31193
31194
31195 /**
31196  * g_volume_eject_with_operation_finish:
31197  * @volume: a #GVolume.
31198  * @result: a #GAsyncResult.
31199  * @error: a #GError location to store the error occuring, or %NULL to ignore.
31200  *
31201  * Finishes ejecting a volume. If any errors occurred during the operation,
31202  *
31203  * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise.
31204  * Since: 2.22
31205  */
31206
31207
31208 /**
31209  * g_volume_enumerate_identifiers:
31210  * @volume: a #GVolume
31211  *
31212  * Gets the kinds of <link linkend="volume-identifier">identifiers</link>
31213  * that @volume has. Use g_volume_get_identifer() to obtain
31214  * the identifiers themselves.
31215  * of strings containing kinds of identifiers. Use g_strfreev() to free.
31216  *
31217  * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated array
31218  */
31219
31220
31221 /**
31222  * g_volume_get_activation_root:
31223  * @volume: a #GVolume
31224  *
31225  * Gets the activation root for a #GVolume if it is known ahead of
31226  * mount time. Returns %NULL otherwise. If not %NULL and if @volume
31227  * is mounted, then the result of g_mount_get_root() on the
31228  * #GMount object obtained from g_volume_get_mount() will always
31229  * either be equal or a prefix of what this function returns. In
31230  * other words, in code
31231  * <programlisting>
31232  * GMount *mount;
31233  * GFile *mount_root
31234  * GFile *volume_activation_root;
31235  * mount = g_volume_get_mount (volume); /&ast; mounted, so never NULL &ast;/
31236  * mount_root = g_mount_get_root (mount);
31237  * volume_activation_root = g_volume_get_activation_root(volume); /&ast; assume not NULL &ast;/
31238  * </programlisting>
31239  * then the expression
31240  * <programlisting>
31241  * (g_file_has_prefix (volume_activation_root, mount_root) ||
31242  * </programlisting>
31243  * will always be %TRUE.
31244  * Activation roots are typically used in #GVolumeMonitor
31245  * implementations to find the underlying mount to shadow, see
31246  * g_mount_is_shadowed() for more details.
31247  * g_object_unref() to free.
31248  *
31249  * Returns: (transfer full): the activation root of @volume or %NULL. Use
31250  * Since: 2.18
31251  */
31252
31253
31254 /**
31255  * g_volume_get_drive:
31256  * @volume: a #GVolume.
31257  *
31258  * Gets the drive for the @volume.
31259  * The returned object should be unreffed with g_object_unref()
31260  * when no longer needed.
31261  *
31262  * Returns: (transfer full): a #GDrive or %NULL if @volume is not associated with a drive.
31263  */
31264
31265
31266 /**
31267  * g_volume_get_icon:
31268  * @volume: a #GVolume.
31269  *
31270  * Gets the icon for @volume.
31271  * The returned object should be unreffed with g_object_unref()
31272  * when no longer needed.
31273  *
31274  * Returns: (transfer full): a #GIcon.
31275  */
31276
31277
31278 /**
31279  * g_volume_get_identifier:
31280  * @volume: a #GVolume
31281  * @kind: the kind of identifier to return
31282  *
31283  * Gets the identifier of the given kind for @volume.
31284  * See the <link linkend="volume-identifier">introduction</link>
31285  * for more information about volume identifiers.
31286  * requested identfier, or %NULL if the #GVolume
31287  * doesn't have this kind of identifier
31288  *
31289  * Returns: a newly allocated string containing the
31290  */
31291
31292
31293 /**
31294  * g_volume_get_mount:
31295  * @volume: a #GVolume.
31296  *
31297  * Gets the mount for the @volume.
31298  * The returned object should be unreffed with g_object_unref()
31299  * when no longer needed.
31300  *
31301  * Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted.
31302  */
31303
31304
31305 /**
31306  * g_volume_get_name:
31307  * @volume: a #GVolume.
31308  *
31309  * Gets the name of @volume.
31310  * be freed with g_free() when no longer needed.
31311  *
31312  * Returns: the name for the given @volume. The returned string should
31313  */
31314
31315
31316 /**
31317  * g_volume_get_uuid:
31318  * @volume: a #GVolume.
31319  *
31320  * Gets the UUID for the @volume. The reference is typically based on
31321  * the file system UUID for the volume in question and should be
31322  * considered an opaque string. Returns %NULL if there is no UUID
31323  * available.
31324  * The returned string should be freed with g_free()
31325  * when no longer needed.
31326  *
31327  * Returns: the UUID for @volume or %NULL if no UUID can be computed.
31328  */
31329
31330
31331 /**
31332  * g_volume_monitor_adopt_orphan_mount:
31333  * @mount: a #GMount object to find a parent for
31334  *
31335  * This function should be called by any #GVolumeMonitor
31336  * implementation when a new #GMount object is created that is not
31337  * associated with a #GVolume object. It must be called just before
31338  * emitting the @mount_added signal.
31339  * If the return value is not %NULL, the caller must associate the
31340  * returned #GVolume object with the #GMount. This involves returning
31341  * it in its g_mount_get_volume() implementation. The caller must
31342  * also listen for the "removed" signal on the returned object
31343  * and give up its reference when handling that signal
31344  * Similary, if implementing g_volume_monitor_adopt_orphan_mount(),
31345  * the implementor must take a reference to @mount and return it in
31346  * its g_volume_get_mount() implemented. Also, the implementor must
31347  * listen for the "unmounted" signal on @mount and give up its
31348  * reference upon handling that signal.
31349  * There are two main use cases for this function.
31350  * One is when implementing a user space file system driver that reads
31351  * blocks of a block device that is already represented by the native
31352  * volume monitor (for example a CD Audio file system driver). Such
31353  * a driver will generate its own #GMount object that needs to be
31354  * assoicated with the #GVolume object that represents the volume.
31355  * The other is for implementing a #GVolumeMonitor whose sole purpose
31356  * is to return #GVolume objects representing entries in the users
31357  * "favorite servers" list or similar.
31358  * if no wants to adopt the #GMount.
31359  * implementations should instead create shadow mounts with the URI of
31360  * the mount they intend to adopt. See the proxy volume monitor in
31361  * gvfs for an example of this. Also see g_mount_is_shadowed(),
31362  * g_mount_shadow() and g_mount_unshadow() functions.
31363  *
31364  * Returns: (transfer full): the #GVolume object that is the parent for @mount or %NULL
31365  * Deprecated: 2.20: Instead of using this function, #GVolumeMonitor
31366  */
31367
31368
31369 /**
31370  * g_volume_monitor_get:
31371  *
31372  * Gets the volume monitor used by gio.
31373  * g_object_unref() when done with it.
31374  *
31375  * Returns: (transfer full): a reference to the #GVolumeMonitor used by gio. Call
31376  */
31377
31378
31379 /**
31380  * g_volume_monitor_get_connected_drives:
31381  * @volume_monitor: a #GVolumeMonitor.
31382  *
31383  * Gets a list of drives connected to the system.
31384  * The returned list should be freed with g_list_free(), after
31385  * its elements have been unreffed with g_object_unref().
31386  *
31387  * Returns: (element-type GDrive) (transfer full): a #GList of connected #GDrive objects.
31388  */
31389
31390
31391 /**
31392  * g_volume_monitor_get_mount_for_uuid:
31393  * @volume_monitor: a #GVolumeMonitor.
31394  * @uuid: the UUID to look for
31395  *
31396  * Finds a #GMount object by its UUID (see g_mount_get_uuid())
31397  * Free the returned object with g_object_unref().
31398  *
31399  * Returns: (transfer full): a #GMount or %NULL if no such mount is available.
31400  */
31401
31402
31403 /**
31404  * g_volume_monitor_get_mounts:
31405  * @volume_monitor: a #GVolumeMonitor.
31406  *
31407  * Gets a list of the mounts on the system.
31408  * The returned list should be freed with g_list_free(), after
31409  * its elements have been unreffed with g_object_unref().
31410  *
31411  * Returns: (element-type GMount) (transfer full): a #GList of #GMount objects.
31412  */
31413
31414
31415 /**
31416  * g_volume_monitor_get_volume_for_uuid:
31417  * @volume_monitor: a #GVolumeMonitor.
31418  * @uuid: the UUID to look for
31419  *
31420  * Finds a #GVolume object by its UUID (see g_volume_get_uuid())
31421  * Free the returned object with g_object_unref().
31422  *
31423  * Returns: (transfer full): a #GVolume or %NULL if no such volume is available.
31424  */
31425
31426
31427 /**
31428  * g_volume_monitor_get_volumes:
31429  * @volume_monitor: a #GVolumeMonitor.
31430  *
31431  * Gets a list of the volumes on the system.
31432  * The returned list should be freed with g_list_free(), after
31433  * its elements have been unreffed with g_object_unref().
31434  *
31435  * Returns: (element-type GVolume) (transfer full): a #GList of #GVolume objects.
31436  */
31437
31438
31439 /**
31440  * g_volume_mount:
31441  * @volume: a #GVolume.
31442  * @flags: flags affecting the operation
31443  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
31444  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31445  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31446  * @user_data: user data that gets passed to @callback
31447  *
31448  * Mounts a volume. This is an asynchronous operation, and is
31449  * finished by calling g_volume_mount_finish() with the @volume
31450  * and #GAsyncResult returned in the @callback.
31451  *
31452  * Virtual: mount_fn
31453  */
31454
31455
31456 /**
31457  * g_volume_mount_finish:
31458  * @volume: a #GVolume
31459  * @result: a #GAsyncResult
31460  * @error: a #GError location to store an error, or %NULL to ignore
31461  *
31462  * Finishes mounting a volume. If any errors occured during the operation,
31463  * If the mount operation succeeded, g_volume_get_mount() on @volume
31464  * is guaranteed to return the mount right after calling this
31465  * function; there's no need to listen for the 'mount-added' signal on
31466  * #GVolumeMonitor.
31467  *
31468  * Returns: %TRUE, %FALSE if operation failed.
31469  */
31470
31471
31472 /**
31473  * g_volume_should_automount:
31474  * @volume: a #GVolume
31475  *
31476  * Returns whether the volume should be automatically mounted.
31477  *
31478  * Returns: %TRUE if the volume should be automatically mounted.
31479  */
31480
31481
31482 /**
31483  * g_win32_input_stream_get_close_handle:
31484  * @stream: a #GWin32InputStream
31485  *
31486  * Returns whether the handle of @stream will be
31487  * closed when the stream is closed.
31488  *
31489  * Returns: %TRUE if the handle is closed when done
31490  * Since: 2.26
31491  */
31492
31493
31494 /**
31495  * g_win32_input_stream_get_handle:
31496  * @stream: a #GWin32InputStream
31497  *
31498  * Return the Windows file handle that the stream reads from.
31499  *
31500  * Returns: The file handle of @stream
31501  * Since: 2.26
31502  */
31503
31504
31505 /**
31506  * g_win32_input_stream_new:
31507  * @handle: a Win32 file handle
31508  * @close_fd: %TRUE to close the handle when done
31509  *
31510  * Creates a new #GWin32InputStream for the given @fd.
31511  * If @close_handle is %TRUE, the handle will be closed
31512  * when the stream is closed.
31513  * Note that "handle" here means a Win32 HANDLE, not a "file descriptor"
31514  * as used in the Windows C libraries.
31515  *
31516  * Returns: a new #GWin32InputStream
31517  */
31518
31519
31520 /**
31521  * g_win32_input_stream_set_close_handle:
31522  * @stream: a #GWin32InputStream
31523  * @close_handle: %TRUE to close the handle when done
31524  *
31525  * Sets whether the handle of @stream shall be closed
31526  * when the stream is closed.
31527  *
31528  * Since: 2.26
31529  */
31530
31531
31532 /**
31533  * g_win32_output_stream_get_close_handle:
31534  * @stream: a #GWin32OutputStream
31535  *
31536  * Returns whether the handle of @stream will be closed when the
31537  * stream is closed.
31538  *
31539  * Returns: %TRUE if the handle is closed when done
31540  * Since: 2.26
31541  */
31542
31543
31544 /**
31545  * g_win32_output_stream_get_handle:
31546  * @stream: a #GWin32OutputStream
31547  *
31548  * Return the Windows handle that the stream writes to.
31549  *
31550  * Returns: The handle descriptor of @stream
31551  * Since: 2.26
31552  */
31553
31554
31555 /**
31556  * g_win32_output_stream_new:
31557  * @handle: a Win32 file handle
31558  * @close_handle: %TRUE to close the handle when done
31559  *
31560  * Creates a new #GWin32OutputStream for the given @handle.
31561  * If @close_handle, is %TRUE, the handle will be closed when the
31562  * output stream is destroyed.
31563  *
31564  * Returns: a new #GOutputStream
31565  * Since: 2.26
31566  */
31567
31568
31569 /**
31570  * g_win32_output_stream_set_close_handle:
31571  * @stream: a #GWin32OutputStream
31572  * @close_handle: %TRUE to close the handle when done
31573  *
31574  * Sets whether the handle of @stream shall be closed when the stream
31575  * is closed.
31576  *
31577  * Since: 2.26
31578  */
31579
31580
31581 /**
31582  * g_zlib_compressor_get_file_info:
31583  * @compressor: a #GZlibCompressor
31584  *
31585  * Returns the #GZlibCompressor:file-info property.
31586  *
31587  * Returns: (transfer none): a #GFileInfo, or %NULL
31588  * Since: 2.26
31589  */
31590
31591
31592 /**
31593  * g_zlib_compressor_new:
31594  * @format: The format to use for the compressed data
31595  * @level: compression level (0-9), -1 for default
31596  *
31597  * Creates a new #GZlibCompressor.
31598  *
31599  * Returns: a new #GZlibCompressor
31600  * Since: 2.24
31601  */
31602
31603
31604 /**
31605  * g_zlib_compressor_set_file_info:
31606  * @compressor: a #GZlibCompressor
31607  * @file_info: (allow-none): a #GFileInfo
31608  *
31609  * Sets @file_info in @compressor. If non-%NULL, and @compressor's
31610  * #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
31611  * it will be used to set the file name and modification time in
31612  * the GZIP header of the compressed data.
31613  * progress; it may only be called immediately after creation of @compressor,
31614  * or after resetting it with g_converter_reset().
31615  *
31616  * Note: it is an error to call this function while a compression is in
31617  * Since: 2.26
31618  */
31619
31620
31621 /**
31622  * g_zlib_decompressor_get_file_info:
31623  * @decompressor: a #GZlibDecompressor
31624  *
31625  * Retrieves the #GFileInfo constructed from the GZIP header data
31626  * of compressed data processed by @compressor, or %NULL if @decompressor's
31627  * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
31628  * or the header data was not fully processed yet, or it not present in the
31629  * data stream at all.
31630  *
31631  * Returns: (transfer none): a #GFileInfo, or %NULL
31632  * Since: 2.26
31633  */
31634
31635
31636 /**
31637  * g_zlib_decompressor_new:
31638  * @format: The format to use for the compressed data
31639  *
31640  * Creates a new #GZlibDecompressor.
31641  *
31642  * Returns: a new #GZlibDecompressor
31643  * Since: 2.24
31644  */
31645
31646
31647 /**
31648  * gchararray:
31649  *
31650  * A C representable type name for #G_TYPE_STRING.
31651  */
31652
31653
31654 /**
31655  * get_all_desktop_entries_for_mime_type:
31656  * @mime_type: a mime type.
31657  * @except: NULL or a strv list
31658  *
31659  * Returns all the desktop ids for @mime_type. The desktop files
31660  * are listed in an order so that default applications are listed before
31661  * non-default ones, and handlers for inherited mimetypes are listed
31662  * after the base ones.
31663  * Optionally doesn't list the desktop ids given in the @except
31664  * to handle @mime_type.
31665  *
31666  * Returns: a #GList containing the desktop ids which claim
31667  */
31668
31669
31670 /**
31671  * mime_info_cache_reload:
31672  * @dir: directory path which needs reloading.
31673  *
31674  * Reload the mime information for the @dir.
31675  */
31676
31677
31678
31679 /************************************************************/
31680 /* THIS FILE IS GENERATED DO NOT EDIT */
31681 /************************************************************/