gio-2.0.c: copy in two annotations from glib
[platform/upstream/gobject-introspection.git] / gir / gio-2.0.c
1 /************************************************************/
2 /* THIS FILE IS GENERATED DO NOT EDIT */
3 /************************************************************/
4
5 /**
6  * GAction:enabled:
7  *
8  * If @action is currently enabled.
9  * If the action is disabled then calls to g_action_activate() and
10  * g_action_set_state() have no effect.
11  *
12  * Since: 2.28
13  */
14
15
16 /**
17  * GAction:name:
18  *
19  * The name of the action.  This is mostly meaningful for identifying
20  * the action once it has been added to a #GActionGroup.
21  *
22  * Since: 2.28
23  */
24
25
26 /**
27  * GAction:parameter-type:
28  *
29  * The type of the parameter that must be given when activating the
30  * action.
31  *
32  * Since: 2.28
33  */
34
35
36 /**
37  * GAction:state:
38  *
39  * The state of the action, or %NULL if the action is stateless.
40  *
41  * Since: 2.28
42  */
43
44
45 /**
46  * GAction:state-type:
47  *
48  * The #GVariantType of the state that the action has, or %NULL if the
49  * action is stateless.
50  *
51  * Since: 2.28
52  */
53
54
55 /**
56  * GActionGroup::action-added:
57  * @action_group: the #GActionGroup that changed
58  * @action_name: the name of the action in @action_group
59  *
60  * Signals that a new action was just added to the group.  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.28
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.28
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.28
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() and
226  * the #GApplicationCommandline documentation for more information.
227  * process. See g_application_command_line_set_exit_status().
228  *
229  * Returns: An integer that is set as the exit status for the calling
230  */
231
232
233 /**
234  * GApplication::open:
235  * @application: the application
236  * @files: (array length=n_files) (element-type GFile): an array of #GFiles
237  * @n_files: the length of @files
238  * @hint: a hint provided by the calling instance
239  *
240  * The ::open signal is emitted on the primary instance when there are
241  * files to open. See g_application_open() for more information.
242  */
243
244
245 /**
246  * GApplication::startup:
247  * @application: the application
248  *
249  * The ::startup signal is emitted on the primary instance immediately
250  * after registration. See g_application_register().
251  */
252
253
254 /**
255  * GApplicationClass:
256  * @startup: invoked on the primary instance immediately after registration
257  * @activate: invoked on the primary instance when an activation occurs
258  * @open: invoked on the primary instance when there are files to open
259  * @command_line: invoked on the primary instance when a command-line is not handled locally
260  * @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.
261  * @before_emit: invoked on the primary instance before 'activate', 'open', 'command-line' or any action invocation, gets the 'platform data' from the calling instance
262  * @after_emit: invoked on the primary instance after 'activate', 'open', 'command-line' or any action invocation, gets the 'platform data' from the calling instance
263  * @add_platform_data: invoked (locally) to add 'platform data' to be sent to the primary instance when activating, opening or invoking actions
264  * @quit_mainloop: invoked on the primary instance when the use count of the application drops to zero (and after any inactivity timeout, if requested)
265  * @run_mainloop: invoked on the primary instance from g_application_run() if the use-count is non-zero
266  *
267  *
268  *
269  * Since: 2.28
270  */
271
272
273 /**
274  * GApplicationCommandLine:
275  *
276  * The <structname>GApplicationCommandLine</structname> structure contains private
277  * data and should only be accessed using the provided API
278  *
279  * Since: 2.28
280  */
281
282
283 /**
284  * GApplicationCommandLineClass:
285  *
286  * The <structname>GApplicationCommandLineClass</structname> structure contains
287  * private data only
288  *
289  * Since: 2.28
290  */
291
292
293 /**
294  * GApplicationFlags:
295  * @G_APPLICATION_FLAGS_NONE: Default
296  * @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.
297  * @G_APPLICATION_IS_LAUNCHER: Don't try to become the primary instance.
298  * @G_APPLICATION_HANDLES_OPEN: This application handles opening files (in the primary instance). Note that this flag only affects the default implementation of local_command_line(), and has no effect if %G_APPLICATION_HANDLES_COMMAND_LINE is given. See g_application_run() for details.
299  * @G_APPLICATION_HANDLES_COMMAND_LINE: This application handles command line arguments (in the primary instance). Note that this flag only affect the default implementation of local_command_line(). See g_application_run() for details.
300  * @G_APPLICATION_SEND_ENVIRONMENT: Send the environment of the launching process to the primary instance. Set this flag if your application is expected to behave differently depending on certain environment variables. For instance, an editor might be expected to use the <envar>GIT_COMMITTER_NAME</envar> environment variable when editing a git commit message. The environment is available to the #GApplication::command-line signal handler, via g_application_command_line_getenv().
301  *
302  * Flags used to define the behaviour of a #GApplication.
303  *
304  * Since: 2.28
305  */
306
307
308 /**
309  * GAskPasswordFlags:
310  * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password.
311  * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username.
312  * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain.
313  * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings.
314  * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users.
315  *
316  * #GAskPasswordFlags are used to request specific information from the
317  * user, or to notify the user of their choices in an authentication
318  * situation.
319  */
320
321
322 /**
323  * GAsyncInitable:
324  *
325  * Interface for asynchronously initializable objects.
326  *
327  * Since: 2.22
328  */
329
330
331 /**
332  * GAsyncInitableIface:
333  * @g_iface: The parent interface.
334  * @init_async: Starts initialization of the object.
335  * @init_finish: Finishes initialization of the object.
336  *
337  * Provides an interface for asynchronous initializing object such that
338  * initialization may fail.
339  *
340  * Since: 2.22
341  */
342
343
344 /**
345  * GAsyncReadyCallback:
346  * @source_object: the object the asynchronous operation was started with.
347  * @res: a #GAsyncResult.
348  * @user_data: user data passed to the callback.
349  *
350  * Type definition for a function that will be called back when an asynchronous
351  * operation within GIO has been completed.
352  */
353
354
355 /**
356  * GAsyncResult:
357  *
358  * Holds results information for an asynchronous operation,
359  * usually passed directly to a asynchronous _finish() operation.
360  */
361
362
363 /**
364  * GAsyncResultIface:
365  * @g_iface: The parent interface.
366  * @get_user_data: Gets the user data passed to the callback.
367  * @get_source_object: Gets the source object that issued the asynchronous operation.
368  *
369  * Interface definition for #GAsyncResult.
370  */
371
372
373 /**
374  * GBaseFinalizeFunc:
375  * @g_class: The #GTypeClass structure to finalize.
376  *
377  * A callback function used by the type system to finalize those portions
378  * of a derived types class structure that were setup from the corresponding
379  * GBaseInitFunc() function. Class finalization basically works the inverse
380  * way in which class intialization is performed.
381  * See GClassInitFunc() for a discussion of the class intialization process.
382  */
383
384
385 /**
386  * GBaseInitFunc:
387  * @g_class: The #GTypeClass structure to initialize.
388  *
389  * A callback function used by the type system to do base initialization
390  * of the class structures of derived types. It is called as part of the
391  * initialization process of all derived classes and should reallocate
392  * or reset all dynamic class members copied over from the parent class.
393  * For example, class members (such as strings) that are not sufficiently
394  * handled by a plain memory copy of the parent class into the derived class
395  * have to be altered. See GClassInitFunc() for a discussion of the class
396  * intialization process.
397  */
398
399
400 /**
401  * GBinding:
402  *
403  * <structname>GBinding</structname> is an opaque structure whose members
404  * cannot be accessed directly.
405  *
406  * Since: 2.26
407  */
408
409
410 /**
411  * GBindingFlags:
412  * @G_BINDING_DEFAULT: The default binding; if the source property changes, the target property is updated with its value.
413  * @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the property of the source or the property of the target changes, the other is updated.
414  * @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.
415  * @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().
416  *
417  * Flags to be passed to g_object_bind_property() or
418  * g_object_bind_property_full().
419  * This enumeration can be extended at later date.
420  *
421  * Since: 2.26
422  */
423
424
425 /**
426  * GBindingTransformFunc:
427  * @binding: a #GBinding
428  * @source_value: the value of the source property
429  * @target_value: the value of the target property
430  * @user_data: data passed to the transform function
431  *
432  * A function to be called to transform the source property of @source
433  * from @source_value into the target property of @target
434  * using @target_value.
435  * otherwise
436  *
437  * Returns: %TRUE if the transformation was successful, and %FALSE
438  * Since: 2.26
439  */
440
441
442 /**
443  * GBookmarkFile:
444  *
445  * The <structname>GBookmarkFile</structname> struct contains only
446  * private data and should not be directly accessed.
447  */
448
449
450 /**
451  * GBookmarkFileError:
452  * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed
453  * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found
454  * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did not register a bookmark
455  * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found
456  * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed
457  * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an unknown encoding
458  * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing
459  * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found
460  *
461  * Error codes returned by bookmark file parsing.
462  */
463
464
465 /**
466  * GBoxedCopyFunc:
467  * @boxed: The boxed structure to be copied.
468  *
469  * This function is provided by the user and should produce a copy
470  * of the passed in boxed structure.
471  *
472  * Returns: The newly created copy of the boxed structure.
473  */
474
475
476 /**
477  * GBoxedFreeFunc:
478  * @boxed: The boxed structure to be freed.
479  *
480  * This function is provided by the user and should free the boxed
481  * structure passed.
482  */
483
484
485 /**
486  * GBufferedInputStream:
487  *
488  * Implements #GFilterInputStream with a sized input buffer.
489  */
490
491
492 /**
493  * GBufferedOutputStream:
494  *
495  * An implementation of #GFilterOutputStream with a sized buffer.
496  */
497
498
499 /**
500  * GBusAcquiredCallback:
501  * @connection: The #GDBusConnection to a message bus.
502  * @name: The name that is requested to be owned.
503  * @user_data: User data passed to g_bus_own_name().
504  *
505  * Invoked when a connection to a message bus has been obtained.
506  *
507  * Since: 2.26
508  */
509
510
511 /**
512  * GBusNameAcquiredCallback:
513  * @connection: The #GDBusConnection on which to acquired the name.
514  * @name: The name being owned.
515  * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
516  *
517  * Invoked when the name is acquired.
518  *
519  * Since: 2.26
520  */
521
522
523 /**
524  * GBusNameAppearedCallback:
525  * @connection: The #GDBusConnection the name is being watched on.
526  * @name: The name being watched.
527  * @name_owner: Unique name of the owner of the name being watched.
528  * @user_data: User data passed to g_bus_watch_name().
529  *
530  * Invoked when the name being watched is known to have to have a owner.
531  *
532  * Since: 2.26
533  */
534
535
536 /**
537  * GBusNameLostCallback:
538  * @connection: The #GDBusConnection on which to acquire the name or %NULL if the connection was disconnected.
539  * @name: The name being owned.
540  * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
541  *
542  * Invoked when the name is lost or @connection has been closed.
543  *
544  * Since: 2.26
545  */
546
547
548 /**
549  * GBusNameOwnerFlags:
550  * @G_BUS_NAME_OWNER_FLAGS_NONE: No flags set.
551  * @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the the name.
552  * @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.
553  *
554  * Flags used in g_bus_own_name().
555  *
556  * Since: 2.26
557  */
558
559
560 /**
561  * GBusNameVanishedCallback:
562  * @connection: The #GDBusConnection the name is being watched on.
563  * @name: The name being watched.
564  * @user_data: User data passed to g_bus_watch_name().
565  *
566  * Invoked when the name being watched is known not to have to have a owner.
567  *
568  * Since: 2.26
569  */
570
571
572 /**
573  * GBusNameWatcherFlags:
574  * @G_BUS_NAME_WATCHER_FLAGS_NONE: No flags set.
575  * @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.
576  *
577  * Flags used in g_bus_watch_name().
578  *
579  * Since: 2.26
580  */
581
582
583 /**
584  * GBusType:
585  * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any.
586  * @G_BUS_TYPE_NONE: Not a message bus.
587  * @G_BUS_TYPE_SYSTEM: The system-wide message bus.
588  * @G_BUS_TYPE_SESSION: The login session message bus.
589  *
590  * An enumeration for well-known message buses.
591  *
592  * Since: 2.26
593  */
594
595
596 /**
597  * GCClosure:
598  * @closure: the #GClosure
599  * @callback: the callback function
600  *
601  * A #GCClosure is a specialization of #GClosure for C function callbacks.
602  */
603
604
605 /**
606  * GCallback:
607  *
608  * The type used for callback functions in structure definitions and function
609  * signatures. This doesn't mean that all callback functions must take no
610  * parameters and return void. The required signature of a callback function
611  * is determined by the context in which is used (e.g. the signal to which it
612  * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
613  */
614
615
616 /**
617  * GCancellable:
618  *
619  * Allows actions to be cancelled.
620  */
621
622
623 /**
624  * GCancellable::cancelled:
625  * @cancellable: a #GCancellable.
626  *
627  * Emitted when the operation has been cancelled.
628  * Can be used by implementations of cancellable operations. If the
629  * operation is cancelled from another thread, the signal will be
630  * emitted in the thread that cancelled the operation, not the
631  * thread that is running the operation.
632  * Note that disconnecting from this signal (or any signal) in a
633  * multi-threaded program is prone to race conditions. For instance
634  * it is possible that a signal handler may be invoked even
635  * <emphasis>after</emphasis> a call to
636  * g_signal_handler_disconnect() for that handler has already
637  * returned.
638  * There is also a problem when cancellation happen
639  * right before connecting to the signal. If this happens the
640  * signal will unexpectedly not be emitted, and checking before
641  * connecting to the signal leaves a race condition where this is
642  * still happening.
643  * In order to make it safe and easy to connect handlers there
644  * g_cancellable_disconnect() which protect against problems
645  * like this.
646  * An example of how to us this:
647  * |[
648  * /<!-- -->* Make sure we don't do any unnecessary work if already cancelled *<!-- -->/
649  * if (g_cancellable_set_error_if_cancelled (cancellable))
650  * return;
651  * /<!-- -->* Set up all the data needed to be able to
652  * * handle cancellation of the operation *<!-- -->/
653  * my_data = my_data_new (...);
654  * id = 0;
655  * if (cancellable)
656  * id = g_cancellable_connect (cancellable,
657  * G_CALLBACK (cancelled_handler)
658  * data, NULL);
659  * /<!-- -->* cancellable operation here... *<!-- -->/
660  * g_cancellable_disconnect (cancellable, id);
661  * /<!-- -->* cancelled_handler is never called after this, it
662  * * is now safe to free the data *<!-- -->/
663  * my_data_free (my_data);
664  * ]|
665  * Note that the cancelled signal is emitted in the thread that
666  * the user cancelled from, which may be the main thread. So, the
667  * cancellable signal should not do something that can block.
668  *
669  * Are two helper functions: g_cancellable_connect() and
670  */
671
672
673 /**
674  * GCancellableSourceFunc:
675  * @cancellable: the #GCancellable
676  * @user_data: data passed in by the user.
677  *
678  * This is the function type of the callback used for the #GSource
679  * returned by g_cancellable_source_new().
680  *
681  * Returns: it should return %FALSE if the source should be removed.
682  * Since: 2.28
683  */
684
685
686 /**
687  * GCharsetConverter:
688  *
689  * Conversions between character sets.
690  */
691
692
693 /**
694  * GChecksum:
695  *
696  * An opaque structure representing a checksumming operation.
697  * To create a new GChecksum, use g_checksum_new(). To free
698  * a GChecksum, use g_checksum_free().
699  *
700  * Since: 2.16
701  */
702
703
704 /**
705  * GChecksumType:
706  * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
707  * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
708  * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
709  *
710  * The hashing algorithm to be used by #GChecksum when performing the
711  * digest of some data.
712  * Note that the #GChecksumType enumeration may be extended at a later
713  * date to include new hashing algorithm types.
714  *
715  * Since: 2.16
716  */
717
718
719 /**
720  * GChildWatchFunc:
721  * @pid: the process id of the child process
722  * @status: Status information about the child process, see waitpid(2) for more information about this field
723  * @data: user data passed to g_child_watch_add()
724  *
725  * The type of functions to be called when a child exists.
726  */
727
728
729 /**
730  * GClassFinalizeFunc:
731  * @g_class: The #GTypeClass structure to finalize.
732  * @class_data: The @class_data member supplied via the #GTypeInfo structure.
733  *
734  * A callback function used by the type system to finalize a class.
735  * This function is rarely needed, as dynamically allocated class resources
736  * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
737  * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
738  * structure of a static type is invalid, because classes of static types
739  * will never be finalized (they are artificially kept alive when their
740  * reference count drops to zero).
741  */
742
743
744 /**
745  * GClassInitFunc:
746  * @g_class: The #GTypeClass structure to initialize.
747  * @class_data: The @class_data member supplied via the #GTypeInfo structure.
748  *
749  * A callback function used by the type system to initialize the class
750  * of a specific type. This function should initialize all static class
751  * members.
752  * The initialization process of a class involves:
753  * <itemizedlist>
754  * <listitem><para>
755  * 1 - Copying common members from the parent class over to the
756  * derived class structure.
757  * </para></listitem>
758  * <listitem><para>
759  * 2 -  Zero initialization of the remaining members not copied
760  * over from the parent class.
761  * </para></listitem>
762  * <listitem><para>
763  * 3 - Invocation of the GBaseInitFunc() initializers of all parent
764  * types and the class' type.
765  * </para></listitem>
766  * <listitem><para>
767  * 4 - Invocation of the class' GClassInitFunc() initializer.
768  * </para></listitem>
769  * </itemizedlist>
770  * Since derived classes are partially initialized through a memory copy
771  * of the parent class, the general rule is that GBaseInitFunc() and
772  * GBaseFinalizeFunc() should take care of necessary reinitialization
773  * and release of those class members that were introduced by the type
774  * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
775  * GClassInitFunc() should only care about initializing static
776  * class members, while dynamic class members (such as allocated strings
777  * or reference counted resources) are better handled by a GBaseInitFunc()
778  * for this type, so proper initialization of the dynamic class members
779  * is performed for class initialization of derived types as well.
780  * An example may help to correspond the intend of the different class
781  * initializers:
782  * |[
783  * typedef struct {
784  * GObjectClass parent_class;
785  * gint         static_integer;
786  * gchar       *dynamic_string;
787  * } TypeAClass;
788  * static void
789  * type_a_base_class_init (TypeAClass *class)
790  * {
791  * class->dynamic_string = g_strdup ("some string");
792  * }
793  * static void
794  * type_a_base_class_finalize (TypeAClass *class)
795  * {
796  * g_free (class->dynamic_string);
797  * }
798  * static void
799  * type_a_class_init (TypeAClass *class)
800  * {
801  * class->static_integer = 42;
802  * }
803  * typedef struct {
804  * TypeAClass   parent_class;
805  * gfloat       static_float;
806  * GString     *dynamic_gstring;
807  * } TypeBClass;
808  * static void
809  * type_b_base_class_init (TypeBClass *class)
810  * {
811  * class->dynamic_gstring = g_string_new ("some other string");
812  * }
813  * static void
814  * type_b_base_class_finalize (TypeBClass *class)
815  * {
816  * g_string_free (class->dynamic_gstring);
817  * }
818  * static void
819  * type_b_class_init (TypeBClass *class)
820  * {
821  * class->static_float = 3.14159265358979323846;
822  * }
823  * ]|
824  * Initialization of TypeBClass will first cause initialization of
825  * TypeAClass (derived classes reference their parent classes, see
826  * g_type_class_ref() on this).
827  * Initialization of TypeAClass roughly involves zero-initializing its fields,
828  * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
829  * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
830  * type_a_class_init() to initialize its static members (static_integer).
831  * The first step in the initialization process of TypeBClass is then
832  * a plain memory copy of the contents of TypeAClass into TypeBClass and
833  * zero-initialization of the remaining fields in TypeBClass.
834  * The dynamic members of TypeAClass within TypeBClass now need
835  * reinitialization which is performed by calling type_a_base_class_init()
836  * with an argument of TypeBClass.
837  * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
838  * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
839  * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
840  * is called to complete the initialization process with the static members
841  * (static_float).
842  * Corresponding finalization counter parts to the GBaseInitFunc() functions
843  * have to be provided to release allocated resources at class finalization
844  * time.
845  */
846
847
848 /**
849  * GClosure:
850  * @in_marshal: Indicates whether the closure is currently being invoked with g_closure_invoke()
851  * @is_invalid: Indicates whether the closure has been invalidated by g_closure_invalidate()
852  *
853  * A #GClosure represents a callback supplied by the programmer.
854  */
855
856
857 /**
858  * GClosureMarshal:
859  * @closure: the #GClosure to which the marshaller belongs
860  * @return_value: a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
861  * @n_param_values: the length of the @param_values array
862  * @param_values: an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
863  * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
864  * @marshal_data: additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
865  *
866  * The type used for marshaller functions.
867  */
868
869
870 /**
871  * GClosureNotify:
872  * @data: data specified when registering the notification callback
873  * @closure: the #GClosure on which the notification is emitted
874  *
875  * The type used for the various notification callbacks which can be registered
876  * on closures.
877  */
878
879
880 /**
881  * GConnectFlags:
882  * @G_CONNECT_AFTER: whether the handler should be called before or after the default handler of the signal.
883  * @G_CONNECT_SWAPPED: whether the instance and data should be swapped when calling the handler.
884  *
885  * The connection flags are used to specify the behaviour of a signal's
886  * connection.
887  */
888
889
890 /**
891  * GConvertError:
892  * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character sets is not supported.
893  * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input.
894  * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason.
895  * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input.
896  * @G_CONVERT_ERROR_BAD_URI: URI is invalid.
897  * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path.
898  *
899  * Error codes returned by character set conversion routines.
900  */
901
902
903 /**
904  * GConverter:
905  *
906  * Seek object for streaming operations.
907  *
908  * Since: 2.24
909  */
910
911
912 /**
913  * GConverterFlags:
914  * @G_CONVERTER_NO_FLAGS: No flags.
915  * @G_CONVERTER_INPUT_AT_END: At end of input data
916  * @G_CONVERTER_FLUSH: Flush data
917  *
918  * Flags used when calling a g_converter_convert().
919  *
920  * Since: 2.24
921  */
922
923
924 /**
925  * GConverterIface:
926  * @g_iface: The parent interface.
927  * @convert: Converts data.
928  * @reset: Reverts the internal state of the converter to its initial state.
929  *
930  * Provides an interface for converting data from one type
931  * to another type. The conversion can be stateful
932  * and may fail at any place.
933  *
934  * Since: 2.24
935  */
936
937
938 /**
939  * GConverterInputStream:
940  *
941  * An implementation of #GFilterInputStream that allows data
942  * conversion.
943  */
944
945
946 /**
947  * GConverterOutputStream:
948  *
949  * An implementation of #GFilterOutputStream that allows data
950  * conversion.
951  */
952
953
954 /**
955  * GConverterResult:
956  * @G_CONVERTER_ERROR: There was an error during conversion.
957  * @G_CONVERTER_CONVERTED: Some data was consumed or produced
958  * @G_CONVERTER_FINISHED: The conversion is finished
959  * @G_CONVERTER_FLUSHED: Flushing is finished
960  *
961  * Results returned from g_converter_convert().
962  *
963  * Since: 2.24
964  */
965
966
967 /**
968  * GCopyFunc:
969  * @src: A pointer to the data which should be copied
970  * @data: Additional data
971  *
972  * A function of this signature is used to copy the node data
973  * when doing a deep-copy of a tree.
974  *
975  * Returns: A pointer to the copy
976  * Since: 2.4
977  */
978
979
980 /**
981  * GCredentials:
982  *
983  * The #GCredentials structure contains only private data and
984  * should only be accessed using the provided API.
985  *
986  * Since: 2.26
987  */
988
989
990 /**
991  * GCredentialsClass:
992  *
993  * Class structure for #GCredentials.
994  *
995  * Since: 2.26
996  */
997
998
999 /**
1000  * GCredentialsType:
1001  * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type.
1002  * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a <type>struct ucred</type>.
1003  * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a <type>struct cmsgcred</type>.
1004  *
1005  * Enumeration describing different kinds of native credential types.
1006  *
1007  * Since: 2.26
1008  */
1009
1010
1011 /**
1012  * GDBusAnnotationInfo:
1013  * @ref_count: The reference count or -1 if statically allocated.
1014  * @key: The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".
1015  * @value: The value of the annotation.
1016  * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1017  *
1018  * Information about an annotation.
1019  *
1020  * Since: 2.26
1021  */
1022
1023
1024 /**
1025  * GDBusArgInfo:
1026  * @ref_count: The reference count or -1 if statically allocated.
1027  * @name: Name of the argument, e.g. @unix_user_id.
1028  * @signature: D-Bus signature of the argument (a single complete type).
1029  * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1030  *
1031  * Information about an argument for a method or a signal.
1032  *
1033  * Since: 2.26
1034  */
1035
1036
1037 /**
1038  * GDBusAuthMechanism:credentials:
1039  *
1040  * If authenticating as a server, this property contains the
1041  * received credentials, if any.
1042  * If authenticating as a client, the property contains the
1043  * credentials that were sent, if any.
1044  */
1045
1046
1047 /**
1048  * GDBusAuthObserver:
1049  *
1050  * The #GDBusAuthObserver structure contains only private data and
1051  * should only be accessed using the provided API.
1052  *
1053  * Since: 2.26
1054  */
1055
1056
1057 /**
1058  * GDBusAuthObserver::authorize-authenticated-peer:
1059  * @observer: The #GDBusAuthObserver emitting the signal.
1060  * @stream: A #GIOStream for the #GDBusConnection.
1061  * @credentials: Credentials received from the peer or %NULL.
1062  *
1063  * Emitted to check if a peer that is successfully authenticated
1064  * is authorized.
1065  *
1066  * Returns: %TRUE if the peer is authorized, %FALSE if not.
1067  * Since: 2.26
1068  */
1069
1070
1071 /**
1072  * GDBusAuthObserverClass:
1073  * @authorize_authenticated_peer: Signal class handler for the #GDBusAuthObserver::authorize-authenticated-peer signal.
1074  *
1075  * Class structure for #GDBusAuthObserverClass.
1076  *
1077  * Since: 2.26
1078  */
1079
1080
1081 /**
1082  * GDBusCallFlags:
1083  * @G_DBUS_CALL_FLAGS_NONE: No flags set.
1084  * @G_DBUS_CALL_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this method invocation.
1085  *
1086  * Flags used in g_dbus_connection_call() and similar APIs.
1087  *
1088  * Since: 2.26
1089  */
1090
1091
1092 /**
1093  * GDBusCapabilityFlags:
1094  * @G_DBUS_CAPABILITY_FLAGS_NONE: No flags set.
1095  * @G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING: The connection supports exchanging UNIX file descriptors with the remote peer.
1096  *
1097  * Capabilities negotiated with the remote peer.
1098  *
1099  * Since: 2.26
1100  */
1101
1102
1103 /**
1104  * GDBusConnection:
1105  *
1106  * The #GDBusConnection structure contains only private data and
1107  * should only be accessed using the provided API.
1108  *
1109  * Since: 2.26
1110  */
1111
1112
1113 /**
1114  * GDBusConnection::closed:
1115  * @connection: The #GDBusConnection emitting the signal.
1116  * @remote_peer_vanished: %TRUE if @connection is closed because the remote peer closed its end of the connection.
1117  * @error: A #GError with more details about the event or %NULL.
1118  *
1119  * Emitted when the connection is closed.
1120  * The cause of this event can be
1121  * <itemizedlist>
1122  * <listitem><para>
1123  * If g_dbus_connection_close() is called. In this case
1124  * </para></listitem>
1125  * <listitem><para>
1126  * If the remote peer closes the connection. In this case
1127  * </para></listitem>
1128  * <listitem><para>
1129  * If the remote peer sends invalid or malformed data. In this
1130  * case @remote_peer_vanished is set to %FALSE and @error
1131  * is set.
1132  * </para></listitem>
1133  * </itemizedlist>
1134  * Upon receiving this signal, you should give up your reference to
1135  * once.
1136  *
1137  * Since: 2.26
1138  */
1139
1140
1141 /**
1142  * GDBusConnection:address:
1143  *
1144  * A D-Bus address specifying potential endpoints that can be used
1145  * when establishing the connection.
1146  *
1147  * Since: 2.26
1148  */
1149
1150
1151 /**
1152  * GDBusConnection:authentication-observer:
1153  *
1154  * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
1155  *
1156  * Since: 2.26
1157  */
1158
1159
1160 /**
1161  * GDBusConnection:capabilities:
1162  *
1163  * Flags from the #GDBusCapabilityFlags enumeration
1164  * representing connection features negotiated with the other peer.
1165  *
1166  * Since: 2.26
1167  */
1168
1169
1170 /**
1171  * GDBusConnection:closed:
1172  *
1173  * A boolean specifying whether the connection has been closed.
1174  *
1175  * Since: 2.26
1176  */
1177
1178
1179 /**
1180  * GDBusConnection:exit-on-close:
1181  *
1182  * A boolean specifying whether the process will be terminated (by
1183  * calling <literal>raise(SIGTERM)</literal>) if the connection
1184  * is closed by the remote peer.
1185  *
1186  * Since: 2.26
1187  */
1188
1189
1190 /**
1191  * GDBusConnection:flags:
1192  *
1193  * Flags from the #GDBusConnectionFlags enumeration.
1194  *
1195  * Since: 2.26
1196  */
1197
1198
1199 /**
1200  * GDBusConnection:guid:
1201  *
1202  * The GUID of the peer performing the role of server when
1203  * authenticating.
1204  * If you are constructing a #GDBusConnection and pass
1205  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the
1206  * #GDBusConnection:flags property then you MUST also set this
1207  * property to a valid guid.
1208  * If you are constructing a #GDBusConnection and pass
1209  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
1210  * #GDBusConnection:flags property you will be able to read the GUID
1211  * of the other peer here after the connection has been successfully
1212  * initialized.
1213  *
1214  * Since: 2.26
1215  */
1216
1217
1218 /**
1219  * GDBusConnection:locked:
1220  *
1221  * A boolean specifying whether the message is locked.
1222  *
1223  * Since: 2.26
1224  */
1225
1226
1227 /**
1228  * GDBusConnection:stream:
1229  *
1230  * The underlying #GIOStream used for I/O.
1231  *
1232  * Since: 2.26
1233  */
1234
1235
1236 /**
1237  * GDBusConnection:unique-name:
1238  *
1239  * The unique name as assigned by the message bus or %NULL if the
1240  * connection is not open or not a message bus connection.
1241  *
1242  * Since: 2.26
1243  */
1244
1245
1246 /**
1247  * GDBusConnectionClass:
1248  * @closed: Signal class handler for the #GDBusConnection::closed signal.
1249  *
1250  * Class structure for #GDBusConnection.
1251  *
1252  * Since: 2.26
1253  */
1254
1255
1256 /**
1257  * GDBusConnectionFlags:
1258  * @G_DBUS_CONNECTION_FLAGS_NONE: No flags set.
1259  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT: Perform authentication against server.
1260  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER: Perform authentication against client.
1261  * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: When authenticating as a server, allow the anonymous authentication method.
1262  * @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.
1263  * @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.
1264  *
1265  * Flags used when creating a new #GDBusConnection.
1266  *
1267  * Since: 2.26
1268  */
1269
1270
1271 /**
1272  * GDBusError:
1273  *
1274  * A generic error; "something went wrong" - see the error message for
1275  * more.
1276  * There was not enough memory to complete an operation.
1277  * The bus doesn't know how to launch a service to supply the bus name
1278  * you wanted.
1279  * The bus name you referenced doesn't exist (i.e. no application owns
1280  * it).
1281  * No reply to a message expecting one, usually means a timeout occurred.
1282  * Something went wrong reading or writing to a socket, for example.
1283  * A D-Bus bus address was malformed.
1284  * Requested operation isn't supported (like ENOSYS on UNIX).
1285  * Some limited resource is exhausted.
1286  * Security restrictions don't allow doing what you're trying to do.
1287  * Authentication didn't work.
1288  * Unable to connect to server (probably caused by ECONNREFUSED on a
1289  * socket).
1290  * Certain timeout errors, possibly ETIMEDOUT on a socket.  Note that
1291  * %G_DBUS_ERROR_NO_REPLY is used for message reply timeouts. Warning:
1292  * this is confusingly-named given that %G_DBUS_ERROR_TIMED_OUT also
1293  * exists. We can't fix it for compatibility reasons so just be
1294  * careful.
1295  * No network access (probably ENETUNREACH on a socket).
1296  * Can't bind a socket since its address is in use (i.e. EADDRINUSE).
1297  * The connection is disconnected and you're trying to use it.
1298  * Invalid arguments passed to a method call.
1299  * Missing file.
1300  * Existing file and the operation you're using does not silently overwrite.
1301  * Method name you invoked isn't known by the object you invoked it on.
1302  * confusingly-named given that %G_DBUS_ERROR_TIMEOUT also exists. We
1303  * can't fix it for compatibility reasons so just be careful.
1304  * Tried to remove or modify a match rule that didn't exist.
1305  * The match rule isn't syntactically valid.
1306  * While starting a new process, the exec() call failed.
1307  * While starting a new process, the fork() call failed.
1308  * While starting a new process, the child exited with a status code.
1309  * While starting a new process, the child exited on a signal.
1310  * While starting a new process, something went wrong.
1311  * We failed to setup the environment correctly.
1312  * We failed to setup the config parser correctly.
1313  * Bus name was not valid.
1314  * Service file not found in system-services directory.
1315  * Permissions are incorrect on the setuid helper.
1316  * Service file invalid (Name, User or Exec missing).
1317  * Tried to get a UNIX process ID and it wasn't available.
1318  * Tried to get a UNIX process ID and it wasn't available.
1319  * A type signature is not valid.
1320  * A file contains invalid syntax or is otherwise broken.
1321  * Asked for SELinux security context and it wasn't available.
1322  * Asked for ADT audit data and it wasn't available.
1323  * There's already an object with the requested object path.
1324  * Error codes for the %G_DBUS_ERROR error domain.
1325  *
1326  * Certain timeout errors, e.g. while starting a service. warning: this is
1327  * Since: 2.26
1328  */
1329
1330
1331 /**
1332  * GDBusErrorEntry:
1333  * @error_code: An error code.
1334  * @dbus_error_name: The D-Bus error name to associate with @error_code.
1335  *
1336  * Struct used in g_dbus_error_register_error_domain().
1337  *
1338  * Since: 2.26
1339  */
1340
1341
1342 /**
1343  * GDBusInterfaceGetPropertyFunc:
1344  * @connection: A #GDBusConnection.
1345  * @sender: The unique bus name of the remote caller.
1346  * @object_path: The object path that the method was invoked on.
1347  * @interface_name: The D-Bus interface name for the property.
1348  * @property_name: The name of the property to get the value of.
1349  * @error: Return location for error.
1350  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1351  *
1352  * The type of the @get_property function in #GDBusInterfaceVTable.
1353  * consumed - otherwise its reference count is decreased by one.
1354  *
1355  * Returns: A #GVariant with the value for @property_name or %NULL if
1356  * Since: 2.26
1357  */
1358
1359
1360 /**
1361  * GDBusInterfaceInfo:
1362  * @ref_count: The reference count or -1 if statically allocated.
1363  * @name: The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".
1364  * @methods: A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods.
1365  * @signals: A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals.
1366  * @properties: A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties.
1367  * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1368  *
1369  * Information about a D-Bus interface.
1370  *
1371  * Since: 2.26
1372  */
1373
1374
1375 /**
1376  * GDBusInterfaceMethodCallFunc:
1377  * @connection: A #GDBusConnection.
1378  * @sender: The unique bus name of the remote caller.
1379  * @object_path: The object path that the method was invoked on.
1380  * @interface_name: The D-Bus interface name the method was invoked on.
1381  * @method_name: The name of the method that was invoked.
1382  * @parameters: A #GVariant tuple with parameters.
1383  * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
1384  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1385  *
1386  * The type of the @method_call function in #GDBusInterfaceVTable.
1387  *
1388  * Since: 2.26
1389  */
1390
1391
1392 /**
1393  * GDBusInterfaceSetPropertyFunc:
1394  * @connection: A #GDBusConnection.
1395  * @sender: The unique bus name of the remote caller.
1396  * @object_path: The object path that the method was invoked on.
1397  * @interface_name: The D-Bus interface name for the property.
1398  * @property_name: The name of the property to get the value of.
1399  * @value: The value to set the property to.
1400  * @error: Return location for error.
1401  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1402  *
1403  * The type of the @set_property function in #GDBusInterfaceVTable.
1404  *
1405  * Returns: %TRUE if the property was set to @value, %FALSE if @error is set.
1406  * Since: 2.26
1407  */
1408
1409
1410 /**
1411  * GDBusInterfaceVTable:
1412  * @method_call: Function for handling incoming method calls.
1413  * @get_property: Function for getting a property.
1414  * @set_property: Function for setting a property.
1415  *
1416  * Virtual table for handling properties and method calls for a D-Bus
1417  * interface.
1418  * If you want to handle getting/setting D-Bus properties asynchronously, simply
1419  * register an object with the <literal>org.freedesktop.DBus.Properties</literal>
1420  * D-Bus interface using g_dbus_connection_register_object().
1421  *
1422  * Since: 2.26
1423  */
1424
1425
1426 /**
1427  * GDBusMessage:
1428  *
1429  * The #GDBusMessage structure contains only private data and should
1430  * only be accessed using the provided API.
1431  *
1432  * Since: 2.26
1433  */
1434
1435
1436 /**
1437  * GDBusMessageByteOrder:
1438  * @G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN: The byte order is big endian.
1439  * @G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN: The byte order is little endian.
1440  *
1441  * Enumeration used to describe the byte order of a D-Bus message.
1442  *
1443  * Since: 2.26
1444  */
1445
1446
1447 /**
1448  * GDBusMessageClass:
1449  *
1450  * Class structure for #GDBusMessage.
1451  *
1452  * Since: 2.26
1453  */
1454
1455
1456 /**
1457  * GDBusMessageFilterFunction:
1458  * @connection: (transfer none): A #GDBusConnection.
1459  * @message: (transfer full): A locked #GDBusMessage that the filter function takes ownership of.
1460  * @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.
1461  * @user_data: User data passed when adding the filter.
1462  *
1463  * Signature for function used in g_dbus_connection_add_filter().
1464  * A filter function is passed a #GDBusMessage and expected to return
1465  * a #GDBusMessage too. Passive filter functions that don't modify the
1466  * message can simply return the @message object:
1467  * |[
1468  * static GDBusMessage *
1469  * passive_filter (GDBusConnection *connection
1470  * GDBusMessage    *message,
1471  * gboolean         incoming,
1472  * gpointer         user_data)
1473  * {
1474  * /<!-- -->* inspect @message *<!-- -->/
1475  * return message;
1476  * }
1477  * ]|
1478  * Filter functions that wants to drop a message can simply return %NULL:
1479  * |[
1480  * static GDBusMessage *
1481  * drop_filter (GDBusConnection *connection
1482  * GDBusMessage    *message,
1483  * gboolean         incoming,
1484  * gpointer         user_data)
1485  * {
1486  * if (should_drop_message)
1487  * {
1488  * g_object_unref (message);
1489  * message = NULL;
1490  * }
1491  * return message;
1492  * }
1493  * ]|
1494  * Finally, a filter function may modify a message by copying it:
1495  * |[
1496  * static GDBusMessage *
1497  * modifying_filter (GDBusConnection *connection
1498  * GDBusMessage    *message,
1499  * gboolean         incoming,
1500  * gpointer         user_data)
1501  * {
1502  * GDBusMessage *copy;
1503  * GError *error;
1504  * error = NULL;
1505  * copy = g_dbus_message_copy (message, &error);
1506  * /<!-- -->* handle @error being is set *<!-- -->/
1507  * g_object_unref (message);
1508  * /<!-- -->* modify @copy *<!-- -->/
1509  * return copy;
1510  * }
1511  * ]|
1512  * If the returned #GDBusMessage is different from @message and cannot
1513  * be sent on @connection (it could use features, such as file
1514  * descriptors, not compatible with @connection), then a warning is
1515  * logged to <emphasis>standard error</emphasis>. Applications can
1516  * check this ahead of time using g_dbus_message_to_blob() passing a
1517  * #GDBusCapabilityFlags value obtained from @connection.
1518  * g_object_unref() or %NULL to drop the message. Passive filter
1519  * functions can simply return the passed @message object.
1520  *
1521  * Returns: (transfer full) (allow-none): A #GDBusMessage that will be freed with
1522  * Since: 2.26
1523  */
1524
1525
1526 /**
1527  * GDBusMessageFlags:
1528  * @G_DBUS_MESSAGE_FLAGS_NONE: No flags set.
1529  * @G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED: A reply is not expected.
1530  * @G_DBUS_MESSAGE_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this message.
1531  *
1532  * Message flags used in #GDBusMessage.
1533  *
1534  * Since: 2.26
1535  */
1536
1537
1538 /**
1539  * GDBusMessageHeaderField:
1540  * @G_DBUS_MESSAGE_HEADER_FIELD_INVALID: Not a valid header field.
1541  * @G_DBUS_MESSAGE_HEADER_FIELD_PATH: The object path.
1542  * @G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE: The interface name.
1543  * @G_DBUS_MESSAGE_HEADER_FIELD_MEMBER: The method or signal name.
1544  * @G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME: The name of the error that occurred.
1545  * @G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL: The serial number the message is a reply to.
1546  * @G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION: The name the message is intended for.
1547  * @G_DBUS_MESSAGE_HEADER_FIELD_SENDER: Unique name of the sender of the message (filled in by the bus).
1548  * @G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE: The signature of the message body.
1549  * @G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS: The number of UNIX file descriptors that accompany the message.
1550  *
1551  * Header fields used in #GDBusMessage.
1552  *
1553  * Since: 2.26
1554  */
1555
1556
1557 /**
1558  * GDBusMessageType:
1559  * @G_DBUS_MESSAGE_TYPE_INVALID: Message is of invalid type.
1560  * @G_DBUS_MESSAGE_TYPE_METHOD_CALL: Method call.
1561  * @G_DBUS_MESSAGE_TYPE_METHOD_RETURN: Method reply.
1562  * @G_DBUS_MESSAGE_TYPE_ERROR: Error reply.
1563  * @G_DBUS_MESSAGE_TYPE_SIGNAL: Signal emission.
1564  *
1565  * Message types used in #GDBusMessage.
1566  *
1567  * Since: 2.26
1568  */
1569
1570
1571 /**
1572  * GDBusMethodInfo:
1573  * @ref_count: The reference count or -1 if statically allocated.
1574  * @name: The name of the D-Bus method, e.g. @RequestName.
1575  * @in_args: A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no in arguments.
1576  * @out_args: A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no out arguments.
1577  * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1578  *
1579  * Information about a method on an D-Bus interface.
1580  *
1581  * Since: 2.26
1582  */
1583
1584
1585 /**
1586  * GDBusMethodInvocation:
1587  *
1588  * The #GDBusMethodInvocation structure contains only private data and
1589  * should only be accessed using the provided API.
1590  *
1591  * Since: 2.26
1592  */
1593
1594
1595 /**
1596  * GDBusMethodInvocationClass:
1597  *
1598  * Class structure for #GDBusMethodInvocation.
1599  *
1600  * Since: 2.26
1601  */
1602
1603
1604 /**
1605  * GDBusNodeInfo:
1606  * @ref_count: The reference count or -1 if statically allocated.
1607  * @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.
1608  * @interfaces: A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces.
1609  * @nodes: A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes.
1610  * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1611  *
1612  * Information about nodes in a remote object hierarchy.
1613  *
1614  * Since: 2.26
1615  */
1616
1617
1618 /**
1619  * GDBusPropertyInfo:
1620  * @ref_count: The reference count or -1 if statically allocated.
1621  * @name: The name of the D-Bus property, e.g. "SupportedFilesystems".
1622  * @signature: The D-Bus signature of the property (a single complete type).
1623  * @flags: Access control flags for the property.
1624  * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1625  *
1626  * Information about a D-Bus property on a D-Bus interface.
1627  *
1628  * Since: 2.26
1629  */
1630
1631
1632 /**
1633  * GDBusPropertyInfoFlags:
1634  * @G_DBUS_PROPERTY_INFO_FLAGS_NONE: No flags set.
1635  * @G_DBUS_PROPERTY_INFO_FLAGS_READABLE: Property is readable.
1636  * @G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE: Property is writable.
1637  *
1638  * Flags describing the access control of a D-Bus property.
1639  *
1640  * Since: 2.26
1641  */
1642
1643
1644 /**
1645  * GDBusProxy:
1646  *
1647  * The #GDBusProxy structure contains only private data and
1648  * should only be accessed using the provided API.
1649  *
1650  * Since: 2.26
1651  */
1652
1653
1654 /**
1655  * GDBusProxy::g-properties-changed:
1656  * @proxy: The #GDBusProxy emitting the signal.
1657  * @changed_properties: A #GVariant containing the properties that changed
1658  * @invalidated_properties: A %NULL terminated array of properties that was invalidated
1659  *
1660  * Emitted when one or more D-Bus properties on @proxy changes. The
1661  * local cache has already been updated when this signal fires. Note
1662  * that both @changed_properties and @invalidated_properties are
1663  * guaranteed to never be %NULL (either may be empty though).
1664  * This signal corresponds to the
1665  * <literal>PropertiesChanged</literal> D-Bus signal on the
1666  * <literal>org.freedesktop.DBus.Properties</literal> interface.
1667  *
1668  * Since: 2.26
1669  */
1670
1671
1672 /**
1673  * GDBusProxy::g-signal:
1674  * @proxy: The #GDBusProxy emitting the signal.
1675  * @sender_name: The sender of the signal or %NULL if the connection is not a bus connection.
1676  * @signal_name: The name of the signal.
1677  * @parameters: A #GVariant tuple with parameters for the signal.
1678  *
1679  * Emitted when a signal from the remote object and interface that @proxy is for, has been received.
1680  *
1681  * Since: 2.26
1682  */
1683
1684
1685 /**
1686  * GDBusProxy:g-bus-type:
1687  *
1688  * If this property is not %G_BUS_TYPE_NONE, then
1689  * #GDBusProxy:g-connection must be %NULL and will be set to the
1690  * #GDBusConnection obtained by calling g_bus_get() with the value
1691  * of this property.
1692  *
1693  * Since: 2.26
1694  */
1695
1696
1697 /**
1698  * GDBusProxy:g-connection:
1699  *
1700  * The #GDBusConnection the proxy is for.
1701  *
1702  * Since: 2.26
1703  */
1704
1705
1706 /**
1707  * GDBusProxy:g-default-timeout:
1708  *
1709  * The timeout to use if -1 (specifying default timeout) is passed
1710  * as @timeout_msec in the g_dbus_proxy_call() and
1711  * g_dbus_proxy_call_sync() functions.
1712  * This allows applications to set a proxy-wide timeout for all
1713  * remote method invocations on the proxy. If this property is -1,
1714  * the default timeout (typically 25 seconds) is used. If set to
1715  * %G_MAXINT, then no timeout is used.
1716  *
1717  * Since: 2.26
1718  */
1719
1720
1721 /**
1722  * GDBusProxy:g-flags:
1723  *
1724  * Flags from the #GDBusProxyFlags enumeration.
1725  *
1726  * Since: 2.26
1727  */
1728
1729
1730 /**
1731  * GDBusProxy:g-interface-info:
1732  *
1733  * Ensure that interactions with this proxy conform to the given
1734  * interface.  For example, when completing a method call, if the
1735  * type signature of the message isn't what's expected, the given
1736  * #GError is set.  Signals that have a type signature mismatch are
1737  * simply dropped.
1738  *
1739  * Since: 2.26
1740  */
1741
1742
1743 /**
1744  * GDBusProxy:g-interface-name:
1745  *
1746  * The D-Bus interface name the proxy is for.
1747  *
1748  * Since: 2.26
1749  */
1750
1751
1752 /**
1753  * GDBusProxy:g-name:
1754  *
1755  * The well-known or unique name that the proxy is for.
1756  *
1757  * Since: 2.26
1758  */
1759
1760
1761 /**
1762  * GDBusProxy:g-name-owner:
1763  *
1764  * The unique name that owns #GDBusProxy:name or %NULL if no-one
1765  * currently owns that name. You may connect to #GObject::notify signal to
1766  * track changes to this property.
1767  *
1768  * Since: 2.26
1769  */
1770
1771
1772 /**
1773  * GDBusProxy:g-object-path:
1774  *
1775  * The object path the proxy is for.
1776  *
1777  * Since: 2.26
1778  */
1779
1780
1781 /**
1782  * GDBusProxyClass:
1783  * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal.
1784  * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal.
1785  *
1786  * Class structure for #GDBusProxy.
1787  *
1788  * Since: 2.26
1789  */
1790
1791
1792 /**
1793  * GDBusProxyFlags:
1794  * @G_DBUS_PROXY_FLAGS_NONE: No flags set.
1795  * @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties.
1796  * @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object.
1797  * @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.
1798  *
1799  * Flags used when constructing an instance of a #GDBusProxy derived class.
1800  *
1801  * Since: 2.26
1802  */
1803
1804
1805 /**
1806  * GDBusSendMessageFlags:
1807  * @G_DBUS_SEND_MESSAGE_FLAGS_NONE: No flags set.
1808  * @G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL: Do not automatically assign a serial number from the #GDBusConnection object when sending a message.
1809  *
1810  * Flags used when sending #GDBusMessage<!-- -->s on a #GDBusConnection.
1811  *
1812  * Since: 2.26
1813  */
1814
1815
1816 /**
1817  * GDBusServer:
1818  *
1819  * The #GDBusServer structure contains only private data and
1820  * should only be accessed using the provided API.
1821  *
1822  * Since: 2.26
1823  */
1824
1825
1826 /**
1827  * GDBusServer::new-connection:
1828  * @server: The #GDBusServer emitting the signal.
1829  * @connection: A #GDBusConnection for the new connection.
1830  *
1831  * Emitted when a new authenticated connection has been made. Use
1832  * g_dbus_connection_get_peer_credentials() to figure out what
1833  * identity (if any), was authenticated.
1834  * If you want to accept the connection, take a reference to the
1835  * connection call g_dbus_connection_close() and give up your
1836  * reference. Note that the other peer may disconnect at any time -
1837  * a typical thing to do when accepting a connection is to listen to
1838  * the #GDBusConnection::closed signal.
1839  * If #GDBusServer:flags contains %G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
1840  * then the signal is emitted in a new thread dedicated to the
1841  * connection. Otherwise the signal is emitted in the <link
1842  * linkend="g-main-context-push-thread-default">thread-default main
1843  * loop</link> of the thread that @server was constructed in.
1844  * You are guaranteed that signal handlers for this signal runs
1845  * before incoming messages on @connection are processed. This means
1846  * that it's suitable to call g_dbus_connection_register_object() or
1847  * similar from the signal handler.
1848  * run.
1849  *
1850  * Returns: %TRUE to claim @connection, %FALSE to let other handlers
1851  * Since: 2.26
1852  */
1853
1854
1855 /**
1856  * GDBusServer:active:
1857  *
1858  * Whether the server is currently active.
1859  *
1860  * Since: 2.26
1861  */
1862
1863
1864 /**
1865  * GDBusServer:address:
1866  *
1867  * The D-Bus address to listen on.
1868  *
1869  * Since: 2.26
1870  */
1871
1872
1873 /**
1874  * GDBusServer:authentication-observer:
1875  *
1876  * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
1877  *
1878  * Since: 2.26
1879  */
1880
1881
1882 /**
1883  * GDBusServer:client-address:
1884  *
1885  * The D-Bus address that clients can use.
1886  *
1887  * Since: 2.26
1888  */
1889
1890
1891 /**
1892  * GDBusServer:flags:
1893  *
1894  * Flags from the #GDBusServerFlags enumeration.
1895  *
1896  * Since: 2.26
1897  */
1898
1899
1900 /**
1901  * GDBusServer:guid:
1902  *
1903  * The guid of the server.
1904  *
1905  * Since: 2.26
1906  */
1907
1908
1909 /**
1910  * GDBusServerClass:
1911  * @new_connection: Signal class handler for the #GDBusServer::new-connection signal.
1912  *
1913  * Class structure for #GDBusServer.
1914  *
1915  * Since: 2.26
1916  */
1917
1918
1919 /**
1920  * GDBusServerFlags:
1921  * @G_DBUS_SERVER_FLAGS_NONE: No flags set.
1922  * @G_DBUS_SERVER_FLAGS_RUN_IN_THREAD: All #GDBusServer::new-connection signals will run in separated dedicated threads (see signal for details).
1923  * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: Allow the anonymous authentication method.
1924  *
1925  * Flags used when creating a #GDBusServer.
1926  *
1927  * Since: 2.26
1928  */
1929
1930
1931 /**
1932  * GDBusSignalCallback:
1933  * @connection: A #GDBusConnection.
1934  * @sender_name: The unique bus name of the sender of the signal.
1935  * @object_path: The object path that the signal was emitted on.
1936  * @interface_name: The name of the interface.
1937  * @signal_name: The name of the signal.
1938  * @parameters: A #GVariant tuple with parameters for the signal.
1939  * @user_data: User data passed when subscribing to the signal.
1940  *
1941  * Signature for callback function used in g_dbus_connection_signal_subscribe().
1942  *
1943  * Since: 2.26
1944  */
1945
1946
1947 /**
1948  * GDBusSignalFlags:
1949  * @G_DBUS_SIGNAL_FLAGS_NONE: No flags set.
1950  * @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).
1951  *
1952  * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe().
1953  *
1954  * Since: 2.26
1955  */
1956
1957
1958 /**
1959  * GDBusSignalInfo:
1960  * @ref_count: The reference count or -1 if statically allocated.
1961  * @name: The name of the D-Bus signal, e.g. "NameOwnerChanged".
1962  * @args: A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments.
1963  * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1964  *
1965  * Information about a signal on a D-Bus interface.
1966  *
1967  * Since: 2.26
1968  */
1969
1970
1971 /**
1972  * GDBusSubtreeDispatchFunc:
1973  * @connection: A #GDBusConnection.
1974  * @sender: The unique bus name of the remote caller.
1975  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
1976  * @interface_name: The D-Bus interface name that the method call or property access is for.
1977  * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
1978  * @out_user_data: Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL).
1979  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
1980  *
1981  * The type of the @dispatch function in #GDBusSubtreeVTable.
1982  * Subtrees are flat.  @node, if non-%NULL, is always exactly one
1983  *
1984  * Segment of the object path (ie: it never contains a slash).
1985  * Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.
1986  * Since: 2.26
1987  */
1988
1989
1990 /**
1991  * GDBusSubtreeEnumerateFunc:
1992  * @connection: A #GDBusConnection.
1993  * @sender: The unique bus name of the remote caller.
1994  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
1995  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
1996  *
1997  * The type of the @enumerate function in #GDBusSubtreeVTable.
1998  * This function is called when generating introspection data and also
1999  * when preparing to dispatch incoming messages in the event that the
2000  * %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not
2001  * Hierarchies are not supported; the items that you return should not
2002  * contain the '/' character.
2003  * The return value will be freed with g_strfreev().
2004  *
2005  * Specified (ie: to verify that the object path is valid).
2006  * Returns: A newly allocated array of strings for node names that are children of @object_path.
2007  * Since: 2.26
2008  */
2009
2010
2011 /**
2012  * GDBusSubtreeFlags:
2013  * @G_DBUS_SUBTREE_FLAGS_NONE: No flags set.
2014  * @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.
2015  *
2016  * Flags passed to g_dbus_connection_register_subtree().
2017  *
2018  * Since: 2.26
2019  */
2020
2021
2022 /**
2023  * GDBusSubtreeIntrospectFunc:
2024  * @connection: A #GDBusConnection.
2025  * @sender: The unique bus name of the remote caller.
2026  * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2027  * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
2028  * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2029  *
2030  * The type of the @introspect function in #GDBusSubtreeVTable.
2031  * Subtrees are flat.  @node, if non-%NULL, is always exactly one
2032  * This function should return %NULL to indicate that there is no object
2033  * at this node.
2034  * If this function returns non-%NULL, the return value is expected to
2035  * be a %NULL-terminated array of pointers to #GDBusInterfaceInfo
2036  * structures describing the interfaces implemented by @node.  This
2037  * array will have g_dbus_interface_info_unref() called on each item
2038  * before being freed with g_free().
2039  * The difference between returning %NULL and an array containing zero
2040  * items is that the standard DBus interfaces will returned to the
2041  * remote introspector in the empty array case, but not in the %NULL
2042  * case.
2043  *
2044  * Segment of the object path (ie: it never contains a slash).
2045  * Returns: A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL.
2046  * Since: 2.26
2047  */
2048
2049
2050 /**
2051  * GDBusSubtreeVTable:
2052  * @enumerate: Function for enumerating child nodes.
2053  * @introspect: Function for introspecting a child node.
2054  * @dispatch: Function for dispatching a remote call on a child node.
2055  *
2056  * Virtual table for handling subtrees registered with g_dbus_connection_register_subtree().
2057  *
2058  * Since: 2.26
2059  */
2060
2061
2062 /**
2063  * GDataInputStream:
2064  *
2065  * An implementation of #GBufferedInputStream that allows for high-level
2066  * data manipulation of arbitrary data (including binary operations).
2067  */
2068
2069
2070 /**
2071  * GDataOutputStream:
2072  *
2073  * An implementation of #GBufferedOutputStream that allows for high-level
2074  * data manipulation of arbitrary data (including binary operations).
2075  */
2076
2077
2078 /**
2079  * GDataOutputStream:byte-order:
2080  *
2081  * Determines the byte ordering that is used when writing
2082  * multi-byte entities (such as integers) to the stream.
2083  */
2084
2085
2086 /**
2087  * GDataStream:byte-order:
2088  *
2089  * The ::byte-order property determines the byte ordering that
2090  * is used when reading multi-byte entities (such as integers)
2091  * from the stream.
2092  */
2093
2094
2095 /**
2096  * GDataStream:newline-type:
2097  *
2098  * The :newline-type property determines what is considered
2099  * as a line ending when reading complete lines from the stream.
2100  */
2101
2102
2103 /**
2104  * GDataStreamByteOrder:
2105  * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order.
2106  * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order.
2107  * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture.
2108  *
2109  * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources
2110  * across various machine architectures.
2111  */
2112
2113
2114 /**
2115  * GDataStreamNewlineType:
2116  * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms.
2117  * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings.
2118  * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows.
2119  * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type.
2120  *
2121  * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file.
2122  */
2123
2124
2125 /**
2126  * GDateTime:
2127  *
2128  * <structname>GDateTime</structname> is an opaque structure whose members
2129  * cannot be accessed directly.
2130  *
2131  * Since: 2.26
2132  */
2133
2134
2135 /**
2136  * GDesktopAppInfo:
2137  *
2138  * Information about an installed application from a desktop file.
2139  */
2140
2141
2142 /**
2143  * GDesktopAppInfoLookup:
2144  *
2145  * Interface that is used by backends to associate default
2146  * handlers with URI schemes.
2147  */
2148
2149
2150 /**
2151  * GDesktopAppLaunchCallback:
2152  * @appinfo: a #GDesktopAppInfo
2153  * @pid: Process identifier
2154  * @user_data: User data
2155  *
2156  * During invocation, g_desktop_app_info_launch_uris_as_manager() may
2157  * create one or more child processes.  This callback is invoked once
2158  * for each, providing the process ID.
2159  */
2160
2161
2162 /**
2163  * GDrive:
2164  *
2165  * Opaque drive object.
2166  */
2167
2168
2169 /**
2170  * GDrive::changed:
2171  * @drive: a #GDrive.
2172  *
2173  * Emitted when the drive's state has changed.
2174  */
2175
2176
2177 /**
2178  * GDrive::disconnected:
2179  * @drive: a #GDrive.
2180  *
2181  * This signal is emitted when the #GDrive have been
2182  * disconnected. If the recipient is holding references to the
2183  * object they should release them so the object can be
2184  * finalized.
2185  */
2186
2187
2188 /**
2189  * GDrive::eject-button:
2190  * @drive: a #GDrive.
2191  *
2192  * Emitted when the physical eject button (if any) of a drive has
2193  * been pressed.
2194  */
2195
2196
2197 /**
2198  * GDrive::stop-button:
2199  * @drive: a #GDrive.
2200  *
2201  * Emitted when the physical stop button (if any) of a drive has
2202  * been pressed.
2203  *
2204  * Since: 2.22
2205  */
2206
2207
2208 /**
2209  * GDriveIface:
2210  * @g_iface: The parent interface.
2211  * @changed: Signal emitted when the drive is changed.
2212  * @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.
2213  * @eject_button: Signal emitted when the physical eject button (if any) of a drive have been pressed.
2214  * @get_name: Returns the name for the given #GDrive.
2215  * @get_icon: Returns a #GIcon for the given #GDrive.
2216  * @has_volumes: Returns %TRUE if the #GDrive has mountable volumes.
2217  * @get_volumes: Returns a list #GList of #GVolume for the #GDrive.
2218  * @is_media_removable: Returns %TRUE if the #GDrive supports removal and insertion of media.
2219  * @has_media: Returns %TRUE if the #GDrive has media inserted.
2220  * @is_media_check_automatic: Returns %TRUE if the #GDrive is capabable of automatically detecting media changes.
2221  * @can_poll_for_media: Returns %TRUE if the #GDrive is capable of manually polling for media change.
2222  * @can_eject: Returns %TRUE if the #GDrive can eject media.
2223  * @eject: Ejects a #GDrive.
2224  * @eject_finish: Finishes an eject operation.
2225  * @poll_for_media: Poll for media insertion/removal on a #GDrive.
2226  * @poll_for_media_finish: Finishes a media poll operation.
2227  * @get_identifier: Returns the identifier of the given kind, or %NULL if the #GDrive doesn't have one.
2228  * @enumerate_identifiers: Returns an array strings listing the kinds of identifiers which the #GDrive has.
2229  * @get_start_stop_type: Gets a #GDriveStartStopType with details about starting/stopping the drive. Since 2.22.
2230  * @can_stop: Returns %TRUE if a #GDrive can be stopped. Since 2.22.
2231  * @stop: Stops a #GDrive. Since 2.22.
2232  * @stop_finish: Finishes a stop operation. Since 2.22.
2233  * @can_start: Returns %TRUE if a #GDrive can be started. Since 2.22.
2234  * @can_start_degraded: Returns %TRUE if a #GDrive can be started degraded. Since 2.22.
2235  * @start: Starts a #GDrive. Since 2.22.
2236  * @start_finish: Finishes a start operation. Since 2.22.
2237  * @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.
2238  * @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22.
2239  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
2240  *
2241  * Interface for creating #GDrive implementations.
2242  */
2243
2244
2245 /**
2246  * GDriveStartFlags:
2247  * @G_DRIVE_START_NONE: No flags set.
2248  *
2249  * Flags used when starting a drive.
2250  *
2251  * Since: 2.22
2252  */
2253
2254
2255 /**
2256  * GDriveStartStopType:
2257  * @G_DRIVE_START_STOP_TYPE_UNKNOWN: Unknown or drive doesn't support start/stop.
2258  * @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.
2259  * @G_DRIVE_START_STOP_TYPE_NETWORK: The start/stop methods are used for connecting/disconnect to the drive over the network.
2260  * @G_DRIVE_START_STOP_TYPE_MULTIDISK: The start/stop methods will assemble/disassemble a virtual drive from several physical drives.
2261  * @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)
2262  *
2263  * Enumeration describing how a drive can be started/stopped.
2264  *
2265  * Since: 2.22
2266  */
2267
2268
2269 /**
2270  * GEmblem:
2271  *
2272  * An object for Emblems
2273  */
2274
2275
2276 /**
2277  * GEmblemOrigin:
2278  * @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin
2279  * @G_EMBLEM_ORIGIN_DEVICE: Emblem adds device-specific information
2280  * @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly"
2281  * @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)
2282  *
2283  * GEmblemOrigin is used to add information about the origin of the emblem
2284  * to #GEmblem.
2285  *
2286  * Since: 2.18
2287  */
2288
2289
2290 /**
2291  * GEmblemedIcon:
2292  *
2293  * An implementation of #GIcon for icons with emblems.
2294  */
2295
2296
2297 /**
2298  * GEnumClass:
2299  * @g_type_class: the parent class
2300  * @minimum: the smallest possible value.
2301  * @maximum: the largest possible value.
2302  * @n_values: the number of possible values.
2303  * @values: an array of #GEnumValue structs describing the individual values.
2304  *
2305  * The class of an enumeration type holds information about its
2306  * possible values.
2307  */
2308
2309
2310 /**
2311  * GEnumValue:
2312  * @value: the enum value
2313  * @value_name: the name of the value
2314  * @value_nick: the nickname of the value
2315  *
2316  * A structure which contains a single enum value, its name, and its
2317  * nickname.
2318  */
2319
2320
2321 /**
2322  * GFile:
2323  *
2324  * A handle to an object implementing the #GFileIface interface.
2325  * Generally stores a location within the file system. Handles do not
2326  * necessarily represent files or directories that currently exist.
2327  */
2328
2329
2330 /**
2331  * GFileAttributeInfo:
2332  * @name: the name of the attribute.
2333  * @type: the #GFileAttributeType type of the attribute.
2334  * @flags: a set of #GFileAttributeInfoFlags.
2335  *
2336  * Information about a specific attribute.
2337  */
2338
2339
2340 /**
2341  * GFileAttributeInfoFlags:
2342  * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set.
2343  * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied.
2344  * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved.
2345  *
2346  * Flags specifying the behaviour of an attribute.
2347  */
2348
2349
2350 /**
2351  * GFileAttributeInfoList:
2352  * @infos: an array of #GFileAttributeInfo<!-- -->s.
2353  * @n_infos: the number of values in the array.
2354  *
2355  * Acts as a lightweight registry for possible valid file attributes.
2356  * The registry stores Key-Value pair formats as #GFileAttributeInfo<!-- -->s.
2357  */
2358
2359
2360 /**
2361  * GFileAttributeMatcher:
2362  *
2363  * Determines if a string matches a file attribute.
2364  */
2365
2366
2367 /**
2368  * GFileAttributeStatus:
2369  * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty).
2370  * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set.
2371  * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value.
2372  *
2373  * Used by g_file_set_attributes_from_info() when setting file attributes.
2374  */
2375
2376
2377 /**
2378  * GFileAttributeType:
2379  * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitalized type.
2380  * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string.
2381  * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes.
2382  * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value.
2383  * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer.
2384  * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer.
2385  * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer.
2386  * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer.
2387  * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject.
2388  * @G_FILE_ATTRIBUTE_TYPE_STRINGV: a %NULL terminated char **. Since 2.22
2389  *
2390  * The data types for file attributes.
2391  */
2392
2393
2394 /**
2395  * GFileCopyFlags:
2396  * @G_FILE_COPY_NONE: No flags set.
2397  * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
2398  * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
2399  * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
2400  * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
2401  * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
2402  * @G_FILE_COPY_TARGET_DEFAULT_PERMS: Leaves target file with default perms, instead of setting the source file perms.
2403  *
2404  * Flags used when copying or moving files.
2405  */
2406
2407
2408 /**
2409  * GFileCreateFlags:
2410  * @G_FILE_CREATE_NONE: No flags set.
2411  * @G_FILE_CREATE_PRIVATE: Create a file that can only be accessed by the current user.
2412  * @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
2413  *
2414  * Flags used when an operation may create a file.
2415  */
2416
2417
2418 /**
2419  * GFileDescriptorBased:
2420  *
2421  * An interface for file descriptor based io objects.
2422  */
2423
2424
2425 /**
2426  * GFileDescriptorBasedIface:
2427  * @g_iface: The parent interface.
2428  *
2429  *
2430  */
2431
2432
2433 /**
2434  * GFileEnumerator:
2435  *
2436  * A per matched file iterator.
2437  */
2438
2439
2440 /**
2441  * GFileIOStream:
2442  *
2443  * A subclass of GIOStream for opened files. This adds
2444  * a few file-specific operations and seeking and truncating.
2445  * #GFileIOStream implements GSeekable.
2446  */
2447
2448
2449 /**
2450  * GFileIcon:
2451  *
2452  * Gets an icon for a #GFile. Implements #GLoadableIcon.
2453  */
2454
2455
2456 /**
2457  * GFileIcon:file:
2458  *
2459  * The file containing the icon.
2460  */
2461
2462
2463 /**
2464  * GFileIface:
2465  * @g_iface: The parent interface.
2466  * @dup: Duplicates a #GFile.
2467  * @hash: Creates a hash of a #GFile.
2468  * @equal: Checks equality of two given #GFile<!-- -->s.
2469  * @is_native: Checks to see if a file is native to the system.
2470  * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
2471  * @get_uri_scheme: Gets the URI scheme for a #GFile.
2472  * @get_basename: Gets the basename for a given #GFile.
2473  * @get_path: Gets the current path within a #GFile.
2474  * @get_uri: Gets a URI for the path within a #GFile.
2475  * @get_parse_name: Gets the parsed name for the #GFile.
2476  * @get_parent: Gets the parent directory for the #GFile.
2477  * @prefix_matches: Checks whether a #GFile contains a specified file.
2478  * @get_relative_path: Gets the path for a #GFile relative to a given path.
2479  * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
2480  * @get_child_for_display_name: Gets the child #GFile for a given display name.
2481  * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
2482  * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
2483  * @enumerate_children_finish: Finishes asynchronously enumerating the children.
2484  * @query_info: Gets the #GFileInfo for a #GFile.
2485  * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
2486  * @query_info_finish: Finishes an asynchronous query info operation.
2487  * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
2488  * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
2489  * @query_filesystem_info_finish: Finishes asynchronously getting the file system info.
2490  * @find_enclosing_mount: Gets a #GMount for the #GFile.
2491  * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
2492  * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
2493  * @set_display_name: Sets the display name for a #GFile.
2494  * @set_display_name_async: Asynchronously sets a #GFile's display name.
2495  * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
2496  * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
2497  * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
2498  * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
2499  * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
2500  * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
2501  * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
2502  * @set_attribute: Sets a #GFileAttribute.
2503  * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
2504  * @set_attributes_async: Asynchronously sets a file's attributes.
2505  * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
2506  * @read_fn: Reads a file asynchronously.
2507  * @read_async: Asynchronously reads a file.
2508  * @read_finish: Finishes asynchronously reading a file.
2509  * @append_to: Writes to the end of a file.
2510  * @append_to_async: Asynchronously writes to the end of a file.
2511  * @append_to_finish: Finishes an asynchronous file append operation.
2512  * @create: Creates a new file.
2513  * @create_async: Asynchronously creates a file.
2514  * @create_finish: Finishes asynchronously creating a file.
2515  * @replace: Replaces the contents of a file.
2516  * @replace_async: Asynchronously replaces the contents of a file.
2517  * @replace_finish: Finishes asynchronously replacing a file.
2518  * @delete_file: Deletes a file.
2519  * @_delete_file_async: Asynchronously deletes a file.
2520  * @_delete_file_finish: Finishes an asynchronous delete.
2521  * @trash: Sends a #GFile to the Trash location.
2522  * @_trash_async: Asynchronously sends a #GFile to the Trash location.
2523  * @_trash_finish: Finishes an asynchronous file trashing operation.
2524  * @make_directory: Makes a directory.
2525  * @_make_directory_async: Asynchronously makes a directory.
2526  * @_make_directory_finish: Finishes making a directory asynchronously.
2527  * @make_symbolic_link: Makes a symbolic link.
2528  * @_make_symbolic_link_async: Asynchronously makes a symbolic link
2529  * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
2530  * @copy: Copies a file.
2531  * @copy_async: Asynchronously copies a file.
2532  * @copy_finish: Finishes an asynchronous copy operation.
2533  * @move: Moves a file.
2534  * @_move_async: Asynchronously moves a file.
2535  * @_move_finish: Finishes an asynchronous move operation.
2536  * @mount_mountable: Mounts a mountable object.
2537  * @mount_mountable_finish: Finishes a mounting operation.
2538  * @unmount_mountable: Unmounts a mountable object.
2539  * @unmount_mountable_finish: Finishes an unmount operation.
2540  * @eject_mountable: Ejects a mountable.
2541  * @eject_mountable_finish: Finishes an eject operation.
2542  * @mount_enclosing_volume: Mounts a specified location.
2543  * @mount_enclosing_volume_finish: Finishes mounting a specified location.
2544  * @monitor_dir: Creates a #GFileMonitor for the location.
2545  * @monitor_file: Creates a #GFileMonitor for the location.
2546  * @open_readwrite: Open file read/write. Since 2.22.
2547  * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22.
2548  * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22.
2549  * @create_readwrite: Creates file read/write. Since 2.22.
2550  * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22.
2551  * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22.
2552  * @replace_readwrite: Replaces file read/write. Since 2.22.
2553  * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22.
2554  * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22.
2555  * @start_mountable: Starts a mountable object. Since 2.22.
2556  * @start_mountable_finish: Finishes an start operation. Since 2.22.
2557  * @stop_mountable: Stops a mountable. Since 2.22.
2558  * @stop_mountable_finish: Finishes an stop operation. Since 2.22.
2559  * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22.
2560  * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22.
2561  * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22.
2562  * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22.
2563  * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
2564  * @poll_mountable: Polls a mountable object for media changes. Since 2.22.
2565  * @poll_mountable_finish: Finishes an poll operation for media changes. Since 2.22.
2566  *
2567  * An interface for writing VFS file handles.
2568  */
2569
2570
2571 /**
2572  * GFileInfo:
2573  *
2574  * Stores information about a file system object referenced by a #GFile.
2575  */
2576
2577
2578 /**
2579  * GFileInputStream:
2580  *
2581  * A subclass of GInputStream for opened files. This adds
2582  * a few file-specific operations and seeking.
2583  * #GFileInputStream implements #GSeekable.
2584  */
2585
2586
2587 /**
2588  * GFileMonitor:
2589  *
2590  * Watches for changes to a file.
2591  */
2592
2593
2594 /**
2595  * GFileMonitor::changed:
2596  * @monitor: a #GFileMonitor.
2597  * @file: a #GFile.
2598  * @other_file: a #GFile or #NULL.
2599  * @event_type: a #GFileMonitorEvent.
2600  *
2601  * Emitted when @file has been changed.
2602  * If using #G_FILE_MONITOR_SEND_MOVED flag and @event_type is
2603  * #G_FILE_MONITOR_SEND_MOVED, @file will be set to a #GFile containing the
2604  * old path, and @other_file will be set to a #GFile containing the new path.
2605  * In all the other cases, @other_file will be set to #NULL.
2606  */
2607
2608
2609 /**
2610  * GFileMonitorEvent:
2611  * @G_FILE_MONITOR_EVENT_CHANGED: a file changed.
2612  * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes.
2613  * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted.
2614  * @G_FILE_MONITOR_EVENT_CREATED: a file was created.
2615  * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed.
2616  * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted.
2617  * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted.
2618  * @G_FILE_MONITOR_EVENT_MOVED: the file was moved.
2619  *
2620  * Specifies what type of event a monitor event is.
2621  */
2622
2623
2624 /**
2625  * GFileMonitorFlags:
2626  * @G_FILE_MONITOR_NONE: No flags set.
2627  * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
2628  * @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).
2629  *
2630  * Flags used to set what a #GFileMonitor will watch for.
2631  */
2632
2633
2634 /**
2635  * GFileOutputStream:
2636  *
2637  * A subclass of GOutputStream for opened files. This adds
2638  * a few file-specific operations and seeking and truncating.
2639  * #GFileOutputStream implements GSeekable.
2640  */
2641
2642
2643 /**
2644  * GFileProgressCallback:
2645  * @current_num_bytes: the current number of bytes in the operation.
2646  * @total_num_bytes: the total number of bytes in the operation.
2647  * @user_data: user data passed to the callback.
2648  *
2649  * When doing file operations that may take a while, such as moving
2650  * a file or copying a file, a progress callback is used to pass how
2651  * far along that operation is to the application.
2652  */
2653
2654
2655 /**
2656  * GFileQueryInfoFlags:
2657  * @G_FILE_QUERY_INFO_NONE: No flags set.
2658  * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
2659  *
2660  * Flags used when querying a #GFileInfo.
2661  */
2662
2663
2664 /**
2665  * GFileReadMoreCallback:
2666  * @file_contents: the data as currently read.
2667  * @file_size: the size of the data currently read.
2668  * @callback_data: data passed to the callback.
2669  *
2670  * When loading the partial contents of a file with g_file_load_partial_contents_async(),
2671  * it may become necessary to determine if any more data from the file should be loaded.
2672  * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
2673  * should be read, or %FALSE otherwise.
2674  *
2675  * Returns: %TRUE if more data should be read back. %FALSE otherwise.
2676  */
2677
2678
2679 /**
2680  * GFileType:
2681  * @G_FILE_TYPE_UNKNOWN: File's type is unknown.
2682  * @G_FILE_TYPE_REGULAR: File handle represents a regular file.
2683  * @G_FILE_TYPE_DIRECTORY: File handle represents a directory.
2684  * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link (Unix systems).
2685  * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo, block device, or character device.
2686  * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems).
2687  * @G_FILE_TYPE_MOUNTABLE: File is a mountable location.
2688  *
2689  * Indicates the file's on-disk type.
2690  */
2691
2692
2693 /**
2694  * GFilenameCompleter:
2695  *
2696  * Completes filenames based on files that exist within the file system.
2697  */
2698
2699
2700 /**
2701  * GFilenameCompleter::got-completion-data:
2702  *
2703  * Emitted when the file name completion information comes available.
2704  */
2705
2706
2707 /**
2708  * GFilesystemPreviewType:
2709  * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it.
2710  * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files.
2711  * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files.
2712  *
2713  * Indicates a hint from the file system whether files should be
2714  * previewed in a file manager. Returned as the value of the key
2715  * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW.
2716  */
2717
2718
2719 /**
2720  * GFilterInputStream:
2721  *
2722  * A base class for all input streams that work on an underlying stream.
2723  */
2724
2725
2726 /**
2727  * GFilterOutputStream:
2728  *
2729  * A base class for all output streams that work on an underlying stream.
2730  */
2731
2732
2733 /**
2734  * GFlagsClass:
2735  * @g_type_class: the parent class
2736  * @mask: a mask covering all possible values.
2737  * @n_values: the number of possible values.
2738  * @values: an array of #GFlagsValue structs describing the individual values.
2739  *
2740  * The class of a flags type holds information about its
2741  * possible values.
2742  */
2743
2744
2745 /**
2746  * GFlagsValue:
2747  * @value: the flags value
2748  * @value_name: the name of the value
2749  * @value_nick: the nickname of the value
2750  *
2751  * A structure which contains a single flags value, its name, and its
2752  * nickname.
2753  */
2754
2755
2756 /**
2757  * GIOErrorEnum:
2758  * @G_IO_ERROR_FAILED: Generic error condition for when any operation fails.
2759  * @G_IO_ERROR_NOT_FOUND: File not found error.
2760  * @G_IO_ERROR_EXISTS: File already exists error.
2761  * @G_IO_ERROR_IS_DIRECTORY: File is a directory error.
2762  * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory.
2763  * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty.
2764  * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file.
2765  * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link.
2766  * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted.
2767  * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters.
2768  * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters.
2769  * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links.
2770  * @G_IO_ERROR_NO_SPACE: No space left on drive.
2771  * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument.
2772  * @G_IO_ERROR_PERMISSION_DENIED: Permission denied.
2773  * @G_IO_ERROR_NOT_SUPPORTED: Operation not supported for the current backend.
2774  * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted.
2775  * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted.
2776  * @G_IO_ERROR_CLOSED: File was closed.
2777  * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable.
2778  * @G_IO_ERROR_PENDING: Operations are still pending.
2779  * @G_IO_ERROR_READ_ONLY: File is read only.
2780  * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created.
2781  * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect.
2782  * @G_IO_ERROR_TIMED_OUT: Operation timed out.
2783  * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive.
2784  * @G_IO_ERROR_BUSY: File is busy.
2785  * @G_IO_ERROR_WOULD_BLOCK: Operation would block.
2786  * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
2787  * @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
2788  * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has already interacted with the user. Do not display any error dialog.
2789  * @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
2790  * @G_IO_ERROR_NOT_INITIALIZED: The object has not been initialized. Since 2.22
2791  * @G_IO_ERROR_ADDRESS_IN_USE: The requested address is already in use. Since 2.22
2792  * @G_IO_ERROR_PARTIAL_INPUT: Need more input to finish operation. Since 2.24
2793  * @G_IO_ERROR_INVALID_DATA: There input data was invalid. Since 2.24
2794  * @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.
2795  * @G_IO_ERROR_HOST_UNREACHABLE: Host unreachable. Since 2.26
2796  * @G_IO_ERROR_NETWORK_UNREACHABLE: Network unreachable. Since 2.26
2797  * @G_IO_ERROR_CONNECTION_REFUSED: Connection refused. Since 2.26
2798  * @G_IO_ERROR_PROXY_FAILED: Connection to proxy server failed. Since 2.26
2799  * @G_IO_ERROR_PROXY_AUTH_FAILED: Proxy authentication failed. Since 2.26
2800  * @G_IO_ERROR_PROXY_NEED_AUTH: Proxy server needs authentication. Since 2.26
2801  * @G_IO_ERROR_PROXY_NOT_ALLOWED: Proxy connection is not allowed by ruleset. Since 2.26
2802  *
2803  * Error codes returned by GIO functions.
2804  */
2805
2806
2807 /**
2808  * GIOModule:
2809  *
2810  * Opaque module base class for extending GIO.
2811  */
2812
2813
2814 /**
2815  * GIOSchedulerJob:
2816  *
2817  * Opaque class for definining and scheduling IO jobs.
2818  */
2819
2820
2821 /**
2822  * GIOSchedulerJobFunc:
2823  * @job: a #GIOSchedulerJob.
2824  * @cancellable: optional #GCancellable object, %NULL to ignore.
2825  * @user_data: the data to pass to callback function
2826  *
2827  * I/O Job function.
2828  * Note that depending on whether threads are available, the
2829  * #GIOScheduler may run jobs in separate threads or in an idle
2830  * in the mainloop.
2831  * Long-running jobs should periodically check the @cancellable
2832  * to see if they have been cancelled.
2833  * complete the job, %FALSE if the job is complete (or cancelled)
2834  *
2835  * Returns: %TRUE if this function should be called again to
2836  */
2837
2838
2839 /**
2840  * GIOStream:
2841  *
2842  * Base class for read-write streams.
2843  */
2844
2845
2846 /**
2847  * GIOStreamSpliceFlags:
2848  * @G_IO_STREAM_SPLICE_NONE: Do not close either stream.
2849  * @G_IO_STREAM_SPLICE_CLOSE_STREAM1: Close the first stream after the splice.
2850  * @G_IO_STREAM_SPLICE_CLOSE_STREAM2: Close the second stream after the splice.
2851  * @G_IO_STREAM_SPLICE_WAIT_FOR_BOTH: Wait for both splice operations to finish before calling the callback.
2852  *
2853  * GIOStreamSpliceFlags determine how streams should be spliced.
2854  *
2855  * Since: 2.28
2856  */
2857
2858
2859 /**
2860  * GIcon:
2861  *
2862  * An abstract type that specifies an icon.
2863  */
2864
2865
2866 /**
2867  * GIconIface:
2868  * @g_iface: The parent interface.
2869  * @hash: A hash for a given #GIcon.
2870  * @equal: Checks if two #GIcon<!-- -->s are equal.
2871  * @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).
2872  * @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).
2873  *
2874  * GIconIface is used to implement GIcon types for various
2875  * different systems. See #GThemedIcon and #GLoadableIcon for
2876  * examples of how to implement this interface.
2877  */
2878
2879
2880 /**
2881  * GIconv:
2882  *
2883  * The <structname>GIConv</structname> struct wraps an
2884  * iconv() conversion descriptor. It contains private data
2885  * and should only be accessed using the following functions.
2886  */
2887
2888
2889 /**
2890  * GInetAddress:
2891  *
2892  * An IPv4 or IPv6 internet address.
2893  */
2894
2895
2896 /**
2897  * GInetAddress:is-any:
2898  *
2899  * Whether this is the "any" address for its family.
2900  * See g_inet_address_get_is_any().
2901  *
2902  * Since: 2.22
2903  */
2904
2905
2906 /**
2907  * GInetAddress:is-link-local:
2908  *
2909  * Whether this is a link-local address.
2910  * See g_inet_address_get_is_link_local().
2911  *
2912  * Since: 2.22
2913  */
2914
2915
2916 /**
2917  * GInetAddress:is-loopback:
2918  *
2919  * Whether this is the loopback address for its family.
2920  * See g_inet_address_get_is_loopback().
2921  *
2922  * Since: 2.22
2923  */
2924
2925
2926 /**
2927  * GInetAddress:is-mc-global:
2928  *
2929  * Whether this is a global multicast address.
2930  * See g_inet_address_get_is_mc_global().
2931  *
2932  * Since: 2.22
2933  */
2934
2935
2936 /**
2937  * GInetAddress:is-mc-link-local:
2938  *
2939  * Whether this is a link-local multicast address.
2940  * See g_inet_address_get_is_mc_link_local().
2941  *
2942  * Since: 2.22
2943  */
2944
2945
2946 /**
2947  * GInetAddress:is-mc-node-local:
2948  *
2949  * Whether this is a node-local multicast address.
2950  * See g_inet_address_get_is_mc_node_local().
2951  *
2952  * Since: 2.22
2953  */
2954
2955
2956 /**
2957  * GInetAddress:is-mc-org-local:
2958  *
2959  * Whether this is an organization-local multicast address.
2960  * See g_inet_address_get_is_mc_org_local().
2961  *
2962  * Since: 2.22
2963  */
2964
2965
2966 /**
2967  * GInetAddress:is-mc-site-local:
2968  *
2969  * Whether this is a site-local multicast address.
2970  * See g_inet_address_get_is_mc_site_local().
2971  *
2972  * Since: 2.22
2973  */
2974
2975
2976 /**
2977  * GInetAddress:is-multicast:
2978  *
2979  * Whether this is a multicast address.
2980  * See g_inet_address_get_is_multicast().
2981  *
2982  * Since: 2.22
2983  */
2984
2985
2986 /**
2987  * GInetAddress:is-site-local:
2988  *
2989  * Whether this is a site-local address.
2990  * See g_inet_address_get_is_loopback().
2991  *
2992  * Since: 2.22
2993  */
2994
2995
2996 /**
2997  * GInetSocketAddress:
2998  *
2999  * An IPv4 or IPv6 socket address, corresponding to a <type>struct
3000  * sockaddr_in</type> or <type>struct sockaddr_in6</type>.
3001  */
3002
3003
3004 /**
3005  * GInitable:
3006  *
3007  * Interface for initializable objects.
3008  *
3009  * Since: 2.22
3010  */
3011
3012
3013 /**
3014  * GInitableIface:
3015  * @g_iface: The parent interface.
3016  * @init: Initializes the object.
3017  *
3018  * Provides an interface for initializing object such that initialization
3019  * may fail.
3020  *
3021  * Since: 2.22
3022  */
3023
3024
3025 /**
3026  * GInitiallyUnowned:
3027  *
3028  * All the fields in the <structname>GInitiallyUnowned</structname> structure
3029  * are private to the #GInitiallyUnowned implementation and should never be
3030  * accessed directly.
3031  */
3032
3033
3034 /**
3035  * GInitiallyUnownedClass:
3036  *
3037  * The class structure for the <structname>GInitiallyUnowned</structname> type.
3038  */
3039
3040
3041 /**
3042  * GInputStream:
3043  *
3044  * Base class for streaming input operations.
3045  */
3046
3047
3048 /**
3049  * GInputVector:
3050  * @buffer: Pointer to a buffer where data will be written.
3051  * @size: the available size in @buffer.
3052  *
3053  * Structure used for scatter/gather data input.
3054  * You generally pass in an array of #GInputVector<!-- -->s
3055  * and the operation will store the read data starting in the
3056  * first buffer, switching to the next as needed.
3057  *
3058  * Since: 2.22
3059  */
3060
3061
3062 /**
3063  * GInstanceInitFunc:
3064  * @instance: The instance to initialize.
3065  * @g_class: The class of the type the instance is created for.
3066  *
3067  * A callback function used by the type system to initialize a new
3068  * instance of a type. This function initializes all instance members and
3069  * allocates any resources required by it.
3070  * Initialization of a derived instance involves calling all its parent
3071  * types instance initializers, so the class member of the instance
3072  * is altered during its initialization to always point to the class that
3073  * belongs to the type the current initializer was introduced for.
3074  */
3075
3076
3077 /**
3078  * GInterfaceFinalizeFunc:
3079  * @g_iface: The interface structure to finalize.
3080  * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3081  *
3082  * A callback function used by the type system to finalize an interface.
3083  * This function should destroy any internal data and release any resources
3084  * allocated by the corresponding GInterfaceInitFunc() function.
3085  */
3086
3087
3088 /**
3089  * GInterfaceInfo:
3090  * @interface_init: location of the interface initialization function
3091  * @interface_finalize: location of the interface finalization function
3092  * @interface_data: user-supplied data passed to the interface init/finalize functions
3093  *
3094  * A structure that provides information to the type system which is
3095  * used specifically for managing interface types.
3096  */
3097
3098
3099 /**
3100  * GInterfaceInitFunc:
3101  * @g_iface: The interface structure to initialize.
3102  * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3103  *
3104  * A callback function used by the type system to initialize a new
3105  * interface.  This function should initialize all internal data and
3106  * allocate any resources required by the interface.
3107  */
3108
3109
3110 /**
3111  * GLoadableIcon:
3112  *
3113  * Generic type for all kinds of icons that can be loaded
3114  * as a stream.
3115  */
3116
3117
3118 /**
3119  * GLoadableIconIface:
3120  * @g_iface: The parent interface.
3121  * @load: Loads an icon.
3122  * @load_async: Loads an icon asynchronously.
3123  * @load_finish: Finishes an asynchronous icon load.
3124  *
3125  * Interface for icons that can be loaded as a stream.
3126  */
3127
3128
3129 /**
3130  * GMainContext:
3131  *
3132  * The <structname>GMainContext</structname> struct is an opaque data
3133  * type representing a set of sources to be handled in a main loop.
3134  */
3135
3136
3137 /**
3138  * GMainLoop:
3139  *
3140  * The <structname>GMainLoop</structname> struct is an opaque data type
3141  * representing the main event loop of a GLib or GTK+ application.
3142  */
3143
3144
3145 /**
3146  * GMarkupError:
3147  * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8
3148  * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace
3149  * @G_MARKUP_ERROR_PARSE: document was ill-formed
3150  * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser functions; element wasn't known
3151  * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser functions; attribute wasn't known
3152  * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser functions; content was invalid
3153  * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser functions; a required attribute was missing
3154  *
3155  * Error codes returned by markup parsing.
3156  */
3157
3158
3159 /**
3160  * GMarkupParseContext:
3161  *
3162  * A parse context is used to parse a stream of bytes that
3163  * you expect to contain marked-up text.
3164  * See g_markup_parse_context_new(), #GMarkupParser, and so
3165  * on for more details.
3166  */
3167
3168
3169 /**
3170  * GMarkupParseFlags:
3171  * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use
3172  * @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
3173  * @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
3174  *
3175  * Flags that affect the behaviour of the parser.
3176  */
3177
3178
3179 /**
3180  * GMarkupParser:
3181  * @start_element: Callback to invoke when the opening tag of an element is seen.
3182  * @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>.
3183  * @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.
3184  * @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.
3185  * @error: Callback to invoke when an error occurs.
3186  *
3187  * Any of the fields in #GMarkupParser can be %NULL, in which case they
3188  * will be ignored. Except for the @error function, any of these callbacks
3189  * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT,
3190  * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT
3191  * errors are intended to be set from these callbacks. If you set an error
3192  * from a callback, g_markup_parse_context_parse() will report that error
3193  * back to its caller.
3194  */
3195
3196
3197 /**
3198  * GMemVTable:
3199  * @malloc: function to use for allocating memory.
3200  * @realloc: function to use for reallocating memory.
3201  * @free: function to use to free memory.
3202  * @calloc: function to use for allocating zero-filled memory.
3203  * @try_malloc: function to use for allocating memory without a default error handler.
3204  * @try_realloc: function to use for reallocating memory without a default error handler.
3205  *
3206  * A set of functions used to perform memory allocation. The same #GMemVTable must
3207  * be used for all allocations in the same program; a call to g_mem_set_vtable(),
3208  * if it exists, should be prior to any use of GLib.
3209  */
3210
3211
3212 /**
3213  * GMemoryInputStream:
3214  *
3215  * Implements #GInputStream for arbitrary memory chunks.
3216  */
3217
3218
3219 /**
3220  * GMemoryOutputStream:
3221  *
3222  * Implements #GOutputStream for arbitrary memory chunks.
3223  */
3224
3225
3226 /**
3227  * GMemoryOutputStream:data:
3228  *
3229  * Pointer to buffer where data will be written.
3230  *
3231  * Since: 2.24
3232  */
3233
3234
3235 /**
3236  * GMemoryOutputStream:data-size:
3237  *
3238  * Size of data written to the buffer.
3239  *
3240  * Since: 2.24
3241  */
3242
3243
3244 /**
3245  * GMemoryOutputStream:destroy-function: (skip)
3246  *
3247  * Function called with the buffer as argument when the stream is destroyed.
3248  *
3249  * Since: 2.24
3250  */
3251
3252
3253 /**
3254  * GMemoryOutputStream:realloc-function: (skip)
3255  *
3256  * Function with realloc semantics called to enlarge the buffer.
3257  *
3258  * Since: 2.24
3259  */
3260
3261
3262 /**
3263  * GMemoryOutputStream:size:
3264  *
3265  * Current size of the data buffer.
3266  *
3267  * Since: 2.24
3268  */
3269
3270
3271 /**
3272  * GMount:
3273  *
3274  * A handle to an object implementing the #GMountIface interface.
3275  */
3276
3277
3278 /**
3279  * GMount::changed:
3280  * @mount: the object on which the signal is emitted
3281  *
3282  * Emitted when the mount has been changed.
3283  */
3284
3285
3286 /**
3287  * GMount::pre-unmount:
3288  * @mount: the object on which the signal is emitted
3289  *
3290  * This signal is emitted when the #GMount is about to be
3291  * unmounted.
3292  *
3293  * Since: 2.22
3294  */
3295
3296
3297 /**
3298  * GMount::unmounted:
3299  * @mount: the object on which the signal is emitted
3300  *
3301  * This signal is emitted when the #GMount have been
3302  * unmounted. If the recipient is holding references to the
3303  * object they should release them so the object can be
3304  * finalized.
3305  */
3306
3307
3308 /**
3309  * GMountIface:
3310  * @g_iface: The parent interface.
3311  * @changed: Changed signal that is emitted when the mount's state has changed.
3312  * @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.
3313  * @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.
3314  * @get_root: Gets a #GFile to the root directory of the #GMount.
3315  * @get_name: Gets a string containing the name of the #GMount.
3316  * @get_icon: Gets a #GIcon for the #GMount.
3317  * @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.
3318  * @get_volume: Gets a #GVolume the mount is located on. Returns %NULL if the #GMount is not associated with a #GVolume.
3319  * @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.
3320  * @can_unmount: Checks if a #GMount can be unmounted.
3321  * @can_eject: Checks if a #GMount can be ejected.
3322  * @unmount: Starts unmounting a #GMount.
3323  * @unmount_finish: Finishes an unmounting operation.
3324  * @eject: Starts ejecting a #GMount.
3325  * @eject_finish: Finishes an eject operation.
3326  * @remount: Starts remounting a #GMount.
3327  * @remount_finish: Finishes a remounting operation.
3328  * @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.
3329  * @guess_content_type_finish: Finishes a contenet type guessing operation. Added in 2.18.
3330  * @guess_content_type_sync: Synchronous variant of @guess_content_type. Added in 2.18
3331  * @unmount_with_operation: Starts unmounting a #GMount using a #GMountOperation. Since 2.22.
3332  * @unmount_with_operation_finish: Finishes an unmounting operation using a #GMountOperation. Since 2.22.
3333  * @eject_with_operation: Starts ejecting a #GMount using a #GMountOperation. Since 2.22.
3334  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
3335  * @get_default_location: Gets a #GFile indication a start location that can be use as the entry point for this mount. Since 2.24.
3336  *
3337  * Interface for implementing operations for mounts.
3338  */
3339
3340
3341 /**
3342  * GMountMountFlags:
3343  * @G_MOUNT_MOUNT_NONE: No flags set.
3344  *
3345  * Flags used when mounting a mount.
3346  */
3347
3348
3349 /**
3350  * GMountOperation:
3351  *
3352  * Class for providing authentication methods for mounting operations,
3353  * such as mounting a file locally, or authenticating with a server.
3354  */
3355
3356
3357 /**
3358  * GMountOperation::aborted:
3359  *
3360  * Emitted by the backend when e.g. a device becomes unavailable
3361  * while a mount operation is in progress.
3362  * Implementations of GMountOperation should handle this signal
3363  * by dismissing open password dialogs.
3364  *
3365  * Since: 2.20
3366  */
3367
3368
3369 /**
3370  * GMountOperation::ask-password:
3371  * @op: a #GMountOperation requesting a password.
3372  * @message: string containing a message to display to the user.
3373  * @default_user: string containing the default user name.
3374  * @default_domain: string containing the default domain.
3375  * @flags: a set of #GAskPasswordFlags.
3376  *
3377  * Emitted when a mount operation asks the user for a password.
3378  * If the message contains a line break, the first line should be
3379  * presented as a heading. For example, it may be used as the
3380  * primary text in a #GtkMessageDialog.
3381  */
3382
3383
3384 /**
3385  * GMountOperation::ask-question:
3386  * @op: a #GMountOperation asking a question.
3387  * @message: string containing a message to display to the user.
3388  * @choices: an array of strings for each possible choice.
3389  *
3390  * Emitted when asking the user a question and gives a list of
3391  * choices for the user to choose from.
3392  * If the message contains a line break, the first line should be
3393  * presented as a heading. For example, it may be used as the
3394  * primary text in a #GtkMessageDialog.
3395  */
3396
3397
3398 /**
3399  * GMountOperation::reply:
3400  * @op: a #GMountOperation.
3401  * @result: a #GMountOperationResult indicating how the request was handled
3402  *
3403  * Emitted when the user has replied to the mount operation.
3404  */
3405
3406
3407 /**
3408  * GMountOperation::show-processes:
3409  * @op: a #GMountOperation.
3410  * @message: string containing a message to display to the user.
3411  * @processes: an array of #GPid for processes blocking the operation.
3412  * @choices: an array of strings for each possible choice.
3413  *
3414  * Emitted when one or more processes are blocking an operation
3415  * e.g. unmounting/ejecting a #GMount or stopping a #GDrive.
3416  * Note that this signal may be emitted several times to update the
3417  * list of blocking processes as processes close files. The
3418  * application should only respond with g_mount_operation_reply() to
3419  * the latest signal (setting #GMountOperation:choice to the choice
3420  * the user made).
3421  * If the message contains a line break, the first line should be
3422  * presented as a heading. For example, it may be used as the
3423  * primary text in a #GtkMessageDialog.
3424  *
3425  * Since: 2.22
3426  */
3427
3428
3429 /**
3430  * GMountOperation:anonymous:
3431  *
3432  * Whether to use an anonymous user when authenticating.
3433  */
3434
3435
3436 /**
3437  * GMountOperation:choice:
3438  *
3439  * The index of the user's choice when a question is asked during the
3440  * mount operation. See the #GMountOperation::ask-question signal.
3441  */
3442
3443
3444 /**
3445  * GMountOperation:domain:
3446  *
3447  * The domain to use for the mount operation.
3448  */
3449
3450
3451 /**
3452  * GMountOperation:password:
3453  *
3454  * The password that is used for authentication when carrying out
3455  * the mount operation.
3456  */
3457
3458
3459 /**
3460  * GMountOperation:password-save:
3461  *
3462  * Determines if and how the password information should be saved.
3463  */
3464
3465
3466 /**
3467  * GMountOperation:username:
3468  *
3469  * The user name that is used for authentication when carrying out
3470  * the mount operation.
3471  */
3472
3473
3474 /**
3475  * GMountOperationResult:
3476  * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the user specified data is now available
3477  * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation to be aborted
3478  * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not implemented)
3479  *
3480  * #GMountOperationResult is returned as a result when a request for
3481  * information is send by the mounting operation.
3482  */
3483
3484
3485 /**
3486  * GMountUnmountFlags:
3487  * @G_MOUNT_UNMOUNT_NONE: No flags set.
3488  * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding file operations on the mount.
3489  *
3490  * Flags used when an unmounting a mount.
3491  */
3492
3493
3494 /**
3495  * GNetworkAddress:
3496  *
3497  * A #GSocketConnectable for resolving a hostname and connecting to
3498  * that host.
3499  */
3500
3501
3502 /**
3503  * GNetworkService:
3504  *
3505  * A #GSocketConnectable for resolving a SRV record and connecting to
3506  * that service.
3507  */
3508
3509
3510 /**
3511  * GObject:
3512  *
3513  * All the fields in the <structname>GObject</structname> structure are private
3514  * to the #GObject implementation and should never be accessed directly.
3515  */
3516
3517
3518 /**
3519  * GObjectClass:
3520  * @g_type_class: the parent class
3521  * @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.
3522  * @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.
3523  * @get_property: the generic getter for all properties of this type. Should be overridden for every type with properties.
3524  * @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.
3525  * @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.
3526  * @dispatch_properties_changed: emits property change notification for a bunch of properties. Overriding @dispatch_properties_changed should be rarely needed.
3527  * @notify: the class closure for the notify signal
3528  * @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.
3529  *
3530  * The class structure for the <structname>GObject</structname> type.
3531  * <example>
3532  * <title>Implementing singletons using a constructor</title>
3533  * <programlisting>
3534  * static MySingleton *the_singleton = NULL;
3535  * static GObject*
3536  * my_singleton_constructor (GType                  type,
3537  * guint                  n_construct_params,
3538  * GObjectConstructParam *construct_params)
3539  * {
3540  * GObject *object;
3541  * if (!the_singleton)
3542  * {
3543  * object = G_OBJECT_CLASS (parent_class)->constructor (type,
3544  * n_construct_params,
3545  * construct_params);
3546  * the_singleton = MY_SINGLETON (object);
3547  * }
3548  * else
3549  * object = g_object_ref (G_OBJECT (the_singleton));
3550  * return object;
3551  * }
3552  * </programlisting></example>
3553  */
3554
3555
3556 /**
3557  * GObjectConstructParam:
3558  * @pspec: the #GParamSpec of the construct parameter
3559  * @value: the value to set the parameter to
3560  *
3561  * The <structname>GObjectConstructParam</structname> struct is an auxiliary
3562  * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
3563  * a #GObjectClass.
3564  */
3565
3566
3567 /**
3568  * GObjectFinalizeFunc:
3569  * @object: the #GObject being finalized
3570  *
3571  * The type of the @finalize function of #GObjectClass.
3572  */
3573
3574
3575 /**
3576  * GObjectGetPropertyFunc:
3577  * @object: a #GObject
3578  * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
3579  * @value: a #GValue to return the property value in
3580  * @pspec: the #GParamSpec describing the property
3581  *
3582  * The type of the @get_property function of #GObjectClass.
3583  */
3584
3585
3586 /**
3587  * GObjectSetPropertyFunc:
3588  * @object: a #GObject
3589  * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
3590  * @value: the new value for the property
3591  * @pspec: the #GParamSpec describing the property
3592  *
3593  * The type of the @set_property function of #GObjectClass.
3594  */
3595
3596
3597 /**
3598  * GOptionArg:
3599  * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags.
3600  * @G_OPTION_ARG_STRING: The option takes a string argument.
3601  * @G_OPTION_ARG_INT: The option takes an integer argument.
3602  * @G_OPTION_ARG_CALLBACK: The option provides a callback to parse the extra argument.
3603  * @G_OPTION_ARG_FILENAME: The option takes a filename as argument.
3604  * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple uses of the option are collected into an array of strings.
3605  * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, multiple uses of the option are collected into an array of strings.
3606  * @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
3607  * @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
3608  *
3609  * The #GOptionArg enum values determine which type of extra argument the
3610  * options expect to find. If an option expects an extra argument, it
3611  * can be specified in several ways; with a short option:
3612  * <option>-x arg</option>, with a long option: <option>--name arg</option>
3613  *
3614  * Or combined in a single argument: <option>--name=arg</option>.
3615  */
3616
3617
3618 /**
3619  * GOptionArgFunc:
3620  * @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.
3621  * @value: The value to be parsed.
3622  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
3623  * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED is intended to be used for errors in #GOptionArgFunc callbacks.
3624  *
3625  * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK
3626  * options.
3627  * occurred, in which case @error should be set with g_set_error()
3628  *
3629  * Returns: %TRUE if the option was successfully parsed, %FALSE if an error
3630  */
3631
3632
3633 /**
3634  * GOptionContext:
3635  *
3636  * A <structname>GOptionContext</structname> struct defines which options
3637  * are accepted by the commandline option parser. The struct has only private
3638  * fields and should not be directly accessed.
3639  */
3640
3641
3642 /**
3643  * GOptionEntry:
3644  * @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>.
3645  * @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.
3646  * @flags: Flags from #GOptionFlags.
3647  * @arg: The type of the option, as a #GOptionArg.
3648  * @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().
3649  * @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().
3650  * @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().
3651  *
3652  * A <structname>GOptionEntry</structname> defines a single option.
3653  * To have an effect, they must be added to a #GOptionGroup with
3654  * g_option_context_add_main_entries() or g_option_group_add_entries().
3655  */
3656
3657
3658 /**
3659  * GOptionError:
3660  * @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().
3661  * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed.
3662  * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed.
3663  *
3664  * Error codes returned by option parsing.
3665  */
3666
3667
3668 /**
3669  * GOptionErrorFunc:
3670  * @context: The active #GOptionContext
3671  * @group: The group to which the function belongs
3672  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
3673  * @error: The #GError containing details about the parse error
3674  *
3675  * The type of function to be used as callback when a parse error occurs.
3676  */
3677
3678
3679 /**
3680  * GOptionFlags:
3681  * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in <option>--help</option> output.
3682  * @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.
3683  * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this flag indicates that the sense of the option is reversed.
3684  * @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
3685  * @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
3686  * @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
3687  * @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.
3688  *
3689  * Flags which modify individual options.
3690  */
3691
3692
3693 /**
3694  * GOptionGroup:
3695  *
3696  * A <structname>GOptionGroup</structname> struct defines the options in a single
3697  * group. The struct has only private fields and should not be directly accessed.
3698  * All options in a group share the same translation function. Libraries which
3699  * need to parse commandline options are expected to provide a function for
3700  * getting a <structname>GOptionGroup</structname> holding their options, which
3701  * the application can then add to its #GOptionContext.
3702  */
3703
3704
3705 /**
3706  * GOptionParseFunc:
3707  * @context: The active #GOptionContext
3708  * @group: The group to which the function belongs
3709  * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
3710  * @error: A return location for error details
3711  *
3712  * The type of function that can be called before and after parsing.
3713  * occurred, in which case @error should be set with g_set_error()
3714  *
3715  * Returns: %TRUE if the function completed successfully, %FALSE if an error
3716  */
3717
3718
3719 /**
3720  * GOutputStream:
3721  *
3722  * Base class for writing output.
3723  * All classes derived from GOutputStream should implement synchronous
3724  * writing, splicing, flushing and closing streams, but may implement
3725  * asynchronous versions.
3726  */
3727
3728
3729 /**
3730  * GOutputStreamSpliceFlags:
3731  * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream.
3732  * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after the splice.
3733  * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after the splice.
3734  *
3735  * GOutputStreamSpliceFlags determine how streams should be spliced.
3736  */
3737
3738
3739 /**
3740  * GOutputVector:
3741  * @buffer: Pointer to a buffer of data to read.
3742  * @size: the size of @buffer.
3743  *
3744  * Structure used for scatter/gather data output.
3745  * You generally pass in an array of #GOutputVector<!-- -->s
3746  * and the operation will use all the buffers as if they were
3747  * one buffer.
3748  *
3749  * Since: 2.22
3750  */
3751
3752
3753 /**
3754  * GParamFlags:
3755  * @G_PARAM_READABLE: the parameter is readable
3756  * @G_PARAM_WRITABLE: the parameter is writable
3757  * @G_PARAM_CONSTRUCT: the parameter will be set upon object construction
3758  * @G_PARAM_CONSTRUCT_ONLY: the parameter will only be set upon object construction
3759  * @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) strict validation is not required
3760  * @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
3761  * @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
3762  * @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
3763  * @G_PARAM_PRIVATE: internal
3764  * @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
3765  *
3766  * Through the #GParamFlags flag values, certain aspects of parameters
3767  * can be configured.
3768  */
3769
3770
3771 /**
3772  * GParamSpec:
3773  * @g_type_instance: private #GTypeInstance portion
3774  * @name: name of this parameter
3775  * @flags: #GParamFlags flags for this parameter
3776  * @value_type: the #GValue type for this parameter
3777  * @owner_type: #GType type that uses (introduces) this parameter
3778  *
3779  * All other fields of the <structname>GParamSpec</structname> struct are private and
3780  * should not be used directly.
3781  */
3782
3783
3784 /**
3785  * GParamSpecBoolean:
3786  * @parent_instance: private #GParamSpec portion
3787  * @default_value: default value for the property specified
3788  *
3789  * A #GParamSpec derived structure that contains the meta data for boolean properties.
3790  */
3791
3792
3793 /**
3794  * GParamSpecBoxed:
3795  * @parent_instance: private #GParamSpec portion
3796  *
3797  * A #GParamSpec derived structure that contains the meta data for boxed properties.
3798  */
3799
3800
3801 /**
3802  * GParamSpecChar:
3803  * @parent_instance: private #GParamSpec portion
3804  * @minimum: minimum value for the property specified
3805  * @maximum: maximum value for the property specified
3806  * @default_value: default value for the property specified
3807  *
3808  * A #GParamSpec derived structure that contains the meta data for character properties.
3809  */
3810
3811
3812 /**
3813  * GParamSpecClass:
3814  * @g_type_class: the parent class
3815  * @value_type: the #GValue type for this parameter
3816  * @finalize: The instance finalization function (optional), should chain up to the finalize method of the parent class.
3817  * @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().
3818  * @value_validate: Ensures that the contents of @value comply with the specifications set out by this type (optional), see g_param_value_set_validate().
3819  * @values_cmp: Compares @value1 with @value2 according to this type (recommended, the default is memcmp()), see g_param_values_cmp().
3820  *
3821  * The class structure for the <structname>GParamSpec</structname> type.
3822  * Normally, <structname>GParamSpec</structname> classes are filled by
3823  * g_param_type_register_static().
3824  */
3825
3826
3827 /**
3828  * GParamSpecDouble:
3829  * @parent_instance: private #GParamSpec portion
3830  * @minimum: minimum value for the property specified
3831  * @maximum: maximum value for the property specified
3832  * @default_value: default value for the property specified
3833  * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-90.
3834  *
3835  * A #GParamSpec derived structure that contains the meta data for double properties.
3836  */
3837
3838
3839 /**
3840  * GParamSpecEnum:
3841  * @parent_instance: private #GParamSpec portion
3842  * @enum_class: the #GEnumClass for the enum
3843  * @default_value: default value for the property specified
3844  *
3845  * A #GParamSpec derived structure that contains the meta data for enum
3846  * properties.
3847  */
3848
3849
3850 /**
3851  * GParamSpecFlags:
3852  * @parent_instance: private #GParamSpec portion
3853  * @flags_class: the #GFlagsClass for the flags
3854  * @default_value: default value for the property specified
3855  *
3856  * A #GParamSpec derived structure that contains the meta data for flags
3857  * properties.
3858  */
3859
3860
3861 /**
3862  * GParamSpecFloat:
3863  * @parent_instance: private #GParamSpec portion
3864  * @minimum: minimum value for the property specified
3865  * @maximum: maximum value for the property specified
3866  * @default_value: default value for the property specified
3867  * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-30.
3868  *
3869  * A #GParamSpec derived structure that contains the meta data for float properties.
3870  */
3871
3872
3873 /**
3874  * GParamSpecGType:
3875  * @parent_instance: private #GParamSpec portion
3876  * @is_a_type: a #GType whose subtypes can occur as values
3877  *
3878  * A #GParamSpec derived structure that contains the meta data for #GType properties.
3879  *
3880  * Since: 2.10
3881  */
3882
3883
3884 /**
3885  * GParamSpecInt:
3886  * @parent_instance: private #GParamSpec portion
3887  * @minimum: minimum value for the property specified
3888  * @maximum: maximum value for the property specified
3889  * @default_value: default value for the property specified
3890  *
3891  * A #GParamSpec derived structure that contains the meta data for integer properties.
3892  */
3893
3894
3895 /**
3896  * GParamSpecInt64:
3897  * @parent_instance: private #GParamSpec portion
3898  * @minimum: minimum value for the property specified
3899  * @maximum: maximum value for the property specified
3900  * @default_value: default value for the property specified
3901  *
3902  * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
3903  */
3904
3905
3906 /**
3907  * GParamSpecLong:
3908  * @parent_instance: private #GParamSpec portion
3909  * @minimum: minimum value for the property specified
3910  * @maximum: maximum value for the property specified
3911  * @default_value: default value for the property specified
3912  *
3913  * A #GParamSpec derived structure that contains the meta data for long integer properties.
3914  */
3915
3916
3917 /**
3918  * GParamSpecObject:
3919  * @parent_instance: private #GParamSpec portion
3920  *
3921  * A #GParamSpec derived structure that contains the meta data for object properties.
3922  */
3923
3924
3925 /**
3926  * GParamSpecOverride:
3927  *
3928  * This is a type of #GParamSpec type that simply redirects operations to
3929  * another paramspec.  All operations other than getting or
3930  * setting the value are redirected, including accessing the nick and
3931  * blurb, validating a value, and so forth. See
3932  * g_param_spec_get_redirect_target() for retrieving the overidden
3933  * property. #GParamSpecOverride is used in implementing
3934  * g_object_class_override_property(), and will not be directly useful
3935  * unless you are implementing a new base type similar to GObject.
3936  *
3937  * Since: 2.4
3938  */
3939
3940
3941 /**
3942  * GParamSpecParam:
3943  * @parent_instance: private #GParamSpec portion
3944  *
3945  * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
3946  * properties.
3947  */
3948
3949
3950 /**
3951  * GParamSpecPointer:
3952  * @parent_instance: private #GParamSpec portion
3953  *
3954  * A #GParamSpec derived structure that contains the meta data for pointer properties.
3955  */
3956
3957
3958 /**
3959  * GParamSpecString:
3960  * @parent_instance: private #GParamSpec portion
3961  * @default_value: default value for the property specified
3962  * @cset_first: a string containing the allowed values for the first byte
3963  * @cset_nth: a string containing the allowed values for the subsequent bytes
3964  * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
3965  * @null_fold_if_empty: replace empty string by %NULL
3966  * @ensure_non_null: replace %NULL strings by an empty string
3967  *
3968  * A #GParamSpec derived structure that contains the meta data for string
3969  * properties.
3970  */
3971
3972
3973 /**
3974  * GParamSpecTypeInfo:
3975  * @instance_size: Size of the instance (object) structure.
3976  * @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.
3977  * @instance_init: Location of the instance initialization function (optional).
3978  * @value_type: The #GType of values conforming to this #GParamSpec
3979  * @finalize: The instance finalization function (optional).
3980  * @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().
3981  * @value_validate: Ensures that the contents of @value comply with the specifications set out by @pspec (optional), see g_param_value_set_validate().
3982  * @values_cmp: Compares @value1 with @value2 according to @pspec (recommended, the default is memcmp()), see g_param_values_cmp().
3983  *
3984  * This structure is used to provide the type system with the information
3985  * required to initialize and destruct (finalize) a parameter's class and
3986  * instances thereof.
3987  * The initialized structure is passed to the g_param_type_register_static()
3988  * The type system will perform a deep copy of this structure, so its memory
3989  * does not need to be persistent across invocation of
3990  * g_param_type_register_static().
3991  */
3992
3993
3994 /**
3995  * GParamSpecUChar:
3996  * @parent_instance: private #GParamSpec portion
3997  * @minimum: minimum value for the property specified
3998  * @maximum: maximum value for the property specified
3999  * @default_value: default value for the property specified
4000  *
4001  * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
4002  */
4003
4004
4005 /**
4006  * GParamSpecUInt:
4007  * @parent_instance: private #GParamSpec portion
4008  * @minimum: minimum value for the property specified
4009  * @maximum: maximum value for the property specified
4010  * @default_value: default value for the property specified
4011  *
4012  * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
4013  */
4014
4015
4016 /**
4017  * GParamSpecUInt64:
4018  * @parent_instance: private #GParamSpec portion
4019  * @minimum: minimum value for the property specified
4020  * @maximum: maximum value for the property specified
4021  * @default_value: default value for the property specified
4022  *
4023  * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
4024  */
4025
4026
4027 /**
4028  * GParamSpecULong:
4029  * @parent_instance: private #GParamSpec portion
4030  * @minimum: minimum value for the property specified
4031  * @maximum: maximum value for the property specified
4032  * @default_value: default value for the property specified
4033  *
4034  * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
4035  */
4036
4037
4038 /**
4039  * GParamSpecUnichar:
4040  * @parent_instance: private #GParamSpec portion
4041  * @default_value: default value for the property specified
4042  *
4043  * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
4044  */
4045
4046
4047 /**
4048  * GParamSpecValueArray:
4049  * @parent_instance: private #GParamSpec portion
4050  * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
4051  * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
4052  *
4053  * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
4054  */
4055
4056
4057 /**
4058  * GParamSpecVariant:
4059  * @parent_instance: private #GParamSpec portion
4060  * @type: a #GVariantType, or %NULL
4061  * @default_value: a #GVariant, or %NULL
4062  *
4063  * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
4064  *
4065  * Since: 2.26
4066  */
4067
4068
4069 /**
4070  * GParameter:
4071  * @name: the parameter name
4072  * @value: the parameter value
4073  *
4074  * The <structname>GParameter</structname> struct is an auxiliary structure used
4075  * to hand parameter name/value pairs to g_object_newv().
4076  */
4077
4078
4079 /**
4080  * GPasswordSave:
4081  * @G_PASSWORD_SAVE_NEVER: never save a password.
4082  * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session.
4083  * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently.
4084  *
4085  * #GPasswordSave is used to indicate the lifespan of a saved password.
4086  * #Gvfs stores passwords in the Gnome keyring when this flag allows it
4087  * to, and later retrieves it again from there.
4088  */
4089
4090
4091 /**
4092  * GPermission:
4093  *
4094  * #GPermission is an opaque data structure and can only be accessed
4095  * using the following functions.
4096  */
4097
4098
4099 /**
4100  * GPermission:allowed:
4101  *
4102  * %TRUE if the caller currently has permission to perform the action that
4103  */
4104
4105
4106 /**
4107  * GPermission:can-acquire:
4108  *
4109  * %TRUE if it is generally possible to acquire the permission by calling
4110  * g_permission_acquire().
4111  */
4112
4113
4114 /**
4115  * GPermission:can-release:
4116  *
4117  * %TRUE if it is generally possible to release the permission by calling
4118  * g_permission_release().
4119  */
4120
4121
4122 /**
4123  * GPid:
4124  *
4125  * A type which is used to hold a process identification.
4126  * On UNIX, processes are identified by a process id (an integer),
4127  * while Windows uses process handles (which are pointers).
4128  */
4129
4130
4131 /**
4132  * GPollFD:
4133  * @fd: the file descriptor to poll (or a <type>HANDLE</type> on Win32)
4134  * @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.
4135  * @revents: a bitwise combination of flags from #GIOCondition, returned from the poll() function to indicate which events occurred.
4136  *
4137  *
4138  */
4139
4140
4141 /**
4142  * GPollFunc:
4143  * @ufds: an array of #GPollFD elements
4144  * @nfsd: the number of elements in @ufds
4145  * @timeout_: the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout.
4146  *
4147  * Specifies the type of function passed to g_main_context_set_poll_func().
4148  * The semantics of the function should match those of the poll() system call.
4149  * reported, or -1 if an error occurred.
4150  *
4151  * Returns: the number of #GPollFD elements which have events or errors
4152  */
4153
4154
4155 /**
4156  * GPollableInputStream:
4157  *
4158  * An interface for a #GInputStream that can be polled for readability.
4159  *
4160  * Since: 2.28
4161  */
4162
4163
4164 /**
4165  * GPollableInputStreamInterface:
4166  * @g_iface: The parent interface.
4167  * @can_poll: Checks if the #GPollableInputStream instance is actually pollable
4168  * @is_readable: Checks if the stream is readable
4169  * @create_source: Creates a #GSource to poll the stream
4170  * @read_nonblocking: Does a non-blocking read or returns %G_IO_ERROR_WOULD_BLOCK
4171  *
4172  * The interface for pollable input streams.
4173  * The default implementation of @can_poll always returns %TRUE.
4174  * The default implementation of @read_nonblocking calls
4175  * g_pollable_input_stream_is_readable(), and then calls
4176  * g_input_stream_read() if it returns %TRUE. This means you only need
4177  * to override it if it is possible that your @is_readable
4178  * implementation may return %TRUE when the stream is not actually
4179  * readable.
4180  *
4181  * Since: 2.28
4182  */
4183
4184
4185 /**
4186  * GPollableOutputStream:
4187  *
4188  * An interface for a #GOutputStream that can be polled for readability.
4189  *
4190  * Since: 2.28
4191  */
4192
4193
4194 /**
4195  * GPollableOutputStreamInterface:
4196  * @g_iface: The parent interface.
4197  * @can_poll: Checks if the #GPollableOutputStream instance is actually pollable
4198  * @is_writable: Checks if the stream is writable
4199  * @create_source: Creates a #GSource to poll the stream
4200  * @write_nonblocking: Does a non-blocking write or returns %G_IO_ERROR_WOULD_BLOCK
4201  *
4202  * The interface for pollable output streams.
4203  * The default implementation of @can_poll always returns %TRUE.
4204  * The default implementation of @write_nonblocking calls
4205  * g_pollable_output_stream_is_writable(), and then calls
4206  * g_output_stream_write() if it returns %TRUE. This means you only
4207  * need to override it if it is possible that your @is_writable
4208  * implementation may return %TRUE when the stream is not actually
4209  * writable.
4210  *
4211  * Since: 2.28
4212  */
4213
4214
4215 /**
4216  * GPollableSourceFunc:
4217  * @pollable_stream: the #GPollableInputStream or #GPollableOutputStream
4218  * @user_data: data passed in by the user.
4219  *
4220  * This is the function type of the callback used for the #GSource
4221  * returned by g_pollable_input_stream_create_source() and
4222  * g_pollable_output_stream_create_source().
4223  *
4224  * Returns: it should return %FALSE if the source should be removed.
4225  * Since: 2.28
4226  */
4227
4228
4229 /**
4230  * GProxy:
4231  *
4232  * Interface that handles proxy connection and payload.
4233  *
4234  * Since: 2.26
4235  */
4236
4237
4238 /**
4239  * GProxyAddress:
4240  *
4241  * A #GInetSocketAddress representing a connection via a proxy server
4242  *
4243  * Since: 2.26
4244  */
4245
4246
4247 /**
4248  * GProxyAddressEnumerator:
4249  *
4250  * A subclass of #GSocketAddressEnumerator that takes another address
4251  * enumerator and wraps its results in #GProxyAddress<!-- -->es as
4252  * directed by the default #GProxyResolver.
4253  */
4254
4255
4256 /**
4257  * GProxyInterface:
4258  * @g_iface: The parent interface.
4259  * @connect: Connect to proxy server and wrap (if required) the #connection to handle payload.
4260  * @connect_async: Same has connect() but asynchronous.
4261  * @connect_finish: Returns the result of connect_async()
4262  *
4263  * Provides an interface for handling proxy connection and payload.
4264  *
4265  * Since: 2.26
4266  */
4267
4268
4269 /**
4270  * GProxyResolver:
4271  *
4272  * Interface that can be used to resolve proxy address.
4273  */
4274
4275
4276 /**
4277  * GReallocFunc:
4278  * @data: memory block to reallocate
4279  * @size: size to reallocate @data to
4280  *
4281  * Changes the size of the memory block pointed to by @data to
4282  * The function should have the same semantics as realloc().
4283  *
4284  * Returns: a pointer to the reallocated memory
4285  */
4286
4287
4288 /**
4289  * GRegex:
4290  *
4291  * A GRegex is the "compiled" form of a regular expression pattern. This
4292  * structure is opaque and its fields cannot be accessed directly.
4293  *
4294  * Since: 2.14
4295  */
4296
4297
4298 /**
4299  * GRegexCompileFlags:
4300  * @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.
4301  * @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.
4302  * @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.
4303  * @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.
4304  * @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.
4305  * @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.
4306  * @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.
4307  * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this flag they are considered as a raw sequence of bytes.
4308  * @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).
4309  * @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.
4310  * @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.
4311  * @G_REGEX_NEWLINE_CR: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\r'.
4312  * @G_REGEX_NEWLINE_LF: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\n'.
4313  * @G_REGEX_NEWLINE_CRLF: Usually any newline character is recognized, if this option is set, the only recognized newline character sequence is '\r\n'.
4314  *
4315  * Flags specifying compile-time options.
4316  *
4317  * Since: 2.14
4318  */
4319
4320
4321 /**
4322  * GRegexError:
4323  * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed.
4324  * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed.
4325  * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement string.
4326  * @G_REGEX_ERROR_MATCH: The match process failed.
4327  * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. Since 2.16
4328  * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16
4329  * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16
4330  * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". Since 2.16
4331  * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" quantifier. Since 2.16
4332  * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. Since 2.16
4333  * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for character class. Since 2.16
4334  * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence in character class. Since 2.16
4335  * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. Since 2.16
4336  * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16
4337  * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", "(?&lt;" or "(?P". Since 2.16
4338  * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are supported only within a class. Since 2.16
4339  * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" without opening "(". Since 2.16
4340  * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent subpattern. Since 2.16
4341  * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. Since 2.16
4342  * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. Since 2.16
4343  * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16
4344  * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not fixed length. Since 2.16
4345  * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". Since 2.16
4346  * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains more than two branches. Since 2.16
4347  * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". Since 2.16
4348  * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. Since 2.16
4349  * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating elements are not supported. Since 2.16
4350  * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence is too large. Since 2.16
4351  * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16
4352  * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in lookbehind assertion. Since 2.16
4353  * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. Since 2.16
4354  * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator in subpattern name. Since 2.16
4355  * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have the same name. Since 2.16
4356  * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. Since 2.16
4357  * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or "\\p". Since 2.16
4358  * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long (maximum 32 characters). Since 2.16
4359  * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum 10,000). Since 2.16
4360  * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". Since 2.16
4361  * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more than one branch. Since 2.16
4362  * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. Since 2.16
4363  * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. Since 2.16
4364  * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced name or an optionally braced non-zero number. Since 2.16
4365  *
4366  * Error codes returned by regular expressions functions.
4367  *
4368  * Since: 2.14
4369  */
4370
4371
4372 /**
4373  * GRegexEvalCallback:
4374  * @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.
4375  * @result: a #GString containing the new string
4376  * @user_data: user data passed to g_regex_replace_eval()
4377  *
4378  * Specifies the type of the function passed to g_regex_replace_eval().
4379  * It is called for each occurance of the pattern in the string passed
4380  * to g_regex_replace_eval(), and it should append the replacement to
4381  *
4382  * Returns: %FALSE to continue the replacement process, %TRUE to stop it
4383  * Since: 2.14
4384  */
4385
4386
4387 /**
4388  * GRegexMatchFlags:
4389  * @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.
4390  * @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".
4391  * @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".
4392  * @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".
4393  * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().
4394  * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when creating a new #GRegex, setting the '\r' character as line terminator.
4395  * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when creating a new #GRegex, setting the '\n' character as line terminator.
4396  * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when creating a new #GRegex, setting the '\r\n' characters as line terminator.
4397  * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when creating a new #GRegex, any newline character or character sequence is recognized.
4398  *
4399  * Flags specifying match-time options.
4400  *
4401  * Since: 2.14
4402  */
4403
4404
4405 /**
4406  * GResolver:
4407  *
4408  * The object that handles DNS resolution. Use g_resolver_get_default()
4409  * to get the default resolver.
4410  */
4411
4412
4413 /**
4414  * GResolver::reload:
4415  * @resolver: a #GResolver
4416  *
4417  * Emitted when the resolver notices that the system resolver
4418  * configuration has changed.
4419  */
4420
4421
4422 /**
4423  * GResolverError:
4424  * @G_RESOLVER_ERROR_NOT_FOUND: the requested name/address/service was not found
4425  * @G_RESOLVER_ERROR_TEMPORARY_FAILURE: the requested information could not be looked up due to a network error or similar problem
4426  * @G_RESOLVER_ERROR_INTERNAL: unknown error
4427  *
4428  * An error code used with %G_RESOLVER_ERROR in a #GError returned
4429  * from a #GResolver routine.
4430  *
4431  * Since: 2.22
4432  */
4433
4434
4435 /**
4436  * GSeekable:
4437  *
4438  * Seek object for streaming operations.
4439  */
4440
4441
4442 /**
4443  * GSeekableIface:
4444  * @g_iface: The parent interface.
4445  * @tell: Tells the current location within a stream.
4446  * @can_seek: Checks if seeking is supported by the stream.
4447  * @seek: Seeks to a location within a stream.
4448  * @can_truncate: Chekcs if truncation is suppored by the stream.
4449  * @truncate_fn: Truncates a stream.
4450  *
4451  * Provides an interface for implementing seekable functionality on I/O Streams.
4452  */
4453
4454
4455 /**
4456  * GSettings::change-event:
4457  * @settings: the object on which the signal was emitted
4458  * @keys: (array length=n_keys) (element-type GQuark) (allow-none):  an array of #GQuark<!-- -->s for the changed keys, or %NULL
4459  * @n_keys: the length of the @keys array, or 0
4460  * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
4461  *
4462  * The "change-event" signal is emitted once per change event that
4463  * affects this settings object.  You should connect to this signal
4464  * only if you are interested in viewing groups of changes before they
4465  * are split out into multiple emissions of the "changed" signal.
4466  * For most use cases it is more appropriate to use the "changed" signal.
4467  * In the event that the change event applies to one or more specified
4468  * keys, @keys will be an array of #GQuark of length @n_keys.  In the
4469  * event that the change event applies to the #GSettings object as a
4470  * be %NULL and @n_keys will be 0.
4471  * The default handler for this signal invokes the "changed" signal
4472  * for each affected key.  If any other connected handler returns
4473  * %TRUE then this default functionality will be supressed.
4474  *
4475  * Whole (ie: potentially every key has been changed) then @keys will
4476  */
4477
4478
4479 /**
4480  * GSettings::changed:
4481  * @settings: the object on which the signal was emitted
4482  * @key: the name of the key that changed
4483  *
4484  * The "changed" signal is emitted when a key has potentially changed.
4485  * You should call one of the g_settings_get() calls to check the new
4486  * value.
4487  * This signal supports detailed connections.  You can connect to the
4488  * detailed signal "changed::x" in order to only receive callbacks
4489  * when key "x" changes.
4490  */
4491
4492
4493 /**
4494  * GSettings::writable-change-event:
4495  * @settings: the object on which the signal was emitted
4496  * @key: the quark of the key, or 0
4497  * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
4498  *
4499  * The "writable-change-event" signal is emitted once per writability
4500  * change event that affects this settings object.  You should connect
4501  * to this signal if you are interested in viewing groups of changes
4502  * before they are split out into multiple emissions of the
4503  * "writable-changed" signal.  For most use cases it is more
4504  * appropriate to use the "writable-changed" signal.
4505  * In the event that the writability change applies only to a single
4506  * key, @key will be set to the #GQuark for that key.  In the event
4507  * that the writability change affects the entire settings object,
4508  * The default handler for this signal invokes the "writable-changed"
4509  * and "changed" signals for each affected key.  This is done because
4510  * changes in writability might also imply changes in value (if for
4511  * example, a new mandatory setting is introduced).  If any other
4512  * connected handler returns %TRUE then this default functionality
4513  * will be supressed.
4514  */
4515
4516
4517 /**
4518  * GSettings::writable-changed:
4519  * @settings: the object on which the signal was emitted
4520  * @key: the key
4521  *
4522  * The "writable-changed" signal is emitted when the writability of a
4523  * key has potentially changed.  You should call
4524  * g_settings_is_writable() in order to determine the new status.
4525  * This signal supports detailed connections.  You can connect to the
4526  * detailed signal "writable-changed::x" in order to only receive
4527  * callbacks when the writability of "x" changes.
4528  */
4529
4530
4531 /**
4532  * GSettings:context:
4533  *
4534  * The name of the context that the settings are stored in.
4535  */
4536
4537
4538 /**
4539  * GSettings:delay-apply:
4540  *
4541  * Whether the #GSettings object is in 'delay-apply' mode. See
4542  * g_settings_delay() for details.
4543  *
4544  * Since: 2.28
4545  */
4546
4547
4548 /**
4549  * GSettings:has-unapplied:
4550  *
4551  * If this property is %TRUE, the #GSettings object has outstanding
4552  * changes that will be applied when g_settings_apply() is called.
4553  */
4554
4555
4556 /**
4557  * GSettings:path:
4558  *
4559  * The path within the backend where the settings are stored.
4560  */
4561
4562
4563 /**
4564  * GSettings:schema:
4565  *
4566  * The name of the schema that describes the types of keys
4567  * for this #GSettings object.
4568  */
4569
4570
4571 /**
4572  * GSettingsBackend:
4573  *
4574  * An implementation of a settings storage repository.
4575  */
4576
4577
4578 /**
4579  * GSettingsBindFlags:
4580  * @G_SETTINGS_BIND_DEFAULT: Equivalent to <literal>G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET</literal>
4581  * @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.
4582  * @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.
4583  * @G_SETTINGS_BIND_NO_SENSITIVITY: Do not try to bind a "sensitivity" property to the writability of the setting
4584  * @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
4585  * @G_SETTINGS_BIND_INVERT_BOOLEAN: When passed to g_settings_bind(), uses a pair of mapping functions that invert the boolean value when mapping between the setting and the property.  The setting and property must both be booleans.  You cannot pass this flag to g_settings_bind_with_mapping().
4586  *
4587  * Flags used when creating a binding. These flags determine in which
4588  * direction the binding works. The default is to synchronize in both
4589  * directions.
4590  */
4591
4592
4593 /**
4594  * GSettingsBindGetMapping:
4595  * @value: return location for the property value
4596  * @variant: the #GVariant
4597  * @user_data: user data that was specified when the binding was created
4598  * @returns: %TRUE if the conversion succeeded, %FALSE in case of an error
4599  *
4600  * The type for the function that is used to convert from #GSettings to
4601  * an object property. The @value is already initialized to hold values
4602  * of the appropriate type.
4603  */
4604
4605
4606 /**
4607  * GSettingsBindSetMapping:
4608  * @value: a #GValue containing the property value to map
4609  * @expected_type: the #GVariantType to create
4610  * @user_data: user data that was specified when the binding was created
4611  * @returns: a new #GVariant holding the data from @value, or %NULL in case of an error
4612  *
4613  * The type for the function that is used to convert an object property
4614  * value to a #GVariant for storing it in #GSettings.
4615  */
4616
4617
4618 /**
4619  * GSettingsGetMapping:
4620  * @value: the #GVariant to map, or %NULL
4621  * @result: (out): the result of the mapping
4622  * @user_data: (closure): the user data that was passed to g_settings_get_mapped()
4623  * @returns: %TRUE if the conversion succeeded, %FALSE in case of an error
4624  *
4625  * The type of the function that is used to convert from a value stored
4626  * in a #GSettings to a value that is useful to the application.
4627  * If the value is successfully mapped, the result should be stored at
4628  * is not in the right format) then %FALSE should be returned.
4629  * If @value is %NULL then it means that the mapping function is being
4630  * given a "last chance" to successfully return a valid value.  %TRUE
4631  * must be returned in this case.
4632  */
4633
4634
4635 /**
4636  * GSignalAccumulator:
4637  * @ihint: Signal invocation hint, see #GSignalInvocationHint.
4638  * @return_accu: Accumulator to collect callback return values in, this is the return value of the current signal emission.
4639  * @handler_return: A #GValue holding the return value of the signal handler.
4640  * @data: Callback data that was specified when creating the signal.
4641  *
4642  * The signal accumulator is a special callback function that can be used
4643  * to collect return values of the various callbacks that are called
4644  * during a signal emission. The signal accumulator is specified at signal
4645  * creation time, if it is left %NULL, no accumulation of callback return
4646  * values is performed. The return value of signal emissions is then the
4647  * value returned by the last callback.
4648  * should be aborted. Returning %FALSE means to abort the
4649  * current emission and %TRUE is returned for continuation.
4650  *
4651  * Returns: The accumulator function returns whether the signal emission
4652  */
4653
4654
4655 /**
4656  * GSignalCMarshaller:
4657  *
4658  * This is the signature of marshaller functions, required to marshall
4659  * arrays of parameter values to signal emissions into C language callback
4660  * invocations. It is merely an alias to #GClosureMarshal since the #GClosure
4661  * mechanism takes over responsibility of actual function invocation for the
4662  * signal system.
4663  */
4664
4665
4666 /**
4667  * GSignalEmissionHook:
4668  * @ihint: Signal invocation hint, see #GSignalInvocationHint.
4669  * @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
4670  * @param_values: the instance on which the signal was emitted, followed by the parameters of the emission.
4671  * @data: user data associated with the hook.
4672  *
4673  * A simple function pointer to get invoked when the signal is emitted. This
4674  * allows you to tie a hook to the signal type, so that it will trap all
4675  * emissions of that signal, from any object.
4676  * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
4677  * hook is disconnected (and destroyed).
4678  *
4679  * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
4680  */
4681
4682
4683 /**
4684  * GSignalFlags:
4685  * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage.
4686  * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage.
4687  * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage.
4688  * @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.
4689  * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name upon handler connections and emissions.
4690  * @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.
4691  * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
4692  * @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the arguments, even if there are no signal handlers connected.  Since 2.30.
4693  *
4694  * The signal flags are used to specify a signal's behaviour, the overall
4695  * signal description outlines how especially the RUN flags control the
4696  * stages of a signal emission.
4697  */
4698
4699
4700 /**
4701  * GSignalInvocationHint:
4702  * @signal_id: The signal id of the signal invoking the callback
4703  * @detail: The detail passed on for this emission
4704  * @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.
4705  *
4706  * The #GSignalInvocationHint structure is used to pass on additional information
4707  * to callbacks during a signal emission.
4708  */
4709
4710
4711 /**
4712  * GSignalMatchType:
4713  * @G_SIGNAL_MATCH_ID: The signal id must be equal.
4714  * @G_SIGNAL_MATCH_DETAIL: The signal detail be equal.
4715  * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same.
4716  * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same.
4717  * @G_SIGNAL_MATCH_DATA: The closure data must be the same.
4718  * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may matched.
4719  *
4720  * The match types specify what g_signal_handlers_block_matched(),
4721  * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
4722  * match signals by.
4723  */
4724
4725
4726 /**
4727  * GSignalQuery:
4728  * @signal_id: The signal id of the signal being queried, or 0 if the signal to be queried was unknown.
4729  * @signal_name: The signal name.
4730  * @itype: The interface/instance type that this signal can be emitted for.
4731  * @signal_flags: The signal flags as passed in to g_signal_new().
4732  * @return_type: The return type for user callbacks.
4733  * @n_params: The number of parameters that user callbacks take.
4734  * @param_types: The individual parameter types for user callbacks, note that the effective callback signature is: <programlisting> [#param_types param_names,] #gpointer     data2); </programlisting>
4735  *
4736  * A structure holding in-depth information for a specific signal. It is
4737  * filled in by the g_signal_query() function.
4738  */
4739
4740
4741 /**
4742  * GSimpleAction:
4743  *
4744  * The <structname>GSimpleAction</structname> structure contains private
4745  * data and should only be accessed using the provided API
4746  *
4747  * Since: 2.28
4748  */
4749
4750
4751 /**
4752  * GSimpleAction::activate:
4753  * @simple: the #GSimpleAction
4754  * @parameter: (allow-none): the parameter to the activation
4755  *
4756  * Indicates that the action was just activated.
4757  * an incorrect type was given, no signal will be emitted.
4758  *
4759  * Since: 2.28
4760  */
4761
4762
4763 /**
4764  * GSimpleAction:enabled:
4765  *
4766  * If @action is currently enabled.
4767  * If the action is disabled then calls to g_simple_action_activate() and
4768  * g_simple_action_set_state() have no effect.
4769  *
4770  * Since: 2.28
4771  */
4772
4773
4774 /**
4775  * GSimpleAction:name:
4776  *
4777  * The name of the action.  This is mostly meaningful for identifying
4778  * the action once it has been added to a #GSimpleActionGroup.
4779  *
4780  * Since: 2.28
4781  */
4782
4783
4784 /**
4785  * GSimpleAction:parameter-type:
4786  *
4787  * The type of the parameter that must be given when activating the
4788  * action.
4789  *
4790  * Since: 2.28
4791  */
4792
4793
4794 /**
4795  * GSimpleAction:state:
4796  *
4797  * The state of the action, or %NULL if the action is stateless.
4798  *
4799  * Since: 2.28
4800  */
4801
4802
4803 /**
4804  * GSimpleAction:state-type:
4805  *
4806  * The #GVariantType of the state that the action has, or %NULL if the
4807  * action is stateless.
4808  *
4809  * Since: 2.28
4810  */
4811
4812
4813 /**
4814  * GSimpleActionClass:
4815  * @activate: the class closure for the activate signal
4816  *
4817  *
4818  *
4819  * Since: 2.28
4820  */
4821
4822
4823 /**
4824  * GSimpleActionGroup:
4825  *
4826  * The #GSimpleActionGroup structure contains private data and should only be accessed using the provided API.
4827  *
4828  * Since: 2.28
4829  */
4830
4831
4832 /**
4833  * GSimpleAsyncResult:
4834  *
4835  * A simple implementation of #GAsyncResult.
4836  */
4837
4838
4839 /**
4840  * GSimpleAsyncThreadFunc:
4841  * @res: a #GSimpleAsyncResult.
4842  * @object: a #GObject.
4843  * @cancellable: optional #GCancellable object, %NULL to ignore.
4844  *
4845  * Simple thread function that runs an asynchronous operation and
4846  * checks for cancellation.
4847  */
4848
4849
4850 /**
4851  * GSimplePermission:
4852  *
4853  * #GSimplePermission is an opaque data structure.  There are no methods
4854  * except for those defined by #GPermission.
4855  */
4856
4857
4858 /**
4859  * GSocket:
4860  *
4861  * A lowlevel network socket object.
4862  *
4863  * Since: 2.22
4864  */
4865
4866
4867 /**
4868  * GSocket:timeout:
4869  *
4870  * The timeout in seconds on socket I/O
4871  *
4872  * Since: 2.26
4873  */
4874
4875
4876 /**
4877  * GSocketAddress:
4878  *
4879  * A socket endpoint address, corresponding to <type>struct sockaddr</type>
4880  * or one of its subtypes.
4881  */
4882
4883
4884 /**
4885  * GSocketAddressEnumerator:
4886  *
4887  * Enumerator type for objects that contain or generate
4888  * #GSocketAddress<!-- -->es.
4889  */
4890
4891
4892 /**
4893  * GSocketClient:
4894  *
4895  * A helper class for network servers to listen for and accept connections.
4896  *
4897  * Since: 2.22
4898  */
4899
4900
4901 /**
4902  * GSocketConnectable:
4903  *
4904  * Interface for objects that contain or generate #GSocketAddress<!-- -->es.
4905  */
4906
4907
4908 /**
4909  * GSocketConnectableIface:
4910  * @g_iface: The parent interface.
4911  * @enumerate: Creates a #GSocketAddressEnumerator
4912  * @proxy_enumerate: Creates a #GProxyAddressEnumerator
4913  *
4914  * Provides an interface for returning a #GSocketAddressEnumerator
4915  * and #GProxyAddressEnumerator
4916  */
4917
4918
4919 /**
4920  * GSocketConnection:
4921  *
4922  * A socket connection GIOStream object for connection-oriented sockets.
4923  *
4924  * Since: 2.22
4925  */
4926
4927
4928 /**
4929  * GSocketControlMessage:
4930  *
4931  * Base class for socket-type specific control messages that can be sent and
4932  * received over #GSocket.
4933  */
4934
4935
4936 /**
4937  * GSocketControlMessageClass:
4938  * @get_size: gets the size of the message.
4939  * @get_level: gets the protocol of the message.
4940  * @get_type: gets the protocol specific type of the message.
4941  * @serialize: Writes out the message data.
4942  * @deserialize: Tries to deserialize a message.
4943  *
4944  *
4945  */
4946
4947
4948 /**
4949  * GSocketFamily:
4950  * @G_SOCKET_FAMILY_INVALID: no address family
4951  * @G_SOCKET_FAMILY_IPV4: the IPv4 family
4952  * @G_SOCKET_FAMILY_IPV6: the IPv6 family
4953  * @G_SOCKET_FAMILY_UNIX: the UNIX domain family
4954  *
4955  * The protocol family of a #GSocketAddress. (These values are
4956  * identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX,
4957  * if available.)
4958  *
4959  * Since: 2.22
4960  */
4961
4962
4963 /**
4964  * GSocketListenerClass:
4965  * @changed: virtual method called when the set of socket listened to changes
4966  *
4967  *
4968  */
4969
4970
4971 /**
4972  * GSocketMsgFlags:
4973  * @G_SOCKET_MSG_NONE: No flags.
4974  * @G_SOCKET_MSG_OOB: Request to send/receive out of band data.
4975  * @G_SOCKET_MSG_PEEK: Read data from the socket without removing it from the queue.
4976  * @G_SOCKET_MSG_DONTROUTE: Don't use a gateway to send out the packet, only send to hosts on directly connected networks.
4977  *
4978  * Flags used in g_socket_receive_message() and g_socket_send_message().
4979  * The flags listed in the enum are some commonly available flags, but the
4980  * values used for them are the same as on the platform, and any other flags
4981  * are passed in/out as is. So to use a platform specific flag, just include
4982  * the right system header and pass in the flag.
4983  *
4984  * Since: 2.22
4985  */
4986
4987
4988 /**
4989  * GSocketProtocol:
4990  * @G_SOCKET_PROTOCOL_UNKNOWN: The protocol type is unknown
4991  * @G_SOCKET_PROTOCOL_DEFAULT: The default protocol for the family/type
4992  * @G_SOCKET_PROTOCOL_TCP: TCP over IP
4993  * @G_SOCKET_PROTOCOL_UDP: UDP over IP
4994  * @G_SOCKET_PROTOCOL_SCTP: SCTP over IP
4995  *
4996  * A protocol identifier is specified when creating a #GSocket, which is a
4997  * family/type specific identifier, where 0 means the default protocol for
4998  * the particular family/type.
4999  * This enum contains a set of commonly available and used protocols. You
5000  * can also pass any other identifiers handled by the platform in order to
5001  * use protocols not listed here.
5002  *
5003  * Since: 2.22
5004  */
5005
5006
5007 /**
5008  * GSocketService:
5009  *
5010  * A helper class for handling accepting incomming connections in the
5011  * glib mainloop.
5012  *
5013  * Since: 2.22
5014  */
5015
5016
5017 /**
5018  * GSocketService::incoming:
5019  * @service: the #GSocketService.
5020  * @connection: a new #GSocketConnection object.
5021  * @source_object: the source_object passed to g_socket_listener_add_address().
5022  *
5023  * The ::incoming signal is emitted when a new incoming connection
5024  * to @service needs to be handled. The handler must initiate the
5025  * handling of @connection, but may not block; in essence,
5026  * asynchronous operations must be used.
5027  *
5028  * Returns: %TRUE to stop other handlers from being called
5029  * Since: 2.22
5030  */
5031
5032
5033 /**
5034  * GSocketServiceClass:
5035  * @incomming: signal emitted when new connections are accepted
5036  *
5037  *
5038  */
5039
5040
5041 /**
5042  * GSocketSourceFunc:
5043  * @socket: the #GSocket
5044  * @condition: the current condition at the source fired.
5045  * @user_data: data passed in by the user.
5046  *
5047  * This is the function type of the callback used for the #GSource
5048  * returned by g_socket_create_source().
5049  *
5050  * Returns: it should return %FALSE if the source should be removed.
5051  * Since: 2.22
5052  */
5053
5054
5055 /**
5056  * GSocketType:
5057  * @G_SOCKET_TYPE_INVALID: Type unknown or wrong
5058  * @G_SOCKET_TYPE_STREAM: Reliable connection-based byte streams (e.g. TCP).
5059  * @G_SOCKET_TYPE_DATAGRAM: Connectionless, unreliable datagram passing. (e.g. UDP)
5060  * @G_SOCKET_TYPE_SEQPACKET: Reliable connection-based passing of datagrams of fixed maximum length (e.g. SCTP).
5061  *
5062  * Flags used when creating a #GSocket. Some protocols may not implement
5063  * all the socket types.
5064  *
5065  * Since: 2.22
5066  */
5067
5068
5069 /**
5070  * GSource:
5071  *
5072  * The <structname>GSource</structname> struct is an opaque data type
5073  * representing an event source.
5074  */
5075
5076
5077 /**
5078  * GSourceCallbackFuncs:
5079  * @ref: Called when a reference is added to the callback object
5080  * @unref: Called when a reference to the callback object is dropped
5081  * @get: Called to extract the callback function and data from the callback object.
5082  *
5083  * The <structname>GSourceCallbackFuncs</structname> struct contains
5084  * functions for managing callback objects.
5085  */
5086
5087
5088 /**
5089  * GSourceFuncs:
5090  * @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
5091  * @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.
5092  * @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.
5093  * @finalize: Called when the source is finalized.
5094  *
5095  * The <structname>GSourceFuncs</structname> struct contains a table of
5096  * functions used to handle event sources in a generic manner.
5097  * For idle sources, the prepare and check functions always return %TRUE
5098  * to indicate that the source is always ready to be processed. The prepare
5099  * function also returns a timeout value of 0 to ensure that the poll() call
5100  * doesn't block (since that would be time wasted which could have been spent
5101  * running the idle function).
5102  * For timeout sources, the prepare and check functions both return %TRUE
5103  * if the timeout interval has expired. The prepare function also returns
5104  * a timeout value to ensure that the poll() call doesn't block too long
5105  * and miss the next timeout.
5106  * For file descriptor sources, the prepare function typically returns %FALSE,
5107  * since it must wait until poll() has been called before it knows whether
5108  * any events need to be processed. It sets the returned timeout to -1 to
5109  * indicate that it doesn't mind how long the poll() call blocks. In the
5110  * check function, it tests the results of the poll() call to see if the
5111  * required condition has been met, and returns %TRUE if so.
5112  */
5113
5114
5115 /**
5116  * GSrvTarget:
5117  *
5118  * A single target host/port that a network service is running on.
5119  */
5120
5121
5122 /**
5123  * GStrv:
5124  *
5125  * A C representable type name for #G_TYPE_STRV.
5126  */
5127
5128
5129 /**
5130  * GTcpConnection:
5131  *
5132  * A #GSocketConnection for UNIX domain socket connections.
5133  *
5134  * Since: 2.22
5135  */
5136
5137
5138 /**
5139  * GTestLogFatalFunc:
5140  * @log_domain: the log domain of the message
5141  * @log_level: the log level of the message (including the fatal and recursion flags)
5142  * @message: the message to process
5143  * @user_data: user data, set in g_test_log_set_fatal_handler()
5144  *
5145  * Specifies the prototype of fatal log handler functions.
5146  *
5147  * Returns: %TRUE if the program should abort, %FALSE otherwise
5148  * Since: 2.22
5149  */
5150
5151
5152 /**
5153  * GThemedIcon:
5154  *
5155  * An implementation of #GIcon for themed icons.
5156  */
5157
5158
5159 /**
5160  * GThemedIcon:name:
5161  *
5162  * The icon name.
5163  */
5164
5165
5166 /**
5167  * GThemedIcon:names:
5168  *
5169  * A %NULL-terminated array of icon names.
5170  */
5171
5172
5173 /**
5174  * GThemedIcon:use-default-fallbacks:
5175  *
5176  * Whether to use the default fallbacks found by shortening the icon name
5177  * at '-' characters. If the "names" array has more than one element,
5178  * ignores any past the first.
5179  * For example, if the icon name was "gnome-dev-cdrom-audio", the array
5180  * would become
5181  * |[
5182  * {
5183  * "gnome-dev-cdrom-audio",
5184  * "gnome-dev-cdrom",
5185  * "gnome-dev",
5186  * "gnome",
5187  * NULL
5188  * };
5189  * ]|
5190  */
5191
5192
5193 /**
5194  * GThreadedSocketService:
5195  *
5196  * A helper class for handling accepting incomming connections in the
5197  * glib mainloop and handling them in a thread.
5198  *
5199  * Since: 2.22
5200  */
5201
5202
5203 /**
5204  * GThreadedSocketService::run:
5205  * @service: the #GThreadedSocketService.
5206  * @connection: a new #GSocketConnection object.
5207  * @source_object: the source_object passed to g_socket_listener_add_address().
5208  *
5209  * The ::run signal is emitted in a worker thread in response to an
5210  * incoming connection. This thread is dedicated to handling
5211  * not return until the connection is closed.
5212  *
5213  * Returns: %TRUE to stope further signal handlers from being called
5214  */
5215
5216
5217 /**
5218  * GTimeSpan:
5219  *
5220  * A value representing an interval of time, in microseconds.
5221  *
5222  * Since: 2.26
5223  */
5224
5225
5226 /**
5227  * GTimeType:
5228  * @G_TIME_TYPE_STANDARD: the time is in local standard time
5229  * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time
5230  * @G_TIME_TYPE_UNIVERSAL: the time is in UTC
5231  *
5232  * Disambiguates a given time in two ways.
5233  * First, specifies if the given time is in universal or local time.
5234  * Second, if the time is in local time, specifies if it is local
5235  * standard time or local daylight time.  This is important for the case
5236  * where the same local time occurs twice (during daylight savings time
5237  * transitions, for example).
5238  */
5239
5240
5241 /**
5242  * GTlsAuthenticationMode:
5243  * @G_TLS_AUTHENTICATION_NONE: client authentication not required
5244  * @G_TLS_AUTHENTICATION_REQUESTED: client authentication is requested
5245  * @G_TLS_AUTHENTICATION_REQUIRED: client authentication is required
5246  *
5247  * The client authentication mode for a #GTlsServerConnection.
5248  *
5249  * Since: 2.28
5250  */
5251
5252
5253 /**
5254  * GTlsBackend:
5255  *
5256  * TLS (Transport Layer Security, aka SSL) backend. This is an
5257  * internal type used to coordinate the different classes implemented
5258  * by a TLS backend.
5259  *
5260  * Since: 2.28
5261  */
5262
5263
5264 /**
5265  * GTlsBackendInterface:
5266  * @g_iface: The parent interface.
5267  * @get_certificate_type: returns the #GTlsCertificate implementation type
5268  * @get_client_connection_type: returns the #GTlsClientConnection implementation type
5269  * @get_server_connection_type: returns the #GTlsServerConnection implementation type
5270  *
5271  * Provides an interface for describing TLS-related types.
5272  *
5273  * Since: 2.28
5274  */
5275
5276
5277 /**
5278  * GTlsCertificate:
5279  *
5280  * Abstract base class for TLS certificate types.
5281  *
5282  * Since: 2.28
5283  */
5284
5285
5286 /**
5287  * GTlsCertificate:certificate:
5288  *
5289  * The DER (binary) encoded representation of the certificate's
5290  * public key. This property and the
5291  * #GTlsCertificate:certificate-pem property represent the same
5292  * data, just in different forms.
5293  *
5294  * Since: 2.28
5295  */
5296
5297
5298 /**
5299  * GTlsCertificate:certificate-pem:
5300  *
5301  * The PEM (ASCII) encoded representation of the certificate's
5302  * public key. This property and the #GTlsCertificate:certificate
5303  * property represent the same data, just in different forms.
5304  *
5305  * Since: 2.28
5306  */
5307
5308
5309 /**
5310  * GTlsCertificate:issuer:
5311  *
5312  * A #GTlsCertificate representing the entity that issued this
5313  * certificate. If %NULL, this means that the certificate is either
5314  * self-signed, or else the certificate of the issuer is not
5315  * available.
5316  *
5317  * Since: 2.28
5318  */
5319
5320
5321 /**
5322  * GTlsCertificate:private-key:
5323  *
5324  * The DER (binary) encoded representation of the certificate's
5325  * private key. This property (or the
5326  * #GTlsCertificate:private-key-pem property) can be set when
5327  * constructing a key (eg, from a file), but cannot be read.
5328  *
5329  * Since: 2.28
5330  */
5331
5332
5333 /**
5334  * GTlsCertificate:private-key-pem:
5335  *
5336  * The PEM (ASCII) encoded representation of the certificate's
5337  * private key. This property (or the #GTlsCertificate:private-key
5338  * property) can be set when constructing a key (eg, from a file),
5339  * but cannot be read.
5340  *
5341  * Since: 2.28
5342  */
5343
5344
5345 /**
5346  * GTlsCertificateFlags:
5347  * @G_TLS_CERTIFICATE_UNKNOWN_CA: The signing certificate authority is not known.
5348  * @G_TLS_CERTIFICATE_BAD_IDENTITY: The certificate does not match the expected identity of the site that it was retrieved from.
5349  * @G_TLS_CERTIFICATE_NOT_ACTIVATED: The certificate's activation time is still in the future
5350  * @G_TLS_CERTIFICATE_EXPIRED: The certificate has expired
5351  * @G_TLS_CERTIFICATE_REVOKED: The certificate has been revoked according to the #GTlsContext's certificate revocation list.
5352  * @G_TLS_CERTIFICATE_INSECURE: The certificate's algorithm is considered insecure.
5353  * @G_TLS_CERTIFICATE_GENERIC_ERROR: Some other error occurred validating the certificate
5354  * @G_TLS_CERTIFICATE_VALIDATE_ALL: the combination of all of the above flags
5355  *
5356  * A set of flags describing TLS certification validation. This can be
5357  * used to set which validation steps to perform (eg, with
5358  * g_tls_client_connection_set_validation_flags()), or to describe why
5359  * a particular certificate was rejected (eg, in
5360  * #GTlsConnection::accept-certificate).
5361  *
5362  * Since: 2.28
5363  */
5364
5365
5366 /**
5367  * GTlsClientConnection:
5368  *
5369  * TLS client-side connection; the client-side implementation of a
5370  * #GTlsConnection
5371  *
5372  * Since: 2.28
5373  */
5374
5375
5376 /**
5377  * GTlsClientConnection:accepted-cas:
5378  *
5379  * A list of the distinguished names of the Certificate Authorities
5380  * that the server will accept client certificates signed by. If the
5381  * server requests a client certificate during the handshake, then
5382  * this property will be set after the handshake completes.
5383  * Each item in the list is a #GByteArray which contains the complete
5384  * subject DN of the certificate authority.
5385  *
5386  * Since: 2.28
5387  */
5388
5389
5390 /**
5391  * GTlsClientConnection:server-identity:
5392  *
5393  * A #GSocketConnectable describing the identity of the server that
5394  * is expected on the other end of the connection.
5395  * If the %G_TLS_CERTIFICATE_BAD_IDENTITY flag is set in
5396  * #GTlsClientConnection:validation-flags, this object will be used
5397  * to determine the expected identify of the remote end of the
5398  * connection; if #GTlsClientConnection:server-identity is not set,
5399  * or does not match the identity presented by the server, then the
5400  * %G_TLS_CERTIFICATE_BAD_IDENTITY validation will fail.
5401  * In addition to its use in verifying the server certificate,
5402  * this is also used to give a hint to the server about what
5403  * certificate we expect, which is useful for servers that serve
5404  * virtual hosts.
5405  *
5406  * Since: 2.28
5407  */
5408
5409
5410 /**
5411  * GTlsClientConnection:use-ssl3:
5412  *
5413  * If %TRUE, tells the connection to use SSL 3.0 rather than trying
5414  * to negotiate the best version of TLS or SSL to use. This can be
5415  * used when talking to servers that don't implement version
5416  * negotiation correctly and therefore refuse to handshake at all with
5417  * a "modern" TLS handshake.
5418  *
5419  * Since: 2.28
5420  */
5421
5422
5423 /**
5424  * GTlsClientConnection:validation-flags:
5425  *
5426  * What steps to perform when validating a certificate received from
5427  * a server. Server certificates that fail to validate in all of the
5428  * ways indicated here will be rejected unless the application
5429  * overrides the default via #GTlsConnection::accept-certificate.
5430  *
5431  * Since: 2.28
5432  */
5433
5434
5435 /**
5436  * GTlsConnection:
5437  *
5438  * TLS connection. This is an abstract type that will be subclassed by
5439  * a TLS-library-specific subtype.
5440  *
5441  * Since: 2.28
5442  */
5443
5444
5445 /**
5446  * GTlsConnection::accept-certificate:
5447  * @conn: a #GTlsConnection
5448  * @peer_cert: the peer's #GTlsCertificate
5449  * @errors: the problems with @peer_cert.
5450  *
5451  * Emitted during the TLS handshake after the peer certificate has
5452  * been received. You can examine @peer_cert's certification path by
5453  * calling g_tls_certificate_get_issuer() on it.
5454  * For a client-side connection, @peer_cert is the server's
5455  * certificate, and the signal will only be emitted if the
5456  * certificate was not acceptable according to @conn's
5457  * #GTlsClientConnection:validation_flags. If you would like the
5458  * certificate to be accepted despite @errors, return %TRUE from the
5459  * signal handler. Otherwise, if no handler accepts the certificate,
5460  * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE.
5461  * For a server-side connection, @peer_cert is the certificate
5462  * presented by the client, if this was requested via the server's
5463  * #GTlsServerConnection:authentication_mode. On the server side,
5464  * the signal is always emitted when the client presents a
5465  * certificate, and the certificate will only be accepted if a
5466  * handler returns %TRUE.
5467  * Note that if this signal is emitted as part of asynchronous I/O
5468  * in the main thread, then you should not attempt to interact with
5469  * the user before returning from the signal handler. If you want to
5470  * let the user decide whether or not to accept the certificate, you
5471  * would have to return %FALSE from the signal handler on the first
5472  * attempt, and then after the connection attempt returns a
5473  * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if
5474  * the user decides to accept the certificate, remember that fact,
5475  * create a new connection, and return %TRUE from the signal handler
5476  * the next time.
5477  * If you are doing I/O in another thread, you do not
5478  * need to worry about this, and can simply block in the signal
5479  * handler until the UI thread returns an answer.
5480  * immediately end the signal emission). %FALSE to allow the signal
5481  * emission to continue, which will cause the handshake to fail if
5482  * no one else overrides it.
5483  *
5484  * Returns: %TRUE to accept @peer_cert (which will also
5485  * Since: 2.28
5486  */
5487
5488
5489 /**
5490  * GTlsConnection:base-io-stream:
5491  *
5492  * The #GIOStream that the connection wraps
5493  *
5494  * Since: 2.28
5495  */
5496
5497
5498 /**
5499  * GTlsConnection:certificate:
5500  *
5501  * The connection's certificate; see
5502  * g_tls_connection_set_certificate().
5503  *
5504  * Since: 2.28
5505  */
5506
5507
5508 /**
5509  * GTlsConnection:peer-certificate:
5510  *
5511  * The connection's peer's certificate, after the TLS handshake has
5512  * completed and the certificate has been accepted. Note in
5513  * particular that this is not yet set during the emission of
5514  * #GTlsConnection::accept-certificate.
5515  * (You can watch for a #GObject::notify signal on this property to
5516  * detect when a handshake has occurred.)
5517  *
5518  * Since: 2.28
5519  */
5520
5521
5522 /**
5523  * GTlsConnection:peer-certificate-errors:
5524  *
5525  * The errors noticed-and-ignored while verifying
5526  * #GTlsConnection:peer-certificate. Normally this should be %0, but
5527  * it may not be if #GTlsClientConnection::validation-flags is not
5528  * %G_TLS_CERTIFICATE_VALIDATE_ALL, or if
5529  * #GTlsConnection::accept-certificate overrode the default
5530  * behavior.
5531  *
5532  * Since: 2.28
5533  */
5534
5535
5536 /**
5537  * GTlsConnection:rehandshake-mode:
5538  *
5539  * The rehandshaking mode. See
5540  * g_tls_connection_set_rehandshake_mode().
5541  *
5542  * Since: 2.28
5543  */
5544
5545
5546 /**
5547  * GTlsConnection:require-close-notify:
5548  *
5549  * Whether or not proper TLS close notification is required.
5550  * See g_tls_connection_set_require_close_notify().
5551  *
5552  * Since: 2.28
5553  */
5554
5555
5556 /**
5557  * GTlsConnection:use-system-certdb:
5558  *
5559  * Whether or not the system certificate database will be used to
5560  * verify peer certificates. See
5561  * g_tls_connection_set_use_system_certdb().
5562  *
5563  * Since: 2.28
5564  */
5565
5566
5567 /**
5568  * GTlsError:
5569  * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available
5570  * @G_TLS_ERROR_MISC: Miscellaneous TLS error
5571  * @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed
5572  * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the peer does not seem to be a TLS server.
5573  * @G_TLS_ERROR_HANDSHAKE: The TLS handshake failed because the peer's certificate was not acceptable.
5574  * @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().
5575  * @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().
5576  *
5577  * An error code used with %G_TLS_ERROR in a #GError returned from a
5578  * TLS-related routine.
5579  *
5580  * Since: 2.28
5581  */
5582
5583
5584 /**
5585  * GTlsRehandshakeMode:
5586  * @G_TLS_REHANDSHAKE_NEVER: Never allow rehandshaking
5587  * @G_TLS_REHANDSHAKE_SAFELY: Allow safe rehandshaking only
5588  * @G_TLS_REHANDSHAKE_UNSAFELY: Allow unsafe rehandshaking
5589  *
5590  * When to allow rehandshaking. See
5591  * g_tls_connection_set_rehandshake_mode().
5592  *
5593  * Since: 2.28
5594  */
5595
5596
5597 /**
5598  * GTlsServerConnection:
5599  *
5600  * TLS server-side connection. This is the server-side implementation
5601  * of a #GTlsConnection.
5602  *
5603  * Since: 2.28
5604  */
5605
5606
5607 /**
5608  * GTlsServerConnection:authentication-mode:
5609  *
5610  * The #GTlsAuthenticationMode for the server. This can be changed
5611  * before calling g_tls_connection_handshake() if you want to
5612  * rehandshake with a different mode from the initial handshake.
5613  *
5614  * Since: 2.28
5615  */
5616
5617
5618 /**
5619  * GToggleNotify:
5620  * @data: Callback data passed to g_object_add_toggle_ref()
5621  * @object: The object on which g_object_add_toggle_ref() was called.
5622  * @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.
5623  *
5624  * A callback function used for notification when the state
5625  * of a toggle reference changes. See g_object_add_toggle_ref().
5626  */
5627
5628
5629 /**
5630  * GTranslateFunc:
5631  * @str: the untranslated string
5632  * @data: user data specified when installing the function, e.g. in g_option_group_set_translate_func()
5633  *
5634  * The type of functions which are used to translate user-visible
5635  * strings, for <option>--help</option> output.
5636  * The returned string is owned by GLib and must not be freed.
5637  *
5638  * Returns: a translation of the string for the current locale.
5639  */
5640
5641
5642 /**
5643  * GType:
5644  *
5645  * A numerical value which represents the unique identifier of a registered
5646  * type.
5647  */
5648
5649
5650 /**
5651  * GTypeClass:
5652  *
5653  * An opaque structure used as the base of all classes.
5654  */
5655
5656
5657 /**
5658  * GTypeClassCacheFunc:
5659  * @cache_data: data that was given to the g_type_add_class_cache_func() call
5660  * @g_class: The #GTypeClass structure which is unreferenced
5661  *
5662  * A callback function which is called when the reference count of a class
5663  * drops to zero. It may use g_type_class_ref() to prevent the class from
5664  * being freed. You should not call g_type_class_unref() from a
5665  * #GTypeClassCacheFunc function to prevent infinite recursion, use
5666  * g_type_class_unref_uncached() instead.
5667  * The functions have to check the class id passed in to figure
5668  * whether they actually want to cache the class of this type, since all
5669  * classes are routed through the same #GTypeClassCacheFunc chain.
5670  * called, %FALSE to continue.
5671  *
5672  * Returns: %TRUE to stop further #GTypeClassCacheFunc<!-- -->s from being
5673  */
5674
5675
5676 /**
5677  * GTypeDebugFlags:
5678  * @G_TYPE_DEBUG_NONE: Print no messages.
5679  * @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping.
5680  * @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions.
5681  * @G_TYPE_DEBUG_MASK: Mask covering all debug flags.
5682  *
5683  * The <type>GTypeDebugFlags</type> enumeration values can be passed to
5684  * g_type_init_with_debug_flags() to trigger debugging messages during runtime.
5685  * Note that the messages can also be triggered by setting the
5686  * <envar>GOBJECT_DEBUG</envar> environment variable to a ':'-separated list of
5687  * "objects" and "signals".
5688  */
5689
5690
5691 /**
5692  * GTypeFlags:
5693  * @G_TYPE_FLAG_ABSTRACT: Indicates an abstract type. No instances can be created for an abstract type.
5694  * @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().
5695  *
5696  * Bit masks used to check or determine characteristics of a type.
5697  */
5698
5699
5700 /**
5701  * GTypeFundamentalFlags:
5702  * @G_TYPE_FLAG_CLASSED: Indicates a classed type.
5703  * @G_TYPE_FLAG_INSTANTIATABLE: Indicates an instantiable type (implies classed).
5704  * @G_TYPE_FLAG_DERIVABLE: Indicates a flat derivable type.
5705  * @G_TYPE_FLAG_DEEP_DERIVABLE: Indicates a deep derivable type (implies derivable).
5706  *
5707  * Bit masks used to check or determine specific characteristics of a
5708  * fundamental type.
5709  */
5710
5711
5712 /**
5713  * GTypeFundamentalInfo:
5714  * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type
5715  *
5716  * A structure that provides information to the type system which is
5717  * used specifically for managing fundamental types.
5718  */
5719
5720
5721 /**
5722  * GTypeInfo:
5723  * @class_size: Size of the class structure (required for interface, classed and instantiatable types).
5724  * @base_init: Location of the base initialization function (optional).
5725  * @base_finalize: Location of the base finalization function (optional).
5726  * @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.
5727  * @class_finalize: Location of the class finalization function for classed and instantiatable types. Location fo the default vtable finalization function for interface types. (optional)
5728  * @class_data: User-supplied data passed to the class init/finalize functions.
5729  * @instance_size: Size of the instance (object) structure (required for instantiatable types only).
5730  * @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.
5731  * @instance_init: Location of the instance initialization function (optional, for instantiatable types only).
5732  * @value_table: A #GTypeValueTable function table for generic handling of GValues of this type (usually only useful for fundamental types).
5733  *
5734  * This structure is used to provide the type system with the information
5735  * required to initialize and destruct (finalize) a type's class and
5736  * its instances.
5737  * The initialized structure is passed to the g_type_register_static() function
5738  * (or is copied into the provided #GTypeInfo structure in the
5739  * g_type_plugin_complete_type_info()). The type system will perform a deep
5740  * copy of this structure, so its memory does not need to be persistent
5741  * across invocation of g_type_register_static().
5742  */
5743
5744
5745 /**
5746  * GTypeInstance:
5747  *
5748  * An opaque structure used as the base of all type instances.
5749  */
5750
5751
5752 /**
5753  * GTypeInterface:
5754  *
5755  * An opaque structure used as the base of all interface types.
5756  */
5757
5758
5759 /**
5760  * GTypeInterfaceCheckFunc:
5761  * @check_data: data passed to g_type_add_interface_check().
5762  * @g_iface: the interface that has been initialized
5763  *
5764  * A callback called after an interface vtable is initialized.
5765  * See g_type_add_interface_check().
5766  *
5767  * Since: 2.4
5768  */
5769
5770
5771 /**
5772  * GTypeModule:
5773  * @name: the name of the module
5774  *
5775  * The members of the <structname>GTypeModule</structname> structure should not
5776  * be accessed directly, except for the @name field.
5777  */
5778
5779
5780 /**
5781  * GTypeModuleClass:
5782  * @parent_class: the parent class
5783  * @load: loads the module and registers one or more types using g_type_module_register_type().
5784  * @unload: unloads the module
5785  *
5786  * In order to implement dynamic loading of types based on #GTypeModule,
5787  * the @load and @unload functions in #GTypeModuleClass must be implemented.
5788  */
5789
5790
5791 /**
5792  * GTypePlugin:
5793  *
5794  * The <structname>GTypePlugin</structname> typedef is used as a placeholder
5795  * for objects that implement the <structname>GTypePlugin</structname>
5796  * interface.
5797  */
5798
5799
5800 /**
5801  * GTypePluginClass:
5802  * @use_plugin: Increases the use count of the plugin.
5803  * @unuse_plugin: Decreases the use count of the plugin.
5804  * @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.
5805  * @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.
5806  *
5807  * The #GTypePlugin interface is used by the type system in order to handle
5808  * the lifecycle of dynamically loaded types.
5809  */
5810
5811
5812 /**
5813  * GTypePluginCompleteInterfaceInfo:
5814  * @plugin: the #GTypePlugin
5815  * @instance_type: the #GType of an instantiable type to which the interface is added
5816  * @interface_type: the #GType of the interface whose info is completed
5817  * @info: the #GInterfaceInfo to fill in
5818  *
5819  * The type of the @complete_interface_info function of #GTypePluginClass.
5820  */
5821
5822
5823 /**
5824  * GTypePluginCompleteTypeInfo:
5825  * @plugin: the #GTypePlugin
5826  * @g_type: the #GType whose info is completed
5827  * @info: the #GTypeInfo struct to fill in
5828  * @value_table: the #GTypeValueTable to fill in
5829  *
5830  * The type of the @complete_type_info function of #GTypePluginClass.
5831  */
5832
5833
5834 /**
5835  * GTypePluginUnuse:
5836  * @plugin: the #GTypePlugin whose use count should be decreased
5837  *
5838  * The type of the @unuse_plugin function of #GTypePluginClass.
5839  */
5840
5841
5842 /**
5843  * GTypePluginUse:
5844  * @plugin: the #GTypePlugin whose use count should be increased
5845  *
5846  * The type of the @use_plugin function of #GTypePluginClass, which gets called
5847  * to increase the use count of @plugin.
5848  */
5849
5850
5851 /**
5852  * GTypeQuery:
5853  * @type: the #GType value of the type.
5854  * @type_name: the name of the type.
5855  * @class_size: the size of the class structure.
5856  * @instance_size: the size of the instance structure.
5857  *
5858  * A structure holding information for a specific type. It is
5859  * filled in by the g_type_query() function.
5860  */
5861
5862
5863 /**
5864  * GTypeValueTable:
5865  * @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 (""); ]|
5866  * @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); ]|
5867  * @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); ]|
5868  * @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; ]|
5869  * @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'.
5870  * @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.
5871  * @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.
5872  * @lcopy_value: This function is responsible for storing the @value contents into arguments passed through a variable argument list which got collected into @collect_values according to @lcopy_format. and @collect_flags may contain %G_VALUE_NOCOPY_CONTENTS. In contrast to collect_value(), lcopy_value() is obliged to always properly support %G_VALUE_NOCOPY_CONTENTS. Similar to collect_value() the function may prematurely abort by returning a newly allocated string describing an error condition. To complete the string example: |[ gchar **string_p = collect_values[0].v_pointer; if (!string_p) return g_strdup_printf ("string location passed as NULL"); if (collect_flags & G_VALUE_NOCOPY_CONTENTS) *string_p = value->data[0].v_pointer; else *string_p = g_strdup (value->data[0].v_pointer); ]| And an illustrative version of lcopy_value() for reference-counted types: |[ GObject **object_p = collect_values[0].v_pointer; if (!object_p) return g_strdup_printf ("object location passed as NULL"); if (!value->data[0].v_pointer) *object_p = NULL; else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) /&ast; always honour &ast;/ *object_p = value->data[0].v_pointer; else *object_p = g_object_ref (value->data[0].v_pointer); return NULL; ]|
5873  *
5874  * The #GTypeValueTable provides the functions required by the #GValue implementation,
5875  * to serve as a container for values of a type.
5876  */
5877
5878
5879 /**
5880  * GUnixCredentialsMessage:
5881  *
5882  * The #GUnixCredentialsMessage structure contains only private data
5883  * and should only be accessed using the provided API.
5884  *
5885  * Since: 2.26
5886  */
5887
5888
5889 /**
5890  * GUnixCredentialsMessage:credentials:
5891  *
5892  * The credentials stored in the message.
5893  *
5894  * Since: 2.26
5895  */
5896
5897
5898 /**
5899  * GUnixCredentialsMessageClass:
5900  *
5901  * Class structure for #GUnixCredentialsMessage.
5902  *
5903  * Since: 2.26
5904  */
5905
5906
5907 /**
5908  * GUnixInputStream:
5909  *
5910  * Implements #GInputStream for reading from selectable unix file descriptors
5911  */
5912
5913
5914 /**
5915  * GUnixInputStream:close-fd:
5916  *
5917  * Whether to close the file descriptor when the stream is closed.
5918  *
5919  * Since: 2.20
5920  */
5921
5922
5923 /**
5924  * GUnixInputStream:fd:
5925  *
5926  * The file descriptor that the stream reads from.
5927  *
5928  * Since: 2.20
5929  */
5930
5931
5932 /**
5933  * GUnixMount:
5934  *
5935  * Implementation of the #GMount interface for Unix systems.
5936  */
5937
5938
5939 /**
5940  * GUnixMountEntry:
5941  *
5942  * Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>).
5943  * This corresponds roughly to a mtab entry.
5944  */
5945
5946
5947 /**
5948  * GUnixMountMonitor:
5949  *
5950  * Watches #GUnixMount<!-- -->s for changes.
5951  */
5952
5953
5954 /**
5955  * GUnixMountMonitor::mountpoints-changed:
5956  * @monitor: the object on which the signal is emitted
5957  *
5958  * Emitted when the unix mount points have changed.
5959  */
5960
5961
5962 /**
5963  * GUnixMountMonitor::mounts-changed:
5964  * @monitor: the object on which the signal is emitted
5965  *
5966  * Emitted when the unix mounts have changed.
5967  */
5968
5969
5970 /**
5971  * GUnixMountPoint:
5972  *
5973  * Defines a Unix mount point (e.g. <filename>/dev</filename>).
5974  * This corresponds roughly to a fstab entry.
5975  */
5976
5977
5978 /**
5979  * GUnixOutputStream:
5980  *
5981  * Implements #GOutputStream for outputting to selectable unix file descriptors
5982  */
5983
5984
5985 /**
5986  * GUnixOutputStream:close-fd:
5987  *
5988  * Whether to close the file descriptor when the stream is closed.
5989  *
5990  * Since: 2.20
5991  */
5992
5993
5994 /**
5995  * GUnixOutputStream:fd:
5996  *
5997  * The file descriptor that the stream writes to.
5998  *
5999  * Since: 2.20
6000  */
6001
6002
6003 /**
6004  * GUnixSocketAddress:
6005  *
6006  * A UNIX-domain (local) socket address, corresponding to a
6007  * <type>struct sockaddr_un</type>.
6008  */
6009
6010
6011 /**
6012  * GUnixSocketAddress:abstract:
6013  *
6014  * Whether or not this is an abstract address
6015  * distinguishes between zero-padded and non-zero-padded
6016  * abstract addresses.
6017  *
6018  * Deprecated: Use #GUnixSocketAddress:address-type, which
6019  */
6020
6021
6022 /**
6023  * GUnixSocketAddressType:
6024  * @G_UNIX_SOCKET_ADDRESS_INVALID: invalid
6025  * @G_UNIX_SOCKET_ADDRESS_ANONYMOUS: anonymous
6026  * @G_UNIX_SOCKET_ADDRESS_PATH: a filesystem path
6027  * @G_UNIX_SOCKET_ADDRESS_ABSTRACT: an abstract name
6028  * @G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED: an abstract name, 0-padded to the full length of a unix socket name
6029  *
6030  * The type of name used by a #GUnixSocketAddress.
6031  * %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain
6032  * socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS
6033  * indicates a socket not bound to any name (eg, a client-side socket,
6034  * or a socket created with socketpair()).
6035  * For abstract sockets, there are two incompatible ways of naming
6036  * them; the man pages suggest using the entire <literal>struct
6037  * sockaddr_un</literal> as the name, padding the unused parts of the
6038  * %sun_path field with zeroes; this corresponds to
6039  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED. However, many programs
6040  * instead just use a portion of %sun_path, and pass an appropriate
6041  * smaller length to bind() or connect(). This is
6042  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT.
6043  *
6044  * Since: 2.26
6045  */
6046
6047
6048 /**
6049  * GUserDirectory:
6050  * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory
6051  * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory
6052  * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory
6053  * @G_USER_DIRECTORY_MUSIC: the user's Music directory
6054  * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory
6055  * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory
6056  * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory
6057  * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory
6058  * @G_USER_N_DIRECTORIES: the number of enum values
6059  *
6060  * These are logical ids for special directories which are defined
6061  * depending on the platform used. You should use g_get_user_special_dir()
6062  * to retrieve the full path associated to the logical id.
6063  * The #GUserDirectory enumeration can be extended at later date. Not
6064  * every platform has a directory for every logical id in this
6065  * enumeration.
6066  *
6067  * Since: 2.14
6068  */
6069
6070
6071 /**
6072  * GValue:
6073  *
6074  * An opaque structure used to hold different types of values.
6075  * to functions within a #GTypeValueTable structure, or implementations of
6076  * the g_value_*() API. That is, code portions which implement new fundamental
6077  * types.
6078  * #GValue users cannot make any assumptions about how data is stored
6079  * within the 2 element @data union, and the @g_type member should
6080  * only be accessed through the G_VALUE_TYPE() macro.
6081  *
6082  * The data within the structure has protected scope: it is accessible only
6083  */
6084
6085
6086 /**
6087  * GValueArray:
6088  * @n_values: number of values contained in the array
6089  * @values: array of values
6090  *
6091  * A #GValueArray contains an array of #GValue elements.
6092  */
6093
6094
6095 /**
6096  * GValueTransform:
6097  * @src_value: Source value.
6098  * @dest_value: Target value.
6099  *
6100  * The type of value transformation functions which can be registered with
6101  * g_value_register_transform_func().
6102  */
6103
6104
6105 /**
6106  * GVariantType:
6107  *
6108  * A type in the GVariant type system.
6109  * Two types may not be compared by value; use g_variant_type_equal() or
6110  * g_variant_type_is_subtype_of().  May be copied using
6111  * g_variant_type_copy() and freed using g_variant_type_free().
6112  */
6113
6114
6115 /**
6116  * GVfs:
6117  *
6118  * Virtual File System object.
6119  */
6120
6121
6122 /**
6123  * GVolume:
6124  *
6125  * Opaque mountable volume object.
6126  */
6127
6128
6129 /**
6130  * GVolume::changed:
6131  *
6132  * Emitted when the volume has been changed.
6133  */
6134
6135
6136 /**
6137  * GVolume::removed:
6138  *
6139  * This signal is emitted when the #GVolume have been removed. If
6140  * the recipient is holding references to the object they should
6141  * release them so the object can be finalized.
6142  */
6143
6144
6145 /**
6146  * GVolumeIface:
6147  * @g_iface: The parent interface.
6148  * @changed: Changed signal that is emitted when the volume's state has changed.
6149  * @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.
6150  * @get_name: Gets a string containing the name of the #GVolume.
6151  * @get_icon: Gets a #GIcon for the #GVolume.
6152  * @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.
6153  * @get_drive: Gets a #GDrive the volume is located on. Returns %NULL if the #GVolume is not associated with a #GDrive.
6154  * @get_mount: Gets a #GMount representing the mounted volume. Returns %NULL if the #GVolume is not mounted.
6155  * @can_mount: Returns %TRUE if the #GVolume can be mounted.
6156  * @can_eject: Checks if a #GVolume can be ejected.
6157  * @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.
6158  * @mount_finish: Finishes a mount operation.
6159  * @eject: Ejects a given #GVolume.
6160  * @eject_finish: Finishes an eject operation.
6161  * @get_identifier: Returns the <link linkend="volume-identifier">identifier</link> of the given kind, or %NULL if the #GVolume doesn't have one.
6162  * @enumerate_identifiers: Returns an array strings listing the kinds of <link linkend="volume-identifier">identifiers</link> which the #GVolume has.
6163  * @should_automount: Returns %TRUE if the #GVolume should be automatically mounted.
6164  * @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if it is not known.
6165  * @eject_with_operation: Starts ejecting a #GVolume using a #GMountOperation. Since 2.22.
6166  * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
6167  *
6168  * Interface for implementing operations for mountable volumes.
6169  */
6170
6171
6172 /**
6173  * GVolumeMonitor:
6174  *
6175  * A Volume Monitor that watches for volume events.
6176  */
6177
6178
6179 /**
6180  * GVolumeMonitor::drive-changed:
6181  * @volume_monitor: The volume monitor emitting the signal.
6182  * @drive: the drive that changed
6183  *
6184  * Emitted when a drive changes.
6185  */
6186
6187
6188 /**
6189  * GVolumeMonitor::drive-connected:
6190  * @volume_monitor: The volume monitor emitting the signal.
6191  * @drive: a #GDrive that was connected.
6192  *
6193  * Emitted when a drive is connected to the system.
6194  */
6195
6196
6197 /**
6198  * GVolumeMonitor::drive-disconnected:
6199  * @volume_monitor: The volume monitor emitting the signal.
6200  * @drive: a #GDrive that was disconnected.
6201  *
6202  * Emitted when a drive is disconnected from the system.
6203  */
6204
6205
6206 /**
6207  * GVolumeMonitor::drive-eject-button:
6208  * @volume_monitor: The volume monitor emitting the signal.
6209  * @drive: the drive where the eject button was pressed
6210  *
6211  * Emitted when the eject button is pressed on @drive.
6212  *
6213  * Since: 2.18
6214  */
6215
6216
6217 /**
6218  * GVolumeMonitor::drive-stop-button:
6219  * @volume_monitor: The volume monitor emitting the signal.
6220  * @drive: the drive where the stop button was pressed
6221  *
6222  * Emitted when the stop button is pressed on @drive.
6223  *
6224  * Since: 2.22
6225  */
6226
6227
6228 /**
6229  * GVolumeMonitor::mount-added:
6230  * @volume_monitor: The volume monitor emitting the signal.
6231  * @mount: a #GMount that was added.
6232  *
6233  * Emitted when a mount is added.
6234  */
6235
6236
6237 /**
6238  * GVolumeMonitor::mount-changed:
6239  * @volume_monitor: The volume monitor emitting the signal.
6240  * @mount: a #GMount that changed.
6241  *
6242  * Emitted when a mount changes.
6243  */
6244
6245
6246 /**
6247  * GVolumeMonitor::mount-pre-unmount:
6248  * @volume_monitor: The volume monitor emitting the signal.
6249  * @mount: a #GMount that is being unmounted.
6250  *
6251  * Emitted when a mount is about to be removed.
6252  */
6253
6254
6255 /**
6256  * GVolumeMonitor::mount-removed:
6257  * @volume_monitor: The volume monitor emitting the signal.
6258  * @mount: a #GMount that was removed.
6259  *
6260  * Emitted when a mount is removed.
6261  */
6262
6263
6264 /**
6265  * GVolumeMonitor::volume-added:
6266  * @volume_monitor: The volume monitor emitting the signal.
6267  * @volume: a #GVolume that was added.
6268  *
6269  * Emitted when a mountable volume is added to the system.
6270  */
6271
6272
6273 /**
6274  * GVolumeMonitor::volume-changed:
6275  * @volume_monitor: The volume monitor emitting the signal.
6276  * @volume: a #GVolume that changed.
6277  *
6278  * Emitted when mountable volume is changed.
6279  */
6280
6281
6282 /**
6283  * GVolumeMonitor::volume-removed:
6284  * @volume_monitor: The volume monitor emitting the signal.
6285  * @volume: a #GVolume that was removed.
6286  *
6287  * Emitted when a mountable volume is removed from the system.
6288  */
6289
6290
6291 /**
6292  * GWeakNotify:
6293  * @data: data that was provided when the weak reference was established
6294  * @where_the_object_was: the object being finalized
6295  *
6296  * A #GWeakNotify function can be added to an object as a callback that gets
6297  * triggered when the object is finalized. Since the object is already being
6298  * finalized when the #GWeakNotify is called, there's not much you could do
6299  * with the object, apart from e.g. using its adress as hash-index or the like.
6300  */
6301
6302
6303 /**
6304  * GWin32InputStream:
6305  *
6306  * Implements #GInputStream for reading from selectable Windows file handles
6307  */
6308
6309
6310 /**
6311  * GWin32InputStream:close-handle:
6312  *
6313  * Whether to close the file handle when the stream is closed.
6314  *
6315  * Since: 2.26
6316  */
6317
6318
6319 /**
6320  * GWin32InputStream:handle:
6321  *
6322  * The handle that the stream reads from.
6323  *
6324  * Since: 2.26
6325  */
6326
6327
6328 /**
6329  * GWin32Mount:
6330  *
6331  * Implementation of the #GMount interface for Win32 systems.
6332  */
6333
6334
6335 /**
6336  * GWin32OutputStream:
6337  *
6338  * Implements #GOutputStream for outputting to Windows file handles
6339  */
6340
6341
6342 /**
6343  * GWin32OutputStream:close-handle:
6344  *
6345  * Whether to close the file handle when the stream is closed.
6346  *
6347  * Since: 2.26
6348  */
6349
6350
6351 /**
6352  * GWin32OutputStream:handle:
6353  *
6354  * The file handle that the stream writes to.
6355  *
6356  * Since: 2.26
6357  */
6358
6359
6360 /**
6361  * GZlibCompressor:
6362  *
6363  * Zlib decompression
6364  */
6365
6366
6367 /**
6368  * GZlibCompressor:file-info:
6369  *
6370  * If set to a non-%NULL #GFileInfo object, and #GZlibCompressor:format is
6371  * %G_ZLIB_COMPRESSOR_FORMAT_GZIP, the compressor will write the file name
6372  * and modification time from the file info to the the GZIP header.
6373  *
6374  * Since: 2.26
6375  */
6376
6377
6378 /**
6379  * GZlibCompressorFormat:
6380  * @G_ZLIB_COMPRESSOR_FORMAT_ZLIB: deflate compression with zlib header
6381  * @G_ZLIB_COMPRESSOR_FORMAT_GZIP: gzip file format
6382  * @G_ZLIB_COMPRESSOR_FORMAT_RAW: deflate compression with no header
6383  *
6384  * Used to select the type of data format to use for #GZlibDecompressor
6385  * and #GZlibCompressor.
6386  *
6387  * Since: 2.24
6388  */
6389
6390
6391 /**
6392  * GZlibDecompressor:
6393  *
6394  * Zlib decompression
6395  */
6396
6397
6398 /**
6399  * GZlibDecompressor:file-info:
6400  *
6401  * A #GFileInfo containing the information found in the GZIP header
6402  * of the data stream processed, or %NULL if the header was not yet
6403  * fully processed, is not present at all, or the compressor's
6404  * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP.
6405  *
6406  * Since: 2.26
6407  */
6408
6409
6410 /**
6411  * G_BOOKMARK_FILE_ERROR:
6412  *
6413  * Error domain for bookmark file parsing.
6414  * Errors in this domain will be from the #GBookmarkFileError
6415  * enumeration. See #GError for information on error domains.
6416  */
6417
6418
6419 /**
6420  * G_CALLBACK:
6421  * @f: a function pointer.
6422  *
6423  * Cast a function pointer to a #GCallback.
6424  */
6425
6426
6427 /**
6428  * G_CCLOSURE_SWAP_DATA:
6429  * @cclosure: a #GCClosure
6430  *
6431  * Checks whether the user data of the #GCClosure should be passed as the
6432  * first parameter to the callback. See g_cclosure_new_swap().
6433  *
6434  * Returns: %TRUE if data has to be swapped.
6435  */
6436
6437
6438 /**
6439  * G_CLOSURE_NEEDS_MARSHAL:
6440  * @closure: a #GClosure
6441  *
6442  * Check if the closure still needs a marshaller. See g_closure_set_marshal().
6443  *
6444  * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on
6445  */
6446
6447
6448 /**
6449  * G_CLOSURE_N_NOTIFIERS:
6450  * @cl: a #GClosure
6451  *
6452  * Get the total number of notifiers connected with the closure @cl.
6453  * The count includes the meta marshaller, the finalize and invalidate notifiers
6454  * and the marshal guards. Note that each guard counts as two notifiers.
6455  * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
6456  * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
6457  *
6458  * Returns: number of notifiers
6459  */
6460
6461
6462 /**
6463  * G_CONVERT_ERROR:
6464  *
6465  * Error domain for character set conversions. Errors in this domain will
6466  * be from the #GConvertError enumeration. See #GError for information on
6467  * error domains.
6468  */
6469
6470
6471 /**
6472  * G_DATALIST_FLAGS_MASK:
6473  *
6474  * A bitmask that restricts the possible flags passed to
6475  * g_datalist_set_flags(). Passing a flags value where
6476  * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.
6477  */
6478
6479
6480 /**
6481  * G_DBUS_ERROR:
6482  *
6483  * Error domain for errors generated by a remote message bus. Errors
6484  * in this domain will be from the #GDBusError enumeration.  See
6485  * #GError for more information on error domains.
6486  * Note that errors in this error domain is intended only for
6487  * returning errors from a remote message bus process. Errors
6488  * generated locally in-process by e.g. #GDBusConnection is from the
6489  * %G_IO_ERROR domain.
6490  *
6491  * Since: 2.26
6492  */
6493
6494
6495 /**
6496  * G_DEFINE_ABSTRACT_TYPE:
6497  * @TN: The name of the new type, in Camel case.
6498  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6499  * @T_P: The #GType of the parent type.
6500  *
6501  * A convenience macro for type implementations.
6502  * Similar to G_DEFINE_TYPE(), but defines an abstract type.
6503  * See G_DEFINE_TYPE_EXTENDED() for an example.
6504  *
6505  * Since: 2.4
6506  */
6507
6508
6509 /**
6510  * G_DEFINE_ABSTRACT_TYPE_WITH_CODE:
6511  * @TN: The name of the new type, in Camel case.
6512  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6513  * @T_P: The #GType of the parent type.
6514  * @_C_: Custom code that gets inserted in the @type_name_get_type() function.
6515  *
6516  * A convenience macro for type implementations.
6517  * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows you to
6518  * insert custom code into the *_get_type() function, e.g. interface implementations
6519  * via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
6520  *
6521  * Since: 2.4
6522  */
6523
6524
6525 /**
6526  * G_DEFINE_BOXED_TYPE:
6527  * @TypeName: The name of the new type, in Camel case.
6528  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6529  * @copy_func: the #GBoxedCopyFunc for the new type
6530  * @free_func: the #GBoxedFreeFunc for the new type
6531  *
6532  * A convenience macro for boxed type implementations, which defines a
6533  * type_name_get_type() function registering the boxed type.
6534  *
6535  * Since: 2.26
6536  */
6537
6538
6539 /**
6540  * G_DEFINE_BOXED_TYPE_WITH_CODE:
6541  * @TypeName: The name of the new type, in Camel case.
6542  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6543  * @copy_func: the #GBoxedCopyFunc for the new type
6544  * @free_func: the #GBoxedFreeFunc for the new type
6545  * @_C_: Custom code that gets inserted in the *_get_type() function.
6546  *
6547  * A convenience macro for boxed type implementations.
6548  * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the
6549  * type_name_get_type() function, e.g. to register value transformations with
6550  * g_value_register_transform_func().
6551  *
6552  * Since: 2.26
6553  */
6554
6555
6556 /**
6557  * G_DEFINE_DYNAMIC_TYPE:
6558  * @TN: The name of the new type, in Camel case.
6559  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6560  * @T_P: The #GType of the parent type.
6561  *
6562  * A convenience macro for dynamic type implementations, which declares a
6563  * class initialization function, an instance initialization function (see
6564  * #GTypeInfo for information about these) and a static variable named
6565  * it defines a <function>*_get_type()</function> and a static
6566  * <function>*_register_type()</function> function for use in your
6567  * <function>module_init()</function>.
6568  * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.
6569  *
6570  * Since: 2.14
6571  */
6572
6573
6574 /**
6575  * G_DEFINE_DYNAMIC_TYPE_EXTENDED:
6576  * @TypeName: The name of the new type, in Camel case.
6577  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6578  * @TYPE_PARENT: The #GType of the parent type.
6579  * @flags: #GTypeFlags to pass to g_type_module_register_type()
6580  * @CODE: Custom code that gets inserted in the *_get_type() function.
6581  *
6582  * A more general version of G_DEFINE_DYNAMIC_TYPE() which
6583  * allows to specify #GTypeFlags and custom code.
6584  * |[
6585  * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
6586  * gtk_gadget,
6587  * GTK_TYPE_THING,
6588  * 0,
6589  * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO,
6590  * gtk_gadget_gizmo_init));
6591  * ]|
6592  * expands to
6593  * |[
6594  * static void     gtk_gadget_init              (GtkGadget      *self);
6595  * static void     gtk_gadget_class_init        (GtkGadgetClass *klass);
6596  * static void     gtk_gadget_class_finalize    (GtkGadgetClass *klass);
6597  * static gpointer gtk_gadget_parent_class = NULL;
6598  * static GType    gtk_gadget_type_id = 0;
6599  * static void     gtk_gadget_class_intern_init (gpointer klass)
6600  * {
6601  * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
6602  * gtk_gadget_class_init ((GtkGadgetClass*) klass);
6603  * }
6604  * GType
6605  * gtk_gadget_get_type (void)
6606  * {
6607  * return gtk_gadget_type_id;
6608  * }
6609  * static void
6610  * gtk_gadget_register_type (GTypeModule *type_module)
6611  * {
6612  * const GTypeInfo g_define_type_info = {
6613  * sizeof (GtkGadgetClass),
6614  * (GBaseInitFunc) NULL,
6615  * (GBaseFinalizeFunc) NULL,
6616  * (GClassInitFunc) gtk_gadget_class_intern_init,
6617  * (GClassFinalizeFunc) gtk_gadget_class_finalize,
6618  * NULL,   // class_data
6619  * sizeof (GtkGadget),
6620  * 0,      // n_preallocs
6621  * (GInstanceInitFunc) gtk_gadget_init,
6622  * NULL    // value_table
6623  * };
6624  * gtk_gadget_type_id = g_type_module_register_type (type_module,
6625  * GTK_TYPE_THING,
6626  * GtkGadget,
6627  * &g_define_type_info,
6628  * (GTypeFlags) flags);
6629  * {
6630  * const GInterfaceInfo g_implement_interface_info = {
6631  * (GInterfaceInitFunc) gtk_gadget_gizmo_init
6632  * };
6633  * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
6634  * }
6635  * }
6636  * ]|
6637  *
6638  * Since: 2.14
6639  */
6640
6641
6642 /**
6643  * G_DEFINE_INTERFACE:
6644  * @TN: The name of the new type, in Camel case.
6645  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6646  * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
6647  *
6648  * A convenience macro for #GTypeInterface definitions, which declares
6649  * a default vtable initialization function and defines a *_get_type()
6650  * function.
6651  * The macro expects the interface initialization function to have the
6652  * name <literal>t_n ## _default_init</literal>, and the interface
6653  * structure to have the name <literal>TN ## Interface</literal>.
6654  *
6655  * Since: 2.24
6656  */
6657
6658
6659 /**
6660  * G_DEFINE_INTERFACE_WITH_CODE:
6661  * @TN: The name of the new type, in Camel case.
6662  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6663  * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
6664  * @_C_: Custom code that gets inserted in the *_get_type() function.
6665  *
6666  * A convenience macro for #GTypeInterface definitions. Similar to
6667  * G_DEFINE_INTERFACE(), but allows you to insert custom code into the
6668  * *_get_type() function, e.g. additional interface implementations
6669  * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See
6670  * G_DEFINE_TYPE_EXTENDED() for a similar example using
6671  * G_DEFINE_TYPE_WITH_CODE().
6672  *
6673  * Since: 2.24
6674  */
6675
6676
6677 /**
6678  * G_DEFINE_POINTER_TYPE:
6679  * @TypeName: The name of the new type, in Camel case.
6680  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6681  *
6682  * A convenience macro for pointer type implementations, which defines a
6683  * type_name_get_type() function registering the pointer type.
6684  *
6685  * Since: 2.26
6686  */
6687
6688
6689 /**
6690  * G_DEFINE_POINTER_TYPE_WITH_CODE:
6691  * @TypeName: The name of the new type, in Camel case.
6692  * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6693  * @_C_: Custom code that gets inserted in the *_get_type() function.
6694  *
6695  * A convenience macro for pointer type implementations.
6696  * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert custom code into the
6697  * type_name_get_type() function.
6698  *
6699  * Since: 2.26
6700  */
6701
6702
6703 /**
6704  * G_DEFINE_TYPE:
6705  * @TN: The name of the new type, in Camel case.
6706  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6707  * @T_P: The #GType of the parent type.
6708  *
6709  * A convenience macro for type implementations, which declares a
6710  * class initialization function, an instance initialization function (see #GTypeInfo for information about
6711  * these) and a static variable named @t_n<!-- -->_parent_class pointing to the parent class. Furthermore, it defines
6712  * a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() for an example.
6713  *
6714  * Since: 2.4
6715  */
6716
6717
6718 /**
6719  * G_DEFINE_TYPE_EXTENDED:
6720  * @TN: The name of the new type, in Camel case.
6721  * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6722  * @T_P: The #GType of the parent type.
6723  * @_f_: #GTypeFlags to pass to g_type_register_static()
6724  * @_C_: Custom code that gets inserted in the *_get_type() function.
6725  *
6726  * The most general convenience macro for type implementations, on which
6727  * G_DEFINE_TYPE(), etc are based.
6728  * |[
6729  * G_DEFINE_TYPE_EXTENDED (GtkGadget,
6730  * gtk_gadget,
6731  * GTK_TYPE_WIDGET,
6732  * 0,
6733  * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
6734  * gtk_gadget_gizmo_init));
6735  * ]|
6736  * expands to
6737  * |[
6738  * static void     gtk_gadget_init       (GtkGadget      *self);
6739  * static void     gtk_gadget_class_init (GtkGadgetClass *klass);
6740  * static gpointer gtk_gadget_parent_class = NULL;
6741  * static void     gtk_gadget_class_intern_init (gpointer klass)
6742  * {
6743  * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
6744  * gtk_gadget_class_init ((GtkGadgetClass*) klass);
6745  * }
6746  * GType
6747  * gtk_gadget_get_type (void)
6748  * {
6749  * static volatile gsize g_define_type_id__volatile = 0;
6750  * if (g_once_init_enter (&g_define_type_id__volatile))
6751  * {
6752  * GType g_define_type_id =
6753  * g_type_register_static_simple (GTK_TYPE_WIDGET,
6754  * g_intern_static_string ("GtkGadget"),
6755  * sizeof (GtkGadgetClass),
6756  * (GClassInitFunc) gtk_gadget_class_intern_init,
6757  * sizeof (GtkGadget),
6758  * (GInstanceInitFunc) gtk_gadget_init,
6759  * (GTypeFlags) flags);
6760  * {
6761  * static const GInterfaceInfo g_implement_interface_info = {
6762  * (GInterfaceInitFunc) gtk_gadget_gizmo_init
6763  * };
6764  * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
6765  * }
6766  * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
6767  * }
6768  * return g_define_type_id__volatile;
6769  * }
6770  * ]|
6771  * The only pieces which have to be manually provided are the definitions of
6772  * the instance and class structure and the definitions of the instance and
6773  * class init functions.
6774  *
6775  * Since: 2.4
6776  */
6777
6778
6779 /**
6780  * G_DEFINE_TYPE_WITH_CODE:
6781  * @TN: The name of the new type, in Camel case.
6782  * @t_n: The name of the new type in lowercase, with words separated by '_'.
6783  * @T_P: The #GType of the parent type.
6784  * @_C_: Custom code that gets inserted in the *_get_type() function.
6785  *
6786  * A convenience macro for type implementations.
6787  * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the
6788  * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
6789  * See G_DEFINE_TYPE_EXTENDED() for an example.
6790  *
6791  * Since: 2.4
6792  */
6793
6794
6795 /**
6796  * G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME:
6797  *
6798  * Extension point for default handler to URI association. See
6799  * <link linkend="extending-gio">Extending GIO</link>.
6800  */
6801
6802
6803 /**
6804  * G_ENUM_CLASS:
6805  * @class: a valid #GEnumClass
6806  *
6807  * Casts a derived #GEnumClass structure into a #GEnumClass structure.
6808  */
6809
6810
6811 /**
6812  * G_ENUM_CLASS_TYPE:
6813  * @class: a #GEnumClass
6814  *
6815  * Get the type identifier from a given #GEnumClass structure.
6816  *
6817  * Returns: the #GType
6818  */
6819
6820
6821 /**
6822  * G_ENUM_CLASS_TYPE_NAME:
6823  * @class: a #GEnumClass
6824  *
6825  * Get the static type name from a given #GEnumClass structure.
6826  *
6827  * Returns: the type name.
6828  */
6829
6830
6831 /**
6832  * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE:
6833  *
6834  * A key in the "access" namespace for checking deletion privileges.
6835  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6836  * This attribute will be %TRUE if the user is able to delete the file.
6837  */
6838
6839
6840 /**
6841  * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE:
6842  *
6843  * A key in the "access" namespace for getting execution privileges.
6844  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6845  * This attribute will be %TRUE if the user is able to execute the file.
6846  */
6847
6848
6849 /**
6850  * G_FILE_ATTRIBUTE_ACCESS_CAN_READ:
6851  *
6852  * A key in the "access" namespace for getting read privileges.
6853  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6854  * This attribute will be %TRUE if the user is able to read the file.
6855  */
6856
6857
6858 /**
6859  * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME:
6860  *
6861  * A key in the "access" namespace for checking renaming privileges.
6862  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6863  * This attribute will be %TRUE if the user is able to rename the file.
6864  */
6865
6866
6867 /**
6868  * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH:
6869  *
6870  * A key in the "access" namespace for checking trashing privileges.
6871  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6872  * This attribute will be %TRUE if the user is able to move the file to
6873  * the trash.
6874  */
6875
6876
6877 /**
6878  * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE:
6879  *
6880  * A key in the "access" namespace for getting write privileges.
6881  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6882  * This attribute will be %TRUE if the user is able to write to the file.
6883  */
6884
6885
6886 /**
6887  * G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE:
6888  *
6889  * A key in the "dos" namespace for checking if the file's archive flag
6890  * is set. This attribute is %TRUE if the archive flag is set. This attribute
6891  * is only available for DOS file systems. Corresponding #GFileAttributeType
6892  * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6893  */
6894
6895
6896 /**
6897  * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM:
6898  *
6899  * A key in the "dos" namespace for checking if the file's backup flag
6900  * is set. This attribute is %TRUE if the backup flag is set. This attribute
6901  * is only available for DOS file systems. Corresponding #GFileAttributeType
6902  * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6903  */
6904
6905
6906 /**
6907  * G_FILE_ATTRIBUTE_ETAG_VALUE:
6908  *
6909  * A key in the "etag" namespace for getting the value of the file's
6910  * entity tag. Corresponding #GFileAttributeType is
6911  * %G_FILE_ATTRIBUTE_TYPE_STRING.
6912  */
6913
6914
6915 /**
6916  * G_FILE_ATTRIBUTE_FILESYSTEM_FREE:
6917  *
6918  * A key in the "filesystem" namespace for getting the number of bytes of free space left on the
6919  * file system. Corresponding #GFileAttributeType is
6920  * %G_FILE_ATTRIBUTE_TYPE_UINT64.
6921  */
6922
6923
6924 /**
6925  * G_FILE_ATTRIBUTE_FILESYSTEM_READONLY:
6926  *
6927  * A key in the "filesystem" namespace for checking if the file system
6928  * is read only. Is set to %TRUE if the file system is read only.
6929  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6930  */
6931
6932
6933 /**
6934  * G_FILE_ATTRIBUTE_FILESYSTEM_SIZE:
6935  *
6936  * A key in the "filesystem" namespace for getting the total size (in bytes) of the file system,
6937  * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType
6938  * is %G_FILE_ATTRIBUTE_TYPE_UINT64.
6939  */
6940
6941
6942 /**
6943  * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE:
6944  *
6945  * A key in the "filesystem" namespace for getting the file system's type.
6946  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
6947  */
6948
6949
6950 /**
6951  * G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW:
6952  *
6953  * A key in the "filesystem" namespace for hinting a file manager
6954  * application whether it should preview (e.g. thumbnail) files on the
6955  * file system. The value for this key contain a
6956  * #GFilesystemPreviewType.
6957  */
6958
6959
6960 /**
6961  * G_FILE_ATTRIBUTE_GVFS_BACKEND:
6962  *
6963  * A key in the "gvfs" namespace that gets the name of the current
6964  * GVFS backend in use. Corresponding #GFileAttributeType is
6965  * %G_FILE_ATTRIBUTE_TYPE_STRING.
6966  */
6967
6968
6969 /**
6970  * G_FILE_ATTRIBUTE_ID_FILE:
6971  *
6972  * A key in the "id" namespace for getting a file identifier.
6973  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
6974  * An example use would be during listing files, to avoid recursive
6975  * directory scanning.
6976  */
6977
6978
6979 /**
6980  * G_FILE_ATTRIBUTE_ID_FILESYSTEM:
6981  *
6982  * A key in the "id" namespace for getting the file system identifier.
6983  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
6984  * An example use would be during drag and drop to see if the source
6985  * and target are on the same filesystem (default to move) or not (default
6986  * to copy).
6987  */
6988
6989
6990 /**
6991  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT:
6992  *
6993  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
6994  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6995  */
6996
6997
6998 /**
6999  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT:
7000  *
7001  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
7002  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7003  */
7004
7005
7006 /**
7007  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL:
7008  *
7009  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
7010  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7011  *
7012  * Since: 2.22
7013  */
7014
7015
7016 /**
7017  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START:
7018  *
7019  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
7020  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7021  *
7022  * Since: 2.22
7023  */
7024
7025
7026 /**
7027  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED:
7028  *
7029  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started
7030  * degraded.
7031  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7032  *
7033  * Since: 2.22
7034  */
7035
7036
7037 /**
7038  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP:
7039  *
7040  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
7041  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7042  *
7043  * Since: 2.22
7044  */
7045
7046
7047 /**
7048  * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT:
7049  *
7050  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)  is unmountable.
7051  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7052  */
7053
7054
7055 /**
7056  * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI:
7057  *
7058  * A key in the "mountable" namespace for getting the HAL UDI for the mountable
7059  * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7060  */
7061
7062
7063 /**
7064  * G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC:
7065  *
7066  * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)
7067  * is automatically polled for media.
7068  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7069  *
7070  * Since: 2.22
7071  */
7072
7073
7074 /**
7075  * G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE:
7076  *
7077  * A key in the "mountable" namespace for getting the #GDriveStartStopType.
7078  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7079  *
7080  * Since: 2.22
7081  */
7082
7083
7084 /**
7085  * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE:
7086  *
7087  * A key in the "mountable" namespace for getting the unix device.
7088  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7089  */
7090
7091
7092 /**
7093  * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE:
7094  *
7095  * A key in the "mountable" namespace for getting the unix device file.
7096  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7097  *
7098  * Since: 2.22
7099  */
7100
7101
7102 /**
7103  * G_FILE_ATTRIBUTE_OWNER_GROUP:
7104  *
7105  * A key in the "owner" namespace for getting the file owner's group.
7106  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7107  */
7108
7109
7110 /**
7111  * G_FILE_ATTRIBUTE_OWNER_USER:
7112  *
7113  * A key in the "owner" namespace for getting the user name of the
7114  * file's owner. Corresponding #GFileAttributeType is
7115  * %G_FILE_ATTRIBUTE_TYPE_STRING.
7116  */
7117
7118
7119 /**
7120  * G_FILE_ATTRIBUTE_OWNER_USER_REAL:
7121  *
7122  * A key in the "owner" namespace for getting the real name of the
7123  * user that owns the file. Corresponding #GFileAttributeType is
7124  * %G_FILE_ATTRIBUTE_TYPE_STRING.
7125  */
7126
7127
7128 /**
7129  * G_FILE_ATTRIBUTE_PREVIEW_ICON:
7130  *
7131  * A key in the "preview" namespace for getting a #GIcon that can be
7132  * used to get preview of the file. For example, it may be a low
7133  * resolution thumbnail without metadata. Corresponding
7134  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.  The value
7135  * for this key should contain a #GIcon.
7136  *
7137  * Since: 2.20
7138  */
7139
7140
7141 /**
7142  * G_FILE_ATTRIBUTE_SELINUX_CONTEXT:
7143  *
7144  * A key in the "selinux" namespace for getting the file's SELinux
7145  * context. Corresponding #GFileAttributeType is
7146  * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only
7147  * available if GLib has been built with SELinux support.
7148  */
7149
7150
7151 /**
7152  * G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE:
7153  *
7154  * A key in the "standard" namespace for getting the amount of disk space
7155  * that is consumed by the file (in bytes).  This will generally be larger
7156  * than the file size (due to block size overhead) but can occasionally be
7157  * smaller (for example, for sparse files).
7158  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7159  *
7160  * Since: 2.20
7161  */
7162
7163
7164 /**
7165  * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE:
7166  *
7167  * A key in the "standard" namespace for getting the content type of the file.
7168  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7169  * The value for this key should contain a valid content type.
7170  */
7171
7172
7173 /**
7174  * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME:
7175  *
7176  * A key in the "standard" namespace for getting the copy name of the file.
7177  * The copy name is an optional version of the name. If available it's always
7178  * in UTF8, and corresponds directly to the original filename (only transcoded to
7179  * UTF8). This is useful if you want to copy the file to another filesystem that
7180  * might have a different encoding. If the filename is not a valid string in the
7181  * encoding selected for the filesystem it is in then the copy name will not be set.
7182  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7183  */
7184
7185
7186 /**
7187  * G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION:
7188  *
7189  * A key in the "standard" namespace for getting the description of the file.
7190  * The description is a utf8 string that describes the file, generally containing
7191  * the filename, but can also contain furter information. Example descriptions
7192  * could be "filename (on hostname)" for a remote file or "filename (in trash)"
7193  * for a file in the trash. This is useful for instance as the window title
7194  * when displaying a directory or for a bookmarks menu.
7195  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7196  */
7197
7198
7199 /**
7200  * G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME:
7201  *
7202  * A key in the "standard" namespace for getting the display name of the file.
7203  * A display name is guaranteed to be in UTF8 and can thus be displayed in
7204  * the UI.
7205  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7206  */
7207
7208
7209 /**
7210  * G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME:
7211  *
7212  * A key in the "standard" namespace for edit name of the file.
7213  * An edit name is similar to the display name, but it is meant to be
7214  * used when you want to rename the file in the UI. The display name
7215  * might contain information you don't want in the new filename (such as
7216  * "(invalid unicode)" if the filename was in an invalid encoding).
7217  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7218  */
7219
7220
7221 /**
7222  * G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE:
7223  *
7224  * A key in the "standard" namespace for getting the fast content type.
7225  * The fast content type isn't as reliable as the regular one, as it
7226  * only uses the filename to guess it, but it is faster to calculate than the
7227  * regular content type.
7228  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7229  */
7230
7231
7232 /**
7233  * G_FILE_ATTRIBUTE_STANDARD_ICON:
7234  *
7235  * A key in the "standard" namespace for getting the icon for the file.
7236  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
7237  * The value for this key should contain a #GIcon.
7238  */
7239
7240
7241 /**
7242  * G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP:
7243  *
7244  * A key in the "standard" namespace for checking if a file is a backup file.
7245  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7246  */
7247
7248
7249 /**
7250  * G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN:
7251  *
7252  * A key in the "standard" namespace for checking if a file is hidden.
7253  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7254  */
7255
7256
7257 /**
7258  * G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK:
7259  *
7260  * A key in the "standard" namespace for checking if the file is a symlink.
7261  * Typically the actual type is something else, if we followed the symlink
7262  * to get the type.
7263  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7264  */
7265
7266
7267 /**
7268  * G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL:
7269  *
7270  * A key in the "standard" namespace for checking if a file is virtual.
7271  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7272  */
7273
7274
7275 /**
7276  * G_FILE_ATTRIBUTE_STANDARD_NAME:
7277  *
7278  * A key in the "standard" namespace for getting the name of the file.
7279  * The name is the on-disk filename which may not be in any known encoding,
7280  * and can thus not be generally displayed as is.
7281  * Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
7282  * name in a user interface.
7283  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7284  */
7285
7286
7287 /**
7288  * G_FILE_ATTRIBUTE_STANDARD_SIZE:
7289  *
7290  * A key in the "standard" namespace for getting the file's size (in bytes).
7291  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7292  */
7293
7294
7295 /**
7296  * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER:
7297  *
7298  * A key in the "standard" namespace for setting the sort order of a file.
7299  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
7300  * An example use would be in file managers, which would use this key
7301  * to set the order files are displayed. Files with smaller sort order
7302  * should be sorted first, and files without sort order as if sort order
7303  * was zero.
7304  */
7305
7306
7307 /**
7308  * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET:
7309  *
7310  * A key in the "standard" namespace for getting the symlink target, if the file
7311  * is a symlink. Corresponding #GFileAttributeType is
7312  * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7313  */
7314
7315
7316 /**
7317  * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI:
7318  *
7319  * A key in the "standard" namespace for getting the target URI for the file, in
7320  * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
7321  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7322  */
7323
7324
7325 /**
7326  * G_FILE_ATTRIBUTE_STANDARD_TYPE:
7327  *
7328  * A key in the "standard" namespace for storing file types.
7329  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7330  * The value for this key should contain a #GFileType.
7331  */
7332
7333
7334 /**
7335  * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED:
7336  *
7337  * A key in the "thumbnail" namespace for checking if thumbnailing failed.
7338  * This attribute is %TRUE if thumbnailing failed. Corresponding
7339  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7340  */
7341
7342
7343 /**
7344  * G_FILE_ATTRIBUTE_THUMBNAIL_PATH:
7345  *
7346  * A key in the "thumbnail" namespace for getting the path to the thumbnail
7347  * image. Corresponding #GFileAttributeType is
7348  * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7349  */
7350
7351
7352 /**
7353  * G_FILE_ATTRIBUTE_TIME_ACCESS:
7354  *
7355  * A key in the "time" namespace for getting the time the file was last
7356  * accessed. Corresponding #GFileAttributeType is
7357  * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
7358  * file was last accessed.
7359  */
7360
7361
7362 /**
7363  * G_FILE_ATTRIBUTE_TIME_ACCESS_USEC:
7364  *
7365  * A key in the "time" namespace for getting the microseconds of the time
7366  * the file was last accessed. This should be used in conjunction with
7367  * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is
7368  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7369  */
7370
7371
7372 /**
7373  * G_FILE_ATTRIBUTE_TIME_CHANGED:
7374  *
7375  * A key in the "time" namespace for getting the time the file was last
7376  * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
7377  * and contains the UNIX time since the file was last changed.
7378  * This corresponds to the traditional UNIX ctime.
7379  */
7380
7381
7382 /**
7383  * G_FILE_ATTRIBUTE_TIME_CHANGED_USEC:
7384  *
7385  * A key in the "time" namespace for getting the microseconds of the time
7386  * the file was last changed. This should be used in conjunction with
7387  * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is
7388  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7389  */
7390
7391
7392 /**
7393  * G_FILE_ATTRIBUTE_TIME_CREATED:
7394  *
7395  * A key in the "time" namespace for getting the time the file was created.
7396  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
7397  * and contains the UNIX time since the file was created.
7398  * This corresponds to the NTFS ctime.
7399  */
7400
7401
7402 /**
7403  * G_FILE_ATTRIBUTE_TIME_CREATED_USEC:
7404  *
7405  * A key in the "time" namespace for getting the microseconds of the time
7406  * the file was created. This should be used in conjunction with
7407  * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is
7408  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7409  */
7410
7411
7412 /**
7413  * G_FILE_ATTRIBUTE_TIME_MODIFIED:
7414  *
7415  * A key in the "time" namespace for getting the time the file was last
7416  * modified. Corresponding #GFileAttributeType is
7417  * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
7418  * file was modified.
7419  */
7420
7421
7422 /**
7423  * G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC:
7424  *
7425  * A key in the "time" namespace for getting the miliseconds of the time
7426  * the file was last modified. This should be used in conjunction with
7427  * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is
7428  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7429  */
7430
7431
7432 /**
7433  * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE:
7434  *
7435  * A key in the "trash" namespace.  When requested against
7436  * items in "trash:///", will return the date and time when the file
7437  * was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss.
7438  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7439  *
7440  * Since: 2.24.
7441  */
7442
7443
7444 /**
7445  * G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT:
7446  *
7447  * A key in the "trash" namespace.  When requested against
7448  * "trash:///" returns the number of (toplevel) items in the trash folder.
7449  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7450  */
7451
7452
7453 /**
7454  * G_FILE_ATTRIBUTE_TRASH_ORIG_PATH:
7455  *
7456  * A key in the "trash" namespace.  When requested against
7457  * items in "trash:///", will return the original path to the file before it
7458  * was trashed. Corresponding #GFileAttributeType is
7459  * %G_FILE_ATTRIBUTE_TYPE_STRING.
7460  *
7461  * Since: 2.24.
7462  */
7463
7464
7465 /**
7466  * G_FILE_ATTRIBUTE_UNIX_BLOCKS:
7467  *
7468  * A key in the "unix" namespace for getting the number of blocks allocated
7469  * for the file. This attribute is only available for UNIX file systems.
7470  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7471  */
7472
7473
7474 /**
7475  * G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE:
7476  *
7477  * A key in the "unix" namespace for getting the block size for the file
7478  * system. This attribute is only available for UNIX file systems.
7479  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7480  */
7481
7482
7483 /**
7484  * G_FILE_ATTRIBUTE_UNIX_DEVICE:
7485  *
7486  * A key in the "unix" namespace for getting the device id of the device the
7487  * file is located on (see stat() documentation). This attribute is only
7488  * available for UNIX file systems. Corresponding #GFileAttributeType is
7489  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7490  */
7491
7492
7493 /**
7494  * G_FILE_ATTRIBUTE_UNIX_GID:
7495  *
7496  * A key in the "unix" namespace for getting the group ID for the file.
7497  * This attribute is only available for UNIX file systems.
7498  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7499  */
7500
7501
7502 /**
7503  * G_FILE_ATTRIBUTE_UNIX_INODE:
7504  *
7505  * A key in the "unix" namespace for getting the inode of the file.
7506  * This attribute is only available for UNIX file systems. Corresponding
7507  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7508  */
7509
7510
7511 /**
7512  * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT:
7513  *
7514  * A key in the "unix" namespace for checking if the file represents a
7515  * UNIX mount point. This attribute is %TRUE if the file is a UNIX mount
7516  * point. This attribute is only available for UNIX file systems.
7517  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7518  */
7519
7520
7521 /**
7522  * G_FILE_ATTRIBUTE_UNIX_MODE:
7523  *
7524  * A key in the "unix" namespace for getting the mode of the file
7525  * (e.g. whether the file is a regular file, symlink, etc). See lstat()
7526  * documentation. This attribute is only available for UNIX file systems.
7527  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7528  */
7529
7530
7531 /**
7532  * G_FILE_ATTRIBUTE_UNIX_NLINK:
7533  *
7534  * A key in the "unix" namespace for getting the number of hard links
7535  * for a file. See lstat() documentation. This attribute is only available
7536  * for UNIX file systems. Corresponding #GFileAttributeType is
7537  * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7538  */
7539
7540
7541 /**
7542  * G_FILE_ATTRIBUTE_UNIX_RDEV:
7543  *
7544  * A key in the "unix" namespace for getting the device ID for the file
7545  * (if it is a special file). See lstat() documentation. This attribute
7546  * is only available for UNIX file systems. Corresponding #GFileAttributeType
7547  * is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7548  */
7549
7550
7551 /**
7552  * G_FILE_ATTRIBUTE_UNIX_UID:
7553  *
7554  * A key in the "unix" namespace for getting the user ID for the file.
7555  * This attribute is only available for UNIX file systems.
7556  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7557  */
7558
7559
7560 /**
7561  * G_FLAGS_CLASS:
7562  * @class: a valid #GFlagsClass
7563  *
7564  * Casts a derived #GFlagsClass structure into a #GFlagsClass structure.
7565  */
7566
7567
7568 /**
7569  * G_FLAGS_CLASS_TYPE:
7570  * @class: a #GFlagsClass
7571  *
7572  * Get the type identifier from a given #GFlagsClass structure.
7573  *
7574  * Returns: the #GType
7575  */
7576
7577
7578 /**
7579  * G_FLAGS_CLASS_TYPE_NAME:
7580  * @class: a #GFlagsClass
7581  *
7582  * Get the static type name from a given #GFlagsClass structure.
7583  *
7584  * Returns: the type name.
7585  */
7586
7587
7588 /**
7589  * G_IMPLEMENT_INTERFACE:
7590  * @TYPE_IFACE: The #GType of the interface to add
7591  * @iface_init: The interface init function
7592  *
7593  * A convenience macro to ease interface addition in the @_C_ section
7594  * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE().
7595  * See G_DEFINE_TYPE_EXTENDED() for an example.
7596  * Note that this macro can only be used together with the G_DEFINE_TYPE_*
7597  * macros, since it depends on variable names from those macros.
7598  *
7599  * Since: 2.4
7600  */
7601
7602
7603 /**
7604  * G_IMPLEMENT_INTERFACE_DYNAMIC:
7605  * @TYPE_IFACE: The #GType of the interface to add
7606  * @iface_init: The interface init function
7607  *
7608  * A convenience macro to ease interface addition in the @_C_ section
7609  * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED()
7610  * for an example.
7611  * Note that this macro can only be used together with the
7612  * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable
7613  * names from that macro.
7614  *
7615  * Since: 2.24
7616  */
7617
7618
7619 /**
7620  * G_INITIALLY_UNOWNED:
7621  * @object: Object which is subject to casting.
7622  *
7623  * Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*)
7624  * pointer. Depending on the current debugging level, this function may invoke
7625  * certain runtime checks to identify invalid casts.
7626  */
7627
7628
7629 /**
7630  * G_INITIALLY_UNOWNED_CLASS:
7631  * @class: a valid #GInitiallyUnownedClass
7632  *
7633  * Casts a derived #GInitiallyUnownedClass structure into a
7634  * #GInitiallyUnownedClass structure.
7635  */
7636
7637
7638 /**
7639  * G_INITIALLY_UNOWNED_GET_CLASS:
7640  * @object: a #GInitiallyUnowned instance.
7641  *
7642  * Get the class structure associated to a #GInitiallyUnowned instance.
7643  *
7644  * Returns: pointer to object class structure.
7645  */
7646
7647
7648 /**
7649  * G_IO_ERROR:
7650  *
7651  * Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration.
7652  * See #GError for more information on error domains.
7653  */
7654
7655
7656 /**
7657  * G_IS_ENUM_CLASS:
7658  * @class: a #GEnumClass
7659  *
7660  * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM
7661  * or derived.
7662  */
7663
7664
7665 /**
7666  * G_IS_FLAGS_CLASS:
7667  * @class: a #GFlagsClass
7668  *
7669  * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS
7670  * or derived.
7671  */
7672
7673
7674 /**
7675  * G_IS_INITIALLY_UNOWNED:
7676  * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED.
7677  *
7678  * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED.
7679  */
7680
7681
7682 /**
7683  * G_IS_INITIALLY_UNOWNED_CLASS:
7684  * @class: a #GInitiallyUnownedClass
7685  *
7686  * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type
7687  * %G_TYPE_INITIALLY_UNOWNED or derived.
7688  */
7689
7690
7691 /**
7692  * G_IS_OBJECT:
7693  * @object: Instance to check for being a %G_TYPE_OBJECT.
7694  *
7695  * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT.
7696  */
7697
7698
7699 /**
7700  * G_IS_OBJECT_CLASS:
7701  * @class: a #GObjectClass
7702  *
7703  * Checks whether @class "is a" valid #GObjectClass structure of type
7704  * %G_TYPE_OBJECT or derived.
7705  */
7706
7707
7708 /**
7709  * G_IS_PARAM_SPEC:
7710  * @pspec: a #GParamSpec
7711  *
7712  * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM
7713  * or derived.
7714  */
7715
7716
7717 /**
7718  * G_IS_PARAM_SPEC_BOOLEAN:
7719  * @pspec: a valid #GParamSpec instance
7720  *
7721  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
7722  *
7723  * Returns: %TRUE on success.
7724  */
7725
7726
7727 /**
7728  * G_IS_PARAM_SPEC_BOXED:
7729  * @pspec: a valid #GParamSpec instance
7730  *
7731  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
7732  *
7733  * Returns: %TRUE on success.
7734  */
7735
7736
7737 /**
7738  * G_IS_PARAM_SPEC_CHAR:
7739  * @pspec: a valid #GParamSpec instance
7740  *
7741  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
7742  *
7743  * Returns: %TRUE on success.
7744  */
7745
7746
7747 /**
7748  * G_IS_PARAM_SPEC_CLASS:
7749  * @pclass: a #GParamSpecClass
7750  *
7751  * Checks whether @pclass "is a" valid #GParamSpecClass structure of type
7752  * %G_TYPE_PARAM or derived.
7753  */
7754
7755
7756 /**
7757  * G_IS_PARAM_SPEC_DOUBLE:
7758  * @pspec: a valid #GParamSpec instance
7759  *
7760  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
7761  *
7762  * Returns: %TRUE on success.
7763  */
7764
7765
7766 /**
7767  * G_IS_PARAM_SPEC_ENUM:
7768  * @pspec: a valid #GParamSpec instance
7769  *
7770  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
7771  *
7772  * Returns: %TRUE on success.
7773  */
7774
7775
7776 /**
7777  * G_IS_PARAM_SPEC_FLAGS:
7778  * @pspec: a valid #GParamSpec instance
7779  *
7780  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
7781  *
7782  * Returns: %TRUE on success.
7783  */
7784
7785
7786 /**
7787  * G_IS_PARAM_SPEC_FLOAT:
7788  * @pspec: a valid #GParamSpec instance
7789  *
7790  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
7791  *
7792  * Returns: %TRUE on success.
7793  */
7794
7795
7796 /**
7797  * G_IS_PARAM_SPEC_GTYPE:
7798  * @pspec: a #GParamSpec
7799  *
7800  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
7801  *
7802  * Since: 2.10
7803  * Returns: %TRUE on success.
7804  */
7805
7806
7807 /**
7808  * G_IS_PARAM_SPEC_INT:
7809  * @pspec: a valid #GParamSpec instance
7810  *
7811  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
7812  *
7813  * Returns: %TRUE on success.
7814  */
7815
7816
7817 /**
7818  * G_IS_PARAM_SPEC_INT64:
7819  * @pspec: a valid #GParamSpec instance
7820  *
7821  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
7822  *
7823  * Returns: %TRUE on success.
7824  */
7825
7826
7827 /**
7828  * G_IS_PARAM_SPEC_LONG:
7829  * @pspec: a valid #GParamSpec instance
7830  *
7831  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
7832  *
7833  * Returns: %TRUE on success.
7834  */
7835
7836
7837 /**
7838  * G_IS_PARAM_SPEC_OBJECT:
7839  * @pspec: a valid #GParamSpec instance
7840  *
7841  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
7842  *
7843  * Returns: %TRUE on success.
7844  */
7845
7846
7847 /**
7848  * G_IS_PARAM_SPEC_OVERRIDE:
7849  * @pspec: a #GParamSpec
7850  *
7851  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
7852  *
7853  * Since: 2.4
7854  * Returns: %TRUE on success.
7855  */
7856
7857
7858 /**
7859  * G_IS_PARAM_SPEC_PARAM:
7860  * @pspec: a valid #GParamSpec instance
7861  *
7862  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
7863  *
7864  * Returns: %TRUE on success.
7865  */
7866
7867
7868 /**
7869  * G_IS_PARAM_SPEC_POINTER:
7870  * @pspec: a valid #GParamSpec instance
7871  *
7872  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
7873  *
7874  * Returns: %TRUE on success.
7875  */
7876
7877
7878 /**
7879  * G_IS_PARAM_SPEC_STRING:
7880  * @pspec: a valid #GParamSpec instance
7881  *
7882  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
7883  *
7884  * Returns: %TRUE on success.
7885  */
7886
7887
7888 /**
7889  * G_IS_PARAM_SPEC_UCHAR:
7890  * @pspec: a valid #GParamSpec instance
7891  *
7892  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
7893  *
7894  * Returns: %TRUE on success.
7895  */
7896
7897
7898 /**
7899  * G_IS_PARAM_SPEC_UINT:
7900  * @pspec: a valid #GParamSpec instance
7901  *
7902  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
7903  *
7904  * Returns: %TRUE on success.
7905  */
7906
7907
7908 /**
7909  * G_IS_PARAM_SPEC_UINT64:
7910  * @pspec: a valid #GParamSpec instance
7911  *
7912  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
7913  *
7914  * Returns: %TRUE on success.
7915  */
7916
7917
7918 /**
7919  * G_IS_PARAM_SPEC_ULONG:
7920  * @pspec: a valid #GParamSpec instance
7921  *
7922  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
7923  *
7924  * Returns: %TRUE on success.
7925  */
7926
7927
7928 /**
7929  * G_IS_PARAM_SPEC_UNICHAR:
7930  * @pspec: a valid #GParamSpec instance
7931  *
7932  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
7933  *
7934  * Returns: %TRUE on success.
7935  */
7936
7937
7938 /**
7939  * G_IS_PARAM_SPEC_VALUE_ARRAY:
7940  * @pspec: a valid #GParamSpec instance
7941  *
7942  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
7943  *
7944  * Returns: %TRUE on success.
7945  */
7946
7947
7948 /**
7949  * G_IS_PARAM_SPEC_VARIANT:
7950  * @pspec: a #GParamSpec
7951  *
7952  * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
7953  *
7954  * Returns: %TRUE on success
7955  * Since: 2.26
7956  */
7957
7958
7959 /**
7960  * G_IS_VALUE:
7961  * @value: A #GValue structure.
7962  *
7963  * Checks if @value is a valid and initialized #GValue structure.
7964  *
7965  * Returns: %TRUE on success.
7966  */
7967
7968
7969 /**
7970  * G_MARKUP_ERROR:
7971  *
7972  * Error domain for markup parsing.
7973  * Errors in this domain will be from the #GMarkupError enumeration.
7974  * See #GError for information on error domains.
7975  */
7976
7977
7978 /**
7979  * G_NODE_IS_LEAF:
7980  * @node: a #GNode
7981  *
7982  * Returns %TRUE if a #GNode is a leaf node.
7983  * (i.e. it has no children)
7984  *
7985  * Returns: %TRUE if the #GNode is a leaf node
7986  */
7987
7988
7989 /**
7990  * G_NODE_IS_ROOT:
7991  * @node: a #GNode
7992  *
7993  * Returns %TRUE if a #GNode is the root of a tree.
7994  * (i.e. it has no parent or siblings)
7995  *
7996  * Returns: %TRUE if the #GNode is the root of a tree
7997  */
7998
7999
8000 /**
8001  * G_OBJECT:
8002  * @object: Object which is subject to casting.
8003  *
8004  * Casts a #GObject or derived pointer into a (GObject*) pointer.
8005  * Depending on the current debugging level, this function may invoke
8006  * certain runtime checks to identify invalid casts.
8007  */
8008
8009
8010 /**
8011  * G_OBJECT_CLASS:
8012  * @class: a valid #GObjectClass
8013  *
8014  * Casts a derived #GObjectClass structure into a #GObjectClass structure.
8015  */
8016
8017
8018 /**
8019  * G_OBJECT_CLASS_NAME:
8020  * @class: a valid #GObjectClass
8021  *
8022  * Return the name of a class structure's type.
8023  * should not be freed.
8024  *
8025  * Returns: Type name of @class. The string is owned by the type system and
8026  */
8027
8028
8029 /**
8030  * G_OBJECT_CLASS_TYPE:
8031  * @class: a valid #GObjectClass
8032  *
8033  * Get the type id of a class structure.
8034  *
8035  * Returns: Type id of @class.
8036  */
8037
8038
8039 /**
8040  * G_OBJECT_GET_CLASS:
8041  * @object: a #GObject instance.
8042  *
8043  * Get the class structure associated to a #GObject instance.
8044  *
8045  * Returns: pointer to object class structure.
8046  */
8047
8048
8049 /**
8050  * G_OBJECT_TYPE:
8051  * @object: Object to return the type id for.
8052  *
8053  * Get the type id of an object.
8054  *
8055  * Returns: Type id of @object.
8056  */
8057
8058
8059 /**
8060  * G_OBJECT_TYPE_NAME:
8061  * @object: Object to return the type name for.
8062  *
8063  * Get the name of an object's type.
8064  * should not be freed.
8065  *
8066  * Returns: Type name of @object. The string is owned by the type system and
8067  */
8068
8069
8070 /**
8071  * G_OBJECT_WARN_INVALID_PROPERTY_ID:
8072  * @object: the #GObject on which set_property() or get_property() was called
8073  * @property_id: the numeric id of the property
8074  * @pspec: the #GParamSpec of the property
8075  *
8076  * This macro should be used to emit a standard warning about unexpected
8077  * properties in set_property() and get_property() implementations.
8078  */
8079
8080
8081 /**
8082  * G_OPTION_ERROR:
8083  *
8084  * Error domain for option parsing. Errors in this domain will
8085  * be from the #GOptionError enumeration. See #GError for information on
8086  * error domains.
8087  */
8088
8089
8090 /**
8091  * G_OPTION_REMAINING:
8092  *
8093  * If a long option in the main group has this name, it is not treated as a
8094  * regular option. Instead it collects all non-option arguments which would
8095  * otherwise be left in <literal>argv</literal>. The option must be of type
8096  * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY
8097  * or %G_OPTION_ARG_FILENAME_ARRAY.
8098  * Using #G_OPTION_REMAINING instead of simply scanning <literal>argv</literal>
8099  * for leftover arguments has the advantage that GOption takes care of
8100  * necessary encoding conversions for strings or filenames.
8101  *
8102  * Since: 2.6
8103  */
8104
8105
8106 /**
8107  * G_PARAM_MASK:
8108  *
8109  * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
8110  */
8111
8112
8113 /**
8114  * G_PARAM_READWRITE:
8115  *
8116  * #GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.
8117  */
8118
8119
8120 /**
8121  * G_PARAM_SPEC:
8122  * @pspec: a valid #GParamSpec
8123  *
8124  * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into
8125  * a #GParamSpec object.
8126  */
8127
8128
8129 /**
8130  * G_PARAM_SPEC_BOOLEAN:
8131  * @pspec: a valid #GParamSpec instance
8132  *
8133  * Cast a #GParamSpec instance into a #GParamSpecBoolean.
8134  */
8135
8136
8137 /**
8138  * G_PARAM_SPEC_BOXED:
8139  * @pspec: a valid #GParamSpec instance
8140  *
8141  * Cast a #GParamSpec instance into a #GParamSpecBoxed.
8142  */
8143
8144
8145 /**
8146  * G_PARAM_SPEC_CHAR:
8147  * @pspec: a valid #GParamSpec instance
8148  *
8149  * Cast a #GParamSpec instance into a #GParamSpecChar.
8150  */
8151
8152
8153 /**
8154  * G_PARAM_SPEC_CLASS:
8155  * @pclass: a valid #GParamSpecClass
8156  *
8157  * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure.
8158  */
8159
8160
8161 /**
8162  * G_PARAM_SPEC_DOUBLE:
8163  * @pspec: a valid #GParamSpec instance
8164  *
8165  * Cast a #GParamSpec instance into a #GParamSpecDouble.
8166  */
8167
8168
8169 /**
8170  * G_PARAM_SPEC_ENUM:
8171  * @pspec: a valid #GParamSpec instance
8172  *
8173  * Cast a #GParamSpec instance into a #GParamSpecEnum.
8174  */
8175
8176
8177 /**
8178  * G_PARAM_SPEC_FLAGS:
8179  * @pspec: a valid #GParamSpec instance
8180  *
8181  * Cast a #GParamSpec instance into a #GParamSpecFlags.
8182  */
8183
8184
8185 /**
8186  * G_PARAM_SPEC_FLOAT:
8187  * @pspec: a valid #GParamSpec instance
8188  *
8189  * Cast a #GParamSpec instance into a #GParamSpecFloat.
8190  */
8191
8192
8193 /**
8194  * G_PARAM_SPEC_GET_CLASS:
8195  * @pspec: a valid #GParamSpec
8196  *
8197  * Retrieves the #GParamSpecClass of a #GParamSpec.
8198  */
8199
8200
8201 /**
8202  * G_PARAM_SPEC_GTYPE:
8203  * @pspec: a #GParamSpec
8204  *
8205  * Casts a #GParamSpec into a #GParamSpecGType.
8206  *
8207  * Since: 2.10
8208  */
8209
8210
8211 /**
8212  * G_PARAM_SPEC_INT:
8213  * @pspec: a valid #GParamSpec instance
8214  *
8215  * Cast a #GParamSpec instance into a #GParamSpecInt.
8216  */
8217
8218
8219 /**
8220  * G_PARAM_SPEC_INT64:
8221  * @pspec: a valid #GParamSpec instance
8222  *
8223  * Cast a #GParamSpec instance into a #GParamSpecInt64.
8224  */
8225
8226
8227 /**
8228  * G_PARAM_SPEC_LONG:
8229  * @pspec: a valid #GParamSpec instance
8230  *
8231  * Cast a #GParamSpec instance into a #GParamSpecLong.
8232  */
8233
8234
8235 /**
8236  * G_PARAM_SPEC_OBJECT:
8237  * @pspec: a valid #GParamSpec instance
8238  *
8239  * Casts a #GParamSpec instance into a #GParamSpecObject.
8240  */
8241
8242
8243 /**
8244  * G_PARAM_SPEC_OVERRIDE:
8245  * @pspec: a #GParamSpec
8246  *
8247  * Casts a #GParamSpec into a #GParamSpecOverride.
8248  *
8249  * Since: 2.4
8250  */
8251
8252
8253 /**
8254  * G_PARAM_SPEC_PARAM:
8255  * @pspec: a valid #GParamSpec instance
8256  *
8257  * Casts a #GParamSpec instance into a #GParamSpecParam.
8258  */
8259
8260
8261 /**
8262  * G_PARAM_SPEC_POINTER:
8263  * @pspec: a valid #GParamSpec instance
8264  *
8265  * Casts a #GParamSpec instance into a #GParamSpecPointer.
8266  */
8267
8268
8269 /**
8270  * G_PARAM_SPEC_STRING:
8271  * @pspec: a valid #GParamSpec instance
8272  *
8273  * Casts a #GParamSpec instance into a #GParamSpecString.
8274  */
8275
8276
8277 /**
8278  * G_PARAM_SPEC_TYPE:
8279  * @pspec: a valid #GParamSpec
8280  *
8281  * Retrieves the #GType of this @pspec.
8282  */
8283
8284
8285 /**
8286  * G_PARAM_SPEC_TYPE_NAME:
8287  * @pspec: a valid #GParamSpec
8288  *
8289  * Retrieves the #GType name of this @pspec.
8290  */
8291
8292
8293 /**
8294  * G_PARAM_SPEC_UCHAR:
8295  * @pspec: a valid #GParamSpec instance
8296  *
8297  * Cast a #GParamSpec instance into a #GParamSpecUChar.
8298  */
8299
8300
8301 /**
8302  * G_PARAM_SPEC_UINT:
8303  * @pspec: a valid #GParamSpec instance
8304  *
8305  * Cast a #GParamSpec instance into a #GParamSpecUInt.
8306  */
8307
8308
8309 /**
8310  * G_PARAM_SPEC_UINT64:
8311  * @pspec: a valid #GParamSpec instance
8312  *
8313  * Cast a #GParamSpec instance into a #GParamSpecUInt64.
8314  */
8315
8316
8317 /**
8318  * G_PARAM_SPEC_ULONG:
8319  * @pspec: a valid #GParamSpec instance
8320  *
8321  * Cast a #GParamSpec instance into a #GParamSpecULong.
8322  */
8323
8324
8325 /**
8326  * G_PARAM_SPEC_UNICHAR:
8327  * @pspec: a valid #GParamSpec instance
8328  *
8329  * Cast a #GParamSpec instance into a #GParamSpecUnichar.
8330  */
8331
8332
8333 /**
8334  * G_PARAM_SPEC_VALUE_ARRAY:
8335  * @pspec: a valid #GParamSpec instance
8336  *
8337  * Cast a #GParamSpec instance into a #GParamSpecValueArray.
8338  */
8339
8340
8341 /**
8342  * G_PARAM_SPEC_VALUE_TYPE:
8343  * @pspec: a valid #GParamSpec
8344  *
8345  * Retrieves the #GType to initialize a #GValue for this parameter.
8346  */
8347
8348
8349 /**
8350  * G_PARAM_SPEC_VARIANT:
8351  * @pspec: a #GParamSpec
8352  *
8353  * Casts a #GParamSpec into a #GParamSpecVariant.
8354  *
8355  * Since: 2.26
8356  */
8357
8358
8359 /**
8360  * G_PARAM_STATIC_STRINGS:
8361  *
8362  * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
8363  * Since 2.13.0
8364  */
8365
8366
8367 /**
8368  * G_PARAM_USER_SHIFT:
8369  *
8370  * Minimum shift count to be used for user defined flags, to be stored in
8371  * #GParamSpec.flags. The maximum allowed is 30 + G_PARAM_USER_SHIFT.
8372  */
8373
8374
8375 /**
8376  * G_PRIORITY_DEFAULT:
8377  *
8378  * Use this for default priority event sources.
8379  * In GLib this priority is used when adding timeout functions
8380  * with g_timeout_add(). In GDK this priority is used for events
8381  * from the X server.
8382  */
8383
8384
8385 /**
8386  * G_PRIORITY_DEFAULT_IDLE:
8387  *
8388  * Use this for default priority idle functions.
8389  * In GLib this priority is used when adding idle functions with
8390  * g_idle_add().
8391  */
8392
8393
8394 /**
8395  * G_PRIORITY_HIGH:
8396  *
8397  * Use this for high priority event sources.
8398  * It is not used within GLib or GTK+.
8399  */
8400
8401
8402 /**
8403  * G_PRIORITY_HIGH_IDLE:
8404  *
8405  * Use this for high priority idle functions.
8406  * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations,
8407  * and #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is
8408  * done to ensure that any pending resizes are processed before any
8409  * pending redraws, so that widgets are not redrawn twice unnecessarily.)
8410  */
8411
8412
8413 /**
8414  * G_PRIORITY_LOW:
8415  *
8416  * Use this for very low priority background tasks.
8417  * It is not used within GLib or GTK+.
8418  */
8419
8420
8421 /**
8422  * G_PROXY_EXTENSION_POINT_NAME:
8423  *
8424  * Extension point for proxy functionality.
8425  * See <link linkend="extending-gio">Extending GIO</link>.
8426  *
8427  * Since: 2.26
8428  */
8429
8430
8431 /**
8432  * G_PROXY_RESOLVER_EXTENSION_POINT_NAME:
8433  *
8434  * Extension point for proxy resolving functionality.
8435  * See <link linkend="extending-gio">Extending GIO</link>.
8436  */
8437
8438
8439 /**
8440  * G_REGEX_ERROR:
8441  *
8442  * Error domain for regular expressions. Errors in this domain will be
8443  * from the #GRegexError enumeration. See #GError for information on
8444  * error domains.
8445  *
8446  * Since: 2.14
8447  */
8448
8449
8450 /**
8451  * G_RESOLVER_ERROR:
8452  *
8453  * Error domain for #GResolver. Errors in this domain will be from the
8454  * #GResolverError enumeration. See #GError for more information on
8455  * error domains.
8456  */
8457
8458
8459 /**
8460  * G_SETTINGS_BACKEND_EXTENSION_POINT_NAME:
8461  *
8462  * Extension point for #GSettingsBackend functionality.
8463  */
8464
8465
8466 /**
8467  * G_SIGNAL_FLAGS_MASK:
8468  *
8469  * A mask for all #GSignalFlags bits.
8470  */
8471
8472
8473 /**
8474  * G_SIGNAL_MATCH_MASK:
8475  *
8476  * A mask for all #GSignalMatchType bits.
8477  */
8478
8479
8480 /**
8481  * G_SIGNAL_TYPE_STATIC_SCOPE:
8482  *
8483  * This macro flags signal argument types for which the signal system may
8484  * assume that instances thereof remain persistent across all signal emissions
8485  * they are used in. This is only useful for non ref-counted, value-copy types.
8486  * To flag a signal argument in this way, add
8487  * <literal>| G_SIGNAL_TYPE_STATIC_SCOPE</literal> to the corresponding argument
8488  * of g_signal_new().
8489  * |[
8490  * g_signal_new ("size_request",
8491  * G_TYPE_FROM_CLASS (gobject_class),
8492  * G_SIGNAL_RUN_FIRST,
8493  * G_STRUCT_OFFSET (GtkWidgetClass, size_request),
8494  * NULL, NULL,
8495  * _gtk_marshal_VOID__BOXED,
8496  * G_TYPE_NONE, 1,
8497  * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
8498  * ]|
8499  */
8500
8501
8502 /**
8503  * G_TIME_SPAN_DAY:
8504  *
8505  * Evaluates to a time span of one day.
8506  *
8507  * Since: 2.26
8508  */
8509
8510
8511 /**
8512  * G_TIME_SPAN_HOUR:
8513  *
8514  * Evaluates to a time span of one hour.
8515  *
8516  * Since: 2.26
8517  */
8518
8519
8520 /**
8521  * G_TIME_SPAN_MILLISECOND:
8522  *
8523  * Evaluates to a time span of one millisecond.
8524  *
8525  * Since: 2.26
8526  */
8527
8528
8529 /**
8530  * G_TIME_SPAN_MINUTE:
8531  *
8532  * Evaluates to a time span of one minute.
8533  *
8534  * Since: 2.26
8535  */
8536
8537
8538 /**
8539  * G_TIME_SPAN_SECOND:
8540  *
8541  * Evaluates to a time span of one second.
8542  *
8543  * Since: 2.26
8544  */
8545
8546
8547 /**
8548  * G_TLS_BACKEND_EXTENSION_POINT_NAME:
8549  *
8550  * Extension point for TLS functionality via #GTlsBackend.
8551  * See <link linkend="extending-gio">Extending GIO</link>.
8552  */
8553
8554
8555 /**
8556  * G_TLS_ERROR:
8557  *
8558  * Error domain for TLS. Errors in this domain will be from the
8559  * #GTlsError enumeration. See #GError for more information on error
8560  * domains.
8561  */
8562
8563
8564 /**
8565  * G_TYPE_ARRAY:
8566  *
8567  * The #GType for a boxed type holding a #GArray reference.
8568  *
8569  * Since: 2.22
8570  */
8571
8572
8573 /**
8574  * G_TYPE_BOOLEAN:
8575  *
8576  * The fundamental type corresponding to #gboolean.
8577  */
8578
8579
8580 /**
8581  * G_TYPE_BOXED:
8582  *
8583  * The fundamental type from which all boxed types are derived.
8584  */
8585
8586
8587 /**
8588  * G_TYPE_BYTE_ARRAY:
8589  *
8590  * The #GType for a boxed type holding a #GByteArray reference.
8591  *
8592  * Since: 2.22
8593  */
8594
8595
8596 /**
8597  * G_TYPE_CHAR:
8598  *
8599  * The fundamental type corresponding to #gchar.
8600  * The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
8601  * This may or may not be the same type a the C type "gchar".
8602  */
8603
8604
8605 /**
8606  * G_TYPE_CHECK_CLASS_CAST:
8607  * @g_class: Location of a #GTypeClass structure.
8608  * @g_type: The type to be returned.
8609  * @c_type: The corresponding C type of class structure of @g_type.
8610  *
8611  * Checks that @g_class is a class structure of the type identified by @g_type
8612  * and issues a warning if this is not the case. Returns @g_class casted
8613  * to a pointer to @c_type.
8614  * This macro should only be used in type implementations.
8615  */
8616
8617
8618 /**
8619  * G_TYPE_CHECK_CLASS_TYPE:
8620  * @g_class: Location of a #GTypeClass structure.
8621  * @g_type: The type to be checked.
8622  *
8623  * Checks if @g_class is a class structure of the type identified by
8624  * This macro should only be used in type implementations.
8625  *
8626  * Returns: %TRUE on success.
8627  */
8628
8629
8630 /**
8631  * G_TYPE_CHECK_INSTANCE:
8632  * @instance: Location of a #GTypeInstance structure.
8633  *
8634  * Checks if @instance is a valid #GTypeInstance structure,
8635  * otherwise issues a warning and returns %FALSE.
8636  * This macro should only be used in type implementations.
8637  *
8638  * Returns: %TRUE on success.
8639  */
8640
8641
8642 /**
8643  * G_TYPE_CHECK_INSTANCE_CAST:
8644  * @instance: Location of a #GTypeInstance structure.
8645  * @g_type: The type to be returned.
8646  * @c_type: The corresponding C type of @g_type.
8647  *
8648  * Checks that @instance is an instance of the type identified by @g_type
8649  * and issues a warning if this is not the case. Returns @instance casted
8650  * to a pointer to @c_type.
8651  * This macro should only be used in type implementations.
8652  */
8653
8654
8655 /**
8656  * G_TYPE_CHECK_INSTANCE_TYPE:
8657  * @instance: Location of a #GTypeInstance structure.
8658  * @g_type: The type to be checked
8659  *
8660  * Checks if @instance is an instance of the type identified by @g_type.
8661  * This macro should only be used in type implementations.
8662  *
8663  * Returns: %TRUE on success.
8664  */
8665
8666
8667 /**
8668  * G_TYPE_CHECK_VALUE:
8669  * @value: a #GValue
8670  *
8671  * Checks if @value has been initialized to hold values
8672  * of a value type.
8673  * This macro should only be used in type implementations.
8674  *
8675  * Returns: %TRUE on success.
8676  */
8677
8678
8679 /**
8680  * G_TYPE_CHECK_VALUE_TYPE:
8681  * @value: a #GValue
8682  * @g_type: The type to be checked.
8683  *
8684  * Checks if @value has been initialized to hold values
8685  * of type @g_type.
8686  * This macro should only be used in type implementations.
8687  *
8688  * Returns: %TRUE on success.
8689  */
8690
8691
8692 /**
8693  * G_TYPE_CLASS_GET_PRIVATE:
8694  * @klass: the class of a type deriving from @private_type.
8695  * @g_type: the type identifying which private data to retrieve.
8696  * @c_type: The C type for the private structure.
8697  *
8698  * Gets the private class structure for a particular type.
8699  * The private structure must have been registered in the
8700  * get_type() function with g_type_add_class_private().
8701  * This macro should only be used in type implementations.
8702  *
8703  * Since: 2.24
8704  * Returns: a pointer to the private data structure.
8705  */
8706
8707
8708 /**
8709  * G_TYPE_CLOSURE:
8710  *
8711  * The #GType for #GClosure.
8712  */
8713
8714
8715 /**
8716  * G_TYPE_DATE:
8717  *
8718  * The #GType for #GDate.
8719  */
8720
8721
8722 /**
8723  * G_TYPE_DATE_TIME:
8724  *
8725  * The #GType for a boxed type holding a #GDateTime.
8726  *
8727  * Since: 2.26
8728  */
8729
8730
8731 /**
8732  * G_TYPE_DBUS_ANNOTATION_INFO:
8733  *
8734  * The #GType for a boxed type holding a #GDBusAnnotationInfo.
8735  *
8736  * Since: 2.26
8737  */
8738
8739
8740 /**
8741  * G_TYPE_DBUS_ARG_INFO:
8742  *
8743  * The #GType for a boxed type holding a #GDBusArgInfo.
8744  *
8745  * Since: 2.26
8746  */
8747
8748
8749 /**
8750  * G_TYPE_DBUS_INTERFACE_INFO:
8751  *
8752  * The #GType for a boxed type holding a #GDBusInterfaceInfo.
8753  *
8754  * Since: 2.26
8755  */
8756
8757
8758 /**
8759  * G_TYPE_DBUS_METHOD_INFO:
8760  *
8761  * The #GType for a boxed type holding a #GDBusMethodInfo.
8762  *
8763  * Since: 2.26
8764  */
8765
8766
8767 /**
8768  * G_TYPE_DBUS_NODE_INFO:
8769  *
8770  * The #GType for a boxed type holding a #GDBusNodeInfo.
8771  *
8772  * Since: 2.26
8773  */
8774
8775
8776 /**
8777  * G_TYPE_DBUS_PROPERTY_INFO:
8778  *
8779  * The #GType for a boxed type holding a #GDBusPropertyInfo.
8780  *
8781  * Since: 2.26
8782  */
8783
8784
8785 /**
8786  * G_TYPE_DBUS_SIGNAL_INFO:
8787  *
8788  * The #GType for a boxed type holding a #GDBusSignalInfo.
8789  *
8790  * Since: 2.26
8791  */
8792
8793
8794 /**
8795  * G_TYPE_DOUBLE:
8796  *
8797  * The fundamental type corresponding to #gdouble.
8798  */
8799
8800
8801 /**
8802  * G_TYPE_ENUM:
8803  *
8804  * The fundamental type from which all enumeration types are derived.
8805  */
8806
8807
8808 /**
8809  * G_TYPE_ERROR:
8810  *
8811  * The #GType for a boxed type holding a #GError.
8812  *
8813  * Since: 2.26
8814  */
8815
8816
8817 /**
8818  * G_TYPE_FLAGS:
8819  *
8820  * The fundamental type from which all flags types are derived.
8821  */
8822
8823
8824 /**
8825  * G_TYPE_FLAG_RESERVED_ID_BIT:
8826  *
8827  * A bit in the type number that's supposed to be left untouched.
8828  */
8829
8830
8831 /**
8832  * G_TYPE_FLOAT:
8833  *
8834  * The fundamental type corresponding to #gfloat.
8835  */
8836
8837
8838 /**
8839  * G_TYPE_FROM_CLASS:
8840  * @g_class: Location of a valid #GTypeClass structure.
8841  *
8842  * Get the type identifier from a given @class structure.
8843  * This macro should only be used in type implementations.
8844  *
8845  * Returns: the #GType
8846  */
8847
8848
8849 /**
8850  * G_TYPE_FROM_INSTANCE:
8851  * @instance: Location of a valid #GTypeInstance structure.
8852  *
8853  * Get the type identifier from a given @instance structure.
8854  * This macro should only be used in type implementations.
8855  *
8856  * Returns: the #GType
8857  */
8858
8859
8860 /**
8861  * G_TYPE_FROM_INTERFACE:
8862  * @g_iface: Location of a valid #GTypeInterface structure.
8863  *
8864  * Get the type identifier from a given @interface structure.
8865  * This macro should only be used in type implementations.
8866  *
8867  * Returns: the #GType
8868  */
8869
8870
8871 /**
8872  * G_TYPE_FUNDAMENTAL:
8873  * @type: A #GType value.
8874  *
8875  * The fundamental type which is the ancestor of @type.
8876  * Fundamental types are types that serve as ultimate bases for the derived types,
8877  * thus they are the roots of distinct inheritance hierarchies.
8878  */
8879
8880
8881 /**
8882  * G_TYPE_FUNDAMENTAL_MAX:
8883  *
8884  * An integer constant that represents the number of identifiers reserved
8885  * for types that are assigned at compile-time.
8886  */
8887
8888
8889 /**
8890  * G_TYPE_FUNDAMENTAL_SHIFT:
8891  *
8892  * Shift value used in converting numbers to type IDs.
8893  */
8894
8895
8896 /**
8897  * G_TYPE_GSTRING:
8898  *
8899  * The #GType for #GString.
8900  */
8901
8902
8903 /**
8904  * G_TYPE_GTYPE:
8905  *
8906  * The type for #GType.
8907  */
8908
8909
8910 /**
8911  * G_TYPE_HASH_TABLE:
8912  *
8913  * The #GType for a boxed type holding a #GHashTable reference.
8914  *
8915  * Since: 2.10
8916  */
8917
8918
8919 /**
8920  * G_TYPE_HAS_VALUE_TABLE:
8921  * @type: A #GType value.
8922  *
8923  * Checks if @type has a #GTypeValueTable.
8924  *
8925  * Returns: %TRUE on success.
8926  */
8927
8928
8929 /**
8930  * G_TYPE_INITIALLY_UNOWNED:
8931  *
8932  * The type for #GInitiallyUnowned.
8933  */
8934
8935
8936 /**
8937  * G_TYPE_INSTANCE_GET_CLASS:
8938  * @instance: Location of the #GTypeInstance structure.
8939  * @g_type: The #GType of the class to be returned.
8940  * @c_type: The C type of the class structure.
8941  *
8942  * Get the class structure of a given @instance, casted
8943  * to a specified ancestor type @g_type of the instance.
8944  * Note that while calling a GInstanceInitFunc(), the class pointer gets
8945  * modified, so it might not always return the expected pointer.
8946  * This macro should only be used in type implementations.
8947  *
8948  * Returns: a pointer to the class structure
8949  */
8950
8951
8952 /**
8953  * G_TYPE_INSTANCE_GET_INTERFACE:
8954  * @instance: Location of the #GTypeInstance structure.
8955  * @g_type: The #GType of the interface to be returned.
8956  * @c_type: The C type of the interface structure.
8957  *
8958  * Get the interface structure for interface @g_type of a given @instance.
8959  * This macro should only be used in type implementations.
8960  *
8961  * Returns: a pointer to the interface structure
8962  */
8963
8964
8965 /**
8966  * G_TYPE_INSTANCE_GET_PRIVATE:
8967  * @instance: the instance of a type deriving from @private_type.
8968  * @g_type: the type identifying which private data to retrieve.
8969  * @c_type: The C type for the private structure.
8970  *
8971  * Gets the private structure for a particular type.
8972  * The private structure must have been registered in the
8973  * class_init function with g_type_class_add_private().
8974  * This macro should only be used in type implementations.
8975  *
8976  * Since: 2.4
8977  * Returns: a pointer to the private data structure.
8978  */
8979
8980
8981 /**
8982  * G_TYPE_INT:
8983  *
8984  * The fundamental type corresponding to #gint.
8985  */
8986
8987
8988 /**
8989  * G_TYPE_INT64:
8990  *
8991  * The fundamental type corresponding to #gint64.
8992  */
8993
8994
8995 /**
8996  * G_TYPE_INTERFACE:
8997  *
8998  * The fundamental type from which all interfaces are derived.
8999  */
9000
9001
9002 /**
9003  * G_TYPE_INVALID:
9004  *
9005  * An invalid #GType used as error return value in some functions which return
9006  * a #GType.
9007  */
9008
9009
9010 /**
9011  * G_TYPE_IO_CHANNEL:
9012  *
9013  * The #GType for #GIOChannel.
9014  */
9015
9016
9017 /**
9018  * G_TYPE_IO_CONDITION:
9019  *
9020  * The #GType for #GIOCondition.
9021  */
9022
9023
9024 /**
9025  * G_TYPE_IS_ABSTRACT:
9026  * @type: A #GType value.
9027  *
9028  * Checks if @type is an abstract type.  An abstract type cannot be
9029  * instantiated and is normally used as an abstract base class for
9030  * derived classes.
9031  *
9032  * Returns: %TRUE on success.
9033  */
9034
9035
9036 /**
9037  * G_TYPE_IS_CLASSED:
9038  * @type: A #GType value.
9039  *
9040  * Checks if @type is a classed type.
9041  *
9042  * Returns: %TRUE on success.
9043  */
9044
9045
9046 /**
9047  * G_TYPE_IS_DEEP_DERIVABLE:
9048  * @type: A #GType value.
9049  *
9050  * Checks if @type is a deep derivable type.  A deep derivable type
9051  * can be used as the base class of a deep (multi-level) class hierarchy.
9052  *
9053  * Returns: %TRUE on success.
9054  */
9055
9056
9057 /**
9058  * G_TYPE_IS_DERIVABLE:
9059  * @type: A #GType value.
9060  *
9061  * Checks if @type is a derivable type.  A derivable type can
9062  * be used as the base class of a flat (single-level) class hierarchy.
9063  *
9064  * Returns: %TRUE on success.
9065  */
9066
9067
9068 /**
9069  * G_TYPE_IS_DERIVED:
9070  * @type: A #GType value.
9071  *
9072  * Checks if @type is derived (or in object-oriented terminology:
9073  * inherited) from another type (this holds true for all non-fundamental
9074  * types).
9075  *
9076  * Returns: %TRUE on success.
9077  */
9078
9079
9080 /**
9081  * G_TYPE_IS_ENUM:
9082  * @type: a #GType ID.
9083  *
9084  * Checks whether @type "is a" %G_TYPE_ENUM.
9085  *
9086  * Returns: %TRUE if @type "is a" %G_TYPE_ENUM.
9087  */
9088
9089
9090 /**
9091  * G_TYPE_IS_FLAGS:
9092  * @type: a #GType ID.
9093  *
9094  * Checks whether @type "is a" %G_TYPE_FLAGS.
9095  *
9096  * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS.
9097  */
9098
9099
9100 /**
9101  * G_TYPE_IS_FUNDAMENTAL:
9102  * @type: A #GType value.
9103  *
9104  * Checks if @type is a fundamental type.
9105  *
9106  * Returns: %TRUE on success.
9107  */
9108
9109
9110 /**
9111  * G_TYPE_IS_INSTANTIATABLE:
9112  * @type: A #GType value.
9113  *
9114  * Checks if @type can be instantiated.  Instantiation is the
9115  * process of creating an instance (object) of this type.
9116  *
9117  * Returns: %TRUE on success.
9118  */
9119
9120
9121 /**
9122  * G_TYPE_IS_INTERFACE:
9123  * @type: A #GType value.
9124  *
9125  * Checks if @type is an interface type.
9126  * An interface type provides a pure API, the implementation
9127  * of which is provided by another type (which is then said to conform
9128  * to the interface).  GLib interfaces are somewhat analogous to Java
9129  * interfaces and C++ classes containing only pure virtual functions,
9130  * with the difference that GType interfaces are not derivable (but see
9131  * g_type_interface_add_prerequisite() for an alternative).
9132  *
9133  * Returns: %TRUE on success.
9134  */
9135
9136
9137 /**
9138  * G_TYPE_IS_OBJECT:
9139  * @type: Type id to check
9140  *
9141  * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it.
9142  *
9143  * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT.
9144  */
9145
9146
9147 /**
9148  * G_TYPE_IS_PARAM:
9149  * @type: a #GType ID
9150  *
9151  * Checks whether @type "is a" %G_TYPE_PARAM.
9152  */
9153
9154
9155 /**
9156  * G_TYPE_IS_VALUE:
9157  * @type: A #GType value.
9158  *
9159  * Checks whether the passed in type ID can be used for g_value_init().
9160  * That is, this macro checks whether this type provides an implementation
9161  * of the #GTypeValueTable functions required for a type to create a #GValue of.
9162  *
9163  * Returns: Whether @type is suitable as a #GValue type.
9164  */
9165
9166
9167 /**
9168  * G_TYPE_IS_VALUE_ABSTRACT:
9169  * @type: A #GType value.
9170  *
9171  * Checks if @type is an abstract value type.  An abstract value type introduces
9172  * a value table, but can't be used for g_value_init() and is normally used as
9173  * an abstract base type for derived value types.
9174  *
9175  * Returns: %TRUE on success.
9176  */
9177
9178
9179 /**
9180  * G_TYPE_IS_VALUE_TYPE:
9181  * @type: A #GType value.
9182  *
9183  * Checks if @type is a value type and can be used with g_value_init().
9184  *
9185  * Returns: %TRUE on success.
9186  */
9187
9188
9189 /**
9190  * G_TYPE_LONG:
9191  *
9192  * The fundamental type corresponding to #glong.
9193  */
9194
9195
9196 /**
9197  * G_TYPE_MAKE_FUNDAMENTAL:
9198  * @x: the fundamental type number.
9199  *
9200  * Get the type ID for the fundamental type number @x.
9201  * Use g_type_fundamental_next() instead of this macro to create new fundamental
9202  * types.
9203  *
9204  * Returns: the GType
9205  */
9206
9207
9208 /**
9209  * G_TYPE_NONE:
9210  *
9211  * A fundamental type which is used as a replacement for the C
9212  * <literal>void</literal> return type.
9213  */
9214
9215
9216 /**
9217  * G_TYPE_OBJECT:
9218  *
9219  * The fundamental type for #GObject.
9220  */
9221
9222
9223 /**
9224  * G_TYPE_PARAM:
9225  *
9226  * The fundamental type from which all #GParamSpec types are derived.
9227  */
9228
9229
9230 /**
9231  * G_TYPE_PARAM_BOOLEAN:
9232  *
9233  * The #GType of #GParamSpecBoolean.
9234  */
9235
9236
9237 /**
9238  * G_TYPE_PARAM_BOXED:
9239  *
9240  * The #GType of #GParamSpecBoxed.
9241  */
9242
9243
9244 /**
9245  * G_TYPE_PARAM_CHAR:
9246  *
9247  * The #GType of #GParamSpecChar.
9248  */
9249
9250
9251 /**
9252  * G_TYPE_PARAM_DOUBLE:
9253  *
9254  * The #GType of #GParamSpecDouble.
9255  */
9256
9257
9258 /**
9259  * G_TYPE_PARAM_ENUM:
9260  *
9261  * The #GType of #GParamSpecEnum.
9262  */
9263
9264
9265 /**
9266  * G_TYPE_PARAM_FLAGS:
9267  *
9268  * The #GType of #GParamSpecFlags.
9269  */
9270
9271
9272 /**
9273  * G_TYPE_PARAM_FLOAT:
9274  *
9275  * The #GType of #GParamSpecFloat.
9276  */
9277
9278
9279 /**
9280  * G_TYPE_PARAM_GTYPE:
9281  *
9282  * The #GType of #GParamSpecGType.
9283  *
9284  * Since: 2.10
9285  */
9286
9287
9288 /**
9289  * G_TYPE_PARAM_INT:
9290  *
9291  * The #GType of #GParamSpecInt.
9292  */
9293
9294
9295 /**
9296  * G_TYPE_PARAM_INT64:
9297  *
9298  * The #GType of #GParamSpecInt64.
9299  */
9300
9301
9302 /**
9303  * G_TYPE_PARAM_LONG:
9304  *
9305  * The #GType of #GParamSpecLong.
9306  */
9307
9308
9309 /**
9310  * G_TYPE_PARAM_OBJECT:
9311  *
9312  * The #GType of #GParamSpecObject.
9313  */
9314
9315
9316 /**
9317  * G_TYPE_PARAM_OVERRIDE:
9318  *
9319  * The #GType of #GParamSpecOverride.
9320  *
9321  * Since: 2.4
9322  */
9323
9324
9325 /**
9326  * G_TYPE_PARAM_PARAM:
9327  *
9328  * The #GType of #GParamSpecParam.
9329  */
9330
9331
9332 /**
9333  * G_TYPE_PARAM_POINTER:
9334  *
9335  * The #GType of #GParamSpecPointer.
9336  */
9337
9338
9339 /**
9340  * G_TYPE_PARAM_STRING:
9341  *
9342  * The #GType of #GParamSpecString.
9343  */
9344
9345
9346 /**
9347  * G_TYPE_PARAM_UCHAR:
9348  *
9349  * The #GType of #GParamSpecUChar.
9350  */
9351
9352
9353 /**
9354  * G_TYPE_PARAM_UINT:
9355  *
9356  * The #GType of #GParamSpecUInt.
9357  */
9358
9359
9360 /**
9361  * G_TYPE_PARAM_UINT64:
9362  *
9363  * The #GType of #GParamSpecUInt64.
9364  */
9365
9366
9367 /**
9368  * G_TYPE_PARAM_ULONG:
9369  *
9370  * The #GType of #GParamSpecULong.
9371  */
9372
9373
9374 /**
9375  * G_TYPE_PARAM_UNICHAR:
9376  *
9377  * The #GType of #GParamSpecUnichar.
9378  */
9379
9380
9381 /**
9382  * G_TYPE_PARAM_VALUE_ARRAY:
9383  *
9384  * The #GType of #GParamSpecValueArray.
9385  */
9386
9387
9388 /**
9389  * G_TYPE_PARAM_VARIANT:
9390  *
9391  * The #GType of #GParamSpecVariant.
9392  *
9393  * Since: 2.26
9394  */
9395
9396
9397 /**
9398  * G_TYPE_POINTER:
9399  *
9400  * The fundamental type corresponding to #gpointer.
9401  */
9402
9403
9404 /**
9405  * G_TYPE_PTR_ARRAY:
9406  *
9407  * The #GType for a boxed type holding a #GPtrArray reference.
9408  *
9409  * Since: 2.22
9410  */
9411
9412
9413 /**
9414  * G_TYPE_REGEX:
9415  *
9416  * The #GType for a boxed type holding a #GRegex reference.
9417  *
9418  * Since: 2.14
9419  */
9420
9421
9422 /**
9423  * G_TYPE_RESERVED_BSE_FIRST:
9424  *
9425  * First fundamental type number to create a new fundamental type id with
9426  * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
9427  */
9428
9429
9430 /**
9431  * G_TYPE_RESERVED_BSE_LAST:
9432  *
9433  * Last fundamental type number reserved for BSE.
9434  */
9435
9436
9437 /**
9438  * G_TYPE_RESERVED_GLIB_FIRST:
9439  *
9440  * First fundamental type number to create a new fundamental type id with
9441  * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
9442  */
9443
9444
9445 /**
9446  * G_TYPE_RESERVED_GLIB_LAST:
9447  *
9448  * Last fundamental type number reserved for GLib.
9449  */
9450
9451
9452 /**
9453  * G_TYPE_RESERVED_USER_FIRST:
9454  *
9455  * First available fundamental type number to create new fundamental
9456  * type id with G_TYPE_MAKE_FUNDAMENTAL().
9457  */
9458
9459
9460 /**
9461  * G_TYPE_STRING:
9462  *
9463  * The fundamental type corresponding to nul-terminated C strings.
9464  */
9465
9466
9467 /**
9468  * G_TYPE_STRV:
9469  *
9470  * The #GType for a boxed type holding a %NULL-terminated array of strings.
9471  * The code fragments in the following example show the use of a property of
9472  * type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
9473  * and g_object_get().
9474  * |[
9475  * g_object_class_install_property (object_class,
9476  * PROP_AUTHORS,
9477  * g_param_spec_boxed ("authors",
9478  * _("Authors"),
9479  * _("List of authors"),
9480  * G_TYPE_STRV,
9481  * G_PARAM_READWRITE));
9482  * gchar *authors[] = { "Owen", "Tim", NULL };
9483  * g_object_set (obj, "authors", authors, NULL);
9484  * gchar *writers[];
9485  * g_object_get (obj, "authors", &writers, NULL);
9486  * /&ast; do something with writers &ast;/
9487  * g_strfreev (writers);
9488  * ]|
9489  *
9490  * Since: 2.4
9491  */
9492
9493
9494 /**
9495  * G_TYPE_UCHAR:
9496  *
9497  * The fundamental type corresponding to #guchar.
9498  */
9499
9500
9501 /**
9502  * G_TYPE_UINT:
9503  *
9504  * The fundamental type corresponding to #guint.
9505  */
9506
9507
9508 /**
9509  * G_TYPE_UINT64:
9510  *
9511  * The fundamental type corresponding to #guint64.
9512  */
9513
9514
9515 /**
9516  * G_TYPE_ULONG:
9517  *
9518  * The fundamental type corresponding to #gulong.
9519  */
9520
9521
9522 /**
9523  * G_TYPE_VALUE:
9524  *
9525  * The type ID of the "GValue" type which is a boxed type,
9526  * used to pass around pointers to GValues.
9527  */
9528
9529
9530 /**
9531  * G_TYPE_VALUE_ARRAY:
9532  *
9533  * The type ID of the "GValueArray" type which is a boxed type,
9534  * used to pass around pointers to GValueArrays.
9535  */
9536
9537
9538 /**
9539  * G_TYPE_VARIANT:
9540  *
9541  * The fundamental type corresponding to #GVariant.
9542  * All floating #GVariant instances passed through the #GType system are
9543  * consumed.
9544  * Note that callbacks in closures, and signal handlers
9545  * for signals of return type %G_TYPE_VARIANT, must never return floating
9546  * variants.
9547  * with this fundamental type in 2.26.
9548  *
9549  * Note: GLib 2.24 did include a boxed type with this name. It was replaced
9550  * Since: 2.26
9551  */
9552
9553
9554 /**
9555  * G_TYPE_VARIANT_TYPE:
9556  *
9557  * The #GType for a boxed type holding a #GVariantType.
9558  *
9559  * Since: 2.24
9560  */
9561
9562
9563 /**
9564  * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH:
9565  *
9566  * Allowed characters in a path. Includes "!$&'()*+,;=:@/".
9567  */
9568
9569
9570 /**
9571  * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT:
9572  *
9573  * Allowed characters in path elements. Includes "!$&'()*+,;=:@".
9574  */
9575
9576
9577 /**
9578  * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO:
9579  *
9580  * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".
9581  */
9582
9583
9584 /**
9585  * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS:
9586  *
9587  * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".
9588  */
9589
9590
9591 /**
9592  * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS:
9593  *
9594  * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
9595  */
9596
9597
9598 /**
9599  * G_VALUE_HOLDS:
9600  * @value: A #GValue structure.
9601  * @type: A #GType value.
9602  *
9603  * Checks if @value holds (or contains) a value of @type.
9604  * This macro will also check for @value != %NULL and issue a
9605  * warning if the check fails.
9606  *
9607  * Returns: %TRUE if @value holds the @type.
9608  */
9609
9610
9611 /**
9612  * G_VALUE_HOLDS_BOOLEAN:
9613  * @value: a valid #GValue structure
9614  *
9615  * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN.
9616  *
9617  * Returns: %TRUE on success.
9618  */
9619
9620
9621 /**
9622  * G_VALUE_HOLDS_BOXED:
9623  * @value: a valid #GValue structure
9624  *
9625  * Checks whether the given #GValue can hold values derived
9626  * from type %G_TYPE_BOXED.
9627  *
9628  * Returns: %TRUE on success.
9629  */
9630
9631
9632 /**
9633  * G_VALUE_HOLDS_CHAR:
9634  * @value: a valid #GValue structure
9635  *
9636  * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR.
9637  *
9638  * Returns: %TRUE on success.
9639  */
9640
9641
9642 /**
9643  * G_VALUE_HOLDS_DOUBLE:
9644  * @value: a valid #GValue structure
9645  *
9646  * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE.
9647  *
9648  * Returns: %TRUE on success.
9649  */
9650
9651
9652 /**
9653  * G_VALUE_HOLDS_ENUM:
9654  * @value: a valid #GValue structure
9655  *
9656  * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM.
9657  *
9658  * Returns: %TRUE on success.
9659  */
9660
9661
9662 /**
9663  * G_VALUE_HOLDS_FLAGS:
9664  * @value: a valid #GValue structure
9665  *
9666  * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS.
9667  *
9668  * Returns: %TRUE on success.
9669  */
9670
9671
9672 /**
9673  * G_VALUE_HOLDS_FLOAT:
9674  * @value: a valid #GValue structure
9675  *
9676  * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT.
9677  *
9678  * Returns: %TRUE on success.
9679  */
9680
9681
9682 /**
9683  * G_VALUE_HOLDS_GTYPE:
9684  * @value: a valid #GValue structure
9685  *
9686  * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE.
9687  *
9688  * Since: 2.12
9689  * Returns: %TRUE on success.
9690  */
9691
9692
9693 /**
9694  * G_VALUE_HOLDS_INT:
9695  * @value: a valid #GValue structure
9696  *
9697  * Checks whether the given #GValue can hold values of type %G_TYPE_INT.
9698  *
9699  * Returns: %TRUE on success.
9700  */
9701
9702
9703 /**
9704  * G_VALUE_HOLDS_INT64:
9705  * @value: a valid #GValue structure
9706  *
9707  * Checks whether the given #GValue can hold values of type %G_TYPE_INT64.
9708  *
9709  * Returns: %TRUE on success.
9710  */
9711
9712
9713 /**
9714  * G_VALUE_HOLDS_LONG:
9715  * @value: a valid #GValue structure
9716  *
9717  * Checks whether the given #GValue can hold values of type %G_TYPE_LONG.
9718  *
9719  * Returns: %TRUE on success.
9720  */
9721
9722
9723 /**
9724  * G_VALUE_HOLDS_OBJECT:
9725  * @value: a valid #GValue structure
9726  *
9727  * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT.
9728  *
9729  * Returns: %TRUE on success.
9730  */
9731
9732
9733 /**
9734  * G_VALUE_HOLDS_PARAM:
9735  * @value: a valid #GValue structure
9736  *
9737  * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM.
9738  *
9739  * Returns: %TRUE on success.
9740  */
9741
9742
9743 /**
9744  * G_VALUE_HOLDS_POINTER:
9745  * @value: a valid #GValue structure
9746  *
9747  * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER.
9748  *
9749  * Returns: %TRUE on success.
9750  */
9751
9752
9753 /**
9754  * G_VALUE_HOLDS_STRING:
9755  * @value: a valid #GValue structure
9756  *
9757  * Checks whether the given #GValue can hold values of type %G_TYPE_STRING.
9758  *
9759  * Returns: %TRUE on success.
9760  */
9761
9762
9763 /**
9764  * G_VALUE_HOLDS_UCHAR:
9765  * @value: a valid #GValue structure
9766  *
9767  * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR.
9768  *
9769  * Returns: %TRUE on success.
9770  */
9771
9772
9773 /**
9774  * G_VALUE_HOLDS_UINT:
9775  * @value: a valid #GValue structure
9776  *
9777  * Checks whether the given #GValue can hold values of type %G_TYPE_UINT.
9778  *
9779  * Returns: %TRUE on success.
9780  */
9781
9782
9783 /**
9784  * G_VALUE_HOLDS_UINT64:
9785  * @value: a valid #GValue structure
9786  *
9787  * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64.
9788  *
9789  * Returns: %TRUE on success.
9790  */
9791
9792
9793 /**
9794  * G_VALUE_HOLDS_ULONG:
9795  * @value: a valid #GValue structure
9796  *
9797  * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG.
9798  *
9799  * Returns: %TRUE on success.
9800  */
9801
9802
9803 /**
9804  * G_VALUE_HOLDS_VARIANT:
9805  * @value: a valid #GValue structure
9806  *
9807  * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT.
9808  *
9809  * Returns: %TRUE on success.
9810  * Since: 2.26
9811  */
9812
9813
9814 /**
9815  * G_VALUE_NOCOPY_CONTENTS:
9816  *
9817  * If passed to G_VALUE_COLLECT(), allocated data won't be copied
9818  * but used verbatim. This does not affect ref-counted types like
9819  * objects. For more details, see the #GValueTable documentation.
9820  */
9821
9822
9823 /**
9824  * G_VALUE_TYPE:
9825  * @value: A #GValue structure.
9826  *
9827  * Get the type identifier of @value.
9828  *
9829  * Returns: the #GType.
9830  */
9831
9832
9833 /**
9834  * G_VALUE_TYPE_NAME:
9835  * @value: A #GValue structure.
9836  *
9837  * Gets the the type name of @value.
9838  *
9839  * Returns: the type name.
9840  */
9841
9842
9843 /**
9844  * G_VARIANT_TYPE:
9845  * @type_string: a well-formed #GVariantType type string
9846  *
9847  * Converts a string to a const #GVariantType.  Depending on the
9848  * current debugging level, this function may perform a runtime check
9849  * to ensure that @string is a valid GVariant type string.
9850  * It is always a programmer error to use this macro with an invalid
9851  * type string.
9852  * Since 2.24
9853  */
9854
9855
9856 /**
9857  * G_VARIANT_TYPE_ANY:
9858  *
9859  * An indefinite type that is a supertype of every type (including
9860  * itself).
9861  */
9862
9863
9864 /**
9865  * G_VARIANT_TYPE_ARRAY:
9866  *
9867  * An indefinite type that is a supertype of every array type.
9868  */
9869
9870
9871 /**
9872  * G_VARIANT_TYPE_BASIC:
9873  *
9874  * An indefinite type that is a supertype of every basic (ie:
9875  * non-container) type.
9876  */
9877
9878
9879 /**
9880  * G_VARIANT_TYPE_BOOLEAN:
9881  *
9882  * The type of a value that can be either %TRUE or %FALSE.
9883  */
9884
9885
9886 /**
9887  * G_VARIANT_TYPE_BYTE:
9888  *
9889  * The type of an integer value that can range from 0 to 255.
9890  */
9891
9892
9893 /**
9894  * G_VARIANT_TYPE_BYTESTRING:
9895  *
9896  * The type of an array of bytes.  This type is commonly used to pass
9897  * around strings that may not be valid utf8.  In that case, the
9898  * convention is that the nul terminator character should be included as
9899  * the last character in the array.
9900  */
9901
9902
9903 /**
9904  * G_VARIANT_TYPE_BYTESTRING_ARRAY:
9905  *
9906  * The type of an array of byte strings (an array of arrays of bytes).
9907  */
9908
9909
9910 /**
9911  * G_VARIANT_TYPE_DICTIONARY:
9912  *
9913  * An indefinite type that is a supertype of every dictionary type --
9914  * that is, any array type that has an element type equal to any
9915  * dictionary entry type.
9916  */
9917
9918
9919 /**
9920  * G_VARIANT_TYPE_DICT_ENTRY:
9921  *
9922  * An indefinite type that is a supertype of every dictionary entry
9923  * type.
9924  */
9925
9926
9927 /**
9928  * G_VARIANT_TYPE_DOUBLE:
9929  *
9930  * The type of a double precision IEEE754 floating point number.
9931  * These guys go up to about 1.80e308 (plus and minus) but miss out on
9932  * some numbers in between.  In any case, that's far greater than the
9933  * estimated number of fundamental particles in the observable
9934  * universe.
9935  */
9936
9937
9938 /**
9939  * G_VARIANT_TYPE_HANDLE:
9940  *
9941  * The type of a 32bit signed integer value, that by convention, is used
9942  * as an index into an array of file descriptors that are sent alongside
9943  * a DBus message.
9944  * If you are not interacting with DBus, then there is no reason to make
9945  * use of this type.
9946  */
9947
9948
9949 /**
9950  * G_VARIANT_TYPE_INT16:
9951  *
9952  * The type of an integer value that can range from -32768 to 32767.
9953  */
9954
9955
9956 /**
9957  * G_VARIANT_TYPE_INT32:
9958  *
9959  * The type of an integer value that can range from -2147483648 to
9960  * 2147483647.
9961  */
9962
9963
9964 /**
9965  * G_VARIANT_TYPE_INT64:
9966  *
9967  * The type of an integer value that can range from
9968  * -9223372036854775808 to 9223372036854775807.
9969  */
9970
9971
9972 /**
9973  * G_VARIANT_TYPE_MAYBE:
9974  *
9975  * An indefinite type that is a supertype of every maybe type.
9976  */
9977
9978
9979 /**
9980  * G_VARIANT_TYPE_OBJECT_PATH:
9981  *
9982  * The type of a DBus object reference.  These are strings of a
9983  * specific format used to identify objects at a given destination on
9984  * the bus.
9985  * If you are not interacting with DBus, then there is no reason to make
9986  * use of this type.  If you are, then the DBus specification contains a
9987  * precise description of valid object paths.
9988  */
9989
9990
9991 /**
9992  * G_VARIANT_TYPE_SIGNATURE:
9993  *
9994  * The type of a DBus type signature.  These are strings of a specific
9995  * format used as type signatures for DBus methods and messages.
9996  * If you are not interacting with DBus, then there is no reason to make
9997  * use of this type.  If you are, then the DBus specification contains a
9998  * precise description of valid signature strings.
9999  */
10000
10001
10002 /**
10003  * G_VARIANT_TYPE_STRING:
10004  *
10005  * The type of a string.  "" is a string.  %NULL is not a string.
10006  */
10007
10008
10009 /**
10010  * G_VARIANT_TYPE_STRING_ARRAY:
10011  *
10012  * The type of an array of strings.
10013  */
10014
10015
10016 /**
10017  * G_VARIANT_TYPE_TUPLE:
10018  *
10019  * An indefinite type that is a supertype of every tuple type,
10020  * regardless of the number of items in the tuple.
10021  */
10022
10023
10024 /**
10025  * G_VARIANT_TYPE_UINT16:
10026  *
10027  * The type of an integer value that can range from 0 to 65535.
10028  * There were about this many people living in Toronto in the 1870s.
10029  */
10030
10031
10032 /**
10033  * G_VARIANT_TYPE_UINT32:
10034  *
10035  * The type of an integer value that can range from 0 to 4294967295.
10036  * That's one number for everyone who was around in the late 1970s.
10037  */
10038
10039
10040 /**
10041  * G_VARIANT_TYPE_UINT64:
10042  *
10043  * The type of an integer value that can range from 0 to
10044  * 18446744073709551616.  That's a really big number, but a Rubik's
10045  * cube can have a bit more than twice as many possible positions.
10046  */
10047
10048
10049 /**
10050  * G_VARIANT_TYPE_UNIT:
10051  *
10052  * The empty tuple type.  Has only one instance.  Known also as "triv"
10053  * or "void".
10054  */
10055
10056
10057 /**
10058  * G_VARIANT_TYPE_VARDICT:
10059  *
10060  * The type of a dictionary mapping strings to variants (the ubiquitous
10061  * "a{sv}" type).
10062  */
10063
10064
10065 /**
10066  * G_VARIANT_TYPE_VARIANT:
10067  *
10068  * The type of a box that contains any other value (including another
10069  * variant).
10070  */
10071
10072
10073 /**
10074  * G_VFS_EXTENSION_POINT_NAME:
10075  *
10076  * Extension point for #GVfs functionality.
10077  * See <link linkend="extending-gio">Extending GIO</link>.
10078  */
10079
10080
10081 /**
10082  * G_VOLUME_IDENTIFIER_KIND_HAL_UDI:
10083  *
10084  * The string used to obtain a Hal UDI with g_volume_get_identifier().
10085  */
10086
10087
10088 /**
10089  * G_VOLUME_IDENTIFIER_KIND_LABEL:
10090  *
10091  * The string used to obtain a filesystem label with g_volume_get_identifier().
10092  */
10093
10094
10095 /**
10096  * G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT:
10097  *
10098  * The string used to obtain a NFS mount with g_volume_get_identifier().
10099  */
10100
10101
10102 /**
10103  * G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE:
10104  *
10105  * The string used to obtain a Unix device path with g_volume_get_identifier().
10106  */
10107
10108
10109 /**
10110  * G_VOLUME_IDENTIFIER_KIND_UUID:
10111  *
10112  * The string used to obtain a UUID with g_volume_get_identifier().
10113  */
10114
10115
10116 /**
10117  * G_VOLUME_MONITOR_EXTENSION_POINT_NAME:
10118  *
10119  * Extension point for volume monitor functionality.
10120  * See <link linkend="extending-gio">Extending GIO</link>.
10121  */
10122
10123
10124 /**
10125  * SECTION:extensionpoints
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:gaction
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:gactiongroup
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:gappinfo
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:gapplication
10275  * @title: GApplication
10276  * @short_description: Core application class
10277  *
10278  * A #GApplication is the foundation of an application, unique for a
10279  * given application identifier.  The GApplication class wraps some
10280  * low-level platform-specific services and is intended to act as the
10281  * foundation for higher-level application classes such as
10282  * #GtkApplication or #MxApplication.  In general, you should not use
10283  * this class outside of a higher level framework.
10284  * One of the core features that GApplication provides is process
10285  * uniqueness, in the context of a "session".  The session concept is
10286  * platform-dependent, but corresponds roughly to a graphical desktop
10287  * login.  When your application is launched again, its arguments
10288  * are passed through platform communication to the already running
10289  * program. The already running instance of the program is called the
10290  * <firstterm>primary instance</firstterm>.
10291  * Before using GApplication, you must choose an "application identifier".
10292  * The expected form of an application identifier is very close to that of
10293  * of a <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-interface">DBus bus name</ulink>.
10294  * For details on valid application identifiers, see
10295  * g_application_id_is_valid().
10296  * The application identifier is claimed by the application as a
10297  * well-known bus name on the user's session bus.  This means that the
10298  * uniqueness of your application is scoped to the current session.  It
10299  * also means that your application may provide additional services
10300  * (through registration of other object paths) at that bus name.
10301  * The registration of these object paths should be done with the shared
10302  * GDBus session bus.  Note that due to the internal architecture of
10303  * GDBus, method calls can be dispatched at any time (even if a main
10304  * loop is not running).  For this reason, you must ensure that any
10305  * object paths that you wish to register are registered before
10306  * #GApplication attempts to acquire the bus name of your application
10307  * (which happens in g_application_register()).  Unfortunately, this
10308  * means that you cannot use g_application_get_is_remote() to decide if
10309  * you want to register object paths.
10310  * GApplication provides convenient life cycle management by maintaining
10311  * a <firstterm>use count</firstterm> for the primary application instance.
10312  * The use count can be changed using g_application_hold() and
10313  * g_application_release(). If it drops to zero, the application exits.
10314  * GApplication also implements the #GActionGroup interface and lets you
10315  * easily export actions by adding them with g_application_set_action_group().
10316  * When invoking an action by calling g_action_group_activate_action() on
10317  * the application, it is always invoked in the primary instance.
10318  * There is a number of different entry points into a #GApplication:
10319  * <itemizedlist>
10320  * <listitem>via 'Activate' (i.e. just starting the application)</listitem>
10321  * <listitem>via 'Open' (i.e. opening some files)</listitem>
10322  * <listitem>by handling a command-line</listitem>
10323  * <listitem>via activating an action</listitem>
10324  * </itemizedlist>
10325  * The #GApplication::startup signal lets you handle the application
10326  * initialization for all of these in a single place.
10327  * Regardless of which of these entry points is used to start the application,
10328  * GApplication passes some <firstterm id="platform-data">platform
10329  * data</firstterm> from the launching instance to the primary instance,
10330  * in the form of a #GVariant dictionary mapping strings to variants.
10331  * To use platform data, override the @before_emit or @after_emit virtual
10332  * functions in your #GApplication subclass. When dealing with
10333  * #GApplicationCommandline objects, the platform data is directly
10334  * available via g_application_command_line_get_cwd(),
10335  * g_application_command_line_get_environ() and
10336  * g_application_command_line_get_platform_data().
10337  * As the name indicates, the platform data may vary depending on the
10338  * operating system, but it always includes the current directory (key
10339  * "cwd"), and optionally the environment (ie the set of environment
10340  * variables and their values) of the calling process (key "environ").
10341  * The environment is only added to the platform data if the
10342  * #G_APPLICATION_SEND_ENVIONMENT flag is set. GApplication subclasses
10343  * can add their own platform data by overriding the @add_platform_data
10344  * virtual function. For instance, #GtkApplication adds startup notification
10345  * data in this way.
10346  * To parse commandline arguments you may handle the
10347  * #GApplication::command-line signal or override the local_command_line()
10348  * vfunc, to parse them in either the primary instance or the local instance,
10349  * respectively.
10350  * <example id="gapplication-example-open"><title>Opening files with a GApplication</title>
10351  * <programlisting>
10352  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-open.c">
10353  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10354  * </xi:include>
10355  * </programlisting>
10356  * </example>
10357  * <example id="gapplication-example-actions"><title>A GApplication with actions</title>
10358  * <programlisting>
10359  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-actions.c">
10360  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10361  * </xi:include>
10362  * </programlisting>
10363  * </example>
10364  *
10365  * Examples include: "com.example.MyApp", "org.example.internal-apps.Calculator".
10366  */
10367
10368
10369 /**
10370  * SECTION:gapplicationcommandline
10371  * @title: GApplicationCommandLine
10372  * @short_description: A command-line invocation of an application
10373  * @see_also: #GApplication
10374  *
10375  * #GApplicationCommandLine represents a command-line invocation of
10376  * an application.  It is created by #GApplication and emitted
10377  * in the #GApplication::command-line signal and virtual function.
10378  * The class contains the list of arguments that the program was invoked
10379  * with.  It is also possible to query if the commandline invocation was
10380  * commandline to this process).
10381  * The GApplicationCommandLine object can provide the @argc and @argv
10382  * parameters for use with the #GOptionContext command-line parsing API,
10383  * with the g_application_command_line_get_arguments() function. See
10384  * <xref linkend="gapplication-example-cmdline3"/> for an example.
10385  * The exit status of the originally-invoked process may be set and
10386  * messages can be printed to stdout or stderr of that process.  The
10387  * lifecycle of the originally-invoked process is tied to the lifecycle
10388  * dropped).
10389  * The main use for #GApplicationCommandline (and the
10390  * #GApplication::command-line signal) is 'Emacs server' like use cases:
10391  * You can set the <envar>EDITOR</envar> environment variable to have
10392  * e.g. git use your favourite editor to edit commit messages, and if you
10393  * already have an instance of the editor running, the editing will happen
10394  * in the running instance, instead of opening a new one. An important
10395  * aspect of this use case is that the process that gets started by git
10396  * does not return until the editing is done.
10397  * <example id="gapplication-example-cmdline"><title>Handling commandline arguments with GApplication</title>
10398  * <para>
10399  * A simple example where the commandline is completely handled
10400  * in the #GApplication::command-line handler. The launching instance exits
10401  * once the signal handler in the primary instance has returned, and the
10402  * return value of the signal handler becomes the exit status of the launching
10403  * instance.
10404  * </para>
10405  * <programlisting>
10406  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline.c">
10407  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10408  * </xi:include>
10409  * </programlisting>
10410  * </example>
10411  * <example id="gapplication-example-cmdline2"><title>Split commandline handling</title>
10412  * <para>
10413  * An example of split commandline handling. Options that start with
10414  * <literal>--local-</literal> are handled locally, all other options are
10415  * passed to the #GApplication::command-line handler which runs in the primary
10416  * instance.
10417  * </para>
10418  * <programlisting>
10419  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline2.c">
10420  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10421  * </xi:include>
10422  * </programlisting>
10423  * </example>
10424  * <example id="gapplication-example-cmdline3"><title>Deferred commandline handling</title>
10425  * <para>
10426  * An example of deferred commandline handling. Here, the commandline is
10427  * not completely handled before the #GApplication::command-line handler
10428  * returns. Instead, we keep a reference to the GApplicationCommandline
10429  * object and handle it later(in this example, in an idle). Note that it
10430  * is necessary to hold the application until you are done with the
10431  * commandline.
10432  * </para>
10433  * <para>
10434  * This example also shows how to use #GOptionContext for parsing the
10435  * commandline arguments.
10436  * </para>
10437  * <programlisting>
10438  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline3.c">
10439  * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10440  * </xi:include>
10441  * </programlisting>
10442  * </example>
10443  *
10444  * Local (ie: the current process is running in direct response to the
10445  * Invocation) or remote (ie: some other process forwarded the
10446  * Of this object (ie: the process exits when the last reference is
10447  */
10448
10449
10450 /**
10451  * SECTION:gasynchelper
10452  * @short_description: Asynchronous Helper Functions
10453  * @include: gio/gio.h
10454  * @see_also: #GAsyncReady
10455  *
10456  * Provides helper functions for asynchronous operations.
10457  */
10458
10459
10460 /**
10461  * SECTION:gasyncinitable
10462  * @short_description: Asynchronously failable object initialization interface
10463  * @include: gio/gio.h
10464  * @see_also: #GInitable
10465  *
10466  * This is the asynchronous version of #GInitable; it behaves the same
10467  * in all ways except that initialization is asynchronous. For more details
10468  * see the descriptions on #GInitable.
10469  * A class may implement both the #GInitable and #GAsyncInitable interfaces.
10470  * Users of objects implementing this are not intended to use the interface
10471  * method directly; instead it will be used automatically in various ways.
10472  * For C applications you generally just call g_async_initable_new_async()
10473  * directly, or indirectly via a foo_thing_new_async() wrapper. This will call
10474  * g_async_initable_init_async() under the cover, calling back with %NULL and
10475  * a set %GError on failure.
10476  * A typical implementation might look something like this:
10477  * |[
10478  * enum {
10479  * NOT_INITIALIZED,
10480  * INITIALIZING,
10481  * INITIALIZED
10482  * };
10483  * static void
10484  * _foo_ready_cb (Foo *self)
10485  * {
10486  * GList *l;
10487  * self->priv->state = INITIALIZED;
10488  * for (l = self->priv->init_results; l != NULL; l = l->next)
10489  * {
10490  * GSimpleAsyncResult *simple = l->data;
10491  * if (!self->priv->success)
10492  * g_simple_async_result_set_error (simple, ...);
10493  * g_simple_async_result_complete (simple);
10494  * g_object_unref (simple);
10495  * }
10496  * g_list_free (self->priv->init_results);
10497  * self->priv->init_results = NULL;
10498  * }
10499  * static void
10500  * foo_init_async (GAsyncInitable       *initable,
10501  * int                   io_priority,
10502  * GCancellable         *cancellable,
10503  * GAsyncReadyCallback   callback,
10504  * gpointer              user_data)
10505  * {
10506  * Foo *self = FOO (initable);
10507  * GSimpleAsyncResult *simple;
10508  * simple = g_simple_async_result_new (G_OBJECT (initable)
10509  * callback,
10510  * user_data,
10511  * foo_init_async);
10512  * switch (self->priv->state)
10513  * {
10514  * case NOT_INITIALIZED:
10515  * _foo_get_ready (self);
10516  * self->priv->init_results = g_list_append (self->priv->init_results,
10517  * simple);
10518  * self->priv->state = INITIALIZING;
10519  * break;
10520  * case INITIALIZING:
10521  * self->priv->init_results = g_list_append (self->priv->init_results,
10522  * simple);
10523  * break;
10524  * case INITIALIZED:
10525  * if (!self->priv->success)
10526  * g_simple_async_result_set_error (simple, ...);
10527  * g_simple_async_result_complete_in_idle (simple);
10528  * g_object_unref (simple);
10529  * break;
10530  * }
10531  * }
10532  * static gboolean
10533  * foo_init_finish (GAsyncInitable       *initable,
10534  * GAsyncResult         *result,
10535  * GError              **error)
10536  * {
10537  * g_return_val_if_fail (g_simple_async_result_is_valid (result,
10538  * G_OBJECT (initable), foo_init_async), FALSE);
10539  * if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
10540  * error))
10541  * return FALSE;
10542  * return TRUE;
10543  * }
10544  * static void
10545  * foo_async_initable_iface_init (gpointer g_iface,
10546  * gpointer data)
10547  * {
10548  * GAsyncInitableIface *iface = g_iface;
10549  * iface->init_async = foo_init_async;
10550  * iface->init_finish = foo_init_finish;
10551  * }
10552  * ]|
10553  */
10554
10555
10556 /**
10557  * SECTION:gasyncresult
10558  * @short_description: Asynchronous Function Results
10559  * @include: gio/gio.h
10560  * @see_also: #GSimpleAsyncResult
10561  *
10562  * Provides a base class for implementing asynchronous function results.
10563  * Asynchronous operations are broken up into two separate operations
10564  * which are chained together by a #GAsyncReadyCallback. To begin
10565  * an asynchronous operation, provide a #GAsyncReadyCallback to the
10566  * asynchronous function. This callback will be triggered when the
10567  * operation has completed, and will be passed a #GAsyncResult instance
10568  * filled with the details of the operation's success or failure, the
10569  * object the asynchronous function was started for and any error codes
10570  * returned. The asynchronous callback function is then expected to call
10571  * the corresponding "_finish()" function, passing the object the
10572  * function was called for, the #GAsyncResult instance, and (optionally)
10573  * an @error to grab any error conditions that may have occurred.
10574  * The "_finish()" function for an operation takes the generic result
10575  * (of type #GAsyncResult) and returns the specific result that the
10576  * operation in question yields (e.g. a #GFileEnumerator for a
10577  * "enumerate children" operation). If the result or error status of the
10578  * operation is not needed, there is no need to call the "_finish()"
10579  * function; GIO will take care of cleaning up the result and error
10580  * information after the #GAsyncReadyCallback returns. Applications may
10581  * also take a reference to the #GAsyncResult and call "_finish()"
10582  * later; however, the "_finish()" function may be called at most once.
10583  * Example of a typical asynchronous operation flow:
10584  * |[
10585  * void _theoretical_frobnitz_async (Theoretical         *t,
10586  * GCancellable        *c,
10587  * GAsyncReadyCallback *cb,
10588  * gpointer             u);
10589  * gboolean _theoretical_frobnitz_finish (Theoretical   *t,
10590  * GAsyncResult  *res,
10591  * GError       **e);
10592  * static void
10593  * frobnitz_result_func (GObject      *source_object,
10594  * GAsyncResult *res,
10595  * gpointer      user_data)
10596  * {
10597  * gboolean success = FALSE;
10598  * success = _theoretical_frobnitz_finish (source_object, res, NULL);
10599  * if (success)
10600  * g_printf ("Hurray!\n");
10601  * else
10602  * g_printf ("Uh oh!\n");
10603  * /<!-- -->* ... *<!-- -->/
10604  * }
10605  * int main (int argc, void *argv[])
10606  * {
10607  * /<!-- -->* ... *<!-- -->/
10608  * _theoretical_frobnitz_async (theoretical_data,
10609  * NULL,
10610  * frobnitz_result_func,
10611  * NULL);
10612  * /<!-- -->* ... *<!-- -->/
10613  * }
10614  * ]|
10615  * The callback for an asynchronous operation is called only once, and is
10616  * always called, even in the case of a cancelled operation. On cancellation
10617  * the result is a %G_IO_ERROR_CANCELLED error.
10618  * Some asynchronous operations are implemented using synchronous calls.
10619  * These are run in a separate thread, if #GThread has been initialized, but
10620  * otherwise they are sent to the Main Event Loop and processed in an idle
10621  * function. So, if you truly need asynchronous operations, make sure to
10622  * initialize #GThread.
10623  */
10624
10625
10626 /**
10627  * SECTION:gbufferedinputstream
10628  * @short_description: Buffered Input Stream
10629  * @include: gio/gio.h
10630  * @see_also: #GFilterInputStream, #GInputStream
10631  *
10632  * Buffered input stream implements #GFilterInputStream and provides
10633  * for buffered reads.
10634  * By default, #GBufferedInputStream's buffer size is set at 4 kilobytes.
10635  * To create a buffered input stream, use g_buffered_input_stream_new(),
10636  * or g_buffered_input_stream_new_sized() to specify the buffer's size at
10637  * construction.
10638  * To get the size of a buffer within a buffered input stream, use
10639  * g_buffered_input_stream_get_buffer_size(). To change the size of a
10640  * buffered input stream's buffer, use
10641  * g_buffered_input_stream_set_buffer_size(). Note that the buffer's size
10642  * cannot be reduced below the size of the data within the buffer.
10643  */
10644
10645
10646 /**
10647  * SECTION:gbufferedoutputstream
10648  * @short_description: Buffered Output Stream
10649  * @include: gio/gio.h
10650  * @see_also: #GFilterOutputStream, #GOutputStream
10651  *
10652  * Buffered output stream implements #GFilterOutputStream and provides
10653  * for buffered writes.
10654  * By default, #GBufferedOutputStream's buffer size is set at 4 kilobytes.
10655  * To create a buffered output stream, use g_buffered_output_stream_new(),
10656  * or g_buffered_output_stream_new_sized() to specify the buffer's size
10657  * at construction.
10658  * To get the size of a buffer within a buffered input stream, use
10659  * g_buffered_output_stream_get_buffer_size(). To change the size of a
10660  * buffered output stream's buffer, use
10661  * g_buffered_output_stream_set_buffer_size(). Note that the buffer's
10662  * size cannot be reduced below the size of the data within the buffer.
10663  */
10664
10665
10666 /**
10667  * SECTION:gcancellable
10668  * @short_description: Thread-safe Operation Cancellation Stack
10669  * @include: gio/gio.h
10670  *
10671  * GCancellable is a thread-safe operation cancellation stack used
10672  * throughout GIO to allow for cancellation of synchronous and
10673  * asynchronous operations.
10674  */
10675
10676
10677 /**
10678  * SECTION:gcharsetconverter
10679  * @short_description: Convert between charsets
10680  * @include: gio/gio.h
10681  *
10682  * #GCharsetConverter is an implementation of #GConverter based on
10683  * GIConv.
10684  */
10685
10686
10687 /**
10688  * SECTION:gcontenttype
10689  * @short_description: Platform-specific content typing
10690  * @include: gio/gio.h
10691  *
10692  * A content type is a platform specific string that defines the type
10693  * of a file. On unix it is a mime type, on win32 it is an extension string
10694  * like ".doc", ".txt" or a percieved string like "audio". Such strings
10695  * can be looked up in the registry at HKEY_CLASSES_ROOT.
10696  */
10697
10698
10699 /**
10700  * SECTION:gconverter
10701  * @short_description: Data conversion interface
10702  * @include: gio/gio.h
10703  * @see_also: #GInputStream, #GOutputStream
10704  *
10705  * #GConverter is implemented by objects that convert
10706  * binary data in various ways. The conversion can be
10707  * stateful and may fail at any place.
10708  * compression, decompression and regular expression
10709  * replace.
10710  *
10711  * Some example conversions are: character set conversion,
10712  * Since: 2.24
10713  */
10714
10715
10716 /**
10717  * SECTION:gconverterinputstream
10718  * @short_description: Converter Input Stream
10719  * @include: gio/gio.h
10720  * @see_also: #GInputStream, #GConverter
10721  *
10722  * Converter input stream implements #GInputStream and allows
10723  * conversion of data of various types during reading.
10724  */
10725
10726
10727 /**
10728  * SECTION:gconverteroutputstream
10729  * @short_description: Converter Output Stream
10730  * @include: gio/gio.h
10731  * @see_also: #GOutputStream, #GConverter
10732  *
10733  * Converter output stream implements #GOutputStream and allows
10734  * conversion of data of various types during reading.
10735  */
10736
10737
10738 /**
10739  * SECTION:gcredentials
10740  * @short_description: An object containing credentials
10741  * @include: gio/gio.h
10742  *
10743  * The #GCredentials type is a reference-counted wrapper for native
10744  * credentials. This information is typically used for identifying,
10745  * authenticating and authorizing other processes.
10746  * Some operating systems supports looking up the credentials of the
10747  * remote peer of a communication endpoint - see e.g.
10748  * g_socket_get_credentials().
10749  * Some operating systems supports securely sending and receiving
10750  * credentials over a Unix Domain Socket, see
10751  * #GUnixCredentialsMessage, g_unix_connection_send_credentials() and
10752  * g_unix_connection_receive_credentials() for details.
10753  * On Linux, the native credential type is a <type>struct ucred</type>
10754  * - see the
10755  * <citerefentry><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>
10756  * man page for details. This corresponds to
10757  * %G_CREDENTIALS_TYPE_LINUX_UCRED.
10758  * On FreeBSD, the native credential type is a <type>struct cmsgcred</type>.
10759  * This corresponds to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED.
10760  */
10761
10762
10763 /**
10764  * SECTION:gdatainputstream
10765  * @short_description: Data Input Stream
10766  * @include: gio/gio.h
10767  * @see_also: #GInputStream
10768  *
10769  * Data input stream implements #GInputStream and includes functions for
10770  * reading structured data directly from a binary input stream.
10771  */
10772
10773
10774 /**
10775  * SECTION:gdataoutputstream
10776  * @short_description: Data Output Stream
10777  * @include: gio/gio.h
10778  * @see_also: #GOutputStream
10779  *
10780  * Data output stream implements #GOutputStream and includes functions for
10781  * writing data directly to an output stream.
10782  */
10783
10784
10785 /**
10786  * SECTION:gdbusaddress
10787  * @title: D-Bus Addresses
10788  * @short_description: D-Bus connection endpoints
10789  * @include: gio/gio.h
10790  *
10791  * Routines for working with D-Bus addresses. A D-Bus address is a string
10792  * like "unix:tmpdir=/tmp/my-app-name". The exact format of addresses
10793  * is explained in detail in the <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html&num;addresses">D-Bus specification</link>.
10794  */
10795
10796
10797 /**
10798  * SECTION:gdbusauthobserver
10799  * @short_description: Object used for authenticating connections
10800  * @include: gio/gio.h
10801  *
10802  * The #GDBusAuthObserver type provides a mechanism for participating
10803  * in how a #GDBusServer (or a #GDBusConnection) authenticates remote
10804  * peers. Simply instantiate a #GDBusAuthObserver and connect to the
10805  * signals you are interested in. Note that new signals may be added
10806  * in the future
10807  * For example, if you only want to allow D-Bus connections from
10808  * processes owned by the same uid as the server, you would use a
10809  * signal handler like the following:
10810  * <example id="auth-observer"><title>Controlling Authentication</title><programlisting>
10811  * static gboolean
10812  * on_authorize_authenticated_peer (GDBusAuthObserver *observer,
10813  * GIOStream         *stream,
10814  * GCredentials      *credentials,
10815  * gpointer           user_data)
10816  * {
10817  * gboolean authorized;
10818  * authorized = FALSE;
10819  * if (credentials != NULL)
10820  * {
10821  * GCredentials *own_credentials;
10822  * own_credentials = g_credentials_new ();
10823  * if (g_credentials_is_same_user (credentials, own_credentials, NULL))
10824  * authorized = TRUE;
10825  * g_object_unref (own_credentials);
10826  * }
10827  * return authorized;
10828  * }
10829  * </programlisting></example>
10830  */
10831
10832
10833 /**
10834  * SECTION:gdbusconnection
10835  * @short_description: D-Bus Connections
10836  * @include: gio/gio.h
10837  *
10838  * The #GDBusConnection type is used for D-Bus connections to remote
10839  * peers such as a message buses. It is a low-level API that offers a
10840  * lot of flexibility. For instance, it lets you establish a connection
10841  * over any transport that can by represented as an #GIOStream.
10842  * This class is rarely used directly in D-Bus clients. If you are writing
10843  * an D-Bus client, it is often easier to use the g_bus_own_name(),
10844  * g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs.
10845  * <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>
10846  * <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>
10847  * <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>
10848  * <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>
10849  */
10850
10851
10852 /**
10853  * SECTION:gdbuserror
10854  * @title: GDBusError
10855  * @short_description: Mapping D-Bus errors to and from GError
10856  * @include: gio/gio.h
10857  *
10858  * All facilities that return errors from remote methods (such as
10859  * g_dbus_connection_call_sync()) use #GError to represent both D-Bus
10860  * errors (e.g. errors returned from the other peer) and locally
10861  * in-process generated errors.
10862  * To check if a returned #GError is an error from a remote peer, use
10863  * g_dbus_error_is_remote_error(). To get the actual D-Bus error name,
10864  * use g_dbus_error_get_remote_error(). Before presenting an error,
10865  * always use g_dbus_error_strip_remote_error().
10866  * In addition, facilities used to return errors to a remote peer also
10867  * use #GError. See g_dbus_method_invocation_return_error() for
10868  * discussion about how the D-Bus error name is set.
10869  * Applications can associate a #GError error domain with a set of D-Bus errors in order to
10870  * automatically map from D-Bus errors to #GError and back. This
10871  * is typically done in the function returning the #GQuark for the
10872  * error domain:
10873  * <example id="error-registration"><title>Error Registration</title><programlisting>
10874  * /<!-- -->* foo-bar-error.h: *<!-- -->/
10875  * #define FOO_BAR_ERROR (foo_bar_error_quark ())
10876  * GQuark foo_bar_error_quark (void);
10877  * typedef enum
10878  * {
10879  * FOO_BAR_ERROR_FAILED,
10880  * FOO_BAR_ERROR_ANOTHER_ERROR,
10881  * FOO_BAR_ERROR_SOME_THIRD_ERROR,
10882  * } FooBarError;
10883  * /<!-- -->* foo-bar-error.c: *<!-- -->/
10884  * static const GDBusErrorEntry foo_bar_error_entries[] =
10885  * {
10886  * {FOO_BAR_ERROR_FAILED,           "org.project.Foo.Bar.Error.Failed"},
10887  * {FOO_BAR_ERROR_ANOTHER_ERROR,    "org.project.Foo.Bar.Error.AnotherError"},
10888  * {FOO_BAR_ERROR_SOME_THIRD_ERROR, "org.project.Foo.Bar.Error.SomeThirdError"},
10889  * };
10890  * GQuark
10891  * foo_bar_error_quark (void)
10892  * {
10893  * static volatile gsize quark_volatile = 0;
10894  * g_dbus_error_register_error_domain ("foo-bar-error-quark",
10895  * &quark_volatile,
10896  * foo_bar_error_entries,
10897  * G_N_ELEMENTS (foo_bar_error_entries));
10898  * G_STATIC_ASSERT (G_N_ELEMENTS (foo_bar_error_entries) - 1 == FOO_BAR_ERROR_SOME_THIRD_ERROR);
10899  * return (GQuark) quark_volatile;
10900  * }
10901  * </programlisting></example>
10902  * With this setup, a D-Bus peer can transparently pass e.g. %FOO_BAR_ERROR_ANOTHER_ERROR and
10903  * other peers will see the D-Bus error name <literal>org.project.Foo.Bar.Error.AnotherError</literal>.
10904  * If the other peer is using GDBus, the peer will see also %FOO_BAR_ERROR_ANOTHER_ERROR instead
10905  * of %G_IO_ERROR_DBUS_ERROR. Note that GDBus clients can still recover
10906  * <literal>org.project.Foo.Bar.Error.AnotherError</literal> using g_dbus_error_get_remote_error().
10907  * Note that errors in the %G_DBUS_ERROR error domain is intended only
10908  * for returning errors from a remote message bus process. Errors
10909  * generated locally in-process by e.g. #GDBusConnection is from the
10910  * %G_IO_ERROR domain.
10911  */
10912
10913
10914 /**
10915  * SECTION:gdbusintrospection
10916  * @title: D-Bus Introspection Data
10917  * @short_description: Node and interface description data structures
10918  * @include: gio/gio.h
10919  *
10920  * Various data structures and convenience routines to parse and
10921  * generate D-Bus introspection XML. Introspection information is
10922  * used when registering objects with g_dbus_connection_register_object().
10923  * The format of D-Bus introspection XML is specified in the
10924  * <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html&num;introspection-format">D-Bus specification</link>.
10925  */
10926
10927
10928 /**
10929  * SECTION:gdbusmessage
10930  * @short_description: D-Bus Message
10931  * @include: gio/gio.h
10932  *
10933  * A type for representing D-Bus messages that can be sent or received
10934  * on a #GDBusConnection.
10935  */
10936
10937
10938 /**
10939  * SECTION:gdbusmethodinvocation
10940  * @short_description: Object for handling remote calls
10941  * @include: gio/gio.h
10942  *
10943  * Instances of the #GDBusMethodInvocation class are used when
10944  * handling D-Bus method calls. It provides a way to asynchronously
10945  * return results and errors.
10946  * The normal way to obtain a #GDBusMethodInvocation object is to receive
10947  * it as an argument to the handle_method_call() function in a
10948  * #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object().
10949  */
10950
10951
10952 /**
10953  * SECTION:gdbusnameowning
10954  * @title: Owning Bus Names
10955  * @short_description: Simple API for owning bus names
10956  * @include: gio/gio.h
10957  *
10958  * Convenience API for owning bus names.
10959  * <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>
10960  */
10961
10962
10963 /**
10964  * SECTION:gdbusnamewatching
10965  * @title: Watching Bus Names
10966  * @short_description: Simple API for watching bus names
10967  * @include: gio/gio.h
10968  *
10969  * Convenience API for watching bus names.
10970  * <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>
10971  */
10972
10973
10974 /**
10975  * SECTION:gdbusproxy
10976  * @short_description: Client-side proxies
10977  * @include: gio/gio.h
10978  *
10979  * #GDBusProxy is a base class used for proxies to access a D-Bus
10980  * interface on a remote object. A #GDBusProxy can be constructed for
10981  * both well-known and unique names.
10982  * By default, #GDBusProxy will cache all properties (and listen to
10983  * changes) of the remote object, and proxy all signals that gets
10984  * emitted. This behaviour can be changed by passing suitable
10985  * #GDBusProxyFlags when the proxy is created. If the proxy is for a
10986  * well-known name, the property cache is flushed when the name owner
10987  * vanishes and reloaded when a name owner appears.
10988  * If a #GDBusProxy is used for a well-known name, the owner of the
10989  * name is tracked and can be read from
10990  * #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to
10991  * get notified of changes. Additionally, only signals and property
10992  * changes emitted from the current name owner are considered and
10993  * calls are always sent to the current name owner. This avoids a
10994  * number of race conditions when the name is lost by one owner and
10995  * claimed by another. However, if no name owner currently exists,
10996  * then calls will be sent to the well-known name which may result in
10997  * the message bus launching an owner (unless
10998  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set).
10999  * The generic #GDBusProxy::g-properties-changed and #GDBusProxy::g-signal
11000  * signals are not very convenient to work with. Therefore, the recommended
11001  * way of working with proxies is to subclass #GDBusProxy, and have
11002  * more natural properties and signals in your derived class.
11003  * See <xref linkend="gdbus-example-proxy-subclass"/> for an example.
11004  * <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>
11005  */
11006
11007
11008 /**
11009  * SECTION:gdbusserver
11010  * @short_description: Helper for accepting connections
11011  * @include: gio/gio.h
11012  *
11013  * #GDBusServer is a helper for listening to and accepting D-Bus
11014  * connections.
11015  * <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>
11016  */
11017
11018
11019 /**
11020  * SECTION:gdbusutils
11021  * @title: D-Bus Utilities
11022  * @short_description: Various utilities related to D-Bus.
11023  * @include: gio/gio.h
11024  *
11025  * Various utility routines related to D-Bus.
11026  */
11027
11028
11029 /**
11030  * SECTION:gdesktopappinfo
11031  * @title: GDesktopAppInfo
11032  * @short_description: Application information from desktop files
11033  * @include: gio/gdesktopappinfo.h
11034  *
11035  * #GDesktopAppInfo is an implementation of #GAppInfo based on
11036  * desktop files.
11037  * Note that <filename>&lt;gio/gdesktopappinfo.h&gt;</filename> belongs to
11038  * the UNIX-specific GIO interfaces, thus you have to use the
11039  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
11040  */
11041
11042
11043 /**
11044  * SECTION:gdrive
11045  * @short_description: Drive management
11046  * @include: gio/gio.h
11047  *
11048  * #GDrive - this represent a piece of hardware connected to the machine.
11049  * It's generally only created for removable hardware or hardware with
11050  * removable media.
11051  * #GDrive is a container class for #GVolume objects that stem from
11052  * the same piece of media. As such, #GDrive abstracts a drive with
11053  * (or without) removable media and provides operations for querying
11054  * whether media is available, determing whether media change is
11055  * automatically detected and ejecting the media.
11056  * If the #GDrive reports that media isn't automatically detected, one
11057  * can poll for media; typically one should not do this periodically
11058  * as a poll for media operation is potententially expensive and may
11059  * spin up the drive creating noise.
11060  * #GDrive supports starting and stopping drives with authentication
11061  * support for the former. This can be used to support a diverse set
11062  * of use cases including connecting/disconnecting iSCSI devices,
11063  * powering down external disk enclosures and starting/stopping
11064  * multi-disk devices such as RAID devices. Note that the actual
11065  * semantics and side-effects of starting/stopping a #GDrive may vary
11066  * according to implementation. To choose the correct verbs in e.g. a
11067  * file manager, use g_drive_get_start_stop_type().
11068  * For porting from GnomeVFS note that there is no equivalent of
11069  * #GDrive in that API.
11070  */
11071
11072
11073 /**
11074  * SECTION:gemblem
11075  * @short_description: An object for emblems
11076  * @include: gio/gio.h
11077  * @see_also: #GIcon, #GEmblemedIcon, #GLoadableIcon, #GThemedIcon
11078  *
11079  * #GEmblem is an implementation of #GIcon that supports
11080  * having an emblem, which is an icon with additional properties.
11081  * It can than be added to a #GEmblemedIcon.
11082  * Currently, only metainformation about the emblem's origin is
11083  * supported. More may be added in the future.
11084  */
11085
11086
11087 /**
11088  * SECTION:gemblemedicon
11089  * @short_description: Icon with emblems
11090  * @include: gio/gio.h
11091  * @see_also: #GIcon, #GLoadableIcon, #GThemedIcon, #GEmblem
11092  *
11093  * #GEmblemedIcon is an implementation of #GIcon that supports
11094  * adding an emblem to an icon. Adding multiple emblems to an
11095  * icon is ensured via g_emblemed_icon_add_emblem().
11096  * Note that #GEmblemedIcon allows no control over the position
11097  * of the emblems. See also #GEmblem for more information.
11098  */
11099
11100
11101 /**
11102  * SECTION:gfile
11103  * @short_description: File and Directory Handling
11104  * @include: gio/gio.h
11105  * @see_also: #GFileInfo, #GFileEnumerator
11106  *
11107  * #GFile is a high level abstraction for manipulating files on a
11108  * virtual file system. #GFile<!-- -->s are lightweight, immutable
11109  * objects that do no I/O upon creation. It is necessary to understand that
11110  * #GFile objects do not represent files, merely an identifier for a file. All
11111  * file content I/O is implemented as streaming operations (see #GInputStream and
11112  * #GOutputStream).
11113  * g_file_new_for_path() if you have a path.
11114  * g_file_new_for_uri() if you have a URI.
11115  * g_file_new_for_commandline_arg() for a command line argument.
11116  * g_file_parse_name() from a utf8 string gotten from g_file_get_parse_name().
11117  * One way to think of a #GFile is as an abstraction of a pathname. For normal
11118  * files the system pathname is what is stored internally, but as #GFile<!-- -->s
11119  * are extensible it could also be something else that corresponds to a pathname
11120  * in a userspace implementation of a filesystem.
11121  * #GFile<!-- -->s make up hierarchies of directories and files that correspond to the
11122  * files on a filesystem. You can move through the file system with #GFile using
11123  * g_file_get_parent() to get an identifier for the parent directory, g_file_get_child()
11124  * to get a child within a directory, g_file_resolve_relative_path() to resolve a relative
11125  * path between two #GFile<!-- -->s. There can be multiple hierarchies, so you may not
11126  * end up at the same root if you repeatedly call g_file_get_parent() on two different
11127  * files.
11128  * All #GFile<!-- -->s have a basename (get with g_file_get_basename()). These names
11129  * are byte strings that are used to identify the file on the filesystem (relative to
11130  * its parent directory) and there is no guarantees that they have any particular charset
11131  * encoding or even make any sense at all. If you want to use filenames in a user
11132  * interface you should use the display name that you can get by requesting the
11133  * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info().
11134  * This is guaranteed to be in utf8 and can be used in a user interface. But always
11135  * store the real basename or the #GFile to use to actually access the file, because
11136  * there is no way to go from a display name to the actual name.
11137  * Using #GFile as an identifier has the same weaknesses as using a path in that
11138  * there may be multiple aliases for the same file. For instance, hard or
11139  * soft links may cause two different #GFile<!-- -->s to refer to the same file.
11140  * and long names on Fat/NTFS, or bind mounts in Linux. If you want to check if
11141  * two #GFile<!-- -->s point to the same file you can query for the
11142  * %G_FILE_ATTRIBUTE_ID_FILE attribute. Note that #GFile does some trivial
11143  * canonicalization of pathnames passed in, so that trivial differences in the
11144  * path string used at creation (duplicated slashes, slash at end of path, "."
11145  * or ".." path segments, etc) does not create different #GFile<!-- -->s.
11146  * Many #GFile operations have both synchronous and asynchronous versions
11147  * to suit your application. Asynchronous versions of synchronous functions
11148  * simply have _async() appended to their function names. The asynchronous
11149  * I/O functions call a #GAsyncReadyCallback which is then used to finalize
11150  * the operation, producing a GAsyncResult which is then passed to the
11151  * function's matching _finish() operation.
11152  * Some #GFile operations do not have synchronous analogs, as they may
11153  * take a very long time to finish, and blocking may leave an application
11154  * unusable. Notable cases include:
11155  * g_file_mount_mountable() to mount a mountable file.
11156  * g_file_unmount_mountable_with_operation() to unmount a mountable file.
11157  * g_file_eject_mountable_with_operation() to eject a mountable file.
11158  * <para id="gfile-etag"><indexterm><primary>entity tag</primary></indexterm>
11159  * One notable feature of #GFile<!-- -->s are entity tags, or "etags" for
11160  * short. Entity tags are somewhat like a more abstract version of the
11161  * traditional mtime, and can be used to quickly determine if the file has
11162  * been modified from the version on the file system. See the HTTP 1.1
11163  * <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">specification</ulink>
11164  * for HTTP Etag headers, which are a very similar concept.
11165  * </para>
11166  *
11167  * To construct a #gfile, you can use:
11168  * Other possible causes for aliases are: case insensitive filesystems, short
11169  */
11170
11171
11172 /**
11173  * SECTION:gfileattribute
11174  * @short_description: Key-Value Paired File Attributes
11175  * @include: gio/gio.h
11176  * @see_also: #GFile, #GFileInfo
11177  *
11178  * File attributes in GIO consist of a list of key-value pairs.
11179  * Keys are strings that contain a key namespace and a key name, separated
11180  * by a colon, e.g. "namespace:keyname". Namespaces are included to sort
11181  * key-value pairs by namespaces for relevance. Keys can be retrived
11182  * using wildcards, e.g. "standard::*" will return all of the keys in the
11183  * "standard" namespace.
11184  * Values are stored within the list in #GFileAttributeValue structures.
11185  * Values can store different types, listed in the enum #GFileAttributeType.
11186  * Upon creation of a #GFileAttributeValue, the type will be set to
11187  * %G_FILE_ATTRIBUTE_TYPE_INVALID.
11188  * The list of possible attributes for a filesystem (pointed to by a #GFile) is
11189  * availible as a #GFileAttributeInfoList. This list is queryable by key names
11190  * as indicated earlier.
11191  * Classes that implement #GFileIface will create a #GFileAttributeInfoList and
11192  * install default keys and values for their given file system, architecture,
11193  * and other possible implementation details (e.g., on a UNIX system, a file
11194  * attribute key will be registered for the user id for a given file).
11195  * <para>
11196  * <table>
11197  * <title>GFileAttributes Default Namespaces</title>
11198  * <tgroup cols='2' align='left'><thead>
11199  * <row><entry>Namspace</entry><entry>Description</entry></row>
11200  * </thead>
11201  * <tbody>
11202  * <row><entry>"standard"</entry><entry>The "Standard" namespace. General file
11203  * information that any application may need should be put in this namespace.
11204  * Examples include the file's name, type, and size.</entry></row>
11205  * <row><entry>"etag"</entry><entry>The <link linkend="gfile-etag">"Entity Tag"</link>
11206  * namespace. Currently, the only key in this namespace is "value", which contains
11207  * the value of the current entity tag.</entry></row>
11208  * <row><entry>"id"</entry><entry>The "Identification" namespace. This
11209  * namespace is used by file managers and applications that list directories
11210  * to check for loops and to uniquely identify files.</entry></row>
11211  * <row><entry>"access"</entry><entry>The "Access" namespace. Used to check
11212  * if a user has the proper privilidges to access files and perform
11213  * file operations. Keys in this namespace are made to be generic
11214  * and easily understood, e.g. the "can_read" key is %TRUE if
11215  * the current user has permission to read the file. UNIX permissions and
11216  * NTFS ACLs in Windows should be mapped to these values.</entry></row>
11217  * <row><entry>"mountable"</entry><entry>The "Mountable" namespace. Includes
11218  * simple boolean keys for checking if a file or path supports mount operations, e.g.
11219  * mount, unmount, eject. These are used for files of type %G_FILE_TYPE_MOUNTABLE.</entry></row>
11220  * <row><entry>"time"</entry><entry>The "Time" namespace. Includes file
11221  * access, changed, created times. </entry></row>
11222  * <row><entry>"unix"</entry><entry>The "Unix" namespace. Includes UNIX-specific
11223  * information and may not be available for all files. Examples include
11224  * the UNIX "UID", "GID", etc.</entry></row>
11225  * <row><entry>"dos"</entry><entry>The "DOS" namespace. Includes DOS-specific
11226  * information and may not be available for all files. Examples include
11227  * "is_system" for checking if a file is marked as a system file, and "is_archive"
11228  * for checking if a file is marked as an archive file.</entry></row>
11229  * <row><entry>"owner"</entry><entry>The "Owner" namespace. Includes information
11230  * about who owns a file. May not be available for all file systems. Examples include
11231  * "user" for getting the user name of the file owner. This information is often mapped from
11232  * some backend specific data such as a unix UID.</entry></row>
11233  * <row><entry>"thumbnail"</entry><entry>The "Thumbnail" namespace. Includes
11234  * information about file thumbnails and their location within the file system. Exaples of
11235  * keys in this namespace include "path" to get the location of a thumbnail, and "failed"
11236  * to check if thumbnailing of the file failed.</entry></row>
11237  * <row><entry>"filesystem"</entry><entry>The "Filesystem" namespace. Gets information
11238  * about the file system where a file is located, such as its type, how much
11239  * space is left available, and the overall size of the file system.</entry></row>
11240  * <row><entry>"gvfs"</entry><entry>The "GVFS" namespace. Keys in this namespace
11241  * contain information about the current GVFS backend in use. </entry></row>
11242  * <row><entry>"xattr"</entry><entry>The "xattr" namespace. Gets information
11243  * about extended user attributes. See attr(5). The "user." prefix of the
11244  * extended user attribute name is stripped away when constructing keys in
11245  * this namespace, e.g. "xattr::mime_type" for the extended attribute with
11246  * the name "user.mime_type". Note that this information is only available
11247  * if GLib has been built with extended attribute support.</entry></row>
11248  * <row><entry>"xattr-sys"</entry><entry>The "xattr-sys" namespace.
11249  * Gets information about extended attributes which are not user-specific.
11250  * See attr(5). Note that this information is only available if GLib
11251  * has been built with extended attribute support.</entry></row>
11252  * <row><entry>"selinux"</entry><entry>The "SELinux" namespace. Includes
11253  * information about the SELinux context of files. Note that this information
11254  * is only available if GLib has been built with SELinux support.</entry></row>
11255  * </tbody>
11256  * </tgroup>
11257  * </table>
11258  * </para>
11259  * Please note that these are not all of the possible namespaces.
11260  * More namespaces can be added from GIO modules or by individual applications.
11261  * For more information about writing GIO modules, see #GIOModule.
11262  * <!-- TODO: Implementation note about using extended attributes on supported
11263  * file systems -->
11264  * <para><table>
11265  * <title>GFileAttributes Built-in Keys and Value Types</title>
11266  * <tgroup cols='3' align='left'><thead>
11267  * <row><entry>Enum Value</entry><entry>Namespace:Key</entry><entry>Value Type</entry></row>
11268  * </thead><tbody>
11269  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TYPE</entry><entry>standard::type</entry><entry>uint32 (#GFileType)</entry></row>
11270  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</entry><entry>standard::is-hidden</entry><entry>boolean</entry></row>
11271  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP</entry><entry>standard::is-backup</entry><entry>boolean</entry></row>
11272  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</entry><entry>standard::is-symlink</entry><entry>boolean</entry></row>
11273  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</entry><entry>standard::is-virtual</entry><entry>boolean</entry></row>
11274  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_NAME</entry><entry>standard::name</entry><entry>byte string</entry></row>
11275  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</entry><entry>standard::display-name</entry><entry>string</entry></row>
11276  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</entry><entry>standard::edit-name</entry><entry>string</entry></row>
11277  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ICON</entry><entry>standard::icon</entry><entry>object (#GIcon)</entry></row>
11278  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</entry><entry>standard::content-type</entry><entry>string</entry></row>
11279  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</entry><entry>standard::fast-content-type</entry><entry>string</entry></row>
11280  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SIZE</entry><entry>standard::size</entry><entry>uint64</entry></row>
11281  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE</entry><entry>standard::allocated-size</entry><entry>uint64</entry></row>
11282  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</entry><entry>standard::symlink-target</entry><entry>byte string</entry></row>
11283  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TARGET_URI</entry><entry>standard::target-uri</entry><entry>string</entry></row>
11284  * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER</entry><entry>standard::sort-order</entry><entry>int32</entry></row>
11285  * <row><entry>%G_FILE_ATTRIBUTE_ETAG_VALUE</entry><entry>etag::value</entry><entry>string</entry></row>
11286  * <row><entry>%G_FILE_ATTRIBUTE_ID_FILE</entry><entry>id::file</entry><entry>string</entry></row>
11287  * <row><entry>%G_FILE_ATTRIBUTE_ID_FILESYSTEM</entry><entry>id::filesystem</entry><entry>string</entry></row>
11288  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_READ</entry><entry>access::can-read</entry><entry>boolean</entry></row>
11289  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE</entry><entry>access::can-write</entry><entry>boolean</entry></row>
11290  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</entry><entry>access::can-execute</entry><entry>boolean</entry></row>
11291  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE</entry><entry>access::can-delete</entry><entry>boolean</entry></row>
11292  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH</entry><entry>access::can-trash</entry><entry>boolean</entry></row>
11293  * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME</entry><entry>access::can-rename</entry><entry>boolean</entry></row>
11294  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</entry><entry>mountable::can-mount</entry><entry>boolean</entry></row>
11295  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</entry><entry>mountable::can-unmount</entry><entry>boolean</entry></row>
11296  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</entry><entry>mountable::can-eject</entry><entry>boolean</entry></row>
11297  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</entry><entry>mountable::unix-device</entry><entry>uint32</entry></row>
11298  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE</entry><entry>mountable::unix-device-file</entry><entry>string</entry></row>
11299  * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</entry><entry>mountable::hal-udi</entry><entry>string</entry></row>
11300  * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED</entry><entry>time::modified</entry><entry>uint64</entry></row>
11301  * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC</entry><entry>time::modified-usec</entry><entry>uint32</entry></row>
11302  * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS</entry><entry>time::access</entry><entry>uint64</entry></row>
11303  * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS_USEC</entry><entry>time::access-usec</entry><entry>uint32</entry></row>
11304  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED</entry><entry>time::changed</entry><entry>uint64</entry></row>
11305  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED_USEC</entry><entry>time::changed-usec</entry><entry>uint32</entry></row>
11306  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED</entry><entry>time::created</entry><entry>uint64</entry></row>
11307  * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED_USEC</entry><entry>time::created-usec</entry><entry>uint32</entry></row>
11308  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_DEVICE</entry><entry>unix::device</entry><entry>uint32</entry></row>
11309  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_INODE</entry><entry>unix::inode</entry><entry>uint64</entry></row>
11310  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_MODE</entry><entry>unix::mode</entry><entry>uint32</entry></row>
11311  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_NLINK</entry><entry>unix::nlink</entry><entry>uint32</entry></row>
11312  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_UID</entry><entry>unix::uid</entry><entry>uint32</entry></row>
11313  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_GID</entry><entry>unix::gid</entry><entry>uint32</entry></row>
11314  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_RDEV</entry><entry>unix::rdev</entry><entry>uint32</entry></row>
11315  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</entry><entry>unix::block-size</entry><entry>uint32</entry></row>
11316  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCKS</entry><entry>unix::blocks</entry><entry>uint64</entry></row>
11317  * <row><entry>%G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</entry><entry>unix::is-mountpoint</entry><entry>boolean</entry></row>
11318  * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE</entry><entry>dos::is-archive</entry><entry>boolean</entry></row>
11319  * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_SYSTEM</entry><entry>dos::is-system</entry><entry>boolean</entry></row>
11320  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER</entry><entry>owner::user</entry><entry>string</entry></row>
11321  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER_REAL</entry><entry>owner::user-real</entry><entry>string</entry></row>
11322  * <row><entry>%G_FILE_ATTRIBUTE_OWNER_GROUP</entry><entry>owner::group</entry><entry>string</entry></row>
11323  * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAIL_PATH</entry><entry>thumbnail::path</entry><entry>bytestring</entry></row>
11324  * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAILING_FAILED</entry><entry>thumbnail::failed</entry><entry>boolean</entry></row>
11325  * <row><entry>%G_FILE_ATTRIBUTE_PREVIEW_ICON</entry><entry>preview::icon</entry><entry>object (#GIcon)</entry></row>
11326  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_SIZE</entry><entry>filesystem::size</entry><entry>uint64</entry></row>
11327  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_FREE</entry><entry>filesystem::free</entry><entry>uint64</entry></row>
11328  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_TYPE</entry><entry>filesystem::type</entry><entry>string</entry></row>
11329  * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_READONLY</entry><entry>filesystem::readonly</entry><entry>boolean</entry></row>
11330  * <row><entry>%G_FILE_ATTRIBUTE_GVFS_BACKEND</entry><entry>gvfs::backend</entry><entry>string</entry></row>
11331  * <row><entry>%G_FILE_ATTRIBUTE_SELINUX_CONTEXT</entry><entry>selinux::context</entry><entry>string</entry></row>
11332  * </tbody></tgroup></table></para>
11333  * Note that there are no predefined keys in the "xattr" and "xattr-sys"
11334  * namespaces. Keys for the "xattr" namespace are constructed by stripping
11335  * away the "user." prefix from the extended user attribute, and prepending
11336  * "xattr::". Keys for the "xattr-sys" namespace are constructed by
11337  * concatenating "xattr-sys::" with the extended attribute name. All extended
11338  * attribute values are returned as hex-encoded strings in which bytes outside
11339  * the ASCII range are encoded as hexadecimal escape sequences of the form
11340  * \x<replaceable>nn</replaceable>.
11341  */
11342
11343
11344 /**
11345  * SECTION:gfiledescriptorbased
11346  * @short_description: Interface for file descriptor based IO
11347  * @include: gio/gfiledescriptorbased.h
11348  * @see_also: #GInputStream, #GOutputStream
11349  *
11350  * #GFileDescriptorBased is implemented by streams (implementations of
11351  * #GInputStream or #GOutputStream) that are based on file descriptors.
11352  * Note that <filename>&lt;gio/gfiledescriptorbased.h&gt;</filename> belongs to
11353  * the UNIX-specific GIO interfaces, thus you have to use the
11354  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
11355  *
11356  * Since: 2.24
11357  */
11358
11359
11360 /**
11361  * SECTION:gfileenumerator
11362  * @short_description: Enumerated Files Routines
11363  * @include: gio/gio.h
11364  *
11365  * #GFileEnumerator allows you to operate on a set of #GFile<!-- -->s,
11366  * returning a #GFileInfo structure for each file enumerated (e.g.
11367  * g_file_enumerate_children() will return a #GFileEnumerator for each
11368  * of the children within a directory).
11369  * To get the next file's information from a #GFileEnumerator, use
11370  * g_file_enumerator_next_file() or its asynchronous version,
11371  * g_file_enumerator_next_files_async(). Note that the asynchronous
11372  * version will return a list of #GFileInfo<!---->s, whereas the
11373  * synchronous will only return the next file in the enumerator.
11374  * To close a #GFileEnumerator, use g_file_enumerator_close(), or
11375  * its asynchronous version, g_file_enumerator_close_async(). Once
11376  * a #GFileEnumerator is closed, no further actions may be performed
11377  * on it, and it should be freed with g_object_unref().
11378  */
11379
11380
11381 /**
11382  * SECTION:gfileicon
11383  * @short_description: Icons pointing to an image file
11384  * @include: gio/gio.h
11385  * @see_also: #GIcon, #GLoadableIcon
11386  *
11387  * #GFileIcon specifies an icon by pointing to an image file
11388  * to be used as icon.
11389  */
11390
11391
11392 /**
11393  * SECTION:gfileinfo
11394  * @short_description: File Information and Attributes
11395  * @include: gio/gio.h
11396  * @see_also: #GFile, <link linkend="gio-GFileAttribute">GFileAttribute</link>
11397  *
11398  * Functionality for manipulating basic metadata for files. #GFileInfo
11399  * implements methods for getting information that all files should
11400  * contain, and allows for manipulation of extended attributes.
11401  * See <link linkend="gio-GFileAttribute">GFileAttribute</link> for more
11402  * information on how GIO handles file attributes.
11403  * To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its
11404  * async variant). To obtain a #GFileInfo for a file input or output
11405  * stream, use g_file_input_stream_query_info() or
11406  * g_file_output_stream_query_info() (or their async variants).
11407  * To change the actual attributes of a file, you should then set the
11408  * attribute in the #GFileInfo and call g_file_set_attributes_from_info()
11409  * or g_file_set_attributes_async() on a GFile.
11410  * However, not all attributes can be changed in the file. For instance,
11411  * the actual size of a file cannot be changed via g_file_info_set_size().
11412  * You may call g_file_query_settable_attributes() and
11413  * g_file_query_writable_namespaces() to discover the settable attributes
11414  * of a particular file at runtime.
11415  * #GFileAttributeMatcher allows for searching through a #GFileInfo for
11416  * attributes.
11417  */
11418
11419
11420 /**
11421  * SECTION:gfileinputstream
11422  * @short_description: File input streaming operations
11423  * @include: gio/gio.h
11424  * @see_also: #GInputStream, #GDataInputStream, #GSeekable
11425  *
11426  * GFileInputStream provides input streams that take their
11427  * content from a file.
11428  * GFileInputStream implements #GSeekable, which allows the input
11429  * stream to jump to arbitrary positions in the file, provided the
11430  * filesystem of the file allows it. To find the position of a file
11431  * input stream, use g_seekable_tell(). To find out if a file input
11432  * stream supports seeking, use g_seekable_stream_can_seek().
11433  * To position a file input stream, use g_seekable_seek().
11434  */
11435
11436
11437 /**
11438  * SECTION:gfileiostream
11439  * @short_description: File read and write streaming operations
11440  * @include: gio/gio.h
11441  * @see_also: #GIOStream, #GFileInputStream, #GFileOutputStream, #GSeekable
11442  *
11443  * GFileIOStream provides io streams that both read and write to the same
11444  * file handle.
11445  * GFileIOStream implements #GSeekable, which allows the io
11446  * stream to jump to arbitrary positions in the file and to truncate
11447  * the file, provided the filesystem of the file supports these
11448  * operations.
11449  * To find the position of a file io stream, use
11450  * g_seekable_tell().
11451  * To find out if a file io stream supports seeking, use g_seekable_can_seek().
11452  * To position a file io stream, use g_seekable_seek().
11453  * To find out if a file io stream supports truncating, use
11454  * g_seekable_can_truncate(). To truncate a file io
11455  * stream, use g_seekable_truncate().
11456  * The default implementation of all the #GFileIOStream operations
11457  * and the implementation of #GSeekable just call into the same operations
11458  * on the output stream.
11459  *
11460  * Since: 2.22
11461  */
11462
11463
11464 /**
11465  * SECTION:gfilemonitor
11466  * @short_description: File Monitor
11467  * @include: gio/gio.h
11468  *
11469  * Monitors a file or directory for changes.
11470  * To obtain a #GFileMonitor for a file or directory, use
11471  * g_file_monitor(), g_file_monitor_file(), or
11472  * g_file_monitor_directory().
11473  * To get informed about changes to the file or directory you are
11474  * monitoring, connect to the #GFileMonitor::changed signal. The
11475  * signal will be emitted in the <link
11476  * linkend="g-main-context-push-thread-default">thread-default main
11477  * context</link> of the thread that the monitor was created in
11478  * (though if the global default main context is blocked, this may
11479  * cause notifications to be blocked even if the thread-default
11480  * context is still running).
11481  */
11482
11483
11484 /**
11485  * SECTION:gfilenamecompleter
11486  * @short_description: Filename Completer
11487  * @include: gio/gio.h
11488  *
11489  * Completes partial file and directory names given a partial string by
11490  * looking in the file system for clues. Can return a list of possible
11491  * completion strings for widget implementations.
11492  */
11493
11494
11495 /**
11496  * SECTION:gfileoutputstream
11497  * @short_description: File output streaming operations
11498  * @include: gio/gio.h
11499  * @see_also: #GOutputStream, #GDataOutputStream, #GSeekable
11500  *
11501  * GFileOutputStream provides output streams that write their
11502  * content to a file.
11503  * GFileOutputStream implements #GSeekable, which allows the output
11504  * stream to jump to arbitrary positions in the file and to truncate
11505  * the file, provided the filesystem of the file supports these
11506  * operations.
11507  * To find the position of a file output stream, use g_seekable_tell().
11508  * To find out if a file output stream supports seeking, use
11509  * g_seekable_can_seek().To position a file output stream, use
11510  * g_seekable_seek(). To find out if a file output stream supports
11511  * truncating, use g_seekable_can_truncate(). To truncate a file output
11512  * stream, use g_seekable_truncate().
11513  */
11514
11515
11516 /**
11517  * SECTION:gfilterinputstream
11518  * @short_description: Filter Input Stream
11519  * @include: gio/gio.h
11520  *
11521  * Base class for input stream implementations that perform some
11522  * kind of filtering operation on a base stream. Typical examples
11523  * of filtering operations are character set conversion, compression
11524  * and byte order flipping.
11525  */
11526
11527
11528 /**
11529  * SECTION:gfilteroutputstream
11530  * @short_description: Filter Output Stream
11531  * @include: gio/gio.h
11532  *
11533  * Base class for output stream implementations that perform some
11534  * kind of filtering operation on a base stream. Typical examples
11535  * of filtering operations are character set conversion, compression
11536  * and byte order flipping.
11537  */
11538
11539
11540 /**
11541  * SECTION:gicon
11542  * @short_description: Interface for icons
11543  * @include: gio/gio.h
11544  *
11545  * #GIcon is a very minimal interface for icons. It provides functions
11546  * for checking the equality of two icons, hashing of icons and
11547  * serializing an icon to and from strings.
11548  * #GIcon does not provide the actual pixmap for the icon as this is out
11549  * of GIO's scope, however implementations of #GIcon may contain the name
11550  * of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon).
11551  * To obtain a hash of a #GIcon, see g_icon_hash().
11552  * To check if two #GIcons are equal, see g_icon_equal().
11553  * For serializing a #GIcon, use g_icon_to_string() and
11554  * g_icon_new_for_string().
11555  * If your application or library provides one or more #GIcon
11556  * implementations you need to ensure that each #GType is registered
11557  * with the type system prior to calling g_icon_new_for_string().
11558  */
11559
11560
11561 /**
11562  * SECTION:ginetaddress
11563  * @short_description: An IPv4/IPv6 address
11564  *
11565  * #GInetAddress represents an IPv4 or IPv6 internet address. Use
11566  * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_async() to
11567  * look up the #GInetAddress for a hostname. Use
11568  * g_resolver_lookup_by_address() or
11569  * g_resolver_lookup_by_address_async() to look up the hostname for a
11570  * #GInetAddress.
11571  * To actually connect to a remote host, you will need a
11572  * #GInetSocketAddress (which includes a #GInetAddress as well as a
11573  * port number).
11574  */
11575
11576
11577 /**
11578  * SECTION:ginetsocketaddress
11579  * @short_description: Internet GSocketAddress
11580  *
11581  * An IPv4 or IPv6 socket address; that is, the combination of a
11582  * #GInetAddress and a port number.
11583  */
11584
11585
11586 /**
11587  * SECTION:ginitable
11588  * @short_description: Failable object initialization interface
11589  * @include: gio/gio.h
11590  * @see_also: #GAsyncInitable
11591  *
11592  * #GInitable is implemented by objects that can fail during
11593  * initialization. If an object implements this interface the
11594  * g_initable_init() function must be called as the first thing
11595  * after construction. If g_initable_init() is not called, or if
11596  * it returns an error, all further operations on the object
11597  * should fail, generally with a %G_IO_ERROR_NOT_INITIALIZED error.
11598  * Users of objects implementing this are not intended to use
11599  * the interface method directly, instead it will be used automatically
11600  * in various ways. For C applications you generally just call
11601  * g_initable_new() directly, or indirectly via a foo_thing_new() wrapper.
11602  * This will call g_initable_init() under the cover, returning %NULL and
11603  * setting a #GError on failure (at which point the instance is
11604  * unreferenced).
11605  * For bindings in languages where the native constructor supports
11606  * exceptions the binding could check for objects implemention %GInitable
11607  * during normal construction and automatically initialize them, throwing
11608  * an exception on failure.
11609  */
11610
11611
11612 /**
11613  * SECTION:ginputstream
11614  * @short_description: Base class for implementing streaming input
11615  * @include: gio/gio.h
11616  *
11617  * GInputStream has functions to read from a stream (g_input_stream_read()),
11618  * to close a stream (g_input_stream_close()) and to skip some content
11619  * (g_input_stream_skip()).
11620  * To copy the content of an input stream to an output stream without
11621  * manually handling the reads and writes, use g_output_stream_splice().
11622  * All of these functions have async variants too.
11623  */
11624
11625
11626 /**
11627  * SECTION:gioerror
11628  * @short_description: Error helper functions
11629  * @include: gio/gio.h
11630  *
11631  * Contains helper functions for reporting errors to the user.
11632  */
11633
11634
11635 /**
11636  * SECTION:giomodule
11637  * @short_description: Loadable GIO Modules
11638  * @include: gio/gio.h
11639  *
11640  * Provides an interface and default functions for loading and unloading
11641  * modules. This is used internally to make GIO extensible, but can also
11642  * be used by others to implement module loading.
11643  */
11644
11645
11646 /**
11647  * SECTION:gioscheduler
11648  * @short_description: I/O Scheduler
11649  * @include: gio/gio.h
11650  *
11651  * Schedules asynchronous I/O operations. #GIOScheduler integrates
11652  * into the main event loop (#GMainLoop) and may use threads if they
11653  * are available.
11654  * <para id="io-priority"><indexterm><primary>I/O priority</primary></indexterm>
11655  * Each I/O operation has a priority, and the scheduler uses the priorities
11656  * to determine the order in which operations are executed. They are
11657  * <emphasis>not</emphasis> used to determine system-wide I/O scheduling.
11658  * Priorities are integers, with lower numbers indicating higher priority.
11659  * It is recommended to choose priorities between %G_PRIORITY_LOW and
11660  * %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT as a default.
11661  * </para>
11662  */
11663
11664
11665 /**
11666  * SECTION:giostream
11667  * @short_description: Base class for implementing read/write streams
11668  * @include: gio/gio.h
11669  * @see_also: #GInputStream, #GOutputStream
11670  *
11671  * GIOStream represents an object that has both read and write streams.
11672  * Generally the two streams acts as separate input and output streams,
11673  * but they share some common resources and state. For instance, for
11674  * seekable streams they may use the same position in both streams.
11675  * Examples of #GIOStream objects are #GSocketConnection which represents
11676  * a two-way network connection, and #GFileIOStream which represent a
11677  * file handle opened in read-write mode.
11678  * To do the actual reading and writing you need to get the substreams
11679  * with g_io_stream_get_input_stream() and g_io_stream_get_output_stream().
11680  * The #GIOStream object owns the input and the output streams, not the other
11681  * way around, so keeping the substreams alive will not keep the #GIOStream
11682  * object alive. If the #GIOStream object is freed it will be closed, thus
11683  * closing the substream, so even if the substreams stay alive they will
11684  * always just return a %G_IO_ERROR_CLOSED for all operations.
11685  * To close a stream use g_io_stream_close() which will close the common
11686  * stream object and also the individual substreams. You can also close
11687  * the substreams themselves. In most cases this only marks the
11688  * substream as closed, so further I/O on it fails. However, some streams
11689  * may support "half-closed" states where one direction of the stream
11690  * is actually shut down.
11691  *
11692  * Since: 2.22
11693  */
11694
11695
11696 /**
11697  * SECTION:gloadableicon
11698  * @short_description: Loadable Icons
11699  * @include: gio/gio.h
11700  * @see_also: #GIcon, #GThemedIcon
11701  *
11702  * Extends the #GIcon interface and adds the ability to
11703  * load icons from streams.
11704  */
11705
11706
11707 /**
11708  * SECTION:gmemoryinputstream
11709  * @short_description: Streaming input operations on memory chunks
11710  * @include: gio/gio.h
11711  * @see_also: #GMemoryOutputStream
11712  *
11713  * #GMemoryInputStream is a class for using arbitrary
11714  * memory chunks as input for GIO streaming input operations.
11715  */
11716
11717
11718 /**
11719  * SECTION:gmemoryoutputstream
11720  * @short_description: Streaming output operations on memory chunks
11721  * @include: gio/gio.h
11722  * @see_also: #GMemoryInputStream
11723  *
11724  * #GMemoryOutputStream is a class for using arbitrary
11725  * memory chunks as output for GIO streaming output operations.
11726  */
11727
11728
11729 /**
11730  * SECTION:gmount
11731  * @short_description: Mount management
11732  * @include: gio/gio.h
11733  * @see_also: GVolume, GUnixMount
11734  *
11735  * The #GMount interface represents user-visible mounts. Note, when
11736  * porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.
11737  * #GMount is a "mounted" filesystem that you can access. Mounted is in
11738  * quotes because it's not the same as a unix mount, it might be a gvfs
11739  * mount, but you can still access the files on it if you use GIO. Might or
11740  * might not be related to a volume object.
11741  * Unmounting a #GMount instance is an asynchronous operation. For
11742  * more information about asynchronous operations, see #GAsyncReady
11743  * and #GSimpleAsyncReady. To unmount a #GMount instance, first call
11744  * g_mount_unmount_with_operation() with (at least) the #GMount instance and a
11745  * #GAsyncReadyCallback.  The callback will be fired when the
11746  * operation has resolved (either with success or failure), and a
11747  * #GAsyncReady structure will be passed to the callback.  That
11748  * callback should then call g_mount_unmount_with_operation_finish() with the #GMount
11749  * and the #GAsyncReady data to see if the operation was completed
11750  * successfully.  If an @error is present when g_mount_unmount_with_operation_finish()
11751  * is called, then it will be filled with any error information.
11752  */
11753
11754
11755 /**
11756  * SECTION:gmountoperation
11757  * @short_description: Object used for authentication and user interaction
11758  * @include: gio/gio.h
11759  *
11760  * #GMountOperation provides a mechanism for interacting with the user.
11761  * It can be used for authenticating mountable operations, such as loop
11762  * mounting files, hard drive partitions or server locations. It can
11763  * also be used to ask the user questions or show a list of applications
11764  * preventing unmount or eject operations from completing.
11765  * Note that #GMountOperation is used for more than just #GMount
11766  * objects â€“ for example it is also used in g_drive_start() and
11767  * g_drive_stop().
11768  * Users should instantiate a subclass of this that implements all the
11769  * various callbacks to show the required dialogs, such as
11770  * #GtkMountOperation. If no user interaction is desired (for example
11771  * when automounting filesystems at login time), usually %NULL can be
11772  * passed, see each method taking a #GMountOperation for details.
11773  */
11774
11775
11776 /**
11777  * SECTION:gnetworkaddress
11778  * @short_description: A GSocketConnectable for resolving hostnames
11779  * @include: gio/gio.h
11780  *
11781  * #GNetworkAddress provides an easy way to resolve a hostname and
11782  * then attempt to connect to that host, handling the possibility of
11783  * multiple IP addresses and multiple address families.
11784  * See #GSocketConnectable for and example of using the connectable
11785  * interface.
11786  */
11787
11788
11789 /**
11790  * SECTION:gnetworkservice
11791  * @short_description: A GSocketConnectable for resolving SRV records
11792  * @include: gio/gio.h
11793  *
11794  * Like #GNetworkAddress does with hostnames, #GNetworkService
11795  * provides an easy way to resolve a SRV record, and then attempt to
11796  * connect to one of the hosts that implements that service, handling
11797  * service priority/weighting, multiple IP addresses, and multiple
11798  * address families.
11799  * See #GSrvTarget for more information about SRV records, and see
11800  * #GSocketConnectable for and example of using the connectable
11801  * interface.
11802  */
11803
11804
11805 /**
11806  * SECTION:goutputstream
11807  * @short_description: Base class for implementing streaming output
11808  * @include: gio/gio.h
11809  *
11810  * GOutputStream has functions to write to a stream (g_output_stream_write()),
11811  * to close a stream (g_output_stream_close()) and to flush pending writes
11812  * (g_output_stream_flush()).
11813  * To copy the content of an input stream to an output stream without
11814  * manually handling the reads and writes, use g_output_stream_splice().
11815  * All of these functions have async variants too.
11816  */
11817
11818
11819 /**
11820  * SECTION:gpermission
11821  * @title: GPermission
11822  * @short_description: An object representing the permission to perform a certain action
11823  *
11824  * A #GPermission represents the status of the caller's permission to
11825  * perform a certain action.
11826  * You can query if the action is currently allowed and if it is
11827  * possible to acquire the permission so that the action will be allowed
11828  * in the future.
11829  * There is also an API to actually acquire the permission and one to
11830  * release it.
11831  * As an example, a #GPermission might represent the ability for the
11832  * user to write to a #GSettings object.  This #GPermission object could
11833  * then be used to decide if it is appropriate to show a "Click here to
11834  * unlock" button in a dialog and to provide the mechanism to invoke
11835  * when that button is clicked.
11836  */
11837
11838
11839 /**
11840  * SECTION:gpollableinputstream
11841  * @short_description: Interface for pollable input streams
11842  * @include: gio/gio.h
11843  * @see_also: #GInputStream, #GPollableOutputStream, #GFileDescriptorBased
11844  *
11845  * #GPollableInputStream is implemented by #GInputStream<!-- -->s that
11846  * can be polled for readiness to read. This can be used when
11847  * interfacing with a non-GIO API that expects
11848  * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
11849  *
11850  * Since: 2.28
11851  */
11852
11853
11854 /**
11855  * SECTION:gpollableoutputstream
11856  * @short_description: Interface for pollable output streams
11857  * @include: gio/gio.h
11858  * @see_also: #GOutputStream, #GFileDescriptorBased, #GPollableInputStream
11859  *
11860  * #GPollableOutputStream is implemented by #GOutputStream<!-- -->s that
11861  * can be polled for readiness to write. This can be used when
11862  * interfacing with a non-GIO API that expects
11863  * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
11864  *
11865  * Since: 2.28
11866  */
11867
11868
11869 /**
11870  * SECTION:gproxy
11871  * @short_description: Interface for proxy handling
11872  *
11873  * A #GProxy handles connecting to a remote host via a given type of
11874  * proxy server. It is implemented by the 'gio-proxy' extension point.
11875  * The extensions are named after their proxy protocol name. As an
11876  * example, a SOCKS5 proxy implementation can be retrieved with the
11877  * name 'socks5' using the function
11878  * g_io_extension_point_get_extension_by_name().
11879  *
11880  * Since: 2.26
11881  */
11882
11883
11884 /**
11885  * SECTION:gproxyaddress
11886  * @short_description: An internet address with proxy information
11887  *
11888  * Support for proxied #GInetSocketAddress.
11889  */
11890
11891
11892 /**
11893  * SECTION:gproxyresolver
11894  * @short_description: Asynchronous and cancellable network proxy resolver
11895  * @include: gio/gio.h
11896  *
11897  * #GProxyResolver provides synchronous and asynchronous network proxy
11898  * resolution. #GProxyResolver is used within #GClientSocket through
11899  * the method g_socket_connectable_proxy_enumerate().
11900  */
11901
11902
11903 /**
11904  * SECTION:gresolver
11905  * @short_description: Asynchronous and cancellable DNS resolver
11906  * @include: gio/gio.h
11907  *
11908  * #GResolver provides cancellable synchronous and asynchronous DNS
11909  * resolution, for hostnames (g_resolver_lookup_by_address(),
11910  * g_resolver_lookup_by_name() and their async variants) and SRV
11911  * (service) records (g_resolver_lookup_service()).
11912  * #GNetworkAddress and #GNetworkService provide wrappers around
11913  * #GResolver functionality that also implement #GSocketConnectable,
11914  * making it easy to connect to a remote host/service.
11915  */
11916
11917
11918 /**
11919  * SECTION:gseekable
11920  * @short_description: Stream seeking interface
11921  * @include: gio/gio.h
11922  * @see_also: #GInputStream, #GOutputStream
11923  *
11924  * #GSeekable is implemented by streams (implementations of
11925  * #GInputStream or #GOutputStream) that support seeking.
11926  */
11927
11928
11929 /**
11930  * SECTION:gsettings
11931  * @short_description: High-level API for application settings
11932  *
11933  * The #GSettings class provides a convenient API for storing and retrieving
11934  * application settings.
11935  * Reads and writes can be considered to be non-blocking.  Reading
11936  * approximately the same order of magnitude (but slower than) a
11937  * #GHashTable lookup.  Writing settings is also extremely fast in terms
11938  * of time to return to your application, but can be extremely expensive
11939  * for other threads and other processes.  Many settings backends
11940  * (including dconf) have lazy initialisation which means in the common
11941  * case of the user using their computer without modifying any settings
11942  * a lot of work can be avoided.  For dconf, the D-Bus service doesn't
11943  * even need to be started in this case.  For this reason, you should
11944  * only ever modify #GSettings keys in response to explicit user action.
11945  * Particular care should be paid to ensure that modifications are not
11946  * made during startup -- for example, when settings the initial value
11947  * of preferences widgets.  The built-in g_settings_bind() functionality
11948  * is careful not to write settings in response to notify signals as a
11949  * result of modifications that it makes to widgets.
11950  * When creating a GSettings instance, you have to specify a schema
11951  * that describes the keys in your settings and their types and default
11952  * values, as well as some other information.
11953  * Normally, a schema has as fixed path that determines where the settings
11954  * are stored in the conceptual global tree of settings. However, schemas
11955  * can also be 'relocatable', i.e. not equipped with a fixed path. This is
11956  * useful e.g. when the schema describes an 'account', and you want to be
11957  * able to store a arbitrary number of accounts.
11958  * Unlike other configuration systems (like GConf), GSettings does not
11959  * restrict keys to basic types like strings and numbers. GSettings stores
11960  * values as #GVariant, and allows any #GVariantType for keys. Key names
11961  * are restricted to lowercase characters, numbers and '-'. Furthermore,
11962  * the names must begin with a lowercase character, must not end
11963  * with a '-', and must not contain consecutive dashes. Key names can
11964  * be up to 32 characters long.
11965  * Similar to GConf, the default values in GSettings schemas can be
11966  * localized, but the localized values are stored in gettext catalogs
11967  * and looked up with the domain that is specified in the
11968  * <tag class="attribute">gettext-domain</tag> attribute of the
11969  * <tag class="starttag">schemalist</tag> or <tag class="starttag">schema</tag>
11970  * elements and the category that is specified in the l10n attribute of the
11971  * <tag class="starttag">key</tag> element.
11972  * GSettings uses schemas in a compact binary form that is created
11973  * by the <link linkend="glib-compile-schemas">glib-compile-schemas</link>
11974  * utility. The input is a schema description in an XML format that can be
11975  * described by the following DTD:
11976  * |[<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>]|
11977  * glib-compile-schemas expects schema files to have the extension <filename>.gschema.xml</filename>
11978  * At runtime, schemas are identified by their id (as specified
11979  * in the <tag class="attribute">id</tag> attribute of the
11980  * <tag class="starttag">schema</tag> element). The
11981  * convention for schema ids is to use a dotted name, similar in
11982  * style to a D-Bus bus name, e.g. "org.gnome.SessionManager". In particular,
11983  * if the settings are for a specific service that owns a D-Bus bus name,
11984  * the D-Bus bus name and schema id should match. For schemas which deal
11985  * with settings not associated with one named application, the id should
11986  * not use StudlyCaps, e.g. "org.gnome.font-rendering".
11987  * In addition to #GVariant types, keys can have types that have enumerated
11988  * types. These can be described by a <tag class="starttag">choice</tag>,
11989  * <tag class="starttag">enum</tag> or <tag class="starttag">flags</tag> element, see
11990  * <xref linkend="schema-enumerated"/>. The underlying type of
11991  * such a key is string, but you can use g_settings_get_enum(),
11992  * g_settings_set_enum(), g_settings_get_flags(), g_settings_set_flags()
11993  * access the numeric values corresponding to the string value of enum
11994  * and flags keys.
11995  * <example id="schema-default-values"><title>Default values</title>
11996  * <programlisting><![CDATA[
11997  * <schemalist>
11998  * <schema id="org.gtk.Test" path="/tests/" gettext-domain="test">
11999  * <key name="greeting" type="s">
12000  * <default l10n="messages">"Hello, earthlings"</default>
12001  * <summary>A greeting</summary>
12002  * <description>
12003  * Greeting of the invading martians
12004  * </description>
12005  * </key>
12006  * <key name="box" type="(ii)">
12007  * <default>(20,30)</default>
12008  * </key>
12009  * </schema>
12010  * </schemalist>
12011  * ]]></programlisting></example>
12012  * <example id="schema-enumerated"><title>Ranges, choices and enumerated types</title>
12013  * <programlisting><![CDATA[
12014  * <schemalist>
12015  * <enum id="myenum">
12016  * <value nick="first" value="1"/>
12017  * <value nick="second" value="2"/>
12018  * </enum>
12019  * <enum id="myflags">
12020  * <value nick="flag1" value="1"/>
12021  * <value nick="flag2" value="2"/>
12022  * <value nick="flag3" value="4"/>
12023  * </enum>
12024  * <schema id="org.gtk.Test">
12025  * <key name="key-with-range" type="i">
12026  * <range min="1" max="100"/>
12027  * <default>10</default>
12028  * </key>
12029  * <key name="key-with-choices" type="s">
12030  * <choices>
12031  * <choice value='Elisabeth'/>
12032  * <choice value='Annabeth'/>
12033  * <choice value='Joe'/>
12034  * </choices>
12035  * <aliases>
12036  * <alias value='Anna' target='Annabeth'/>
12037  * <alias value='Beth' target='Elisabeth'/>
12038  * </aliases>
12039  * <default>'Joe'</default>
12040  * </key>
12041  * <key name='enumerated-key' enum='myenum'>
12042  * <default>'first'</default>
12043  * </key>
12044  * <key name='flags-key' flags='myflags'>
12045  * <default>["flag1",flag2"]</default>
12046  * </key>
12047  * </schema>
12048  * </schemalist>
12049  * ]]></programlisting></example>
12050  * <refsect2>
12051  * <title>Vendor overrides</title>
12052  * <para>
12053  * Default values are defined in the schemas that get installed by
12054  * an application. Sometimes, it is necessary for a vendor or distributor
12055  * to adjust these defaults. Since patching the XML source for the schema
12056  * is inconvenient and error-prone,
12057  * <link linkend="glib-compile-schemas">glib-compile-schemas</link> reads
12058  * so-called 'vendor override' files. These are keyfiles in the same
12059  * directory as the XML schema sources which can override default values.
12060  * The schema id serves as the group name in the key file, and the values
12061  * are expected in serialized GVariant form, as in the following example:
12062  * <informalexample><programlisting>
12063  * [org.gtk.Example]
12064  * key1='string'
12065  * key2=1.5
12066  * </programlisting></informalexample>
12067  * </para>
12068  * <para>
12069  * glib-compile-schemas expects schema files to have the extension
12070  * <filename>.gschema.override</filename>
12071  * </para>
12072  * </refsect2>
12073  * <refsect2>
12074  * <title>Binding</title>
12075  * <para>
12076  * A very convenient feature of GSettings lets you bind #GObject properties
12077  * directly to settings, using g_settings_bind(). Once a GObject property
12078  * has been bound to a setting, changes on either side are automatically
12079  * propagated to the other side. GSettings handles details like
12080  * mapping between GObject and GVariant types, and preventing infinite
12081  * cycles.
12082  * </para>
12083  * <para>
12084  * This makes it very easy to hook up a preferences dialog to the
12085  * underlying settings. To make this even more convenient, GSettings
12086  * looks for a boolean property with the name "sensitivity" and
12087  * automatically binds it to the writability of the bound setting.
12088  * If this 'magic' gets in the way, it can be suppressed with the
12089  * #G_SETTINGS_BIND_NO_SENSITIVITY flag.
12090  * </para>
12091  * </refsect2>
12092  *
12093  * Settings with #gsettings is typically extremely fast: on
12094  */
12095
12096
12097 /**
12098  * SECTION:gsettingsbackend
12099  * @title: GSettingsBackend
12100  * @short_description: Interface for settings backend implementations
12101  * @include: gio/gsettingsbackend.h
12102  * @see_also: #GSettings, #GIOExtensionPoint
12103  *
12104  * The #GSettingsBackend interface defines a generic interface for
12105  * non-strictly-typed data that is stored in a hierarchy. To implement
12106  * an alternative storage backend for #GSettings, you need to implement
12107  * the #GSettingsBackend interface and then make it implement the
12108  * extension point #G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.
12109  * The interface defines methods for reading and writing values, a
12110  * method for determining if writing of certain values will fail
12111  * (lockdown) and a change notification mechanism.
12112  * The semantics of the interface are very precisely defined and
12113  * implementations must carefully adhere to the expectations of
12114  * callers that are documented on each of the interface methods.
12115  * Some of the GSettingsBackend functions accept or return a #GTree.
12116  * These trees always have strings as keys and #GVariant as values.
12117  * g_settings_backend_create_tree() is a convenience function to create
12118  * suitable trees.
12119  * <note><para>
12120  * The #GSettingsBackend API is exported to allow third-party
12121  * implementations, but does not carry the same stability guarantees
12122  * as the public GIO API. For this reason, you have to define the
12123  * C preprocessor symbol #G_SETTINGS_ENABLE_BACKEND before including
12124  * <filename>gio/gsettingsbackend.h</filename>
12125  * </para></note>
12126  */
12127
12128
12129 /**
12130  * SECTION:gsimpleaction
12131  * @title: GSimpleAction
12132  * @short_description: A simple GSimpleAction
12133  *
12134  * A #GSimpleAction is the obvious simple implementation of the #GSimpleAction
12135  * interface.  This is the easiest way to create an action for purposes of
12136  * adding it to a #GSimpleActionGroup.
12137  * See also #GtkAction.
12138  */
12139
12140
12141 /**
12142  * SECTION:gsimpleactiongroup
12143  * @title: GSimpleActionGroup
12144  * @short_description: A simple GActionGroup implementation
12145  *
12146  * #GSimpleActionGroup is a hash table filled with #GAction objects,
12147  * implementing the #GActionGroup interface.
12148  */
12149
12150
12151 /**
12152  * SECTION:gsimpleasyncresult
12153  * @short_description: Simple asynchronous results implementation
12154  * @include: gio/gio.h
12155  * @see_also: #GAsyncResult
12156  *
12157  * Implements #GAsyncResult for simple cases. Most of the time, this
12158  * will be all an application needs, and will be used transparently.
12159  * Because of this, #GSimpleAsyncResult is used throughout GIO for
12160  * handling asynchronous functions.
12161  * GSimpleAsyncResult handles #GAsyncReadyCallback<!-- -->s, error
12162  * reporting, operation cancellation and the final state of an operation,
12163  * completely transparent to the application. Results can be returned
12164  * as a pointer e.g. for functions that return data that is collected
12165  * asynchronously, a boolean value for checking the success or failure
12166  * of an operation, or a #gssize for operations which return the number
12167  * of bytes modified by the operation; all of the simple return cases
12168  * are covered.
12169  * Most of the time, an application will not need to know of the details
12170  * of this API; it is handled transparently, and any necessary operations
12171  * are handled by #GAsyncResult's interface. However, if implementing a
12172  * new GIO module, for writing language bindings, or for complex
12173  * applications that need better control of how asynchronous operations
12174  * are completed, it is important to understand this functionality.
12175  * GSimpleAsyncResults are tagged with the calling function to ensure
12176  * that asynchronous functions and their finishing functions are used
12177  * together correctly.
12178  * To create a new #GSimpleAsyncResult, call g_simple_async_result_new().
12179  * If the result needs to be created for a #GError, use
12180  * g_simple_async_result_new_from_error() or
12181  * g_simple_async_result_new_take_error(). If a #GError is not available
12182  * (e.g. the asynchronous operation's doesn't take a #GError argument),
12183  * but the result still needs to be created for an error condition, use
12184  * g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
12185  * if your application or binding requires passing a variable argument list
12186  * directly), and the error can then be propagated through the use of
12187  * g_simple_async_result_propagate_error().
12188  * An asynchronous operation can be made to ignore a cancellation event by
12189  * calling g_simple_async_result_set_handle_cancellation() with a
12190  * #GSimpleAsyncResult for the operation and %FALSE. This is useful for
12191  * operations that are dangerous to cancel, such as close (which would
12192  * cause a leak if cancelled before being run).
12193  * GSimpleAsyncResult can integrate into GLib's event loop, #GMainLoop,
12194  * or it can use #GThread<!-- -->s if available.
12195  * g_simple_async_result_complete() will finish an I/O task directly
12196  * from the point where it is called. g_simple_async_result_complete_in_idle()
12197  * will finish it from an idle handler in the <link
12198  * linkend="g-main-context-push-thread-default">thread-default main
12199  * context</link>. g_simple_async_result_run_in_thread() will run the
12200  * job in a separate thread and then deliver the result to the
12201  * thread-default main context.
12202  * To set the results of an asynchronous function,
12203  * g_simple_async_result_set_op_res_gpointer(),
12204  * g_simple_async_result_set_op_res_gboolean(), and
12205  * g_simple_async_result_set_op_res_gssize()
12206  * are provided, setting the operation's result to a gpointer, gboolean, or
12207  * gssize, respectively.
12208  * Likewise, to get the result of an asynchronous function,
12209  * g_simple_async_result_get_op_res_gpointer(),
12210  * g_simple_async_result_get_op_res_gboolean(), and
12211  * g_simple_async_result_get_op_res_gssize() are
12212  * provided, getting the operation's result as a gpointer, gboolean, and
12213  * gssize, respectively.
12214  * For the details of the requirements implementations must respect, see
12215  * #GAsyncResult.  A typical implementation of an asynchronous operation
12216  * using GSimpleAsyncResult looks something like this:
12217  * |[
12218  * static void
12219  * baked_cb (Cake    *cake,
12220  * gpointer user_data)
12221  * {
12222  * /&ast; In this example, this callback is not given a reference to the cake, so
12223  * &ast; the GSimpleAsyncResult has to take a reference to it.
12224  * &ast;/
12225  * GSimpleAsyncResult *result = user_data;
12226  * if (cake == NULL)
12227  * g_simple_async_result_set_error (result,
12228  * BAKER_ERRORS,
12229  * BAKER_ERROR_NO_FLOUR,
12230  * "Go to the supermarket");
12231  * else
12232  * g_simple_async_result_set_op_res_gpointer (result,
12233  * g_object_ref (cake),
12234  * g_object_unref);
12235  * /&ast; In this example, we assume that baked_cb is called as a callback from
12236  * &ast; the mainloop, so it's safe to complete the operation synchronously here.
12237  * &ast; If, however, _baker_prepare_cake () might call its callback without
12238  * &ast; first returning to the mainloop â€” inadvisable, but some APIs do so â€”
12239  * &ast; we would need to use g_simple_async_result_complete_in_idle().
12240  * &ast;/
12241  * g_simple_async_result_complete (result);
12242  * g_object_unref (result);
12243  * }
12244  * void
12245  * baker_bake_cake_async (Baker              *self,
12246  * guint               radius,
12247  * GAsyncReadyCallback callback,
12248  * gpointer            user_data)
12249  * {
12250  * GSimpleAsyncResult *simple;
12251  * Cake               *cake;
12252  * if (radius < 3)
12253  * {
12254  * g_simple_async_report_error_in_idle (G_OBJECT (self),
12255  * callback,
12256  * user_data,
12257  * BAKER_ERRORS,
12258  * BAKER_ERROR_TOO_SMALL,
12259  * "%ucm radius cakes are silly",
12260  * radius);
12261  * return;
12262  * }
12263  * simple = g_simple_async_result_new (G_OBJECT (self),
12264  * callback,
12265  * user_data,
12266  * baker_bake_cake_async);
12267  * cake = _baker_get_cached_cake (self, radius);
12268  * if (cake != NULL)
12269  * {
12270  * g_simple_async_result_set_op_res_gpointer (simple,
12271  * g_object_ref (cake),
12272  * g_object_unref);
12273  * g_simple_async_result_complete_in_idle (simple);
12274  * g_object_unref (simple);
12275  * /&ast; Drop the reference returned by _baker_get_cached_cake(); the
12276  * &ast; GSimpleAsyncResult has taken its own reference.
12277  * &ast;/
12278  * g_object_unref (cake);
12279  * return;
12280  * }
12281  * _baker_prepare_cake (self, radius, baked_cb, simple);
12282  * }
12283  * Cake *
12284  * baker_bake_cake_finish (Baker        *self,
12285  * GAsyncResult *result,
12286  * GError      **error)
12287  * {
12288  * GSimpleAsyncResult *simple;
12289  * Cake               *cake;
12290  * g_return_val_if_fail (g_simple_async_result_is_valid (result,
12291  * G_OBJECT (self),
12292  * baker_bake_cake_async),
12293  * NULL);
12294  * simple = (GSimpleAsyncResult *) result;
12295  * if (g_simple_async_result_propagate_error (simple, error))
12296  * return NULL;
12297  * cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple));
12298  * return g_object_ref (cake);
12299  * }
12300  * ]|
12301  */
12302
12303
12304 /**
12305  * SECTION:gsimplepermission
12306  * @title: GSimplePermission
12307  * @short_description: A GPermission that doesn't change value
12308  *
12309  * #GSimplePermission is a trivial implementation of #GPermission that
12310  * represents a permission that is either always or never allowed.  The
12311  * value is given at constuction and doesn't change.
12312  * Calling request or release will result in errors.
12313  */
12314
12315
12316 /**
12317  * SECTION:gsocket
12318  * @short_description: Low-level socket object
12319  * @include: gio/gio.h
12320  * @see_also: #GInitable
12321  *
12322  * A #GSocket is a low-level networking primitive. It is a more or less
12323  * direct mapping of the BSD socket API in a portable GObject based API.
12324  * It supports both the UNIX socket implementations and winsock2 on Windows.
12325  * #GSocket is the platform independent base upon which the higher level
12326  * network primitives are based. Applications are not typically meant to
12327  * use it directly, but rather through classes like #GSocketClient,
12328  * #GSocketService and #GSocketConnection. However there may be cases where
12329  * direct use of #GSocket is useful.
12330  * #GSocket implements the #GInitable interface, so if it is manually constructed
12331  * by e.g. g_object_new() you must call g_initable_init() and check the
12332  * results before using the object. This is done automatically in
12333  * g_socket_new() and g_socket_new_from_fd(), so these functions can return
12334  * %NULL.
12335  * Sockets operate in two general modes, blocking or non-blocking. When
12336  * in blocking mode all operations block until the requested operation
12337  * is finished or there is an error. In non-blocking mode all calls that
12338  * would block return immediately with a %G_IO_ERROR_WOULD_BLOCK error.
12339  * To know when a call would successfully run you can call g_socket_condition_check(),
12340  * or g_socket_condition_wait(). You can also use g_socket_create_source() and
12341  * attach it to a #GMainContext to get callbacks when I/O is possible.
12342  * Note that all sockets are always set to non blocking mode in the system, and
12343  * blocking mode is emulated in GSocket.
12344  * When working in non-blocking mode applications should always be able to
12345  * handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other
12346  * function said that I/O was possible. This can easily happen in case
12347  * of a race condition in the application, but it can also happen for other
12348  * reasons. For instance, on Windows a socket is always seen as writable
12349  * until a write returns %G_IO_ERROR_WOULD_BLOCK.
12350  * #GSocket<!-- -->s can be either connection oriented or datagram based.
12351  * For connection oriented types you must first establish a connection by
12352  * either connecting to an address or accepting a connection from another
12353  * address. For connectionless socket types the target/source address is
12354  * specified or received in each I/O operation.
12355  * All socket file descriptors are set to be close-on-exec.
12356  * Note that creating a #GSocket causes the signal %SIGPIPE to be
12357  * ignored for the remainder of the program. If you are writing a
12358  * command-line utility that uses #GSocket, you may need to take into
12359  * account the fact that your program will not automatically be killed
12360  * if it tries to write to %stdout after it has been closed.
12361  *
12362  * Since: 2.22
12363  */
12364
12365
12366 /**
12367  * SECTION:gsocketaddress
12368  * @short_description: Abstract base class representing endpoints for socket communication
12369  *
12370  * #GSocketAddress is the equivalent of <type>struct sockaddr</type>
12371  * in the BSD sockets API. This is an abstract class; use
12372  * #GInetSocketAddress for internet sockets, or #GUnixSocketAddress
12373  * for UNIX domain sockets.
12374  */
12375
12376
12377 /**
12378  * SECTION:gsocketclient
12379  * @short_description: Helper for connecting to a network service
12380  * @include: gio/gio.h
12381  * @see_also: #GSocketConnection, #GSocketListener
12382  *
12383  * #GSocketClient is a high-level utility class for connecting to a
12384  * network host using a connection oriented socket type.
12385  * You create a #GSocketClient object, set any options you want, then
12386  * call a sync or async connect operation, which returns a #GSocketConnection
12387  * subclass on success.
12388  * The type of the #GSocketConnection object returned depends on the type of
12389  * the underlying socket that is in use. For instance, for a TCP/IP connection
12390  * it will be a #GTcpConnection.
12391  *
12392  * Since: 2.22
12393  */
12394
12395
12396 /**
12397  * SECTION:gsocketconnectable
12398  * @short_description: Interface for potential socket endpoints
12399  *
12400  * Objects that describe one or more potential socket endpoints
12401  * implement #GSocketConnectable. Callers can then use
12402  * g_socket_connectable_enumerate() to get a #GSocketAddressEnumerator
12403  * to try out each socket address in turn until one succeeds, as shown
12404  * in the sample code below.
12405  * |[
12406  * MyConnectionType *
12407  * connect_to_host (const char    *hostname,
12408  * guint16        port,
12409  * GCancellable  *cancellable,
12410  * GError       **error)
12411  * {
12412  * MyConnection *conn = NULL;
12413  * GSocketConnectable *addr;
12414  * GSocketAddressEnumerator *enumerator;
12415  * GSocketAddress *sockaddr;
12416  * GError *conn_error = NULL;
12417  * addr = g_network_address_new ("www.gnome.org", 80);
12418  * enumerator = g_socket_connectable_enumerate (addr);
12419  * g_object_unref (addr);
12420  * /<!-- -->* Try each sockaddr until we succeed. Record the first
12421  * * connection error, but not any further ones (since they'll probably
12422  * * be basically the same as the first).
12423  * *<!-- -->/
12424  * while (!conn && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
12425  * {
12426  * g_object_unref (sockaddr);
12427  * }
12428  * g_object_unref (enumerator);
12429  * if (conn)
12430  * {
12431  * if (conn_error)
12432  * {
12433  * /<!-- -->* We couldn't connect to the first address, but we succeeded
12434  * * in connecting to a later address.
12435  * *<!-- -->/
12436  * g_error_free (conn_error);
12437  * }
12438  * return conn;
12439  * }
12440  * else if (error)
12441  * {
12442  * /<!-- -->* Either the initial lookup failed, or else the caller
12443  * * cancelled us.
12444  * *<!-- -->/
12445  * if (conn_error)
12446  * g_error_free (conn_error);
12447  * return NULL;
12448  * }
12449  * else
12450  * {
12451  * g_error_propagate (error, conn_error);
12452  * return NULL;
12453  * }
12454  * }
12455  * ]|
12456  *
12457  * Conn = connect_to_sockaddr (sockaddr, conn_error ? null : &conn_error);
12458  */
12459
12460
12461 /**
12462  * SECTION:gsocketconnection
12463  * @short_description: A socket connection
12464  * @include: gio/gio.h
12465  * @see_also: #GIOStream, #GSocketClient, #GSocketListener
12466  *
12467  * #GSocketConnection is a #GIOStream for a connected socket. They
12468  * can be created either by #GSocketClient when connecting to a host,
12469  * or by #GSocketListener when accepting a new client.
12470  * The type of the #GSocketConnection object returned from these calls
12471  * depends on the type of the underlying socket that is in use. For
12472  * instance, for a TCP/IP connection it will be a #GTcpConnection.
12473  * Chosing what type of object to construct is done with the socket
12474  * connection factory, and it is possible for 3rd parties to register
12475  * custom socket connection types for specific combination of socket
12476  * family/type/protocol using g_socket_connection_factory_register_type().
12477  *
12478  * Since: 2.22
12479  */
12480
12481
12482 /**
12483  * SECTION:gsocketcontrolmessage
12484  * @title: GSocketControlMessage
12485  * @short_description: A GSocket control message
12486  * @see_also: #GSocket.
12487  *
12488  * A #GSocketControlMessage is a special-purpose utility message that
12489  * can be sent to or received from a #GSocket. These types of
12490  * messages are often called "ancillary data".
12491  * The message can represent some sort of special instruction to or
12492  * information from the socket or can represent a special kind of
12493  * transfer to the peer (for example, sending a file description over
12494  * a UNIX socket).
12495  * These messages are sent with g_socket_send_message() and received
12496  * with g_socket_receive_message().
12497  * To extend the set of control message that can be sent, subclass this
12498  * class and override the get_size, get_level, get_type and serialize
12499  * methods.
12500  * To extend the set of control messages that can be received, subclass
12501  * this class and implement the deserialize method. Also, make sure your
12502  * class is registered with the GType typesystem before calling
12503  * g_socket_receive_message() to read such a message.
12504  *
12505  * Since: 2.22
12506  */
12507
12508
12509 /**
12510  * SECTION:gsocketlistener
12511  * @title: GSocketListener
12512  * @short_description: Helper for accepting network client connections
12513  * @see_also: #GThreadedSocketService, #GSocketService.
12514  *
12515  * A #GSocketListener is an object that keeps track of a set
12516  * of server sockets and helps you accept sockets from any of the
12517  * socket, either sync or async.
12518  * If you want to implement a network server, also look at #GSocketService
12519  * and #GThreadedSocketService which are subclass of #GSocketListener
12520  * that makes this even easier.
12521  *
12522  * Since: 2.22
12523  */
12524
12525
12526 /**
12527  * SECTION:gsocketservice
12528  * @title: GSocketService
12529  * @short_description: Make it easy to implement a network service
12530  * @see_also: #GThreadedSocketService, #GSocketListener.
12531  *
12532  * A #GSocketService is an object that represents a service that is
12533  * provided to the network or over local sockets.  When a new
12534  * connection is made to the service the #GSocketService:incoming
12535  * signal is emitted.
12536  * A #GSocketService is a subclass of #GSocketListener and you need
12537  * to add the addresses you want to accept connections on to the
12538  * with the #GSocketListener APIs.
12539  * There are two options for implementing a network service based on
12540  * #GSocketService. The first is to create the service using
12541  * g_socket_service_new() and to connect to the #GSocketService:incoming
12542  * signal. The second is to subclass #GSocketService and override the
12543  * default signal handler implementation.
12544  * In either case, the handler must immediately return, or else it
12545  * will block additional incoming connections from being serviced.
12546  * If you are interested in writing connection handlers that contain
12547  * blocking code then see #GThreadedSocketService.
12548  * The socket service runs on the main loop in the main thread, and is
12549  * not threadsafe in general. However, the calls to start and stop
12550  * the service are threadsafe so these can be used from threads that
12551  * handle incoming clients.
12552  *
12553  * Since: 2.22
12554  */
12555
12556
12557 /**
12558  * SECTION:gsrvtarget
12559  * @short_description: DNS SRV record target
12560  * @include: gio/gio.h
12561  *
12562  * SRV (service) records are used by some network protocols to provide
12563  * service-specific aliasing and load-balancing. For example, XMPP
12564  * (Jabber) uses SRV records to locate the XMPP server for a domain;
12565  * rather than connecting directly to "example.com" or assuming a
12566  * specific server hostname like "xmpp.example.com", an XMPP client
12567  * would look up the "xmpp-client" SRV record for "example.com", and
12568  * then connect to whatever host was pointed to by that record.
12569  * You can use g_resolver_lookup_service() or
12570  * g_resolver_lookup_service_async() to find the #GSrvTarget<!-- -->s
12571  * for a given service. However, if you are simply planning to connect
12572  * to the remote service, you can use #GNetworkService's
12573  * #GSocketConnectable interface and not need to worry about
12574  * #GSrvTarget at all.
12575  */
12576
12577
12578 /**
12579  * SECTION:gtcpconnection
12580  * @title: GTcpConnection
12581  * @short_description: A TCP GSocketConnection
12582  * @see_also: #GSocketConnection.
12583  *
12584  * This is the subclass of #GSocketConnection that is created
12585  * for TCP/IP sockets.
12586  *
12587  * Since: 2.22
12588  */
12589
12590
12591 /**
12592  * SECTION:gtcpwrapperconnection
12593  * @title: GTcpWrapperConnection
12594  * @short_description: wrapper for non-GSocketConnection-based, GSocket-based GIOStreams
12595  * @see_also: #GSocketConnection.
12596  *
12597  * A #GTcpWrapperConnection can be used to wrap a #GIOStream that is
12598  * based on a #GSocket, but which is not actually a
12599  * #GSocketConnection. This is used by #GSocketClient so that it can
12600  * always return a #GSocketConnection, even when the connection it has
12601  * actually created is not directly a #GSocketConnection.
12602  *
12603  * Since: 2.28
12604  */
12605
12606
12607 /**
12608  * SECTION:gthemedicon
12609  * @short_description: Icon theming support
12610  * @include: gio/gio.h
12611  * @see_also: #GIcon, #GLoadableIcon
12612  *
12613  * #GThemedIcon is an implementation of #GIcon that supports icon themes.
12614  * #GThemedIcon contains a list of all of the icons present in an icon
12615  * theme, so that icons can be looked up quickly. #GThemedIcon does
12616  * not provide actual pixmaps for icons, just the icon names.
12617  * Ideally something like gtk_icon_theme_choose_icon() should be used to
12618  * resolve the list of names so that fallback icons work nicely with
12619  * themes that inherit other themes.
12620  */
12621
12622
12623 /**
12624  * SECTION:gthreadedsocketservice
12625  * @title: GThreadedSocketService
12626  * @short_description: A threaded GSocketService
12627  * @see_also: #GSocketService.
12628  *
12629  * A #GThreadedSocketService is a simple subclass of #GSocketService
12630  * that handles incoming connections by creating a worker thread and
12631  * dispatching the connection to it by emitting the ::run signal in
12632  * the new thread.
12633  * The signal handler may perform blocking IO and need not return
12634  * until the connection is closed.
12635  * The service is implemented using a thread pool, so there is a
12636  * limited amount of threads availible to serve incomming requests.
12637  * The service automatically stops the #GSocketService from accepting
12638  * new connections when all threads are busy.
12639  * As with #GSocketService, you may connect to #GThreadedSocketService:run,
12640  * or subclass and override the default handler.
12641  */
12642
12643
12644 /**
12645  * SECTION:gtls
12646  * @title: TLS Overview
12647  * @short_description: TLS (aka SSL) support for GSocketConnection
12648  * @include: gio/gio.h
12649  *
12650  * #GTlsConnection and related classes provide TLS (Transport Layer
12651  * Security, previously known as SSL, Secure Sockets Layer) support for
12652  * gio-based network streams.
12653  * In the simplest case, for a client connection, you can just set the
12654  * #GSocketClient:tls flag on a #GSocketClient, and then any
12655  * connections created by that client will have TLS negotiated
12656  * automatically, using appropriate default settings, and rejecting
12657  * any invalid or self-signed certificates (unless you change that
12658  * default by setting the #GSocketClient:tls-validation-flags
12659  * property). The returned object will be a #GTcpWrapperConnection,
12660  * which wraps the underlying #GTlsClientConnection.
12661  * For greater control, you can create your own #GTlsClientConnection,
12662  * wrapping a #GSocketConnection (or an arbitrary #GIOStream with
12663  * pollable input and output streams) and then connect to its signals,
12664  * such as #GTlsConnection::accept-certificate, before starting the
12665  * handshake.
12666  * Server-side TLS is similar, using #GTlsServerConnection. At the
12667  * moment, there is no support for automatically wrapping server-side
12668  * connections in the way #GSocketClient does for client-side
12669  * connections.
12670  */
12671
12672
12673 /**
12674  * SECTION:gtlsbackend
12675  * @title: GTlsBackend
12676  * @short_description: TLS backend implementation
12677  * @include: gio/gio.h
12678  *
12679  *
12680  */
12681
12682
12683 /**
12684  * SECTION:gtlscertificate
12685  * @title: GTlsCertificate
12686  * @short_description: TLS certificate
12687  * @see_also: #GTlsConnection
12688  *
12689  * A certificate used for TLS authentication and encryption.
12690  * This can represent either a public key only (eg, the certificate
12691  * received by a client from a server), or the combination of
12692  * a public key and a private key (which is needed when acting as a
12693  * #GTlsServerConnection).
12694  *
12695  * Since: 2.28
12696  */
12697
12698
12699 /**
12700  * SECTION:gtlsclientconnection
12701  * @short_description: TLS client-side connection
12702  * @include: gio/gio.h
12703  *
12704  * #GTlsClientConnection is the client-side subclass of
12705  * #GTlsConnection, representing a client-side TLS connection.
12706  */
12707
12708
12709 /**
12710  * SECTION:gtlsconnection
12711  * @short_description: TLS connection type
12712  * @include: gio/gio.h
12713  *
12714  * #GTlsConnection is the base TLS connection class type, which wraps
12715  * a #GIOStream and provides TLS encryption on top of it. Its
12716  * subclasses, #GTlsClientConnection and #GTlsServerConnection,
12717  * implement client-side and server-side TLS, respectively.
12718  *
12719  * Since: 2.28
12720  */
12721
12722
12723 /**
12724  * SECTION:gtlsserverconnection
12725  * @short_description: TLS server-side connection
12726  * @include: gio/gio.h
12727  *
12728  * #GTlsServerConnection is the server-side subclass of #GTlsConnection,
12729  * representing a server-side TLS connection.
12730  *
12731  * Since: 2.28
12732  */
12733
12734
12735 /**
12736  * SECTION:gunixconnection
12737  * @title: GUnixConnection
12738  * @short_description: A UNIX domain GSocketConnection
12739  * @include: gio/gunixconnection.h
12740  * @see_also: #GSocketConnection.
12741  *
12742  * This is the subclass of #GSocketConnection that is created
12743  * for UNIX domain sockets.
12744  * It contains functions to do some of the UNIX socket specific
12745  * functionality like passing file descriptors.
12746  * Note that <filename>&lt;gio/gunixconnection.h&gt;</filename> belongs to
12747  * the UNIX-specific GIO interfaces, thus you have to use the
12748  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12749  *
12750  * Since: 2.22
12751  */
12752
12753
12754 /**
12755  * SECTION:gunixcredentialsmessage
12756  * @title: GUnixCredentialsMessage
12757  * @short_description: A GSocketControlMessage containing credentials
12758  * @include: gio/gunixcredentialsmessage.h
12759  * @see_also: #GUnixConnection, #GSocketControlMessage
12760  *
12761  * This #GSocketControlMessage contains a #GCredentials instance.  It
12762  * may be sent using g_socket_send_message() and received using
12763  * %G_SOCKET_FAMILY_UNIX family).
12764  * For an easier way to send and receive credentials over
12765  * stream-oriented UNIX sockets, see
12766  * g_unix_connection_send_credentials() and
12767  * g_unix_connection_receive_credentials(). To receive credentials of
12768  * a foreign process connected to a socket, use
12769  * g_socket_get_credentials().
12770  *
12771  * G_socket_receive_message() over unix sockets (ie: sockets in the
12772  */
12773
12774
12775 /**
12776  * SECTION:gunixfdlist
12777  * @title: GUnixFDList
12778  * @short_description: An object containing a set of UNIX file descriptors
12779  * @include: gio/gunixfdlist.h
12780  * @see_also: #GUnixFDMessage
12781  *
12782  * A #GUnixFDList contains a list of file descriptors.  It owns the file
12783  * descriptors that it contains, closing them when finalized.
12784  * It may be wrapped in a #GUnixFDMessage and sent over a #GSocket in
12785  * the %G_SOCKET_ADDRESS_UNIX family by using g_socket_send_message()
12786  * and received using g_socket_receive_message().
12787  * Note that <filename>&lt;gio/gunixfdlist.h&gt;</filename> belongs to
12788  * the UNIX-specific GIO interfaces, thus you have to use the
12789  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12790  */
12791
12792
12793 /**
12794  * SECTION:gunixfdmessage
12795  * @title: GUnixFDMessage
12796  * @short_description: A GSocketControlMessage containing a GUnixFDList
12797  * @include: gio/gunixfdmessage.h
12798  * @see_also: #GUnixConnection, #GUnixFDList, #GSocketControlMessage
12799  *
12800  * This #GSocketControlMessage contains a #GUnixFDList.
12801  * It may be sent using g_socket_send_message() and received using
12802  * %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied
12803  * between processes by the kernel.
12804  * For an easier way to send and receive file descriptors over
12805  * stream-oriented UNIX sockets, see g_unix_connection_send_fd() and
12806  * g_unix_connection_receive_fd().
12807  * Note that <filename>&lt;gio/gunixfdmessage.h&gt;</filename> belongs to
12808  * the UNIX-specific GIO interfaces, thus you have to use the
12809  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12810  *
12811  * G_socket_receive_message() over unix sockets (ie: sockets in the
12812  */
12813
12814
12815 /**
12816  * SECTION:gunixinputstream
12817  * @short_description: Streaming input operations for UNIX file descriptors
12818  * @include: gio/gunixinputstream.h
12819  * @see_also: #GInputStream
12820  *
12821  * #GUnixInputStream implements #GInputStream for reading from a
12822  * UNIX file descriptor, including asynchronous operations. The file
12823  * descriptor must be selectable, so it doesn't work with opened files.
12824  * Note that <filename>&lt;gio/gunixinputstream.h&gt;</filename> belongs
12825  * to the UNIX-specific GIO interfaces, thus you have to use the
12826  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12827  */
12828
12829
12830 /**
12831  * SECTION:gunixmounts
12832  * @include: gio/gunixmounts.h
12833  * @short_description: UNIX mounts
12834  *
12835  * Routines for managing mounted UNIX mount points and paths.
12836  * Note that <filename>&lt;gio/gunixmounts.h&gt;</filename> belongs to the
12837  * UNIX-specific GIO interfaces, thus you have to use the
12838  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12839  */
12840
12841
12842 /**
12843  * SECTION:gunixoutputstream
12844  * @short_description: Streaming output operations for UNIX file descriptors
12845  * @include: gio/gunixoutputstream.h
12846  * @see_also: #GOutputStream
12847  *
12848  * #GUnixOutputStream implements #GOutputStream for writing to a
12849  * UNIX file descriptor, including asynchronous operations. The file
12850  * descriptor must be selectable, so it doesn't work with opened files.
12851  * Note that <filename>&lt;gio/gunixoutputstream.h&gt;</filename> belongs
12852  * to the UNIX-specific GIO interfaces, thus you have to use the
12853  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12854  */
12855
12856
12857 /**
12858  * SECTION:gunixsocketaddress
12859  * @short_description: UNIX GSocketAddress
12860  * @include: gio/gunixsocketaddress.h
12861  *
12862  * Support for UNIX-domain (also known as local) sockets.
12863  * UNIX domain sockets are generally visible in the filesystem.
12864  * However, some systems support abstract socket names which are not
12865  * visible in the filesystem and not affected by the filesystem
12866  * permissions, visibility, etc. Currently this is only supported
12867  * under Linux. If you attempt to use abstract sockets on other
12868  * systems, function calls may return %G_IO_ERROR_NOT_SUPPORTED
12869  * errors. You can use g_unix_socket_address_abstract_names_supported()
12870  * to see if abstract names are supported.
12871  * Note that <filename>&lt;gio/gunixsocketaddress.h&gt;</filename> belongs to
12872  * the UNIX-specific GIO interfaces, thus you have to use the
12873  * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12874  */
12875
12876
12877 /**
12878  * SECTION:gvfs
12879  * @short_description: Virtual File System
12880  * @include: gio/gio.h
12881  *
12882  * Entry point for using GIO functionality.
12883  */
12884
12885
12886 /**
12887  * SECTION:gvolume
12888  * @short_description: Volume management
12889  * @include: gio/gio.h
12890  *
12891  * The #GVolume interface represents user-visible objects that can be
12892  * mounted. Note, when porting from GnomeVFS, #GVolume is the moral
12893  * equivalent of #GnomeVFSDrive.
12894  * Mounting a #GVolume instance is an asynchronous operation. For more
12895  * information about asynchronous operations, see #GAsyncReady and
12896  * #GSimpleAsyncReady. To mount a #GVolume, first call
12897  * g_volume_mount() with (at least) the #GVolume instance, optionally
12898  * a #GMountOperation object and a #GAsyncReadyCallback.
12899  * Typically, one will only want to pass %NULL for the
12900  * #GMountOperation if automounting all volumes when a desktop session
12901  * starts since it's not desirable to put up a lot of dialogs asking
12902  * for credentials.
12903  * The callback will be fired when the operation has resolved (either
12904  * with success or failure), and a #GAsyncReady structure will be
12905  * passed to the callback.  That callback should then call
12906  * g_volume_mount_finish() with the #GVolume instance and the
12907  * #GAsyncReady data to see if the operation was completed
12908  * successfully.  If an @error is present when g_volume_mount_finish()
12909  * is called, then it will be filled with any error information.
12910  * <para id="volume-identifier">
12911  * It is sometimes necessary to directly access the underlying
12912  * operating system object behind a volume (e.g. for passing a volume
12913  * to an application via the commandline). For this purpose, GIO
12914  * allows to obtain an 'identifier' for the volume. There can be
12915  * different kinds of identifiers, such as Hal UDIs, filesystem labels,
12916  * traditional Unix devices (e.g. <filename>/dev/sda2</filename>),
12917  * uuids. GIO uses predefind strings as names for the different kinds
12918  * #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. Use g_volume_get_identifier()
12919  * to obtain an identifier for a volume.
12920  * </para>
12921  * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available
12922  * when the gvfs hal volume monitor is in use. Other volume monitors
12923  * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
12924  * identifier, which can be used to obtain a hal device by means of
12925  * libhal_manger_find_device_string_match().
12926  *
12927  * Of identifiers: #G_VOLUME_IDENTIFIER_KIND_HAL_UDI,
12928  */
12929
12930
12931 /**
12932  * SECTION:gvolumemonitor
12933  * @short_description: Volume Monitor
12934  * @include: gio/gio.h
12935  * @see_also: #GFileMonitor
12936  *
12937  * #GVolumeMonitor is for listing the user interesting devices and volumes
12938  * on the computer. In other words, what a file selector or file manager
12939  * would show in a sidebar.
12940  * #GVolumeMonitor is not <link
12941  * linkend="g-main-context-push-thread-default">thread-default-context
12942  * aware</link>, and so should not be used other than from the main
12943  * thread, with no thread-default-context active.
12944  */
12945
12946
12947 /**
12948  * SECTION:gwin32inputstream
12949  * @short_description: Streaming input operations for Windows file handles
12950  * @include: gio/gwin32inputstream.h
12951  * @see_also: #GInputStream
12952  *
12953  * #GWin32InputStream implements #GInputStream for reading from a
12954  * Windows file handle.
12955  * Note that <filename>&lt;gio/gwin32inputstream.h&gt;</filename> belongs
12956  * to the Windows-specific GIO interfaces, thus you have to use the
12957  * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
12958  */
12959
12960
12961 /**
12962  * SECTION:gwin32outputstream
12963  * @short_description: Streaming output operations for Windows file handles
12964  * @include: gio/gwin32outputstream.h
12965  * @see_also: #GOutputStream
12966  *
12967  * #GWin32OutputStream implements #GOutputStream for writing to a
12968  * Windows file handle.
12969  * Note that <filename>&lt;gio/gwin32outputstream.h&gt;</filename> belongs
12970  * to the Windows-specific GIO interfaces, thus you have to use the
12971  * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
12972  */
12973
12974
12975 /**
12976  * SECTION:gzcompressor
12977  * @short_description: Zlib compressor
12978  * @include: gio/gio.h
12979  *
12980  * #GZlibCompressor is an implementation of #GConverter that
12981  * compresses data using zlib.
12982  */
12983
12984
12985 /**
12986  * SECTION:gzdecompressor
12987  * @short_description: Zlib decompressor
12988  * @include: gio/gio.h
12989  *
12990  * #GZlibDecompressor is an implementation of #GConverter that
12991  * decompresses data compressed with zlib.
12992  */
12993
12994
12995 /**
12996  * The string info map is an efficient data structure designed to be:
12997  *
12998  * used with a small set of items.  It is used by GSettings schemas for
12999  * three purposes:
13000  * 1) Implement <choices> with a list of valid strings
13001  * 2) Implement <alias> by mapping one string to another
13002  * 3) Implement enumerated types by mapping strings to integer values
13003  * (and back).
13004  * The map is made out of an array of uint32s.  Each entry in the array
13005  * is an integer value, followed by a specially formatted string value:
13006  * The string starts with the byte 0xff or 0xfe, followed by the
13007  * content of the string, followed by a nul byte, followed by
13008  * additional nul bytes for padding, followed by a 0xff byte.
13009  * Padding is added so that the entire formatted string takes up a
13010  * multiple of 4 bytes, and not less than 8 bytes.  The requirement
13011  * for a string to take up 8 bytes is so that the scanner doesn't lose
13012  * synch and mistake a string for an integer value.
13013  * The first byte of the formatted string depends on if the integer is
13014  * an enum value (0xff) or an alias (0xfe).  If it is an alias then the
13015  * number refers to the word offset within the info map at which the
13016  * integer corresponding to the "target" value is stored.
13017  * For example, consider the case of the string info map representing an
13018  * enumerated type of 'foo' (value 1) and 'bar' (value 2) and 'baz'
13019  * (alias for 'bar').  Note that string info maps are always little
13020  * endian.
13021  * x01 x00 x00 x00   xff 'f' 'o' 'o'   x00 x00 x00 xff   x02 x00 x00 x00
13022  * xff 'b' 'a' 'r'   x00 x00 x00 xff   x03 x00 x00 x00   xfe 'b' 'a' 'z'
13023  * x00 x00 x00 xff
13024  * The operations that someone may want to perform with the map:
13025  * - lookup if a string is valid (and not an alias)
13026  * - lookup the integer value for a enum 'nick'
13027  * - lookup the integer value for the target of an alias
13028  * - lookup an alias and convert it to its target string
13029  * - lookup the enum nick for a given value
13030  * In order to lookup if a string is valid, it is padded on either side
13031  * (as described) and scanned for in the array.  For example, you might
13032  * look for "foo":
13033  * xff 'f' 'o' 'o'   x00 x00 x00 xff
13034  * In order to lookup the integer value for a nick, the string is padded
13035  * on either side and scanned for in the array, as above.  Instead of
13036  * merely succeeding, we look at the integer value to the left of the
13037  * match.  This is the enum value.
13038  * In order to lookup an alias and convert it to its target enum value,
13039  * the string is padded on either side (as described, with 0xfe) and
13040  * scanned for.  For example, you might look for "baz":
13041  * xfe 'b' 'a' 'z'  x00 x00 x00 xff
13042  * The integer immediately preceeding the match then contains the offset
13043  * of the integer value of the target.  In our example, that's '3'.
13044  * This index is dereferenced to find the enum value of '2'.
13045  * To convert the alias to its target string, 5 bytes just need to be
13046  * added past the start of the integer value to find the start of the
13047  * string.
13048  * To lookup the enum nick for a given value, the value is searched for
13049  * in the array.  To ensure that the value isn't matching the inside of a
13050  * string, we must check that it is either the first item in the array or
13051  * immediately preceeded by the byte 0xff.  It must also be immediately
13052  * followed by the byte 0xff.
13053  * Because strings always take up a minimum of 2 words, because 0xff or
13054  * 0xfe never appear inside of a utf-8 string and because no two integer
13055  * values ever appear in sequence, the only way we can have the
13056  * sequence:
13057  * xff __ __ __ __ xff (or 0xfe)
13058  * is in the event of an integer nested between two strings.
13059  * For implementation simplicity/efficiency, strings may not be more
13060  * the value of each choice is set to zero and ignored.
13061  *
13062  * Than 65 characters in length (ie: 17 32bit words after padding).
13063  * In the event that we are doing <choices> (ie: not an enum type) then
13064  */
13065
13066
13067 /**
13068  * g_action_activate:
13069  * @action: a #GAction
13070  * @parameter: (allow-none): the parameter to the activation
13071  *
13072  * Activates the action.
13073  * the parameter type given at construction time).  If the parameter
13074  * type was %NULL then @parameter must also be %NULL.
13075  *
13076  * Since: 2.28
13077  */
13078
13079
13080 /**
13081  * g_action_get_enabled:
13082  * @action: a #GAction
13083  *
13084  * Checks if @action is currently enabled.
13085  * An action must be enabled in order to be activated or in order to
13086  * have its state changed from outside callers.
13087  *
13088  * Returns: whether the action is enabled
13089  * Since: 2.28
13090  */
13091
13092
13093 /**
13094  * g_action_get_name:
13095  * @action: a #GAction
13096  *
13097  * Queries the name of @action.
13098  *
13099  * Returns: the name of the action
13100  * Since: 2.28
13101  */
13102
13103
13104 /**
13105  * g_action_get_parameter_type:
13106  * @action: a #GAction
13107  *
13108  * Queries the type of the parameter that must be given when activating
13109  * When activating the action using g_action_activate(), the #GVariant
13110  * given to that function must be of the type returned by this function.
13111  * In the case that this function returns %NULL, you must not give any
13112  * #GVariant, but %NULL instead.
13113  *
13114  * Returns: (allow-none): the parameter type
13115  * Since: 2.28
13116  */
13117
13118
13119 /**
13120  * g_action_get_state:
13121  * @action: a #GAction
13122  *
13123  * Queries the current state of @action.
13124  * If the action is not stateful then %NULL will be returned.  If the
13125  * action is stateful then the type of the return value is the type
13126  * given by g_action_get_state_type().
13127  * The return value (if non-%NULL) should be freed with
13128  * g_variant_unref() when it is no longer required.
13129  *
13130  * Returns: (transfer full): the current state of the action
13131  * Since: 2.28
13132  */
13133
13134
13135 /**
13136  * g_action_get_state_hint:
13137  * @action: a #GAction
13138  *
13139  * Requests a hint about the valid range of values for the state of
13140  * If %NULL is returned it either means that the action is not stateful
13141  * or that there is no hint about the valid range of values for the
13142  * state of the action.
13143  * If a #GVariant array is returned then each item in the array is a
13144  * returned then the tuple specifies the inclusive lower and upper bound
13145  * of valid values for the state.
13146  * In any case, the information is merely a hint.  It may be possible to
13147  * have a state value outside of the hinted range and setting a value
13148  * within the range may fail.
13149  * The return value (if non-%NULL) should be freed with
13150  * g_variant_unref() when it is no longer required.
13151  *
13152  * Possible value for the state.  if a #gvariant pair (ie: two-tuple) is
13153  * Returns: (transfer full): the state range hint
13154  * Since: 2.28
13155  */
13156
13157
13158 /**
13159  * g_action_get_state_type:
13160  * @action: a #GAction
13161  *
13162  * Queries the type of the state of @action.
13163  * g_action_new_stateful()) then this function returns the #GVariantType
13164  * of the state.  This is the type of the initial value given as the
13165  * state.  All calls to g_action_set_state() must give a #GVariant of
13166  * this type and g_action_get_state() will return a #GVariant of the
13167  * same type.
13168  * this function will return %NULL.  In that case, g_action_get_state()
13169  * will return %NULL and you must not call g_action_set_state().
13170  *
13171  * If the action is stateful (ie: was created with
13172  * If the action is not stateful (ie: created with g_action_new()) then
13173  * Returns: (allow-none): the state type, if the action is stateful
13174  * Since: 2.28
13175  */
13176
13177
13178 /**
13179  * g_action_group_action_added:
13180  * @action_group: a #GActionGroup
13181  * @action_name: the name of an action in the group
13182  *
13183  * Emits the #GActionGroup::action-added signal on @action_group.
13184  * This function should only be called by #GActionGroup implementations.
13185  *
13186  * Since: 2.28
13187  */
13188
13189
13190 /**
13191  * g_action_group_action_enabled_changed:
13192  * @action_group: a #GActionGroup
13193  * @action_name: the name of an action in the group
13194  * @enabled: whether or not the action is now enabled
13195  *
13196  * Emits the #GActionGroup::action-enabled-changed signal on @action_group.
13197  * This function should only be called by #GActionGroup implementations.
13198  *
13199  * Since: 2.28
13200  */
13201
13202
13203 /**
13204  * g_action_group_action_removed:
13205  * @action_group: a #GActionGroup
13206  * @action_name: the name of an action in the group
13207  *
13208  * Emits the #GActionGroup::action-removed signal on @action_group.
13209  * This function should only be called by #GActionGroup implementations.
13210  *
13211  * Since: 2.28
13212  */
13213
13214
13215 /**
13216  * g_action_group_action_state_changed:
13217  * @action_group: a #GActionGroup
13218  * @action_name: the name of an action in the group
13219  * @state: the new state of the named action
13220  *
13221  * Emits the #GActionGroup::action-state-changed signal on @action_group.
13222  * This function should only be called by #GActionGroup implementations.
13223  *
13224  * Since: 2.28
13225  */
13226
13227
13228 /**
13229  * g_action_group_activate_action:
13230  * @action_group: a #GActionGroup
13231  * @action_name: the name of the action to activate
13232  * @parameter: (allow-none): parameters to the activation
13233  *
13234  * Activate the named action within @action_group.
13235  * If the action is expecting a parameter, then the correct type of
13236  * parameter must be given as @parameter.  If the action is expecting no
13237  * parameters then @parameter must be %NULL.  See
13238  * g_action_group_get_parameter_type().
13239  *
13240  * Since: 2.28
13241  */
13242
13243
13244 /**
13245  * g_action_group_change_action_state:
13246  * @action_group: a #GActionGroup
13247  * @action_name: the name of the action to request the change on
13248  * @value: the new state
13249  *
13250  * Request for the state of the named action within @action_group to be
13251  * changed to @value.
13252  * The action must be stateful and @value must be of the correct type.
13253  * See g_action_group_get_state_type().
13254  * This call merely requests a change.  The action may refuse to change
13255  * its state or may change its state to something other than @value.
13256  * See g_action_group_get_state_hint().
13257  * If the @value GVariant is floating, it is consumed.
13258  *
13259  * Since: 2.28
13260  */
13261
13262
13263 /**
13264  * g_action_group_get_action_enabled:
13265  * @action_group: a #GActionGroup
13266  * @action_name: the name of the action to query
13267  *
13268  * Checks if the named action within @action_group is currently enabled.
13269  * An action must be enabled in order to be activated or in order to
13270  * have its state changed from outside callers.
13271  *
13272  * Returns: whether or not the action is currently enabled
13273  * Since: 2.28
13274  */
13275
13276
13277 /**
13278  * g_action_group_get_action_parameter_type:
13279  * @action_group: a #GActionGroup
13280  * @action_name: the name of the action to query
13281  *
13282  * Queries the type of the parameter that must be given when activating
13283  * the named action within @action_group.
13284  * When activating the action using g_action_group_activate(), the
13285  * #GVariant given to that function must be of the type returned by this
13286  * function.
13287  * In the case that this function returns %NULL, you must not give any
13288  * #GVariant, but %NULL instead.
13289  * The parameter type of a particular action will never change but it is
13290  * possible for an action to be removed and for a new action to be added
13291  * with the same name but a different parameter type.
13292  *
13293  * Returns: the parameter type
13294  * Since: 2.28
13295  */
13296
13297
13298 /**
13299  * g_action_group_get_action_state:
13300  * @action_group: a #GActionGroup
13301  * @action_name: the name of the action to query
13302  *
13303  * Queries the current state of the named action within @action_group.
13304  * If the action is not stateful then %NULL will be returned.  If the
13305  * action is stateful then the type of the return value is the type
13306  * given by g_action_group_get_state_type().
13307  * The return value (if non-%NULL) should be freed with
13308  * g_variant_unref() when it is no longer required.
13309  *
13310  * Returns: (allow-none): the current state of the action
13311  * Since: 2.28
13312  */
13313
13314
13315 /**
13316  * g_action_group_get_action_state_hint:
13317  * @action_group: a #GActionGroup
13318  * @action_name: the name of the action to query
13319  *
13320  * Requests a hint about the valid range of values for the state of the
13321  * named action within @action_group.
13322  * If %NULL is returned it either means that the action is not stateful
13323  * or that there is no hint about the valid range of values for the
13324  * state of the action.
13325  * If a #GVariant array is returned then each item in the array is a
13326  * returned then the tuple specifies the inclusive lower and upper bound
13327  * of valid values for the state.
13328  * In any case, the information is merely a hint.  It may be possible to
13329  * have a state value outside of the hinted range and setting a value
13330  * within the range may fail.
13331  * The return value (if non-%NULL) should be freed with
13332  * g_variant_unref() when it is no longer required.
13333  *
13334  * Possible value for the state.  if a #gvariant pair (ie: two-tuple) is
13335  * Returns: (transfer full): the state range hint
13336  * Since: 2.28
13337  */
13338
13339
13340 /**
13341  * g_action_group_get_action_state_type:
13342  * @action_group: a #GActionGroup
13343  * @action_name: the name of the action to query
13344  *
13345  * Queries the type of the state of the named action within
13346  * If the action is stateful then this function returns the
13347  * #GVariantType of the state.  All calls to g_action_group_set_state()
13348  * must give a #GVariant of this type and g_action_group_get_state()
13349  * will return a #GVariant of the same type.
13350  * If the action is not stateful then this function will return %NULL.
13351  * In that case, g_action_group_get_state() will return %NULL and you
13352  * must not call g_action_group_set_state().
13353  * The state type of a particular action will never change but it is
13354  * possible for an action to be removed and for a new action to be added
13355  * with the same name but a different state type.
13356  *
13357  * Returns: (transfer full): the state type, if the action is stateful
13358  * Since: 2.28
13359  */
13360
13361
13362 /**
13363  * g_action_group_has_action:
13364  * @action_group: a #GActionGroup
13365  * @action_name: the name of the action to check for
13366  *
13367  * Checks if the named action exists within @action_group.
13368  *
13369  * Returns: whether the named action exists
13370  * Since: 2.28
13371  */
13372
13373
13374 /**
13375  * g_action_group_list_actions:
13376  * @action_group: a #GActionGroup
13377  *
13378  * Lists the actions contained within @action_group.
13379  * The caller is responsible for freeing the list with g_strfreev() when
13380  * it is no longer required.
13381  * actions in the groupb
13382  *
13383  * Returns: (transfer full): a %NULL-terminated array of the names of the
13384  * Since: 2.28
13385  */
13386
13387
13388 /**
13389  * g_action_set_state:
13390  * @action: a #GAction
13391  * @value: the new state
13392  *
13393  * Request for the state of @action to be changed to @value.
13394  * The action must be stateful and @value must be of the correct type.
13395  * See g_action_get_state_type().
13396  * This call merely requests a change.  The action may refuse to change
13397  * its state or may change its state to something other than @value.
13398  * See g_action_get_state_hint().
13399  * If the @value GVariant is floating, it is consumed.
13400  *
13401  * Since: 2.28
13402  */
13403
13404
13405 /**
13406  * g_alloca:
13407  * @size: number of bytes to allocate.
13408  *
13409  * Allocates @size bytes on the stack; these bytes will be freed when the current
13410  * stack frame is cleaned up. This macro essentially just wraps the alloca()
13411  * function present on most UNIX variants.
13412  * Thus it provides the same advantages and pitfalls as alloca():
13413  * <variablelist>
13414  * <varlistentry><term></term><listitem><para>
13415  * + alloca() is very fast, as on most systems it's implemented by just adjusting
13416  * the stack pointer register.
13417  * </para></listitem></varlistentry>
13418  * <varlistentry><term></term><listitem><para>
13419  * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
13420  * blocks just build up and are released together at function end.
13421  * </para></listitem></varlistentry>
13422  * <varlistentry><term></term><listitem><para>
13423  * - Allocation sizes have to fit into the current stack frame. For instance in a
13424  * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
13425  * so be sparse with alloca() uses.
13426  * </para></listitem></varlistentry>
13427  * <varlistentry><term></term><listitem><para>
13428  * - Allocation failure due to insufficient stack space is not indicated with a %NULL
13429  * return like e.g. with malloc(). Instead, most systems probably handle it the same
13430  * way as out of stack space situations from infinite function recursion, i.e.
13431  * with a segmentation fault.
13432  * </para></listitem></varlistentry>
13433  * <varlistentry><term></term><listitem><para>
13434  * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
13435  * Stack space allocated with alloca() in the same scope as a variable sized array
13436  * will be freed together with the variable sized array upon exit of that scope, and
13437  * not upon exit of the enclosing function scope.
13438  * </para></listitem></varlistentry>
13439  * </variablelist>
13440  *
13441  * Returns: space for @size bytes, allocated on the stack
13442  */
13443
13444
13445 /**
13446  * g_app_info_add_supports_type:
13447  * @appinfo: a #GAppInfo.
13448  * @content_type: a string.
13449  * @error: a #GError.
13450  *
13451  * Adds a content type to the application information to indicate the
13452  * application is capable of opening files with the given content type.
13453  *
13454  * Returns: %TRUE on success, %FALSE on error.
13455  */
13456
13457
13458 /**
13459  * g_app_info_can_delete:
13460  * @appinfo: a #GAppInfo
13461  *
13462  * Obtains the information whether the #GAppInfo can be deleted.
13463  * See g_app_info_delete().
13464  *
13465  * Returns: %TRUE if @appinfo can be deleted
13466  * Since: 2.20
13467  */
13468
13469
13470 /**
13471  * g_app_info_can_remove_supports_type:
13472  * @appinfo: a #GAppInfo.
13473  *
13474  * Checks if a supported content type can be removed from an application.
13475  * content types from a given @appinfo, %FALSE if not.
13476  *
13477  * Returns: %TRUE if it is possible to remove supported
13478  */
13479
13480
13481 /**
13482  * g_app_info_create_from_commandline:
13483  * @commandline: the commandline to use
13484  * @application_name: (allow-none): the application name, or %NULL to use @commandline
13485  * @flags: flags that can specify details of the created #GAppInfo
13486  * @error: a #GError location to store the error occuring, %NULL to ignore.
13487  *
13488  * Creates a new #GAppInfo from the given information.
13489  *
13490  * Returns: (transfer full): new #GAppInfo for given command.
13491  */
13492
13493
13494 /**
13495  * g_app_info_delete:
13496  * @appinfo: a #GAppInfo
13497  *
13498  * Tries to delete a #GAppInfo.
13499  * On some platforms, there may be a difference between user-defined
13500  * #GAppInfo<!-- -->s which can be deleted, and system-wide ones which
13501  * cannot. See g_app_info_can_delete().
13502  *
13503  * Virtual: do_delete
13504  * Returns: %TRUE if @appinfo has been deleted
13505  * Since: 2.20
13506  */
13507
13508
13509 /**
13510  * g_app_info_dup:
13511  * @appinfo: a #GAppInfo.
13512  *
13513  * Creates a duplicate of a #GAppInfo.
13514  *
13515  * Returns: (transfer full): a duplicate of @appinfo.
13516  */
13517
13518
13519 /**
13520  * g_app_info_equal:
13521  * @appinfo1: the first #GAppInfo.
13522  * @appinfo2: the second #GAppInfo.
13523  *
13524  * Checks if two #GAppInfo<!-- -->s are equal.
13525  *
13526  * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.
13527  */
13528
13529
13530 /**
13531  * g_app_info_get_all:
13532  *
13533  * Gets a list of all of the applications currently registered
13534  * on this system.
13535  * For desktop files, this includes applications that have
13536  * <literal>NoDisplay=true</literal> set or are excluded from
13537  * display by means of <literal>OnlyShowIn</literal> or
13538  * <literal>NotShowIn</literal>. See g_app_info_should_show().
13539  * The returned list does not include applications which have
13540  * the <literal>Hidden</literal> key set.
13541  *
13542  * Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfo<!---->s.
13543  */
13544
13545
13546 /**
13547  * g_app_info_get_all_for_type:
13548  * @content_type: the content type to find a #GAppInfo for
13549  *
13550  * Gets a list of all #GAppInfos for a given content type.
13551  * for given @content_type or %NULL on error.
13552  *
13553  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
13554  */
13555
13556
13557 /**
13558  * g_app_info_get_commandline:
13559  * @appinfo: a #GAppInfo
13560  *
13561  * Gets the commandline with which the application will be
13562  * started.
13563  * or %NULL if this information is not available
13564  *
13565  * Returns: a string containing the @appinfo's commandline,
13566  * Since: 2.20
13567  */
13568
13569
13570 /**
13571  * g_app_info_get_default_for_type:
13572  * @content_type: the content type to find a #GAppInfo for
13573  * @must_support_uris: if %TRUE, the #GAppInfo is expected to support URIs
13574  *
13575  * Gets the #GAppInfo that corresponds to a given content type.
13576  * %NULL on error.
13577  *
13578  * Returns: (transfer full): #GAppInfo for given @content_type or
13579  */
13580
13581
13582 /**
13583  * g_app_info_get_default_for_uri_scheme:
13584  * @uri_scheme: a string containing a URI scheme.
13585  *
13586  * Gets the default application for launching applications
13587  * using this URI scheme. A URI scheme is the initial part
13588  * of the URI, up to but not including the ':', e.g. "http",
13589  * "ftp" or "sip".
13590  *
13591  * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
13592  */
13593
13594
13595 /**
13596  * g_app_info_get_description:
13597  * @appinfo: a #GAppInfo.
13598  *
13599  * Gets a human-readable description of an installed application.
13600  * application @appinfo, or %NULL if none.
13601  *
13602  * Returns: a string containing a description of the
13603  */
13604
13605
13606 /**
13607  * g_app_info_get_display_name:
13608  * @appinfo: a #GAppInfo.
13609  *
13610  * Gets the display name of the application. The display name is often more
13611  * descriptive to the user than the name itself.
13612  * no display name is available.
13613  *
13614  * Returns: the display name of the application for @appinfo, or the name if
13615  * Since: 2.24
13616  */
13617
13618
13619 /**
13620  * g_app_info_get_executable:
13621  * @appinfo: a #GAppInfo
13622  *
13623  * Gets the executable's name for the installed application.
13624  * binaries name
13625  *
13626  * Returns: a string containing the @appinfo's application
13627  */
13628
13629
13630 /**
13631  * g_app_info_get_fallback_for_type:
13632  * @content_type: the content type to find a #GAppInfo for
13633  *
13634  * Gets a list of fallback #GAppInfos for a given content type, i.e.
13635  * those applications which claim to support the given content type
13636  * by MIME type subclassing and not directly.
13637  * for given @content_type or %NULL on error.
13638  *
13639  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
13640  * Since: 2.28
13641  */
13642
13643
13644 /**
13645  * g_app_info_get_icon:
13646  * @appinfo: a #GAppInfo.
13647  *
13648  * Gets the icon for the application.
13649  *
13650  * Returns: (transfer none): the default #GIcon for @appinfo.
13651  */
13652
13653
13654 /**
13655  * g_app_info_get_id:
13656  * @appinfo: a #GAppInfo.
13657  *
13658  * Gets the ID of an application. An id is a string that
13659  * identifies the application. The exact format of the id is
13660  * platform dependent. For instance, on Unix this is the
13661  * desktop file id from the xdg menu specification.
13662  * Note that the returned ID may be %NULL, depending on how
13663  * the @appinfo has been constructed.
13664  *
13665  * Returns: a string containing the application's ID.
13666  */
13667
13668
13669 /**
13670  * g_app_info_get_name:
13671  * @appinfo: a #GAppInfo.
13672  *
13673  * Gets the installed name of the application.
13674  *
13675  * Returns: the name of the application for @appinfo.
13676  */
13677
13678
13679 /**
13680  * g_app_info_get_recommended_for_type:
13681  * @content_type: the content type to find a #GAppInfo for
13682  *
13683  * Gets a list of recommended #GAppInfos for a given content type, i.e.
13684  * those applications which claim to support the given content type exactly,
13685  * and not by MIME type subclassing.
13686  * Note that the first application of the list is the last used one, i.e.
13687  * the last one for which #g_app_info_set_as_last_used_for_type has been
13688  * called.
13689  * for given @content_type or %NULL on error.
13690  *
13691  * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
13692  * Since: 2.28
13693  */
13694
13695
13696 /**
13697  * g_app_info_launch:
13698  * @appinfo: a #GAppInfo
13699  * @files: (element-type GFile): a #GList of #GFile objects
13700  * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
13701  * @error: a #GError
13702  *
13703  * Launches the application. Passes @files to the launched application
13704  * as arguments, using the optional @launch_context to get information
13705  * about the details of the launcher (like what screen it is on).
13706  * On error, @error will be set accordingly.
13707  * To launch the application without arguments pass a %NULL @files list.
13708  * Note that even if the launch is successful the application launched
13709  * can fail to start if it runs into problems during startup. There is
13710  * no way to detect this.
13711  * Some URIs can be changed when passed through a GFile (for instance
13712  * unsupported uris with strange formats like mailto:), so if you have
13713  * a textual uri you want to pass in as argument, consider using
13714  * g_app_info_launch_uris() instead.
13715  * On UNIX, this function sets the <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>
13716  * environment variable with the path of the launched desktop file and
13717  * <envar>GIO_LAUNCHED_DESKTOP_FILE_PID</envar> to the process
13718  * id of the launched process. This can be used to ignore
13719  * <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>, should it be inherited
13720  * by further processes. The <envar>DISPLAY</envar> and
13721  * <envar>DESKTOP_STARTUP_ID</envar> environment variables are also
13722  * set, based on information provided in @launch_context.
13723  *
13724  * Returns: %TRUE on successful launch, %FALSE otherwise.
13725  */
13726
13727
13728 /**
13729  * g_app_info_launch_default_for_uri:
13730  * @uri: the uri to show
13731  * @launch_context: (allow-none): an optional #GAppLaunchContext.
13732  * @error: a #GError.
13733  *
13734  * Utility function that launches the default application
13735  * registered to handle the specified uri. Synchronous I/O
13736  * is done on the uri to detect the type of the file if
13737  * required.
13738  *
13739  * Returns: %TRUE on success, %FALSE on error.
13740  */
13741
13742
13743 /**
13744  * g_app_info_launch_uris:
13745  * @appinfo: a #GAppInfo
13746  * @uris: (element-type utf8): a #GList containing URIs to launch.
13747  * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
13748  * @error: a #GError
13749  *
13750  * Launches the application. Passes @uris to the launched application
13751  * as arguments, using the optional @launch_context to get information
13752  * about the details of the launcher (like what screen it is on).
13753  * On error, @error will be set accordingly.
13754  * To lauch the application without arguments pass a %NULL @uris list.
13755  * Note that even if the launch is successful the application launched
13756  * can fail to start if it runs into problems during startup. There is
13757  * no way to detect this.
13758  *
13759  * Returns: %TRUE on successful launch, %FALSE otherwise.
13760  */
13761
13762
13763 /**
13764  * g_app_info_remove_supports_type:
13765  * @appinfo: a #GAppInfo.
13766  * @content_type: a string.
13767  * @error: a #GError.
13768  *
13769  * Removes a supported type from an application, if possible.
13770  *
13771  * Returns: %TRUE on success, %FALSE on error.
13772  */
13773
13774
13775 /**
13776  * g_app_info_reset_type_associations:
13777  * @content_type: a content type
13778  *
13779  * Removes all changes to the type associations done by
13780  * g_app_info_set_as_default_for_type(),
13781  * g_app_info_set_as_default_for_extension(),
13782  * g_app_info_add_supports_type() or g_app_info_remove_supports_type().
13783  *
13784  * Since: 2.20
13785  */
13786
13787
13788 /**
13789  * g_app_info_set_as_default_for_extension:
13790  * @appinfo: a #GAppInfo.
13791  * @extension: a string containing the file extension (without the dot).
13792  * @error: a #GError.
13793  *
13794  * Sets the application as the default handler for the given file extension.
13795  *
13796  * Returns: %TRUE on success, %FALSE on error.
13797  */
13798
13799
13800 /**
13801  * g_app_info_set_as_default_for_type:
13802  * @appinfo: a #GAppInfo.
13803  * @content_type: the content type.
13804  * @error: a #GError.
13805  *
13806  * Sets the application as the default handler for a given type.
13807  *
13808  * Returns: %TRUE on success, %FALSE on error.
13809  */
13810
13811
13812 /**
13813  * g_app_info_set_as_last_used_for_type:
13814  * @appinfo: a #GAppInfo.
13815  * @content_type: the content type.
13816  * @error: a #GError.
13817  *
13818  * Sets the application as the last used application for a given type.
13819  * This will make the application appear as first in the list returned by
13820  * #g_app_info_get_recommended_for_type, regardless of the default application
13821  * for that content type.
13822  *
13823  * Returns: %TRUE on success, %FALSE on error.
13824  */
13825
13826
13827 /**
13828  * g_app_info_should_show:
13829  * @appinfo: a #GAppInfo.
13830  *
13831  * Checks if the application info should be shown in menus that
13832  * list available applications.
13833  *
13834  * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise.
13835  */
13836
13837
13838 /**
13839  * g_app_info_supports_files:
13840  * @appinfo: a #GAppInfo.
13841  *
13842  * Checks if the application accepts files as arguments.
13843  *
13844  * Returns: %TRUE if the @appinfo supports files.
13845  */
13846
13847
13848 /**
13849  * g_app_info_supports_uris:
13850  * @appinfo: a #GAppInfo.
13851  *
13852  * Checks if the application supports reading files and directories from URIs.
13853  *
13854  * Returns: %TRUE if the @appinfo supports URIs.
13855  */
13856
13857
13858 /**
13859  * g_app_launch_context_get_display:
13860  * @context: a #GAppLaunchContext
13861  * @info: a #GAppInfo
13862  * @files: (element-type GFile): a #GList of #GFile objects
13863  *
13864  * Gets the display string for the @context. This is used to ensure new
13865  * applications are started on the same display as the launching
13866  * application, by setting the <envar>DISPLAY</envar> environment variable.
13867  *
13868  * Returns: a display string for the display.
13869  */
13870
13871
13872 /**
13873  * g_app_launch_context_get_startup_notify_id:
13874  * @context: a #GAppLaunchContext
13875  * @info: a #GAppInfo
13876  * @files: (element-type GFile): a #GList of of #GFile objects
13877  *
13878  * Initiates startup notification for the application and returns the
13879  * <envar>DESKTOP_STARTUP_ID</envar> for the launched operation,
13880  * if supported.
13881  * Startup notification IDs are defined in the <ulink
13882  * url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">
13883  * FreeDesktop.Org Startup Notifications standard</ulink>.
13884  * not supported.
13885  *
13886  * Returns: a startup notification ID for the application, or %NULL if
13887  */
13888
13889
13890 /**
13891  * g_app_launch_context_launch_failed:
13892  * @context: a #GAppLaunchContext.
13893  * @startup_notify_id: the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
13894  *
13895  * Called when an application has failed to launch, so that it can cancel
13896  * the application startup notification started in g_app_launch_context_get_startup_notify_id().
13897  */
13898
13899
13900 /**
13901  * g_app_launch_context_new:
13902  *
13903  * Creates a new application launch context. This is not normally used,
13904  * instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
13905  *
13906  * Returns: a #GAppLaunchContext.
13907  */
13908
13909
13910 /**
13911  * g_application_activate:
13912  * @application: a #GApplication
13913  *
13914  * Activates the application.
13915  * In essence, this results in the #GApplication::activate() signal being
13916  * emitted in the primary instance.
13917  * The application must be registered before calling this function.
13918  *
13919  * Since: 2.28
13920  */
13921
13922
13923 /**
13924  * g_application_command_line_get_arguments:
13925  * @cmdline: a #GApplicationCommandLine
13926  * @argc: (out): the length of the arguments array, or %NULL
13927  *
13928  * Gets the list of arguments that was passed on the command line.
13929  * The strings in the array may contain non-utf8 data.
13930  * The return value is %NULL-terminated and should be freed using
13931  * g_strfreev().
13932  * containing the arguments (the argv)
13933  *
13934  * Returns: (array length=argc) (transfer full): the string array
13935  * Since: 2.28
13936  */
13937
13938
13939 /**
13940  * g_application_command_line_get_cwd:
13941  * @cmdline: a #GApplicationCommandLine
13942  *
13943  * Gets the working directory of the command line invocation.
13944  * The string may contain non-utf8 data.
13945  * It is possible that the remote application did not send a working
13946  * directory, so this may be %NULL.
13947  * The return value should not be modified or freed and is valid for as
13948  * long as @cmdline exists.
13949  *
13950  * Returns: the current directory, or %NULL
13951  * Since: 2.28
13952  */
13953
13954
13955 /**
13956  * g_application_command_line_get_environ:
13957  * @cmdline: a #GApplicationCommandLine
13958  *
13959  * Gets the contents of the 'environ' variable of the command line
13960  * invocation, as would be returned by g_get_environ(), ie as a
13961  * %NULL-terminated list of strings in the form 'NAME=VALUE'.
13962  * The strings may contain non-utf8 data.
13963  * The remote application usually does not send an environment.  Use
13964  * %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
13965  * set it is possible that the environment is still not available (due
13966  * to invocation messages from other applications).
13967  * The return value should not be modified or freed and is valid for as
13968  * long as @cmdline exists.
13969  * See g_application_command_line_getenv() if you are only interested
13970  * in the value of a single environment variable.
13971  * strings, or %NULL if they were not sent
13972  *
13973  * Returns: (array zero-terminated=1) (transfer none): the environment
13974  * Since: 2.28
13975  */
13976
13977
13978 /**
13979  * g_application_command_line_get_exit_status:
13980  * @cmdline: a #GApplicationCommandLine
13981  *
13982  * Gets the exit status of @cmdline.  See
13983  * g_application_command_line_set_exit_status() for more information.
13984  *
13985  * Returns: the exit status
13986  * Since: 2.28
13987  */
13988
13989
13990 /**
13991  * g_application_command_line_get_is_remote:
13992  * @cmdline: a #GApplicationCommandLine
13993  *
13994  * Determines if @cmdline represents a remote invocation.
13995  *
13996  * Returns: %TRUE if the invocation was remote
13997  * Since: 2.28
13998  */
13999
14000
14001 /**
14002  * g_application_command_line_get_platform_data:
14003  * @cmdline: #GApplicationCommandLine
14004  *
14005  * Gets the platform data associated with the invocation of @cmdline.
14006  * This is a #GVariant dictionary containing information about the
14007  * context in which the invocation occured.  It typically contains
14008  * information like the current working directory and the startup
14009  * notification ID.
14010  * For local invocation, it will be %NULL.
14011  *
14012  * Returns: the platform data, or %NULL
14013  * Since: 2.28
14014  */
14015
14016
14017 /**
14018  * g_application_command_line_getenv:
14019  * @cmdline: a #GApplicationCommandLine
14020  * @name: the environment variable to get
14021  *
14022  * Gets the value of a particular environment variable of the command
14023  * line invocation, as would be returned by g_getenv().  The strings may
14024  * contain non-utf8 data.
14025  * The remote application usually does not send an environment.  Use
14026  * %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
14027  * set it is possible that the environment is still not available (due
14028  * to invocation messages from other applications).
14029  * The return value should not be modified or freed and is valid for as
14030  * long as @cmdline exists.
14031  *
14032  * Returns: the value of the variable, or %NULL if unset or unsent
14033  * Since: 2.28
14034  */
14035
14036
14037 /**
14038  * g_application_command_line_print:
14039  * @cmdline: a #GApplicationCommandLine
14040  * @format: a printf-style format string
14041  * @...: arguments, as per @format
14042  *
14043  * Formats a message and prints it using the stdout print handler in the
14044  * invoking process.
14045  * If @cmdline is a local invocation then this is exactly equivalent to
14046  * g_print().  If @cmdline is remote then this is equivalent to calling
14047  * g_print() in the invoking process.
14048  *
14049  * Since: 2.28
14050  */
14051
14052
14053 /**
14054  * g_application_command_line_printerr:
14055  * @cmdline: a #GApplicationCommandLine
14056  * @format: a printf-style format string
14057  * @...: arguments, as per @format
14058  *
14059  * Formats a message and prints it using the stderr print handler in the
14060  * invoking process.
14061  * If @cmdline is a local invocation then this is exactly equivalent to
14062  * g_printerr().  If @cmdline is remote then this is equivalent to
14063  * calling g_printerr() in the invoking process.
14064  *
14065  * Since: 2.28
14066  */
14067
14068
14069 /**
14070  * g_application_command_line_set_exit_status:
14071  * @cmdline: a #GApplicationCommandLine
14072  * @exit_status: the exit status
14073  *
14074  * Sets the exit status that will be used when the invoking process
14075  * exits.
14076  * The return value of the #GApplication::command-line signal is
14077  * passed to this function when the handler returns.  This is the usual
14078  * way of setting the exit status.
14079  * In the event that you want the remote invocation to continue running
14080  * and want to decide on the exit status in the future, you can use this
14081  * call.  For the case of a remote invocation, the remote process will
14082  * typically exit when the last reference is dropped on @cmdline.  The
14083  * exit status of the remote process will be equal to the last value
14084  * that was set with this function.
14085  * In the case that the commandline invocation is local, the situation
14086  * is slightly more complicated.  If the commandline invocation results
14087  * increased to a non-zero value) then the application is considered to
14088  * have been 'successful' in a certain sense, and the exit status is
14089  * always zero.  If the application use count is zero, though, the exit
14090  * status of the local #GApplicationCommandLine is used.
14091  *
14092  * In the mainloop running (ie: because the use-count of the application
14093  * Since: 2.28
14094  */
14095
14096
14097 /**
14098  * g_application_get_application_id:
14099  * @application: a #GApplication
14100  * @returns: the identifier for @application, owned by @application
14101  *
14102  * Gets the unique identifier for @application.
14103  *
14104  * Since: 2.28
14105  */
14106
14107
14108 /**
14109  * g_application_get_flags:
14110  * @application: a #GApplication
14111  * @returns: the flags for @application
14112  *
14113  * Gets the flags for @application.
14114  * See #GApplicationFlags.
14115  *
14116  * Since: 2.28
14117  */
14118
14119
14120 /**
14121  * g_application_get_inactivity_timeout:
14122  * @application: a #GApplication
14123  *
14124  * Gets the current inactivity timeout for the application.
14125  * This is the amount of time (in milliseconds) after the last call to
14126  * g_application_release() before the application stops running.
14127  *
14128  * Returns: the timeout, in milliseconds
14129  * Since: 2.28
14130  */
14131
14132
14133 /**
14134  * g_application_get_is_registered:
14135  * @application: a #GApplication
14136  * @returns: %TRUE if @application is registered
14137  *
14138  * Checks if @application is registered.
14139  * An application is registered if g_application_register() has been
14140  * successfully called.
14141  *
14142  * Since: 2.28
14143  */
14144
14145
14146 /**
14147  * g_application_get_is_remote:
14148  * @application: a #GApplication
14149  * @returns: %TRUE if @application is remote
14150  *
14151  * Checks if @application is remote.
14152  * If @application is remote then it means that another instance of
14153  * application already exists (the 'primary' instance).  Calls to
14154  * perform actions on @application will result in the actions being
14155  * performed by the primary instance.
14156  * The value of this property cannot be accessed before
14157  * g_application_register() has been called.  See
14158  * g_application_get_is_registered().
14159  *
14160  * Since: 2.28
14161  */
14162
14163
14164 /**
14165  * g_application_hold:
14166  * @application: a #GApplication
14167  *
14168  * Increases the use count of @application.
14169  * Use this function to indicate that the application has a reason to
14170  * continue to run.  For example, g_application_hold() is called by GTK+
14171  * when a toplevel window is on the screen.
14172  * To cancel the hold, call g_application_release().
14173  */
14174
14175
14176 /**
14177  * g_application_id_is_valid:
14178  * @application_id: a potential application identifier
14179  * @returns: %TRUE if @application_id is valid
14180  *
14181  * Checks if @application_id is a valid application identifier.
14182  * A valid ID is required for calls to g_application_new() and
14183  * g_application_set_application_id().
14184  * For convenience, the restrictions on application identifiers are
14185  * reproduced here:
14186  * <itemizedlist>
14187  * <listitem>Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-." and must not begin with a digit.</listitem>
14188  * <listitem>Application identifiers must contain at least one '.' (period) character (and thus at least three elements).</listitem>
14189  * <listitem>Application identifiers must not begin or end with a '.' (period) character.</listitem>
14190  * <listitem>Application identifiers must not contain consecutive '.' (period) characters.</listitem>
14191  * <listitem>Application identifiers must not exceed 255 characters.</listitem>
14192  * </itemizedlist>
14193  */
14194
14195
14196 /**
14197  * g_application_new:
14198  * @application_id: the application id
14199  * @flags: the application flags
14200  * @returns: a new #GApplication instance
14201  *
14202  * Creates a new #GApplication instance.
14203  * This function calls g_type_init() for you.
14204  * The application id must be valid.  See g_application_id_is_valid().
14205  */
14206
14207
14208 /**
14209  * g_application_open:
14210  * @application: a #GApplication
14211  * @files: (array length=n_files): an array of #GFiles to open
14212  * @n_files: the length of the @files array
14213  * @hint: a hint (or ""), but never %NULL
14214  *
14215  * Opens the given files.
14216  * In essence, this results in the #GApplication::open signal being emitted
14217  * in the primary instance.
14218  * intended to be used by applications that have multiple modes for
14219  * for this functionality, you should use "".
14220  * The application must be registered before calling this function
14221  * and it must have the %G_APPLICATION_HANDLES_OPEN flag set.
14222  *
14223  * Opening files (eg: "view" vs "edit", etc).  Unless you have a need
14224  * Since: 2.28
14225  */
14226
14227
14228 /**
14229  * g_application_register:
14230  * @application: a #GApplication
14231  * @cancellable: a #GCancellable, or %NULL
14232  * @error: a pointer to a NULL #GError, or %NULL
14233  * @returns: %TRUE if registration succeeded
14234  *
14235  * Attempts registration of the application.
14236  * This is the point at which the application discovers if it is the
14237  * primary instance or merely acting as a remote for an already-existing
14238  * primary instance.  This is implemented by attempting to acquire the
14239  * application identifier as a unique bus name on the session bus using
14240  * GDBus.
14241  * Due to the internal architecture of GDBus, method calls can be
14242  * dispatched at any time (even if a main loop is not running).  For
14243  * this reason, you must ensure that any object paths that you wish to
14244  * register are registered before calling this function.
14245  * If the application has already been registered then %TRUE is
14246  * returned with no work performed.
14247  * The #GApplication::startup signal is emitted if registration succeeds
14248  * and @application is the primary instance.
14249  * In the event of an error (such as @cancellable being cancelled, or a
14250  * failure to connect to the session bus), %FALSE is returned and @error
14251  * is set appropriately.
14252  * instance is or is not the primary instance of the application.  See
14253  * g_application_get_is_remote() for that.
14254  *
14255  * Note: the return value of this function is not an indicator that this
14256  * Since: 2.28
14257  */
14258
14259
14260 /**
14261  * g_application_release:
14262  * @application: a #GApplication
14263  *
14264  * Decrease the use count of @application.
14265  * When the use count reaches zero, the application will stop running.
14266  * Never call this function except to cancel the effect of a previous
14267  * call to g_application_hold().
14268  */
14269
14270
14271 /**
14272  * g_application_run:
14273  * @application: a #GApplication
14274  * @argc: the argc from main() (or 0 if @argv is %NULL)
14275  * @argv: (array length=argc) (allow-none): the argv from main(), or %NULL
14276  * @returns: the exit status
14277  *
14278  * Runs the application.
14279  * This function is intended to be run from main() and its return value
14280  * is intended to be returned by main(). Although you are expected to pass
14281  * the @argc, @argv parameters from main() to this function, it is possible
14282  * to pass %NULL if @argv is not available or commandline handling is not
14283  * required.
14284  * First, the local_command_line() virtual function is invoked.
14285  * This function always runs on the local instance. It gets passed a pointer
14286  * to a %NULL-terminated copy of @argv and is expected to remove the arguments
14287  * that it handled (shifting up remaining arguments). See
14288  * <xref linkend="gapplication-example-cmdline2"/> for an example of
14289  * parsing @argv manually. Alternatively, you may use the #GOptionContext API,
14290  * after setting <literal>argc = g_strv_length (argv);</literal>.
14291  * The last argument to local_command_line() is a pointer to the @status
14292  * variable which can used to set the exit status that is returned from
14293  * g_application_run().
14294  * If local_command_line() returns %TRUE, the command line is expected
14295  * to be completely handled, including possibly registering as the primary
14296  * instance, calling g_application_activate() or g_application_open(), etc.
14297  * If local_command_line() returns %FALSE then the application is registered
14298  * and the #GApplication::command-line signal is emitted in the primary
14299  * instance (which may or may not be this instance). The signal handler
14300  * gets passed a #GApplicationCommandline object that (among other things)
14301  * contains the remaining commandline arguments that have not been handled
14302  * by local_command_line().
14303  * If the application has the %G_APPLICATION_HANDLES_COMMAND_LINE
14304  * flag set then the default implementation of local_command_line()
14305  * always returns %FALSE immediately, resulting in the commandline
14306  * always being handled in the primary instance.
14307  * Otherwise, the default implementation of local_command_line() tries
14308  * to do a couple of things that are probably reasonable for most
14309  * applications.  First, g_application_register() is called to attempt
14310  * to register the application.  If that works, then the command line
14311  * arguments are inspected.  If no commandline arguments are given, then
14312  * g_application_activate() is called.  If commandline arguments are
14313  * given and the %G_APPLICATION_HANDLES_OPEN flag is set then they
14314  * are assumed to be filenames and g_application_open() is called.
14315  * If you need to handle commandline arguments that are not filenames,
14316  * and you don't mind commandline handling to happen in the primary
14317  * instance, you should set %G_APPLICATION_HANDLED_COMMAND_LINE and
14318  * process the commandline arguments in your #GApplication::command-line
14319  * signal handler, either manually or using the #GOptionContext API.
14320  * If you are interested in doing more complicated local handling of the
14321  * commandline then you should implement your own #GApplication subclass
14322  * and override local_command_line(). In this case, you most likely want
14323  * to return %TRUE from your local_command_line() implementation to
14324  * suppress the default handling. See
14325  * <xref linkend="gapplication-example-cmdline2"/> for an example.
14326  * If, after the above is done, the use count of the application is zero
14327  * then the exit status is returned immediately.  If the use count is
14328  * non-zero then the mainloop is run until the use count falls to zero,
14329  * at which point 0 is returned.
14330  * If the %G_APPLICATION_IS_SERVICE flag is set, then the exiting at
14331  * around to provide its <emphasis>service</emphasis> to others).
14332  *
14333  * Use count of zero is delayed for a while (ie: the instance stays
14334  * Since: 2.28
14335  */
14336
14337
14338 /**
14339  * g_application_set_action_group:
14340  * @application: a #GApplication
14341  * @action_group: (allow-none): a #GActionGroup, or %NULL
14342  *
14343  * Sets or unsets the group of actions associated with the application.
14344  * These actions are the actions that can be remotely invoked.
14345  * It is an error to call this function after the application has been
14346  * registered.
14347  *
14348  * Since: 2.28
14349  */
14350
14351
14352 /**
14353  * g_application_set_application_id:
14354  * @application: a #GApplication
14355  * @application_id: the identifier for @application
14356  *
14357  * Sets the unique identifier for @application.
14358  * The application id can only be modified if @application has not yet
14359  * been registered.
14360  * The application id must be valid.  See g_application_id_is_valid().
14361  *
14362  * Since: 2.28
14363  */
14364
14365
14366 /**
14367  * g_application_set_flags:
14368  * @application: a #GApplication
14369  * @flags: the flags for @application
14370  *
14371  * Sets the flags for @application.
14372  * The flags can only be modified if @application has not yet been
14373  * registered.
14374  * See #GApplicationFlags.
14375  *
14376  * Since: 2.28
14377  */
14378
14379
14380 /**
14381  * g_application_set_inactivity_timeout:
14382  * @application: a #GApplication
14383  * @inactivity_timeout: the timeout, in milliseconds
14384  *
14385  * Sets the current inactivity timeout for the application.
14386  * This is the amount of time (in milliseconds) after the last call to
14387  * g_application_release() before the application stops running.
14388  * This call has no side effects of its own.  The value set here is only
14389  * used for next time g_application_release() drops the use count to
14390  * zero.  Any timeouts currently in progress are not impacted.
14391  *
14392  * Returns: the timeout, in milliseconds
14393  * Since: 2.28
14394  */
14395
14396
14397 /**
14398  * g_async_initable_init_async:
14399  * @initable: a #GAsyncInitable.
14400  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14401  * @cancellable: optional #GCancellable object, %NULL to ignore.
14402  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
14403  * @user_data: the data to pass to callback function
14404  *
14405  * Starts asynchronous initialization of the object implementing the
14406  * interface. This must be done before any real use of the object after
14407  * initial construction. If the object also implements #GInitable you can
14408  * optionally call g_initable_init() instead.
14409  * When the initialization is finished, @callback will be called. You can
14410  * then call g_async_initable_init_finish() to get the result of the
14411  * initialization.
14412  * Implementations may also support cancellation. If @cancellable is not
14413  * %NULL, then initialization can be cancelled by triggering the cancellable
14414  * object from another thread. If the operation was cancelled, the error
14415  * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
14416  * the object doesn't support cancellable initialization, the error
14417  * %G_IO_ERROR_NOT_SUPPORTED will be returned.
14418  * If this function is not called, or returns with an error, then all
14419  * operations on the object should fail, generally returning the
14420  * error %G_IO_ERROR_NOT_INITIALIZED.
14421  * to this function with the same argument should return the same results.
14422  * Only the first call initializes the object; further calls return the result
14423  * of the first call. This is so that it's safe to implement the singleton
14424  * pattern in the GObject constructor function.
14425  * For classes that also support the #GInitable interface, the default
14426  * implementation of this method will run the g_initable_init() function
14427  * in a thread, so if you want to support asynchronous initialization via
14428  * threads, just implement the #GAsyncInitable interface without overriding
14429  * any interface methods.
14430  *
14431  * Implementations of this method must be idempotent: i.e. multiple calls
14432  * Since: 2.22
14433  */
14434
14435
14436 /**
14437  * g_async_initable_init_finish:
14438  * @initable: a #GAsyncInitable.
14439  * @res: a #GAsyncResult.
14440  * @error: a #GError location to store the error occuring, or %NULL to ignore.
14441  *
14442  * Finishes asynchronous initialization and returns the result.
14443  * See g_async_initable_init_async().
14444  * will return %FALSE and set @error appropriately if present.
14445  *
14446  * Returns: %TRUE if successful. If an error has occurred, this function
14447  * Since: 2.22
14448  */
14449
14450
14451 /**
14452  * g_async_initable_new_async:
14453  * @object_type: a #GType supporting #GAsyncInitable.
14454  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14455  * @cancellable: optional #GCancellable object, %NULL to ignore.
14456  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
14457  * @user_data: the data to pass to callback function
14458  * @first_property_name: the name of the first property, or %NULL if no properties
14459  * @...: the value of the first property, followed by other property value pairs, and ended by %NULL.
14460  *
14461  * Helper function for constructing #GAsyncInitiable object. This is
14462  * similar to g_object_new() but also initializes the object asynchronously.
14463  * When the initialization is finished, @callback will be called. You can
14464  * then call g_async_initable_new_finish() to get the new object and check
14465  * for any errors.
14466  *
14467  * Since: 2.22
14468  */
14469
14470
14471 /**
14472  * g_async_initable_new_finish:
14473  * @initable: the #GAsyncInitable from the callback
14474  * @res: the #GAsyncResult.from the callback
14475  * @error: a #GError location to store the error occuring, or %NULL to ignore.
14476  *
14477  * Finishes the async construction for the various g_async_initable_new calls,
14478  * returning the created object or %NULL on error.
14479  * g_object_unref().
14480  *
14481  * Returns: (transfer full): a newly created #GObject, or %NULL on error. Free with
14482  * Since: 2.22
14483  */
14484
14485
14486 /**
14487  * g_async_initable_new_valist_async:
14488  * @object_type: a #GType supporting #GAsyncInitable.
14489  * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
14490  * @var_args: The var args list generated from @first_property_name.
14491  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14492  * @cancellable: optional #GCancellable object, %NULL to ignore.
14493  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
14494  * @user_data: the data to pass to callback function
14495  *
14496  * Helper function for constructing #GAsyncInitiable object. This is
14497  * similar to g_object_new_valist() but also initializes the object
14498  * asynchronously.
14499  * When the initialization is finished, @callback will be called. You can
14500  * then call g_async_initable_new_finish() to get the new object and check
14501  * for any errors.
14502  *
14503  * Since: 2.22
14504  */
14505
14506
14507 /**
14508  * g_async_initable_newv_async:
14509  * @object_type: a #GType supporting #GAsyncInitable.
14510  * @n_parameters: the number of parameters in @parameters
14511  * @parameters: the parameters to use to construct the object
14512  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14513  * @cancellable: optional #GCancellable object, %NULL to ignore.
14514  * @callback: a #GAsyncReadyCallback to call when the initialization is finished
14515  * @user_data: the data to pass to callback function
14516  *
14517  * Helper function for constructing #GAsyncInitiable object. This is
14518  * similar to g_object_newv() but also initializes the object asynchronously.
14519  * When the initialization is finished, @callback will be called. You can
14520  * then call g_async_initable_new_finish() to get the new object and check
14521  * for any errors.
14522  *
14523  * Since: 2.22
14524  */
14525
14526
14527 /**
14528  * g_async_result_get_source_object:
14529  * @res: a #GAsyncResult
14530  *
14531  * Gets the source object from a #GAsyncResult.
14532  * or %NULL if there is none.
14533  *
14534  * Returns: (transfer full): a new reference to the source object for the @res,
14535  */
14536
14537
14538 /**
14539  * g_async_result_get_user_data:
14540  * @res: a #GAsyncResult.
14541  *
14542  * Gets the user data from a #GAsyncResult.
14543  *
14544  * Returns: (transfer full): the user data for @res.
14545  */
14546
14547
14548 /**
14549  * g_atomic_int_dec_and_test:
14550  * @atomic: a pointer to an integer
14551  *
14552  * Atomically decrements the integer pointed to by @atomic by 1.
14553  * after decrementing it
14554  *
14555  * Returns: %TRUE if the integer pointed to by @atomic is 0
14556  * Since: 2.4
14557  */
14558
14559
14560 /**
14561  * g_atomic_int_inc:
14562  * @atomic: a pointer to an integer.
14563  *
14564  * Atomically increments the integer pointed to by @atomic by 1.
14565  *
14566  * Since: 2.4
14567  */
14568
14569
14570 /**
14571  * g_buffered_input_stream_fill:
14572  * @stream: a #GBufferedInputStream
14573  * @count: the number of bytes that will be read from the stream
14574  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
14575  * @error: location to store the error occuring, or %NULL to ignore
14576  *
14577  * Tries to read @count bytes from the stream into the buffer.
14578  * Will block during this read.
14579  * If @count is zero, returns zero and does nothing. A value of @count
14580  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
14581  * On success, the number of bytes read into the buffer is returned.
14582  * It is not an error if this is not the same as the requested size, as it
14583  * can happen e.g. near the end of a file. Zero is returned on end of file
14584  * (or if @count is zero),  but never otherwise.
14585  * If @count is -1 then the attempted read size is equal to the number of
14586  * bytes that are required to fill the buffer.
14587  * If @cancellable is not %NULL, then the operation can be cancelled by
14588  * triggering the cancellable object from another thread. If the operation
14589  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
14590  * operation was partially finished when the operation was cancelled the
14591  * partial result will be returned, without an error.
14592  * On error -1 is returned and @error is set accordingly.
14593  * For the asynchronous, non-blocking, version of this function, see
14594  * g_buffered_input_stream_fill_async().
14595  * or -1 on error.
14596  *
14597  * Returns: the number of bytes read into @stream's buffer, up to @count,
14598  */
14599
14600
14601 /**
14602  * g_buffered_input_stream_fill_async:
14603  * @stream: a #GBufferedInputStream
14604  * @count: the number of bytes that will be read from the stream
14605  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
14606  * @cancellable: (allow-none): optional #GCancellable object
14607  * @callback: (scope async): a #GAsyncReadyCallback
14608  * @user_data: (closure): a #gpointer
14609  *
14610  * Reads data into @stream's buffer asynchronously, up to @count size.
14611  * version of this function, see g_buffered_input_stream_fill().
14612  * If @count is -1 then the attempted read size is equal to the number
14613  * of bytes that are required to fill the buffer.
14614  */
14615
14616
14617 /**
14618  * g_buffered_input_stream_fill_finish:
14619  * @stream: a #GBufferedInputStream
14620  * @result: a #GAsyncResult
14621  * @error: a #GError
14622  *
14623  * Finishes an asynchronous read.
14624  *
14625  * Returns: a #gssize of the read stream, or %-1 on an error.
14626  */
14627
14628
14629 /**
14630  * g_buffered_input_stream_get_available:
14631  * @stream: #GBufferedInputStream
14632  *
14633  * Gets the size of the available data within the stream.
14634  *
14635  * Returns: size of the available stream.
14636  */
14637
14638
14639 /**
14640  * g_buffered_input_stream_get_buffer_size:
14641  * @stream: a #GBufferedInputStream
14642  *
14643  * Gets the size of the input buffer.
14644  *
14645  * Returns: the current buffer size.
14646  */
14647
14648
14649 /**
14650  * g_buffered_input_stream_new:
14651  * @base_stream: a #GInputStream
14652  *
14653  * Creates a new #GInputStream from the given @base_stream, with
14654  * a buffer set to the default size (4 kilobytes).
14655  *
14656  * Returns: a #GInputStream for the given @base_stream.
14657  */
14658
14659
14660 /**
14661  * g_buffered_input_stream_new_sized:
14662  * @base_stream: a #GInputStream
14663  * @size: a #gsize
14664  *
14665  * Creates a new #GBufferedInputStream from the given @base_stream,
14666  * with a buffer set to @size.
14667  *
14668  * Returns: a #GInputStream.
14669  */
14670
14671
14672 /**
14673  * g_buffered_input_stream_peek:
14674  * @stream: a #GBufferedInputStream
14675  * @buffer: a pointer to an allocated chunk of memory
14676  * @offset: a #gsize
14677  * @count: a #gsize
14678  *
14679  * Peeks in the buffer, copying data of size @count into @buffer,
14680  * offset @offset bytes.
14681  *
14682  * Returns: a #gsize of the number of bytes peeked, or -1 on error.
14683  */
14684
14685
14686 /**
14687  * g_buffered_input_stream_peek_buffer:
14688  * @stream: a #GBufferedInputStream
14689  * @count: (out): a #gsize to get the number of bytes available in the buffer
14690  *
14691  * Returns the buffer with the currently available bytes. The returned
14692  * buffer must not be modified and will become invalid when reading from
14693  * the stream or filling the buffer.
14694  * read-only buffer
14695  *
14696  * Returns: (array length=count) (element-type guint8) (transfer none):
14697  */
14698
14699
14700 /**
14701  * g_buffered_input_stream_read_byte:
14702  * @stream: a #GBufferedInputStream
14703  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
14704  * @error: location to store the error occuring, or %NULL to ignore
14705  *
14706  * Tries to read a single byte from the stream or the buffer. Will block
14707  * during this read.
14708  * On success, the byte read from the stream is returned. On end of stream
14709  * -1 is returned but it's not an exceptional error and @error is not set.
14710  * If @cancellable is not %NULL, then the operation can be cancelled by
14711  * triggering the cancellable object from another thread. If the operation
14712  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
14713  * operation was partially finished when the operation was cancelled the
14714  * partial result will be returned, without an error.
14715  * On error -1 is returned and @error is set accordingly.
14716  *
14717  * Returns: the byte read from the @stream, or -1 on end of stream or error.
14718  */
14719
14720
14721 /**
14722  * g_buffered_input_stream_set_buffer_size:
14723  * @stream: a #GBufferedInputStream
14724  * @size: a #gsize
14725  *
14726  * Sets the size of the internal buffer of @stream to @size, or to the
14727  * size of the contents of the buffer. The buffer can never be resized
14728  * smaller than its current contents.
14729  */
14730
14731
14732 /**
14733  * g_buffered_output_stream_get_auto_grow:
14734  * @stream: a #GBufferedOutputStream.
14735  *
14736  * Checks if the buffer automatically grows as data is added.
14737  * %FALSE otherwise.
14738  *
14739  * Returns: %TRUE if the @stream's buffer automatically grows,
14740  */
14741
14742
14743 /**
14744  * g_buffered_output_stream_get_buffer_size:
14745  * @stream: a #GBufferedOutputStream.
14746  *
14747  * Gets the size of the buffer in the @stream.
14748  *
14749  * Returns: the current size of the buffer.
14750  */
14751
14752
14753 /**
14754  * g_buffered_output_stream_new:
14755  * @base_stream: a #GOutputStream.
14756  *
14757  * Creates a new buffered output stream for a base stream.
14758  *
14759  * Returns: a #GOutputStream for the given @base_stream.
14760  */
14761
14762
14763 /**
14764  * g_buffered_output_stream_new_sized:
14765  * @base_stream: a #GOutputStream.
14766  * @size: a #gsize.
14767  *
14768  * Creates a new buffered output stream with a given buffer size.
14769  *
14770  * Returns: a #GOutputStream with an internal buffer set to @size.
14771  */
14772
14773
14774 /**
14775  * g_buffered_output_stream_set_auto_grow:
14776  * @stream: a #GBufferedOutputStream.
14777  * @auto_grow: a #gboolean.
14778  *
14779  * Sets whether or not the @stream's buffer should automatically grow.
14780  * If @auto_grow is true, then each write will just make the buffer
14781  * larger, and you must manually flush the buffer to actually write out
14782  * the data to the underlying stream.
14783  */
14784
14785
14786 /**
14787  * g_buffered_output_stream_set_buffer_size:
14788  * @stream: a #GBufferedOutputStream.
14789  * @size: a #gsize.
14790  *
14791  * Sets the size of the internal buffer to @size.
14792  */
14793
14794
14795 /**
14796  * g_bus_get:
14797  * @bus_type: A #GBusType.
14798  * @cancellable: A #GCancellable or %NULL.
14799  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
14800  * @user_data: The data to pass to @callback.
14801  *
14802  * Asynchronously connects to the message bus specified by @bus_type.
14803  * When the operation is finished, @callback will be invoked. You can
14804  * then call g_bus_get_finish() to get the result of the operation.
14805  * This is a asynchronous failable function. See g_bus_get_sync() for
14806  * the synchronous version.
14807  *
14808  * Since: 2.26
14809  */
14810
14811
14812 /**
14813  * g_bus_get_finish:
14814  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_bus_get().
14815  * @error: Return location for error or %NULL.
14816  *
14817  * Finishes an operation started with g_bus_get().
14818  * The returned object is a singleton, that is, shared with other
14819  * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
14820  * event that you need a private message bus connection, use
14821  * g_dbus_address_get_for_bus() and
14822  * g_dbus_connection_new_for_address().
14823  * Note that the returned #GDBusConnection object will (usually) have
14824  * the #GDBusConnection:exit-on-close property set to %TRUE.
14825  *
14826  * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
14827  * Since: 2.26
14828  */
14829
14830
14831 /**
14832  * g_bus_get_sync:
14833  * @bus_type: A #GBusType.
14834  * @cancellable: A #GCancellable or %NULL.
14835  * @error: Return location for error or %NULL.
14836  *
14837  * Synchronously connects to the message bus specified by @bus_type.
14838  * Note that the returned object may shared with other callers,
14839  * e.g. if two separate parts of a process calls this function with
14840  * the same @bus_type, they will share the same object.
14841  * This is a synchronous failable function. See g_bus_get() and
14842  * g_bus_get_finish() for the asynchronous version.
14843  * The returned object is a singleton, that is, shared with other
14844  * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
14845  * event that you need a private message bus connection, use
14846  * g_dbus_address_get_for_bus_sync() and
14847  * g_dbus_connection_new_for_address().
14848  * Note that the returned #GDBusConnection object will (usually) have
14849  * the #GDBusConnection:exit-on-close property set to %TRUE.
14850  *
14851  * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
14852  * Since: 2.26
14853  */
14854
14855
14856 /**
14857  * g_bus_own_name:
14858  * @bus_type: The type of bus to own a name on.
14859  * @name: The well-known name to own.
14860  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14861  * @bus_acquired_handler: Handler to invoke when connected to the bus of type @bus_type or %NULL.
14862  * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
14863  * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
14864  * @user_data: User data to pass to handlers.
14865  * @user_data_free_func: Function for freeing @user_data or %NULL.
14866  *
14867  * Starts acquiring @name on the bus specified by @bus_type and calls
14868  * acquired respectively lost. Callbacks will be invoked in the <link
14869  * linkend="g-main-context-push-thread-default">thread-default main
14870  * loop</link> of the thread you are calling this function from.
14871  * You are guaranteed that one of the @name_acquired_handler and @name_lost_handler
14872  * callbacks will be invoked after calling this function - there are three
14873  * possible cases:
14874  * <itemizedlist>
14875  * <listitem><para>
14876  * </para></listitem>
14877  * <listitem><para>
14878  * </para></listitem>
14879  * <listitem><para>
14880  * </para></listitem>
14881  * </itemizedlist>
14882  * When you are done owning the name, just call g_bus_unown_name()
14883  * with the owner id this function returns.
14884  * If the name is acquired or lost (for example another application
14885  * could acquire the name if you allow replacement or the application
14886  * currently owning the name exits), the handlers are also invoked. If the
14887  * #GDBusConnection that is used for attempting to own the name
14888  * closes, then @name_lost_handler is invoked since it is no
14889  * longer possible for other processes to access the process.
14890  * You cannot use g_bus_own_name() several times for the same name (unless
14891  * interleaved with calls to g_bus_unown_name()) - only the first call
14892  * will work.
14893  * Another guarantee is that invocations of @name_acquired_handler
14894  * and @name_lost_handler are guaranteed to alternate; that
14895  * is, if @name_acquired_handler is invoked then you are
14896  * guaranteed that the next time one of the handlers is invoked, it
14897  * will be @name_lost_handler. The reverse is also true.
14898  * If you plan on exporting objects (using e.g.
14899  * g_dbus_connection_register_object()), note that it is generally too late
14900  * to export the objects in @name_acquired_handler. Instead, you can do this
14901  * in @bus_acquired_handler since you are guaranteed that this will run
14902  * before @name is requested from the bus.
14903  * This behavior makes it very simple to write applications that wants
14904  * to own names and export objects, see <xref linkend="gdbus-owning-names"/>.
14905  * Simply register objects to be exported in @bus_acquired_handler and
14906  * unregister the objects (if any) in @name_lost_handler.
14907  * g_bus_unown_name() to stop owning the name.
14908  *
14909  * Returns: An identifier (never 0) that an be used with
14910  * Since: 2.26
14911  */
14912
14913
14914 /**
14915  * g_bus_own_name_on_connection:
14916  * @connection: A #GDBusConnection.
14917  * @name: The well-known name to own.
14918  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14919  * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
14920  * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
14921  * @user_data: User data to pass to handlers.
14922  * @user_data_free_func: Function for freeing @user_data or %NULL.
14923  *
14924  * Like g_bus_own_name() but takes a #GDBusConnection instead of a
14925  * #GBusType.
14926  * g_bus_unown_name() to stop owning the name.
14927  *
14928  * Returns: An identifier (never 0) that an be used with
14929  * Since: 2.26
14930  */
14931
14932
14933 /**
14934  * g_bus_own_name_on_connection_with_closures:
14935  * @connection: A #GDBusConnection.
14936  * @name: The well-known name to own.
14937  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14938  * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
14939  * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
14940  *
14941  * Version of g_bus_own_name_on_connection() using closures instead of callbacks for
14942  * easier binding in other languages.
14943  * g_bus_unown_name() to stop owning the name.
14944  *
14945  * Returns: An identifier (never 0) that an be used with
14946  * Rename to: g_bus_own_name_on_connection
14947  * Since: 2.26
14948  */
14949
14950
14951 /**
14952  * g_bus_own_name_with_closures:
14953  * @bus_type: The type of bus to own a name on.
14954  * @name: The well-known name to own.
14955  * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14956  * @bus_acquired_closure: (allow-none): #GClosure to invoke when connected to the bus of type @bus_type or %NULL.
14957  * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
14958  * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
14959  *
14960  * Version of g_bus_own_name() using closures instead of callbacks for
14961  * easier binding in other languages.
14962  * g_bus_unown_name() to stop owning the name.
14963  *
14964  * Returns: An identifier (never 0) that an be used with
14965  * Rename to: g_bus_own_name
14966  * Since: 2.26
14967  */
14968
14969
14970 /**
14971  * g_bus_unown_name:
14972  * @owner_id: An identifier obtained from g_bus_own_name()
14973  *
14974  * Stops owning a name.
14975  *
14976  * Since: 2.26
14977  */
14978
14979
14980 /**
14981  * g_bus_unwatch_name:
14982  * @watcher_id: An identifier obtained from g_bus_watch_name()
14983  *
14984  * Stops watching a name.
14985  *
14986  * Since: 2.26
14987  */
14988
14989
14990 /**
14991  * g_bus_watch_name:
14992  * @bus_type: The type of bus to watch a name on.
14993  * @name: The name (well-known or unique) to watch.
14994  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
14995  * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
14996  * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
14997  * @user_data: User data to pass to handlers.
14998  * @user_data_free_func: Function for freeing @user_data or %NULL.
14999  *
15000  * Starts watching @name on the bus specified by @bus_type and calls
15001  * known to have a owner respectively known to lose its
15002  * owner. Callbacks will be invoked in the <link
15003  * linkend="g-main-context-push-thread-default">thread-default main
15004  * loop</link> of the thread you are calling this function from.
15005  * You are guaranteed that one of the handlers will be invoked after
15006  * calling this function. When you are done watching the name, just
15007  * call g_bus_unwatch_name() with the watcher id this function
15008  * returns.
15009  * If the name vanishes or appears (for example the application owning
15010  * the name could restart), the handlers are also invoked. If the
15011  * #GDBusConnection that is used for watching the name disconnects, then
15012  * possible to access the name.
15013  * Another guarantee is that invocations of @name_appeared_handler
15014  * and @name_vanished_handler are guaranteed to alternate; that
15015  * is, if @name_appeared_handler is invoked then you are
15016  * guaranteed that the next time one of the handlers is invoked, it
15017  * will be @name_vanished_handler. The reverse is also true.
15018  * This behavior makes it very simple to write applications that wants
15019  * to take action when a certain name exists, see <xref
15020  * linkend="gdbus-watching-names"/>. Basically, the application
15021  * should create object proxies in @name_appeared_handler and destroy
15022  * them again (if any) in @name_vanished_handler.
15023  * g_bus_unwatch_name() to stop watching the name.
15024  *
15025  * Returns: An identifier (never 0) that an be used with
15026  * Since: 2.26
15027  */
15028
15029
15030 /**
15031  * g_bus_watch_name_on_connection:
15032  * @connection: A #GDBusConnection.
15033  * @name: The name (well-known or unique) to watch.
15034  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
15035  * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
15036  * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
15037  * @user_data: User data to pass to handlers.
15038  * @user_data_free_func: Function for freeing @user_data or %NULL.
15039  *
15040  * Like g_bus_watch_name() but takes a #GDBusConnection instead of a
15041  * #GBusType.
15042  * g_bus_unwatch_name() to stop watching the name.
15043  *
15044  * Returns: An identifier (never 0) that an be used with
15045  * Since: 2.26
15046  */
15047
15048
15049 /**
15050  * g_bus_watch_name_on_connection_with_closures:
15051  * @connection: A #GDBusConnection.
15052  * @name: The name (well-known or unique) to watch.
15053  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
15054  * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
15055  * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
15056  *
15057  * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for
15058  * easier binding in other languages.
15059  * g_bus_unwatch_name() to stop watching the name.
15060  *
15061  * Returns: An identifier (never 0) that an be used with
15062  * Rename to: g_bus_watch_name_on_connection
15063  * Since: 2.26
15064  */
15065
15066
15067 /**
15068  * g_bus_watch_name_with_closures:
15069  * @bus_type: The type of bus to watch a name on.
15070  * @name: The name (well-known or unique) to watch.
15071  * @flags: Flags from the #GBusNameWatcherFlags enumeration.
15072  * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
15073  * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
15074  *
15075  * Version of g_bus_watch_name() using closures instead of callbacks for
15076  * easier binding in other languages.
15077  * g_bus_unwatch_name() to stop watching the name.
15078  *
15079  * Returns: An identifier (never 0) that an be used with
15080  * Rename to: g_bus_watch_name
15081  * Since: 2.26
15082  */
15083
15084
15085 /**
15086  * g_cancellable_cancel:
15087  * @cancellable: a #GCancellable object.
15088  *
15089  * Will set @cancellable to cancelled, and will emit the
15090  * #GCancellable::cancelled signal. (However, see the warning about
15091  * race conditions in the documentation for that signal if you are
15092  * planning to connect to it.)
15093  * This function is thread-safe. In other words, you can safely call
15094  * it from a thread other than the one running the operation that was
15095  * passed the @cancellable.
15096  * The convention within gio is that cancelling an asynchronous
15097  * operation causes it to complete asynchronously. That is, if you
15098  * cancel the operation from the same thread in which it is running,
15099  * then the operation's #GAsyncReadyCallback will not be invoked until
15100  * the application returns to the main loop.
15101  */
15102
15103
15104 /**
15105  * g_cancellable_connect:
15106  * @cancellable: A #GCancellable.
15107  * @callback: The #GCallback to connect.
15108  * @data: Data to pass to @callback.
15109  * @data_destroy_func: Free function for @data or %NULL.
15110  *
15111  * Convenience function to connect to the #GCancellable::cancelled
15112  * signal. Also handles the race condition that may happen
15113  * if the cancellable is cancelled right before connecting.
15114  * time of the connect if @cancellable is already cancelled,
15115  * or when @cancellable is cancelled in some thread.
15116  * disconnected, or immediately if the cancellable is already
15117  * cancelled.
15118  * See #GCancellable::cancelled for details on how to use this.
15119  * been cancelled.
15120  *
15121  * Returns: The id of the signal handler or 0 if @cancellable has already
15122  * Since: 2.22
15123  */
15124
15125
15126 /**
15127  * g_cancellable_disconnect:
15128  * @cancellable: A #GCancellable or %NULL.
15129  * @handler_id: Handler id of the handler to be disconnected, or %0.
15130  *
15131  * Disconnects a handler from a cancellable instance similar to
15132  * g_signal_handler_disconnect().  Additionally, in the event that a
15133  * signal handler is currently running, this call will block until the
15134  * handler has finished.  Calling this function from a
15135  * #GCancellable::cancelled signal handler will therefore result in a
15136  * deadlock.
15137  * This avoids a race condition where a thread cancels at the
15138  * same time as the cancellable operation is finished and the
15139  * signal handler is removed. See #GCancellable::cancelled for
15140  * details on how to use this.
15141  * If @cancellable is %NULL or @handler_id is %0 this function does
15142  * nothing.
15143  *
15144  * Since: 2.22
15145  */
15146
15147
15148 /**
15149  * g_cancellable_get_current:
15150  *
15151  * Gets the top cancellable from the stack.
15152  * if the stack is empty.
15153  *
15154  * Returns: (transfer none): a #GCancellable from the top of the stack, or %NULL
15155  */
15156
15157
15158 /**
15159  * g_cancellable_get_fd:
15160  * @cancellable: a #GCancellable.
15161  *
15162  * Gets the file descriptor for a cancellable job. This can be used to
15163  * implement cancellable operations on Unix systems. The returned fd will
15164  * turn readable when @cancellable is cancelled.
15165  * You are not supposed to read from the fd yourself, just check for
15166  * readable status. Reading to unset the readable status is done
15167  * with g_cancellable_reset().
15168  * After a successful return from this function, you should use
15169  * g_cancellable_release_fd() to free up resources allocated for
15170  * the returned file descriptor.
15171  * See also g_cancellable_make_pollfd().
15172  * is not supported, or on errors.
15173  *
15174  * Returns: A valid file descriptor. %-1 if the file descriptor
15175  */
15176
15177
15178 /**
15179  * g_cancellable_is_cancelled:
15180  * @cancellable: a #GCancellable or NULL.
15181  *
15182  * Checks if a cancellable job has been cancelled.
15183  * FALSE if called with %NULL or if item is not cancelled.
15184  *
15185  * Returns: %TRUE if @cancellable is cancelled,
15186  */
15187
15188
15189 /**
15190  * g_cancellable_make_pollfd:
15191  * @cancellable: a #GCancellable or %NULL
15192  * @pollfd: a pointer to a #GPollFD
15193  *
15194  * Creates a #GPollFD corresponding to @cancellable; this can be passed
15195  * to g_poll() and used to poll for cancellation. This is useful both
15196  * for unix systems without a native poll and for portability to
15197  * windows.
15198  * When this function returns %TRUE, you should use
15199  * g_cancellable_release_fd() to free up resources allocated for the
15200  * If this function returns %FALSE, either no @cancellable was given or
15201  * resource limits prevent this function from allocating the necessary
15202  * structures for polling. (On Linux, you will likely have reached
15203  * the maximum number of file descriptors.) The suggested way to handle
15204  * these cases is to ignore the @cancellable.
15205  * You are not supposed to read from the fd yourself, just check for
15206  * readable status. Reading to unset the readable status is done
15207  * with g_cancellable_reset().
15208  * failure to prepare the cancellable.
15209  *
15210  * Returns: %TRUE if @pollfd was successfully initialized, %FALSE on
15211  * Since: 2.22
15212  */
15213
15214
15215 /**
15216  * g_cancellable_new:
15217  *
15218  * Creates a new #GCancellable object.
15219  * Applications that want to start one or more operations
15220  * that should be cancellable should create a #GCancellable
15221  * and pass it to the operations.
15222  * One #GCancellable can be used in multiple consecutive
15223  * operations, but not in multiple concurrent operations.
15224  *
15225  * Returns: a #GCancellable.
15226  */
15227
15228
15229 /**
15230  * g_cancellable_pop_current:
15231  * @cancellable: a #GCancellable object
15232  *
15233  * Pops @cancellable off the cancellable stack (verifying that @cancellable
15234  * is on the top of the stack).
15235  */
15236
15237
15238 /**
15239  * g_cancellable_push_current:
15240  * @cancellable: a #GCancellable object
15241  *
15242  * Pushes @cancellable onto the cancellable stack. The current
15243  * cancellable can then be recieved using g_cancellable_get_current().
15244  * This is useful when implementing cancellable operations in
15245  * code that does not allow you to pass down the cancellable object.
15246  * This is typically called automatically by e.g. #GFile operations,
15247  * so you rarely have to call this yourself.
15248  */
15249
15250
15251 /**
15252  * g_cancellable_release_fd:
15253  * @cancellable: a #GCancellable
15254  *
15255  * Releases a resources previously allocated by g_cancellable_get_fd()
15256  * or g_cancellable_make_pollfd().
15257  * For compatibility reasons with older releases, calling this function
15258  * is not strictly required, the resources will be automatically freed
15259  * when the @cancellable is finalized. However, the @cancellable will
15260  * block scarce file descriptors until it is finalized if this function
15261  * is not called. This can cause the application to run out of file
15262  * descriptors when many #GCancellables are used at the same time.
15263  *
15264  * Since: 2.22
15265  */
15266
15267
15268 /**
15269  * g_cancellable_reset:
15270  * @cancellable: a #GCancellable object.
15271  *
15272  * Resets @cancellable to its uncancelled state.
15273  */
15274
15275
15276 /**
15277  * g_cancellable_set_error_if_cancelled:
15278  * @cancellable: a #GCancellable object.
15279  * @error: #GError to append error state to.
15280  *
15281  * If the @cancellable is cancelled, sets the error to notify
15282  * that the operation was cancelled.
15283  *
15284  * Returns: %TRUE if @cancellable was cancelled, %FALSE if it was not.
15285  */
15286
15287
15288 /**
15289  * g_cancellable_source_new: (skip)
15290  * @cancellable: a #GCancellable, or %NULL
15291  *
15292  * Creates a source that triggers if @cancellable is cancelled and
15293  * calls its callback of type #GCancellableSourceFunc. This is
15294  * primarily useful for attaching to another (non-cancellable) source
15295  * with g_source_add_child_source() to add cancellability to it.
15296  * For convenience, you can call this with a %NULL #GCancellable,
15297  * in which case the source will never trigger.
15298  *
15299  * Returns: (transfer full): the new #GSource.
15300  * Since: 2.28
15301  */
15302
15303
15304 /**
15305  * g_charset_converter_get_num_fallbacks:
15306  * @converter: a #GCharsetConverter
15307  *
15308  * Gets the number of fallbacks that @converter has applied so far.
15309  *
15310  * Returns: the number of fallbacks that @converter has applied
15311  * Since: 2.24
15312  */
15313
15314
15315 /**
15316  * g_charset_converter_get_use_fallback:
15317  * @converter: a #GCharsetConverter
15318  *
15319  * Gets the #GCharsetConverter:use-fallback property.
15320  *
15321  * Returns: %TRUE if fallbacks are used by @converter
15322  * Since: 2.24
15323  */
15324
15325
15326 /**
15327  * g_charset_converter_new:
15328  * @to_charset: destination charset
15329  * @from_charset: source charset
15330  * @error: #GError for error reporting, or %NULL to ignore.
15331  *
15332  * Creates a new #GCharsetConverter.
15333  *
15334  * Returns: a new #GCharsetConverter or %NULL on error.
15335  * Since: 2.24
15336  */
15337
15338
15339 /**
15340  * g_charset_converter_set_use_fallback:
15341  * @converter: a #GCharsetConverter
15342  * @use_fallback: %TRUE to use fallbacks
15343  *
15344  * Sets the #GCharsetConverter:use-fallback property.
15345  *
15346  * Since: 2.24
15347  */
15348
15349
15350 /**
15351  * g_content_type_can_be_executable:
15352  * @type: a content type string
15353  *
15354  * Checks if a content type can be executable. Note that for instance
15355  * things like text files can be executables (i.e. scripts and batch files).
15356  * can be executable, %FALSE otherwise.
15357  *
15358  * Returns: %TRUE if the file type corresponds to a type that
15359  */
15360
15361
15362 /**
15363  * g_content_type_equals:
15364  * @type1: a content type string
15365  * @type2: a content type string
15366  *
15367  * Compares two content types for equality.
15368  * %FALSE otherwise.
15369  *
15370  * Returns: %TRUE if the two strings are identical or equivalent,
15371  */
15372
15373
15374 /**
15375  * g_content_type_from_mime_type:
15376  * @mime_type: a mime type string
15377  *
15378  * Tries to find a content type based on the mime type name.
15379  * or %NULL. Free with g_free()
15380  *
15381  * Returns: (allow-none): Newly allocated string with content type
15382  * Since: 2.18
15383  */
15384
15385
15386 /**
15387  * g_content_type_get_description:
15388  * @type: a content type string
15389  *
15390  * Gets the human readable description of the content type.
15391  * returned string with g_free()
15392  *
15393  * Returns: a short description of the content type @type. Free the
15394  */
15395
15396
15397 /**
15398  * g_content_type_get_icon:
15399  * @type: a content type string
15400  *
15401  * Gets the icon for a content type.
15402  * object with g_object_unref()
15403  *
15404  * Returns: (transfer full): #GIcon corresponding to the content type. Free the returned
15405  */
15406
15407
15408 /**
15409  * g_content_type_get_mime_type:
15410  * @type: a content type string
15411  *
15412  * Gets the mime type for the content type, if one is registered.
15413  * or %NULL if unknown.
15414  *
15415  * Returns: (allow-none): the registered mime type for the given @type,
15416  */
15417
15418
15419 /**
15420  * g_content_type_guess:
15421  * @filename: (allow-none): a string, or %NULL
15422  * @data: (allow-none) (array length=data_size): a stream of data, or %NULL
15423  * @data_size: the size of @data
15424  * @result_uncertain: (allow-none) (out): return location for the certainty of the result, or %NULL
15425  *
15426  * Guesses the content type based on example data. If the function is
15427  * uncertain, @result_uncertain will be set to %TRUE. Either @filename
15428  * or @data may be %NULL, in which case the guess will be based solely
15429  * on the other argument.
15430  * given data. Free with g_free()
15431  *
15432  * Returns: a string indicating a guessed content type for the
15433  */
15434
15435
15436 /**
15437  * g_content_type_guess_for_tree:
15438  * @root: the root of the tree to guess a type for
15439  *
15440  * Tries to guess the type of the tree with root @root, by
15441  * looking at the files it contains. The result is an array
15442  * of content types, with the best guess coming first.
15443  * The types returned all have the form x-content/foo, e.g.
15444  * x-content/audio-cdda (for audio CDs) or x-content/image-dcf
15445  * (for a camera memory card). See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
15446  * specification for more on x-content types.
15447  * This function is useful in the implementation of
15448  * g_mount_guess_content_type().
15449  * array of zero or more content types, or %NULL. Free with g_strfreev()
15450  *
15451  * Returns: (transfer full) (array zero-terminated=1): an %NULL-terminated
15452  * Since: 2.18
15453  */
15454
15455
15456 /**
15457  * g_content_type_is_a:
15458  * @type: a content type string
15459  * @supertype: a content type string
15460  *
15461  * Determines if @type is a subset of @supertype.
15462  * %FALSE otherwise.
15463  *
15464  * Returns: %TRUE if @type is a kind of @supertype,
15465  */
15466
15467
15468 /**
15469  * g_content_type_is_unknown:
15470  * @type: a content type string
15471  *
15472  * Checks if the content type is the generic "unknown" type.
15473  * On UNIX this is the "application/octet-stream" mimetype,
15474  * while on win32 it is "*".
15475  *
15476  * Returns: %TRUE if the type is the unknown type.
15477  */
15478
15479
15480 /**
15481  * g_content_types_get_registered:
15482  *
15483  * Gets a list of strings containing all the registered content types
15484  * known to the system. The list and its data should be freed using
15485  * <programlisting>
15486  * g_list_foreach (list, g_free, NULL);
15487  * g_list_free (list);
15488  * </programlisting>
15489  *
15490  * Returns: (element-type utf8) (transfer full): #GList of the registered content types
15491  */
15492
15493
15494 /**
15495  * g_converter_convert:
15496  * @converter: a #GConverter.
15497  * @inbuf: (array length=inbuf_size) (element-type guint8): the buffer containing the data to convert.
15498  * @inbuf_size: the number of bytes in @inbuf
15499  * @outbuf: a buffer to write converted data in.
15500  * @outbuf_size: the number of bytes in @outbuf, must be at least one
15501  * @flags: a #GConvertFlags controlling the conversion details
15502  * @bytes_read: (out): will be set to the number of bytes read from @inbuf on success
15503  * @bytes_written: (out): will be set to the number of bytes written to @outbuf on success
15504  * @error: location to store the error occuring, or %NULL to ignore
15505  *
15506  * This is the main operation used when converting data. It is to be called
15507  * multiple times in a loop, and each time it will do some work, i.e.
15508  * producing some output (in @outbuf) or consuming some input (from @inbuf) or
15509  * both. If its not possible to do any work an error is returned.
15510  * Note that a single call may not consume all input (or any input at all).
15511  * Also a call may produce output even if given no input, due to state stored
15512  * in the converter producing output.
15513  * If any data was either produced or consumed, and then an error happens, then
15514  * only the successful conversion is reported and the error is returned on the
15515  * next call.
15516  * A full conversion loop involves calling this method repeatedly, each time
15517  * giving it new input and space output space. When there is no more input
15518  * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set.
15519  * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED
15520  * each time until all data is consumed and all output is produced, then
15521  * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED
15522  * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance
15523  * in a decompression converter where the end of data is detectable from the
15524  * data (and there might even be other data after the end of the compressed data).
15525  * When some data has successfully been converted @bytes_read and is set to
15526  * the number of bytes read from @inbuf, and @bytes_written is set to indicate
15527  * how many bytes was written to @outbuf. If there are more data to output
15528  * or consume (i.e. unless the G_CONVERTER_INPUT_AT_END is specified) then
15529  * G_CONVERTER_CONVERTED is returned, and if no more data is to be output
15530  * then G_CONVERTER_FINISHED is returned.
15531  * On error %G_CONVERTER_ERROR is returned and @error is set accordingly.
15532  * Some errors need special handling:
15533  * %G_IO_ERROR_NO_SPACE is returned if there is not enough space
15534  * to write the resulting converted data, the application should
15535  * call the function again with a larger @outbuf to continue.
15536  * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough
15537  * input to fully determine what the conversion should produce,
15538  * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for
15539  * example with an incomplete multibyte sequence when converting text,
15540  * or when a regexp matches up to the end of the input (and may match
15541  * further input). It may also happen when @inbuf_size is zero and
15542  * there is no more data to produce.
15543  * When this happens the application should read more input and then
15544  * call the function again. If further input shows that there is no
15545  * more data call the function again with the same data but with
15546  * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion
15547  * to finish as e.g. in the regexp match case (or, to fail again with
15548  * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the
15549  * input is actually partial).
15550  * After g_converter_convert() has returned %G_CONVERTER_FINISHED the
15551  * converter object is in an invalid state where its not allowed
15552  * to call g_converter_convert() anymore. At this time you can only
15553  * free the object or call g_converter_reset() to reset it to the
15554  * initial state.
15555  * If the flag %G_CONVERTER_FLUSH is set then conversion is modified
15556  * to try to write out all internal state to the output. The application
15557  * has to call the function multiple times with the flag set, and when
15558  * the availible input has been consumed and all internal state has
15559  * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if
15560  * really at the end) is returned instead of %G_CONVERTER_CONVERTED.
15561  * This is somewhat similar to what happens at the end of the input stream,
15562  * but done in the middle of the data.
15563  * This has different meanings for different conversions. For instance
15564  * in a compression converter it would mean that we flush all the
15565  * compression state into output such that if you uncompress the
15566  * compressed data you get back all the input data. Doing this may
15567  * make the final file larger due to padding though. Another example
15568  * is a regexp conversion, where if you at the end of the flushed data
15569  * have a match, but there is also a potential longer match. In the
15570  * non-flushed case we would ask for more input, but when flushing we
15571  * treat this as the end of input and do the match.
15572  * Flushing is not always possible (like if a charset converter flushes
15573  * at a partial multibyte sequence). Converters are supposed to try
15574  * to produce as much output as possible and then return an error
15575  * (typically %G_IO_ERROR_PARTIAL_INPUT).
15576  *
15577  * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error.
15578  * Since: 2.24
15579  */
15580
15581
15582 /**
15583  * g_converter_input_stream_get_converter:
15584  * @converter_stream: a #GConverterInputStream
15585  *
15586  * Gets the #GConverter that is used by @converter_stream.
15587  *
15588  * Returns: (transfer none): the converter of the converter input stream
15589  * Since: 2.24
15590  */
15591
15592
15593 /**
15594  * g_converter_input_stream_new:
15595  * @base_stream: a #GInputStream
15596  * @converter: a #GConverter
15597  *
15598  * Creates a new converter input stream for the @base_stream.
15599  *
15600  * Returns: a new #GInputStream.
15601  */
15602
15603
15604 /**
15605  * g_converter_output_stream_get_converter:
15606  * @converter_stream: a #GConverterOutputStream
15607  *
15608  * Gets the #GConverter that is used by @converter_stream.
15609  *
15610  * Returns: (transfer none): the converter of the converter output stream
15611  * Since: 2.24
15612  */
15613
15614
15615 /**
15616  * g_converter_output_stream_new:
15617  * @base_stream: a #GOutputStream
15618  * @converter: a #GConverter
15619  *
15620  * Creates a new converter output stream for the @base_stream.
15621  *
15622  * Returns: a new #GOutputStream.
15623  */
15624
15625
15626 /**
15627  * g_converter_reset:
15628  * @converter: a #GConverter.
15629  *
15630  * Resets all internal state in the converter, making it behave
15631  * as if it was just created. If the converter has any internal
15632  * state that would produce output then that output is lost.
15633  *
15634  * Since: 2.24
15635  */
15636
15637
15638 /**
15639  * g_credentials_get_native: (skip)
15640  * @credentials: A #GCredentials.
15641  * @native_type: The type of native credentials to get.
15642  *
15643  * Gets a pointer to native credentials of type @native_type from
15644  * It is a programming error (which will cause an warning to be
15645  * logged) to use this method if there is no #GCredentials support for
15646  * the OS or if @native_type isn't supported by the OS.
15647  * operation there is no #GCredentials support for the OS or if
15648  * data, it is owned by @credentials.
15649  *
15650  * Returns: The pointer to native credentials or %NULL if the
15651  * Since: 2.26
15652  */
15653
15654
15655 /**
15656  * g_credentials_get_unix_user:
15657  * @credentials: A #GCredentials
15658  * @error: Return location for error or %NULL.
15659  *
15660  * Tries to get the UNIX user identifier from @credentials. This
15661  * method is only available on UNIX platforms.
15662  * This operation can fail if #GCredentials is not supported on the
15663  * OS or if the native credentials type does not contain information
15664  * about the UNIX user.
15665  *
15666  * Returns: The UNIX user identifier or -1 if @error is set.
15667  * Since: 2.26
15668  */
15669
15670
15671 /**
15672  * g_credentials_is_same_user:
15673  * @credentials: A #GCredentials.
15674  * @other_credentials: A #GCredentials.
15675  * @error: Return location for error or %NULL.
15676  *
15677  * Checks if @credentials and @other_credentials is the same user.
15678  * This operation can fail if #GCredentials is not supported on the
15679  * the OS.
15680  * user, %FALSE otherwise or if @error is set.
15681  *
15682  * Returns: %TRUE if @credentials and @other_credentials has the same
15683  * Since: 2.26
15684  */
15685
15686
15687 /**
15688  * g_credentials_new:
15689  *
15690  * Creates a new #GCredentials object with credentials matching the
15691  * the current process.
15692  *
15693  * Returns: A #GCredentials. Free with g_object_unref().
15694  * Since: 2.26
15695  */
15696
15697
15698 /**
15699  * g_credentials_set_native:
15700  * @credentials: A #GCredentials.
15701  * @native_type: The type of native credentials to set.
15702  * @native: A pointer to native credentials.
15703  *
15704  * Copies the native credentials of type @native_type from @native
15705  * into @credentials.
15706  * It is a programming error (which will cause an warning to be
15707  * logged) to use this method if there is no #GCredentials support for
15708  * the OS or if @native_type isn't supported by the OS.
15709  *
15710  * Since: 2.26
15711  */
15712
15713
15714 /**
15715  * g_credentials_set_unix_user:
15716  * @credentials: A #GCredentials.
15717  * @uid: The UNIX user identifier to set.
15718  * @error: Return location for error or %NULL.
15719  *
15720  * Tries to set the UNIX user identifier on @credentials. This method
15721  * is only available on UNIX platforms.
15722  * This operation can fail if #GCredentials is not supported on the
15723  * OS or if the native credentials type does not contain information
15724  * about the UNIX user.
15725  *
15726  * Returns: %TRUE if @uid was set, %FALSE if error is set.
15727  * Since: 2.26
15728  */
15729
15730
15731 /**
15732  * g_credentials_to_string:
15733  * @credentials: A #GCredentials object.
15734  *
15735  * Creates a human-readable textual representation of @credentials
15736  * that can be used in logging and debug messages. The format of the
15737  * returned string may change in future GLib release.
15738  *
15739  * Returns: A string that should be freed with g_free().
15740  * Since: 2.26
15741  */
15742
15743
15744 /**
15745  * g_data_input_stream_get_byte_order:
15746  * @stream: a given #GDataInputStream.
15747  *
15748  * Gets the byte order for the data input stream.
15749  *
15750  * Returns: the @stream's current #GDataStreamByteOrder.
15751  */
15752
15753
15754 /**
15755  * g_data_input_stream_get_newline_type:
15756  * @stream: a given #GDataInputStream.
15757  *
15758  * Gets the current newline type for the @stream.
15759  *
15760  * Returns: #GDataStreamNewlineType for the given @stream.
15761  */
15762
15763
15764 /**
15765  * g_data_input_stream_new:
15766  * @base_stream: a #GInputStream.
15767  *
15768  * Creates a new data input stream for the @base_stream.
15769  *
15770  * Returns: a new #GDataInputStream.
15771  */
15772
15773
15774 /**
15775  * g_data_input_stream_read_byte:
15776  * @stream: a given #GDataInputStream.
15777  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15778  * @error: #GError for error reporting.
15779  *
15780  * Reads an unsigned 8-bit/1-byte value from @stream.
15781  * if an error occurred.
15782  *
15783  * Returns: an unsigned 8-bit/1-byte value read from the @stream or %0
15784  */
15785
15786
15787 /**
15788  * g_data_input_stream_read_int16:
15789  * @stream: a given #GDataInputStream.
15790  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15791  * @error: #GError for error reporting.
15792  *
15793  * Reads a 16-bit/2-byte value from @stream.
15794  * In order to get the correct byte order for this read operation,
15795  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15796  * an error occurred.
15797  *
15798  * Returns: a signed 16-bit/2-byte value read from @stream or %0 if
15799  */
15800
15801
15802 /**
15803  * g_data_input_stream_read_int32:
15804  * @stream: a given #GDataInputStream.
15805  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15806  * @error: #GError for error reporting.
15807  *
15808  * Reads a signed 32-bit/4-byte value from @stream.
15809  * In order to get the correct byte order for this read operation,
15810  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15811  * If @cancellable is not %NULL, then the operation can be cancelled by
15812  * triggering the cancellable object from another thread. If the operation
15813  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15814  * an error occurred.
15815  *
15816  * Returns: a signed 32-bit/4-byte value read from the @stream or %0 if
15817  */
15818
15819
15820 /**
15821  * g_data_input_stream_read_int64:
15822  * @stream: a given #GDataInputStream.
15823  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15824  * @error: #GError for error reporting.
15825  *
15826  * Reads a 64-bit/8-byte value from @stream.
15827  * In order to get the correct byte order for this read operation,
15828  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15829  * If @cancellable is not %NULL, then the operation can be cancelled by
15830  * triggering the cancellable object from another thread. If the operation
15831  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15832  * an error occurred.
15833  *
15834  * Returns: a signed 64-bit/8-byte value read from @stream or %0 if
15835  */
15836
15837
15838 /**
15839  * g_data_input_stream_read_line:
15840  * @stream: a given #GDataInputStream.
15841  * @length: (out): a #gsize to get the length of the data read in.
15842  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15843  * @error: #GError for error reporting.
15844  *
15845  * Reads a line from the data input stream.
15846  * If @cancellable is not %NULL, then the operation can be cancelled by
15847  * triggering the cancellable object from another thread. If the operation
15848  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15849  * (without the newlines).  Set @length to a #gsize to get the
15850  * length of the read line.  On an error, it will return %NULL and
15851  * still return %NULL, but @error won't be set.
15852  *
15853  * Returns: (transfer full): a string with the line that was read in
15854  */
15855
15856
15857 /**
15858  * g_data_input_stream_read_line_async:
15859  * @stream: a given #GDataInputStream.
15860  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
15861  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15862  * @callback: (scope async): callback to call when the request is satisfied.
15863  * @user_data: (closure): the data to pass to callback function.
15864  *
15865  * The asynchronous version of g_data_input_stream_read_line().  It is
15866  * an error to have two outstanding calls to this function.
15867  * When the operation is finished, @callback will be called. You
15868  * can then call g_data_input_stream_read_line_finish() to get
15869  * the result of the operation.
15870  *
15871  * Since: 2.20
15872  */
15873
15874
15875 /**
15876  * g_data_input_stream_read_line_finish:
15877  * @stream: a given #GDataInputStream.
15878  * @result: the #GAsyncResult that was provided to the callback.
15879  * @length: (out): a #gsize to get the length of the data read in.
15880  * @error: #GError for error reporting.
15881  *
15882  * Finish an asynchronous call started by
15883  * g_data_input_stream_read_line_async().
15884  * (without the newlines).  Set @length to a #gsize to get the
15885  * length of the read line.  On an error, it will return %NULL and
15886  * still return %NULL, but @error won't be set.
15887  *
15888  * Returns: (transfer full): a string with the line that was read in
15889  * Since: 2.20
15890  */
15891
15892
15893 /**
15894  * g_data_input_stream_read_uint16:
15895  * @stream: a given #GDataInputStream.
15896  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15897  * @error: #GError for error reporting.
15898  *
15899  * Reads an unsigned 16-bit/2-byte value from @stream.
15900  * In order to get the correct byte order for this read operation,
15901  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15902  * an error occurred.
15903  *
15904  * Returns: an unsigned 16-bit/2-byte value read from the @stream or %0 if
15905  */
15906
15907
15908 /**
15909  * g_data_input_stream_read_uint32:
15910  * @stream: a given #GDataInputStream.
15911  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15912  * @error: #GError for error reporting.
15913  *
15914  * Reads an unsigned 32-bit/4-byte value from @stream.
15915  * In order to get the correct byte order for this read operation,
15916  * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15917  * If @cancellable is not %NULL, then the operation can be cancelled by
15918  * triggering the cancellable object from another thread. If the operation
15919  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15920  * an error occurred.
15921  *
15922  * Returns: an unsigned 32-bit/4-byte value read from the @stream or %0 if
15923  */
15924
15925
15926 /**
15927  * g_data_input_stream_read_uint64:
15928  * @stream: a given #GDataInputStream.
15929  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15930  * @error: #GError for error reporting.
15931  *
15932  * Reads an unsigned 64-bit/8-byte value from @stream.
15933  * In order to get the correct byte order for this read operation,
15934  * see g_data_input_stream_get_byte_order().
15935  * If @cancellable is not %NULL, then the operation can be cancelled by
15936  * triggering the cancellable object from another thread. If the operation
15937  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15938  * an error occurred.
15939  *
15940  * Returns: an unsigned 64-bit/8-byte read from @stream or %0 if
15941  */
15942
15943
15944 /**
15945  * g_data_input_stream_read_until:
15946  * @stream: a given #GDataInputStream.
15947  * @stop_chars: characters to terminate the read.
15948  * @length: (out): a #gsize to get the length of the data read in.
15949  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15950  * @error: #GError for error reporting.
15951  *
15952  * Reads a string from the data input stream, up to the first
15953  * occurrence of any of the stop characters.
15954  * Note that, in contrast to g_data_input_stream_read_until_async(),
15955  * this function consumes the stop character that it finds.
15956  * Don't use this function in new code.  Its functionality is
15957  * inconsistent with g_data_input_stream_read_until_async().  Both
15958  * functions will be marked as deprecated in a future release.  Use
15959  * g_data_input_stream_read_upto() instead, but note that that function
15960  * does not consume the stop character.
15961  * before encountering any of the stop characters. Set @length to
15962  * a #gsize to get the length of the string. This function will
15963  * return %NULL on an error.
15964  *
15965  * Returns: (transfer full): a string with the data that was read
15966  */
15967
15968
15969 /**
15970  * g_data_input_stream_read_until_async:
15971  * @stream: a given #GDataInputStream.
15972  * @stop_chars: characters to terminate the read.
15973  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
15974  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15975  * @callback: (scope async): callback to call when the request is satisfied.
15976  * @user_data: (closure): the data to pass to callback function.
15977  *
15978  * The asynchronous version of g_data_input_stream_read_until().
15979  * It is an error to have two outstanding calls to this function.
15980  * Note that, in contrast to g_data_input_stream_read_until(),
15981  * this function does not consume the stop character that it finds.  You
15982  * must read it for yourself.
15983  * When the operation is finished, @callback will be called. You
15984  * can then call g_data_input_stream_read_until_finish() to get
15985  * the result of the operation.
15986  * Don't use this function in new code.  Its functionality is
15987  * inconsistent with g_data_input_stream_read_until().  Both functions
15988  * will be marked as deprecated in a future release.  Use
15989  * g_data_input_stream_read_upto_async() instead.
15990  *
15991  * Since: 2.20
15992  */
15993
15994
15995 /**
15996  * g_data_input_stream_read_until_finish:
15997  * @stream: a given #GDataInputStream.
15998  * @result: the #GAsyncResult that was provided to the callback.
15999  * @length: (out): a #gsize to get the length of the data read in.
16000  * @error: #GError for error reporting.
16001  *
16002  * Finish an asynchronous call started by
16003  * g_data_input_stream_read_until_async().
16004  * before encountering any of the stop characters. Set @length to
16005  * a #gsize to get the length of the string. This function will
16006  * return %NULL on an error.
16007  *
16008  * Since: 2.20
16009  * Returns: (transfer full): a string with the data that was read
16010  */
16011
16012
16013 /**
16014  * g_data_input_stream_read_upto:
16015  * @stream: a #GDataInputStream
16016  * @stop_chars: characters to terminate the read
16017  * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
16018  * @length: (out): a #gsize to get the length of the data read in
16019  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
16020  * @error: #GError for error reporting
16021  *
16022  * Reads a string from the data input stream, up to the first
16023  * occurrence of any of the stop characters.
16024  * In contrast to g_data_input_stream_read_until(), this function
16025  * does <emphasis>not</emphasis> consume the stop character. You have
16026  * to use g_data_input_stream_read_byte() to get it before calling
16027  * g_data_input_stream_read_upto() again.
16028  * Note that @stop_chars may contain '\0' if @stop_chars_len is
16029  * specified.
16030  * before encountering any of the stop characters. Set @length to
16031  * a #gsize to get the length of the string. This function will
16032  * return %NULL on an error
16033  *
16034  * Returns: (transfer full): a string with the data that was read
16035  * Since: 2.24
16036  */
16037
16038
16039 /**
16040  * g_data_input_stream_read_upto_async:
16041  * @stream: a #GDataInputStream
16042  * @stop_chars: characters to terminate the read
16043  * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
16044  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
16045  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
16046  * @callback: (scope async): callback to call when the request is satisfied
16047  * @user_data: (closure): the data to pass to callback function
16048  *
16049  * The asynchronous version of g_data_input_stream_read_upto().
16050  * It is an error to have two outstanding calls to this function.
16051  * In contrast to g_data_input_stream_read_until(), this function
16052  * does <emphasis>not</emphasis> consume the stop character. You have
16053  * to use g_data_input_stream_read_byte() to get it before calling
16054  * g_data_input_stream_read_upto() again.
16055  * Note that @stop_chars may contain '\0' if @stop_chars_len is
16056  * specified.
16057  * When the operation is finished, @callback will be called. You
16058  * can then call g_data_input_stream_read_upto_finish() to get
16059  * the result of the operation.
16060  *
16061  * Since: 2.24
16062  */
16063
16064
16065 /**
16066  * g_data_input_stream_read_upto_finish:
16067  * @stream: a #GDataInputStream
16068  * @result: the #GAsyncResult that was provided to the callback
16069  * @length: (out): a #gsize to get the length of the data read in
16070  * @error: #GError for error reporting
16071  *
16072  * Finish an asynchronous call started by
16073  * g_data_input_stream_read_upto_async().
16074  * Note that this function does <emphasis>not</emphasis> consume the
16075  * stop character. You have to use g_data_input_stream_read_byte() to
16076  * get it before calling g_data_input_stream_read_upto_async() again.
16077  * before encountering any of the stop characters. Set @length to
16078  * a #gsize to get the length of the string. This function will
16079  * return %NULL on an error.
16080  *
16081  * Returns: (transfer full): a string with the data that was read
16082  * Since: 2.24
16083  */
16084
16085
16086 /**
16087  * g_data_input_stream_set_byte_order:
16088  * @stream: a given #GDataInputStream.
16089  * @order: a #GDataStreamByteOrder to set.
16090  *
16091  * This function sets the byte order for the given @stream. All subsequent
16092  * reads from the @stream will be read in the given @order.
16093  */
16094
16095
16096 /**
16097  * g_data_input_stream_set_newline_type:
16098  * @stream: a #GDataInputStream.
16099  * @type: the type of new line return as #GDataStreamNewlineType.
16100  *
16101  * Sets the newline type for the @stream.
16102  * Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read
16103  * chunk ends in "CR" we must read an additional byte to know if this is "CR" or
16104  * "CR LF", and this might block if there is no more data availible.
16105  */
16106
16107
16108 /**
16109  * g_data_output_stream_get_byte_order:
16110  * @stream: a #GDataOutputStream.
16111  *
16112  * Gets the byte order for the stream.
16113  *
16114  * Returns: the #GDataStreamByteOrder for the @stream.
16115  */
16116
16117
16118 /**
16119  * g_data_output_stream_new:
16120  * @base_stream: a #GOutputStream.
16121  *
16122  * Creates a new data output stream for @base_stream.
16123  *
16124  * Returns: #GDataOutputStream.
16125  */
16126
16127
16128 /**
16129  * g_data_output_stream_put_byte:
16130  * @stream: a #GDataOutputStream.
16131  * @data: a #guchar.
16132  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16133  * @error: a #GError, %NULL to ignore.
16134  *
16135  * Puts a byte into the output stream.
16136  *
16137  * Returns: %TRUE if @data was successfully added to the @stream.
16138  */
16139
16140
16141 /**
16142  * g_data_output_stream_put_int16:
16143  * @stream: a #GDataOutputStream.
16144  * @data: a #gint16.
16145  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16146  * @error: a #GError, %NULL to ignore.
16147  *
16148  * Puts a signed 16-bit integer into the output stream.
16149  *
16150  * Returns: %TRUE if @data was successfully added to the @stream.
16151  */
16152
16153
16154 /**
16155  * g_data_output_stream_put_int32:
16156  * @stream: a #GDataOutputStream.
16157  * @data: a #gint32.
16158  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16159  * @error: a #GError, %NULL to ignore.
16160  *
16161  * Puts a signed 32-bit integer into the output stream.
16162  *
16163  * Returns: %TRUE if @data was successfully added to the @stream.
16164  */
16165
16166
16167 /**
16168  * g_data_output_stream_put_int64:
16169  * @stream: a #GDataOutputStream.
16170  * @data: a #gint64.
16171  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16172  * @error: a #GError, %NULL to ignore.
16173  *
16174  * Puts a signed 64-bit integer into the stream.
16175  *
16176  * Returns: %TRUE if @data was successfully added to the @stream.
16177  */
16178
16179
16180 /**
16181  * g_data_output_stream_put_string:
16182  * @stream: a #GDataOutputStream.
16183  * @str: a string.
16184  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16185  * @error: a #GError, %NULL to ignore.
16186  *
16187  * Puts a string into the output stream.
16188  *
16189  * Returns: %TRUE if @string was successfully added to the @stream.
16190  */
16191
16192
16193 /**
16194  * g_data_output_stream_put_uint16:
16195  * @stream: a #GDataOutputStream.
16196  * @data: a #guint16.
16197  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16198  * @error: a #GError, %NULL to ignore.
16199  *
16200  * Puts an unsigned 16-bit integer into the output stream.
16201  *
16202  * Returns: %TRUE if @data was successfully added to the @stream.
16203  */
16204
16205
16206 /**
16207  * g_data_output_stream_put_uint32:
16208  * @stream: a #GDataOutputStream.
16209  * @data: a #guint32.
16210  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16211  * @error: a #GError, %NULL to ignore.
16212  *
16213  * Puts an unsigned 32-bit integer into the stream.
16214  *
16215  * Returns: %TRUE if @data was successfully added to the @stream.
16216  */
16217
16218
16219 /**
16220  * g_data_output_stream_put_uint64:
16221  * @stream: a #GDataOutputStream.
16222  * @data: a #guint64.
16223  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16224  * @error: a #GError, %NULL to ignore.
16225  *
16226  * Puts an unsigned 64-bit integer into the stream.
16227  *
16228  * Returns: %TRUE if @data was successfully added to the @stream.
16229  */
16230
16231
16232 /**
16233  * g_data_output_stream_set_byte_order:
16234  * @stream: a #GDataOutputStream.
16235  * @order: a %GDataStreamByteOrder.
16236  *
16237  * Sets the byte order of the data output stream to @order.
16238  */
16239
16240
16241 /**
16242  * g_dbus_address_get_for_bus_sync:
16243  * @bus_type: A #GBusType.
16244  * @cancellable: A #GCancellable or %NULL.
16245  * @error: Return location for error or %NULL.
16246  *
16247  * Synchronously looks up the D-Bus address for the well-known message
16248  * bus instance specified by @bus_type. This may involve using various
16249  * platform specific mechanisms.
16250  *
16251  * Returns: A valid D-Bus address string for @bus_type or %NULL if @error is set.
16252  * Since: 2.26
16253  */
16254
16255
16256 /**
16257  * g_dbus_address_get_stream:
16258  * @address: A valid D-Bus address.
16259  * @cancellable: A #GCancellable or %NULL.
16260  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
16261  * @user_data: Data to pass to @callback.
16262  *
16263  * Asynchronously connects to an endpoint specified by @address and
16264  * sets up the connection so it is in a state to run the client-side
16265  * of the D-Bus authentication conversation.
16266  * When the operation is finished, @callback will be invoked. You can
16267  * then call g_dbus_address_get_stream_finish() to get the result of
16268  * the operation.
16269  * This is an asynchronous failable function. See
16270  * g_dbus_address_get_stream_sync() for the synchronous version.
16271  *
16272  * Since: 2.26
16273  */
16274
16275
16276 /**
16277  * g_dbus_address_get_stream_finish:
16278  * @res: A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().
16279  * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
16280  * @error: Return location for error or %NULL.
16281  *
16282  * Finishes an operation started with g_dbus_address_get_stream().
16283  *
16284  * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
16285  * Since: 2.26
16286  */
16287
16288
16289 /**
16290  * g_dbus_address_get_stream_sync:
16291  * @address: A valid D-Bus address.
16292  * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
16293  * @cancellable: A #GCancellable or %NULL.
16294  * @error: Return location for error or %NULL.
16295  *
16296  * Synchronously connects to an endpoint specified by @address and
16297  * sets up the connection so it is in a state to run the client-side
16298  * of the D-Bus authentication conversation.
16299  * This is a synchronous failable function. See
16300  * g_dbus_address_get_stream() for the asynchronous version.
16301  *
16302  * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
16303  * Since: 2.26
16304  */
16305
16306
16307 /**
16308  * g_dbus_annotation_info_lookup:
16309  * @annotations: A %NULL-terminated array of annotations or %NULL.
16310  * @name: The name of the annotation to look up.
16311  *
16312  * Looks up the value of an annotation.
16313  * This cost of this function is O(n) in number of annotations.
16314  *
16315  * Returns: The value or %NULL if not found. Do not free, it is owned by @annotations.
16316  * Since: 2.26
16317  */
16318
16319
16320 /**
16321  * g_dbus_annotation_info_ref:
16322  * @info: A #GDBusNodeInfo
16323  *
16324  * If @info is statically allocated does nothing. Otherwise increases
16325  * the reference count.
16326  *
16327  * Returns: The same @info.
16328  * Since: 2.26
16329  */
16330
16331
16332 /**
16333  * g_dbus_annotation_info_unref:
16334  * @info: A #GDBusAnnotationInfo.
16335  *
16336  * If @info is statically allocated, does nothing. Otherwise decreases
16337  * the reference count of @info. When its reference count drops to 0,
16338  * the memory used is freed.
16339  *
16340  * Since: 2.26
16341  */
16342
16343
16344 /**
16345  * g_dbus_arg_info_ref:
16346  * @info: A #GDBusArgInfo
16347  *
16348  * If @info is statically allocated does nothing. Otherwise increases
16349  * the reference count.
16350  *
16351  * Returns: The same @info.
16352  * Since: 2.26
16353  */
16354
16355
16356 /**
16357  * g_dbus_arg_info_unref:
16358  * @info: A #GDBusArgInfo.
16359  *
16360  * If @info is statically allocated, does nothing. Otherwise decreases
16361  * the reference count of @info. When its reference count drops to 0,
16362  * the memory used is freed.
16363  *
16364  * Since: 2.26
16365  */
16366
16367
16368 /**
16369  * g_dbus_auth_observer_authorize_authenticated_peer:
16370  * @observer: A #GDBusAuthObserver.
16371  * @stream: A #GIOStream for the #GDBusConnection.
16372  * @credentials: Credentials received from the peer or %NULL.
16373  *
16374  * Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.
16375  *
16376  * Returns: %TRUE if the peer is authorized, %FALSE if not.
16377  * Since: 2.26
16378  */
16379
16380
16381 /**
16382  * g_dbus_auth_observer_new:
16383  *
16384  * Creates a new #GDBusAuthObserver object.
16385  *
16386  * Returns: A #GDBusAuthObserver. Free with g_object_unref().
16387  * Since: 2.26
16388  */
16389
16390
16391 /**
16392  * g_dbus_connection_add_filter:
16393  * @connection: A #GDBusConnection.
16394  * @filter_function: A filter function.
16395  * @user_data: User data to pass to @filter_function.
16396  * @user_data_free_func: Function to free @user_data with when filter is removed or %NULL.
16397  *
16398  * Adds a message filter. Filters are handlers that are run on all
16399  * incoming and outgoing messages, prior to standard dispatch. Filters
16400  * are run in the order that they were added.  The same handler can be
16401  * added as a filter more than once, in which case it will be run more
16402  * than once.  Filters added during a filter callback won't be run on
16403  * the message being processed. Filter functions are allowed to modify
16404  * and even drop messages - see the #GDBusMessageFilterResult
16405  * enumeration for details.
16406  * Note that filters are run in a dedicated message handling thread so
16407  * they can't block and, generally, can't do anything but signal a
16408  * worker thread. Also note that filters are rarely needed - use API
16409  * such as g_dbus_connection_send_message_with_reply(),
16410  * g_dbus_connection_signal_subscribe() or
16411  * g_dbus_connection_call() instead.
16412  * If a filter consumes an incoming message the message is not
16413  * dispatched anywhere else - not even the standard dispatch machinery
16414  * (that API such as g_dbus_connection_signal_subscribe() and
16415  * g_dbus_connection_send_message_with_reply() relies on) will see the
16416  * message. Similary, if a filter consumes an outgoing message, the
16417  * message will not be sent to the other peer.
16418  * g_dbus_connection_remove_filter().
16419  *
16420  * Returns: A filter identifier that can be used with
16421  * Since: 2.26
16422  */
16423
16424
16425 /**
16426  * g_dbus_connection_call:
16427  * @connection: A #GDBusConnection.
16428  * @bus_name: A unique or well-known bus name or %NULL if @connection is not a message bus connection.
16429  * @object_path: Path of remote object.
16430  * @interface_name: D-Bus interface to invoke method on.
16431  * @method_name: The name of the method to invoke.
16432  * @parameters: A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
16433  * @reply_type: The expected type of the reply, or %NULL.
16434  * @flags: Flags from the #GDBusCallFlags enumeration.
16435  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
16436  * @cancellable: A #GCancellable or %NULL.
16437  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
16438  * @user_data: The data to pass to @callback.
16439  *
16440  * Asynchronously invokes the @method_name method on the
16441  * If @connection is closed then the operation will fail with
16442  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
16443  * fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value
16444  * not compatible with the D-Bus protocol, the operation fails with
16445  * %G_IO_ERROR_INVALID_ARGUMENT.
16446  * If @reply_type is non-%NULL then the reply will be checked for having this type and an
16447  * error will be raised if it does not match.  Said another way, if you give a @reply_type
16448  * then any non-%NULL return value will be of this type.
16449  * If the @parameters #GVariant is floating, it is consumed. This allows
16450  * convenient 'inline' use of g_variant_new(), e.g.:
16451  * |[
16452  * g_dbus_connection_call (connection,
16453  * "org.freedesktop.StringThings",
16454  * "/org/freedesktop/StringThings",
16455  * "org.freedesktop.StringThings",
16456  * "TwoStrings",
16457  * g_variant_new ("(ss)",
16458  * "Thing One",
16459  * "Thing Two"),
16460  * NULL,
16461  * G_DBUS_CALL_FLAGS_NONE,
16462  * -1,
16463  * NULL,
16464  * (GAsyncReadyCallback) two_strings_done,
16465  * NULL);
16466  * ]|
16467  * This is an asynchronous method. When the operation is finished, @callback will be invoked
16468  * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
16469  * of the thread you are calling this method from. You can then call
16470  * g_dbus_connection_call_finish() to get the result of the operation.
16471  * See g_dbus_connection_call_sync() for the synchronous version of this
16472  * function.
16473  *
16474  * Since: 2.26
16475  */
16476
16477
16478 /**
16479  * g_dbus_connection_call_finish:
16480  * @connection: A #GDBusConnection.
16481  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call().
16482  * @error: Return location for error or %NULL.
16483  *
16484  * Finishes an operation started with g_dbus_connection_call().
16485  * return values. Free with g_variant_unref().
16486  *
16487  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
16488  * Since: 2.26
16489  */
16490
16491
16492 /**
16493  * g_dbus_connection_call_sync:
16494  * @connection: A #GDBusConnection.
16495  * @bus_name: A unique or well-known bus name.
16496  * @object_path: Path of remote object.
16497  * @interface_name: D-Bus interface to invoke method on.
16498  * @method_name: The name of the method to invoke.
16499  * @parameters: A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
16500  * @reply_type: The expected type of the reply, or %NULL.
16501  * @flags: Flags from the #GDBusCallFlags enumeration.
16502  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
16503  * @cancellable: A #GCancellable or %NULL.
16504  * @error: Return location for error or %NULL.
16505  *
16506  * Synchronously invokes the @method_name method on the
16507  * If @connection is closed then the operation will fail with
16508  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the
16509  * operation will fail with %G_IO_ERROR_CANCELLED. If @parameters
16510  * contains a value not compatible with the D-Bus protocol, the operation
16511  * fails with %G_IO_ERROR_INVALID_ARGUMENT.
16512  * If @reply_type is non-%NULL then the reply will be checked for having
16513  * this type and an error will be raised if it does not match.  Said
16514  * another way, if you give a @reply_type then any non-%NULL return
16515  * value will be of this type.
16516  * If the @parameters #GVariant is floating, it is consumed.
16517  * This allows convenient 'inline' use of g_variant_new(), e.g.:
16518  * |[
16519  * g_dbus_connection_call_sync (connection,
16520  * "org.freedesktop.StringThings",
16521  * "/org/freedesktop/StringThings",
16522  * "org.freedesktop.StringThings",
16523  * "TwoStrings",
16524  * g_variant_new ("(ss)",
16525  * "Thing One",
16526  * "Thing Two"),
16527  * NULL,
16528  * G_DBUS_CALL_FLAGS_NONE,
16529  * -1,
16530  * NULL,
16531  * &amp;error);
16532  * ]|
16533  * The calling thread is blocked until a reply is received. See
16534  * g_dbus_connection_call() for the asynchronous version of
16535  * this method.
16536  * return values. Free with g_variant_unref().
16537  *
16538  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
16539  * Since: 2.26
16540  */
16541
16542
16543 /**
16544  * g_dbus_connection_close:
16545  * @connection: A #GDBusConnection.
16546  * @cancellable: A #GCancellable or %NULL.
16547  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
16548  * @user_data: The data to pass to @callback.
16549  *
16550  * Closes @connection. Note that this never causes the process to
16551  * exit (this might only happen if the other end of a shared message
16552  * bus connection disconnects, see #GDBusConnection:exit-on-close).
16553  * Once the connection is closed, operations such as sending a message
16554  * will return with the error %G_IO_ERROR_CLOSED. Closing a connection
16555  * will not automatically flush the connection so queued messages may
16556  * be lost. Use g_dbus_connection_flush() if you need such guarantees.
16557  * If @connection is already closed, this method fails with
16558  * %G_IO_ERROR_CLOSED.
16559  * When @connection has been closed, the #GDBusConnection::closed
16560  * signal is emitted in the <link
16561  * linkend="g-main-context-push-thread-default">thread-default main
16562  * loop</link> of the thread that @connection was constructed in.
16563  * This is an asynchronous method. When the operation is finished,
16564  * linkend="g-main-context-push-thread-default">thread-default main
16565  * loop</link> of the thread you are calling this method from. You can
16566  * then call g_dbus_connection_close_finish() to get the result of the
16567  * operation.  See g_dbus_connection_close_sync() for the synchronous
16568  * version.
16569  *
16570  * Since: 2.26
16571  */
16572
16573
16574 /**
16575  * g_dbus_connection_close_finish:
16576  * @connection: A #GDBusConnection.
16577  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_close().
16578  * @error: Return location for error or %NULL.
16579  *
16580  * Finishes an operation started with g_dbus_connection_close().
16581  *
16582  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16583  * Since: 2.26
16584  */
16585
16586
16587 /**
16588  * g_dbus_connection_close_sync:
16589  * @connection: A #GDBusConnection.
16590  * @cancellable: A #GCancellable or %NULL.
16591  * @error: Return location for error or %NULL.
16592  *
16593  * Synchronously closees @connection. The calling thread is blocked
16594  * until this is done. See g_dbus_connection_close() for the
16595  * asynchronous version of this method and more details about what it
16596  * does.
16597  *
16598  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16599  * Since: 2.26
16600  */
16601
16602
16603 /**
16604  * g_dbus_connection_emit_signal:
16605  * @connection: A #GDBusConnection.
16606  * @destination_bus_name: The unique bus name for the destination for the signal or %NULL to emit to all listeners.
16607  * @object_path: Path of remote object.
16608  * @interface_name: D-Bus interface to emit a signal on.
16609  * @signal_name: The name of the signal to emit.
16610  * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
16611  * @error: Return location for error or %NULL.
16612  *
16613  * Emits a signal.
16614  * If the parameters GVariant is floating, it is consumed.
16615  * This can only fail if @parameters is not compatible with the D-Bus protocol.
16616  *
16617  * Returns: %TRUE unless @error is set.
16618  * Since: 2.26
16619  */
16620
16621
16622 /**
16623  * g_dbus_connection_flush:
16624  * @connection: A #GDBusConnection.
16625  * @cancellable: A #GCancellable or %NULL.
16626  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
16627  * @user_data: The data to pass to @callback.
16628  *
16629  * Asynchronously flushes @connection, that is, writes all queued
16630  * outgoing message to the transport and then flushes the transport
16631  * (using g_output_stream_flush_async()). This is useful in programs
16632  * that wants to emit a D-Bus signal and then exit
16633  * immediately. Without flushing the connection, there is no guarantee
16634  * that the message has been sent to the networking buffers in the OS
16635  * kernel.
16636  * This is an asynchronous method. When the operation is finished,
16637  * linkend="g-main-context-push-thread-default">thread-default main
16638  * loop</link> of the thread you are calling this method from. You can
16639  * then call g_dbus_connection_flush_finish() to get the result of the
16640  * operation.  See g_dbus_connection_flush_sync() for the synchronous
16641  * version.
16642  *
16643  * Since: 2.26
16644  */
16645
16646
16647 /**
16648  * g_dbus_connection_flush_finish:
16649  * @connection: A #GDBusConnection.
16650  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_flush().
16651  * @error: Return location for error or %NULL.
16652  *
16653  * Finishes an operation started with g_dbus_connection_flush().
16654  *
16655  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16656  * Since: 2.26
16657  */
16658
16659
16660 /**
16661  * g_dbus_connection_flush_sync:
16662  * @connection: A #GDBusConnection.
16663  * @cancellable: A #GCancellable or %NULL.
16664  * @error: Return location for error or %NULL.
16665  *
16666  * Synchronously flushes @connection. The calling thread is blocked
16667  * until this is done. See g_dbus_connection_flush() for the
16668  * asynchronous version of this method and more details about what it
16669  * does.
16670  *
16671  * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16672  * Since: 2.26
16673  */
16674
16675
16676 /**
16677  * g_dbus_connection_get_capabilities:
16678  * @connection: A #GDBusConnection.
16679  *
16680  * Gets the capabilities negotiated with the remote peer
16681  *
16682  * Returns: Zero or more flags from the #GDBusCapabilityFlags enumeration.
16683  * Since: 2.26
16684  */
16685
16686
16687 /**
16688  * g_dbus_connection_get_exit_on_close:
16689  * @connection: A #GDBusConnection.
16690  *
16691  * Gets whether the process is terminated when @connection is
16692  * closed by the remote peer. See
16693  * #GDBusConnection:exit-on-close for more details.
16694  * closed by the remote peer.
16695  *
16696  * Returns: Whether the process is terminated when @connection is
16697  * Since: 2.26
16698  */
16699
16700
16701 /**
16702  * g_dbus_connection_get_guid:
16703  * @connection: A #GDBusConnection.
16704  *
16705  * The GUID of the peer performing the role of server when
16706  * authenticating. See #GDBusConnection:guid for more details.
16707  *
16708  * Returns: The GUID. Do not free this string, it is owned by
16709  * Since: 2.26
16710  */
16711
16712
16713 /**
16714  * g_dbus_connection_get_peer_credentials:
16715  * @connection: A #GDBusConnection.
16716  *
16717  * Gets the credentials of the authenticated peer. This will always
16718  * return %NULL unless @connection acted as a server
16719  * (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed)
16720  * when set up and the client passed credentials as part of the
16721  * authentication process.
16722  * In a message bus setup, the message bus is always the server and
16723  * each application is a client. So this method will always return
16724  * %NULL for message bus clients.
16725  * this object, it is owned by @connection.
16726  *
16727  * Returns: (transfer none): A #GCredentials or %NULL if not available. Do not free
16728  * Since: 2.26
16729  */
16730
16731
16732 /**
16733  * g_dbus_connection_get_stream:
16734  * @connection: a #GDBusConnection
16735  *
16736  * Gets the underlying stream used for IO.
16737  *
16738  * Returns: (transfer none): the stream used for IO
16739  * Since: 2.26
16740  */
16741
16742
16743 /**
16744  * g_dbus_connection_get_unique_name:
16745  * @connection: A #GDBusConnection.
16746  *
16747  * Gets the unique name of @connection as assigned by the message
16748  * bus. This can also be used to figure out if @connection is a
16749  * message bus connection.
16750  * bus connection. Do not free this string, it is owned by
16751  *
16752  * Returns: The unique name or %NULL if @connection is not a message
16753  * Since: 2.26
16754  */
16755
16756
16757 /**
16758  * g_dbus_connection_is_closed:
16759  * @connection: A #GDBusConnection.
16760  *
16761  * Gets whether @connection is closed.
16762  *
16763  * Returns: %TRUE if the connection is closed, %FALSE otherwise.
16764  * Since: 2.26
16765  */
16766
16767
16768 /**
16769  * g_dbus_connection_new:
16770  * @stream: A #GIOStream.
16771  * @guid: The GUID to use if a authenticating as a server or %NULL.
16772  * @flags: Flags describing how to make the connection.
16773  * @observer: A #GDBusAuthObserver or %NULL.
16774  * @cancellable: A #GCancellable or %NULL.
16775  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
16776  * @user_data: The data to pass to @callback.
16777  *
16778  * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
16779  * with the end represented by @stream.
16780  * If @observer is not %NULL it may be used to control the
16781  * authentication process.
16782  * When the operation is finished, @callback will be invoked. You can
16783  * then call g_dbus_connection_new_finish() to get the result of the
16784  * operation.
16785  * This is a asynchronous failable constructor. See
16786  * g_dbus_connection_new_sync() for the synchronous
16787  * version.
16788  *
16789  * Since: 2.26
16790  */
16791
16792
16793 /**
16794  * g_dbus_connection_new_finish:
16795  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
16796  * @error: Return location for error or %NULL.
16797  *
16798  * Finishes an operation started with g_dbus_connection_new().
16799  *
16800  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16801  * Since: 2.26
16802  */
16803
16804
16805 /**
16806  * g_dbus_connection_new_for_address:
16807  * @address: A D-Bus address.
16808  * @flags: Flags describing how to make the connection.
16809  * @observer: A #GDBusAuthObserver or %NULL.
16810  * @cancellable: A #GCancellable or %NULL.
16811  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
16812  * @user_data: The data to pass to @callback.
16813  *
16814  * Asynchronously connects and sets up a D-Bus client connection for
16815  * exchanging D-Bus messages with an endpoint specified by @address
16816  * which must be in the D-Bus address format.
16817  * This constructor can only be used to initiate client-side
16818  * connections - use g_dbus_connection_new() if you need to act as the
16819  * server. In particular, @flags cannot contain the
16820  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
16821  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
16822  * When the operation is finished, @callback will be invoked. You can
16823  * then call g_dbus_connection_new_finish() to get the result of the
16824  * operation.
16825  * If @observer is not %NULL it may be used to control the
16826  * authentication process.
16827  * This is a asynchronous failable constructor. See
16828  * g_dbus_connection_new_for_address_sync() for the synchronous
16829  * version.
16830  *
16831  * Since: 2.26
16832  */
16833
16834
16835 /**
16836  * g_dbus_connection_new_for_address_finish:
16837  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
16838  * @error: Return location for error or %NULL.
16839  *
16840  * Finishes an operation started with g_dbus_connection_new_for_address().
16841  *
16842  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16843  * Since: 2.26
16844  */
16845
16846
16847 /**
16848  * g_dbus_connection_new_for_address_sync:
16849  * @address: A D-Bus address.
16850  * @flags: Flags describing how to make the connection.
16851  * @observer: A #GDBusAuthObserver or %NULL.
16852  * @cancellable: A #GCancellable or %NULL.
16853  * @error: Return location for error or %NULL.
16854  *
16855  * Synchronously connects and sets up a D-Bus client connection for
16856  * exchanging D-Bus messages with an endpoint specified by @address
16857  * which must be in the D-Bus address format.
16858  * This constructor can only be used to initiate client-side
16859  * connections - use g_dbus_connection_new_sync() if you need to act
16860  * as the server. In particular, @flags cannot contain the
16861  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
16862  * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
16863  * This is a synchronous failable constructor. See
16864  * g_dbus_connection_new_for_address() for the asynchronous version.
16865  * If @observer is not %NULL it may be used to control the
16866  * authentication process.
16867  *
16868  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16869  * Since: 2.26
16870  */
16871
16872
16873 /**
16874  * g_dbus_connection_new_sync:
16875  * @stream: A #GIOStream.
16876  * @guid: The GUID to use if a authenticating as a server or %NULL.
16877  * @flags: Flags describing how to make the connection.
16878  * @observer: A #GDBusAuthObserver or %NULL.
16879  * @cancellable: A #GCancellable or %NULL.
16880  * @error: Return location for error or %NULL.
16881  *
16882  * Synchronously sets up a D-Bus connection for exchanging D-Bus messages
16883  * with the end represented by @stream.
16884  * If @observer is not %NULL it may be used to control the
16885  * authentication process.
16886  * This is a synchronous failable constructor. See
16887  * g_dbus_connection_new() for the asynchronous version.
16888  *
16889  * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16890  * Since: 2.26
16891  */
16892
16893
16894 /**
16895  * g_dbus_connection_register_object:
16896  * @connection: A #GDBusConnection.
16897  * @object_path: The object path to register at.
16898  * @interface_info: Introspection data for the interface.
16899  * @vtable: A #GDBusInterfaceVTable to call into or %NULL.
16900  * @user_data: Data to pass to functions in @vtable.
16901  * @user_data_free_func: Function to call when the object path is unregistered.
16902  * @error: Return location for error or %NULL.
16903  *
16904  * Registers callbacks for exported objects at @object_path with the
16905  * D-Bus interface that is described in @interface_info.
16906  * Calls to functions in @vtable (and @user_data_free_func) will
16907  * happen in the <link linkend="g-main-context-push-thread-default">thread-default main
16908  * loop</link> of the thread you are calling this method from.
16909  * Note that all #GVariant values passed to functions in @vtable will match
16910  * the signature given in @interface_info - if a remote caller passes
16911  * incorrect values, the <literal>org.freedesktop.DBus.Error.InvalidArgs</literal>
16912  * is returned to the remote caller.
16913  * Additionally, if the remote caller attempts to invoke methods or
16914  * access properties not mentioned in @interface_info the
16915  * <literal>org.freedesktop.DBus.Error.UnknownMethod</literal> resp.
16916  * <literal>org.freedesktop.DBus.Error.InvalidArgs</literal> errors
16917  * are returned to the caller.
16918  * It is considered a programming error if the
16919  * #GDBusInterfaceGetPropertyFunc function in @vtable returns a
16920  * #GVariant of incorrect type.
16921  * If an existing callback is already registered at @object_path and
16922  * GDBus automatically implements the standard D-Bus interfaces
16923  * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
16924  * and org.freedesktop.Peer, so you don't have to implement those for
16925  * the objects you export. You <emphasis>can</emphasis> implement
16926  * org.freedesktop.DBus.Properties yourself, e.g. to handle getting
16927  * and setting of properties asynchronously.
16928  * Note that the reference count on @interface_info will be
16929  * incremented by 1 (unless allocated statically, e.g. if the
16930  * reference count is -1, see g_dbus_interface_info_ref()) for as long
16931  * as the object is exported. Also note that @vtable will be copied.
16932  * See <xref linkend="gdbus-server"/> for an example of how to use this method.
16933  * that can be used with g_dbus_connection_unregister_object() .
16934  *
16935  * Returns: 0 if @error is set, otherwise a registration id (never 0)
16936  * Since: 2.26
16937  */
16938
16939
16940 /**
16941  * g_dbus_connection_register_subtree:
16942  * @connection: A #GDBusConnection.
16943  * @object_path: The object path to register the subtree at.
16944  * @vtable: A #GDBusSubtreeVTable to enumerate, introspect and dispatch nodes in the subtree.
16945  * @flags: Flags used to fine tune the behavior of the subtree.
16946  * @user_data: Data to pass to functions in @vtable.
16947  * @user_data_free_func: Function to call when the subtree is unregistered.
16948  * @error: Return location for error or %NULL.
16949  *
16950  * Registers a whole subtree of <quote>dynamic</quote> objects.
16951  * The @enumerate and @introspection functions in @vtable are used to
16952  * convey, to remote callers, what nodes exist in the subtree rooted
16953  * by @object_path.
16954  * When handling remote calls into any node in the subtree, first the
16955  * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set
16956  * the @introspection function is used to check if the node supports the
16957  * requested method. If so, the @dispatch function is used to determine
16958  * where to dispatch the call. The collected #GDBusInterfaceVTable and
16959  * #gpointer will be used to call into the interface vtable for processing
16960  * the request.
16961  * All calls into user-provided code will be invoked in the <link
16962  * linkend="g-main-context-push-thread-default">thread-default main
16963  * loop</link> of the thread you are calling this method from.
16964  * If an existing subtree is already registered at @object_path or
16965  * then @error is set to #G_IO_ERROR_EXISTS.
16966  * Note that it is valid to register regular objects (using
16967  * g_dbus_connection_register_object()) in a subtree registered with
16968  * g_dbus_connection_register_subtree() - if so, the subtree handler
16969  * is tried as the last resort. One way to think about a subtree
16970  * handler is to consider it a <quote>fallback handler</quote>
16971  * for object paths not registered via g_dbus_connection_register_object()
16972  * or other bindings.
16973  * Note that @vtable will be copied so you cannot change it after
16974  * registration.
16975  * See <xref linkend="gdbus-subtree-server"/> for an example of how to use this method.
16976  * that can be used with g_dbus_connection_unregister_subtree() .
16977  *
16978  * Returns: 0 if @error is set, otherwise a subtree registration id (never 0)
16979  * Since: 2.26
16980  */
16981
16982
16983 /**
16984  * g_dbus_connection_remove_filter:
16985  * @connection: a #GDBusConnection
16986  * @filter_id: an identifier obtained from g_dbus_connection_add_filter()
16987  *
16988  * Removes a filter.
16989  *
16990  * Since: 2.26
16991  */
16992
16993
16994 /**
16995  * g_dbus_connection_send_message:
16996  * @connection: A #GDBusConnection.
16997  * @message: A #GDBusMessage
16998  * @flags: Flags affecting how the message is sent.
16999  * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
17000  * @error: Return location for error or %NULL.
17001  *
17002  * Asynchronously sends @message to the peer represented by @connection.
17003  * Unless @flags contain the
17004  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
17005  * will be assigned by @connection and set on @message via
17006  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
17007  * serial number used will be written to this location prior to
17008  * submitting the message to the underlying transport.
17009  * If @connection is closed then the operation will fail with
17010  * %G_IO_ERROR_CLOSED. If @message is not well-formed,
17011  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
17012  * See <xref linkend="gdbus-server"/> and <xref
17013  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17014  * low-level API to send and receive UNIX file descriptors.
17015  * Note that @message must be unlocked, unless @flags contain the
17016  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
17017  * transmission, %FALSE if @error is set.
17018  *
17019  * Returns: %TRUE if the message was well-formed and queued for
17020  * Since: 2.26
17021  */
17022
17023
17024 /**
17025  * g_dbus_connection_send_message_with_reply:
17026  * @connection: A #GDBusConnection.
17027  * @message: A #GDBusMessage.
17028  * @flags: Flags affecting how the message is sent.
17029  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
17030  * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
17031  * @cancellable: A #GCancellable or %NULL.
17032  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
17033  * @user_data: The data to pass to @callback.
17034  *
17035  * Asynchronously sends @message to the peer represented by @connection.
17036  * Unless @flags contain the
17037  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
17038  * will be assigned by @connection and set on @message via
17039  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
17040  * serial number used will be written to this location prior to
17041  * submitting the message to the underlying transport.
17042  * If @connection is closed then the operation will fail with
17043  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
17044  * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
17045  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
17046  * This is an asynchronous method. When the operation is finished, @callback will be invoked
17047  * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
17048  * of the thread you are calling this method from. You can then call
17049  * g_dbus_connection_send_message_with_reply_finish() to get the result of the operation.
17050  * See g_dbus_connection_send_message_with_reply_sync() for the synchronous version.
17051  * Note that @message must be unlocked, unless @flags contain the
17052  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
17053  * See <xref linkend="gdbus-server"/> and <xref
17054  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17055  * low-level API to send and receive UNIX file descriptors.
17056  *
17057  * Since: 2.26
17058  */
17059
17060
17061 /**
17062  * g_dbus_connection_send_message_with_reply_finish:
17063  * @connection: a #GDBusConnection
17064  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_send_message_with_reply().
17065  * @error: Return location for error or %NULL.
17066  *
17067  * Finishes an operation started with g_dbus_connection_send_message_with_reply().
17068  * Note that @error is only set if a local in-process error
17069  * occured. That is to say that the returned #GDBusMessage object may
17070  * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
17071  * g_dbus_message_to_gerror() to transcode this to a #GError.
17072  * See <xref linkend="gdbus-server"/> and <xref
17073  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17074  * low-level API to send and receive UNIX file descriptors.
17075  *
17076  * Returns: (transfer full): A locked #GDBusMessage or %NULL if @error is set.
17077  * Since: 2.26
17078  */
17079
17080
17081 /**
17082  * g_dbus_connection_send_message_with_reply_sync:
17083  * @connection: A #GDBusConnection.
17084  * @message: A #GDBusMessage.
17085  * @flags: Flags affecting how the message is sent.
17086  * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
17087  * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
17088  * @cancellable: A #GCancellable or %NULL.
17089  * @error: Return location for error or %NULL.
17090  *
17091  * Synchronously sends @message to the peer represented by @connection
17092  * and blocks the calling thread until a reply is received or the
17093  * timeout is reached. See g_dbus_connection_send_message_with_reply()
17094  * for the asynchronous version of this method.
17095  * Unless @flags contain the
17096  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
17097  * will be assigned by @connection and set on @message via
17098  * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
17099  * serial number used will be written to this location prior to
17100  * submitting the message to the underlying transport.
17101  * If @connection is closed then the operation will fail with
17102  * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
17103  * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
17104  * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
17105  * Note that @error is only set if a local in-process error
17106  * occured. That is to say that the returned #GDBusMessage object may
17107  * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
17108  * g_dbus_message_to_gerror() to transcode this to a #GError.
17109  * See <xref linkend="gdbus-server"/> and <xref
17110  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17111  * low-level API to send and receive UNIX file descriptors.
17112  * Note that @message must be unlocked, unless @flags contain the
17113  * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
17114  *
17115  * Returns: (transfer full): A locked #GDBusMessage that is the reply to @message or %NULL if @error is set.
17116  * Since: 2.26
17117  */
17118
17119
17120 /**
17121  * g_dbus_connection_set_exit_on_close:
17122  * @connection: A #GDBusConnection.
17123  * @exit_on_close: Whether the process should be terminated when @connection is closed by the remote peer.
17124  *
17125  * Sets whether the process should be terminated when @connection is
17126  * closed by the remote peer. See #GDBusConnection:exit-on-close for
17127  * more details.
17128  *
17129  * Since: 2.26
17130  */
17131
17132
17133 /**
17134  * g_dbus_connection_signal_subscribe:
17135  * @connection: A #GDBusConnection.
17136  * @sender: Sender name to match on (unique or well-known name) or %NULL to listen from all senders.
17137  * @interface_name: D-Bus interface name to match on or %NULL to match on all interfaces.
17138  * @member: D-Bus signal name to match on or %NULL to match on all signals.
17139  * @object_path: Object path to match on or %NULL to match on all object paths.
17140  * @arg0: Contents of first string argument to match on or %NULL to match on all kinds of arguments.
17141  * @flags: Flags describing how to subscribe to the signal (currently unused).
17142  * @callback: Callback to invoke when there is a signal matching the requested data.
17143  * @user_data: User data to pass to @callback.
17144  * @user_data_free_func: Function to free @user_data with when subscription is removed or %NULL.
17145  *
17146  * Subscribes to signals on @connection and invokes @callback with a
17147  * whenever the signal is received. Note that @callback
17148  * will be invoked in the <link
17149  * linkend="g-main-context-push-thread-default">thread-default main
17150  * loop</link> of the thread you are calling this method from.
17151  * If @connection is not a message bus connection, @sender must be
17152  * %NULL.
17153  * If @sender is a well-known name note that @callback is invoked with
17154  * the unique name for the owner of @sender, not the well-known name
17155  * as one would expect. This is because the message bus rewrites the
17156  * name. As such, to avoid certain race conditions, users should be
17157  * tracking the name owner of the well-known name and use that when
17158  * processing the received signal.
17159  *
17160  * Returns: A subscription identifier that can be used with g_dbus_connection_signal_unsubscribe().
17161  * Since: 2.26
17162  */
17163
17164
17165 /**
17166  * g_dbus_connection_signal_unsubscribe:
17167  * @connection: A #GDBusConnection.
17168  * @subscription_id: A subscription id obtained from g_dbus_connection_signal_subscribe().
17169  *
17170  * Unsubscribes from signals.
17171  *
17172  * Since: 2.26
17173  */
17174
17175
17176 /**
17177  * g_dbus_connection_start_message_processing:
17178  * @connection: A #GDBusConnection.
17179  *
17180  * If @connection was created with
17181  * %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method
17182  * starts processing messages. Does nothing on if @connection wasn't
17183  * created with this flag or if the method has already been called.
17184  *
17185  * Since: 2.26
17186  */
17187
17188
17189 /**
17190  * g_dbus_connection_unregister_object:
17191  * @connection: A #GDBusConnection.
17192  * @registration_id: A registration id obtained from g_dbus_connection_register_object().
17193  *
17194  * Unregisters an object.
17195  *
17196  * Returns: %TRUE if the object was unregistered, %FALSE otherwise.
17197  * Since: 2.26
17198  */
17199
17200
17201 /**
17202  * g_dbus_connection_unregister_subtree:
17203  * @connection: A #GDBusConnection.
17204  * @registration_id: A subtree registration id obtained from g_dbus_connection_register_subtree().
17205  *
17206  * Unregisters a subtree.
17207  *
17208  * Returns: %TRUE if the subtree was unregistered, %FALSE otherwise.
17209  * Since: 2.26
17210  */
17211
17212
17213 /**
17214  * g_dbus_error_encode_gerror:
17215  * @error: A #GError.
17216  *
17217  * Creates a D-Bus error name to use for @error. If @error matches
17218  * a registered error (cf. g_dbus_error_register_error()), the corresponding
17219  * D-Bus error name will be returned.
17220  * Otherwise the a name of the form
17221  * <literal>org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE</literal>
17222  * will be used. This allows other GDBus applications to map the error
17223  * on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
17224  * This function is typically only used in object mappings to put a
17225  * #GError on the wire. Regular applications should not use it.
17226  *
17227  * Returns: A D-Bus error name (never %NULL). Free with g_free().
17228  * Since: 2.26
17229  */
17230
17231
17232 /**
17233  * g_dbus_error_get_remote_error:
17234  * @error: A #GError.
17235  *
17236  * Gets the D-Bus error name used for @error, if any.
17237  * This function is guaranteed to return a D-Bus error name for all
17238  * #GError<!-- -->s returned from functions handling remote method
17239  * calls (e.g. g_dbus_connection_call_finish()) unless
17240  * g_dbus_error_strip_remote_error() has been used on @error.
17241  *
17242  * Returns: An allocated string or %NULL if the D-Bus error name could not be found. Free with g_free().
17243  * Since: 2.26
17244  */
17245
17246
17247 /**
17248  * g_dbus_error_is_remote_error:
17249  * @error: A #GError.
17250  *
17251  * Checks if @error represents an error received via D-Bus from a remote peer. If so,
17252  * use g_dbus_error_get_remote_error() to get the name of the error.
17253  * %FALSE otherwise.
17254  *
17255  * Returns: %TRUE if @error represents an error from a remote peer,
17256  * Since: 2.26
17257  */
17258
17259
17260 /**
17261  * g_dbus_error_new_for_dbus_error:
17262  * @dbus_error_name: D-Bus error name.
17263  * @dbus_error_message: D-Bus error message.
17264  *
17265  * Creates a #GError based on the contents of @dbus_error_name and
17266  * Errors registered with g_dbus_error_register_error() will be looked
17267  * up using @dbus_error_name and if a match is found, the error domain
17268  * and code is used. Applications can use g_dbus_error_get_remote_error()
17269  * to recover @dbus_error_name.
17270  * If a match against a registered error is not found and the D-Bus
17271  * error name is in a form as returned by g_dbus_error_encode_gerror()
17272  * the error domain and code encoded in the name is used to
17273  * create the #GError. Also, @dbus_error_name is added to the error message
17274  * such that it can be recovered with g_dbus_error_get_remote_error().
17275  * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR
17276  * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is
17277  * added to the error message such that it can be recovered with
17278  * g_dbus_error_get_remote_error().
17279  * In all three cases, @dbus_error_name can always be recovered from the
17280  * returned #GError using the g_dbus_error_get_remote_error() function
17281  * (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
17282  * This function is typically only used in object mappings to prepare
17283  * #GError instances for applications. Regular applications should not use
17284  * it.
17285  *
17286  * Returns: An allocated #GError. Free with g_error_free().
17287  * Since: 2.26
17288  */
17289
17290
17291 /**
17292  * g_dbus_error_register_error:
17293  * @error_domain: A #GQuark for a error domain.
17294  * @error_code: An error code.
17295  * @dbus_error_name: A D-Bus error name.
17296  *
17297  * Creates an association to map between @dbus_error_name and
17298  * #GError<!-- -->s specified by @error_domain and @error_code.
17299  * This is typically done in the routine that returns the #GQuark for
17300  * an error domain.
17301  * exists.
17302  *
17303  * Returns: %TRUE if the association was created, %FALSE if it already
17304  * Since: 2.26
17305  */
17306
17307
17308 /**
17309  * g_dbus_error_register_error_domain:
17310  * @error_domain_quark_name: The error domain name.
17311  * @quark_volatile: A pointer where to store the #GQuark.
17312  * @entries: A pointer to @num_entries #GDBusErrorEntry struct items.
17313  * @num_entries: Number of items to register.
17314  *
17315  * Helper function for associating a #GError error domain with D-Bus error names.
17316  *
17317  * Since: 2.26
17318  */
17319
17320
17321 /**
17322  * g_dbus_error_set_dbus_error:
17323  * @error: A pointer to a #GError or %NULL.
17324  * @dbus_error_name: D-Bus error name.
17325  * @dbus_error_message: D-Bus error message.
17326  * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
17327  * @...: Arguments for @format.
17328  *
17329  * Does nothing if @error is %NULL. Otherwise sets *@error to
17330  * a new #GError created with g_dbus_error_new_for_dbus_error()
17331  * with @dbus_error_message prepend with @format (unless %NULL).
17332  *
17333  * Since: 2.26
17334  */
17335
17336
17337 /**
17338  * g_dbus_error_set_dbus_error_valist:
17339  * @error: A pointer to a #GError or %NULL.
17340  * @dbus_error_name: D-Bus error name.
17341  * @dbus_error_message: D-Bus error message.
17342  * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
17343  * @var_args: Arguments for @format.
17344  *
17345  * Like g_dbus_error_set_dbus_error() but intended for language bindings.
17346  *
17347  * Since: 2.26
17348  */
17349
17350
17351 /**
17352  * g_dbus_error_strip_remote_error:
17353  * @error: A #GError.
17354  *
17355  * Looks for extra information in the error message used to recover
17356  * the D-Bus error name and strips it if found. If stripped, the
17357  * message field in @error will correspond exactly to what was
17358  * received on the wire.
17359  * This is typically used when presenting errors to the end user.
17360  *
17361  * Returns: %TRUE if information was stripped, %FALSE otherwise.
17362  * Since: 2.26
17363  */
17364
17365
17366 /**
17367  * g_dbus_error_unregister_error:
17368  * @error_domain: A #GQuark for a error domain.
17369  * @error_code: An error code.
17370  * @dbus_error_name: A D-Bus error name.
17371  *
17372  * Destroys an association previously set up with g_dbus_error_register_error().
17373  *
17374  * Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found.
17375  * Since: 2.26
17376  */
17377
17378
17379 /**
17380  * g_dbus_generate_guid:
17381  *
17382  * Generate a D-Bus GUID that can be used with
17383  * e.g. g_dbus_connection_new().
17384  * See the D-Bus specification regarding what strings are valid D-Bus
17385  * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
17386  *
17387  * Returns: A valid D-Bus GUID. Free with g_free().
17388  * Since: 2.26
17389  */
17390
17391
17392 /**
17393  * g_dbus_interface_info_cache_build:
17394  * @info: A #GDBusInterfaceInfo.
17395  *
17396  * Builds a lookup-cache to speed up
17397  * g_dbus_interface_info_lookup_method(),
17398  * g_dbus_interface_info_lookup_signal() and
17399  * g_dbus_interface_info_lookup_property().
17400  * If this has already been called with @info, the existing cache is
17401  * used and its use count is increased.
17402  * Note that @info cannot be modified until
17403  * g_dbus_interface_info_cache_release() is called.
17404  *
17405  * Since: 2.30
17406  */
17407
17408
17409 /**
17410  * g_dbus_interface_info_cache_release:
17411  * @info: A GDBusInterfaceInfo
17412  *
17413  * Decrements the usage count for the cache for @info built by
17414  * g_dbus_interface_info_cache_build() (if any) and frees the
17415  * resources used by the cache if the usage count drops to zero.
17416  *
17417  * Since: 2.30
17418  */
17419
17420
17421 /**
17422  * g_dbus_interface_info_generate_xml:
17423  * @info: A #GDBusNodeInfo
17424  * @indent: Indentation level.
17425  * @string_builder: A #GString to to append XML data to.
17426  *
17427  * Appends an XML representation of @info (and its children) to @string_builder.
17428  * This function is typically used for generating introspection XML
17429  * documents at run-time for handling the
17430  * <literal>org.freedesktop.DBus.Introspectable.Introspect</literal>
17431  * method.
17432  *
17433  * Since: 2.26
17434  */
17435
17436
17437 /**
17438  * g_dbus_interface_info_lookup_method:
17439  * @info: A #GDBusInterfaceInfo.
17440  * @name: A D-Bus method name (typically in CamelCase)
17441  *
17442  * Looks up information about a method.
17443  * This cost of this function is O(n) in number of methods unless
17444  * g_dbus_interface_info_cache_build() has been used on @info.
17445  *
17446  * Returns: A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info.
17447  * Since: 2.26
17448  */
17449
17450
17451 /**
17452  * g_dbus_interface_info_lookup_property:
17453  * @info: A #GDBusInterfaceInfo.
17454  * @name: A D-Bus property name (typically in CamelCase).
17455  *
17456  * Looks up information about a property.
17457  * This cost of this function is O(n) in number of properties unless
17458  * g_dbus_interface_info_cache_build() has been used on @info.
17459  *
17460  * Returns: A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info.
17461  * Since: 2.26
17462  */
17463
17464
17465 /**
17466  * g_dbus_interface_info_lookup_signal:
17467  * @info: A #GDBusInterfaceInfo.
17468  * @name: A D-Bus signal name (typically in CamelCase)
17469  *
17470  * Looks up information about a signal.
17471  * This cost of this function is O(n) in number of signals unless
17472  * g_dbus_interface_info_cache_build() has been used on @info.
17473  *
17474  * Returns: A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info.
17475  * Since: 2.26
17476  */
17477
17478
17479 /**
17480  * g_dbus_interface_info_ref:
17481  * @info: A #GDBusInterfaceInfo
17482  *
17483  * If @info is statically allocated does nothing. Otherwise increases
17484  * the reference count.
17485  *
17486  * Returns: The same @info.
17487  * Since: 2.26
17488  */
17489
17490
17491 /**
17492  * g_dbus_interface_info_unref:
17493  * @info: A #GDBusInterfaceInfo.
17494  *
17495  * If @info is statically allocated, does nothing. Otherwise decreases
17496  * the reference count of @info. When its reference count drops to 0,
17497  * the memory used is freed.
17498  *
17499  * Since: 2.26
17500  */
17501
17502
17503 /**
17504  * g_dbus_is_address:
17505  * @string: A string.
17506  *
17507  * Checks if @string is a D-Bus address.
17508  * This doesn't check if @string is actually supported by #GDBusServer
17509  * or #GDBusConnection - use g_dbus_is_supported_address() to do more
17510  * checks.
17511  *
17512  * Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise.
17513  * Since: 2.26
17514  */
17515
17516
17517 /**
17518  * g_dbus_is_guid:
17519  * @string: The string to check.
17520  *
17521  * Checks if @string is a D-Bus GUID.
17522  * See the D-Bus specification regarding what strings are valid D-Bus
17523  * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
17524  *
17525  * Returns: %TRUE if @string is a guid, %FALSE otherwise.
17526  * Since: 2.26
17527  */
17528
17529
17530 /**
17531  * g_dbus_is_interface_name:
17532  * @string: The string to check.
17533  *
17534  * Checks if @string is a valid D-Bus interface name.
17535  *
17536  * Returns: %TRUE if valid, %FALSE otherwise.
17537  * Since: 2.26
17538  */
17539
17540
17541 /**
17542  * g_dbus_is_member_name:
17543  * @string: The string to check.
17544  *
17545  * Checks if @string is a valid D-Bus member (e.g. signal or method) name.
17546  *
17547  * Returns: %TRUE if valid, %FALSE otherwise.
17548  * Since: 2.26
17549  */
17550
17551
17552 /**
17553  * g_dbus_is_name:
17554  * @string: The string to check.
17555  *
17556  * Checks if @string is a valid D-Bus bus name (either unique or well-known).
17557  *
17558  * Returns: %TRUE if valid, %FALSE otherwise.
17559  * Since: 2.26
17560  */
17561
17562
17563 /**
17564  * g_dbus_is_supported_address:
17565  * @string: A string.
17566  * @error: Return location for error or %NULL.
17567  *
17568  * Like g_dbus_is_address() but also checks if the library suppors the
17569  * transports in @string and that key/value pairs for each transport
17570  * are valid.
17571  * supported by this library, %FALSE if @error is set.
17572  *
17573  * Returns: %TRUE if @string is a valid D-Bus address that is
17574  * Since: 2.26
17575  */
17576
17577
17578 /**
17579  * g_dbus_is_unique_name:
17580  * @string: The string to check.
17581  *
17582  * Checks if @string is a valid D-Bus unique bus name.
17583  *
17584  * Returns: %TRUE if valid, %FALSE otherwise.
17585  * Since: 2.26
17586  */
17587
17588
17589 /**
17590  * g_dbus_message_bytes_needed:
17591  * @blob: A blob represent a binary D-Bus message.
17592  * @blob_len: The length of @blob (must be at least 16).
17593  * @error: Return location for error or %NULL.
17594  *
17595  * Utility function to calculate how many bytes are needed to
17596  * completely deserialize the D-Bus message stored at @blob.
17597  * determine the size).
17598  *
17599  * Returns: Number of bytes needed or -1 if @error is set (e.g. if
17600  * Since: 2.26
17601  */
17602
17603
17604 /**
17605  * g_dbus_message_copy:
17606  * @message: A #GDBusMessage.
17607  * @error: Return location for error or %NULL.
17608  *
17609  * Copies @message. The copy is a deep copy and the returned
17610  * #GDBusMessage is completely identical except that it is guaranteed
17611  * to not be locked.
17612  * This operation can fail if e.g. @message contains file descriptors
17613  * and the per-process or system-wide open files limit is reached.
17614  * g_object_unref().
17615  *
17616  * Returns: (transfer full): A new #GDBusMessage or %NULL if @error is set. Free with
17617  * Since: 2.26
17618  */
17619
17620
17621 /**
17622  * g_dbus_message_get_arg0:
17623  * @message: A #GDBusMessage.
17624  *
17625  * Convenience to get the first item in the body of @message.
17626  *
17627  * Returns: The string item or %NULL if the first item in the body of
17628  * Since: 2.26
17629  */
17630
17631
17632 /**
17633  * g_dbus_message_get_body:
17634  * @message: A #GDBusMessage.
17635  *
17636  * Gets the body of a message.
17637  *
17638  * Returns: A #GVariant or %NULL if the body is empty. Do not free, it is owned by @message.
17639  * Since: 2.26
17640  */
17641
17642
17643 /**
17644  * g_dbus_message_get_byte_order:
17645  * @message: A #GDBusMessage.
17646  *
17647  * Gets the byte order of @message.
17648  *
17649  * Returns: The byte order.
17650  */
17651
17652
17653 /**
17654  * g_dbus_message_get_destination:
17655  * @message: A #GDBusMessage.
17656  *
17657  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
17658  *
17659  * Returns: The value.
17660  * Since: 2.26
17661  */
17662
17663
17664 /**
17665  * g_dbus_message_get_error_name:
17666  * @message: A #GDBusMessage.
17667  *
17668  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
17669  *
17670  * Returns: The value.
17671  * Since: 2.26
17672  */
17673
17674
17675 /**
17676  * g_dbus_message_get_flags:
17677  * @message: A #GDBusMessage.
17678  *
17679  * Gets the flags for @message.
17680  *
17681  * Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
17682  * Since: 2.26
17683  */
17684
17685
17686 /**
17687  * g_dbus_message_get_header:
17688  * @message: A #GDBusMessage.
17689  * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
17690  *
17691  * Gets a header field on @message.
17692  * otherwise. Do not free, it is owned by @message.
17693  *
17694  * Returns: A #GVariant with the value if the header was found, %NULL
17695  * Since: 2.26
17696  */
17697
17698
17699 /**
17700  * g_dbus_message_get_header_fields:
17701  * @message: A #GDBusMessage.
17702  *
17703  * Gets an array of all header fields on @message that are set.
17704  * %G_DBUS_MESSAGE_HEADER_FIELD_INVALID.  Each element is a
17705  * #guchar. Free with g_free().
17706  *
17707  * Returns: An array of header fields terminated by
17708  * Since: 2.26
17709  */
17710
17711
17712 /**
17713  * g_dbus_message_get_interface:
17714  * @message: A #GDBusMessage.
17715  *
17716  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
17717  *
17718  * Returns: The value.
17719  * Since: 2.26
17720  */
17721
17722
17723 /**
17724  * g_dbus_message_get_locked:
17725  * @message: A #GDBusMessage.
17726  *
17727  * Checks whether @message is locked. To monitor changes to this
17728  * value, conncet to the #GObject::notify signal to listen for changes
17729  * on the #GDBusMessage:locked property.
17730  *
17731  * Returns: %TRUE if @message is locked, %FALSE otherwise.
17732  * Since: 2.26
17733  */
17734
17735
17736 /**
17737  * g_dbus_message_get_member:
17738  * @message: A #GDBusMessage.
17739  *
17740  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
17741  *
17742  * Returns: The value.
17743  * Since: 2.26
17744  */
17745
17746
17747 /**
17748  * g_dbus_message_get_message_type:
17749  * @message: A #GDBusMessage.
17750  *
17751  * Gets the type of @message.
17752  *
17753  * Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
17754  * Since: 2.26
17755  */
17756
17757
17758 /**
17759  * g_dbus_message_get_num_unix_fds:
17760  * @message: A #GDBusMessage.
17761  *
17762  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
17763  *
17764  * Returns: The value.
17765  * Since: 2.26
17766  */
17767
17768
17769 /**
17770  * g_dbus_message_get_path:
17771  * @message: A #GDBusMessage.
17772  *
17773  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
17774  *
17775  * Returns: The value.
17776  * Since: 2.26
17777  */
17778
17779
17780 /**
17781  * g_dbus_message_get_reply_serial:
17782  * @message: A #GDBusMessage.
17783  *
17784  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
17785  *
17786  * Returns: The value.
17787  * Since: 2.26
17788  */
17789
17790
17791 /**
17792  * g_dbus_message_get_sender:
17793  * @message: A #GDBusMessage.
17794  *
17795  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
17796  *
17797  * Returns: The value.
17798  * Since: 2.26
17799  */
17800
17801
17802 /**
17803  * g_dbus_message_get_serial:
17804  * @message: A #GDBusMessage.
17805  *
17806  * Gets the serial for @message.
17807  *
17808  * Returns: A #guint32.
17809  * Since: 2.26
17810  */
17811
17812
17813 /**
17814  * g_dbus_message_get_signature:
17815  * @message: A #GDBusMessage.
17816  *
17817  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
17818  *
17819  * Returns: The value.
17820  * Since: 2.26
17821  */
17822
17823
17824 /**
17825  * g_dbus_message_get_unix_fd_list:
17826  * @message: A #GDBusMessage.
17827  *
17828  * Gets the UNIX file descriptors associated with @message, if any.
17829  * This method is only available on UNIX.
17830  * associated. Do not free, this object is owned by @message.
17831  *
17832  * Returns: (transfer none): A #GUnixFDList or %NULL if no file descriptors are
17833  * Since: 2.26
17834  */
17835
17836
17837 /**
17838  * g_dbus_message_lock:
17839  * @message: A #GDBusMessage.
17840  *
17841  * If @message is locked, does nothing. Otherwise locks the message.
17842  *
17843  * Since: 2.26
17844  */
17845
17846
17847 /**
17848  * g_dbus_message_new:
17849  *
17850  * Creates a new empty #GDBusMessage.
17851  *
17852  * Returns: A #GDBusMessage. Free with g_object_unref().
17853  * Since: 2.26
17854  */
17855
17856
17857 /**
17858  * g_dbus_message_new_from_blob:
17859  * @blob: A blob represent a binary D-Bus message.
17860  * @blob_len: The length of @blob.
17861  * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
17862  * @error: Return location for error or %NULL.
17863  *
17864  * Creates a new #GDBusMessage from the data stored at @blob. The byte
17865  * order that the message was in can be retrieved using
17866  * g_dbus_message_get_byte_order().
17867  * g_object_unref().
17868  *
17869  * Returns: A new #GDBusMessage or %NULL if @error is set. Free with
17870  * Since: 2.26
17871  */
17872
17873
17874 /**
17875  * g_dbus_message_new_method_call:
17876  * @name: A valid D-Bus name or %NULL.
17877  * @path: A valid object path.
17878  * @interface_: A valid D-Bus interface name or %NULL.
17879  * @method: A valid method name.
17880  *
17881  * Creates a new #GDBusMessage for a method call.
17882  *
17883  * Returns: A #GDBusMessage. Free with g_object_unref().
17884  * Since: 2.26
17885  */
17886
17887
17888 /**
17889  * g_dbus_message_new_method_error:
17890  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17891  * @error_name: A valid D-Bus error name.
17892  * @error_message_format: The D-Bus error message in a printf() format.
17893  * @...: Arguments for @error_message_format.
17894  *
17895  * Creates a new #GDBusMessage that is an error reply to @method_call_message.
17896  *
17897  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
17898  * Since: 2.26
17899  */
17900
17901
17902 /**
17903  * g_dbus_message_new_method_error_literal:
17904  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17905  * @error_name: A valid D-Bus error name.
17906  * @error_message: The D-Bus error message.
17907  *
17908  * Creates a new #GDBusMessage that is an error reply to @method_call_message.
17909  *
17910  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
17911  * Since: 2.26
17912  */
17913
17914
17915 /**
17916  * g_dbus_message_new_method_error_valist:
17917  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17918  * @error_name: A valid D-Bus error name.
17919  * @error_message_format: The D-Bus error message in a printf() format.
17920  * @var_args: Arguments for @error_message_format.
17921  *
17922  * Like g_dbus_message_new_method_error() but intended for language bindings.
17923  *
17924  * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
17925  * Since: 2.26
17926  */
17927
17928
17929 /**
17930  * g_dbus_message_new_method_reply:
17931  * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17932  *
17933  * Creates a new #GDBusMessage that is a reply to @method_call_message.
17934  *
17935  * Returns: (transfer full): #GDBusMessage. Free with g_object_unref().
17936  * Since: 2.26
17937  */
17938
17939
17940 /**
17941  * g_dbus_message_new_signal:
17942  * @path: A valid object path.
17943  * @interface_: A valid D-Bus interface name.
17944  * @signal: A valid signal name.
17945  *
17946  * Creates a new #GDBusMessage for a signal emission.
17947  *
17948  * Returns: A #GDBusMessage. Free with g_object_unref().
17949  * Since: 2.26
17950  */
17951
17952
17953 /**
17954  * g_dbus_message_print:
17955  * @message: A #GDBusMessage.
17956  * @indent: Indentation level.
17957  *
17958  * Produces a human-readable multi-line description of @message.
17959  * The contents of the description has no ABI guarantees, the contents
17960  * and formatting is subject to change at any time. Typical output
17961  * looks something like this:
17962  * <programlisting>
17963  * Headers:
17964  * path -> objectpath '/org/gtk/GDBus/TestObject'
17965  * interface -> 'org.gtk.GDBus.TestInterface'
17966  * member -> 'GimmeStdout'
17967  * destination -> ':1.146'
17968  * UNIX File Descriptors:
17969  * (none)
17970  * </programlisting>
17971  * or
17972  * <programlisting>
17973  * Headers:
17974  * reply-serial -> uint32 4
17975  * destination -> ':1.159'
17976  * sender -> ':1.146'
17977  * num-unix-fds -> uint32 1
17978  * UNIX File Descriptors:
17979  * </programlisting>
17980  *
17981  * Type:    method-return
17982  * Flags:   no-reply-expected
17983  * Version: 0
17984  * Serial:  477
17985  * Body: ()
17986  * Fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
17987  * Returns: A string that should be freed with g_free().
17988  * Since: 2.26
17989  */
17990
17991
17992 /**
17993  * g_dbus_message_set_body:
17994  * @message: A #GDBusMessage.
17995  * @body: Either %NULL or a #GVariant that is a tuple.
17996  *
17997  * Sets the body @message. As a side-effect the
17998  * %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the
17999  * type string of @body (or cleared if @body is %NULL).
18000  * If @body is floating, @message assumes ownership of @body.
18001  *
18002  * Since: 2.26
18003  */
18004
18005
18006 /**
18007  * g_dbus_message_set_byte_order:
18008  * @message: A #GDBusMessage.
18009  * @byte_order: The byte order.
18010  *
18011  * Sets the byte order of @message.
18012  */
18013
18014
18015 /**
18016  * g_dbus_message_set_destination:
18017  * @message: A #GDBusMessage.
18018  * @value: The value to set.
18019  *
18020  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
18021  *
18022  * Since: 2.26
18023  */
18024
18025
18026 /**
18027  * g_dbus_message_set_error_name:
18028  * @message: A #GDBusMessage.
18029  * @value: The value to set.
18030  *
18031  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
18032  *
18033  * Since: 2.26
18034  */
18035
18036
18037 /**
18038  * g_dbus_message_set_flags:
18039  * @message: A #GDBusMessage.
18040  * @flags: Flags for @message that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
18041  *
18042  * Sets the flags to set on @message.
18043  *
18044  * Since: 2.26
18045  */
18046
18047
18048 /**
18049  * g_dbus_message_set_header:
18050  * @message: A #GDBusMessage.
18051  * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
18052  * @value: A #GVariant to set the header field or %NULL to clear the header field.
18053  *
18054  * Sets a header field on @message.
18055  * If @value is floating, @message assumes ownership of @value.
18056  *
18057  * Since: 2.26
18058  */
18059
18060
18061 /**
18062  * g_dbus_message_set_interface:
18063  * @message: A #GDBusMessage.
18064  * @value: The value to set.
18065  *
18066  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
18067  *
18068  * Since: 2.26
18069  */
18070
18071
18072 /**
18073  * g_dbus_message_set_member:
18074  * @message: A #GDBusMessage.
18075  * @value: The value to set.
18076  *
18077  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
18078  *
18079  * Since: 2.26
18080  */
18081
18082
18083 /**
18084  * g_dbus_message_set_message_type:
18085  * @message: A #GDBusMessage.
18086  * @type: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
18087  *
18088  * Sets @message to be of @type.
18089  *
18090  * Since: 2.26
18091  */
18092
18093
18094 /**
18095  * g_dbus_message_set_num_unix_fds:
18096  * @message: A #GDBusMessage.
18097  * @value: The value to set.
18098  *
18099  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
18100  *
18101  * Since: 2.26
18102  */
18103
18104
18105 /**
18106  * g_dbus_message_set_path:
18107  * @message: A #GDBusMessage.
18108  * @value: The value to set.
18109  *
18110  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
18111  *
18112  * Since: 2.26
18113  */
18114
18115
18116 /**
18117  * g_dbus_message_set_reply_serial:
18118  * @message: A #GDBusMessage.
18119  * @value: The value to set.
18120  *
18121  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
18122  *
18123  * Since: 2.26
18124  */
18125
18126
18127 /**
18128  * g_dbus_message_set_sender:
18129  * @message: A #GDBusMessage.
18130  * @value: The value to set.
18131  *
18132  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
18133  *
18134  * Since: 2.26
18135  */
18136
18137
18138 /**
18139  * g_dbus_message_set_serial:
18140  * @message: A #GDBusMessage.
18141  * @serial: A #guint32.
18142  *
18143  * Sets the serial for @message.
18144  *
18145  * Since: 2.26
18146  */
18147
18148
18149 /**
18150  * g_dbus_message_set_signature:
18151  * @message: A #GDBusMessage.
18152  * @value: The value to set.
18153  *
18154  * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
18155  *
18156  * Since: 2.26
18157  */
18158
18159
18160 /**
18161  * g_dbus_message_set_unix_fd_list:
18162  * @message: A #GDBusMessage.
18163  * @fd_list: (allow-none): A #GUnixFDList or %NULL.
18164  *
18165  * Sets the UNIX file descriptors associated with @message. As a
18166  * side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header
18167  * field is set to the number of fds in @fd_list (or cleared if
18168  * This method is only available on UNIX.
18169  *
18170  * Since: 2.26
18171  */
18172
18173
18174 /**
18175  * g_dbus_message_to_blob:
18176  * @message: A #GDBusMessage.
18177  * @out_size: Return location for size of generated blob.
18178  * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
18179  * @error: Return location for error.
18180  *
18181  * Serializes @message to a blob. The byte order returned by
18182  * g_dbus_message_get_byte_order() will be used.
18183  * generated by @message or %NULL if @error is set. Free with g_free().
18184  *
18185  * Returns: A pointer to a valid binary D-Bus message of @out_size bytes
18186  * Since: 2.26
18187  */
18188
18189
18190 /**
18191  * g_dbus_message_to_gerror:
18192  * @message: A #GDBusMessage.
18193  * @error: The #GError to set.
18194  *
18195  * If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does
18196  * nothing and returns %FALSE.
18197  * Otherwise this method encodes the error in @message as a #GError
18198  * using g_dbus_error_set_dbus_error() using the information in the
18199  * %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as
18200  * well as the first string item in @message's body.
18201  *
18202  * Returns: %TRUE if @error was set, %FALSE otherwise.
18203  * Since: 2.26
18204  */
18205
18206
18207 /**
18208  * g_dbus_method_info_ref:
18209  * @info: A #GDBusMethodInfo
18210  *
18211  * If @info is statically allocated does nothing. Otherwise increases
18212  * the reference count.
18213  *
18214  * Returns: The same @info.
18215  * Since: 2.26
18216  */
18217
18218
18219 /**
18220  * g_dbus_method_info_unref:
18221  * @info: A #GDBusMethodInfo.
18222  *
18223  * If @info is statically allocated, does nothing. Otherwise decreases
18224  * the reference count of @info. When its reference count drops to 0,
18225  * the memory used is freed.
18226  *
18227  * Since: 2.26
18228  */
18229
18230
18231 /**
18232  * g_dbus_method_invocation_get_connection:
18233  * @invocation: A #GDBusMethodInvocation.
18234  *
18235  * Gets the #GDBusConnection the method was invoked on.
18236  *
18237  * Returns: (transfer none): A #GDBusConnection. Do not free, it is owned by @invocation.
18238  * Since: 2.26
18239  */
18240
18241
18242 /**
18243  * g_dbus_method_invocation_get_interface_name:
18244  * @invocation: A #GDBusMethodInvocation.
18245  *
18246  * Gets the name of the D-Bus interface the method was invoked on.
18247  *
18248  * Returns: A string. Do not free, it is owned by @invocation.
18249  * Since: 2.26
18250  */
18251
18252
18253 /**
18254  * g_dbus_method_invocation_get_message:
18255  * @invocation: A #GDBusMethodInvocation.
18256  *
18257  * Gets the #GDBusMessage for the method invocation. This is useful if
18258  * you need to use low-level protocol features, such as UNIX file
18259  * descriptor passing, that cannot be properly expressed in the
18260  * #GVariant API.
18261  * See <xref linkend="gdbus-server"/> and <xref
18262  * linkend="gdbus-unix-fd-client"/> for an example of how to use this
18263  * low-level API to send and receive UNIX file descriptors.
18264  *
18265  * Returns: (transfer none): #GDBusMessage. Do not free, it is owned by @invocation.
18266  * Since: 2.26
18267  */
18268
18269
18270 /**
18271  * g_dbus_method_invocation_get_method_info:
18272  * @invocation: A #GDBusMethodInvocation.
18273  *
18274  * Gets information about the method call, if any.
18275  *
18276  * Returns: A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation.
18277  * Since: 2.26
18278  */
18279
18280
18281 /**
18282  * g_dbus_method_invocation_get_method_name:
18283  * @invocation: A #GDBusMethodInvocation.
18284  *
18285  * Gets the name of the method that was invoked.
18286  *
18287  * Returns: A string. Do not free, it is owned by @invocation.
18288  * Since: 2.26
18289  */
18290
18291
18292 /**
18293  * g_dbus_method_invocation_get_object_path:
18294  * @invocation: A #GDBusMethodInvocation.
18295  *
18296  * Gets the object path the method was invoked on.
18297  *
18298  * Returns: A string. Do not free, it is owned by @invocation.
18299  * Since: 2.26
18300  */
18301
18302
18303 /**
18304  * g_dbus_method_invocation_get_parameters:
18305  * @invocation: A #GDBusMethodInvocation.
18306  *
18307  * Gets the parameters of the method invocation.
18308  *
18309  * Returns: A #GVariant. Do not free, it is owned by @invocation.
18310  * Since: 2.26
18311  */
18312
18313
18314 /**
18315  * g_dbus_method_invocation_get_sender:
18316  * @invocation: A #GDBusMethodInvocation.
18317  *
18318  * Gets the bus name that invoked the method.
18319  *
18320  * Returns: A string. Do not free, it is owned by @invocation.
18321  * Since: 2.26
18322  */
18323
18324
18325 /**
18326  * g_dbus_method_invocation_get_user_data: (skip)
18327  * @invocation: A #GDBusMethodInvocation.
18328  *
18329  * Gets the @user_data #gpointer passed to g_dbus_connection_register_object().
18330  *
18331  * Returns: A #gpointer.
18332  * Since: 2.26
18333  */
18334
18335
18336 /**
18337  * g_dbus_method_invocation_return_dbus_error:
18338  * @invocation: A #GDBusMethodInvocation.
18339  * @error_name: A valid D-Bus error name.
18340  * @error_message: A valid D-Bus error message.
18341  *
18342  * Finishes handling a D-Bus method call by returning an error.
18343  * This method will free @invocation, you cannot use it afterwards.
18344  *
18345  * Since: 2.26
18346  */
18347
18348
18349 /**
18350  * g_dbus_method_invocation_return_error:
18351  * @invocation: A #GDBusMethodInvocation.
18352  * @domain: A #GQuark for the #GError error domain.
18353  * @code: The error code.
18354  * @format: printf()-style format.
18355  * @...: Parameters for @format.
18356  *
18357  * Finishes handling a D-Bus method call by returning an error.
18358  * See g_dbus_error_encode_gerror() for details about what error name
18359  * will be returned on the wire. In a nutshell, if the given error is
18360  * registered using g_dbus_error_register_error() the name given
18361  * during registration is used. Otherwise, a name of the form
18362  * <literal>org.gtk.GDBus.UnmappedGError.Quark...</literal> is
18363  * used. This provides transparent mapping of #GError between
18364  * applications using GDBus.
18365  * If you are writing an application intended to be portable,
18366  * <emphasis>always</emphasis> register errors with g_dbus_error_register_error()
18367  * or use g_dbus_method_invocation_return_dbus_error().
18368  * This method will free @invocation, you cannot use it afterwards.
18369  *
18370  * Since: 2.26
18371  */
18372
18373
18374 /**
18375  * g_dbus_method_invocation_return_error_literal:
18376  * @invocation: A #GDBusMethodInvocation.
18377  * @domain: A #GQuark for the #GError error domain.
18378  * @code: The error code.
18379  * @message: The error message.
18380  *
18381  * Like g_dbus_method_invocation_return_error() but without printf()-style formatting.
18382  * This method will free @invocation, you cannot use it afterwards.
18383  *
18384  * Since: 2.26
18385  */
18386
18387
18388 /**
18389  * g_dbus_method_invocation_return_error_valist:
18390  * @invocation: A #GDBusMethodInvocation.
18391  * @domain: A #GQuark for the #GError error domain.
18392  * @code: The error code.
18393  * @format: printf()-style format.
18394  * @var_args: #va_list of parameters for @format.
18395  *
18396  * Like g_dbus_method_invocation_return_error() but intended for
18397  * language bindings.
18398  * This method will free @invocation, you cannot use it afterwards.
18399  *
18400  * Since: 2.26
18401  */
18402
18403
18404 /**
18405  * g_dbus_method_invocation_return_gerror:
18406  * @invocation: A #GDBusMethodInvocation.
18407  * @error: A #GError.
18408  *
18409  * Like g_dbus_method_invocation_return_error() but takes a #GError
18410  * instead of the error domain, error code and message.
18411  * This method will free @invocation, you cannot use it afterwards.
18412  *
18413  * Since: 2.26
18414  */
18415
18416
18417 /**
18418  * g_dbus_method_invocation_return_value:
18419  * @invocation: A #GDBusMethodInvocation.
18420  * @parameters: A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
18421  *
18422  * Finishes handling a D-Bus method call by returning @parameters.
18423  * If the @parameters GVariant is floating, it is consumed.
18424  * It is an error if @parameters is not of the right format.
18425  * This method will free @invocation, you cannot use it afterwards.
18426  *
18427  * Since: 2.26
18428  */
18429
18430
18431 /**
18432  * g_dbus_node_info_generate_xml:
18433  * @info: A #GDBusNodeInfo.
18434  * @indent: Indentation level.
18435  * @string_builder: A #GString to to append XML data to.
18436  *
18437  * Appends an XML representation of @info (and its children) to @string_builder.
18438  * This function is typically used for generating introspection XML documents at run-time for
18439  * handling the <literal>org.freedesktop.DBus.Introspectable.Introspect</literal> method.
18440  *
18441  * Since: 2.26
18442  */
18443
18444
18445 /**
18446  * g_dbus_node_info_lookup_interface:
18447  * @info: A #GDBusNodeInfo.
18448  * @name: A D-Bus interface name.
18449  *
18450  * Looks up information about an interface.
18451  * This cost of this function is O(n) in number of interfaces.
18452  *
18453  * Returns: A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info.
18454  * Since: 2.26
18455  */
18456
18457
18458 /**
18459  * g_dbus_node_info_new_for_xml:
18460  * @xml_data: Valid D-Bus introspection XML.
18461  * @error: Return location for error.
18462  *
18463  * Parses @xml_data and returns a #GDBusNodeInfo representing the data.
18464  * with g_dbus_node_info_unref().
18465  *
18466  * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free
18467  * Since: 2.26
18468  */
18469
18470
18471 /**
18472  * g_dbus_node_info_ref:
18473  * @info: A #GDBusNodeInfo
18474  *
18475  * If @info is statically allocated does nothing. Otherwise increases
18476  * the reference count.
18477  *
18478  * Returns: The same @info.
18479  * Since: 2.26
18480  */
18481
18482
18483 /**
18484  * g_dbus_node_info_unref:
18485  * @info: A #GDBusNodeInfo.
18486  *
18487  * If @info is statically allocated, does nothing. Otherwise decreases
18488  * the reference count of @info. When its reference count drops to 0,
18489  * the memory used is freed.
18490  *
18491  * Since: 2.26
18492  */
18493
18494
18495 /**
18496  * g_dbus_property_info_ref:
18497  * @info: A #GDBusPropertyInfo
18498  *
18499  * If @info is statically allocated does nothing. Otherwise increases
18500  * the reference count.
18501  *
18502  * Returns: The same @info.
18503  * Since: 2.26
18504  */
18505
18506
18507 /**
18508  * g_dbus_property_info_unref:
18509  * @info: A #GDBusPropertyInfo.
18510  *
18511  * If @info is statically allocated, does nothing. Otherwise decreases
18512  * the reference count of @info. When its reference count drops to 0,
18513  * the memory used is freed.
18514  *
18515  * Since: 2.26
18516  */
18517
18518
18519 /**
18520  * g_dbus_proxy_call:
18521  * @proxy: A #GDBusProxy.
18522  * @method_name: Name of method to invoke.
18523  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
18524  * @flags: Flags from the #GDBusCallFlags enumeration.
18525  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
18526  * @cancellable: A #GCancellable or %NULL.
18527  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
18528  * @user_data: The data to pass to @callback.
18529  *
18530  * Asynchronously invokes the @method_name method on @proxy.
18531  * If @method_name contains any dots, then @name is split into interface and
18532  * method name parts. This allows using @proxy for invoking methods on
18533  * other interfaces.
18534  * If the #GDBusConnection associated with @proxy is closed then
18535  * the operation will fail with %G_IO_ERROR_CLOSED. If
18536  * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
18537  * compatible with the D-Bus protocol, the operation fails with
18538  * %G_IO_ERROR_INVALID_ARGUMENT.
18539  * If the @parameters #GVariant is floating, it is consumed. This allows
18540  * convenient 'inline' use of g_variant_new(), e.g.:
18541  * |[
18542  * g_dbus_proxy_call (proxy,
18543  * "TwoStrings",
18544  * g_variant_new ("(ss)",
18545  * "Thing One",
18546  * "Thing Two"),
18547  * G_DBUS_CALL_FLAGS_NONE,
18548  * -1,
18549  * NULL,
18550  * (GAsyncReadyCallback) two_strings_done,
18551  * &amp;data);
18552  * ]|
18553  * This is an asynchronous method. When the operation is finished,
18554  * <link linkend="g-main-context-push-thread-default">thread-default
18555  * main loop</link> of the thread you are calling this method from.
18556  * You can then call g_dbus_proxy_call_finish() to get the result of
18557  * the operation. See g_dbus_proxy_call_sync() for the synchronous
18558  * version of this method.
18559  *
18560  * Since: 2.26
18561  */
18562
18563
18564 /**
18565  * g_dbus_proxy_call_finish:
18566  * @proxy: A #GDBusProxy.
18567  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call().
18568  * @error: Return location for error or %NULL.
18569  *
18570  * Finishes an operation started with g_dbus_proxy_call().
18571  * return values. Free with g_variant_unref().
18572  *
18573  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
18574  * Since: 2.26
18575  */
18576
18577
18578 /**
18579  * g_dbus_proxy_call_sync:
18580  * @proxy: A #GDBusProxy.
18581  * @method_name: Name of method to invoke.
18582  * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
18583  * @flags: Flags from the #GDBusCallFlags enumeration.
18584  * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
18585  * @cancellable: A #GCancellable or %NULL.
18586  * @error: Return location for error or %NULL.
18587  *
18588  * Synchronously invokes the @method_name method on @proxy.
18589  * If @method_name contains any dots, then @name is split into interface and
18590  * method name parts. This allows using @proxy for invoking methods on
18591  * other interfaces.
18592  * If the #GDBusConnection associated with @proxy is disconnected then
18593  * the operation will fail with %G_IO_ERROR_CLOSED. If
18594  * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
18595  * compatible with the D-Bus protocol, the operation fails with
18596  * %G_IO_ERROR_INVALID_ARGUMENT.
18597  * If the @parameters #GVariant is floating, it is consumed. This allows
18598  * convenient 'inline' use of g_variant_new(), e.g.:
18599  * |[
18600  * g_dbus_proxy_call_sync (proxy,
18601  * "TwoStrings",
18602  * g_variant_new ("(ss)",
18603  * "Thing One",
18604  * "Thing Two"),
18605  * G_DBUS_CALL_FLAGS_NONE,
18606  * -1,
18607  * NULL,
18608  * &amp;error);
18609  * ]|
18610  * The calling thread is blocked until a reply is received. See
18611  * g_dbus_proxy_call() for the asynchronous version of this
18612  * method.
18613  * return values. Free with g_variant_unref().
18614  *
18615  * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
18616  * Since: 2.26
18617  */
18618
18619
18620 /**
18621  * g_dbus_proxy_get_cached_property:
18622  * @proxy: A #GDBusProxy.
18623  * @property_name: Property name.
18624  *
18625  * Looks up the value for a property from the cache. This call does no
18626  * blocking IO.
18627  * If @proxy has an expected interface (see
18628  * #GDBusProxy:g-interface-info), then @property_name (for existence)
18629  * is checked against it.
18630  * for @property_name or %NULL if the value is not in the cache. The
18631  * returned reference must be freed with g_variant_unref().
18632  *
18633  * Returns: A reference to the #GVariant instance that holds the value
18634  * Since: 2.26
18635  */
18636
18637
18638 /**
18639  * g_dbus_proxy_get_cached_property_names:
18640  * @proxy: A #GDBusProxy.
18641  *
18642  * Gets the names of all cached properties on @proxy.
18643  * no cached properties. Free the returned array with g_strfreev().
18644  *
18645  * Returns: A %NULL-terminated array of strings or %NULL if @proxy has
18646  * Since: 2.26
18647  */
18648
18649
18650 /**
18651  * g_dbus_proxy_get_connection:
18652  * @proxy: A #GDBusProxy.
18653  *
18654  * Gets the connection @proxy is for.
18655  *
18656  * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free.
18657  * Since: 2.26
18658  */
18659
18660
18661 /**
18662  * g_dbus_proxy_get_default_timeout:
18663  * @proxy: A #GDBusProxy.
18664  *
18665  * Gets the timeout to use if -1 (specifying default timeout) is
18666  * passed as @timeout_msec in the g_dbus_proxy_call() and
18667  * g_dbus_proxy_call_sync() functions.
18668  * See the #GDBusProxy:g-default-timeout property for more details.
18669  *
18670  * Returns: Timeout to use for @proxy.
18671  * Since: 2.26
18672  */
18673
18674
18675 /**
18676  * g_dbus_proxy_get_flags:
18677  * @proxy: A #GDBusProxy.
18678  *
18679  * Gets the flags that @proxy was constructed with.
18680  *
18681  * Returns: Flags from the #GDBusProxyFlags enumeration.
18682  * Since: 2.26
18683  */
18684
18685
18686 /**
18687  * g_dbus_proxy_get_interface_info:
18688  * @proxy: A #GDBusProxy
18689  *
18690  * Returns the #GDBusInterfaceInfo, if any, specifying the minimal
18691  * interface that @proxy conforms to.
18692  * See the #GDBusProxy:g-interface-info property for more details.
18693  * object, it is owned by @proxy.
18694  *
18695  * Returns: A #GDBusInterfaceInfo or %NULL. Do not unref the returned
18696  * Since: 2.26
18697  */
18698
18699
18700 /**
18701  * g_dbus_proxy_get_interface_name:
18702  * @proxy: A #GDBusProxy.
18703  *
18704  * Gets the D-Bus interface name @proxy is for.
18705  *
18706  * Returns: A string owned by @proxy. Do not free.
18707  * Since: 2.26
18708  */
18709
18710
18711 /**
18712  * g_dbus_proxy_get_name:
18713  * @proxy: A #GDBusProxy.
18714  *
18715  * Gets the name that @proxy was constructed for.
18716  *
18717  * Returns: A string owned by @proxy. Do not free.
18718  * Since: 2.26
18719  */
18720
18721
18722 /**
18723  * g_dbus_proxy_get_name_owner:
18724  * @proxy: A #GDBusProxy.
18725  *
18726  * The unique name that owns the name that @proxy is for or %NULL if
18727  * no-one currently owns that name. You may connect to the
18728  * #GObject::notify signal to track changes to the
18729  * #GDBusProxy:g-name-owner property.
18730  *
18731  * Returns: The name owner or %NULL if no name owner exists. Free with g_free().
18732  * Since: 2.26
18733  */
18734
18735
18736 /**
18737  * g_dbus_proxy_get_object_path:
18738  * @proxy: A #GDBusProxy.
18739  *
18740  * Gets the object path @proxy is for.
18741  *
18742  * Returns: A string owned by @proxy. Do not free.
18743  * Since: 2.26
18744  */
18745
18746
18747 /**
18748  * g_dbus_proxy_new:
18749  * @connection: A #GDBusConnection.
18750  * @flags: Flags used when constructing the proxy.
18751  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18752  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
18753  * @object_path: An object path.
18754  * @interface_name: A D-Bus interface name.
18755  * @cancellable: A #GCancellable or %NULL.
18756  * @callback: Callback function to invoke when the proxy is ready.
18757  * @user_data: User data to pass to @callback.
18758  *
18759  * Creates a proxy for accessing @interface_name on the remote object
18760  * at @object_path owned by @name at @connection and asynchronously
18761  * loads D-Bus properties unless the
18762  * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to
18763  * the #GDBusProxy::g-properties-changed signal to get notified about
18764  * property changes.
18765  * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
18766  * match rules for signals. Connect to the #GDBusProxy::g-signal signal
18767  * to handle signals from the remote object.
18768  * If @name is a well-known name and the
18769  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
18770  * owner currently exists, the message bus will be requested to launch
18771  * a name owner for the name.
18772  * This is a failable asynchronous constructor - when the proxy is
18773  * ready, @callback will be invoked and you can use
18774  * g_dbus_proxy_new_finish() to get the result.
18775  * See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.
18776  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18777  *
18778  * Since: 2.26
18779  */
18780
18781
18782 /**
18783  * g_dbus_proxy_new_finish:
18784  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new().
18785  * @error: Return location for error or %NULL.
18786  *
18787  * Finishes creating a #GDBusProxy.
18788  *
18789  * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
18790  * Since: 2.26
18791  */
18792
18793
18794 /**
18795  * g_dbus_proxy_new_for_bus:
18796  * @bus_type: A #GBusType.
18797  * @flags: Flags used when constructing the proxy.
18798  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18799  * @name: A bus name (well-known or unique).
18800  * @object_path: An object path.
18801  * @interface_name: A D-Bus interface name.
18802  * @cancellable: A #GCancellable or %NULL.
18803  * @callback: Callback function to invoke when the proxy is ready.
18804  * @user_data: User data to pass to @callback.
18805  *
18806  * Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
18807  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18808  *
18809  * Since: 2.26
18810  */
18811
18812
18813 /**
18814  * g_dbus_proxy_new_for_bus_finish:
18815  * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus().
18816  * @error: Return location for error or %NULL.
18817  *
18818  * Finishes creating a #GDBusProxy.
18819  *
18820  * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
18821  * Since: 2.26
18822  */
18823
18824
18825 /**
18826  * g_dbus_proxy_new_for_bus_sync:
18827  * @bus_type: A #GBusType.
18828  * @flags: Flags used when constructing the proxy.
18829  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18830  * @name: A bus name (well-known or unique).
18831  * @object_path: An object path.
18832  * @interface_name: A D-Bus interface name.
18833  * @cancellable: A #GCancellable or %NULL.
18834  * @error: Return location for error or %NULL.
18835  *
18836  * Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
18837  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18838  *
18839  * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
18840  * Since: 2.26
18841  */
18842
18843
18844 /**
18845  * g_dbus_proxy_new_sync:
18846  * @connection: A #GDBusConnection.
18847  * @flags: Flags used when constructing the proxy.
18848  * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18849  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
18850  * @object_path: An object path.
18851  * @interface_name: A D-Bus interface name.
18852  * @cancellable: (allow-none): A #GCancellable or %NULL.
18853  * @error: (allow-none): Return location for error or %NULL.
18854  *
18855  * Creates a proxy for accessing @interface_name on the remote object
18856  * at @object_path owned by @name at @connection and synchronously
18857  * loads D-Bus properties unless the
18858  * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.
18859  * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
18860  * match rules for signals. Connect to the #GDBusProxy::g-signal signal
18861  * to handle signals from the remote object.
18862  * If @name is a well-known name and the
18863  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
18864  * owner currently exists, the message bus will be requested to launch
18865  * a name owner for the name.
18866  * This is a synchronous failable constructor. See g_dbus_proxy_new()
18867  * and g_dbus_proxy_new_finish() for the asynchronous version.
18868  * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18869  *
18870  * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
18871  * Since: 2.26
18872  */
18873
18874
18875 /**
18876  * g_dbus_proxy_set_cached_property:
18877  * @proxy: A #GDBusProxy
18878  * @property_name: Property name.
18879  * @value: (allow-none): Value for the property or %NULL to remove it from the cache.
18880  *
18881  * If @value is not %NULL, sets the cached value for the property with
18882  * name @property_name to the value in @value.
18883  * If @value is %NULL, then the cached value is removed from the
18884  * property cache.
18885  * If @proxy has an expected interface (see
18886  * #GDBusProxy:g-interface-info), then @property_name (for existence)
18887  * and @value (for the type) is checked against it.
18888  * If the @value #GVariant is floating, it is consumed. This allows
18889  * convenient 'inline' use of g_variant_new(), e.g.
18890  * |[
18891  * g_dbus_proxy_set_cached_property (proxy,
18892  * "SomeProperty",
18893  * g_variant_new ("(si)",
18894  * "A String",
18895  * 42));
18896  * ]|
18897  * Normally you will not need to use this method since @proxy is
18898  * tracking changes using the
18899  * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
18900  * D-Bus signal. However, for performance reasons an object may decide
18901  * to not use this signal for some properties and instead use a
18902  * proprietary out-of-band mechanism to transmit changes.
18903  * As a concrete example, consider an object with a property
18904  * <literal>ChatroomParticipants</literal> which is an array of
18905  * strings. Instead of transmitting the same (long) array every time
18906  * the property changes, it is more efficient to only transmit the
18907  * delta using e.g. signals <literal>ChatroomParticipantJoined(String
18908  * name)</literal> and <literal>ChatroomParticipantParted(String
18909  * name)</literal>.
18910  *
18911  * Since: 2.26
18912  */
18913
18914
18915 /**
18916  * g_dbus_proxy_set_default_timeout:
18917  * @proxy: A #GDBusProxy.
18918  * @timeout_msec: Timeout in milliseconds.
18919  *
18920  * Sets the timeout to use if -1 (specifying default timeout) is
18921  * passed as @timeout_msec in the g_dbus_proxy_call() and
18922  * g_dbus_proxy_call_sync() functions.
18923  * See the #GDBusProxy:g-default-timeout property for more details.
18924  *
18925  * Since: 2.26
18926  */
18927
18928
18929 /**
18930  * g_dbus_proxy_set_interface_info:
18931  * @proxy: A #GDBusProxy
18932  * @info: (allow-none): Minimum interface this proxy conforms to or %NULL to unset.
18933  *
18934  * Ensure that interactions with @proxy conform to the given
18935  * interface.  For example, when completing a method call, if the type
18936  * signature of the message isn't what's expected, the given #GError
18937  * is set.  Signals that have a type signature mismatch are simply
18938  * dropped.
18939  * See the #GDBusProxy:g-interface-info property for more details.
18940  *
18941  * Since: 2.26
18942  */
18943
18944
18945 /**
18946  * g_dbus_server_get_client_address:
18947  * @server: A #GDBusServer.
18948  *
18949  * Gets a D-Bus address string that can be used by clients to connect
18950  * to @server.
18951  * by @server.
18952  *
18953  * Returns: A D-Bus address string. Do not free, the string is owned
18954  * Since: 2.26
18955  */
18956
18957
18958 /**
18959  * g_dbus_server_get_flags:
18960  * @server: A #GDBusServer.
18961  *
18962  * Gets the flags for @server.
18963  *
18964  * Returns: A set of flags from the #GDBusServerFlags enumeration.
18965  * Since: 2.26
18966  */
18967
18968
18969 /**
18970  * g_dbus_server_get_guid:
18971  * @server: A #GDBusServer.
18972  *
18973  * Gets the GUID for @server.
18974  *
18975  * Returns: A D-Bus GUID. Do not free this string, it is owned by @server.
18976  * Since: 2.26
18977  */
18978
18979
18980 /**
18981  * g_dbus_server_is_active:
18982  * @server: A #GDBusServer.
18983  *
18984  * Gets whether @server is active.
18985  *
18986  * Returns: %TRUE if server is active, %FALSE otherwise.
18987  * Since: 2.26
18988  */
18989
18990
18991 /**
18992  * g_dbus_server_new_sync:
18993  * @address: A D-Bus address.
18994  * @flags: Flags from the #GDBusServerFlags enumeration.
18995  * @guid: A D-Bus GUID.
18996  * @observer: A #GDBusAuthObserver or %NULL.
18997  * @cancellable: A #GCancellable or %NULL.
18998  * @error: Return location for server or %NULL.
18999  *
19000  * Creates a new D-Bus server that listens on the first address in
19001  * Once constructed, you can use g_dbus_server_get_client_address() to
19002  * get a D-Bus address string that clients can use to connect.
19003  * Connect to the #GDBusServer::new-connection signal to handle
19004  * incoming connections.
19005  * The returned #GDBusServer isn't active - you have to start it with
19006  * g_dbus_server_start().
19007  * See <xref linkend="gdbus-peer-to-peer"/> for how #GDBusServer can
19008  * be used.
19009  * This is a synchronous failable constructor. See
19010  * g_dbus_server_new() for the asynchronous version.
19011  * g_object_unref().
19012  *
19013  * Returns: A #GDBusServer or %NULL if @error is set. Free with
19014  * Since: 2.26
19015  */
19016
19017
19018 /**
19019  * g_dbus_server_start:
19020  * @server: A #GDBusServer.
19021  *
19022  * Starts @server.
19023  *
19024  * Since: 2.26
19025  */
19026
19027
19028 /**
19029  * g_dbus_server_stop:
19030  * @server: A #GDBusServer.
19031  *
19032  * Stops @server.
19033  *
19034  * Since: 2.26
19035  */
19036
19037
19038 /**
19039  * g_dbus_signal_info_ref:
19040  * @info: A #GDBusSignalInfo
19041  *
19042  * If @info is statically allocated does nothing. Otherwise increases
19043  * the reference count.
19044  *
19045  * Returns: The same @info.
19046  * Since: 2.26
19047  */
19048
19049
19050 /**
19051  * g_dbus_signal_info_unref:
19052  * @info: A #GDBusSignalInfo.
19053  *
19054  * If @info is statically allocated, does nothing. Otherwise decreases
19055  * the reference count of @info. When its reference count drops to 0,
19056  * the memory used is freed.
19057  *
19058  * Since: 2.26
19059  */
19060
19061
19062 /**
19063  * g_desktop_app_info_get_filename:
19064  * @info: a #GDesktopAppInfo
19065  *
19066  * When @info was created from a known filename, return it.  In some
19067  * situations such as the #GDesktopAppInfo returned from
19068  * g_desktop_app_info_new_from_keyfile(), this function will return %NULL.
19069  *
19070  * Returns: The full path to the file for @info, or %NULL if not known.
19071  * Since: 2.24
19072  */
19073
19074
19075 /**
19076  * g_desktop_app_info_get_is_hidden:
19077  * @info: a #GDesktopAppInfo.
19078  *
19079  * A desktop file is hidden if the Hidden key in it is
19080  * set to True.
19081  *
19082  * Returns: %TRUE if hidden, %FALSE otherwise.
19083  */
19084
19085
19086 /**
19087  * g_desktop_app_info_launch_uris_as_manager:
19088  * @appinfo: a #GDesktopAppInfo
19089  * @uris: (element-type utf8): List of URIs
19090  * @launch_context: a #GAppLaunchContext
19091  * @spawn_flags: #GSpawnFlags, used for each process
19092  * @user_setup: (scope call): a #GSpawnChildSetupFunc, used once for each process.
19093  * @user_setup_data: (closure user_setup): User data for @user_setup
19094  * @pid_callback: (scope call): Callback for child processes
19095  * @pid_callback_data: (closure pid_callback): User data for @callback
19096  * @error: a #GError
19097  *
19098  * This function performs the equivalent of g_app_info_launch_uris(),
19099  * but is intended primarily for operating system components that
19100  * launch applications.  Ordinary applications should use
19101  * g_app_info_launch_uris().
19102  * In contrast to g_app_info_launch_uris(), all processes created will
19103  * always be run directly as children as if by the UNIX fork()/exec()
19104  * calls.
19105  * This guarantee allows additional control over the exact environment
19106  * of the child processes, which is provided via a setup function
19107  * semantics of the @setup function.
19108  */
19109
19110
19111 /**
19112  * g_desktop_app_info_lookup_get_default_for_uri_scheme:
19113  * @lookup: a #GDesktopAppInfoLookup
19114  * @uri_scheme: a string containing a URI scheme.
19115  *
19116  * Gets the default application for launching applications
19117  * using this URI scheme for a particular GDesktopAppInfoLookup
19118  * implementation.
19119  * The GDesktopAppInfoLookup interface and this function is used
19120  * to implement g_app_info_get_default_for_uri_scheme() backends
19121  * in a GIO module. There is no reason for applications to use it
19122  * directly. Applications should use g_app_info_get_default_for_uri_scheme().
19123  *
19124  * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
19125  * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
19126  */
19127
19128
19129 /**
19130  * g_desktop_app_info_new:
19131  * @desktop_id: the desktop file id
19132  *
19133  * Creates a new #GDesktopAppInfo based on a desktop file id.
19134  * A desktop file id is the basename of the desktop file, including the
19135  * .desktop extension. GIO is looking for a desktop file with this name
19136  * in the <filename>applications</filename> subdirectories of the XDG data
19137  * directories (i.e. the directories specified in the
19138  * <envar>XDG_DATA_HOME</envar> and <envar>XDG_DATA_DIRS</envar> environment
19139  * variables). GIO also supports the prefix-to-subdirectory mapping that is
19140  * described in the <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Menu Spec</ulink>
19141  * (i.e. a desktop id of kde-foo.desktop will match
19142  * <filename>/usr/share/applications/kde/foo.desktop</filename>).
19143  *
19144  * Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id
19145  */
19146
19147
19148 /**
19149  * g_desktop_app_info_new_from_filename:
19150  * @filename: the path of a desktop file, in the GLib filename encoding
19151  *
19152  * Creates a new #GDesktopAppInfo.
19153  *
19154  * Returns: a new #GDesktopAppInfo or %NULL on error.
19155  */
19156
19157
19158 /**
19159  * g_desktop_app_info_new_from_keyfile:
19160  * @key_file: an opened #GKeyFile
19161  *
19162  * Creates a new #GDesktopAppInfo.
19163  *
19164  * Returns: a new #GDesktopAppInfo or %NULL on error.
19165  * Since: 2.18
19166  */
19167
19168
19169 /**
19170  * g_desktop_app_info_set_desktop_env:
19171  * @desktop_env: a string specifying what desktop this is
19172  *
19173  * Sets the name of the desktop that the application is running in.
19174  * This is used by g_app_info_should_show() to evaluate the
19175  * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal>
19176  * desktop entry fields.
19177  * The <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Desktop
19178  * Menu specification</ulink> recognizes the following:
19179  * <simplelist>
19180  * <member>GNOME</member>
19181  * <member>KDE</member>
19182  * <member>ROX</member>
19183  * <member>XFCE</member>
19184  * <member>Old</member>
19185  * </simplelist>
19186  * Should be called only once; subsequent calls are ignored.
19187  */
19188
19189
19190 /**
19191  * g_drive_can_eject:
19192  * @drive: a #GDrive.
19193  *
19194  * Checks if a drive can be ejected.
19195  *
19196  * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise.
19197  */
19198
19199
19200 /**
19201  * g_drive_can_poll_for_media:
19202  * @drive: a #GDrive.
19203  *
19204  * Checks if a drive can be polled for media changes.
19205  * %FALSE otherwise.
19206  *
19207  * Returns: %TRUE if the @drive can be polled for media changes,
19208  */
19209
19210
19211 /**
19212  * g_drive_can_start:
19213  * @drive: a #GDrive.
19214  *
19215  * Checks if a drive can be started.
19216  *
19217  * Returns: %TRUE if the @drive can be started, %FALSE otherwise.
19218  * Since: 2.22
19219  */
19220
19221
19222 /**
19223  * g_drive_can_start_degraded:
19224  * @drive: a #GDrive.
19225  *
19226  * Checks if a drive can be started degraded.
19227  *
19228  * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise.
19229  * Since: 2.22
19230  */
19231
19232
19233 /**
19234  * g_drive_can_stop:
19235  * @drive: a #GDrive.
19236  *
19237  * Checks if a drive can be stopped.
19238  *
19239  * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise.
19240  * Since: 2.22
19241  */
19242
19243
19244 /**
19245  * g_drive_eject:
19246  * @drive: a #GDrive.
19247  * @flags: flags affecting the unmount if required for eject
19248  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19249  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
19250  * @user_data: user data to pass to @callback
19251  *
19252  * Asynchronously ejects a drive.
19253  * When the operation is finished, @callback will be called.
19254  * You can then call g_drive_eject_finish() to obtain the
19255  * result of the operation.
19256  *
19257  * Deprecated: 2.22: Use g_drive_eject_with_operation() instead.
19258  */
19259
19260
19261 /**
19262  * g_drive_eject_finish:
19263  * @drive: a #GDrive.
19264  * @result: a #GAsyncResult.
19265  * @error: a #GError, or %NULL
19266  *
19267  * Finishes ejecting a drive.
19268  * %FALSE otherwise.
19269  *
19270  * Returns: %TRUE if the drive has been ejected successfully,
19271  * Deprecated: 2.22: Use g_drive_eject_with_operation_finish() instead.
19272  */
19273
19274
19275 /**
19276  * g_drive_eject_with_operation:
19277  * @drive: a #GDrive.
19278  * @flags: flags affecting the unmount if required for eject
19279  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
19280  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19281  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
19282  * @user_data: user data passed to @callback.
19283  *
19284  * Ejects a drive. This is an asynchronous operation, and is
19285  * finished by calling g_drive_eject_with_operation_finish() with the @drive
19286  * and #GAsyncResult data returned in the @callback.
19287  *
19288  * Since: 2.22
19289  */
19290
19291
19292 /**
19293  * g_drive_eject_with_operation_finish:
19294  * @drive: a #GDrive.
19295  * @result: a #GAsyncResult.
19296  * @error: a #GError location to store the error occuring, or %NULL to ignore.
19297  *
19298  * Finishes ejecting a drive. If any errors occurred during the operation,
19299  *
19300  * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise.
19301  * Since: 2.22
19302  */
19303
19304
19305 /**
19306  * g_drive_enumerate_identifiers:
19307  * @drive: a #GDrive
19308  *
19309  * Gets the kinds of identifiers that @drive has.
19310  * Use g_drive_get_identifer() to obtain the identifiers
19311  * themselves.
19312  * array of strings containing kinds of identifiers. Use g_strfreev()
19313  * to free.
19314  *
19315  * Returns: (transfer full) (array zero-terminated=1): a %NULL-terminated
19316  */
19317
19318
19319 /**
19320  * g_drive_get_icon:
19321  * @drive: a #GDrive.
19322  *
19323  * Gets the icon for @drive.
19324  * Free the returned object with g_object_unref().
19325  *
19326  * Returns: (transfer full): #GIcon for the @drive.
19327  */
19328
19329
19330 /**
19331  * g_drive_get_identifier:
19332  * @drive: a #GDrive
19333  * @kind: the kind of identifier to return
19334  *
19335  * Gets the identifier of the given kind for @drive.
19336  * requested identfier, or %NULL if the #GDrive
19337  * doesn't have this kind of identifier.
19338  *
19339  * Returns: a newly allocated string containing the
19340  */
19341
19342
19343 /**
19344  * g_drive_get_name:
19345  * @drive: a #GDrive.
19346  *
19347  * Gets the name of @drive.
19348  * string should be freed when no longer needed.
19349  *
19350  * Returns: a string containing @drive's name. The returned
19351  */
19352
19353
19354 /**
19355  * g_drive_get_start_stop_type:
19356  * @drive: a #GDrive.
19357  *
19358  * Gets a hint about how a drive can be started/stopped.
19359  *
19360  * Returns: A value from the #GDriveStartStopType enumeration.
19361  * Since: 2.22
19362  */
19363
19364
19365 /**
19366  * g_drive_get_volumes:
19367  * @drive: a #GDrive.
19368  *
19369  * Get a list of mountable volumes for @drive.
19370  * The returned list should be freed with g_list_free(), after
19371  * its elements have been unreffed with g_object_unref().
19372  *
19373  * Returns: (element-type GVolume) (transfer full): #GList containing any #GVolume objects on the given @drive.
19374  */
19375
19376
19377 /**
19378  * g_drive_has_media:
19379  * @drive: a #GDrive.
19380  *
19381  * Checks if the @drive has media. Note that the OS may not be polling
19382  * the drive for media changes; see g_drive_is_media_check_automatic()
19383  * for more details.
19384  *
19385  * Returns: %TRUE if @drive has media, %FALSE otherwise.
19386  */
19387
19388
19389 /**
19390  * g_drive_has_volumes:
19391  * @drive: a #GDrive.
19392  *
19393  * Check if @drive has any mountable volumes.
19394  *
19395  * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise.
19396  */
19397
19398
19399 /**
19400  * g_drive_is_media_check_automatic:
19401  * @drive: a #GDrive.
19402  *
19403  * Checks if @drive is capabable of automatically detecting media changes.
19404  * media changes, %FALSE otherwise.
19405  *
19406  * Returns: %TRUE if the @drive is capabable of automatically detecting
19407  */
19408
19409
19410 /**
19411  * g_drive_is_media_removable:
19412  * @drive: a #GDrive.
19413  *
19414  * Checks if the @drive supports removable media.
19415  *
19416  * Returns: %TRUE if @drive supports removable media, %FALSE otherwise.
19417  */
19418
19419
19420 /**
19421  * g_drive_poll_for_media:
19422  * @drive: a #GDrive.
19423  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19424  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
19425  * @user_data: user data to pass to @callback
19426  *
19427  * Asynchronously polls @drive to see if media has been inserted or removed.
19428  * When the operation is finished, @callback will be called.
19429  * You can then call g_drive_poll_for_media_finish() to obtain the
19430  * result of the operation.
19431  */
19432
19433
19434 /**
19435  * g_drive_poll_for_media_finish:
19436  * @drive: a #GDrive.
19437  * @result: a #GAsyncResult.
19438  * @error: a #GError, or %NULL
19439  *
19440  * Finishes an operation started with g_drive_poll_for_media() on a drive.
19441  * %FALSE otherwise.
19442  *
19443  * Returns: %TRUE if the drive has been poll_for_mediaed successfully,
19444  */
19445
19446
19447 /**
19448  * g_drive_start:
19449  * @drive: a #GDrive.
19450  * @flags: flags affecting the start operation.
19451  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
19452  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19453  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
19454  * @user_data: user data to pass to @callback
19455  *
19456  * Asynchronously starts a drive.
19457  * When the operation is finished, @callback will be called.
19458  * You can then call g_drive_start_finish() to obtain the
19459  * result of the operation.
19460  *
19461  * Since: 2.22
19462  */
19463
19464
19465 /**
19466  * g_drive_start_finish:
19467  * @drive: a #GDrive.
19468  * @result: a #GAsyncResult.
19469  * @error: a #GError, or %NULL
19470  *
19471  * Finishes starting a drive.
19472  * %FALSE otherwise.
19473  *
19474  * Returns: %TRUE if the drive has been started successfully,
19475  * Since: 2.22
19476  */
19477
19478
19479 /**
19480  * g_drive_stop:
19481  * @drive: a #GDrive.
19482  * @flags: flags affecting the unmount if required for stopping.
19483  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
19484  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19485  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
19486  * @user_data: user data to pass to @callback
19487  *
19488  * Asynchronously stops a drive.
19489  * When the operation is finished, @callback will be called.
19490  * You can then call g_drive_stop_finish() to obtain the
19491  * result of the operation.
19492  *
19493  * Since: 2.22
19494  */
19495
19496
19497 /**
19498  * g_drive_stop_finish:
19499  * @drive: a #GDrive.
19500  * @result: a #GAsyncResult.
19501  * @error: a #GError, or %NULL
19502  *
19503  * Finishes stopping a drive.
19504  * %FALSE otherwise.
19505  *
19506  * Returns: %TRUE if the drive has been stopped successfully,
19507  * Since: 2.22
19508  */
19509
19510
19511 /**
19512  * g_emblem_get_icon:
19513  * @emblem: a #GEmblem from which the icon should be extracted.
19514  *
19515  * Gives back the icon from @emblem.
19516  * the emblem and should not be modified or freed.
19517  *
19518  * Returns: (transfer none): a #GIcon. The returned object belongs to
19519  * Since: 2.18
19520  */
19521
19522
19523 /**
19524  * g_emblem_get_origin:
19525  * @emblem: a #GEmblem
19526  *
19527  * Gets the origin of the emblem.
19528  *
19529  * Returns: (transfer none): the origin of the emblem
19530  * Since: 2.18
19531  */
19532
19533
19534 /**
19535  * g_emblem_new:
19536  * @icon: a GIcon containing the icon.
19537  *
19538  * Creates a new emblem for @icon.
19539  *
19540  * Returns: a new #GEmblem.
19541  * Since: 2.18
19542  */
19543
19544
19545 /**
19546  * g_emblem_new_with_origin:
19547  * @icon: a GIcon containing the icon.
19548  * @origin: a GEmblemOrigin enum defining the emblem's origin
19549  *
19550  * Creates a new emblem for @icon.
19551  *
19552  * Returns: a new #GEmblem.
19553  * Since: 2.18
19554  */
19555
19556
19557 /**
19558  * g_emblemed_icon_add_emblem:
19559  * @emblemed: a #GEmblemedIcon
19560  * @emblem: a #GEmblem
19561  *
19562  * Adds @emblem to the #GList of #GEmblem <!-- -->s.
19563  *
19564  * Since: 2.18
19565  */
19566
19567
19568 /**
19569  * g_emblemed_icon_clear_emblems:
19570  * @emblemed: a #GEmblemedIcon
19571  *
19572  * Removes all the emblems from @icon.
19573  *
19574  * Since: 2.28
19575  */
19576
19577
19578 /**
19579  * g_emblemed_icon_get_emblems:
19580  * @emblemed: a #GEmblemedIcon
19581  *
19582  * Gets the list of emblems for the @icon.
19583  * #GEmblem <!-- -->s that is owned by @emblemed
19584  *
19585  * Returns: (element-type Gio.Emblem) (transfer none): a #GList of
19586  * Since: 2.18
19587  */
19588
19589
19590 /**
19591  * g_emblemed_icon_get_icon:
19592  * @emblemed: a #GEmblemedIcon
19593  *
19594  * Gets the main icon for @emblemed.
19595  *
19596  * Returns: (transfer none): a #GIcon that is owned by @emblemed
19597  * Since: 2.18
19598  */
19599
19600
19601 /**
19602  * g_emblemed_icon_new:
19603  * @icon: a #GIcon
19604  * @emblem: (allow-none): a #GEmblem, or %NULL
19605  *
19606  * Creates a new emblemed icon for @icon with the emblem @emblem.
19607  *
19608  * Returns: (transfer full): a new #GIcon
19609  * Since: 2.18
19610  */
19611
19612
19613 /**
19614  * g_file_append_to:
19615  * @file: input #GFile.
19616  * @flags: a set of #GFileCreateFlags.
19617  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19618  * @error: a #GError, or %NULL
19619  *
19620  * Gets an output stream for appending data to the file. If
19621  * the file doesn't already exist it is created.
19622  * By default files created are generally readable by everyone,
19623  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
19624  * will be made readable only to the current user, to the level that
19625  * is supported on the target filesystem.
19626  * If @cancellable is not %NULL, then the operation can be cancelled by
19627  * triggering the cancellable object from another thread. If the operation
19628  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19629  * Some file systems don't allow all file names, and may
19630  * return an %G_IO_ERROR_INVALID_FILENAME error.
19631  * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will be
19632  * returned. Other errors are possible too, and depend on what kind of
19633  * filesystem the file is on.
19634  * Free the returned object with g_object_unref().
19635  *
19636  * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
19637  */
19638
19639
19640 /**
19641  * g_file_append_to_async:
19642  * @file: input #GFile.
19643  * @flags: a set of #GFileCreateFlags.
19644  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19645  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19646  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19647  * @user_data: (closure): the data to pass to callback function
19648  *
19649  * Asynchronously opens @file for appending.
19650  * For more details, see g_file_append_to() which is
19651  * the synchronous version of this call.
19652  * When the operation is finished, @callback will be called. You can then call
19653  * g_file_append_to_finish() to get the result of the operation.
19654  */
19655
19656
19657 /**
19658  * g_file_append_to_finish:
19659  * @file: input #GFile.
19660  * @res: #GAsyncResult
19661  * @error: a #GError, or %NULL
19662  *
19663  * Finishes an asynchronous file append operation started with
19664  * g_file_append_to_async().
19665  * Free the returned object with g_object_unref().
19666  *
19667  * Returns: (transfer full): a valid #GFileOutputStream or %NULL on error.
19668  */
19669
19670
19671 /**
19672  * g_file_attribute_info_list_add:
19673  * @list: a #GFileAttributeInfoList.
19674  * @name: the name of the attribute to add.
19675  * @type: the #GFileAttributeType for the attribute.
19676  * @flags: #GFileAttributeInfoFlags for the attribute.
19677  *
19678  * Adds a new attribute with @name to the @list, setting
19679  * its @type and @flags.
19680  */
19681
19682
19683 /**
19684  * g_file_attribute_info_list_dup:
19685  * @list: a #GFileAttributeInfoList to duplicate.
19686  *
19687  * Makes a duplicate of a file attribute info list.
19688  *
19689  * Returns: a copy of the given @list.
19690  */
19691
19692
19693 /**
19694  * g_file_attribute_info_list_lookup:
19695  * @list: a #GFileAttributeInfoList.
19696  * @name: the name of the attribute to lookup.
19697  *
19698  * Gets the file attribute with the name @name from @list.
19699  * attribute isn't found.
19700  *
19701  * Returns: a #GFileAttributeInfo for the @name, or %NULL if an
19702  */
19703
19704
19705 /**
19706  * g_file_attribute_info_list_new:
19707  *
19708  * Creates a new file attribute info list.
19709  *
19710  * Returns: a #GFileAttributeInfoList.
19711  */
19712
19713
19714 /**
19715  * g_file_attribute_info_list_ref:
19716  * @list: a #GFileAttributeInfoList to reference.
19717  *
19718  * References a file attribute info list.
19719  *
19720  * Returns: #GFileAttributeInfoList or %NULL on error.
19721  */
19722
19723
19724 /**
19725  * g_file_attribute_info_list_unref:
19726  * @list: The #GFileAttributeInfoList to unreference.
19727  *
19728  * Removes a reference from the given @list. If the reference count
19729  * falls to zero, the @list is deleted.
19730  */
19731
19732
19733 /**
19734  * g_file_attribute_matcher_enumerate_namespace:
19735  * @matcher: a #GFileAttributeMatcher.
19736  * @ns: a string containing a file attribute namespace.
19737  *
19738  * Checks if the matcher will match all of the keys in a given namespace.
19739  * This will always return %TRUE if a wildcard character is in use (e.g. if
19740  * matcher was created with "standard::*" and @ns is "standard", or if matcher was created
19741  * using "*" and namespace is anything.)
19742  * in the given @ns, %FALSE otherwise.
19743  *
19744  * Todo: this is awkwardly worded.
19745  * Returns: %TRUE if the matcher matches all of the entries
19746  */
19747
19748
19749 /**
19750  * g_file_attribute_matcher_enumerate_next:
19751  * @matcher: a #GFileAttributeMatcher.
19752  *
19753  * Gets the next matched attribute from a #GFileAttributeMatcher.
19754  * no more attribute exist.
19755  *
19756  * Returns: a string containing the next attribute or %NULL if
19757  */
19758
19759
19760 /**
19761  * g_file_attribute_matcher_matches:
19762  * @matcher: a #GFileAttributeMatcher.
19763  * @attribute: a file attribute key.
19764  *
19765  * Checks if an attribute will be matched by an attribute matcher. If
19766  * the matcher was created with the "*" matching string, this function
19767  * will always return %TRUE.
19768  *
19769  * Returns: %TRUE if @attribute matches @matcher. %FALSE otherwise.
19770  */
19771
19772
19773 /**
19774  * g_file_attribute_matcher_matches_only:
19775  * @matcher: a #GFileAttributeMatcher.
19776  * @attribute: a file attribute key.
19777  *
19778  * Checks if a attribute matcher only matches a given attribute. Always
19779  * returns %FALSE if "*" was used when creating the matcher.
19780  *
19781  * Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise.
19782  */
19783
19784
19785 /**
19786  * g_file_attribute_matcher_new:
19787  * @attributes: an attribute string to match.
19788  *
19789  * Creates a new file attribute matcher, which matches attributes
19790  * against a given string. #GFileAttributeMatcher<!-- -->s are reference
19791  * counted structures, and are created with a reference count of 1. If
19792  * the number of references falls to 0, the #GFileAttributeMatcher is
19793  * automatically destroyed.
19794  * The @attribute string should be formatted with specific keys separated
19795  * from namespaces with a double colon. Several "namespace::key" strings may be
19796  * concatenated with a single comma (e.g. "standard::type,standard::is-hidden").
19797  * The wildcard "*" may be used to match all keys and namespaces, or
19798  * "namespace::*" will match all keys in a given namespace.
19799  * Examples of strings to use:
19800  * <table>
19801  * <title>File Attribute Matcher strings and results</title>
19802  * <tgroup cols='2' align='left'><thead>
19803  * <row><entry> Matcher String </entry><entry> Matches </entry></row></thead>
19804  * <tbody>
19805  * <row><entry>"*"</entry><entry>matches all attributes.</entry></row>
19806  * <row><entry>"standard::is-hidden"</entry><entry>matches only the key is-hidden in the standard namespace.</entry></row>
19807  * <row><entry>"standard::type,unix::*"</entry><entry>matches the type key in the standard namespace and
19808  * all keys in the unix namespace.</entry></row>
19809  * </tbody></tgroup>
19810  * </table>
19811  *
19812  * Returns: a #GFileAttributeMatcher.
19813  */
19814
19815
19816 /**
19817  * g_file_attribute_matcher_ref:
19818  * @matcher: a #GFileAttributeMatcher.
19819  *
19820  * References a file attribute matcher.
19821  *
19822  * Returns: a #GFileAttributeMatcher.
19823  */
19824
19825
19826 /**
19827  * g_file_attribute_matcher_unref:
19828  * @matcher: a #GFileAttributeMatcher.
19829  *
19830  * Unreferences @matcher. If the reference count falls below 1,
19831  * the @matcher is automatically freed.
19832  */
19833
19834
19835 /**
19836  * g_file_copy:
19837  * @source: input #GFile.
19838  * @destination: destination #GFile
19839  * @flags: set of #GFileCopyFlags
19840  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19841  * @progress_callback: (scope call): function to callback with progress information
19842  * @progress_callback_data: (closure): user data to pass to @progress_callback
19843  * @error: #GError to set on error, or %NULL
19844  *
19845  * Copies the file @source to the location specified by @destination.
19846  * Can not handle recursive copies of directories.
19847  * If the flag #G_FILE_COPY_OVERWRITE is specified an already
19848  * existing @destination file is overwritten.
19849  * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
19850  * will be copied as symlinks, otherwise the target of the
19851  * If @cancellable is not %NULL, then the operation can be cancelled by
19852  * triggering the cancellable object from another thread. If the operation
19853  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19854  * If @progress_callback is not %NULL, then the operation can be monitored by
19855  * setting this to a #GFileProgressCallback function. @progress_callback_data
19856  * will be passed to this function. It is guaranteed that this callback will
19857  * be called after all data has been transferred with the total number of bytes
19858  * copied during the operation.
19859  * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
19860  * error is returned, independent on the status of the @destination.
19861  * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
19862  * error G_IO_ERROR_EXISTS is returned.
19863  * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
19864  * error is returned. If trying to overwrite a directory with a directory the
19865  * G_IO_ERROR_WOULD_MERGE error is returned.
19866  * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
19867  * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
19868  * is returned.
19869  * If you are interested in copying the #GFile object itself (not the on-disk
19870  * file), see g_file_dup().
19871  *
19872  * Returns: %TRUE on success, %FALSE otherwise.
19873  */
19874
19875
19876 /**
19877  * g_file_copy_async: (skip)
19878  * @source: input #GFile.
19879  * @destination: destination #GFile
19880  * @flags: set of #GFileCopyFlags
19881  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19882  * @cancellable: optional #GCancellable object, %NULL to ignore.
19883  * @progress_callback: function to callback with progress information
19884  * @progress_callback_data: user data to pass to @progress_callback
19885  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
19886  * @user_data: the data to pass to callback function
19887  *
19888  * Copies the file @source to the location specified by @destination
19889  * asynchronously. For details of the behaviour, see g_file_copy().
19890  * If @progress_callback is not %NULL, then that function that will be called
19891  * just like in g_file_copy(), however the callback will run in the main loop,
19892  * not in the thread that is doing the I/O operation.
19893  * When the operation is finished, @callback will be called. You can then call
19894  * g_file_copy_finish() to get the result of the operation.
19895  */
19896
19897
19898 /**
19899  * g_file_copy_attributes:
19900  * @source: a #GFile with attributes.
19901  * @destination: a #GFile to copy attributes to.
19902  * @flags: a set of #GFileCopyFlags.
19903  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19904  * @error: a #GError, %NULL to ignore.
19905  *
19906  * Copies the file attributes from @source to @destination.
19907  * Normally only a subset of the file attributes are copied,
19908  * those that are copies in a normal file copy operation
19909  * (which for instance does not include e.g. owner). However
19910  * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then
19911  * all the metadata that is possible to copy is copied. This
19912  * is useful when implementing move by copy + delete source.
19913  *
19914  * Returns: %TRUE if the attributes were copied successfully, %FALSE otherwise.
19915  */
19916
19917
19918 /**
19919  * g_file_copy_finish:
19920  * @file: input #GFile.
19921  * @res: a #GAsyncResult.
19922  * @error: a #GError, or %NULL
19923  *
19924  * Finishes copying the file started with
19925  * g_file_copy_async().
19926  *
19927  * Returns: a %TRUE on success, %FALSE on error.
19928  */
19929
19930
19931 /**
19932  * g_file_create:
19933  * @file: input #GFile.
19934  * @flags: a set of #GFileCreateFlags.
19935  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19936  * @error: a #GError, or %NULL
19937  *
19938  * Creates a new file and returns an output stream for writing to it.
19939  * The file must not already exist.
19940  * By default files created are generally readable by everyone,
19941  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
19942  * will be made readable only to the current user, to the level that
19943  * is supported on the target filesystem.
19944  * If @cancellable is not %NULL, then the operation can be cancelled by
19945  * triggering the cancellable object from another thread. If the operation
19946  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19947  * If a file or directory with this name already exists the G_IO_ERROR_EXISTS
19948  * error will be returned.
19949  * Some file systems don't allow all file names, and may
19950  * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
19951  * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
19952  * Other errors are possible too, and depend on what kind of
19953  * filesystem the file is on.
19954  * %NULL on error.
19955  * Free the returned object with g_object_unref().
19956  *
19957  * Returns: (transfer full): a #GFileOutputStream for the newly created file, or
19958  */
19959
19960
19961 /**
19962  * g_file_create_async:
19963  * @file: input #GFile.
19964  * @flags: a set of #GFileCreateFlags.
19965  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19966  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19967  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19968  * @user_data: (closure): the data to pass to callback function
19969  *
19970  * Asynchronously creates a new file and returns an output stream for writing to it.
19971  * The file must not already exist.
19972  * For more details, see g_file_create() which is
19973  * the synchronous version of this call.
19974  * When the operation is finished, @callback will be called. You can then call
19975  * g_file_create_finish() to get the result of the operation.
19976  */
19977
19978
19979 /**
19980  * g_file_create_finish:
19981  * @file: input #GFile.
19982  * @res: a #GAsyncResult.
19983  * @error: a #GError, or %NULL
19984  *
19985  * Finishes an asynchronous file create operation started with
19986  * g_file_create_async().
19987  * Free the returned object with g_object_unref().
19988  *
19989  * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
19990  */
19991
19992
19993 /**
19994  * g_file_create_readwrite:
19995  * @file: a #GFile
19996  * @flags: a set of #GFileCreateFlags
19997  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
19998  * @error: return location for a #GError, or %NULL
19999  *
20000  * Creates a new file and returns a stream for reading and writing to it.
20001  * The file must not already exist.
20002  * By default files created are generally readable by everyone,
20003  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
20004  * will be made readable only to the current user, to the level that
20005  * is supported on the target filesystem.
20006  * If @cancellable is not %NULL, then the operation can be cancelled by
20007  * triggering the cancellable object from another thread. If the operation
20008  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20009  * If a file or directory with this name already exists the %G_IO_ERROR_EXISTS
20010  * error will be returned. Some file systems don't allow all file names,
20011  * and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name
20012  * is too long, %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors
20013  * are possible too, and depend on what kind of filesystem the file is on.
20014  * Note that in many non-local file cases read and write streams are not
20015  * supported, so make sure you really need to do read and write streaming,
20016  * rather than just opening for reading or writing.
20017  * Free the returned object with g_object_unref().
20018  *
20019  * Returns: (transfer full): a #GFileIOStream for the newly created file, or %NULL on error.
20020  * Since: 2.22
20021  */
20022
20023
20024 /**
20025  * g_file_create_readwrite_async:
20026  * @file: input #GFile
20027  * @flags: a set of #GFileCreateFlags
20028  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
20029  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
20030  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
20031  * @user_data: (closure): the data to pass to callback function
20032  *
20033  * Asynchronously creates a new file and returns a stream for reading and
20034  * writing to it. The file must not already exist.
20035  * For more details, see g_file_create_readwrite() which is
20036  * the synchronous version of this call.
20037  * When the operation is finished, @callback will be called. You can then
20038  * call g_file_create_readwrite_finish() to get the result of the operation.
20039  *
20040  * Since: 2.22
20041  */
20042
20043
20044 /**
20045  * g_file_create_readwrite_finish:
20046  * @file: input #GFile
20047  * @res: a #GAsyncResult
20048  * @error: a #GError, or %NULL
20049  *
20050  * Finishes an asynchronous file create operation started with
20051  * g_file_create_readwrite_async().
20052  * Free the returned object with g_object_unref().
20053  *
20054  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
20055  * Since: 2.22
20056  */
20057
20058
20059 /**
20060  * g_file_delete:
20061  * @file: input #GFile.
20062  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20063  * @error: a #GError, or %NULL
20064  *
20065  * Deletes a file. If the @file is a directory, it will only be deleted if it
20066  * is empty.
20067  * If @cancellable is not %NULL, then the operation can be cancelled by
20068  * triggering the cancellable object from another thread. If the operation
20069  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20070  *
20071  * Virtual: delete_file
20072  * Returns: %TRUE if the file was deleted. %FALSE otherwise.
20073  */
20074
20075
20076 /**
20077  * g_file_descriptor_based_get_fd:
20078  * @fd_based: a #GFileDescriptorBased.
20079  *
20080  * Gets the underlying file descriptor.
20081  *
20082  * Returns: The file descriptor
20083  * Since: 2.24
20084  */
20085
20086
20087 /**
20088  * g_file_dup:
20089  * @file: input #GFile.
20090  *
20091  * Duplicates a #GFile handle. This operation does not duplicate
20092  * the actual file or directory represented by the #GFile; see
20093  * g_file_copy() if attempting to copy a file.
20094  * This call does no blocking i/o.
20095  *
20096  * Returns: (transfer full): a new #GFile that is a duplicate of the given #GFile.
20097  */
20098
20099
20100 /**
20101  * g_file_eject_mountable:
20102  * @file: input #GFile.
20103  * @flags: flags affecting the operation
20104  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20105  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
20106  * @user_data: (closure): the data to pass to callback function
20107  *
20108  * Starts an asynchronous eject on a mountable.
20109  * When this operation has completed, @callback will be called with
20110  * g_file_eject_mountable_finish().
20111  * If @cancellable is not %NULL, then the operation can be cancelled by
20112  * triggering the cancellable object from another thread. If the operation
20113  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20114  *
20115  * Deprecated: 2.22: Use g_file_eject_mountable_with_operation() instead.
20116  */
20117
20118
20119 /**
20120  * g_file_eject_mountable_finish:
20121  * @file: input #GFile.
20122  * @result: a #GAsyncResult.
20123  * @error: a #GError, or %NULL
20124  *
20125  * Finishes an asynchronous eject operation started by
20126  * g_file_eject_mountable().
20127  * otherwise.
20128  *
20129  * Returns: %TRUE if the @file was ejected successfully. %FALSE
20130  * Deprecated: 2.22: Use g_file_eject_mountable_with_operation_finish() instead.
20131  */
20132
20133
20134 /**
20135  * g_file_eject_mountable_with_operation:
20136  * @file: input #GFile.
20137  * @flags: flags affecting the operation
20138  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
20139  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20140  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
20141  * @user_data: (closure): the data to pass to callback function
20142  *
20143  * Starts an asynchronous eject on a mountable.
20144  * When this operation has completed, @callback will be called with
20145  * g_file_eject_mountable_with_operation_finish().
20146  * If @cancellable is not %NULL, then the operation can be cancelled by
20147  * triggering the cancellable object from another thread. If the operation
20148  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20149  *
20150  * Since: 2.22
20151  */
20152
20153
20154 /**
20155  * g_file_eject_mountable_with_operation_finish:
20156  * @file: input #GFile.
20157  * @result: a #GAsyncResult.
20158  * @error: a #GError, or %NULL
20159  *
20160  * Finishes an asynchronous eject operation started by
20161  * g_file_eject_mountable_with_operation().
20162  * otherwise.
20163  *
20164  * Returns: %TRUE if the @file was ejected successfully. %FALSE
20165  * Since: 2.22
20166  */
20167
20168
20169 /**
20170  * g_file_enumerate_children:
20171  * @file: input #GFile.
20172  * @attributes: an attribute query string.
20173  * @flags: a set of #GFileQueryInfoFlags.
20174  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20175  * @error: #GError for error reporting.
20176  *
20177  * Gets the requested information about the files in a directory. The result
20178  * is a #GFileEnumerator object that will give out #GFileInfo objects for
20179  * all the files in the directory.
20180  * The @attributes value is a string that specifies the file attributes that
20181  * should be gathered. It is not an error if it's not possible to read a particular
20182  * requested attribute from a file - it just won't be set. @attributes should
20183  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
20184  * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
20185  * namespace. An example attribute query be "standard::*,owner::user".
20186  * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
20187  * If @cancellable is not %NULL, then the operation can be cancelled by
20188  * triggering the cancellable object from another thread. If the operation
20189  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20190  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
20191  * If the file is not a directory, the G_FILE_ERROR_NOTDIR error will be returned.
20192  * Other errors are possible too.
20193  * Free the returned object with g_object_unref().
20194  *
20195  * Returns: (transfer full): A #GFileEnumerator if successful, %NULL on error.
20196  */
20197
20198
20199 /**
20200  * g_file_enumerate_children_async:
20201  * @file: input #GFile.
20202  * @attributes: an attribute query string.
20203  * @flags: a set of #GFileQueryInfoFlags.
20204  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
20205  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20206  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
20207  * @user_data: (closure): the data to pass to callback function
20208  *
20209  * Asynchronously gets the requested information about the files in a directory. The result
20210  * is a #GFileEnumerator object that will give out #GFileInfo objects for
20211  * all the files in the directory.
20212  * For more details, see g_file_enumerate_children() which is
20213  * the synchronous version of this call.
20214  * When the operation is finished, @callback will be called. You can then call
20215  * g_file_enumerate_children_finish() to get the result of the operation.
20216  */
20217
20218
20219 /**
20220  * g_file_enumerate_children_finish:
20221  * @file: input #GFile.
20222  * @res: a #GAsyncResult.
20223  * @error: a #GError.
20224  *
20225  * Finishes an async enumerate children operation.
20226  * See g_file_enumerate_children_async().
20227  * Free the returned object with g_object_unref().
20228  *
20229  * Returns: (transfer full): a #GFileEnumerator or %NULL if an error occurred.
20230  */
20231
20232
20233 /**
20234  * g_file_enumerator_close:
20235  * @enumerator: a #GFileEnumerator.
20236  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20237  * @error: location to store the error occuring, or %NULL to ignore
20238  *
20239  * Releases all resources used by this enumerator, making the
20240  * enumerator return %G_IO_ERROR_CLOSED on all calls.
20241  * This will be automatically called when the last reference
20242  * is dropped, but you might want to call this function to make
20243  * sure resources are released as early as possible.
20244  *
20245  * Returns: #TRUE on success or #FALSE on error.
20246  */
20247
20248
20249 /**
20250  * g_file_enumerator_close_async:
20251  * @enumerator: a #GFileEnumerator.
20252  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
20253  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20254  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
20255  * @user_data: (closure): the data to pass to callback function
20256  *
20257  * Asynchronously closes the file enumerator.
20258  * If @cancellable is not %NULL, then the operation can be cancelled by
20259  * triggering the cancellable object from another thread. If the operation
20260  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in
20261  * g_file_enumerator_close_finish().
20262  */
20263
20264
20265 /**
20266  * g_file_enumerator_close_finish:
20267  * @enumerator: a #GFileEnumerator.
20268  * @result: a #GAsyncResult.
20269  * @error: a #GError location to store the error occuring, or %NULL to ignore.
20270  *
20271  * Finishes closing a file enumerator, started from g_file_enumerator_close_async().
20272  * If the file enumerator was already closed when g_file_enumerator_close_async()
20273  * was called, then this function will report %G_IO_ERROR_CLOSED in @error, and
20274  * return %FALSE. If the file enumerator had pending operation when the close
20275  * operation was started, then this function will report %G_IO_ERROR_PENDING, and
20276  * return %FALSE.  If @cancellable was not %NULL, then the operation may have been
20277  * cancelled by triggering the cancellable object from another thread. If the operation
20278  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
20279  * returned.
20280  *
20281  * Returns: %TRUE if the close operation has finished successfully.
20282  */
20283
20284
20285 /**
20286  * g_file_enumerator_get_container:
20287  * @enumerator: a #GFileEnumerator
20288  *
20289  * Get the #GFile container which is being enumerated.
20290  *
20291  * Returns: (transfer full): the #GFile which is being enumerated.
20292  * Since: 2.18
20293  */
20294
20295
20296 /**
20297  * g_file_enumerator_has_pending:
20298  * @enumerator: a #GFileEnumerator.
20299  *
20300  * Checks if the file enumerator has pending operations.
20301  *
20302  * Returns: %TRUE if the @enumerator has pending operations.
20303  */
20304
20305
20306 /**
20307  * g_file_enumerator_is_closed:
20308  * @enumerator: a #GFileEnumerator.
20309  *
20310  * Checks if the file enumerator has been closed.
20311  *
20312  * Returns: %TRUE if the @enumerator is closed.
20313  */
20314
20315
20316 /**
20317  * g_file_enumerator_next_file:
20318  * @enumerator: a #GFileEnumerator.
20319  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20320  * @error: location to store the error occuring, or %NULL to ignore
20321  *
20322  * Returns information for the next file in the enumerated object.
20323  * Will block until the information is available. The #GFileInfo
20324  * returned from this function will contain attributes that match the
20325  * attribute string that was passed when the #GFileEnumerator was created.
20326  * On error, returns %NULL and sets @error to the error. If the
20327  * enumerator is at the end, %NULL will be returned and @error will
20328  * be unset.
20329  * Free the returned object with g_object_unref() when no longer needed.
20330  *
20331  * Returns: (transfer full): A #GFileInfo or %NULL on error or end of enumerator.
20332  */
20333
20334
20335 /**
20336  * g_file_enumerator_next_files_async:
20337  * @enumerator: a #GFileEnumerator.
20338  * @num_files: the number of file info objects to request
20339  * @io_priority: the <link linkend="gioscheduler">io priority</link> of the request.
20340  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20341  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
20342  * @user_data: (closure): the data to pass to callback function
20343  *
20344  * Request information for a number of files from the enumerator asynchronously.
20345  * When all i/o for the operation is finished the @callback will be called with
20346  * the requested information.
20347  * The callback can be called with less than @num_files files in case of error
20348  * or at the end of the enumerator. In case of a partial error the callback will
20349  * be called with any succeeding items and no error, and on the next request the
20350  * error will be reported. If a request is cancelled the callback will be called
20351  * with %G_IO_ERROR_CANCELLED.
20352  * During an async request no other sync and async calls are allowed, and will
20353  * result in %G_IO_ERROR_PENDING errors.
20354  * Any outstanding i/o request with higher priority (lower numerical value) will
20355  * be executed before an outstanding request with lower priority. Default
20356  * priority is %G_PRIORITY_DEFAULT.
20357  */
20358
20359
20360 /**
20361  * g_file_enumerator_next_files_finish:
20362  * @enumerator: a #GFileEnumerator.
20363  * @result: a #GAsyncResult.
20364  * @error: a #GError location to store the error occuring, or %NULL to ignore.
20365  *
20366  * Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
20367  * g_list_free() and unref the infos with g_object_unref() when you're
20368  * done with them.
20369  *
20370  * Returns: (transfer full) (element-type Gio.FileInfo): a #GList of #GFileInfo<!---->s. You must free the list with
20371  */
20372
20373
20374 /**
20375  * g_file_enumerator_set_pending:
20376  * @enumerator: a #GFileEnumerator.
20377  * @pending: a boolean value.
20378  *
20379  * Sets the file enumerator as having pending operations.
20380  */
20381
20382
20383 /**
20384  * g_file_equal:
20385  * @file1: the first #GFile.
20386  * @file2: the second #GFile.
20387  *
20388  * Checks equality of two given #GFile<!-- -->s. Note that two
20389  * #GFile<!-- -->s that differ can still refer to the same
20390  * file on the filesystem due to various forms of filename
20391  * aliasing.
20392  * This call does no blocking i/o.
20393  * %FALSE if either is not a #GFile.
20394  *
20395  * Returns: %TRUE if @file1 and @file2 are equal.
20396  */
20397
20398
20399 /**
20400  * g_file_find_enclosing_mount:
20401  * @file: input #GFile.
20402  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20403  * @error: a #GError.
20404  *
20405  * Gets a #GMount for the #GFile.
20406  * If the #GFileIface for @file does not have a mount (e.g. possibly a
20407  * remote share), @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL
20408  * will be returned.
20409  * If @cancellable is not %NULL, then the operation can be cancelled by
20410  * triggering the cancellable object from another thread. If the operation
20411  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20412  * Free the returned object with g_object_unref().
20413  *
20414  * Returns: (transfer full): a #GMount where the @file is located or %NULL on error.
20415  */
20416
20417
20418 /**
20419  * g_file_find_enclosing_mount_async:
20420  * @file: a #GFile
20421  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
20422  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20423  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
20424  * @user_data: (closure): the data to pass to callback function
20425  *
20426  * Asynchronously gets the mount for the file.
20427  * For more details, see g_file_find_enclosing_mount() which is
20428  * the synchronous version of this call.
20429  * When the operation is finished, @callback will be called. You can then call
20430  * g_file_find_enclosing_mount_finish() to get the result of the operation.
20431  */
20432
20433
20434 /**
20435  * g_file_find_enclosing_mount_finish:
20436  * @file: a #GFile
20437  * @res: a #GAsyncResult
20438  * @error: a #GError
20439  *
20440  * Finishes an asynchronous find mount request.
20441  * See g_file_find_enclosing_mount_async().
20442  * Free the returned object with g_object_unref().
20443  *
20444  * Returns: (transfer full): #GMount for given @file or %NULL on error.
20445  */
20446
20447
20448 /**
20449  * g_file_get_basename:
20450  * @file: input #GFile.
20451  *
20452  * Gets the base name (the last component of the path) for a given #GFile.
20453  * If called for the top level of a system (such as the filesystem root
20454  * or a uri like sftp://host/) it will return a single directory separator
20455  * (and on Windows, possibly a drive letter).
20456  * The base name is a byte string (*not* UTF-8). It has no defined encoding
20457  * or rules other than it may not contain zero bytes.  If you want to use
20458  * filenames in a user interface you should use the display name that you
20459  * can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
20460  * attribute with g_file_query_info().
20461  * This call does no blocking i/o.
20462  * if given #GFile is invalid. The returned string should be
20463  * freed with g_free() when no longer needed.
20464  *
20465  * Returns: string containing the #GFile's base name, or %NULL
20466  */
20467
20468
20469 /**
20470  * g_file_get_child:
20471  * @file: input #GFile.
20472  * @name: string containing the child's basename.
20473  *
20474  * Gets a child of @file with basename equal to @name.
20475  * Note that the file with that specific name might not exist, but
20476  * you can still have a #GFile that points to it. You can use this
20477  * for instance to create that file.
20478  * This call does no blocking i/o.
20479  * Free the returned object with g_object_unref().
20480  *
20481  * Returns: (transfer full): a #GFile to a child specified by @name.
20482  */
20483
20484
20485 /**
20486  * g_file_get_child_for_display_name:
20487  * @file: input #GFile.
20488  * @display_name: string to a possible child.
20489  * @error: #GError.
20490  *
20491  * Gets the child of @file for a given @display_name (i.e. a UTF8
20492  * version of the name). If this function fails, it returns %NULL and @error will be
20493  * set. This is very useful when constructing a GFile for a new file
20494  * and the user entered the filename in the user interface, for instance
20495  * when you select a directory and type a filename in the file selector.
20496  * This call does no blocking i/o.
20497  * %NULL if the display name couldn't be converted.
20498  * Free the returned object with g_object_unref().
20499  *
20500  * Returns: (transfer full): a #GFile to the specified child, or
20501  */
20502
20503
20504 /**
20505  * g_file_get_parent:
20506  * @file: input #GFile.
20507  *
20508  * Gets the parent directory for the @file.
20509  * If the @file represents the root directory of the
20510  * file system, then %NULL will be returned.
20511  * This call does no blocking i/o.
20512  * #GFile or %NULL if there is no parent.
20513  * Free the returned object with g_object_unref().
20514  *
20515  * Returns: (transfer full): a #GFile structure to the parent of the given
20516  */
20517
20518
20519 /**
20520  * g_file_get_parse_name:
20521  * @file: input #GFile.
20522  *
20523  * Gets the parse name of the @file.
20524  * A parse name is a UTF-8 string that describes the
20525  * file such that one can get the #GFile back using
20526  * g_file_parse_name().
20527  * This is generally used to show the #GFile as a nice
20528  * full-pathname kind of string in a user interface,
20529  * like in a location entry.
20530  * For local files with names that can safely be converted
20531  * to UTF8 the pathname is used, otherwise the IRI is used
20532  * (a form of URI that allows UTF8 characters unescaped).
20533  * This call does no blocking i/o.
20534  * string should be freed with g_free() when no longer needed.
20535  *
20536  * Returns: a string containing the #GFile's parse name. The returned
20537  */
20538
20539
20540 /**
20541  * g_file_get_path:
20542  * @file: input #GFile.
20543  *
20544  * Gets the local pathname for #GFile, if one exists.
20545  * This call does no blocking i/o.
20546  * no such path exists. The returned string should be
20547  * freed with g_free() when no longer needed.
20548  *
20549  * Returns: string containing the #GFile's path, or %NULL if
20550  */
20551
20552
20553 /**
20554  * g_file_get_relative_path:
20555  * @parent: input #GFile.
20556  * @descendant: input #GFile.
20557  *
20558  * Gets the path for @descendant relative to @parent.
20559  * This call does no blocking i/o.
20560  * to @parent, or %NULL if @descendant doesn't have @parent as prefix.
20561  * The returned string should be freed with g_free() when no longer needed.
20562  *
20563  * Returns: string with the relative path from @descendant
20564  */
20565
20566
20567 /**
20568  * g_file_get_uri:
20569  * @file: input #GFile.
20570  *
20571  * Gets the URI for the @file.
20572  * This call does no blocking i/o.
20573  * The returned string should be freed with g_free() when no longer needed.
20574  *
20575  * Returns: a string containing the #GFile's URI.
20576  */
20577
20578
20579 /**
20580  * g_file_get_uri_scheme:
20581  * @file: input #GFile.
20582  *
20583  * Gets the URI scheme for a #GFile.
20584  * RFC 3986 decodes the scheme as:
20585  * <programlisting>
20586  * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
20587  * </programlisting>
20588  * Common schemes include "file", "http", "ftp", etc.
20589  * This call does no blocking i/o.
20590  * #GFile. The returned string should be freed with g_free()
20591  * when no longer needed.
20592  *
20593  * Returns: a string containing the URI scheme for the given
20594  */
20595
20596
20597 /**
20598  * g_file_has_parent:
20599  * @file: input #GFile
20600  * @parent: the parent to check for, or %NULL
20601  *
20602  * Checks if @file has a parent, and optionally, if it is @parent.
20603  * If @parent is %NULL then this function returns %TRUE if @file has any
20604  * parent at all.  If @parent is non-%NULL then %TRUE is only returned
20605  * if @file is a child of @parent.
20606  * case that @parent is %NULL).
20607  *
20608  * Returns: %TRUE if @file is a child of @parent (or any parent in the
20609  * Since: 2.24
20610  */
20611
20612
20613 /**
20614  * g_file_has_prefix:
20615  * @file: input #GFile.
20616  * @prefix: input #GFile.
20617  *
20618  * Checks whether @file has the prefix specified by @prefix. In other word,
20619  * if the names of inital elements of @file<!-- -->s pathname match @prefix.
20620  * Only full pathname elements are matched, so a path like /foo is not
20621  * considered a prefix of /foobar, only of /foo/bar.
20622  * This call does no i/o, as it works purely on names. As such it can
20623  * sometimes return %FALSE even if @file is inside a @prefix (from a
20624  * filesystem point of view), because the prefix of @file is an alias
20625  * of @prefix.
20626  * %FALSE otherwise.
20627  *
20628  * Virtual: prefix_matches
20629  * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix.
20630  */
20631
20632
20633 /**
20634  * g_file_has_uri_scheme:
20635  * @file: input #GFile.
20636  * @uri_scheme: a string containing a URI scheme.
20637  *
20638  * Checks to see if a #GFile has a given URI scheme.
20639  * This call does no blocking i/o.
20640  * given URI scheme, %FALSE if URI scheme is %NULL,
20641  * not supported, or #GFile is invalid.
20642  *
20643  * Returns: %TRUE if #GFile's backend supports the
20644  */
20645
20646
20647 /**
20648  * g_file_hash:
20649  * @file: #gconstpointer to a #GFile.
20650  *
20651  * Creates a hash value for a #GFile.
20652  * This call does no blocking i/o.
20653  * integer that can be used as hash value for the #GFile.
20654  * This function is intended for easily hashing a #GFile to
20655  * add to a #GHashTable or similar data structure.
20656  *
20657  * Virtual: hash
20658  * Returns: 0 if @file is not a valid #GFile, otherwise an
20659  */
20660
20661
20662 /**
20663  * g_file_icon_get_file:
20664  * @icon: a #GIcon.
20665  *
20666  * Gets the #GFile associated with the given @icon.
20667  *
20668  * Returns: (transfer none): a #GFile, or %NULL.
20669  */
20670
20671
20672 /**
20673  * g_file_icon_new:
20674  * @file: a #GFile.
20675  *
20676  * Creates a new icon for a file.
20677  *
20678  * Returns: (transfer full): a #GIcon for the given @file, or %NULL on error.
20679  */
20680
20681
20682 /**
20683  * g_file_info_clear_status:
20684  * @info: a #GFileInfo.
20685  *
20686  * Clears the status information from @info.
20687  */
20688
20689
20690 /**
20691  * g_file_info_copy_into:
20692  * @src_info: source to copy attributes from.
20693  * @dest_info: destination to copy attributes to.
20694  *
20695  * Copies all of the #GFileAttribute<!-- -->s from @src_info to @dest_info.
20696  */
20697
20698
20699 /**
20700  * g_file_info_dup:
20701  * @other: a #GFileInfo.
20702  *
20703  * Duplicates a file info structure.
20704  *
20705  * Returns: (transfer full): a duplicate #GFileInfo of @other.
20706  */
20707
20708
20709 /**
20710  * g_file_info_get_attribute_as_string:
20711  * @info: a #GFileInfo.
20712  * @attribute: a file attribute key.
20713  *
20714  * Gets the value of a attribute, formated as a string.
20715  * This escapes things as needed to make the string valid
20716  * utf8.
20717  * When you're done with the string it must be freed with g_free().
20718  *
20719  * Returns: a UTF-8 string associated with the given @attribute.
20720  */
20721
20722
20723 /**
20724  * g_file_info_get_attribute_boolean:
20725  * @info: a #GFileInfo.
20726  * @attribute: a file attribute key.
20727  *
20728  * Gets the value of a boolean attribute. If the attribute does not
20729  * contain a boolean value, %FALSE will be returned.
20730  *
20731  * Returns: the boolean value contained within the attribute.
20732  */
20733
20734
20735 /**
20736  * g_file_info_get_attribute_byte_string:
20737  * @info: a #GFileInfo.
20738  * @attribute: a file attribute key.
20739  *
20740  * Gets the value of a byte string attribute. If the attribute does
20741  * not contain a byte string, %NULL will be returned.
20742  * %NULL otherwise.
20743  *
20744  * Returns: the contents of the @attribute value as a byte string, or
20745  */
20746
20747
20748 /**
20749  * g_file_info_get_attribute_data:
20750  * @info: a #GFileInfo
20751  * @attribute: a file attribute key
20752  * @type: (out) (allow-none): return location for the attribute type, or %NULL
20753  * @value_pp: (out) (allow-none): return location for the attribute value, or %NULL
20754  * @status: (out) (allow-none): return location for the attribute status, or %NULL
20755  *
20756  * Gets the attribute type, value and status for an attribute key.
20757  * %FALSE otherwise.
20758  *
20759  * Returns: (transfer none): %TRUE if @info has an attribute named @attribute,
20760  */
20761
20762
20763 /**
20764  * g_file_info_get_attribute_int32:
20765  * @info: a #GFileInfo.
20766  * @attribute: a file attribute key.
20767  *
20768  * Gets a signed 32-bit integer contained within the attribute. If the
20769  * attribute does not contain a signed 32-bit integer, or is invalid,
20770  * 0 will be returned.
20771  *
20772  * Returns: a signed 32-bit integer from the attribute.
20773  */
20774
20775
20776 /**
20777  * g_file_info_get_attribute_int64:
20778  * @info: a #GFileInfo.
20779  * @attribute: a file attribute key.
20780  *
20781  * Gets a signed 64-bit integer contained within the attribute. If the
20782  * attribute does not contain an signed 64-bit integer, or is invalid,
20783  * 0 will be returned.
20784  *
20785  * Returns: a signed 64-bit integer from the attribute.
20786  */
20787
20788
20789 /**
20790  * g_file_info_get_attribute_object:
20791  * @info: a #GFileInfo.
20792  * @attribute: a file attribute key.
20793  *
20794  * Gets the value of a #GObject attribute. If the attribute does
20795  * not contain a #GObject, %NULL will be returned.
20796  * %NULL otherwise.
20797  *
20798  * Returns: (transfer none): a #GObject associated with the given @attribute, or
20799  */
20800
20801
20802 /**
20803  * g_file_info_get_attribute_status:
20804  * @info: a #GFileInfo
20805  * @attribute: a file attribute key
20806  *
20807  * Gets the attribute status for an attribute key.
20808  * %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.
20809  *
20810  * Returns: a #GFileAttributeStatus for the given @attribute, or
20811  */
20812
20813
20814 /**
20815  * g_file_info_get_attribute_string:
20816  * @info: a #GFileInfo.
20817  * @attribute: a file attribute key.
20818  *
20819  * Gets the value of a string attribute. If the attribute does
20820  * not contain a string, %NULL will be returned.
20821  * %NULL otherwise.
20822  *
20823  * Returns: the contents of the @attribute value as a UTF-8 string, or
20824  */
20825
20826
20827 /**
20828  * g_file_info_get_attribute_stringv:
20829  * @info: a #GFileInfo.
20830  * @attribute: a file attribute key.
20831  *
20832  * Gets the value of a stringv attribute. If the attribute does
20833  * not contain a stringv, %NULL will be returned.
20834  * %NULL otherwise. Do not free. These returned strings are UTF-8.
20835  *
20836  * Returns: (transfer none): the contents of the @attribute value as a stringv, or
20837  * Since: 2.22
20838  */
20839
20840
20841 /**
20842  * g_file_info_get_attribute_type:
20843  * @info: a #GFileInfo.
20844  * @attribute: a file attribute key.
20845  *
20846  * Gets the attribute type for an attribute key.
20847  * %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.
20848  *
20849  * Returns: a #GFileAttributeType for the given @attribute, or
20850  */
20851
20852
20853 /**
20854  * g_file_info_get_attribute_uint32:
20855  * @info: a #GFileInfo.
20856  * @attribute: a file attribute key.
20857  *
20858  * Gets an unsigned 32-bit integer contained within the attribute. If the
20859  * attribute does not contain an unsigned 32-bit integer, or is invalid,
20860  * 0 will be returned.
20861  *
20862  * Returns: an unsigned 32-bit integer from the attribute.
20863  */
20864
20865
20866 /**
20867  * g_file_info_get_attribute_uint64:
20868  * @info: a #GFileInfo.
20869  * @attribute: a file attribute key.
20870  *
20871  * Gets a unsigned 64-bit integer contained within the attribute. If the
20872  * attribute does not contain an unsigned 64-bit integer, or is invalid,
20873  * 0 will be returned.
20874  *
20875  * Returns: a unsigned 64-bit integer from the attribute.
20876  */
20877
20878
20879 /**
20880  * g_file_info_get_content_type:
20881  * @info: a #GFileInfo.
20882  *
20883  * Gets the file's content type.
20884  *
20885  * Returns: a string containing the file's content type.
20886  */
20887
20888
20889 /**
20890  * g_file_info_get_display_name:
20891  * @info: a #GFileInfo.
20892  *
20893  * Gets a display name for a file.
20894  *
20895  * Returns: a string containing the display name.
20896  */
20897
20898
20899 /**
20900  * g_file_info_get_edit_name:
20901  * @info: a #GFileInfo.
20902  *
20903  * Gets the edit name for a file.
20904  *
20905  * Returns: a string containing the edit name.
20906  */
20907
20908
20909 /**
20910  * g_file_info_get_etag:
20911  * @info: a #GFileInfo.
20912  *
20913  * Gets the <link linkend="gfile-etag">entity tag</link> for a given
20914  * #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.
20915  *
20916  * Returns: a string containing the value of the "etag:value" attribute.
20917  */
20918
20919
20920 /**
20921  * g_file_info_get_file_type:
20922  * @info: a #GFileInfo.
20923  *
20924  * Gets a file's type (whether it is a regular file, symlink, etc).
20925  * This is different from the file's content type, see g_file_info_get_content_type().
20926  *
20927  * Returns: a #GFileType for the given file.
20928  */
20929
20930
20931 /**
20932  * g_file_info_get_icon:
20933  * @info: a #GFileInfo.
20934  *
20935  * Gets the icon for a file.
20936  *
20937  * Returns: (transfer none): #GIcon for the given @info.
20938  */
20939
20940
20941 /**
20942  * g_file_info_get_is_backup:
20943  * @info: a #GFileInfo.
20944  *
20945  * Checks if a file is a backup file.
20946  *
20947  * Returns: %TRUE if file is a backup file, %FALSE otherwise.
20948  */
20949
20950
20951 /**
20952  * g_file_info_get_is_hidden:
20953  * @info: a #GFileInfo.
20954  *
20955  * Checks if a file is hidden.
20956  *
20957  * Returns: %TRUE if the file is a hidden file, %FALSE otherwise.
20958  */
20959
20960
20961 /**
20962  * g_file_info_get_is_symlink:
20963  * @info: a #GFileInfo.
20964  *
20965  * Checks if a file is a symlink.
20966  *
20967  * Returns: %TRUE if the given @info is a symlink.
20968  */
20969
20970
20971 /**
20972  * g_file_info_get_modification_time:
20973  * @info: a #GFileInfo.
20974  * @result: a #GTimeVal.
20975  *
20976  * Gets the modification time of the current @info and sets it
20977  * in @result.
20978  */
20979
20980
20981 /**
20982  * g_file_info_get_name:
20983  * @info: a #GFileInfo.
20984  *
20985  * Gets the name for a file.
20986  *
20987  * Returns: a string containing the file name.
20988  */
20989
20990
20991 /**
20992  * g_file_info_get_size:
20993  * @info: a #GFileInfo.
20994  *
20995  * Gets the file's size.
20996  *
20997  * Returns: a #goffset containing the file's size.
20998  */
20999
21000
21001 /**
21002  * g_file_info_get_sort_order:
21003  * @info: a #GFileInfo.
21004  *
21005  * Gets the value of the sort_order attribute from the #GFileInfo.
21006  * See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
21007  *
21008  * Returns: a #gint32 containing the value of the "standard::sort_order" attribute.
21009  */
21010
21011
21012 /**
21013  * g_file_info_get_symlink_target:
21014  * @info: a #GFileInfo.
21015  *
21016  * Gets the symlink target for a given #GFileInfo.
21017  *
21018  * Returns: a string containing the symlink target.
21019  */
21020
21021
21022 /**
21023  * g_file_info_has_attribute:
21024  * @info: a #GFileInfo.
21025  * @attribute: a file attribute key.
21026  *
21027  * Checks if a file info structure has an attribute named @attribute.
21028  * %FALSE otherwise.
21029  *
21030  * Returns: %TRUE if @Ginfo has an attribute named @attribute,
21031  */
21032
21033
21034 /**
21035  * g_file_info_has_namespace:
21036  * @info: a #GFileInfo.
21037  * @name_space: a file attribute namespace.
21038  *
21039  * Checks if a file info structure has an attribute in the
21040  * specified @name_space.
21041  * %FALSE otherwise.
21042  *
21043  * Returns: %TRUE if @Ginfo has an attribute in @name_space,
21044  * Since: 2.22
21045  */
21046
21047
21048 /**
21049  * g_file_info_list_attributes:
21050  * @info: a #GFileInfo.
21051  * @name_space: a file attribute key's namespace.
21052  *
21053  * Lists the file info structure's attributes.
21054  * possible attribute types for the given @name_space, or
21055  * %NULL on error.
21056  *
21057  * Returns: (array zero-terminated=1) (transfer full): a null-terminated array of strings of all of the
21058  */
21059
21060
21061 /**
21062  * g_file_info_new:
21063  *
21064  * Creates a new file info structure.
21065  *
21066  * Returns: a #GFileInfo.
21067  */
21068
21069
21070 /**
21071  * g_file_info_remove_attribute:
21072  * @info: a #GFileInfo.
21073  * @attribute: a file attribute key.
21074  *
21075  * Removes all cases of @attribute from @info if it exists.
21076  */
21077
21078
21079 /**
21080  * g_file_info_set_attribute:
21081  * @info: a #GFileInfo.
21082  * @attribute: a file attribute key.
21083  * @type: a #GFileAttributeType
21084  * @value_p: pointer to the value
21085  *
21086  * Sets the @attribute to contain the given value, if possible.
21087  */
21088
21089
21090 /**
21091  * g_file_info_set_attribute_boolean:
21092  * @info: a #GFileInfo.
21093  * @attribute: a file attribute key.
21094  * @attr_value: a boolean value.
21095  *
21096  * Sets the @attribute to contain the given @attr_value,
21097  * if possible.
21098  */
21099
21100
21101 /**
21102  * g_file_info_set_attribute_byte_string:
21103  * @info: a #GFileInfo.
21104  * @attribute: a file attribute key.
21105  * @attr_value: a byte string.
21106  *
21107  * Sets the @attribute to contain the given @attr_value,
21108  * if possible.
21109  */
21110
21111
21112 /**
21113  * g_file_info_set_attribute_int32:
21114  * @info: a #GFileInfo.
21115  * @attribute: a file attribute key.
21116  * @attr_value: a signed 32-bit integer
21117  *
21118  * Sets the @attribute to contain the given @attr_value,
21119  * if possible.
21120  */
21121
21122
21123 /**
21124  * g_file_info_set_attribute_int64:
21125  * @info: a #GFileInfo.
21126  * @attribute: attribute name to set.
21127  * @attr_value: int64 value to set attribute to.
21128  *
21129  * Sets the @attribute to contain the given @attr_value,
21130  * if possible.
21131  */
21132
21133
21134 /**
21135  * g_file_info_set_attribute_mask:
21136  * @info: a #GFileInfo.
21137  * @mask: a #GFileAttributeMatcher.
21138  *
21139  * Sets @mask on @info to match specific attribute types.
21140  */
21141
21142
21143 /**
21144  * g_file_info_set_attribute_object:
21145  * @info: a #GFileInfo.
21146  * @attribute: a file attribute key.
21147  * @attr_value: a #GObject.
21148  *
21149  * Sets the @attribute to contain the given @attr_value,
21150  * if possible.
21151  */
21152
21153
21154 /**
21155  * g_file_info_set_attribute_status:
21156  * @info: a #GFileInfo
21157  * @attribute: a file attribute key
21158  * @status: a #GFileAttributeStatus
21159  *
21160  * Sets the attribute status for an attribute key. This is only
21161  * needed by external code that implement g_file_set_attributes_from_info()
21162  * or similar functions.
21163  * The attribute must exist in @info for this to work. Otherwise %FALSE
21164  * is returned and @info is unchanged.
21165  *
21166  * Returns: %TRUE if the status was changed, %FALSE if the key was not set.
21167  * Since: 2.22
21168  */
21169
21170
21171 /**
21172  * g_file_info_set_attribute_string:
21173  * @info: a #GFileInfo.
21174  * @attribute: a file attribute key.
21175  * @attr_value: a UTF-8 string.
21176  *
21177  * Sets the @attribute to contain the given @attr_value,
21178  * if possible.
21179  */
21180
21181
21182 /**
21183  * g_file_info_set_attribute_stringv:
21184  * @info: a #GFileInfo.
21185  * @attribute: a file attribute key
21186  * @attr_value: a %NULL terminated array of UTF-8 strings.
21187  *
21188  * Sets the @attribute to contain the given @attr_value,
21189  * if possible.
21190  *
21191  * Sinze: 2.22
21192  */
21193
21194
21195 /**
21196  * g_file_info_set_attribute_uint32:
21197  * @info: a #GFileInfo.
21198  * @attribute: a file attribute key.
21199  * @attr_value: an unsigned 32-bit integer.
21200  *
21201  * Sets the @attribute to contain the given @attr_value,
21202  * if possible.
21203  */
21204
21205
21206 /**
21207  * g_file_info_set_attribute_uint64:
21208  * @info: a #GFileInfo.
21209  * @attribute: a file attribute key.
21210  * @attr_value: an unsigned 64-bit integer.
21211  *
21212  * Sets the @attribute to contain the given @attr_value,
21213  * if possible.
21214  */
21215
21216
21217 /**
21218  * g_file_info_set_content_type:
21219  * @info: a #GFileInfo.
21220  * @content_type: a content type. See #GContentType.
21221  *
21222  * Sets the content type attribute for a given #GFileInfo.
21223  * See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
21224  */
21225
21226
21227 /**
21228  * g_file_info_set_display_name:
21229  * @info: a #GFileInfo.
21230  * @display_name: a string containing a display name.
21231  *
21232  * Sets the display name for the current #GFileInfo.
21233  * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
21234  */
21235
21236
21237 /**
21238  * g_file_info_set_edit_name:
21239  * @info: a #GFileInfo.
21240  * @edit_name: a string containing an edit name.
21241  *
21242  * Sets the edit name for the current file.
21243  * See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
21244  */
21245
21246
21247 /**
21248  * g_file_info_set_file_type:
21249  * @info: a #GFileInfo.
21250  * @type: a #GFileType.
21251  *
21252  * Sets the file type in a #GFileInfo to @type.
21253  * See %G_FILE_ATTRIBUTE_STANDARD_TYPE.
21254  */
21255
21256
21257 /**
21258  * g_file_info_set_icon:
21259  * @info: a #GFileInfo.
21260  * @icon: a #GIcon.
21261  *
21262  * Sets the icon for a given #GFileInfo.
21263  * See %G_FILE_ATTRIBUTE_STANDARD_ICON.
21264  */
21265
21266
21267 /**
21268  * g_file_info_set_is_hidden:
21269  * @info: a #GFileInfo.
21270  * @is_hidden: a #gboolean.
21271  *
21272  * Sets the "is_hidden" attribute in a #GFileInfo according to @is_symlink.
21273  * See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
21274  */
21275
21276
21277 /**
21278  * g_file_info_set_is_symlink:
21279  * @info: a #GFileInfo.
21280  * @is_symlink: a #gboolean.
21281  *
21282  * Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
21283  * See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
21284  */
21285
21286
21287 /**
21288  * g_file_info_set_modification_time:
21289  * @info: a #GFileInfo.
21290  * @mtime: a #GTimeVal.
21291  *
21292  * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
21293  * info to the given time value.
21294  */
21295
21296
21297 /**
21298  * g_file_info_set_name:
21299  * @info: a #GFileInfo.
21300  * @name: a string containing a name.
21301  *
21302  * Sets the name attribute for the current #GFileInfo.
21303  * See %G_FILE_ATTRIBUTE_STANDARD_NAME.
21304  */
21305
21306
21307 /**
21308  * g_file_info_set_size:
21309  * @info: a #GFileInfo.
21310  * @size: a #goffset containing the file's size.
21311  *
21312  * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
21313  * to the given size.
21314  */
21315
21316
21317 /**
21318  * g_file_info_set_sort_order:
21319  * @info: a #GFileInfo.
21320  * @sort_order: a sort order integer.
21321  *
21322  * Sets the sort order attribute in the file info structure. See
21323  * %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
21324  */
21325
21326
21327 /**
21328  * g_file_info_set_symlink_target:
21329  * @info: a #GFileInfo.
21330  * @symlink_target: a static string containing a path to a symlink target.
21331  *
21332  * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
21333  * to the given symlink target.
21334  */
21335
21336
21337 /**
21338  * g_file_info_unset_attribute_mask:
21339  * @info: #GFileInfo.
21340  *
21341  * Unsets a mask set by g_file_info_set_attribute_mask(), if one
21342  * is set.
21343  */
21344
21345
21346 /**
21347  * g_file_input_stream_query_info:
21348  * @stream: a #GFileInputStream.
21349  * @attributes: a file attribute query string.
21350  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21351  * @error: a #GError location to store the error occuring, or %NULL to ignore.
21352  *
21353  * Queries a file input stream the given @attributes. This function blocks
21354  * while querying the stream. For the asynchronous (non-blocking) version
21355  * of this function, see g_file_input_stream_query_info_async(). While the
21356  * stream is blocked, the stream will set the pending flag internally, and
21357  * any other operations on the stream will fail with %G_IO_ERROR_PENDING.
21358  *
21359  * Returns: (transfer full): a #GFileInfo, or %NULL on error.
21360  */
21361
21362
21363 /**
21364  * g_file_input_stream_query_info_async:
21365  * @stream: a #GFileInputStream.
21366  * @attributes: a file attribute query string.
21367  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21368  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21369  * @callback: (scope async): callback to call when the request is satisfied
21370  * @user_data: (closure): the data to pass to callback function
21371  *
21372  * Queries the stream information asynchronously.
21373  * When the operation is finished @callback will be called.
21374  * You can then call g_file_input_stream_query_info_finish()
21375  * to get the result of the operation.
21376  * For the synchronous version of this function,
21377  * see g_file_input_stream_query_info().
21378  * If @cancellable is not %NULL, then the operation can be cancelled by
21379  * triggering the cancellable object from another thread. If the operation
21380  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set
21381  */
21382
21383
21384 /**
21385  * g_file_input_stream_query_info_finish:
21386  * @stream: a #GFileInputStream.
21387  * @result: a #GAsyncResult.
21388  * @error: a #GError location to store the error occuring, or %NULL to ignore.
21389  *
21390  * Finishes an asynchronous info query operation.
21391  *
21392  * Returns: (transfer full): #GFileInfo.
21393  */
21394
21395
21396 /**
21397  * g_file_io_stream_get_etag:
21398  * @stream: a #GFileIOStream.
21399  *
21400  * Gets the entity tag for the file when it has been written.
21401  * This must be called after the stream has been written
21402  * and closed, as the etag can change while writing.
21403  *
21404  * Returns: the entity tag for the stream.
21405  * Since: 2.22
21406  */
21407
21408
21409 /**
21410  * g_file_io_stream_query_info:
21411  * @stream: a #GFileIOStream.
21412  * @attributes: a file attribute query string.
21413  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21414  * @error: a #GError, %NULL to ignore.
21415  *
21416  * Queries a file io stream for the given @attributes.
21417  * This function blocks while querying the stream. For the asynchronous
21418  * version of this function, see g_file_io_stream_query_info_async().
21419  * While the stream is blocked, the stream will set the pending flag
21420  * internally, and any other operations on the stream will fail with
21421  * %G_IO_ERROR_PENDING.
21422  * Can fail if the stream was already closed (with @error being set to
21423  * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
21424  * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
21425  * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I
21426  * all cases of failure, %NULL will be returned.
21427  * If @cancellable is not %NULL, then the operation can be cancelled by
21428  * triggering the cancellable object from another thread. If the operation
21429  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
21430  * be returned.
21431  *
21432  * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
21433  * Since: 2.22
21434  */
21435
21436
21437 /**
21438  * g_file_io_stream_query_info_async:
21439  * @stream: a #GFileIOStream.
21440  * @attributes: a file attribute query string.
21441  * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
21442  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21443  * @callback: (scope async): callback to call when the request is satisfied
21444  * @user_data: (closure): the data to pass to callback function
21445  *
21446  * Asynchronously queries the @stream for a #GFileInfo. When completed,
21447  * finish the operation with g_file_io_stream_query_info_finish().
21448  * For the synchronous version of this function, see
21449  * g_file_io_stream_query_info().
21450  *
21451  * Since: 2.22
21452  */
21453
21454
21455 /**
21456  * g_file_io_stream_query_info_finish:
21457  * @stream: a #GFileIOStream.
21458  * @result: a #GAsyncResult.
21459  * @error: a #GError, %NULL to ignore.
21460  *
21461  * Finalizes the asynchronous query started
21462  * by g_file_io_stream_query_info_async().
21463  *
21464  * Returns: (transfer full): A #GFileInfo for the finished query.
21465  * Since: 2.22
21466  */
21467
21468
21469 /**
21470  * g_file_is_native:
21471  * @file: input #GFile.
21472  *
21473  * Checks to see if a file is native to the platform.
21474  * A native file s one expressed in the platform-native filename format,
21475  * e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
21476  * as it might be on a locally mounted remote filesystem.
21477  * On some systems non-native files may be available using
21478  * the native filesystem via a userspace filesystem (FUSE), in
21479  * these cases this call will return %FALSE, but g_file_get_path()
21480  * will still return a native path.
21481  * This call does no blocking i/o.
21482  *
21483  * Returns: %TRUE if file is native.
21484  */
21485
21486
21487 /**
21488  * g_file_load_contents:
21489  * @file: input #GFile.
21490  * @cancellable: optional #GCancellable object, %NULL to ignore.
21491  * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
21492  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
21493  * @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
21494  * @error: a #GError, or %NULL
21495  *
21496  * Loads the content of the file into memory. The data is always
21497  * zero-terminated, but this is not included in the resultant @length.
21498  * The returned @content should be freed with g_free() when no longer
21499  * needed.
21500  * If @cancellable is not %NULL, then the operation can be cancelled by
21501  * triggering the cancellable object from another thread. If the operation
21502  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21503  * %FALSE if there were errors.
21504  *
21505  * Returns: %TRUE if the @file's contents were successfully loaded.
21506  */
21507
21508
21509 /**
21510  * g_file_load_contents_async:
21511  * @file: input #GFile.
21512  * @cancellable: optional #GCancellable object, %NULL to ignore.
21513  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
21514  * @user_data: the data to pass to callback function
21515  *
21516  * Starts an asynchronous load of the @file's contents.
21517  * For more details, see g_file_load_contents() which is
21518  * the synchronous version of this call.
21519  * When the load operation has completed, @callback will be called
21520  * with @user data. To finish the operation, call
21521  * g_file_load_contents_finish() with the #GAsyncResult returned by
21522  * the @callback.
21523  * If @cancellable is not %NULL, then the operation can be cancelled by
21524  * triggering the cancellable object from another thread. If the operation
21525  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21526  */
21527
21528
21529 /**
21530  * g_file_load_contents_finish:
21531  * @file: input #GFile.
21532  * @res: a #GAsyncResult.
21533  * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
21534  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
21535  * @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
21536  * @error: a #GError, or %NULL
21537  *
21538  * Finishes an asynchronous load of the @file's contents.
21539  * The contents are placed in @contents, and @length is set to the
21540  * size of the @contents string. The @content should be freed with
21541  * g_free() when no longer needed. If @etag_out is present, it will be
21542  * set to the new entity tag for the @file.
21543  * present, it will be set appropriately.
21544  *
21545  * Returns: %TRUE if the load was successful. If %FALSE and @error is
21546  */
21547
21548
21549 /**
21550  * g_file_load_partial_contents_async: (skip)
21551  * @file: input #GFile.
21552  * @cancellable: optional #GCancellable object, %NULL to ignore.
21553  * @read_more_callback: a #GFileReadMoreCallback to receive partial data and to specify whether further data should be read.
21554  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
21555  * @user_data: the data to pass to the callback functions.
21556  *
21557  * Reads the partial contents of a file. A #GFileReadMoreCallback should be
21558  * used to stop reading from the file when appropriate, else this function
21559  * will behave exactly as g_file_load_contents_async(). This operation
21560  * can be finished by g_file_load_partial_contents_finish().
21561  * Users of this function should be aware that @user_data is passed to
21562  * both the @read_more_callback and the @callback.
21563  * If @cancellable is not %NULL, then the operation can be cancelled by
21564  * triggering the cancellable object from another thread. If the operation
21565  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21566  */
21567
21568
21569 /**
21570  * g_file_load_partial_contents_finish:
21571  * @file: input #GFile.
21572  * @res: a #GAsyncResult.
21573  * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
21574  * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
21575  * @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
21576  * @error: a #GError, or %NULL
21577  *
21578  * Finishes an asynchronous partial load operation that was started
21579  * with g_file_load_partial_contents_async(). The data is always
21580  * zero-terminated, but this is not included in the resultant @length.
21581  * The returned @content should be freed with g_free() when no longer
21582  * needed.
21583  * present, it will be set appropriately.
21584  *
21585  * Returns: %TRUE if the load was successful. If %FALSE and @error is
21586  */
21587
21588
21589 /**
21590  * g_file_make_directory:
21591  * @file: input #GFile.
21592  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21593  * @error: a #GError, or %NULL
21594  *
21595  * Creates a directory. Note that this will only create a child directory of
21596  * the immediate parent directory of the path or URI given by the #GFile. To
21597  * recursively create directories, see g_file_make_directory_with_parents().
21598  * This function will fail if the parent directory does not exist, setting
21599  * directories, this function will fail, setting @error to
21600  * %G_IO_ERROR_NOT_SUPPORTED.
21601  * For a local #GFile the newly created directory will have the default
21602  * (current) ownership and permissions of the current process.
21603  * If @cancellable is not %NULL, then the operation can be cancelled by
21604  * triggering the cancellable object from another thread. If the operation
21605  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21606  *
21607  * Returns: %TRUE on successful creation, %FALSE otherwise.
21608  */
21609
21610
21611 /**
21612  * g_file_make_directory_with_parents:
21613  * @file: input #GFile.
21614  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21615  * @error: a #GError, or %NULL
21616  *
21617  * Creates a directory and any parent directories that may not exist similar to
21618  * 'mkdir -p'. If the file system does not support creating directories, this
21619  * function will fail, setting @error to %G_IO_ERROR_NOT_SUPPORTED.
21620  * For a local #GFile the newly created directories will have the default
21621  * (current) ownership and permissions of the current process.
21622  * If @cancellable is not %NULL, then the operation can be cancelled by
21623  * triggering the cancellable object from another thread. If the operation
21624  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21625  * otherwise.
21626  *
21627  * Returns: %TRUE if all directories have been successfully created, %FALSE
21628  * Since: 2.18
21629  */
21630
21631
21632 /**
21633  * g_file_make_symbolic_link:
21634  * @file: a #GFile with the name of the symlink to create
21635  * @symlink_value: a string with the path for the target of the new symlink
21636  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21637  * @error: a #GError.
21638  *
21639  * Creates a symbolic link named @file which contains the string
21640  * If @cancellable is not %NULL, then the operation can be cancelled by
21641  * triggering the cancellable object from another thread. If the operation
21642  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21643  *
21644  * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise.
21645  */
21646
21647
21648 /**
21649  * g_file_monitor:
21650  * @file: input #GFile
21651  * @flags: a set of #GFileMonitorFlags
21652  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
21653  * @error: a #GError, or %NULL
21654  *
21655  * Obtains a file or directory monitor for the given file, depending
21656  * on the type of the file.
21657  * If @cancellable is not %NULL, then the operation can be cancelled by
21658  * triggering the cancellable object from another thread. If the operation
21659  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21660  * Free the returned object with g_object_unref().
21661  *
21662  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
21663  * Since: 2.18
21664  */
21665
21666
21667 /**
21668  * g_file_monitor_cancel:
21669  * @monitor: a #GFileMonitor.
21670  *
21671  * Cancels a file monitor.
21672  *
21673  * Returns: %TRUE if monitor was cancelled.
21674  */
21675
21676
21677 /**
21678  * g_file_monitor_directory:
21679  * @file: input #GFile.
21680  * @flags: a set of #GFileMonitorFlags.
21681  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21682  * @error: a #GError, or %NULL.
21683  *
21684  * Obtains a directory monitor for the given file.
21685  * This may fail if directory monitoring is not supported.
21686  * If @cancellable is not %NULL, then the operation can be cancelled by
21687  * triggering the cancellable object from another thread. If the operation
21688  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21689  * Free the returned object with g_object_unref().
21690  *
21691  * Virtual: monitor_dir
21692  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
21693  */
21694
21695
21696 /**
21697  * g_file_monitor_emit_event:
21698  * @monitor: a #GFileMonitor.
21699  * @child: a #GFile.
21700  * @other_file: a #GFile.
21701  * @event_type: a set of #GFileMonitorEvent flags.
21702  *
21703  * Emits the #GFileMonitor::changed signal if a change
21704  * has taken place. Should be called from file monitor
21705  * implementations only.
21706  * The signal will be emitted from an idle handler (in the <link
21707  * linkend="g-main-context-push-thread-default">thread-default main
21708  * context</link>).
21709  */
21710
21711
21712 /**
21713  * g_file_monitor_file:
21714  * @file: input #GFile.
21715  * @flags: a set of #GFileMonitorFlags.
21716  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21717  * @error: a #GError, or %NULL.
21718  *
21719  * Obtains a file monitor for the given file. If no file notification
21720  * mechanism exists, then regular polling of the file is used.
21721  * If @cancellable is not %NULL, then the operation can be cancelled by
21722  * triggering the cancellable object from another thread. If the operation
21723  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21724  * Free the returned object with g_object_unref().
21725  *
21726  * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
21727  */
21728
21729
21730 /**
21731  * g_file_monitor_is_cancelled:
21732  * @monitor: a #GFileMonitor
21733  *
21734  * Returns whether the monitor is canceled.
21735  *
21736  * Returns: %TRUE if monitor is canceled. %FALSE otherwise.
21737  */
21738
21739
21740 /**
21741  * g_file_monitor_set_rate_limit:
21742  * @monitor: a #GFileMonitor.
21743  * @limit_msecs: a non-negative integer with the limit in milliseconds to poll for changes
21744  *
21745  * Sets the rate limit to which the @monitor will report
21746  * consecutive change events to the same file.
21747  */
21748
21749
21750 /**
21751  * g_file_mount_enclosing_volume:
21752  * @location: input #GFile.
21753  * @flags: flags affecting the operation
21754  * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
21755  * @cancellable: optional #GCancellable object, %NULL to ignore.
21756  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
21757  * @user_data: the data to pass to callback function
21758  *
21759  * Starts a @mount_operation, mounting the volume that contains the file @location.
21760  * When this operation has completed, @callback will be called with
21761  * g_file_mount_enclosing_volume_finish().
21762  * If @cancellable is not %NULL, then the operation can be cancelled by
21763  * triggering the cancellable object from another thread. If the operation
21764  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21765  */
21766
21767
21768 /**
21769  * g_file_mount_enclosing_volume_finish:
21770  * @location: input #GFile.
21771  * @result: a #GAsyncResult.
21772  * @error: a #GError, or %NULL
21773  *
21774  * Finishes a mount operation started by g_file_mount_enclosing_volume().
21775  * has occurred, this function will return %FALSE and set @error
21776  * appropriately if present.
21777  *
21778  * Returns: %TRUE if successful. If an error
21779  */
21780
21781
21782 /**
21783  * g_file_mount_mountable:
21784  * @file: input #GFile.
21785  * @flags: flags affecting the operation
21786  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
21787  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21788  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
21789  * @user_data: (closure): the data to pass to callback function
21790  *
21791  * Mounts a file of type G_FILE_TYPE_MOUNTABLE.
21792  * Using @mount_operation, you can request callbacks when, for instance,
21793  * passwords are needed during authentication.
21794  * If @cancellable is not %NULL, then the operation can be cancelled by
21795  * triggering the cancellable object from another thread. If the operation
21796  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21797  * When the operation is finished, @callback will be called. You can then call
21798  * g_file_mount_mountable_finish() to get the result of the operation.
21799  */
21800
21801
21802 /**
21803  * g_file_mount_mountable_finish:
21804  * @file: input #GFile.
21805  * @result: a #GAsyncResult.
21806  * @error: a #GError, or %NULL
21807  *
21808  * Finishes a mount operation. See g_file_mount_mountable() for details.
21809  * Finish an asynchronous mount operation that was started
21810  * with g_file_mount_mountable().
21811  * Free the returned object with g_object_unref().
21812  *
21813  * Returns: (transfer full): a #GFile or %NULL on error.
21814  */
21815
21816
21817 /**
21818  * g_file_move:
21819  * @source: #GFile pointing to the source location.
21820  * @destination: #GFile pointing to the destination location.
21821  * @flags: set of #GFileCopyFlags.
21822  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21823  * @progress_callback: (scope call): #GFileProgressCallback function for updates.
21824  * @progress_callback_data: (closure): gpointer to user data for the callback function.
21825  * @error: #GError for returning error conditions, or %NULL
21826  *
21827  * Tries to move the file or directory @source to the location specified by @destination.
21828  * If native move operations are supported then this is used, otherwise a copy + delete
21829  * fallback is used. The native implementation may support moving directories (for instance
21830  * on moves inside the same filesystem), but the fallback code does not.
21831  * If the flag #G_FILE_COPY_OVERWRITE is specified an already
21832  * existing @destination file is overwritten.
21833  * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
21834  * will be copied as symlinks, otherwise the target of the
21835  * If @cancellable is not %NULL, then the operation can be cancelled by
21836  * triggering the cancellable object from another thread. If the operation
21837  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21838  * If @progress_callback is not %NULL, then the operation can be monitored by
21839  * setting this to a #GFileProgressCallback function. @progress_callback_data
21840  * will be passed to this function. It is guaranteed that this callback will
21841  * be called after all data has been transferred with the total number of bytes
21842  * copied during the operation.
21843  * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
21844  * error is returned, independent on the status of the @destination.
21845  * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
21846  * error G_IO_ERROR_EXISTS is returned.
21847  * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
21848  * error is returned. If trying to overwrite a directory with a directory the
21849  * G_IO_ERROR_WOULD_MERGE error is returned.
21850  * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
21851  * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
21852  * may be returned (if the native move operation isn't available).
21853  *
21854  * Returns: %TRUE on successful move, %FALSE otherwise.
21855  */
21856
21857
21858 /**
21859  * g_file_new_for_commandline_arg:
21860  * @arg: a command line string.
21861  *
21862  * Creates a #GFile with the given argument from the command line. The value of
21863  * relative to the current working directory.
21864  * This operation never fails, but the returned object might not support any
21865  * I/O operation if @arg points to a malformed path.
21866  *
21867  * Returns: (transfer full): a new #GFile.
21868  */
21869
21870
21871 /**
21872  * g_file_new_for_path:
21873  * @path: a string containing a relative or absolute path. The string must be encoded in the glib filename encoding.
21874  *
21875  * Constructs a #GFile for a given path. This operation never
21876  * fails, but the returned object might not support any I/O
21877  * operation if @path is malformed.
21878  *
21879  * Returns: (transfer full): a new #GFile for the given @path.
21880  */
21881
21882
21883 /**
21884  * g_file_new_for_uri:
21885  * @uri: a UTF8 string containing a URI.
21886  *
21887  * Constructs a #GFile for a given URI. This operation never
21888  * fails, but the returned object might not support any I/O
21889  * operation if @uri is malformed or if the uri type is
21890  * not supported.
21891  *
21892  * Returns: (transfer full): a #GFile for the given @uri.
21893  */
21894
21895
21896 /**
21897  * g_file_open_readwrite:
21898  * @file: #GFile to open
21899  * @cancellable: (allow-none): a #GCancellable
21900  * @error: a #GError, or %NULL
21901  *
21902  * Opens an existing file for reading and writing. The result is
21903  * a #GFileIOStream that can be used to read and write the contents of the file.
21904  * If @cancellable is not %NULL, then the operation can be cancelled by
21905  * triggering the cancellable object from another thread. If the operation
21906  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21907  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
21908  * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
21909  * Other errors are possible too, and depend on what kind of filesystem the file is on.
21910  * Note that in many non-local file cases read and write streams are not supported,
21911  * so make sure you really need to do read and write streaming, rather than
21912  * just opening for reading or writing.
21913  * Free the returned object with g_object_unref().
21914  *
21915  * Returns: (transfer full): #GFileIOStream or %NULL on error.
21916  * Since: 2.22
21917  */
21918
21919
21920 /**
21921  * g_file_open_readwrite_async:
21922  * @file: input #GFile.
21923  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21924  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21925  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21926  * @user_data: (closure): the data to pass to callback function
21927  *
21928  * Asynchronously opens @file for reading and writing.
21929  * For more details, see g_file_open_readwrite() which is
21930  * the synchronous version of this call.
21931  * When the operation is finished, @callback will be called. You can then call
21932  * g_file_open_readwrite_finish() to get the result of the operation.
21933  *
21934  * Since: 2.22
21935  */
21936
21937
21938 /**
21939  * g_file_open_readwrite_finish:
21940  * @file: input #GFile.
21941  * @res: a #GAsyncResult.
21942  * @error: a #GError, or %NULL
21943  *
21944  * Finishes an asynchronous file read operation started with
21945  * g_file_open_readwrite_async().
21946  * Free the returned object with g_object_unref().
21947  *
21948  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
21949  * Since: 2.22
21950  */
21951
21952
21953 /**
21954  * g_file_output_stream_get_etag:
21955  * @stream: a #GFileOutputStream.
21956  *
21957  * Gets the entity tag for the file when it has been written.
21958  * This must be called after the stream has been written
21959  * and closed, as the etag can change while writing.
21960  *
21961  * Returns: the entity tag for the stream.
21962  */
21963
21964
21965 /**
21966  * g_file_output_stream_query_info:
21967  * @stream: a #GFileOutputStream.
21968  * @attributes: a file attribute query string.
21969  * @cancellable: optional #GCancellable object, %NULL to ignore.
21970  * @error: a #GError, %NULL to ignore.
21971  *
21972  * Queries a file output stream for the given @attributes.
21973  * This function blocks while querying the stream. For the asynchronous
21974  * version of this function, see g_file_output_stream_query_info_async().
21975  * While the stream is blocked, the stream will set the pending flag
21976  * internally, and any other operations on the stream will fail with
21977  * %G_IO_ERROR_PENDING.
21978  * Can fail if the stream was already closed (with @error being set to
21979  * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
21980  * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
21981  * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
21982  * all cases of failure, %NULL will be returned.
21983  * If @cancellable is not %NULL, then the operation can be cancelled by
21984  * triggering the cancellable object from another thread. If the operation
21985  * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
21986  * be returned.
21987  *
21988  * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
21989  */
21990
21991
21992 /**
21993  * g_file_output_stream_query_info_async:
21994  * @stream: a #GFileOutputStream.
21995  * @attributes: a file attribute query string.
21996  * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
21997  * @cancellable: optional #GCancellable object, %NULL to ignore.
21998  * @callback: callback to call when the request is satisfied
21999  * @user_data: the data to pass to callback function
22000  *
22001  * Asynchronously queries the @stream for a #GFileInfo. When completed,
22002  * finish the operation with g_file_output_stream_query_info_finish().
22003  * For the synchronous version of this function, see
22004  * g_file_output_stream_query_info().
22005  */
22006
22007
22008 /**
22009  * g_file_output_stream_query_info_finish:
22010  * @stream: a #GFileOutputStream.
22011  * @result: a #GAsyncResult.
22012  * @error: a #GError, %NULL to ignore.
22013  *
22014  * Finalizes the asynchronous query started
22015  * by g_file_output_stream_query_info_async().
22016  *
22017  * Returns: (transfer full): A #GFileInfo for the finished query.
22018  */
22019
22020
22021 /**
22022  * g_file_parse_name:
22023  * @parse_name: a file name or path to be parsed.
22024  *
22025  * Constructs a #GFile with the given @parse_name (i.e. something given by g_file_get_parse_name()).
22026  * This operation never fails, but the returned object might not support any I/O
22027  * operation if the @parse_name cannot be parsed.
22028  *
22029  * Returns: (transfer full): a new #GFile.
22030  */
22031
22032
22033 /**
22034  * g_file_poll_mountable:
22035  * @file: input #GFile.
22036  * @cancellable: optional #GCancellable object, %NULL to ignore.
22037  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22038  * @user_data: the data to pass to callback function
22039  *
22040  * Polls a file of type G_FILE_TYPE_MOUNTABLE.
22041  * If @cancellable is not %NULL, then the operation can be cancelled by
22042  * triggering the cancellable object from another thread. If the operation
22043  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22044  * When the operation is finished, @callback will be called. You can then call
22045  * g_file_mount_mountable_finish() to get the result of the operation.
22046  *
22047  * Since: 2.22
22048  */
22049
22050
22051 /**
22052  * g_file_poll_mountable_finish:
22053  * @file: input #GFile.
22054  * @result: a #GAsyncResult.
22055  * @error: a #GError, or %NULL
22056  *
22057  * Finishes a poll operation. See g_file_poll_mountable() for details.
22058  * Finish an asynchronous poll operation that was polled
22059  * with g_file_poll_mountable().
22060  * otherwise.
22061  *
22062  * Returns: %TRUE if the operation finished successfully. %FALSE
22063  * Since: 2.22
22064  */
22065
22066
22067 /**
22068  * g_file_query_default_handler:
22069  * @file: a #GFile to open.
22070  * @cancellable: optional #GCancellable object, %NULL to ignore.
22071  * @error: a #GError, or %NULL
22072  *
22073  * Returns the #GAppInfo that is registered as the default
22074  * application to handle the file specified by @file.
22075  * If @cancellable is not %NULL, then the operation can be cancelled by
22076  * triggering the cancellable object from another thread. If the operation
22077  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22078  * When you are done with it, release it with g_object_unref()
22079  *
22080  * Returns: (transfer full): a #GAppInfo if the handle was found, %NULL if there were errors.
22081  */
22082
22083
22084 /**
22085  * g_file_query_exists:
22086  * @file: input #GFile.
22087  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22088  *
22089  * Utility function to check if a particular file exists. This is
22090  * implemented using g_file_query_info() and as such does blocking I/O.
22091  * Note that in many cases it is racy to first check for file existence
22092  * and then execute something based on the outcome of that, because the
22093  * file might have been created or removed in between the operations. The
22094  * general approach to handling that is to not check, but just do the
22095  * operation and handle the errors as they come.
22096  * As an example of race-free checking, take the case of reading a file, and
22097  * can both result in two processes creating the file (with perhaps a partially
22098  * written file as the result). The correct approach is to always try to create
22099  * the file with g_file_create() which will either atomically create the file
22100  * or fail with a G_IO_ERROR_EXISTS error.
22101  * However, in many cases an existence check is useful in a user
22102  * interface, for instance to make a menu item sensitive/insensitive, so that
22103  * you don't have to fool users that something is possible and then just show
22104  * and error dialog. If you do this, you should make sure to also handle the
22105  * errors that can happen due to races when you execute the operation.
22106  *
22107  * If it doesn't exist, creating it. there are two racy versions: read it, and
22108  * On error create it; and: check if it exists, if not create it. These
22109  * Returns: %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled).
22110  */
22111
22112
22113 /**
22114  * g_file_query_file_type:
22115  * @file: input #GFile.
22116  * @flags: a set of #GFileQueryInfoFlags passed to g_file_query_info().
22117  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22118  *
22119  * Utility function to inspect the #GFileType of a file. This is
22120  * implemented using g_file_query_info() and as such does blocking I/O.
22121  * The primary use case of this method is to check if a file is a regular file,
22122  * directory, or symlink.
22123  * does not exist
22124  *
22125  * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN if the file
22126  * Since: 2.18
22127  */
22128
22129
22130 /**
22131  * g_file_query_filesystem_info:
22132  * @file: input #GFile.
22133  * @attributes: an attribute query string.
22134  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22135  * @error: a #GError.
22136  *
22137  * Similar to g_file_query_info(), but obtains information
22138  * about the filesystem the @file is on, rather than the file itself.
22139  * For instance the amount of space available and the type of
22140  * the filesystem.
22141  * The @attributes value is a string that specifies the file attributes that
22142  * should be gathered. It is not an error if it's not possible to read a particular
22143  * requested attribute from a file - it just won't be set. @attributes should
22144  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
22145  * means all attributes, and a wildcard like "fs:*" means all attributes in the fs
22146  * namespace. The standard namespace for filesystem attributes is "fs".
22147  * Common attributes of interest are #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE
22148  * (the total size of the filesystem in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of
22149  * bytes available), and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
22150  * If @cancellable is not %NULL, then the operation can be cancelled by
22151  * triggering the cancellable object from another thread. If the operation
22152  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22153  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
22154  * Other errors are possible too, and depend on what kind of filesystem the file is on.
22155  * Free the returned object with g_object_unref().
22156  *
22157  * Returns: (transfer full): a #GFileInfo or %NULL if there was an error.
22158  */
22159
22160
22161 /**
22162  * g_file_query_filesystem_info_async:
22163  * @file: input #GFile.
22164  * @attributes: an attribute query string.
22165  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22166  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22167  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22168  * @user_data: (closure): the data to pass to callback function
22169  *
22170  * Asynchronously gets the requested information about the filesystem
22171  * that the specified @file is on. The result is a #GFileInfo object
22172  * that contains key-value attributes (such as type or size for the
22173  * file).
22174  * For more details, see g_file_query_filesystem_info() which is the
22175  * synchronous version of this call.
22176  * When the operation is finished, @callback will be called. You can
22177  * then call g_file_query_info_finish() to get the result of the
22178  * operation.
22179  */
22180
22181
22182 /**
22183  * g_file_query_filesystem_info_finish:
22184  * @file: input #GFile.
22185  * @res: a #GAsyncResult.
22186  * @error: a #GError.
22187  *
22188  * Finishes an asynchronous filesystem info query.  See
22189  * g_file_query_filesystem_info_async().
22190  * Free the returned object with g_object_unref().
22191  *
22192  * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
22193  */
22194
22195
22196 /**
22197  * g_file_query_info:
22198  * @file: input #GFile.
22199  * @attributes: an attribute query string.
22200  * @flags: a set of #GFileQueryInfoFlags.
22201  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22202  * @error: a #GError.
22203  *
22204  * Gets the requested information about specified @file. The result
22205  * is a #GFileInfo object that contains key-value attributes (such as
22206  * the type or size of the file).
22207  * The @attributes value is a string that specifies the file attributes that
22208  * should be gathered. It is not an error if it's not possible to read a particular
22209  * requested attribute from a file - it just won't be set. @attributes should
22210  * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
22211  * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
22212  * namespace. An example attribute query be "standard::*,owner::user".
22213  * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
22214  * If @cancellable is not %NULL, then the operation can be cancelled by
22215  * triggering the cancellable object from another thread. If the operation
22216  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22217  * For symlinks, normally the information about the target of the
22218  * symlink is returned, rather than information about the symlink itself.
22219  * However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in @flags the
22220  * information about the symlink itself will be returned. Also, for symlinks
22221  * that point to non-existing files the information about the symlink itself
22222  * will be returned.
22223  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
22224  * Other errors are possible too, and depend on what kind of filesystem the file is on.
22225  * Free the returned object with g_object_unref().
22226  *
22227  * Returns: (transfer full): a #GFileInfo for the given @file, or %NULL on error.
22228  */
22229
22230
22231 /**
22232  * g_file_query_info_async:
22233  * @file: input #GFile.
22234  * @attributes: an attribute query string.
22235  * @flags: a set of #GFileQueryInfoFlags.
22236  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22237  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22238  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22239  * @user_data: (closure): the data to pass to callback function
22240  *
22241  * Asynchronously gets the requested information about specified @file. The result
22242  * is a #GFileInfo object that contains key-value attributes (such as type or size
22243  * for the file).
22244  * For more details, see g_file_query_info() which is
22245  * the synchronous version of this call.
22246  * When the operation is finished, @callback will be called. You can then call
22247  * g_file_query_info_finish() to get the result of the operation.
22248  */
22249
22250
22251 /**
22252  * g_file_query_info_finish:
22253  * @file: input #GFile.
22254  * @res: a #GAsyncResult.
22255  * @error: a #GError.
22256  *
22257  * Finishes an asynchronous file info query.
22258  * See g_file_query_info_async().
22259  * Free the returned object with g_object_unref().
22260  *
22261  * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
22262  */
22263
22264
22265 /**
22266  * g_file_query_settable_attributes:
22267  * @file: input #GFile.
22268  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22269  * @error: a #GError, or %NULL
22270  *
22271  * Obtain the list of settable attributes for the file.
22272  * Returns the type and full attribute name of all the attributes
22273  * that can be set on this file. This doesn't mean setting it will always
22274  * succeed though, you might get an access failure, or some specific
22275  * file may not support a specific attribute.
22276  * If @cancellable is not %NULL, then the operation can be cancelled by
22277  * triggering the cancellable object from another thread. If the operation
22278  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22279  * When you are done with it, release it with g_file_attribute_info_list_unref()
22280  *
22281  * Returns: a #GFileAttributeInfoList describing the settable attributes.
22282  */
22283
22284
22285 /**
22286  * g_file_query_writable_namespaces:
22287  * @file: input #GFile.
22288  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22289  * @error: a #GError, or %NULL
22290  *
22291  * Obtain the list of attribute namespaces where new attributes
22292  * can be created by a user. An example of this is extended
22293  * attributes (in the "xattr" namespace).
22294  * If @cancellable is not %NULL, then the operation can be cancelled by
22295  * triggering the cancellable object from another thread. If the operation
22296  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22297  * When you are done with it, release it with g_file_attribute_info_list_unref()
22298  *
22299  * Returns: a #GFileAttributeInfoList describing the writable namespaces.
22300  */
22301
22302
22303 /**
22304  * g_file_read:
22305  * @file: #GFile to read.
22306  * @cancellable: (allow-none): a #GCancellable
22307  * @error: a #GError, or %NULL
22308  *
22309  * Opens a file for reading. The result is a #GFileInputStream that
22310  * can be used to read the contents of the file.
22311  * If @cancellable is not %NULL, then the operation can be cancelled by
22312  * triggering the cancellable object from another thread. If the operation
22313  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22314  * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
22315  * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
22316  * Other errors are possible too, and depend on what kind of filesystem the file is on.
22317  * Free the returned object with g_object_unref().
22318  *
22319  * Virtual: read_fn
22320  * Returns: (transfer full): #GFileInputStream or %NULL on error.
22321  */
22322
22323
22324 /**
22325  * g_file_read_async:
22326  * @file: input #GFile
22327  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22328  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22329  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22330  * @user_data: (closure): the data to pass to callback function
22331  *
22332  * Asynchronously opens @file for reading.
22333  * For more details, see g_file_read() which is
22334  * the synchronous version of this call.
22335  * When the operation is finished, @callback will be called. You can then call
22336  * g_file_read_finish() to get the result of the operation.
22337  */
22338
22339
22340 /**
22341  * g_file_read_finish:
22342  * @file: input #GFile.
22343  * @res: a #GAsyncResult.
22344  * @error: a #GError, or %NULL
22345  *
22346  * Finishes an asynchronous file read operation started with
22347  * g_file_read_async().
22348  * Free the returned object with g_object_unref().
22349  *
22350  * Returns: (transfer full): a #GFileInputStream or %NULL on error.
22351  */
22352
22353
22354 /**
22355  * g_file_replace:
22356  * @file: input #GFile.
22357  * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore.
22358  * @make_backup: %TRUE if a backup should be created.
22359  * @flags: a set of #GFileCreateFlags.
22360  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22361  * @error: a #GError, or %NULL
22362  *
22363  * Returns an output stream for overwriting the file, possibly
22364  * creating a backup copy of the file first. If the file doesn't exist,
22365  * it will be created.
22366  * This will try to replace the file in the safest way possible so
22367  * that any errors during the writing will not affect an already
22368  * existing copy of the file. For instance, for local files it
22369  * may write to a temporary file and then atomically rename over
22370  * the destination when the stream is closed.
22371  * By default files created are generally readable by everyone,
22372  * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
22373  * will be made readable only to the current user, to the level that
22374  * is supported on the target filesystem.
22375  * If @cancellable is not %NULL, then the operation can be cancelled by
22376  * triggering the cancellable object from another thread. If the operation
22377  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22378  * If you pass in a non-#NULL @etag value, then this value is
22379  * compared to the current entity tag of the file, and if they differ
22380  * an G_IO_ERROR_WRONG_ETAG error is returned. This generally means
22381  * that the file has been changed since you last read it. You can get
22382  * the new etag from g_file_output_stream_get_etag() after you've
22383  * finished writing and closed the #GFileOutputStream. When you load
22384  * a new file you can use g_file_input_stream_query_info() to get
22385  * the etag of the file.
22386  * If @make_backup is %TRUE, this function will attempt to make a backup
22387  * of the current file before overwriting it. If this fails a G_IO_ERROR_CANT_CREATE_BACKUP
22388  * error will be returned. If you want to replace anyway, try again with
22389  * If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned,
22390  * and if the file is some other form of non-regular file then a
22391  * G_IO_ERROR_NOT_REGULAR_FILE error will be returned.
22392  * Some file systems don't allow all file names, and may
22393  * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
22394  * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
22395  * Other errors are possible too, and depend on what kind of
22396  * filesystem the file is on.
22397  * Free the returned object with g_object_unref().
22398  *
22399  * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
22400  */
22401
22402
22403 /**
22404  * g_file_replace_async:
22405  * @file: input #GFile.
22406  * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
22407  * @make_backup: %TRUE if a backup should be created.
22408  * @flags: a set of #GFileCreateFlags.
22409  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22410  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22411  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22412  * @user_data: (closure): the data to pass to callback function
22413  *
22414  * Asynchronously overwrites the file, replacing the contents, possibly
22415  * creating a backup copy of the file first.
22416  * For more details, see g_file_replace() which is
22417  * the synchronous version of this call.
22418  * When the operation is finished, @callback will be called. You can then call
22419  * g_file_replace_finish() to get the result of the operation.
22420  */
22421
22422
22423 /**
22424  * g_file_replace_contents:
22425  * @file: input #GFile.
22426  * @contents: (element-type guint8) (array length=length): a string containing the new contents for @file.
22427  * @length: the length of @contents in bytes.
22428  * @etag: (allow-none): the old <link linkend="gfile-etag">entity tag</link> for the document, or %NULL
22429  * @make_backup: %TRUE if a backup should be created.
22430  * @flags: a set of #GFileCreateFlags.
22431  * @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
22432  * @cancellable: optional #GCancellable object, %NULL to ignore.
22433  * @error: a #GError, or %NULL
22434  *
22435  * Replaces the contents of @file with @contents of @length bytes.
22436  * If @etag is specified (not %NULL) any existing file must have that etag, or
22437  * the error %G_IO_ERROR_WRONG_ETAG will be returned.
22438  * If @make_backup is %TRUE, this function will attempt to make a backup of @file.
22439  * If @cancellable is not %NULL, then the operation can be cancelled by
22440  * triggering the cancellable object from another thread. If the operation
22441  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22442  * The returned @new_etag can be used to verify that the file hasn't changed the
22443  * next time it is saved over.
22444  * has occurred, this function will return %FALSE and set @error
22445  * appropriately if present.
22446  *
22447  * Returns: %TRUE if successful. If an error
22448  */
22449
22450
22451 /**
22452  * g_file_replace_contents_async:
22453  * @file: input #GFile.
22454  * @contents: (element-type guint8) (array length=length): string of contents to replace the file with.
22455  * @length: the length of @contents in bytes.
22456  * @etag: (allow-none): a new <link linkend="gfile-etag">entity tag</link> for the @file, or %NULL
22457  * @make_backup: %TRUE if a backup should be created.
22458  * @flags: a set of #GFileCreateFlags.
22459  * @cancellable: optional #GCancellable object, %NULL to ignore.
22460  * @callback: a #GAsyncReadyCallback to call when the request is satisfied
22461  * @user_data: the data to pass to callback function
22462  *
22463  * Starts an asynchronous replacement of @file with the given
22464  * current entity tag.
22465  * When this operation has completed, @callback will be called with
22466  * g_file_replace_contents_finish().
22467  * If @cancellable is not %NULL, then the operation can be cancelled by
22468  * triggering the cancellable object from another thread. If the operation
22469  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22470  * If @make_backup is %TRUE, this function will attempt to
22471  * make a backup of @file.
22472  */
22473
22474
22475 /**
22476  * g_file_replace_contents_finish:
22477  * @file: input #GFile.
22478  * @res: a #GAsyncResult.
22479  * @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
22480  * @error: a #GError, or %NULL
22481  *
22482  * Finishes an asynchronous replace of the given @file. See
22483  * g_file_replace_contents_async(). Sets @new_etag to the new entity
22484  * tag for the document, if present.
22485  *
22486  * Returns: %TRUE on success, %FALSE on failure.
22487  */
22488
22489
22490 /**
22491  * g_file_replace_finish:
22492  * @file: input #GFile.
22493  * @res: a #GAsyncResult.
22494  * @error: a #GError, or %NULL
22495  *
22496  * Finishes an asynchronous file replace operation started with
22497  * g_file_replace_async().
22498  * Free the returned object with g_object_unref().
22499  *
22500  * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
22501  */
22502
22503
22504 /**
22505  * g_file_replace_readwrite:
22506  * @file: a #GFile
22507  * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore
22508  * @make_backup: %TRUE if a backup should be created
22509  * @flags: a set of #GFileCreateFlags
22510  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
22511  * @error: return location for a #GError, or %NULL
22512  *
22513  * Returns an output stream for overwriting the file in readwrite mode,
22514  * possibly creating a backup copy of the file first. If the file doesn't
22515  * exist, it will be created.
22516  * For details about the behaviour, see g_file_replace() which does the same
22517  * thing but returns an output stream only.
22518  * Note that in many non-local file cases read and write streams are not
22519  * supported, so make sure you really need to do read and write streaming,
22520  * rather than just opening for reading or writing.
22521  * Free the returned object with g_object_unref().
22522  *
22523  * Returns: (transfer full): a #GFileIOStream or %NULL on error.
22524  * Since: 2.22
22525  */
22526
22527
22528 /**
22529  * g_file_replace_readwrite_async:
22530  * @file: input #GFile.
22531  * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
22532  * @make_backup: %TRUE if a backup should be created.
22533  * @flags: a set of #GFileCreateFlags.
22534  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22535  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22536  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22537  * @user_data: (closure): the data to pass to callback function
22538  *
22539  * Asynchronously overwrites the file in read-write mode, replacing the
22540  * contents, possibly creating a backup copy of the file first.
22541  * For more details, see g_file_replace_readwrite() which is
22542  * the synchronous version of this call.
22543  * When the operation is finished, @callback will be called. You can then
22544  * call g_file_replace_readwrite_finish() to get the result of the operation.
22545  *
22546  * Since: 2.22
22547  */
22548
22549
22550 /**
22551  * g_file_replace_readwrite_finish:
22552  * @file: input #GFile.
22553  * @res: a #GAsyncResult.
22554  * @error: a #GError, or %NULL
22555  *
22556  * Finishes an asynchronous file replace operation started with
22557  * g_file_replace_readwrite_async().
22558  * Free the returned object with g_object_unref().
22559  *
22560  * Returns: (transfer full): a #GFileIOStream, or %NULL on error.
22561  * Since: 2.22
22562  */
22563
22564
22565 /**
22566  * g_file_resolve_relative_path:
22567  * @file: input #GFile.
22568  * @relative_path: a given relative path string.
22569  *
22570  * Resolves a relative path for @file to an absolute path.
22571  * This call does no blocking i/o.
22572  * is %NULL or if @file is invalid.
22573  * Free the returned object with g_object_unref().
22574  *
22575  * Returns: (transfer full): #GFile to the resolved path. %NULL if @relative_path
22576  */
22577
22578
22579 /**
22580  * g_file_set_attribute:
22581  * @file: input #GFile.
22582  * @attribute: a string containing the attribute's name.
22583  * @type: The type of the attribute
22584  * @value_p: a pointer to the value (or the pointer itself if the type is a pointer type)
22585  * @flags: a set of #GFileQueryInfoFlags.
22586  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22587  * @error: a #GError, or %NULL
22588  *
22589  * Sets an attribute in the file with attribute name @attribute to @value.
22590  * If @cancellable is not %NULL, then the operation can be cancelled by
22591  * triggering the cancellable object from another thread. If the operation
22592  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22593  *
22594  * Returns: %TRUE if the attribute was set, %FALSE otherwise.
22595  */
22596
22597
22598 /**
22599  * g_file_set_attribute_byte_string:
22600  * @file: input #GFile.
22601  * @attribute: a string containing the attribute's name.
22602  * @value: a string containing the attribute's new value.
22603  * @flags: a #GFileQueryInfoFlags.
22604  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22605  * @error: a #GError, or %NULL
22606  *
22607  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value.
22608  * If @attribute is of a different type, this operation will fail,
22609  * returning %FALSE.
22610  * If @cancellable is not %NULL, then the operation can be cancelled by
22611  * triggering the cancellable object from another thread. If the operation
22612  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22613  * in the @file, %FALSE otherwise.
22614  *
22615  * Returns: %TRUE if the @attribute was successfully set to @value
22616  */
22617
22618
22619 /**
22620  * g_file_set_attribute_int32:
22621  * @file: input #GFile.
22622  * @attribute: a string containing the attribute's name.
22623  * @value: a #gint32 containing the attribute's new value.
22624  * @flags: a #GFileQueryInfoFlags.
22625  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22626  * @error: a #GError, or %NULL
22627  *
22628  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value.
22629  * If @attribute is of a different type, this operation will fail.
22630  * If @cancellable is not %NULL, then the operation can be cancelled by
22631  * triggering the cancellable object from another thread. If the operation
22632  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22633  * in the @file, %FALSE otherwise.
22634  *
22635  * Returns: %TRUE if the @attribute was successfully set to @value
22636  */
22637
22638
22639 /**
22640  * g_file_set_attribute_int64:
22641  * @file: input #GFile.
22642  * @attribute: a string containing the attribute's name.
22643  * @value: a #guint64 containing the attribute's new value.
22644  * @flags: a #GFileQueryInfoFlags.
22645  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22646  * @error: a #GError, or %NULL
22647  *
22648  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value.
22649  * If @attribute is of a different type, this operation will fail.
22650  * If @cancellable is not %NULL, then the operation can be cancelled by
22651  * triggering the cancellable object from another thread. If the operation
22652  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22653  *
22654  * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
22655  */
22656
22657
22658 /**
22659  * g_file_set_attribute_string:
22660  * @file: input #GFile.
22661  * @attribute: a string containing the attribute's name.
22662  * @value: a string containing the attribute's value.
22663  * @flags: #GFileQueryInfoFlags.
22664  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22665  * @error: a #GError, or %NULL
22666  *
22667  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value.
22668  * If @attribute is of a different type, this operation will fail.
22669  * If @cancellable is not %NULL, then the operation can be cancelled by
22670  * triggering the cancellable object from another thread. If the operation
22671  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22672  *
22673  * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
22674  */
22675
22676
22677 /**
22678  * g_file_set_attribute_uint32:
22679  * @file: input #GFile.
22680  * @attribute: a string containing the attribute's name.
22681  * @value: a #guint32 containing the attribute's new value.
22682  * @flags: a #GFileQueryInfoFlags.
22683  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22684  * @error: a #GError, or %NULL
22685  *
22686  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value.
22687  * If @attribute is of a different type, this operation will fail.
22688  * If @cancellable is not %NULL, then the operation can be cancelled by
22689  * triggering the cancellable object from another thread. If the operation
22690  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22691  * in the @file, %FALSE otherwise.
22692  *
22693  * Returns: %TRUE if the @attribute was successfully set to @value
22694  */
22695
22696
22697 /**
22698  * g_file_set_attribute_uint64:
22699  * @file: input #GFile.
22700  * @attribute: a string containing the attribute's name.
22701  * @value: a #guint64 containing the attribute's new value.
22702  * @flags: a #GFileQueryInfoFlags.
22703  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22704  * @error: a #GError, or %NULL
22705  *
22706  * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value.
22707  * If @attribute is of a different type, this operation will fail.
22708  * If @cancellable is not %NULL, then the operation can be cancelled by
22709  * triggering the cancellable object from another thread. If the operation
22710  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22711  * in the @file, %FALSE otherwise.
22712  *
22713  * Returns: %TRUE if the @attribute was successfully set to @value
22714  */
22715
22716
22717 /**
22718  * g_file_set_attributes_async:
22719  * @file: input #GFile.
22720  * @info: a #GFileInfo.
22721  * @flags: a #GFileQueryInfoFlags.
22722  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22723  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22724  * @callback: (scope async): a #GAsyncReadyCallback.
22725  * @user_data: (closure): a #gpointer.
22726  *
22727  * Asynchronously sets the attributes of @file with @info.
22728  * For more details, see g_file_set_attributes_from_info() which is
22729  * the synchronous version of this call.
22730  * When the operation is finished, @callback will be called. You can then call
22731  * g_file_set_attributes_finish() to get the result of the operation.
22732  */
22733
22734
22735 /**
22736  * g_file_set_attributes_finish:
22737  * @file: input #GFile.
22738  * @result: a #GAsyncResult.
22739  * @info: (out) (transfer full): a #GFileInfo.
22740  * @error: a #GError, or %NULL
22741  *
22742  * Finishes setting an attribute started in g_file_set_attributes_async().
22743  *
22744  * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise.
22745  */
22746
22747
22748 /**
22749  * g_file_set_attributes_from_info:
22750  * @file: input #GFile.
22751  * @info: a #GFileInfo.
22752  * @flags: #GFileQueryInfoFlags
22753  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22754  * @error: a #GError, or %NULL
22755  *
22756  * Tries to set all attributes in the #GFileInfo on the target values,
22757  * not stopping on the first error.
22758  * If there is any error during this operation then @error will be set to
22759  * the first error. Error on particular fields are flagged by setting
22760  * the "status" field in the attribute value to
22761  * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can also detect
22762  * further errors.
22763  * If @cancellable is not %NULL, then the operation can be cancelled by
22764  * triggering the cancellable object from another thread. If the operation
22765  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22766  *
22767  * Returns: %TRUE if there was any error, %FALSE otherwise.
22768  */
22769
22770
22771 /**
22772  * g_file_set_display_name:
22773  * @file: input #GFile.
22774  * @display_name: a string.
22775  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22776  * @error: a #GError, or %NULL
22777  *
22778  * Renames @file to the specified display name.
22779  * The display name is converted from UTF8 to the correct encoding for the target
22780  * filesystem if possible and the @file is renamed to this.
22781  * If you want to implement a rename operation in the user interface the edit name
22782  * (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the initial value in the rename
22783  * widget, and then the result after editing should be passed to g_file_set_display_name().
22784  * On success the resulting converted filename is returned.
22785  * If @cancellable is not %NULL, then the operation can be cancelled by
22786  * triggering the cancellable object from another thread. If the operation
22787  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22788  * if there was an error.
22789  * Free the returned object with g_object_unref().
22790  *
22791  * Returns: (transfer full): a #GFile specifying what @file was renamed to, or %NULL
22792  */
22793
22794
22795 /**
22796  * g_file_set_display_name_async:
22797  * @file: input #GFile.
22798  * @display_name: a string.
22799  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22800  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22801  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22802  * @user_data: (closure): the data to pass to callback function
22803  *
22804  * Asynchronously sets the display name for a given #GFile.
22805  * For more details, see g_file_set_display_name() which is
22806  * the synchronous version of this call.
22807  * When the operation is finished, @callback will be called. You can then call
22808  * g_file_set_display_name_finish() to get the result of the operation.
22809  */
22810
22811
22812 /**
22813  * g_file_set_display_name_finish:
22814  * @file: input #GFile.
22815  * @res: a #GAsyncResult.
22816  * @error: a #GError, or %NULL
22817  *
22818  * Finishes setting a display name started with
22819  * g_file_set_display_name_async().
22820  * Free the returned object with g_object_unref().
22821  *
22822  * Returns: (transfer full): a #GFile or %NULL on error.
22823  */
22824
22825
22826 /**
22827  * g_file_start_mountable:
22828  * @file: input #GFile.
22829  * @flags: flags affecting the operation
22830  * @start_operation: a #GMountOperation, or %NULL to avoid user interaction.
22831  * @cancellable: optional #GCancellable object, %NULL to ignore.
22832  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22833  * @user_data: the data to pass to callback function
22834  *
22835  * Starts a file of type G_FILE_TYPE_MOUNTABLE.
22836  * Using @start_operation, you can request callbacks when, for instance,
22837  * passwords are needed during authentication.
22838  * If @cancellable is not %NULL, then the operation can be cancelled by
22839  * triggering the cancellable object from another thread. If the operation
22840  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22841  * When the operation is finished, @callback will be called. You can then call
22842  * g_file_mount_mountable_finish() to get the result of the operation.
22843  *
22844  * Since: 2.22
22845  */
22846
22847
22848 /**
22849  * g_file_start_mountable_finish:
22850  * @file: input #GFile.
22851  * @result: a #GAsyncResult.
22852  * @error: a #GError, or %NULL
22853  *
22854  * Finishes a start operation. See g_file_start_mountable() for details.
22855  * Finish an asynchronous start operation that was started
22856  * with g_file_start_mountable().
22857  * otherwise.
22858  *
22859  * Returns: %TRUE if the operation finished successfully. %FALSE
22860  * Since: 2.22
22861  */
22862
22863
22864 /**
22865  * g_file_stop_mountable:
22866  * @file: input #GFile.
22867  * @flags: flags affecting the operation
22868  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
22869  * @cancellable: optional #GCancellable object, %NULL to ignore.
22870  * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22871  * @user_data: the data to pass to callback function
22872  *
22873  * Stops a file of type G_FILE_TYPE_MOUNTABLE.
22874  * If @cancellable is not %NULL, then the operation can be cancelled by
22875  * triggering the cancellable object from another thread. If the operation
22876  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22877  * When the operation is finished, @callback will be called. You can then call
22878  * g_file_stop_mountable_finish() to get the result of the operation.
22879  *
22880  * Since: 2.22
22881  */
22882
22883
22884 /**
22885  * g_file_stop_mountable_finish:
22886  * @file: input #GFile.
22887  * @result: a #GAsyncResult.
22888  * @error: a #GError, or %NULL
22889  *
22890  * Finishes an stop operation, see g_file_stop_mountable() for details.
22891  * Finish an asynchronous stop operation that was started
22892  * with g_file_stop_mountable().
22893  * otherwise.
22894  *
22895  * Returns: %TRUE if the operation finished successfully. %FALSE
22896  * Since: 2.22
22897  */
22898
22899
22900 /**
22901  * g_file_supports_thread_contexts:
22902  * @file: a #GFile.
22903  *
22904  * Checks if @file supports <link
22905  * linkend="g-main-context-push-thread-default-context">thread-default
22906  * contexts</link>. If this returns %FALSE, you cannot perform
22907  * asynchronous operations on @file in a thread that has a
22908  * thread-default context.
22909  *
22910  * Returns: Whether or not @file supports thread-default contexts.
22911  * Since: 2.22
22912  */
22913
22914
22915 /**
22916  * g_file_trash:
22917  * @file: #GFile to send to trash.
22918  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22919  * @error: a #GError, or %NULL
22920  *
22921  * Sends @file to the "Trashcan", if possible. This is similar to
22922  * deleting it, but the user can recover it before emptying the trashcan.
22923  * Not all file systems support trashing, so this call can return the
22924  * %G_IO_ERROR_NOT_SUPPORTED error.
22925  * If @cancellable is not %NULL, then the operation can be cancelled by
22926  * triggering the cancellable object from another thread. If the operation
22927  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22928  *
22929  * Returns: %TRUE on successful trash, %FALSE otherwise.
22930  */
22931
22932
22933 /**
22934  * g_file_unmount_mountable:
22935  * @file: input #GFile.
22936  * @flags: flags affecting the operation
22937  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22938  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22939  * @user_data: (closure): the data to pass to callback function
22940  *
22941  * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
22942  * If @cancellable is not %NULL, then the operation can be cancelled by
22943  * triggering the cancellable object from another thread. If the operation
22944  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22945  * When the operation is finished, @callback will be called. You can then call
22946  * g_file_unmount_mountable_finish() to get the result of the operation.
22947  *
22948  * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation() instead.
22949  */
22950
22951
22952 /**
22953  * g_file_unmount_mountable_finish:
22954  * @file: input #GFile.
22955  * @result: a #GAsyncResult.
22956  * @error: a #GError, or %NULL
22957  *
22958  * Finishes an unmount operation, see g_file_unmount_mountable() for details.
22959  * Finish an asynchronous unmount operation that was started
22960  * with g_file_unmount_mountable().
22961  * otherwise.
22962  *
22963  * Returns: %TRUE if the operation finished successfully. %FALSE
22964  * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation_finish() instead.
22965  */
22966
22967
22968 /**
22969  * g_file_unmount_mountable_with_operation:
22970  * @file: input #GFile.
22971  * @flags: flags affecting the operation
22972  * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
22973  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22974  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22975  * @user_data: (closure): the data to pass to callback function
22976  *
22977  * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
22978  * If @cancellable is not %NULL, then the operation can be cancelled by
22979  * triggering the cancellable object from another thread. If the operation
22980  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22981  * When the operation is finished, @callback will be called. You can then call
22982  * g_file_unmount_mountable_finish() to get the result of the operation.
22983  *
22984  * Since: 2.22
22985  */
22986
22987
22988 /**
22989  * g_file_unmount_mountable_with_operation_finish:
22990  * @file: input #GFile.
22991  * @result: a #GAsyncResult.
22992  * @error: a #GError, or %NULL
22993  *
22994  * Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.
22995  * Finish an asynchronous unmount operation that was started
22996  * with g_file_unmount_mountable_with_operation().
22997  * otherwise.
22998  *
22999  * Returns: %TRUE if the operation finished successfully. %FALSE
23000  * Since: 2.22
23001  */
23002
23003
23004 /**
23005  * g_filename_completer_get_completion_suffix:
23006  * @completer: the filename completer.
23007  * @initial_text: text to be completed.
23008  *
23009  * Obtains a completion for @initial_text from @completer.
23010  * This string is not owned by GIO, so remember to g_free() it
23011  * when finished.
23012  *
23013  * Returns: a completed string, or %NULL if no completion exists.
23014  */
23015
23016
23017 /**
23018  * g_filename_completer_get_completions:
23019  * @completer: the filename completer.
23020  * @initial_text: text to be completed.
23021  *
23022  * Gets an array of completion strings for a given initial text.
23023  * This array must be freed by g_strfreev() when finished.
23024  *
23025  * Returns: (array zero-terminated=1) (transfer full): array of strings with possible completions for @initial_text.
23026  */
23027
23028
23029 /**
23030  * g_filename_completer_new:
23031  *
23032  * Creates a new filename completer.
23033  *
23034  * Returns: a #GFilenameCompleter.
23035  */
23036
23037
23038 /**
23039  * g_filename_completer_set_dirs_only:
23040  * @completer: the filename completer.
23041  * @dirs_only: a #gboolean.
23042  *
23043  * If @dirs_only is %TRUE, @completer will only
23044  * complete directory names, and not file names.
23045  */
23046
23047
23048 /**
23049  * g_filter_input_stream_get_base_stream:
23050  * @stream: a #GFilterInputStream.
23051  *
23052  * Gets the base stream for the filter stream.
23053  *
23054  * Returns: (transfer none): a #GInputStream.
23055  */
23056
23057
23058 /**
23059  * g_filter_input_stream_get_close_base_stream:
23060  * @stream: a #GFilterInputStream.
23061  *
23062  * Returns whether the base stream will be closed when @stream is
23063  * closed.
23064  *
23065  * Returns: %TRUE if the base stream will be closed.
23066  */
23067
23068
23069 /**
23070  * g_filter_input_stream_set_close_base_stream:
23071  * @stream: a #GFilterInputStream.
23072  * @close_base: %TRUE to close the base stream.
23073  *
23074  * Sets whether the base stream will be closed when @stream is closed.
23075  */
23076
23077
23078 /**
23079  * g_filter_output_stream_get_base_stream:
23080  * @stream: a #GFilterOutputStream.
23081  *
23082  * Gets the base stream for the filter stream.
23083  *
23084  * Returns: (transfer none): a #GOutputStream.
23085  */
23086
23087
23088 /**
23089  * g_filter_output_stream_get_close_base_stream:
23090  * @stream: a #GFilterOutputStream.
23091  *
23092  * Returns whether the base stream will be closed when @stream is
23093  * closed.
23094  *
23095  * Returns: %TRUE if the base stream will be closed.
23096  */
23097
23098
23099 /**
23100  * g_filter_output_stream_set_close_base_stream:
23101  * @stream: a #GFilterOutputStream.
23102  * @close_base: %TRUE to close the base stream.
23103  *
23104  * Sets whether the base stream will be closed when @stream is closed.
23105  */
23106
23107
23108 /**
23109  * g_hash_table_freeze:
23110  * @hash_table: a #GHashTable
23111  *
23112  * This function is deprecated and will be removed in the next major
23113  * release of GLib. It does nothing.
23114  */
23115
23116
23117 /**
23118  * g_hash_table_thaw:
23119  * @hash_table: a #GHashTable
23120  *
23121  * This function is deprecated and will be removed in the next major
23122  * release of GLib. It does nothing.
23123  */
23124
23125
23126 /**
23127  * g_icon_equal:
23128  * @icon1: pointer to the first #GIcon.
23129  * @icon2: pointer to the second #GIcon.
23130  *
23131  * Checks if two icons are equal.
23132  *
23133  * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise.
23134  */
23135
23136
23137 /**
23138  * g_icon_hash:
23139  * @icon: #gconstpointer to an icon object.
23140  *
23141  * Gets a hash for an icon.
23142  * use in a #GHashTable or similar data structure.
23143  *
23144  * Virtual: hash
23145  * Returns: a #guint containing a hash for the @icon, suitable for
23146  */
23147
23148
23149 /**
23150  * g_icon_new_for_string:
23151  * @str: A string obtained via g_icon_to_string().
23152  * @error: Return location for error.
23153  *
23154  * Generate a #GIcon instance from @str. This function can fail if
23155  * If your application or library provides one or more #GIcon
23156  * implementations you need to ensure that each #GType is registered
23157  * with the type system prior to calling g_icon_new_for_string().
23158  * interface or %NULL if @error is set.
23159  *
23160  * Returns: (transfer full): An object implementing the #GIcon
23161  * Since: 2.20
23162  */
23163
23164
23165 /**
23166  * g_icon_to_string:
23167  * @icon: a #GIcon.
23168  *
23169  * Generates a textual representation of @icon that can be used for
23170  * serialization such as when passing @icon to a different process or
23171  * saving it to persistent storage. Use g_icon_new_for_string() to
23172  * get @icon back from the returned string.
23173  * The encoding of the returned string is proprietary to #GIcon except
23174  * in the following two cases
23175  * <itemizedlist>
23176  * <listitem><para>
23177  * If @icon is a #GFileIcon, the returned string is a native path
23178  * (such as <literal>/path/to/my icon.png</literal>) without escaping
23179  * if the #GFile for @icon is a native file.  If the file is not
23180  * native, the returned string is the result of g_file_get_uri()
23181  * (such as <literal>sftp://path/to/my%%20icon.png</literal>).
23182  * </para></listitem>
23183  * <listitem><para>
23184  * If @icon is a #GThemedIcon with exactly one name, the encoding is
23185  * simply the name (such as <literal>network-server</literal>).
23186  * </para></listitem>
23187  * </itemizedlist>
23188  * be serialized. Use g_free() to free.
23189  *
23190  * Virtual: to_tokens
23191  * Returns: An allocated NUL-terminated UTF8 string or %NULL if @icon can't
23192  * Since: 2.20
23193  */
23194
23195
23196 /**
23197  * g_inet_address_get_family:
23198  * @address: a #GInetAddress
23199  *
23200  * Gets @address's family
23201  *
23202  * Returns: @address's family
23203  * Since: 2.22
23204  */
23205
23206
23207 /**
23208  * g_inet_address_get_is_any:
23209  * @address: a #GInetAddress
23210  *
23211  * Tests whether @address is the "any" address for its family.
23212  *
23213  * Returns: %TRUE if @address is the "any" address for its family.
23214  * Since: 2.22
23215  */
23216
23217
23218 /**
23219  * g_inet_address_get_is_link_local:
23220  * @address: a #GInetAddress
23221  *
23222  * Tests whether @address is a link-local address (that is, if it
23223  * identifies a host on a local network that is not connected to the
23224  * Internet).
23225  *
23226  * Returns: %TRUE if @address is a link-local address.
23227  * Since: 2.22
23228  */
23229
23230
23231 /**
23232  * g_inet_address_get_is_loopback:
23233  * @address: a #GInetAddress
23234  *
23235  * Tests whether @address is the loopback address for its family.
23236  *
23237  * Returns: %TRUE if @address is the loopback address for its family.
23238  * Since: 2.22
23239  */
23240
23241
23242 /**
23243  * g_inet_address_get_is_mc_global:
23244  * @address: a #GInetAddress
23245  *
23246  * Tests whether @address is a global multicast address.
23247  *
23248  * Returns: %TRUE if @address is a global multicast address.
23249  * Since: 2.22
23250  */
23251
23252
23253 /**
23254  * g_inet_address_get_is_mc_link_local:
23255  * @address: a #GInetAddress
23256  *
23257  * Tests whether @address is a link-local multicast address.
23258  *
23259  * Returns: %TRUE if @address is a link-local multicast address.
23260  * Since: 2.22
23261  */
23262
23263
23264 /**
23265  * g_inet_address_get_is_mc_node_local:
23266  * @address: a #GInetAddress
23267  *
23268  * Tests whether @address is a node-local multicast address.
23269  *
23270  * Returns: %TRUE if @address is a node-local multicast address.
23271  * Since: 2.22
23272  */
23273
23274
23275 /**
23276  * g_inet_address_get_is_mc_org_local:
23277  * @address: a #GInetAddress
23278  *
23279  * Tests whether @address is an organization-local multicast address.
23280  *
23281  * Returns: %TRUE if @address is an organization-local multicast address.
23282  * Since: 2.22
23283  */
23284
23285
23286 /**
23287  * g_inet_address_get_is_mc_site_local:
23288  * @address: a #GInetAddress
23289  *
23290  * Tests whether @address is a site-local multicast address.
23291  *
23292  * Returns: %TRUE if @address is a site-local multicast address.
23293  * Since: 2.22
23294  */
23295
23296
23297 /**
23298  * g_inet_address_get_is_multicast:
23299  * @address: a #GInetAddress
23300  *
23301  * Tests whether @address is a multicast address.
23302  *
23303  * Returns: %TRUE if @address is a multicast address.
23304  * Since: 2.22
23305  */
23306
23307
23308 /**
23309  * g_inet_address_get_is_site_local:
23310  * @address: a #GInetAddress
23311  *
23312  * Tests whether @address is a site-local address such as 10.0.0.1
23313  * (that is, the address identifies a host on a local network that can
23314  * not be reached directly from the Internet, but which may have
23315  * outgoing Internet connectivity via a NAT or firewall).
23316  *
23317  * Returns: %TRUE if @address is a site-local address.
23318  * Since: 2.22
23319  */
23320
23321
23322 /**
23323  * g_inet_address_get_native_size:
23324  * @address: a #GInetAddress
23325  *
23326  * Gets the size of the native raw binary address for @address. This
23327  * is the size of the data that you get from g_inet_address_to_bytes().
23328  *
23329  * Returns: the number of bytes used for the native version of @address.
23330  * Since: 2.22
23331  */
23332
23333
23334 /**
23335  * g_inet_address_new_any:
23336  * @family: the address family
23337  *
23338  * Creates a #GInetAddress for the "any" address (unassigned/"don't
23339  * care") for @family.
23340  * for @family.
23341  *
23342  * Returns: a new #GInetAddress corresponding to the "any" address
23343  * Since: 2.22
23344  */
23345
23346
23347 /**
23348  * g_inet_address_new_from_bytes:
23349  * @bytes: raw address data
23350  * @family: the address family of @bytes
23351  *
23352  * Creates a new #GInetAddress from the given @family and @bytes.
23353  * %G_INET_ADDRESS_IPV6.
23354  *
23355  * Returns: a new #GInetAddress corresponding to @family and @bytes.
23356  * Since: 2.22
23357  */
23358
23359
23360 /**
23361  * g_inet_address_new_from_string:
23362  * @string: a string representation of an IP address
23363  *
23364  * Parses @string as an IP address and creates a new #GInetAddress.
23365  *
23366  * Returns: a new #GInetAddress corresponding to @string, or %NULL if
23367  * Since: 2.22
23368  */
23369
23370
23371 /**
23372  * g_inet_address_new_loopback:
23373  * @family: the address family
23374  *
23375  * Creates a #GInetAddress for the loopback address for @family.
23376  * for @family.
23377  *
23378  * Returns: a new #GInetAddress corresponding to the loopback address
23379  * Since: 2.22
23380  */
23381
23382
23383 /**
23384  * g_inet_address_to_bytes: (skip)
23385  * @address: a #GInetAddress
23386  *
23387  * Gets the raw binary address data from @address.
23388  * which should not be modified, stored, or freed. The size of this
23389  * array can be gotten with g_inet_address_get_native_size().
23390  *
23391  * Returns: a pointer to an internal array of the bytes in @address,
23392  * Since: 2.22
23393  */
23394
23395
23396 /**
23397  * g_inet_address_to_string:
23398  * @address: a #GInetAddress
23399  *
23400  * Converts @address to string form.
23401  * freed after use.
23402  *
23403  * Returns: a representation of @address as a string, which should be
23404  * Since: 2.22
23405  */
23406
23407
23408 /**
23409  * g_inet_socket_address_get_address:
23410  * @address: a #GInetSocketAddress
23411  *
23412  * Gets @address's #GInetAddress.
23413  * g_object_ref()'d if it will be stored
23414  *
23415  * Returns: (transfer none): the #GInetAddress for @address, which must be
23416  * Since: 2.22
23417  */
23418
23419
23420 /**
23421  * g_inet_socket_address_get_port:
23422  * @address: a #GInetSocketAddress
23423  *
23424  * Gets @address's port.
23425  *
23426  * Returns: the port for @address
23427  * Since: 2.22
23428  */
23429
23430
23431 /**
23432  * g_inet_socket_address_new:
23433  * @address: a #GInetAddress
23434  * @port: a port number
23435  *
23436  * Creates a new #GInetSocketAddress for @address and @port.
23437  *
23438  * Returns: a new #GInetSocketAddress
23439  * Since: 2.22
23440  */
23441
23442
23443 /**
23444  * g_initable_init:
23445  * @initable: a #GInitable.
23446  * @cancellable: optional #GCancellable object, %NULL to ignore.
23447  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23448  *
23449  * Initializes the object implementing the interface. This must be
23450  * done before any real use of the object after initial construction.
23451  * Implementations may also support cancellation. If @cancellable is not %NULL,
23452  * then initialization can be cancelled by triggering the cancellable object
23453  * from another thread. If the operation was cancelled, the error
23454  * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
23455  * the object doesn't support cancellable initialization the error
23456  * %G_IO_ERROR_NOT_SUPPORTED will be returned.
23457  * If this function is not called, or returns with an error then all
23458  * operations on the object should fail, generally returning the
23459  * error %G_IO_ERROR_NOT_INITIALIZED.
23460  * Implementations of this method must be idempotent, i.e. multiple calls
23461  * to this function with the same argument should return the same results.
23462  * Only the first call initializes the object, further calls return the result
23463  * of the first call. This is so that its safe to implement the singleton
23464  * pattern in the GObject constructor function.
23465  * return %FALSE and set @error appropriately if present.
23466  *
23467  * Returns: %TRUE if successful. If an error has occurred, this function will
23468  * Since: 2.22
23469  */
23470
23471
23472 /**
23473  * g_initable_new:
23474  * @object_type: a #GType supporting #GInitable.
23475  * @cancellable: optional #GCancellable object, %NULL to ignore.
23476  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23477  * @first_property_name: the name of the first property, or %NULL if no properties
23478  * @...: the value if the first property, followed by and other property value pairs, and ended by %NULL.
23479  *
23480  * Helper function for constructing #GInitiable object. This is
23481  * similar to g_object_new() but also initializes the object
23482  * and returns %NULL, setting an error on failure.
23483  *
23484  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
23485  * Since: 2.22
23486  */
23487
23488
23489 /**
23490  * g_initable_new_valist:
23491  * @object_type: a #GType supporting #GInitable.
23492  * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
23493  * @var_args: The var args list generated from @first_property_name.
23494  * @cancellable: optional #GCancellable object, %NULL to ignore.
23495  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23496  *
23497  * Helper function for constructing #GInitiable object. This is
23498  * similar to g_object_new_valist() but also initializes the object
23499  * and returns %NULL, setting an error on failure.
23500  *
23501  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
23502  * Since: 2.22
23503  */
23504
23505
23506 /**
23507  * g_initable_newv:
23508  * @object_type: a #GType supporting #GInitable.
23509  * @n_parameters: the number of parameters in @parameters
23510  * @parameters: the parameters to use to construct the object
23511  * @cancellable: optional #GCancellable object, %NULL to ignore.
23512  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23513  *
23514  * Helper function for constructing #GInitiable object. This is
23515  * similar to g_object_newv() but also initializes the object
23516  * and returns %NULL, setting an error on failure.
23517  *
23518  * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
23519  * Since: 2.22
23520  */
23521
23522
23523 /**
23524  * g_input_stream_clear_pending:
23525  * @stream: input stream
23526  *
23527  * Clears the pending flag on @stream.
23528  */
23529
23530
23531 /**
23532  * g_input_stream_close:
23533  * @stream: A #GInputStream.
23534  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23535  * @error: location to store the error occuring, or %NULL to ignore
23536  *
23537  * Closes the stream, releasing resources related to it.
23538  * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
23539  * Closing a stream multiple times will not return an error.
23540  * Streams will be automatically closed when the last reference
23541  * is dropped, but you might want to call this function to make sure
23542  * resources are released as early as possible.
23543  * Some streams might keep the backing store of the stream (e.g. a file descriptor)
23544  * open after the stream is closed. See the documentation for the individual
23545  * stream for details.
23546  * On failure the first error that happened will be reported, but the close
23547  * operation will finish as much as possible. A stream that failed to
23548  * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
23549  * is important to check and report the error to the user.
23550  * If @cancellable is not NULL, then the operation can be cancelled by
23551  * triggering the cancellable object from another thread. If the operation
23552  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23553  * Cancelling a close will still leave the stream closed, but some streams
23554  * can use a faster close that doesn't block to e.g. check errors.
23555  *
23556  * Returns: %TRUE on success, %FALSE on failure
23557  */
23558
23559
23560 /**
23561  * g_input_stream_close_async:
23562  * @stream: A #GInputStream.
23563  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23564  * @cancellable: (allow-none): optional cancellable object
23565  * @callback: (scope async): callback to call when the request is satisfied
23566  * @user_data: (closure): the data to pass to callback function
23567  *
23568  * Requests an asynchronous closes of the stream, releasing resources related to it.
23569  * When the operation is finished @callback will be called.
23570  * You can then call g_input_stream_close_finish() to get the result of the
23571  * operation.
23572  * For behaviour details see g_input_stream_close().
23573  * The asyncronous methods have a default fallback that uses threads to implement
23574  * asynchronicity, so they are optional for inheriting classes. However, if you
23575  * override one you must override all.
23576  */
23577
23578
23579 /**
23580  * g_input_stream_close_finish:
23581  * @stream: a #GInputStream.
23582  * @result: a #GAsyncResult.
23583  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23584  *
23585  * Finishes closing a stream asynchronously, started from g_input_stream_close_async().
23586  *
23587  * Returns: %TRUE if the stream was closed successfully.
23588  */
23589
23590
23591 /**
23592  * g_input_stream_has_pending:
23593  * @stream: input stream.
23594  *
23595  * Checks if an input stream has pending actions.
23596  *
23597  * Returns: %TRUE if @stream has pending actions.
23598  */
23599
23600
23601 /**
23602  * g_input_stream_is_closed:
23603  * @stream: input stream.
23604  *
23605  * Checks if an input stream is closed.
23606  *
23607  * Returns: %TRUE if the stream is closed.
23608  */
23609
23610
23611 /**
23612  * g_input_stream_read:
23613  * @stream: a #GInputStream.
23614  * @buffer: a buffer to read data into (which should be at least count bytes long).
23615  * @count: the number of bytes that will be read from the stream
23616  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23617  * @error: location to store the error occuring, or %NULL to ignore
23618  *
23619  * Tries to read @count bytes from the stream into the buffer starting at
23620  * If count is zero returns zero and does nothing. A value of @count
23621  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
23622  * On success, the number of bytes read into the buffer is returned.
23623  * It is not an error if this is not the same as the requested size, as it
23624  * can happen e.g. near the end of a file. Zero is returned on end of file
23625  * (or if @count is zero),  but never otherwise.
23626  * If @cancellable is not NULL, then the operation can be cancelled by
23627  * triggering the cancellable object from another thread. If the operation
23628  * was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an
23629  * operation was partially finished when the operation was cancelled the
23630  * partial result will be returned, without an error.
23631  * On error -1 is returned and @error is set accordingly.
23632  *
23633  * Returns: Number of bytes read, or -1 on error
23634  */
23635
23636
23637 /**
23638  * g_input_stream_read_all:
23639  * @stream: a #GInputStream.
23640  * @buffer: a buffer to read data into (which should be at least count bytes long).
23641  * @count: the number of bytes that will be read from the stream
23642  * @bytes_read: (out): location to store the number of bytes that was read from the stream
23643  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23644  * @error: location to store the error occuring, or %NULL to ignore
23645  *
23646  * Tries to read @count bytes from the stream into the buffer starting at
23647  * This function is similar to g_input_stream_read(), except it tries to
23648  * read as many bytes as requested, only stopping on an error or end of stream.
23649  * On a successful read of @count bytes, or if we reached the end of the
23650  * stream,  %TRUE is returned, and @bytes_read is set to the number of bytes
23651  * read into @buffer.
23652  * If there is an error during the operation %FALSE is returned and @error
23653  * is set to indicate the error status, @bytes_read is updated to contain
23654  * the number of bytes read into @buffer before the error occurred.
23655  *
23656  * Returns: %TRUE on success, %FALSE if there was an error
23657  */
23658
23659
23660 /**
23661  * g_input_stream_read_async:
23662  * @stream: A #GInputStream.
23663  * @buffer: a buffer to read data into (which should be at least count bytes long).
23664  * @count: the number of bytes that will be read from the stream
23665  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23666  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23667  * @callback: (scope async): callback to call when the request is satisfied
23668  * @user_data: (closure): the data to pass to callback function
23669  *
23670  * Request an asynchronous read of @count bytes from the stream into the buffer
23671  * starting at @buffer. When the operation is finished @callback will be called.
23672  * You can then call g_input_stream_read_finish() to get the result of the
23673  * operation.
23674  * During an async request no other sync and async calls are allowed on @stream, and will
23675  * result in %G_IO_ERROR_PENDING errors.
23676  * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
23677  * On success, the number of bytes read into the buffer will be passed to the
23678  * callback. It is not an error if this is not the same as the requested size, as it
23679  * can happen e.g. near the end of a file, but generally we try to read
23680  * as many bytes as requested. Zero is returned on end of file
23681  * (or if @count is zero),  but never otherwise.
23682  * Any outstanding i/o request with higher priority (lower numerical value) will
23683  * be executed before an outstanding request with lower priority. Default
23684  * priority is %G_PRIORITY_DEFAULT.
23685  * The asyncronous methods have a default fallback that uses threads to implement
23686  * asynchronicity, so they are optional for inheriting classes. However, if you
23687  * override one you must override all.
23688  */
23689
23690
23691 /**
23692  * g_input_stream_read_finish:
23693  * @stream: a #GInputStream.
23694  * @result: a #GAsyncResult.
23695  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23696  *
23697  * Finishes an asynchronous stream read operation.
23698  *
23699  * Returns: number of bytes read in, or -1 on error.
23700  */
23701
23702
23703 /**
23704  * g_input_stream_set_pending:
23705  * @stream: input stream
23706  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23707  *
23708  * Sets @stream to have actions pending. If the pending flag is
23709  * already set or @stream is closed, it will return %FALSE and set
23710  *
23711  * Returns: %TRUE if pending was previously unset and is now set.
23712  */
23713
23714
23715 /**
23716  * g_input_stream_skip:
23717  * @stream: a #GInputStream.
23718  * @count: the number of bytes that will be skipped from the stream
23719  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23720  * @error: location to store the error occuring, or %NULL to ignore
23721  *
23722  * Tries to skip @count bytes from the stream. Will block during the operation.
23723  * This is identical to g_input_stream_read(), from a behaviour standpoint,
23724  * but the bytes that are skipped are not returned to the user. Some
23725  * streams have an implementation that is more efficient than reading the data.
23726  * This function is optional for inherited classes, as the default implementation
23727  * emulates it using read.
23728  * If @cancellable is not %NULL, then the operation can be cancelled by
23729  * triggering the cancellable object from another thread. If the operation
23730  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
23731  * operation was partially finished when the operation was cancelled the
23732  * partial result will be returned, without an error.
23733  *
23734  * Returns: Number of bytes skipped, or -1 on error
23735  */
23736
23737
23738 /**
23739  * g_input_stream_skip_async:
23740  * @stream: A #GInputStream.
23741  * @count: the number of bytes that will be skipped from the stream
23742  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23743  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23744  * @callback: (scope async): callback to call when the request is satisfied
23745  * @user_data: (closure): the data to pass to callback function
23746  *
23747  * Request an asynchronous skip of @count bytes from the stream.
23748  * When the operation is finished @callback will be called.
23749  * You can then call g_input_stream_skip_finish() to get the result
23750  * of the operation.
23751  * During an async request no other sync and async calls are allowed,
23752  * and will result in %G_IO_ERROR_PENDING errors.
23753  * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
23754  * On success, the number of bytes skipped will be passed to the callback.
23755  * It is not an error if this is not the same as the requested size, as it
23756  * can happen e.g. near the end of a file, but generally we try to skip
23757  * as many bytes as requested. Zero is returned on end of file
23758  * (or if @count is zero), but never otherwise.
23759  * Any outstanding i/o request with higher priority (lower numerical value)
23760  * will be executed before an outstanding request with lower priority.
23761  * Default priority is %G_PRIORITY_DEFAULT.
23762  * The asynchronous methods have a default fallback that uses threads to
23763  * implement asynchronicity, so they are optional for inheriting classes.
23764  * However, if you override one, you must override all.
23765  */
23766
23767
23768 /**
23769  * g_input_stream_skip_finish:
23770  * @stream: a #GInputStream.
23771  * @result: a #GAsyncResult.
23772  * @error: a #GError location to store the error occuring, or %NULL to ignore.
23773  *
23774  * Finishes a stream skip operation.
23775  *
23776  * Returns: the size of the bytes skipped, or %-1 on error.
23777  */
23778
23779
23780 /**
23781  * g_io_error_from_errno:
23782  * @err_no: Error number as defined in errno.h.
23783  *
23784  * Converts errno.h error codes into GIO error codes.
23785  *
23786  * Returns: #GIOErrorEnum value for the given errno.h error number.
23787  */
23788
23789
23790 /**
23791  * g_io_error_from_win32_error:
23792  * @error_code: Windows error number.
23793  *
23794  * Converts some common error codes into GIO error codes. The
23795  * fallback value G_IO_ERROR_FAILED is returned for error codes not
23796  * handled.
23797  *
23798  * Returns: #GIOErrorEnum value for the given error number.
23799  * Since: 2.26
23800  */
23801
23802
23803 /**
23804  * g_io_error_quark:
23805  *
23806  * Gets the GIO Error Quark.
23807  *
23808  * Returns: a #GQuark.
23809  */
23810
23811
23812 /**
23813  * g_io_extension_get_name:
23814  * @extension: a #GIOExtension
23815  *
23816  * Gets the name under which @extension was registered.
23817  * Note that the same type may be registered as extension
23818  * for multiple extension points, under different names.
23819  *
23820  * Returns: the name of @extension.
23821  */
23822
23823
23824 /**
23825  * g_io_extension_get_priority:
23826  * @extension: a #GIOExtension
23827  *
23828  * Gets the priority with which @extension was registered.
23829  *
23830  * Returns: the priority of @extension
23831  */
23832
23833
23834 /**
23835  * g_io_extension_get_type:
23836  * @extension: a #GIOExtension
23837  *
23838  * Gets the type associated with @extension.
23839  *
23840  * Returns: the type of @extension
23841  */
23842
23843
23844 /**
23845  * g_io_extension_point_get_extension_by_name:
23846  * @extension_point: a #GIOExtensionPoint
23847  * @name: the name of the extension to get
23848  *
23849  * Finds a #GIOExtension for an extension point by name.
23850  * given name, or %NULL if there is no extension with that name
23851  *
23852  * Returns: (transfer none): the #GIOExtension for @extension_point that has the
23853  */
23854
23855
23856 /**
23857  * g_io_extension_point_get_extensions:
23858  * @extension_point: a #GIOExtensionPoint
23859  *
23860  * Gets a list of all extensions that implement this extension point.
23861  * The list is sorted by priority, beginning with the highest priority.
23862  * #GIOExtension<!-- -->s. The list is owned by GIO and should not be
23863  * modified.
23864  *
23865  * Returns: (element-type GIOExtension) (transfer none): a #GList of
23866  */
23867
23868
23869 /**
23870  * g_io_extension_point_get_required_type:
23871  * @extension_point: a #GIOExtensionPoint
23872  *
23873  * Gets the required type for @extension_point.
23874  * or #G_TYPE_INVALID if the extension point has no required type
23875  *
23876  * Returns: the #GType that all implementations must have,
23877  */
23878
23879
23880 /**
23881  * g_io_extension_point_implement:
23882  * @extension_point_name: the name of the extension point
23883  * @type: the #GType to register as extension
23884  * @extension_name: the name for the extension
23885  * @priority: the priority for the extension
23886  *
23887  * Registers @type as extension for the extension point with name
23888  * If @type has already been registered as an extension for this
23889  * extension point, the existing #GIOExtension object is returned.
23890  *
23891  * Returns: a #GIOExtension object for #GType
23892  */
23893
23894
23895 /**
23896  * g_io_extension_point_lookup:
23897  * @name: the name of the extension point
23898  *
23899  * Looks up an existing extension point.
23900  * registered extension point with the given name
23901  *
23902  * Returns: the #GIOExtensionPoint, or %NULL if there is no
23903  */
23904
23905
23906 /**
23907  * g_io_extension_point_register:
23908  * @name: The name of the extension point
23909  *
23910  * Registers an extension point.
23911  * and should not be freed
23912  *
23913  * Returns: the new #GIOExtensionPoint. This object is owned by GIO
23914  */
23915
23916
23917 /**
23918  * g_io_extension_point_set_required_type:
23919  * @extension_point: a #GIOExtensionPoint
23920  * @type: the #GType to require
23921  *
23922  * Sets the required type for @extension_point to @type.
23923  * All implementations must henceforth have this type.
23924  */
23925
23926
23927 /**
23928  * g_io_extension_ref_class:
23929  * @extension: a #GIOExtension
23930  *
23931  * Gets a reference to the class for the type that is
23932  * associated with @extension.
23933  *
23934  * Returns: (transfer full): the #GTypeClass for the type of @extension
23935  */
23936
23937
23938 /**
23939  * g_io_module_load:
23940  * @module: a #GIOModule.
23941  *
23942  * Required API for GIO modules to implement.
23943  * This function is ran after the module has been loaded into GIO,
23944  * to initialize the module.
23945  */
23946
23947
23948 /**
23949  * g_io_module_new:
23950  * @filename: filename of the shared library module.
23951  *
23952  * Creates a new GIOModule that will load the specific
23953  * shared library when in use.
23954  * or %NULL on error.
23955  *
23956  * Returns: a #GIOModule from given @filename,
23957  */
23958
23959
23960 /**
23961  * g_io_module_query:
23962  *
23963  * Optional API for GIO modules to implement.
23964  * Should return a list of all the extension points that may be
23965  * implemented in this module.
23966  * This method will not be called in normal use, however it may be
23967  * called when probing existing modules and recording which extension
23968  * points that this modle is used for. This means we won't have to
23969  * load and initialze this module unless its needed.
23970  * If this function is not implemented by the module the module will
23971  * always be loaded, initialized and then unloaded on application startup
23972  * so that it can register its extension points during init.
23973  * Note that a module need not actually implement all the extension points
23974  * that g_io_module_query returns, since the exact list of extension may
23975  * depend on runtime issues. However all extension points actually implemented
23976  * must be returned by g_io_module_query() (if defined).
23977  * When installing a module that implements g_io_module_query you must
23978  * run gio-querymodules in order to build the cache files required for
23979  * lazy loading.
23980  * extension points of the module. The array must be suitable for
23981  * freeing with g_strfreev().
23982  *
23983  * Returns: (transfer full): A %NULL-terminated array of strings, listing the supported
23984  * Since: 2.24
23985  */
23986
23987
23988 /**
23989  * g_io_module_unload:
23990  * @module: a #GIOModule.
23991  *
23992  * Required API for GIO modules to implement.
23993  * This function is ran when the module is being unloaded from GIO,
23994  * to finalize the module.
23995  */
23996
23997
23998 /**
23999  * g_io_modules_load_all_in_directory:
24000  * @dirname: pathname for a directory containing modules to load.
24001  *
24002  * Loads all the modules in the specified directory.
24003  * If don't require all modules to be initialized (and thus registering
24004  * all gtypes) then you can use g_io_modules_scan_all_in_directory()
24005  * which allows delayed/lazy loading of modules.
24006  * from the directory,
24007  * All the modules are loaded into memory, if you want to
24008  * unload them (enabling on-demand loading) you must call
24009  * g_type_module_unuse() on all the modules. Free the list
24010  * with g_list_free().
24011  *
24012  * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded
24013  */
24014
24015
24016 /**
24017  * g_io_modules_scan_all_in_directory:
24018  * @dirname: pathname for a directory containing modules to scan.
24019  *
24020  * Scans all the modules in the specified directory, ensuring that
24021  * any extension point implemented by a module is registered.
24022  * This may not actually load and initialize all the types in each
24023  * module, some modules may be lazily loaded and initialized when
24024  * an extension point it implementes is used with e.g.
24025  * g_io_extension_point_get_extensions() or
24026  * g_io_extension_point_get_extension_by_name().
24027  * If you need to guarantee that all types are loaded in all the modules,
24028  * use g_io_modules_load_all_in_directory().
24029  *
24030  * Since: 2.24
24031  */
24032
24033
24034 /**
24035  * g_io_scheduler_cancel_all_jobs:
24036  *
24037  * Cancels all cancellable I/O jobs.
24038  * A job is cancellable if a #GCancellable was passed into
24039  * g_io_scheduler_push_job().
24040  */
24041
24042
24043 /**
24044  * g_io_scheduler_job_send_to_mainloop:
24045  * @job: a #GIOSchedulerJob
24046  * @func: a #GSourceFunc callback that will be called in the original thread
24047  * @user_data: data to pass to @func
24048  * @notify: a #GDestroyNotify for @user_data, or %NULL
24049  *
24050  * Used from an I/O job to send a callback to be run in the thread
24051  * that the job was started from, waiting for the result (and thus
24052  * blocking the I/O job).
24053  *
24054  * Returns: The return value of @func
24055  */
24056
24057
24058 /**
24059  * g_io_scheduler_job_send_to_mainloop_async:
24060  * @job: a #GIOSchedulerJob
24061  * @func: a #GSourceFunc callback that will be called in the original thread
24062  * @user_data: data to pass to @func
24063  * @notify: a #GDestroyNotify for @user_data, or %NULL
24064  *
24065  * Used from an I/O job to send a callback to be run asynchronously in
24066  * the thread that the job was started from. The callback will be run
24067  * when the main loop is available, but at that time the I/O job might
24068  * have finished. The return value from the callback is ignored.
24069  * Note that if you are passing the @user_data from g_io_scheduler_push_job()
24070  * on to this function you have to ensure that it is not freed before
24071  * g_io_scheduler_push_job() or by using refcounting for @user_data.
24072  */
24073
24074
24075 /**
24076  * g_io_scheduler_push_job:
24077  * @job_func: a #GIOSchedulerJobFunc.
24078  * @user_data: data to pass to @job_func
24079  * @notify: a #GDestroyNotify for @user_data, or %NULL
24080  * @io_priority: the <link linkend="gioscheduler">I/O priority</link> of the request.
24081  * @cancellable: optional #GCancellable object, %NULL to ignore.
24082  *
24083  * Schedules the I/O job to run.
24084  * regardless whether the job was cancelled or has run to completion.
24085  * If @cancellable is not %NULL, it can be used to cancel the I/O job
24086  * by calling g_cancellable_cancel() or by calling
24087  * g_io_scheduler_cancel_all_jobs().
24088  */
24089
24090
24091 /**
24092  * g_io_stream_clear_pending:
24093  * @stream: a #GIOStream
24094  *
24095  * Clears the pending flag on @stream.
24096  *
24097  * Since: 2.22
24098  */
24099
24100
24101 /**
24102  * g_io_stream_close:
24103  * @stream: a #GIOStream
24104  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
24105  * @error: location to store the error occuring, or %NULL to ignore
24106  *
24107  * Closes the stream, releasing resources related to it. This will also
24108  * closes the individual input and output streams, if they are not already
24109  * closed.
24110  * Once the stream is closed, all other operations will return
24111  * %G_IO_ERROR_CLOSED. Closing a stream multiple times will not
24112  * return an error.
24113  * Closing a stream will automatically flush any outstanding buffers
24114  * in the stream.
24115  * Streams will be automatically closed when the last reference
24116  * is dropped, but you might want to call this function to make sure
24117  * resources are released as early as possible.
24118  * Some streams might keep the backing store of the stream (e.g. a file
24119  * descriptor) open after the stream is closed. See the documentation for
24120  * the individual stream for details.
24121  * On failure the first error that happened will be reported, but the
24122  * close operation will finish as much as possible. A stream that failed
24123  * to close will still return %G_IO_ERROR_CLOSED for all operations.
24124  * Still, it is important to check and report the error to the user,
24125  * otherwise there might be a loss of data as all data might not be written.
24126  * If @cancellable is not NULL, then the operation can be cancelled by
24127  * triggering the cancellable object from another thread. If the operation
24128  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24129  * Cancelling a close will still leave the stream closed, but some streams
24130  * can use a faster close that doesn't block to e.g. check errors.
24131  * The default implementation of this method just calls close on the
24132  * individual input/output streams.
24133  *
24134  * Returns: %TRUE on success, %FALSE on failure
24135  * Since: 2.22
24136  */
24137
24138
24139 /**
24140  * g_io_stream_close_async:
24141  * @stream: a #GIOStream
24142  * @io_priority: the io priority of the request
24143  * @cancellable: (allow-none): optional cancellable object
24144  * @callback: (scope async): callback to call when the request is satisfied
24145  * @user_data: (closure): the data to pass to callback function
24146  *
24147  * Requests an asynchronous close of the stream, releasing resources
24148  * related to it. When the operation is finished @callback will be
24149  * called. You can then call g_io_stream_close_finish() to get
24150  * the result of the operation.
24151  * For behaviour details see g_io_stream_close().
24152  * The asynchronous methods have a default fallback that uses threads
24153  * to implement asynchronicity, so they are optional for inheriting
24154  * classes. However, if you override one you must override all.
24155  *
24156  * Since: 2.22
24157  */
24158
24159
24160 /**
24161  * g_io_stream_close_finish:
24162  * @stream: a #GIOStream
24163  * @result: a #GAsyncResult
24164  * @error: a #GError location to store the error occuring, or %NULL to ignore
24165  *
24166  * Closes a stream.
24167  *
24168  * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
24169  * Since: 2.22
24170  */
24171
24172
24173 /**
24174  * g_io_stream_get_input_stream:
24175  * @stream: a #GIOStream
24176  *
24177  * Gets the input stream for this object. This is used
24178  * for reading.
24179  * Do not free.
24180  *
24181  * Returns: (transfer none): a #GInputStream, owned by the #GIOStream.
24182  * Since: 2.22
24183  */
24184
24185
24186 /**
24187  * g_io_stream_get_output_stream:
24188  * @stream: a #GIOStream
24189  *
24190  * Gets the output stream for this object. This is used for
24191  * writing.
24192  * Do not free.
24193  *
24194  * Returns: (transfer none): a #GOutputStream, owned by the #GIOStream.
24195  * Since: 2.22
24196  */
24197
24198
24199 /**
24200  * g_io_stream_has_pending:
24201  * @stream: a #GIOStream
24202  *
24203  * Checks if a stream has pending actions.
24204  *
24205  * Returns: %TRUE if @stream has pending actions.
24206  * Since: 2.22
24207  */
24208
24209
24210 /**
24211  * g_io_stream_is_closed:
24212  * @stream: a #GIOStream
24213  *
24214  * Checks if a stream is closed.
24215  *
24216  * Returns: %TRUE if the stream is closed.
24217  * Since: 2.22
24218  */
24219
24220
24221 /**
24222  * g_io_stream_set_pending:
24223  * @stream: a #GIOStream
24224  * @error: a #GError location to store the error occuring, or %NULL to ignore
24225  *
24226  * Sets @stream to have actions pending. If the pending flag is
24227  * already set or @stream is closed, it will return %FALSE and set
24228  *
24229  * Returns: %TRUE if pending was previously unset and is now set.
24230  * Since: 2.22
24231  */
24232
24233
24234 /**
24235  * g_io_stream_splice_async:
24236  * @stream1: a #GIOStream.
24237  * @stream2: a #GIOStream.
24238  * @flags: a set of #GIOStreamSpliceFlags.
24239  * @io_priority: the io priority of the request.
24240  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24241  * @callback: (scope async): a #GAsyncReadyCallback.
24242  * @user_data: (closure): user data passed to @callback.
24243  *
24244  * Asyncronously splice the output stream of @stream1 to the input stream of
24245  * When the operation is finished @callback will be called.
24246  * You can then call g_io_stream_splice_finish() to get the
24247  * result of the operation.
24248  *
24249  * Since: 2.28
24250  */
24251
24252
24253 /**
24254  * g_io_stream_splice_finish:
24255  * @result: a #GAsyncResult.
24256  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24257  *
24258  * Finishes an asynchronous io stream splice operation.
24259  *
24260  * Returns: %TRUE on success, %FALSE otherwise.
24261  * Since: 2.28
24262  */
24263
24264
24265 /**
24266  * g_keyfile_settings_backend_new:
24267  * @filename: the filename of the keyfile
24268  * @root_path: the path under which all settings keys appear
24269  * @root_group: (allow-none): the group name corresponding to
24270  * @returns: (transfer full): a keyfile-backed #GSettingsBackend
24271  *
24272  * Creates a keyfile-backed #GSettingsBackend.
24273  * The filename of the keyfile to use is given by @filename.
24274  * All settings read to or written from the backend must fall under the
24275  * path given in @root_path (which must start and end with a slash and
24276  * not contain two consecutive slashes).  @root_path may be "/".
24277  * If @root_group is non-%NULL then it specifies the name of the keyfile
24278  * group used for keys that are written directly below @root_path.  For
24279  * example, if @root_path is "/apps/example/" and @root_group is
24280  * "toplevel", then settings the key "/apps/example/enabled" to a value
24281  * of %TRUE will cause the following to appear in the keyfile:
24282  * |[
24283  * [toplevel]
24284  * enabled=true
24285  * ]|
24286  * If @root_group is %NULL then it is not permitted to store keys
24287  * directly below the @root_path.
24288  * the name of the subpath (with the final slash stripped) is used as
24289  * the name of the keyfile group.  To continue the example, if
24290  * "/apps/example/profiles/default/font-size" were set to
24291  * 12 then the following would appear in the keyfile:
24292  * |[
24293  * [profiles/default]
24294  * font-size=12
24295  * ]|
24296  * The backend will refuse writes (and return writability as being
24297  * %FALSE) for keys outside of @root_path and, in the event that
24298  * Writes will also be refused if the backend detects that it has the
24299  * writable).
24300  * There is no checking done for your key namespace clashing with the
24301  * syntax of the key file format.  For example, if you have '[' or ']'
24302  * characters in your path names or '=' in your key names you may be in
24303  * trouble.
24304  *
24305  * For keys not stored directly below @root_path (ie: in a sub-path),
24306  * Inability to rewrite the keyfile (ie: the containing directory is not
24307  */
24308
24309
24310 /**
24311  * g_loadable_icon_load:
24312  * @icon: a #GLoadableIcon.
24313  * @size: an integer.
24314  * @type: (out) (allow-none): a location to store the type of the loaded icon, %NULL to ignore.
24315  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24316  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24317  *
24318  * Loads a loadable icon. For the asynchronous version of this function,
24319  * see g_loadable_icon_load_async().
24320  *
24321  * Returns: (transfer full): a #GInputStream to read the icon from.
24322  */
24323
24324
24325 /**
24326  * g_loadable_icon_load_async:
24327  * @icon: a #GLoadableIcon.
24328  * @size: an integer.
24329  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24330  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
24331  * @user_data: (closure): the data to pass to callback function
24332  *
24333  * Loads an icon asynchronously. To finish this function, see
24334  * g_loadable_icon_load_finish(). For the synchronous, blocking
24335  * version of this function, see g_loadable_icon_load().
24336  */
24337
24338
24339 /**
24340  * g_loadable_icon_load_finish:
24341  * @icon: a #GLoadableIcon.
24342  * @res: a #GAsyncResult.
24343  * @type: a location to store the type of the loaded icon, %NULL to ignore.
24344  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24345  *
24346  * Finishes an asynchronous icon load started in g_loadable_icon_load_async().
24347  *
24348  * Returns: (transfer full): a #GInputStream to read the icon from.
24349  */
24350
24351
24352 /**
24353  * g_local_vfs_new:
24354  *
24355  * Returns a new #GVfs handle for a local vfs.
24356  *
24357  * Returns: a new #GVfs handle.
24358  */
24359
24360
24361 /**
24362  * g_main_destroy:
24363  * @loop: a #GMainLoop
24364  *
24365  * Frees the memory allocated for the #GMainLoop.
24366  *
24367  * Deprecated: 2.2: Use g_main_loop_unref() instead
24368  */
24369
24370
24371 /**
24372  * g_main_is_running:
24373  * @loop: a #GMainLoop
24374  *
24375  * Checks if the main loop is running.
24376  *
24377  * Returns: %TRUE if the main loop is running
24378  * Deprecated: 2.2: Use g_main_loop_is_running() instead
24379  */
24380
24381
24382 /**
24383  * g_main_iteration:
24384  * @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.
24385  *
24386  * Runs a single iteration for the default #GMainContext.
24387  *
24388  * Returns: %TRUE if more events are pending.
24389  * Deprecated: 2.2: Use g_main_context_iteration() instead.
24390  */
24391
24392
24393 /**
24394  * g_main_new:
24395  * @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.
24396  *
24397  * Creates a new #GMainLoop for th default main context.
24398  *
24399  * Returns: a new #GMainLoop
24400  * Deprecated: 2.2: Use g_main_loop_new() instead
24401  */
24402
24403
24404 /**
24405  * g_main_pending:
24406  *
24407  * Checks if any events are pending for the default #GMainContext
24408  * (i.e. ready to be processed).
24409  *
24410  * Returns: %TRUE if any events are pending.
24411  * Deprected: 2.2: Use g_main_context_pending() instead.
24412  */
24413
24414
24415 /**
24416  * g_main_quit:
24417  * @loop: a #GMainLoop
24418  *
24419  * Stops the #GMainLoop.
24420  * If g_main_run() was called to run the #GMainLoop, it will now return.
24421  *
24422  * Deprecated: 2.2: Use g_main_loop_quit() instead
24423  */
24424
24425
24426 /**
24427  * g_main_run:
24428  * @loop: a #GMainLoop
24429  *
24430  * Runs a main loop until it stops running.
24431  *
24432  * Deprecated: 2.2: Use g_main_loop_run() instead
24433  */
24434
24435
24436 /**
24437  * g_main_set_poll_func:
24438  * @func: the function to call to poll all file descriptors
24439  *
24440  * Sets the function to use for the handle polling of file descriptors
24441  * for the default main context.
24442  *
24443  * Deprecated: 2.2: Use g_main_context_set_poll_func() again
24444  */
24445
24446
24447 /**
24448  * g_memory_input_stream_add_data:
24449  * @stream: a #GMemoryInputStream
24450  * @data: (array length=len) (element-type guint8): input data
24451  * @len: length of the data, may be -1 if @data is a nul-terminated string
24452  * @destroy: (allow-none): function that is called to free @data, or %NULL
24453  *
24454  * Appends @data to data that can be read from the input stream
24455  */
24456
24457
24458 /**
24459  * g_memory_input_stream_new:
24460  *
24461  * Creates a new empty #GMemoryInputStream.
24462  *
24463  * Returns: a new #GInputStream
24464  */
24465
24466
24467 /**
24468  * g_memory_input_stream_new_from_data:
24469  * @data: (array length=len) (element-type guint8): input data
24470  * @len: length of the data, may be -1 if @data is a nul-terminated string
24471  * @destroy: (allow-none): function that is called to free @data, or %NULL
24472  *
24473  * Creates a new #GMemoryInputStream with data in memory of a given size.
24474  *
24475  * Returns: new #GInputStream read from @data of @len bytes.
24476  */
24477
24478
24479 /**
24480  * g_memory_output_stream_get_data:
24481  * @ostream: a #GMemoryOutputStream
24482  *
24483  * Gets any loaded data from the @ostream.
24484  * Note that the returned pointer may become invalid on the next
24485  * write or truncate operation on the stream.
24486  *
24487  * Returns: (transfer none): pointer to the stream's data
24488  */
24489
24490
24491 /**
24492  * g_memory_output_stream_get_data_size:
24493  * @ostream: a #GMemoryOutputStream
24494  *
24495  * Returns the number of bytes from the start up
24496  * to including the last byte written in the stream
24497  * that has not been truncated away.
24498  *
24499  * Returns: the number of bytes written to the stream
24500  * Since: 2.18
24501  */
24502
24503
24504 /**
24505  * g_memory_output_stream_get_size:
24506  * @ostream: a #GMemoryOutputStream
24507  *
24508  * Gets the size of the currently allocated data area (available from
24509  * g_memory_output_stream_get_data()). If the stream isn't
24510  * growable (no realloc was passed to g_memory_output_stream_new()) then
24511  * this is the maximum size of the stream and further writes
24512  * will return %G_IO_ERROR_NO_SPACE.
24513  * Note that for growable streams the returned size may become invalid on
24514  * the next write or truncate operation on the stream.
24515  * If you want the number of bytes currently written to the stream, use
24516  * g_memory_output_stream_get_data_size().
24517  *
24518  * Returns: the number of bytes allocated for the data buffer
24519  */
24520
24521
24522 /**
24523  * g_memory_output_stream_new: (skip)
24524  * @data: pointer to a chunk of memory to use, or %NULL
24525  * @size: the size of @data
24526  * @realloc_function: a function with realloc() semantics (like g_realloc()) to be called when @data needs to be grown, or %NULL
24527  * @destroy_function: a function to be called on @data when the stream is finalized, or %NULL
24528  *
24529  * Creates a new #GMemoryOutputStream.
24530  * If @data is non-%NULL, the stream  will use that for its internal storage.
24531  * If @realloc_fn is non-%NULL, it will be used for resizing the internal
24532  * storage when necessary. To construct a fixed-size output stream,
24533  * pass %NULL as @realloc_fn.
24534  * |[
24535  * /&ast; a stream that can grow &ast;/
24536  * stream = g_memory_output_stream_new (NULL, 0, realloc, free);
24537  * /&ast; another stream that can grow &ast;/
24538  * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
24539  * /&ast; a fixed-size stream &ast;/
24540  * data = malloc (200);
24541  * stream3 = g_memory_output_stream_new (data, 200, NULL, free);
24542  * ]|
24543  *
24544  * Returns: A newly created #GMemoryOutputStream object.
24545  */
24546
24547
24548 /**
24549  * g_memory_output_stream_steal_data:
24550  * @ostream: a #GMemoryOutputStream
24551  *
24552  * Gets any loaded data from the @ostream. Ownership of the data
24553  * is transferred to the caller; when no longer needed it must be
24554  * freed using the free function set in @ostream's
24555  * #GMemoryOutputStream:destroy-function property.
24556  *
24557  * Returns: (transfer full): the stream's data
24558  * Since: 2.26
24559  */
24560
24561
24562 /**
24563  * g_memory_settings_backend_new:
24564  *
24565  * Creates a memory-backed #GSettingsBackend.
24566  * This backend allows changes to settings, but does not write them
24567  * to any backing storage, so the next time you run your application,
24568  * the memory backend will start out with the default values again.
24569  *
24570  * Returns: (transfer full): a newly created #GSettingsBackend
24571  * Since: 2.28
24572  */
24573
24574
24575 /**
24576  * g_mount_can_eject:
24577  * @mount: a #GMount.
24578  *
24579  * Checks if @mount can be eject.
24580  *
24581  * Returns: %TRUE if the @mount can be ejected.
24582  */
24583
24584
24585 /**
24586  * g_mount_can_unmount:
24587  * @mount: a #GMount.
24588  *
24589  * Checks if @mount can be mounted.
24590  *
24591  * Returns: %TRUE if the @mount can be unmounted.
24592  */
24593
24594
24595 /**
24596  * g_mount_eject:
24597  * @mount: a #GMount.
24598  * @flags: flags affecting the unmount if required for eject
24599  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24600  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24601  * @user_data: user data passed to @callback.
24602  *
24603  * Ejects a mount. This is an asynchronous operation, and is
24604  * finished by calling g_mount_eject_finish() with the @mount
24605  * and #GAsyncResult data returned in the @callback.
24606  *
24607  * Deprecated: 2.22: Use g_mount_eject_with_operation() instead.
24608  */
24609
24610
24611 /**
24612  * g_mount_eject_finish:
24613  * @mount: a #GMount.
24614  * @result: a #GAsyncResult.
24615  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24616  *
24617  * Finishes ejecting a mount. If any errors occurred during the operation,
24618  *
24619  * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
24620  * Deprecated: 2.22: Use g_mount_eject_with_operation_finish() instead.
24621  */
24622
24623
24624 /**
24625  * g_mount_eject_with_operation:
24626  * @mount: a #GMount.
24627  * @flags: flags affecting the unmount if required for eject
24628  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24629  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24630  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24631  * @user_data: user data passed to @callback.
24632  *
24633  * Ejects a mount. This is an asynchronous operation, and is
24634  * finished by calling g_mount_eject_with_operation_finish() with the @mount
24635  * and #GAsyncResult data returned in the @callback.
24636  *
24637  * Since: 2.22
24638  */
24639
24640
24641 /**
24642  * g_mount_eject_with_operation_finish:
24643  * @mount: a #GMount.
24644  * @result: a #GAsyncResult.
24645  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24646  *
24647  * Finishes ejecting a mount. If any errors occurred during the operation,
24648  *
24649  * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
24650  * Since: 2.22
24651  */
24652
24653
24654 /**
24655  * g_mount_get_default_location:
24656  * @mount: a #GMount.
24657  *
24658  * Gets the default location of @mount. The default location of the given
24659  * the home directory, or the root of the volume).
24660  * The returned object should be unreffed with
24661  * g_object_unref() when no longer needed.
24662  *
24663  * Returns: (transfer full): a #GFile.
24664  */
24665
24666
24667 /**
24668  * g_mount_get_drive:
24669  * @mount: a #GMount.
24670  *
24671  * Gets the drive for the @mount.
24672  * This is a convenience method for getting the #GVolume and then
24673  * using that object to get the #GDrive.
24674  * The returned object should be unreffed with
24675  * g_object_unref() when no longer needed.
24676  *
24677  * Returns: (transfer full): a #GDrive or %NULL if @mount is not associated with a volume or a drive.
24678  */
24679
24680
24681 /**
24682  * g_mount_get_icon:
24683  * @mount: a #GMount.
24684  *
24685  * Gets the icon for @mount.
24686  * The returned object should be unreffed with
24687  * g_object_unref() when no longer needed.
24688  *
24689  * Returns: (transfer full): a #GIcon.
24690  */
24691
24692
24693 /**
24694  * g_mount_get_name:
24695  * @mount: a #GMount.
24696  *
24697  * Gets the name of @mount.
24698  * The returned string should be freed with g_free()
24699  * when no longer needed.
24700  *
24701  * Returns: the name for the given @mount.
24702  */
24703
24704
24705 /**
24706  * g_mount_get_root:
24707  * @mount: a #GMount.
24708  *
24709  * Gets the root directory on @mount.
24710  * The returned object should be unreffed with
24711  * g_object_unref() when no longer needed.
24712  *
24713  * Returns: (transfer full): a #GFile.
24714  */
24715
24716
24717 /**
24718  * g_mount_get_uuid:
24719  * @mount: a #GMount.
24720  *
24721  * Gets the UUID for the @mount. The reference is typically based on
24722  * the file system UUID for the mount in question and should be
24723  * considered an opaque string. Returns %NULL if there is no UUID
24724  * available.
24725  * The returned string should be freed with g_free()
24726  * when no longer needed.
24727  *
24728  * Returns: the UUID for @mount or %NULL if no UUID can be computed.
24729  */
24730
24731
24732 /**
24733  * g_mount_get_volume:
24734  * @mount: a #GMount.
24735  *
24736  * Gets the volume for the @mount.
24737  * The returned object should be unreffed with
24738  * g_object_unref() when no longer needed.
24739  *
24740  * Returns: (transfer full): a #GVolume or %NULL if @mount is not associated with a volume.
24741  */
24742
24743
24744 /**
24745  * g_mount_guess_content_type:
24746  * @mount: a #GMount
24747  * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
24748  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
24749  * @callback: a #GAsyncReadyCallback
24750  * @user_data: user data passed to @callback
24751  *
24752  * Tries to guess the type of content stored on @mount. Returns one or
24753  * more textual identifiers of well-known content types (typically
24754  * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
24755  * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
24756  * specification for more on x-content types.
24757  * This is an asynchronous operation (see
24758  * g_mount_guess_content_type_sync() for the synchronous version), and
24759  * is finished by calling g_mount_guess_content_type_finish() with the
24760  *
24761  * Since: 2.18
24762  */
24763
24764
24765 /**
24766  * g_mount_guess_content_type_finish:
24767  * @mount: a #GMount
24768  * @result: a #GAsyncResult
24769  * @error: a #GError location to store the error occuring, or %NULL to ignore
24770  *
24771  * Finishes guessing content types of @mount. If any errors occured
24772  * during the operation, @error will be set to contain the errors and
24773  * %FALSE will be returned. In particular, you may get an
24774  * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
24775  * guessing.
24776  * Caller should free this array with g_strfreev() when done with it.
24777  *
24778  * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
24779  * Since: 2.18
24780  */
24781
24782
24783 /**
24784  * g_mount_guess_content_type_sync:
24785  * @mount: a #GMount
24786  * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
24787  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
24788  * @error: a #GError location to store the error occuring, or %NULL to ignore
24789  *
24790  * Tries to guess the type of content stored on @mount. Returns one or
24791  * more textual identifiers of well-known content types (typically
24792  * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
24793  * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
24794  * specification for more on x-content types.
24795  * This is an synchronous operation and as such may block doing IO;
24796  * see g_mount_guess_content_type() for the asynchronous version.
24797  * Caller should free this array with g_strfreev() when done with it.
24798  *
24799  * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
24800  * Since: 2.18
24801  */
24802
24803
24804 /**
24805  * g_mount_is_shadowed:
24806  * @mount: A #GMount.
24807  *
24808  * Determines if @mount is shadowed. Applications or libraries should
24809  * avoid displaying @mount in the user interface if it is shadowed.
24810  * A mount is said to be shadowed if there exists one or more user
24811  * visible objects (currently #GMount objects) with a root that is
24812  * inside the root of @mount.
24813  * One application of shadow mounts is when exposing a single file
24814  * system that is used to address several logical volumes. In this
24815  * situation, a #GVolumeMonitor implementation would create two
24816  * #GVolume objects (for example, one for the camera functionality of
24817  * the device and one for a SD card reader on the device) with
24818  * activation URIs <literal>gphoto2://[usb:001,002]/store1/</literal>
24819  * and <literal>gphoto2://[usb:001,002]/store2/</literal>. When the
24820  * underlying mount (with root
24821  * <literal>gphoto2://[usb:001,002]/</literal>) is mounted, said
24822  * #GVolumeMonitor implementation would create two #GMount objects
24823  * (each with their root matching the corresponding volume activation
24824  * root) that would shadow the original mount.
24825  * The proxy monitor in GVfs 2.26 and later, automatically creates and
24826  * manage shadow mounts (and shadows the underlying mount) if the
24827  * activation root on a #GVolume is set.
24828  *
24829  * Returns: %TRUE if @mount is shadowed.
24830  * Since: 2.20
24831  */
24832
24833
24834 /**
24835  * g_mount_operation_get_anonymous:
24836  * @op: a #GMountOperation.
24837  *
24838  * Check to see whether the mount operation is being used
24839  * for an anonymous user.
24840  *
24841  * Returns: %TRUE if mount operation is anonymous.
24842  */
24843
24844
24845 /**
24846  * g_mount_operation_get_choice:
24847  * @op: a #GMountOperation.
24848  *
24849  * Gets a choice from the mount operation.
24850  * the choice's list, or %0.
24851  *
24852  * Returns: an integer containing an index of the user's choice from
24853  */
24854
24855
24856 /**
24857  * g_mount_operation_get_domain:
24858  * @op: a #GMountOperation.
24859  *
24860  * Gets the domain of the mount operation.
24861  *
24862  * Returns: a string set to the domain.
24863  */
24864
24865
24866 /**
24867  * g_mount_operation_get_password:
24868  * @op: a #GMountOperation.
24869  *
24870  * Gets a password from the mount operation.
24871  *
24872  * Returns: a string containing the password within @op.
24873  */
24874
24875
24876 /**
24877  * g_mount_operation_get_password_save:
24878  * @op: a #GMountOperation.
24879  *
24880  * Gets the state of saving passwords for the mount operation.
24881  *
24882  * Returns: a #GPasswordSave flag.
24883  */
24884
24885
24886 /**
24887  * g_mount_operation_get_username:
24888  * @op: a #GMountOperation.
24889  *
24890  * Get the user name from the mount operation.
24891  *
24892  * Returns: a string containing the user name.
24893  */
24894
24895
24896 /**
24897  * g_mount_operation_new:
24898  *
24899  * Creates a new mount operation.
24900  *
24901  * Returns: a #GMountOperation.
24902  */
24903
24904
24905 /**
24906  * g_mount_operation_reply:
24907  * @op: a #GMountOperation
24908  * @result: a #GMountOperationResult
24909  *
24910  * Emits the #GMountOperation::reply signal.
24911  */
24912
24913
24914 /**
24915  * g_mount_operation_set_anonymous:
24916  * @op: a #GMountOperation.
24917  * @anonymous: boolean value.
24918  *
24919  * Sets the mount operation to use an anonymous user if @anonymous is %TRUE.
24920  */
24921
24922
24923 /**
24924  * g_mount_operation_set_choice:
24925  * @op: a #GMountOperation.
24926  * @choice: an integer.
24927  *
24928  * Sets a default choice for the mount operation.
24929  */
24930
24931
24932 /**
24933  * g_mount_operation_set_domain:
24934  * @op: a #GMountOperation.
24935  * @domain: the domain to set.
24936  *
24937  * Sets the mount operation's domain.
24938  */
24939
24940
24941 /**
24942  * g_mount_operation_set_password:
24943  * @op: a #GMountOperation.
24944  * @password: password to set.
24945  *
24946  * Sets the mount operation's password to @password.
24947  */
24948
24949
24950 /**
24951  * g_mount_operation_set_password_save:
24952  * @op: a #GMountOperation.
24953  * @save: a set of #GPasswordSave flags.
24954  *
24955  * Sets the state of saving passwords for the mount operation.
24956  */
24957
24958
24959 /**
24960  * g_mount_operation_set_username:
24961  * @op: a #GMountOperation.
24962  * @username: input username.
24963  *
24964  * Sets the user name within @op to @username.
24965  */
24966
24967
24968 /**
24969  * g_mount_remount:
24970  * @mount: a #GMount.
24971  * @flags: flags affecting the operation
24972  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24973  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24974  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24975  * @user_data: user data passed to @callback.
24976  *
24977  * Remounts a mount. This is an asynchronous operation, and is
24978  * finished by calling g_mount_remount_finish() with the @mount
24979  * and #GAsyncResults data returned in the @callback.
24980  * Remounting is useful when some setting affecting the operation
24981  * of the volume has been changed, as these may need a remount to
24982  * take affect. While this is semantically equivalent with unmounting
24983  * and then remounting not all backends might need to actually be
24984  * unmounted.
24985  */
24986
24987
24988 /**
24989  * g_mount_remount_finish:
24990  * @mount: a #GMount.
24991  * @result: a #GAsyncResult.
24992  * @error: a #GError location to store the error occuring, or %NULL to ignore.
24993  *
24994  * Finishes remounting a mount. If any errors occurred during the operation,
24995  *
24996  * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise.
24997  */
24998
24999
25000 /**
25001  * g_mount_shadow:
25002  * @mount: A #GMount.
25003  *
25004  * Increments the shadow count on @mount. Usually used by
25005  * #GVolumeMonitor implementations when creating a shadow mount for
25006  * will need to emit the #GMount::changed signal on @mount manually.
25007  *
25008  * Since: 2.20
25009  */
25010
25011
25012 /**
25013  * g_mount_unmount:
25014  * @mount: a #GMount.
25015  * @flags: flags affecting the operation
25016  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25017  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
25018  * @user_data: user data passed to @callback.
25019  *
25020  * Unmounts a mount. This is an asynchronous operation, and is
25021  * finished by calling g_mount_unmount_finish() with the @mount
25022  * and #GAsyncResult data returned in the @callback.
25023  *
25024  * Deprecated: 2.22: Use g_mount_unmount_with_operation() instead.
25025  */
25026
25027
25028 /**
25029  * g_mount_unmount_finish:
25030  * @mount: a #GMount.
25031  * @result: a #GAsyncResult.
25032  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25033  *
25034  * Finishes unmounting a mount. If any errors occurred during the operation,
25035  *
25036  * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
25037  * Deprecated: 2.22: Use g_mount_unmount_with_operation_finish() instead.
25038  */
25039
25040
25041 /**
25042  * g_mount_unmount_with_operation:
25043  * @mount: a #GMount.
25044  * @flags: flags affecting the operation
25045  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
25046  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25047  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
25048  * @user_data: user data passed to @callback.
25049  *
25050  * Unmounts a mount. This is an asynchronous operation, and is
25051  * finished by calling g_mount_unmount_with_operation_finish() with the @mount
25052  * and #GAsyncResult data returned in the @callback.
25053  *
25054  * Since: 2.22
25055  */
25056
25057
25058 /**
25059  * g_mount_unmount_with_operation_finish:
25060  * @mount: a #GMount.
25061  * @result: a #GAsyncResult.
25062  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25063  *
25064  * Finishes unmounting a mount. If any errors occurred during the operation,
25065  *
25066  * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
25067  * Since: 2.22
25068  */
25069
25070
25071 /**
25072  * g_mount_unshadow:
25073  * @mount: A #GMount.
25074  *
25075  * Decrements the shadow count on @mount. Usually used by
25076  * #GVolumeMonitor implementations when destroying a shadow mount for
25077  * will need to emit the #GMount::changed signal on @mount manually.
25078  *
25079  * Since: 2.20
25080  */
25081
25082
25083 /**
25084  * g_network_address_get_hostname:
25085  * @addr: a #GNetworkAddress
25086  *
25087  * Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded,
25088  * depending on what @addr was created with.
25089  *
25090  * Returns: @addr's hostname
25091  * Since: 2.22
25092  */
25093
25094
25095 /**
25096  * g_network_address_get_port:
25097  * @addr: a #GNetworkAddress
25098  *
25099  * Gets @addr's port number
25100  *
25101  * Returns: @addr's port (which may be 0)
25102  * Since: 2.22
25103  */
25104
25105
25106 /**
25107  * g_network_address_get_scheme:
25108  * @addr: a #GNetworkAddress
25109  *
25110  * Gets @addr's scheme
25111  *
25112  * Returns: @addr's scheme (%NULL if not built from URI)
25113  * Since: 2.26
25114  */
25115
25116
25117 /**
25118  * g_network_address_new:
25119  * @hostname: the hostname
25120  * @port: the port
25121  *
25122  * Creates a new #GSocketConnectable for connecting to the given
25123  *
25124  * Returns: (transfer full): the new #GNetworkAddress
25125  * Since: 2.22
25126  */
25127
25128
25129 /**
25130  * g_network_address_parse:
25131  * @host_and_port: the hostname and optionally a port
25132  * @default_port: the default port if not in @host_and_port
25133  * @error: a pointer to a #GError, or %NULL
25134  *
25135  * Creates a new #GSocketConnectable for connecting to the given
25136  * parsing @host_and_port fails.
25137  * address, an IPv4 address, or a domain name (in which case a DNS
25138  * lookup is performed). Quoting with [] is supported for all address
25139  * types. A port override may be specified in the usual way with a
25140  * colon. Ports may be given as decimal numbers or symbolic names (in
25141  * which case an /etc/services lookup is performed).
25142  * If no port is specified in @host_and_port then @default_port will be
25143  * used as the port number to connect to.
25144  * In general, @host_and_port is expected to be provided by the user
25145  * (allowing them to give the hostname, and a port overide if necessary)
25146  * and @default_port is expected to be provided by the application.
25147  *
25148  * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
25149  * Since: 2.22
25150  */
25151
25152
25153 /**
25154  * g_network_address_parse_uri:
25155  * @uri: the hostname and optionally a port
25156  * @default_port: The default port if none is found in the URI
25157  * @error: a pointer to a #GError, or %NULL
25158  *
25159  * Creates a new #GSocketConnectable for connecting to the given
25160  * Using this rather than g_network_address_new() or
25161  * g_network_address_parse_host() allows #GSocketClient to determine
25162  * when to use application-specific proxy protocols.
25163  *
25164  * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
25165  * Since: 2.26
25166  */
25167
25168
25169 /**
25170  * g_network_service_get_domain:
25171  * @srv: a #GNetworkService
25172  *
25173  * Gets the domain that @srv serves. This might be either UTF-8 or
25174  * ASCII-encoded, depending on what @srv was created with.
25175  *
25176  * Returns: @srv's domain name
25177  * Since: 2.22
25178  */
25179
25180
25181 /**
25182  * g_network_service_get_protocol:
25183  * @srv: a #GNetworkService
25184  *
25185  * Gets @srv's protocol name (eg, "tcp").
25186  *
25187  * Returns: @srv's protocol name
25188  * Since: 2.22
25189  */
25190
25191
25192 /**
25193  * g_network_service_get_scheme:
25194  * @srv: a #GNetworkService
25195  *
25196  * Get's the URI scheme used to resolve proxies. By default, the service name
25197  * is used as scheme.
25198  *
25199  * Returns: @srv's scheme name
25200  * Since: 2.26
25201  */
25202
25203
25204 /**
25205  * g_network_service_get_service:
25206  * @srv: a #GNetworkService
25207  *
25208  * Gets @srv's service name (eg, "ldap").
25209  *
25210  * Returns: @srv's service name
25211  * Since: 2.22
25212  */
25213
25214
25215 /**
25216  * g_network_service_new:
25217  * @service: the service type to look up (eg, "ldap")
25218  * @protocol: the networking protocol to use for @service (eg, "tcp")
25219  * @domain: the DNS domain to look up the service in
25220  *
25221  * Creates a new #GNetworkService representing the given @service,
25222  * #GSocketConnectable interface to resolve it.
25223  *
25224  * Returns: (transfer full): a new #GNetworkService
25225  * Since: 2.22
25226  */
25227
25228
25229 /**
25230  * g_network_service_set_scheme:
25231  * @srv: a #GNetworkService
25232  * @scheme: a URI scheme
25233  *
25234  * Set's the URI scheme used to resolve proxies. By default, the service name
25235  * is used as scheme.
25236  *
25237  * Since: 2.26
25238  */
25239
25240
25241 /**
25242  * g_new:
25243  * @struct_type: the type of the elements to allocate
25244  * @n_structs: the number of elements to allocate
25245  *
25246  * Allocates @n_structs elements of type @struct_type.
25247  * The returned pointer is cast to a pointer to the given type.
25248  * If @n_structs is 0 it returns %NULL.
25249  * Care is taken to avoid overflow when calculating the size of the allocated block.
25250  * Since the returned pointer is already casted to the right type,
25251  * it is normally unnecessary to cast it explicitly, and doing
25252  * so might hide memory allocation errors.
25253  *
25254  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
25255  */
25256
25257
25258 /**
25259  * g_new0:
25260  * @struct_type: the type of the elements to allocate.
25261  * @n_structs: the number of elements to allocate.
25262  *
25263  * Allocates @n_structs elements of type @struct_type, initialized to 0's.
25264  * The returned pointer is cast to a pointer to the given type.
25265  * If @n_structs is 0 it returns %NULL.
25266  * Care is taken to avoid overflow when calculating the size of the allocated block.
25267  * Since the returned pointer is already casted to the right type,
25268  * it is normally unnecessary to cast it explicitly, and doing
25269  * so might hide memory allocation errors.
25270  *
25271  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
25272  */
25273
25274
25275 /**
25276  * g_newa:
25277  * @struct_type: Type of memory chunks to be allocated
25278  * @n_structs: Number of chunks to be allocated
25279  *
25280  * Wraps g_alloca() in a more typesafe manner.
25281  *
25282  * Returns: Pointer to stack space for @n_structs chunks of type @struct_type
25283  */
25284
25285
25286 /**
25287  * g_node_append:
25288  * @parent: the #GNode to place the new #GNode under
25289  * @node: the #GNode to insert
25290  *
25291  * Inserts a #GNode as the last child of the given parent.
25292  *
25293  * Returns: the inserted #GNode
25294  */
25295
25296
25297 /**
25298  * g_node_append_data:
25299  * @parent: the #GNode to place the new #GNode under
25300  * @data: the data for the new #GNode
25301  *
25302  * Inserts a new #GNode as the last child of the given parent.
25303  *
25304  * Returns: the new #GNode
25305  */
25306
25307
25308 /**
25309  * g_node_first_child:
25310  * @node: a #GNode
25311  *
25312  * Gets the first child of a #GNode.
25313  * or has no children
25314  *
25315  * Returns: the first child of @node, or %NULL if @node is %NULL
25316  */
25317
25318
25319 /**
25320  * g_node_insert_data:
25321  * @parent: the #GNode to place the new #GNode under
25322  * @position: the position to place the new #GNode at. If position is -1, the new #GNode is inserted as the last child of @parent
25323  * @data: the data for the new #GNode
25324  *
25325  * Inserts a new #GNode at the given position.
25326  *
25327  * Returns: the new #GNode
25328  */
25329
25330
25331 /**
25332  * g_node_insert_data_before:
25333  * @parent: the #GNode to place the new #GNode under
25334  * @sibling: the sibling #GNode to place the new #GNode before
25335  * @data: the data for the new #GNode
25336  *
25337  * Inserts a new #GNode before the given sibling.
25338  *
25339  * Returns: the new #GNode
25340  */
25341
25342
25343 /**
25344  * g_node_next_sibling:
25345  * @node: a #GNode
25346  *
25347  * Gets the next sibling of a #GNode.
25348  * or %NULL
25349  *
25350  * Returns: the next sibling of @node, or %NULL if @node is the last node
25351  */
25352
25353
25354 /**
25355  * g_node_prepend_data:
25356  * @parent: the #GNode to place the new #GNode under
25357  * @data: the data for the new #GNode
25358  *
25359  * Inserts a new #GNode as the first child of the given parent.
25360  *
25361  * Returns: the new #GNode
25362  */
25363
25364
25365 /**
25366  * g_node_prev_sibling:
25367  * @node: a #GNode
25368  *
25369  * Gets the previous sibling of a #GNode.
25370  * node or %NULL
25371  *
25372  * Returns: the previous sibling of @node, or %NULL if @node is the first
25373  */
25374
25375
25376 /**
25377  * g_null_settings_backend_new:
25378  *
25379  * Creates a readonly #GSettingsBackend.
25380  * This backend does not allow changes to settings, so all settings
25381  * will always have their default values.
25382  *
25383  * Returns: (transfer full): a newly created #GSettingsBackend
25384  * Since: 2.28
25385  */
25386
25387
25388 /**
25389  * g_output_stream_clear_pending:
25390  * @stream: output stream
25391  *
25392  * Clears the pending flag on @stream.
25393  */
25394
25395
25396 /**
25397  * g_output_stream_close:
25398  * @stream: A #GOutputStream.
25399  * @cancellable: (allow-none): optional cancellable object
25400  * @error: location to store the error occuring, or %NULL to ignore
25401  *
25402  * Closes the stream, releasing resources related to it.
25403  * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
25404  * Closing a stream multiple times will not return an error.
25405  * Closing a stream will automatically flush any outstanding buffers in the
25406  * stream.
25407  * Streams will be automatically closed when the last reference
25408  * is dropped, but you might want to call this function to make sure
25409  * resources are released as early as possible.
25410  * Some streams might keep the backing store of the stream (e.g. a file descriptor)
25411  * open after the stream is closed. See the documentation for the individual
25412  * stream for details.
25413  * On failure the first error that happened will be reported, but the close
25414  * operation will finish as much as possible. A stream that failed to
25415  * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
25416  * is important to check and report the error to the user, otherwise
25417  * there might be a loss of data as all data might not be written.
25418  * If @cancellable is not NULL, then the operation can be cancelled by
25419  * triggering the cancellable object from another thread. If the operation
25420  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25421  * Cancelling a close will still leave the stream closed, but there some streams
25422  * can use a faster close that doesn't block to e.g. check errors. On
25423  * cancellation (as with any error) there is no guarantee that all written
25424  * data will reach the target.
25425  *
25426  * Returns: %TRUE on success, %FALSE on failure
25427  */
25428
25429
25430 /**
25431  * g_output_stream_close_async:
25432  * @stream: A #GOutputStream.
25433  * @io_priority: the io priority of the request.
25434  * @cancellable: (allow-none): optional cancellable object
25435  * @callback: (scope async): callback to call when the request is satisfied
25436  * @user_data: (closure): the data to pass to callback function
25437  *
25438  * Requests an asynchronous close of the stream, releasing resources
25439  * related to it. When the operation is finished @callback will be
25440  * called. You can then call g_output_stream_close_finish() to get
25441  * the result of the operation.
25442  * For behaviour details see g_output_stream_close().
25443  * The asyncronous methods have a default fallback that uses threads
25444  * to implement asynchronicity, so they are optional for inheriting
25445  * classes. However, if you override one you must override all.
25446  */
25447
25448
25449 /**
25450  * g_output_stream_close_finish:
25451  * @stream: a #GOutputStream.
25452  * @result: a #GAsyncResult.
25453  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25454  *
25455  * Closes an output stream.
25456  *
25457  * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
25458  */
25459
25460
25461 /**
25462  * g_output_stream_flush:
25463  * @stream: a #GOutputStream.
25464  * @cancellable: (allow-none): optional cancellable object
25465  * @error: location to store the error occuring, or %NULL to ignore
25466  *
25467  * Flushed any outstanding buffers in the stream. Will block during
25468  * the operation. Closing the stream will implicitly cause a flush.
25469  * This function is optional for inherited classes.
25470  * If @cancellable is not %NULL, then the operation can be cancelled by
25471  * triggering the cancellable object from another thread. If the operation
25472  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25473  *
25474  * Returns: %TRUE on success, %FALSE on error
25475  */
25476
25477
25478 /**
25479  * g_output_stream_flush_async:
25480  * @stream: a #GOutputStream.
25481  * @io_priority: the io priority of the request.
25482  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25483  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25484  * @user_data: (closure): the data to pass to callback function
25485  *
25486  * Flushes a stream asynchronously.
25487  * For behaviour details see g_output_stream_flush().
25488  * When the operation is finished @callback will be
25489  * called. You can then call g_output_stream_flush_finish() to get the
25490  * result of the operation.
25491  */
25492
25493
25494 /**
25495  * g_output_stream_flush_finish:
25496  * @stream: a #GOutputStream.
25497  * @result: a GAsyncResult.
25498  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25499  *
25500  * Finishes flushing an output stream.
25501  *
25502  * Returns: %TRUE if flush operation suceeded, %FALSE otherwise.
25503  */
25504
25505
25506 /**
25507  * g_output_stream_has_pending:
25508  * @stream: a #GOutputStream.
25509  *
25510  * Checks if an ouput stream has pending actions.
25511  *
25512  * Returns: %TRUE if @stream has pending actions.
25513  */
25514
25515
25516 /**
25517  * g_output_stream_is_closed:
25518  * @stream: a #GOutputStream.
25519  *
25520  * Checks if an output stream has already been closed.
25521  *
25522  * Returns: %TRUE if @stream is closed. %FALSE otherwise.
25523  */
25524
25525
25526 /**
25527  * g_output_stream_is_closing:
25528  * @stream: a #GOutputStream.
25529  *
25530  * Checks if an output stream is being closed. This can be
25531  * used inside e.g. a flush implementation to see if the
25532  * flush (or other i/o operation) is called from within
25533  * the closing operation.
25534  *
25535  * Returns: %TRUE if @stream is being closed. %FALSE otherwise.
25536  * Since: 2.24
25537  */
25538
25539
25540 /**
25541  * g_output_stream_set_pending:
25542  * @stream: a #GOutputStream.
25543  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25544  *
25545  * Sets @stream to have actions pending. If the pending flag is
25546  * already set or @stream is closed, it will return %FALSE and set
25547  *
25548  * Returns: %TRUE if pending was previously unset and is now set.
25549  */
25550
25551
25552 /**
25553  * g_output_stream_splice:
25554  * @stream: a #GOutputStream.
25555  * @source: a #GInputStream.
25556  * @flags: a set of #GOutputStreamSpliceFlags.
25557  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25558  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25559  *
25560  * Splices an input stream into an output stream.
25561  * -1 if an error occurred.
25562  *
25563  * Returns: a #gssize containing the size of the data spliced, or
25564  */
25565
25566
25567 /**
25568  * g_output_stream_splice_async:
25569  * @stream: a #GOutputStream.
25570  * @source: a #GInputStream.
25571  * @flags: a set of #GOutputStreamSpliceFlags.
25572  * @io_priority: the io priority of the request.
25573  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25574  * @callback: (scope async): a #GAsyncReadyCallback.
25575  * @user_data: (closure): user data passed to @callback.
25576  *
25577  * Splices a stream asynchronously.
25578  * When the operation is finished @callback will be called.
25579  * You can then call g_output_stream_splice_finish() to get the
25580  * result of the operation.
25581  * For the synchronous, blocking version of this function, see
25582  * g_output_stream_splice().
25583  */
25584
25585
25586 /**
25587  * g_output_stream_splice_finish:
25588  * @stream: a #GOutputStream.
25589  * @result: a #GAsyncResult.
25590  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25591  *
25592  * Finishes an asynchronous stream splice operation.
25593  *
25594  * Returns: a #gssize of the number of bytes spliced.
25595  */
25596
25597
25598 /**
25599  * g_output_stream_write:
25600  * @stream: a #GOutputStream.
25601  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
25602  * @count: the number of bytes to write
25603  * @cancellable: (allow-none): optional cancellable object
25604  * @error: location to store the error occuring, or %NULL to ignore
25605  *
25606  * Tries to write @count bytes from @buffer into the stream. Will block
25607  * during the operation.
25608  * If count is 0, returns 0 and does nothing. A value of @count
25609  * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
25610  * On success, the number of bytes written to the stream is returned.
25611  * It is not an error if this is not the same as the requested size, as it
25612  * can happen e.g. on a partial I/O error, or if there is not enough
25613  * storage in the stream. All writes block until at least one byte
25614  * is written or an error occurs; 0 is never returned (unless
25615  * If @cancellable is not NULL, then the operation can be cancelled by
25616  * triggering the cancellable object from another thread. If the operation
25617  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
25618  * operation was partially finished when the operation was cancelled the
25619  * partial result will be returned, without an error.
25620  * On error -1 is returned and @error is set accordingly.
25621  *
25622  * Returns: Number of bytes written, or -1 on error
25623  */
25624
25625
25626 /**
25627  * g_output_stream_write_all:
25628  * @stream: a #GOutputStream.
25629  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
25630  * @count: the number of bytes to write
25631  * @bytes_written: (out): location to store the number of bytes that was written to the stream
25632  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25633  * @error: location to store the error occuring, or %NULL to ignore
25634  *
25635  * Tries to write @count bytes from @buffer into the stream. Will block
25636  * during the operation.
25637  * This function is similar to g_output_stream_write(), except it tries to
25638  * write as many bytes as requested, only stopping on an error.
25639  * On a successful write of @count bytes, %TRUE is returned, and @bytes_written
25640  * is set to @count.
25641  * If there is an error during the operation FALSE is returned and @error
25642  * is set to indicate the error status, @bytes_written is updated to contain
25643  * the number of bytes written into the stream before the error occurred.
25644  *
25645  * Returns: %TRUE on success, %FALSE if there was an error
25646  */
25647
25648
25649 /**
25650  * g_output_stream_write_async:
25651  * @stream: A #GOutputStream.
25652  * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
25653  * @count: the number of bytes to write
25654  * @io_priority: the io priority of the request.
25655  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25656  * @callback: (scope async): callback to call when the request is satisfied
25657  * @user_data: (closure): the data to pass to callback function
25658  *
25659  * Request an asynchronous write of @count bytes from @buffer into
25660  * the stream. When the operation is finished @callback will be called.
25661  * You can then call g_output_stream_write_finish() to get the result of the
25662  * operation.
25663  * During an async request no other sync and async calls are allowed,
25664  * and will result in %G_IO_ERROR_PENDING errors.
25665  * A value of @count larger than %G_MAXSSIZE will cause a
25666  * %G_IO_ERROR_INVALID_ARGUMENT error.
25667  * On success, the number of bytes written will be passed to the
25668  * requested size, as it can happen e.g. on a partial I/O error,
25669  * but generally we try to write as many bytes as requested.
25670  * You are guaranteed that this method will never fail with
25671  * %G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the
25672  * method will just wait until this changes.
25673  * Any outstanding I/O request with higher priority (lower numerical
25674  * value) will be executed before an outstanding request with lower
25675  * priority. Default priority is %G_PRIORITY_DEFAULT.
25676  * The asyncronous methods have a default fallback that uses threads
25677  * to implement asynchronicity, so they are optional for inheriting
25678  * classes. However, if you override one you must override all.
25679  * For the synchronous, blocking version of this function, see
25680  * g_output_stream_write().
25681  */
25682
25683
25684 /**
25685  * g_output_stream_write_finish:
25686  * @stream: a #GOutputStream.
25687  * @result: a #GAsyncResult.
25688  * @error: a #GError location to store the error occuring, or %NULL to ignore.
25689  *
25690  * Finishes a stream write operation.
25691  *
25692  * Returns: a #gssize containing the number of bytes written to the stream.
25693  */
25694
25695
25696 /**
25697  * g_permission_acquire:
25698  * @permission: a #GPermission instance
25699  * @cancellable: a #GCancellable, or %NULL
25700  * @error: a pointer to a %NULL #GError, or %NULL
25701  * @returns: %TRUE if the permission was successfully acquired
25702  *
25703  * Attempts to acquire the permission represented by @permission.
25704  * The precise method by which this happens depends on the permission
25705  * and the underlying authentication mechanism.  A simple example is
25706  * that a dialog may appear asking the user to enter their password.
25707  * You should check with g_permission_get_can_acquire() before calling
25708  * this function.
25709  * If the permission is acquired then %TRUE is returned.  Otherwise,
25710  * %FALSE is returned and @error is set appropriately.
25711  * This call is blocking, likely for a very long time (in the case that
25712  * user interaction is required).  See g_permission_acquire_async() for
25713  * the non-blocking version.
25714  *
25715  * Since: 2.26
25716  */
25717
25718
25719 /**
25720  * g_permission_acquire_async:
25721  * @permission: a #GPermission instance
25722  * @cancellable: a #GCancellable, or %NULL
25723  * @callback: the #GAsyncReadyCallback to call when done
25724  * @user_data: the user data to pass to @callback
25725  *
25726  * Attempts to acquire the permission represented by @permission.
25727  * This is the first half of the asynchronous version of
25728  * g_permission_acquire().
25729  *
25730  * Since: 2.26
25731  */
25732
25733
25734 /**
25735  * g_permission_acquire_finish:
25736  * @permission: a #GPermission instance
25737  * @result: the #GAsyncResult given to the #GAsyncReadyCallback
25738  * @error: a pointer to a %NULL #GError, or %NULL
25739  * @returns: %TRUE if the permission was successfully acquired
25740  *
25741  * Collects the result of attempting to acquire the permission
25742  * represented by @permission.
25743  * This is the second half of the asynchronous version of
25744  * g_permission_acquire().
25745  *
25746  * Since: 2.26
25747  */
25748
25749
25750 /**
25751  * g_permission_get_allowed:
25752  * @permission: a #GPermission instance
25753  * @returns: the value of the 'allowed' property
25754  *
25755  * Gets the value of the 'allowed' property.  This property is %TRUE if
25756  * the caller currently has permission to perform the action that
25757  *
25758  * Since: 2.26
25759  */
25760
25761
25762 /**
25763  * g_permission_get_can_acquire:
25764  * @permission: a #GPermission instance
25765  * @returns: the value of the 'can-acquire' property
25766  *
25767  * Gets the value of the 'can-acquire' property.  This property is %TRUE
25768  * if it is generally possible to acquire the permission by calling
25769  * g_permission_acquire().
25770  *
25771  * Since: 2.26
25772  */
25773
25774
25775 /**
25776  * g_permission_get_can_release:
25777  * @permission: a #GPermission instance
25778  * @returns: the value of the 'can-release' property
25779  *
25780  * Gets the value of the 'can-release' property.  This property is %TRUE
25781  * if it is generally possible to release the permission by calling
25782  * g_permission_release().
25783  *
25784  * Since: 2.26
25785  */
25786
25787
25788 /**
25789  * g_permission_impl_update:
25790  * @permission: a #GPermission instance
25791  * @allowed: the new value for the 'allowed' property
25792  * @can_acquire: the new value for the 'can-acquire' property
25793  * @can_release: the new value for the 'can-release' property
25794  *
25795  * This function is called by the #GPermission implementation to update
25796  * the properties of the permission.  You should never call this
25797  * function except from a #GPermission implementation.
25798  * GObject notify signals are generated, as appropriate.
25799  *
25800  * Since: 2.26
25801  */
25802
25803
25804 /**
25805  * g_permission_release:
25806  * @permission: a #GPermission instance
25807  * @cancellable: a #GCancellable, or %NULL
25808  * @error: a pointer to a %NULL #GError, or %NULL
25809  * @returns: %TRUE if the permission was successfully released
25810  *
25811  * Attempts to release the permission represented by @permission.
25812  * The precise method by which this happens depends on the permission
25813  * and the underlying authentication mechanism.  In most cases the
25814  * permission will be dropped immediately without further action.
25815  * You should check with g_permission_get_can_release() before calling
25816  * this function.
25817  * If the permission is released then %TRUE is returned.  Otherwise,
25818  * %FALSE is returned and @error is set appropriately.
25819  * This call is blocking, likely for a very long time (in the case that
25820  * user interaction is required).  See g_permission_release_async() for
25821  * the non-blocking version.
25822  *
25823  * Since: 2.26
25824  */
25825
25826
25827 /**
25828  * g_permission_release_async:
25829  * @permission: a #GPermission instance
25830  * @cancellable: a #GCancellable, or %NULL
25831  * @callback: the #GAsyncReadyCallback to call when done
25832  * @user_data: the user data to pass to @callback
25833  *
25834  * Attempts to release the permission represented by @permission.
25835  * This is the first half of the asynchronous version of
25836  * g_permission_release().
25837  *
25838  * Since: 2.26
25839  */
25840
25841
25842 /**
25843  * g_permission_release_finish:
25844  * @permission: a #GPermission instance
25845  * @result: the #GAsyncResult given to the #GAsyncReadyCallback
25846  * @error: a pointer to a %NULL #GError, or %NULL
25847  * @returns: %TRUE if the permission was successfully released
25848  *
25849  * Collects the result of attempting to release the permission
25850  * represented by @permission.
25851  * This is the second half of the asynchronous version of
25852  * g_permission_release().
25853  *
25854  * Since: 2.26
25855  */
25856
25857
25858 /**
25859  * g_poll_file_monitor_new:
25860  * @file: a #GFile.
25861  *
25862  * Polls @file for changes.
25863  *
25864  * Returns: a new #GFileMonitor for the given #GFile.
25865  */
25866
25867
25868 /**
25869  * g_pollable_input_stream_can_poll:
25870  * @stream: a #GPollableInputStream.
25871  *
25872  * Checks if @stream is actually pollable. Some classes may implement
25873  * #GPollableInputStream but have only certain instances of that class
25874  * be pollable. If this method returns %FALSE, then the behavior of
25875  * other #GPollableInputStream methods is undefined.
25876  * For any given stream, the value returned by this method is constant;
25877  * a stream cannot switch from pollable to non-pollable or vice versa.
25878  *
25879  * Returns: %TRUE if @stream is pollable, %FALSE if not.
25880  * Since: 2.28
25881  */
25882
25883
25884 /**
25885  * g_pollable_input_stream_create_source: (skip)
25886  * @stream: a #GPollableInputStream.
25887  * @cancellable: (allow-none): a #GCancellable, or %NULL
25888  *
25889  * Creates a #GSource that triggers when @stream can be read, or
25890  * source is of the #GPollableSourceFunc type.
25891  * As with g_pollable_input_stream_is_readable(), it is possible that
25892  * the stream may not actually be readable even after the source
25893  * triggers, so you should use g_pollable_input_stream_read_nonblocking()
25894  * rather than g_input_stream_read() from the callback.
25895  *
25896  * Returns: (transfer full): a new #GSource
25897  * Since: 2.28
25898  */
25899
25900
25901 /**
25902  * g_pollable_input_stream_is_readable:
25903  * @stream: a #GPollableInputStream.
25904  *
25905  * Checks if @stream can be read.
25906  * Note that some stream types may not be able to implement this 100%
25907  * reliably, and it is possible that a call to g_input_stream_read()
25908  * after this returns %TRUE would still block. To guarantee
25909  * non-blocking behavior, you should always use
25910  * g_pollable_input_stream_read_nonblocking(), which will return a
25911  * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
25912  * has occurred on @stream, this will result in
25913  * g_pollable_input_stream_is_readable() returning %TRUE, and the
25914  * next attempt to read will return the error.
25915  *
25916  * Returns: %TRUE if @stream is readable, %FALSE if not. If an error
25917  * Since: 2.28
25918  */
25919
25920
25921 /**
25922  * g_pollable_input_stream_read_nonblocking:
25923  * @stream: a #GPollableInputStream
25924  * @buffer: a buffer to read data into (which should be at least @size bytes long).
25925  * @size: the number of bytes you want to read
25926  * @cancellable: (allow-none): a #GCancellable, or %NULL
25927  * @error: #GError for error reporting, or %NULL to ignore.
25928  *
25929  * Attempts to read up to @size bytes from @stream into @buffer, as
25930  * with g_input_stream_read(). If @stream is not currently readable,
25931  * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
25932  * use g_pollable_input_stream_create_source() to create a #GSource
25933  * that will be triggered when @stream is readable.
25934  * Note that since this method never blocks, you cannot actually
25935  * use @cancellable to cancel it. However, it will return an error
25936  * if @cancellable has already been cancelled when you call, which
25937  * may happen if you call this method after a source triggers due
25938  * to having been cancelled.
25939  * %G_IO_ERROR_WOULD_BLOCK).
25940  *
25941  * Virtual: read_nonblocking
25942  * Returns: the number of bytes read, or -1 on error (including
25943  */
25944
25945
25946 /**
25947  * g_pollable_output_stream_can_poll:
25948  * @stream: a #GPollableOutputStream.
25949  *
25950  * Checks if @stream is actually pollable. Some classes may implement
25951  * #GPollableOutputStream but have only certain instances of that
25952  * class be pollable. If this method returns %FALSE, then the behavior
25953  * of other #GPollableOutputStream methods is undefined.
25954  * For any given stream, the value returned by this method is constant;
25955  * a stream cannot switch from pollable to non-pollable or vice versa.
25956  *
25957  * Returns: %TRUE if @stream is pollable, %FALSE if not.
25958  * Since: 2.28
25959  */
25960
25961
25962 /**
25963  * g_pollable_output_stream_create_source: (skip)
25964  * @stream: a #GPollableOutputStream.
25965  * @cancellable: (allow-none): a #GCancellable, or %NULL
25966  *
25967  * Creates a #GSource that triggers when @stream can be written, or
25968  * source is of the #GPollableSourceFunc type.
25969  * As with g_pollable_output_stream_is_writable(), it is possible that
25970  * the stream may not actually be writable even after the source
25971  * triggers, so you should use g_pollable_output_stream_write_nonblocking()
25972  * rather than g_output_stream_write() from the callback.
25973  *
25974  * Returns: (transfer full): a new #GSource
25975  * Since: 2.28
25976  */
25977
25978
25979 /**
25980  * g_pollable_output_stream_is_writable:
25981  * @stream: a #GPollableOutputStream.
25982  *
25983  * Checks if @stream can be written.
25984  * Note that some stream types may not be able to implement this 100%
25985  * reliably, and it is possible that a call to g_output_stream_write()
25986  * after this returns %TRUE would still block. To guarantee
25987  * non-blocking behavior, you should always use
25988  * g_pollable_output_stream_write_nonblocking(), which will return a
25989  * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
25990  * has occurred on @stream, this will result in
25991  * g_pollable_output_stream_is_writable() returning %TRUE, and the
25992  * next attempt to write will return the error.
25993  *
25994  * Returns: %TRUE if @stream is writable, %FALSE if not. If an error
25995  * Since: 2.28
25996  */
25997
25998
25999 /**
26000  * g_pollable_output_stream_write_nonblocking:
26001  * @stream: a #GPollableOutputStream
26002  * @buffer: (array length=size) (element-type guint8): a buffer to write data from
26003  * @size: the number of bytes you want to write
26004  * @cancellable: (allow-none): a #GCancellable, or %NULL
26005  * @error: #GError for error reporting, or %NULL to ignore.
26006  *
26007  * Attempts to write up to @size bytes from @buffer to @stream, as
26008  * with g_output_stream_write(). If @stream is not currently writable,
26009  * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
26010  * use g_pollable_output_stream_create_source() to create a #GSource
26011  * that will be triggered when @stream is writable.
26012  * Note that since this method never blocks, you cannot actually
26013  * use @cancellable to cancel it. However, it will return an error
26014  * if @cancellable has already been cancelled when you call, which
26015  * may happen if you call this method after a source triggers due
26016  * to having been cancelled.
26017  * %G_IO_ERROR_WOULD_BLOCK).
26018  *
26019  * Virtual: write_nonblocking
26020  * Returns: the number of bytes written, or -1 on error (including
26021  */
26022
26023
26024 /**
26025  * g_pollable_source_new: (skip)
26026  * @pollable_stream: the stream associated with the new source
26027  *
26028  * Utility method for #GPollableInputStream and #GPollableOutputStream
26029  * implementations. Creates a new #GSource that expects a callback of
26030  * type #GPollableSourceFunc. The new source does not actually do
26031  * anything on its own; use g_source_add_child_source() to add other
26032  * sources to it to cause it to trigger.
26033  *
26034  * Returns: (transfer full): the new #GSource.
26035  * Since: 2.28
26036  */
26037
26038
26039 /**
26040  * g_proxy_address_get_destination_hostname:
26041  * @proxy: a #GProxyAddress
26042  *
26043  * Gets @proxy's destination hostname.
26044  *
26045  * Returns: the @proxy's destination hostname
26046  * Since: 2.26
26047  */
26048
26049
26050 /**
26051  * g_proxy_address_get_destination_port:
26052  * @proxy: a #GProxyAddress
26053  *
26054  * Gets @proxy's destination port.
26055  *
26056  * Returns: the @proxy's destination port
26057  * Since: 2.26
26058  */
26059
26060
26061 /**
26062  * g_proxy_address_get_password:
26063  * @proxy: a #GProxyAddress
26064  *
26065  * Gets @proxy's password.
26066  *
26067  * Returns: the @proxy's password
26068  * Since: 2.26
26069  */
26070
26071
26072 /**
26073  * g_proxy_address_get_protocol:
26074  * @proxy: a #GProxyAddress
26075  *
26076  * Gets @proxy's protocol.
26077  *
26078  * Returns: the @proxy's protocol
26079  * Since: 2.26
26080  */
26081
26082
26083 /**
26084  * g_proxy_address_get_username:
26085  * @proxy: a #GProxyAddress
26086  *
26087  * Gets @proxy's username.
26088  *
26089  * Returns: the @proxy's username
26090  * Since: 2.26
26091  */
26092
26093
26094 /**
26095  * g_proxy_address_new:
26096  * @inetaddr: The proxy server #GInetAddress.
26097  * @port: The proxy server port.
26098  * @protocol: The proxy protocol to support, in lower case (e.g. socks, http).
26099  * @dest_hostname: The destination hostname the the proxy should tunnel to.
26100  * @dest_port: The destination port to tunnel to.
26101  * @username: (allow-none): The username to authenticate to the proxy server (or %NULL).
26102  * @password: (allow-none): The password to authenticate to the proxy server (or %NULL).
26103  *
26104  * Creates a new #GProxyAddress for @inetaddr with @protocol that should
26105  * tunnel through @dest_hostname and @dest_port.
26106  *
26107  * Returns: a new #GProxyAddress
26108  * Since: 2.26
26109  */
26110
26111
26112 /**
26113  * g_proxy_connect:
26114  * @proxy: a #GProxy
26115  * @connection: a #GIOStream
26116  * @proxy_address: a #GProxyAddress
26117  * @cancellable: (allow-none): a #GCancellable
26118  * @error: return #GError
26119  *
26120  * Given @connection to communicate with a proxy (eg, a
26121  * #GSocketConnection that is connected to the proxy server), this
26122  * does the necessary handshake to connect to @proxy_address, and if
26123  * required, wraps the #GIOStream to handle proxy payload.
26124  * be the same as @connection, in which case a reference
26125  * will be added.
26126  *
26127  * Returns: (transfer full): a #GIOStream that will replace @connection. This might
26128  * Since: 2.26
26129  */
26130
26131
26132 /**
26133  * g_proxy_connect_async:
26134  * @proxy: a #GProxy
26135  * @connection: a #GIOStream
26136  * @proxy_address: a #GProxyAddress
26137  * @cancellable: (allow-none): a #GCancellable
26138  * @callback: (scope async): a #GAsyncReadyCallback
26139  * @user_data: (closure): callback data
26140  *
26141  * Asynchronous version of g_proxy_connect().
26142  *
26143  * Since: 2.26
26144  */
26145
26146
26147 /**
26148  * g_proxy_connect_finish:
26149  * @proxy: a #GProxy
26150  * @result: a #GAsyncRetult
26151  * @error: return #GError
26152  *
26153  * See g_proxy_connect().
26154  *
26155  * Returns: (transfer full): a #GIOStream.
26156  * Since: 2.26
26157  */
26158
26159
26160 /**
26161  * g_proxy_get_default_for_protocol:
26162  * @protocol: the proxy protocol name (e.g. http, socks, etc)
26163  *
26164  * Lookup "gio-proxy" extension point for a proxy implementation that supports
26165  * specified protocol.
26166  * is not supported.
26167  *
26168  * Returns: (transfer full): return a #GProxy or NULL if protocol
26169  * Since: 2.26
26170  */
26171
26172
26173 /**
26174  * g_proxy_resolver_get_default:
26175  *
26176  * Gets the default #GProxyResolver for the system.
26177  *
26178  * Returns: (transfer none): the default #GProxyResolver.
26179  * Since: 2.26
26180  */
26181
26182
26183 /**
26184  * g_proxy_resolver_is_supported:
26185  * @resolver: a #GProxyResolver
26186  *
26187  * Checks if @resolver can be used on this system. (This is used
26188  * internally; g_proxy_resolver_get_default() will only return a proxy
26189  * resolver that returns %TRUE for this method.)
26190  *
26191  * Returns: %TRUE if @resolver is supported.
26192  * Since: 2.26
26193  */
26194
26195
26196 /**
26197  * g_proxy_resolver_lookup:
26198  * @resolver: a #GProxyResolver
26199  * @uri: a URI representing the destination to connect to
26200  * @cancellable: (allow-none): a #GCancellable, or %NULL
26201  * @error: return location for a #GError, or %NULL
26202  *
26203  * Looks into the system proxy configuration to determine what proxy,
26204  * if any, to use to connect to @uri. The returned proxy URIs are of the
26205  * form <literal>&lt;protocol&gt;://[user[:password]@]host:port</literal>
26206  * or <literal>direct://</literal>, where &lt;protocol&gt; could be
26207  * http, rtsp, socks or other proxying protocol.
26208  * If you don't know what network protocol is being used on the
26209  * socket, you should use <literal>none</literal> as the URI protocol.
26210  * In this case, the resolver might still return a generic proxy type
26211  * (such as SOCKS), but would not return protocol-specific proxy types
26212  * (such as http).
26213  * <literal>direct://</literal> is used when no proxy is needed.
26214  * Direct connection should not be attempted unless it is part of the
26215  * returned array of proxies.
26216  * NULL-terminated array of proxy URIs. Must be freed
26217  * with g_strfreev().
26218  *
26219  * Returns: (transfer full) (array zero-terminated=1): A
26220  * Since: 2.26
26221  */
26222
26223
26224 /**
26225  * g_proxy_resolver_lookup_async:
26226  * @resolver: a #GProxyResolver
26227  * @uri: a URI representing the destination to connect to
26228  * @cancellable: (allow-none): a #GCancellable, or %NULL
26229  * @callback: (scope async): callback to call after resolution completes
26230  * @user_data: (closure): data for @callback
26231  *
26232  * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
26233  * details.
26234  *
26235  * Since: 2.26
26236  */
26237
26238
26239 /**
26240  * g_proxy_resolver_lookup_finish:
26241  * @resolver: a #GProxyResolver
26242  * @result: the result passed to your #GAsyncReadyCallback
26243  * @error: return location for a #GError, or %NULL
26244  *
26245  * Call this function to obtain the array of proxy URIs when
26246  * g_proxy_resolver_lookup_async() is complete. See
26247  * g_proxy_resolver_lookup() for more details.
26248  * NULL-terminated array of proxy URIs. Must be freed
26249  * with g_strfreev().
26250  *
26251  * Returns: (transfer full) (array zero-terminated=1): A
26252  * Since: 2.26
26253  */
26254
26255
26256 /**
26257  * g_proxy_supports_hostname:
26258  * @proxy: a #GProxy
26259  *
26260  * Some proxy protocols expect to be passed a hostname, which they
26261  * will resolve to an IP address themselves. Others, like SOCKS4, do
26262  * not allow this. This function will return %FALSE if @proxy is
26263  * implementing such a protocol. When %FALSE is returned, the caller
26264  * should resolve the destination hostname first, and then pass a
26265  * #GProxyAddress containing the stringified IP address to
26266  * g_proxy_connect() or g_proxy_connect_async().
26267  *
26268  * Returns: %TRUE if hostname resolution is supported.
26269  * Since: 2.26
26270  */
26271
26272
26273 /**
26274  * g_renew:
26275  * @struct_type: the type of the elements to allocate
26276  * @mem: the currently allocated memory
26277  * @n_structs: the number of elements to allocate
26278  *
26279  * Reallocates the memory pointed to by @mem, so that it now has space for
26280  * the memory, which may have been moved.
26281  * Care is taken to avoid overflow when calculating the size of the allocated block.
26282  *
26283  * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
26284  */
26285
26286
26287 /**
26288  * g_resolver_error_quark:
26289  *
26290  * Gets the #GResolver Error Quark.
26291  *
26292  * Returns: a #GQuark.
26293  * Since: 2.22
26294  */
26295
26296
26297 /**
26298  * g_resolver_free_addresses: (skip)
26299  * @addresses: a #GList of #GInetAddress
26300  *
26301  * Frees @addresses (which should be the return value from
26302  * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()).
26303  * (This is a convenience method; you can also simply free the results
26304  * by hand.)
26305  *
26306  * Since: 2.22
26307  */
26308
26309
26310 /**
26311  * g_resolver_free_targets: (skip)
26312  * @targets: a #GList of #GSrvTarget
26313  *
26314  * Frees @targets (which should be the return value from
26315  * g_resolver_lookup_service() or g_resolver_lookup_service_finish()).
26316  * (This is a convenience method; you can also simply free the
26317  * results by hand.)
26318  *
26319  * Since: 2.22
26320  */
26321
26322
26323 /**
26324  * g_resolver_get_default:
26325  *
26326  * Gets the default #GResolver. You should unref it when you are done
26327  * with it. #GResolver may use its reference count as a hint about how
26328  * many threads/processes, etc it should allocate for concurrent DNS
26329  * resolutions.
26330  *
26331  * Returns: (transfer full): the default #GResolver.
26332  * Since: 2.22
26333  */
26334
26335
26336 /**
26337  * g_resolver_lookup_by_address:
26338  * @resolver: a #GResolver
26339  * @address: the address to reverse-resolve
26340  * @cancellable: (allow-none): a #GCancellable, or %NULL
26341  * @error: return location for a #GError, or %NULL
26342  *
26343  * Synchronously reverse-resolves @address to determine its
26344  * associated hostname.
26345  * If the DNS resolution fails, @error (if non-%NULL) will be set to
26346  * a value from #GResolverError.
26347  * If @cancellable is non-%NULL, it can be used to cancel the
26348  * operation, in which case @error (if non-%NULL) will be set to
26349  * %G_IO_ERROR_CANCELLED.
26350  * form), or %NULL on error.
26351  *
26352  * Returns: a hostname (either ASCII-only, or in ASCII-encoded
26353  * Since: 2.22
26354  */
26355
26356
26357 /**
26358  * g_resolver_lookup_by_address_async:
26359  * @resolver: a #GResolver
26360  * @address: the address to reverse-resolve
26361  * @cancellable: (allow-none): a #GCancellable, or %NULL
26362  * @callback: (scope async): callback to call after resolution completes
26363  * @user_data: (closure): data for @callback
26364  *
26365  * Begins asynchronously reverse-resolving @address to determine its
26366  * associated hostname, and eventually calls @callback, which must
26367  * call g_resolver_lookup_by_address_finish() to get the final result.
26368  *
26369  * Since: 2.22
26370  */
26371
26372
26373 /**
26374  * g_resolver_lookup_by_address_finish:
26375  * @resolver: a #GResolver
26376  * @result: the result passed to your #GAsyncReadyCallback
26377  * @error: return location for a #GError, or %NULL
26378  *
26379  * Retrieves the result of a previous call to
26380  * g_resolver_lookup_by_address_async().
26381  * If the DNS resolution failed, @error (if non-%NULL) will be set to
26382  * a value from #GResolverError. If the operation was cancelled,
26383  * form), or %NULL on error.
26384  *
26385  * Returns: a hostname (either ASCII-only, or in ASCII-encoded
26386  * Since: 2.22
26387  */
26388
26389
26390 /**
26391  * g_resolver_lookup_by_name:
26392  * @resolver: a #GResolver
26393  * @hostname: the hostname to look up
26394  * @cancellable: (allow-none): a #GCancellable, or %NULL
26395  * @error: return location for a #GError, or %NULL
26396  *
26397  * Synchronously resolves @hostname to determine its associated IP
26398  * address(es). @hostname may be an ASCII-only or UTF-8 hostname, or
26399  * the textual form of an IP address (in which case this just becomes
26400  * a wrapper around g_inet_address_new_from_string()).
26401  * On success, g_resolver_lookup_by_name() will return a #GList of
26402  * #GInetAddress, sorted in order of preference. (That is, you should
26403  * attempt to connect to the first address first, then the second if
26404  * the first fails, etc.)
26405  * If the DNS resolution fails, @error (if non-%NULL) will be set to a
26406  * value from #GResolverError.
26407  * If @cancellable is non-%NULL, it can be used to cancel the
26408  * operation, in which case @error (if non-%NULL) will be set to
26409  * %G_IO_ERROR_CANCELLED.
26410  * If you are planning to connect to a socket on the resolved IP
26411  * address, it may be easier to create a #GNetworkAddress and use its
26412  * #GSocketConnectable interface.
26413  * of #GInetAddress, or %NULL on error. You
26414  * must unref each of the addresses and free the list when you are
26415  * done with it. (You can use g_resolver_free_addresses() to do this.)
26416  *
26417  * Returns: (element-type GInetAddress) (transfer full): a #GList
26418  * Since: 2.22
26419  */
26420
26421
26422 /**
26423  * g_resolver_lookup_by_name_async:
26424  * @resolver: a #GResolver
26425  * @hostname: the hostname to look up the address of
26426  * @cancellable: (allow-none): a #GCancellable, or %NULL
26427  * @callback: (scope async): callback to call after resolution completes
26428  * @user_data: (closure): data for @callback
26429  *
26430  * Begins asynchronously resolving @hostname to determine its
26431  * associated IP address(es), and eventually calls @callback, which
26432  * must call g_resolver_lookup_by_name_finish() to get the result.
26433  * See g_resolver_lookup_by_name() for more details.
26434  *
26435  * Since: 2.22
26436  */
26437
26438
26439 /**
26440  * g_resolver_lookup_by_name_finish:
26441  * @resolver: a #GResolver
26442  * @result: the result passed to your #GAsyncReadyCallback
26443  * @error: return location for a #GError, or %NULL
26444  *
26445  * Retrieves the result of a call to
26446  * g_resolver_lookup_by_name_async().
26447  * If the DNS resolution failed, @error (if non-%NULL) will be set to
26448  * a value from #GResolverError. If the operation was cancelled,
26449  * of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name()
26450  * for more details.
26451  *
26452  * Returns: (element-type GInetAddress) (transfer full): a #GList
26453  * Since: 2.22
26454  */
26455
26456
26457 /**
26458  * g_resolver_lookup_service:
26459  * @resolver: a #GResolver
26460  * @service: the service type to look up (eg, "ldap")
26461  * @protocol: the networking protocol to use for @service (eg, "tcp")
26462  * @domain: the DNS domain to look up the service in
26463  * @cancellable: (allow-none): a #GCancellable, or %NULL
26464  * @error: return location for a #GError, or %NULL
26465  *
26466  * Synchronously performs a DNS SRV lookup for the given @service and
26467  * include the leading underscore that appears in the actual DNS
26468  * entry.
26469  * On success, g_resolver_lookup_service() will return a #GList of
26470  * #GSrvTarget, sorted in order of preference. (That is, you should
26471  * attempt to connect to the first target first, then the second if
26472  * the first fails, etc.)
26473  * If the DNS resolution fails, @error (if non-%NULL) will be set to
26474  * a value from #GResolverError.
26475  * If @cancellable is non-%NULL, it can be used to cancel the
26476  * operation, in which case @error (if non-%NULL) will be set to
26477  * %G_IO_ERROR_CANCELLED.
26478  * If you are planning to connect to the service, it is usually easier
26479  * to create a #GNetworkService and use its #GSocketConnectable
26480  * interface.
26481  * or %NULL on error. You must free each of the targets and the list when you are
26482  * done with it. (You can use g_resolver_free_targets() to do this.)
26483  *
26484  * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
26485  * Since: 2.22
26486  */
26487
26488
26489 /**
26490  * g_resolver_lookup_service_async:
26491  * @resolver: a #GResolver
26492  * @service: the service type to look up (eg, "ldap")
26493  * @protocol: the networking protocol to use for @service (eg, "tcp")
26494  * @domain: the DNS domain to look up the service in
26495  * @cancellable: (allow-none): a #GCancellable, or %NULL
26496  * @callback: (scope async): callback to call after resolution completes
26497  * @user_data: (closure): data for @callback
26498  *
26499  * Begins asynchronously performing a DNS SRV lookup for the given
26500  * get the final result. See g_resolver_lookup_service() for more
26501  * details.
26502  *
26503  * Since: 2.22
26504  */
26505
26506
26507 /**
26508  * g_resolver_lookup_service_finish:
26509  * @resolver: a #GResolver
26510  * @result: the result passed to your #GAsyncReadyCallback
26511  * @error: return location for a #GError, or %NULL
26512  *
26513  * Retrieves the result of a previous call to
26514  * g_resolver_lookup_service_async().
26515  * If the DNS resolution failed, @error (if non-%NULL) will be set to
26516  * a value from #GResolverError. If the operation was cancelled,
26517  * or %NULL on error. See g_resolver_lookup_service() for more details.
26518  *
26519  * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
26520  * Since: 2.22
26521  */
26522
26523
26524 /**
26525  * g_resolver_set_default:
26526  * @resolver: the new default #GResolver
26527  *
26528  * Sets @resolver to be the application's default resolver (reffing
26529  * Future calls to g_resolver_get_default() will return this resolver.
26530  * This can be used if an application wants to perform any sort of DNS
26531  * caching or "pinning"; it can implement its own #GResolver that
26532  * calls the original default resolver for DNS operations, and
26533  * implements its own cache policies on top of that, and then set
26534  * itself as the default resolver for all later code to use.
26535  *
26536  * Since: 2.22
26537  */
26538
26539
26540 /**
26541  * g_seekable_can_seek:
26542  * @seekable: a #GSeekable.
26543  *
26544  * Tests if the stream supports the #GSeekableIface.
26545  *
26546  * Returns: %TRUE if @seekable can be seeked. %FALSE otherwise.
26547  */
26548
26549
26550 /**
26551  * g_seekable_can_truncate:
26552  * @seekable: a #GSeekable.
26553  *
26554  * Tests if the stream can be truncated.
26555  *
26556  * Returns: %TRUE if the stream can be truncated, %FALSE otherwise.
26557  */
26558
26559
26560 /**
26561  * g_seekable_seek:
26562  * @seekable: a #GSeekable.
26563  * @offset: a #goffset.
26564  * @type: a #GSeekType.
26565  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26566  * @error: a #GError location to store the error occuring, or %NULL to ignore.
26567  *
26568  * Seeks in the stream by the given @offset, modified by @type.
26569  * If @cancellable is not %NULL, then the operation can be cancelled by
26570  * triggering the cancellable object from another thread. If the operation
26571  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26572  * has occurred, this function will return %FALSE and set @error
26573  * appropriately if present.
26574  *
26575  * Returns: %TRUE if successful. If an error
26576  */
26577
26578
26579 /**
26580  * g_seekable_tell:
26581  * @seekable: a #GSeekable.
26582  *
26583  * Tells the current position within the stream.
26584  *
26585  * Returns: the offset from the beginning of the buffer.
26586  */
26587
26588
26589 /**
26590  * g_seekable_truncate:
26591  * @seekable: a #GSeekable.
26592  * @offset: a #goffset.
26593  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26594  * @error: a #GError location to store the error occuring, or %NULL to ignore.
26595  *
26596  * Truncates a stream with a given #offset.
26597  * If @cancellable is not %NULL, then the operation can be cancelled by
26598  * triggering the cancellable object from another thread. If the operation
26599  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
26600  * operation was partially finished when the operation was cancelled the
26601  * partial result will be returned, without an error.
26602  * has occurred, this function will return %FALSE and set @error
26603  * appropriately if present.
26604  *
26605  * Virtual: truncate_fn
26606  * Returns: %TRUE if successful. If an error
26607  */
26608
26609
26610 /**
26611  * g_settings_apply:
26612  * @settings: a #GSettings instance
26613  *
26614  * Applies any changes that have been made to the settings.  This
26615  * function does nothing unless @settings is in 'delay-apply' mode;
26616  * see g_settings_delay().  In the normal case settings are always
26617  * applied immediately.
26618  */
26619
26620
26621 /**
26622  * g_settings_backend_changed:
26623  * @backend: a #GSettingsBackend implementation
26624  * @key: the name of the key
26625  * @origin_tag: the origin tag
26626  *
26627  * Signals that a single key has possibly changed.  Backend
26628  * implementations should call this if a key has possibly changed its
26629  * value.
26630  * '//', and not ending with a slash).
26631  * The implementation must call this function during any call to
26632  * g_settings_backend_write(), before the call returns (except in the
26633  * case that no keys are actually changed and it cares to detect this
26634  * fact).  It may not rely on the existence of a mainloop for
26635  * dispatching the signal later.
26636  * The implementation may call this function at any other time it likes
26637  * in response to other events (such as changes occuring outside of the
26638  * program).  These calls may originate from a mainloop or may originate
26639  * in response to any other action (including from calls to
26640  * g_settings_backend_write()).
26641  * In the case that this call is in response to a call to
26642  * g_settings_backend_write() then @origin_tag must be set to the same
26643  * value that was passed to that call.
26644  *
26645  * Since: 2.26
26646  */
26647
26648
26649 /**
26650  * g_settings_backend_changed_tree:
26651  * @backend: a #GSettingsBackend implementation
26652  * @tree: a #GTree containing the changes
26653  * @origin_tag: the origin tag
26654  *
26655  * This call is a convenience wrapper.  It gets the list of changes from
26656  * g_settings_backend_changed().
26657  *
26658  * Since: 2.26
26659  */
26660
26661
26662 /**
26663  * g_settings_backend_flatten_tree:
26664  * @tree: a #GTree containing the changes
26665  * @path: (out): the location to save the path
26666  * @keys: (out) (transfer container) (array zero-terminated=1): the location to save the relative keys
26667  * @values: (out) (allow-none) (transfer container) (array zero-terminated=1):  the location to save the values, or %NULL
26668  *
26669  * Calculate the longest common prefix of all keys in a tree and write
26670  * out an array of the key names relative to that prefix and,
26671  * optionally, the value to store at each of those keys.
26672  * You must free the value returned in @path, @keys and @values using
26673  * g_free().  You should not attempt to free or unref the contents of
26674  *
26675  * Since: 2.26
26676  */
26677
26678
26679 /**
26680  * g_settings_backend_get_default:
26681  * @returns: (transfer full): the default #GSettingsBackend
26682  *
26683  * Returns the default #GSettingsBackend. It is possible to override
26684  * the default by setting the <envar>GSETTINGS_BACKEND</envar>
26685  * environment variable to the name of a settings backend.
26686  * The user gets a reference to the backend.
26687  *
26688  * Since: 2.28
26689  */
26690
26691
26692 /**
26693  * g_settings_backend_keys_changed:
26694  * @backend: a #GSettingsBackend implementation
26695  * @path: the path containing the changes
26696  * @items: (array zero-terminated=1): the %NULL-terminated list of changed keys
26697  * @origin_tag: the origin tag
26698  *
26699  * Signals that a list of keys have possibly changed.  Backend
26700  * implementations should call this if keys have possibly changed their
26701  * values.
26702  * not containing '//').  Each string in @items must form a valid key
26703  * end with '/' and must not contain '//').
26704  * The meaning of this signal is that any of the key names resulting
26705  * from the contatenation of @path with each item in @items may have
26706  * changed.
26707  * The same rules for when notifications must occur apply as per
26708  * g_settings_backend_changed().  These two calls can be used
26709  * interchangeably if exactly one item has changed (although in that
26710  * case g_settings_backend_changed() is definitely preferred).
26711  * For efficiency reasons, the implementation should strive for @path to
26712  * keys that were changed) but this is not strictly required.
26713  *
26714  * Name when @path is prefixed to it (ie: each item must not start or
26715  * Be as long as possible (ie: the longest common prefix of all of the
26716  * Since: 2.26
26717  */
26718
26719
26720 /**
26721  * g_settings_backend_path_changed:
26722  * @backend: a #GSettingsBackend implementation
26723  * @path: the path containing the changes
26724  * @origin_tag: the origin tag
26725  *
26726  * Signals that all keys below a given path may have possibly changed.
26727  * Backend implementations should call this if an entire path of keys
26728  * have possibly changed their values.
26729  * not containing '//').
26730  * The meaning of this signal is that any of the key which has a name
26731  * starting with @path may have changed.
26732  * The same rules for when notifications must occur apply as per
26733  * g_settings_backend_changed().  This call might be an appropriate
26734  * reasponse to a 'reset' call but implementations are also free to
26735  * explicitly list the keys that were affected by that call if they can
26736  * easily do so.
26737  * For efficiency reasons, the implementation should strive for @path to
26738  * keys that were changed) but this is not strictly required.  As an
26739  * example, if this function is called with the path of "/" then every
26740  * single key in the application will be notified of a possible change.
26741  *
26742  * Be as long as possible (ie: the longest common prefix of all of the
26743  * Since: 2.26
26744  */
26745
26746
26747 /**
26748  * g_settings_backend_path_writable_changed:
26749  * @backend: a #GSettingsBackend implementation
26750  * @path: the name of the path
26751  *
26752  * Signals that the writability of all keys below a given path may have
26753  * changed.
26754  * Since GSettings performs no locking operations for itself, this call
26755  * will always be made in response to external events.
26756  *
26757  * Since: 2.26
26758  */
26759
26760
26761 /**
26762  * g_settings_backend_writable_changed:
26763  * @backend: a #GSettingsBackend implementation
26764  * @key: the name of the key
26765  *
26766  * Signals that the writability of a single key has possibly changed.
26767  * Since GSettings performs no locking operations for itself, this call
26768  * will always be made in response to external events.
26769  *
26770  * Since: 2.26
26771  */
26772
26773
26774 /**
26775  * g_settings_bind:
26776  * @settings: a #GSettings object
26777  * @key: the key to bind
26778  * @object: (type GObject.Object): a #GObject
26779  * @property: the name of the property to bind
26780  * @flags: flags for the binding
26781  *
26782  * Create a binding between the @key in the @settings object
26783  * and the property @property of @object.
26784  * The binding uses the default GIO mapping functions to map
26785  * between the settings and property values. These functions
26786  * handle booleans, numeric types and string types in a
26787  * straightforward way. Use g_settings_bind_with_mapping() if
26788  * you need a custom mapping, or map between types that are not
26789  * supported by the default mapping functions.
26790  * Unless the @flags include %G_SETTINGS_BIND_NO_SENSITIVITY, this
26791  * function also establishes a binding between the writability of
26792  * a boolean property by that name). See g_settings_bind_writable()
26793  * for more details about writable bindings.
26794  * Note that the lifecycle of the binding is tied to the object,
26795  * and that you can have only one binding per object property.
26796  * If you bind the same property twice on the same object, the second
26797  * binding overrides the first one.
26798  *
26799  * Since: 2.26
26800  */
26801
26802
26803 /**
26804  * g_settings_bind_with_mapping: (skip)
26805  * @settings: a #GSettings object
26806  * @key: the key to bind
26807  * @object: (type GObject.Object): a #GObject
26808  * @property: the name of the property to bind
26809  * @flags: flags for the binding
26810  * @get_mapping: a function that gets called to convert values from @settings to @object, or %NULL to use the default GIO mapping
26811  * @set_mapping: a function that gets called to convert values from @object to @settings, or %NULL to use the default GIO mapping
26812  * @user_data: data that gets passed to @get_mapping and @set_mapping
26813  * @destroy: #GDestroyNotify function for @user_data
26814  *
26815  * Create a binding between the @key in the @settings object
26816  * and the property @property of @object.
26817  * The binding uses the provided mapping functions to map between
26818  * settings and property values.
26819  * Note that the lifecycle of the binding is tied to the object,
26820  * and that you can have only one binding per object property.
26821  * If you bind the same property twice on the same object, the second
26822  * binding overrides the first one.
26823  *
26824  * Since: 2.26
26825  */
26826
26827
26828 /**
26829  * g_settings_bind_writable:
26830  * @settings: a #GSettings object
26831  * @key: the key to bind
26832  * @object: (type GObject.Object): a #GObject
26833  * @property: the name of a boolean property to bind
26834  * @inverted: whether to 'invert' the value
26835  *
26836  * Create a binding between the writability of @key in the
26837  * The property must be boolean; "sensitive" or "visible"
26838  * properties of widgets are the most likely candidates.
26839  * Writable bindings are always uni-directional; changes of the
26840  * writability of the setting will be propagated to the object
26841  * property, not the other way.
26842  * When the @inverted argument is %TRUE, the binding inverts the
26843  * value as it passes from the setting to the object, i.e. @property
26844  * will be set to %TRUE if the key is <emphasis>not</emphasis>
26845  * writable.
26846  * Note that the lifecycle of the binding is tied to the object,
26847  * and that you can have only one binding per object property.
26848  * If you bind the same property twice on the same object, the second
26849  * binding overrides the first one.
26850  *
26851  * Since: 2.26
26852  */
26853
26854
26855 /**
26856  * g_settings_delay:
26857  * @settings: a #GSettings object
26858  *
26859  * Changes the #GSettings object into 'delay-apply' mode. In this
26860  * mode, changes to @settings are not immediately propagated to the
26861  * backend, but kept locally until g_settings_apply() is called.
26862  *
26863  * Since: 2.26
26864  */
26865
26866
26867 /**
26868  * g_settings_get:
26869  * @settings: a #GSettings object
26870  * @key: the key to get the value for
26871  * @format: a #GVariant format string
26872  * @...: arguments as per @format
26873  *
26874  * Gets the value that is stored at @key in @settings.
26875  * A convenience function that combines g_settings_get_value() with
26876  * g_variant_get().
26877  * It is a programmer error to give a @key that isn't contained in the
26878  * schema for @settings or for the #GVariantType of @format to mismatch
26879  * the type given in the schema.
26880  *
26881  * Since: 2.26
26882  */
26883
26884
26885 /**
26886  * g_settings_get_boolean:
26887  * @settings: a #GSettings object
26888  * @key: the key to get the value for
26889  * @returns: a boolean
26890  *
26891  * Gets the value that is stored at @key in @settings.
26892  * A convenience variant of g_settings_get() for booleans.
26893  * It is a programmer error to give a @key that isn't specified as
26894  * having a boolean type in the schema for @settings.
26895  *
26896  * Since: 2.26
26897  */
26898
26899
26900 /**
26901  * g_settings_get_child:
26902  * @settings: a #GSettings object
26903  * @name: the name of the 'child' schema
26904  * @returns: (transfer full): a 'child' settings object
26905  *
26906  * Creates a 'child' settings object which has a base path of
26907  * <replaceable>base-path</replaceable>/@name, where
26908  * <replaceable>base-path</replaceable> is the base path of @settings.
26909  * The schema for the child settings object must have been declared
26910  * in the schema of @settings using a <tag class="starttag">child</tag> element.
26911  *
26912  * Since: 2.26
26913  */
26914
26915
26916 /**
26917  * g_settings_get_double:
26918  * @settings: a #GSettings object
26919  * @key: the key to get the value for
26920  * @returns: a double
26921  *
26922  * Gets the value that is stored at @key in @settings.
26923  * A convenience variant of g_settings_get() for doubles.
26924  * It is a programmer error to give a @key that isn't specified as
26925  * having a 'double' type in the schema for @settings.
26926  *
26927  * Since: 2.26
26928  */
26929
26930
26931 /**
26932  * g_settings_get_enum:
26933  * @settings: a #GSettings object
26934  * @key: the key to get the value for
26935  * @returns: the enum value
26936  *
26937  * Gets the value that is stored in @settings for @key and converts it
26938  * to the enum value that it represents.
26939  * In order to use this function the type of the value must be a string
26940  * and it must be marked in the schema file as an enumerated type.
26941  * It is a programmer error to give a @key that isn't contained in the
26942  * schema for @settings or is not marked as an enumerated type.
26943  * If the value stored in the configuration database is not a valid
26944  * value for the enumerated type then this function will return the
26945  * default value.
26946  *
26947  * Since: 2.26
26948  */
26949
26950
26951 /**
26952  * g_settings_get_flags:
26953  * @settings: a #GSettings object
26954  * @key: the key to get the value for
26955  * @returns: the flags value
26956  *
26957  * Gets the value that is stored in @settings for @key and converts it
26958  * to the flags value that it represents.
26959  * In order to use this function the type of the value must be an array
26960  * of strings and it must be marked in the schema file as an flags type.
26961  * It is a programmer error to give a @key that isn't contained in the
26962  * schema for @settings or is not marked as a flags type.
26963  * If the value stored in the configuration database is not a valid
26964  * value for the flags type then this function will return the default
26965  * value.
26966  *
26967  * Since: 2.26
26968  */
26969
26970
26971 /**
26972  * g_settings_get_has_unapplied:
26973  * @settings: a #GSettings object
26974  * @returns: %TRUE if @settings has unapplied changes
26975  *
26976  * Returns whether the #GSettings object has any unapplied
26977  * changes.  This can only be the case if it is in 'delayed-apply' mode.
26978  *
26979  * Since: 2.26
26980  */
26981
26982
26983 /**
26984  * g_settings_get_int:
26985  * @settings: a #GSettings object
26986  * @key: the key to get the value for
26987  * @returns: an integer
26988  *
26989  * Gets the value that is stored at @key in @settings.
26990  * A convenience variant of g_settings_get() for 32-bit integers.
26991  * It is a programmer error to give a @key that isn't specified as
26992  * having a int32 type in the schema for @settings.
26993  *
26994  * Since: 2.26
26995  */
26996
26997
26998 /**
26999  * g_settings_get_mapped:
27000  * @settings: a #GSettings object
27001  * @key: the key to get the value for
27002  * @mapping: (scope call): the function to map the value in the settings database to the value used by the application
27003  * @user_data: user data for @mapping
27004  * @returns: (transfer full): the result, which may be %NULL
27005  *
27006  * Gets the value that is stored at @key in @settings, subject to
27007  * application-level validation/mapping.
27008  * You should use this function when the application needs to perform
27009  * some processing on the value of the key (for example, parsing).  The
27010  * indicates that the processing was unsuccessful (due to a parse error,
27011  * for example) then the mapping is tried again with another value.
27012  * This allows a robust 'fall back to defaults' behaviour to be
27013  * implemented somewhat automatically.
27014  * The first value that is tried is the user's setting for the key.  If
27015  * the mapping function fails to map this value, other values may be
27016  * tried in an unspecified order (system or site defaults, translated
27017  * schema default values, untranslated schema default values, etc).
27018  * If the mapping function fails for all possible values, one additional
27019  * If the mapping function still indicates failure at this point then
27020  * the application will be aborted.
27021  * The result parameter for the @mapping function is pointed to a
27022  * #gpointer which is initially set to %NULL.  The same pointer is given
27023  * to each invocation of @mapping.  The final value of that #gpointer is
27024  * what is returned by this function.  %NULL is valid; it is returned
27025  * just as any other value would be.
27026  *
27027  * Attempt is made: the mapping function is called with a %NULL value.
27028  */
27029
27030
27031 /**
27032  * g_settings_get_range:
27033  * @settings: a #GSettings
27034  * @key: the key to query the range of
27035  * @returns: a #GVariant describing the range
27036  *
27037  * Queries the range of a key.
27038  * This function will return a #GVariant that fully describes the range
27039  * of values that are valid for @key.
27040  * The type of #GVariant returned is <literal>(sv)</literal>.  The
27041  * string describes the type of range restriction in effect.  The type
27042  * and meaning of the value contained in the variant depends on the
27043  * string.
27044  * If the string is <literal>'type'</literal> then the variant contains
27045  * an empty array.  The element type of that empty array is the expected
27046  * type of value and all values of that type are valid.
27047  * If the string is <literal>'enum'</literal> then the variant contains
27048  * an array enumerating the possible values.  Each item in the array is
27049  * a possible valid value and no other values are valid.
27050  * If the string is <literal>'flags'</literal> then the variant contains
27051  * an array.  Each item in the array is a value that may appear zero or
27052  * one times in an array to be used as the value for this key.  For
27053  * example, if the variant contained the array <literal>['x',
27054  * 'y']</literal> then the valid values for the key would be
27055  * <literal>[]</literal>, <literal>['x']</literal>,
27056  * <literal>['y']</literal>, <literal>['x', 'y']</literal> and
27057  * <literal>['y', 'x']</literal>.
27058  * Finally, if the string is <literal>'range'</literal> then the variant
27059  * contains a pair of like-typed values -- the minimum and maximum
27060  * permissible values for this key.
27061  * This information should not be used by normal programs.  It is
27062  * considered to be a hint for introspection purposes.  Normal programs
27063  * should already know what is permitted by their own schema.  The
27064  * format may change in any way in the future -- but particularly, new
27065  * forms may be added to the possibilities described above.
27066  * It is a programmer error to give a @key that isn't contained in the
27067  * schema for @settings.
27068  * You should free the returned value with g_variant_unref() when it is
27069  * no longer needed.
27070  *
27071  * Since: 2.28
27072  */
27073
27074
27075 /**
27076  * g_settings_get_string:
27077  * @settings: a #GSettings object
27078  * @key: the key to get the value for
27079  * @returns: a newly-allocated string
27080  *
27081  * Gets the value that is stored at @key in @settings.
27082  * A convenience variant of g_settings_get() for strings.
27083  * It is a programmer error to give a @key that isn't specified as
27084  * having a string type in the schema for @settings.
27085  *
27086  * Since: 2.26
27087  */
27088
27089
27090 /**
27091  * g_settings_get_strv:
27092  * @settings: a #GSettings object
27093  * @key: the key to get the value for
27094  * @returns: (array zero-terminated=1) (transfer full): a newly-allocated, %NULL-terminated array of strings, the value that is stored at @key in @settings.
27095  *
27096  * A convenience variant of g_settings_get() for string arrays.
27097  * It is a programmer error to give a @key that isn't specified as
27098  * having an array of strings type in the schema for @settings.
27099  *
27100  * Since: 2.26
27101  */
27102
27103
27104 /**
27105  * g_settings_get_value:
27106  * @settings: a #GSettings object
27107  * @key: the key to get the value for
27108  * @returns: a new #GVariant
27109  *
27110  * Gets the value that is stored in @settings for @key.
27111  * It is a programmer error to give a @key that isn't contained in the
27112  * schema for @settings.
27113  *
27114  * Since: 2.26
27115  */
27116
27117
27118 /**
27119  * g_settings_is_writable:
27120  * @settings: a #GSettings object
27121  * @name: the name of a key
27122  * @returns: %TRUE if the key @name is writable
27123  *
27124  * Finds out if a key can be written or not
27125  *
27126  * Since: 2.26
27127  */
27128
27129
27130 /**
27131  * g_settings_list_children:
27132  * @settings: a #GSettings object
27133  * @returns: (transfer full) (element-type utf8): a list of the children on @settings
27134  *
27135  * Gets the list of children on @settings.
27136  * The list is exactly the list of strings for which it is not an error
27137  * to call g_settings_get_child().
27138  * For GSettings objects that are lists, this value can change at any
27139  * time and you should connect to the "children-changed" signal to watch
27140  * request a child after listing it only for it to have been destroyed
27141  * in the meantime.  For this reason, g_settings_get_child() may return
27142  * %NULL even for a child that was listed by this function.
27143  * For GSettings objects that are not lists, you should probably not be
27144  * calling this function from "normal" code (since you should already
27145  * know what children are in your schema).  This function may still be
27146  * useful there for introspection reasons, however.
27147  * You should free the return value with g_strfreev() when you are done
27148  * with it.
27149  *
27150  * For those changes.  note that there is a race condition here: you may
27151  */
27152
27153
27154 /**
27155  * g_settings_list_keys:
27156  * @settings: a #GSettings object
27157  * @returns: (transfer full) (element-type utf8): a list of the keys on @settings
27158  *
27159  * Introspects the list of keys on @settings.
27160  * You should probably not be calling this function from "normal" code
27161  * (since you should already know what keys are in your schema).  This
27162  * function is intended for introspection reasons.
27163  * You should free the return value with g_strfreev() when you are done
27164  * with it.
27165  */
27166
27167
27168 /**
27169  * g_settings_list_relocatable_schemas:
27170  *
27171  * Gets a list of the relocatable #GSettings schemas installed on the
27172  * system.  These are schemas that do not provide their own path.  It is
27173  * usual to instantiate these schemas directly, but if you want to you
27174  * can use g_settings_new_with_path() to specify the path.
27175  * The output of this function, tTaken together with the output of
27176  * g_settings_list_schemas() represents the complete list of all
27177  * installed schemas.
27178  * #GSettings schemas that are available.  The list must not be
27179  * modified or freed.
27180  *
27181  * Returns: (element-type utf8) (transfer none): a list of relocatable
27182  * Since: 2.28
27183  */
27184
27185
27186 /**
27187  * g_settings_list_schemas:
27188  *
27189  * Gets a list of the #GSettings schemas installed on the system.  The
27190  * returned list is exactly the list of schemas for which you may call
27191  * g_settings_new() without adverse effects.
27192  * This function does not list the schemas that do not provide their own
27193  * g_settings_new_with_path()).  See
27194  * g_settings_list_relocatable_schemas() for that.
27195  * schemas that are available.  The list must not be modified or
27196  * freed.
27197  *
27198  * Paths (ie: schemas for which you must use
27199  * Returns: (element-type utf8) (transfer none): a list of #GSettings
27200  * Since: 2.26
27201  */
27202
27203
27204 /**
27205  * g_settings_new:
27206  * @schema: the name of the schema
27207  * @returns: a new #GSettings object
27208  *
27209  * Creates a new #GSettings object with a given schema.
27210  * Signals on the newly created #GSettings object will be dispatched
27211  * via the thread-default #GMainContext in effect at the time of the
27212  * call to g_settings_new().  The new #GSettings will hold a reference
27213  * on the context.  See g_main_context_push_thread_default().
27214  *
27215  * Since: 2.26
27216  */
27217
27218
27219 /**
27220  * g_settings_new_with_backend:
27221  * @schema: the name of the schema
27222  * @backend: the #GSettingsBackend to use
27223  * @returns: a new #GSettings object
27224  *
27225  * Creates a new #GSettings object with a given schema and backend.
27226  * Creating settings objects with an different backend allows accessing settings
27227  * from a database other than the usual one.  For example, it may make
27228  * sense to pass a backend corresponding to the "defaults" settings database on
27229  * the system to get a settings object that modifies the system default
27230  * settings instead of the settings for this user.
27231  *
27232  * Since: 2.26
27233  */
27234
27235
27236 /**
27237  * g_settings_new_with_backend_and_path:
27238  * @schema: the name of the schema
27239  * @backend: the #GSettingsBackend to use
27240  * @path: the path to use
27241  * @returns: a new #GSettings object
27242  *
27243  * Creates a new #GSettings object with a given schema, backend and
27244  * path.
27245  * This is a mix of g_settings_new_with_backend() and
27246  * g_settings_new_with_path().
27247  *
27248  * Since: 2.26
27249  */
27250
27251
27252 /**
27253  * g_settings_new_with_path:
27254  * @schema: the name of the schema
27255  * @path: the path to use
27256  * @returns: a new #GSettings object
27257  *
27258  * Creates a new #GSettings object with a given schema and path.
27259  * You only need to do this if you want to directly create a settings
27260  * object with a schema that doesn't have a specified path of its own.
27261  * That's quite rare.
27262  * It is a programmer error to call this function for a schema that
27263  * has an explicitly specified path.
27264  *
27265  * Since: 2.26
27266  */
27267
27268
27269 /**
27270  * g_settings_range_check:
27271  * @settings: a #GSettings
27272  * @key: the key to check
27273  * @value: the value to check
27274  * @returns: %TRUE if @value is valid for @key
27275  *
27276  * Checks if the given @value is of the correct type and within the
27277  * permitted range for @key.
27278  * This API is not intended to be used by normal programs -- they should
27279  * already know what is permitted by their own schemas.  This API is
27280  * meant to be used by programs such as editors or commandline tools.
27281  * It is a programmer error to give a @key that isn't contained in the
27282  * schema for @settings.
27283  *
27284  * Since: 2.28
27285  */
27286
27287
27288 /**
27289  * g_settings_reset:
27290  * @settings: a #GSettings object
27291  * @key: the name of a key
27292  *
27293  * Resets @key to its default value.
27294  * This call resets the key, as much as possible, to its default value.
27295  * That might the value specified in the schema or the one set by the
27296  * administrator.
27297  */
27298
27299
27300 /**
27301  * g_settings_revert:
27302  * @settings: a #GSettings instance
27303  *
27304  * Reverts all non-applied changes to the settings.  This function
27305  * does nothing unless @settings is in 'delay-apply' mode; see
27306  * g_settings_delay().  In the normal case settings are always applied
27307  * immediately.
27308  * Change notifications will be emitted for affected keys.
27309  */
27310
27311
27312 /**
27313  * g_settings_set:
27314  * @settings: a #GSettings object
27315  * @key: the name of the key to set
27316  * @format: a #GVariant format string
27317  * @...: arguments as per @format
27318  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
27319  *
27320  * Sets @key in @settings to @value.
27321  * A convenience function that combines g_settings_set_value() with
27322  * g_variant_new().
27323  * It is a programmer error to give a @key that isn't contained in the
27324  * schema for @settings or for the #GVariantType of @format to mismatch
27325  * the type given in the schema.
27326  *
27327  * Since: 2.26
27328  */
27329
27330
27331 /**
27332  * g_settings_set_boolean:
27333  * @settings: a #GSettings object
27334  * @key: the name of the key to set
27335  * @value: the value to set it to
27336  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
27337  *
27338  * Sets @key in @settings to @value.
27339  * A convenience variant of g_settings_set() for booleans.
27340  * It is a programmer error to give a @key that isn't specified as
27341  * having a boolean type in the schema for @settings.
27342  *
27343  * Since: 2.26
27344  */
27345
27346
27347 /**
27348  * g_settings_set_double:
27349  * @settings: a #GSettings object
27350  * @key: the name of the key to set
27351  * @value: the value to set it to
27352  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
27353  *
27354  * Sets @key in @settings to @value.
27355  * A convenience variant of g_settings_set() for doubles.
27356  * It is a programmer error to give a @key that isn't specified as
27357  * having a 'double' type in the schema for @settings.
27358  *
27359  * Since: 2.26
27360  */
27361
27362
27363 /**
27364  * g_settings_set_enum:
27365  * @settings: a #GSettings object
27366  * @key: a key, within @settings
27367  * @value: an enumerated value
27368  * @returns: %TRUE, if the set succeeds
27369  *
27370  * Looks up the enumerated type nick for @value and writes it to @key,
27371  * within @settings.
27372  * It is a programmer error to give a @key that isn't contained in the
27373  * schema for @settings or is not marked as an enumerated type, or for
27374  * After performing the write, accessing @key directly with
27375  * g_settings_get_string() will return the 'nick' associated with
27376  */
27377
27378
27379 /**
27380  * g_settings_set_flags:
27381  * @settings: a #GSettings object
27382  * @key: a key, within @settings
27383  * @value: a flags value
27384  * @returns: %TRUE, if the set succeeds
27385  *
27386  * Looks up the flags type nicks for the bits specified by @value, puts
27387  * them in an array of strings and writes the array to @key, withing
27388  * It is a programmer error to give a @key that isn't contained in the
27389  * schema for @settings or is not marked as a flags type, or for @value
27390  * to contain any bits that are not value for the named type.
27391  * After performing the write, accessing @key directly with
27392  * g_settings_get_strv() will return an array of 'nicks'; one for each
27393  * bit in @value.
27394  */
27395
27396
27397 /**
27398  * g_settings_set_int:
27399  * @settings: a #GSettings object
27400  * @key: the name of the key to set
27401  * @value: the value to set it to
27402  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
27403  *
27404  * Sets @key in @settings to @value.
27405  * A convenience variant of g_settings_set() for 32-bit integers.
27406  * It is a programmer error to give a @key that isn't specified as
27407  * having a int32 type in the schema for @settings.
27408  *
27409  * Since: 2.26
27410  */
27411
27412
27413 /**
27414  * g_settings_set_string:
27415  * @settings: a #GSettings object
27416  * @key: the name of the key to set
27417  * @value: the value to set it to
27418  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
27419  *
27420  * Sets @key in @settings to @value.
27421  * A convenience variant of g_settings_set() for strings.
27422  * It is a programmer error to give a @key that isn't specified as
27423  * having a string type in the schema for @settings.
27424  *
27425  * Since: 2.26
27426  */
27427
27428
27429 /**
27430  * g_settings_set_strv:
27431  * @settings: a #GSettings object
27432  * @key: the name of the key to set
27433  * @value: (allow-none) (array zero-terminated=1): the value to set it to, or %NULL
27434  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
27435  *
27436  * Sets @key in @settings to @value.
27437  * A convenience variant of g_settings_set() for string arrays.  If
27438  * It is a programmer error to give a @key that isn't specified as
27439  * having an array of strings type in the schema for @settings.
27440  *
27441  * Since: 2.26
27442  */
27443
27444
27445 /**
27446  * g_settings_set_value:
27447  * @settings: a #GSettings object
27448  * @key: the name of the key to set
27449  * @value: a #GVariant of the correct type
27450  * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
27451  *
27452  * Sets @key in @settings to @value.
27453  * It is a programmer error to give a @key that isn't contained in the
27454  * schema for @settings or for @value to have the incorrect type, per
27455  * the schema.
27456  * If @value is floating then this function consumes the reference.
27457  *
27458  * Since: 2.26
27459  */
27460
27461
27462 /**
27463  * g_settings_sync:
27464  *
27465  * Ensures that all pending operations for the given are complete for
27466  * the default backend.
27467  * Writes made to a #GSettings are handled asynchronously.  For this
27468  * reason, it is very unlikely that the changes have it to disk by the
27469  * time g_settings_set() returns.
27470  * This call will block until all of the writes have made it to the
27471  * backend.  Since the mainloop is not running, no change notifications
27472  * will be dispatched during this call (but some may be queued by the
27473  * time the call is done).
27474  */
27475
27476
27477 /**
27478  * g_settings_unbind:
27479  * @object: the object
27480  * @property: the property whose binding is removed
27481  *
27482  * Removes an existing binding for @property on @object.
27483  * Note that bindings are automatically removed when the
27484  * object is finalized, so it is rarely necessary to call this
27485  * function.
27486  *
27487  * Since: 2.26
27488  */
27489
27490
27491 /**
27492  * g_signal_connect:
27493  * @instance: the instance to connect to.
27494  * @detailed_signal: a string of the form "signal-name::detail".
27495  * @c_handler: the #GCallback to connect.
27496  * @data: data to pass to @c_handler calls.
27497  *
27498  * Connects a #GCallback function to a signal for a particular object.
27499  * The handler will be called before the default handler of the signal.
27500  *
27501  * Returns: the handler id
27502  */
27503
27504
27505 /**
27506  * g_signal_connect_after:
27507  * @instance: the instance to connect to.
27508  * @detailed_signal: a string of the form "signal-name::detail".
27509  * @c_handler: the #GCallback to connect.
27510  * @data: data to pass to @c_handler calls.
27511  *
27512  * Connects a #GCallback function to a signal for a particular object.
27513  * The handler will be called after the default handler of the signal.
27514  *
27515  * Returns: the handler id
27516  */
27517
27518
27519 /**
27520  * g_signal_connect_swapped:
27521  * @instance: the instance to connect to.
27522  * @detailed_signal: a string of the form "signal-name::detail".
27523  * @c_handler: the #GCallback to connect.
27524  * @data: data to pass to @c_handler calls.
27525  *
27526  * Connects a #GCallback function to a signal for a particular object.
27527  * The instance on which the signal is emitted and @data will be swapped when
27528  * calling the handler.
27529  *
27530  * Returns: the handler id
27531  */
27532
27533
27534 /**
27535  * g_signal_handlers_block_by_func:
27536  * @instance: The instance to block handlers from.
27537  * @func: The C closure callback of the handlers (useless for non-C closures).
27538  * @data: The closure data of the handlers' closures.
27539  *
27540  * Blocks all handlers on an instance that match @func and @data.
27541  *
27542  * Returns: The number of handlers that matched.
27543  */
27544
27545
27546 /**
27547  * g_signal_handlers_disconnect_by_func:
27548  * @instance: The instance to remove handlers from.
27549  * @func: The C closure callback of the handlers (useless for non-C closures).
27550  * @data: The closure data of the handlers' closures.
27551  *
27552  * Disconnects all handlers on an instance that match @func and @data.
27553  *
27554  * Returns: The number of handlers that matched.
27555  */
27556
27557
27558 /**
27559  * g_signal_handlers_unblock_by_func:
27560  * @instance: The instance to unblock handlers from.
27561  * @func: The C closure callback of the handlers (useless for non-C closures).
27562  * @data: The closure data of the handlers' closures.
27563  *
27564  * Unblocks all handlers on an instance that match @func and @data.
27565  *
27566  * Returns: The number of handlers that matched.
27567  */
27568
27569
27570 /**
27571  * g_simple_action_group_insert:
27572  * @simple: a #GSimpleActionGroup
27573  * @action: a #GAction
27574  *
27575  * Adds an action to the action group.
27576  * If the action group already contains an action with the same name as
27577  * The action group takes its own reference on @action.
27578  *
27579  * Since: 2.28
27580  */
27581
27582
27583 /**
27584  * g_simple_action_group_lookup:
27585  * @simple: a #GSimpleActionGroup
27586  * @action_name: the name of an action
27587  *
27588  * Looks up the action with the name @action_name in the group.
27589  * If no such action exists, returns %NULL.
27590  *
27591  * Returns: (transfer none): a #GAction, or %NULL
27592  * Since: 2.28
27593  */
27594
27595
27596 /**
27597  * g_simple_action_group_new:
27598  *
27599  * Creates a new, empty, #GSimpleActionGroup.
27600  *
27601  * Returns: a new #GSimpleActionGroup
27602  * Since: 2.28
27603  */
27604
27605
27606 /**
27607  * g_simple_action_group_remove:
27608  * @simple: a #GSimpleActionGroup
27609  * @action_name: the name of the action
27610  *
27611  * Removes the named action from the action group.
27612  * If no action of this name is in the group then nothing happens.
27613  *
27614  * Since: 2.28
27615  */
27616
27617
27618 /**
27619  * g_simple_action_new:
27620  * @name: the name of the action
27621  * @parameter_type: (allow-none): the type of parameter to the activate function
27622  *
27623  * Creates a new action.
27624  * The created action is stateless.  See g_simple_action_new_stateful().
27625  *
27626  * Returns: a new #GSimpleAction
27627  * Since: 2.28
27628  */
27629
27630
27631 /**
27632  * g_simple_action_new_stateful:
27633  * @name: the name of the action
27634  * @parameter_type: (allow-none): the type of the parameter to the activate function
27635  * @state: the initial state of the action
27636  *
27637  * Creates a new stateful action.
27638  * must have the same #GVariantType as the initial state.
27639  * If the @state GVariant is floating, it is consumed.
27640  *
27641  * Returns: a new #GSimpleAction
27642  * Since: 2.28
27643  */
27644
27645
27646 /**
27647  * g_simple_action_set_enabled:
27648  * @simple: a #GSimpleAction
27649  * @enabled: whether the action is enabled
27650  *
27651  * Sets the action as enabled or not.
27652  * An action must be enabled in order to be activated or in order to
27653  * have its state changed from outside callers.
27654  *
27655  * Since: 2.28
27656  */
27657
27658
27659 /**
27660  * g_simple_async_report_error_in_idle: (skip)
27661  * @object: (allow-none): a #GObject, or %NULL.
27662  * @callback: a #GAsyncReadyCallback.
27663  * @user_data: user data passed to @callback.
27664  * @domain: a #GQuark containing the error domain (usually #G_IO_ERROR).
27665  * @code: a specific error code.
27666  * @format: a formatted error reporting string.
27667  * @...: a list of variables to fill in @format.
27668  *
27669  * Reports an error in an asynchronous function in an idle function by
27670  * directly setting the contents of the #GAsyncResult with the given error
27671  * information.
27672  */
27673
27674
27675 /**
27676  * g_simple_async_report_gerror_in_idle:
27677  * @object: (allow-none): a #GObject, or %NULL
27678  * @callback: (scope async): a #GAsyncReadyCallback.
27679  * @user_data: (closure): user data passed to @callback.
27680  * @error: the #GError to report
27681  *
27682  * Reports an error in an idle function. Similar to
27683  * g_simple_async_report_error_in_idle(), but takes a #GError rather
27684  * than building a new one.
27685  */
27686
27687
27688 /**
27689  * g_simple_async_report_take_gerror_in_idle: (skip)
27690  * @object: (allow-none): a #GObject, or %NULL
27691  * @callback: a #GAsyncReadyCallback.
27692  * @user_data: user data passed to @callback.
27693  * @error: the #GError to report
27694  *
27695  * Reports an error in an idle function. Similar to
27696  * g_simple_async_report_gerror_in_idle(), but takes over the caller's
27697  * ownership of @error, so the caller does not have to free it any more.
27698  *
27699  * Since: 2.28
27700  */
27701
27702
27703 /**
27704  * g_simple_async_result_complete:
27705  * @simple: a #GSimpleAsyncResult.
27706  *
27707  * Completes an asynchronous I/O job immediately. Must be called in
27708  * the thread where the asynchronous result was to be delivered, as it
27709  * invokes the callback directly. If you are in a different thread use
27710  * g_simple_async_result_complete_in_idle().
27711  * Calling this function takes a reference to @simple for as long as
27712  * is needed to complete the call.
27713  */
27714
27715
27716 /**
27717  * g_simple_async_result_complete_in_idle:
27718  * @simple: a #GSimpleAsyncResult.
27719  *
27720  * Completes an asynchronous function in an idle handler in the <link
27721  * linkend="g-main-context-push-thread-default">thread-default main
27722  * loop</link> of the thread that @simple was initially created in.
27723  * Calling this function takes a reference to @simple for as long as
27724  * is needed to complete the call.
27725  */
27726
27727
27728 /**
27729  * g_simple_async_result_get_op_res_gboolean:
27730  * @simple: a #GSimpleAsyncResult.
27731  *
27732  * Gets the operation result boolean from within the asynchronous result.
27733  * if the operation's result was %FALSE.
27734  *
27735  * Returns: %TRUE if the operation's result was %TRUE, %FALSE
27736  */
27737
27738
27739 /**
27740  * g_simple_async_result_get_op_res_gpointer: (skip)
27741  * @simple: a #GSimpleAsyncResult.
27742  *
27743  * Gets a pointer result as returned by the asynchronous function.
27744  *
27745  * Returns: a pointer from the result.
27746  */
27747
27748
27749 /**
27750  * g_simple_async_result_get_op_res_gssize:
27751  * @simple: a #GSimpleAsyncResult.
27752  *
27753  * Gets a gssize from the asynchronous result.
27754  *
27755  * Returns: a gssize returned from the asynchronous function.
27756  */
27757
27758
27759 /**
27760  * g_simple_async_result_get_source_tag: (skip)
27761  * @simple: a #GSimpleAsyncResult.
27762  *
27763  * Gets the source tag for the #GSimpleAsyncResult.
27764  *
27765  * Returns: a #gpointer to the source object for the #GSimpleAsyncResult.
27766  */
27767
27768
27769 /**
27770  * g_simple_async_result_is_valid:
27771  * @result: the #GAsyncResult passed to the _finish function.
27772  * @source: the #GObject passed to the _finish function.
27773  * @source_tag: the asynchronous function.
27774  *
27775  * Ensures that the data passed to the _finish function of an async
27776  * operation is consistent.  Three checks are performed.
27777  * First, @result is checked to ensure that it is really a
27778  * #GSimpleAsyncResult.  Second, @source is checked to ensure that it
27779  * matches the source object of @result.  Third, @source_tag is
27780  * checked to ensure that it is either %NULL (as it is when the result was
27781  * created by g_simple_async_report_error_in_idle() or
27782  * g_simple_async_report_gerror_in_idle()) or equal to the
27783  * convention, is a pointer to the _async function corresponding to the
27784  * _finish function from which this function is called).
27785  *
27786  * Returns: #TRUE if all checks passed or #FALSE if any failed.
27787  * Since: 2.20
27788  */
27789
27790
27791 /**
27792  * g_simple_async_result_new:
27793  * @source_object: (allow-none): a #GObject, or %NULL.
27794  * @callback: (scope async): a #GAsyncReadyCallback.
27795  * @user_data: (closure): user data passed to @callback.
27796  * @source_tag: the asynchronous function.
27797  *
27798  * Creates a #GSimpleAsyncResult.
27799  *
27800  * Returns: a #GSimpleAsyncResult.
27801  */
27802
27803
27804 /**
27805  * g_simple_async_result_new_error:
27806  * @source_object: (allow-none): a #GObject, or %NULL.
27807  * @callback: (scope async): a #GAsyncReadyCallback.
27808  * @user_data: (closure): user data passed to @callback.
27809  * @domain: a #GQuark.
27810  * @code: an error code.
27811  * @format: a string with format characters.
27812  * @...: a list of values to insert into @format.
27813  *
27814  * Creates a new #GSimpleAsyncResult with a set error.
27815  *
27816  * Returns: a #GSimpleAsyncResult.
27817  */
27818
27819
27820 /**
27821  * g_simple_async_result_new_from_error:
27822  * @source_object: (allow-none): a #GObject, or %NULL.
27823  * @callback: (scope async): a #GAsyncReadyCallback.
27824  * @user_data: (closure): user data passed to @callback.
27825  * @error: a #GError
27826  *
27827  * Creates a #GSimpleAsyncResult from an error condition.
27828  *
27829  * Returns: a #GSimpleAsyncResult.
27830  */
27831
27832
27833 /**
27834  * g_simple_async_result_new_take_error: (skip)
27835  * @source_object: (allow-none): a #GObject, or %NULL
27836  * @callback: (scope async): a #GAsyncReadyCallback
27837  * @user_data: (closure): user data passed to @callback
27838  * @error: a #GError
27839  *
27840  * Creates a #GSimpleAsyncResult from an error condition, and takes over the
27841  * caller's ownership of @error, so the caller does not need to free it anymore.
27842  *
27843  * Returns: a #GSimpleAsyncResult
27844  * Since: 2.28
27845  */
27846
27847
27848 /**
27849  * g_simple_async_result_propagate_error:
27850  * @simple: a #GSimpleAsyncResult.
27851  * @dest: (out): a location to propagate the error to.
27852  *
27853  * Propagates an error from within the simple asynchronous result to
27854  * a given destination.
27855  *
27856  * Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise.
27857  */
27858
27859
27860 /**
27861  * g_simple_async_result_run_in_thread: (skip)
27862  * @simple: a #GSimpleAsyncResult.
27863  * @func: a #GSimpleAsyncThreadFunc.
27864  * @io_priority: the io priority of the request.
27865  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27866  *
27867  * Runs the asynchronous job in a separate thread and then calls
27868  * g_simple_async_result_complete_in_idle() on @simple to return
27869  * the result to the appropriate main loop.
27870  * Calling this function takes a reference to @simple for as long as
27871  * is needed to run the job and report its completion.
27872  */
27873
27874
27875 /**
27876  * g_simple_async_result_set_error: (skip)
27877  * @simple: a #GSimpleAsyncResult.
27878  * @domain: a #GQuark (usually #G_IO_ERROR).
27879  * @code: an error code.
27880  * @format: a formatted error reporting string.
27881  * @...: a list of variables to fill in @format.
27882  *
27883  * Sets an error within the asynchronous result without a #GError.
27884  */
27885
27886
27887 /**
27888  * g_simple_async_result_set_error_va: (skip)
27889  * @simple: a #GSimpleAsyncResult.
27890  * @domain: a #GQuark (usually #G_IO_ERROR).
27891  * @code: an error code.
27892  * @format: a formatted error reporting string.
27893  * @args: va_list of arguments.
27894  *
27895  * Sets an error within the asynchronous result without a #GError.
27896  * Unless writing a binding, see g_simple_async_result_set_error().
27897  */
27898
27899
27900 /**
27901  * g_simple_async_result_set_from_error:
27902  * @simple: a #GSimpleAsyncResult.
27903  * @error: #GError.
27904  *
27905  * Sets the result from a #GError.
27906  */
27907
27908
27909 /**
27910  * g_simple_async_result_set_handle_cancellation:
27911  * @simple: a #GSimpleAsyncResult.
27912  * @handle_cancellation: a #gboolean.
27913  *
27914  * Sets whether to handle cancellation within the asynchronous operation.
27915  */
27916
27917
27918 /**
27919  * g_simple_async_result_set_op_res_gboolean:
27920  * @simple: a #GSimpleAsyncResult.
27921  * @op_res: a #gboolean.
27922  *
27923  * Sets the operation result to a boolean within the asynchronous result.
27924  */
27925
27926
27927 /**
27928  * g_simple_async_result_set_op_res_gpointer: (skip)
27929  * @simple: a #GSimpleAsyncResult.
27930  * @op_res: a pointer result from an asynchronous function.
27931  * @destroy_op_res: a #GDestroyNotify function.
27932  *
27933  * Sets the operation result within the asynchronous result to a pointer.
27934  */
27935
27936
27937 /**
27938  * g_simple_async_result_set_op_res_gssize:
27939  * @simple: a #GSimpleAsyncResult.
27940  * @op_res: a #gssize.
27941  *
27942  * Sets the operation result within the asynchronous result to
27943  * the given @op_res.
27944  */
27945
27946
27947 /**
27948  * g_simple_async_result_take_error: (skip)
27949  * @simple: a #GSimpleAsyncResult
27950  * @error: a #GError
27951  *
27952  * Sets the result from @error, and takes over the caller's ownership
27953  * of @error, so the caller does not need to free it any more.
27954  *
27955  * Since: 2.28
27956  */
27957
27958
27959 /**
27960  * g_simple_permission_new:
27961  * @allowed: %TRUE if the action is allowed
27962  * @returns: the #GSimplePermission, as a #GPermission
27963  *
27964  * Creates a new #GPermission instance that represents an action that is
27965  * either always or never allowed.
27966  *
27967  * Since: 2.26
27968  */
27969
27970
27971 /**
27972  * g_socket_accept:
27973  * @socket: a #GSocket.
27974  * @cancellable: (allow-none): a %GCancellable or %NULL
27975  * @error: #GError for error reporting, or %NULL to ignore.
27976  *
27977  * Accept incoming connections on a connection-based socket. This removes
27978  * the first outstanding connection request from the listening socket and
27979  * creates a #GSocket object for it.
27980  * The @socket must be bound to a local address with g_socket_bind() and
27981  * must be listening for incoming connections (g_socket_listen()).
27982  * If there are no outstanding connections then the operation will block
27983  * or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.
27984  * To be notified of an incoming connection, wait for the %G_IO_IN condition.
27985  * Free the returned object with g_object_unref().
27986  *
27987  * Returns: (transfer full): a new #GSocket, or %NULL on error.
27988  * Since: 2.22
27989  */
27990
27991
27992 /**
27993  * g_socket_address_enumerator_next:
27994  * @enumerator: a #GSocketAddressEnumerator
27995  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27996  * @error: a #GError.
27997  *
27998  * Retrieves the next #GSocketAddress from @enumerator. Note that this
27999  * may block for some amount of time. (Eg, a #GNetworkAddress may need
28000  * to do a DNS lookup before it can return an address.) Use
28001  * g_socket_address_enumerator_next_async() if you need to avoid
28002  * blocking.
28003  * If @enumerator is expected to yield addresses, but for some reason
28004  * is unable to (eg, because of a DNS error), then the first call to
28005  * g_socket_address_enumerator_next() will return an appropriate error
28006  * in *@error. However, if the first call to
28007  * g_socket_address_enumerator_next() succeeds, then any further
28008  * internal errors (other than @cancellable being triggered) will be
28009  * ignored.
28010  * error (in which case *@error will be set) or if there are no
28011  * more addresses.
28012  *
28013  * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
28014  */
28015
28016
28017 /**
28018  * g_socket_address_enumerator_next_async:
28019  * @enumerator: a #GSocketAddressEnumerator
28020  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28021  * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
28022  * @user_data: (closure): the data to pass to callback function
28023  *
28024  * Asynchronously retrieves the next #GSocketAddress from @enumerator
28025  * and then calls @callback, which must call
28026  * g_socket_address_enumerator_next_finish() to get the result.
28027  */
28028
28029
28030 /**
28031  * g_socket_address_enumerator_next_finish:
28032  * @enumerator: a #GSocketAddressEnumerator
28033  * @result: a #GAsyncResult
28034  * @error: a #GError
28035  *
28036  * Retrieves the result of a completed call to
28037  * g_socket_address_enumerator_next_async(). See
28038  * g_socket_address_enumerator_next() for more information about
28039  * error handling.
28040  * error (in which case *@error will be set) or if there are no
28041  * more addresses.
28042  *
28043  * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
28044  */
28045
28046
28047 /**
28048  * g_socket_address_get_family:
28049  * @address: a #GSocketAddress
28050  *
28051  * Gets the socket family type of @address.
28052  *
28053  * Returns: the socket family type of @address.
28054  * Since: 2.22
28055  */
28056
28057
28058 /**
28059  * g_socket_address_get_native_size:
28060  * @address: a #GSocketAddress
28061  *
28062  * Gets the size of @address's native <type>struct sockaddr</type>.
28063  * You can use this to allocate memory to pass to
28064  * g_socket_address_to_native().
28065  *
28066  * Returns: the size of the native <type>struct sockaddr</type> that
28067  * Since: 2.22
28068  */
28069
28070
28071 /**
28072  * g_socket_address_new_from_native:
28073  * @native: a pointer to a <type>struct sockaddr</type>
28074  * @len: the size of the memory location pointed to by @native
28075  *
28076  * Creates a #GSocketAddress subclass corresponding to the native
28077  * <type>struct sockaddr</type> @native.
28078  * otherwise %NULL.
28079  *
28080  * Returns: a new #GSocketAddress if @native could successfully be converted,
28081  * Since: 2.22
28082  */
28083
28084
28085 /**
28086  * g_socket_address_to_native:
28087  * @address: a #GSocketAddress
28088  * @dest: a pointer to a memory location that will contain the native <type>struct sockaddr</type>.
28089  * @destlen: the size of @dest. Must be at least as large as g_socket_address_get_native_size().
28090  * @error: #GError for error reporting, or %NULL to ignore.
28091  *
28092  * Converts a #GSocketAddress to a native <type>struct
28093  * sockaddr</type>, which can be passed to low-level functions like
28094  * connect() or bind().
28095  * If not enough space is availible, a %G_IO_ERROR_NO_SPACE error is
28096  * returned. If the address type is not known on the system
28097  * then a %G_IO_ERROR_NOT_SUPPORTED error is returned.
28098  *
28099  * Returns: %TRUE if @dest was filled in, %FALSE on error
28100  * Since: 2.22
28101  */
28102
28103
28104 /**
28105  * g_socket_bind:
28106  * @socket: a #GSocket.
28107  * @address: a #GSocketAddress specifying the local address.
28108  * @allow_reuse: whether to allow reusing this address
28109  * @error: #GError for error reporting, or %NULL to ignore.
28110  *
28111  * When a socket is created it is attached to an address family, but it
28112  * doesn't have an address in this family. g_socket_bind() assigns the
28113  * address (sometimes called name) of the socket.
28114  * It is generally required to bind to a local address before you can
28115  * receive connections. (See g_socket_listen() and g_socket_accept() ).
28116  * In certain situations, you may also want to bind a socket that will be
28117  * used to initiate connections, though this is not normally required.
28118  * eventually call g_socket_accept() on), and %FALSE for client sockets.
28119  * (Specifically, if it is %TRUE, then g_socket_bind() will set the
28120  * %SO_REUSEADDR flag on the socket, allowing it to bind @address even if
28121  * that address was previously used by another socket that has not yet been
28122  * fully cleaned-up by the kernel. Failing to set this flag on a server
28123  * socket may cause the bind call to return %G_IO_ERROR_ADDRESS_IN_USE if
28124  * the server program is stopped and then immediately restarted.)
28125  *
28126  * Returns: %TRUE on success, %FALSE on error.
28127  * Since: 2.22
28128  */
28129
28130
28131 /**
28132  * g_socket_check_connect_result:
28133  * @socket: a #GSocket
28134  * @error: #GError for error reporting, or %NULL to ignore.
28135  *
28136  * Checks and resets the pending connect error for the socket.
28137  * This is used to check for errors when g_socket_connect() is
28138  * used in non-blocking mode.
28139  *
28140  * Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error
28141  * Since: 2.22
28142  */
28143
28144
28145 /**
28146  * g_socket_client_add_application_proxy:
28147  * @client: a #GSocketClient
28148  * @protocol: The proxy protocol
28149  *
28150  * Enable proxy protocols to be handled by the application. When the
28151  * indicated proxy protocol is returned by the #GProxyResolver,
28152  * #GSocketClient will consider this protocol as supported but will
28153  * not try find a #GProxy instance to handle handshaking. The
28154  * application must check for this case by calling
28155  * g_socket_connection_get_remote_address() on the returned
28156  * #GSocketConnection, and seeing if it's a #GProxyAddress of the
28157  * appropriate type, to determine whether or not it needs to handle
28158  * the proxy handshaking itself.
28159  * This should be used for proxy protocols that are dialects of
28160  * another protocol such as HTTP proxy. It also allows cohabitation of
28161  * proxy protocols that are reused between protocols. A good example
28162  * is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also
28163  * be use as generic socket proxy through the HTTP CONNECT method.
28164  */
28165
28166
28167 /**
28168  * g_socket_client_connect:
28169  * @client: a #GSocketClient.
28170  * @connectable: a #GSocketConnectable specifying the remote address.
28171  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28172  * @error: #GError for error reporting, or %NULL to ignore.
28173  *
28174  * Tries to resolve the @connectable and make a network connection to it..
28175  * Upon a successful connection, a new #GSocketConnection is constructed
28176  * and returned.  The caller owns this new object and must drop their
28177  * reference to it when finished with it.
28178  * The type of the #GSocketConnection object returned depends on the type of
28179  * the underlying socket that is used. For instance, for a TCP/IP connection
28180  * it will be a #GTcpConnection.
28181  * The socket created will be the same family as the the address that the
28182  * or indirectly via g_socket_client_set_local_address(). The socket type
28183  * defaults to %G_SOCKET_TYPE_STREAM but can be set with
28184  * g_socket_client_set_socket_type().
28185  * If a local address is specified with g_socket_client_set_local_address() the
28186  * socket will be bound to this address before connecting.
28187  *
28188  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28189  * Since: 2.22
28190  */
28191
28192
28193 /**
28194  * g_socket_client_connect_async:
28195  * @client: a #GTcpClient
28196  * @connectable: a #GSocketConnectable specifying the remote address.
28197  * @cancellable: (allow-none): a #GCancellable, or %NULL
28198  * @callback: (scope async): a #GAsyncReadyCallback
28199  * @user_data: (closure): user data for the callback
28200  *
28201  * This is the asynchronous version of g_socket_client_connect().
28202  * When the operation is finished @callback will be
28203  * called. You can then call g_socket_client_connect_finish() to get
28204  * the result of the operation.
28205  *
28206  * Since: 2.22
28207  */
28208
28209
28210 /**
28211  * g_socket_client_connect_finish:
28212  * @client: a #GSocketClient.
28213  * @result: a #GAsyncResult.
28214  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28215  *
28216  * Finishes an async connect operation. See g_socket_client_connect_async()
28217  *
28218  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28219  * Since: 2.22
28220  */
28221
28222
28223 /**
28224  * g_socket_client_connect_to_host:
28225  * @client: a #GSocketClient
28226  * @host_and_port: the name and optionally port of the host to connect to
28227  * @default_port: the default port to connect to
28228  * @cancellable: (allow-none): a #GCancellable, or %NULL
28229  * @error: a pointer to a #GError, or %NULL
28230  *
28231  * This is a helper function for g_socket_client_connect().
28232  * Attempts to create a TCP connection to the named host.
28233  * address, an IPv4 address, or a domain name (in which case a DNS
28234  * lookup is performed).  Quoting with [] is supported for all address
28235  * types.  A port override may be specified in the usual way with a
28236  * colon.  Ports may be given as decimal numbers or symbolic names (in
28237  * which case an /etc/services lookup is performed).
28238  * If no port override is given in @host_and_port then @default_port will be
28239  * used as the port number to connect to.
28240  * In general, @host_and_port is expected to be provided by the user (allowing
28241  * them to give the hostname, and a port overide if necessary) and
28242  * In the case that an IP address is given, a single connection
28243  * attempt is made.  In the case that a name is given, multiple
28244  * connection attempts may be made, in turn and according to the
28245  * number of address records in DNS, until a connection succeeds.
28246  * Upon a successful connection, a new #GSocketConnection is constructed
28247  * and returned.  The caller owns this new object and must drop their
28248  * reference to it when finished with it.
28249  * In the event of any failure (DNS error, service not found, no hosts
28250  * connectable) %NULL is returned and @error (if non-%NULL) is set
28251  * accordingly.
28252  *
28253  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28254  * Since: 2.22
28255  */
28256
28257
28258 /**
28259  * g_socket_client_connect_to_host_async:
28260  * @client: a #GTcpClient
28261  * @host_and_port: the name and optionally the port of the host to connect to
28262  * @default_port: the default port to connect to
28263  * @cancellable: (allow-none): a #GCancellable, or %NULL
28264  * @callback: (scope async): a #GAsyncReadyCallback
28265  * @user_data: (closure): user data for the callback
28266  *
28267  * This is the asynchronous version of g_socket_client_connect_to_host().
28268  * When the operation is finished @callback will be
28269  * called. You can then call g_socket_client_connect_to_host_finish() to get
28270  * the result of the operation.
28271  *
28272  * Since: 2.22
28273  */
28274
28275
28276 /**
28277  * g_socket_client_connect_to_host_finish:
28278  * @client: a #GSocketClient.
28279  * @result: a #GAsyncResult.
28280  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28281  *
28282  * Finishes an async connect operation. See g_socket_client_connect_to_host_async()
28283  *
28284  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28285  * Since: 2.22
28286  */
28287
28288
28289 /**
28290  * g_socket_client_connect_to_service:
28291  * @client: a #GSocketConnection
28292  * @domain: a domain name
28293  * @service: the name of the service to connect to
28294  * @cancellable: (allow-none): a #GCancellable, or %NULL
28295  * @error: a pointer to a #GError, or %NULL
28296  * @returns: (transfer full): a #GSocketConnection if successful, or %NULL on error
28297  *
28298  * Attempts to create a TCP connection to a service.
28299  * This call looks up the SRV record for @service at @domain for the
28300  * "tcp" protocol.  It then attempts to connect, in turn, to each of
28301  * the hosts providing the service until either a connection succeeds
28302  * or there are no hosts remaining.
28303  * Upon a successful connection, a new #GSocketConnection is constructed
28304  * and returned.  The caller owns this new object and must drop their
28305  * reference to it when finished with it.
28306  * In the event of any failure (DNS error, service not found, no hosts
28307  * connectable) %NULL is returned and @error (if non-%NULL) is set
28308  * accordingly.
28309  */
28310
28311
28312 /**
28313  * g_socket_client_connect_to_service_async:
28314  * @client: a #GSocketClient
28315  * @domain: a domain name
28316  * @service: the name of the service to connect to
28317  * @cancellable: (allow-none): a #GCancellable, or %NULL
28318  * @callback: (scope async): a #GAsyncReadyCallback
28319  * @user_data: (closure): user data for the callback
28320  *
28321  * This is the asynchronous version of
28322  * g_socket_client_connect_to_service().
28323  *
28324  * Since: 2.22
28325  */
28326
28327
28328 /**
28329  * g_socket_client_connect_to_service_finish:
28330  * @client: a #GSocketClient.
28331  * @result: a #GAsyncResult.
28332  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28333  *
28334  * Finishes an async connect operation. See g_socket_client_connect_to_service_async()
28335  *
28336  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28337  * Since: 2.22
28338  */
28339
28340
28341 /**
28342  * g_socket_client_connect_to_uri:
28343  * @client: a #GSocketClient
28344  * @uri: A network URI
28345  * @default_port: the default port to connect to
28346  * @cancellable: (allow-none): a #GCancellable, or %NULL
28347  * @error: a pointer to a #GError, or %NULL
28348  *
28349  * This is a helper function for g_socket_client_connect().
28350  * Attempts to create a TCP connection with a network URI.
28351  * component. If a port is not specified in the URI, @default_port
28352  * will be used. TLS will be negotiated if #GSocketClient:tls is %TRUE.
28353  * (#GSocketClient does not know to automatically assume TLS for
28354  * certain URI schemes.)
28355  * Using this rather than g_socket_client_connect() or
28356  * g_socket_client_connect_to_host() allows #GSocketClient to
28357  * determine when to use application-specific proxy protocols.
28358  * Upon a successful connection, a new #GSocketConnection is constructed
28359  * and returned.  The caller owns this new object and must drop their
28360  * reference to it when finished with it.
28361  * In the event of any failure (DNS error, service not found, no hosts
28362  * connectable) %NULL is returned and @error (if non-%NULL) is set
28363  * accordingly.
28364  *
28365  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28366  * Since: 2.26
28367  */
28368
28369
28370 /**
28371  * g_socket_client_connect_to_uri_async:
28372  * @client: a #GSocketClient
28373  * @uri: a network uri
28374  * @default_port: the default port to connect to
28375  * @cancellable: (allow-none): a #GCancellable, or %NULL
28376  * @callback: (scope async): a #GAsyncReadyCallback
28377  * @user_data: (closure): user data for the callback
28378  *
28379  * This is the asynchronous version of g_socket_client_connect_to_uri().
28380  * When the operation is finished @callback will be
28381  * called. You can then call g_socket_client_connect_to_uri_finish() to get
28382  * the result of the operation.
28383  *
28384  * Since: 2.26
28385  */
28386
28387
28388 /**
28389  * g_socket_client_connect_to_uri_finish:
28390  * @client: a #GSocketClient.
28391  * @result: a #GAsyncResult.
28392  * @error: a #GError location to store the error occuring, or %NULL to ignore.
28393  *
28394  * Finishes an async connect operation. See g_socket_client_connect_to_uri_async()
28395  *
28396  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28397  * Since: 2.26
28398  */
28399
28400
28401 /**
28402  * g_socket_client_get_enable_proxy:
28403  * @client: a #GSocketClient.
28404  *
28405  * Gets the proxy enable state; see g_socket_client_set_enable_proxy()
28406  *
28407  * Returns: whether proxying is enabled
28408  * Since: 2.26
28409  */
28410
28411
28412 /**
28413  * g_socket_client_get_family:
28414  * @client: a #GSocketClient.
28415  *
28416  * Gets the socket family of the socket client.
28417  * See g_socket_client_set_family() for details.
28418  *
28419  * Returns: a #GSocketFamily
28420  * Since: 2.22
28421  */
28422
28423
28424 /**
28425  * g_socket_client_get_local_address:
28426  * @client: a #GSocketClient.
28427  *
28428  * Gets the local address of the socket client.
28429  * See g_socket_client_set_local_address() for details.
28430  *
28431  * Returns: (transfer none): a #GSocketAddres or %NULL. don't free
28432  * Since: 2.22
28433  */
28434
28435
28436 /**
28437  * g_socket_client_get_protocol:
28438  * @client: a #GSocketClient
28439  *
28440  * Gets the protocol name type of the socket client.
28441  * See g_socket_client_set_protocol() for details.
28442  *
28443  * Returns: a #GSocketProtocol
28444  * Since: 2.22
28445  */
28446
28447
28448 /**
28449  * g_socket_client_get_socket_type:
28450  * @client: a #GSocketClient.
28451  *
28452  * Gets the socket type of the socket client.
28453  * See g_socket_client_set_socket_type() for details.
28454  *
28455  * Returns: a #GSocketFamily
28456  * Since: 2.22
28457  */
28458
28459
28460 /**
28461  * g_socket_client_get_timeout:
28462  * @client: a #GSocketClient
28463  *
28464  * Gets the I/O timeout time for sockets created by @client.
28465  * See g_socket_client_set_timeout() for details.
28466  *
28467  * Returns: the timeout in seconds
28468  * Since: 2.26
28469  */
28470
28471
28472 /**
28473  * g_socket_client_get_tls:
28474  * @client: a #GSocketClient.
28475  *
28476  * Gets whether @client creates TLS connections. See
28477  * g_socket_client_set_tls() for details.
28478  *
28479  * Returns: whether @client uses TLS
28480  * Since: 2.28
28481  */
28482
28483
28484 /**
28485  * g_socket_client_get_tls_validation_flags:
28486  * @client: a #GSocketClient.
28487  *
28488  * Gets the TLS validation flags used creating TLS connections via
28489  *
28490  * Returns: the TLS validation flags
28491  * Since: 2.28
28492  */
28493
28494
28495 /**
28496  * g_socket_client_new:
28497  *
28498  * Creates a new #GSocketClient with the default options.
28499  * Free the returned object with g_object_unref().
28500  *
28501  * Returns: a #GSocketClient.
28502  * Since: 2.22
28503  */
28504
28505
28506 /**
28507  * g_socket_client_set_enable_proxy:
28508  * @client: a #GSocketClient.
28509  * @enable: whether to enable proxies
28510  *
28511  * Sets whether or not @client attempts to make connections via a
28512  * proxy server. When enabled (the default), #GSocketClient will use a
28513  * #GProxyResolver to determine if a proxy protocol such as SOCKS is
28514  * needed, and automatically do the necessary proxy negotiation.
28515  *
28516  * Since: 2.26
28517  */
28518
28519
28520 /**
28521  * g_socket_client_set_family:
28522  * @client: a #GSocketClient.
28523  * @family: a #GSocketFamily
28524  *
28525  * Sets the socket family of the socket client.
28526  * If this is set to something other than %G_SOCKET_FAMILY_INVALID
28527  * then the sockets created by this object will be of the specified
28528  * family.
28529  * This might be useful for instance if you want to force the local
28530  * connection to be an ipv4 socket, even though the address might
28531  * be an ipv6 mapped to ipv4 address.
28532  *
28533  * Since: 2.22
28534  */
28535
28536
28537 /**
28538  * g_socket_client_set_local_address:
28539  * @client: a #GSocketClient.
28540  * @address: a #GSocketAddress, or %NULL
28541  *
28542  * Sets the local address of the socket client.
28543  * The sockets created by this object will bound to the
28544  * specified address (if not %NULL) before connecting.
28545  * This is useful if you want to ensure the the local
28546  * side of the connection is on a specific port, or on
28547  * a specific interface.
28548  *
28549  * Since: 2.22
28550  */
28551
28552
28553 /**
28554  * g_socket_client_set_protocol:
28555  * @client: a #GSocketClient.
28556  * @protocol: a #GSocketProtocol
28557  *
28558  * Sets the protocol of the socket client.
28559  * The sockets created by this object will use of the specified
28560  * protocol.
28561  * If @protocol is %0 that means to use the default
28562  * protocol for the socket family and type.
28563  *
28564  * Since: 2.22
28565  */
28566
28567
28568 /**
28569  * g_socket_client_set_socket_type:
28570  * @client: a #GSocketClient.
28571  * @type: a #GSocketType
28572  *
28573  * Sets the socket type of the socket client.
28574  * The sockets created by this object will be of the specified
28575  * type.
28576  * It doesn't make sense to specify a type of %G_SOCKET_TYPE_DATAGRAM,
28577  * as GSocketClient is used for connection oriented services.
28578  *
28579  * Since: 2.22
28580  */
28581
28582
28583 /**
28584  * g_socket_client_set_timeout:
28585  * @client: a #GSocketClient.
28586  * @timeout: the timeout
28587  *
28588  * Sets the I/O timeout for sockets created by @client. @timeout is a
28589  * time in seconds, or 0 for no timeout (the default).
28590  * The timeout value affects the initial connection attempt as well,
28591  * so setting this may cause calls to g_socket_client_connect(), etc,
28592  * to fail with %G_IO_ERROR_TIMED_OUT.
28593  *
28594  * Since: 2.26
28595  */
28596
28597
28598 /**
28599  * g_socket_client_set_tls:
28600  * @client: a #GSocketClient.
28601  * @tls: whether to use TLS
28602  *
28603  * Sets whether @client creates TLS (aka SSL) connections. If @tls is
28604  * %TRUE, @client will wrap its connections in a #GTlsClientConnection
28605  * and perform a TLS handshake when connecting.
28606  * Note that since #GSocketClient must return a #GSocketConnection,
28607  * but #GTlsClientConnection is not a #GSocketConnection, this
28608  * actually wraps the resulting #GTlsClientConnection in a
28609  * #GTcpWrapperConnection when returning it. You can use
28610  * g_tcp_wrapper_connection_get_base_io_stream() on the return value
28611  * to extract the #GTlsClientConnection.
28612  *
28613  * Since: 2.28
28614  */
28615
28616
28617 /**
28618  * g_socket_client_set_tls_validation_flags:
28619  * @client: a #GSocketClient.
28620  * @flags: the validation flags
28621  *
28622  * Sets the TLS validation flags used when creating TLS connections
28623  * via @client. The default value is %G_TLS_CERTIFICATE_VALIDATE_ALL.
28624  *
28625  * Since: 2.28
28626  */
28627
28628
28629 /**
28630  * g_socket_close:
28631  * @socket: a #GSocket
28632  * @error: #GError for error reporting, or %NULL to ignore.
28633  *
28634  * Closes the socket, shutting down any active connection.
28635  * Closing a socket does not wait for all outstanding I/O operations
28636  * to finish, so the caller should not rely on them to be guaranteed
28637  * to complete even if the close returns with no error.
28638  * Once the socket is closed, all other operations will return
28639  * %G_IO_ERROR_CLOSED. Closing a socket multiple times will not
28640  * return an error.
28641  * Sockets will be automatically closed when the last reference
28642  * is dropped, but you might want to call this function to make sure
28643  * resources are released as early as possible.
28644  * Beware that due to the way that TCP works, it is possible for
28645  * recently-sent data to be lost if either you close a socket while the
28646  * %G_IO_IN condition is set, or else if the remote connection tries to
28647  * send something to you after you close the socket but before it has
28648  * finished reading all of the data you sent. There is no easy generic
28649  * way to avoid this problem; the easiest fix is to design the network
28650  * protocol such that the client will never send data "out of turn".
28651  * Another solution is for the server to half-close the connection by
28652  * calling g_socket_shutdown() with only the @shutdown_write flag set,
28653  * and then wait for the client to notice this and close its side of the
28654  * connection, after which the server can safely call g_socket_close().
28655  * (This is what #GTcpConnection does if you call
28656  * g_tcp_connection_set_graceful_disconnect(). But of course, this
28657  * only works if the client will close its connection after the server
28658  * does.)
28659  *
28660  * Returns: %TRUE on success, %FALSE on error
28661  * Since: 2.22
28662  */
28663
28664
28665 /**
28666  * g_socket_condition_check:
28667  * @socket: a #GSocket
28668  * @condition: a #GIOCondition mask to check
28669  *
28670  * Checks on the readiness of @socket to perform operations.
28671  * The operations specified in @condition are checked for and masked
28672  * against the currently-satisfied conditions on @socket. The result
28673  * is returned.
28674  * Note that on Windows, it is possible for an operation to return
28675  * %G_IO_ERROR_WOULD_BLOCK even immediately after
28676  * g_socket_condition_check() has claimed that the socket is ready for
28677  * writing. Rather than calling g_socket_condition_check() and then
28678  * writing to the socket if it succeeds, it is generally better to
28679  * simply try writing to the socket right away, and try again later if
28680  * the initial attempt returns %G_IO_ERROR_WOULD_BLOCK.
28681  * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition;
28682  * these conditions will always be set in the output if they are true.
28683  * This call never blocks.
28684  *
28685  * Returns: the @GIOCondition mask of the current state
28686  * Since: 2.22
28687  */
28688
28689
28690 /**
28691  * g_socket_condition_wait:
28692  * @socket: a #GSocket
28693  * @condition: a #GIOCondition mask to wait for
28694  * @cancellable: (allow-none): a #GCancellable, or %NULL
28695  * @error: a #GError pointer, or %NULL
28696  *
28697  * Waits for @condition to become true on @socket. When the condition
28698  * is met, %TRUE is returned.
28699  * If @cancellable is cancelled before the condition is met, or if the
28700  * socket has a timeout set and it is reached before the condition is
28701  * met, then %FALSE is returned and @error, if non-%NULL, is set to
28702  * the appropriate value (%G_IO_ERROR_CANCELLED or
28703  * %G_IO_ERROR_TIMED_OUT).
28704  *
28705  * Returns: %TRUE if the condition was met, %FALSE otherwise
28706  * Since: 2.22
28707  */
28708
28709
28710 /**
28711  * g_socket_connect:
28712  * @socket: a #GSocket.
28713  * @address: a #GSocketAddress specifying the remote address.
28714  * @cancellable: (allow-none): a %GCancellable or %NULL
28715  * @error: #GError for error reporting, or %NULL to ignore.
28716  *
28717  * Connect the socket to the specified remote address.
28718  * For connection oriented socket this generally means we attempt to make
28719  * a connection to the @address. For a connection-less socket it sets
28720  * the default address for g_socket_send() and discards all incoming datagrams
28721  * from other sources.
28722  * Generally connection oriented sockets can only connect once, but
28723  * connection-less sockets can connect multiple times to change the
28724  * default address.
28725  * If the connect call needs to do network I/O it will block, unless
28726  * non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
28727  * and the user can be notified of the connection finishing by waiting
28728  * for the G_IO_OUT condition. The result of the connection can then be
28729  * checked with g_socket_check_connect_result().
28730  *
28731  * Returns: %TRUE if connected, %FALSE on error.
28732  * Since: 2.22
28733  */
28734
28735
28736 /**
28737  * g_socket_connectable_enumerate:
28738  * @connectable: a #GSocketConnectable
28739  *
28740  * Creates a #GSocketAddressEnumerator for @connectable.
28741  *
28742  * Returns: (transfer full): a new #GSocketAddressEnumerator.
28743  * Since: 2.22
28744  */
28745
28746
28747 /**
28748  * g_socket_connectable_proxy_enumerate:
28749  * @connectable: a #GSocketConnectable
28750  *
28751  * Creates a #GSocketAddressEnumerator for @connectable that will
28752  * return #GProxyAddress<!-- -->es for addresses that you must connect
28753  * to via a proxy.
28754  * If @connectable does not implement
28755  * g_socket_connectable_proxy_enumerate(), this will fall back to
28756  * calling g_socket_connectable_enumerate().
28757  *
28758  * Returns: (transfer full): a new #GSocketAddressEnumerator.
28759  * Since: 2.26
28760  */
28761
28762
28763 /**
28764  * g_socket_connection_factory_create_connection:
28765  * @socket: a #GSocket
28766  *
28767  * Creates a #GSocketConnection subclass of the right type for
28768  *
28769  * Returns: (transfer full): a #GSocketConnection
28770  * Since: 2.22
28771  */
28772
28773
28774 /**
28775  * g_socket_connection_factory_lookup_type:
28776  * @family: a #GSocketFamily
28777  * @type: a #GSocketType
28778  * @protocol_id: a protocol id
28779  *
28780  * Looks up the #GType to be used when creating socket connections on
28781  * sockets with the specified @family,@type and @protocol_id.
28782  * If no type is registered, the #GSocketConnection base type is returned.
28783  *
28784  * Returns: a #GType
28785  * Since: 2.22
28786  */
28787
28788
28789 /**
28790  * g_socket_connection_factory_register_type:
28791  * @g_type: a #GType, inheriting from %G_TYPE_SOCKET_CONNECTION
28792  * @family: a #GSocketFamily
28793  * @type: a #GSocketType
28794  * @protocol: a protocol id
28795  *
28796  * Looks up the #GType to be used when creating socket connections on
28797  * sockets with the specified @family,@type and @protocol.
28798  * If no type is registered, the #GSocketConnection base type is returned.
28799  *
28800  * Since: 2.22
28801  */
28802
28803
28804 /**
28805  * g_socket_connection_get_local_address:
28806  * @connection: a #GSocketConnection
28807  * @error: #GError for error reporting, or %NULL to ignore.
28808  *
28809  * Try to get the local address of a socket connection.
28810  * Free the returned object with g_object_unref().
28811  *
28812  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
28813  * Since: 2.22
28814  */
28815
28816
28817 /**
28818  * g_socket_connection_get_remote_address:
28819  * @connection: a #GSocketConnection
28820  * @error: #GError for error reporting, or %NULL to ignore.
28821  *
28822  * Try to get the remote address of a socket connection.
28823  * Free the returned object with g_object_unref().
28824  *
28825  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
28826  * Since: 2.22
28827  */
28828
28829
28830 /**
28831  * g_socket_connection_get_socket:
28832  * @connection: a #GSocketConnection
28833  *
28834  * Gets the underlying #GSocket object of the connection.
28835  * This can be useful if you want to do something unusual on it
28836  * not supported by the #GSocketConnection APIs.
28837  *
28838  * Returns: (transfer none): a #GSocketAddress or %NULL on error.
28839  * Since: 2.22
28840  */
28841
28842
28843 /**
28844  * g_socket_control_message_deserialize:
28845  * @level: a socket level
28846  * @type: a socket control message type for the given @level
28847  * @size: the size of the data in bytes
28848  * @data: (array length=size) (element-type guint8): pointer to the message data
28849  *
28850  * Tries to deserialize a socket control message of a given
28851  * of #GSocketControlMessage if they can understand this kind
28852  * of message and if so deserialize it into a #GSocketControlMessage.
28853  * If there is no implementation for this kind of control message, %NULL
28854  * will be returned.
28855  *
28856  * Returns: (transfer full): the deserialized message or %NULL
28857  * Since: 2.22
28858  */
28859
28860
28861 /**
28862  * g_socket_control_message_get_level:
28863  * @message: a #GSocketControlMessage
28864  *
28865  * Returns the "level" (i.e. the originating protocol) of the control message.
28866  * This is often SOL_SOCKET.
28867  *
28868  * Returns: an integer describing the level
28869  * Since: 2.22
28870  */
28871
28872
28873 /**
28874  * g_socket_control_message_get_msg_type:
28875  * @message: a #GSocketControlMessage
28876  *
28877  * Returns the protocol specific type of the control message.
28878  * For instance, for UNIX fd passing this would be SCM_RIGHTS.
28879  *
28880  * Returns: an integer describing the type of control message
28881  * Since: 2.22
28882  */
28883
28884
28885 /**
28886  * g_socket_control_message_get_size:
28887  * @message: a #GSocketControlMessage
28888  *
28889  * Returns the space required for the control message, not including
28890  * headers or alignment.
28891  *
28892  * Returns: The number of bytes required.
28893  * Since: 2.22
28894  */
28895
28896
28897 /**
28898  * g_socket_control_message_serialize:
28899  * @message: a #GSocketControlMessage
28900  * @data: A buffer to write data to
28901  *
28902  * Converts the data in the message to bytes placed in the
28903  * message.
28904  * returned by g_socket_control_message_get_size() on this
28905  * object.
28906  *
28907  * Since: 2.22
28908  */
28909
28910
28911 /**
28912  * g_socket_create_source: (skip)
28913  * @socket: a #GSocket
28914  * @condition: a #GIOCondition mask to monitor
28915  * @cancellable: (allow-none): a %GCancellable or %NULL
28916  *
28917  * Creates a %GSource that can be attached to a %GMainContext to monitor
28918  * for the availibility of the specified @condition on the socket.
28919  * The callback on the source is of the #GSocketSourceFunc type.
28920  * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition;
28921  * these conditions will always be reported output if they are true.
28922  * cause the source to trigger, reporting the current condition (which
28923  * is likely 0 unless cancellation happened at the same time as a
28924  * condition change). You can check for this in the callback using
28925  * g_cancellable_is_cancelled().
28926  * If @socket has a timeout set, and it is reached before @condition
28927  * occurs, the source will then trigger anyway, reporting %G_IO_IN or
28928  * %G_IO_OUT depending on @condition. However, @socket will have been
28929  * marked as having had a timeout, and so the next #GSocket I/O method
28930  * you call will then fail with a %G_IO_ERROR_TIMED_OUT.
28931  *
28932  * Returns: (transfer full): a newly allocated %GSource, free with g_source_unref().
28933  * Since: 2.22
28934  */
28935
28936
28937 /**
28938  * g_socket_get_blocking:
28939  * @socket: a #GSocket.
28940  *
28941  * Gets the blocking mode of the socket. For details on blocking I/O,
28942  * see g_socket_set_blocking().
28943  *
28944  * Returns: %TRUE if blocking I/O is used, %FALSE otherwise.
28945  * Since: 2.22
28946  */
28947
28948
28949 /**
28950  * g_socket_get_credentials:
28951  * @socket: a #GSocket.
28952  * @error: #GError for error reporting, or %NULL to ignore.
28953  *
28954  * Returns the credentials of the foreign process connected to this
28955  * socket, if any (e.g. it is only supported for %G_SOCKET_FAMILY_UNIX
28956  * sockets).
28957  * If this operation isn't supported on the OS, the method fails with
28958  * the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented
28959  * by reading the %SO_PEERCRED option on the underlying socket.
28960  * Other ways to obtain credentials from a foreign peer includes the
28961  * #GUnixCredentialsMessage type and
28962  * g_unix_connection_send_credentials() /
28963  * g_unix_connection_receive_credentials() functions.
28964  * that must be freed with g_object_unref().
28965  *
28966  * Returns: (transfer full): %NULL if @error is set, otherwise a #GCredentials object
28967  * Since: 2.26
28968  */
28969
28970
28971 /**
28972  * g_socket_get_family:
28973  * @socket: a #GSocket.
28974  *
28975  * Gets the socket family of the socket.
28976  *
28977  * Returns: a #GSocketFamily
28978  * Since: 2.22
28979  */
28980
28981
28982 /**
28983  * g_socket_get_fd:
28984  * @socket: a #GSocket.
28985  *
28986  * Returns the underlying OS socket object. On unix this
28987  * is a socket file descriptor, and on windows this is
28988  * a Winsock2 SOCKET handle. This may be useful for
28989  * doing platform specific or otherwise unusual operations
28990  * on the socket.
28991  *
28992  * Returns: the file descriptor of the socket.
28993  * Since: 2.22
28994  */
28995
28996
28997 /**
28998  * g_socket_get_keepalive:
28999  * @socket: a #GSocket.
29000  *
29001  * Gets the keepalive mode of the socket. For details on this,
29002  * see g_socket_set_keepalive().
29003  *
29004  * Returns: %TRUE if keepalive is active, %FALSE otherwise.
29005  * Since: 2.22
29006  */
29007
29008
29009 /**
29010  * g_socket_get_listen_backlog:
29011  * @socket: a #GSocket.
29012  *
29013  * Gets the listen backlog setting of the socket. For details on this,
29014  * see g_socket_set_listen_backlog().
29015  *
29016  * Returns: the maximum number of pending connections.
29017  * Since: 2.22
29018  */
29019
29020
29021 /**
29022  * g_socket_get_local_address:
29023  * @socket: a #GSocket.
29024  * @error: #GError for error reporting, or %NULL to ignore.
29025  *
29026  * Try to get the local address of a bound socket. This is only
29027  * useful if the socket has been bound to a local address,
29028  * either explicitly or implicitly when connecting.
29029  * Free the returned object with g_object_unref().
29030  *
29031  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
29032  * Since: 2.22
29033  */
29034
29035
29036 /**
29037  * g_socket_get_protocol:
29038  * @socket: a #GSocket.
29039  *
29040  * Gets the socket protocol id the socket was created with.
29041  * In case the protocol is unknown, -1 is returned.
29042  *
29043  * Returns: a protocol id, or -1 if unknown
29044  * Since: 2.22
29045  */
29046
29047
29048 /**
29049  * g_socket_get_remote_address:
29050  * @socket: a #GSocket.
29051  * @error: #GError for error reporting, or %NULL to ignore.
29052  *
29053  * Try to get the remove address of a connected socket. This is only
29054  * useful for connection oriented sockets that have been connected.
29055  * Free the returned object with g_object_unref().
29056  *
29057  * Returns: (transfer full): a #GSocketAddress or %NULL on error.
29058  * Since: 2.22
29059  */
29060
29061
29062 /**
29063  * g_socket_get_socket_type:
29064  * @socket: a #GSocket.
29065  *
29066  * Gets the socket type of the socket.
29067  *
29068  * Returns: a #GSocketType
29069  * Since: 2.22
29070  */
29071
29072
29073 /**
29074  * g_socket_get_timeout:
29075  * @socket: a #GSocket.
29076  *
29077  * Gets the timeout setting of the socket. For details on this, see
29078  * g_socket_set_timeout().
29079  *
29080  * Returns: the timeout in seconds
29081  * Since: 2.26
29082  */
29083
29084
29085 /**
29086  * g_socket_is_closed:
29087  * @socket: a #GSocket
29088  *
29089  * Checks whether a socket is closed.
29090  *
29091  * Returns: %TRUE if socket is closed, %FALSE otherwise
29092  * Since: 2.22
29093  */
29094
29095
29096 /**
29097  * g_socket_is_connected:
29098  * @socket: a #GSocket.
29099  *
29100  * Check whether the socket is connected. This is only useful for
29101  * connection-oriented sockets.
29102  *
29103  * Returns: %TRUE if socket is connected, %FALSE otherwise.
29104  * Since: 2.22
29105  */
29106
29107
29108 /**
29109  * g_socket_listen:
29110  * @socket: a #GSocket.
29111  * @error: #GError for error reporting, or %NULL to ignore.
29112  *
29113  * Marks the socket as a server socket, i.e. a socket that is used
29114  * to accept incoming requests using g_socket_accept().
29115  * Before calling this the socket must be bound to a local address using
29116  * g_socket_bind().
29117  * To set the maximum amount of outstanding clients, use
29118  * g_socket_set_listen_backlog().
29119  *
29120  * Returns: %TRUE on success, %FALSE on error.
29121  * Since: 2.22
29122  */
29123
29124
29125 /**
29126  * g_socket_listener_accept:
29127  * @listener: a #GSocketListener
29128  * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL
29129  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29130  * @error: #GError for error reporting, or %NULL to ignore.
29131  *
29132  * Blocks waiting for a client to connect to any of the sockets added
29133  * to the listener. Returns a #GSocketConnection for the socket that was
29134  * accepted.
29135  * If @source_object is not %NULL it will be filled out with the source
29136  * object specified when the corresponding socket or address was added
29137  * to the listener.
29138  * If @cancellable is not %NULL, then the operation can be cancelled by
29139  * triggering the cancellable object from another thread. If the operation
29140  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
29141  *
29142  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
29143  * Since: 2.22
29144  */
29145
29146
29147 /**
29148  * g_socket_listener_accept_async:
29149  * @listener: a #GSocketListener
29150  * @cancellable: (allow-none): a #GCancellable, or %NULL
29151  * @callback: (scope async): a #GAsyncReadyCallback
29152  * @user_data: (closure): user data for the callback
29153  *
29154  * This is the asynchronous version of g_socket_listener_accept().
29155  * When the operation is finished @callback will be
29156  * called. You can then call g_socket_listener_accept_socket()
29157  * to get the result of the operation.
29158  *
29159  * Since: 2.22
29160  */
29161
29162
29163 /**
29164  * g_socket_listener_accept_finish:
29165  * @listener: a #GSocketListener
29166  * @result: a #GAsyncResult.
29167  * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
29168  * @error: a #GError location to store the error occuring, or %NULL to ignore.
29169  *
29170  * Finishes an async accept operation. See g_socket_listener_accept_async()
29171  *
29172  * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
29173  * Since: 2.22
29174  */
29175
29176
29177 /**
29178  * g_socket_listener_accept_socket:
29179  * @listener: a #GSocketListener
29180  * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL.
29181  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29182  * @error: #GError for error reporting, or %NULL to ignore.
29183  *
29184  * Blocks waiting for a client to connect to any of the sockets added
29185  * to the listener. Returns the #GSocket that was accepted.
29186  * If you want to accept the high-level #GSocketConnection, not a #GSocket,
29187  * which is often the case, then you should use g_socket_listener_accept()
29188  * instead.
29189  * If @source_object is not %NULL it will be filled out with the source
29190  * object specified when the corresponding socket or address was added
29191  * to the listener.
29192  * If @cancellable is not %NULL, then the operation can be cancelled by
29193  * triggering the cancellable object from another thread. If the operation
29194  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
29195  *
29196  * Returns: (transfer full): a #GSocket on success, %NULL on error.
29197  * Since: 2.22
29198  */
29199
29200
29201 /**
29202  * g_socket_listener_accept_socket_async:
29203  * @listener: a #GSocketListener
29204  * @cancellable: (allow-none): a #GCancellable, or %NULL
29205  * @callback: (scope async): a #GAsyncReadyCallback
29206  * @user_data: (closure): user data for the callback
29207  *
29208  * This is the asynchronous version of g_socket_listener_accept_socket().
29209  * When the operation is finished @callback will be
29210  * called. You can then call g_socket_listener_accept_socket_finish()
29211  * to get the result of the operation.
29212  *
29213  * Since: 2.22
29214  */
29215
29216
29217 /**
29218  * g_socket_listener_accept_socket_finish:
29219  * @listener: a #GSocketListener
29220  * @result: a #GAsyncResult.
29221  * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
29222  * @error: a #GError location to store the error occuring, or %NULL to ignore.
29223  *
29224  * Finishes an async accept operation. See g_socket_listener_accept_socket_async()
29225  *
29226  * Returns: (transfer full): a #GSocket on success, %NULL on error.
29227  * Since: 2.22
29228  */
29229
29230
29231 /**
29232  * g_socket_listener_add_address:
29233  * @listener: a #GSocketListener
29234  * @address: a #GSocketAddress
29235  * @type: a #GSocketType
29236  * @protocol: a #GSocketProtocol
29237  * @source_object: (allow-none): Optional #GObject identifying this source
29238  * @effective_address: (out) (allow-none): location to store the address that was bound to, or %NULL.
29239  * @error: #GError for error reporting, or %NULL to ignore.
29240  *
29241  * Creates a socket of type @type and protocol @protocol, binds
29242  * it to @address and adds it to the set of sockets we're accepting
29243  * sockets from.
29244  * Note that adding an IPv6 address, depending on the platform,
29245  * may or may not result in a listener that also accepts IPv4
29246  * connections.  For more determinstic behaviour, see
29247  * g_socket_listener_add_inet_port().
29248  * to accept to identify this particular source, which is
29249  * useful if you're listening on multiple addresses and do
29250  * different things depending on what address is connected to.
29251  * If successful and @effective_address is non-%NULL then it will
29252  * be set to the address that the binding actually occured at.  This
29253  * is helpful for determining the port number that was used for when
29254  * requested, belongs to the caller and must be freed.
29255  *
29256  * Requesting a binding to port 0 (ie: "any port").  This address, if
29257  * Returns: %TRUE on success, %FALSE on error.
29258  * Since: 2.22
29259  */
29260
29261
29262 /**
29263  * g_socket_listener_add_any_inet_port:
29264  * @listener: a #GSocketListener
29265  * @source_object: (allow-none): Optional #GObject identifying this source
29266  * @error: a #GError location to store the error occuring, or %NULL to ignore.
29267  *
29268  * Listens for TCP connections on any available port number for both
29269  * IPv6 and IPv4 (if each are available).
29270  * This is useful if you need to have a socket for incoming connections
29271  * but don't care about the specific port number.
29272  * to accept to identify this particular source, which is
29273  * useful if you're listening on multiple addresses and do
29274  * different things depending on what address is connected to.
29275  *
29276  * Returns: the port number, or 0 in case of failure.
29277  * Since: 2.24
29278  */
29279
29280
29281 /**
29282  * g_socket_listener_add_inet_port:
29283  * @listener: a #GSocketListener
29284  * @port: an IP port number (non-zero)
29285  * @source_object: (allow-none): Optional #GObject identifying this source
29286  * @error: #GError for error reporting, or %NULL to ignore.
29287  *
29288  * Helper function for g_socket_listener_add_address() that
29289  * creates a TCP/IP socket listening on IPv4 and IPv6 (if
29290  * supported) on the specified port on all interfaces.
29291  * to accept to identify this particular source, which is
29292  * useful if you're listening on multiple addresses and do
29293  * different things depending on what address is connected to.
29294  *
29295  * Returns: %TRUE on success, %FALSE on error.
29296  * Since: 2.22
29297  */
29298
29299
29300 /**
29301  * g_socket_listener_add_socket:
29302  * @listener: a #GSocketListener
29303  * @socket: a listening #GSocket
29304  * @source_object: (allow-none): Optional #GObject identifying this source
29305  * @error: #GError for error reporting, or %NULL to ignore.
29306  *
29307  * Adds @socket to the set of sockets that we try to accept
29308  * new clients from. The socket must be bound to a local
29309  * address and listened to.
29310  * to accept to identify this particular source, which is
29311  * useful if you're listening on multiple addresses and do
29312  * different things depending on what address is connected to.
29313  *
29314  * Returns: %TRUE on success, %FALSE on error.
29315  * Since: 2.22
29316  */
29317
29318
29319 /**
29320  * g_socket_listener_close:
29321  * @listener: a #GSocketListener
29322  *
29323  * Closes all the sockets in the listener.
29324  *
29325  * Since: 2.22
29326  */
29327
29328
29329 /**
29330  * g_socket_listener_new:
29331  *
29332  * Creates a new #GSocketListener with no sockets to listen for.
29333  * New listeners can be added with e.g. g_socket_listener_add_address()
29334  * or g_socket_listener_add_inet_port().
29335  *
29336  * Returns: a new #GSocketListener.
29337  * Since: 2.22
29338  */
29339
29340
29341 /**
29342  * g_socket_listener_set_backlog:
29343  * @listener: a #GSocketListener
29344  * @listen_backlog: an integer
29345  *
29346  * Sets the listen backlog on the sockets in the listener.
29347  * See g_socket_set_listen_backlog() for details
29348  *
29349  * Since: 2.22
29350  */
29351
29352
29353 /**
29354  * g_socket_new:
29355  * @family: the socket family to use, e.g. %G_SOCKET_FAMILY_IPV4.
29356  * @type: the socket type to use.
29357  * @protocol: the id of the protocol to use, or 0 for default.
29358  * @error: #GError for error reporting, or %NULL to ignore.
29359  *
29360  * Creates a new #GSocket with the defined family, type and protocol.
29361  * If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type
29362  * for the family and type is used.
29363  * The @protocol is a family and type specific int that specifies what
29364  * kind of protocol to use. #GSocketProtocol lists several common ones.
29365  * Many families only support one protocol, and use 0 for this, others
29366  * support several and using 0 means to use the default protocol for
29367  * the family and type.
29368  * The protocol id is passed directly to the operating
29369  * system, so you can use protocols not listed in #GSocketProtocol if you
29370  * know the protocol number used for it.
29371  * Free the returned object with g_object_unref().
29372  *
29373  * Returns: a #GSocket or %NULL on error.
29374  * Since: 2.22
29375  */
29376
29377
29378 /**
29379  * g_socket_new_from_fd:
29380  * @fd: a native socket file descriptor.
29381  * @error: #GError for error reporting, or %NULL to ignore.
29382  *
29383  * Creates a new #GSocket from a native file descriptor
29384  * or winsock SOCKET handle.
29385  * This reads all the settings from the file descriptor so that
29386  * all properties should work. Note that the file descriptor
29387  * will be set to non-blocking mode, independent on the blocking
29388  * mode of the #GSocket.
29389  * Free the returned object with g_object_unref().
29390  *
29391  * Returns: a #GSocket or %NULL on error.
29392  * Since: 2.22
29393  */
29394
29395
29396 /**
29397  * g_socket_receive:
29398  * @socket: a #GSocket
29399  * @buffer: a buffer to read data into (which should be at least @size bytes long).
29400  * @size: the number of bytes you want to read from the socket
29401  * @cancellable: (allow-none): a %GCancellable or %NULL
29402  * @error: #GError for error reporting, or %NULL to ignore.
29403  *
29404  * Receive data (up to @size bytes) from a socket. This is mainly used by
29405  * connection-oriented sockets; it is identical to g_socket_receive_from()
29406  * with @address set to %NULL.
29407  * For %G_SOCKET_TYPE_DATAGRAM and %G_SOCKET_TYPE_SEQPACKET sockets,
29408  * g_socket_receive() will always read either 0 or 1 complete messages from
29409  * the socket. If the received message is too large to fit in @buffer, then
29410  * the data beyond @size bytes will be discarded, without any explicit
29411  * indication that this has occurred.
29412  * For %G_SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any
29413  * number of bytes, up to @size. If more than @size bytes have been
29414  * received, the additional data will be returned in future calls to
29415  * g_socket_receive().
29416  * If the socket is in blocking mode the call will block until there is
29417  * some data to receive or there is an error. If there is no data available
29418  * and the socket is in non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error
29419  * will be returned. To be notified when data is available, wait for the
29420  * %G_IO_IN condition.
29421  * On error -1 is returned and @error is set accordingly.
29422  *
29423  * Returns: Number of bytes read, or -1 on error
29424  * Since: 2.22
29425  */
29426
29427
29428 /**
29429  * g_socket_receive_from:
29430  * @socket: a #GSocket
29431  * @address: a pointer to a #GSocketAddress pointer, or %NULL
29432  * @buffer: a buffer to read data into (which should be at least @size bytes long).
29433  * @size: the number of bytes you want to read from the socket
29434  * @cancellable: (allow-none): a %GCancellable or %NULL
29435  * @error: #GError for error reporting, or %NULL to ignore.
29436  *
29437  * Receive data (up to @size bytes) from a socket.
29438  * If @address is non-%NULL then @address will be set equal to the
29439  * source address of the received packet.
29440  * See g_socket_receive() for additional information.
29441  *
29442  * Returns: Number of bytes read, or -1 on error
29443  * Since: 2.22
29444  */
29445
29446
29447 /**
29448  * g_socket_receive_message:
29449  * @socket: a #GSocket
29450  * @address: a pointer to a #GSocketAddress pointer, or %NULL
29451  * @vectors: (array length=num_vectors): an array of #GInputVector structs
29452  * @num_vectors: the number of elements in @vectors, or -1
29453  * @messages: (array length=num_messages) (allow-none): a pointer which may be filled with an array of #GSocketControlMessages, or %NULL
29454  * @num_messages: a pointer which will be filled with the number of elements in @messages, or %NULL
29455  * @flags: a pointer to an int containing #GSocketMsgFlags flags
29456  * @cancellable: (allow-none): a %GCancellable or %NULL
29457  * @error: a #GError pointer, or %NULL
29458  *
29459  * Receive data from a socket.  This is the most complicated and
29460  * fully-featured version of this call. For easier use, see
29461  * g_socket_receive() and g_socket_receive_from().
29462  * If @address is non-%NULL then @address will be set equal to the
29463  * source address of the received packet.
29464  * describe the buffers that received data will be scattered into.
29465  * If @num_vectors is -1, then @vectors is assumed to be terminated
29466  * by a #GInputVector with a %NULL buffer pointer.
29467  * As a special case, if @num_vectors is 0 (in which case, @vectors
29468  * may of course be %NULL), then a single byte is received and
29469  * discarded. This is to facilitate the common practice of sending a
29470  * single '\0' byte for the purposes of transferring ancillary data.
29471  * array of #GSocketControlMessage instances or %NULL if no such
29472  * messages was received. These correspond to the control messages
29473  * received from the kernel, one #GSocketControlMessage per message
29474  * from the kernel. This array is %NULL-terminated and must be freed
29475  * by the caller using g_free() after calling g_object_unref() on each
29476  * element. If @messages is %NULL, any control messages received will
29477  * be discarded.
29478  * messages received.
29479  * If both @messages and @num_messages are non-%NULL, then
29480  * for this are available in the #GSocketMsgFlags enum, but the
29481  * values there are the same as the system values, and the flags
29482  * are passed in as-is, so you can pass in system-specific flags too
29483  * (and g_socket_receive_message() may pass system-specific flags out).
29484  * As with g_socket_receive(), data may be discarded if @socket is
29485  * %G_SOCKET_TYPE_DATAGRAM or %G_SOCKET_TYPE_SEQPACKET and you do not
29486  * provide enough buffer space to read a complete message. You can pass
29487  * %G_SOCKET_MSG_PEEK in @flags to peek at the current message without
29488  * removing it from the receive queue, but there is no portable way to find
29489  * out the length of the message other than by reading it into a
29490  * sufficiently-large buffer.
29491  * If the socket is in blocking mode the call will block until there
29492  * is some data to receive or there is an error. If there is no data
29493  * available and the socket is in non-blocking mode, a
29494  * %G_IO_ERROR_WOULD_BLOCK error will be returned. To be notified when
29495  * data is available, wait for the %G_IO_IN condition.
29496  * On error -1 is returned and @error is set accordingly.
29497  *
29498  * In @messages (ie: not including the %NULL terminator).
29499  * Returns: Number of bytes read, or -1 on error
29500  * Since: 2.22
29501  */
29502
29503
29504 /**
29505  * g_socket_receive_with_blocking:
29506  * @socket: a #GSocket
29507  * @buffer: a buffer to read data into (which should be at least @size bytes long).
29508  * @size: the number of bytes you want to read from the socket
29509  * @blocking: whether to do blocking or non-blocking I/O
29510  * @cancellable: (allow-none): a %GCancellable or %NULL
29511  * @error: #GError for error reporting, or %NULL to ignore.
29512  *
29513  * This behaves exactly the same as g_socket_receive(), except that
29514  * the choice of blocking or non-blocking behavior is determined by
29515  * the @blocking argument rather than by @socket's properties.
29516  *
29517  * Returns: Number of bytes read, or -1 on error
29518  * Since: 2.26
29519  */
29520
29521
29522 /**
29523  * g_socket_send:
29524  * @socket: a #GSocket
29525  * @buffer: (array length=size): the buffer containing the data to send.
29526  * @size: the number of bytes to send
29527  * @cancellable: (allow-none): a %GCancellable or %NULL
29528  * @error: #GError for error reporting, or %NULL to ignore.
29529  *
29530  * Tries to send @size bytes from @buffer on the socket. This is
29531  * mainly used by connection-oriented sockets; it is identical to
29532  * g_socket_send_to() with @address set to %NULL.
29533  * If the socket is in blocking mode the call will block until there is
29534  * space for the data in the socket queue. If there is no space available
29535  * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
29536  * will be returned. To be notified when space is available, wait for the
29537  * %G_IO_OUT condition. Note though that you may still receive
29538  * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
29539  * notified of a %G_IO_OUT condition. (On Windows in particular, this is
29540  * very common due to the way the underlying APIs work.)
29541  * On error -1 is returned and @error is set accordingly.
29542  * on error
29543  *
29544  * Returns: Number of bytes written (which may be less than @size), or -1
29545  * Since: 2.22
29546  */
29547
29548
29549 /**
29550  * g_socket_send_message:
29551  * @socket: a #GSocket
29552  * @address: a #GSocketAddress, or %NULL
29553  * @vectors: (array length=num_vectors): an array of #GOutputVector structs
29554  * @num_vectors: the number of elements in @vectors, or -1
29555  * @messages: (array length=num_messages) (allow-none): a pointer to an array of #GSocketControlMessages, or %NULL.
29556  * @num_messages: number of elements in @messages, or -1.
29557  * @flags: an int containing #GSocketMsgFlags flags
29558  * @cancellable: (allow-none): a %GCancellable or %NULL
29559  * @error: #GError for error reporting, or %NULL to ignore.
29560  *
29561  * Send data to @address on @socket.  This is the most complicated and
29562  * fully-featured version of this call. For easier use, see
29563  * g_socket_send() and g_socket_send_to().
29564  * If @address is %NULL then the message is sent to the default receiver
29565  * (set by g_socket_connect()).
29566  * then @vectors is assumed to be terminated by a #GOutputVector with a
29567  * %NULL buffer pointer.) The #GOutputVector structs describe the buffers
29568  * that the sent data will be gathered from. Using multiple
29569  * #GOutputVector<!-- -->s is more memory-efficient than manually copying
29570  * data from multiple sources into a single buffer, and more
29571  * network-efficient than making multiple calls to g_socket_send().
29572  * #GSocketControlMessage instances. These correspond to the control
29573  * messages to be sent on the socket.
29574  * If @num_messages is -1 then @messages is treated as a %NULL-terminated
29575  * array.
29576  * for this are available in the #GSocketMsgFlags enum, but the
29577  * values there are the same as the system values, and the flags
29578  * are passed in as-is, so you can pass in system-specific flags too.
29579  * If the socket is in blocking mode the call will block until there is
29580  * space for the data in the socket queue. If there is no space available
29581  * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
29582  * will be returned. To be notified when space is available, wait for the
29583  * %G_IO_OUT condition. Note though that you may still receive
29584  * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
29585  * notified of a %G_IO_OUT condition. (On Windows in particular, this is
29586  * very common due to the way the underlying APIs work.)
29587  * On error -1 is returned and @error is set accordingly.
29588  * on error
29589  *
29590  * Returns: Number of bytes written (which may be less than @size), or -1
29591  * Since: 2.22
29592  */
29593
29594
29595 /**
29596  * g_socket_send_to:
29597  * @socket: a #GSocket
29598  * @address: a #GSocketAddress, or %NULL
29599  * @buffer: (array length=size): the buffer containing the data to send.
29600  * @size: the number of bytes to send
29601  * @cancellable: (allow-none): a %GCancellable or %NULL
29602  * @error: #GError for error reporting, or %NULL to ignore.
29603  *
29604  * Tries to send @size bytes from @buffer to @address. If @address is
29605  * %NULL then the message is sent to the default receiver (set by
29606  * g_socket_connect()).
29607  * See g_socket_send() for additional information.
29608  * on error
29609  *
29610  * Returns: Number of bytes written (which may be less than @size), or -1
29611  * Since: 2.22
29612  */
29613
29614
29615 /**
29616  * g_socket_send_with_blocking:
29617  * @socket: a #GSocket
29618  * @buffer: (array length=size): the buffer containing the data to send.
29619  * @size: the number of bytes to send
29620  * @blocking: whether to do blocking or non-blocking I/O
29621  * @cancellable: (allow-none): a %GCancellable or %NULL
29622  * @error: #GError for error reporting, or %NULL to ignore.
29623  *
29624  * This behaves exactly the same as g_socket_send(), except that
29625  * the choice of blocking or non-blocking behavior is determined by
29626  * the @blocking argument rather than by @socket's properties.
29627  * on error
29628  *
29629  * Returns: Number of bytes written (which may be less than @size), or -1
29630  * Since: 2.26
29631  */
29632
29633
29634 /**
29635  * g_socket_service_is_active:
29636  * @service: a #GSocketService
29637  *
29638  * Check whether the service is active or not. An active
29639  * service will accept new clients that connect, while
29640  * a non-active service will let connecting clients queue
29641  * up until the service is started.
29642  *
29643  * Returns: %TRUE if the service is active, %FALSE otherwise
29644  * Since: 2.22
29645  */
29646
29647
29648 /**
29649  * g_socket_service_new:
29650  *
29651  * Creates a new #GSocketService with no sockets to listen for.
29652  * New listeners can be added with e.g. g_socket_listener_add_address()
29653  * or g_socket_listener_add_inet_port().
29654  *
29655  * Returns: a new #GSocketService.
29656  * Since: 2.22
29657  */
29658
29659
29660 /**
29661  * g_socket_service_start:
29662  * @service: a #GSocketService
29663  *
29664  * Starts the service, i.e. start accepting connections
29665  * from the added sockets when the mainloop runs.
29666  * This call is threadsafe, so it may be called from a thread
29667  * handling an incomming client request.
29668  *
29669  * Since: 2.22
29670  */
29671
29672
29673 /**
29674  * g_socket_service_stop:
29675  * @service: a #GSocketService
29676  *
29677  * Stops the service, i.e. stops accepting connections
29678  * from the added sockets when the mainloop runs.
29679  * This call is threadsafe, so it may be called from a thread
29680  * handling an incomming client request.
29681  *
29682  * Since: 2.22
29683  */
29684
29685
29686 /**
29687  * g_socket_set_blocking:
29688  * @socket: a #GSocket.
29689  * @blocking: Whether to use blocking I/O or not.
29690  *
29691  * Sets the blocking mode of the socket. In blocking mode
29692  * all operations block until they succeed or there is an error. In
29693  * non-blocking mode all functions return results immediately or
29694  * with a %G_IO_ERROR_WOULD_BLOCK error.
29695  * All sockets are created in blocking mode. However, note that the
29696  * platform level socket is always non-blocking, and blocking mode
29697  * is a GSocket level feature.
29698  *
29699  * Since: 2.22
29700  */
29701
29702
29703 /**
29704  * g_socket_set_keepalive:
29705  * @socket: a #GSocket.
29706  * @keepalive: Value for the keepalive flag
29707  *
29708  * Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When
29709  * this flag is set on a socket, the system will attempt to verify that the
29710  * remote socket endpoint is still present if a sufficiently long period of
29711  * time passes with no data being exchanged. If the system is unable to
29712  * verify the presence of the remote endpoint, it will automatically close
29713  * the connection.
29714  * This option is only functional on certain kinds of sockets. (Notably,
29715  * %G_SOCKET_PROTOCOL_TCP sockets.)
29716  * The exact time between pings is system- and protocol-dependent, but will
29717  * normally be at least two hours. Most commonly, you would set this flag
29718  * on a server socket if you want to allow clients to remain idle for long
29719  * periods of time, but also want to ensure that connections are eventually
29720  * garbage-collected if clients crash or become unreachable.
29721  *
29722  * Since: 2.22
29723  */
29724
29725
29726 /**
29727  * g_socket_set_listen_backlog:
29728  * @socket: a #GSocket.
29729  * @backlog: the maximum number of pending connections.
29730  *
29731  * Sets the maximum number of outstanding connections allowed
29732  * when listening on this socket. If more clients than this are
29733  * connecting to the socket and the application is not handling them
29734  * on time then the new connections will be refused.
29735  * Note that this must be called before g_socket_listen() and has no
29736  * effect if called after that.
29737  *
29738  * Since: 2.22
29739  */
29740
29741
29742 /**
29743  * g_socket_set_timeout:
29744  * @socket: a #GSocket.
29745  * @timeout: the timeout for @socket, in seconds, or 0 for none
29746  *
29747  * Sets the time in seconds after which I/O operations on @socket will
29748  * time out if they have not yet completed.
29749  * On a blocking socket, this means that any blocking #GSocket
29750  * operation will time out after @timeout seconds of inactivity,
29751  * returning %G_IO_ERROR_TIMED_OUT.
29752  * On a non-blocking socket, calls to g_socket_condition_wait() will
29753  * also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources
29754  * created with g_socket_create_source() will trigger after
29755  * set, at which point calling g_socket_receive(), g_socket_send(),
29756  * g_socket_check_connect_result(), etc, will fail with
29757  * %G_IO_ERROR_TIMED_OUT.
29758  * If @timeout is 0 (the default), operations will never time out
29759  * on their own.
29760  * Note that if an I/O operation is interrupted by a signal, this may
29761  * cause the timeout to be reset.
29762  *
29763  * Since: 2.26
29764  */
29765
29766
29767 /**
29768  * g_socket_shutdown:
29769  * @socket: a #GSocket
29770  * @shutdown_read: whether to shut down the read side
29771  * @shutdown_write: whether to shut down the write side
29772  * @error: #GError for error reporting, or %NULL to ignore.
29773  *
29774  * Shut down part of a full-duplex connection.
29775  * If @shutdown_read is %TRUE then the recieving side of the connection
29776  * is shut down, and further reading is disallowed.
29777  * If @shutdown_write is %TRUE then the sending side of the connection
29778  * is shut down, and further writing is disallowed.
29779  * It is allowed for both @shutdown_read and @shutdown_write to be %TRUE.
29780  * One example where this is used is graceful disconnect for TCP connections
29781  * where you close the sending side, then wait for the other side to close
29782  * the connection, thus ensuring that the other side saw all sent data.
29783  *
29784  * Returns: %TRUE on success, %FALSE on error
29785  * Since: 2.22
29786  */
29787
29788
29789 /**
29790  * g_socket_speaks_ipv4:
29791  * @socket: a #GSocket
29792  *
29793  * Checks if a socket is capable of speaking IPv4.
29794  * IPv4 sockets are capable of speaking IPv4.  On some operating systems
29795  * and under some combinations of circumstances IPv6 sockets are also
29796  * capable of speaking IPv4.  See RFC 3493 section 3.7 for more
29797  * information.
29798  * No other types of sockets are currently considered as being capable
29799  * of speaking IPv4.
29800  *
29801  * Returns: %TRUE if this socket can be used with IPv4.
29802  * Since: 2.22
29803  */
29804
29805
29806 /**
29807  * g_srv_target_copy:
29808  * @target: a #GSrvTarget
29809  *
29810  * Copies @target
29811  *
29812  * Returns: a copy of @target
29813  * Since: 2.22
29814  */
29815
29816
29817 /**
29818  * g_srv_target_free:
29819  * @target: a #GSrvTarget
29820  *
29821  * Frees @target
29822  *
29823  * Since: 2.22
29824  */
29825
29826
29827 /**
29828  * g_srv_target_get_hostname:
29829  * @target: a #GSrvTarget
29830  *
29831  * Gets @target's hostname (in ASCII form; if you are going to present
29832  * this to the user, you should use g_hostname_is_ascii_encoded() to
29833  * check if it contains encoded Unicode segments, and use
29834  * g_hostname_to_unicode() to convert it if it does.)
29835  *
29836  * Returns: @target's hostname
29837  * Since: 2.22
29838  */
29839
29840
29841 /**
29842  * g_srv_target_get_port:
29843  * @target: a #GSrvTarget
29844  *
29845  * Gets @target's port
29846  *
29847  * Returns: @target's port
29848  * Since: 2.22
29849  */
29850
29851
29852 /**
29853  * g_srv_target_get_priority:
29854  * @target: a #GSrvTarget
29855  *
29856  * Gets @target's priority. You should not need to look at this;
29857  * #GResolver already sorts the targets according to the algorithm in
29858  * RFC 2782.
29859  *
29860  * Returns: @target's priority
29861  * Since: 2.22
29862  */
29863
29864
29865 /**
29866  * g_srv_target_get_weight:
29867  * @target: a #GSrvTarget
29868  *
29869  * Gets @target's weight. You should not need to look at this;
29870  * #GResolver already sorts the targets according to the algorithm in
29871  * RFC 2782.
29872  *
29873  * Returns: @target's weight
29874  * Since: 2.22
29875  */
29876
29877
29878 /**
29879  * g_srv_target_list_sort: (skip)
29880  * @targets: a #GList of #GSrvTarget
29881  *
29882  * Sorts @targets in place according to the algorithm in RFC 2782.
29883  *
29884  * Returns: (transfer full): the head of the sorted list.
29885  * Since: 2.22
29886  */
29887
29888
29889 /**
29890  * g_srv_target_new:
29891  * @hostname: the host that the service is running on
29892  * @port: the port that the service is running on
29893  * @priority: the target's priority
29894  * @weight: the target's weight
29895  *
29896  * Creates a new #GSrvTarget with the given parameters.
29897  * You should not need to use this; normally #GSrvTarget<!-- -->s are
29898  * created by #GResolver.
29899  *
29900  * Returns: a new #GSrvTarget.
29901  * Since: 2.22
29902  */
29903
29904
29905 /**
29906  * g_tcp_connection_get_graceful_disconnect:
29907  * @connection: a #GTcpConnection
29908  *
29909  * Checks if graceful disconnects are used. See
29910  * g_tcp_connection_set_graceful_disconnect().
29911  *
29912  * Returns: %TRUE if graceful disconnect is used on close, %FALSE otherwise
29913  * Since: 2.22
29914  */
29915
29916
29917 /**
29918  * g_tcp_connection_set_graceful_disconnect:
29919  * @connection: a #GTcpConnection
29920  * @graceful_disconnect: Whether to do graceful disconnects or not
29921  *
29922  * This enabled graceful disconnects on close. A graceful disconnect
29923  * means that we signal the recieving end that the connection is terminated
29924  * and wait for it to close the connection before closing the connection.
29925  * A graceful disconnect means that we can be sure that we successfully sent
29926  * all the outstanding data to the other end, or get an error reported.
29927  * However, it also means we have to wait for all the data to reach the
29928  * other side and for it to acknowledge this by closing the socket, which may
29929  * take a while. For this reason it is disabled by default.
29930  *
29931  * Since: 2.22
29932  */
29933
29934
29935 /**
29936  * g_tcp_wrapper_connection_get_base_io_stream:
29937  * @conn: a #GTcpWrapperConnection
29938  *
29939  * Get's @conn's base #GIOStream
29940  *
29941  * Returns: (transfer none): @conn's base #GIOStream
29942  */
29943
29944
29945 /**
29946  * g_tcp_wrapper_connection_new:
29947  * @base_io_stream: the #GIOStream to wrap
29948  * @socket: the #GSocket associated with @base_io_stream
29949  *
29950  * Wraps @base_io_stream and @socket together as a #GSocketConnection.
29951  *
29952  * Returns: the new #GSocketConnection.
29953  * Since: 2.28
29954  */
29955
29956
29957 /**
29958  * g_themed_icon_append_name:
29959  * @icon: a #GThemedIcon
29960  * @iconname: name of icon to append to list of icons from within @icon.
29961  *
29962  * Append a name to the list of icons from within @icon.
29963  * <note><para>
29964  * Note that doing so invalidates the hash computed by prior calls
29965  * to g_icon_hash().
29966  * </para></note>
29967  */
29968
29969
29970 /**
29971  * g_themed_icon_get_names:
29972  * @icon: a #GThemedIcon.
29973  *
29974  * Gets the names of icons from within @icon.
29975  *
29976  * Returns: (transfer none): a list of icon names.
29977  */
29978
29979
29980 /**
29981  * g_themed_icon_new:
29982  * @iconname: a string containing an icon name.
29983  *
29984  * Creates a new themed icon for @iconname.
29985  *
29986  * Returns: (transfer full): a new #GThemedIcon.
29987  */
29988
29989
29990 /**
29991  * g_themed_icon_new_from_names:
29992  * @iconnames: (array length=len): an array of strings containing icon names.
29993  * @len: the length of the @iconnames array, or -1 if @iconnames is %NULL-terminated
29994  *
29995  * Creates a new themed icon for @iconnames.
29996  *
29997  * Returns: (transfer full): a new #GThemedIcon
29998  */
29999
30000
30001 /**
30002  * g_themed_icon_new_with_default_fallbacks:
30003  * @iconname: a string containing an icon name
30004  *
30005  * Creates a new themed icon for @iconname, and all the names
30006  * that can be created by shortening @iconname at '-' characters.
30007  * In the following example, @icon1 and @icon2 are equivalent:
30008  * |[
30009  * const char *names[] = {
30010  * "gnome-dev-cdrom-audio",
30011  * "gnome-dev-cdrom",
30012  * "gnome-dev",
30013  * "gnome"
30014  * };
30015  * icon1 = g_themed_icon_new_from_names (names, 4);
30016  * icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
30017  * ]|
30018  *
30019  * Returns: (transfer full): a new #GThemedIcon.
30020  */
30021
30022
30023 /**
30024  * g_themed_icon_prepend_name:
30025  * @icon: a #GThemedIcon
30026  * @iconname: name of icon to prepend to list of icons from within @icon.
30027  *
30028  * Prepend a name to the list of icons from within @icon.
30029  * <note><para>
30030  * Note that doing so invalidates the hash computed by prior calls
30031  * to g_icon_hash().
30032  * </para></note>
30033  *
30034  * Since: 2.18
30035  */
30036
30037
30038 /**
30039  * g_threaded_socket_service_new:
30040  * @max_threads: the maximal number of threads to execute concurrently handling incoming clients, -1 means no limit
30041  *
30042  * Creates a new #GThreadedSocketService with no listeners. Listeners
30043  * must be added with g_socket_service_add_listeners().
30044  *
30045  * Returns: a new #GSocketService.
30046  * Since: 2.22
30047  */
30048
30049
30050 /**
30051  * g_tls_backend_get_certificate_type:
30052  * @backend: the #GTlsBackend
30053  *
30054  * Gets the #GType of @backend's #GTlsCertificate implementation.
30055  * implementation.
30056  *
30057  * Returns: the #GType of @backend's #GTlsCertificate
30058  * Since: 2.28
30059  */
30060
30061
30062 /**
30063  * g_tls_backend_get_client_connection_type:
30064  * @backend: the #GTlsBackend
30065  *
30066  * Gets the #GType of @backend's #GTlsClientConnection implementation.
30067  * implementation.
30068  *
30069  * Returns: the #GType of @backend's #GTlsClientConnection
30070  * Since: 2.28
30071  */
30072
30073
30074 /**
30075  * g_tls_backend_get_default:
30076  *
30077  * Gets the default #GTlsBackend for the system.
30078  *
30079  * Returns: (transfer none): a #GTlsBackend
30080  * Since: 2.28
30081  */
30082
30083
30084 /**
30085  * g_tls_backend_get_server_connection_type:
30086  * @backend: the #GTlsBackend
30087  *
30088  * Gets the #GType of @backend's #GTlsServerConnection implementation.
30089  * implementation.
30090  *
30091  * Returns: the #GType of @backend's #GTlsServerConnection
30092  * Since: 2.28
30093  */
30094
30095
30096 /**
30097  * g_tls_backend_supports_tls:
30098  * @backend: the #GTlsBackend
30099  *
30100  * Checks if TLS is supported; if this returns %FALSE for the default
30101  * #GTlsBackend, it means no "real" TLS backend is available.
30102  *
30103  * Returns: whether or not TLS is supported
30104  * Since: 2.28
30105  */
30106
30107
30108 /**
30109  * g_tls_certificate_get_issuer:
30110  * @cert: a #GTlsCertificate
30111  *
30112  * Gets the #GTlsCertificate representing @cert's issuer, if known
30113  * or %NULL if @cert is self-signed or signed with an unknown
30114  * certificate.
30115  *
30116  * Returns: (transfer none): The certificate of @cert's issuer,
30117  * Since: 2.28
30118  */
30119
30120
30121 /**
30122  * g_tls_certificate_list_new_from_file:
30123  * @file: file containing PEM-encoded certificates to import
30124  * @error: #GError for error reporting, or %NULL to ignore.
30125  *
30126  * Creates one or more #GTlsCertificate<!-- -->s from the PEM-encoded
30127  * data in @file. If @file cannot be read or parsed, the function will
30128  * return %NULL and set @error. If @file does not contain any
30129  * PEM-encoded certificates, this will return an empty list and not
30130  * set @error.
30131  * #GList containing #GTlsCertificate objects. You must free the list
30132  * and its contents when you are done with it.
30133  *
30134  * Returns: (element-type Gio.TlsCertificate) (transfer full): a
30135  * Since: 2.28
30136  */
30137
30138
30139 /**
30140  * g_tls_certificate_new_from_file:
30141  * @file: file containing a PEM-encoded certificate to import
30142  * @error: #GError for error reporting, or %NULL to ignore.
30143  *
30144  * Creates a #GTlsCertificate from the PEM-encoded data in @file. If
30145  * set @error. Otherwise, this behaves like g_tls_certificate_new().
30146  *
30147  * Returns: the new certificate, or %NULL on error
30148  * Since: 2.28
30149  */
30150
30151
30152 /**
30153  * g_tls_certificate_new_from_files:
30154  * @cert_file: file containing a PEM-encoded certificate to import
30155  * @key_file: file containing a PEM-encoded private key to import
30156  * @error: #GError for error reporting, or %NULL to ignore.
30157  *
30158  * Creates a #GTlsCertificate from the PEM-encoded data in @cert_file
30159  * and @key_file. If either file cannot be read or parsed, the
30160  * function will return %NULL and set @error. Otherwise, this behaves
30161  * like g_tls_certificate_new().
30162  *
30163  * Returns: the new certificate, or %NULL on error
30164  * Since: 2.28
30165  */
30166
30167
30168 /**
30169  * g_tls_certificate_new_from_pem:
30170  * @data: PEM-encoded certificate data
30171  * @length: the length of @data, or -1 if it's 0-terminated.
30172  * @error: #GError for error reporting, or %NULL to ignore.
30173  *
30174  * Creates a new #GTlsCertificate from the PEM-encoded data in @data.
30175  * If @data includes both a certificate and a private key, then the
30176  * returned certificate will include the private key data as well.
30177  * If @data includes multiple certificates, only the first one will be
30178  * parsed.
30179  *
30180  * Returns: the new certificate, or %NULL if @data is invalid
30181  * Since: 2.28
30182  */
30183
30184
30185 /**
30186  * g_tls_certificate_verify:
30187  * @cert: a #GTlsCertificate
30188  * @identity: (allow-none): the expected peer identity
30189  * @trusted_ca: (allow-none): the certificate of a trusted authority
30190  *
30191  * This verifies @cert and returns a set of #GTlsCertificateFlags
30192  * indicating any problems found with it. This can be used to verify a
30193  * certificate outside the context of making a connection, or to
30194  * check a certificate against a CA that is not part of the system
30195  * CA database.
30196  * If @identity is not %NULL, @cert's name(s) will be compared against
30197  * it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return
30198  * value if it does not match. If @identity is %NULL, that bit will
30199  * never be set in the return value.
30200  * If @trusted_ca is not %NULL, then @cert (or one of the certificates
30201  * in its chain) must be signed by it, or else
30202  * %G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If
30203  * value.
30204  * (All other #GTlsCertificateFlags values will always be set or unset
30205  * as appropriate.)
30206  *
30207  * Returns: the appropriate #GTlsCertificateFlags
30208  * Since: 2.28
30209  */
30210
30211
30212 /**
30213  * g_tls_client_connection_get_accepted_cas:
30214  * @conn: the #GTlsClientConnection
30215  *
30216  * Gets the list of distinguished names of the Certificate Authorities
30217  * that the server will accept certificates from. This will be set
30218  * during the TLS handshake if the server requests a certificate.
30219  * Otherwise, it will be %NULL.
30220  * Each item in the list is a #GByteArray which contains the complete
30221  * subject DN of the certificate authority.
30222  * CA DNs. You should unref each element with g_byte_array_unref() and then
30223  * the free the list with g_list_free().
30224  *
30225  * Returns: (element-type GByteArray) (transfer full): the list of
30226  * Since: 2.28
30227  */
30228
30229
30230 /**
30231  * g_tls_client_connection_get_server_identity:
30232  * @conn: the #GTlsClientConnection
30233  *
30234  * Gets @conn's expected server identity
30235  * expected server identity, or %NULL if the expected identity is not
30236  * known.
30237  *
30238  * Returns: (transfer none): a #GSocketConnectable describing the
30239  * Since: 2.28
30240  */
30241
30242
30243 /**
30244  * g_tls_client_connection_get_use_ssl3:
30245  * @conn: the #GTlsClientConnection
30246  *
30247  * Gets whether @conn will use SSL 3.0 rather than the
30248  * highest-supported version of TLS; see
30249  * g_tls_client_connection_set_use_ssl3().
30250  *
30251  * Returns: whether @conn will use SSL 3.0
30252  * Since: 2.28
30253  */
30254
30255
30256 /**
30257  * g_tls_client_connection_get_validation_flags:
30258  * @conn: the #GTlsClientConnection
30259  *
30260  * Gets @conn's validation flags
30261  *
30262  * Returns: the validation flags
30263  * Since: 2.28
30264  */
30265
30266
30267 /**
30268  * g_tls_client_connection_new:
30269  * @base_io_stream: the #GIOStream to wrap
30270  * @server_identity: (allow-none): the expected identity of the server
30271  * @error: #GError for error reporting, or %NULL to ignore.
30272  *
30273  * Creates a new #GTlsClientConnection wrapping @base_io_stream (which
30274  * must have pollable input and output streams) which is assumed to
30275  * communicate with the server identified by @server_identity.
30276  *
30277  * Returns: the new #GTlsClientConnection, or %NULL on error
30278  * Since: 2.28
30279  */
30280
30281
30282 /**
30283  * g_tls_client_connection_set_server_identity:
30284  * @conn: the #GTlsClientConnection
30285  * @identity: a #GSocketConnectable describing the expected server identity
30286  *
30287  * Sets @conn's expected server identity, which is used both to tell
30288  * servers on virtual hosts which certificate to present, and also
30289  * to let @conn know what name to look for in the certificate when
30290  * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.
30291  *
30292  * Since: 2.28
30293  */
30294
30295
30296 /**
30297  * g_tls_client_connection_set_use_ssl3:
30298  * @conn: the #GTlsClientConnection
30299  * @use_ssl3: whether to use SSL 3.0
30300  *
30301  * If @use_ssl3 is %TRUE, this forces @conn to use SSL 3.0 rather than
30302  * trying to properly negotiate the right version of TLS or SSL to use.
30303  * This can be used when talking to servers that do not implement the
30304  * fallbacks correctly and which will therefore fail to handshake with
30305  * a "modern" TLS handshake attempt.
30306  *
30307  * Since: 2.28
30308  */
30309
30310
30311 /**
30312  * g_tls_client_connection_set_validation_flags:
30313  * @conn: the #GTlsClientConnection
30314  * @flags: the #GTlsCertificateFlags to use
30315  *
30316  * Sets @conn's validation flags, to override the default set of
30317  * checks performed when validating a server certificate. By default,
30318  * %G_TLS_CERTIFICATE_VALIDATE_ALL is used.
30319  *
30320  * Since: 2.28
30321  */
30322
30323
30324 /**
30325  * g_tls_connection_emit_accept_certificate:
30326  * @conn: a #GTlsConnection
30327  * @peer_cert: the peer's #GTlsCertificate
30328  * @errors: the problems with @peer_cert
30329  *
30330  * Used by #GTlsConnection implementations to emit the
30331  * #GTlsConnection::accept-certificate signal.
30332  * %TRUE to accept @peer_cert
30333  *
30334  * Returns: %TRUE if one of the signal handlers has returned
30335  * Since: 2.28
30336  */
30337
30338
30339 /**
30340  * g_tls_connection_get_certificate:
30341  * @conn: a #GTlsConnection
30342  *
30343  * Gets @conn's certificate, as set by
30344  * g_tls_connection_set_certificate().
30345  *
30346  * Returns: (transfer none): @conn's certificate, or %NULL
30347  * Since: 2.28
30348  */
30349
30350
30351 /**
30352  * g_tls_connection_get_peer_certificate:
30353  * @conn: a #GTlsConnection
30354  *
30355  * Gets @conn's peer's certificate after the handshake has completed.
30356  * (It is not set during the emission of
30357  * #GTlsConnection::accept-certificate.)
30358  *
30359  * Returns: (transfer none): @conn's peer's certificate, or %NULL
30360  * Since: 2.28
30361  */
30362
30363
30364 /**
30365  * g_tls_connection_get_peer_certificate_errors:
30366  * @conn: a #GTlsConnection
30367  *
30368  * Gets the errors associated with validating @conn's peer's
30369  * certificate, after the handshake has completed. (It is not set
30370  * during the emission of #GTlsConnection::accept-certificate.)
30371  *
30372  * Returns: @conn's peer's certificate errors
30373  * Since: 2.28
30374  */
30375
30376
30377 /**
30378  * g_tls_connection_get_rehandshake_mode:
30379  * @conn: a #GTlsConnection
30380  *
30381  * Gets @conn rehandshaking mode. See
30382  * g_tls_connection_set_rehandshake() for details.
30383  *
30384  * Returns: @conn's rehandshaking mode
30385  * Since: 2.28
30386  */
30387
30388
30389 /**
30390  * g_tls_connection_get_require_close_notify:
30391  * @conn: a #GTlsConnection
30392  *
30393  * Tests whether or not @conn expects a proper TLS close notification
30394  * when the connection is closed. See
30395  * g_tls_connection_set_require_close_notify() for details.
30396  * notification.
30397  *
30398  * Returns: %TRUE if @conn requires a proper TLS close
30399  * Since: 2.28
30400  */
30401
30402
30403 /**
30404  * g_tls_connection_get_use_system_certdb:
30405  * @conn: a #GTlsConnection
30406  *
30407  * Gets whether @conn uses the system certificate database to verify
30408  * peer certificates. See g_tls_connection_set_use_system_certdb().
30409  *
30410  * Returns: whether @conn uses the system certificate database
30411  * Since: 2.28
30412  */
30413
30414
30415 /**
30416  * g_tls_connection_handshake:
30417  * @conn: a #GTlsConnection
30418  * @cancellable: a #GCancellable, or %NULL
30419  * @error: a #GError, or %NULL
30420  *
30421  * Attempts a TLS handshake on @conn.
30422  * On the client side, it is never necessary to call this method;
30423  * although the connection needs to perform a handshake after
30424  * connecting (or after sending a "STARTTLS"-type command) and may
30425  * need to rehandshake later if the server requests it,
30426  * #GTlsConnection will handle this for you automatically when you try
30427  * to send or receive data on the connection. However, you can call
30428  * g_tls_connection_handshake() manually if you want to know for sure
30429  * whether the initial handshake succeeded or failed (as opposed to
30430  * just immediately trying to write to @conn's output stream, in which
30431  * case if it fails, it may not be possible to tell if it failed
30432  * before or after completing the handshake).
30433  * Likewise, on the server side, although a handshake is necessary at
30434  * the beginning of the communication, you do not need to call this
30435  * function explicitly unless you want clearer error reporting.
30436  * However, you may call g_tls_connection_handshake() later on to
30437  * renegotiate parameters (encryption methods, etc) with the client.
30438  * #GTlsConnection::accept_certificate may be emitted during the
30439  * handshake.
30440  *
30441  * Returns: success or failure
30442  * Since: 2.28
30443  */
30444
30445
30446 /**
30447  * g_tls_connection_handshake_async:
30448  * @conn: a #GTlsConnection
30449  * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
30450  * @cancellable: a #GCancellable, or %NULL
30451  * @callback: callback to call when the handshake is complete
30452  * @user_data: the data to pass to the callback function
30453  *
30454  * Asynchronously performs a TLS handshake on @conn. See
30455  * g_tls_connection_handshake() for more information.
30456  *
30457  * Since: 2.28
30458  */
30459
30460
30461 /**
30462  * g_tls_connection_handshake_finish:
30463  * @conn: a #GTlsConnection
30464  * @result: a #GAsyncResult.
30465  * @error: a #GError pointer, or %NULL
30466  *
30467  * Finish an asynchronous TLS handshake operation. See
30468  * g_tls_connection_handshake() for more information.
30469  * case @error will be set.
30470  *
30471  * Returns: %TRUE on success, %FALSE on failure, in which
30472  * Since: 2.28
30473  */
30474
30475
30476 /**
30477  * g_tls_connection_set_certificate:
30478  * @conn: a #GTlsConnection
30479  * @certificate: the certificate to use for @conn
30480  *
30481  * This sets the certificate that @conn will present to its peer
30482  * during the TLS handshake. For a #GTlsServerConnection, it is
30483  * mandatory to set this, and that will normally be done at construct
30484  * time.
30485  * For a #GTlsClientConnection, this is optional. If a handshake fails
30486  * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server
30487  * requires a certificate, and if you try connecting again, you should
30488  * call this method first. You can call
30489  * g_tls_client_connection_get_accepted_cas() on the failed connection
30490  * to get a list of Certificate Authorities that the server will
30491  * accept certificates from.
30492  * (It is also possible that a server will allow the connection with
30493  * or without a certificate; in that case, if you don't provide a
30494  * certificate, you can tell that the server requested one by the fact
30495  * that g_tls_client_connection_get_accepted_cas() will return
30496  * non-%NULL.)
30497  *
30498  * Since: 2.28
30499  */
30500
30501
30502 /**
30503  * g_tls_connection_set_rehandshake_mode:
30504  * @conn: a #GTlsConnection
30505  * @mode: the rehandshaking mode
30506  *
30507  * Sets how @conn behaves with respect to rehandshaking requests.
30508  * %G_TLS_REHANDSHAKE_NEVER means that it will never agree to
30509  * rehandshake after the initial handshake is complete. (For a client,
30510  * this means it will refuse rehandshake requests from the server, and
30511  * for a server, this means it will close the connection with an error
30512  * if the client attempts to rehandshake.)
30513  * %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a
30514  * rehandshake only if the other end of the connection supports the
30515  * TLS <literal>renegotiation_info</literal> extension. This is the
30516  * default behavior, but means that rehandshaking will not work
30517  * against older implementations that do not support that extension.
30518  * %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow
30519  * rehandshaking even without the
30520  * <literal>renegotiation_info</literal> extension. On the server side
30521  * in particular, this is not recommended, since it leaves the server
30522  * open to certain attacks. However, this mode is necessary if you
30523  * need to allow renegotiation with older client software.
30524  *
30525  * Since: 2.28
30526  */
30527
30528
30529 /**
30530  * g_tls_connection_set_require_close_notify:
30531  * @conn: a #GTlsConnection
30532  * @require_close_notify: whether or not to require close notification
30533  *
30534  * Sets whether or not @conn expects a proper TLS close notification
30535  * before the connection is closed. If this is %TRUE (the default),
30536  * then @conn will expect to receive a TLS close notification from its
30537  * peer before the connection is closed, and will return a
30538  * %G_TLS_ERROR_EOF error if the connection is closed without proper
30539  * notification (since this may indicate a network error, or
30540  * man-in-the-middle attack).
30541  * In some protocols, the application will know whether or not the
30542  * connection was closed cleanly based on application-level data
30543  * (because the application-level data includes a length field, or is
30544  * somehow self-delimiting); in this case, the close notify is
30545  * redundant and sometimes omitted. (TLS 1.1 explicitly allows this;
30546  * in TLS 1.0 it is technically an error, but often done anyway.) You
30547  * can use g_tls_connection_set_require_close_notify() to tell @conn
30548  * to allow an "unannounced" connection close, in which case the close
30549  * will show up as a 0-length read, as in a non-TLS
30550  * #GSocketConnection, and it is up to the application to check that
30551  * the data has been fully received.
30552  * Note that this only affects the behavior when the peer closes the
30553  * connection; when the application calls g_io_stream_close() itself
30554  * on @conn, this will send a close notification regardless of the
30555  * setting of this property. If you explicitly want to do an unclean
30556  * close, you can close @conn's #GTlsConnection:base-io-stream rather
30557  * than closing @conn itself.
30558  *
30559  * Since: 2.28
30560  */
30561
30562
30563 /**
30564  * g_tls_connection_set_use_system_certdb:
30565  * @conn: a #GTlsConnection
30566  * @use_system_certdb: whether to use the system certificate database
30567  *
30568  * Sets whether @conn uses the system certificate database to verify
30569  * peer certificates. This is %TRUE by default. If set to %FALSE, then
30570  * peer certificate validation will always set the
30571  * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
30572  * #GTlsConnection::accept-certificate will always be emitted on
30573  * client-side connections, unless that bit is not set in
30574  * #GTlsClientConnection:validation-flags).
30575  *
30576  * Since: 2.28
30577  */
30578
30579
30580 /**
30581  * g_tls_error_quark:
30582  *
30583  * Gets the TLS error quark.
30584  *
30585  * Returns: a #GQuark.
30586  * Since: 2.28
30587  */
30588
30589
30590 /**
30591  * g_tls_server_connection_new:
30592  * @base_io_stream: the #GIOStream to wrap
30593  * @certificate: (allow-none): the default server certificate, or %NULL
30594  * @error: #GError for error reporting, or %NULL to ignore.
30595  *
30596  * Creates a new #GTlsServerConnection wrapping @base_io_stream (which
30597  * must have pollable input and output streams).
30598  *
30599  * Returns: the new #GTlsServerConnection, or %NULL on error
30600  * Since: 2.28
30601  */
30602
30603
30604 /**
30605  * g_try_new:
30606  * @struct_type: the type of the elements to allocate
30607  * @n_structs: the number of elements to allocate
30608  *
30609  * Attempts to allocate @n_structs elements of type @struct_type, and returns
30610  * %NULL on failure. Contrast with g_new(), which aborts the program on failure.
30611  * The returned pointer is cast to a pointer to the given type.
30612  * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
30613  *
30614  * Since: 2.8
30615  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
30616  */
30617
30618
30619 /**
30620  * g_try_new0:
30621  * @struct_type: the type of the elements to allocate
30622  * @n_structs: the number of elements to allocate
30623  *
30624  * Attempts to allocate @n_structs elements of type @struct_type, initialized
30625  * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts
30626  * the program on failure.
30627  * The returned pointer is cast to a pointer to the given type.
30628  * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
30629  *
30630  * Since: 2.8
30631  * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
30632  */
30633
30634
30635 /**
30636  * g_try_renew:
30637  * @struct_type: the type of the elements to allocate
30638  * @mem: the currently allocated memory
30639  * @n_structs: the number of elements to allocate
30640  *
30641  * Attempts to reallocate the memory pointed to by @mem, so that it now has
30642  * space for @n_structs elements of type @struct_type, and returns %NULL on
30643  * failure. Contrast with g_renew(), which aborts the program on failure.
30644  * It returns the new address of the memory, which may have been moved.
30645  * The function returns %NULL if an overflow occurs.
30646  *
30647  * Since: 2.8
30648  * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
30649  */
30650
30651
30652 /**
30653  * g_unix_connection_receive_credentials:
30654  * @connection: A #GUnixConnection.
30655  * @cancellable: (allow-none): A #GCancellable or %NULL.
30656  * @error: Return location for error or %NULL.
30657  *
30658  * Receives credentials from the sending end of the connection.  The
30659  * sending end has to call g_unix_connection_send_credentials() (or
30660  * similar) for this to work.
30661  * As well as reading the credentials this also reads (and discards) a
30662  * single byte from the stream, as this is required for credentials
30663  * passing to work on some implementations.
30664  * Other ways to exchange credentials with a foreign peer includes the
30665  * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
30666  * g_object_unref()), %NULL if @error is set.
30667  *
30668  * Returns: (transfer full): Received credentials on success (free with
30669  * Since: 2.26
30670  */
30671
30672
30673 /**
30674  * g_unix_connection_receive_fd:
30675  * @connection: a #GUnixConnection
30676  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
30677  * @error: (allow-none): #GError for error reporting, or %NULL to ignore
30678  *
30679  * Receives a file descriptor from the sending end of the connection.
30680  * The sending end has to call g_unix_connection_send_fd() for this
30681  * to work.
30682  * As well as reading the fd this also reads a single byte from the
30683  * stream, as this is required for fd passing to work on some
30684  * implementations.
30685  *
30686  * Returns: a file descriptor on success, -1 on error.
30687  * Since: 2.22
30688  */
30689
30690
30691 /**
30692  * g_unix_connection_send_credentials:
30693  * @connection: A #GUnixConnection.
30694  * @cancellable: (allow-none): A #GCancellable or %NULL.
30695  * @error: Return location for error or %NULL.
30696  *
30697  * Passes the credentials of the current user the receiving side
30698  * of the connection. The recieving end has to call
30699  * g_unix_connection_receive_credentials() (or similar) to accept the
30700  * credentials.
30701  * As well as sending the credentials this also writes a single NUL
30702  * byte to the stream, as this is required for credentials passing to
30703  * work on some implementations.
30704  * Other ways to exchange credentials with a foreign peer includes the
30705  * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
30706  *
30707  * Returns: %TRUE on success, %FALSE if @error is set.
30708  * Since: 2.26
30709  */
30710
30711
30712 /**
30713  * g_unix_connection_send_fd:
30714  * @connection: a #GUnixConnection
30715  * @fd: a file descriptor
30716  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
30717  * @error: (allow-none): #GError for error reporting, or %NULL to ignore.
30718  *
30719  * Passes a file descriptor to the recieving side of the
30720  * connection. The recieving end has to call g_unix_connection_receive_fd()
30721  * to accept the file descriptor.
30722  * As well as sending the fd this also writes a single byte to the
30723  * stream, as this is required for fd passing to work on some
30724  * implementations.
30725  *
30726  * Returns: a %TRUE on success, %NULL on error.
30727  * Since: 2.22
30728  */
30729
30730
30731 /**
30732  * g_unix_credentials_message_get_credentials:
30733  * @message: A #GUnixCredentialsMessage.
30734  *
30735  * Gets the credentials stored in @message.
30736  *
30737  * Returns: (transfer none): A #GCredentials instance. Do not free, it is owned by @message.
30738  * Since: 2.26
30739  */
30740
30741
30742 /**
30743  * g_unix_credentials_message_is_supported:
30744  *
30745  * Checks if passing a #GCredential on a #GSocket is supported on this platform.
30746  *
30747  * Returns: %TRUE if supported, %FALSE otherwise
30748  * Since: 2.26
30749  */
30750
30751
30752 /**
30753  * g_unix_credentials_message_new:
30754  *
30755  * Creates a new #GUnixCredentialsMessage with credentials matching the current processes.
30756  *
30757  * Returns: a new #GUnixCredentialsMessage
30758  * Since: 2.26
30759  */
30760
30761
30762 /**
30763  * g_unix_credentials_message_new_with_credentials:
30764  * @credentials: A #GCredentials object.
30765  *
30766  * Creates a new #GUnixCredentialsMessage holding @credentials.
30767  *
30768  * Returns: a new #GUnixCredentialsMessage
30769  * Since: 2.26
30770  */
30771
30772
30773 /**
30774  * g_unix_fd_list_append:
30775  * @list: a #GUnixFDList
30776  * @fd: a valid open file descriptor
30777  * @error: a #GError pointer
30778  *
30779  * Adds a file descriptor to @list.
30780  * The file descriptor is duplicated using dup(). You keep your copy
30781  * of the descriptor and the copy contained in @list will be closed
30782  * when @list is finalized.
30783  * A possible cause of failure is exceeding the per-process or
30784  * system-wide file descriptor limit.
30785  * The index of the file descriptor in the list is returned.  If you use
30786  * this index with g_unix_fd_list_get() then you will receive back a
30787  * duplicated copy of the same file descriptor.
30788  * (and @error is set)
30789  *
30790  * Returns: the index of the appended fd in case of success, else -1
30791  * Since: 2.24
30792  */
30793
30794
30795 /**
30796  * g_unix_fd_list_get:
30797  * @list: a #GUnixFDList
30798  * @index_: the index into the list
30799  * @error: a #GError pointer
30800  *
30801  * Gets a file descriptor out of @list.
30802  * programmer error for @index_ to be out of range; see
30803  * g_unix_fd_list_get_length().
30804  * The file descriptor is duplicated using dup() and set as
30805  * close-on-exec before being returned.  You must call close() on it
30806  * when you are done.
30807  * A possible cause of failure is exceeding the per-process or
30808  * system-wide file descriptor limit.
30809  *
30810  * Returns: the file descriptor, or -1 in case of error
30811  * Since: 2.24
30812  */
30813
30814
30815 /**
30816  * g_unix_fd_list_get_length:
30817  * @list: a #GUnixFDList
30818  *
30819  * contained within).
30820  *
30821  * Gets the length of @list (ie: the number of file descriptors
30822  * Returns: the length of @list
30823  * Since: 2.24
30824  */
30825
30826
30827 /**
30828  * g_unix_fd_list_new:
30829  *
30830  * Creates a new #GUnixFDList containing no file descriptors.
30831  *
30832  * Returns: a new #GUnixFDList
30833  * Since: 2.24
30834  */
30835
30836
30837 /**
30838  * g_unix_fd_list_new_from_array:
30839  * @fds: (array length=n_fds): the initial list of file descriptors
30840  * @n_fds: the length of #fds, or -1
30841  *
30842  * Creates a new #GUnixFDList containing the file descriptors given in
30843  * may no longer be used by the caller.  The array itself is owned by
30844  * the caller.
30845  * Each file descriptor in the array should be set to close-on-exec.
30846  * If @n_fds is -1 then @fds must be terminated with -1.
30847  *
30848  * Returns: a new #GUnixFDList
30849  * Since: 2.24
30850  */
30851
30852
30853 /**
30854  * g_unix_fd_list_peek_fds:
30855  * @list: a #GUnixFDList
30856  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
30857  *
30858  * Returns the array of file descriptors that is contained in this
30859  * object.
30860  * After this call, the descriptors remain the property of @list.  The
30861  * caller must not close them and must not free the array.  The array is
30862  * valid only until @list is changed in any way.
30863  * If @length is non-%NULL then it is set to the number of file
30864  * descriptors in the returned array. The returned array is also
30865  * terminated with -1.
30866  * This function never returns %NULL. In case there are no file
30867  * descriptors contained in @list, an empty array is returned.
30868  * descriptors
30869  *
30870  * Returns: (array length=length) (transfer none): an array of file
30871  * Since: 2.24
30872  */
30873
30874
30875 /**
30876  * g_unix_fd_list_steal_fds:
30877  * @list: a #GUnixFDList
30878  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
30879  *
30880  * Returns the array of file descriptors that is contained in this
30881  * object.
30882  * After this call, the descriptors are no longer contained in
30883  * descriptors have been added).
30884  * The return result of this function must be freed with g_free().
30885  * The caller is also responsible for closing all of the file
30886  * descriptors.  The file descriptors in the array are set to
30887  * close-on-exec.
30888  * If @length is non-%NULL then it is set to the number of file
30889  * descriptors in the returned array. The returned array is also
30890  * terminated with -1.
30891  * This function never returns %NULL. In case there are no file
30892  * descriptors contained in @list, an empty array is returned.
30893  * descriptors
30894  *
30895  * Returns: (array length=length) (transfer full): an array of file
30896  * Since: 2.24
30897  */
30898
30899
30900 /**
30901  * g_unix_fd_message_append_fd:
30902  * @message: a #GUnixFDMessage
30903  * @fd: a valid open file descriptor
30904  * @error: a #GError pointer
30905  *
30906  * Adds a file descriptor to @message.
30907  * The file descriptor is duplicated using dup(). You keep your copy
30908  * of the descriptor and the copy contained in @message will be closed
30909  * when @message is finalized.
30910  * A possible cause of failure is exceeding the per-process or
30911  * system-wide file descriptor limit.
30912  *
30913  * Returns: %TRUE in case of success, else %FALSE (and @error is set)
30914  * Since: 2.22
30915  */
30916
30917
30918 /**
30919  * g_unix_fd_message_get_fd_list:
30920  * @message: a #GUnixFDMessage
30921  *
30922  * Gets the #GUnixFDList contained in @message.  This function does not
30923  * return a reference to the caller, but the returned list is valid for
30924  * the lifetime of @message.
30925  *
30926  * Returns: (transfer none): the #GUnixFDList from @message
30927  * Since: 2.24
30928  */
30929
30930
30931 /**
30932  * g_unix_fd_message_new:
30933  *
30934  * Creates a new #GUnixFDMessage containing an empty file descriptor
30935  * list.
30936  *
30937  * Returns: a new #GUnixFDMessage
30938  * Since: 2.22
30939  */
30940
30941
30942 /**
30943  * g_unix_fd_message_new_with_fd_list:
30944  * @fd_list: a #GUnixFDList
30945  *
30946  * Creates a new #GUnixFDMessage containing @list.
30947  *
30948  * Returns: a new #GUnixFDMessage
30949  * Since: 2.24
30950  */
30951
30952
30953 /**
30954  * g_unix_fd_message_steal_fds:
30955  * @message: a #GUnixFDMessage
30956  * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
30957  *
30958  * Returns the array of file descriptors that is contained in this
30959  * object.
30960  * After this call, the descriptors are no longer contained in
30961  * descriptors have been added).
30962  * The return result of this function must be freed with g_free().
30963  * The caller is also responsible for closing all of the file
30964  * descriptors.
30965  * If @length is non-%NULL then it is set to the number of file
30966  * descriptors in the returned array. The returned array is also
30967  * terminated with -1.
30968  * This function never returns %NULL. In case there are no file
30969  * descriptors contained in @message, an empty array is returned.
30970  * descriptors
30971  *
30972  * Returns: (array length=length) (transfer full): an array of file
30973  * Since: 2.22
30974  */
30975
30976
30977 /**
30978  * g_unix_input_stream_get_close_fd:
30979  * @stream: a #GUnixInputStream
30980  *
30981  * Returns whether the file descriptor of @stream will be
30982  * closed when the stream is closed.
30983  *
30984  * Returns: %TRUE if the file descriptor is closed when done
30985  * Since: 2.20
30986  */
30987
30988
30989 /**
30990  * g_unix_input_stream_get_fd:
30991  * @stream: a #GUnixInputStream
30992  *
30993  * Return the UNIX file descriptor that the stream reads from.
30994  *
30995  * Returns: The file descriptor of @stream
30996  * Since: 2.20
30997  */
30998
30999
31000 /**
31001  * g_unix_input_stream_new:
31002  * @fd: a UNIX file descriptor
31003  * @close_fd: %TRUE to close the file descriptor when done
31004  *
31005  * Creates a new #GUnixInputStream for the given @fd.
31006  * If @close_fd is %TRUE, the file descriptor will be closed
31007  * when the stream is closed.
31008  *
31009  * Returns: a new #GUnixInputStream
31010  */
31011
31012
31013 /**
31014  * g_unix_input_stream_set_close_fd:
31015  * @stream: a #GUnixInputStream
31016  * @close_fd: %TRUE to close the file descriptor when done
31017  *
31018  * Sets whether the file descriptor of @stream shall be closed
31019  * when the stream is closed.
31020  *
31021  * Since: 2.20
31022  */
31023
31024
31025 /**
31026  * g_unix_is_mount_path_system_internal:
31027  * @mount_path: a mount path, e.g. <filename>/media/disk</filename> or <filename>/usr</filename>
31028  *
31029  * Determines if @mount_path is considered an implementation of the
31030  * OS. This is primarily used for hiding mountable and mounted volumes
31031  * that only are used in the OS and has little to no relevance to the
31032  * casual user.
31033  * of the OS.
31034  *
31035  * Returns: %TRUE if @mount_path is considered an implementation detail
31036  */
31037
31038
31039 /**
31040  * g_unix_mount_at: (skip)
31041  * @mount_path: path for a possible unix mount.
31042  * @time_read: (out) (allow-none): guint64 to contain a timestamp.
31043  *
31044  * Gets a #GUnixMountEntry for a given mount path. If @time_read
31045  * is set, it will be filled with a unix timestamp for checking
31046  * if the mounts have changed since with g_unix_mounts_changed_since().
31047  *
31048  * Returns: (transfer full): a #GUnixMountEntry.
31049  */
31050
31051
31052 /**
31053  * g_unix_mount_compare:
31054  * @mount1: first #GUnixMountEntry to compare.
31055  * @mount2: second #GUnixMountEntry to compare.
31056  *
31057  * Compares two unix mounts.
31058  * or less than @mount2, respectively.
31059  *
31060  * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
31061  */
31062
31063
31064 /**
31065  * g_unix_mount_free:
31066  * @mount_entry: a #GUnixMount.
31067  *
31068  * Frees a unix mount.
31069  */
31070
31071
31072 /**
31073  * g_unix_mount_get_device_path:
31074  * @mount_entry: a #GUnixMount.
31075  *
31076  * Gets the device path for a unix mount.
31077  *
31078  * Returns: a string containing the device path.
31079  */
31080
31081
31082 /**
31083  * g_unix_mount_get_fs_type:
31084  * @mount_entry: a #GUnixMount.
31085  *
31086  * Gets the filesystem type for the unix mount.
31087  *
31088  * Returns: a string containing the file system type.
31089  */
31090
31091
31092 /**
31093  * g_unix_mount_get_mount_path:
31094  * @mount_entry: input #GUnixMountEntry to get the mount path for.
31095  *
31096  * Gets the mount path for a unix mount.
31097  *
31098  * Returns: the mount path for @mount_entry.
31099  */
31100
31101
31102 /**
31103  * g_unix_mount_guess_can_eject:
31104  * @mount_entry: a #GUnixMountEntry
31105  *
31106  * Guesses whether a Unix mount can be ejected.
31107  *
31108  * Returns: %TRUE if @mount_entry is deemed to be ejectable.
31109  */
31110
31111
31112 /**
31113  * g_unix_mount_guess_icon:
31114  * @mount_entry: a #GUnixMountEntry
31115  *
31116  * Guesses the icon of a Unix mount.
31117  *
31118  * Returns: (transfer full): a #GIcon
31119  */
31120
31121
31122 /**
31123  * g_unix_mount_guess_name:
31124  * @mount_entry: a #GUnixMountEntry
31125  *
31126  * Guesses the name of a Unix mount.
31127  * The result is a translated string.
31128  * be freed with g_free()
31129  *
31130  * Returns: A newly allocated string that must
31131  */
31132
31133
31134 /**
31135  * g_unix_mount_guess_should_display:
31136  * @mount_entry: a #GUnixMountEntry
31137  *
31138  * Guesses whether a Unix mount should be displayed in the UI.
31139  *
31140  * Returns: %TRUE if @mount_entry is deemed to be displayable.
31141  */
31142
31143
31144 /**
31145  * g_unix_mount_is_readonly:
31146  * @mount_entry: a #GUnixMount.
31147  *
31148  * Checks if a unix mount is mounted read only.
31149  *
31150  * Returns: %TRUE if @mount_entry is read only.
31151  */
31152
31153
31154 /**
31155  * g_unix_mount_is_system_internal:
31156  * @mount_entry: a #GUnixMount.
31157  *
31158  * Checks if a unix mount is a system path.
31159  *
31160  * Returns: %TRUE if the unix mount is for a system path.
31161  */
31162
31163
31164 /**
31165  * g_unix_mount_monitor_new:
31166  *
31167  * Gets a new #GUnixMountMonitor. The default rate limit for which the
31168  * monitor will report consecutive changes for the mount and mount
31169  * point entry files is the default for a #GFileMonitor. Use
31170  * g_unix_mount_monitor_set_rate_limit() to change this.
31171  *
31172  * Returns: a #GUnixMountMonitor.
31173  */
31174
31175
31176 /**
31177  * g_unix_mount_monitor_set_rate_limit:
31178  * @mount_monitor: a #GUnixMountMonitor
31179  * @limit_msec: a integer with the limit in milliseconds to poll for changes.
31180  *
31181  * Sets the rate limit to which the @mount_monitor will report
31182  * consecutive change events to the mount and mount point entry files.
31183  *
31184  * Since: 2.18
31185  */
31186
31187
31188 /**
31189  * g_unix_mount_point_compare:
31190  * @mount1: a #GUnixMount.
31191  * @mount2: a #GUnixMount.
31192  *
31193  * Compares two unix mount points.
31194  * or less than @mount2, respectively.
31195  *
31196  * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
31197  */
31198
31199
31200 /**
31201  * g_unix_mount_point_free:
31202  * @mount_point: unix mount point to free.
31203  *
31204  * Frees a unix mount point.
31205  */
31206
31207
31208 /**
31209  * g_unix_mount_point_get_device_path:
31210  * @mount_point: a #GUnixMountPoint.
31211  *
31212  * Gets the device path for a unix mount point.
31213  *
31214  * Returns: a string containing the device path.
31215  */
31216
31217
31218 /**
31219  * g_unix_mount_point_get_fs_type:
31220  * @mount_point: a #GUnixMountPoint.
31221  *
31222  * Gets the file system type for the mount point.
31223  *
31224  * Returns: a string containing the file system type.
31225  */
31226
31227
31228 /**
31229  * g_unix_mount_point_get_mount_path:
31230  * @mount_point: a #GUnixMountPoint.
31231  *
31232  * Gets the mount path for a unix mount point.
31233  *
31234  * Returns: a string containing the mount path.
31235  */
31236
31237
31238 /**
31239  * g_unix_mount_point_guess_can_eject:
31240  * @mount_point: a #GUnixMountPoint
31241  *
31242  * Guesses whether a Unix mount point can be ejected.
31243  *
31244  * Returns: %TRUE if @mount_point is deemed to be ejectable.
31245  */
31246
31247
31248 /**
31249  * g_unix_mount_point_guess_icon:
31250  * @mount_point: a #GUnixMountPoint
31251  *
31252  * Guesses the icon of a Unix mount point.
31253  *
31254  * Returns: (transfer full): a #GIcon
31255  */
31256
31257
31258 /**
31259  * g_unix_mount_point_guess_name:
31260  * @mount_point: a #GUnixMountPoint
31261  *
31262  * Guesses the name of a Unix mount point.
31263  * The result is a translated string.
31264  * be freed with g_free()
31265  *
31266  * Returns: A newly allocated string that must
31267  */
31268
31269
31270 /**
31271  * g_unix_mount_point_is_loopback:
31272  * @mount_point: a #GUnixMountPoint.
31273  *
31274  * Checks if a unix mount point is a loopback device.
31275  *
31276  * Returns: %TRUE if the mount point is a loopback. %FALSE otherwise.
31277  */
31278
31279
31280 /**
31281  * g_unix_mount_point_is_readonly:
31282  * @mount_point: a #GUnixMountPoint.
31283  *
31284  * Checks if a unix mount point is read only.
31285  *
31286  * Returns: %TRUE if a mount point is read only.
31287  */
31288
31289
31290 /**
31291  * g_unix_mount_point_is_user_mountable:
31292  * @mount_point: a #GUnixMountPoint.
31293  *
31294  * Checks if a unix mount point is mountable by the user.
31295  *
31296  * Returns: %TRUE if the mount point is user mountable.
31297  */
31298
31299
31300 /**
31301  * g_unix_mount_points_changed_since:
31302  * @time: guint64 to contain a timestamp.
31303  *
31304  * Checks if the unix mount points have changed since a given unix time.
31305  *
31306  * Returns: %TRUE if the mount points have changed since @time.
31307  */
31308
31309
31310 /**
31311  * g_unix_mount_points_get: (skip)
31312  * @time_read: (out) (allow-none): guint64 to contain a timestamp.
31313  *
31314  * Gets a #GList of #GUnixMountPoint containing the unix mount points.
31315  * If @time_read is set, it will be filled with the mount timestamp,
31316  * allowing for checking if the mounts have changed with
31317  * g_unix_mounts_points_changed_since().
31318  * a #GList of the UNIX mountpoints.
31319  *
31320  * Returns: (element-type GUnixMountPoint) (transfer full):
31321  */
31322
31323
31324 /**
31325  * g_unix_mounts_changed_since:
31326  * @time: guint64 to contain a timestamp.
31327  *
31328  * Checks if the unix mounts have changed since a given unix time.
31329  *
31330  * Returns: %TRUE if the mounts have changed since @time.
31331  */
31332
31333
31334 /**
31335  * g_unix_mounts_get: (skip)
31336  * @time_read: (out) (allow-none): guint64 to contain a timestamp, or %NULL
31337  *
31338  * Gets a #GList of #GUnixMountEntry containing the unix mounts.
31339  * If @time_read is set, it will be filled with the mount
31340  * timestamp, allowing for checking if the mounts have changed
31341  * with g_unix_mounts_changed_since().
31342  * a #GList of the UNIX mounts.
31343  *
31344  * Returns: (element-type GUnixMountEntry) (transfer full):
31345  */
31346
31347
31348 /**
31349  * g_unix_output_stream_get_close_fd:
31350  * @stream: a #GUnixOutputStream
31351  *
31352  * Returns whether the file descriptor of @stream will be
31353  * closed when the stream is closed.
31354  *
31355  * Returns: %TRUE if the file descriptor is closed when done
31356  * Since: 2.20
31357  */
31358
31359
31360 /**
31361  * g_unix_output_stream_get_fd:
31362  * @stream: a #GUnixOutputStream
31363  *
31364  * Return the UNIX file descriptor that the stream writes to.
31365  *
31366  * Returns: The file descriptor of @stream
31367  * Since: 2.20
31368  */
31369
31370
31371 /**
31372  * g_unix_output_stream_new:
31373  * @fd: a UNIX file descriptor
31374  * @close_fd: %TRUE to close the file descriptor when done
31375  *
31376  * Creates a new #GUnixOutputStream for the given @fd.
31377  * If @close_fd, is %TRUE, the file descriptor will be closed when
31378  * the output stream is destroyed.
31379  *
31380  * Returns: a new #GOutputStream
31381  */
31382
31383
31384 /**
31385  * g_unix_output_stream_set_close_fd:
31386  * @stream: a #GUnixOutputStream
31387  * @close_fd: %TRUE to close the file descriptor when done
31388  *
31389  * Sets whether the file descriptor of @stream shall be closed
31390  * when the stream is closed.
31391  *
31392  * Since: 2.20
31393  */
31394
31395
31396 /**
31397  * g_unix_socket_address_abstract_names_supported:
31398  *
31399  * Checks if abstract unix domain socket names are supported.
31400  *
31401  * Returns: %TRUE if supported, %FALSE otherwise
31402  * Since: 2.22
31403  */
31404
31405
31406 /**
31407  * g_unix_socket_address_get_address_type:
31408  * @address: a #GInetSocketAddress
31409  *
31410  * Gets @address's type.
31411  *
31412  * Returns: a #GUnixSocketAddressType
31413  * Since: 2.26
31414  */
31415
31416
31417 /**
31418  * g_unix_socket_address_get_is_abstract:
31419  * @address: a #GInetSocketAddress
31420  *
31421  * Tests if @address is abstract.
31422  *
31423  * Returns: %TRUE if the address is abstract, %FALSE otherwise
31424  * Since: 2.22
31425  * Deprecated: Use g_unix_socket_address_get_address_type()
31426  */
31427
31428
31429 /**
31430  * g_unix_socket_address_get_path:
31431  * @address: a #GInetSocketAddress
31432  *
31433  * Gets @address's path, or for abstract sockets the "name".
31434  * Guaranteed to be zero-terminated, but an abstract socket
31435  * may contain embedded zeros, and thus you should use
31436  * g_unix_socket_address_get_path_len() to get the true length
31437  * of this string.
31438  *
31439  * Returns: the path for @address
31440  * Since: 2.22
31441  */
31442
31443
31444 /**
31445  * g_unix_socket_address_get_path_len:
31446  * @address: a #GInetSocketAddress
31447  *
31448  * Gets the length of @address's path.
31449  * For details, see g_unix_socket_address_get_path().
31450  *
31451  * Returns: the length of the path
31452  * Since: 2.22
31453  */
31454
31455
31456 /**
31457  * g_unix_socket_address_new:
31458  * @path: the socket path
31459  *
31460  * Creates a new #GUnixSocketAddress for @path.
31461  * To create abstract socket addresses, on systems that support that,
31462  * use g_unix_socket_address_new_abstract().
31463  *
31464  * Returns: a new #GUnixSocketAddress
31465  * Since: 2.22
31466  */
31467
31468
31469 /**
31470  * g_unix_socket_address_new_abstract:
31471  * @path: (array length=path_len) (element-type gchar): the abstract name
31472  * @path_len: the length of @path, or -1
31473  *
31474  * Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
31475  * #GUnixSocketAddress for @path.
31476  *
31477  * Returns: a new #GUnixSocketAddress
31478  * Deprecated: Use g_unix_socket_address_new_with_type().
31479  */
31480
31481
31482 /**
31483  * g_unix_socket_address_new_with_type:
31484  * @path: (array length=path_len) (element-type gchar): the name
31485  * @path_len: the length of @path, or -1
31486  * @type: a #GUnixSocketAddressType
31487  *
31488  * Creates a new #GUnixSocketAddress of type @type with name @path.
31489  * If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to
31490  * calling g_unix_socket_address_new().
31491  * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len
31492  * bytes of @path will be copied to the socket's path, and only those
31493  * bytes will be considered part of the name. (If @path_len is -1,
31494  * then @path is assumed to be NUL-terminated.) For example, if @path
31495  * was "test", then calling g_socket_address_get_native_size() on the
31496  * returned socket would return 7 (2 bytes of overhead, 1 byte for the
31497  * abstract-socket indicator byte, and 4 bytes for the name "test").
31498  * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then
31499  * rest of the path will be padded with 0 bytes, and the entire
31500  * zero-padded buffer will be considered the name. (As above, if
31501  * this case, g_socket_address_get_native_size() will always return
31502  * the full size of a <literal>struct sockaddr_un</literal>, although
31503  * g_unix_socket_address_get_path_len() will still return just the
31504  * length of @path.
31505  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over
31506  * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course,
31507  * when connecting to a server created by another process, you must
31508  * use the appropriate type corresponding to how that process created
31509  * its listening socket.
31510  *
31511  * Returns: a new #GUnixSocketAddress
31512  * Since: 2.26
31513  */
31514
31515
31516 /**
31517  * g_vfs_get_default:
31518  *
31519  * Gets the default #GVfs for the system.
31520  *
31521  * Returns: (transfer none): a #GVfs.
31522  */
31523
31524
31525 /**
31526  * g_vfs_get_file_for_path:
31527  * @vfs: a #GVfs.
31528  * @path: a string containing a VFS path.
31529  *
31530  * Gets a #GFile for @path.
31531  * Free the returned object with g_object_unref().
31532  *
31533  * Returns: (transfer full): a #GFile.
31534  */
31535
31536
31537 /**
31538  * g_vfs_get_file_for_uri:
31539  * @vfs: a#GVfs.
31540  * @uri: a string containing a URI
31541  *
31542  * Gets a #GFile for @uri.
31543  * This operation never fails, but the returned object
31544  * might not support any I/O operation if the URI
31545  * is malformed or if the URI scheme is not supported.
31546  * Free the returned object with g_object_unref().
31547  *
31548  * Returns: (transfer full): a #GFile.
31549  */
31550
31551
31552 /**
31553  * g_vfs_get_local:
31554  *
31555  * Gets the local #GVfs for the system.
31556  *
31557  * Returns: (transfer none): a #GVfs.
31558  */
31559
31560
31561 /**
31562  * g_vfs_get_supported_uri_schemes:
31563  * @vfs: a #GVfs.
31564  *
31565  * Gets a list of URI schemes supported by @vfs.
31566  * The returned array belongs to GIO and must
31567  * not be freed or modified.
31568  *
31569  * Returns: (transfer none): a %NULL-terminated array of strings.
31570  */
31571
31572
31573 /**
31574  * g_vfs_is_active:
31575  * @vfs: a #GVfs.
31576  *
31577  * Checks if the VFS is active.
31578  *
31579  * Returns: %TRUE if construction of the @vfs was successful and it is now active.
31580  */
31581
31582
31583 /**
31584  * g_vfs_parse_name:
31585  * @vfs: a #GVfs.
31586  * @parse_name: a string to be parsed by the VFS module.
31587  *
31588  * This operation never fails, but the returned object might
31589  * not support any I/O operations if the @parse_name cannot
31590  * be parsed by the #GVfs module.
31591  * Free the returned object with g_object_unref().
31592  *
31593  * Returns: (transfer full): a #GFile for the given @parse_name.
31594  */
31595
31596
31597 /**
31598  * g_volume_can_eject:
31599  * @volume: a #GVolume.
31600  *
31601  * Checks if a volume can be ejected.
31602  *
31603  * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise.
31604  */
31605
31606
31607 /**
31608  * g_volume_can_mount:
31609  * @volume: a #GVolume.
31610  *
31611  * Checks if a volume can be mounted.
31612  *
31613  * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise.
31614  */
31615
31616
31617 /**
31618  * g_volume_eject:
31619  * @volume: a #GVolume.
31620  * @flags: flags affecting the unmount if required for eject
31621  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31622  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31623  * @user_data: user data that gets passed to @callback
31624  *
31625  * Ejects a volume. This is an asynchronous operation, and is
31626  * finished by calling g_volume_eject_finish() with the @volume
31627  * and #GAsyncResult returned in the @callback.
31628  *
31629  * Deprecated: 2.22: Use g_volume_eject_with_operation() instead.
31630  */
31631
31632
31633 /**
31634  * g_volume_eject_finish:
31635  * @volume: pointer to a #GVolume.
31636  * @result: a #GAsyncResult.
31637  * @error: a #GError location to store an error, or %NULL to ignore
31638  *
31639  * Finishes ejecting a volume. If any errors occured during the operation,
31640  *
31641  * Returns: %TRUE, %FALSE if operation failed.
31642  * Deprecated: 2.22: Use g_volume_eject_with_operation_finish() instead.
31643  */
31644
31645
31646 /**
31647  * g_volume_eject_with_operation:
31648  * @volume: a #GVolume.
31649  * @flags: flags affecting the unmount if required for eject
31650  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
31651  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31652  * @callback: a #GAsyncReadyCallback, or %NULL.
31653  * @user_data: user data passed to @callback.
31654  *
31655  * Ejects a volume. This is an asynchronous operation, and is
31656  * finished by calling g_volume_eject_with_operation_finish() with the @volume
31657  * and #GAsyncResult data returned in the @callback.
31658  *
31659  * Since: 2.22
31660  */
31661
31662
31663 /**
31664  * g_volume_eject_with_operation_finish:
31665  * @volume: a #GVolume.
31666  * @result: a #GAsyncResult.
31667  * @error: a #GError location to store the error occuring, or %NULL to ignore.
31668  *
31669  * Finishes ejecting a volume. If any errors occurred during the operation,
31670  *
31671  * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise.
31672  * Since: 2.22
31673  */
31674
31675
31676 /**
31677  * g_volume_enumerate_identifiers:
31678  * @volume: a #GVolume
31679  *
31680  * Gets the kinds of <link linkend="volume-identifier">identifiers</link>
31681  * that @volume has. Use g_volume_get_identifer() to obtain
31682  * the identifiers themselves.
31683  * of strings containing kinds of identifiers. Use g_strfreev() to free.
31684  *
31685  * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated array
31686  */
31687
31688
31689 /**
31690  * g_volume_get_activation_root:
31691  * @volume: a #GVolume
31692  *
31693  * Gets the activation root for a #GVolume if it is known ahead of
31694  * mount time. Returns %NULL otherwise. If not %NULL and if @volume
31695  * is mounted, then the result of g_mount_get_root() on the
31696  * #GMount object obtained from g_volume_get_mount() will always
31697  * either be equal or a prefix of what this function returns. In
31698  * other words, in code
31699  * <programlisting>
31700  * GMount *mount;
31701  * GFile *mount_root
31702  * GFile *volume_activation_root;
31703  * mount = g_volume_get_mount (volume); /&ast; mounted, so never NULL &ast;/
31704  * mount_root = g_mount_get_root (mount);
31705  * volume_activation_root = g_volume_get_activation_root(volume); /&ast; assume not NULL &ast;/
31706  * </programlisting>
31707  * then the expression
31708  * <programlisting>
31709  * (g_file_has_prefix (volume_activation_root, mount_root) ||
31710  * </programlisting>
31711  * will always be %TRUE.
31712  * Activation roots are typically used in #GVolumeMonitor
31713  * implementations to find the underlying mount to shadow, see
31714  * g_mount_is_shadowed() for more details.
31715  * g_object_unref() to free.
31716  *
31717  * Returns: (transfer full): the activation root of @volume or %NULL. Use
31718  * Since: 2.18
31719  */
31720
31721
31722 /**
31723  * g_volume_get_drive:
31724  * @volume: a #GVolume.
31725  *
31726  * Gets the drive for the @volume.
31727  * The returned object should be unreffed with g_object_unref()
31728  * when no longer needed.
31729  *
31730  * Returns: (transfer full): a #GDrive or %NULL if @volume is not associated with a drive.
31731  */
31732
31733
31734 /**
31735  * g_volume_get_icon:
31736  * @volume: a #GVolume.
31737  *
31738  * Gets the icon for @volume.
31739  * The returned object should be unreffed with g_object_unref()
31740  * when no longer needed.
31741  *
31742  * Returns: (transfer full): a #GIcon.
31743  */
31744
31745
31746 /**
31747  * g_volume_get_identifier:
31748  * @volume: a #GVolume
31749  * @kind: the kind of identifier to return
31750  *
31751  * Gets the identifier of the given kind for @volume.
31752  * See the <link linkend="volume-identifier">introduction</link>
31753  * for more information about volume identifiers.
31754  * requested identfier, or %NULL if the #GVolume
31755  * doesn't have this kind of identifier
31756  *
31757  * Returns: a newly allocated string containing the
31758  */
31759
31760
31761 /**
31762  * g_volume_get_mount:
31763  * @volume: a #GVolume.
31764  *
31765  * Gets the mount for the @volume.
31766  * The returned object should be unreffed with g_object_unref()
31767  * when no longer needed.
31768  *
31769  * Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted.
31770  */
31771
31772
31773 /**
31774  * g_volume_get_name:
31775  * @volume: a #GVolume.
31776  *
31777  * Gets the name of @volume.
31778  * be freed with g_free() when no longer needed.
31779  *
31780  * Returns: the name for the given @volume. The returned string should
31781  */
31782
31783
31784 /**
31785  * g_volume_get_uuid:
31786  * @volume: a #GVolume.
31787  *
31788  * Gets the UUID for the @volume. The reference is typically based on
31789  * the file system UUID for the volume in question and should be
31790  * considered an opaque string. Returns %NULL if there is no UUID
31791  * available.
31792  * The returned string should be freed with g_free()
31793  * when no longer needed.
31794  *
31795  * Returns: the UUID for @volume or %NULL if no UUID can be computed.
31796  */
31797
31798
31799 /**
31800  * g_volume_monitor_adopt_orphan_mount:
31801  * @mount: a #GMount object to find a parent for
31802  *
31803  * This function should be called by any #GVolumeMonitor
31804  * implementation when a new #GMount object is created that is not
31805  * associated with a #GVolume object. It must be called just before
31806  * emitting the @mount_added signal.
31807  * If the return value is not %NULL, the caller must associate the
31808  * returned #GVolume object with the #GMount. This involves returning
31809  * it in its g_mount_get_volume() implementation. The caller must
31810  * also listen for the "removed" signal on the returned object
31811  * and give up its reference when handling that signal
31812  * Similary, if implementing g_volume_monitor_adopt_orphan_mount(),
31813  * the implementor must take a reference to @mount and return it in
31814  * its g_volume_get_mount() implemented. Also, the implementor must
31815  * listen for the "unmounted" signal on @mount and give up its
31816  * reference upon handling that signal.
31817  * There are two main use cases for this function.
31818  * One is when implementing a user space file system driver that reads
31819  * blocks of a block device that is already represented by the native
31820  * volume monitor (for example a CD Audio file system driver). Such
31821  * a driver will generate its own #GMount object that needs to be
31822  * assoicated with the #GVolume object that represents the volume.
31823  * The other is for implementing a #GVolumeMonitor whose sole purpose
31824  * is to return #GVolume objects representing entries in the users
31825  * "favorite servers" list or similar.
31826  * if no wants to adopt the #GMount.
31827  * implementations should instead create shadow mounts with the URI of
31828  * the mount they intend to adopt. See the proxy volume monitor in
31829  * gvfs for an example of this. Also see g_mount_is_shadowed(),
31830  * g_mount_shadow() and g_mount_unshadow() functions.
31831  *
31832  * Returns: (transfer full): the #GVolume object that is the parent for @mount or %NULL
31833  * Deprecated: 2.20: Instead of using this function, #GVolumeMonitor
31834  */
31835
31836
31837 /**
31838  * g_volume_monitor_get:
31839  *
31840  * Gets the volume monitor used by gio.
31841  * g_object_unref() when done with it.
31842  *
31843  * Returns: (transfer full): a reference to the #GVolumeMonitor used by gio. Call
31844  */
31845
31846
31847 /**
31848  * g_volume_monitor_get_connected_drives:
31849  * @volume_monitor: a #GVolumeMonitor.
31850  *
31851  * Gets a list of drives connected to the system.
31852  * The returned list should be freed with g_list_free(), after
31853  * its elements have been unreffed with g_object_unref().
31854  *
31855  * Returns: (element-type GDrive) (transfer full): a #GList of connected #GDrive objects.
31856  */
31857
31858
31859 /**
31860  * g_volume_monitor_get_mount_for_uuid:
31861  * @volume_monitor: a #GVolumeMonitor.
31862  * @uuid: the UUID to look for
31863  *
31864  * Finds a #GMount object by its UUID (see g_mount_get_uuid())
31865  * Free the returned object with g_object_unref().
31866  *
31867  * Returns: (transfer full): a #GMount or %NULL if no such mount is available.
31868  */
31869
31870
31871 /**
31872  * g_volume_monitor_get_mounts:
31873  * @volume_monitor: a #GVolumeMonitor.
31874  *
31875  * Gets a list of the mounts on the system.
31876  * The returned list should be freed with g_list_free(), after
31877  * its elements have been unreffed with g_object_unref().
31878  *
31879  * Returns: (element-type GMount) (transfer full): a #GList of #GMount objects.
31880  */
31881
31882
31883 /**
31884  * g_volume_monitor_get_volume_for_uuid:
31885  * @volume_monitor: a #GVolumeMonitor.
31886  * @uuid: the UUID to look for
31887  *
31888  * Finds a #GVolume object by its UUID (see g_volume_get_uuid())
31889  * Free the returned object with g_object_unref().
31890  *
31891  * Returns: (transfer full): a #GVolume or %NULL if no such volume is available.
31892  */
31893
31894
31895 /**
31896  * g_volume_monitor_get_volumes:
31897  * @volume_monitor: a #GVolumeMonitor.
31898  *
31899  * Gets a list of the volumes on the system.
31900  * The returned list should be freed with g_list_free(), after
31901  * its elements have been unreffed with g_object_unref().
31902  *
31903  * Returns: (element-type GVolume) (transfer full): a #GList of #GVolume objects.
31904  */
31905
31906
31907 /**
31908  * g_volume_mount:
31909  * @volume: a #GVolume.
31910  * @flags: flags affecting the operation
31911  * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
31912  * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31913  * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31914  * @user_data: user data that gets passed to @callback
31915  *
31916  * Mounts a volume. This is an asynchronous operation, and is
31917  * finished by calling g_volume_mount_finish() with the @volume
31918  * and #GAsyncResult returned in the @callback.
31919  *
31920  * Virtual: mount_fn
31921  */
31922
31923
31924 /**
31925  * g_volume_mount_finish:
31926  * @volume: a #GVolume
31927  * @result: a #GAsyncResult
31928  * @error: a #GError location to store an error, or %NULL to ignore
31929  *
31930  * Finishes mounting a volume. If any errors occured during the operation,
31931  * If the mount operation succeeded, g_volume_get_mount() on @volume
31932  * is guaranteed to return the mount right after calling this
31933  * function; there's no need to listen for the 'mount-added' signal on
31934  * #GVolumeMonitor.
31935  *
31936  * Returns: %TRUE, %FALSE if operation failed.
31937  */
31938
31939
31940 /**
31941  * g_volume_should_automount:
31942  * @volume: a #GVolume
31943  *
31944  * Returns whether the volume should be automatically mounted.
31945  *
31946  * Returns: %TRUE if the volume should be automatically mounted.
31947  */
31948
31949
31950 /**
31951  * g_win32_input_stream_get_close_handle:
31952  * @stream: a #GWin32InputStream
31953  *
31954  * Returns whether the handle of @stream will be
31955  * closed when the stream is closed.
31956  *
31957  * Returns: %TRUE if the handle is closed when done
31958  * Since: 2.26
31959  */
31960
31961
31962 /**
31963  * g_win32_input_stream_get_handle:
31964  * @stream: a #GWin32InputStream
31965  *
31966  * Return the Windows file handle that the stream reads from.
31967  *
31968  * Returns: The file handle of @stream
31969  * Since: 2.26
31970  */
31971
31972
31973 /**
31974  * g_win32_input_stream_new:
31975  * @handle: a Win32 file handle
31976  * @close_fd: %TRUE to close the handle when done
31977  *
31978  * Creates a new #GWin32InputStream for the given @fd.
31979  * If @close_handle is %TRUE, the handle will be closed
31980  * when the stream is closed.
31981  * Note that "handle" here means a Win32 HANDLE, not a "file descriptor"
31982  * as used in the Windows C libraries.
31983  *
31984  * Returns: a new #GWin32InputStream
31985  */
31986
31987
31988 /**
31989  * g_win32_input_stream_set_close_handle:
31990  * @stream: a #GWin32InputStream
31991  * @close_handle: %TRUE to close the handle when done
31992  *
31993  * Sets whether the handle of @stream shall be closed
31994  * when the stream is closed.
31995  *
31996  * Since: 2.26
31997  */
31998
31999
32000 /**
32001  * g_win32_output_stream_get_close_handle:
32002  * @stream: a #GWin32OutputStream
32003  *
32004  * Returns whether the handle of @stream will be closed when the
32005  * stream is closed.
32006  *
32007  * Returns: %TRUE if the handle is closed when done
32008  * Since: 2.26
32009  */
32010
32011
32012 /**
32013  * g_win32_output_stream_get_handle:
32014  * @stream: a #GWin32OutputStream
32015  *
32016  * Return the Windows handle that the stream writes to.
32017  *
32018  * Returns: The handle descriptor of @stream
32019  * Since: 2.26
32020  */
32021
32022
32023 /**
32024  * g_win32_output_stream_new:
32025  * @handle: a Win32 file handle
32026  * @close_handle: %TRUE to close the handle when done
32027  *
32028  * Creates a new #GWin32OutputStream for the given @handle.
32029  * If @close_handle, is %TRUE, the handle will be closed when the
32030  * output stream is destroyed.
32031  *
32032  * Returns: a new #GOutputStream
32033  * Since: 2.26
32034  */
32035
32036
32037 /**
32038  * g_win32_output_stream_set_close_handle:
32039  * @stream: a #GWin32OutputStream
32040  * @close_handle: %TRUE to close the handle when done
32041  *
32042  * Sets whether the handle of @stream shall be closed when the stream
32043  * is closed.
32044  *
32045  * Since: 2.26
32046  */
32047
32048
32049 /**
32050  * g_zlib_compressor_get_file_info:
32051  * @compressor: a #GZlibCompressor
32052  *
32053  * Returns the #GZlibCompressor:file-info property.
32054  *
32055  * Returns: (transfer none): a #GFileInfo, or %NULL
32056  * Since: 2.26
32057  */
32058
32059
32060 /**
32061  * g_zlib_compressor_new:
32062  * @format: The format to use for the compressed data
32063  * @level: compression level (0-9), -1 for default
32064  *
32065  * Creates a new #GZlibCompressor.
32066  *
32067  * Returns: a new #GZlibCompressor
32068  * Since: 2.24
32069  */
32070
32071
32072 /**
32073  * g_zlib_compressor_set_file_info:
32074  * @compressor: a #GZlibCompressor
32075  * @file_info: (allow-none): a #GFileInfo
32076  *
32077  * Sets @file_info in @compressor. If non-%NULL, and @compressor's
32078  * #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
32079  * it will be used to set the file name and modification time in
32080  * the GZIP header of the compressed data.
32081  * progress; it may only be called immediately after creation of @compressor,
32082  * or after resetting it with g_converter_reset().
32083  *
32084  * Note: it is an error to call this function while a compression is in
32085  * Since: 2.26
32086  */
32087
32088
32089 /**
32090  * g_zlib_decompressor_get_file_info:
32091  * @decompressor: a #GZlibDecompressor
32092  *
32093  * Retrieves the #GFileInfo constructed from the GZIP header data
32094  * of compressed data processed by @compressor, or %NULL if @decompressor's
32095  * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
32096  * or the header data was not fully processed yet, or it not present in the
32097  * data stream at all.
32098  *
32099  * Returns: (transfer none): a #GFileInfo, or %NULL
32100  * Since: 2.26
32101  */
32102
32103
32104 /**
32105  * g_zlib_decompressor_new:
32106  * @format: The format to use for the compressed data
32107  *
32108  * Creates a new #GZlibDecompressor.
32109  *
32110  * Returns: a new #GZlibDecompressor
32111  * Since: 2.24
32112  */
32113
32114
32115 /**
32116  * gchararray:
32117  *
32118  * A C representable type name for #G_TYPE_STRING.
32119  */
32120
32121
32122 /**
32123  * get_all_desktop_entries_for_mime_type:
32124  * @mime_type: a mime type.
32125  * @except: NULL or a strv list
32126  *
32127  * Returns all the desktop ids for @mime_type. The desktop files
32128  * are listed in an order so that default applications are listed before
32129  * non-default ones, and handlers for inherited mimetypes are listed
32130  * after the base ones.
32131  * Optionally doesn't list the desktop ids given in the @except
32132  * to handle @mime_type.
32133  *
32134  * Returns: a #GList containing the desktop ids which claim
32135  */
32136
32137
32138 /**
32139  * mime_info_cache_reload:
32140  * @dir: directory path which needs reloading.
32141  *
32142  * Reload the mime information for the @dir.
32143  */
32144
32145
32146
32147 /************************************************************/
32148 /* THIS FILE IS GENERATED DO NOT EDIT */
32149 /************************************************************/