1 /************************************************************/
2 /* THIS FILE IS GENERATED DO NOT EDIT */
3 /************************************************************/
8 * If @action is currently enabled.
10 * If the action is disabled then calls to g_action_activate() and
11 * g_action_change_state() have no effect.
20 * The name of the action. This is mostly meaningful for identifying
21 * the action once it has been added to a #GActionGroup.
28 * GAction:parameter-type:
30 * The type of the parameter that must be given when activating the
40 * The state of the action, or %NULL if the action is stateless.
49 * The #GVariantType of the state that the action has, or %NULL if the
50 * action is stateless.
58 * @name: the name of the action
59 * @activate: the callback to connect to the "activate" signal of the action
60 * @parameter_type: the type of the parameter that must be passed to the activate function for this action, given as a single GVariant type string (or %NULL for no parameter)
61 * @state: the initial state for this action, given in GVariant text format. The state is parsed with no extra type information, so type tags must be added to the string if they are necessary.
62 * @change_state: the callback to connect to the "change-state" signal of the action
64 * This struct defines a single action. It is for use with
65 * g_action_map_add_action_entries().
67 * The order of the items in the structure are intended to reflect
68 * frequency of use. It is permissible to use an incomplete initialiser
69 * in order to leave some of the later values as %NULL. All values
70 * after @name are optional. Additional optional fields may be added in
73 * See g_action_map_add_action_entries() for an example.
78 * GActionGroup::action-added:
79 * @action_group: the #GActionGroup that changed
80 * @action_name: the name of the action in @action_group
82 * Signals that a new action was just added to the group.
83 * This signal is emitted after the action has been added
91 * GActionGroup::action-enabled-changed:
92 * @action_group: the #GActionGroup that changed
93 * @action_name: the name of the action in @action_group
94 * @enabled: whether the action is enabled or not
96 * Signals that the enabled status of the named action has changed.
103 * GActionGroup::action-removed:
104 * @action_group: the #GActionGroup that changed
105 * @action_name: the name of the action in @action_group
107 * Signals that an action is just about to be removed from the group.
108 * This signal is emitted before the action is removed, so the action
109 * is still visible and can be queried from the signal handler.
116 * GActionGroup::action-state-changed:
117 * @action_group: the #GActionGroup that changed
118 * @action_name: the name of the action in @action_group
119 * @value: the new value of the state
121 * Signals that the state of the named action has changed.
128 * GActionGroupInterface:
129 * @has_action: the virtual function pointer for g_action_group_has_action()
130 * @list_actions: the virtual function pointer for g_action_group_list_actions()
131 * @get_action_parameter_type: the virtual function pointer for g_action_group_get_action_parameter_type()
132 * @get_action_state_type: the virtual function pointer for g_action_group_get_action_state_type()
133 * @get_action_state_hint: the virtual function pointer for g_action_group_get_action_state_hint()
134 * @get_action_enabled: the virtual function pointer for g_action_group_get_action_enabled()
135 * @get_action_state: the virtual function pointer for g_action_group_get_action_state()
136 * @set_action_state: the virtual function pointer for g_action_group_set_action_state()
137 * @query_action: the virtual function pointer for g_action_group_query_action()
138 * @activate_action: the virtual function pointer for g_action_group_activate_action()
139 * @change_action_state: the virtual function pointer for g_action_group_change_action_state()
140 * @action_added: the class closure for the #GActionGroup::action-added signal
141 * @action_removed: the class closure for the #GActionGroup::action-removed signal
142 * @action_enabled_changed: the class closure for the #GActionGroup::action-enabled-changed signal
143 * @action_state_changed: the class closure for the #GActionGroup::action-enabled-changed signal
145 * The virtual function table for #GActionGroup.
153 * @get_name: the virtual function pointer for g_action_get_name()
154 * @get_parameter_type: the virtual function pointer for g_action_get_parameter_type()
155 * @get_state_type: the virtual function pointer for g_action_get_state_type()
156 * @get_state_hint: the virtual function pointer for g_action_get_state_hint()
157 * @get_enabled: the virtual function pointer for g_action_get_enabled()
158 * @get_state: the virtual function pointer for g_action_get_state()
159 * @change_state: the virtual function pointer for g_action_change_state()
160 * @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.
162 * The virtual function table for #GAction.
169 * GActionMapInterface:
170 * @lookup_action: the virtual function pointer for g_action_map_lookup_action()
171 * @add_action: the virtual function pointer for g_action_map_add_action()
172 * @remove_action: the virtual function pointer for g_action_map_remove_action()
174 * The virtual function table for #GActionMap.
183 * Information about an installed application and methods to launch
184 * it (with file arguments).
189 * GAppInfoCreateFlags:
190 * @G_APP_INFO_CREATE_NONE: No flags.
191 * @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window.
192 * @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments.
193 * @G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION: Application supports startup notification. Since 2.26
195 * Flags used when creating a #GAppInfo.
201 * @g_iface: The parent interface.
202 * @dup: Copies a #GAppInfo.
203 * @equal: Checks two #GAppInfo<!-- -->s for equality.
204 * @get_id: Gets a string identifier for a #GAppInfo.
205 * @get_name: Gets the name of the application for a #GAppInfo.
206 * @get_description: Gets a short description for the application described by the #GAppInfo.
207 * @get_executable: Gets the executable name for the #GAppInfo.
208 * @get_icon: Gets the #GIcon for the #GAppInfo.
209 * @launch: Launches an application specified by the #GAppInfo.
210 * @supports_uris: Indicates whether the application specified supports launching URIs.
211 * @supports_files: Indicates whether the application specified accepts filename arguments.
212 * @launch_uris: Launches an application with a list of URIs.
213 * @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>.
214 * @set_as_default_for_type: Sets an application as default for a given content type.
215 * @set_as_default_for_extension: Sets an application as default for a given file extension.
216 * @add_supports_type: Adds to the #GAppInfo information about supported file types.
217 * @can_remove_supports_type: Checks for support for removing supported file types from a #GAppInfo.
218 * @remove_supports_type: Removes a supported application type from a #GAppInfo.
219 * @can_delete: Checks if a #GAppInfo can be deleted. Since 2.20
220 * @do_delete: Deletes a #GAppInfo. Since 2.20
221 * @get_commandline: Gets the commandline for the #GAppInfo. Since 2.20
222 * @get_display_name: Gets the display name for the #GAppInfo. Since 2.24
223 * @set_as_last_used_for_type: Sets the application as the last used. See g_app_info_set_as_last_used_for_type().
225 * Application Information interface, for operating system portability.
232 * Integrating the launch with the launching application. This is used to
233 * handle for instance startup notification and launching the new application
234 * on the same screen as the launching window.
248 * GApplication::activate:
249 * @application: the application
251 * The ::activate signal is emitted on the primary instance when an
252 * activation occurs. See g_application_activate().
257 * GApplication::command-line:
258 * @application: the application
259 * @command_line: a #GApplicationCommandLine representing the passed commandline
261 * The ::command-line signal is emitted on the primary instance when
262 * a commandline is not handled locally. See g_application_run() and
263 * the #GApplicationCommandline documentation for more information.
265 * process. See g_application_command_line_set_exit_status().
267 * Returns: An integer that is set as the exit status for the calling
272 * GApplication::open:
273 * @application: the application
274 * @files: (array length=n_files) (element-type GFile): an array of #GFiles
275 * @n_files: the length of @files
276 * @hint: a hint provided by the calling instance
278 * The ::open signal is emitted on the primary instance when there are
279 * files to open. See g_application_open() for more information.
284 * GApplication::shutdown:
285 * @application: the application
287 * The ::shutdown signal is emitted only on the registered primary instance
288 * immediately after the main loop terminates.
293 * GApplication::startup:
294 * @application: the application
296 * The ::startup signal is emitted on the primary instance immediately
297 * after registration. See g_application_register().
303 * @startup: invoked on the primary instance immediately after registration
304 * @shutdown: invoked only on the registered primary instance immediately after the main loop terminates
305 * @activate: invoked on the primary instance when an activation occurs
306 * @open: invoked on the primary instance when there are files to open
307 * @command_line: invoked on the primary instance when a command-line is not handled locally
308 * @local_command_line: invoked (locally) when the process has been invoked via commandline execution (as opposed to, say, D-Bus activation - which is not currently supported by GApplication). The virtual function has the chance to inspect (and possibly replace) the list of command line arguments. See g_application_run() for more information.
309 * @before_emit: invoked on the primary instance before 'activate', 'open', 'command-line' or any action invocation, gets the 'platform data' from the calling instance
310 * @after_emit: invoked on the primary instance after 'activate', 'open', 'command-line' or any action invocation, gets the 'platform data' from the calling instance
311 * @add_platform_data: invoked (locally) to add 'platform data' to be sent to the primary instance when activating, opening or invoking actions
312 * @quit_mainloop: Used to be invoked on the primary instance when the use count of the application drops to zero (and after any inactivity timeout, if requested). Not used anymore since 2.32
313 * @run_mainloop: Used to be invoked on the primary instance from g_application_run() if the use-count is non-zero. Since 2.32, GApplication is iterating the main context directly and is not using @run_mainloop anymore
315 * Virtual function table for #GApplication.
322 * GApplicationCommandLineClass:
324 * The <structname>GApplicationCommandLineClass</structname> structure
325 * contains private data only
333 * @G_APPLICATION_FLAGS_NONE: Default
334 * @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.
335 * @G_APPLICATION_IS_LAUNCHER: Don't try to become the primary instance.
336 * @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.
337 * @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.
338 * @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().
339 * @G_APPLICATION_NON_UNIQUE: Make no attempts to do any of the typical single-instance application negotiation. The application neither attempts to become the owner of the application ID nor does it check if an existing owner already exists. Everything occurs in the local process. Since: 2.30.
341 * Flags used to define the behaviour of a #GApplication.
349 * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password.
350 * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username.
351 * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain.
352 * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings.
353 * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users.
355 * #GAskPasswordFlags are used to request specific information from the
356 * user, or to notify the user of their choices in an authentication
364 * Interface for asynchronously initializable objects.
371 * GAsyncInitableIface:
372 * @g_iface: The parent interface.
373 * @init_async: Starts initialization of the object.
374 * @init_finish: Finishes initialization of the object.
376 * Provides an interface for asynchronous initializing object such that
377 * initialization may fail.
384 * GAsyncReadyCallback:
385 * @source_object: the object the asynchronous operation was started with.
386 * @res: a #GAsyncResult.
387 * @user_data: user data passed to the callback.
389 * Type definition for a function that will be called back when an asynchronous
390 * operation within GIO has been completed.
397 * Holds results information for an asynchronous operation,
398 * usually passed directly to a asynchronous _finish() operation.
404 * @g_iface: The parent interface.
405 * @get_user_data: Gets the user data passed to the callback.
406 * @get_source_object: Gets the source object that issued the asynchronous operation.
408 * Interface definition for #GAsyncResult.
414 * @g_class: The #GTypeClass structure to finalize.
416 * A callback function used by the type system to finalize those portions
417 * of a derived types class structure that were setup from the corresponding
418 * GBaseInitFunc() function. Class finalization basically works the inverse
419 * way in which class intialization is performed.
420 * See GClassInitFunc() for a discussion of the class intialization process.
426 * @g_class: The #GTypeClass structure to initialize.
428 * A callback function used by the type system to do base initialization
429 * of the class structures of derived types. It is called as part of the
430 * initialization process of all derived classes and should reallocate
431 * or reset all dynamic class members copied over from the parent class.
432 * For example, class members (such as strings) that are not sufficiently
433 * handled by a plain memory copy of the parent class into the derived class
434 * have to be altered. See GClassInitFunc() for a discussion of the class
435 * intialization process.
442 * <structname>GBinding</structname> is an opaque structure whose members
443 * cannot be accessed directly.
451 * @G_BINDING_DEFAULT: The default binding; if the source property changes, the target property is updated with its value.
452 * @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the property of the source or the property of the target changes, the other is updated.
453 * @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.
454 * @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().
456 * Flags to be passed to g_object_bind_property() or
457 * g_object_bind_property_full().
459 * This enumeration can be extended at later date.
466 * GBindingTransformFunc:
467 * @binding: a #GBinding
468 * @source_value: the value of the source property
469 * @target_value: the value of the target property
470 * @user_data: data passed to the transform function
472 * A function to be called to transform the source property of @source
473 * from @source_value into the target property of @target
474 * using @target_value.
478 * Returns: %TRUE if the transformation was successful, and %FALSE
486 * The <structname>GBookmarkFile</structname> struct contains only
487 * private data and should not be directly accessed.
492 * GBookmarkFileError:
493 * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed
494 * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found
495 * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did not register a bookmark
496 * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found
497 * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed
498 * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an unknown encoding
499 * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing
500 * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found
502 * Error codes returned by bookmark file parsing.
508 * @boxed: The boxed structure to be copied.
510 * This function is provided by the user and should produce a copy
511 * of the passed in boxed structure.
513 * Returns: The newly created copy of the boxed structure.
519 * @boxed: The boxed structure to be freed.
521 * This function is provided by the user and should free the boxed
527 * GBufferedInputStream:
529 * Implements #GFilterInputStream with a sized input buffer.
534 * GBufferedOutputStream:
536 * An implementation of #GFilterOutputStream with a sized buffer.
541 * GBusAcquiredCallback:
542 * @connection: The #GDBusConnection to a message bus.
543 * @name: The name that is requested to be owned.
544 * @user_data: User data passed to g_bus_own_name().
546 * Invoked when a connection to a message bus has been obtained.
553 * GBusNameAcquiredCallback:
554 * @connection: The #GDBusConnection on which to acquired the name.
555 * @name: The name being owned.
556 * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
558 * Invoked when the name is acquired.
565 * GBusNameAppearedCallback:
566 * @connection: The #GDBusConnection the name is being watched on.
567 * @name: The name being watched.
568 * @name_owner: Unique name of the owner of the name being watched.
569 * @user_data: User data passed to g_bus_watch_name().
571 * Invoked when the name being watched is known to have to have a owner.
578 * GBusNameLostCallback:
579 * @connection: The #GDBusConnection on which to acquire the name or %NULL if the connection was disconnected.
580 * @name: The name being owned.
581 * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
583 * Invoked when the name is lost or @connection has been closed.
590 * GBusNameOwnerFlags:
591 * @G_BUS_NAME_OWNER_FLAGS_NONE: No flags set.
592 * @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the the name.
593 * @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.
595 * Flags used in g_bus_own_name().
602 * GBusNameVanishedCallback:
603 * @connection: The #GDBusConnection the name is being watched on.
604 * @name: The name being watched.
605 * @user_data: User data passed to g_bus_watch_name().
607 * Invoked when the name being watched is known not to have to have a owner.
614 * GBusNameWatcherFlags:
615 * @G_BUS_NAME_WATCHER_FLAGS_NONE: No flags set.
616 * @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.
618 * Flags used in g_bus_watch_name().
626 * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any.
627 * @G_BUS_TYPE_NONE: Not a message bus.
628 * @G_BUS_TYPE_SYSTEM: The system-wide message bus.
629 * @G_BUS_TYPE_SESSION: The login session message bus.
631 * An enumeration for well-known message buses.
639 * @closure: the #GClosure
640 * @callback: the callback function
642 * A #GCClosure is a specialization of #GClosure for C function callbacks.
649 * The type used for callback functions in structure definitions and function
650 * signatures. This doesn't mean that all callback functions must take no
651 * parameters and return void. The required signature of a callback function
652 * is determined by the context in which is used (e.g. the signal to which it
653 * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
660 * Allows actions to be cancelled.
665 * GCancellable::cancelled:
666 * @cancellable: a #GCancellable.
668 * Emitted when the operation has been cancelled.
670 * Can be used by implementations of cancellable operations. If the
671 * operation is cancelled from another thread, the signal will be
672 * emitted in the thread that cancelled the operation, not the
673 * thread that is running the operation.
675 * Note that disconnecting from this signal (or any signal) in a
676 * multi-threaded program is prone to race conditions. For instance
677 * it is possible that a signal handler may be invoked even
678 * <emphasis>after</emphasis> a call to
679 * g_signal_handler_disconnect() for that handler has already
682 * There is also a problem when cancellation happen
683 * right before connecting to the signal. If this happens the
684 * signal will unexpectedly not be emitted, and checking before
685 * connecting to the signal leaves a race condition where this is
688 * In order to make it safe and easy to connect handlers there
689 * are two helper functions: g_cancellable_connect() and
690 * g_cancellable_disconnect() which protect against problems
693 * An example of how to us this:
695 * /<!-- -->* Make sure we don't do any unnecessary work if already cancelled *<!-- -->/
696 * if (g_cancellable_set_error_if_cancelled (cancellable))
699 * /<!-- -->* Set up all the data needed to be able to
700 * * handle cancellation of the operation *<!-- -->/
701 * my_data = my_data_new (...);
705 * id = g_cancellable_connect (cancellable,
706 * G_CALLBACK (cancelled_handler)
709 * /<!-- -->* cancellable operation here... *<!-- -->/
711 * g_cancellable_disconnect (cancellable, id);
713 * /<!-- -->* cancelled_handler is never called after this, it
714 * * is now safe to free the data *<!-- -->/
715 * my_data_free (my_data);
718 * Note that the cancelled signal is emitted in the thread that
719 * the user cancelled from, which may be the main thread. So, the
720 * cancellable signal should not do something that can block.
725 * GCancellableSourceFunc:
726 * @cancellable: the #GCancellable
727 * @user_data: data passed in by the user.
729 * This is the function type of the callback used for the #GSource
730 * returned by g_cancellable_source_new().
732 * Returns: it should return %FALSE if the source should be removed.
740 * Conversions between character sets.
747 * An opaque structure representing a checksumming operation.
748 * To create a new GChecksum, use g_checksum_new(). To free
749 * a GChecksum, use g_checksum_free().
757 * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
758 * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
759 * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
761 * The hashing algorithm to be used by #GChecksum when performing the
762 * digest of some data.
764 * Note that the #GChecksumType enumeration may be extended at a later
765 * date to include new hashing algorithm types.
773 * @pid: the process id of the child process
774 * @status: Status information about the child process, see waitpid(2) for more information about this field
775 * @user_data: user data passed to g_child_watch_add()
777 * The type of functions to be called when a child exists.
782 * GClassFinalizeFunc:
783 * @g_class: The #GTypeClass structure to finalize.
784 * @class_data: The @class_data member supplied via the #GTypeInfo structure.
786 * A callback function used by the type system to finalize a class.
787 * This function is rarely needed, as dynamically allocated class resources
788 * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
789 * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
790 * structure of a static type is invalid, because classes of static types
791 * will never be finalized (they are artificially kept alive when their
792 * reference count drops to zero).
798 * @g_class: The #GTypeClass structure to initialize.
799 * @class_data: The @class_data member supplied via the #GTypeInfo structure.
801 * A callback function used by the type system to initialize the class
802 * of a specific type. This function should initialize all static class
804 * The initialization process of a class involves:
807 * 1 - Copying common members from the parent class over to the
808 * derived class structure.
811 * 2 - Zero initialization of the remaining members not copied
812 * over from the parent class.
815 * 3 - Invocation of the GBaseInitFunc() initializers of all parent
816 * types and the class' type.
819 * 4 - Invocation of the class' GClassInitFunc() initializer.
822 * Since derived classes are partially initialized through a memory copy
823 * of the parent class, the general rule is that GBaseInitFunc() and
824 * GBaseFinalizeFunc() should take care of necessary reinitialization
825 * and release of those class members that were introduced by the type
826 * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
827 * GClassInitFunc() should only care about initializing static
828 * class members, while dynamic class members (such as allocated strings
829 * or reference counted resources) are better handled by a GBaseInitFunc()
830 * for this type, so proper initialization of the dynamic class members
831 * is performed for class initialization of derived types as well.
832 * An example may help to correspond the intend of the different class
837 * GObjectClass parent_class;
838 * gint static_integer;
839 * gchar *dynamic_string;
842 * type_a_base_class_init (TypeAClass *class)
844 * class->dynamic_string = g_strdup ("some string");
847 * type_a_base_class_finalize (TypeAClass *class)
849 * g_free (class->dynamic_string);
852 * type_a_class_init (TypeAClass *class)
854 * class->static_integer = 42;
858 * TypeAClass parent_class;
859 * gfloat static_float;
860 * GString *dynamic_gstring;
863 * type_b_base_class_init (TypeBClass *class)
865 * class->dynamic_gstring = g_string_new ("some other string");
868 * type_b_base_class_finalize (TypeBClass *class)
870 * g_string_free (class->dynamic_gstring);
873 * type_b_class_init (TypeBClass *class)
875 * class->static_float = 3.14159265358979323846;
878 * Initialization of TypeBClass will first cause initialization of
879 * TypeAClass (derived classes reference their parent classes, see
880 * g_type_class_ref() on this).
881 * Initialization of TypeAClass roughly involves zero-initializing its fields,
882 * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
883 * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
884 * type_a_class_init() to initialize its static members (static_integer).
885 * The first step in the initialization process of TypeBClass is then
886 * a plain memory copy of the contents of TypeAClass into TypeBClass and
887 * zero-initialization of the remaining fields in TypeBClass.
888 * The dynamic members of TypeAClass within TypeBClass now need
889 * reinitialization which is performed by calling type_a_base_class_init()
890 * with an argument of TypeBClass.
891 * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
892 * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
893 * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
894 * is called to complete the initialization process with the static members
896 * Corresponding finalization counter parts to the GBaseInitFunc() functions
897 * have to be provided to release allocated resources at class finalization
904 * @in_marshal: Indicates whether the closure is currently being invoked with g_closure_invoke()
905 * @is_invalid: Indicates whether the closure has been invalidated by g_closure_invalidate()
907 * A #GClosure represents a callback supplied by the programmer.
913 * @closure: the #GClosure to which the marshaller belongs
914 * @return_value: (allow-none): a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
915 * @n_param_values: the length of the @param_values array
916 * @param_values: (array length=n_param_values): an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
917 * @invocation_hint: (allow-none): the invocation hint given as the last argument to g_closure_invoke()
918 * @marshal_data: (allow-none): additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
920 * The type used for marshaller functions.
926 * @data: data specified when registering the notification callback
927 * @closure: the #GClosure on which the notification is emitted
929 * The type used for the various notification callbacks which can be registered
936 * @G_CONNECT_AFTER: whether the handler should be called before or after the default handler of the signal.
937 * @G_CONNECT_SWAPPED: whether the instance and data should be swapped when calling the handler.
939 * The connection flags are used to specify the behaviour of a signal's
946 * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character sets is not supported.
947 * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input.
948 * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason.
949 * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input.
950 * @G_CONVERT_ERROR_BAD_URI: URI is invalid.
951 * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path.
953 * Error codes returned by character set conversion routines.
960 * Seek object for streaming operations.
968 * @G_CONVERTER_NO_FLAGS: No flags.
969 * @G_CONVERTER_INPUT_AT_END: At end of input data
970 * @G_CONVERTER_FLUSH: Flush data
972 * Flags used when calling a g_converter_convert().
980 * @g_iface: The parent interface.
981 * @convert: Converts data.
982 * @reset: Reverts the internal state of the converter to its initial state.
984 * Provides an interface for converting data from one type
985 * to another type. The conversion can be stateful
986 * and may fail at any place.
993 * GConverterInputStream:
995 * An implementation of #GFilterInputStream that allows data
1001 * GConverterOutputStream:
1003 * An implementation of #GFilterOutputStream that allows data
1010 * @G_CONVERTER_ERROR: There was an error during conversion.
1011 * @G_CONVERTER_CONVERTED: Some data was consumed or produced
1012 * @G_CONVERTER_FINISHED: The conversion is finished
1013 * @G_CONVERTER_FLUSHED: Flushing is finished
1015 * Results returned from g_converter_convert().
1023 * @src: A pointer to the data which should be copied
1024 * @data: Additional data
1026 * A function of this signature is used to copy the node data
1027 * when doing a deep-copy of a tree.
1029 * Returns: A pointer to the copy
1037 * The #GCredentials structure contains only private data and
1038 * should only be accessed using the provided API.
1045 * GCredentialsClass:
1047 * Class structure for #GCredentials.
1055 * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type.
1056 * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a <type>struct ucred</type>.
1057 * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a <type>struct cmsgcred</type>.
1058 * @G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED: The native credentials type is a <type>struct sockpeercred</type>. Added in 2.30.
1060 * Enumeration describing different kinds of native credential types.
1067 * GDBusAnnotationInfo:
1068 * @ref_count: The reference count or -1 if statically allocated.
1069 * @key: The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".
1070 * @value: The value of the annotation.
1071 * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1073 * Information about an annotation.
1081 * @ref_count: The reference count or -1 if statically allocated.
1082 * @name: Name of the argument, e.g. @unix_user_id.
1083 * @signature: D-Bus signature of the argument (a single complete type).
1084 * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1086 * Information about an argument for a method or a signal.
1093 * GDBusAuthMechanism:credentials:
1095 * If authenticating as a server, this property contains the
1096 * received credentials, if any.
1098 * If authenticating as a client, the property contains the
1099 * credentials that were sent, if any.
1104 * GDBusAuthObserver:
1106 * The #GDBusAuthObserver structure contains only private data and
1107 * should only be accessed using the provided API.
1114 * GDBusAuthObserver::authorize-authenticated-peer:
1115 * @observer: The #GDBusAuthObserver emitting the signal.
1116 * @stream: A #GIOStream for the #GDBusConnection.
1117 * @credentials: Credentials received from the peer or %NULL.
1119 * Emitted to check if a peer that is successfully authenticated
1122 * Returns: %TRUE if the peer is authorized, %FALSE if not.
1128 * GDBusAuthObserverClass:
1129 * @authorize_authenticated_peer: Signal class handler for the #GDBusAuthObserver::authorize-authenticated-peer signal.
1131 * Class structure for #GDBusAuthObserverClass.
1139 * @G_DBUS_CALL_FLAGS_NONE: No flags set.
1140 * @G_DBUS_CALL_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this method invocation.
1142 * Flags used in g_dbus_connection_call() and similar APIs.
1149 * GDBusCapabilityFlags:
1150 * @G_DBUS_CAPABILITY_FLAGS_NONE: No flags set.
1151 * @G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING: The connection supports exchanging UNIX file descriptors with the remote peer.
1153 * Capabilities negotiated with the remote peer.
1162 * The #GDBusConnection structure contains only private data and
1163 * should only be accessed using the provided API.
1170 * GDBusConnection::closed:
1171 * @connection: The #GDBusConnection emitting the signal.
1172 * @remote_peer_vanished: %TRUE if @connection is closed because the remote peer closed its end of the connection.
1173 * @error: A #GError with more details about the event or %NULL.
1175 * Emitted when the connection is closed.
1177 * The cause of this event can be
1180 * If g_dbus_connection_close() is called. In this case
1181 * @remote_peer_vanished is set to %FALSE and @error is %NULL.
1182 * </para></listitem>
1184 * If the remote peer closes the connection. In this case
1185 * @remote_peer_vanished is set to %TRUE and @error is set.
1186 * </para></listitem>
1188 * If the remote peer sends invalid or malformed data. In this
1189 * case @remote_peer_vanished is set to %FALSE and @error
1191 * </para></listitem>
1194 * Upon receiving this signal, you should give up your reference to
1195 * @connection. You are guaranteed that this signal is emitted only
1203 * GDBusConnection:address:
1205 * A D-Bus address specifying potential endpoints that can be used
1206 * when establishing the connection.
1213 * GDBusConnection:authentication-observer:
1215 * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
1222 * GDBusConnection:capabilities:
1224 * Flags from the #GDBusCapabilityFlags enumeration
1225 * representing connection features negotiated with the other peer.
1232 * GDBusConnection:closed:
1234 * A boolean specifying whether the connection has been closed.
1241 * GDBusConnection:exit-on-close:
1243 * A boolean specifying whether the process will be terminated (by
1244 * calling <literal>raise(SIGTERM)</literal>) if the connection
1245 * is closed by the remote peer.
1252 * GDBusConnection:flags:
1254 * Flags from the #GDBusConnectionFlags enumeration.
1261 * GDBusConnection:guid:
1263 * The GUID of the peer performing the role of server when
1266 * If you are constructing a #GDBusConnection and pass
1267 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the
1268 * #GDBusConnection:flags property then you MUST also set this
1269 * property to a valid guid.
1271 * If you are constructing a #GDBusConnection and pass
1272 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
1273 * #GDBusConnection:flags property you will be able to read the GUID
1274 * of the other peer here after the connection has been successfully
1282 * GDBusConnection:locked:
1284 * A boolean specifying whether the message is locked.
1291 * GDBusConnection:stream:
1293 * The underlying #GIOStream used for I/O.
1295 * If this is passed on construction and is a #GSocketConnection,
1296 * then the corresponding #GSocket will be put into non-blocking mode.
1298 * While the #GDBusConnection is active, it will interact with this
1299 * stream from a worker thread, so it is not safe to interact with
1300 * the stream directly.
1307 * GDBusConnection:unique-name:
1309 * The unique name as assigned by the message bus or %NULL if the
1310 * connection is not open or not a message bus connection.
1317 * GDBusConnectionClass:
1318 * @closed: Signal class handler for the #GDBusConnection::closed signal.
1320 * Class structure for #GDBusConnection.
1327 * GDBusConnectionFlags:
1328 * @G_DBUS_CONNECTION_FLAGS_NONE: No flags set.
1329 * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT: Perform authentication against server.
1330 * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER: Perform authentication against client.
1331 * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: When authenticating as a server, allow the anonymous authentication method.
1332 * @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.
1333 * @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.
1335 * Flags used when creating a new #GDBusConnection.
1344 * Certain timeout errors, e.g. while starting a service. Warning: this is
1345 * Error codes for the %G_DBUS_ERROR error domain.
1353 * @error_code: An error code.
1354 * @dbus_error_name: The D-Bus error name to associate with @error_code.
1356 * Struct used in g_dbus_error_register_error_domain().
1365 * Base type for D-Bus interfaces.
1372 * GDBusInterfaceGetPropertyFunc:
1373 * @connection: A #GDBusConnection.
1374 * @sender: The unique bus name of the remote caller.
1375 * @object_path: The object path that the method was invoked on.
1376 * @interface_name: The D-Bus interface name for the property.
1377 * @property_name: The name of the property to get the value of.
1378 * @error: Return location for error.
1379 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1381 * The type of the @get_property function in #GDBusInterfaceVTable.
1383 * @error is set. If the returned #GVariant is floating, it is
1384 * consumed - otherwise its reference count is decreased by one.
1386 * Returns: A #GVariant with the value for @property_name or %NULL if
1392 * GDBusInterfaceIface:
1393 * @parent_iface: The parent interface.
1394 * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_get_info().
1395 * @get_object: Gets the enclosing #GDBusObject. See g_dbus_interface_get_object().
1396 * @set_object: Sets the enclosing #GDBusObject. See g_dbus_interface_set_object().
1398 * Base type for D-Bus interfaces.
1405 * GDBusInterfaceInfo:
1406 * @ref_count: The reference count or -1 if statically allocated.
1407 * @name: The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".
1408 * @methods: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods.
1409 * @signals: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals.
1410 * @properties: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties.
1411 * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1413 * Information about a D-Bus interface.
1420 * GDBusInterfaceMethodCallFunc:
1421 * @connection: A #GDBusConnection.
1422 * @sender: The unique bus name of the remote caller.
1423 * @object_path: The object path that the method was invoked on.
1424 * @interface_name: The D-Bus interface name the method was invoked on.
1425 * @method_name: The name of the method that was invoked.
1426 * @parameters: A #GVariant tuple with parameters.
1427 * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
1428 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1430 * The type of the @method_call function in #GDBusInterfaceVTable.
1437 * GDBusInterfaceSetPropertyFunc:
1438 * @connection: A #GDBusConnection.
1439 * @sender: The unique bus name of the remote caller.
1440 * @object_path: The object path that the method was invoked on.
1441 * @interface_name: The D-Bus interface name for the property.
1442 * @property_name: The name of the property to get the value of.
1443 * @value: The value to set the property to.
1444 * @error: Return location for error.
1445 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1447 * The type of the @set_property function in #GDBusInterfaceVTable.
1449 * Returns: %TRUE if the property was set to @value, %FALSE if @error is set.
1455 * GDBusInterfaceSkeleton:
1457 * The #GDBusInterfaceSkeleton structure contains private data and should
1458 * only be accessed using the provided API.
1465 * GDBusInterfaceSkeleton::g-authorize-method:
1466 * @interface: The #GDBusInterfaceSkeleton emitting the signal.
1467 * @invocation: A #GDBusMethodInvocation.
1469 * Emitted when a method is invoked by a remote caller and used to
1470 * determine if the method call is authorized.
1472 * Note that this signal is emitted in a thread dedicated to
1473 * handling the method call so handlers are allowed to perform
1474 * blocking IO. This means that it is appropriate to call
1476 * url="http://hal.freedesktop.org/docs/polkit/PolkitAuthority.html#polkit-authority-check-authorization-sync">polkit_authority_check_authorization_sync()</ulink>
1478 * url="http://hal.freedesktop.org/docs/polkit/PolkitAuthority.html#POLKIT-CHECK-AUTHORIZATION-FLAGS-ALLOW-USER-INTERACTION:CAPS">POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION</ulink> flag set.
1480 * If %FALSE is returned then no further handlers are run and the
1481 * signal handler must take a reference to @invocation and finish
1482 * handling the call (e.g. return an error via
1483 * g_dbus_method_invocation_return_error()).
1485 * Otherwise, if %TRUE is returned, signal emission continues. If no
1486 * handlers return %FALSE, then the method is dispatched. If
1487 * @interface has an enclosing #GDBusObjectSkeleton, then the
1488 * #GDBusObjectSkeleton::authorize-method signal handlers run before
1489 * the handlers for this signal.
1491 * The default class handler just returns %TRUE.
1493 * Please note that the common case is optimized: if no signals
1494 * handlers are connected and the default class handler isn't
1495 * overridden (for both @interface and the enclosing
1496 * #GDBusObjectSkeleton, if any) and #GDBusInterfaceSkeleton:g-flags does
1498 * %G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD
1499 * flags set, no dedicated thread is ever used and the call will be
1500 * handled in the same thread as the object that @interface belongs
1501 * to was exported in.
1503 * Returns: %TRUE if the call is authorized, %FALSE otherwise.
1509 * GDBusInterfaceSkeleton:g-flags:
1511 * Flags from the #GDBusInterfaceSkeletonFlags enumeration.
1518 * GDBusInterfaceSkeletonClass:
1519 * @parent_class: The parent class.
1520 * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details.
1521 * @get_vtable: Returns a #GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details.
1522 * @get_properties: Returns a #GVariant with all properties. See g_dbus_interface_skeleton_get_properties().
1523 * @flush: Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush().
1524 * @g_authorize_method: Signal class handler for the #GDBusInterfaceSkeleton::g-authorize-method signal.
1526 * Class structure for #GDBusInterfaceSkeleton.
1533 * GDBusInterfaceSkeletonFlags:
1534 * @G_DBUS_INTERFACE_SKELETON_FLAGS_NONE: No flags set.
1535 * @G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD: Each method invocation is handled in a thread dedicated to the invocation. This means that the method implementation can use blocking IO without blocking any other part of the process. It also means that the method implementation must use locking to access data structures used by other threads.
1537 * Flags describing the behavior of a #GDBusInterfaceSkeleton instance.
1544 * GDBusInterfaceVTable:
1545 * @method_call: Function for handling incoming method calls.
1546 * @get_property: Function for getting a property.
1547 * @set_property: Function for setting a property.
1549 * Virtual table for handling properties and method calls for a D-Bus
1552 * If you want to handle getting/setting D-Bus properties asynchronously, simply
1553 * register an object with the <literal>org.freedesktop.DBus.Properties</literal>
1554 * D-Bus interface using g_dbus_connection_register_object().
1563 * The #GDBusMessage structure contains only private data and should
1564 * only be accessed using the provided API.
1571 * GDBusMessageByteOrder:
1572 * @G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN: The byte order is big endian.
1573 * @G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN: The byte order is little endian.
1575 * Enumeration used to describe the byte order of a D-Bus message.
1582 * GDBusMessageClass:
1584 * Class structure for #GDBusMessage.
1591 * GDBusMessageFilterFunction:
1592 * @connection: (transfer none): A #GDBusConnection.
1593 * @message: (transfer full): A locked #GDBusMessage that the filter function takes ownership of.
1594 * @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.
1595 * @user_data: User data passed when adding the filter.
1597 * Signature for function used in g_dbus_connection_add_filter().
1599 * A filter function is passed a #GDBusMessage and expected to return
1600 * a #GDBusMessage too. Passive filter functions that don't modify the
1601 * message can simply return the @message object:
1603 * static GDBusMessage *
1604 * passive_filter (GDBusConnection *connection
1605 * GDBusMessage *message,
1606 * gboolean incoming,
1607 * gpointer user_data)
1609 * /<!-- -->* inspect @message *<!-- -->/
1613 * Filter functions that wants to drop a message can simply return %NULL:
1615 * static GDBusMessage *
1616 * drop_filter (GDBusConnection *connection
1617 * GDBusMessage *message,
1618 * gboolean incoming,
1619 * gpointer user_data)
1621 * if (should_drop_message)
1623 * g_object_unref (message);
1629 * Finally, a filter function may modify a message by copying it:
1631 * static GDBusMessage *
1632 * modifying_filter (GDBusConnection *connection
1633 * GDBusMessage *message,
1634 * gboolean incoming,
1635 * gpointer user_data)
1637 * GDBusMessage *copy;
1641 * copy = g_dbus_message_copy (message, &error);
1642 * /<!-- -->* handle @error being is set *<!-- -->/
1643 * g_object_unref (message);
1645 * /<!-- -->* modify @copy *<!-- -->/
1650 * If the returned #GDBusMessage is different from @message and cannot
1651 * be sent on @connection (it could use features, such as file
1652 * descriptors, not compatible with @connection), then a warning is
1653 * logged to <emphasis>standard error</emphasis>. Applications can
1654 * check this ahead of time using g_dbus_message_to_blob() passing a
1655 * #GDBusCapabilityFlags value obtained from @connection.
1657 * g_object_unref() or %NULL to drop the message. Passive filter
1658 * functions can simply return the passed @message object.
1660 * Returns: (transfer full) (allow-none): A #GDBusMessage that will be freed with
1666 * GDBusMessageFlags:
1667 * @G_DBUS_MESSAGE_FLAGS_NONE: No flags set.
1668 * @G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED: A reply is not expected.
1669 * @G_DBUS_MESSAGE_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this message.
1671 * Message flags used in #GDBusMessage.
1678 * GDBusMessageHeaderField:
1679 * @G_DBUS_MESSAGE_HEADER_FIELD_INVALID: Not a valid header field.
1680 * @G_DBUS_MESSAGE_HEADER_FIELD_PATH: The object path.
1681 * @G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE: The interface name.
1682 * @G_DBUS_MESSAGE_HEADER_FIELD_MEMBER: The method or signal name.
1683 * @G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME: The name of the error that occurred.
1684 * @G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL: The serial number the message is a reply to.
1685 * @G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION: The name the message is intended for.
1686 * @G_DBUS_MESSAGE_HEADER_FIELD_SENDER: Unique name of the sender of the message (filled in by the bus).
1687 * @G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE: The signature of the message body.
1688 * @G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS: The number of UNIX file descriptors that accompany the message.
1690 * Header fields used in #GDBusMessage.
1698 * @G_DBUS_MESSAGE_TYPE_INVALID: Message is of invalid type.
1699 * @G_DBUS_MESSAGE_TYPE_METHOD_CALL: Method call.
1700 * @G_DBUS_MESSAGE_TYPE_METHOD_RETURN: Method reply.
1701 * @G_DBUS_MESSAGE_TYPE_ERROR: Error reply.
1702 * @G_DBUS_MESSAGE_TYPE_SIGNAL: Signal emission.
1704 * Message types used in #GDBusMessage.
1712 * @ref_count: The reference count or -1 if statically allocated.
1713 * @name: The name of the D-Bus method, e.g. @RequestName.
1714 * @in_args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no in arguments.
1715 * @out_args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no out arguments.
1716 * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1718 * Information about a method on an D-Bus interface.
1725 * GDBusMethodInvocation:
1727 * The #GDBusMethodInvocation structure contains only private data and
1728 * should only be accessed using the provided API.
1735 * GDBusMethodInvocationClass:
1737 * Class structure for #GDBusMethodInvocation.
1745 * @ref_count: The reference count or -1 if statically allocated.
1746 * @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.
1747 * @interfaces: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces.
1748 * @nodes: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes.
1749 * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1751 * Information about nodes in a remote object hierarchy.
1758 * GDBusObject::interface-added:
1759 * @object: The #GDBusObject emitting the signal.
1760 * @interface: The #GDBusInterface that was added.
1762 * Emitted when @interface is added to @object.
1769 * GDBusObject::interface-removed:
1770 * @object: The #GDBusObject emitting the signal.
1771 * @interface: The #GDBusInterface that was removed.
1773 * Emitted when @interface is removed from @object.
1781 * @parent_iface: The parent interface.
1782 * @get_object_path: Returns the object path. See g_dbus_object_get_object_path().
1783 * @get_interfaces: Returns all interfaces. See g_dbus_object_get_interfaces().
1784 * @get_interface: Returns an interface by name. See g_dbus_object_get_interface().
1785 * @interface_added: Signal handler for the #GDBusObject::interface-added signal.
1786 * @interface_removed: Signal handler for the #GDBusObject::interface-removed signal.
1788 * Base object type for D-Bus objects.
1795 * GDBusObjectManager::interface-added:
1796 * @manager: The #GDBusObjectManager emitting the signal.
1797 * @object: The #GDBusObject on which an interface was added.
1798 * @interface: The #GDBusInterface that was added.
1800 * Emitted when @interface is added to @object.
1802 * This signal exists purely as a convenience to avoid having to
1803 * connect signals to all objects managed by @manager.
1810 * GDBusObjectManager::interface-removed:
1811 * @manager: The #GDBusObjectManager emitting the signal.
1812 * @object: The #GDBusObject on which an interface was removed.
1813 * @interface: The #GDBusInterface that was removed.
1815 * Emitted when @interface has been removed from @object.
1817 * This signal exists purely as a convenience to avoid having to
1818 * connect signals to all objects managed by @manager.
1825 * GDBusObjectManager::object-added:
1826 * @manager: The #GDBusObjectManager emitting the signal.
1827 * @object: The #GDBusObject that was added.
1829 * Emitted when @object is added to @manager.
1836 * GDBusObjectManager::object-removed:
1837 * @manager: The #GDBusObjectManager emitting the signal.
1838 * @object: The #GDBusObject that was removed.
1840 * Emitted when @object is removed from @manager.
1847 * GDBusObjectManagerClient:
1849 * The #GDBusObjectManagerClient structure contains private data and should
1850 * only be accessed using the provided API.
1857 * GDBusObjectManagerClient::interface-proxy-properties-changed:
1858 * @manager: The #GDBusObjectManagerClient emitting the signal.
1859 * @object_proxy: The #GDBusObjectProxy on which an interface has properties that are changing.
1860 * @interface_proxy: The #GDBusProxy that has properties that are changing.
1861 * @changed_properties: A #GVariant containing the properties that changed.
1862 * @invalidated_properties: A %NULL terminated array of properties that was invalidated.
1864 * Emitted when one or more D-Bus properties on proxy changes. The
1865 * local cache has already been updated when this signal fires. Note
1866 * that both @changed_properties and @invalidated_properties are
1867 * guaranteed to never be %NULL (either may be empty though).
1869 * This signal exists purely as a convenience to avoid having to
1870 * connect signals to all interface proxies managed by @manager.
1872 * This signal is emitted in the
1873 * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
1874 * that @manager was constructed in.
1881 * GDBusObjectManagerClient::interface-proxy-signal:
1882 * @manager: The #GDBusObjectManagerClient emitting the signal.
1883 * @object_proxy: The #GDBusObjectProxy on which an interface is emitting a D-Bus signal.
1884 * @interface_proxy: The #GDBusProxy that is emitting a D-Bus signal.
1885 * @sender_name: The sender of the signal or NULL if the connection is not a bus connection.
1886 * @signal_name: The signal name.
1887 * @parameters: A #GVariant tuple with parameters for the signal.
1889 * Emitted when a D-Bus signal is received on @interface_proxy.
1891 * This signal exists purely as a convenience to avoid having to
1892 * connect signals to all interface proxies managed by @manager.
1894 * This signal is emitted in the
1895 * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
1896 * that @manager was constructed in.
1903 * GDBusObjectManagerClient:bus-type:
1905 * If this property is not %G_BUS_TYPE_NONE, then
1906 * #GDBusObjectManagerClient:connection must be %NULL and will be set to the
1907 * #GDBusConnection obtained by calling g_bus_get() with the value
1915 * GDBusObjectManagerClient:connection:
1917 * The #GDBusConnection to use.
1924 * GDBusObjectManagerClient:flags:
1926 * Flags from the #GDBusObjectManagerClientFlags enumeration.
1933 * GDBusObjectManagerClient:get-proxy-type-destroy-notify:
1935 * A #GDestroyNotify for the #gpointer user_data in #GDBusObjectManagerClient:get-proxy-type-user-data.
1942 * GDBusObjectManagerClient:get-proxy-type-func:
1944 * The #GDBusProxyTypeFunc to use when determining what #GType to
1945 * use for interface proxies or %NULL.
1952 * GDBusObjectManagerClient:get-proxy-type-user-data:
1954 * The #gpointer user_data to pass to #GDBusObjectManagerClient:get-proxy-type-func.
1961 * GDBusObjectManagerClient:name:
1963 * The well-known name or unique name that the manager is for.
1970 * GDBusObjectManagerClient:name-owner:
1972 * The unique name that owns #GDBusObjectManagerClient:name or %NULL if
1973 * no-one is currently owning the name. Connect to the
1974 * #GObject::notify signal to track changes to this property.
1981 * GDBusObjectManagerClient:object-path:
1983 * The object path the manager is for.
1990 * GDBusObjectManagerClientClass:
1991 * @parent_class: The parent class.
1992 * @interface_proxy_signal: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-signal signal.
1993 * @interface_proxy_properties_changed: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-properties-changed signal.
1995 * Class structure for #GDBusObjectManagerClient.
2002 * GDBusObjectManagerClientFlags:
2003 * @G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE: No flags set.
2004 * @G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START: If not set and the manager is for a well-known name, then request the bus to launch an owner for the name if no-one owns the name. This flag can only be used in managers for well-known names.
2006 * Flags used when constructing a #GDBusObjectManagerClient.
2013 * GDBusObjectManagerIface:
2014 * @parent_iface: The parent interface.
2015 * @get_object_path: Virtual function for g_dbus_object_manager_get_object_path().
2016 * @get_objects: Virtual function for g_dbus_object_manager_get_objects().
2017 * @get_object: Virtual function for g_dbus_object_manager_get_object().
2018 * @get_interface: Virtual function for g_dbus_object_manager_get_interface().
2019 * @object_added: Signal handler for the #GDBusObjectManager::object-added signal.
2020 * @object_removed: Signal handler for the #GDBusObjectManager::object-removed signal.
2021 * @interface_added: Signal handler for the #GDBusObjectManager::interface-added signal.
2022 * @interface_removed: Signal handler for the #GDBusObjectManager::interface-removed signal.
2024 * Base type for D-Bus object managers.
2031 * GDBusObjectManagerServer:
2033 * The #GDBusObjectManagerServer structure contains private data and should
2034 * only be accessed using the provided API.
2041 * GDBusObjectManagerServer:connection:
2043 * The #GDBusConnection to export objects on.
2050 * GDBusObjectManagerServer:object-path:
2052 * The object path to register the manager object at.
2059 * GDBusObjectManagerServerClass:
2060 * @parent_class: The parent class.
2062 * Class structure for #GDBusObjectManagerServer.
2071 * The #GDBusObjectProxy structure contains private data and should
2072 * only be accessed using the provided API.
2079 * GDBusObjectProxy:g-connection:
2081 * The connection of the proxy.
2088 * GDBusObjectProxy:g-object-path:
2090 * The object path of the proxy.
2097 * GDBusObjectProxyClass:
2098 * @parent_class: The parent class.
2100 * Class structure for #GDBusObjectProxy.
2107 * GDBusObjectSkeleton:
2109 * The #GDBusObjectSkeleton structure contains private data and should only be
2110 * accessed using the provided API.
2117 * GDBusObjectSkeleton::authorize-method:
2118 * @object: The #GDBusObjectSkeleton emitting the signal.
2119 * @interface: The #GDBusInterfaceSkeleton that @invocation is for.
2120 * @invocation: A #GDBusMethodInvocation.
2122 * Emitted when a method is invoked by a remote caller and used to
2123 * determine if the method call is authorized.
2125 * This signal is like #GDBusInterfaceSkeleton<!-- -->'s
2126 * #GDBusInterfaceSkeleton::g-authorize-method signal, except that it is
2127 * for the enclosing object.
2129 * The default class handler just returns %TRUE.
2131 * Returns: %TRUE if the call is authorized, %FALSE otherwise.
2137 * GDBusObjectSkeleton:g-object-path:
2139 * The object path where the object is exported.
2146 * GDBusObjectSkeletonClass:
2147 * @parent_class: The parent class.
2148 * @authorize_method: Signal class handler for the #GDBusObjectSkeleton::authorize-method signal.
2150 * Class structure for #GDBusObjectSkeleton.
2157 * GDBusPropertyInfo:
2158 * @ref_count: The reference count or -1 if statically allocated.
2159 * @name: The name of the D-Bus property, e.g. "SupportedFilesystems".
2160 * @signature: The D-Bus signature of the property (a single complete type).
2161 * @flags: Access control flags for the property.
2162 * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
2164 * Information about a D-Bus property on a D-Bus interface.
2171 * GDBusPropertyInfoFlags:
2172 * @G_DBUS_PROPERTY_INFO_FLAGS_NONE: No flags set.
2173 * @G_DBUS_PROPERTY_INFO_FLAGS_READABLE: Property is readable.
2174 * @G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE: Property is writable.
2176 * Flags describing the access control of a D-Bus property.
2185 * The #GDBusProxy structure contains only private data and
2186 * should only be accessed using the provided API.
2193 * GDBusProxy::g-properties-changed:
2194 * @proxy: The #GDBusProxy emitting the signal.
2195 * @changed_properties: A #GVariant containing the properties that changed
2196 * @invalidated_properties: A %NULL terminated array of properties that was invalidated
2198 * Emitted when one or more D-Bus properties on @proxy changes. The
2199 * local cache has already been updated when this signal fires. Note
2200 * that both @changed_properties and @invalidated_properties are
2201 * guaranteed to never be %NULL (either may be empty though).
2203 * This signal corresponds to the
2204 * <literal>PropertiesChanged</literal> D-Bus signal on the
2205 * <literal>org.freedesktop.DBus.Properties</literal> interface.
2212 * GDBusProxy::g-signal:
2213 * @proxy: The #GDBusProxy emitting the signal.
2214 * @sender_name: The sender of the signal or %NULL if the connection is not a bus connection.
2215 * @signal_name: The name of the signal.
2216 * @parameters: A #GVariant tuple with parameters for the signal.
2218 * Emitted when a signal from the remote object and interface that @proxy is for, has been received.
2225 * GDBusProxy:g-bus-type:
2227 * If this property is not %G_BUS_TYPE_NONE, then
2228 * #GDBusProxy:g-connection must be %NULL and will be set to the
2229 * #GDBusConnection obtained by calling g_bus_get() with the value
2237 * GDBusProxy:g-connection:
2239 * The #GDBusConnection the proxy is for.
2246 * GDBusProxy:g-default-timeout:
2248 * The timeout to use if -1 (specifying default timeout) is passed
2249 * as @timeout_msec in the g_dbus_proxy_call() and
2250 * g_dbus_proxy_call_sync() functions.
2252 * This allows applications to set a proxy-wide timeout for all
2253 * remote method invocations on the proxy. If this property is -1,
2254 * the default timeout (typically 25 seconds) is used. If set to
2255 * %G_MAXINT, then no timeout is used.
2262 * GDBusProxy:g-flags:
2264 * Flags from the #GDBusProxyFlags enumeration.
2271 * GDBusProxy:g-interface-info:
2273 * Ensure that interactions with this proxy conform to the given
2274 * interface. This is mainly to ensure that malformed data received
2275 * from the other peer is ignored. The given #GDBusInterfaceInfo is
2276 * said to be the <emphasis>expected interface</emphasis>.
2278 * The checks performed are:
2281 * When completing a method call, if the type signature of
2282 * the reply message isn't what's expected, the reply is
2283 * discarded and the #GError is set to %G_IO_ERROR_INVALID_ARGUMENT.
2284 * </para></listitem>
2286 * Received signals that have a type signature mismatch are dropped and
2287 * a warning is logged via g_warning().
2288 * </para></listitem>
2290 * Properties received via the initial <literal>GetAll()</literal> call
2291 * or via the <literal>::PropertiesChanged</literal> signal (on the
2292 * <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties">org.freedesktop.DBus.Properties</ulink> interface) or
2293 * set using g_dbus_proxy_set_cached_property() with a type signature
2294 * mismatch are ignored and a warning is logged via g_warning().
2295 * </para></listitem>
2297 * Note that these checks are never done on methods, signals and
2298 * properties that are not referenced in the given
2299 * #GDBusInterfaceInfo, since extending a D-Bus interface on the
2300 * service-side is not considered an ABI break.
2307 * GDBusProxy:g-interface-name:
2309 * The D-Bus interface name the proxy is for.
2316 * GDBusProxy:g-name:
2318 * The well-known or unique name that the proxy is for.
2325 * GDBusProxy:g-name-owner:
2327 * The unique name that owns #GDBusProxy:name or %NULL if no-one
2328 * currently owns that name. You may connect to #GObject::notify signal to
2329 * track changes to this property.
2336 * GDBusProxy:g-object-path:
2338 * The object path the proxy is for.
2346 * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal.
2347 * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal.
2349 * Class structure for #GDBusProxy.
2357 * @G_DBUS_PROXY_FLAGS_NONE: No flags set.
2358 * @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties.
2359 * @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object.
2360 * @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.
2362 * Flags used when constructing an instance of a #GDBusProxy derived class.
2369 * GDBusProxyTypeFunc:
2370 * @manager: A #GDBusObjectManagerClient.
2371 * @object_path: The object path of the remote object.
2372 * @interface_name: (allow-none): The interface name of the remote object or %NULL if a #GDBusObjectProxy #GType is requested.
2373 * @user_data: User data.
2375 * Function signature for a function used to determine the #GType to
2376 * use for an interface proxy (if @interface_name is not %NULL) or
2377 * object proxy (if @interface_name is %NULL).
2379 * This function is called in the
2380 * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
2381 * that @manager was constructed in.
2383 * must be a #GDBusProxy<!-- -->- or #GDBusObjectProxy<!-- -->-derived
2386 * Returns: A #GType to use for the remote object. The returned type
2392 * GDBusSendMessageFlags:
2393 * @G_DBUS_SEND_MESSAGE_FLAGS_NONE: No flags set.
2394 * @G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL: Do not automatically assign a serial number from the #GDBusConnection object when sending a message.
2396 * Flags used when sending #GDBusMessage<!-- -->s on a #GDBusConnection.
2405 * The #GDBusServer structure contains only private data and
2406 * should only be accessed using the provided API.
2413 * GDBusServer::new-connection:
2414 * @server: The #GDBusServer emitting the signal.
2415 * @connection: A #GDBusConnection for the new connection.
2417 * Emitted when a new authenticated connection has been made. Use
2418 * g_dbus_connection_get_peer_credentials() to figure out what
2419 * identity (if any), was authenticated.
2421 * If you want to accept the connection, take a reference to the
2422 * @connection object and return %TRUE. When you are done with the
2423 * connection call g_dbus_connection_close() and give up your
2424 * reference. Note that the other peer may disconnect at any time -
2425 * a typical thing to do when accepting a connection is to listen to
2426 * the #GDBusConnection::closed signal.
2428 * If #GDBusServer:flags contains %G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
2429 * then the signal is emitted in a new thread dedicated to the
2430 * connection. Otherwise the signal is emitted in the <link
2431 * linkend="g-main-context-push-thread-default">thread-default main
2432 * loop</link> of the thread that @server was constructed in.
2434 * You are guaranteed that signal handlers for this signal runs
2435 * before incoming messages on @connection are processed. This means
2436 * that it's suitable to call g_dbus_connection_register_object() or
2437 * similar from the signal handler.
2441 * Returns: %TRUE to claim @connection, %FALSE to let other handlers
2447 * GDBusServer:active:
2449 * Whether the server is currently active.
2456 * GDBusServer:address:
2458 * The D-Bus address to listen on.
2465 * GDBusServer:authentication-observer:
2467 * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
2474 * GDBusServer:client-address:
2476 * The D-Bus address that clients can use.
2483 * GDBusServer:flags:
2485 * Flags from the #GDBusServerFlags enumeration.
2494 * The guid of the server.
2502 * @new_connection: Signal class handler for the #GDBusServer::new-connection signal.
2504 * Class structure for #GDBusServer.
2512 * @G_DBUS_SERVER_FLAGS_NONE: No flags set.
2513 * @G_DBUS_SERVER_FLAGS_RUN_IN_THREAD: All #GDBusServer::new-connection signals will run in separated dedicated threads (see signal for details).
2514 * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: Allow the anonymous authentication method.
2516 * Flags used when creating a #GDBusServer.
2523 * GDBusSignalCallback:
2524 * @connection: A #GDBusConnection.
2525 * @sender_name: The unique bus name of the sender of the signal.
2526 * @object_path: The object path that the signal was emitted on.
2527 * @interface_name: The name of the interface.
2528 * @signal_name: The name of the signal.
2529 * @parameters: A #GVariant tuple with parameters for the signal.
2530 * @user_data: User data passed when subscribing to the signal.
2532 * Signature for callback function used in g_dbus_connection_signal_subscribe().
2540 * @G_DBUS_SIGNAL_FLAGS_NONE: No flags set.
2541 * @G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE: Don't actually send the AddMatch D-Bus call for this signal subscription. This gives you more control over which match rules you add (but you must add them manually).
2543 * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe().
2551 * @ref_count: The reference count or -1 if statically allocated.
2552 * @name: The name of the D-Bus signal, e.g. "NameOwnerChanged".
2553 * @args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments.
2554 * @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
2556 * Information about a signal on a D-Bus interface.
2563 * GDBusSubtreeDispatchFunc:
2564 * @connection: A #GDBusConnection.
2565 * @sender: The unique bus name of the remote caller.
2566 * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2567 * @interface_name: The D-Bus interface name that the method call or property access is for.
2568 * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
2569 * @out_user_data: Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL).
2570 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2572 * The type of the @dispatch function in #GDBusSubtreeVTable.
2574 * Subtrees are flat. @node, if non-%NULL, is always exactly one
2575 * segment of the object path (ie: it never contains a slash).
2577 * Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.
2583 * GDBusSubtreeEnumerateFunc:
2584 * @connection: A #GDBusConnection.
2585 * @sender: The unique bus name of the remote caller.
2586 * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2587 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2589 * The type of the @enumerate function in #GDBusSubtreeVTable.
2591 * This function is called when generating introspection data and also
2592 * when preparing to dispatch incoming messages in the event that the
2593 * %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not
2594 * specified (ie: to verify that the object path is valid).
2596 * Hierarchies are not supported; the items that you return should not
2597 * contain the '/' character.
2599 * The return value will be freed with g_strfreev().
2601 * Returns: A newly allocated array of strings for node names that are children of @object_path.
2607 * GDBusSubtreeFlags:
2608 * @G_DBUS_SUBTREE_FLAGS_NONE: No flags set.
2609 * @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.
2611 * Flags passed to g_dbus_connection_register_subtree().
2618 * GDBusSubtreeIntrospectFunc:
2619 * @connection: A #GDBusConnection.
2620 * @sender: The unique bus name of the remote caller.
2621 * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2622 * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
2623 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2625 * The type of the @introspect function in #GDBusSubtreeVTable.
2627 * Subtrees are flat. @node, if non-%NULL, is always exactly one
2628 * segment of the object path (ie: it never contains a slash).
2630 * This function should return %NULL to indicate that there is no object
2633 * If this function returns non-%NULL, the return value is expected to
2634 * be a %NULL-terminated array of pointers to #GDBusInterfaceInfo
2635 * structures describing the interfaces implemented by @node. This
2636 * array will have g_dbus_interface_info_unref() called on each item
2637 * before being freed with g_free().
2639 * The difference between returning %NULL and an array containing zero
2640 * items is that the standard DBus interfaces will returned to the
2641 * remote introspector in the empty array case, but not in the %NULL
2644 * Returns: A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL.
2650 * GDBusSubtreeVTable:
2651 * @enumerate: Function for enumerating child nodes.
2652 * @introspect: Function for introspecting a child node.
2653 * @dispatch: Function for dispatching a remote call on a child node.
2655 * Virtual table for handling subtrees registered with g_dbus_connection_register_subtree().
2664 * An implementation of #GBufferedInputStream that allows for high-level
2665 * data manipulation of arbitrary data (including binary operations).
2670 * GDataOutputStream:
2672 * An implementation of #GBufferedOutputStream that allows for high-level
2673 * data manipulation of arbitrary data (including binary operations).
2678 * GDataOutputStream:byte-order:
2680 * Determines the byte ordering that is used when writing
2681 * multi-byte entities (such as integers) to the stream.
2686 * GDataStream:byte-order:
2688 * The ::byte-order property determines the byte ordering that
2689 * is used when reading multi-byte entities (such as integers)
2695 * GDataStream:newline-type:
2697 * The :newline-type property determines what is considered
2698 * as a line ending when reading complete lines from the stream.
2703 * GDataStreamByteOrder:
2704 * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order.
2705 * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order.
2706 * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture.
2708 * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources
2709 * across various machine architectures.
2714 * GDataStreamNewlineType:
2715 * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms.
2716 * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings.
2717 * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows.
2718 * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type.
2720 * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file.
2727 * <structname>GDateTime</structname> is an opaque structure whose members
2728 * cannot be accessed directly.
2739 * Associates a string with a bit flag.
2740 * Used in g_parse_debug_string().
2747 * Information about an installed application from a desktop file.
2752 * GDesktopAppInfo:filename:
2754 * The origin filename of this #GDesktopAppInfo
2759 * GDesktopAppInfoLookup:
2761 * Interface that is used by backends to associate default
2762 * handlers with URI schemes.
2767 * GDesktopAppLaunchCallback:
2768 * @appinfo: a #GDesktopAppInfo
2769 * @pid: Process identifier
2770 * @user_data: User data
2772 * During invocation, g_desktop_app_info_launch_uris_as_manager() may
2773 * create one or more child processes. This callback is invoked once
2774 * for each, providing the process ID.
2781 * Opaque drive object.
2787 * @drive: a #GDrive.
2789 * Emitted when the drive's state has changed.
2794 * GDrive::disconnected:
2795 * @drive: a #GDrive.
2797 * This signal is emitted when the #GDrive have been
2798 * disconnected. If the recipient is holding references to the
2799 * object they should release them so the object can be
2805 * GDrive::eject-button:
2806 * @drive: a #GDrive.
2808 * Emitted when the physical eject button (if any) of a drive has
2814 * GDrive::stop-button:
2815 * @drive: a #GDrive.
2817 * Emitted when the physical stop button (if any) of a drive has
2826 * @g_iface: The parent interface.
2827 * @changed: Signal emitted when the drive is changed.
2828 * @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.
2829 * @eject_button: Signal emitted when the physical eject button (if any) of a drive have been pressed.
2830 * @get_name: Returns the name for the given #GDrive.
2831 * @get_icon: Returns a #GIcon for the given #GDrive.
2832 * @has_volumes: Returns %TRUE if the #GDrive has mountable volumes.
2833 * @get_volumes: Returns a list #GList of #GVolume for the #GDrive.
2834 * @is_media_removable: Returns %TRUE if the #GDrive supports removal and insertion of media.
2835 * @has_media: Returns %TRUE if the #GDrive has media inserted.
2836 * @is_media_check_automatic: Returns %TRUE if the #GDrive is capabable of automatically detecting media changes.
2837 * @can_poll_for_media: Returns %TRUE if the #GDrive is capable of manually polling for media change.
2838 * @can_eject: Returns %TRUE if the #GDrive can eject media.
2839 * @eject: Ejects a #GDrive.
2840 * @eject_finish: Finishes an eject operation.
2841 * @poll_for_media: Poll for media insertion/removal on a #GDrive.
2842 * @poll_for_media_finish: Finishes a media poll operation.
2843 * @get_identifier: Returns the identifier of the given kind, or %NULL if the #GDrive doesn't have one.
2844 * @enumerate_identifiers: Returns an array strings listing the kinds of identifiers which the #GDrive has.
2845 * @get_start_stop_type: Gets a #GDriveStartStopType with details about starting/stopping the drive. Since 2.22.
2846 * @can_stop: Returns %TRUE if a #GDrive can be stopped. Since 2.22.
2847 * @stop: Stops a #GDrive. Since 2.22.
2848 * @stop_finish: Finishes a stop operation. Since 2.22.
2849 * @can_start: Returns %TRUE if a #GDrive can be started. Since 2.22.
2850 * @can_start_degraded: Returns %TRUE if a #GDrive can be started degraded. Since 2.22.
2851 * @start: Starts a #GDrive. Since 2.22.
2852 * @start_finish: Finishes a start operation. Since 2.22.
2853 * @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.
2854 * @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22.
2855 * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
2856 * @get_sort_key: Gets a key used for sorting #GDrive instances or %NULL if no such key exists. Since 2.32.
2858 * Interface for creating #GDrive implementations.
2864 * @G_DRIVE_START_NONE: No flags set.
2866 * Flags used when starting a drive.
2873 * GDriveStartStopType:
2874 * @G_DRIVE_START_STOP_TYPE_UNKNOWN: Unknown or drive doesn't support start/stop.
2875 * @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.
2876 * @G_DRIVE_START_STOP_TYPE_NETWORK: The start/stop methods are used for connecting/disconnect to the drive over the network.
2877 * @G_DRIVE_START_STOP_TYPE_MULTIDISK: The start/stop methods will assemble/disassemble a virtual drive from several physical drives.
2878 * @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)
2880 * Enumeration describing how a drive can be started/stopped.
2889 * An object for Emblems
2895 * @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin
2896 * @G_EMBLEM_ORIGIN_DEVICE: Emblem adds device-specific information
2897 * @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly"
2898 * @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)
2900 * GEmblemOrigin is used to add information about the origin of the emblem
2910 * An implementation of #GIcon for icons with emblems.
2916 * @g_type_class: the parent class
2917 * @minimum: the smallest possible value.
2918 * @maximum: the largest possible value.
2919 * @n_values: the number of possible values.
2920 * @values: an array of #GEnumValue structs describing the individual values.
2922 * The class of an enumeration type holds information about its
2929 * @value: the enum value
2930 * @value_name: the name of the value
2931 * @value_nick: the nickname of the value
2933 * A structure which contains a single enum value, its name, and its
2940 * @domain: error domain, e.g. #G_FILE_ERROR
2941 * @code: error code, e.g. %G_FILE_ERROR_NOENT
2942 * @message: human-readable informative error message
2944 * The <structname>GError</structname> structure contains
2945 * information about an error that has occurred.
2952 * A handle to an object implementing the #GFileIface interface.
2953 * Generally stores a location within the file system. Handles do not
2954 * necessarily represent files or directories that currently exist.
2959 * GFileAttributeInfo:
2960 * @name: the name of the attribute.
2961 * @type: the #GFileAttributeType type of the attribute.
2962 * @flags: a set of #GFileAttributeInfoFlags.
2964 * Information about a specific attribute.
2969 * GFileAttributeInfoFlags:
2970 * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set.
2971 * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied.
2972 * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved.
2974 * Flags specifying the behaviour of an attribute.
2979 * GFileAttributeInfoList:
2980 * @infos: an array of #GFileAttributeInfo<!-- -->s.
2981 * @n_infos: the number of values in the array.
2983 * Acts as a lightweight registry for possible valid file attributes.
2984 * The registry stores Key-Value pair formats as #GFileAttributeInfo<!-- -->s.
2989 * GFileAttributeMatcher:
2991 * Determines if a string matches a file attribute.
2996 * GFileAttributeStatus:
2997 * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty).
2998 * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set.
2999 * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value.
3001 * Used by g_file_set_attributes_from_info() when setting file attributes.
3006 * GFileAttributeType:
3007 * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitalized type.
3008 * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string.
3009 * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes.
3010 * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value.
3011 * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer.
3012 * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer.
3013 * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer.
3014 * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer.
3015 * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject.
3016 * @G_FILE_ATTRIBUTE_TYPE_STRINGV: a %NULL terminated char **. Since 2.22
3018 * The data types for file attributes.
3024 * @G_FILE_COPY_NONE: No flags set.
3025 * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
3026 * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
3027 * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
3028 * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
3029 * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
3030 * @G_FILE_COPY_TARGET_DEFAULT_PERMS: Leaves target file with default perms, instead of setting the source file perms.
3032 * Flags used when copying or moving files.
3038 * @G_FILE_CREATE_NONE: No flags set.
3039 * @G_FILE_CREATE_PRIVATE: Create a file that can only be accessed by the current user.
3040 * @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
3042 * Flags used when an operation may create a file.
3047 * GFileDescriptorBased:
3049 * An interface for file descriptor based io objects.
3054 * GFileDescriptorBasedIface:
3055 * @g_iface: The parent interface.
3064 * A per matched file iterator.
3071 * A subclass of GIOStream for opened files. This adds
3072 * a few file-specific operations and seeking and truncating.
3074 * #GFileIOStream implements GSeekable.
3081 * Gets an icon for a #GFile. Implements #GLoadableIcon.
3088 * The file containing the icon.
3094 * @g_iface: The parent interface.
3095 * @dup: Duplicates a #GFile.
3096 * @hash: Creates a hash of a #GFile.
3097 * @equal: Checks equality of two given #GFile<!-- -->s.
3098 * @is_native: Checks to see if a file is native to the system.
3099 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
3100 * @get_uri_scheme: Gets the URI scheme for a #GFile.
3101 * @get_basename: Gets the basename for a given #GFile.
3102 * @get_path: Gets the current path within a #GFile.
3103 * @get_uri: Gets a URI for the path within a #GFile.
3104 * @get_parse_name: Gets the parsed name for the #GFile.
3105 * @get_parent: Gets the parent directory for the #GFile.
3106 * @prefix_matches: Checks whether a #GFile contains a specified file.
3107 * @get_relative_path: Gets the path for a #GFile relative to a given path.
3108 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
3109 * @get_child_for_display_name: Gets the child #GFile for a given display name.
3110 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
3111 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
3112 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
3113 * @query_info: Gets the #GFileInfo for a #GFile.
3114 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
3115 * @query_info_finish: Finishes an asynchronous query info operation.
3116 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
3117 * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
3118 * @query_filesystem_info_finish: Finishes asynchronously getting the file system info.
3119 * @find_enclosing_mount: Gets a #GMount for the #GFile.
3120 * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
3121 * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
3122 * @set_display_name: Sets the display name for a #GFile.
3123 * @set_display_name_async: Asynchronously sets a #GFile's display name.
3124 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
3125 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
3126 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
3127 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
3128 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
3129 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
3130 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
3131 * @set_attribute: Sets a #GFileAttribute.
3132 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
3133 * @set_attributes_async: Asynchronously sets a file's attributes.
3134 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
3135 * @read_fn: Reads a file asynchronously.
3136 * @read_async: Asynchronously reads a file.
3137 * @read_finish: Finishes asynchronously reading a file.
3138 * @append_to: Writes to the end of a file.
3139 * @append_to_async: Asynchronously writes to the end of a file.
3140 * @append_to_finish: Finishes an asynchronous file append operation.
3141 * @create: Creates a new file.
3142 * @create_async: Asynchronously creates a file.
3143 * @create_finish: Finishes asynchronously creating a file.
3144 * @replace: Replaces the contents of a file.
3145 * @replace_async: Asynchronously replaces the contents of a file.
3146 * @replace_finish: Finishes asynchronously replacing a file.
3147 * @delete_file: Deletes a file.
3148 * @_delete_file_async: Asynchronously deletes a file.
3149 * @_delete_file_finish: Finishes an asynchronous delete.
3150 * @trash: Sends a #GFile to the Trash location.
3151 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
3152 * @_trash_finish: Finishes an asynchronous file trashing operation.
3153 * @make_directory: Makes a directory.
3154 * @_make_directory_async: Asynchronously makes a directory.
3155 * @_make_directory_finish: Finishes making a directory asynchronously.
3156 * @make_symbolic_link: Makes a symbolic link.
3157 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
3158 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
3159 * @copy: Copies a file.
3160 * @copy_async: Asynchronously copies a file.
3161 * @copy_finish: Finishes an asynchronous copy operation.
3162 * @move: Moves a file.
3163 * @_move_async: Asynchronously moves a file.
3164 * @_move_finish: Finishes an asynchronous move operation.
3165 * @mount_mountable: Mounts a mountable object.
3166 * @mount_mountable_finish: Finishes a mounting operation.
3167 * @unmount_mountable: Unmounts a mountable object.
3168 * @unmount_mountable_finish: Finishes an unmount operation.
3169 * @eject_mountable: Ejects a mountable.
3170 * @eject_mountable_finish: Finishes an eject operation.
3171 * @mount_enclosing_volume: Mounts a specified location.
3172 * @mount_enclosing_volume_finish: Finishes mounting a specified location.
3173 * @monitor_dir: Creates a #GFileMonitor for the location.
3174 * @monitor_file: Creates a #GFileMonitor for the location.
3175 * @open_readwrite: Open file read/write. Since 2.22.
3176 * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22.
3177 * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22.
3178 * @create_readwrite: Creates file read/write. Since 2.22.
3179 * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22.
3180 * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22.
3181 * @replace_readwrite: Replaces file read/write. Since 2.22.
3182 * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22.
3183 * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22.
3184 * @start_mountable: Starts a mountable object. Since 2.22.
3185 * @start_mountable_finish: Finishes an start operation. Since 2.22.
3186 * @stop_mountable: Stops a mountable. Since 2.22.
3187 * @stop_mountable_finish: Finishes an stop operation. Since 2.22.
3188 * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22.
3189 * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22.
3190 * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22.
3191 * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22.
3192 * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
3193 * @poll_mountable: Polls a mountable object for media changes. Since 2.22.
3194 * @poll_mountable_finish: Finishes an poll operation for media changes. Since 2.22.
3196 * An interface for writing VFS file handles.
3203 * Stores information about a file system object referenced by a #GFile.
3210 * A subclass of GInputStream for opened files. This adds
3211 * a few file-specific operations and seeking.
3213 * #GFileInputStream implements #GSeekable.
3220 * Watches for changes to a file.
3225 * GFileMonitor::changed:
3226 * @monitor: a #GFileMonitor.
3228 * @other_file: (allow-none): a #GFile or #NULL.
3229 * @event_type: a #GFileMonitorEvent.
3231 * Emitted when @file has been changed.
3233 * If using #G_FILE_MONITOR_SEND_MOVED flag and @event_type is
3234 * #G_FILE_MONITOR_SEND_MOVED, @file will be set to a #GFile containing the
3235 * old path, and @other_file will be set to a #GFile containing the new path.
3237 * In all the other cases, @other_file will be set to #NULL.
3242 * GFileMonitorEvent:
3243 * @G_FILE_MONITOR_EVENT_CHANGED: a file changed.
3244 * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes.
3245 * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted.
3246 * @G_FILE_MONITOR_EVENT_CREATED: a file was created.
3247 * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed.
3248 * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted.
3249 * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted.
3250 * @G_FILE_MONITOR_EVENT_MOVED: the file was moved.
3252 * Specifies what type of event a monitor event is.
3257 * GFileMonitorFlags:
3258 * @G_FILE_MONITOR_NONE: No flags set.
3259 * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
3260 * @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).
3262 * Flags used to set what a #GFileMonitor will watch for.
3267 * GFileOutputStream:
3269 * A subclass of GOutputStream for opened files. This adds
3270 * a few file-specific operations and seeking and truncating.
3272 * #GFileOutputStream implements GSeekable.
3277 * GFileProgressCallback:
3278 * @current_num_bytes: the current number of bytes in the operation.
3279 * @total_num_bytes: the total number of bytes in the operation.
3280 * @user_data: user data passed to the callback.
3282 * When doing file operations that may take a while, such as moving
3283 * a file or copying a file, a progress callback is used to pass how
3284 * far along that operation is to the application.
3289 * GFileQueryInfoFlags:
3290 * @G_FILE_QUERY_INFO_NONE: No flags set.
3291 * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
3293 * Flags used when querying a #GFileInfo.
3298 * GFileReadMoreCallback:
3299 * @file_contents: the data as currently read.
3300 * @file_size: the size of the data currently read.
3301 * @callback_data: data passed to the callback.
3303 * When loading the partial contents of a file with g_file_load_partial_contents_async(),
3304 * it may become necessary to determine if any more data from the file should be loaded.
3305 * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
3306 * should be read, or %FALSE otherwise.
3308 * Returns: %TRUE if more data should be read back. %FALSE otherwise.
3314 * @G_FILE_TYPE_UNKNOWN: File's type is unknown.
3315 * @G_FILE_TYPE_REGULAR: File handle represents a regular file.
3316 * @G_FILE_TYPE_DIRECTORY: File handle represents a directory.
3317 * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link (Unix systems).
3318 * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo, block device, or character device.
3319 * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems).
3320 * @G_FILE_TYPE_MOUNTABLE: File is a mountable location.
3322 * Indicates the file's on-disk type.
3327 * GFilenameCompleter:
3329 * Completes filenames based on files that exist within the file system.
3334 * GFilenameCompleter::got-completion-data:
3336 * Emitted when the file name completion information comes available.
3341 * GFilesystemPreviewType:
3342 * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it.
3343 * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files.
3344 * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files.
3346 * Indicates a hint from the file system whether files should be
3347 * previewed in a file manager. Returned as the value of the key
3348 * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW.
3353 * GFilterInputStream:
3355 * A base class for all input streams that work on an underlying stream.
3360 * GFilterOutputStream:
3362 * A base class for all output streams that work on an underlying stream.
3368 * @g_type_class: the parent class
3369 * @mask: a mask covering all possible values.
3370 * @n_values: the number of possible values.
3371 * @values: an array of #GFlagsValue structs describing the individual values.
3373 * The class of a flags type holds information about its
3380 * @value: the flags value
3381 * @value_name: the name of the value
3382 * @value_nick: the nickname of the value
3384 * A structure which contains a single flags value, its name, and its
3391 * @data: a data pointer
3393 * Declares a type of function which takes an arbitrary
3394 * data pointer argument and has no return value. It is
3395 * not currently used in GLib or GTK+.
3402 * An opaque structure representing a HMAC operation.
3403 * To create a new GHmac, use g_hmac_new(). To free
3404 * a GHmac, use g_hmac_unref().
3412 * @G_IO_ERROR_FAILED: Generic error condition for when any operation fails.
3413 * @G_IO_ERROR_NOT_FOUND: File not found error.
3414 * @G_IO_ERROR_EXISTS: File already exists error.
3415 * @G_IO_ERROR_IS_DIRECTORY: File is a directory error.
3416 * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory.
3417 * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty.
3418 * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file.
3419 * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link.
3420 * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted.
3421 * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters.
3422 * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters.
3423 * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links.
3424 * @G_IO_ERROR_NO_SPACE: No space left on drive.
3425 * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument.
3426 * @G_IO_ERROR_PERMISSION_DENIED: Permission denied.
3427 * @G_IO_ERROR_NOT_SUPPORTED: Operation not supported for the current backend.
3428 * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted.
3429 * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted.
3430 * @G_IO_ERROR_CLOSED: File was closed.
3431 * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable.
3432 * @G_IO_ERROR_PENDING: Operations are still pending.
3433 * @G_IO_ERROR_READ_ONLY: File is read only.
3434 * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created.
3435 * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect.
3436 * @G_IO_ERROR_TIMED_OUT: Operation timed out.
3437 * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive.
3438 * @G_IO_ERROR_BUSY: File is busy.
3439 * @G_IO_ERROR_WOULD_BLOCK: Operation would block.
3440 * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
3441 * @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
3442 * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has already interacted with the user. Do not display any error dialog.
3443 * @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
3444 * @G_IO_ERROR_NOT_INITIALIZED: The object has not been initialized. Since 2.22
3445 * @G_IO_ERROR_ADDRESS_IN_USE: The requested address is already in use. Since 2.22
3446 * @G_IO_ERROR_PARTIAL_INPUT: Need more input to finish operation. Since 2.24
3447 * @G_IO_ERROR_INVALID_DATA: There input data was invalid. Since 2.24
3448 * @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.
3449 * @G_IO_ERROR_HOST_UNREACHABLE: Host unreachable. Since 2.26
3450 * @G_IO_ERROR_NETWORK_UNREACHABLE: Network unreachable. Since 2.26
3451 * @G_IO_ERROR_CONNECTION_REFUSED: Connection refused. Since 2.26
3452 * @G_IO_ERROR_PROXY_FAILED: Connection to proxy server failed. Since 2.26
3453 * @G_IO_ERROR_PROXY_AUTH_FAILED: Proxy authentication failed. Since 2.26
3454 * @G_IO_ERROR_PROXY_NEED_AUTH: Proxy server needs authentication. Since 2.26
3455 * @G_IO_ERROR_PROXY_NOT_ALLOWED: Proxy connection is not allowed by ruleset. Since 2.26
3457 * Error codes returned by GIO functions.
3464 * Opaque module base class for extending GIO.
3471 * Represents a scope for loading IO modules. A scope can be used for blocking
3472 * duplicate modules, or blocking a module you don't want to load.
3474 * The scope can be used with g_io_modules_load_all_in_directory_with_scope()
3475 * or g_io_modules_scan_all_in_directory_with_scope().
3482 * GIOModuleScopeFlags:
3483 * @G_IO_MODULES_SCOPE_NONE: No module scan flags
3484 * @G_IO_MODULES_SCOPE_BLOCK_DUPLICATES: When using this scope to load or scan modules, automatically block a modules which has the same base basename as previously loaded module.
3486 * Flags for use with g_io_module_scope_new().
3495 * Opaque class for defining and scheduling IO jobs.
3500 * GIOSchedulerJobFunc:
3501 * @job: a #GIOSchedulerJob.
3502 * @cancellable: optional #GCancellable object, %NULL to ignore.
3503 * @user_data: the data to pass to callback function
3507 * Long-running jobs should periodically check the @cancellable
3508 * to see if they have been cancelled.
3510 * complete the job, %FALSE if the job is complete (or cancelled)
3512 * Returns: %TRUE if this function should be called again to
3519 * Base class for read-write streams.
3524 * GIOStreamSpliceFlags:
3525 * @G_IO_STREAM_SPLICE_NONE: Do not close either stream.
3526 * @G_IO_STREAM_SPLICE_CLOSE_STREAM1: Close the first stream after the splice.
3527 * @G_IO_STREAM_SPLICE_CLOSE_STREAM2: Close the second stream after the splice.
3528 * @G_IO_STREAM_SPLICE_WAIT_FOR_BOTH: Wait for both splice operations to finish before calling the callback.
3530 * GIOStreamSpliceFlags determine how streams should be spliced.
3539 * An abstract type that specifies an icon.
3545 * @g_iface: The parent interface.
3546 * @hash: A hash for a given #GIcon.
3547 * @equal: Checks if two #GIcon<!-- -->s are equal.
3548 * @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).
3549 * @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).
3551 * GIconIface is used to implement GIcon types for various
3552 * different systems. See #GThemedIcon and #GLoadableIcon for
3553 * examples of how to implement this interface.
3560 * The <structname>GIConv</structname> struct wraps an
3561 * iconv() conversion descriptor. It contains private data
3562 * and should only be accessed using the following functions.
3569 * An IPv4 or IPv6 internet address.
3574 * GInetAddress:is-any:
3576 * Whether this is the "any" address for its family.
3577 * See g_inet_address_get_is_any().
3584 * GInetAddress:is-link-local:
3586 * Whether this is a link-local address.
3587 * See g_inet_address_get_is_link_local().
3594 * GInetAddress:is-loopback:
3596 * Whether this is the loopback address for its family.
3597 * See g_inet_address_get_is_loopback().
3604 * GInetAddress:is-mc-global:
3606 * Whether this is a global multicast address.
3607 * See g_inet_address_get_is_mc_global().
3614 * GInetAddress:is-mc-link-local:
3616 * Whether this is a link-local multicast address.
3617 * See g_inet_address_get_is_mc_link_local().
3624 * GInetAddress:is-mc-node-local:
3626 * Whether this is a node-local multicast address.
3627 * See g_inet_address_get_is_mc_node_local().
3634 * GInetAddress:is-mc-org-local:
3636 * Whether this is an organization-local multicast address.
3637 * See g_inet_address_get_is_mc_org_local().
3644 * GInetAddress:is-mc-site-local:
3646 * Whether this is a site-local multicast address.
3647 * See g_inet_address_get_is_mc_site_local().
3654 * GInetAddress:is-multicast:
3656 * Whether this is a multicast address.
3657 * See g_inet_address_get_is_multicast().
3664 * GInetAddress:is-site-local:
3666 * Whether this is a site-local address.
3667 * See g_inet_address_get_is_loopback().
3676 * A combination of an IPv4 or IPv6 base address and a length,
3677 * representing a range of IP addresses.
3684 * GInetSocketAddress:
3686 * An IPv4 or IPv6 socket address, corresponding to a <type>struct
3687 * sockaddr_in</type> or <type>struct sockaddr_in6</type>.
3694 * Interface for initializable objects.
3702 * @g_iface: The parent interface.
3703 * @init: Initializes the object.
3705 * Provides an interface for initializing object such that initialization
3713 * GInitiallyUnowned:
3715 * All the fields in the <structname>GInitiallyUnowned</structname> structure
3716 * are private to the #GInitiallyUnowned implementation and should never be
3717 * accessed directly.
3722 * GInitiallyUnownedClass:
3724 * The class structure for the <structname>GInitiallyUnowned</structname> type.
3731 * Base class for streaming input operations.
3737 * @buffer: Pointer to a buffer where data will be written.
3738 * @size: the available size in @buffer.
3740 * Structure used for scatter/gather data input.
3741 * You generally pass in an array of #GInputVector<!-- -->s
3742 * and the operation will store the read data starting in the
3743 * first buffer, switching to the next as needed.
3750 * GInstanceInitFunc:
3751 * @instance: The instance to initialize.
3752 * @g_class: The class of the type the instance is created for.
3754 * A callback function used by the type system to initialize a new
3755 * instance of a type. This function initializes all instance members and
3756 * allocates any resources required by it.
3757 * Initialization of a derived instance involves calling all its parent
3758 * types instance initializers, so the class member of the instance
3759 * is altered during its initialization to always point to the class that
3760 * belongs to the type the current initializer was introduced for.
3765 * GInterfaceFinalizeFunc:
3766 * @g_iface: The interface structure to finalize.
3767 * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3769 * A callback function used by the type system to finalize an interface.
3770 * This function should destroy any internal data and release any resources
3771 * allocated by the corresponding GInterfaceInitFunc() function.
3777 * @interface_init: location of the interface initialization function
3778 * @interface_finalize: location of the interface finalization function
3779 * @interface_data: user-supplied data passed to the interface init/finalize functions
3781 * A structure that provides information to the type system which is
3782 * used specifically for managing interface types.
3787 * GInterfaceInitFunc:
3788 * @g_iface: The interface structure to initialize.
3789 * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3791 * A callback function used by the type system to initialize a new
3792 * interface. This function should initialize all internal data and
3793 * allocate any resources required by the interface.
3798 * GLIB_CHECK_VERSION:
3799 * @major: the major version to check for
3800 * @minor: the minor version to check for
3801 * @micro: the micro version to check for
3803 * Checks the version of the GLib library that is being compiled
3807 * <title>Checking the version of the GLib library</title>
3809 * if (!GLIB_CHECK_VERSION (1, 2, 0))
3810 * g_error ("GLib version 1.2.0 or above is needed");
3814 * See glib_check_version() for a runtime check.
3816 * is the same as or newer than the passed-in version.
3818 * Returns: %TRUE if the version of the GLib header files
3825 * Generic type for all kinds of icons that can be loaded
3831 * GLoadableIconIface:
3832 * @g_iface: The parent interface.
3833 * @load: Loads an icon.
3834 * @load_async: Loads an icon asynchronously.
3835 * @load_finish: Finishes an asynchronous icon load.
3837 * Interface for icons that can be loaded as a stream.
3844 * The <structname>GMainContext</structname> struct is an opaque data
3845 * type representing a set of sources to be handled in a main loop.
3852 * The <structname>GMainLoop</structname> struct is an opaque data type
3853 * representing the main event loop of a GLib or GTK+ application.
3859 * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8
3860 * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace
3861 * @G_MARKUP_ERROR_PARSE: document was ill-formed
3862 * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser functions; element wasn't known
3863 * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser functions; attribute wasn't known
3864 * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser functions; content was invalid
3865 * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser functions; a required attribute was missing
3867 * Error codes returned by markup parsing.
3872 * GMarkupParseContext:
3874 * A parse context is used to parse a stream of bytes that
3875 * you expect to contain marked-up text.
3877 * See g_markup_parse_context_new(), #GMarkupParser, and so
3878 * on for more details.
3883 * GMarkupParseFlags:
3884 * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use
3885 * @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><![CDATA[</literal> and <literal>]]></literal>) is passed to the @text function. This flag was added in GLib 2.12
3886 * @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
3888 * Flags that affect the behaviour of the parser.
3894 * @start_element: Callback to invoke when the opening tag of an element is seen.
3895 * @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><empty/></literal>.
3896 * @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.
3897 * @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.
3898 * @error: Callback to invoke when an error occurs.
3900 * Any of the fields in #GMarkupParser can be %NULL, in which case they
3901 * will be ignored. Except for the @error function, any of these callbacks
3902 * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT,
3903 * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT
3904 * errors are intended to be set from these callbacks. If you set an error
3905 * from a callback, g_markup_parse_context_parse() will report that error
3906 * back to its caller.
3912 * @malloc: function to use for allocating memory.
3913 * @realloc: function to use for reallocating memory.
3914 * @free: function to use to free memory.
3915 * @calloc: function to use for allocating zero-filled memory.
3916 * @try_malloc: function to use for allocating memory without a default error handler.
3917 * @try_realloc: function to use for reallocating memory without a default error handler.
3919 * A set of functions used to perform memory allocation. The same #GMemVTable must
3920 * be used for all allocations in the same program; a call to g_mem_set_vtable(),
3921 * if it exists, should be prior to any use of GLib.
3926 * GMemoryInputStream:
3928 * Implements #GInputStream for arbitrary memory chunks.
3933 * GMemoryOutputStream:
3935 * Implements #GOutputStream for arbitrary memory chunks.
3940 * GMemoryOutputStream:data:
3942 * Pointer to buffer where data will be written.
3949 * GMemoryOutputStream:data-size:
3951 * Size of data written to the buffer.
3958 * GMemoryOutputStream:destroy-function: (skip)
3960 * Function called with the buffer as argument when the stream is destroyed.
3967 * GMemoryOutputStream:realloc-function: (skip)
3969 * Function with realloc semantics called to enlarge the buffer.
3976 * GMemoryOutputStream:size:
3978 * Current size of the data buffer.
3987 * #GMenu is an opaque structure type. You must access it using the
3995 * GMenuAttributeIter:
3997 * #GMenuAttributeIter is an opaque structure type. You must access it
3998 * using the functions below.
4007 * #GMenuItem is an opaque structure type. You must access it using the
4017 * #GMenuLinkIter is an opaque structure type. You must access it using
4018 * the functions below.
4027 * #GMenuModel is an opaque structure type. You must access it using the
4035 * GMenuModel::items-changed:
4036 * @model: the #GMenuModel that is changing
4037 * @position: the position of the change
4038 * @removed: the number of items removed
4039 * @added: the number of items added
4041 * Emitted when a change has occured to the menu.
4043 * The only changes that can occur to a menu is that items are removed
4044 * or added. Items may not change (except by being removed and added
4045 * back in the same location). This signal is capable of describing
4046 * both of those changes (at the same time).
4048 * The signal means that starting at the index @position, @removed
4049 * items were removed and @added items were added in their place. If
4050 * @removed is zero then only items were added. If @added is zero
4051 * then only items were removed.
4053 * As an example, if the menu contains items a, b, c, d (in that
4054 * order) and the signal (2, 1, 3) occurs then the new composition of
4055 * the menu will be a, b, _, _, _, d (with each _ representing some
4058 * Signal handlers may query the model (particularly the added items)
4059 * and expect to see the results of the modification that is being
4060 * reported. The signal is emitted after the modification.
4067 * A handle to an object implementing the #GMountIface interface.
4073 * @mount: the object on which the signal is emitted
4075 * Emitted when the mount has been changed.
4080 * GMount::pre-unmount:
4081 * @mount: the object on which the signal is emitted
4083 * This signal is emitted when the #GMount is about to be
4091 * GMount::unmounted:
4092 * @mount: the object on which the signal is emitted
4094 * This signal is emitted when the #GMount have been
4095 * unmounted. If the recipient is holding references to the
4096 * object they should release them so the object can be
4103 * @g_iface: The parent interface.
4104 * @changed: Changed signal that is emitted when the mount's state has changed.
4105 * @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.
4106 * @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.
4107 * @get_root: Gets a #GFile to the root directory of the #GMount.
4108 * @get_name: Gets a string containing the name of the #GMount.
4109 * @get_icon: Gets a #GIcon for the #GMount.
4110 * @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.
4111 * @get_volume: Gets a #GVolume the mount is located on. Returns %NULL if the #GMount is not associated with a #GVolume.
4112 * @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.
4113 * @can_unmount: Checks if a #GMount can be unmounted.
4114 * @can_eject: Checks if a #GMount can be ejected.
4115 * @unmount: Starts unmounting a #GMount.
4116 * @unmount_finish: Finishes an unmounting operation.
4117 * @eject: Starts ejecting a #GMount.
4118 * @eject_finish: Finishes an eject operation.
4119 * @remount: Starts remounting a #GMount.
4120 * @remount_finish: Finishes a remounting operation.
4121 * @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.
4122 * @guess_content_type_finish: Finishes a contenet type guessing operation. Added in 2.18.
4123 * @guess_content_type_sync: Synchronous variant of @guess_content_type. Added in 2.18
4124 * @unmount_with_operation: Starts unmounting a #GMount using a #GMountOperation. Since 2.22.
4125 * @unmount_with_operation_finish: Finishes an unmounting operation using a #GMountOperation. Since 2.22.
4126 * @eject_with_operation: Starts ejecting a #GMount using a #GMountOperation. Since 2.22.
4127 * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
4128 * @get_default_location: Gets a #GFile indication a start location that can be use as the entry point for this mount. Since 2.24.
4129 * @get_sort_key: Gets a key used for sorting #GMount instance or %NULL if no such key exists. Since 2.32.
4131 * Interface for implementing operations for mounts.
4137 * @G_MOUNT_MOUNT_NONE: No flags set.
4139 * Flags used when mounting a mount.
4146 * Class for providing authentication methods for mounting operations,
4147 * such as mounting a file locally, or authenticating with a server.
4152 * GMountOperation::aborted:
4154 * Emitted by the backend when e.g. a device becomes unavailable
4155 * while a mount operation is in progress.
4157 * Implementations of GMountOperation should handle this signal
4158 * by dismissing open password dialogs.
4165 * GMountOperation::ask-password:
4166 * @op: a #GMountOperation requesting a password.
4167 * @message: string containing a message to display to the user.
4168 * @default_user: string containing the default user name.
4169 * @default_domain: string containing the default domain.
4170 * @flags: a set of #GAskPasswordFlags.
4172 * Emitted when a mount operation asks the user for a password.
4174 * If the message contains a line break, the first line should be
4175 * presented as a heading. For example, it may be used as the
4176 * primary text in a #GtkMessageDialog.
4181 * GMountOperation::ask-question:
4182 * @op: a #GMountOperation asking a question.
4183 * @message: string containing a message to display to the user.
4184 * @choices: an array of strings for each possible choice.
4186 * Emitted when asking the user a question and gives a list of
4187 * choices for the user to choose from.
4189 * If the message contains a line break, the first line should be
4190 * presented as a heading. For example, it may be used as the
4191 * primary text in a #GtkMessageDialog.
4196 * GMountOperation::reply:
4197 * @op: a #GMountOperation.
4198 * @result: a #GMountOperationResult indicating how the request was handled
4200 * Emitted when the user has replied to the mount operation.
4205 * GMountOperation::show-processes:
4206 * @op: a #GMountOperation.
4207 * @message: string containing a message to display to the user.
4208 * @processes: (element-type GPid): an array of #GPid for processes blocking the operation.
4209 * @choices: an array of strings for each possible choice.
4211 * Emitted when one or more processes are blocking an operation
4212 * e.g. unmounting/ejecting a #GMount or stopping a #GDrive.
4214 * Note that this signal may be emitted several times to update the
4215 * list of blocking processes as processes close files. The
4216 * application should only respond with g_mount_operation_reply() to
4217 * the latest signal (setting #GMountOperation:choice to the choice
4220 * If the message contains a line break, the first line should be
4221 * presented as a heading. For example, it may be used as the
4222 * primary text in a #GtkMessageDialog.
4229 * GMountOperation:anonymous:
4231 * Whether to use an anonymous user when authenticating.
4236 * GMountOperation:choice:
4238 * The index of the user's choice when a question is asked during the
4239 * mount operation. See the #GMountOperation::ask-question signal.
4244 * GMountOperation:domain:
4246 * The domain to use for the mount operation.
4251 * GMountOperation:password:
4253 * The password that is used for authentication when carrying out
4254 * the mount operation.
4259 * GMountOperation:password-save:
4261 * Determines if and how the password information should be saved.
4266 * GMountOperation:username:
4268 * The user name that is used for authentication when carrying out
4269 * the mount operation.
4274 * GMountOperationResult:
4275 * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the user specified data is now available
4276 * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation to be aborted
4277 * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not implemented)
4279 * #GMountOperationResult is returned as a result when a request for
4280 * information is send by the mounting operation.
4285 * GMountUnmountFlags:
4286 * @G_MOUNT_UNMOUNT_NONE: No flags set.
4287 * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding file operations on the mount.
4289 * Flags used when an unmounting a mount.
4296 * A #GSocketConnectable for resolving a hostname and connecting to
4304 * #GNetworkMonitor monitors the status of network connections and
4305 * indicates when a possibly-user-visible change has occurred.
4312 * GNetworkMonitor::network-changed:
4313 * @monitor: a #GNetworkMonitor
4314 * @available: the current value of #GNetworkMonitor:network-available
4316 * Emitted when the network configuration changes. If @available is
4317 * %TRUE, then some hosts may be reachable that were not reachable
4318 * before, while others that were reachable before may no longer be
4319 * reachable. If @available is %FALSE, then no remote hosts are
4327 * GNetworkMonitor:network-available:
4329 * Whether the network is considered available. That is, whether the
4330 * system has a default route for at least one of IPv4 or IPv6.
4332 * Real-world networks are of course much more complicated than
4333 * this; the machine may be connected to a wifi hotspot that
4334 * requires payment before allowing traffic through, or may be
4335 * connected to a functioning router that has lost its own upstream
4336 * connectivity. Some hosts might only be accessible when a VPN is
4337 * active. Other hosts might only be accessible when the VPN is
4338 * <emphasis>not</emphasis> active. Thus, it is best to use
4339 * g_network_monitor_can_reach() or
4340 * g_network_monitor_can_reach_async() to test for reachability on a
4341 * host-by-host basis. (On the other hand, when the property is
4342 * %FALSE, the application can reasonably expect that no remote
4343 * hosts at all are reachable, and should indicate this to the user
4346 * See also #GNetworkMonitor::network-changed.
4355 * A #GSocketConnectable for resolving a SRV record and connecting to
4362 * @G_NORMALIZE_DEFAULT: standardize differences that do not affect the text content, such as the above-mentioned accent representation
4363 * @G_NORMALIZE_NFD: another name for %G_NORMALIZE_DEFAULT
4364 * @G_NORMALIZE_DEFAULT_COMPOSE: like %G_NORMALIZE_DEFAULT, but with composed forms rather than a maximally decomposed form
4365 * @G_NORMALIZE_NFC: another name for %G_NORMALIZE_DEFAULT_COMPOSE
4366 * @G_NORMALIZE_ALL: beyond %G_NORMALIZE_DEFAULT also standardize the "compatibility" characters in Unicode, such as SUPERSCRIPT THREE to the standard forms (in this case DIGIT THREE). Formatting information may be lost but for most text operations such characters should be considered the same
4367 * @G_NORMALIZE_NFKD: another name for %G_NORMALIZE_ALL
4368 * @G_NORMALIZE_ALL_COMPOSE: like %G_NORMALIZE_ALL, but with composed forms rather than a maximally decomposed form
4369 * @G_NORMALIZE_NFKC: another name for %G_NORMALIZE_ALL_COMPOSE
4371 * Defines how a Unicode string is transformed in a canonical
4372 * form, standardizing such issues as whether a character with
4373 * an accent is represented as a base character and combining
4374 * accent or as a single precomposed character. Unicode strings
4375 * should generally be normalized before comparing them.
4382 * All the fields in the <structname>GObject</structname> structure are private
4383 * to the #GObject implementation and should never be accessed directly.
4389 * @g_type_class: the parent class
4390 * @constructor: the @constructor function is called by g_object_new () to complete the object initialization after all the construction properties are set. The first thing a @constructor implementation must do is chain up to the @constructor of the parent class. Overriding @constructor should be rarely needed, e.g. to handle construct properties, or to implement singletons.
4391 * @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.
4392 * @get_property: the generic getter for all properties of this type. Should be overridden for every type with properties.
4393 * @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.
4394 * @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.
4395 * @dispatch_properties_changed: emits property change notification for a bunch of properties. Overriding @dispatch_properties_changed should be rarely needed.
4396 * @notify: the class closure for the notify signal
4397 * @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.
4399 * The class structure for the <structname>GObject</structname> type.
4402 * <title>Implementing singletons using a constructor</title>
4404 * static MySingleton *the_singleton = NULL;
4407 * my_singleton_constructor (GType type,
4408 * guint n_construct_params,
4409 * GObjectConstructParam *construct_params)
4413 * if (!the_singleton)
4415 * object = G_OBJECT_CLASS (parent_class)->constructor (type,
4416 * n_construct_params,
4417 * construct_params);
4418 * the_singleton = MY_SINGLETON (object);
4421 * object = g_object_ref (G_OBJECT (the_singleton));
4425 * </programlisting></example>
4430 * GObjectConstructParam:
4431 * @pspec: the #GParamSpec of the construct parameter
4432 * @value: the value to set the parameter to
4434 * The <structname>GObjectConstructParam</structname> struct is an auxiliary
4435 * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
4441 * GObjectFinalizeFunc:
4442 * @object: the #GObject being finalized
4444 * The type of the @finalize function of #GObjectClass.
4449 * GObjectGetPropertyFunc:
4450 * @object: a #GObject
4451 * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
4452 * @value: a #GValue to return the property value in
4453 * @pspec: the #GParamSpec describing the property
4455 * The type of the @get_property function of #GObjectClass.
4460 * GObjectSetPropertyFunc:
4461 * @object: a #GObject
4462 * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
4463 * @value: the new value for the property
4464 * @pspec: the #GParamSpec describing the property
4466 * The type of the @set_property function of #GObjectClass.
4472 * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags.
4473 * @G_OPTION_ARG_STRING: The option takes a string argument.
4474 * @G_OPTION_ARG_INT: The option takes an integer argument.
4475 * @G_OPTION_ARG_CALLBACK: The option provides a callback to parse the extra argument.
4476 * @G_OPTION_ARG_FILENAME: The option takes a filename as argument.
4477 * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple uses of the option are collected into an array of strings.
4478 * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, multiple uses of the option are collected into an array of strings.
4479 * @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
4480 * @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
4482 * The #GOptionArg enum values determine which type of extra argument the
4483 * options expect to find. If an option expects an extra argument, it
4484 * can be specified in several ways; with a short option:
4485 * <option>-x arg</option>, with a long option: <option>--name arg</option>
4486 * or combined in a single argument: <option>--name=arg</option>.
4492 * @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.
4493 * @value: The value to be parsed.
4494 * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
4495 * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED is intended to be used for errors in #GOptionArgFunc callbacks.
4497 * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK
4500 * occurred, in which case @error should be set with g_set_error()
4502 * Returns: %TRUE if the option was successfully parsed, %FALSE if an error
4509 * A <structname>GOptionContext</structname> struct defines which options
4510 * are accepted by the commandline option parser. The struct has only private
4511 * fields and should not be directly accessed.
4517 * @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>.
4518 * @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.
4519 * @flags: Flags from #GOptionFlags.
4520 * @arg: The type of the option, as a #GOptionArg.
4521 * @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().
4522 * @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().
4523 * @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().
4525 * A <structname>GOptionEntry</structname> defines a single option.
4526 * To have an effect, they must be added to a #GOptionGroup with
4527 * g_option_context_add_main_entries() or g_option_group_add_entries().
4533 * @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().
4534 * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed.
4535 * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed.
4537 * Error codes returned by option parsing.
4543 * @context: The active #GOptionContext
4544 * @group: The group to which the function belongs
4545 * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
4546 * @error: The #GError containing details about the parse error
4548 * The type of function to be used as callback when a parse error occurs.
4554 * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in <option>--help</option> output.
4555 * @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.
4556 * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this flag indicates that the sense of the option is reversed.
4557 * @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
4558 * @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
4559 * @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
4560 * @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.
4562 * Flags which modify individual options.
4569 * A <structname>GOptionGroup</structname> struct defines the options in a single
4570 * group. The struct has only private fields and should not be directly accessed.
4572 * All options in a group share the same translation function. Libraries which
4573 * need to parse commandline options are expected to provide a function for
4574 * getting a <structname>GOptionGroup</structname> holding their options, which
4575 * the application can then add to its #GOptionContext.
4581 * @context: The active #GOptionContext
4582 * @group: The group to which the function belongs
4583 * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
4584 * @error: A return location for error details
4586 * The type of function that can be called before and after parsing.
4588 * occurred, in which case @error should be set with g_set_error()
4590 * Returns: %TRUE if the function completed successfully, %FALSE if an error
4597 * Base class for writing output.
4599 * All classes derived from GOutputStream should implement synchronous
4600 * writing, splicing, flushing and closing streams, but may implement
4601 * asynchronous versions.
4606 * GOutputStreamSpliceFlags:
4607 * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream.
4608 * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after the splice.
4609 * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after the splice.
4611 * GOutputStreamSpliceFlags determine how streams should be spliced.
4617 * @buffer: Pointer to a buffer of data to read.
4618 * @size: the size of @buffer.
4620 * Structure used for scatter/gather data output.
4621 * You generally pass in an array of #GOutputVector<!-- -->s
4622 * and the operation will use all the buffers as if they were
4631 * @G_PARAM_READABLE: the parameter is readable
4632 * @G_PARAM_WRITABLE: the parameter is writable
4633 * @G_PARAM_CONSTRUCT: the parameter will be set upon object construction
4634 * @G_PARAM_CONSTRUCT_ONLY: the parameter will only be set upon object construction
4635 * @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) strict validation is not required
4636 * @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
4637 * @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
4638 * @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
4639 * @G_PARAM_PRIVATE: internal
4640 * @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
4642 * Through the #GParamFlags flag values, certain aspects of parameters
4643 * can be configured.
4649 * @g_type_instance: private #GTypeInstance portion
4650 * @name: name of this parameter: always an interned string
4651 * @flags: #GParamFlags flags for this parameter
4652 * @value_type: the #GValue type for this parameter
4653 * @owner_type: #GType type that uses (introduces) this parameter
4655 * All other fields of the <structname>GParamSpec</structname> struct are private and
4656 * should not be used directly.
4661 * GParamSpecBoolean:
4662 * @parent_instance: private #GParamSpec portion
4663 * @default_value: default value for the property specified
4665 * A #GParamSpec derived structure that contains the meta data for boolean properties.
4671 * @parent_instance: private #GParamSpec portion
4673 * A #GParamSpec derived structure that contains the meta data for boxed properties.
4679 * @parent_instance: private #GParamSpec portion
4680 * @minimum: minimum value for the property specified
4681 * @maximum: maximum value for the property specified
4682 * @default_value: default value for the property specified
4684 * A #GParamSpec derived structure that contains the meta data for character properties.
4690 * @g_type_class: the parent class
4691 * @value_type: the #GValue type for this parameter
4692 * @finalize: The instance finalization function (optional), should chain up to the finalize method of the parent class.
4693 * @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().
4694 * @value_validate: Ensures that the contents of @value comply with the specifications set out by this type (optional), see g_param_value_validate().
4695 * @values_cmp: Compares @value1 with @value2 according to this type (recommended, the default is memcmp()), see g_param_values_cmp().
4697 * The class structure for the <structname>GParamSpec</structname> type.
4698 * Normally, <structname>GParamSpec</structname> classes are filled by
4699 * g_param_type_register_static().
4705 * @parent_instance: private #GParamSpec portion
4706 * @minimum: minimum value for the property specified
4707 * @maximum: maximum value for the property specified
4708 * @default_value: default value for the property specified
4709 * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-90.
4711 * A #GParamSpec derived structure that contains the meta data for double properties.
4717 * @parent_instance: private #GParamSpec portion
4718 * @enum_class: the #GEnumClass for the enum
4719 * @default_value: default value for the property specified
4721 * A #GParamSpec derived structure that contains the meta data for enum
4728 * @parent_instance: private #GParamSpec portion
4729 * @flags_class: the #GFlagsClass for the flags
4730 * @default_value: default value for the property specified
4732 * A #GParamSpec derived structure that contains the meta data for flags
4739 * @parent_instance: private #GParamSpec portion
4740 * @minimum: minimum value for the property specified
4741 * @maximum: maximum value for the property specified
4742 * @default_value: default value for the property specified
4743 * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-30.
4745 * A #GParamSpec derived structure that contains the meta data for float properties.
4751 * @parent_instance: private #GParamSpec portion
4752 * @is_a_type: a #GType whose subtypes can occur as values
4754 * A #GParamSpec derived structure that contains the meta data for #GType properties.
4762 * @parent_instance: private #GParamSpec portion
4763 * @minimum: minimum value for the property specified
4764 * @maximum: maximum value for the property specified
4765 * @default_value: default value for the property specified
4767 * A #GParamSpec derived structure that contains the meta data for integer properties.
4773 * @parent_instance: private #GParamSpec portion
4774 * @minimum: minimum value for the property specified
4775 * @maximum: maximum value for the property specified
4776 * @default_value: default value for the property specified
4778 * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
4784 * @parent_instance: private #GParamSpec portion
4785 * @minimum: minimum value for the property specified
4786 * @maximum: maximum value for the property specified
4787 * @default_value: default value for the property specified
4789 * A #GParamSpec derived structure that contains the meta data for long integer properties.
4795 * @parent_instance: private #GParamSpec portion
4797 * A #GParamSpec derived structure that contains the meta data for object properties.
4802 * GParamSpecOverride:
4804 * This is a type of #GParamSpec type that simply redirects operations to
4805 * another paramspec. All operations other than getting or
4806 * setting the value are redirected, including accessing the nick and
4807 * blurb, validating a value, and so forth. See
4808 * g_param_spec_get_redirect_target() for retrieving the overidden
4809 * property. #GParamSpecOverride is used in implementing
4810 * g_object_class_override_property(), and will not be directly useful
4811 * unless you are implementing a new base type similar to GObject.
4819 * @parent_instance: private #GParamSpec portion
4821 * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
4827 * GParamSpecPointer:
4828 * @parent_instance: private #GParamSpec portion
4830 * A #GParamSpec derived structure that contains the meta data for pointer properties.
4836 * @parent_instance: private #GParamSpec portion
4837 * @default_value: default value for the property specified
4838 * @cset_first: a string containing the allowed values for the first byte
4839 * @cset_nth: a string containing the allowed values for the subsequent bytes
4840 * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
4841 * @null_fold_if_empty: replace empty string by %NULL
4842 * @ensure_non_null: replace %NULL strings by an empty string
4844 * A #GParamSpec derived structure that contains the meta data for string
4850 * GParamSpecTypeInfo:
4851 * @instance_size: Size of the instance (object) structure.
4852 * @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.
4853 * @instance_init: Location of the instance initialization function (optional).
4854 * @value_type: The #GType of values conforming to this #GParamSpec
4855 * @finalize: The instance finalization function (optional).
4856 * @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().
4857 * @value_validate: Ensures that the contents of @value comply with the specifications set out by @pspec (optional), see g_param_value_validate().
4858 * @values_cmp: Compares @value1 with @value2 according to @pspec (recommended, the default is memcmp()), see g_param_values_cmp().
4860 * This structure is used to provide the type system with the information
4861 * required to initialize and destruct (finalize) a parameter's class and
4862 * instances thereof.
4863 * The initialized structure is passed to the g_param_type_register_static()
4864 * The type system will perform a deep copy of this structure, so its memory
4865 * does not need to be persistent across invocation of
4866 * g_param_type_register_static().
4872 * @parent_instance: private #GParamSpec portion
4873 * @minimum: minimum value for the property specified
4874 * @maximum: maximum value for the property specified
4875 * @default_value: default value for the property specified
4877 * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
4883 * @parent_instance: private #GParamSpec portion
4884 * @minimum: minimum value for the property specified
4885 * @maximum: maximum value for the property specified
4886 * @default_value: default value for the property specified
4888 * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
4894 * @parent_instance: private #GParamSpec portion
4895 * @minimum: minimum value for the property specified
4896 * @maximum: maximum value for the property specified
4897 * @default_value: default value for the property specified
4899 * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
4905 * @parent_instance: private #GParamSpec portion
4906 * @minimum: minimum value for the property specified
4907 * @maximum: maximum value for the property specified
4908 * @default_value: default value for the property specified
4910 * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
4915 * GParamSpecUnichar:
4916 * @parent_instance: private #GParamSpec portion
4917 * @default_value: default value for the property specified
4919 * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
4924 * GParamSpecValueArray:
4925 * @parent_instance: private #GParamSpec portion
4926 * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
4927 * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
4929 * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
4934 * GParamSpecVariant:
4935 * @parent_instance: private #GParamSpec portion
4936 * @type: a #GVariantType, or %NULL
4937 * @default_value: a #GVariant, or %NULL
4939 * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
4947 * @name: the parameter name
4948 * @value: the parameter value
4950 * The <structname>GParameter</structname> struct is an auxiliary structure used
4951 * to hand parameter name/value pairs to g_object_newv().
4957 * @G_PASSWORD_SAVE_NEVER: never save a password.
4958 * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session.
4959 * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently.
4961 * #GPasswordSave is used to indicate the lifespan of a saved password.
4963 * #Gvfs stores passwords in the Gnome keyring when this flag allows it
4964 * to, and later retrieves it again from there.
4971 * #GPermission is an opaque data structure and can only be accessed
4972 * using the following functions.
4977 * GPermission:allowed:
4979 * %TRUE if the caller currently has permission to perform the action that
4980 * @permission represents the permission to perform.
4985 * GPermission:can-acquire:
4987 * %TRUE if it is generally possible to acquire the permission by calling
4988 * g_permission_acquire().
4993 * GPermission:can-release:
4995 * %TRUE if it is generally possible to release the permission by calling
4996 * g_permission_release().
5003 * A type which is used to hold a process identification.
5005 * On UNIX, processes are identified by a process id (an integer),
5006 * while Windows uses process handles (which are pointers).
5008 * GPid is used in GLib only for descendant processes spawned with
5009 * the g_spawn functions.
5015 * @fd: the file descriptor to poll (or a <type>HANDLE</type> on Win32)
5016 * @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.
5017 * @revents: a bitwise combination of flags from #GIOCondition, returned from the poll() function to indicate which events occurred.
5019 * Represents a file descriptor, which events to poll for, and which events
5026 * @ufds: an array of #GPollFD elements
5027 * @nfsd: the number of elements in @ufds
5028 * @timeout_: the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout.
5030 * Specifies the type of function passed to g_main_context_set_poll_func().
5031 * The semantics of the function should match those of the poll() system call.
5033 * reported, or -1 if an error occurred.
5035 * Returns: the number of #GPollFD elements which have events or errors
5040 * GPollableInputStream:
5042 * An interface for a #GInputStream that can be polled for readability.
5049 * GPollableInputStreamInterface:
5050 * @g_iface: The parent interface.
5051 * @can_poll: Checks if the #GPollableInputStream instance is actually pollable
5052 * @is_readable: Checks if the stream is readable
5053 * @create_source: Creates a #GSource to poll the stream
5054 * @read_nonblocking: Does a non-blocking read or returns %G_IO_ERROR_WOULD_BLOCK
5056 * The interface for pollable input streams.
5058 * The default implementation of @can_poll always returns %TRUE.
5060 * The default implementation of @read_nonblocking calls
5061 * g_pollable_input_stream_is_readable(), and then calls
5062 * g_input_stream_read() if it returns %TRUE. This means you only need
5063 * to override it if it is possible that your @is_readable
5064 * implementation may return %TRUE when the stream is not actually
5072 * GPollableOutputStream:
5074 * An interface for a #GOutputStream that can be polled for readability.
5081 * GPollableOutputStreamInterface:
5082 * @g_iface: The parent interface.
5083 * @can_poll: Checks if the #GPollableOutputStream instance is actually pollable
5084 * @is_writable: Checks if the stream is writable
5085 * @create_source: Creates a #GSource to poll the stream
5086 * @write_nonblocking: Does a non-blocking write or returns %G_IO_ERROR_WOULD_BLOCK
5088 * The interface for pollable output streams.
5090 * The default implementation of @can_poll always returns %TRUE.
5092 * The default implementation of @write_nonblocking calls
5093 * g_pollable_output_stream_is_writable(), and then calls
5094 * g_output_stream_write() if it returns %TRUE. This means you only
5095 * need to override it if it is possible that your @is_writable
5096 * implementation may return %TRUE when the stream is not actually
5104 * GPollableSourceFunc:
5105 * @pollable_stream: the #GPollableInputStream or #GPollableOutputStream
5106 * @user_data: data passed in by the user.
5108 * This is the function type of the callback used for the #GSource
5109 * returned by g_pollable_input_stream_create_source() and
5110 * g_pollable_output_stream_create_source().
5112 * Returns: it should return %FALSE if the source should be removed.
5119 * @string: the message to output
5121 * Specifies the type of the print handler functions.
5122 * These are called with the complete formatted string to output.
5129 * Interface that handles proxy connection and payload.
5138 * A #GInetSocketAddress representing a connection via a proxy server
5145 * GProxyAddressEnumerator:
5147 * A subclass of #GSocketAddressEnumerator that takes another address
5148 * enumerator and wraps its results in #GProxyAddress<!-- -->es as
5149 * directed by the default #GProxyResolver.
5155 * @g_iface: The parent interface.
5156 * @connect: Connect to proxy server and wrap (if required) the #connection to handle payload.
5157 * @connect_async: Same has connect() but asynchronous.
5158 * @connect_finish: Returns the result of connect_async()
5160 * Provides an interface for handling proxy connection and payload.
5169 * Interface that can be used to resolve proxy address.
5175 * @head: a pointer to the first element of the queue
5176 * @tail: a pointer to the last element of the queue
5177 * @length: the number of elements in the queue
5179 * Contains the public fields of a
5180 * <link linkend="glib-Double-ended-Queues">Queue</link>.
5186 * @data: memory block to reallocate
5187 * @size: size to reallocate @data to
5189 * Changes the size of the memory block pointed to by @data to
5192 * The function should have the same semantics as realloc().
5194 * Returns: a pointer to the reallocated memory
5201 * A GRegex is the "compiled" form of a regular expression pattern. This
5202 * structure is opaque and its fields cannot be accessed directly.
5209 * GRegexCompileFlags:
5210 * @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.
5211 * @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.
5212 * @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.
5213 * @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.
5214 * @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.
5215 * @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.
5216 * @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.
5217 * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this flag they are considered as a raw sequence of bytes. @G_REGEX_NO_AUTO_CAPTURE: Disables the use of numbered capturing parentheses in the pattern. Any opening parenthesis that is not followed by "?" behaves as if it were followed by "?:" but named parentheses can still be used for capturing (and they acquire numbers in the usual way).
5218 * @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.
5219 * @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.
5220 * @G_REGEX_NEWLINE_CR: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\r'.
5221 * @G_REGEX_NEWLINE_LF: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\n'.
5222 * @G_REGEX_NEWLINE_CRLF: Usually any newline character is recognized, if this option is set, the only recognized newline character sequence is '\r\n'.
5224 * Flags specifying compile-time options.
5232 * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed.
5233 * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed.
5234 * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement string.
5235 * @G_REGEX_ERROR_MATCH: The match process failed.
5236 * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. Since 2.16
5237 * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16
5238 * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16
5239 * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". Since 2.16
5240 * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" quantifier. Since 2.16
5241 * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. Since 2.16
5242 * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for character class. Since 2.16
5243 * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence in character class. Since 2.16
5244 * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. Since 2.16
5245 * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16
5246 * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", "(?<" or "(?P". Since 2.16
5247 * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are supported only within a class. Since 2.16
5248 * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" without opening "(". Since 2.16
5249 * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent subpattern. Since 2.16
5250 * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. Since 2.16
5251 * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. Since 2.16
5252 * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16
5253 * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not fixed length. Since 2.16
5254 * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". Since 2.16
5255 * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains more than two branches. Since 2.16
5256 * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". Since 2.16
5257 * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. Since 2.16
5258 * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating elements are not supported. Since 2.16
5259 * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence is too large. Since 2.16
5260 * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16
5261 * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in lookbehind assertion. Since 2.16
5262 * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. Since 2.16
5263 * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator in subpattern name. Since 2.16
5264 * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have the same name. Since 2.16
5265 * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. Since 2.16
5266 * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or "\\p". Since 2.16
5267 * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long (maximum 32 characters). Since 2.16
5268 * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum 10,000). Since 2.16
5269 * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". Since 2.16
5270 * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more than one branch. Since 2.16
5271 * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. Since 2.16
5272 * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. Since 2.16
5273 * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced name or an optionally braced non-zero number. Since 2.16
5275 * Error codes returned by regular expressions functions.
5282 * GRegexEvalCallback:
5283 * @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.
5284 * @result: a #GString containing the new string
5285 * @user_data: user data passed to g_regex_replace_eval()
5287 * Specifies the type of the function passed to g_regex_replace_eval().
5288 * It is called for each occurrence of the pattern in the string passed
5289 * to g_regex_replace_eval(), and it should append the replacement to
5292 * Returns: %FALSE to continue the replacement process, %TRUE to stop it
5299 * @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.
5300 * @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".
5301 * @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".
5302 * @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".
5303 * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().
5304 * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when creating a new #GRegex, setting the '\r' character as line terminator.
5305 * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when creating a new #GRegex, setting the '\n' character as line terminator.
5306 * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when creating a new #GRegex, setting the '\r\n' characters as line terminator.
5307 * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when creating a new #GRegex, any newline character or character sequence is recognized.
5309 * Flags specifying match-time options.
5316 * GRemoteActionGroupInterface:
5317 * @activate_action_full: the virtual function pointer for g_remote_action_group_activate_action_full()
5318 * @change_action_state_full: the virtual function pointer for g_remote_action_group_change_action_state_full()
5320 * The virtual function table for #GRemoteActionGroup.
5329 * The object that handles DNS resolution. Use g_resolver_get_default()
5330 * to get the default resolver.
5335 * GResolver::reload:
5336 * @resolver: a #GResolver
5338 * Emitted when the resolver notices that the system resolver
5339 * configuration has changed.
5345 * @G_RESOLVER_ERROR_NOT_FOUND: the requested name/address/service was not found
5346 * @G_RESOLVER_ERROR_TEMPORARY_FAILURE: the requested information could not be looked up due to a network error or similar problem
5347 * @G_RESOLVER_ERROR_INTERNAL: unknown error
5349 * An error code used with %G_RESOLVER_ERROR in a #GError returned
5350 * from a #GResolver routine.
5359 * Seek object for streaming operations.
5365 * @g_iface: The parent interface.
5366 * @tell: Tells the current location within a stream.
5367 * @can_seek: Checks if seeking is supported by the stream.
5368 * @seek: Seeks to a location within a stream.
5369 * @can_truncate: Chekcs if truncation is suppored by the stream.
5370 * @truncate_fn: Truncates a stream.
5372 * Provides an interface for implementing seekable functionality on I/O Streams.
5377 * GSettings::change-event:
5378 * @settings: the object on which the signal was emitted
5379 * @keys: (array length=n_keys) (element-type GQuark) (allow-none): an array of #GQuark<!-- -->s for the changed keys, or %NULL
5380 * @n_keys: the length of the @keys array, or 0
5382 * The "change-event" signal is emitted once per change event that
5383 * affects this settings object. You should connect to this signal
5384 * only if you are interested in viewing groups of changes before they
5385 * are split out into multiple emissions of the "changed" signal.
5386 * For most use cases it is more appropriate to use the "changed" signal.
5388 * In the event that the change event applies to one or more specified
5389 * keys, @keys will be an array of #GQuark of length @n_keys. In the
5390 * event that the change event applies to the #GSettings object as a
5391 * whole (ie: potentially every key has been changed) then @keys will
5392 * be %NULL and @n_keys will be 0.
5394 * The default handler for this signal invokes the "changed" signal
5395 * for each affected key. If any other connected handler returns
5396 * %TRUE then this default functionality will be suppressed.
5398 * event. FALSE to propagate the event further.
5400 * Returns: %TRUE to stop other handlers from being invoked for the
5405 * GSettings::changed:
5406 * @settings: the object on which the signal was emitted
5407 * @key: the name of the key that changed
5409 * The "changed" signal is emitted when a key has potentially changed.
5410 * You should call one of the g_settings_get() calls to check the new
5413 * This signal supports detailed connections. You can connect to the
5414 * detailed signal "changed::x" in order to only receive callbacks
5415 * when key "x" changes.
5420 * GSettings::writable-change-event:
5421 * @settings: the object on which the signal was emitted
5422 * @key: the quark of the key, or 0
5424 * The "writable-change-event" signal is emitted once per writability
5425 * change event that affects this settings object. You should connect
5426 * to this signal if you are interested in viewing groups of changes
5427 * before they are split out into multiple emissions of the
5428 * "writable-changed" signal. For most use cases it is more
5429 * appropriate to use the "writable-changed" signal.
5431 * In the event that the writability change applies only to a single
5432 * key, @key will be set to the #GQuark for that key. In the event
5433 * that the writability change affects the entire settings object,
5436 * The default handler for this signal invokes the "writable-changed"
5437 * and "changed" signals for each affected key. This is done because
5438 * changes in writability might also imply changes in value (if for
5439 * example, a new mandatory setting is introduced). If any other
5440 * connected handler returns %TRUE then this default functionality
5441 * will be suppressed.
5443 * event. FALSE to propagate the event further.
5445 * Returns: %TRUE to stop other handlers from being invoked for the
5450 * GSettings::writable-changed:
5451 * @settings: the object on which the signal was emitted
5454 * The "writable-changed" signal is emitted when the writability of a
5455 * key has potentially changed. You should call
5456 * g_settings_is_writable() in order to determine the new status.
5458 * This signal supports detailed connections. You can connect to the
5459 * detailed signal "writable-changed::x" in order to only receive
5460 * callbacks when the writability of "x" changes.
5465 * GSettings:context:
5467 * The name of the context that the settings are stored in.
5472 * GSettings:delay-apply:
5474 * Whether the #GSettings object is in 'delay-apply' mode. See
5475 * g_settings_delay() for details.
5482 * GSettings:has-unapplied:
5484 * If this property is %TRUE, the #GSettings object has outstanding
5485 * changes that will be applied when g_settings_apply() is called.
5492 * The path within the backend where the settings are stored.
5499 * The name of the schema that describes the types of keys
5500 * for this #GSettings object.
5502 * The type of this property is *not* #GSettingsSchema.
5503 * #GSettingsSchema has only existed since version 2.32 and
5504 * unfortunately this name was used in previous versions to refer to
5505 * the schema ID rather than the schema itself. Take care to use the
5506 * 'settings-schema' property if you wish to pass in a
5509 * Deprecated:2.32:Use the 'schema-id' property instead. In a future
5510 * version, this property may instead refer to a #GSettingsSchema.
5515 * GSettings:schema-id:
5517 * The name of the schema that describes the types of keys
5518 * for this #GSettings object.
5523 * GSettings:settings-schema:
5525 * The #GSettingsSchema describing the types of keys for this
5526 * #GSettings object.
5528 * Ideally, this property would be called 'schema'. #GSettingsSchema
5529 * has only existed since version 2.32, however, and before then the
5530 * 'schema' property was used to refer to the ID of the schema rather
5531 * than the schema itself. Take care.
5538 * An implementation of a settings storage repository.
5543 * GSettingsBindFlags:
5544 * @G_SETTINGS_BIND_DEFAULT: Equivalent to <literal>G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET</literal>
5545 * @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.
5546 * @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.
5547 * @G_SETTINGS_BIND_NO_SENSITIVITY: Do not try to bind a "sensitivity" property to the writability of the setting
5548 * @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
5549 * @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().
5551 * Flags used when creating a binding. These flags determine in which
5552 * direction the binding works. The default is to synchronize in both
5558 * GSettingsBindGetMapping:
5559 * @value: return location for the property value
5560 * @variant: the #GVariant
5561 * @user_data: user data that was specified when the binding was created
5563 * The type for the function that is used to convert from #GSettings to
5564 * an object property. The @value is already initialized to hold values
5565 * of the appropriate type.
5567 * Returns: %TRUE if the conversion succeeded, %FALSE in case of an error
5572 * GSettingsBindSetMapping:
5573 * @value: a #GValue containing the property value to map
5574 * @expected_type: the #GVariantType to create
5575 * @user_data: user data that was specified when the binding was created
5577 * The type for the function that is used to convert an object property
5578 * value to a #GVariant for storing it in #GSettings.
5580 * or %NULL in case of an error
5582 * Returns: a new #GVariant holding the data from @value,
5587 * GSettingsGetMapping:
5588 * @value: the #GVariant to map, or %NULL
5589 * @result: (out): the result of the mapping
5590 * @user_data: (closure): the user data that was passed to g_settings_get_mapped()
5592 * The type of the function that is used to convert from a value stored
5593 * in a #GSettings to a value that is useful to the application.
5595 * If the value is successfully mapped, the result should be stored at
5596 * @result and %TRUE returned. If mapping fails (for example, if @value
5597 * is not in the right format) then %FALSE should be returned.
5599 * If @value is %NULL then it means that the mapping function is being
5600 * given a "last chance" to successfully return a valid value. %TRUE
5601 * must be returned in this case.
5603 * Returns: %TRUE if the conversion succeeded, %FALSE in case of an error
5610 * This is an opaque structure type. You may not access it directly.
5617 * GSettingsSchemaSource:
5619 * This is an opaque structure type. You may not access it directly.
5626 * GSignalAccumulator:
5627 * @ihint: Signal invocation hint, see #GSignalInvocationHint.
5628 * @return_accu: Accumulator to collect callback return values in, this is the return value of the current signal emission.
5629 * @handler_return: A #GValue holding the return value of the signal handler.
5630 * @data: Callback data that was specified when creating the signal.
5632 * The signal accumulator is a special callback function that can be used
5633 * to collect return values of the various callbacks that are called
5634 * during a signal emission. The signal accumulator is specified at signal
5635 * creation time, if it is left %NULL, no accumulation of callback return
5636 * values is performed. The return value of signal emissions is then the
5637 * value returned by the last callback.
5639 * should be aborted. Returning %FALSE means to abort the
5640 * current emission and %TRUE is returned for continuation.
5642 * Returns: The accumulator function returns whether the signal emission
5647 * GSignalCMarshaller:
5649 * This is the signature of marshaller functions, required to marshall
5650 * arrays of parameter values to signal emissions into C language callback
5651 * invocations. It is merely an alias to #GClosureMarshal since the #GClosure
5652 * mechanism takes over responsibility of actual function invocation for the
5658 * GSignalEmissionHook:
5659 * @ihint: Signal invocation hint, see #GSignalInvocationHint.
5660 * @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
5661 * @param_values: (array length=n_param_values): the instance on which the signal was emitted, followed by the parameters of the emission.
5662 * @data: user data associated with the hook.
5664 * A simple function pointer to get invoked when the signal is emitted. This
5665 * allows you to tie a hook to the signal type, so that it will trap all
5666 * emissions of that signal, from any object.
5668 * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
5670 * hook is disconnected (and destroyed).
5672 * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
5678 * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage.
5679 * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage.
5680 * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage.
5681 * @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.
5682 * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name upon handler connections and emissions.
5683 * @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.
5684 * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
5685 * @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the arguments, even if there are no signal handlers connected. Since 2.30.
5686 * @G_SIGNAL_DEPRECATED: The signal is deprecated and will be removed in a future version. A warning will be generated if it is connected while running with G_ENABLE_DIAGNOSTIC=1. Since 2.32.
5688 * The signal flags are used to specify a signal's behaviour, the overall
5689 * signal description outlines how especially the RUN flags control the
5690 * stages of a signal emission.
5695 * GSignalInvocationHint:
5696 * @signal_id: The signal id of the signal invoking the callback
5697 * @detail: The detail passed on for this emission
5698 * @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.
5700 * The #GSignalInvocationHint structure is used to pass on additional information
5701 * to callbacks during a signal emission.
5707 * @G_SIGNAL_MATCH_ID: The signal id must be equal.
5708 * @G_SIGNAL_MATCH_DETAIL: The signal detail be equal.
5709 * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same.
5710 * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same.
5711 * @G_SIGNAL_MATCH_DATA: The closure data must be the same.
5712 * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may matched.
5714 * The match types specify what g_signal_handlers_block_matched(),
5715 * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
5722 * @signal_id: The signal id of the signal being queried, or 0 if the signal to be queried was unknown.
5723 * @signal_name: The signal name.
5724 * @itype: The interface/instance type that this signal can be emitted for.
5725 * @signal_flags: The signal flags as passed in to g_signal_new().
5726 * @return_type: The return type for user callbacks.
5727 * @n_params: The number of parameters that user callbacks take.
5728 * @param_types: The individual parameter types for user callbacks, note that the effective callback signature is: <programlisting> @return_type callback (#gpointer data1, [param_types param_names,] gpointer data2); </programlisting>
5730 * A structure holding in-depth information for a specific signal. It is
5731 * filled in by the g_signal_query() function.
5736 * GSimpleAction::activate:
5737 * @simple: the #GSimpleAction
5738 * @parameter: (allow-none): the parameter to the activation
5740 * Indicates that the action was just activated.
5742 * @parameter will always be of the expected type. In the event that
5743 * an incorrect type was given, no signal will be emitted.
5750 * GSimpleAction::change-state:
5751 * @simple: the #GSimpleAction
5752 * @value: (allow-none): the requested value for the state
5754 * Indicates that the action just received a request to change its
5757 * @value will always be of the correct state type. In the event that
5758 * an incorrect type was given, no signal will be emitted.
5760 * If no handler is connected to this signal then the default
5761 * behaviour is to call g_simple_action_set_state() to set the state
5762 * to the requested value. If you connect a signal handler then no
5763 * default action is taken. If the state should change then you must
5764 * call g_simple_action_set_state() from the handler.
5767 * <title>Example 'change-state' handler</title>
5770 * change_volume_state (GSimpleAction *action,
5772 * gpointer user_data)
5776 * requested = g_variant_get_int32 (value);
5778 * // Volume only goes from 0 to 10
5779 * if (0 <= requested && requested <= 10)
5780 * g_simple_action_set_state (action, value);
5785 * The handler need not set the state to the requested value. It
5786 * could set it to any value at all, or take some other action.
5793 * GSimpleAction:enabled:
5795 * If @action is currently enabled.
5797 * If the action is disabled then calls to g_action_activate() and
5798 * g_action_change_state() have no effect.
5805 * GSimpleAction:name:
5807 * The name of the action. This is mostly meaningful for identifying
5808 * the action once it has been added to a #GSimpleActionGroup.
5815 * GSimpleAction:parameter-type:
5817 * The type of the parameter that must be given when activating the
5825 * GSimpleAction:state:
5827 * The state of the action, or %NULL if the action is stateless.
5834 * GSimpleAction:state-type:
5836 * The #GVariantType of the state that the action has, or %NULL if the
5837 * action is stateless.
5844 * GSimpleActionGroup:
5846 * The #GSimpleActionGroup structure contains private data and should only be accessed using the provided API.
5853 * GSimpleAsyncResult:
5855 * A simple implementation of #GAsyncResult.
5860 * GSimpleAsyncThreadFunc:
5861 * @res: a #GSimpleAsyncResult.
5862 * @object: a #GObject.
5863 * @cancellable: optional #GCancellable object, %NULL to ignore.
5865 * Simple thread function that runs an asynchronous operation and
5866 * checks for cancellation.
5871 * GSimplePermission:
5873 * #GSimplePermission is an opaque data structure. There are no methods
5874 * except for those defined by #GPermission.
5881 * A lowlevel network socket object.
5890 * The timeout in seconds on socket I/O
5899 * A socket endpoint address, corresponding to <type>struct sockaddr</type>
5900 * or one of its subtypes.
5905 * GSocketAddressEnumerator:
5907 * Enumerator type for objects that contain or generate
5908 * #GSocketAddress<!-- -->es.
5915 * A helper class for network servers to listen for and accept connections.
5922 * GSocketClient::event:
5923 * @client: the #GSocketClient
5924 * @event: the event that is occurring
5925 * @connectable: the #GSocketConnectable that @event is occurring on
5926 * @connection: the current representation of the connection
5928 * Emitted when @client's activity on @connectable changes state.
5929 * Among other things, this can be used to provide progress
5930 * information about a network connection in the UI. The meanings of
5931 * the different @event values are as follows:
5935 * <term>%G_SOCKET_CLIENT_RESOLVING:</term>
5937 * @client is about to look up @connectable in DNS.
5938 * @connection will be %NULL.
5939 * </para></listitem>
5942 * <term>%G_SOCKET_CLIENT_RESOLVED:</term>
5944 * @client has successfully resolved @connectable in DNS.
5945 * @connection will be %NULL.
5946 * </para></listitem>
5949 * <term>%G_SOCKET_CLIENT_CONNECTING:</term>
5951 * @client is about to make a connection to a remote host;
5952 * either a proxy server or the destination server itself.
5953 * @connection is the #GSocketConnection, which is not yet
5955 * </para></listitem>
5958 * <term>%G_SOCKET_CLIENT_CONNECTED:</term>
5960 * @client has successfully connected to a remote host.
5961 * @connection is the connected #GSocketConnection.
5962 * </para></listitem>
5965 * <term>%G_SOCKET_CLIENT_PROXY_NEGOTIATING:</term>
5967 * @client is about to negotiate with a proxy to get it to
5968 * connect to @connectable. @connection is the
5969 * #GSocketConnection to the proxy server.
5970 * </para></listitem>
5973 * <term>%G_SOCKET_CLIENT_PROXY_NEGOTIATED:</term>
5975 * @client has negotiated a connection to @connectable through
5976 * a proxy server. @connection is the stream returned from
5977 * g_proxy_connect(), which may or may not be a
5978 * #GSocketConnection.
5979 * </para></listitem>
5982 * <term>%G_SOCKET_CLIENT_TLS_HANDSHAKING:</term>
5984 * @client is about to begin a TLS handshake. @connection is a
5985 * #GTlsClientConnection.
5986 * </para></listitem>
5989 * <term>%G_SOCKET_CLIENT_TLS_HANDSHAKED:</term>
5991 * @client has successfully completed the TLS handshake.
5992 * @connection is a #GTlsClientConnection.
5993 * </para></listitem>
5996 * <term>%G_SOCKET_CLIENT_COMPLETE:</term>
5998 * @client has either successfully connected to @connectable
5999 * (in which case @connection is the #GSocketConnection that
6000 * it will be returning to the caller) or has failed (in which
6001 * case @connection is %NULL and the client is about to return
6003 * </para></listitem>
6007 * Each event except %G_SOCKET_CLIENT_COMPLETE may be emitted
6008 * multiple times (or not at all) for a given connectable (in
6009 * particular, if @client ends up attempting to connect to more than
6010 * one address). However, if @client emits the #GSocketClient:event
6011 * signal at all for a given connectable, that it will always emit
6012 * it with %G_SOCKET_CLIENT_COMPLETE when it is done.
6014 * Note that there may be additional #GSocketClientEvent values in
6015 * the future; unrecognized @event values should be ignored.
6022 * GSocketClientEvent:
6023 * @G_SOCKET_CLIENT_RESOLVING: The client is doing a DNS lookup.
6024 * @G_SOCKET_CLIENT_RESOLVED: The client has completed a DNS lookup.
6025 * @G_SOCKET_CLIENT_CONNECTING: The client is connecting to a remote host (either a proxy or the destination server).
6026 * @G_SOCKET_CLIENT_CONNECTED: The client has connected to a remote host.
6027 * @G_SOCKET_CLIENT_PROXY_NEGOTIATING: The client is negotiating with a proxy to connect to the destination server.
6028 * @G_SOCKET_CLIENT_PROXY_NEGOTIATED: The client has negotiated with the proxy server.
6029 * @G_SOCKET_CLIENT_TLS_HANDSHAKING: The client is performing a TLS handshake.
6030 * @G_SOCKET_CLIENT_TLS_HANDSHAKED: The client has performed a TLS handshake.
6031 * @G_SOCKET_CLIENT_COMPLETE: The client is done with a particular #GSocketConnectable.
6033 * Describes an event occurring on a #GSocketClient. See the
6034 * #GSocketClient::event signal for more details.
6036 * Additional values may be added to this type in the future.
6043 * GSocketConnectable:
6045 * Interface for objects that contain or generate #GSocketAddress<!-- -->es.
6050 * GSocketConnectableIface:
6051 * @g_iface: The parent interface.
6052 * @enumerate: Creates a #GSocketAddressEnumerator
6053 * @proxy_enumerate: Creates a #GProxyAddressEnumerator
6055 * Provides an interface for returning a #GSocketAddressEnumerator
6056 * and #GProxyAddressEnumerator
6061 * GSocketConnection:
6063 * A socket connection GIOStream object for connection-oriented sockets.
6070 * GSocketControlMessage:
6072 * Base class for socket-type specific control messages that can be sent and
6073 * received over #GSocket.
6078 * GSocketControlMessageClass:
6079 * @get_size: gets the size of the message.
6080 * @get_level: gets the protocol of the message.
6081 * @get_type: gets the protocol specific type of the message.
6082 * @serialize: Writes out the message data.
6083 * @deserialize: Tries to deserialize a message.
6091 * @G_SOCKET_FAMILY_INVALID: no address family
6092 * @G_SOCKET_FAMILY_IPV4: the IPv4 family
6093 * @G_SOCKET_FAMILY_IPV6: the IPv6 family
6094 * @G_SOCKET_FAMILY_UNIX: the UNIX domain family
6096 * The protocol family of a #GSocketAddress. (These values are
6097 * identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX,
6105 * GSocketListenerClass:
6106 * @changed: virtual method called when the set of socket listened to changes
6114 * @G_SOCKET_MSG_NONE: No flags.
6115 * @G_SOCKET_MSG_OOB: Request to send/receive out of band data.
6116 * @G_SOCKET_MSG_PEEK: Read data from the socket without removing it from the queue.
6117 * @G_SOCKET_MSG_DONTROUTE: Don't use a gateway to send out the packet, only send to hosts on directly connected networks.
6119 * Flags used in g_socket_receive_message() and g_socket_send_message().
6120 * The flags listed in the enum are some commonly available flags, but the
6121 * values used for them are the same as on the platform, and any other flags
6122 * are passed in/out as is. So to use a platform specific flag, just include
6123 * the right system header and pass in the flag.
6131 * @G_SOCKET_PROTOCOL_UNKNOWN: The protocol type is unknown
6132 * @G_SOCKET_PROTOCOL_DEFAULT: The default protocol for the family/type
6133 * @G_SOCKET_PROTOCOL_TCP: TCP over IP
6134 * @G_SOCKET_PROTOCOL_UDP: UDP over IP
6135 * @G_SOCKET_PROTOCOL_SCTP: SCTP over IP
6137 * A protocol identifier is specified when creating a #GSocket, which is a
6138 * family/type specific identifier, where 0 means the default protocol for
6139 * the particular family/type.
6141 * This enum contains a set of commonly available and used protocols. You
6142 * can also pass any other identifiers handled by the platform in order to
6143 * use protocols not listed here.
6152 * A helper class for handling accepting incomming connections in the
6160 * GSocketService::incoming:
6161 * @service: the #GSocketService
6162 * @connection: a new #GSocketConnection object
6163 * @source_object: (allow-none): the source_object passed to g_socket_listener_add_address()
6165 * The ::incoming signal is emitted when a new incoming connection
6166 * to @service needs to be handled. The handler must initiate the
6167 * handling of @connection, but may not block; in essence,
6168 * asynchronous operations must be used.
6170 * @connection will be unreffed once the signal handler returns,
6171 * so you need to ref it yourself if you are planning to use it.
6173 * Returns: %TRUE to stop other handlers from being called
6179 * GSocketServiceClass:
6180 * @incomming: signal emitted when new connections are accepted
6187 * GSocketSourceFunc:
6188 * @socket: the #GSocket
6189 * @condition: the current condition at the source fired.
6190 * @user_data: data passed in by the user.
6192 * This is the function type of the callback used for the #GSource
6193 * returned by g_socket_create_source().
6195 * Returns: it should return %FALSE if the source should be removed.
6202 * @G_SOCKET_TYPE_INVALID: Type unknown or wrong
6203 * @G_SOCKET_TYPE_STREAM: Reliable connection-based byte streams (e.g. TCP).
6204 * @G_SOCKET_TYPE_DATAGRAM: Connectionless, unreliable datagram passing. (e.g. UDP)
6205 * @G_SOCKET_TYPE_SEQPACKET: Reliable connection-based passing of datagrams of fixed maximum length (e.g. SCTP).
6207 * Flags used when creating a #GSocket. Some protocols may not implement
6208 * all the socket types.
6217 * The <structname>GSource</structname> struct is an opaque data type
6218 * representing an event source.
6223 * GSourceCallbackFuncs:
6224 * @ref: Called when a reference is added to the callback object
6225 * @unref: Called when a reference to the callback object is dropped
6226 * @get: Called to extract the callback function and data from the callback object. The <structname>GSourceCallbackFuncs</structname> struct contains functions for managing callback objects.
6233 * GSourceDummyMarshal:
6235 * This is just a placeholder for #GClosureMarshal,
6236 * which cannot be used here for dependency reasons.
6242 * @user_data: data passed to the function, set when the source was created with one of the above functions
6244 * Specifies the type of function passed to g_timeout_add(),
6245 * g_timeout_add_full(), g_idle_add(), and g_idle_add_full().
6247 * Returns: %FALSE if the source should be removed
6253 * @prepare: Called before all the file descriptors are polled. If the source can determine that it is ready here (without waiting for the results of the poll() call) it should return %TRUE. It can also return a @timeout_ value which should be the maximum timeout (in milliseconds) which should be passed to the poll() call. The actual timeout used will be -1 if all sources returned -1, or it will be the minimum of all the @timeout_ values returned which were >= 0.
6254 * @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.
6255 * @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.
6256 * @finalize: Called when the source is finalized.
6258 * The <structname>GSourceFuncs</structname> struct contains a table of
6259 * functions used to handle event sources in a generic manner.
6261 * For idle sources, the prepare and check functions always return %TRUE
6262 * to indicate that the source is always ready to be processed. The prepare
6263 * function also returns a timeout value of 0 to ensure that the poll() call
6264 * doesn't block (since that would be time wasted which could have been spent
6265 * running the idle function).
6267 * For timeout sources, the prepare and check functions both return %TRUE
6268 * if the timeout interval has expired. The prepare function also returns
6269 * a timeout value to ensure that the poll() call doesn't block too long
6270 * and miss the next timeout.
6272 * For file descriptor sources, the prepare function typically returns %FALSE,
6273 * since it must wait until poll() has been called before it knows whether
6274 * any events need to be processed. It sets the returned timeout to -1 to
6275 * indicate that it doesn't mind how long the poll() call blocks. In the
6276 * check function, it tests the results of the poll() call to see if the
6277 * required condition has been met, and returns %TRUE if so.
6282 * GSpawnChildSetupFunc:
6283 * @user_data: user data to pass to the function.
6285 * Specifies the type of the setup function passed to g_spawn_async(),
6286 * g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very
6287 * limited ways, be used to affect the child's execution.
6289 * On POSIX platforms, the function is called in the child after GLib
6290 * has performed all the setup it plans to perform, but before calling
6291 * exec(). Actions taken in this function will only affect the child,
6294 * On Windows, the function is called in the parent. Its usefulness on
6295 * Windows is thus questionable. In many cases executing the child setup
6296 * function in the parent can have ill effects, and you should be very
6297 * careful when porting software to Windows that uses child setup
6300 * However, even on POSIX, you are extremely limited in what you can
6301 * safely do from a #GSpawnChildSetupFunc, because any mutexes that
6302 * were held by other threads in the parent process at the time of the
6303 * fork() will still be locked in the child process, and they will
6304 * never be unlocked (since the threads that held them don't exist in
6305 * the child). POSIX allows only async-signal-safe functions (see
6306 * <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>)
6307 * to be called in the child between fork() and exec(), which
6308 * drastically limits the usefulness of child setup functions.
6310 * In particular, it is not safe to call any function which may
6311 * call malloc(), which includes POSIX functions such as setenv().
6312 * If you need to set up the child environment differently from
6313 * the parent, you should use g_get_environ(), g_environ_setenv(),
6314 * and g_environ_unsetenv(), and then pass the complete environment
6315 * list to the <literal>g_spawn...</literal> function.
6321 * @G_SPAWN_ERROR_FORK: Fork failed due to lack of memory.
6322 * @G_SPAWN_ERROR_READ: Read or select on pipes failed.
6323 * @G_SPAWN_ERROR_CHDIR: Changing to working directory failed.
6324 * @G_SPAWN_ERROR_ACCES: execv() returned <literal>EACCES</literal>
6325 * @G_SPAWN_ERROR_PERM: execv() returned <literal>EPERM</literal>
6326 * @G_SPAWN_ERROR_2BIG: execv() returned <literal>E2BIG</literal>
6327 * @G_SPAWN_ERROR_NOEXEC: execv() returned <literal>ENOEXEC</literal>
6328 * @G_SPAWN_ERROR_NAMETOOLONG: execv() returned <literal>ENAMETOOLONG</literal>
6329 * @G_SPAWN_ERROR_NOENT: execv() returned <literal>ENOENT</literal>
6330 * @G_SPAWN_ERROR_NOMEM: execv() returned <literal>ENOMEM</literal>
6331 * @G_SPAWN_ERROR_NOTDIR: execv() returned <literal>ENOTDIR</literal>
6332 * @G_SPAWN_ERROR_LOOP: execv() returned <literal>ELOOP</literal>
6333 * @G_SPAWN_ERROR_TXTBUSY: execv() returned <literal>ETXTBUSY</literal>
6334 * @G_SPAWN_ERROR_IO: execv() returned <literal>EIO</literal>
6335 * @G_SPAWN_ERROR_NFILE: execv() returned <literal>ENFILE</literal>
6336 * @G_SPAWN_ERROR_MFILE: execv() returned <literal>EMFILE</literal>
6337 * @G_SPAWN_ERROR_INVAL: execv() returned <literal>EINVAL</literal>
6338 * @G_SPAWN_ERROR_ISDIR: execv() returned <literal>EISDIR</literal>
6339 * @G_SPAWN_ERROR_LIBBAD: execv() returned <literal>ELIBBAD</literal>
6340 * @G_SPAWN_ERROR_FAILED: Some other fatal failure, <literal>error->message</literal> should explain.
6342 * Error codes returned by spawning processes.
6348 * @G_SPAWN_LEAVE_DESCRIPTORS_OPEN: the parent's open file descriptors will be inherited by the child; otherwise all descriptors except stdin/stdout/stderr will be closed before calling exec() in the child.
6349 * @G_SPAWN_DO_NOT_REAP_CHILD: the child will not be automatically reaped; you must use g_child_watch_add() yourself (or call waitpid() or handle <literal>SIGCHLD</literal> yourself), or the child will become a zombie.
6350 * @G_SPAWN_SEARCH_PATH: <literal>argv[0]</literal> need not be an absolute path, it will be looked for in the user's <envar>PATH</envar>.
6351 * @G_SPAWN_STDOUT_TO_DEV_NULL: the child's standard output will be discarded, instead of going to the same location as the parent's standard output.
6352 * @G_SPAWN_STDERR_TO_DEV_NULL: the child's standard error will be discarded.
6353 * @G_SPAWN_CHILD_INHERITS_STDIN: the child will inherit the parent's standard input (by default, the child's standard input is attached to <filename>/dev/null</filename>).
6354 * @G_SPAWN_FILE_AND_ARGV_ZERO: the first element of <literal>argv</literal> is the file to execute, while the remaining elements are the actual argument vector to pass to the file. Normally g_spawn_async_with_pipes() uses <literal>argv[0]</literal> as the file to execute, and passes all of <literal>argv</literal> to the child.
6356 * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes().
6363 * A single target host/port that a network service is running on.
6370 * A C representable type name for #G_TYPE_STRV.
6377 * A #GSocketConnection for UNIX domain socket connections.
6384 * GTestLogFatalFunc:
6385 * @log_domain: the log domain of the message
6386 * @log_level: the log level of the message (including the fatal and recursion flags)
6387 * @message: the message to process
6388 * @user_data: user data, set in g_test_log_set_fatal_handler()
6390 * Specifies the prototype of fatal log handler functions.
6392 * Returns: %TRUE if the program should abort, %FALSE otherwise
6400 * An implementation of #GIcon for themed icons.
6412 * GThemedIcon:names:
6414 * A %NULL-terminated array of icon names.
6419 * GThemedIcon:use-default-fallbacks:
6421 * Whether to use the default fallbacks found by shortening the icon name
6422 * at '-' characters. If the "names" array has more than one element,
6423 * ignores any past the first.
6425 * For example, if the icon name was "gnome-dev-cdrom-audio", the array
6429 * "gnome-dev-cdrom-audio",
6430 * "gnome-dev-cdrom",
6440 * GThreadedSocketService:
6442 * A helper class for handling accepting incoming connections in the
6443 * glib mainloop and handling them in a thread.
6450 * GThreadedSocketService::run:
6451 * @service: the #GThreadedSocketService.
6452 * @connection: a new #GSocketConnection object.
6453 * @source_object: the source_object passed to g_socket_listener_add_address().
6455 * The ::run signal is emitted in a worker thread in response to an
6456 * incoming connection. This thread is dedicated to handling
6457 * @connection and may perform blocking IO. The signal handler need
6458 * not return until the connection is closed.
6460 * Returns: %TRUE to stop further signal handlers from being called
6467 * A value representing an interval of time, in microseconds.
6475 * @G_TIME_TYPE_STANDARD: the time is in local standard time
6476 * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time
6477 * @G_TIME_TYPE_UNIVERSAL: the time is in UTC
6479 * Disambiguates a given time in two ways.
6481 * First, specifies if the given time is in universal or local time.
6483 * Second, if the time is in local time, specifies if it is local
6484 * standard time or local daylight time. This is important for the case
6485 * where the same local time occurs twice (during daylight savings time
6486 * transitions, for example).
6491 * GTlsAuthenticationMode:
6492 * @G_TLS_AUTHENTICATION_NONE: client authentication not required
6493 * @G_TLS_AUTHENTICATION_REQUESTED: client authentication is requested
6494 * @G_TLS_AUTHENTICATION_REQUIRED: client authentication is required
6496 * The client authentication mode for a #GTlsServerConnection.
6505 * TLS (Transport Layer Security, aka SSL) backend. This is an
6506 * internal type used to coordinate the different classes implemented
6514 * GTlsBackendInterface:
6515 * @g_iface: The parent interface.
6516 * @supports_tls: returns whether the backend supports TLS.
6517 * @get_default_database: returns a default #GTlsDatabase instance.
6518 * @get_certificate_type: returns the #GTlsCertificate implementation type
6519 * @get_client_connection_type: returns the #GTlsClientConnection implementation type
6520 * @get_server_connection_type: returns the #GTlsServerConnection implementation type
6521 * @get_file_database_type: returns the #GTlsFileDatabase implementation type.
6523 * Provides an interface for describing TLS-related types.
6532 * Abstract base class for TLS certificate types.
6539 * GTlsCertificate:certificate:
6541 * The DER (binary) encoded representation of the certificate's
6542 * public key. This property and the
6543 * #GTlsCertificate:certificate-pem property represent the same
6544 * data, just in different forms.
6551 * GTlsCertificate:certificate-pem:
6553 * The PEM (ASCII) encoded representation of the certificate's
6554 * public key. This property and the #GTlsCertificate:certificate
6555 * property represent the same data, just in different forms.
6562 * GTlsCertificate:issuer:
6564 * A #GTlsCertificate representing the entity that issued this
6565 * certificate. If %NULL, this means that the certificate is either
6566 * self-signed, or else the certificate of the issuer is not
6574 * GTlsCertificate:private-key:
6576 * The DER (binary) encoded representation of the certificate's
6577 * private key, in either PKCS#1 format or unencrypted PKCS#8
6578 * format. This property (or the #GTlsCertificate:private-key-pem
6579 * property) can be set when constructing a key (eg, from a file),
6580 * but cannot be read.
6582 * PKCS#8 format is supported since 2.32; earlier releases only
6583 * support PKCS#1. You can use the <literal>openssl rsa</literal>
6584 * tool to convert PKCS#8 keys to PKCS#1.
6591 * GTlsCertificate:private-key-pem:
6593 * The PEM (ASCII) encoded representation of the certificate's
6594 * private key in either PKCS#1 format ("<literal>BEGIN RSA PRIVATE
6595 * KEY</literal>") or unencrypted PKCS#8 format ("<literal>BEGIN
6596 * PRIVATE KEY</literal>"). This property (or the
6597 * #GTlsCertificate:private-key property) can be set when
6598 * constructing a key (eg, from a file), but cannot be read.
6600 * PKCS#8 format is supported since 2.32; earlier releases only
6601 * support PKCS#1. You can use the <literal>openssl rsa</literal>
6602 * tool to convert PKCS#8 keys to PKCS#1.
6609 * GTlsCertificateFlags:
6610 * @G_TLS_CERTIFICATE_UNKNOWN_CA: The signing certificate authority is not known.
6611 * @G_TLS_CERTIFICATE_BAD_IDENTITY: The certificate does not match the expected identity of the site that it was retrieved from.
6612 * @G_TLS_CERTIFICATE_NOT_ACTIVATED: The certificate's activation time is still in the future
6613 * @G_TLS_CERTIFICATE_EXPIRED: The certificate has expired
6614 * @G_TLS_CERTIFICATE_REVOKED: The certificate has been revoked according to the #GTlsConnection's certificate revocation list.
6615 * @G_TLS_CERTIFICATE_INSECURE: The certificate's algorithm is considered insecure.
6616 * @G_TLS_CERTIFICATE_GENERIC_ERROR: Some other error occurred validating the certificate
6617 * @G_TLS_CERTIFICATE_VALIDATE_ALL: the combination of all of the above flags
6619 * A set of flags describing TLS certification validation. This can be
6620 * used to set which validation steps to perform (eg, with
6621 * g_tls_client_connection_set_validation_flags()), or to describe why
6622 * a particular certificate was rejected (eg, in
6623 * #GTlsConnection::accept-certificate).
6630 * GTlsClientConnection:
6632 * TLS client-side connection; the client-side implementation of a
6640 * GTlsClientConnection:accepted-cas:
6642 * A list of the distinguished names of the Certificate Authorities
6643 * that the server will accept client certificates signed by. If the
6644 * server requests a client certificate during the handshake, then
6645 * this property will be set after the handshake completes.
6647 * Each item in the list is a #GByteArray which contains the complete
6648 * subject DN of the certificate authority.
6655 * GTlsClientConnection:server-identity:
6657 * A #GSocketConnectable describing the identity of the server that
6658 * is expected on the other end of the connection.
6660 * If the %G_TLS_CERTIFICATE_BAD_IDENTITY flag is set in
6661 * #GTlsClientConnection:validation-flags, this object will be used
6662 * to determine the expected identify of the remote end of the
6663 * connection; if #GTlsClientConnection:server-identity is not set,
6664 * or does not match the identity presented by the server, then the
6665 * %G_TLS_CERTIFICATE_BAD_IDENTITY validation will fail.
6667 * In addition to its use in verifying the server certificate,
6668 * this is also used to give a hint to the server about what
6669 * certificate we expect, which is useful for servers that serve
6677 * GTlsClientConnection:use-ssl3:
6679 * If %TRUE, tells the connection to use SSL 3.0 rather than trying
6680 * to negotiate the best version of TLS or SSL to use. This can be
6681 * used when talking to servers that don't implement version
6682 * negotiation correctly and therefore refuse to handshake at all with
6683 * a "modern" TLS handshake.
6690 * GTlsClientConnection:validation-flags:
6692 * What steps to perform when validating a certificate received from
6693 * a server. Server certificates that fail to validate in all of the
6694 * ways indicated here will be rejected unless the application
6695 * overrides the default via #GTlsConnection::accept-certificate.
6704 * TLS connection. This is an abstract type that will be subclassed by
6705 * a TLS-library-specific subtype.
6712 * GTlsConnection::accept-certificate:
6713 * @conn: a #GTlsConnection
6714 * @peer_cert: the peer's #GTlsCertificate
6715 * @errors: the problems with @peer_cert.
6717 * Emitted during the TLS handshake after the peer certificate has
6718 * been received. You can examine @peer_cert's certification path by
6719 * calling g_tls_certificate_get_issuer() on it.
6721 * For a client-side connection, @peer_cert is the server's
6722 * certificate, and the signal will only be emitted if the
6723 * certificate was not acceptable according to @conn's
6724 * #GTlsClientConnection:validation_flags. If you would like the
6725 * certificate to be accepted despite @errors, return %TRUE from the
6726 * signal handler. Otherwise, if no handler accepts the certificate,
6727 * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE.
6729 * For a server-side connection, @peer_cert is the certificate
6730 * presented by the client, if this was requested via the server's
6731 * #GTlsServerConnection:authentication_mode. On the server side,
6732 * the signal is always emitted when the client presents a
6733 * certificate, and the certificate will only be accepted if a
6734 * handler returns %TRUE.
6736 * Note that if this signal is emitted as part of asynchronous I/O
6737 * in the main thread, then you should not attempt to interact with
6738 * the user before returning from the signal handler. If you want to
6739 * let the user decide whether or not to accept the certificate, you
6740 * would have to return %FALSE from the signal handler on the first
6741 * attempt, and then after the connection attempt returns a
6742 * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if
6743 * the user decides to accept the certificate, remember that fact,
6744 * create a new connection, and return %TRUE from the signal handler
6747 * If you are doing I/O in another thread, you do not
6748 * need to worry about this, and can simply block in the signal
6749 * handler until the UI thread returns an answer.
6751 * immediately end the signal emission). %FALSE to allow the signal
6752 * emission to continue, which will cause the handshake to fail if
6753 * no one else overrides it.
6755 * Returns: %TRUE to accept @peer_cert (which will also
6761 * GTlsConnection:base-io-stream:
6763 * The #GIOStream that the connection wraps
6770 * GTlsConnection:certificate:
6772 * The connection's certificate; see
6773 * g_tls_connection_set_certificate().
6780 * GTlsConnection:database:
6782 * The certificate database to use when verifying this TLS connection.
6783 * If no cerificate database is set, then the default database will be
6784 * used. See g_tls_backend_get_default_database().
6791 * GTlsConnection:interaction:
6793 * A #GTlsInteraction object to be used when the connection or certificate
6794 * database need to interact with the user. This will be used to prompt the
6795 * user for passwords where necessary.
6802 * GTlsConnection:peer-certificate:
6804 * The connection's peer's certificate, after the TLS handshake has
6805 * completed and the certificate has been accepted. Note in
6806 * particular that this is not yet set during the emission of
6807 * #GTlsConnection::accept-certificate.
6809 * (You can watch for a #GObject::notify signal on this property to
6810 * detect when a handshake has occurred.)
6817 * GTlsConnection:peer-certificate-errors:
6819 * The errors noticed-and-ignored while verifying
6820 * #GTlsConnection:peer-certificate. Normally this should be 0, but
6821 * it may not be if #GTlsClientConnection:validation-flags is not
6822 * %G_TLS_CERTIFICATE_VALIDATE_ALL, or if
6823 * #GTlsConnection::accept-certificate overrode the default
6831 * GTlsConnection:rehandshake-mode:
6833 * The rehandshaking mode. See
6834 * g_tls_connection_set_rehandshake_mode().
6841 * GTlsConnection:require-close-notify:
6843 * Whether or not proper TLS close notification is required.
6844 * See g_tls_connection_set_require_close_notify().
6851 * GTlsConnection:use-system-certdb:
6853 * Whether or not the system certificate database will be used to
6854 * verify peer certificates. See
6855 * g_tls_connection_set_use_system_certdb().
6857 * Deprecated: 2.30: Use GTlsConnection:database instead
6864 * Abstract base class for the backend-specific database types.
6871 * GTlsDatabaseLookupFlags:
6872 * @G_TLS_DATABASE_LOOKUP_NONE: No lookup flags
6873 * @G_TLS_DATABASE_LOOKUP_KEYPAIR: Restrict lookup to certificates that have a private key.
6875 * Flags for g_tls_database_lookup_handle(), g_tls_database_lookup_issuer(),
6876 * and g_tls_database_lookup_issued().
6884 * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available
6885 * @G_TLS_ERROR_MISC: Miscellaneous TLS error
6886 * @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed
6887 * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the peer does not seem to be a TLS server.
6888 * @G_TLS_ERROR_HANDSHAKE: The TLS handshake failed because the peer's certificate was not acceptable.
6889 * @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().
6890 * @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().
6892 * An error code used with %G_TLS_ERROR in a #GError returned from a
6893 * TLS-related routine.
6902 * Implemented by a #GTlsDatabase which allows you to load certificates
6910 * GTlsFileDatabase:anchors:
6912 * The path to a file containing PEM encoded certificate authority
6913 * root anchors. The certificates in this file will be treated as
6914 * root authorities for the purpose of verifying other certificates
6915 * via the g_tls_database_verify_chain() operation.
6922 * GTlsFileDatabaseInterface:
6923 * @g_iface: The parent interface.
6925 * Provides an interface for #GTlsFileDatabase implementations.
6932 * An object representing interaction that the TLS connection and database
6933 * might have with the user.
6940 * GTlsInteractionClass:
6941 * @ask_password: ask for a password synchronously. If the implementation returns %G_TLS_INTERACTION_HANDLED, then the password argument should have been filled in by using g_tls_password_set_value() or a similar function.
6942 * @ask_password_async: ask for a password asynchronously.
6943 * @ask_password_finish: complete operation to ask for a password asynchronously. If the implementation returns %G_TLS_INTERACTION_HANDLED, then the password argument of the async method should have been filled in by using g_tls_password_set_value() or a similar function.
6945 * The class for #GTlsInteraction. Derived classes implement the various
6946 * virtual interaction methods to handle TLS interactions.
6948 * Derived classes can choose to implement whichever interactions methods they'd
6949 * like to support by overriding those virtual methods in their class
6950 * initialization function. If a derived class implements an async method,
6951 * it must also implement the corresponding finish method.
6953 * The synchronous interaction methods should implement to display modal dialogs,
6954 * and the asynchronous methods to display modeless dialogs.
6956 * If the user cancels an interaction, then the result should be
6957 * %G_TLS_INTERACTION_FAILED and the error should be set with a domain of
6958 * %G_IO_ERROR and code of %G_IO_ERROR_CANCELLED.
6965 * GTlsInteractionResult:
6966 * @G_TLS_INTERACTION_UNHANDLED: The interaction was unhandled (i.e. not implemented).
6967 * @G_TLS_INTERACTION_HANDLED: The interaction completed, and resulting data is available.
6968 * @G_TLS_INTERACTION_FAILED: The interaction has failed, or was cancelled. and the operation should be aborted.
6970 * #GTlsInteractionResult is returned by various functions in #GTlsInteraction
6971 * when finishing an interaction request.
6980 * An abstract interface representing a password used in TLS. Often used in
6981 * user interaction such as unlocking a key storage token.
6988 * GTlsPasswordFlags:
6989 * @G_TLS_PASSWORD_NONE: No flags
6990 * @G_TLS_PASSWORD_RETRY: The password was wrong, and the user should retry.
6991 * @G_TLS_PASSWORD_MANY_TRIES: Hint to the user that the password has been wrong many times, and the user may not have many chances left.
6992 * @G_TLS_PASSWORD_FINAL_TRY: Hint to the user that this is the last try to get this password right.
6994 * Various flags for the password.
7001 * GTlsRehandshakeMode:
7002 * @G_TLS_REHANDSHAKE_NEVER: Never allow rehandshaking
7003 * @G_TLS_REHANDSHAKE_SAFELY: Allow safe rehandshaking only
7004 * @G_TLS_REHANDSHAKE_UNSAFELY: Allow unsafe rehandshaking
7006 * When to allow rehandshaking. See
7007 * g_tls_connection_set_rehandshake_mode().
7014 * GTlsServerConnection:
7016 * TLS server-side connection. This is the server-side implementation
7017 * of a #GTlsConnection.
7024 * GTlsServerConnection:authentication-mode:
7026 * The #GTlsAuthenticationMode for the server. This can be changed
7027 * before calling g_tls_connection_handshake() if you want to
7028 * rehandshake with a different mode from the initial handshake.
7036 * @data: Callback data passed to g_object_add_toggle_ref()
7037 * @object: The object on which g_object_add_toggle_ref() was called.
7038 * @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.
7040 * A callback function used for notification when the state
7041 * of a toggle reference changes. See g_object_add_toggle_ref().
7047 * @str: the untranslated string
7048 * @data: user data specified when installing the function, e.g. in g_option_group_set_translate_func()
7050 * The type of functions which are used to translate user-visible
7051 * strings, for <option>--help</option> output.
7053 * The returned string is owned by GLib and must not be freed.
7055 * Returns: a translation of the string for the current locale.
7062 * A numerical value which represents the unique identifier of a registered
7070 * An opaque structure used as the base of all classes.
7075 * GTypeClassCacheFunc:
7076 * @cache_data: data that was given to the g_type_add_class_cache_func() call
7077 * @g_class: The #GTypeClass structure which is unreferenced
7079 * A callback function which is called when the reference count of a class
7080 * drops to zero. It may use g_type_class_ref() to prevent the class from
7081 * being freed. You should not call g_type_class_unref() from a
7082 * #GTypeClassCacheFunc function to prevent infinite recursion, use
7083 * g_type_class_unref_uncached() instead.
7085 * The functions have to check the class id passed in to figure
7086 * whether they actually want to cache the class of this type, since all
7087 * classes are routed through the same #GTypeClassCacheFunc chain.
7089 * called, %FALSE to continue.
7091 * Returns: %TRUE to stop further #GTypeClassCacheFunc<!-- -->s from being
7097 * @G_TYPE_DEBUG_NONE: Print no messages.
7098 * @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping.
7099 * @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions.
7100 * @G_TYPE_DEBUG_MASK: Mask covering all debug flags.
7102 * The <type>GTypeDebugFlags</type> enumeration values can be passed to
7103 * g_type_init_with_debug_flags() to trigger debugging messages during runtime.
7104 * Note that the messages can also be triggered by setting the
7105 * <envar>GOBJECT_DEBUG</envar> environment variable to a ':'-separated list of
7106 * "objects" and "signals".
7112 * @G_TYPE_FLAG_ABSTRACT: Indicates an abstract type. No instances can be created for an abstract type.
7113 * @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().
7115 * Bit masks used to check or determine characteristics of a type.
7120 * GTypeFundamentalFlags:
7121 * @G_TYPE_FLAG_CLASSED: Indicates a classed type.
7122 * @G_TYPE_FLAG_INSTANTIATABLE: Indicates an instantiable type (implies classed).
7123 * @G_TYPE_FLAG_DERIVABLE: Indicates a flat derivable type.
7124 * @G_TYPE_FLAG_DEEP_DERIVABLE: Indicates a deep derivable type (implies derivable).
7126 * Bit masks used to check or determine specific characteristics of a
7132 * GTypeFundamentalInfo:
7133 * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type
7135 * A structure that provides information to the type system which is
7136 * used specifically for managing fundamental types.
7142 * @class_size: Size of the class structure (required for interface, classed and instantiatable types).
7143 * @base_init: Location of the base initialization function (optional).
7144 * @base_finalize: Location of the base finalization function (optional).
7145 * @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.
7146 * @class_finalize: Location of the class finalization function for classed and instantiatable types. Location fo the default vtable finalization function for interface types. (optional)
7147 * @class_data: User-supplied data passed to the class init/finalize functions.
7148 * @instance_size: Size of the instance (object) structure (required for instantiatable types only).
7149 * @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.
7150 * @instance_init: Location of the instance initialization function (optional, for instantiatable types only).
7151 * @value_table: A #GTypeValueTable function table for generic handling of GValues of this type (usually only useful for fundamental types).
7153 * This structure is used to provide the type system with the information
7154 * required to initialize and destruct (finalize) a type's class and
7156 * The initialized structure is passed to the g_type_register_static() function
7157 * (or is copied into the provided #GTypeInfo structure in the
7158 * g_type_plugin_complete_type_info()). The type system will perform a deep
7159 * copy of this structure, so its memory does not need to be persistent
7160 * across invocation of g_type_register_static().
7167 * An opaque structure used as the base of all type instances.
7174 * An opaque structure used as the base of all interface types.
7179 * GTypeInterfaceCheckFunc:
7180 * @check_data: data passed to g_type_add_interface_check().
7181 * @g_iface: the interface that has been initialized
7183 * A callback called after an interface vtable is initialized.
7184 * See g_type_add_interface_check().
7192 * @name: the name of the module
7194 * The members of the <structname>GTypeModule</structname> structure should not
7195 * be accessed directly, except for the @name field.
7201 * @parent_class: the parent class
7202 * @load: loads the module and registers one or more types using g_type_module_register_type().
7203 * @unload: unloads the module
7205 * In order to implement dynamic loading of types based on #GTypeModule,
7206 * the @load and @unload functions in #GTypeModuleClass must be implemented.
7213 * The <structname>GTypePlugin</structname> typedef is used as a placeholder
7214 * for objects that implement the <structname>GTypePlugin</structname>
7221 * @use_plugin: Increases the use count of the plugin.
7222 * @unuse_plugin: Decreases the use count of the plugin.
7223 * @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.
7224 * @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.
7226 * The #GTypePlugin interface is used by the type system in order to handle
7227 * the lifecycle of dynamically loaded types.
7232 * GTypePluginCompleteInterfaceInfo:
7233 * @plugin: the #GTypePlugin
7234 * @instance_type: the #GType of an instantiable type to which the interface is added
7235 * @interface_type: the #GType of the interface whose info is completed
7236 * @info: the #GInterfaceInfo to fill in
7238 * The type of the @complete_interface_info function of #GTypePluginClass.
7243 * GTypePluginCompleteTypeInfo:
7244 * @plugin: the #GTypePlugin
7245 * @g_type: the #GType whose info is completed
7246 * @info: the #GTypeInfo struct to fill in
7247 * @value_table: the #GTypeValueTable to fill in
7249 * The type of the @complete_type_info function of #GTypePluginClass.
7255 * @plugin: the #GTypePlugin whose use count should be decreased
7257 * The type of the @unuse_plugin function of #GTypePluginClass.
7263 * @plugin: the #GTypePlugin whose use count should be increased
7265 * The type of the @use_plugin function of #GTypePluginClass, which gets called
7266 * to increase the use count of @plugin.
7272 * @type: the #GType value of the type.
7273 * @type_name: the name of the type.
7274 * @class_size: the size of the class structure.
7275 * @instance_size: the size of the instance structure.
7277 * A structure holding information for a specific type. It is
7278 * filled in by the g_type_query() function.
7284 * @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 (""); ]|
7285 * @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); ]|
7286 * @value_copy: @dest_value is a #GValue with zero-filled data section and @src_value is a properly setup #GValue of same or derived type. The purpose of this function is to copy the contents of @src_value into @dest_value in a way, that even after @src_value has been freed, the contents of @dest_value remain valid. String type example: |[ dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); ]|
7287 * @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; ]|
7288 * @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'.
7289 * @collect_value: The collect_value() function is responsible for converting the values collected from a variable argument list into contents suitable for storage in a GValue. This function should setup @value similar to value_init(); e.g. for a string value that does not allow %NULL pointers, it needs to either spew an error, or do an implicit conversion by storing an empty string. The @value passed in to this function has a zero-filled data array, so just like for value_init() it is guaranteed to not contain any old contents that might need freeing. @n_collect_values is exactly the string length of @collect_format, and @collect_values is an array of unions #GTypeCValue with length @n_collect_values, containing the collected values according to @collect_format. @collect_flags is an argument provided as a hint by the caller. It may contain the flag %G_VALUE_NOCOPY_CONTENTS indicating, that the collected value contents may be considered "static" for the duration of the @value lifetime. Thus an extra copy of the contents stored in @collect_values is not required for assignment to @value. For our above string example, we continue with: |[ if (!collect_values[0].v_pointer) value->data[0].v_pointer = g_strdup (""); else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { value->data[0].v_pointer = collect_values[0].v_pointer; // keep a flag for the value_free() implementation to not free this string value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS; } else value->data[0].v_pointer = g_strdup (collect_values[0].v_pointer); return NULL; ]| It should be noted, that it is generally a bad idea to follow the #G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to reentrancy requirements and reference count assertions performed by the signal emission code, reference counts should always be incremented for reference counted contents stored in the value->data array. To deviate from our string example for a moment, and taking a look at an exemplary implementation for collect_value() of #GObject: |[ if (collect_values[0].v_pointer) { GObject *object = G_OBJECT (collect_values[0].v_pointer); // never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types value->data[0].v_pointer = g_object_ref (object); return NULL; } else return g_strdup_printf ("Object passed as invalid NULL pointer"); } ]| The reference count for valid objects is always incremented, regardless of @collect_flags. For invalid objects, the example returns a newly allocated string without altering @value. Upon success, collect_value() needs to return %NULL. If, however, an error condition occurred, collect_value() may spew an error by returning a newly allocated non-%NULL string, giving a suitable description of the error condition. The calling code makes no assumptions about the @value contents being valid upon error returns, @value is simply thrown away without further freeing. As such, it is a good idea to not allocate #GValue contents, prior to returning an error, however, collect_values() is not obliged to return a correctly setup @value for error returns, simply because any non-%NULL return is considered a fatal condition so further program behaviour is undefined.
7290 * @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.
7291 * @lcopy_value: This function is responsible for storing the @value contents into arguments passed through a variable argument list which got collected into @collect_values according to @lcopy_format. @n_collect_values equals the string length of @lcopy_format, and @collect_flags may contain %G_VALUE_NOCOPY_CONTENTS. In contrast to collect_value(), lcopy_value() is obliged to always properly support %G_VALUE_NOCOPY_CONTENTS. Similar to collect_value() the function may prematurely abort by returning a newly allocated string describing an error condition. To complete the string example: |[ gchar **string_p = collect_values[0].v_pointer; if (!string_p) return g_strdup_printf ("string location passed as NULL"); if (collect_flags & G_VALUE_NOCOPY_CONTENTS) *string_p = value->data[0].v_pointer; else *string_p = g_strdup (value->data[0].v_pointer); ]| And an illustrative version of lcopy_value() for reference-counted types: |[ GObject **object_p = collect_values[0].v_pointer; if (!object_p) return g_strdup_printf ("object location passed as NULL"); if (!value->data[0].v_pointer) *object_p = NULL; else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) /* always honour */ *object_p = value->data[0].v_pointer; else *object_p = g_object_ref (value->data[0].v_pointer); return NULL; ]|
7293 * The #GTypeValueTable provides the functions required by the #GValue implementation,
7294 * to serve as a container for values of a type.
7299 * GUnicodeBreakType:
7300 * @G_UNICODE_BREAK_MANDATORY: Mandatory Break (BK)
7301 * @G_UNICODE_BREAK_CARRIAGE_RETURN: Carriage Return (CR)
7302 * @G_UNICODE_BREAK_LINE_FEED: Line Feed (LF)
7303 * @G_UNICODE_BREAK_COMBINING_MARK: Attached Characters and Combining Marks (CM)
7304 * @G_UNICODE_BREAK_SURROGATE: Surrogates (SG)
7305 * @G_UNICODE_BREAK_ZERO_WIDTH_SPACE: Zero Width Space (ZW)
7306 * @G_UNICODE_BREAK_INSEPARABLE: Inseparable (IN)
7307 * @G_UNICODE_BREAK_NON_BREAKING_GLUE: Non-breaking ("Glue") (GL)
7308 * @G_UNICODE_BREAK_CONTINGENT: Contingent Break Opportunity (CB)
7309 * @G_UNICODE_BREAK_SPACE: Space (SP)
7310 * @G_UNICODE_BREAK_AFTER: Break Opportunity After (BA)
7311 * @G_UNICODE_BREAK_BEFORE: Break Opportunity Before (BB)
7312 * @G_UNICODE_BREAK_BEFORE_AND_AFTER: Break Opportunity Before and After (B2)
7313 * @G_UNICODE_BREAK_HYPHEN: Hyphen (HY)
7314 * @G_UNICODE_BREAK_NON_STARTER: Nonstarter (NS)
7315 * @G_UNICODE_BREAK_OPEN_PUNCTUATION: Opening Punctuation (OP)
7316 * @G_UNICODE_BREAK_CLOSE_PUNCTUATION: Closing Punctuation (CL)
7317 * @G_UNICODE_BREAK_QUOTATION: Ambiguous Quotation (QU)
7318 * @G_UNICODE_BREAK_EXCLAMATION: Exclamation/Interrogation (EX)
7319 * @G_UNICODE_BREAK_IDEOGRAPHIC: Ideographic (ID)
7320 * @G_UNICODE_BREAK_NUMERIC: Numeric (NU)
7321 * @G_UNICODE_BREAK_INFIX_SEPARATOR: Infix Separator (Numeric) (IS)
7322 * @G_UNICODE_BREAK_SYMBOL: Symbols Allowing Break After (SY)
7323 * @G_UNICODE_BREAK_ALPHABETIC: Ordinary Alphabetic and Symbol Characters (AL)
7324 * @G_UNICODE_BREAK_PREFIX: Prefix (Numeric) (PR)
7325 * @G_UNICODE_BREAK_POSTFIX: Postfix (Numeric) (PO)
7326 * @G_UNICODE_BREAK_COMPLEX_CONTEXT: Complex Content Dependent (South East Asian) (SA)
7327 * @G_UNICODE_BREAK_AMBIGUOUS: Ambiguous (Alphabetic or Ideographic) (AI)
7328 * @G_UNICODE_BREAK_UNKNOWN: Unknown (XX)
7329 * @G_UNICODE_BREAK_NEXT_LINE: Next Line (NL)
7330 * @G_UNICODE_BREAK_WORD_JOINER: Word Joiner (WJ)
7331 * @G_UNICODE_BREAK_HANGUL_L_JAMO: Hangul L Jamo (JL)
7332 * @G_UNICODE_BREAK_HANGUL_V_JAMO: Hangul V Jamo (JV)
7333 * @G_UNICODE_BREAK_HANGUL_T_JAMO: Hangul T Jamo (JT)
7334 * @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2)
7335 * @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3)
7336 * @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28
7338 * These are the possible line break classifications.
7340 * The five Hangul types were added in Unicode 4.1, so, has been
7341 * introduced in GLib 2.10. Note that new types may be added in the future.
7342 * Applications should be ready to handle unknown values.
7343 * They may be regarded as %G_UNICODE_BREAK_UNKNOWN.
7345 * See <ulink url="http://www.unicode.org/unicode/reports/tr14/">http://www.unicode.org/unicode/reports/tr14/</ulink>.
7351 * @G_UNICODE_SCRIPT_COMMON: a character used by multiple different scripts
7352 * @G_UNICODE_SCRIPT_INHERITED: a mark glyph that takes its script from the i base glyph to which it is attached
7353 * @G_UNICODE_SCRIPT_ARABIC: Arabic
7354 * @G_UNICODE_SCRIPT_ARMENIAN: Armenian
7355 * @G_UNICODE_SCRIPT_BENGALI: Bengali
7356 * @G_UNICODE_SCRIPT_BOPOMOFO: Bopomofo
7357 * @G_UNICODE_SCRIPT_CHEROKEE: Cherokee
7358 * @G_UNICODE_SCRIPT_COPTIC: Coptic
7359 * @G_UNICODE_SCRIPT_CYRILLIC: Cyrillic
7360 * @G_UNICODE_SCRIPT_DESERET: Deseret
7361 * @G_UNICODE_SCRIPT_DEVANAGARI: Devanagari
7362 * @G_UNICODE_SCRIPT_ETHIOPIC: Ethiopic
7363 * @G_UNICODE_SCRIPT_GEORGIAN: Georgian
7364 * @G_UNICODE_SCRIPT_GOTHIC: Gothic
7365 * @G_UNICODE_SCRIPT_GREEK: Greek
7366 * @G_UNICODE_SCRIPT_GUJARATI: Gujarati
7367 * @G_UNICODE_SCRIPT_GURMUKHI: Gurmukhi
7368 * @G_UNICODE_SCRIPT_HAN: Han
7369 * @G_UNICODE_SCRIPT_HANGUL: Hangul
7370 * @G_UNICODE_SCRIPT_HEBREW: Hebrew
7371 * @G_UNICODE_SCRIPT_HIRAGANA: Hiragana
7372 * @G_UNICODE_SCRIPT_KANNADA: Kannada
7373 * @G_UNICODE_SCRIPT_KATAKANA: Katakana
7374 * @G_UNICODE_SCRIPT_KHMER: Khmer
7375 * @G_UNICODE_SCRIPT_LAO: Lao
7376 * @G_UNICODE_SCRIPT_LATIN: Latin
7377 * @G_UNICODE_SCRIPT_MALAYALAM: Malayalam
7378 * @G_UNICODE_SCRIPT_MONGOLIAN: Mongolian
7379 * @G_UNICODE_SCRIPT_MYANMAR: Myanmar
7380 * @G_UNICODE_SCRIPT_OGHAM: Ogham
7381 * @G_UNICODE_SCRIPT_OLD_ITALIC: Old Italic
7382 * @G_UNICODE_SCRIPT_ORIYA: Oriya
7383 * @G_UNICODE_SCRIPT_RUNIC: Runic
7384 * @G_UNICODE_SCRIPT_SINHALA: Sinhala
7385 * @G_UNICODE_SCRIPT_SYRIAC: Syriac
7386 * @G_UNICODE_SCRIPT_TAMIL: Tamil
7387 * @G_UNICODE_SCRIPT_TELUGU: Telugu
7388 * @G_UNICODE_SCRIPT_THAANA: Thaana
7389 * @G_UNICODE_SCRIPT_THAI: Thai
7390 * @G_UNICODE_SCRIPT_TIBETAN: Tibetan Canadian Aboriginal
7391 * @G_UNICODE_SCRIPT_YI: Yi
7392 * @G_UNICODE_SCRIPT_TAGALOG: Tagalog
7393 * @G_UNICODE_SCRIPT_HANUNOO: Hanunoo
7394 * @G_UNICODE_SCRIPT_BUHID: Buhid
7395 * @G_UNICODE_SCRIPT_TAGBANWA: Tagbanwa
7396 * @G_UNICODE_SCRIPT_BRAILLE: Braille
7397 * @G_UNICODE_SCRIPT_CYPRIOT: Cypriot
7398 * @G_UNICODE_SCRIPT_LIMBU: Limbu
7399 * @G_UNICODE_SCRIPT_OSMANYA: Osmanya
7400 * @G_UNICODE_SCRIPT_SHAVIAN: Shavian
7401 * @G_UNICODE_SCRIPT_LINEAR_B: Linear B
7402 * @G_UNICODE_SCRIPT_TAI_LE: Tai Le
7403 * @G_UNICODE_SCRIPT_UGARITIC: Ugaritic New Tai Lue
7404 * @G_UNICODE_SCRIPT_BUGINESE: Buginese
7405 * @G_UNICODE_SCRIPT_GLAGOLITIC: Glagolitic
7406 * @G_UNICODE_SCRIPT_TIFINAGH: Tifinagh Syloti Nagri Old Persian
7407 * @G_UNICODE_SCRIPT_KHAROSHTHI: Kharoshthi
7408 * @G_UNICODE_SCRIPT_UNKNOWN: an unassigned code point
7409 * @G_UNICODE_SCRIPT_BALINESE: Balinese
7410 * @G_UNICODE_SCRIPT_CUNEIFORM: Cuneiform
7411 * @G_UNICODE_SCRIPT_PHOENICIAN: Phoenician
7412 * @G_UNICODE_SCRIPT_PHAGS_PA: Phags-pa
7413 * @G_UNICODE_SCRIPT_NKO: N'Ko
7414 * @G_UNICODE_SCRIPT_KAYAH_LI: Kayah Li. Since 2.16.3
7415 * @G_UNICODE_SCRIPT_LEPCHA: Lepcha. Since 2.16.3
7416 * @G_UNICODE_SCRIPT_REJANG: Rejang. Since 2.16.3
7417 * @G_UNICODE_SCRIPT_SUNDANESE: Sundanese. Since 2.16.3
7418 * @G_UNICODE_SCRIPT_SAURASHTRA: Saurashtra. Since 2.16.3
7419 * @G_UNICODE_SCRIPT_CHAM: Cham. Since 2.16.3
7420 * @G_UNICODE_SCRIPT_OL_CHIKI: Ol Chiki. Since 2.16.3
7421 * @G_UNICODE_SCRIPT_VAI: Vai. Since 2.16.3
7422 * @G_UNICODE_SCRIPT_CARIAN: Carian. Since 2.16.3
7423 * @G_UNICODE_SCRIPT_LYCIAN: Lycian. Since 2.16.3
7424 * @G_UNICODE_SCRIPT_LYDIAN: Lydian. Since 2.16.3
7425 * @G_UNICODE_SCRIPT_AVESTAN: Avestan. Since 2.26
7426 * @G_UNICODE_SCRIPT_BAMUM: Bamum. Since 2.26 Egyptian Hieroglpyhs. Since 2.26 Imperial Aramaic. Since 2.26 Inscriptional Pahlavi. Since 2.26 Inscriptional Parthian. Since 2.26
7427 * @G_UNICODE_SCRIPT_JAVANESE: Javanese. Since 2.26
7428 * @G_UNICODE_SCRIPT_KAITHI: Kaithi. Since 2.26
7429 * @G_UNICODE_SCRIPT_LISU: Lisu. Since 2.26 Meetei Mayek. Since 2.26 Old South Arabian. Since 2.26
7430 * @G_UNICODE_SCRIPT_OLD_TURKIC: Old Turkic. Since 2.28
7431 * @G_UNICODE_SCRIPT_SAMARITAN: Samaritan. Since 2.26
7432 * @G_UNICODE_SCRIPT_TAI_THAM: Tai Tham. Since 2.26
7433 * @G_UNICODE_SCRIPT_TAI_VIET: Tai Viet. Since 2.26
7434 * @G_UNICODE_SCRIPT_BATAK: Batak. Since 2.28
7435 * @G_UNICODE_SCRIPT_BRAHMI: Brahmi. Since 2.28
7436 * @G_UNICODE_SCRIPT_MANDAIC: Mandaic. Since 2.28
7438 * The #GUnicodeScript enumeration identifies different writing
7439 * systems. The values correspond to the names as defined in the
7440 * Unicode standard. The enumeration has been added in GLib 2.14,
7441 * and is interchangeable with #PangoScript.
7443 * Note that new types may be added in the future. Applications
7444 * should be ready to handle unknown values.
7446 * url="http://www.unicode.org/reports/tr24/">Unicode Standard Annex
7447 * #24: Script names</ulink>.
7453 * @G_UNICODE_CONTROL: General category "Other, Control" (Cc)
7454 * @G_UNICODE_FORMAT: General category "Other, Format" (Cf)
7455 * @G_UNICODE_UNASSIGNED: General category "Other, Not Assigned" (Cn)
7456 * @G_UNICODE_PRIVATE_USE: General category "Other, Private Use" (Co)
7457 * @G_UNICODE_SURROGATE: General category "Other, Surrogate" (Cs)
7458 * @G_UNICODE_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll)
7459 * @G_UNICODE_MODIFIER_LETTER: General category "Letter, Modifier" (Lm)
7460 * @G_UNICODE_OTHER_LETTER: General category "Letter, Other" (Lo)
7461 * @G_UNICODE_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt)
7462 * @G_UNICODE_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu)
7463 * @G_UNICODE_SPACING_MARK: General category "Mark, Spacing" (Mc)
7464 * @G_UNICODE_ENCLOSING_MARK: General category "Mark, Enclosing" (Me)
7465 * @G_UNICODE_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn)
7466 * @G_UNICODE_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd)
7467 * @G_UNICODE_LETTER_NUMBER: General category "Number, Letter" (Nl)
7468 * @G_UNICODE_OTHER_NUMBER: General category "Number, Other" (No)
7469 * @G_UNICODE_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc)
7470 * @G_UNICODE_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd)
7471 * @G_UNICODE_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe)
7472 * @G_UNICODE_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf)
7473 * @G_UNICODE_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi)
7474 * @G_UNICODE_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po)
7475 * @G_UNICODE_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps)
7476 * @G_UNICODE_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc)
7477 * @G_UNICODE_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk)
7478 * @G_UNICODE_MATH_SYMBOL: General category "Symbol, Math" (Sm)
7479 * @G_UNICODE_OTHER_SYMBOL: General category "Symbol, Other" (So)
7480 * @G_UNICODE_LINE_SEPARATOR: General category "Separator, Line" (Zl)
7481 * @G_UNICODE_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp)
7482 * @G_UNICODE_SPACE_SEPARATOR: General category "Separator, Space" (Zs)
7484 * These are the possible character classifications from the
7485 * Unicode specification.
7486 * See <ulink url="http://www.unicode.org/Public/UNIDATA/UnicodeData.html">http://www.unicode.org/Public/UNIDATA/UnicodeData.html</ulink>.
7491 * GUnixCredentialsMessage:
7493 * The #GUnixCredentialsMessage structure contains only private data
7494 * and should only be accessed using the provided API.
7501 * GUnixCredentialsMessage:credentials:
7503 * The credentials stored in the message.
7510 * GUnixCredentialsMessageClass:
7512 * Class structure for #GUnixCredentialsMessage.
7521 * Implements #GInputStream for reading from selectable unix file descriptors
7526 * GUnixInputStream:close-fd:
7528 * Whether to close the file descriptor when the stream is closed.
7535 * GUnixInputStream:fd:
7537 * The file descriptor that the stream reads from.
7546 * Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>).
7547 * This corresponds roughly to a mtab entry.
7552 * GUnixMountMonitor:
7554 * Watches #GUnixMount<!-- -->s for changes.
7559 * GUnixMountMonitor::mountpoints-changed:
7560 * @monitor: the object on which the signal is emitted
7562 * Emitted when the unix mount points have changed.
7567 * GUnixMountMonitor::mounts-changed:
7568 * @monitor: the object on which the signal is emitted
7570 * Emitted when the unix mounts have changed.
7577 * Defines a Unix mount point (e.g. <filename>/dev</filename>).
7578 * This corresponds roughly to a fstab entry.
7583 * GUnixOutputStream:
7585 * Implements #GOutputStream for outputting to selectable unix file descriptors
7590 * GUnixOutputStream:close-fd:
7592 * Whether to close the file descriptor when the stream is closed.
7599 * GUnixOutputStream:fd:
7601 * The file descriptor that the stream writes to.
7608 * GUnixSocketAddress:
7610 * A UNIX-domain (local) socket address, corresponding to a
7611 * <type>struct sockaddr_un</type>.
7616 * GUnixSocketAddress:abstract:
7618 * Whether or not this is an abstract address
7620 * distinguishes between zero-padded and non-zero-padded
7621 * abstract addresses.
7623 * Deprecated: Use #GUnixSocketAddress:address-type, which
7628 * GUnixSocketAddressType:
7629 * @G_UNIX_SOCKET_ADDRESS_INVALID: invalid
7630 * @G_UNIX_SOCKET_ADDRESS_ANONYMOUS: anonymous
7631 * @G_UNIX_SOCKET_ADDRESS_PATH: a filesystem path
7632 * @G_UNIX_SOCKET_ADDRESS_ABSTRACT: an abstract name
7633 * @G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED: an abstract name, 0-padded to the full length of a unix socket name
7635 * The type of name used by a #GUnixSocketAddress.
7636 * %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain
7637 * socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS
7638 * indicates a socket not bound to any name (eg, a client-side socket,
7639 * or a socket created with socketpair()).
7641 * For abstract sockets, there are two incompatible ways of naming
7642 * them; the man pages suggest using the entire <literal>struct
7643 * sockaddr_un</literal> as the name, padding the unused parts of the
7644 * %sun_path field with zeroes; this corresponds to
7645 * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED. However, many programs
7646 * instead just use a portion of %sun_path, and pass an appropriate
7647 * smaller length to bind() or connect(). This is
7648 * %G_UNIX_SOCKET_ADDRESS_ABSTRACT.
7656 * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory
7657 * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory
7658 * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory
7659 * @G_USER_DIRECTORY_MUSIC: the user's Music directory
7660 * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory
7661 * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory
7662 * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory
7663 * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory
7664 * @G_USER_N_DIRECTORIES: the number of enum values
7666 * These are logical ids for special directories which are defined
7667 * depending on the platform used. You should use g_get_user_special_dir()
7668 * to retrieve the full path associated to the logical id.
7670 * The #GUserDirectory enumeration can be extended at later date. Not
7671 * every platform has a directory for every logical id in this
7681 * An opaque structure used to hold different types of values.
7682 * The data within the structure has protected scope: it is accessible only
7683 * to functions within a #GTypeValueTable structure, or implementations of
7684 * the g_value_*() API. That is, code portions which implement new fundamental
7686 * #GValue users cannot make any assumptions about how data is stored
7687 * within the 2 element @data union, and the @g_type member should
7688 * only be accessed through the G_VALUE_TYPE() macro.
7694 * @n_values: number of values contained in the array
7695 * @values: array of values
7697 * A #GValueArray contains an array of #GValue elements.
7703 * @src_value: Source value.
7704 * @dest_value: Target value.
7706 * The type of value transformation functions which can be registered with
7707 * g_value_register_transform_func().
7714 * A type in the GVariant type system.
7716 * Two types may not be compared by value; use g_variant_type_equal() or
7717 * g_variant_type_is_subtype_of(). May be copied using
7718 * g_variant_type_copy() and freed using g_variant_type_free().
7725 * Virtual File System object.
7732 * Declares a type of function which takes no arguments
7733 * and has no return value. It is used to specify the type
7734 * function passed to g_atexit().
7741 * Opaque mountable volume object.
7748 * Emitted when the volume has been changed.
7755 * This signal is emitted when the #GVolume have been removed. If
7756 * the recipient is holding references to the object they should
7757 * release them so the object can be finalized.
7763 * @g_iface: The parent interface.
7764 * @changed: Changed signal that is emitted when the volume's state has changed.
7765 * @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.
7766 * @get_name: Gets a string containing the name of the #GVolume.
7767 * @get_icon: Gets a #GIcon for the #GVolume.
7768 * @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.
7769 * @get_drive: Gets a #GDrive the volume is located on. Returns %NULL if the #GVolume is not associated with a #GDrive.
7770 * @get_mount: Gets a #GMount representing the mounted volume. Returns %NULL if the #GVolume is not mounted.
7771 * @can_mount: Returns %TRUE if the #GVolume can be mounted.
7772 * @can_eject: Checks if a #GVolume can be ejected.
7773 * @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.
7774 * @mount_finish: Finishes a mount operation.
7775 * @eject: Ejects a given #GVolume.
7776 * @eject_finish: Finishes an eject operation.
7777 * @get_identifier: Returns the <link linkend="volume-identifier">identifier</link> of the given kind, or %NULL if the #GVolume doesn't have one.
7778 * @enumerate_identifiers: Returns an array strings listing the kinds of <link linkend="volume-identifier">identifiers</link> which the #GVolume has.
7779 * @should_automount: Returns %TRUE if the #GVolume should be automatically mounted.
7780 * @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if it is not known.
7781 * @eject_with_operation: Starts ejecting a #GVolume using a #GMountOperation. Since 2.22.
7782 * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
7783 * @get_sort_key: Gets a key used for sorting #GVolume instance or %NULL if no such key exists. Since 2.32.
7785 * Interface for implementing operations for mountable volumes.
7792 * A Volume Monitor that watches for volume events.
7797 * GVolumeMonitor::drive-changed:
7798 * @volume_monitor: The volume monitor emitting the signal.
7799 * @drive: the drive that changed
7801 * Emitted when a drive changes.
7806 * GVolumeMonitor::drive-connected:
7807 * @volume_monitor: The volume monitor emitting the signal.
7808 * @drive: a #GDrive that was connected.
7810 * Emitted when a drive is connected to the system.
7815 * GVolumeMonitor::drive-disconnected:
7816 * @volume_monitor: The volume monitor emitting the signal.
7817 * @drive: a #GDrive that was disconnected.
7819 * Emitted when a drive is disconnected from the system.
7824 * GVolumeMonitor::drive-eject-button:
7825 * @volume_monitor: The volume monitor emitting the signal.
7826 * @drive: the drive where the eject button was pressed
7828 * Emitted when the eject button is pressed on @drive.
7835 * GVolumeMonitor::drive-stop-button:
7836 * @volume_monitor: The volume monitor emitting the signal.
7837 * @drive: the drive where the stop button was pressed
7839 * Emitted when the stop button is pressed on @drive.
7846 * GVolumeMonitor::mount-added:
7847 * @volume_monitor: The volume monitor emitting the signal.
7848 * @mount: a #GMount that was added.
7850 * Emitted when a mount is added.
7855 * GVolumeMonitor::mount-changed:
7856 * @volume_monitor: The volume monitor emitting the signal.
7857 * @mount: a #GMount that changed.
7859 * Emitted when a mount changes.
7864 * GVolumeMonitor::mount-pre-unmount:
7865 * @volume_monitor: The volume monitor emitting the signal.
7866 * @mount: a #GMount that is being unmounted.
7868 * Emitted when a mount is about to be removed.
7873 * GVolumeMonitor::mount-removed:
7874 * @volume_monitor: The volume monitor emitting the signal.
7875 * @mount: a #GMount that was removed.
7877 * Emitted when a mount is removed.
7882 * GVolumeMonitor::volume-added:
7883 * @volume_monitor: The volume monitor emitting the signal.
7884 * @volume: a #GVolume that was added.
7886 * Emitted when a mountable volume is added to the system.
7891 * GVolumeMonitor::volume-changed:
7892 * @volume_monitor: The volume monitor emitting the signal.
7893 * @volume: a #GVolume that changed.
7895 * Emitted when mountable volume is changed.
7900 * GVolumeMonitor::volume-removed:
7901 * @volume_monitor: The volume monitor emitting the signal.
7902 * @volume: a #GVolume that was removed.
7904 * Emitted when a mountable volume is removed from the system.
7910 * @data: data that was provided when the weak reference was established
7911 * @where_the_object_was: the object being finalized
7913 * A #GWeakNotify function can be added to an object as a callback that gets
7914 * triggered when the object is finalized. Since the object is already being
7915 * finalized when the #GWeakNotify is called, there's not much you could do
7916 * with the object, apart from e.g. using its address as hash-index or the like.
7921 * GWin32InputStream:close-handle:
7923 * Whether to close the file handle when the stream is closed.
7930 * GWin32InputStream:handle:
7932 * The handle that the stream reads from.
7939 * GWin32OutputStream:close-handle:
7941 * Whether to close the file handle when the stream is closed.
7948 * GWin32OutputStream:handle:
7950 * The file handle that the stream writes to.
7959 * Zlib decompression
7964 * GZlibCompressor:file-info:
7966 * If set to a non-%NULL #GFileInfo object, and #GZlibCompressor:format is
7967 * %G_ZLIB_COMPRESSOR_FORMAT_GZIP, the compressor will write the file name
7968 * and modification time from the file info to the the GZIP header.
7975 * GZlibCompressorFormat:
7976 * @G_ZLIB_COMPRESSOR_FORMAT_ZLIB: deflate compression with zlib header
7977 * @G_ZLIB_COMPRESSOR_FORMAT_GZIP: gzip file format
7978 * @G_ZLIB_COMPRESSOR_FORMAT_RAW: deflate compression with no header
7980 * Used to select the type of data format to use for #GZlibDecompressor
7981 * and #GZlibCompressor.
7988 * GZlibDecompressor:
7990 * Zlib decompression
7995 * GZlibDecompressor:file-info:
7997 * A #GFileInfo containing the information found in the GZIP header
7998 * of the data stream processed, or %NULL if the header was not yet
7999 * fully processed, is not present at all, or the compressor's
8000 * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP.
8007 * G_BOOKMARK_FILE_ERROR:
8009 * Error domain for bookmark file parsing.
8010 * Errors in this domain will be from the #GBookmarkFileError
8011 * enumeration. See #GError for information on error domains.
8018 * Inserts a breakpoint instruction into the code.
8020 * On x86 and alpha systems this is implemented as a soft interrupt
8021 * and on other architectures it raises a <literal>SIGTRAP</literal> signal.
8027 * @f: a function pointer.
8029 * Cast a function pointer to a #GCallback.
8034 * G_CCLOSURE_SWAP_DATA:
8035 * @cclosure: a #GCClosure
8037 * Checks whether the user data of the #GCClosure should be passed as the
8038 * first parameter to the callback. See g_cclosure_new_swap().
8040 * Returns: %TRUE if data has to be swapped.
8045 * G_CLOSURE_NEEDS_MARSHAL:
8046 * @closure: a #GClosure
8048 * Check if the closure still needs a marshaller. See g_closure_set_marshal().
8052 * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on
8057 * G_CLOSURE_N_NOTIFIERS:
8060 * Get the total number of notifiers connected with the closure @cl.
8061 * The count includes the meta marshaller, the finalize and invalidate notifiers
8062 * and the marshal guards. Note that each guard counts as two notifiers.
8063 * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
8064 * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
8066 * Returns: number of notifiers
8073 * Error domain for character set conversions. Errors in this domain will
8074 * be from the #GConvertError enumeration. See #GError for information on
8080 * G_DATALIST_FLAGS_MASK:
8082 * A bitmask that restricts the possible flags passed to
8083 * g_datalist_set_flags(). Passing a flags value where
8084 * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.
8091 * Error domain for errors generated by a remote message bus. Errors
8092 * in this domain will be from the #GDBusError enumeration. See
8093 * #GError for more information on error domains.
8095 * Note that errors in this error domain is intended only for
8096 * returning errors from a remote message bus process. Errors
8097 * generated locally in-process by e.g. #GDBusConnection is from the
8098 * %G_IO_ERROR domain.
8105 * G_DEFINE_ABSTRACT_TYPE:
8106 * @TN: The name of the new type, in Camel case.
8107 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
8108 * @T_P: The #GType of the parent type.
8110 * A convenience macro for type implementations.
8111 * Similar to G_DEFINE_TYPE(), but defines an abstract type.
8112 * See G_DEFINE_TYPE_EXTENDED() for an example.
8119 * G_DEFINE_ABSTRACT_TYPE_WITH_CODE:
8120 * @TN: The name of the new type, in Camel case.
8121 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
8122 * @T_P: The #GType of the parent type.
8123 * @_C_: Custom code that gets inserted in the @type_name_get_type() function.
8125 * A convenience macro for type implementations.
8126 * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows you to
8127 * insert custom code into the *_get_type() function, e.g. interface implementations
8128 * via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
8135 * G_DEFINE_BOXED_TYPE:
8136 * @TypeName: The name of the new type, in Camel case.
8137 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
8138 * @copy_func: the #GBoxedCopyFunc for the new type
8139 * @free_func: the #GBoxedFreeFunc for the new type
8141 * A convenience macro for boxed type implementations, which defines a
8142 * type_name_get_type() function registering the boxed type.
8149 * G_DEFINE_BOXED_TYPE_WITH_CODE:
8150 * @TypeName: The name of the new type, in Camel case.
8151 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
8152 * @copy_func: the #GBoxedCopyFunc for the new type
8153 * @free_func: the #GBoxedFreeFunc for the new type
8154 * @_C_: Custom code that gets inserted in the *_get_type() function.
8156 * A convenience macro for boxed type implementations.
8157 * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the
8158 * type_name_get_type() function, e.g. to register value transformations with
8159 * g_value_register_transform_func().
8166 * G_DEFINE_DYNAMIC_TYPE:
8167 * @TN: The name of the new type, in Camel case.
8168 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
8169 * @T_P: The #GType of the parent type.
8171 * A convenience macro for dynamic type implementations, which declares a
8172 * class initialization function, an instance initialization function (see
8173 * #GTypeInfo for information about these) and a static variable named
8174 * @t_n<!-- -->_parent_class pointing to the parent class. Furthermore,
8175 * it defines a <function>*_get_type()</function> and a static
8176 * <function>*_register_type()</function> function for use in your
8177 * <function>module_init()</function>.
8178 * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.
8185 * G_DEFINE_DYNAMIC_TYPE_EXTENDED:
8186 * @TypeName: The name of the new type, in Camel case.
8187 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
8188 * @TYPE_PARENT: The #GType of the parent type.
8189 * @flags: #GTypeFlags to pass to g_type_module_register_type()
8190 * @CODE: Custom code that gets inserted in the *_get_type() function.
8192 * A more general version of G_DEFINE_DYNAMIC_TYPE() which
8193 * allows to specify #GTypeFlags and custom code.
8196 * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
8200 * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO,
8201 * gtk_gadget_gizmo_init));
8205 * static void gtk_gadget_init (GtkGadget *self);
8206 * static void gtk_gadget_class_init (GtkGadgetClass *klass);
8207 * static void gtk_gadget_class_finalize (GtkGadgetClass *klass);
8209 * static gpointer gtk_gadget_parent_class = NULL;
8210 * static GType gtk_gadget_type_id = 0;
8212 * static void gtk_gadget_class_intern_init (gpointer klass)
8214 * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
8215 * gtk_gadget_class_init ((GtkGadgetClass*) klass);
8219 * gtk_gadget_get_type (void)
8221 * return gtk_gadget_type_id;
8225 * gtk_gadget_register_type (GTypeModule *type_module)
8227 * const GTypeInfo g_define_type_info = {
8228 * sizeof (GtkGadgetClass),
8229 * (GBaseInitFunc) NULL,
8230 * (GBaseFinalizeFunc) NULL,
8231 * (GClassInitFunc) gtk_gadget_class_intern_init,
8232 * (GClassFinalizeFunc) gtk_gadget_class_finalize,
8233 * NULL, // class_data
8234 * sizeof (GtkGadget),
8236 * (GInstanceInitFunc) gtk_gadget_init,
8237 * NULL // value_table
8239 * gtk_gadget_type_id = g_type_module_register_type (type_module,
8242 * &g_define_type_info,
8243 * (GTypeFlags) flags);
8245 * const GInterfaceInfo g_implement_interface_info = {
8246 * (GInterfaceInitFunc) gtk_gadget_gizmo_init
8248 * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
8258 * G_DEFINE_INTERFACE:
8259 * @TN: The name of the new type, in Camel case.
8260 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
8261 * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
8263 * A convenience macro for #GTypeInterface definitions, which declares
8264 * a default vtable initialization function and defines a *_get_type()
8267 * The macro expects the interface initialization function to have the
8268 * name <literal>t_n ## _default_init</literal>, and the interface
8269 * structure to have the name <literal>TN ## Interface</literal>.
8276 * G_DEFINE_INTERFACE_WITH_CODE:
8277 * @TN: The name of the new type, in Camel case.
8278 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
8279 * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
8280 * @_C_: Custom code that gets inserted in the *_get_type() function.
8282 * A convenience macro for #GTypeInterface definitions. Similar to
8283 * G_DEFINE_INTERFACE(), but allows you to insert custom code into the
8284 * *_get_type() function, e.g. additional interface implementations
8285 * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See
8286 * G_DEFINE_TYPE_EXTENDED() for a similar example using
8287 * G_DEFINE_TYPE_WITH_CODE().
8294 * G_DEFINE_POINTER_TYPE:
8295 * @TypeName: The name of the new type, in Camel case.
8296 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
8298 * A convenience macro for pointer type implementations, which defines a
8299 * type_name_get_type() function registering the pointer type.
8306 * G_DEFINE_POINTER_TYPE_WITH_CODE:
8307 * @TypeName: The name of the new type, in Camel case.
8308 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
8309 * @_C_: Custom code that gets inserted in the *_get_type() function.
8311 * A convenience macro for pointer type implementations.
8312 * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert custom code into the
8313 * type_name_get_type() function.
8321 * @TN: The name of the new type, in Camel case.
8322 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
8323 * @T_P: The #GType of the parent type.
8325 * A convenience macro for type implementations, which declares a
8326 * class initialization function, an instance initialization function (see #GTypeInfo for information about
8327 * these) and a static variable named @t_n<!-- -->_parent_class pointing to the parent class. Furthermore, it defines
8328 * a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() for an example.
8335 * G_DEFINE_TYPE_EXTENDED:
8336 * @TN: The name of the new type, in Camel case.
8337 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
8338 * @T_P: The #GType of the parent type.
8339 * @_f_: #GTypeFlags to pass to g_type_register_static()
8340 * @_C_: Custom code that gets inserted in the *_get_type() function.
8342 * The most general convenience macro for type implementations, on which
8343 * G_DEFINE_TYPE(), etc are based.
8346 * G_DEFINE_TYPE_EXTENDED (GtkGadget,
8350 * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
8351 * gtk_gadget_gizmo_init));
8355 * static void gtk_gadget_init (GtkGadget *self);
8356 * static void gtk_gadget_class_init (GtkGadgetClass *klass);
8357 * static gpointer gtk_gadget_parent_class = NULL;
8358 * static void gtk_gadget_class_intern_init (gpointer klass)
8360 * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
8361 * gtk_gadget_class_init ((GtkGadgetClass*) klass);
8365 * gtk_gadget_get_type (void)
8367 * static volatile gsize g_define_type_id__volatile = 0;
8368 * if (g_once_init_enter (&g_define_type_id__volatile))
8370 * GType g_define_type_id =
8371 * g_type_register_static_simple (GTK_TYPE_WIDGET,
8372 * g_intern_static_string ("GtkGadget"),
8373 * sizeof (GtkGadgetClass),
8374 * (GClassInitFunc) gtk_gadget_class_intern_init,
8375 * sizeof (GtkGadget),
8376 * (GInstanceInitFunc) gtk_gadget_init,
8377 * (GTypeFlags) flags);
8379 * const GInterfaceInfo g_implement_interface_info = {
8380 * (GInterfaceInitFunc) gtk_gadget_gizmo_init
8382 * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
8384 * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
8386 * return g_define_type_id__volatile;
8389 * The only pieces which have to be manually provided are the definitions of
8390 * the instance and class structure and the definitions of the instance and
8391 * class init functions.
8398 * G_DEFINE_TYPE_WITH_CODE:
8399 * @TN: The name of the new type, in Camel case.
8400 * @t_n: The name of the new type in lowercase, with words separated by '_'.
8401 * @T_P: The #GType of the parent type.
8402 * @_C_: Custom code that gets inserted in the *_get_type() function.
8404 * A convenience macro for type implementations.
8405 * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the
8406 * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
8407 * See G_DEFINE_TYPE_EXTENDED() for an example.
8414 * G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME:
8416 * Extension point for default handler to URI association. See
8417 * <link linkend="extending-gio">Extending GIO</link>.
8423 * @class: a valid #GEnumClass
8425 * Casts a derived #GEnumClass structure into a #GEnumClass structure.
8430 * G_ENUM_CLASS_TYPE:
8431 * @class: a #GEnumClass
8433 * Get the type identifier from a given #GEnumClass structure.
8435 * Returns: the #GType
8440 * G_ENUM_CLASS_TYPE_NAME:
8441 * @class: a #GEnumClass
8443 * Get the static type name from a given #GEnumClass structure.
8445 * Returns: the type name.
8450 * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE:
8452 * A key in the "access" namespace for checking deletion privileges.
8453 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8454 * This attribute will be %TRUE if the user is able to delete the file.
8459 * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE:
8461 * A key in the "access" namespace for getting execution privileges.
8462 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8463 * This attribute will be %TRUE if the user is able to execute the file.
8468 * G_FILE_ATTRIBUTE_ACCESS_CAN_READ:
8470 * A key in the "access" namespace for getting read privileges.
8471 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8472 * This attribute will be %TRUE if the user is able to read the file.
8477 * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME:
8479 * A key in the "access" namespace for checking renaming privileges.
8480 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8481 * This attribute will be %TRUE if the user is able to rename the file.
8486 * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH:
8488 * A key in the "access" namespace for checking trashing privileges.
8489 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8490 * This attribute will be %TRUE if the user is able to move the file to
8496 * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE:
8498 * A key in the "access" namespace for getting write privileges.
8499 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8500 * This attribute will be %TRUE if the user is able to write to the file.
8505 * G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE:
8507 * A key in the "dos" namespace for checking if the file's archive flag
8508 * is set. This attribute is %TRUE if the archive flag is set. This attribute
8509 * is only available for DOS file systems. Corresponding #GFileAttributeType
8510 * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8515 * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM:
8517 * A key in the "dos" namespace for checking if the file's backup flag
8518 * is set. This attribute is %TRUE if the backup flag is set. This attribute
8519 * is only available for DOS file systems. Corresponding #GFileAttributeType
8520 * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8525 * G_FILE_ATTRIBUTE_ETAG_VALUE:
8527 * A key in the "etag" namespace for getting the value of the file's
8528 * entity tag. Corresponding #GFileAttributeType is
8529 * %G_FILE_ATTRIBUTE_TYPE_STRING.
8534 * G_FILE_ATTRIBUTE_FILESYSTEM_FREE:
8536 * A key in the "filesystem" namespace for getting the number of bytes of free space left on the
8537 * file system. Corresponding #GFileAttributeType is
8538 * %G_FILE_ATTRIBUTE_TYPE_UINT64.
8543 * G_FILE_ATTRIBUTE_FILESYSTEM_READONLY:
8545 * A key in the "filesystem" namespace for checking if the file system
8546 * is read only. Is set to %TRUE if the file system is read only.
8547 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8552 * G_FILE_ATTRIBUTE_FILESYSTEM_SIZE:
8554 * A key in the "filesystem" namespace for getting the total size (in bytes) of the file system,
8555 * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType
8556 * is %G_FILE_ATTRIBUTE_TYPE_UINT64.
8561 * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE:
8563 * A key in the "filesystem" namespace for getting the file system's type.
8564 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8569 * G_FILE_ATTRIBUTE_FILESYSTEM_USED:
8571 * A key in the "filesystem" namespace for getting the number of bytes of used on the
8572 * file system. Corresponding #GFileAttributeType is
8573 * %G_FILE_ATTRIBUTE_TYPE_UINT64.
8580 * G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW:
8582 * A key in the "filesystem" namespace for hinting a file manager
8583 * application whether it should preview (e.g. thumbnail) files on the
8584 * file system. The value for this key contain a
8585 * #GFilesystemPreviewType.
8590 * G_FILE_ATTRIBUTE_GVFS_BACKEND:
8592 * A key in the "gvfs" namespace that gets the name of the current
8593 * GVFS backend in use. Corresponding #GFileAttributeType is
8594 * %G_FILE_ATTRIBUTE_TYPE_STRING.
8599 * G_FILE_ATTRIBUTE_ID_FILE:
8601 * A key in the "id" namespace for getting a file identifier.
8602 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8603 * An example use would be during listing files, to avoid recursive
8604 * directory scanning.
8609 * G_FILE_ATTRIBUTE_ID_FILESYSTEM:
8611 * A key in the "id" namespace for getting the file system identifier.
8612 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8613 * An example use would be during drag and drop to see if the source
8614 * and target are on the same filesystem (default to move) or not (default
8620 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT:
8622 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
8623 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8628 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT:
8630 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
8631 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8636 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL:
8638 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
8639 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8646 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START:
8648 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
8649 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8656 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED:
8658 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started
8660 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8667 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP:
8669 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
8670 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8677 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT:
8679 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable.
8680 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8685 * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI:
8687 * A key in the "mountable" namespace for getting the HAL UDI for the mountable
8688 * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8693 * G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC:
8695 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)
8696 * is automatically polled for media.
8697 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8704 * G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE:
8706 * A key in the "mountable" namespace for getting the #GDriveStartStopType.
8707 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8714 * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE:
8716 * A key in the "mountable" namespace for getting the unix device.
8717 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8722 * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE:
8724 * A key in the "mountable" namespace for getting the unix device file.
8725 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8732 * G_FILE_ATTRIBUTE_OWNER_GROUP:
8734 * A key in the "owner" namespace for getting the file owner's group.
8735 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8740 * G_FILE_ATTRIBUTE_OWNER_USER:
8742 * A key in the "owner" namespace for getting the user name of the
8743 * file's owner. Corresponding #GFileAttributeType is
8744 * %G_FILE_ATTRIBUTE_TYPE_STRING.
8749 * G_FILE_ATTRIBUTE_OWNER_USER_REAL:
8751 * A key in the "owner" namespace for getting the real name of the
8752 * user that owns the file. Corresponding #GFileAttributeType is
8753 * %G_FILE_ATTRIBUTE_TYPE_STRING.
8758 * G_FILE_ATTRIBUTE_PREVIEW_ICON:
8760 * A key in the "preview" namespace for getting a #GIcon that can be
8761 * used to get preview of the file. For example, it may be a low
8762 * resolution thumbnail without metadata. Corresponding
8763 * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. The value
8764 * for this key should contain a #GIcon.
8771 * G_FILE_ATTRIBUTE_SELINUX_CONTEXT:
8773 * A key in the "selinux" namespace for getting the file's SELinux
8774 * context. Corresponding #GFileAttributeType is
8775 * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only
8776 * available if GLib has been built with SELinux support.
8781 * G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE:
8783 * A key in the "standard" namespace for getting the amount of disk space
8784 * that is consumed by the file (in bytes). This will generally be larger
8785 * than the file size (due to block size overhead) but can occasionally be
8786 * smaller (for example, for sparse files).
8787 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
8794 * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE:
8796 * A key in the "standard" namespace for getting the content type of the file.
8797 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8798 * The value for this key should contain a valid content type.
8803 * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME:
8805 * A key in the "standard" namespace for getting the copy name of the file.
8806 * The copy name is an optional version of the name. If available it's always
8807 * in UTF8, and corresponds directly to the original filename (only transcoded to
8808 * UTF8). This is useful if you want to copy the file to another filesystem that
8809 * might have a different encoding. If the filename is not a valid string in the
8810 * encoding selected for the filesystem it is in then the copy name will not be set.
8812 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8817 * G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION:
8819 * A key in the "standard" namespace for getting the description of the file.
8820 * The description is a utf8 string that describes the file, generally containing
8821 * the filename, but can also contain furter information. Example descriptions
8822 * could be "filename (on hostname)" for a remote file or "filename (in trash)"
8823 * for a file in the trash. This is useful for instance as the window title
8824 * when displaying a directory or for a bookmarks menu.
8826 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8831 * G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME:
8833 * A key in the "standard" namespace for getting the display name of the file.
8834 * A display name is guaranteed to be in UTF8 and can thus be displayed in
8836 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8841 * G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME:
8843 * A key in the "standard" namespace for edit name of the file.
8844 * An edit name is similar to the display name, but it is meant to be
8845 * used when you want to rename the file in the UI. The display name
8846 * might contain information you don't want in the new filename (such as
8847 * "(invalid unicode)" if the filename was in an invalid encoding).
8849 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8854 * G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE:
8856 * A key in the "standard" namespace for getting the fast content type.
8857 * The fast content type isn't as reliable as the regular one, as it
8858 * only uses the filename to guess it, but it is faster to calculate than the
8859 * regular content type.
8860 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8865 * G_FILE_ATTRIBUTE_STANDARD_ICON:
8867 * A key in the "standard" namespace for getting the icon for the file.
8868 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
8869 * The value for this key should contain a #GIcon.
8874 * G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP:
8876 * A key in the "standard" namespace for checking if a file is a backup file.
8877 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8882 * G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN:
8884 * A key in the "standard" namespace for checking if a file is hidden.
8885 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8890 * G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK:
8892 * A key in the "standard" namespace for checking if the file is a symlink.
8893 * Typically the actual type is something else, if we followed the symlink
8895 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8900 * G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL:
8902 * A key in the "standard" namespace for checking if a file is virtual.
8903 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8908 * G_FILE_ATTRIBUTE_STANDARD_NAME:
8910 * A key in the "standard" namespace for getting the name of the file.
8911 * The name is the on-disk filename which may not be in any known encoding,
8912 * and can thus not be generally displayed as is.
8913 * Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
8914 * name in a user interface.
8915 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
8920 * G_FILE_ATTRIBUTE_STANDARD_SIZE:
8922 * A key in the "standard" namespace for getting the file's size (in bytes).
8923 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
8928 * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER:
8930 * A key in the "standard" namespace for setting the sort order of a file.
8931 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
8932 * An example use would be in file managers, which would use this key
8933 * to set the order files are displayed. Files with smaller sort order
8934 * should be sorted first, and files without sort order as if sort order
8940 * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET:
8942 * A key in the "standard" namespace for getting the symlink target, if the file
8943 * is a symlink. Corresponding #GFileAttributeType is
8944 * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
8949 * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI:
8951 * A key in the "standard" namespace for getting the target URI for the file, in
8952 * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
8953 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
8958 * G_FILE_ATTRIBUTE_STANDARD_TYPE:
8960 * A key in the "standard" namespace for storing file types.
8961 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
8962 * The value for this key should contain a #GFileType.
8967 * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED:
8969 * A key in the "thumbnail" namespace for checking if thumbnailing failed.
8970 * This attribute is %TRUE if thumbnailing failed. Corresponding
8971 * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
8976 * G_FILE_ATTRIBUTE_THUMBNAIL_PATH:
8978 * A key in the "thumbnail" namespace for getting the path to the thumbnail
8979 * image. Corresponding #GFileAttributeType is
8980 * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
8985 * G_FILE_ATTRIBUTE_TIME_ACCESS:
8987 * A key in the "time" namespace for getting the time the file was last
8988 * accessed. Corresponding #GFileAttributeType is
8989 * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
8990 * file was last accessed.
8995 * G_FILE_ATTRIBUTE_TIME_ACCESS_USEC:
8997 * A key in the "time" namespace for getting the microseconds of the time
8998 * the file was last accessed. This should be used in conjunction with
8999 * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is
9000 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
9005 * G_FILE_ATTRIBUTE_TIME_CHANGED:
9007 * A key in the "time" namespace for getting the time the file was last
9008 * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
9009 * and contains the UNIX time since the file was last changed.
9011 * This corresponds to the traditional UNIX ctime.
9016 * G_FILE_ATTRIBUTE_TIME_CHANGED_USEC:
9018 * A key in the "time" namespace for getting the microseconds of the time
9019 * the file was last changed. This should be used in conjunction with
9020 * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is
9021 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
9026 * G_FILE_ATTRIBUTE_TIME_CREATED:
9028 * A key in the "time" namespace for getting the time the file was created.
9029 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
9030 * and contains the UNIX time since the file was created.
9032 * This corresponds to the NTFS ctime.
9037 * G_FILE_ATTRIBUTE_TIME_CREATED_USEC:
9039 * A key in the "time" namespace for getting the microseconds of the time
9040 * the file was created. This should be used in conjunction with
9041 * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is
9042 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
9047 * G_FILE_ATTRIBUTE_TIME_MODIFIED:
9049 * A key in the "time" namespace for getting the time the file was last
9050 * modified. Corresponding #GFileAttributeType is
9051 * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
9052 * file was modified.
9057 * G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC:
9059 * A key in the "time" namespace for getting the miliseconds of the time
9060 * the file was last modified. This should be used in conjunction with
9061 * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is
9062 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
9067 * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE:
9069 * A key in the "trash" namespace. When requested against
9070 * items in "trash:///", will return the date and time when the file
9071 * was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss.
9072 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
9079 * G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT:
9081 * A key in the "trash" namespace. When requested against
9082 * "trash:///" returns the number of (toplevel) items in the trash folder.
9083 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
9088 * G_FILE_ATTRIBUTE_TRASH_ORIG_PATH:
9090 * A key in the "trash" namespace. When requested against
9091 * items in "trash:///", will return the original path to the file before it
9092 * was trashed. Corresponding #GFileAttributeType is
9093 * %G_FILE_ATTRIBUTE_TYPE_STRING.
9100 * G_FILE_ATTRIBUTE_UNIX_BLOCKS:
9102 * A key in the "unix" namespace for getting the number of blocks allocated
9103 * for the file. This attribute is only available for UNIX file systems.
9104 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
9109 * G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE:
9111 * A key in the "unix" namespace for getting the block size for the file
9112 * system. This attribute is only available for UNIX file systems.
9113 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
9118 * G_FILE_ATTRIBUTE_UNIX_DEVICE:
9120 * A key in the "unix" namespace for getting the device id of the device the
9121 * file is located on (see stat() documentation). This attribute is only
9122 * available for UNIX file systems. Corresponding #GFileAttributeType is
9123 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
9128 * G_FILE_ATTRIBUTE_UNIX_GID:
9130 * A key in the "unix" namespace for getting the group ID for the file.
9131 * This attribute is only available for UNIX file systems.
9132 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
9137 * G_FILE_ATTRIBUTE_UNIX_INODE:
9139 * A key in the "unix" namespace for getting the inode of the file.
9140 * This attribute is only available for UNIX file systems. Corresponding
9141 * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
9146 * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT:
9148 * A key in the "unix" namespace for checking if the file represents a
9149 * UNIX mount point. This attribute is %TRUE if the file is a UNIX mount
9150 * point. This attribute is only available for UNIX file systems.
9151 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
9156 * G_FILE_ATTRIBUTE_UNIX_MODE:
9158 * A key in the "unix" namespace for getting the mode of the file
9159 * (e.g. whether the file is a regular file, symlink, etc). See lstat()
9160 * documentation. This attribute is only available for UNIX file systems.
9161 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
9166 * G_FILE_ATTRIBUTE_UNIX_NLINK:
9168 * A key in the "unix" namespace for getting the number of hard links
9169 * for a file. See lstat() documentation. This attribute is only available
9170 * for UNIX file systems. Corresponding #GFileAttributeType is
9171 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
9176 * G_FILE_ATTRIBUTE_UNIX_RDEV:
9178 * A key in the "unix" namespace for getting the device ID for the file
9179 * (if it is a special file). See lstat() documentation. This attribute
9180 * is only available for UNIX file systems. Corresponding #GFileAttributeType
9181 * is %G_FILE_ATTRIBUTE_TYPE_UINT32.
9186 * G_FILE_ATTRIBUTE_UNIX_UID:
9188 * A key in the "unix" namespace for getting the user ID for the file.
9189 * This attribute is only available for UNIX file systems.
9190 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
9196 * @class: a valid #GFlagsClass
9198 * Casts a derived #GFlagsClass structure into a #GFlagsClass structure.
9203 * G_FLAGS_CLASS_TYPE:
9204 * @class: a #GFlagsClass
9206 * Get the type identifier from a given #GFlagsClass structure.
9208 * Returns: the #GType
9213 * G_FLAGS_CLASS_TYPE_NAME:
9214 * @class: a #GFlagsClass
9216 * Get the static type name from a given #GFlagsClass structure.
9218 * Returns: the type name.
9223 * G_IMPLEMENT_INTERFACE:
9224 * @TYPE_IFACE: The #GType of the interface to add
9225 * @iface_init: The interface init function
9227 * A convenience macro to ease interface addition in the @_C_ section
9228 * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE().
9229 * See G_DEFINE_TYPE_EXTENDED() for an example.
9231 * Note that this macro can only be used together with the G_DEFINE_TYPE_*
9232 * macros, since it depends on variable names from those macros.
9239 * G_IMPLEMENT_INTERFACE_DYNAMIC:
9240 * @TYPE_IFACE: The #GType of the interface to add
9241 * @iface_init: The interface init function
9243 * A convenience macro to ease interface addition in the @_C_ section
9244 * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED()
9247 * Note that this macro can only be used together with the
9248 * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable
9249 * names from that macro.
9256 * G_INITIALLY_UNOWNED:
9257 * @object: Object which is subject to casting.
9259 * Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*)
9260 * pointer. Depending on the current debugging level, this function may invoke
9261 * certain runtime checks to identify invalid casts.
9266 * G_INITIALLY_UNOWNED_CLASS:
9267 * @class: a valid #GInitiallyUnownedClass
9269 * Casts a derived #GInitiallyUnownedClass structure into a
9270 * #GInitiallyUnownedClass structure.
9275 * G_INITIALLY_UNOWNED_GET_CLASS:
9276 * @object: a #GInitiallyUnowned instance.
9278 * Get the class structure associated to a #GInitiallyUnowned instance.
9280 * Returns: pointer to object class structure.
9287 * Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration.
9288 * See #GError for more information on error domains.
9294 * @class: a #GEnumClass
9296 * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM
9303 * @class: a #GFlagsClass
9305 * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS
9311 * G_IS_INITIALLY_UNOWNED:
9312 * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED.
9314 * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED.
9319 * G_IS_INITIALLY_UNOWNED_CLASS:
9320 * @class: a #GInitiallyUnownedClass
9322 * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type
9323 * %G_TYPE_INITIALLY_UNOWNED or derived.
9329 * @object: Instance to check for being a %G_TYPE_OBJECT.
9331 * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT.
9336 * G_IS_OBJECT_CLASS:
9337 * @class: a #GObjectClass
9339 * Checks whether @class "is a" valid #GObjectClass structure of type
9340 * %G_TYPE_OBJECT or derived.
9346 * @pspec: a #GParamSpec
9348 * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM
9354 * G_IS_PARAM_SPEC_BOOLEAN:
9355 * @pspec: a valid #GParamSpec instance
9357 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
9359 * Returns: %TRUE on success.
9364 * G_IS_PARAM_SPEC_BOXED:
9365 * @pspec: a valid #GParamSpec instance
9367 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
9369 * Returns: %TRUE on success.
9374 * G_IS_PARAM_SPEC_CHAR:
9375 * @pspec: a valid #GParamSpec instance
9377 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
9379 * Returns: %TRUE on success.
9384 * G_IS_PARAM_SPEC_CLASS:
9385 * @pclass: a #GParamSpecClass
9387 * Checks whether @pclass "is a" valid #GParamSpecClass structure of type
9388 * %G_TYPE_PARAM or derived.
9393 * G_IS_PARAM_SPEC_DOUBLE:
9394 * @pspec: a valid #GParamSpec instance
9396 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
9398 * Returns: %TRUE on success.
9403 * G_IS_PARAM_SPEC_ENUM:
9404 * @pspec: a valid #GParamSpec instance
9406 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
9408 * Returns: %TRUE on success.
9413 * G_IS_PARAM_SPEC_FLAGS:
9414 * @pspec: a valid #GParamSpec instance
9416 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
9418 * Returns: %TRUE on success.
9423 * G_IS_PARAM_SPEC_FLOAT:
9424 * @pspec: a valid #GParamSpec instance
9426 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
9428 * Returns: %TRUE on success.
9433 * G_IS_PARAM_SPEC_GTYPE:
9434 * @pspec: a #GParamSpec
9436 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
9439 * Returns: %TRUE on success.
9444 * G_IS_PARAM_SPEC_INT:
9445 * @pspec: a valid #GParamSpec instance
9447 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
9449 * Returns: %TRUE on success.
9454 * G_IS_PARAM_SPEC_INT64:
9455 * @pspec: a valid #GParamSpec instance
9457 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
9459 * Returns: %TRUE on success.
9464 * G_IS_PARAM_SPEC_LONG:
9465 * @pspec: a valid #GParamSpec instance
9467 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
9469 * Returns: %TRUE on success.
9474 * G_IS_PARAM_SPEC_OBJECT:
9475 * @pspec: a valid #GParamSpec instance
9477 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
9479 * Returns: %TRUE on success.
9484 * G_IS_PARAM_SPEC_OVERRIDE:
9485 * @pspec: a #GParamSpec
9487 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
9490 * Returns: %TRUE on success.
9495 * G_IS_PARAM_SPEC_PARAM:
9496 * @pspec: a valid #GParamSpec instance
9498 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
9500 * Returns: %TRUE on success.
9505 * G_IS_PARAM_SPEC_POINTER:
9506 * @pspec: a valid #GParamSpec instance
9508 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
9510 * Returns: %TRUE on success.
9515 * G_IS_PARAM_SPEC_STRING:
9516 * @pspec: a valid #GParamSpec instance
9518 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
9520 * Returns: %TRUE on success.
9525 * G_IS_PARAM_SPEC_UCHAR:
9526 * @pspec: a valid #GParamSpec instance
9528 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
9530 * Returns: %TRUE on success.
9535 * G_IS_PARAM_SPEC_UINT:
9536 * @pspec: a valid #GParamSpec instance
9538 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
9540 * Returns: %TRUE on success.
9545 * G_IS_PARAM_SPEC_UINT64:
9546 * @pspec: a valid #GParamSpec instance
9548 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
9550 * Returns: %TRUE on success.
9555 * G_IS_PARAM_SPEC_ULONG:
9556 * @pspec: a valid #GParamSpec instance
9558 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
9560 * Returns: %TRUE on success.
9565 * G_IS_PARAM_SPEC_UNICHAR:
9566 * @pspec: a valid #GParamSpec instance
9568 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
9570 * Returns: %TRUE on success.
9575 * G_IS_PARAM_SPEC_VALUE_ARRAY:
9576 * @pspec: a valid #GParamSpec instance
9578 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
9580 * Returns: %TRUE on success.
9585 * G_IS_PARAM_SPEC_VARIANT:
9586 * @pspec: a #GParamSpec
9588 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
9590 * Returns: %TRUE on success
9597 * @value: A #GValue structure.
9599 * Checks if @value is a valid and initialized #GValue structure.
9601 * Returns: %TRUE on success.
9608 * Error domain for markup parsing.
9609 * Errors in this domain will be from the #GMarkupError enumeration.
9610 * See #GError for information on error domains.
9615 * G_NETWORK_MONITOR_EXTENSION_POINT_NAME:
9617 * Extension point for network status monitoring functionality.
9618 * See <link linkend="extending-gio">Extending GIO</link>.
9628 * Returns %TRUE if a #GNode is a leaf node.
9630 * (i.e. it has no children)
9632 * Returns: %TRUE if the #GNode is a leaf node
9640 * Returns %TRUE if a #GNode is the root of a tree.
9642 * (i.e. it has no parent or siblings)
9644 * Returns: %TRUE if the #GNode is the root of a tree
9650 * @object: Object which is subject to casting.
9652 * Casts a #GObject or derived pointer into a (GObject*) pointer.
9653 * Depending on the current debugging level, this function may invoke
9654 * certain runtime checks to identify invalid casts.
9660 * @class: a valid #GObjectClass
9662 * Casts a derived #GObjectClass structure into a #GObjectClass structure.
9667 * G_OBJECT_CLASS_NAME:
9668 * @class: a valid #GObjectClass
9670 * Return the name of a class structure's type.
9672 * should not be freed.
9674 * Returns: Type name of @class. The string is owned by the type system and
9679 * G_OBJECT_CLASS_TYPE:
9680 * @class: a valid #GObjectClass
9682 * Get the type id of a class structure.
9684 * Returns: Type id of @class.
9689 * G_OBJECT_GET_CLASS:
9690 * @object: a #GObject instance.
9692 * Get the class structure associated to a #GObject instance.
9694 * Returns: pointer to object class structure.
9700 * @object: Object to return the type id for.
9702 * Get the type id of an object.
9704 * Returns: Type id of @object.
9709 * G_OBJECT_TYPE_NAME:
9710 * @object: Object to return the type name for.
9712 * Get the name of an object's type.
9714 * should not be freed.
9716 * Returns: Type name of @object. The string is owned by the type system and
9721 * G_OBJECT_WARN_INVALID_PROPERTY_ID:
9722 * @object: the #GObject on which set_property() or get_property() was called
9723 * @property_id: the numeric id of the property
9724 * @pspec: the #GParamSpec of the property
9726 * This macro should be used to emit a standard warning about unexpected
9727 * properties in set_property() and get_property() implementations.
9734 * Error domain for option parsing. Errors in this domain will
9735 * be from the #GOptionError enumeration. See #GError for information on
9741 * G_OPTION_REMAINING:
9743 * If a long option in the main group has this name, it is not treated as a
9744 * regular option. Instead it collects all non-option arguments which would
9745 * otherwise be left in <literal>argv</literal>. The option must be of type
9746 * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY
9747 * or %G_OPTION_ARG_FILENAME_ARRAY.
9750 * Using #G_OPTION_REMAINING instead of simply scanning <literal>argv</literal>
9751 * for leftover arguments has the advantage that GOption takes care of
9752 * necessary encoding conversions for strings or filenames.
9761 * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
9766 * G_PARAM_READWRITE:
9768 * #GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.
9774 * @pspec: a valid #GParamSpec
9776 * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into
9777 * a #GParamSpec object.
9782 * G_PARAM_SPEC_BOOLEAN:
9783 * @pspec: a valid #GParamSpec instance
9785 * Cast a #GParamSpec instance into a #GParamSpecBoolean.
9790 * G_PARAM_SPEC_BOXED:
9791 * @pspec: a valid #GParamSpec instance
9793 * Cast a #GParamSpec instance into a #GParamSpecBoxed.
9798 * G_PARAM_SPEC_CHAR:
9799 * @pspec: a valid #GParamSpec instance
9801 * Cast a #GParamSpec instance into a #GParamSpecChar.
9806 * G_PARAM_SPEC_CLASS:
9807 * @pclass: a valid #GParamSpecClass
9809 * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure.
9814 * G_PARAM_SPEC_DOUBLE:
9815 * @pspec: a valid #GParamSpec instance
9817 * Cast a #GParamSpec instance into a #GParamSpecDouble.
9822 * G_PARAM_SPEC_ENUM:
9823 * @pspec: a valid #GParamSpec instance
9825 * Cast a #GParamSpec instance into a #GParamSpecEnum.
9830 * G_PARAM_SPEC_FLAGS:
9831 * @pspec: a valid #GParamSpec instance
9833 * Cast a #GParamSpec instance into a #GParamSpecFlags.
9838 * G_PARAM_SPEC_FLOAT:
9839 * @pspec: a valid #GParamSpec instance
9841 * Cast a #GParamSpec instance into a #GParamSpecFloat.
9846 * G_PARAM_SPEC_GET_CLASS:
9847 * @pspec: a valid #GParamSpec
9849 * Retrieves the #GParamSpecClass of a #GParamSpec.
9854 * G_PARAM_SPEC_GTYPE:
9855 * @pspec: a #GParamSpec
9857 * Casts a #GParamSpec into a #GParamSpecGType.
9865 * @pspec: a valid #GParamSpec instance
9867 * Cast a #GParamSpec instance into a #GParamSpecInt.
9872 * G_PARAM_SPEC_INT64:
9873 * @pspec: a valid #GParamSpec instance
9875 * Cast a #GParamSpec instance into a #GParamSpecInt64.
9880 * G_PARAM_SPEC_LONG:
9881 * @pspec: a valid #GParamSpec instance
9883 * Cast a #GParamSpec instance into a #GParamSpecLong.
9888 * G_PARAM_SPEC_OBJECT:
9889 * @pspec: a valid #GParamSpec instance
9891 * Casts a #GParamSpec instance into a #GParamSpecObject.
9896 * G_PARAM_SPEC_OVERRIDE:
9897 * @pspec: a #GParamSpec
9899 * Casts a #GParamSpec into a #GParamSpecOverride.
9906 * G_PARAM_SPEC_PARAM:
9907 * @pspec: a valid #GParamSpec instance
9909 * Casts a #GParamSpec instance into a #GParamSpecParam.
9914 * G_PARAM_SPEC_POINTER:
9915 * @pspec: a valid #GParamSpec instance
9917 * Casts a #GParamSpec instance into a #GParamSpecPointer.
9922 * G_PARAM_SPEC_STRING:
9923 * @pspec: a valid #GParamSpec instance
9925 * Casts a #GParamSpec instance into a #GParamSpecString.
9930 * G_PARAM_SPEC_TYPE:
9931 * @pspec: a valid #GParamSpec
9933 * Retrieves the #GType of this @pspec.
9938 * G_PARAM_SPEC_TYPE_NAME:
9939 * @pspec: a valid #GParamSpec
9941 * Retrieves the #GType name of this @pspec.
9946 * G_PARAM_SPEC_UCHAR:
9947 * @pspec: a valid #GParamSpec instance
9949 * Cast a #GParamSpec instance into a #GParamSpecUChar.
9954 * G_PARAM_SPEC_UINT:
9955 * @pspec: a valid #GParamSpec instance
9957 * Cast a #GParamSpec instance into a #GParamSpecUInt.
9962 * G_PARAM_SPEC_UINT64:
9963 * @pspec: a valid #GParamSpec instance
9965 * Cast a #GParamSpec instance into a #GParamSpecUInt64.
9970 * G_PARAM_SPEC_ULONG:
9971 * @pspec: a valid #GParamSpec instance
9973 * Cast a #GParamSpec instance into a #GParamSpecULong.
9978 * G_PARAM_SPEC_UNICHAR:
9979 * @pspec: a valid #GParamSpec instance
9981 * Cast a #GParamSpec instance into a #GParamSpecUnichar.
9986 * G_PARAM_SPEC_VALUE_ARRAY:
9987 * @pspec: a valid #GParamSpec instance
9989 * Cast a #GParamSpec instance into a #GParamSpecValueArray.
9994 * G_PARAM_SPEC_VALUE_TYPE:
9995 * @pspec: a valid #GParamSpec
9997 * Retrieves the #GType to initialize a #GValue for this parameter.
10002 * G_PARAM_SPEC_VARIANT:
10003 * @pspec: a #GParamSpec
10005 * Casts a #GParamSpec into a #GParamSpecVariant.
10012 * G_PARAM_STATIC_STRINGS:
10014 * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
10021 * G_PARAM_USER_SHIFT:
10023 * Minimum shift count to be used for user defined flags, to be stored in
10024 * #GParamSpec.flags. The maximum allowed is 30 + G_PARAM_USER_SHIFT.
10029 * G_PRIORITY_DEFAULT:
10031 * Use this for default priority event sources.
10033 * In GLib this priority is used when adding timeout functions
10034 * with g_timeout_add(). In GDK this priority is used for events
10035 * from the X server.
10040 * G_PRIORITY_DEFAULT_IDLE:
10042 * Use this for default priority idle functions.
10044 * In GLib this priority is used when adding idle functions with
10052 * Use this for high priority event sources.
10054 * It is not used within GLib or GTK+.
10059 * G_PRIORITY_HIGH_IDLE:
10061 * Use this for high priority idle functions.
10063 * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations,
10064 * and #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is
10065 * done to ensure that any pending resizes are processed before any
10066 * pending redraws, so that widgets are not redrawn twice unnecessarily.)
10073 * Use this for very low priority background tasks.
10075 * It is not used within GLib or GTK+.
10080 * G_PROXY_EXTENSION_POINT_NAME:
10082 * Extension point for proxy functionality.
10083 * See <link linkend="extending-gio">Extending GIO</link>.
10090 * G_PROXY_RESOLVER_EXTENSION_POINT_NAME:
10092 * Extension point for proxy resolving functionality.
10093 * See <link linkend="extending-gio">Extending GIO</link>.
10100 * A statically-allocated #GQueue must be initialized with this
10101 * macro before it can be used. This macro can be used to initialize
10102 * a variable, but it cannot be assigned to a variable. In that case
10103 * you have to use g_queue_init().
10106 * GQueue my_queue = G_QUEUE_INIT;
10116 * Error domain for regular expressions. Errors in this domain will be
10117 * from the #GRegexError enumeration. See #GError for information on
10125 * G_RESOLVER_ERROR:
10127 * Error domain for #GResolver. Errors in this domain will be from the
10128 * #GResolverError enumeration. See #GError for more information on
10134 * G_SETTINGS_BACKEND_EXTENSION_POINT_NAME:
10136 * Extension point for #GSettingsBackend functionality.
10141 * G_SIGNAL_FLAGS_MASK:
10143 * A mask for all #GSignalFlags bits.
10148 * G_SIGNAL_MATCH_MASK:
10150 * A mask for all #GSignalMatchType bits.
10155 * G_SIGNAL_TYPE_STATIC_SCOPE:
10157 * This macro flags signal argument types for which the signal system may
10158 * assume that instances thereof remain persistent across all signal emissions
10159 * they are used in. This is only useful for non ref-counted, value-copy types.
10161 * To flag a signal argument in this way, add
10162 * <literal>| G_SIGNAL_TYPE_STATIC_SCOPE</literal> to the corresponding argument
10163 * of g_signal_new().
10165 * g_signal_new ("size_request",
10166 * G_TYPE_FROM_CLASS (gobject_class),
10167 * G_SIGNAL_RUN_FIRST,
10168 * G_STRUCT_OFFSET (GtkWidgetClass, size_request),
10170 * _gtk_marshal_VOID__BOXED,
10172 * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
10178 * G_SOURCE_CONTINUE:
10180 * Use this macro as the return value of a #GSourceFunc to leave
10181 * the #GSource in the main loop.
10190 * Use this macro as the return value of a #GSourceFunc to remove
10191 * the #GSource from the main loop.
10200 * Error domain for spawning processes. Errors in this domain will
10201 * be from the #GSpawnError enumeration. See #GError for information on
10209 * Evaluates to a time span of one day.
10216 * G_TIME_SPAN_HOUR:
10218 * Evaluates to a time span of one hour.
10225 * G_TIME_SPAN_MILLISECOND:
10227 * Evaluates to a time span of one millisecond.
10234 * G_TIME_SPAN_MINUTE:
10236 * Evaluates to a time span of one minute.
10243 * G_TIME_SPAN_SECOND:
10245 * Evaluates to a time span of one second.
10252 * G_TLS_BACKEND_EXTENSION_POINT_NAME:
10254 * Extension point for TLS functionality via #GTlsBackend.
10255 * See <link linkend="extending-gio">Extending GIO</link>.
10260 * G_TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT:
10262 * The purpose used to verify the client certificate in a TLS connection.
10263 * Used by TLS servers.
10268 * G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER:
10270 * The purpose used to verify the server certificate in a TLS connection. This
10271 * is the most common purpose in use. Used by TLS clients.
10278 * Error domain for TLS. Errors in this domain will be from the
10279 * #GTlsError enumeration. See #GError for more information on error
10287 * The #GType for a boxed type holding a #GArray reference.
10296 * The fundamental type corresponding to #gboolean.
10303 * The fundamental type from which all boxed types are derived.
10310 * The #GType for #GBytes.
10317 * G_TYPE_BYTE_ARRAY:
10319 * The #GType for a boxed type holding a #GByteArray reference.
10328 * The fundamental type corresponding to #gchar.
10329 * The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
10330 * This may or may not be the same type a the C type "gchar".
10335 * G_TYPE_CHECK_CLASS_CAST:
10336 * @g_class: Location of a #GTypeClass structure.
10337 * @g_type: The type to be returned.
10338 * @c_type: The corresponding C type of class structure of @g_type.
10340 * Checks that @g_class is a class structure of the type identified by @g_type
10341 * and issues a warning if this is not the case. Returns @g_class casted
10342 * to a pointer to @c_type.
10344 * This macro should only be used in type implementations.
10349 * G_TYPE_CHECK_CLASS_TYPE:
10350 * @g_class: Location of a #GTypeClass structure.
10351 * @g_type: The type to be checked.
10353 * Checks if @g_class is a class structure of the type identified by
10356 * This macro should only be used in type implementations.
10358 * Returns: %TRUE on success.
10363 * G_TYPE_CHECK_INSTANCE:
10364 * @instance: Location of a #GTypeInstance structure.
10366 * Checks if @instance is a valid #GTypeInstance structure,
10367 * otherwise issues a warning and returns %FALSE.
10369 * This macro should only be used in type implementations.
10371 * Returns: %TRUE on success.
10376 * G_TYPE_CHECK_INSTANCE_CAST:
10377 * @instance: Location of a #GTypeInstance structure.
10378 * @g_type: The type to be returned.
10379 * @c_type: The corresponding C type of @g_type.
10381 * Checks that @instance is an instance of the type identified by @g_type
10382 * and issues a warning if this is not the case. Returns @instance casted
10383 * to a pointer to @c_type.
10385 * This macro should only be used in type implementations.
10390 * G_TYPE_CHECK_INSTANCE_TYPE:
10391 * @instance: Location of a #GTypeInstance structure.
10392 * @g_type: The type to be checked
10394 * Checks if @instance is an instance of the type identified by @g_type.
10396 * This macro should only be used in type implementations.
10398 * Returns: %TRUE on success.
10403 * G_TYPE_CHECK_VALUE:
10404 * @value: a #GValue
10406 * Checks if @value has been initialized to hold values
10409 * This macro should only be used in type implementations.
10411 * Returns: %TRUE on success.
10416 * G_TYPE_CHECK_VALUE_TYPE:
10417 * @value: a #GValue
10418 * @g_type: The type to be checked.
10420 * Checks if @value has been initialized to hold values
10423 * This macro should only be used in type implementations.
10425 * Returns: %TRUE on success.
10430 * G_TYPE_CLASS_GET_PRIVATE:
10431 * @klass: the class of a type deriving from @private_type.
10432 * @g_type: the type identifying which private data to retrieve.
10433 * @c_type: The C type for the private structure.
10435 * Gets the private class structure for a particular type.
10436 * The private structure must have been registered in the
10437 * get_type() function with g_type_add_class_private().
10439 * This macro should only be used in type implementations.
10442 * Returns: a pointer to the private data structure.
10449 * The #GType for #GClosure.
10456 * The #GType for #GDate.
10461 * G_TYPE_DATE_TIME:
10463 * The #GType for a boxed type holding a #GDateTime.
10470 * G_TYPE_DBUS_ANNOTATION_INFO:
10472 * The #GType for a boxed type holding a #GDBusAnnotationInfo.
10479 * G_TYPE_DBUS_ARG_INFO:
10481 * The #GType for a boxed type holding a #GDBusArgInfo.
10488 * G_TYPE_DBUS_INTERFACE_INFO:
10490 * The #GType for a boxed type holding a #GDBusInterfaceInfo.
10497 * G_TYPE_DBUS_METHOD_INFO:
10499 * The #GType for a boxed type holding a #GDBusMethodInfo.
10506 * G_TYPE_DBUS_NODE_INFO:
10508 * The #GType for a boxed type holding a #GDBusNodeInfo.
10515 * G_TYPE_DBUS_PROPERTY_INFO:
10517 * The #GType for a boxed type holding a #GDBusPropertyInfo.
10524 * G_TYPE_DBUS_SIGNAL_INFO:
10526 * The #GType for a boxed type holding a #GDBusSignalInfo.
10535 * The fundamental type corresponding to #gdouble.
10542 * The fundamental type from which all enumeration types are derived.
10549 * The #GType for a boxed type holding a #GError.
10558 * The fundamental type from which all flags types are derived.
10563 * G_TYPE_FLAG_RESERVED_ID_BIT:
10565 * A bit in the type number that's supposed to be left untouched.
10572 * The fundamental type corresponding to #gfloat.
10577 * G_TYPE_FROM_CLASS:
10578 * @g_class: Location of a valid #GTypeClass structure.
10580 * Get the type identifier from a given @class structure.
10582 * This macro should only be used in type implementations.
10584 * Returns: the #GType
10589 * G_TYPE_FROM_INSTANCE:
10590 * @instance: Location of a valid #GTypeInstance structure.
10592 * Get the type identifier from a given @instance structure.
10594 * This macro should only be used in type implementations.
10596 * Returns: the #GType
10601 * G_TYPE_FROM_INTERFACE:
10602 * @g_iface: Location of a valid #GTypeInterface structure.
10604 * Get the type identifier from a given @interface structure.
10606 * This macro should only be used in type implementations.
10608 * Returns: the #GType
10613 * G_TYPE_FUNDAMENTAL:
10614 * @type: A #GType value.
10616 * The fundamental type which is the ancestor of @type.
10617 * Fundamental types are types that serve as ultimate bases for the derived types,
10618 * thus they are the roots of distinct inheritance hierarchies.
10623 * G_TYPE_FUNDAMENTAL_MAX:
10625 * An integer constant that represents the number of identifiers reserved
10626 * for types that are assigned at compile-time.
10631 * G_TYPE_FUNDAMENTAL_SHIFT:
10633 * Shift value used in converting numbers to type IDs.
10640 * The #GType for #GString.
10647 * The type for #GType.
10652 * G_TYPE_HASH_TABLE:
10654 * The #GType for a boxed type holding a #GHashTable reference.
10661 * G_TYPE_HAS_VALUE_TABLE:
10662 * @type: A #GType value.
10664 * Checks if @type has a #GTypeValueTable.
10666 * Returns: %TRUE on success.
10671 * G_TYPE_INITIALLY_UNOWNED:
10673 * The type for #GInitiallyUnowned.
10678 * G_TYPE_INSTANCE_GET_CLASS:
10679 * @instance: Location of the #GTypeInstance structure.
10680 * @g_type: The #GType of the class to be returned.
10681 * @c_type: The C type of the class structure.
10683 * Get the class structure of a given @instance, casted
10684 * to a specified ancestor type @g_type of the instance.
10686 * Note that while calling a GInstanceInitFunc(), the class pointer gets
10687 * modified, so it might not always return the expected pointer.
10689 * This macro should only be used in type implementations.
10691 * Returns: a pointer to the class structure
10696 * G_TYPE_INSTANCE_GET_INTERFACE:
10697 * @instance: Location of the #GTypeInstance structure.
10698 * @g_type: The #GType of the interface to be returned.
10699 * @c_type: The C type of the interface structure.
10701 * Get the interface structure for interface @g_type of a given @instance.
10703 * This macro should only be used in type implementations.
10705 * Returns: a pointer to the interface structure
10710 * G_TYPE_INSTANCE_GET_PRIVATE:
10711 * @instance: the instance of a type deriving from @private_type.
10712 * @g_type: the type identifying which private data to retrieve.
10713 * @c_type: The C type for the private structure.
10715 * Gets the private structure for a particular type.
10716 * The private structure must have been registered in the
10717 * class_init function with g_type_class_add_private().
10719 * This macro should only be used in type implementations.
10722 * Returns: a pointer to the private data structure.
10729 * The fundamental type corresponding to #gint.
10736 * The fundamental type corresponding to #gint64.
10741 * G_TYPE_INTERFACE:
10743 * The fundamental type from which all interfaces are derived.
10750 * An invalid #GType used as error return value in some functions which return
10756 * G_TYPE_IO_CHANNEL:
10758 * The #GType for #GIOChannel.
10763 * G_TYPE_IO_CONDITION:
10765 * The #GType for #GIOCondition.
10770 * G_TYPE_IS_ABSTRACT:
10771 * @type: A #GType value.
10773 * Checks if @type is an abstract type. An abstract type cannot be
10774 * instantiated and is normally used as an abstract base class for
10777 * Returns: %TRUE on success.
10782 * G_TYPE_IS_CLASSED:
10783 * @type: A #GType value.
10785 * Checks if @type is a classed type.
10787 * Returns: %TRUE on success.
10792 * G_TYPE_IS_DEEP_DERIVABLE:
10793 * @type: A #GType value.
10795 * Checks if @type is a deep derivable type. A deep derivable type
10796 * can be used as the base class of a deep (multi-level) class hierarchy.
10798 * Returns: %TRUE on success.
10803 * G_TYPE_IS_DERIVABLE:
10804 * @type: A #GType value.
10806 * Checks if @type is a derivable type. A derivable type can
10807 * be used as the base class of a flat (single-level) class hierarchy.
10809 * Returns: %TRUE on success.
10814 * G_TYPE_IS_DERIVED:
10815 * @type: A #GType value.
10817 * Checks if @type is derived (or in object-oriented terminology:
10818 * inherited) from another type (this holds true for all non-fundamental
10821 * Returns: %TRUE on success.
10827 * @type: a #GType ID.
10829 * Checks whether @type "is a" %G_TYPE_ENUM.
10831 * Returns: %TRUE if @type "is a" %G_TYPE_ENUM.
10837 * @type: a #GType ID.
10839 * Checks whether @type "is a" %G_TYPE_FLAGS.
10841 * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS.
10846 * G_TYPE_IS_FUNDAMENTAL:
10847 * @type: A #GType value.
10849 * Checks if @type is a fundamental type.
10851 * Returns: %TRUE on success.
10856 * G_TYPE_IS_INSTANTIATABLE:
10857 * @type: A #GType value.
10859 * Checks if @type can be instantiated. Instantiation is the
10860 * process of creating an instance (object) of this type.
10862 * Returns: %TRUE on success.
10867 * G_TYPE_IS_INTERFACE:
10868 * @type: A #GType value.
10870 * Checks if @type is an interface type.
10871 * An interface type provides a pure API, the implementation
10872 * of which is provided by another type (which is then said to conform
10873 * to the interface). GLib interfaces are somewhat analogous to Java
10874 * interfaces and C++ classes containing only pure virtual functions,
10875 * with the difference that GType interfaces are not derivable (but see
10876 * g_type_interface_add_prerequisite() for an alternative).
10878 * Returns: %TRUE on success.
10883 * G_TYPE_IS_OBJECT:
10884 * @type: Type id to check
10886 * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it.
10888 * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT.
10894 * @type: a #GType ID
10896 * Checks whether @type "is a" %G_TYPE_PARAM.
10902 * @type: A #GType value.
10904 * Checks whether the passed in type ID can be used for g_value_init().
10905 * That is, this macro checks whether this type provides an implementation
10906 * of the #GTypeValueTable functions required for a type to create a #GValue of.
10908 * Returns: Whether @type is suitable as a #GValue type.
10913 * G_TYPE_IS_VALUE_ABSTRACT:
10914 * @type: A #GType value.
10916 * Checks if @type is an abstract value type. An abstract value type introduces
10917 * a value table, but can't be used for g_value_init() and is normally used as
10918 * an abstract base type for derived value types.
10920 * Returns: %TRUE on success.
10925 * G_TYPE_IS_VALUE_TYPE:
10926 * @type: A #GType value.
10928 * Checks if @type is a value type and can be used with g_value_init().
10930 * Returns: %TRUE on success.
10937 * The #GType for a boxed type holding a #GKeyFile.
10946 * The fundamental type corresponding to #glong.
10951 * G_TYPE_MAIN_CONTEXT:
10953 * The #GType for a boxed type holding a #GMainContext.
10960 * G_TYPE_MAIN_LOOP:
10962 * The #GType for a boxed type holding a #GMainLoop.
10969 * G_TYPE_MAKE_FUNDAMENTAL:
10970 * @x: the fundamental type number.
10972 * Get the type ID for the fundamental type number @x.
10973 * Use g_type_fundamental_next() instead of this macro to create new fundamental
10976 * Returns: the GType
10981 * G_TYPE_MATCH_INFO:
10983 * The #GType for a boxed type holding a #GMatchInfo reference.
10992 * A fundamental type which is used as a replacement for the C
10993 * <literal>void</literal> return type.
11000 * The fundamental type for #GObject.
11007 * The fundamental type from which all #GParamSpec types are derived.
11012 * G_TYPE_PARAM_BOOLEAN:
11014 * The #GType of #GParamSpecBoolean.
11019 * G_TYPE_PARAM_BOXED:
11021 * The #GType of #GParamSpecBoxed.
11026 * G_TYPE_PARAM_CHAR:
11028 * The #GType of #GParamSpecChar.
11033 * G_TYPE_PARAM_DOUBLE:
11035 * The #GType of #GParamSpecDouble.
11040 * G_TYPE_PARAM_ENUM:
11042 * The #GType of #GParamSpecEnum.
11047 * G_TYPE_PARAM_FLAGS:
11049 * The #GType of #GParamSpecFlags.
11054 * G_TYPE_PARAM_FLOAT:
11056 * The #GType of #GParamSpecFloat.
11061 * G_TYPE_PARAM_GTYPE:
11063 * The #GType of #GParamSpecGType.
11070 * G_TYPE_PARAM_INT:
11072 * The #GType of #GParamSpecInt.
11077 * G_TYPE_PARAM_INT64:
11079 * The #GType of #GParamSpecInt64.
11084 * G_TYPE_PARAM_LONG:
11086 * The #GType of #GParamSpecLong.
11091 * G_TYPE_PARAM_OBJECT:
11093 * The #GType of #GParamSpecObject.
11098 * G_TYPE_PARAM_OVERRIDE:
11100 * The #GType of #GParamSpecOverride.
11107 * G_TYPE_PARAM_PARAM:
11109 * The #GType of #GParamSpecParam.
11114 * G_TYPE_PARAM_POINTER:
11116 * The #GType of #GParamSpecPointer.
11121 * G_TYPE_PARAM_STRING:
11123 * The #GType of #GParamSpecString.
11128 * G_TYPE_PARAM_UCHAR:
11130 * The #GType of #GParamSpecUChar.
11135 * G_TYPE_PARAM_UINT:
11137 * The #GType of #GParamSpecUInt.
11142 * G_TYPE_PARAM_UINT64:
11144 * The #GType of #GParamSpecUInt64.
11149 * G_TYPE_PARAM_ULONG:
11151 * The #GType of #GParamSpecULong.
11156 * G_TYPE_PARAM_UNICHAR:
11158 * The #GType of #GParamSpecUnichar.
11163 * G_TYPE_PARAM_VALUE_ARRAY:
11165 * The #GType of #GParamSpecValueArray.
11170 * G_TYPE_PARAM_VARIANT:
11172 * The #GType of #GParamSpecVariant.
11181 * The fundamental type corresponding to #gpointer.
11186 * G_TYPE_PTR_ARRAY:
11188 * The #GType for a boxed type holding a #GPtrArray reference.
11197 * The #GType for a boxed type holding a #GRegex reference.
11204 * G_TYPE_RESERVED_BSE_FIRST:
11206 * First fundamental type number to create a new fundamental type id with
11207 * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
11212 * G_TYPE_RESERVED_BSE_LAST:
11214 * Last fundamental type number reserved for BSE.
11219 * G_TYPE_RESERVED_GLIB_FIRST:
11221 * First fundamental type number to create a new fundamental type id with
11222 * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
11227 * G_TYPE_RESERVED_GLIB_LAST:
11229 * Last fundamental type number reserved for GLib.
11234 * G_TYPE_RESERVED_USER_FIRST:
11236 * First available fundamental type number to create new fundamental
11237 * type id with G_TYPE_MAKE_FUNDAMENTAL().
11242 * G_TYPE_SETTINGS_SCHEMA:
11244 * A boxed #GType corresponding to #GSettingsSchema.
11251 * G_TYPE_SETTINGS_SCHEMA_SOURCE:
11253 * A boxed #GType corresponding to #GSettingsSchemaSource.
11262 * The #GType for a boxed type holding a #GSource.
11271 * The fundamental type corresponding to nul-terminated C strings.
11278 * The #GType for a boxed type holding a %NULL-terminated array of strings.
11280 * The code fragments in the following example show the use of a property of
11281 * type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
11282 * and g_object_get().
11285 * g_object_class_install_property (object_class,
11287 * g_param_spec_boxed ("authors",
11289 * _("List of authors"),
11291 * G_PARAM_READWRITE));
11293 * gchar *authors[] = { "Owen", "Tim", NULL };
11294 * g_object_set (obj, "authors", authors, NULL);
11296 * gchar *writers[];
11297 * g_object_get (obj, "authors", &writers, NULL);
11298 * /* do something with writers */
11299 * g_strfreev (writers);
11309 * The fundamental type corresponding to #guchar.
11316 * The fundamental type corresponding to #guint.
11323 * The fundamental type corresponding to #guint64.
11330 * The fundamental type corresponding to #gulong.
11337 * The type ID of the "GValue" type which is a boxed type,
11338 * used to pass around pointers to GValues.
11343 * G_TYPE_VALUE_ARRAY:
11345 * The type ID of the "GValueArray" type which is a boxed type,
11346 * used to pass around pointers to GValueArrays.
11353 * The fundamental type corresponding to #GVariant.
11355 * All floating #GVariant instances passed through the #GType system are
11358 * Note that callbacks in closures, and signal handlers
11359 * for signals of return type %G_TYPE_VARIANT, must never return floating
11362 * Note: GLib 2.24 did include a boxed type with this name. It was replaced
11363 * with this fundamental type in 2.26.
11370 * G_TYPE_VARIANT_BUILDER:
11372 * The #GType for a boxed type holding a #GVariantBuilder.
11379 * G_TYPE_VARIANT_TYPE:
11381 * The #GType for a boxed type holding a #GVariantType.
11388 * G_UNICHAR_MAX_DECOMPOSITION_LENGTH:
11390 * The maximum length (in codepoints) of a compatibility or canonical
11391 * decomposition of a single Unicode character.
11393 * This is as defined by Unicode 6.1.
11400 * G_UNICODE_COMBINING_MARK:
11402 * Older name for %G_UNICODE_SPACING_MARK.
11404 * Deprecated: 2.30: Use %G_UNICODE_SPACING_MARK.
11409 * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH:
11411 * Allowed characters in a path. Includes "!$&'()*+,;=:@/".
11416 * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT:
11418 * Allowed characters in path elements. Includes "!$&'()*+,;=:@".
11423 * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO:
11425 * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".
11430 * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS:
11432 * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".
11437 * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS:
11439 * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
11445 * @value: A #GValue structure.
11446 * @type: A #GType value.
11448 * Checks if @value holds (or contains) a value of @type.
11449 * This macro will also check for @value != %NULL and issue a
11450 * warning if the check fails.
11452 * Returns: %TRUE if @value holds the @type.
11457 * G_VALUE_HOLDS_BOOLEAN:
11458 * @value: a valid #GValue structure
11460 * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN.
11462 * Returns: %TRUE on success.
11467 * G_VALUE_HOLDS_BOXED:
11468 * @value: a valid #GValue structure
11470 * Checks whether the given #GValue can hold values derived
11471 * from type %G_TYPE_BOXED.
11473 * Returns: %TRUE on success.
11478 * G_VALUE_HOLDS_CHAR:
11479 * @value: a valid #GValue structure
11481 * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR.
11483 * Returns: %TRUE on success.
11488 * G_VALUE_HOLDS_DOUBLE:
11489 * @value: a valid #GValue structure
11491 * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE.
11493 * Returns: %TRUE on success.
11498 * G_VALUE_HOLDS_ENUM:
11499 * @value: a valid #GValue structure
11501 * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM.
11503 * Returns: %TRUE on success.
11508 * G_VALUE_HOLDS_FLAGS:
11509 * @value: a valid #GValue structure
11511 * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS.
11513 * Returns: %TRUE on success.
11518 * G_VALUE_HOLDS_FLOAT:
11519 * @value: a valid #GValue structure
11521 * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT.
11523 * Returns: %TRUE on success.
11528 * G_VALUE_HOLDS_GTYPE:
11529 * @value: a valid #GValue structure
11531 * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE.
11534 * Returns: %TRUE on success.
11539 * G_VALUE_HOLDS_INT:
11540 * @value: a valid #GValue structure
11542 * Checks whether the given #GValue can hold values of type %G_TYPE_INT.
11544 * Returns: %TRUE on success.
11549 * G_VALUE_HOLDS_INT64:
11550 * @value: a valid #GValue structure
11552 * Checks whether the given #GValue can hold values of type %G_TYPE_INT64.
11554 * Returns: %TRUE on success.
11559 * G_VALUE_HOLDS_LONG:
11560 * @value: a valid #GValue structure
11562 * Checks whether the given #GValue can hold values of type %G_TYPE_LONG.
11564 * Returns: %TRUE on success.
11569 * G_VALUE_HOLDS_OBJECT:
11570 * @value: a valid #GValue structure
11572 * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT.
11574 * Returns: %TRUE on success.
11579 * G_VALUE_HOLDS_PARAM:
11580 * @value: a valid #GValue structure
11582 * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM.
11584 * Returns: %TRUE on success.
11589 * G_VALUE_HOLDS_POINTER:
11590 * @value: a valid #GValue structure
11592 * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER.
11594 * Returns: %TRUE on success.
11599 * G_VALUE_HOLDS_STRING:
11600 * @value: a valid #GValue structure
11602 * Checks whether the given #GValue can hold values of type %G_TYPE_STRING.
11604 * Returns: %TRUE on success.
11609 * G_VALUE_HOLDS_UCHAR:
11610 * @value: a valid #GValue structure
11612 * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR.
11614 * Returns: %TRUE on success.
11619 * G_VALUE_HOLDS_UINT:
11620 * @value: a valid #GValue structure
11622 * Checks whether the given #GValue can hold values of type %G_TYPE_UINT.
11624 * Returns: %TRUE on success.
11629 * G_VALUE_HOLDS_UINT64:
11630 * @value: a valid #GValue structure
11632 * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64.
11634 * Returns: %TRUE on success.
11639 * G_VALUE_HOLDS_ULONG:
11640 * @value: a valid #GValue structure
11642 * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG.
11644 * Returns: %TRUE on success.
11649 * G_VALUE_HOLDS_VARIANT:
11650 * @value: a valid #GValue structure
11652 * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT.
11654 * Returns: %TRUE on success.
11662 * A #GValue must be initialized before it can be used.
11663 * This macro can be used as initializer instead of an explicit
11664 * <literal>{ 0 }</literal> when declaring a variable,
11665 * but it cannot be assigned to a variable.
11668 * GValue value = G_VALUE_INIT;
11676 * G_VALUE_NOCOPY_CONTENTS:
11678 * If passed to G_VALUE_COLLECT(), allocated data won't be copied
11679 * but used verbatim. This does not affect ref-counted types like
11686 * @value: A #GValue structure.
11688 * Get the type identifier of @value.
11690 * Returns: the #GType.
11695 * G_VALUE_TYPE_NAME:
11696 * @value: A #GValue structure.
11698 * Gets the the type name of @value.
11700 * Returns: the type name.
11706 * @type_string: a well-formed #GVariantType type string
11708 * Converts a string to a const #GVariantType. Depending on the
11709 * current debugging level, this function may perform a runtime check
11710 * to ensure that @string is a valid GVariant type string.
11712 * It is always a programmer error to use this macro with an invalid
11713 * type string. If in doubt, use g_variant_type_string_is_valid() to
11714 * check if the string is valid.
11721 * G_VARIANT_TYPE_ANY:
11723 * An indefinite type that is a supertype of every type (including
11729 * G_VARIANT_TYPE_ARRAY:
11731 * An indefinite type that is a supertype of every array type.
11736 * G_VARIANT_TYPE_BASIC:
11738 * An indefinite type that is a supertype of every basic (ie:
11739 * non-container) type.
11744 * G_VARIANT_TYPE_BOOLEAN:
11746 * The type of a value that can be either %TRUE or %FALSE.
11751 * G_VARIANT_TYPE_BYTE:
11753 * The type of an integer value that can range from 0 to 255.
11758 * G_VARIANT_TYPE_BYTESTRING:
11760 * The type of an array of bytes. This type is commonly used to pass
11761 * around strings that may not be valid utf8. In that case, the
11762 * convention is that the nul terminator character should be included as
11763 * the last character in the array.
11768 * G_VARIANT_TYPE_BYTESTRING_ARRAY:
11770 * The type of an array of byte strings (an array of arrays of bytes).
11775 * G_VARIANT_TYPE_DICTIONARY:
11777 * An indefinite type that is a supertype of every dictionary type --
11778 * that is, any array type that has an element type equal to any
11779 * dictionary entry type.
11784 * G_VARIANT_TYPE_DICT_ENTRY:
11786 * An indefinite type that is a supertype of every dictionary entry
11792 * G_VARIANT_TYPE_DOUBLE:
11794 * The type of a double precision IEEE754 floating point number.
11795 * These guys go up to about 1.80e308 (plus and minus) but miss out on
11796 * some numbers in between. In any case, that's far greater than the
11797 * estimated number of fundamental particles in the observable
11803 * G_VARIANT_TYPE_HANDLE:
11805 * The type of a 32bit signed integer value, that by convention, is used
11806 * as an index into an array of file descriptors that are sent alongside
11809 * If you are not interacting with D-Bus, then there is no reason to make
11810 * use of this type.
11815 * G_VARIANT_TYPE_INT16:
11817 * The type of an integer value that can range from -32768 to 32767.
11822 * G_VARIANT_TYPE_INT32:
11824 * The type of an integer value that can range from -2147483648 to
11830 * G_VARIANT_TYPE_INT64:
11832 * The type of an integer value that can range from
11833 * -9223372036854775808 to 9223372036854775807.
11838 * G_VARIANT_TYPE_MAYBE:
11840 * An indefinite type that is a supertype of every maybe type.
11845 * G_VARIANT_TYPE_OBJECT_PATH:
11847 * The type of a D-Bus object reference. These are strings of a
11848 * specific format used to identify objects at a given destination on
11851 * If you are not interacting with D-Bus, then there is no reason to make
11852 * use of this type. If you are, then the D-Bus specification contains a
11853 * precise description of valid object paths.
11858 * G_VARIANT_TYPE_OBJECT_PATH_ARRAY:
11860 * The type of an array of object paths.
11865 * G_VARIANT_TYPE_SIGNATURE:
11867 * The type of a D-Bus type signature. These are strings of a specific
11868 * format used as type signatures for D-Bus methods and messages.
11870 * If you are not interacting with D-Bus, then there is no reason to make
11871 * use of this type. If you are, then the D-Bus specification contains a
11872 * precise description of valid signature strings.
11877 * G_VARIANT_TYPE_STRING:
11879 * The type of a string. "" is a string. %NULL is not a string.
11884 * G_VARIANT_TYPE_STRING_ARRAY:
11886 * The type of an array of strings.
11891 * G_VARIANT_TYPE_TUPLE:
11893 * An indefinite type that is a supertype of every tuple type,
11894 * regardless of the number of items in the tuple.
11899 * G_VARIANT_TYPE_UINT16:
11901 * The type of an integer value that can range from 0 to 65535.
11902 * There were about this many people living in Toronto in the 1870s.
11907 * G_VARIANT_TYPE_UINT32:
11909 * The type of an integer value that can range from 0 to 4294967295.
11910 * That's one number for everyone who was around in the late 1970s.
11915 * G_VARIANT_TYPE_UINT64:
11917 * The type of an integer value that can range from 0 to
11918 * 18446744073709551616. That's a really big number, but a Rubik's
11919 * cube can have a bit more than twice as many possible positions.
11924 * G_VARIANT_TYPE_UNIT:
11926 * The empty tuple type. Has only one instance. Known also as "triv"
11932 * G_VARIANT_TYPE_VARDICT:
11934 * The type of a dictionary mapping strings to variants (the ubiquitous
11942 * G_VARIANT_TYPE_VARIANT:
11944 * The type of a box that contains any other value (including another
11950 * G_VFS_EXTENSION_POINT_NAME:
11952 * Extension point for #GVfs functionality.
11953 * See <link linkend="extending-gio">Extending GIO</link>.
11958 * G_VOLUME_IDENTIFIER_KIND_HAL_UDI:
11960 * The string used to obtain a Hal UDI with g_volume_get_identifier().
11965 * G_VOLUME_IDENTIFIER_KIND_LABEL:
11967 * The string used to obtain a filesystem label with g_volume_get_identifier().
11972 * G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT:
11974 * The string used to obtain a NFS mount with g_volume_get_identifier().
11979 * G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE:
11981 * The string used to obtain a Unix device path with g_volume_get_identifier().
11986 * G_VOLUME_IDENTIFIER_KIND_UUID:
11988 * The string used to obtain a UUID with g_volume_get_identifier().
11993 * G_VOLUME_MONITOR_EXTENSION_POINT_NAME:
11995 * Extension point for volume monitor functionality.
11996 * See <link linkend="extending-gio">Extending GIO</link>.
12001 * SECTION:extensionpoints
12002 * @short_description: Extension Points
12004 * @see_also: <link linkend="extending-gio">Extending GIO</link>
12006 * #GIOExtensionPoint provides a mechanism for modules to extend the
12007 * functionality of the library or application that loaded it in an
12008 * organized fashion.
12010 * An extension point is identified by a name, and it may optionally
12011 * require that any implementation must by of a certain type (or derived
12012 * thereof). Use g_io_extension_point_register() to register an
12013 * extension point, and g_io_extension_point_set_required_type() to
12014 * set a required type.
12016 * A module can implement an extension point by specifying the #GType
12017 * that implements the functionality. Additionally, each implementation
12018 * of an extension point has a name, and a priority. Use
12019 * g_io_extension_point_implement() to implement an extension point.
12022 * GIOExtensionPoint *ep;
12024 * /* Register an extension point */
12025 * ep = g_io_extension_point_register ("my-extension-point");
12026 * g_io_extension_point_set_required_type (ep, MY_TYPE_EXAMPLE);
12030 * /* Implement an extension point */
12031 * G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE);
12032 * g_io_extension_point_implement ("my-extension-point",
12033 * my_example_impl_get_type (),
12038 * It is up to the code that registered the extension point how
12039 * it uses the implementations that have been associated with it.
12040 * Depending on the use case, it may use all implementations, or
12041 * only the one with the highest priority, or pick a specific
12044 * To avoid opening all modules just to find out what extension
12045 * points they implement, GIO makes use of a caching mechanism,
12046 * see <link linkend="gio-querymodules">gio-querymodules</link>.
12047 * You are expected to run this command after installing a
12050 * The <envar>GIO_EXTRA_MODULES</envar> environment variable can be
12051 * used to specify additional directories to automatically load modules
12052 * from. This environment variable has the same syntax as the
12053 * <envar>PATH</envar>. If two modules have the same base name in different
12054 * directories, then the latter one will be ignored. If additional
12055 * directories are specified GIO will load modules from the built-in
12063 * @short_description: An action interface
12065 * #GAction represents a single named action.
12067 * The main interface to an action is that it can be activated with
12068 * g_action_activate(). This results in the 'activate' signal being
12069 * emitted. An activation has a #GVariant parameter (which may be
12070 * %NULL). The correct type for the parameter is determined by a static
12071 * parameter type (which is given at construction time).
12073 * An action may optionally have a state, in which case the state may be
12074 * set with g_action_change_state(). This call takes a #GVariant. The
12075 * correct type for the state is determined by a static state type
12076 * (which is given at construction time).
12078 * The state may have a hint associated with it, specifying its valid
12081 * #GAction is merely the interface to the concept of an action, as
12082 * described above. Various implementations of actions exist, including
12083 * #GSimpleAction and #GtkAction.
12085 * In all cases, the implementing class is responsible for storing the
12086 * name of the action, the parameter type, the enabled state, the
12087 * optional state type and the state and emitting the appropriate
12088 * signals when these change. The implementor responsible for filtering
12089 * calls to g_action_activate() and g_action_change_state() for type
12090 * safety and for the state being enabled.
12092 * Probably the only useful thing to do with a #GAction is to put it
12093 * inside of a #GSimpleActionGroup.
12098 * SECTION:gactiongroup
12099 * @title: GActionGroup
12100 * @short_description: A group of actions
12101 * @see_also: #GAction
12103 * #GActionGroup represents a group of actions. Actions can be used to
12104 * expose functionality in a structured way, either from one part of a
12105 * program to another, or to the outside world. Action groups are often
12106 * used together with a #GMenuModel that provides additional
12107 * representation data for displaying the actions to the user, e.g. in
12110 * The main way to interact with the actions in a GActionGroup is to
12111 * activate them with g_action_group_activate_action(). Activating an
12112 * action may require a #GVariant parameter. The required type of the
12113 * parameter can be inquired with g_action_group_get_action_parameter_type().
12114 * Actions may be disabled, see g_action_group_get_action_enabled().
12115 * Activating a disabled action has no effect.
12117 * Actions may optionally have a state in the form of a #GVariant. The
12118 * current state of an action can be inquired with
12119 * g_action_group_get_action_state(). Activating a stateful action may
12120 * change its state, but it is also possible to set the state by calling
12121 * g_action_group_change_action_state().
12123 * As typical example, consider a text editing application which has an
12124 * option to change the current font to 'bold'. A good way to represent
12125 * this would be a stateful action, with a boolean state. Activating the
12126 * action would toggle the state.
12128 * Each action in the group has a unique name (which is a string). All
12129 * method calls, except g_action_group_list_actions() take the name of
12130 * an action as an argument.
12132 * The #GActionGroup API is meant to be the 'public' API to the action
12133 * group. The calls here are exactly the interaction that 'external
12134 * forces' (eg: UI, incoming D-Bus messages, etc.) are supposed to have
12135 * with actions. 'Internal' APIs (ie: ones meant only to be accessed by
12136 * the action group implementation) are found on subclasses. This is
12137 * why you will find - for example - g_action_group_get_action_enabled()
12138 * but not an equivalent <function>set()</function> call.
12140 * Signals are emitted on the action group in response to state changes
12141 * on individual actions.
12143 * Implementations of #GActionGroup should provide implementations for
12144 * the virtual functions g_action_group_list_actions() and
12145 * g_action_group_query_action(). The other virtual functions should
12146 * not be implemented - their "wrappers" are actually implemented with
12147 * calls to g_action_group_query_action().
12152 * SECTION:gactiongroupexporter
12153 * @title: GActionGroup exporter
12154 * @short_description: Export GActionGroups on D-Bus
12155 * @see_also: #GActionGroup, #GDBusActionGroup
12157 * These functions support exporting a #GActionGroup on D-Bus.
12158 * The D-Bus interface that is used is a private implementation
12161 * To access an exported #GActionGroup remotely, use
12162 * g_dbus_action_group_new() to obtain a #GDBusActionGroup.
12167 * SECTION:gactionmap
12168 * @title: GActionMap
12169 * @short_description: Interface for action containers
12171 * The GActionMap interface is implemented by #GActionGroup
12172 * implementations that operate by containing a number of
12173 * named #GAction instances, such as #GSimpleActionGroup.
12175 * One useful application of this interface is to map the
12176 * names of actions from various action groups to unique,
12177 * prefixed names (e.g. by prepending "app." or "win.").
12178 * This is the motivation for the 'Map' part of the interface
12187 * @short_description: Application information and launch contexts
12188 * @include: gio/gio.h
12190 * #GAppInfo and #GAppLaunchContext are used for describing and launching
12191 * applications installed on the system.
12193 * As of GLib 2.20, URIs will always be converted to POSIX paths
12194 * (using g_file_get_path()) when using g_app_info_launch() even if
12195 * the application requested an URI and not a POSIX path. For example
12196 * for an desktop-file based application with Exec key <literal>totem
12197 * %U</literal> and a single URI,
12198 * <literal>sftp://foo/file.avi</literal>, then
12199 * <literal>/home/user/.gvfs/sftp on foo/file.avi</literal> will be
12200 * passed. This will only work if a set of suitable GIO extensions
12201 * (such as gvfs 2.26 compiled with FUSE support), is available and
12202 * operational; if this is not the case, the URI will be passed
12203 * unmodified to the application. Some URIs, such as
12204 * <literal>mailto:</literal>, of course cannot be mapped to a POSIX
12205 * path (in gvfs there's no FUSE mount for it); such URIs will be
12206 * passed unmodified to the application.
12208 * Specifically for gvfs 2.26 and later, the POSIX URI will be mapped
12209 * back to the GIO URI in the #GFile constructors (since gvfs
12210 * implements the #GVfs extension point). As such, if the application
12211 * needs to examine the URI, it needs to use g_file_get_uri() or
12212 * similar on #GFile. In other words, an application cannot assume
12213 * that the URI passed to e.g. g_file_new_for_commandline_arg() is
12214 * equal to the result of g_file_get_uri(). The following snippet
12215 * illustrates this:
12221 * file = g_file_new_for_commandline_arg (uri_from_commandline);
12223 * uri = g_file_get_uri (file);
12224 * strcmp (uri, uri_from_commandline) == 0; // FALSE
12227 * if (g_file_has_uri_scheme (file, "cdda"))
12229 * // do something special with uri
12231 * g_object_unref (file);
12232 * </programlisting>
12234 * This code will work when both <literal>cdda://sr0/Track
12235 * 1.wav</literal> and <literal>/home/user/.gvfs/cdda on sr0/Track
12236 * 1.wav</literal> is passed to the application. It should be noted
12237 * that it's generally not safe for applications to rely on the format
12238 * of a particular URIs. Different launcher applications (e.g. file
12239 * managers) may have different ideas of what a given URI means.
12244 * SECTION:gapplication
12245 * @title: GApplication
12246 * @short_description: Core application class
12248 * A #GApplication is the foundation of an application, unique for a
12249 * given application identifier. The GApplication class wraps some
12250 * low-level platform-specific services and is intended to act as the
12251 * foundation for higher-level application classes such as
12252 * #GtkApplication or #MxApplication. In general, you should not use
12253 * this class outside of a higher level framework.
12255 * One of the core features that GApplication provides is process
12256 * uniqueness, in the context of a "session". The session concept is
12257 * platform-dependent, but corresponds roughly to a graphical desktop
12258 * login. When your application is launched again, its arguments
12259 * are passed through platform communication to the already running
12260 * program. The already running instance of the program is called the
12261 * <firstterm>primary instance</firstterm>. On Linux, the D-Bus session
12262 * bus is used for communication.
12264 * GApplication provides convenient life cycle management by maintaining
12265 * a <firstterm>use count</firstterm> for the primary application instance.
12266 * The use count can be changed using g_application_hold() and
12267 * g_application_release(). If it drops to zero, the application exits.
12268 * Higher-level classes such as #GtkApplication employ the use count to
12269 * ensure that the application stays alive as long as it has any opened
12272 * Before using GApplication, you must choose an "application identifier".
12273 * The expected form of an application identifier is very close to that of
12274 * of a <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-interface">DBus bus name</ulink>.
12275 * Examples include: "com.example.MyApp", "org.example.internal-apps.Calculator".
12276 * For details on valid application identifiers, see g_application_id_is_valid().
12278 * On Linux, the application identifier is claimed as a well-known bus name
12279 * on the user's session bus. This means that the uniqueness of your
12280 * application is scoped to the current session. It also means that your
12281 * application may provide additional services (through registration of other
12282 * object paths) at that bus name. The registration of these object paths
12283 * should be done with the shared GDBus session bus. Note that due to the
12284 * internal architecture of GDBus, method calls can be dispatched at any time
12285 * (even if a main loop is not running). For this reason, you must ensure that
12286 * any object paths that you wish to register are registered before #GApplication
12287 * attempts to acquire the bus name of your application (which happens in
12288 * g_application_register()). Unfortunately, this means that you cannot use
12289 * g_application_get_is_remote() to decide if you want to register object paths.
12291 * GApplication also implements the #GActionGroup and #GActionMap
12292 * interfaces and lets you easily export actions by adding them with
12293 * g_action_map_add_action(). When invoking an action by calling
12294 * g_action_group_activate_action() on the application, it is always
12295 * invoked in the primary instance. The actions are also exported on
12296 * the session bus, and GIO provides the #GDBusActionGroup wrapper to
12297 * conveniently access them remotely. Additionally, g_application_set_app_menu()
12298 * and g_application_set_menubar() can be used to export representation
12299 * data for the actions, in the form of #GMenuModels. GIO provides
12300 * a #GDBusMenuModel wrapper for remote access to exported #GMenuModels.
12302 * There is a number of different entry points into a GApplication:
12304 * <listitem>via 'Activate' (i.e. just starting the application)</listitem>
12305 * <listitem>via 'Open' (i.e. opening some files)</listitem>
12306 * <listitem>by handling a command-line</listitem>
12307 * <listitem>via activating an action</listitem>
12309 * The #GApplication::startup signal lets you handle the application
12310 * initialization for all of these in a single place.
12312 * Regardless of which of these entry points is used to start the application,
12313 * GApplication passes some <firstterm id="platform-data">platform
12314 * data</firstterm> from the launching instance to the primary instance,
12315 * in the form of a #GVariant dictionary mapping strings to variants.
12316 * To use platform data, override the @before_emit or @after_emit virtual
12317 * functions in your #GApplication subclass. When dealing with
12318 * #GApplicationCommandline objects, the platform data is directly
12319 * available via g_application_command_line_get_cwd(),
12320 * g_application_command_line_get_environ() and
12321 * g_application_command_line_get_platform_data().
12323 * As the name indicates, the platform data may vary depending on the
12324 * operating system, but it always includes the current directory (key
12325 * "cwd"), and optionally the environment (ie the set of environment
12326 * variables and their values) of the calling process (key "environ").
12327 * The environment is only added to the platform data if the
12328 * #G_APPLICATION_SEND_ENVIONMENT flag is set. GApplication subclasses
12329 * can add their own platform data by overriding the @add_platform_data
12330 * virtual function. For instance, #GtkApplication adds startup notification
12331 * data in this way.
12333 * To parse commandline arguments you may handle the
12334 * #GApplication::command-line signal or override the local_command_line()
12335 * vfunc, to parse them in either the primary instance or the local instance,
12338 * <example id="gapplication-example-open"><title>Opening files with a GApplication</title>
12340 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-open.c">
12341 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
12343 * </programlisting>
12346 * <example id="gapplication-example-actions"><title>A GApplication with actions</title>
12348 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-actions.c">
12349 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
12351 * </programlisting>
12354 * <example id="gapplication-example-menu"><title>A GApplication with menus</title>
12356 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-menu.c">
12357 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
12359 * </programlisting>
12365 * SECTION:gapplicationcommandline
12366 * @title: GApplicationCommandLine
12367 * @short_description: A command-line invocation of an application
12368 * @see_also: #GApplication
12370 * #GApplicationCommandLine represents a command-line invocation of
12371 * an application. It is created by #GApplication and emitted
12372 * in the #GApplication::command-line signal and virtual function.
12374 * The class contains the list of arguments that the program was invoked
12375 * with. It is also possible to query if the commandline invocation was
12376 * local (ie: the current process is running in direct response to the
12377 * invocation) or remote (ie: some other process forwarded the
12378 * commandline to this process).
12380 * The GApplicationCommandLine object can provide the @argc and @argv
12381 * parameters for use with the #GOptionContext command-line parsing API,
12382 * with the g_application_command_line_get_arguments() function. See
12383 * <xref linkend="gapplication-example-cmdline3"/> for an example.
12385 * The exit status of the originally-invoked process may be set and
12386 * messages can be printed to stdout or stderr of that process. The
12387 * lifecycle of the originally-invoked process is tied to the lifecycle
12388 * of this object (ie: the process exits when the last reference is
12391 * The main use for #GApplicationCommandline (and the
12392 * #GApplication::command-line signal) is 'Emacs server' like use cases:
12393 * You can set the <envar>EDITOR</envar> environment variable to have
12394 * e.g. git use your favourite editor to edit commit messages, and if you
12395 * already have an instance of the editor running, the editing will happen
12396 * in the running instance, instead of opening a new one. An important
12397 * aspect of this use case is that the process that gets started by git
12398 * does not return until the editing is done.
12400 * <example id="gapplication-example-cmdline"><title>Handling commandline arguments with GApplication</title>
12402 * A simple example where the commandline is completely handled
12403 * in the #GApplication::command-line handler. The launching instance exits
12404 * once the signal handler in the primary instance has returned, and the
12405 * return value of the signal handler becomes the exit status of the launching
12409 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline.c">
12410 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
12412 * </programlisting>
12415 * <example id="gapplication-example-cmdline2"><title>Split commandline handling</title>
12417 * An example of split commandline handling. Options that start with
12418 * <literal>--local-</literal> are handled locally, all other options are
12419 * passed to the #GApplication::command-line handler which runs in the primary
12423 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline2.c">
12424 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
12426 * </programlisting>
12429 * <example id="gapplication-example-cmdline3"><title>Deferred commandline handling</title>
12431 * An example of deferred commandline handling. Here, the commandline is
12432 * not completely handled before the #GApplication::command-line handler
12433 * returns. Instead, we keep a reference to the GApplicationCommandline
12434 * object and handle it later(in this example, in an idle). Note that it
12435 * is necessary to hold the application until you are done with the
12439 * This example also shows how to use #GOptionContext for parsing the
12440 * commandline arguments. Note that it is necessary to disable the
12441 * built-in help-handling of #GOptionContext, since it calls exit()
12442 * after printing help, which is not what you want to happen in
12443 * the primary instance.
12446 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline3.c">
12447 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
12449 * </programlisting>
12455 * SECTION:gasyncinitable
12456 * @short_description: Asynchronously failable object initialization interface
12457 * @include: gio/gio.h
12458 * @see_also: #GInitable
12460 * This is the asynchronous version of #GInitable; it behaves the same
12461 * in all ways except that initialization is asynchronous. For more details
12462 * see the descriptions on #GInitable.
12464 * A class may implement both the #GInitable and #GAsyncInitable interfaces.
12466 * Users of objects implementing this are not intended to use the interface
12467 * method directly; instead it will be used automatically in various ways.
12468 * For C applications you generally just call g_async_initable_new_async()
12469 * directly, or indirectly via a foo_thing_new_async() wrapper. This will call
12470 * g_async_initable_init_async() under the cover, calling back with %NULL and
12471 * a set %GError on failure.
12473 * A typical implementation might look something like this:
12483 * _foo_ready_cb (Foo *self)
12487 * self->priv->state = INITIALIZED;
12489 * for (l = self->priv->init_results; l != NULL; l = l->next)
12491 * GSimpleAsyncResult *simple = l->data;
12493 * if (!self->priv->success)
12494 * g_simple_async_result_set_error (simple, ...);
12496 * g_simple_async_result_complete (simple);
12497 * g_object_unref (simple);
12500 * g_list_free (self->priv->init_results);
12501 * self->priv->init_results = NULL;
12505 * foo_init_async (GAsyncInitable *initable,
12507 * GCancellable *cancellable,
12508 * GAsyncReadyCallback callback,
12509 * gpointer user_data)
12511 * Foo *self = FOO (initable);
12512 * GSimpleAsyncResult *simple;
12514 * simple = g_simple_async_result_new (G_OBJECT (initable)
12519 * switch (self->priv->state)
12521 * case NOT_INITIALIZED:
12522 * _foo_get_ready (self);
12523 * self->priv->init_results = g_list_append (self->priv->init_results,
12525 * self->priv->state = INITIALIZING;
12527 * case INITIALIZING:
12528 * self->priv->init_results = g_list_append (self->priv->init_results,
12531 * case INITIALIZED:
12532 * if (!self->priv->success)
12533 * g_simple_async_result_set_error (simple, ...);
12535 * g_simple_async_result_complete_in_idle (simple);
12536 * g_object_unref (simple);
12542 * foo_init_finish (GAsyncInitable *initable,
12543 * GAsyncResult *result,
12546 * g_return_val_if_fail (g_simple_async_result_is_valid (result,
12547 * G_OBJECT (initable), foo_init_async), FALSE);
12549 * if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
12557 * foo_async_initable_iface_init (gpointer g_iface,
12560 * GAsyncInitableIface *iface = g_iface;
12562 * iface->init_async = foo_init_async;
12563 * iface->init_finish = foo_init_finish;
12570 * SECTION:gasyncresult
12571 * @short_description: Asynchronous Function Results
12572 * @include: gio/gio.h
12573 * @see_also: #GSimpleAsyncResult
12575 * Provides a base class for implementing asynchronous function results.
12577 * Asynchronous operations are broken up into two separate operations
12578 * which are chained together by a #GAsyncReadyCallback. To begin
12579 * an asynchronous operation, provide a #GAsyncReadyCallback to the
12580 * asynchronous function. This callback will be triggered when the
12581 * operation has completed, and will be passed a #GAsyncResult instance
12582 * filled with the details of the operation's success or failure, the
12583 * object the asynchronous function was started for and any error codes
12584 * returned. The asynchronous callback function is then expected to call
12585 * the corresponding "_finish()" function, passing the object the
12586 * function was called for, the #GAsyncResult instance, and (optionally)
12587 * an @error to grab any error conditions that may have occurred.
12589 * The "_finish()" function for an operation takes the generic result
12590 * (of type #GAsyncResult) and returns the specific result that the
12591 * operation in question yields (e.g. a #GFileEnumerator for a
12592 * "enumerate children" operation). If the result or error status of the
12593 * operation is not needed, there is no need to call the "_finish()"
12594 * function; GIO will take care of cleaning up the result and error
12595 * information after the #GAsyncReadyCallback returns. You can pass
12596 * %NULL for the #GAsyncReadyCallback if you don't need to take any
12597 * action at all after the operation completes. Applications may also
12598 * take a reference to the #GAsyncResult and call "_finish()" later;
12599 * however, the "_finish()" function may be called at most once.
12601 * Example of a typical asynchronous operation flow:
12603 * void _theoretical_frobnitz_async (Theoretical *t,
12605 * GAsyncReadyCallback *cb,
12608 * gboolean _theoretical_frobnitz_finish (Theoretical *t,
12609 * GAsyncResult *res,
12613 * frobnitz_result_func (GObject *source_object,
12614 * GAsyncResult *res,
12615 * gpointer user_data)
12617 * gboolean success = FALSE;
12619 * success = _theoretical_frobnitz_finish (source_object, res, NULL);
12622 * g_printf ("Hurray!\n");
12624 * g_printf ("Uh oh!\n");
12626 * /<!-- -->* ... *<!-- -->/
12630 * int main (int argc, void *argv[])
12632 * /<!-- -->* ... *<!-- -->/
12634 * _theoretical_frobnitz_async (theoretical_data,
12636 * frobnitz_result_func,
12639 * /<!-- -->* ... *<!-- -->/
12643 * The callback for an asynchronous operation is called only once, and is
12644 * always called, even in the case of a cancelled operation. On cancellation
12645 * the result is a %G_IO_ERROR_CANCELLED error.
12650 * SECTION:gbufferedinputstream
12651 * @short_description: Buffered Input Stream
12652 * @include: gio/gio.h
12653 * @see_also: #GFilterInputStream, #GInputStream
12655 * Buffered input stream implements #GFilterInputStream and provides
12656 * for buffered reads.
12658 * By default, #GBufferedInputStream's buffer size is set at 4 kilobytes.
12660 * To create a buffered input stream, use g_buffered_input_stream_new(),
12661 * or g_buffered_input_stream_new_sized() to specify the buffer's size at
12664 * To get the size of a buffer within a buffered input stream, use
12665 * g_buffered_input_stream_get_buffer_size(). To change the size of a
12666 * buffered input stream's buffer, use
12667 * g_buffered_input_stream_set_buffer_size(). Note that the buffer's size
12668 * cannot be reduced below the size of the data within the buffer.
12673 * SECTION:gbufferedoutputstream
12674 * @short_description: Buffered Output Stream
12675 * @include: gio/gio.h
12676 * @see_also: #GFilterOutputStream, #GOutputStream
12678 * Buffered output stream implements #GFilterOutputStream and provides
12679 * for buffered writes.
12681 * By default, #GBufferedOutputStream's buffer size is set at 4 kilobytes.
12683 * To create a buffered output stream, use g_buffered_output_stream_new(),
12684 * or g_buffered_output_stream_new_sized() to specify the buffer's size
12687 * To get the size of a buffer within a buffered input stream, use
12688 * g_buffered_output_stream_get_buffer_size(). To change the size of a
12689 * buffered output stream's buffer, use
12690 * g_buffered_output_stream_set_buffer_size(). Note that the buffer's
12691 * size cannot be reduced below the size of the data within the buffer.
12696 * SECTION:gcancellable
12697 * @short_description: Thread-safe Operation Cancellation Stack
12698 * @include: gio/gio.h
12700 * GCancellable is a thread-safe operation cancellation stack used
12701 * throughout GIO to allow for cancellation of synchronous and
12702 * asynchronous operations.
12707 * SECTION:gcharsetconverter
12708 * @short_description: Convert between charsets
12709 * @include: gio/gio.h
12711 * #GCharsetConverter is an implementation of #GConverter based on
12717 * SECTION:gcontenttype
12718 * @short_description: Platform-specific content typing
12719 * @include: gio/gio.h
12721 * A content type is a platform specific string that defines the type
12722 * of a file. On UNIX it is a <ulink url="http://www.wikipedia.org/wiki/Internet_media_type">mime type</ulink> like "text/plain" or "image/png".
12723 * On Win32 it is an extension string like ".doc", ".txt" or a perceived
12724 * string like "audio". Such strings can be looked up in the registry at
12725 * HKEY_CLASSES_ROOT.
12730 * SECTION:gconverter
12731 * @short_description: Data conversion interface
12732 * @include: gio/gio.h
12733 * @see_also: #GInputStream, #GOutputStream
12735 * #GConverter is implemented by objects that convert
12736 * binary data in various ways. The conversion can be
12737 * stateful and may fail at any place.
12739 * Some example conversions are: character set conversion,
12740 * compression, decompression and regular expression
12748 * SECTION:gconverterinputstream
12749 * @short_description: Converter Input Stream
12750 * @include: gio/gio.h
12751 * @see_also: #GInputStream, #GConverter
12753 * Converter input stream implements #GInputStream and allows
12754 * conversion of data of various types during reading.
12759 * SECTION:gconverteroutputstream
12760 * @short_description: Converter Output Stream
12761 * @include: gio/gio.h
12762 * @see_also: #GOutputStream, #GConverter
12764 * Converter output stream implements #GOutputStream and allows
12765 * conversion of data of various types during reading.
12770 * SECTION:gcredentials
12771 * @short_description: An object containing credentials
12772 * @include: gio/gio.h
12774 * The #GCredentials type is a reference-counted wrapper for native
12775 * credentials. This information is typically used for identifying,
12776 * authenticating and authorizing other processes.
12778 * Some operating systems supports looking up the credentials of the
12779 * remote peer of a communication endpoint - see e.g.
12780 * g_socket_get_credentials().
12782 * Some operating systems supports securely sending and receiving
12783 * credentials over a Unix Domain Socket, see
12784 * #GUnixCredentialsMessage, g_unix_connection_send_credentials() and
12785 * g_unix_connection_receive_credentials() for details.
12787 * On Linux, the native credential type is a <type>struct ucred</type>
12789 * <citerefentry><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>
12790 * man page for details. This corresponds to
12791 * %G_CREDENTIALS_TYPE_LINUX_UCRED.
12793 * On FreeBSD, the native credential type is a <type>struct cmsgcred</type>.
12794 * This corresponds to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED.
12796 * On OpenBSD, the native credential type is a <type>struct sockpeercred</type>.
12797 * This corresponds to %G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED.
12802 * SECTION:gdatainputstream
12803 * @short_description: Data Input Stream
12804 * @include: gio/gio.h
12805 * @see_also: #GInputStream
12807 * Data input stream implements #GInputStream and includes functions for
12808 * reading structured data directly from a binary input stream.
12813 * SECTION:gdataoutputstream
12814 * @short_description: Data Output Stream
12815 * @include: gio/gio.h
12816 * @see_also: #GOutputStream
12818 * Data output stream implements #GOutputStream and includes functions for
12819 * writing data directly to an output stream.
12824 * SECTION:gdbusactiongroup
12825 * @title: GDBusActionGroup
12826 * @short_description: A D-Bus GActionGroup implementation
12827 * @see_also: <link linkend="gio-GActionGroup-exporter">GActionGroup exporter</link>
12829 * #GDBusActionGroup is an implementation of the #GActionGroup
12830 * interface that can be used as a proxy for an action group
12831 * that is exported over D-Bus with g_dbus_connection_export_action_group().
12836 * SECTION:gdbusaddress
12837 * @title: D-Bus Addresses
12838 * @short_description: D-Bus connection endpoints
12839 * @include: gio/gio.h
12841 * Routines for working with D-Bus addresses. A D-Bus address is a string
12842 * like "unix:tmpdir=/tmp/my-app-name". The exact format of addresses
12843 * is explained in detail in the <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html#addresses">D-Bus specification</link>.
12848 * SECTION:gdbusauthobserver
12849 * @short_description: Object used for authenticating connections
12850 * @include: gio/gio.h
12852 * The #GDBusAuthObserver type provides a mechanism for participating
12853 * in how a #GDBusServer (or a #GDBusConnection) authenticates remote
12854 * peers. Simply instantiate a #GDBusAuthObserver and connect to the
12855 * signals you are interested in. Note that new signals may be added
12858 * For example, if you only want to allow D-Bus connections from
12859 * processes owned by the same uid as the server, you would use a
12860 * signal handler like the following:
12861 * <example id="auth-observer"><title>Controlling Authentication</title><programlisting>
12863 * on_authorize_authenticated_peer (GDBusAuthObserver *observer,
12864 * GIOStream *stream,
12865 * GCredentials *credentials,
12866 * gpointer user_data)
12868 * gboolean authorized;
12870 * authorized = FALSE;
12871 * if (credentials != NULL)
12873 * GCredentials *own_credentials;
12874 * own_credentials = g_credentials_new ();
12875 * if (g_credentials_is_same_user (credentials, own_credentials, NULL))
12876 * authorized = TRUE;
12877 * g_object_unref (own_credentials);
12880 * return authorized;
12882 * </programlisting></example>
12887 * SECTION:gdbusconnection
12888 * @short_description: D-Bus Connections
12889 * @include: gio/gio.h
12891 * The #GDBusConnection type is used for D-Bus connections to remote
12892 * peers such as a message buses. It is a low-level API that offers a
12893 * lot of flexibility. For instance, it lets you establish a connection
12894 * over any transport that can by represented as an #GIOStream.
12896 * This class is rarely used directly in D-Bus clients. If you are writing
12897 * an D-Bus client, it is often easier to use the g_bus_own_name(),
12898 * g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs.
12900 * As an exception to the usual GLib rule that a particular object must not be
12901 * used by two threads at the same time, #GDBusConnection's methods may be
12902 * called from any thread<footnote>
12904 * This is so that g_bus_get() and g_bus_get_sync() can safely return the
12905 * same #GDBusConnection when called from any thread.
12909 * Most of the ways to obtain a #GDBusConnection automatically initialize it
12910 * (i.e. connect to D-Bus): for instance, g_dbus_connection_new() and
12911 * g_bus_get(), and the synchronous versions of those methods, give you an
12912 * initialized connection. Language bindings for GIO should use
12913 * g_initable_new() or g_async_initable_new(), which also initialize the
12916 * If you construct an uninitialized #GDBusConnection, such as via
12917 * g_object_new(), you must initialize it via g_initable_init() or
12918 * g_async_initable_init() before using its methods or properties. Calling
12919 * methods or accessing properties on a #GDBusConnection that has not completed
12920 * initialization successfully is considered to be invalid, and leads to
12921 * undefined behaviour. In particular, if initialization fails with a #GError,
12922 * the only valid thing you can do with that #GDBusConnection is to free it
12923 * with g_object_unref().
12925 * <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>
12927 * <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>
12929 * <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>
12931 * <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>
12936 * SECTION:gdbuserror
12937 * @title: GDBusError
12938 * @short_description: Mapping D-Bus errors to and from GError
12939 * @include: gio/gio.h
12941 * All facilities that return errors from remote methods (such as
12942 * g_dbus_connection_call_sync()) use #GError to represent both D-Bus
12943 * errors (e.g. errors returned from the other peer) and locally
12944 * in-process generated errors.
12946 * To check if a returned #GError is an error from a remote peer, use
12947 * g_dbus_error_is_remote_error(). To get the actual D-Bus error name,
12948 * use g_dbus_error_get_remote_error(). Before presenting an error,
12949 * always use g_dbus_error_strip_remote_error().
12951 * In addition, facilities used to return errors to a remote peer also
12952 * use #GError. See g_dbus_method_invocation_return_error() for
12953 * discussion about how the D-Bus error name is set.
12955 * Applications can associate a #GError error domain with a set of D-Bus errors in order to
12956 * automatically map from D-Bus errors to #GError and back. This
12957 * is typically done in the function returning the #GQuark for the
12959 * <example id="error-registration"><title>Error Registration</title><programlisting>
12960 * /<!-- -->* foo-bar-error.h: *<!-- -->/
12962 * #define FOO_BAR_ERROR (foo_bar_error_quark ())
12963 * GQuark foo_bar_error_quark (void);
12967 * FOO_BAR_ERROR_FAILED,
12968 * FOO_BAR_ERROR_ANOTHER_ERROR,
12969 * FOO_BAR_ERROR_SOME_THIRD_ERROR,
12972 * /<!-- -->* foo-bar-error.c: *<!-- -->/
12974 * static const GDBusErrorEntry foo_bar_error_entries[] =
12976 * {FOO_BAR_ERROR_FAILED, "org.project.Foo.Bar.Error.Failed"},
12977 * {FOO_BAR_ERROR_ANOTHER_ERROR, "org.project.Foo.Bar.Error.AnotherError"},
12978 * {FOO_BAR_ERROR_SOME_THIRD_ERROR, "org.project.Foo.Bar.Error.SomeThirdError"},
12982 * foo_bar_error_quark (void)
12984 * static volatile gsize quark_volatile = 0;
12985 * g_dbus_error_register_error_domain ("foo-bar-error-quark",
12987 * foo_bar_error_entries,
12988 * G_N_ELEMENTS (foo_bar_error_entries));
12989 * G_STATIC_ASSERT (G_N_ELEMENTS (foo_bar_error_entries) - 1 == FOO_BAR_ERROR_SOME_THIRD_ERROR);
12990 * return (GQuark) quark_volatile;
12992 * </programlisting></example>
12993 * With this setup, a D-Bus peer can transparently pass e.g. %FOO_BAR_ERROR_ANOTHER_ERROR and
12994 * other peers will see the D-Bus error name <literal>org.project.Foo.Bar.Error.AnotherError</literal>.
12995 * If the other peer is using GDBus, the peer will see also %FOO_BAR_ERROR_ANOTHER_ERROR instead
12996 * of %G_IO_ERROR_DBUS_ERROR. Note that GDBus clients can still recover
12997 * <literal>org.project.Foo.Bar.Error.AnotherError</literal> using g_dbus_error_get_remote_error().
12999 * Note that errors in the %G_DBUS_ERROR error domain is intended only
13000 * for returning errors from a remote message bus process. Errors
13001 * generated locally in-process by e.g. #GDBusConnection is from the
13002 * %G_IO_ERROR domain.
13007 * SECTION:gdbusinterface
13008 * @short_description: Base type for D-Bus interfaces
13009 * @include: gio/gio.h
13011 * The #GDBusInterface type is the base type for D-Bus interfaces both
13012 * on the service side (see #GDBusInterfaceSkeleton) and client side
13013 * (see #GDBusProxy).
13018 * SECTION:gdbusinterfaceskeleton
13019 * @short_description: Service-side D-Bus interface
13020 * @include: gio/gio.h
13022 * Abstract base class for D-Bus interfaces on the service side.
13027 * SECTION:gdbusintrospection
13028 * @title: D-Bus Introspection Data
13029 * @short_description: Node and interface description data structures
13030 * @include: gio/gio.h
13032 * Various data structures and convenience routines to parse and
13033 * generate D-Bus introspection XML. Introspection information is
13034 * used when registering objects with g_dbus_connection_register_object().
13036 * The format of D-Bus introspection XML is specified in the
13037 * <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format">D-Bus specification</ulink>.
13042 * SECTION:gdbusmenumodel
13043 * @title: GDBusMenuModel
13044 * @short_description: A D-Bus GMenuModel implementation
13045 * @see_also: <link linkend="gio-GMenuModel-exporter">GMenuModel Exporter</link>
13047 * #GDBusMenuModel is an implementation of #GMenuModel that can be used
13048 * as a proxy for a menu model that is exported over D-Bus with
13049 * g_dbus_connection_export_menu_model().
13054 * SECTION:gdbusmessage
13055 * @short_description: D-Bus Message
13056 * @include: gio/gio.h
13058 * A type for representing D-Bus messages that can be sent or received
13059 * on a #GDBusConnection.
13064 * SECTION:gdbusmethodinvocation
13065 * @short_description: Object for handling remote calls
13066 * @include: gio/gio.h
13068 * Instances of the #GDBusMethodInvocation class are used when
13069 * handling D-Bus method calls. It provides a way to asynchronously
13070 * return results and errors.
13072 * The normal way to obtain a #GDBusMethodInvocation object is to receive
13073 * it as an argument to the handle_method_call() function in a
13074 * #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object().
13079 * SECTION:gdbusnameowning
13080 * @title: Owning Bus Names
13081 * @short_description: Simple API for owning bus names
13082 * @include: gio/gio.h
13084 * Convenience API for owning bus names.
13086 * <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>
13091 * SECTION:gdbusnamewatching
13092 * @title: Watching Bus Names
13093 * @short_description: Simple API for watching bus names
13094 * @include: gio/gio.h
13096 * Convenience API for watching bus names.
13098 * <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>
13103 * SECTION:gdbusobject
13104 * @short_description: Base type for D-Bus objects
13105 * @include: gio/gio.h
13107 * The #GDBusObject type is the base type for D-Bus objects on both
13108 * the service side (see #GDBusObjectSkeleton) and the client side
13109 * (see #GDBusObjectProxy). It is essentially just a container of
13115 * SECTION:gdbusobjectmanager
13116 * @short_description: Base type for D-Bus object managers
13117 * @include: gio/gio.h
13119 * The #GDBusObjectManager type is the base type for service- and
13120 * client-side implementations of the standardized <ulink
13121 * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
13124 * See #GDBusObjectManagerClient for the client-side implementation
13125 * and #GDBusObjectManagerServer for the service-side implementation.
13130 * SECTION:gdbusobjectmanagerclient
13131 * @short_description: Client-side object manager
13132 * @include: gio/gio.h
13134 * #GDBusObjectManagerClient is used to create, monitor and delete object
13135 * proxies for remote objects exported by a #GDBusObjectManagerServer (or any
13136 * code implementing the <ulink
13137 * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
13140 * Once an instance of this type has been created, you can connect to
13141 * the #GDBusObjectManager::object-added and
13142 * #GDBusObjectManager::object-removed signals and inspect the
13143 * #GDBusObjectProxy objects returned by
13144 * g_dbus_object_manager_get_objects().
13146 * If the name for a #GDBusObjectManagerClient is not owned by anyone at
13147 * object construction time, the default behavior is to request the
13148 * message bus to launch an owner for the name. This behavior can be
13149 * disabled using the %G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START
13150 * flag. It's also worth noting that this only works if the name of
13151 * interest is activatable in the first place. E.g. in some cases it
13152 * is not possible to launch an owner for the requested name. In this
13153 * case, #GDBusObjectManagerClient object construction still succeeds but
13154 * there will be no object proxies
13155 * (e.g. g_dbus_object_manager_get_objects() returns the empty list) and
13156 * the #GDBusObjectManagerClient:name-owner property is %NULL.
13158 * The owner of the requested name can come and go (for example
13159 * consider a system service being restarted) – #GDBusObjectManagerClient
13160 * handles this case too; simply connect to the #GObject::notify
13161 * signal to watch for changes on the #GDBusObjectManagerClient:name-owner
13162 * property. When the name owner vanishes, the behavior is that
13163 * #GDBusObjectManagerClient:name-owner is set to %NULL (this includes
13164 * emission of the #GObject::notify signal) and then
13165 * #GDBusObjectManager::object-removed signals are synthesized
13166 * for all currently existing object proxies. Since
13167 * #GDBusObjectManagerClient:name-owner is %NULL when this happens, you can
13168 * use this information to disambiguate a synthesized signal from a
13169 * genuine signal caused by object removal on the remote
13170 * #GDBusObjectManager. Similarly, when a new name owner appears,
13171 * #GDBusObjectManager::object-added signals are synthesized
13172 * while #GDBusObjectManagerClient:name-owner is still %NULL. Only when all
13173 * object proxies have been added, the #GDBusObjectManagerClient:name-owner
13174 * is set to the new name owner (this includes emission of the
13175 * #GObject::notify signal). Furthermore, you are guaranteed that
13176 * #GDBusObjectManagerClient:name-owner will alternate between a name owner
13177 * (e.g. <literal>:1.42</literal>) and %NULL even in the case where
13178 * the name of interest is atomically replaced
13180 * Ultimately, #GDBusObjectManagerClient is used to obtain #GDBusProxy
13181 * instances. All signals (including the
13182 * <literal>org.freedesktop.DBus.Properties::PropertiesChanged</literal>
13183 * signal) delivered to #GDBusProxy instances are guaranteed to
13184 * originate from the name owner. This guarantee along with the
13185 * behavior described above, means that certain race conditions
13186 * including the <emphasis><quote>half the proxy is from the old owner
13187 * and the other half is from the new owner</quote></emphasis> problem
13190 * To avoid having the application connect to signals on the returned
13191 * #GDBusObjectProxy and #GDBusProxy objects, the
13192 * #GDBusObject::interface-added,
13193 * #GDBusObject::interface-removed,
13194 * #GDBusProxy::g-properties-changed and
13195 * #GDBusProxy::g-signal signals
13196 * are also emitted on the #GDBusObjectManagerClient instance managing these
13197 * objects. The signals emitted are
13198 * #GDBusObjectManager::interface-added,
13199 * #GDBusObjectManager::interface-removed,
13200 * #GDBusObjectManagerClient::interface-proxy-properties-changed and
13201 * #GDBusObjectManagerClient::interface-proxy-signal.
13203 * Note that all callbacks and signals are emitted in the
13204 * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
13205 * that the #GDBusObjectManagerClient object was constructed
13206 * in. Additionally, the #GDBusObjectProxy and #GDBusProxy objects
13207 * originating from the #GDBusObjectManagerClient object will be created in
13208 * the same context and, consequently, will deliver signals in the
13214 * SECTION:gdbusobjectmanagerserver
13215 * @short_description: Service-side object manager
13216 * @include: gio/gio.h
13218 * #GDBusObjectManagerServer is used to export #GDBusObject instances using
13219 * the standardized <ulink
13220 * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink>
13221 * interface. For example, remote D-Bus clients can get all objects
13222 * and properties in a single call. Additionally, any change in the
13223 * object hierarchy is broadcast using signals. This means that D-Bus
13224 * clients can keep caches up to date by only listening to D-Bus
13227 * See #GDBusObjectManagerClient for the client-side code that is
13228 * intended to be used with #GDBusObjectManagerServer or any D-Bus
13229 * object implementing the org.freedesktop.DBus.ObjectManager
13235 * SECTION:gdbusobjectproxy
13236 * @short_description: Client-side D-Bus object
13237 * @include: gio/gio.h
13239 * A #GDBusObjectProxy is an object used to represent a remote object
13240 * with one or more D-Bus interfaces. Normally, you don't instantiate
13241 * a #GDBusObjectProxy yourself - typically #GDBusObjectManagerClient
13242 * is used to obtain it.
13249 * SECTION:gdbusobjectskeleton
13250 * @short_description: Service-side D-Bus object
13251 * @include: gio/gio.h
13253 * A #GDBusObjectSkeleton instance is essentially a group of D-Bus
13254 * interfaces. The set of exported interfaces on the object may be
13255 * dynamic and change at runtime.
13257 * This type is intended to be used with #GDBusObjectManager.
13262 * SECTION:gdbusproxy
13263 * @short_description: Client-side D-Bus interface proxy
13264 * @include: gio/gio.h
13266 * #GDBusProxy is a base class used for proxies to access a D-Bus
13267 * interface on a remote object. A #GDBusProxy can be constructed for
13268 * both well-known and unique names.
13270 * By default, #GDBusProxy will cache all properties (and listen to
13271 * changes) of the remote object, and proxy all signals that gets
13272 * emitted. This behaviour can be changed by passing suitable
13273 * #GDBusProxyFlags when the proxy is created. If the proxy is for a
13274 * well-known name, the property cache is flushed when the name owner
13275 * vanishes and reloaded when a name owner appears.
13277 * If a #GDBusProxy is used for a well-known name, the owner of the
13278 * name is tracked and can be read from
13279 * #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to
13280 * get notified of changes. Additionally, only signals and property
13281 * changes emitted from the current name owner are considered and
13282 * calls are always sent to the current name owner. This avoids a
13283 * number of race conditions when the name is lost by one owner and
13284 * claimed by another. However, if no name owner currently exists,
13285 * then calls will be sent to the well-known name which may result in
13286 * the message bus launching an owner (unless
13287 * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set).
13289 * The generic #GDBusProxy::g-properties-changed and
13290 * #GDBusProxy::g-signal signals are not very convenient to work
13291 * with. Therefore, the recommended way of working with proxies is to
13292 * subclass #GDBusProxy, and have more natural properties and signals
13293 * in your derived class. See <xref linkend="gdbus-example-gdbus-codegen"/>
13294 * for how this can easily be done using the
13295 * <command><link linkend="gdbus-codegen">gdbus-codegen</link></command>
13298 * A #GDBusProxy instance can be used from multiple threads but note
13299 * that all signals (e.g. #GDBusProxy::g-signal, #GDBusProxy::g-properties-changed
13300 * and #GObject::notify) are emitted in the
13301 * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
13302 * of the thread where the instance was constructed.
13304 * <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>
13309 * SECTION:gdbusserver
13310 * @short_description: Helper for accepting connections
13311 * @include: gio/gio.h
13313 * #GDBusServer is a helper for listening to and accepting D-Bus
13314 * connections. This can be used to create a new D-Bus server, allowing two
13315 * peers to use the D-Bus protocol for their own specialized communication.
13316 * A server instance provided in this way will not perform message routing or
13317 * implement the org.freedesktop.DBus interface.
13319 * To just export an object on a well-known name on a message bus, such as the
13320 * session or system bus, you should instead use g_bus_own_name().
13322 * <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>
13327 * SECTION:gdbusutils
13328 * @title: D-Bus Utilities
13329 * @short_description: Various utilities related to D-Bus.
13330 * @include: gio/gio.h
13332 * Various utility routines related to D-Bus.
13337 * SECTION:gdesktopappinfo
13338 * @title: GDesktopAppInfo
13339 * @short_description: Application information from desktop files
13340 * @include: gio/gdesktopappinfo.h
13342 * #GDesktopAppInfo is an implementation of #GAppInfo based on
13345 * Note that <filename><gio/gdesktopappinfo.h></filename> belongs to
13346 * the UNIX-specific GIO interfaces, thus you have to use the
13347 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
13353 * @short_description: Drive management
13354 * @include: gio/gio.h
13356 * #GDrive - this represent a piece of hardware connected to the machine.
13357 * It's generally only created for removable hardware or hardware with
13360 * #GDrive is a container class for #GVolume objects that stem from
13361 * the same piece of media. As such, #GDrive abstracts a drive with
13362 * (or without) removable media and provides operations for querying
13363 * whether media is available, determing whether media change is
13364 * automatically detected and ejecting the media.
13366 * If the #GDrive reports that media isn't automatically detected, one
13367 * can poll for media; typically one should not do this periodically
13368 * as a poll for media operation is potententially expensive and may
13369 * spin up the drive creating noise.
13371 * #GDrive supports starting and stopping drives with authentication
13372 * support for the former. This can be used to support a diverse set
13373 * of use cases including connecting/disconnecting iSCSI devices,
13374 * powering down external disk enclosures and starting/stopping
13375 * multi-disk devices such as RAID devices. Note that the actual
13376 * semantics and side-effects of starting/stopping a #GDrive may vary
13377 * according to implementation. To choose the correct verbs in e.g. a
13378 * file manager, use g_drive_get_start_stop_type().
13380 * For porting from GnomeVFS note that there is no equivalent of
13381 * #GDrive in that API.
13387 * @short_description: An object for emblems
13388 * @include: gio/gio.h
13389 * @see_also: #GIcon, #GEmblemedIcon, #GLoadableIcon, #GThemedIcon
13391 * #GEmblem is an implementation of #GIcon that supports
13392 * having an emblem, which is an icon with additional properties.
13393 * It can than be added to a #GEmblemedIcon.
13395 * Currently, only metainformation about the emblem's origin is
13396 * supported. More may be added in the future.
13401 * SECTION:gemblemedicon
13402 * @short_description: Icon with emblems
13403 * @include: gio/gio.h
13404 * @see_also: #GIcon, #GLoadableIcon, #GThemedIcon, #GEmblem
13406 * #GEmblemedIcon is an implementation of #GIcon that supports
13407 * adding an emblem to an icon. Adding multiple emblems to an
13408 * icon is ensured via g_emblemed_icon_add_emblem().
13410 * Note that #GEmblemedIcon allows no control over the position
13411 * of the emblems. See also #GEmblem for more information.
13417 * @short_description: File and Directory Handling
13418 * @include: gio/gio.h
13419 * @see_also: #GFileInfo, #GFileEnumerator
13421 * #GFile is a high level abstraction for manipulating files on a
13422 * virtual file system. #GFile<!-- -->s are lightweight, immutable
13423 * objects that do no I/O upon creation. It is necessary to understand that
13424 * #GFile objects do not represent files, merely an identifier for a file. All
13425 * file content I/O is implemented as streaming operations (see #GInputStream and
13428 * To construct a #GFile, you can use:
13429 * g_file_new_for_path() if you have a path.
13430 * g_file_new_for_uri() if you have a URI.
13431 * g_file_new_for_commandline_arg() for a command line argument.
13432 * g_file_new_tmp() to create a temporary file from a template.
13433 * g_file_parse_name() from a utf8 string gotten from g_file_get_parse_name().
13435 * One way to think of a #GFile is as an abstraction of a pathname. For normal
13436 * files the system pathname is what is stored internally, but as #GFile<!-- -->s
13437 * are extensible it could also be something else that corresponds to a pathname
13438 * in a userspace implementation of a filesystem.
13440 * #GFile<!-- -->s make up hierarchies of directories and files that correspond to the
13441 * files on a filesystem. You can move through the file system with #GFile using
13442 * g_file_get_parent() to get an identifier for the parent directory, g_file_get_child()
13443 * to get a child within a directory, g_file_resolve_relative_path() to resolve a relative
13444 * path between two #GFile<!-- -->s. There can be multiple hierarchies, so you may not
13445 * end up at the same root if you repeatedly call g_file_get_parent() on two different
13448 * All #GFile<!-- -->s have a basename (get with g_file_get_basename()). These names
13449 * are byte strings that are used to identify the file on the filesystem (relative to
13450 * its parent directory) and there is no guarantees that they have any particular charset
13451 * encoding or even make any sense at all. If you want to use filenames in a user
13452 * interface you should use the display name that you can get by requesting the
13453 * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info().
13454 * This is guaranteed to be in utf8 and can be used in a user interface. But always
13455 * store the real basename or the #GFile to use to actually access the file, because
13456 * there is no way to go from a display name to the actual name.
13458 * Using #GFile as an identifier has the same weaknesses as using a path in that
13459 * there may be multiple aliases for the same file. For instance, hard or
13460 * soft links may cause two different #GFile<!-- -->s to refer to the same file.
13461 * Other possible causes for aliases are: case insensitive filesystems, short
13462 * and long names on Fat/NTFS, or bind mounts in Linux. If you want to check if
13463 * two #GFile<!-- -->s point to the same file you can query for the
13464 * %G_FILE_ATTRIBUTE_ID_FILE attribute. Note that #GFile does some trivial
13465 * canonicalization of pathnames passed in, so that trivial differences in the
13466 * path string used at creation (duplicated slashes, slash at end of path, "."
13467 * or ".." path segments, etc) does not create different #GFile<!-- -->s.
13469 * Many #GFile operations have both synchronous and asynchronous versions
13470 * to suit your application. Asynchronous versions of synchronous functions
13471 * simply have _async() appended to their function names. The asynchronous
13472 * I/O functions call a #GAsyncReadyCallback which is then used to finalize
13473 * the operation, producing a GAsyncResult which is then passed to the
13474 * function's matching _finish() operation.
13476 * Some #GFile operations do not have synchronous analogs, as they may
13477 * take a very long time to finish, and blocking may leave an application
13478 * unusable. Notable cases include:
13479 * g_file_mount_mountable() to mount a mountable file.
13480 * g_file_unmount_mountable_with_operation() to unmount a mountable file.
13481 * g_file_eject_mountable_with_operation() to eject a mountable file.
13483 * <para id="gfile-etag"><indexterm><primary>entity tag</primary></indexterm>
13484 * One notable feature of #GFile<!-- -->s are entity tags, or "etags" for
13485 * short. Entity tags are somewhat like a more abstract version of the
13486 * traditional mtime, and can be used to quickly determine if the file has
13487 * been modified from the version on the file system. See the HTTP 1.1
13488 * <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">specification</ulink>
13489 * for HTTP Etag headers, which are a very similar concept.
13495 * SECTION:gfileattribute
13496 * @short_description: Key-Value Paired File Attributes
13497 * @include: gio/gio.h
13498 * @see_also: #GFile, #GFileInfo
13500 * File attributes in GIO consist of a list of key-value pairs.
13502 * Keys are strings that contain a key namespace and a key name, separated
13503 * by a colon, e.g. "namespace:keyname". Namespaces are included to sort
13504 * key-value pairs by namespaces for relevance. Keys can be retrived
13505 * using wildcards, e.g. "standard::*" will return all of the keys in the
13506 * "standard" namespace.
13508 * Values are stored within the list in #GFileAttributeValue structures.
13509 * Values can store different types, listed in the enum #GFileAttributeType.
13510 * Upon creation of a #GFileAttributeValue, the type will be set to
13511 * %G_FILE_ATTRIBUTE_TYPE_INVALID.
13513 * The list of possible attributes for a filesystem (pointed to by a #GFile) is
13514 * available as a #GFileAttributeInfoList. This list is queryable by key names
13515 * as indicated earlier.
13517 * Classes that implement #GFileIface will create a #GFileAttributeInfoList and
13518 * install default keys and values for their given file system, architecture,
13519 * and other possible implementation details (e.g., on a UNIX system, a file
13520 * attribute key will be registered for the user id for a given file).
13524 * <title>GFileAttributes Default Namespaces</title>
13525 * <tgroup cols='2' align='left'><thead>
13526 * <row><entry>Namspace</entry><entry>Description</entry></row>
13529 * <row><entry>"standard"</entry><entry>The "Standard" namespace. General file
13530 * information that any application may need should be put in this namespace.
13531 * Examples include the file's name, type, and size.</entry></row>
13532 * <row><entry>"etag"</entry><entry>The <link linkend="gfile-etag">"Entity Tag"</link>
13533 * namespace. Currently, the only key in this namespace is "value", which contains
13534 * the value of the current entity tag.</entry></row>
13535 * <row><entry>"id"</entry><entry>The "Identification" namespace. This
13536 * namespace is used by file managers and applications that list directories
13537 * to check for loops and to uniquely identify files.</entry></row>
13538 * <row><entry>"access"</entry><entry>The "Access" namespace. Used to check
13539 * if a user has the proper privilidges to access files and perform
13540 * file operations. Keys in this namespace are made to be generic
13541 * and easily understood, e.g. the "can_read" key is %TRUE if
13542 * the current user has permission to read the file. UNIX permissions and
13543 * NTFS ACLs in Windows should be mapped to these values.</entry></row>
13544 * <row><entry>"mountable"</entry><entry>The "Mountable" namespace. Includes
13545 * simple boolean keys for checking if a file or path supports mount operations, e.g.
13546 * mount, unmount, eject. These are used for files of type %G_FILE_TYPE_MOUNTABLE.</entry></row>
13547 * <row><entry>"time"</entry><entry>The "Time" namespace. Includes file
13548 * access, changed, created times. </entry></row>
13549 * <row><entry>"unix"</entry><entry>The "Unix" namespace. Includes UNIX-specific
13550 * information and may not be available for all files. Examples include
13551 * the UNIX "UID", "GID", etc.</entry></row>
13552 * <row><entry>"dos"</entry><entry>The "DOS" namespace. Includes DOS-specific
13553 * information and may not be available for all files. Examples include
13554 * "is_system" for checking if a file is marked as a system file, and "is_archive"
13555 * for checking if a file is marked as an archive file.</entry></row>
13556 * <row><entry>"owner"</entry><entry>The "Owner" namespace. Includes information
13557 * about who owns a file. May not be available for all file systems. Examples include
13558 * "user" for getting the user name of the file owner. This information is often mapped from
13559 * some backend specific data such as a unix UID.</entry></row>
13560 * <row><entry>"thumbnail"</entry><entry>The "Thumbnail" namespace. Includes
13561 * information about file thumbnails and their location within the file system. Examples of
13562 * keys in this namespace include "path" to get the location of a thumbnail, and "failed"
13563 * to check if thumbnailing of the file failed.</entry></row>
13564 * <row><entry>"filesystem"</entry><entry>The "Filesystem" namespace. Gets information
13565 * about the file system where a file is located, such as its type, how much
13566 * space is left available, and the overall size of the file system.</entry></row>
13567 * <row><entry>"gvfs"</entry><entry>The "GVFS" namespace. Keys in this namespace
13568 * contain information about the current GVFS backend in use. </entry></row>
13569 * <row><entry>"xattr"</entry><entry>The "xattr" namespace. Gets information
13570 * about extended user attributes. See attr(5). The "user." prefix of the
13571 * extended user attribute name is stripped away when constructing keys in
13572 * this namespace, e.g. "xattr::mime_type" for the extended attribute with
13573 * the name "user.mime_type". Note that this information is only available
13574 * if GLib has been built with extended attribute support.</entry></row>
13575 * <row><entry>"xattr-sys"</entry><entry>The "xattr-sys" namespace.
13576 * Gets information about extended attributes which are not user-specific.
13577 * See attr(5). Note that this information is only available if GLib
13578 * has been built with extended attribute support.</entry></row>
13579 * <row><entry>"selinux"</entry><entry>The "SELinux" namespace. Includes
13580 * information about the SELinux context of files. Note that this information
13581 * is only available if GLib has been built with SELinux support.</entry></row>
13587 * Please note that these are not all of the possible namespaces.
13588 * More namespaces can be added from GIO modules or by individual applications.
13589 * For more information about writing GIO modules, see #GIOModule.
13591 * <!-- TODO: Implementation note about using extended attributes on supported
13595 * <title>GFileAttributes Built-in Keys and Value Types</title>
13596 * <tgroup cols='3' align='left'><thead>
13597 * <row><entry>Enum Value</entry><entry>Namespace:Key</entry><entry>Value Type</entry></row>
13599 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TYPE</entry><entry>standard::type</entry><entry>uint32 (#GFileType)</entry></row>
13600 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</entry><entry>standard::is-hidden</entry><entry>boolean</entry></row>
13601 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP</entry><entry>standard::is-backup</entry><entry>boolean</entry></row>
13602 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</entry><entry>standard::is-symlink</entry><entry>boolean</entry></row>
13603 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</entry><entry>standard::is-virtual</entry><entry>boolean</entry></row>
13604 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_NAME</entry><entry>standard::name</entry><entry>byte string</entry></row>
13605 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</entry><entry>standard::display-name</entry><entry>string</entry></row>
13606 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</entry><entry>standard::edit-name</entry><entry>string</entry></row>
13607 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ICON</entry><entry>standard::icon</entry><entry>object (#GIcon)</entry></row>
13608 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</entry><entry>standard::content-type</entry><entry>string</entry></row>
13609 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</entry><entry>standard::fast-content-type</entry><entry>string</entry></row>
13610 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SIZE</entry><entry>standard::size</entry><entry>uint64</entry></row>
13611 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE</entry><entry>standard::allocated-size</entry><entry>uint64</entry></row>
13612 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</entry><entry>standard::symlink-target</entry><entry>byte string</entry></row>
13613 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TARGET_URI</entry><entry>standard::target-uri</entry><entry>string</entry></row>
13614 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER</entry><entry>standard::sort-order</entry><entry>int32</entry></row>
13615 * <row><entry>%G_FILE_ATTRIBUTE_ETAG_VALUE</entry><entry>etag::value</entry><entry>string</entry></row>
13616 * <row><entry>%G_FILE_ATTRIBUTE_ID_FILE</entry><entry>id::file</entry><entry>string</entry></row>
13617 * <row><entry>%G_FILE_ATTRIBUTE_ID_FILESYSTEM</entry><entry>id::filesystem</entry><entry>string</entry></row>
13618 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_READ</entry><entry>access::can-read</entry><entry>boolean</entry></row>
13619 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE</entry><entry>access::can-write</entry><entry>boolean</entry></row>
13620 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</entry><entry>access::can-execute</entry><entry>boolean</entry></row>
13621 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE</entry><entry>access::can-delete</entry><entry>boolean</entry></row>
13622 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH</entry><entry>access::can-trash</entry><entry>boolean</entry></row>
13623 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME</entry><entry>access::can-rename</entry><entry>boolean</entry></row>
13624 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</entry><entry>mountable::can-mount</entry><entry>boolean</entry></row>
13625 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</entry><entry>mountable::can-unmount</entry><entry>boolean</entry></row>
13626 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</entry><entry>mountable::can-eject</entry><entry>boolean</entry></row>
13627 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</entry><entry>mountable::unix-device</entry><entry>uint32</entry></row>
13628 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE</entry><entry>mountable::unix-device-file</entry><entry>string</entry></row>
13629 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</entry><entry>mountable::hal-udi</entry><entry>string</entry></row>
13630 * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED</entry><entry>time::modified</entry><entry>uint64</entry></row>
13631 * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC</entry><entry>time::modified-usec</entry><entry>uint32</entry></row>
13632 * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS</entry><entry>time::access</entry><entry>uint64</entry></row>
13633 * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS_USEC</entry><entry>time::access-usec</entry><entry>uint32</entry></row>
13634 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED</entry><entry>time::changed</entry><entry>uint64</entry></row>
13635 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED_USEC</entry><entry>time::changed-usec</entry><entry>uint32</entry></row>
13636 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED</entry><entry>time::created</entry><entry>uint64</entry></row>
13637 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED_USEC</entry><entry>time::created-usec</entry><entry>uint32</entry></row>
13638 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_DEVICE</entry><entry>unix::device</entry><entry>uint32</entry></row>
13639 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_INODE</entry><entry>unix::inode</entry><entry>uint64</entry></row>
13640 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_MODE</entry><entry>unix::mode</entry><entry>uint32</entry></row>
13641 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_NLINK</entry><entry>unix::nlink</entry><entry>uint32</entry></row>
13642 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_UID</entry><entry>unix::uid</entry><entry>uint32</entry></row>
13643 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_GID</entry><entry>unix::gid</entry><entry>uint32</entry></row>
13644 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_RDEV</entry><entry>unix::rdev</entry><entry>uint32</entry></row>
13645 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</entry><entry>unix::block-size</entry><entry>uint32</entry></row>
13646 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCKS</entry><entry>unix::blocks</entry><entry>uint64</entry></row>
13647 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</entry><entry>unix::is-mountpoint</entry><entry>boolean</entry></row>
13648 * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE</entry><entry>dos::is-archive</entry><entry>boolean</entry></row>
13649 * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_SYSTEM</entry><entry>dos::is-system</entry><entry>boolean</entry></row>
13650 * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER</entry><entry>owner::user</entry><entry>string</entry></row>
13651 * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER_REAL</entry><entry>owner::user-real</entry><entry>string</entry></row>
13652 * <row><entry>%G_FILE_ATTRIBUTE_OWNER_GROUP</entry><entry>owner::group</entry><entry>string</entry></row>
13653 * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAIL_PATH</entry><entry>thumbnail::path</entry><entry>bytestring</entry></row>
13654 * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAILING_FAILED</entry><entry>thumbnail::failed</entry><entry>boolean</entry></row>
13655 * <row><entry>%G_FILE_ATTRIBUTE_PREVIEW_ICON</entry><entry>preview::icon</entry><entry>object (#GIcon)</entry></row>
13656 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_SIZE</entry><entry>filesystem::size</entry><entry>uint64</entry></row>
13657 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_FREE</entry><entry>filesystem::free</entry><entry>uint64</entry></row>
13658 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_USED</entry><entry>filesystem::used</entry><entry>uint64</entry></row>
13659 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_TYPE</entry><entry>filesystem::type</entry><entry>string</entry></row>
13660 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_READONLY</entry><entry>filesystem::readonly</entry><entry>boolean</entry></row>
13661 * <row><entry>%G_FILE_ATTRIBUTE_GVFS_BACKEND</entry><entry>gvfs::backend</entry><entry>string</entry></row>
13662 * <row><entry>%G_FILE_ATTRIBUTE_SELINUX_CONTEXT</entry><entry>selinux::context</entry><entry>string</entry></row>
13663 * </tbody></tgroup></table></para>
13665 * Note that there are no predefined keys in the "xattr" and "xattr-sys"
13666 * namespaces. Keys for the "xattr" namespace are constructed by stripping
13667 * away the "user." prefix from the extended user attribute, and prepending
13668 * "xattr::". Keys for the "xattr-sys" namespace are constructed by
13669 * concatenating "xattr-sys::" with the extended attribute name. All extended
13670 * attribute values are returned as hex-encoded strings in which bytes outside
13671 * the ASCII range are encoded as hexadecimal escape sequences of the form
13672 * \x<replaceable>nn</replaceable>.
13677 * SECTION:gfiledescriptorbased
13678 * @short_description: Interface for file descriptor based IO
13679 * @include: gio/gfiledescriptorbased.h
13680 * @see_also: #GInputStream, #GOutputStream
13682 * #GFileDescriptorBased is implemented by streams (implementations of
13683 * #GInputStream or #GOutputStream) that are based on file descriptors.
13685 * Note that <filename><gio/gfiledescriptorbased.h></filename> belongs to
13686 * the UNIX-specific GIO interfaces, thus you have to use the
13687 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
13694 * SECTION:gfileenumerator
13695 * @short_description: Enumerated Files Routines
13696 * @include: gio/gio.h
13698 * #GFileEnumerator allows you to operate on a set of #GFile<!-- -->s,
13699 * returning a #GFileInfo structure for each file enumerated (e.g.
13700 * g_file_enumerate_children() will return a #GFileEnumerator for each
13701 * of the children within a directory).
13703 * To get the next file's information from a #GFileEnumerator, use
13704 * g_file_enumerator_next_file() or its asynchronous version,
13705 * g_file_enumerator_next_files_async(). Note that the asynchronous
13706 * version will return a list of #GFileInfo<!---->s, whereas the
13707 * synchronous will only return the next file in the enumerator.
13709 * To close a #GFileEnumerator, use g_file_enumerator_close(), or
13710 * its asynchronous version, g_file_enumerator_close_async(). Once
13711 * a #GFileEnumerator is closed, no further actions may be performed
13712 * on it, and it should be freed with g_object_unref().
13717 * SECTION:gfileicon
13718 * @short_description: Icons pointing to an image file
13719 * @include: gio/gio.h
13720 * @see_also: #GIcon, #GLoadableIcon
13722 * #GFileIcon specifies an icon by pointing to an image file
13723 * to be used as icon.
13728 * SECTION:gfileinfo
13729 * @short_description: File Information and Attributes
13730 * @include: gio/gio.h
13731 * @see_also: #GFile, <link linkend="gio-GFileAttribute">GFileAttribute</link>
13733 * Functionality for manipulating basic metadata for files. #GFileInfo
13734 * implements methods for getting information that all files should
13735 * contain, and allows for manipulation of extended attributes.
13737 * See <link linkend="gio-GFileAttribute">GFileAttribute</link> for more
13738 * information on how GIO handles file attributes.
13740 * To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its
13741 * async variant). To obtain a #GFileInfo for a file input or output
13742 * stream, use g_file_input_stream_query_info() or
13743 * g_file_output_stream_query_info() (or their async variants).
13745 * To change the actual attributes of a file, you should then set the
13746 * attribute in the #GFileInfo and call g_file_set_attributes_from_info()
13747 * or g_file_set_attributes_async() on a GFile.
13749 * However, not all attributes can be changed in the file. For instance,
13750 * the actual size of a file cannot be changed via g_file_info_set_size().
13751 * You may call g_file_query_settable_attributes() and
13752 * g_file_query_writable_namespaces() to discover the settable attributes
13753 * of a particular file at runtime.
13755 * #GFileAttributeMatcher allows for searching through a #GFileInfo for
13761 * SECTION:gfileinputstream
13762 * @short_description: File input streaming operations
13763 * @include: gio/gio.h
13764 * @see_also: #GInputStream, #GDataInputStream, #GSeekable
13766 * GFileInputStream provides input streams that take their
13767 * content from a file.
13769 * GFileInputStream implements #GSeekable, which allows the input
13770 * stream to jump to arbitrary positions in the file, provided the
13771 * filesystem of the file allows it. To find the position of a file
13772 * input stream, use g_seekable_tell(). To find out if a file input
13773 * stream supports seeking, use g_seekable_stream_can_seek().
13774 * To position a file input stream, use g_seekable_seek().
13779 * SECTION:gfileiostream
13780 * @short_description: File read and write streaming operations
13781 * @include: gio/gio.h
13782 * @see_also: #GIOStream, #GFileInputStream, #GFileOutputStream, #GSeekable
13784 * GFileIOStream provides io streams that both read and write to the same
13787 * GFileIOStream implements #GSeekable, which allows the io
13788 * stream to jump to arbitrary positions in the file and to truncate
13789 * the file, provided the filesystem of the file supports these
13792 * To find the position of a file io stream, use
13793 * g_seekable_tell().
13795 * To find out if a file io stream supports seeking, use g_seekable_can_seek().
13796 * To position a file io stream, use g_seekable_seek().
13797 * To find out if a file io stream supports truncating, use
13798 * g_seekable_can_truncate(). To truncate a file io
13799 * stream, use g_seekable_truncate().
13801 * The default implementation of all the #GFileIOStream operations
13802 * and the implementation of #GSeekable just call into the same operations
13803 * on the output stream.
13810 * SECTION:gfilemonitor
13811 * @short_description: File Monitor
13812 * @include: gio/gio.h
13814 * Monitors a file or directory for changes.
13816 * To obtain a #GFileMonitor for a file or directory, use
13817 * g_file_monitor(), g_file_monitor_file(), or
13818 * g_file_monitor_directory().
13820 * To get informed about changes to the file or directory you are
13821 * monitoring, connect to the #GFileMonitor::changed signal. The
13822 * signal will be emitted in the <link
13823 * linkend="g-main-context-push-thread-default">thread-default main
13824 * context</link> of the thread that the monitor was created in
13825 * (though if the global default main context is blocked, this may
13826 * cause notifications to be blocked even if the thread-default
13827 * context is still running).
13832 * SECTION:gfilenamecompleter
13833 * @short_description: Filename Completer
13834 * @include: gio/gio.h
13836 * Completes partial file and directory names given a partial string by
13837 * looking in the file system for clues. Can return a list of possible
13838 * completion strings for widget implementations.
13843 * SECTION:gfileoutputstream
13844 * @short_description: File output streaming operations
13845 * @include: gio/gio.h
13846 * @see_also: #GOutputStream, #GDataOutputStream, #GSeekable
13848 * GFileOutputStream provides output streams that write their
13849 * content to a file.
13851 * GFileOutputStream implements #GSeekable, which allows the output
13852 * stream to jump to arbitrary positions in the file and to truncate
13853 * the file, provided the filesystem of the file supports these
13856 * To find the position of a file output stream, use g_seekable_tell().
13857 * To find out if a file output stream supports seeking, use
13858 * g_seekable_can_seek().To position a file output stream, use
13859 * g_seekable_seek(). To find out if a file output stream supports
13860 * truncating, use g_seekable_can_truncate(). To truncate a file output
13861 * stream, use g_seekable_truncate().
13866 * SECTION:gfilterinputstream
13867 * @short_description: Filter Input Stream
13868 * @include: gio/gio.h
13870 * Base class for input stream implementations that perform some
13871 * kind of filtering operation on a base stream. Typical examples
13872 * of filtering operations are character set conversion, compression
13873 * and byte order flipping.
13878 * SECTION:gfilteroutputstream
13879 * @short_description: Filter Output Stream
13880 * @include: gio/gio.h
13882 * Base class for output stream implementations that perform some
13883 * kind of filtering operation on a base stream. Typical examples
13884 * of filtering operations are character set conversion, compression
13885 * and byte order flipping.
13891 * @short_description: Interface for icons
13892 * @include: gio/gio.h
13894 * #GIcon is a very minimal interface for icons. It provides functions
13895 * for checking the equality of two icons, hashing of icons and
13896 * serializing an icon to and from strings.
13898 * #GIcon does not provide the actual pixmap for the icon as this is out
13899 * of GIO's scope, however implementations of #GIcon may contain the name
13900 * of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon).
13902 * To obtain a hash of a #GIcon, see g_icon_hash().
13904 * To check if two #GIcons are equal, see g_icon_equal().
13906 * For serializing a #GIcon, use g_icon_to_string() and
13907 * g_icon_new_for_string().
13909 * If your application or library provides one or more #GIcon
13910 * implementations you need to ensure that each #GType is registered
13911 * with the type system prior to calling g_icon_new_for_string().
13916 * SECTION:ginetaddress
13917 * @short_description: An IPv4/IPv6 address
13919 * #GInetAddress represents an IPv4 or IPv6 internet address. Use
13920 * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_async() to
13921 * look up the #GInetAddress for a hostname. Use
13922 * g_resolver_lookup_by_address() or
13923 * g_resolver_lookup_by_address_async() to look up the hostname for a
13926 * To actually connect to a remote host, you will need a
13927 * #GInetSocketAddress (which includes a #GInetAddress as well as a
13933 * SECTION:ginetaddressmask
13934 * @short_description: An IPv4/IPv6 address mask
13936 * #GInetAddressMask represents a range of IPv4 or IPv6 addresses
13937 * described by a base address and a length indicating how many bits
13938 * of the base address are relevant for matching purposes. These are
13939 * often given in string form. Eg, "10.0.0.0/8", or "fe80::/10".
13944 * SECTION:ginetsocketaddress
13945 * @short_description: Internet GSocketAddress
13947 * An IPv4 or IPv6 socket address; that is, the combination of a
13948 * #GInetAddress and a port number.
13953 * SECTION:ginitable
13954 * @short_description: Failable object initialization interface
13955 * @include: gio/gio.h
13956 * @see_also: #GAsyncInitable
13958 * #GInitable is implemented by objects that can fail during
13959 * initialization. If an object implements this interface then
13960 * it must be initialized as the first thing after construction,
13961 * either via g_initable_init() or g_async_initable_init_async()
13962 * (the latter is only available if it also implements #GAsyncInitable).
13964 * If the object is not initialized, or initialization returns with an
13965 * error, then all operations on the object except g_object_ref() and
13966 * g_object_unref() are considered to be invalid, and have undefined
13967 * behaviour. They will often fail with g_critical() or g_warning(), but
13968 * this must not be relied on.
13970 * Users of objects implementing this are not intended to use
13971 * the interface method directly, instead it will be used automatically
13972 * in various ways. For C applications you generally just call
13973 * g_initable_new() directly, or indirectly via a foo_thing_new() wrapper.
13974 * This will call g_initable_init() under the cover, returning %NULL and
13975 * setting a #GError on failure (at which point the instance is
13978 * For bindings in languages where the native constructor supports
13979 * exceptions the binding could check for objects implemention %GInitable
13980 * during normal construction and automatically initialize them, throwing
13981 * an exception on failure.
13986 * SECTION:ginputstream
13987 * @short_description: Base class for implementing streaming input
13988 * @include: gio/gio.h
13990 * GInputStream has functions to read from a stream (g_input_stream_read()),
13991 * to close a stream (g_input_stream_close()) and to skip some content
13992 * (g_input_stream_skip()).
13994 * To copy the content of an input stream to an output stream without
13995 * manually handling the reads and writes, use g_output_stream_splice().
13997 * All of these functions have async variants too.
14003 * @short_description: Error helper functions
14004 * @include: gio/gio.h
14006 * Contains helper functions for reporting errors to the user.
14011 * SECTION:giomodule
14012 * @short_description: Loadable GIO Modules
14013 * @include: gio/gio.h
14015 * Provides an interface and default functions for loading and unloading
14016 * modules. This is used internally to make GIO extensible, but can also
14017 * be used by others to implement module loading.
14022 * SECTION:gioscheduler
14023 * @short_description: I/O Scheduler
14024 * @include: gio/gio.h
14026 * Schedules asynchronous I/O operations. #GIOScheduler integrates
14027 * into the main event loop (#GMainLoop) and uses threads.
14029 * <para id="io-priority"><indexterm><primary>I/O priority</primary></indexterm>
14030 * Each I/O operation has a priority, and the scheduler uses the priorities
14031 * to determine the order in which operations are executed. They are
14032 * <emphasis>not</emphasis> used to determine system-wide I/O scheduling.
14033 * Priorities are integers, with lower numbers indicating higher priority.
14034 * It is recommended to choose priorities between %G_PRIORITY_LOW and
14035 * %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT as a default.
14041 * SECTION:giostream
14042 * @short_description: Base class for implementing read/write streams
14043 * @include: gio/gio.h
14044 * @see_also: #GInputStream, #GOutputStream
14046 * GIOStream represents an object that has both read and write streams.
14047 * Generally the two streams acts as separate input and output streams,
14048 * but they share some common resources and state. For instance, for
14049 * seekable streams they may use the same position in both streams.
14051 * Examples of #GIOStream objects are #GSocketConnection which represents
14052 * a two-way network connection, and #GFileIOStream which represent a
14053 * file handle opened in read-write mode.
14055 * To do the actual reading and writing you need to get the substreams
14056 * with g_io_stream_get_input_stream() and g_io_stream_get_output_stream().
14058 * The #GIOStream object owns the input and the output streams, not the other
14059 * way around, so keeping the substreams alive will not keep the #GIOStream
14060 * object alive. If the #GIOStream object is freed it will be closed, thus
14061 * closing the substream, so even if the substreams stay alive they will
14062 * always just return a %G_IO_ERROR_CLOSED for all operations.
14064 * To close a stream use g_io_stream_close() which will close the common
14065 * stream object and also the individual substreams. You can also close
14066 * the substreams themselves. In most cases this only marks the
14067 * substream as closed, so further I/O on it fails. However, some streams
14068 * may support "half-closed" states where one direction of the stream
14069 * is actually shut down.
14076 * SECTION:gloadableicon
14077 * @short_description: Loadable Icons
14078 * @include: gio/gio.h
14079 * @see_also: #GIcon, #GThemedIcon
14081 * Extends the #GIcon interface and adds the ability to
14082 * load icons from streams.
14087 * SECTION:gmemoryinputstream
14088 * @short_description: Streaming input operations on memory chunks
14089 * @include: gio/gio.h
14090 * @see_also: #GMemoryOutputStream
14092 * #GMemoryInputStream is a class for using arbitrary
14093 * memory chunks as input for GIO streaming input operations.
14098 * SECTION:gmemoryoutputstream
14099 * @short_description: Streaming output operations on memory chunks
14100 * @include: gio/gio.h
14101 * @see_also: #GMemoryInputStream
14103 * #GMemoryOutputStream is a class for using arbitrary
14104 * memory chunks as output for GIO streaming output operations.
14111 * @short_description: A simple implementation of GMenuModel
14113 * #GMenu is a simple implementation of #GMenuModel.
14114 * You populate a #GMenu by adding #GMenuItem instances to it.
14116 * There are some convenience functions to allow you to directly
14117 * add items (avoiding #GMenuItem) for the common cases. To add
14118 * a regular item, use g_menu_insert(). To add a section, use
14119 * g_menu_insert_section(). To add a submenu, use
14120 * g_menu_insert_submenu().
14122 * Often it is more convenient to create a #GMenu from an XML
14123 * fragment, using <link linkend="gio-GMenu-Markup">GMenu Markup</link>.
14128 * SECTION:gmenuexporter
14129 * @title: GMenuModel exporter
14130 * @short_description: Export GMenuModels on D-Bus
14131 * @see_also: #GMenuModel, #GDBusMenuModel
14133 * These functions support exporting a #GMenuModel on D-Bus.
14134 * The D-Bus interface that is used is a private implementation
14137 * To access an exported #GMenuModel remotely, use
14138 * g_dbus_menu_model_get() to obtain a #GDBusMenuModel.
14143 * SECTION:gmenumarkup
14144 * @title: GMenu Markup
14145 * @short_description: parsing and printing GMenuModel XML
14147 * The functions here allow to instantiate #GMenuModels by parsing
14148 * fragments of an XML document.
14149 * * The XML format for #GMenuModel consists of a toplevel
14150 * <tag class="starttag">menu</tag> element, which contains one or more
14151 * <tag class="starttag">item</tag> elements. Each <tag class="starttag">item</tag>
14152 * element contains <tag class="starttag">attribute</tag> and <tag class="starttag">link</tag>
14153 * elements with a mandatory name attribute.
14154 * <tag class="starttag">link</tag> elements have the same content
14155 * model as <tag class="starttag">menu</tag>.
14157 * Here is the XML for <xref linkend="menu-example"/>:
14158 * |[<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/menumarkup2.xml"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include>]|
14160 * The parser also understands a somewhat less verbose format, in which
14161 * attributes are encoded as actual XML attributes of <tag class="starttag">item</tag>
14162 * elements, and <tag class="starttag">link</tag> elements are replaced by
14163 * <tag class="starttag">section</tag> and <tag class="starttag">submenu</tag> elements.
14165 * Here is how the example looks in this format:
14166 * |[<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/menumarkup.xml"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include>]|
14168 * The parser can obtaing translations for attribute values using gettext.
14169 * To make use of this, the <tag class="starttag">menu</tag> element must
14170 * have a domain attribute which specifies the gettext domain to use, and
14171 * <tag class="starttag">attribute</tag> elements can be marked for translation
14172 * with a <literal>translatable="yes"</literal> attribute. It is also possible
14173 * to specify message context and translator comments, using the context
14174 * and comments attributes.
14176 * The following DTD describes the XML format approximately:
14177 * |[<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/menumarkup.dtd"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include>]|
14179 * To serialize a #GMenuModel into an XML fragment, use
14180 * g_menu_markup_print_string().
14185 * SECTION:gmenumodel
14186 * @title: GMenuModel
14187 * @short_description: An abstract class representing the contents of a menu
14188 * @see_also: #GActionGroup
14190 * #GMenuModel represents the contents of a menu -- an ordered list of
14191 * menu items. The items are associated with actions, which can be
14192 * activated through them. Items can be grouped in sections, and may
14193 * have submenus associated with them. Both items and sections usually
14194 * have some representation data, such as labels or icons. The type of
14195 * the associated action (ie whether it is stateful, and what kind of
14196 * state it has) can influence the representation of the item.
14198 * The conceptual model of menus in #GMenuModel is hierarchical:
14199 * sections and submenus are again represented by #GMenuModels.
14200 * Menus themselves do not define their own roles. Rather, the role
14201 * of a particular #GMenuModel is defined by the item that references
14202 * it (or, in the case of the 'root' menu, is defined by the context
14203 * in which it is used).
14205 * As an example, consider the visible portions of the menu in
14206 * <xref linkend="menu-example"/>.
14208 * <figure id="menu-example">
14209 * <title>An example menu</title>
14210 * <graphic fileref="menu-example.png" format="PNG"></graphic>
14213 * There are 8 "menus" visible in the screenshot: one menubar, two
14214 * submenus and 5 sections:
14216 * <listitem>the toplevel menubar (containing 4 items)</listitem>
14217 * <listitem>the View submenu (containing 3 sections)</listitem>
14218 * <listitem>the first section of the View submenu (containing 2 items)</listitem>
14219 * <listitem>the second section of the View submenu (containing 1 item)</listitem>
14220 * <listitem>the final section of the View submenu (containing 1 item)</listitem>
14221 * <listitem>the Highlight Mode submenu (containing 2 sections)</listitem>
14222 * <listitem>the Sources section (containing 2 items)</listitem>
14223 * <listitem>the Markup section (containing 2 items)</listitem>
14226 * <xref linkend="menu-model"/> illustrates the conceptual connection between
14227 * these 8 menus. Each large block in the figure represents a menu and the
14228 * smaller blocks within the large block represent items in that menu. Some
14229 * items contain references to other menus.
14231 * <figure id="menu-model">
14232 * <title>A menu model</title>
14233 * <graphic fileref="menu-model.png" format="PNG"></graphic>
14236 * Notice that the separators visible in <xref linkend="menu-example"/>
14237 * appear nowhere in <xref linkend="menu-model"/>. This is because
14238 * separators are not explicitly represented in the menu model. Instead,
14239 * a separator is inserted between any two non-empty sections of a menu.
14240 * Section items can have labels just like any other item. In that case,
14241 * a display system may show a section header instead of a separator.
14243 * The motivation for this abstract model of application controls is
14244 * that modern user interfaces tend to make these controls available
14245 * outside the application. Examples include global menus, jumplists,
14246 * dash boards, etc. To support such uses, it is necessary to 'export'
14247 * information about actions and their representation in menus, which
14248 * is exactly what the
14249 * <link linkend="gio-GActionGroup-exporter">GActionGroup exporter</link>
14251 * <link linkend="gio-GMenuModel-exporter">GMenuModel exporter</link>
14252 * do for #GActionGroup and #GMenuModel. The client-side counterparts
14253 * to make use of the exported information are #GDBusActionGroup and
14256 * The API of #GMenuModel is very generic, with iterators for the
14257 * attributes and links of an item, see g_menu_model_iterate_item_attributes()
14258 * and g_menu_model_iterate_item_links(). The 'standard' attributes and
14259 * link types have predefined names: %G_MENU_ATTRIBUTE_LABEL,
14260 * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, %G_MENU_LINK_SECTION
14261 * and %G_MENU_LINK_SUBMENU.
14263 * Items in a #GMenuModel represent active controls if they refer to
14264 * an action that can get activated when the user interacts with the
14265 * menu item. The reference to the action is encoded by the string id
14266 * in the %G_MENU_ATTRIBUTE_ACTION attribute. An action id uniquely
14267 * identifies an action in an action group. Which action group(s) provide
14268 * actions depends on the context in which the menu model is used.
14269 * E.g. when the model is exported as the application menu of a
14270 * #GtkApplication, actions can be application-wide or window-specific
14271 * (and thus come from two different action groups). By convention, the
14272 * application-wide actions have names that start with "app.", while the
14273 * names of window-specific actions start with "win.".
14275 * While a wide variety of stateful actions is possible, the following
14276 * is the minimum that is expected to be supported by all users of exported
14277 * menu information:
14279 * <listitem>an action with no parameter type and no state</listitem>
14280 * <listitem>an action with no parameter type and boolean state</listitem>
14281 * <listitem>an action with string parameter type and string state</listitem>
14284 * <formalpara><title>Stateless</title>
14286 * A stateless action typically corresponds to an ordinary menu item.
14289 * Selecting such a menu item will activate the action (with no parameter).
14293 * <formalpara><title>Boolean State</title>
14295 * An action with a boolean state will most typically be used with a "toggle"
14296 * or "switch" menu item. The state can be set directly, but activating the
14297 * action (with no parameter) results in the state being toggled.
14300 * Selecting a toggle menu item will activate the action. The menu item should
14301 * be rendered as "checked" when the state is true.
14305 * <formalpara><title>String Parameter and State</title>
14307 * Actions with string parameters and state will most typically be used to
14308 * represent an enumerated choice over the items available for a group of
14309 * radio menu items. Activating the action with a string parameter is
14310 * equivalent to setting that parameter as the state.
14313 * Radio menu items, in addition to being associated with the action, will
14314 * have a target value. Selecting that menu item will result in activation
14315 * of the action with the target value as the parameter. The menu item should
14316 * be rendered as "selected" when the state of the action is equal to the
14317 * target value of the menu item.
14325 * @short_description: Mount management
14326 * @include: gio/gio.h
14327 * @see_also: GVolume, GUnixMount
14329 * The #GMount interface represents user-visible mounts. Note, when
14330 * porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.
14332 * #GMount is a "mounted" filesystem that you can access. Mounted is in
14333 * quotes because it's not the same as a unix mount, it might be a gvfs
14334 * mount, but you can still access the files on it if you use GIO. Might or
14335 * might not be related to a volume object.
14337 * Unmounting a #GMount instance is an asynchronous operation. For
14338 * more information about asynchronous operations, see #GAsyncReady
14339 * and #GSimpleAsyncReady. To unmount a #GMount instance, first call
14340 * g_mount_unmount_with_operation() with (at least) the #GMount instance and a
14341 * #GAsyncReadyCallback. The callback will be fired when the
14342 * operation has resolved (either with success or failure), and a
14343 * #GAsyncReady structure will be passed to the callback. That
14344 * callback should then call g_mount_unmount_with_operation_finish() with the #GMount
14345 * and the #GAsyncReady data to see if the operation was completed
14346 * successfully. If an @error is present when g_mount_unmount_with_operation_finish()
14347 * is called, then it will be filled with any error information.
14352 * SECTION:gmountoperation
14353 * @short_description: Object used for authentication and user interaction
14354 * @include: gio/gio.h
14356 * #GMountOperation provides a mechanism for interacting with the user.
14357 * It can be used for authenticating mountable operations, such as loop
14358 * mounting files, hard drive partitions or server locations. It can
14359 * also be used to ask the user questions or show a list of applications
14360 * preventing unmount or eject operations from completing.
14362 * Note that #GMountOperation is used for more than just #GMount
14363 * objects – for example it is also used in g_drive_start() and
14366 * Users should instantiate a subclass of this that implements all the
14367 * various callbacks to show the required dialogs, such as
14368 * #GtkMountOperation. If no user interaction is desired (for example
14369 * when automounting filesystems at login time), usually %NULL can be
14370 * passed, see each method taking a #GMountOperation for details.
14375 * SECTION:gnetworkaddress
14376 * @short_description: A GSocketConnectable for resolving hostnames
14377 * @include: gio/gio.h
14379 * #GNetworkAddress provides an easy way to resolve a hostname and
14380 * then attempt to connect to that host, handling the possibility of
14381 * multiple IP addresses and multiple address families.
14383 * See #GSocketConnectable for and example of using the connectable
14389 * SECTION:gnetworkmonitor
14390 * @title: GNetworkMonitor
14391 * @short_description: Network status monitor
14392 * @include: gio/gio.h
14399 * SECTION:gnetworkservice
14400 * @short_description: A GSocketConnectable for resolving SRV records
14401 * @include: gio/gio.h
14403 * Like #GNetworkAddress does with hostnames, #GNetworkService
14404 * provides an easy way to resolve a SRV record, and then attempt to
14405 * connect to one of the hosts that implements that service, handling
14406 * service priority/weighting, multiple IP addresses, and multiple
14407 * address families.
14409 * See #GSrvTarget for more information about SRV records, and see
14410 * #GSocketConnectable for and example of using the connectable
14416 * SECTION:goutputstream
14417 * @short_description: Base class for implementing streaming output
14418 * @include: gio/gio.h
14420 * GOutputStream has functions to write to a stream (g_output_stream_write()),
14421 * to close a stream (g_output_stream_close()) and to flush pending writes
14422 * (g_output_stream_flush()).
14424 * To copy the content of an input stream to an output stream without
14425 * manually handling the reads and writes, use g_output_stream_splice().
14427 * All of these functions have async variants too.
14432 * SECTION:gpermission
14433 * @title: GPermission
14434 * @short_description: An object representing the permission to perform a certain action
14436 * A #GPermission represents the status of the caller's permission to
14437 * perform a certain action.
14439 * You can query if the action is currently allowed and if it is
14440 * possible to acquire the permission so that the action will be allowed
14443 * There is also an API to actually acquire the permission and one to
14446 * As an example, a #GPermission might represent the ability for the
14447 * user to write to a #GSettings object. This #GPermission object could
14448 * then be used to decide if it is appropriate to show a "Click here to
14449 * unlock" button in a dialog and to provide the mechanism to invoke
14450 * when that button is clicked.
14455 * SECTION:gpollableinputstream
14456 * @short_description: Interface for pollable input streams
14457 * @include: gio/gio.h
14458 * @see_also: #GInputStream, #GPollableOutputStream, #GFileDescriptorBased
14460 * #GPollableInputStream is implemented by #GInputStream<!-- -->s that
14461 * can be polled for readiness to read. This can be used when
14462 * interfacing with a non-GIO API that expects
14463 * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
14470 * SECTION:gpollableoutputstream
14471 * @short_description: Interface for pollable output streams
14472 * @include: gio/gio.h
14473 * @see_also: #GOutputStream, #GFileDescriptorBased, #GPollableInputStream
14475 * #GPollableOutputStream is implemented by #GOutputStream<!-- -->s that
14476 * can be polled for readiness to write. This can be used when
14477 * interfacing with a non-GIO API that expects
14478 * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
14486 * @short_description: Interface for proxy handling
14488 * A #GProxy handles connecting to a remote host via a given type of
14489 * proxy server. It is implemented by the 'gio-proxy' extension point.
14490 * The extensions are named after their proxy protocol name. As an
14491 * example, a SOCKS5 proxy implementation can be retrieved with the
14492 * name 'socks5' using the function
14493 * g_io_extension_point_get_extension_by_name().
14500 * SECTION:gproxyaddress
14501 * @short_description: An internet address with proxy information
14503 * Support for proxied #GInetSocketAddress.
14508 * SECTION:gproxyresolver
14509 * @short_description: Asynchronous and cancellable network proxy resolver
14510 * @include: gio/gio.h
14512 * #GProxyResolver provides synchronous and asynchronous network proxy
14513 * resolution. #GProxyResolver is used within #GSocketClient through
14514 * the method g_socket_connectable_proxy_enumerate().
14519 * SECTION:gremoteactiongroup
14520 * @title: GRemoteActionGroup
14521 * @short_description: a #GActionGroup that interacts with other processes
14523 * The GRemoteActionGroup interface is implemented by #GActionGroup
14524 * instances that either transmit action invocations to other processes
14525 * or receive action invocations in the local process from other
14528 * The interface has <literal>_full</literal> variants of the two
14529 * methods on #GActionGroup used to activate actions:
14530 * g_action_group_activate_action() and
14531 * g_action_group_change_action_state(). These variants allow a
14532 * "platform data" #GVariant to be specified: a dictionary providing
14533 * context for the action invocation (for example: timestamps, startup
14534 * notification IDs, etc).
14536 * #GDBusActionGroup implements #GRemoteActionGroup. This provides a
14537 * mechanism to send platform data for action invocations over D-Bus.
14539 * Additionally, g_dbus_connection_export_action_group() will check if
14540 * the exported #GActionGroup implements #GRemoteActionGroup and use the
14541 * <literal>_full</literal> variants of the calls if available. This
14542 * provides a mechanism by which to receive platform data for action
14543 * invocations that arrive by way of D-Bus.
14550 * SECTION:gresolver
14551 * @short_description: Asynchronous and cancellable DNS resolver
14552 * @include: gio/gio.h
14554 * #GResolver provides cancellable synchronous and asynchronous DNS
14555 * resolution, for hostnames (g_resolver_lookup_by_address(),
14556 * g_resolver_lookup_by_name() and their async variants) and SRV
14557 * (service) records (g_resolver_lookup_service()).
14559 * #GNetworkAddress and #GNetworkService provide wrappers around
14560 * #GResolver functionality that also implement #GSocketConnectable,
14561 * making it easy to connect to a remote host/service.
14566 * SECTION:gseekable
14567 * @short_description: Stream seeking interface
14568 * @include: gio/gio.h
14569 * @see_also: #GInputStream, #GOutputStream
14571 * #GSeekable is implemented by streams (implementations of
14572 * #GInputStream or #GOutputStream) that support seeking.
14577 * SECTION:gsettings
14578 * @short_description: High-level API for application settings
14580 * The #GSettings class provides a convenient API for storing and retrieving
14581 * application settings.
14583 * Reads and writes can be considered to be non-blocking. Reading
14584 * settings with #GSettings is typically extremely fast: on
14585 * approximately the same order of magnitude (but slower than) a
14586 * #GHashTable lookup. Writing settings is also extremely fast in terms
14587 * of time to return to your application, but can be extremely expensive
14588 * for other threads and other processes. Many settings backends
14589 * (including dconf) have lazy initialisation which means in the common
14590 * case of the user using their computer without modifying any settings
14591 * a lot of work can be avoided. For dconf, the D-Bus service doesn't
14592 * even need to be started in this case. For this reason, you should
14593 * only ever modify #GSettings keys in response to explicit user action.
14594 * Particular care should be paid to ensure that modifications are not
14595 * made during startup -- for example, when setting the initial value
14596 * of preferences widgets. The built-in g_settings_bind() functionality
14597 * is careful not to write settings in response to notify signals as a
14598 * result of modifications that it makes to widgets.
14600 * When creating a GSettings instance, you have to specify a schema
14601 * that describes the keys in your settings and their types and default
14602 * values, as well as some other information.
14604 * Normally, a schema has as fixed path that determines where the settings
14605 * are stored in the conceptual global tree of settings. However, schemas
14606 * can also be 'relocatable', i.e. not equipped with a fixed path. This is
14607 * useful e.g. when the schema describes an 'account', and you want to be
14608 * able to store a arbitrary number of accounts.
14610 * Unlike other configuration systems (like GConf), GSettings does not
14611 * restrict keys to basic types like strings and numbers. GSettings stores
14612 * values as #GVariant, and allows any #GVariantType for keys. Key names
14613 * are restricted to lowercase characters, numbers and '-'. Furthermore,
14614 * the names must begin with a lowercase character, must not end
14615 * with a '-', and must not contain consecutive dashes.
14617 * Similar to GConf, the default values in GSettings schemas can be
14618 * localized, but the localized values are stored in gettext catalogs
14619 * and looked up with the domain that is specified in the
14620 * <tag class="attribute">gettext-domain</tag> attribute of the
14621 * <tag class="starttag">schemalist</tag> or <tag class="starttag">schema</tag>
14622 * elements and the category that is specified in the l10n attribute of the
14623 * <tag class="starttag">key</tag> element.
14625 * GSettings uses schemas in a compact binary form that is created
14626 * by the <link linkend="glib-compile-schemas">glib-compile-schemas</link>
14627 * utility. The input is a schema description in an XML format that can be
14628 * described by the following DTD:
14629 * |[<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>]|
14631 * glib-compile-schemas expects schema files to have the extension <filename>.gschema.xml</filename>
14633 * At runtime, schemas are identified by their id (as specified
14634 * in the <tag class="attribute">id</tag> attribute of the
14635 * <tag class="starttag">schema</tag> element). The
14636 * convention for schema ids is to use a dotted name, similar in
14637 * style to a D-Bus bus name, e.g. "org.gnome.SessionManager". In particular,
14638 * if the settings are for a specific service that owns a D-Bus bus name,
14639 * the D-Bus bus name and schema id should match. For schemas which deal
14640 * with settings not associated with one named application, the id should
14641 * not use StudlyCaps, e.g. "org.gnome.font-rendering".
14643 * In addition to #GVariant types, keys can have types that have enumerated
14644 * types. These can be described by a <tag class="starttag">choice</tag>,
14645 * <tag class="starttag">enum</tag> or <tag class="starttag">flags</tag> element, see
14646 * <xref linkend="schema-enumerated"/>. The underlying type of
14647 * such a key is string, but you can use g_settings_get_enum(),
14648 * g_settings_set_enum(), g_settings_get_flags(), g_settings_set_flags()
14649 * access the numeric values corresponding to the string value of enum
14652 * <example id="schema-default-values"><title>Default values</title>
14653 * <programlisting><![CDATA[
14655 * <schema id="org.gtk.Test" path="/tests/" gettext-domain="test">
14657 * <key name="greeting" type="s">
14658 * <default l10n="messages">"Hello, earthlings"</default>
14659 * <summary>A greeting</summary>
14661 * Greeting of the invading martians
14665 * <key name="box" type="(ii)">
14666 * <default>(20,30)</default>
14671 * ]]></programlisting></example>
14673 * <example id="schema-enumerated"><title>Ranges, choices and enumerated types</title>
14674 * <programlisting><![CDATA[
14677 * <enum id="org.gtk.Test.myenum">
14678 * <value nick="first" value="1"/>
14679 * <value nick="second" value="2"/>
14682 * <flags id="org.gtk.Test.myflags">
14683 * <value nick="flag1" value="1"/>
14684 * <value nick="flag2" value="2"/>
14685 * <value nick="flag3" value="4"/>
14688 * <schema id="org.gtk.Test">
14690 * <key name="key-with-range" type="i">
14691 * <range min="1" max="100"/>
14692 * <default>10</default>
14695 * <key name="key-with-choices" type="s">
14697 * <choice value='Elisabeth'/>
14698 * <choice value='Annabeth'/>
14699 * <choice value='Joe'/>
14702 * <alias value='Anna' target='Annabeth'/>
14703 * <alias value='Beth' target='Elisabeth'/>
14705 * <default>'Joe'</default>
14708 * <key name='enumerated-key' enum='org.gtk.Test.myenum'>
14709 * <default>'first'</default>
14712 * <key name='flags-key' flags='org.gtk.Test.myflags'>
14713 * <default>["flag1",flag2"]</default>
14717 * ]]></programlisting></example>
14720 * <title>Vendor overrides</title>
14722 * Default values are defined in the schemas that get installed by
14723 * an application. Sometimes, it is necessary for a vendor or distributor
14724 * to adjust these defaults. Since patching the XML source for the schema
14725 * is inconvenient and error-prone,
14726 * <link linkend="glib-compile-schemas">glib-compile-schemas</link> reads
14727 * so-called 'vendor override' files. These are keyfiles in the same
14728 * directory as the XML schema sources which can override default values.
14729 * The schema id serves as the group name in the key file, and the values
14730 * are expected in serialized GVariant form, as in the following example:
14731 * <informalexample><programlisting>
14732 * [org.gtk.Example]
14735 * </programlisting></informalexample>
14738 * glib-compile-schemas expects schema files to have the extension
14739 * <filename>.gschema.override</filename>
14744 * <title>Binding</title>
14746 * A very convenient feature of GSettings lets you bind #GObject properties
14747 * directly to settings, using g_settings_bind(). Once a GObject property
14748 * has been bound to a setting, changes on either side are automatically
14749 * propagated to the other side. GSettings handles details like
14750 * mapping between GObject and GVariant types, and preventing infinite
14754 * This makes it very easy to hook up a preferences dialog to the
14755 * underlying settings. To make this even more convenient, GSettings
14756 * looks for a boolean property with the name "sensitivity" and
14757 * automatically binds it to the writability of the bound setting.
14758 * If this 'magic' gets in the way, it can be suppressed with the
14759 * #G_SETTINGS_BIND_NO_SENSITIVITY flag.
14766 * SECTION:gsettingsbackend
14767 * @title: GSettingsBackend
14768 * @short_description: Interface for settings backend implementations
14769 * @include: gio/gsettingsbackend.h
14770 * @see_also: #GSettings, #GIOExtensionPoint
14772 * The #GSettingsBackend interface defines a generic interface for
14773 * non-strictly-typed data that is stored in a hierarchy. To implement
14774 * an alternative storage backend for #GSettings, you need to implement
14775 * the #GSettingsBackend interface and then make it implement the
14776 * extension point #G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.
14778 * The interface defines methods for reading and writing values, a
14779 * method for determining if writing of certain values will fail
14780 * (lockdown) and a change notification mechanism.
14782 * The semantics of the interface are very precisely defined and
14783 * implementations must carefully adhere to the expectations of
14784 * callers that are documented on each of the interface methods.
14786 * Some of the GSettingsBackend functions accept or return a #GTree.
14787 * These trees always have strings as keys and #GVariant as values.
14788 * g_settings_backend_create_tree() is a convenience function to create
14792 * The #GSettingsBackend API is exported to allow third-party
14793 * implementations, but does not carry the same stability guarantees
14794 * as the public GIO API. For this reason, you have to define the
14795 * C preprocessor symbol #G_SETTINGS_ENABLE_BACKEND before including
14796 * <filename>gio/gsettingsbackend.h</filename>
14802 * SECTION:gsettingsschema
14803 * @short_description: introspecting and controlling the loading of #GSettings schemas
14805 * The #GSettingsSchemaSource and #GSettingsSchema APIs provide a
14806 * mechanism for advanced control over the loading of schemas and a
14807 * mechanism for introspecting their content.
14809 * Plugin loading systems that wish to provide plugins a way to access
14810 * settings face the problem of how to make the schemas for these
14811 * settings visible to GSettings. Typically, a plugin will want to ship
14812 * the schema along with itself and it won't be installed into the
14813 * standard system directories for schemas.
14815 * #GSettingsSchemaSource provides a mechanism for dealing with this by
14816 * allowing the creation of a new 'schema source' from which schemas can
14817 * be acquired. This schema source can then become part of the metadata
14818 * associated with the plugin and queried whenever the plugin requires
14819 * access to some settings.
14821 * Consider the following example:
14827 * GSettingsSchemaSource *schema_source;
14832 * initialise_plugin (const gchar *dir)
14838 * plugin->schema_source =
14839 * g_settings_new_schema_source_from_directory (dir,
14840 * g_settings_schema_source_get_default (), FALSE, NULL);
14850 * plugin_get_settings (Plugin *plugin,
14851 * const gchar *schema_id)
14853 * GSettingsSchema *schema;
14855 * if (schema_id == NULL)
14856 * schema_id = plugin->identifier;
14858 * schema = g_settings_schema_source_lookup (plugin->schema_source,
14859 * schema_id, FALSE);
14861 * if (schema == NULL)
14863 * ... disable the plugin or abort, etc ...
14866 * return g_settings_new_full (schema, NULL, NULL);
14870 * The code above shows how hooks should be added to the code that
14871 * initialises (or enables) the plugin to create the schema source and
14872 * how an API can be added to the plugin system to provide a convenient
14873 * way for the plugin to access its settings, using the schemas that it
14876 * From the standpoint of the plugin, it would need to ensure that it
14877 * ships a gschemas.compiled file as part of itself, and then simply do
14882 * GSettings *settings;
14885 * settings = plugin_get_settings (self, NULL);
14886 * some_value = g_settings_get_int (settings, "some-value");
14891 * It's also possible that the plugin system expects the schema source
14892 * files (ie: .gschema.xml files) instead of a gschemas.compiled file.
14893 * In that case, the plugin loading system must compile the schemas for
14894 * itself before attempting to create the settings source.
14901 * SECTION:gsimpleaction
14902 * @title: GSimpleAction
14903 * @short_description: A simple GAction implementation
14905 * A #GSimpleAction is the obvious simple implementation of the #GAction
14906 * interface. This is the easiest way to create an action for purposes of
14907 * adding it to a #GSimpleActionGroup.
14909 * See also #GtkAction.
14914 * SECTION:gsimpleactiongroup
14915 * @title: GSimpleActionGroup
14916 * @short_description: A simple GActionGroup implementation
14918 * #GSimpleActionGroup is a hash table filled with #GAction objects,
14919 * implementing the #GActionGroup and #GActionMap interfaces.
14924 * SECTION:gsimpleasyncresult
14925 * @short_description: Simple asynchronous results implementation
14926 * @include: gio/gio.h
14927 * @see_also: #GAsyncResult
14929 * Implements #GAsyncResult for simple cases. Most of the time, this
14930 * will be all an application needs, and will be used transparently.
14931 * Because of this, #GSimpleAsyncResult is used throughout GIO for
14932 * handling asynchronous functions.
14934 * GSimpleAsyncResult handles #GAsyncReadyCallback<!-- -->s, error
14935 * reporting, operation cancellation and the final state of an operation,
14936 * completely transparent to the application. Results can be returned
14937 * as a pointer e.g. for functions that return data that is collected
14938 * asynchronously, a boolean value for checking the success or failure
14939 * of an operation, or a #gssize for operations which return the number
14940 * of bytes modified by the operation; all of the simple return cases
14943 * Most of the time, an application will not need to know of the details
14944 * of this API; it is handled transparently, and any necessary operations
14945 * are handled by #GAsyncResult's interface. However, if implementing a
14946 * new GIO module, for writing language bindings, or for complex
14947 * applications that need better control of how asynchronous operations
14948 * are completed, it is important to understand this functionality.
14950 * GSimpleAsyncResults are tagged with the calling function to ensure
14951 * that asynchronous functions and their finishing functions are used
14952 * together correctly.
14954 * To create a new #GSimpleAsyncResult, call g_simple_async_result_new().
14955 * If the result needs to be created for a #GError, use
14956 * g_simple_async_result_new_from_error() or
14957 * g_simple_async_result_new_take_error(). If a #GError is not available
14958 * (e.g. the asynchronous operation's doesn't take a #GError argument),
14959 * but the result still needs to be created for an error condition, use
14960 * g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
14961 * if your application or binding requires passing a variable argument list
14962 * directly), and the error can then be propagated through the use of
14963 * g_simple_async_result_propagate_error().
14965 * An asynchronous operation can be made to ignore a cancellation event by
14966 * calling g_simple_async_result_set_handle_cancellation() with a
14967 * #GSimpleAsyncResult for the operation and %FALSE. This is useful for
14968 * operations that are dangerous to cancel, such as close (which would
14969 * cause a leak if cancelled before being run).
14971 * GSimpleAsyncResult can integrate into GLib's event loop, #GMainLoop,
14972 * or it can use #GThread<!-- -->s.
14973 * g_simple_async_result_complete() will finish an I/O task directly
14974 * from the point where it is called. g_simple_async_result_complete_in_idle()
14975 * will finish it from an idle handler in the <link
14976 * linkend="g-main-context-push-thread-default">thread-default main
14977 * context</link>. g_simple_async_result_run_in_thread() will run the
14978 * job in a separate thread and then deliver the result to the
14979 * thread-default main context.
14981 * To set the results of an asynchronous function,
14982 * g_simple_async_result_set_op_res_gpointer(),
14983 * g_simple_async_result_set_op_res_gboolean(), and
14984 * g_simple_async_result_set_op_res_gssize()
14985 * are provided, setting the operation's result to a gpointer, gboolean, or
14986 * gssize, respectively.
14988 * Likewise, to get the result of an asynchronous function,
14989 * g_simple_async_result_get_op_res_gpointer(),
14990 * g_simple_async_result_get_op_res_gboolean(), and
14991 * g_simple_async_result_get_op_res_gssize() are
14992 * provided, getting the operation's result as a gpointer, gboolean, and
14993 * gssize, respectively.
14995 * For the details of the requirements implementations must respect, see
14996 * #GAsyncResult. A typical implementation of an asynchronous operation
14997 * using GSimpleAsyncResult looks something like this:
15001 * baked_cb (Cake *cake,
15002 * gpointer user_data)
15004 * /* In this example, this callback is not given a reference to the cake, so
15005 * * the GSimpleAsyncResult has to take a reference to it.
15007 * GSimpleAsyncResult *result = user_data;
15009 * if (cake == NULL)
15010 * g_simple_async_result_set_error (result,
15012 * BAKER_ERROR_NO_FLOUR,
15013 * "Go to the supermarket");
15015 * g_simple_async_result_set_op_res_gpointer (result,
15016 * g_object_ref (cake),
15020 * /* In this example, we assume that baked_cb is called as a callback from
15021 * * the mainloop, so it's safe to complete the operation synchronously here.
15022 * * If, however, _baker_prepare_cake () might call its callback without
15023 * * first returning to the mainloop — inadvisable, but some APIs do so —
15024 * * we would need to use g_simple_async_result_complete_in_idle().
15026 * g_simple_async_result_complete (result);
15027 * g_object_unref (result);
15031 * baker_bake_cake_async (Baker *self,
15033 * GAsyncReadyCallback callback,
15034 * gpointer user_data)
15036 * GSimpleAsyncResult *simple;
15041 * g_simple_async_report_error_in_idle (G_OBJECT (self),
15045 * BAKER_ERROR_TOO_SMALL,
15046 * "%ucm radius cakes are silly",
15051 * simple = g_simple_async_result_new (G_OBJECT (self),
15054 * baker_bake_cake_async);
15055 * cake = _baker_get_cached_cake (self, radius);
15057 * if (cake != NULL)
15059 * g_simple_async_result_set_op_res_gpointer (simple,
15060 * g_object_ref (cake),
15062 * g_simple_async_result_complete_in_idle (simple);
15063 * g_object_unref (simple);
15064 * /* Drop the reference returned by _baker_get_cached_cake(); the
15065 * * GSimpleAsyncResult has taken its own reference.
15067 * g_object_unref (cake);
15071 * _baker_prepare_cake (self, radius, baked_cb, simple);
15075 * baker_bake_cake_finish (Baker *self,
15076 * GAsyncResult *result,
15079 * GSimpleAsyncResult *simple;
15082 * g_return_val_if_fail (g_simple_async_result_is_valid (result,
15084 * baker_bake_cake_async),
15087 * simple = (GSimpleAsyncResult *) result;
15089 * if (g_simple_async_result_propagate_error (simple, error))
15092 * cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple));
15093 * return g_object_ref (cake);
15100 * SECTION:gsimplepermission
15101 * @title: GSimplePermission
15102 * @short_description: A GPermission that doesn't change value
15104 * #GSimplePermission is a trivial implementation of #GPermission that
15105 * represents a permission that is either always or never allowed. The
15106 * value is given at construction and doesn't change.
15108 * Calling request or release will result in errors.
15114 * @short_description: Low-level socket object
15115 * @include: gio/gio.h
15116 * @see_also: #GInitable
15118 * A #GSocket is a low-level networking primitive. It is a more or less
15119 * direct mapping of the BSD socket API in a portable GObject based API.
15120 * It supports both the UNIX socket implementations and winsock2 on Windows.
15122 * #GSocket is the platform independent base upon which the higher level
15123 * network primitives are based. Applications are not typically meant to
15124 * use it directly, but rather through classes like #GSocketClient,
15125 * #GSocketService and #GSocketConnection. However there may be cases where
15126 * direct use of #GSocket is useful.
15128 * #GSocket implements the #GInitable interface, so if it is manually constructed
15129 * by e.g. g_object_new() you must call g_initable_init() and check the
15130 * results before using the object. This is done automatically in
15131 * g_socket_new() and g_socket_new_from_fd(), so these functions can return
15134 * Sockets operate in two general modes, blocking or non-blocking. When
15135 * in blocking mode all operations block until the requested operation
15136 * is finished or there is an error. In non-blocking mode all calls that
15137 * would block return immediately with a %G_IO_ERROR_WOULD_BLOCK error.
15138 * To know when a call would successfully run you can call g_socket_condition_check(),
15139 * or g_socket_condition_wait(). You can also use g_socket_create_source() and
15140 * attach it to a #GMainContext to get callbacks when I/O is possible.
15141 * Note that all sockets are always set to non blocking mode in the system, and
15142 * blocking mode is emulated in GSocket.
15144 * When working in non-blocking mode applications should always be able to
15145 * handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other
15146 * function said that I/O was possible. This can easily happen in case
15147 * of a race condition in the application, but it can also happen for other
15148 * reasons. For instance, on Windows a socket is always seen as writable
15149 * until a write returns %G_IO_ERROR_WOULD_BLOCK.
15151 * #GSocket<!-- -->s can be either connection oriented or datagram based.
15152 * For connection oriented types you must first establish a connection by
15153 * either connecting to an address or accepting a connection from another
15154 * address. For connectionless socket types the target/source address is
15155 * specified or received in each I/O operation.
15157 * All socket file descriptors are set to be close-on-exec.
15159 * Note that creating a #GSocket causes the signal %SIGPIPE to be
15160 * ignored for the remainder of the program. If you are writing a
15161 * command-line utility that uses #GSocket, you may need to take into
15162 * account the fact that your program will not automatically be killed
15163 * if it tries to write to %stdout after it has been closed.
15170 * SECTION:gsocketaddress
15171 * @short_description: Abstract base class representing endpoints for socket communication
15173 * #GSocketAddress is the equivalent of <type>struct sockaddr</type>
15174 * in the BSD sockets API. This is an abstract class; use
15175 * #GInetSocketAddress for internet sockets, or #GUnixSocketAddress
15176 * for UNIX domain sockets.
15181 * SECTION:gsocketclient
15182 * @short_description: Helper for connecting to a network service
15183 * @include: gio/gio.h
15184 * @see_also: #GSocketConnection, #GSocketListener
15186 * #GSocketClient is a high-level utility class for connecting to a
15187 * network host using a connection oriented socket type.
15189 * You create a #GSocketClient object, set any options you want, and then
15190 * call a sync or async connect operation, which returns a #GSocketConnection
15191 * subclass on success.
15193 * The type of the #GSocketConnection object returned depends on the type of
15194 * the underlying socket that is in use. For instance, for a TCP/IP connection
15195 * it will be a #GTcpConnection.
15202 * SECTION:gsocketconnectable
15203 * @short_description: Interface for potential socket endpoints
15205 * Objects that describe one or more potential socket endpoints
15206 * implement #GSocketConnectable. Callers can then use
15207 * g_socket_connectable_enumerate() to get a #GSocketAddressEnumerator
15208 * to try out each socket address in turn until one succeeds, as shown
15209 * in the sample code below.
15212 * MyConnectionType *
15213 * connect_to_host (const char *hostname,
15215 * GCancellable *cancellable,
15218 * MyConnection *conn = NULL;
15219 * GSocketConnectable *addr;
15220 * GSocketAddressEnumerator *enumerator;
15221 * GSocketAddress *sockaddr;
15222 * GError *conn_error = NULL;
15224 * addr = g_network_address_new ("www.gnome.org", 80);
15225 * enumerator = g_socket_connectable_enumerate (addr);
15226 * g_object_unref (addr);
15228 * /<!-- -->* Try each sockaddr until we succeed. Record the first
15229 * * connection error, but not any further ones (since they'll probably
15230 * * be basically the same as the first).
15232 * while (!conn && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
15234 * conn = connect_to_sockaddr (sockaddr, conn_error ? NULL : &conn_error);
15235 * g_object_unref (sockaddr);
15237 * g_object_unref (enumerator);
15243 * /<!-- -->* We couldn't connect to the first address, but we succeeded
15244 * * in connecting to a later address.
15246 * g_error_free (conn_error);
15252 * /<!-- -->* Either the initial lookup failed, or else the caller
15256 * g_error_free (conn_error);
15261 * g_error_propagate (error, conn_error);
15270 * SECTION:gsocketconnection
15271 * @short_description: A socket connection
15272 * @include: gio/gio.h
15273 * @see_also: #GIOStream, #GSocketClient, #GSocketListener
15275 * #GSocketConnection is a #GIOStream for a connected socket. They
15276 * can be created either by #GSocketClient when connecting to a host,
15277 * or by #GSocketListener when accepting a new client.
15279 * The type of the #GSocketConnection object returned from these calls
15280 * depends on the type of the underlying socket that is in use. For
15281 * instance, for a TCP/IP connection it will be a #GTcpConnection.
15283 * Choosing what type of object to construct is done with the socket
15284 * connection factory, and it is possible for 3rd parties to register
15285 * custom socket connection types for specific combination of socket
15286 * family/type/protocol using g_socket_connection_factory_register_type().
15293 * SECTION:gsocketcontrolmessage
15294 * @title: GSocketControlMessage
15295 * @short_description: A GSocket control message
15296 * @see_also: #GSocket.
15298 * A #GSocketControlMessage is a special-purpose utility message that
15299 * can be sent to or received from a #GSocket. These types of
15300 * messages are often called "ancillary data".
15302 * The message can represent some sort of special instruction to or
15303 * information from the socket or can represent a special kind of
15304 * transfer to the peer (for example, sending a file description over
15307 * These messages are sent with g_socket_send_message() and received
15308 * with g_socket_receive_message().
15310 * To extend the set of control message that can be sent, subclass this
15311 * class and override the get_size, get_level, get_type and serialize
15314 * To extend the set of control messages that can be received, subclass
15315 * this class and implement the deserialize method. Also, make sure your
15316 * class is registered with the GType typesystem before calling
15317 * g_socket_receive_message() to read such a message.
15324 * SECTION:gsocketlistener
15325 * @title: GSocketListener
15326 * @short_description: Helper for accepting network client connections
15327 * @see_also: #GThreadedSocketService, #GSocketService.
15329 * A #GSocketListener is an object that keeps track of a set
15330 * of server sockets and helps you accept sockets from any of the
15331 * socket, either sync or async.
15333 * If you want to implement a network server, also look at #GSocketService
15334 * and #GThreadedSocketService which are subclass of #GSocketListener
15335 * that makes this even easier.
15342 * SECTION:gsocketservice
15343 * @title: GSocketService
15344 * @short_description: Make it easy to implement a network service
15345 * @see_also: #GThreadedSocketService, #GSocketListener.
15347 * A #GSocketService is an object that represents a service that
15348 * is provided to the network or over local sockets. When a new
15349 * connection is made to the service the #GSocketService::incoming
15350 * signal is emitted.
15352 * A #GSocketService is a subclass of #GSocketListener and you need
15353 * to add the addresses you want to accept connections on with the
15354 * #GSocketListener APIs.
15356 * There are two options for implementing a network service based on
15357 * #GSocketService. The first is to create the service using
15358 * g_socket_service_new() and to connect to the #GSocketService::incoming
15359 * signal. The second is to subclass #GSocketService and override the
15360 * default signal handler implementation.
15362 * In either case, the handler must immediately return, or else it
15363 * will block additional incoming connections from being serviced.
15364 * If you are interested in writing connection handlers that contain
15365 * blocking code then see #GThreadedSocketService.
15367 * The socket service runs on the main loop of the <link
15368 * linkend="g-main-context-push-thread-default-context">thread-default
15369 * context</link> of the thread it is created in, and is not
15370 * threadsafe in general. However, the calls to start and stop the
15371 * service are thread-safe so these can be used from threads that
15372 * handle incoming clients.
15379 * SECTION:gsrvtarget
15380 * @short_description: DNS SRV record target
15381 * @include: gio/gio.h
15383 * SRV (service) records are used by some network protocols to provide
15384 * service-specific aliasing and load-balancing. For example, XMPP
15385 * (Jabber) uses SRV records to locate the XMPP server for a domain;
15386 * rather than connecting directly to "example.com" or assuming a
15387 * specific server hostname like "xmpp.example.com", an XMPP client
15388 * would look up the "xmpp-client" SRV record for "example.com", and
15389 * then connect to whatever host was pointed to by that record.
15391 * You can use g_resolver_lookup_service() or
15392 * g_resolver_lookup_service_async() to find the #GSrvTarget<!-- -->s
15393 * for a given service. However, if you are simply planning to connect
15394 * to the remote service, you can use #GNetworkService's
15395 * #GSocketConnectable interface and not need to worry about
15396 * #GSrvTarget at all.
15401 * SECTION:gtcpconnection
15402 * @title: GTcpConnection
15403 * @short_description: A TCP GSocketConnection
15404 * @see_also: #GSocketConnection.
15406 * This is the subclass of #GSocketConnection that is created
15407 * for TCP/IP sockets.
15414 * SECTION:gtcpwrapperconnection
15415 * @title: GTcpWrapperConnection
15416 * @short_description: wrapper for non-GSocketConnection-based, GSocket-based GIOStreams
15417 * @see_also: #GSocketConnection.
15419 * A #GTcpWrapperConnection can be used to wrap a #GIOStream that is
15420 * based on a #GSocket, but which is not actually a
15421 * #GSocketConnection. This is used by #GSocketClient so that it can
15422 * always return a #GSocketConnection, even when the connection it has
15423 * actually created is not directly a #GSocketConnection.
15430 * SECTION:gthemedicon
15431 * @short_description: Icon theming support
15432 * @include: gio/gio.h
15433 * @see_also: #GIcon, #GLoadableIcon
15435 * #GThemedIcon is an implementation of #GIcon that supports icon themes.
15436 * #GThemedIcon contains a list of all of the icons present in an icon
15437 * theme, so that icons can be looked up quickly. #GThemedIcon does
15438 * not provide actual pixmaps for icons, just the icon names.
15439 * Ideally something like gtk_icon_theme_choose_icon() should be used to
15440 * resolve the list of names so that fallback icons work nicely with
15441 * themes that inherit other themes.
15446 * SECTION:gthreadedsocketservice
15447 * @title: GThreadedSocketService
15448 * @short_description: A threaded GSocketService
15449 * @see_also: #GSocketService.
15451 * A #GThreadedSocketService is a simple subclass of #GSocketService
15452 * that handles incoming connections by creating a worker thread and
15453 * dispatching the connection to it by emitting the
15454 * #GThreadedSocketService::run signal in the new thread.
15456 * The signal handler may perform blocking IO and need not return
15457 * until the connection is closed.
15459 * The service is implemented using a thread pool, so there is a
15460 * limited amount of threads available to serve incoming requests.
15461 * The service automatically stops the #GSocketService from accepting
15462 * new connections when all threads are busy.
15464 * As with #GSocketService, you may connect to #GThreadedSocketService::run,
15465 * or subclass and override the default handler.
15471 * @title: TLS Overview
15472 * @short_description: TLS (aka SSL) support for GSocketConnection
15473 * @include: gio/gio.h
15475 * #GTlsConnection and related classes provide TLS (Transport Layer
15476 * Security, previously known as SSL, Secure Sockets Layer) support for
15477 * gio-based network streams.
15479 * In the simplest case, for a client connection, you can just set the
15480 * #GSocketClient:tls flag on a #GSocketClient, and then any
15481 * connections created by that client will have TLS negotiated
15482 * automatically, using appropriate default settings, and rejecting
15483 * any invalid or self-signed certificates (unless you change that
15484 * default by setting the #GSocketClient:tls-validation-flags
15485 * property). The returned object will be a #GTcpWrapperConnection,
15486 * which wraps the underlying #GTlsClientConnection.
15488 * For greater control, you can create your own #GTlsClientConnection,
15489 * wrapping a #GSocketConnection (or an arbitrary #GIOStream with
15490 * pollable input and output streams) and then connect to its signals,
15491 * such as #GTlsConnection::accept-certificate, before starting the
15494 * Server-side TLS is similar, using #GTlsServerConnection. At the
15495 * moment, there is no support for automatically wrapping server-side
15496 * connections in the way #GSocketClient does for client-side
15502 * SECTION:gtlsbackend
15503 * @title: GTlsBackend
15504 * @short_description: TLS backend implementation
15505 * @include: gio/gio.h
15512 * SECTION:gtlscertificate
15513 * @title: GTlsCertificate
15514 * @short_description: TLS certificate
15515 * @see_also: #GTlsConnection
15517 * A certificate used for TLS authentication and encryption.
15518 * This can represent either a public key only (eg, the certificate
15519 * received by a client from a server), or the combination of
15520 * a public key and a private key (which is needed when acting as a
15521 * #GTlsServerConnection).
15528 * SECTION:gtlsclientconnection
15529 * @short_description: TLS client-side connection
15530 * @include: gio/gio.h
15532 * #GTlsClientConnection is the client-side subclass of
15533 * #GTlsConnection, representing a client-side TLS connection.
15538 * SECTION:gtlsconnection
15539 * @short_description: TLS connection type
15540 * @include: gio/gio.h
15542 * #GTlsConnection is the base TLS connection class type, which wraps
15543 * a #GIOStream and provides TLS encryption on top of it. Its
15544 * subclasses, #GTlsClientConnection and #GTlsServerConnection,
15545 * implement client-side and server-side TLS, respectively.
15552 * SECTION:gtlsdatabase
15553 * @short_description: TLS database type
15554 * @include: gio/gio.h
15556 * #GTlsDatabase is used to lookup certificates and other information
15557 * from a certificate or key store. It is an abstract base class which
15558 * TLS library specific subtypes override.
15560 * Most common client applications will not directly interact with
15561 * #GTlsDatabase. It is used internally by #GTlsConnection.
15568 * SECTION:gtlsfiledatabase
15569 * @short_description: TLS file based database type
15570 * @include: gio/gio.h
15572 * #GTlsFileDatabase is implemented by #GTlsDatabase objects which load
15573 * their certificate information from a file. It is in interface which
15574 * TLS library specific subtypes implement.
15581 * SECTION:gtlsinteraction
15582 * @short_description: Interaction with the user during TLS operations.
15583 * @include: gio/gio.h
15585 * #GTlsInteraction provides a mechanism for the TLS connection and database
15586 * code to interact with the user. It can be used to ask the user for passwords.
15588 * To use a #GTlsInteraction with a TLS connection use
15589 * g_tls_connection_set_interaction().
15591 * Callers should instantiate a derived class that implements the various
15592 * interaction methods to show the required dialogs.
15594 * Callers should use the 'invoke' functions like
15595 * g_tls_interaction_invoke_ask_password() to run interaction methods. These
15596 * functions make sure that the interaction is invoked in the main loop
15597 * and not in the current thread, if the current thread is not running the
15600 * Derived classes can choose to implement whichever interactions methods they'd
15601 * like to support by overriding those virtual methods in their class
15602 * initialization function. Any interactions not implemented will return
15603 * %G_TLS_INTERACTION_UNHANDLED. If a derived class implements an async method,
15604 * it must also implement the corresponding finish method.
15609 * SECTION:gtlspassword
15610 * @title: GTlsPassword
15611 * @short_description: TLS Passwords for prompting
15612 * @include: gio/gio.h
15614 * Holds a password used in TLS.
15619 * SECTION:gtlsserverconnection
15620 * @short_description: TLS server-side connection
15621 * @include: gio/gio.h
15623 * #GTlsServerConnection is the server-side subclass of #GTlsConnection,
15624 * representing a server-side TLS connection.
15631 * SECTION:gunixconnection
15632 * @title: GUnixConnection
15633 * @short_description: A UNIX domain GSocketConnection
15634 * @include: gio/gunixconnection.h
15635 * @see_also: #GSocketConnection.
15637 * This is the subclass of #GSocketConnection that is created
15638 * for UNIX domain sockets.
15640 * It contains functions to do some of the UNIX socket specific
15641 * functionality like passing file descriptors.
15643 * Note that <filename><gio/gunixconnection.h></filename> belongs to
15644 * the UNIX-specific GIO interfaces, thus you have to use the
15645 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15652 * SECTION:gunixcredentialsmessage
15653 * @title: GUnixCredentialsMessage
15654 * @short_description: A GSocketControlMessage containing credentials
15655 * @include: gio/gunixcredentialsmessage.h
15656 * @see_also: #GUnixConnection, #GSocketControlMessage
15658 * This #GSocketControlMessage contains a #GCredentials instance. It
15659 * may be sent using g_socket_send_message() and received using
15660 * g_socket_receive_message() over UNIX sockets (ie: sockets in the
15661 * %G_SOCKET_FAMILY_UNIX family).
15663 * For an easier way to send and receive credentials over
15664 * stream-oriented UNIX sockets, see
15665 * g_unix_connection_send_credentials() and
15666 * g_unix_connection_receive_credentials(). To receive credentials of
15667 * a foreign process connected to a socket, use
15668 * g_socket_get_credentials().
15673 * SECTION:gunixfdlist
15674 * @title: GUnixFDList
15675 * @short_description: An object containing a set of UNIX file descriptors
15676 * @include: gio/gunixfdlist.h
15677 * @see_also: #GUnixFDMessage
15679 * A #GUnixFDList contains a list of file descriptors. It owns the file
15680 * descriptors that it contains, closing them when finalized.
15682 * It may be wrapped in a #GUnixFDMessage and sent over a #GSocket in
15683 * the %G_SOCKET_ADDRESS_UNIX family by using g_socket_send_message()
15684 * and received using g_socket_receive_message().
15686 * Note that <filename><gio/gunixfdlist.h></filename> belongs to
15687 * the UNIX-specific GIO interfaces, thus you have to use the
15688 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15693 * SECTION:gunixfdmessage
15694 * @title: GUnixFDMessage
15695 * @short_description: A GSocketControlMessage containing a GUnixFDList
15696 * @include: gio/gunixfdmessage.h
15697 * @see_also: #GUnixConnection, #GUnixFDList, #GSocketControlMessage
15699 * This #GSocketControlMessage contains a #GUnixFDList.
15700 * It may be sent using g_socket_send_message() and received using
15701 * g_socket_receive_message() over UNIX sockets (ie: sockets in the
15702 * %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied
15703 * between processes by the kernel.
15705 * For an easier way to send and receive file descriptors over
15706 * stream-oriented UNIX sockets, see g_unix_connection_send_fd() and
15707 * g_unix_connection_receive_fd().
15709 * Note that <filename><gio/gunixfdmessage.h></filename> belongs to
15710 * the UNIX-specific GIO interfaces, thus you have to use the
15711 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15716 * SECTION:gunixinputstream
15717 * @short_description: Streaming input operations for UNIX file descriptors
15718 * @include: gio/gunixinputstream.h
15719 * @see_also: #GInputStream
15721 * #GUnixInputStream implements #GInputStream for reading from a UNIX
15722 * file descriptor, including asynchronous operations. (If the file
15723 * descriptor refers to a socket or pipe, this will use poll() to do
15724 * asynchronous I/O. If it refers to a regular file, it will fall back
15725 * to doing asynchronous I/O in another thread.)
15727 * Note that <filename><gio/gunixinputstream.h></filename> belongs
15728 * to the UNIX-specific GIO interfaces, thus you have to use the
15729 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15734 * SECTION:gunixmounts
15735 * @include: gio/gunixmounts.h
15736 * @short_description: UNIX mounts
15738 * Routines for managing mounted UNIX mount points and paths.
15740 * Note that <filename><gio/gunixmounts.h></filename> belongs to the
15741 * UNIX-specific GIO interfaces, thus you have to use the
15742 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15747 * SECTION:gunixoutputstream
15748 * @short_description: Streaming output operations for UNIX file descriptors
15749 * @include: gio/gunixoutputstream.h
15750 * @see_also: #GOutputStream
15752 * #GUnixOutputStream implements #GOutputStream for writing to a UNIX
15753 * file descriptor, including asynchronous operations. (If the file
15754 * descriptor refers to a socket or pipe, this will use poll() to do
15755 * asynchronous I/O. If it refers to a regular file, it will fall back
15756 * to doing asynchronous I/O in another thread.)
15758 * Note that <filename><gio/gunixoutputstream.h></filename> belongs
15759 * to the UNIX-specific GIO interfaces, thus you have to use the
15760 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15765 * SECTION:gunixsocketaddress
15766 * @short_description: UNIX GSocketAddress
15767 * @include: gio/gunixsocketaddress.h
15769 * Support for UNIX-domain (also known as local) sockets.
15771 * UNIX domain sockets are generally visible in the filesystem.
15772 * However, some systems support abstract socket names which are not
15773 * visible in the filesystem and not affected by the filesystem
15774 * permissions, visibility, etc. Currently this is only supported
15775 * under Linux. If you attempt to use abstract sockets on other
15776 * systems, function calls may return %G_IO_ERROR_NOT_SUPPORTED
15777 * errors. You can use g_unix_socket_address_abstract_names_supported()
15778 * to see if abstract names are supported.
15780 * Note that <filename><gio/gunixsocketaddress.h></filename> belongs to
15781 * the UNIX-specific GIO interfaces, thus you have to use the
15782 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
15788 * @short_description: Virtual File System
15789 * @include: gio/gio.h
15791 * Entry point for using GIO functionality.
15797 * @short_description: Volume management
15798 * @include: gio/gio.h
15800 * The #GVolume interface represents user-visible objects that can be
15801 * mounted. Note, when porting from GnomeVFS, #GVolume is the moral
15802 * equivalent of #GnomeVFSDrive.
15804 * Mounting a #GVolume instance is an asynchronous operation. For more
15805 * information about asynchronous operations, see #GAsyncReady and
15806 * #GSimpleAsyncReady. To mount a #GVolume, first call
15807 * g_volume_mount() with (at least) the #GVolume instance, optionally
15808 * a #GMountOperation object and a #GAsyncReadyCallback.
15810 * Typically, one will only want to pass %NULL for the
15811 * #GMountOperation if automounting all volumes when a desktop session
15812 * starts since it's not desirable to put up a lot of dialogs asking
15815 * The callback will be fired when the operation has resolved (either
15816 * with success or failure), and a #GAsyncReady structure will be
15817 * passed to the callback. That callback should then call
15818 * g_volume_mount_finish() with the #GVolume instance and the
15819 * #GAsyncReady data to see if the operation was completed
15820 * successfully. If an @error is present when g_volume_mount_finish()
15821 * is called, then it will be filled with any error information.
15823 * <para id="volume-identifier">
15824 * It is sometimes necessary to directly access the underlying
15825 * operating system object behind a volume (e.g. for passing a volume
15826 * to an application via the commandline). For this purpose, GIO
15827 * allows to obtain an 'identifier' for the volume. There can be
15828 * different kinds of identifiers, such as Hal UDIs, filesystem labels,
15829 * traditional Unix devices (e.g. <filename>/dev/sda2</filename>),
15830 * uuids. GIO uses predefind strings as names for the different kinds
15831 * of identifiers: #G_VOLUME_IDENTIFIER_KIND_HAL_UDI,
15832 * #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. Use g_volume_get_identifier()
15833 * to obtain an identifier for a volume.
15836 * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available
15837 * when the gvfs hal volume monitor is in use. Other volume monitors
15838 * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
15839 * identifier, which can be used to obtain a hal device by means of
15840 * libhal_manger_find_device_string_match().
15845 * SECTION:gvolumemonitor
15846 * @short_description: Volume Monitor
15847 * @include: gio/gio.h
15848 * @see_also: #GFileMonitor
15850 * #GVolumeMonitor is for listing the user interesting devices and volumes
15851 * on the computer. In other words, what a file selector or file manager
15852 * would show in a sidebar.
15854 * #GVolumeMonitor is not <link
15855 * linkend="g-main-context-push-thread-default">thread-default-context
15856 * aware</link>, and so should not be used other than from the main
15857 * thread, with no thread-default-context active.
15862 * SECTION:gwin32inputstream
15863 * @short_description: Streaming input operations for Windows file handles
15864 * @include: gio/gwin32inputstream.h
15865 * @see_also: #GInputStream
15867 * #GWin32InputStream implements #GInputStream for reading from a
15868 * Windows file handle.
15870 * Note that <filename><gio/gwin32inputstream.h></filename> belongs
15871 * to the Windows-specific GIO interfaces, thus you have to use the
15872 * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
15877 * SECTION:gwin32outputstream
15878 * @short_description: Streaming output operations for Windows file handles
15879 * @include: gio/gwin32outputstream.h
15880 * @see_also: #GOutputStream
15882 * #GWin32OutputStream implements #GOutputStream for writing to a
15883 * Windows file handle.
15885 * Note that <filename><gio/gwin32outputstream.h></filename> belongs
15886 * to the Windows-specific GIO interfaces, thus you have to use the
15887 * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
15892 * SECTION:gzcompressor
15893 * @short_description: Zlib compressor
15894 * @include: gio/gio.h
15896 * #GZlibCompressor is an implementation of #GConverter that
15897 * compresses data using zlib.
15902 * SECTION:gzdecompressor
15903 * @short_description: Zlib decompressor
15904 * @include: gio/gio.h
15906 * #GZlibDecompressor is an implementation of #GConverter that
15907 * decompresses data compressed with zlib.
15912 * The string info map is an efficient data structure designed to be:
15914 * 1) Implement <choices> with a list of valid strings
15916 * 2) Implement <alias> by mapping one string to another
15918 * 3) Implement enumerated types by mapping strings to integer values
15921 * The map is made out of an array of uint32s. Each entry in the array
15922 * is an integer value, followed by a specially formatted string value:
15924 * The string starts with the byte 0xff or 0xfe, followed by the
15925 * content of the string, followed by a nul byte, followed by
15926 * additional nul bytes for padding, followed by a 0xff byte.
15928 * Padding is added so that the entire formatted string takes up a
15929 * multiple of 4 bytes, and not less than 8 bytes. The requirement
15930 * for a string to take up 8 bytes is so that the scanner doesn't lose
15931 * synch and mistake a string for an integer value.
15933 * The first byte of the formatted string depends on if the integer is
15934 * an enum value (0xff) or an alias (0xfe). If it is an alias then the
15935 * number refers to the word offset within the info map at which the
15936 * integer corresponding to the "target" value is stored.
15938 * For example, consider the case of the string info map representing an
15939 * enumerated type of 'foo' (value 1) and 'bar' (value 2) and 'baz'
15940 * (alias for 'bar'). Note that string info maps are always little
15943 * x01 x00 x00 x00 xff 'f' 'o' 'o' x00 x00 x00 xff x02 x00 x00 x00
15944 * xff 'b' 'a' 'r' x00 x00 x00 xff x03 x00 x00 x00 xfe 'b' 'a' 'z'
15948 * The operations that someone may want to perform with the map:
15950 * - lookup if a string is valid (and not an alias)
15951 * - lookup the integer value for a enum 'nick'
15952 * - lookup the integer value for the target of an alias
15953 * - lookup an alias and convert it to its target string
15954 * - lookup the enum nick for a given value
15956 * In order to lookup if a string is valid, it is padded on either side
15957 * (as described) and scanned for in the array. For example, you might
15960 * xff 'f' 'o' 'o' x00 x00 x00 xff
15962 * In order to lookup the integer value for a nick, the string is padded
15963 * on either side and scanned for in the array, as above. Instead of
15964 * merely succeeding, we look at the integer value to the left of the
15965 * match. This is the enum value.
15967 * In order to lookup an alias and convert it to its target enum value,
15968 * the string is padded on either side (as described, with 0xfe) and
15969 * scanned for. For example, you might look for "baz":
15971 * xfe 'b' 'a' 'z' x00 x00 x00 xff
15973 * The integer immediately preceding the match then contains the offset
15974 * of the integer value of the target. In our example, that's '3'.
15975 * This index is dereferenced to find the enum value of '2'.
15977 * To convert the alias to its target string, 5 bytes just need to be
15978 * added past the start of the integer value to find the start of the
15981 * To lookup the enum nick for a given value, the value is searched for
15982 * in the array. To ensure that the value isn't matching the inside of a
15983 * string, we must check that it is either the first item in the array or
15984 * immediately preceded by the byte 0xff. It must also be immediately
15985 * followed by the byte 0xff.
15987 * Because strings always take up a minimum of 2 words, because 0xff or
15988 * 0xfe never appear inside of a utf-8 string and because no two integer
15989 * values ever appear in sequence, the only way we can have the
15992 * xff __ __ __ __ xff (or 0xfe)
15994 * is in the event of an integer nested between two strings.
15996 * For implementation simplicity/efficiency, strings may not be more
15997 * than 65 characters in length (ie: 17 32bit words after padding).
15999 * In the event that we are doing <choices> (ie: not an enum type) then
16000 * the value of each choice is set to zero and ignored.
16005 * _g_io_module_get_default:
16006 * @extension_point: the name of an extension point
16007 * @envvar: (allow-none): the name of an environment variable to override the default implementation.
16008 * @verify_func: (allow-none): a function to call to verify that a given implementation is usable in the current environment.
16010 * Retrieves the default object implementing @extension_point.
16012 * If @envvar is not %NULL, and the environment variable with that
16013 * name is set, then the implementation it specifies will be tried
16014 * first. After that, or if @envvar is not set, all other
16015 * implementations will be tried in order of decreasing priority.
16017 * If an extension point implementation implements #GInitable, then
16018 * that implementation will only be used if it initializes
16019 * successfully. Otherwise, if @verify_func is not %NULL, then it will
16020 * be called on each candidate implementation after construction, to
16021 * check if it is actually usable or not.
16023 * The result is cached after it is generated the first time, and
16024 * the function is thread-safe.
16026 * @extension_point, or %NULL if there are no usable
16029 * Returns: (transfer none): an object implementing
16034 * g_action_activate:
16035 * @action: a #GAction
16036 * @parameter: (allow-none): the parameter to the activation
16038 * Activates the action.
16040 * @parameter must be the correct type of parameter for the action (ie:
16041 * the parameter type given at construction time). If the parameter
16042 * type was %NULL then @parameter must also be %NULL.
16049 * g_action_change_state:
16050 * @action: a #GAction
16051 * @value: the new state
16053 * Request for the state of @action to be changed to @value.
16055 * The action must be stateful and @value must be of the correct type.
16056 * See g_action_get_state_type().
16058 * This call merely requests a change. The action may refuse to change
16059 * its state or may change its state to something other than @value.
16060 * See g_action_get_state_hint().
16062 * If the @value GVariant is floating, it is consumed.
16069 * g_action_get_enabled:
16070 * @action: a #GAction
16072 * Checks if @action is currently enabled.
16074 * An action must be enabled in order to be activated or in order to
16075 * have its state changed from outside callers.
16077 * Returns: whether the action is enabled
16083 * g_action_get_name:
16084 * @action: a #GAction
16086 * Queries the name of @action.
16088 * Returns: the name of the action
16094 * g_action_get_parameter_type:
16095 * @action: a #GAction
16097 * Queries the type of the parameter that must be given when activating
16100 * When activating the action using g_action_activate(), the #GVariant
16101 * given to that function must be of the type returned by this function.
16103 * In the case that this function returns %NULL, you must not give any
16104 * #GVariant, but %NULL instead.
16106 * Returns: (allow-none): the parameter type
16112 * g_action_get_state:
16113 * @action: a #GAction
16115 * Queries the current state of @action.
16117 * If the action is not stateful then %NULL will be returned. If the
16118 * action is stateful then the type of the return value is the type
16119 * given by g_action_get_state_type().
16121 * The return value (if non-%NULL) should be freed with
16122 * g_variant_unref() when it is no longer required.
16124 * Returns: (transfer full): the current state of the action
16130 * g_action_get_state_hint:
16131 * @action: a #GAction
16133 * Requests a hint about the valid range of values for the state of
16136 * If %NULL is returned it either means that the action is not stateful
16137 * or that there is no hint about the valid range of values for the
16138 * state of the action.
16140 * If a #GVariant array is returned then each item in the array is a
16141 * possible value for the state. If a #GVariant pair (ie: two-tuple) is
16142 * returned then the tuple specifies the inclusive lower and upper bound
16143 * of valid values for the state.
16145 * In any case, the information is merely a hint. It may be possible to
16146 * have a state value outside of the hinted range and setting a value
16147 * within the range may fail.
16149 * The return value (if non-%NULL) should be freed with
16150 * g_variant_unref() when it is no longer required.
16152 * Returns: (transfer full): the state range hint
16158 * g_action_get_state_type:
16159 * @action: a #GAction
16161 * Queries the type of the state of @action.
16163 * If the action is stateful (e.g. created with
16164 * g_simple_action_new_stateful()) then this function returns the
16165 * #GVariantType of the state. This is the type of the initial value
16166 * given as the state. All calls to g_action_change_state() must give a
16167 * #GVariant of this type and g_action_get_state() will return a
16168 * #GVariant of the same type.
16170 * If the action is not stateful (e.g. created with g_simple_action_new())
16171 * then this function will return %NULL. In that case, g_action_get_state()
16172 * will return %NULL and you must not call g_action_change_state().
16174 * Returns: (allow-none): the state type, if the action is stateful
16180 * g_action_group_action_added:
16181 * @action_group: a #GActionGroup
16182 * @action_name: the name of an action in the group
16184 * Emits the #GActionGroup::action-added signal on @action_group.
16186 * This function should only be called by #GActionGroup implementations.
16193 * g_action_group_action_enabled_changed:
16194 * @action_group: a #GActionGroup
16195 * @action_name: the name of an action in the group
16196 * @enabled: whether or not the action is now enabled
16198 * Emits the #GActionGroup::action-enabled-changed signal on @action_group.
16200 * This function should only be called by #GActionGroup implementations.
16207 * g_action_group_action_removed:
16208 * @action_group: a #GActionGroup
16209 * @action_name: the name of an action in the group
16211 * Emits the #GActionGroup::action-removed signal on @action_group.
16213 * This function should only be called by #GActionGroup implementations.
16220 * g_action_group_action_state_changed:
16221 * @action_group: a #GActionGroup
16222 * @action_name: the name of an action in the group
16223 * @state: the new state of the named action
16225 * Emits the #GActionGroup::action-state-changed signal on @action_group.
16227 * This function should only be called by #GActionGroup implementations.
16234 * g_action_group_activate_action:
16235 * @action_group: a #GActionGroup
16236 * @action_name: the name of the action to activate
16237 * @parameter: (allow-none): parameters to the activation
16239 * Activate the named action within @action_group.
16241 * If the action is expecting a parameter, then the correct type of
16242 * parameter must be given as @parameter. If the action is expecting no
16243 * parameters then @parameter must be %NULL. See
16244 * g_action_group_get_action_parameter_type().
16251 * g_action_group_change_action_state:
16252 * @action_group: a #GActionGroup
16253 * @action_name: the name of the action to request the change on
16254 * @value: the new state
16256 * Request for the state of the named action within @action_group to be
16257 * changed to @value.
16259 * The action must be stateful and @value must be of the correct type.
16260 * See g_action_group_get_action_state_type().
16262 * This call merely requests a change. The action may refuse to change
16263 * its state or may change its state to something other than @value.
16264 * See g_action_group_get_action_state_hint().
16266 * If the @value GVariant is floating, it is consumed.
16273 * g_action_group_get_action_enabled:
16274 * @action_group: a #GActionGroup
16275 * @action_name: the name of the action to query
16277 * Checks if the named action within @action_group is currently enabled.
16279 * An action must be enabled in order to be activated or in order to
16280 * have its state changed from outside callers.
16282 * Returns: whether or not the action is currently enabled
16288 * g_action_group_get_action_parameter_type:
16289 * @action_group: a #GActionGroup
16290 * @action_name: the name of the action to query
16292 * Queries the type of the parameter that must be given when activating
16293 * the named action within @action_group.
16295 * When activating the action using g_action_group_activate_action(),
16296 * the #GVariant given to that function must be of the type returned
16297 * by this function.
16299 * In the case that this function returns %NULL, you must not give any
16300 * #GVariant, but %NULL instead.
16302 * The parameter type of a particular action will never change but it is
16303 * possible for an action to be removed and for a new action to be added
16304 * with the same name but a different parameter type.
16306 * Returns: the parameter type
16312 * g_action_group_get_action_state:
16313 * @action_group: a #GActionGroup
16314 * @action_name: the name of the action to query
16316 * Queries the current state of the named action within @action_group.
16318 * If the action is not stateful then %NULL will be returned. If the
16319 * action is stateful then the type of the return value is the type
16320 * given by g_action_group_get_action_state_type().
16322 * The return value (if non-%NULL) should be freed with
16323 * g_variant_unref() when it is no longer required.
16325 * Returns: (allow-none): the current state of the action
16331 * g_action_group_get_action_state_hint:
16332 * @action_group: a #GActionGroup
16333 * @action_name: the name of the action to query
16335 * Requests a hint about the valid range of values for the state of the
16336 * named action within @action_group.
16338 * If %NULL is returned it either means that the action is not stateful
16339 * or that there is no hint about the valid range of values for the
16340 * state of the action.
16342 * If a #GVariant array is returned then each item in the array is a
16343 * possible value for the state. If a #GVariant pair (ie: two-tuple) is
16344 * returned then the tuple specifies the inclusive lower and upper bound
16345 * of valid values for the state.
16347 * In any case, the information is merely a hint. It may be possible to
16348 * have a state value outside of the hinted range and setting a value
16349 * within the range may fail.
16351 * The return value (if non-%NULL) should be freed with
16352 * g_variant_unref() when it is no longer required.
16354 * Returns: (transfer full): the state range hint
16360 * g_action_group_get_action_state_type:
16361 * @action_group: a #GActionGroup
16362 * @action_name: the name of the action to query
16364 * Queries the type of the state of the named action within
16367 * If the action is stateful then this function returns the
16368 * #GVariantType of the state. All calls to
16369 * g_action_group_change_action_state() must give a #GVariant of this
16370 * type and g_action_group_get_action_state() will return a #GVariant
16371 * of the same type.
16373 * If the action is not stateful then this function will return %NULL.
16374 * In that case, g_action_group_get_action_state() will return %NULL
16375 * and you must not call g_action_group_change_action_state().
16377 * The state type of a particular action will never change but it is
16378 * possible for an action to be removed and for a new action to be added
16379 * with the same name but a different state type.
16381 * Returns: (transfer full): the state type, if the action is stateful
16387 * g_action_group_has_action:
16388 * @action_group: a #GActionGroup
16389 * @action_name: the name of the action to check for
16391 * Checks if the named action exists within @action_group.
16393 * Returns: whether the named action exists
16399 * g_action_group_list_actions:
16400 * @action_group: a #GActionGroup
16402 * Lists the actions contained within @action_group.
16404 * The caller is responsible for freeing the list with g_strfreev() when
16405 * it is no longer required.
16407 * actions in the groupb
16409 * Returns: (transfer full): a %NULL-terminated array of the names of the
16415 * g_action_group_query_action:
16416 * @action_group: a #GActionGroup
16417 * @action_name: the name of an action in the group
16418 * @enabled: (out): if the action is presently enabled
16419 * @parameter_type: (out): the parameter type, or %NULL if none needed
16420 * @state_type: (out): the state type, or %NULL if stateless
16421 * @state_hint: (out): the state hint, or %NULL if none
16422 * @state: (out): the current state, or %NULL if stateless
16424 * Queries all aspects of the named action within an @action_group.
16426 * This function acquires the information available from
16427 * g_action_group_has_action(), g_action_group_get_action_enabled(),
16428 * g_action_group_get_action_parameter_type(),
16429 * g_action_group_get_action_state_type(),
16430 * g_action_group_get_action_state_hint() and
16431 * g_action_group_get_state() with a single function call.
16433 * This provides two main benefits.
16435 * The first is the improvement in efficiency that comes with not having
16436 * to perform repeated lookups of the action in order to discover
16437 * different things about it. The second is that implementing
16438 * #GActionGroup can now be done by only overriding this one virtual
16441 * The interface provides a default implementation of this function that
16442 * calls the individual functions, as required, to fetch the
16443 * information. The interface also provides default implementations of
16444 * those functions that call this function. All implementations,
16445 * therefore, must override either this function or all of the others.
16447 * If the action exists, %TRUE is returned and any of the requested
16448 * fields (as indicated by having a non-%NULL reference passed in) are
16449 * filled. If the action doesn't exist, %FALSE is returned and the
16450 * fields may or may not have been modified.
16452 * Returns: %TRUE if the action exists, else %FALSE
16458 * g_action_map_add_action:
16459 * @action_map: a #GActionMap
16460 * @action: a #GAction
16462 * Adds an action to the @action_map.
16464 * If the action map already contains an action with the same name
16465 * as @action then the old action is dropped from the action map.
16467 * The action map takes its own reference on @action.
16474 * g_action_map_add_action_entries:
16475 * @action_map: a #GActionMap
16476 * @entries: a pointer to the first item in an array of #GActionEntry structs
16477 * @n_entries: the length of @entries, or -1 if @entries is %NULL-terminated
16478 * @user_data: the user data for signal connections
16480 * A convenience function for creating multiple #GSimpleAction instances
16481 * and adding them to a #GActionMap.
16483 * Each action is constructed as per one #GActionEntry.
16486 * <title>Using g_action_map_add_action_entries()</title>
16489 * activate_quit (GSimpleAction *simple,
16490 * GVariant *parameter,
16491 * gpointer user_data)
16497 * activate_print_string (GSimpleAction *simple,
16498 * GVariant *parameter,
16499 * gpointer user_data)
16501 * g_print ("%s\n", g_variant_get_string (parameter, NULL));
16504 * static GActionGroup *
16505 * create_action_group (void)
16507 * const GActionEntry entries[] = {
16508 * { "quit", activate_quit },
16509 * { "print-string", activate_print_string, "s" }
16511 * GSimpleActionGroup *group;
16513 * group = g_simple_action_group_new ();
16514 * g_action_map_add_action_entries (G_ACTION_MAP (group), entries, G_N_ELEMENTS (entries), NULL);
16516 * return G_ACTION_GROUP (group);
16518 * </programlisting>
16526 * g_action_map_lookup_action:
16527 * @action_map: a #GActionMap
16528 * @action_name: the name of an action
16530 * Looks up the action with the name @action_name in @action_map.
16532 * If no such action exists, returns %NULL.
16534 * Returns: (transfer none): a #GAction, or %NULL
16540 * g_action_map_remove_action:
16541 * @action_map: a #GActionMap
16542 * @action_name: the name of the action
16544 * Removes the named action from the action map.
16546 * If no action of this name is in the map then nothing happens.
16554 * @size: number of bytes to allocate.
16556 * Allocates @size bytes on the stack; these bytes will be freed when the current
16557 * stack frame is cleaned up. This macro essentially just wraps the alloca()
16558 * function present on most UNIX variants.
16559 * Thus it provides the same advantages and pitfalls as alloca():
16561 * <varlistentry><term></term><listitem><para>
16562 * + alloca() is very fast, as on most systems it's implemented by just adjusting
16563 * the stack pointer register.
16564 * </para></listitem></varlistentry>
16565 * <varlistentry><term></term><listitem><para>
16566 * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
16567 * blocks just build up and are released together at function end.
16568 * </para></listitem></varlistentry>
16569 * <varlistentry><term></term><listitem><para>
16570 * - Allocation sizes have to fit into the current stack frame. For instance in a
16571 * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
16572 * so be sparse with alloca() uses.
16573 * </para></listitem></varlistentry>
16574 * <varlistentry><term></term><listitem><para>
16575 * - Allocation failure due to insufficient stack space is not indicated with a %NULL
16576 * return like e.g. with malloc(). Instead, most systems probably handle it the same
16577 * way as out of stack space situations from infinite function recursion, i.e.
16578 * with a segmentation fault.
16579 * </para></listitem></varlistentry>
16580 * <varlistentry><term></term><listitem><para>
16581 * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
16582 * Stack space allocated with alloca() in the same scope as a variable sized array
16583 * will be freed together with the variable sized array upon exit of that scope, and
16584 * not upon exit of the enclosing function scope.
16585 * </para></listitem></varlistentry>
16588 * Returns: space for @size bytes, allocated on the stack
16593 * g_app_info_add_supports_type:
16594 * @appinfo: a #GAppInfo.
16595 * @content_type: a string.
16596 * @error: a #GError.
16598 * Adds a content type to the application information to indicate the
16599 * application is capable of opening files with the given content type.
16601 * Returns: %TRUE on success, %FALSE on error.
16606 * g_app_info_can_delete:
16607 * @appinfo: a #GAppInfo
16609 * Obtains the information whether the #GAppInfo can be deleted.
16610 * See g_app_info_delete().
16612 * Returns: %TRUE if @appinfo can be deleted
16618 * g_app_info_can_remove_supports_type:
16619 * @appinfo: a #GAppInfo.
16621 * Checks if a supported content type can be removed from an application.
16623 * content types from a given @appinfo, %FALSE if not.
16625 * Returns: %TRUE if it is possible to remove supported
16630 * g_app_info_create_from_commandline:
16631 * @commandline: the commandline to use
16632 * @application_name: (allow-none): the application name, or %NULL to use @commandline
16633 * @flags: flags that can specify details of the created #GAppInfo
16634 * @error: a #GError location to store the error occurring, %NULL to ignore.
16636 * Creates a new #GAppInfo from the given information.
16638 * Returns: (transfer full): new #GAppInfo for given command.
16643 * g_app_info_delete:
16644 * @appinfo: a #GAppInfo
16646 * Tries to delete a #GAppInfo.
16648 * On some platforms, there may be a difference between user-defined
16649 * #GAppInfo<!-- -->s which can be deleted, and system-wide ones which
16650 * cannot. See g_app_info_can_delete().
16652 * Virtual: do_delete
16653 * Returns: %TRUE if @appinfo has been deleted
16660 * @appinfo: a #GAppInfo.
16662 * Creates a duplicate of a #GAppInfo.
16664 * Returns: (transfer full): a duplicate of @appinfo.
16669 * g_app_info_equal:
16670 * @appinfo1: the first #GAppInfo.
16671 * @appinfo2: the second #GAppInfo.
16673 * Checks if two #GAppInfo<!-- -->s are equal.
16675 * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.
16680 * g_app_info_get_all:
16682 * Gets a list of all of the applications currently registered
16685 * For desktop files, this includes applications that have
16686 * <literal>NoDisplay=true</literal> set or are excluded from
16687 * display by means of <literal>OnlyShowIn</literal> or
16688 * <literal>NotShowIn</literal>. See g_app_info_should_show().
16689 * The returned list does not include applications which have
16690 * the <literal>Hidden</literal> key set.
16692 * Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfo<!---->s.
16697 * g_app_info_get_all_for_type:
16698 * @content_type: the content type to find a #GAppInfo for
16700 * Gets a list of all #GAppInfos for a given content type,
16701 * including the recommended and fallback #GAppInfos. See
16702 * g_app_info_get_recommended_for_type() and
16703 * g_app_info_get_fallback_for_type().
16705 * for given @content_type or %NULL on error.
16707 * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
16712 * g_app_info_get_commandline:
16713 * @appinfo: a #GAppInfo
16715 * Gets the commandline with which the application will be
16718 * or %NULL if this information is not available
16720 * Returns: a string containing the @appinfo's commandline,
16726 * g_app_info_get_default_for_type:
16727 * @content_type: the content type to find a #GAppInfo for
16728 * @must_support_uris: if %TRUE, the #GAppInfo is expected to support URIs
16730 * Gets the default #GAppInfo for a given content type.
16734 * Returns: (transfer full): #GAppInfo for given @content_type or
16739 * g_app_info_get_default_for_uri_scheme:
16740 * @uri_scheme: a string containing a URI scheme.
16742 * Gets the default application for handling URIs with
16743 * the given URI scheme. A URI scheme is the initial part
16744 * of the URI, up to but not including the ':', e.g. "http",
16747 * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
16752 * g_app_info_get_description:
16753 * @appinfo: a #GAppInfo.
16755 * Gets a human-readable description of an installed application.
16757 * application @appinfo, or %NULL if none.
16759 * Returns: a string containing a description of the
16764 * g_app_info_get_display_name:
16765 * @appinfo: a #GAppInfo.
16767 * Gets the display name of the application. The display name is often more
16768 * descriptive to the user than the name itself.
16770 * no display name is available.
16772 * Returns: the display name of the application for @appinfo, or the name if
16778 * g_app_info_get_executable:
16779 * @appinfo: a #GAppInfo
16781 * Gets the executable's name for the installed application.
16785 * Returns: a string containing the @appinfo's application
16790 * g_app_info_get_fallback_for_type:
16791 * @content_type: the content type to find a #GAppInfo for
16793 * Gets a list of fallback #GAppInfos for a given content type, i.e.
16794 * those applications which claim to support the given content type
16795 * by MIME type subclassing and not directly.
16797 * for given @content_type or %NULL on error.
16799 * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
16805 * g_app_info_get_icon:
16806 * @appinfo: a #GAppInfo.
16808 * Gets the icon for the application.
16810 * if there is no default icon.
16812 * Returns: (transfer none): the default #GIcon for @appinfo or %NULL
16817 * g_app_info_get_id:
16818 * @appinfo: a #GAppInfo.
16820 * Gets the ID of an application. An id is a string that
16821 * identifies the application. The exact format of the id is
16822 * platform dependent. For instance, on Unix this is the
16823 * desktop file id from the xdg menu specification.
16825 * Note that the returned ID may be %NULL, depending on how
16826 * the @appinfo has been constructed.
16828 * Returns: a string containing the application's ID.
16833 * g_app_info_get_name:
16834 * @appinfo: a #GAppInfo.
16836 * Gets the installed name of the application.
16838 * Returns: the name of the application for @appinfo.
16843 * g_app_info_get_recommended_for_type:
16844 * @content_type: the content type to find a #GAppInfo for
16846 * Gets a list of recommended #GAppInfos for a given content type, i.e.
16847 * those applications which claim to support the given content type exactly,
16848 * and not by MIME type subclassing.
16849 * Note that the first application of the list is the last used one, i.e.
16850 * the last one for which g_app_info_set_as_last_used_for_type() has been
16853 * for given @content_type or %NULL on error.
16855 * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
16861 * g_app_info_launch:
16862 * @appinfo: a #GAppInfo
16863 * @files: (element-type GFile): a #GList of #GFile objects
16864 * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
16865 * @error: a #GError
16867 * Launches the application. Passes @files to the launched application
16868 * as arguments, using the optional @launch_context to get information
16869 * about the details of the launcher (like what screen it is on).
16870 * On error, @error will be set accordingly.
16872 * To launch the application without arguments pass a %NULL @files list.
16874 * Note that even if the launch is successful the application launched
16875 * can fail to start if it runs into problems during startup. There is
16876 * no way to detect this.
16878 * Some URIs can be changed when passed through a GFile (for instance
16879 * unsupported URIs with strange formats like mailto:), so if you have
16880 * a textual URI you want to pass in as argument, consider using
16881 * g_app_info_launch_uris() instead.
16883 * The launched application inherits the environment of the launching
16884 * process, but it can be modified with g_app_launch_context_setenv() and
16885 * g_app_launch_context_unsetenv().
16887 * On UNIX, this function sets the <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>
16888 * environment variable with the path of the launched desktop file and
16889 * <envar>GIO_LAUNCHED_DESKTOP_FILE_PID</envar> to the process
16890 * id of the launched process. This can be used to ignore
16891 * <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>, should it be inherited
16892 * by further processes. The <envar>DISPLAY</envar> and
16893 * <envar>DESKTOP_STARTUP_ID</envar> environment variables are also
16894 * set, based on information provided in @launch_context.
16896 * Returns: %TRUE on successful launch, %FALSE otherwise.
16901 * g_app_info_launch_default_for_uri:
16902 * @uri: the uri to show
16903 * @launch_context: (allow-none): an optional #GAppLaunchContext.
16904 * @error: a #GError.
16906 * Utility function that launches the default application
16907 * registered to handle the specified uri. Synchronous I/O
16908 * is done on the uri to detect the type of the file if
16911 * Returns: %TRUE on success, %FALSE on error.
16916 * g_app_info_launch_uris:
16917 * @appinfo: a #GAppInfo
16918 * @uris: (element-type utf8): a #GList containing URIs to launch.
16919 * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
16920 * @error: a #GError
16922 * Launches the application. This passes the @uris to the launched application
16923 * as arguments, using the optional @launch_context to get information
16924 * about the details of the launcher (like what screen it is on).
16925 * On error, @error will be set accordingly.
16927 * To launch the application without arguments pass a %NULL @uris list.
16929 * Note that even if the launch is successful the application launched
16930 * can fail to start if it runs into problems during startup. There is
16931 * no way to detect this.
16933 * Returns: %TRUE on successful launch, %FALSE otherwise.
16938 * g_app_info_remove_supports_type:
16939 * @appinfo: a #GAppInfo.
16940 * @content_type: a string.
16941 * @error: a #GError.
16943 * Removes a supported type from an application, if possible.
16945 * Returns: %TRUE on success, %FALSE on error.
16950 * g_app_info_reset_type_associations:
16951 * @content_type: a content type
16953 * Removes all changes to the type associations done by
16954 * g_app_info_set_as_default_for_type(),
16955 * g_app_info_set_as_default_for_extension(),
16956 * g_app_info_add_supports_type() or
16957 * g_app_info_remove_supports_type().
16964 * g_app_info_set_as_default_for_extension:
16965 * @appinfo: a #GAppInfo.
16966 * @extension: a string containing the file extension (without the dot).
16967 * @error: a #GError.
16969 * Sets the application as the default handler for the given file extension.
16971 * Returns: %TRUE on success, %FALSE on error.
16976 * g_app_info_set_as_default_for_type:
16977 * @appinfo: a #GAppInfo.
16978 * @content_type: the content type.
16979 * @error: a #GError.
16981 * Sets the application as the default handler for a given type.
16983 * Returns: %TRUE on success, %FALSE on error.
16988 * g_app_info_set_as_last_used_for_type:
16989 * @appinfo: a #GAppInfo.
16990 * @content_type: the content type.
16991 * @error: a #GError.
16993 * Sets the application as the last used application for a given type.
16994 * This will make the application appear as first in the list returned
16995 * by g_app_info_get_recommended_for_type(), regardless of the default
16996 * application for that content type.
16998 * Returns: %TRUE on success, %FALSE on error.
17003 * g_app_info_should_show:
17004 * @appinfo: a #GAppInfo.
17006 * Checks if the application info should be shown in menus that
17007 * list available applications.
17009 * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise.
17014 * g_app_info_supports_files:
17015 * @appinfo: a #GAppInfo.
17017 * Checks if the application accepts files as arguments.
17019 * Returns: %TRUE if the @appinfo supports files.
17024 * g_app_info_supports_uris:
17025 * @appinfo: a #GAppInfo.
17027 * Checks if the application supports reading files and directories from URIs.
17029 * Returns: %TRUE if the @appinfo supports URIs.
17034 * g_app_launch_context_get_display:
17035 * @context: a #GAppLaunchContext
17036 * @info: a #GAppInfo
17037 * @files: (element-type GFile): a #GList of #GFile objects
17039 * Gets the display string for the @context. This is used to ensure new
17040 * applications are started on the same display as the launching
17041 * application, by setting the <envar>DISPLAY</envar> environment variable.
17043 * Returns: a display string for the display.
17048 * g_app_launch_context_get_environment:
17049 * @context: a #GAppLaunchContext
17051 * Gets the complete environment variable list to be passed to
17052 * the child process when @context is used to launch an application.
17053 * This is a %NULL-terminated array of strings, where each string has
17054 * the form <literal>KEY=VALUE</literal>.
17056 * child's environment
17058 * Returns: (array zero-terminated=1) (transfer full): the
17064 * g_app_launch_context_get_startup_notify_id:
17065 * @context: a #GAppLaunchContext
17066 * @info: a #GAppInfo
17067 * @files: (element-type GFile): a #GList of of #GFile objects
17069 * Initiates startup notification for the application and returns the
17070 * <envar>DESKTOP_STARTUP_ID</envar> for the launched operation,
17073 * Startup notification IDs are defined in the <ulink
17074 * url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">
17075 * FreeDesktop.Org Startup Notifications standard</ulink>.
17079 * Returns: a startup notification ID for the application, or %NULL if
17084 * g_app_launch_context_launch_failed:
17085 * @context: a #GAppLaunchContext.
17086 * @startup_notify_id: the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
17088 * Called when an application has failed to launch, so that it can cancel
17089 * the application startup notification started in g_app_launch_context_get_startup_notify_id().
17094 * g_app_launch_context_new:
17096 * Creates a new application launch context. This is not normally used,
17097 * instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
17099 * Returns: a #GAppLaunchContext.
17104 * g_app_launch_context_setenv:
17105 * @context: a #GAppLaunchContext
17106 * @variable: the environment variable to set
17107 * @value: the value for to set the variable to.
17109 * Arranges for @variable to be set to @value in the child's
17110 * environment when @context is used to launch an application.
17117 * g_app_launch_context_unsetenv:
17118 * @context: a #GAppLaunchContext
17119 * @variable: the environment variable to remove
17121 * Arranges for @variable to be unset in the child's environment
17122 * when @context is used to launch an application.
17129 * g_application_activate:
17130 * @application: a #GApplication
17132 * Activates the application.
17134 * In essence, this results in the #GApplication::activate() signal being
17135 * emitted in the primary instance.
17137 * The application must be registered before calling this function.
17144 * g_application_command_line_get_arguments:
17145 * @cmdline: a #GApplicationCommandLine
17146 * @argc: (out): the length of the arguments array, or %NULL
17148 * Gets the list of arguments that was passed on the command line.
17150 * The strings in the array may contain non-utf8 data.
17152 * The return value is %NULL-terminated and should be freed using
17155 * containing the arguments (the argv)
17157 * Returns: (array length=argc) (transfer full): the string array
17163 * g_application_command_line_get_cwd:
17164 * @cmdline: a #GApplicationCommandLine
17166 * Gets the working directory of the command line invocation.
17167 * The string may contain non-utf8 data.
17169 * It is possible that the remote application did not send a working
17170 * directory, so this may be %NULL.
17172 * The return value should not be modified or freed and is valid for as
17173 * long as @cmdline exists.
17175 * Returns: the current directory, or %NULL
17181 * g_application_command_line_get_environ:
17182 * @cmdline: a #GApplicationCommandLine
17184 * Gets the contents of the 'environ' variable of the command line
17185 * invocation, as would be returned by g_get_environ(), ie as a
17186 * %NULL-terminated list of strings in the form 'NAME=VALUE'.
17187 * The strings may contain non-utf8 data.
17189 * The remote application usually does not send an environment. Use
17190 * %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag
17191 * set it is possible that the environment is still not available (due
17192 * to invocation messages from other applications).
17194 * The return value should not be modified or freed and is valid for as
17195 * long as @cmdline exists.
17197 * See g_application_command_line_getenv() if you are only interested
17198 * in the value of a single environment variable.
17200 * strings, or %NULL if they were not sent
17202 * Returns: (array zero-terminated=1) (transfer none): the environment
17208 * g_application_command_line_get_exit_status:
17209 * @cmdline: a #GApplicationCommandLine
17211 * Gets the exit status of @cmdline. See
17212 * g_application_command_line_set_exit_status() for more information.
17214 * Returns: the exit status
17220 * g_application_command_line_get_is_remote:
17221 * @cmdline: a #GApplicationCommandLine
17223 * Determines if @cmdline represents a remote invocation.
17225 * Returns: %TRUE if the invocation was remote
17231 * g_application_command_line_get_platform_data:
17232 * @cmdline: #GApplicationCommandLine
17234 * Gets the platform data associated with the invocation of @cmdline.
17236 * This is a #GVariant dictionary containing information about the
17237 * context in which the invocation occurred. It typically contains
17238 * information like the current working directory and the startup
17241 * For local invocation, it will be %NULL.
17243 * Returns: (allow-none): the platform data, or %NULL
17249 * g_application_command_line_getenv:
17250 * @cmdline: a #GApplicationCommandLine
17251 * @name: the environment variable to get
17253 * Gets the value of a particular environment variable of the command
17254 * line invocation, as would be returned by g_getenv(). The strings may
17255 * contain non-utf8 data.
17257 * The remote application usually does not send an environment. Use
17258 * %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag
17259 * set it is possible that the environment is still not available (due
17260 * to invocation messages from other applications).
17262 * The return value should not be modified or freed and is valid for as
17263 * long as @cmdline exists.
17265 * Returns: the value of the variable, or %NULL if unset or unsent
17271 * g_application_command_line_print:
17272 * @cmdline: a #GApplicationCommandLine
17273 * @format: a printf-style format string
17274 * @...: arguments, as per @format
17276 * Formats a message and prints it using the stdout print handler in the
17277 * invoking process.
17279 * If @cmdline is a local invocation then this is exactly equivalent to
17280 * g_print(). If @cmdline is remote then this is equivalent to calling
17281 * g_print() in the invoking process.
17288 * g_application_command_line_printerr:
17289 * @cmdline: a #GApplicationCommandLine
17290 * @format: a printf-style format string
17291 * @...: arguments, as per @format
17293 * Formats a message and prints it using the stderr print handler in the
17294 * invoking process.
17296 * If @cmdline is a local invocation then this is exactly equivalent to
17297 * g_printerr(). If @cmdline is remote then this is equivalent to
17298 * calling g_printerr() in the invoking process.
17305 * g_application_command_line_set_exit_status:
17306 * @cmdline: a #GApplicationCommandLine
17307 * @exit_status: the exit status
17309 * Sets the exit status that will be used when the invoking process
17312 * The return value of the #GApplication::command-line signal is
17313 * passed to this function when the handler returns. This is the usual
17314 * way of setting the exit status.
17316 * In the event that you want the remote invocation to continue running
17317 * and want to decide on the exit status in the future, you can use this
17318 * call. For the case of a remote invocation, the remote process will
17319 * typically exit when the last reference is dropped on @cmdline. The
17320 * exit status of the remote process will be equal to the last value
17321 * that was set with this function.
17323 * In the case that the commandline invocation is local, the situation
17324 * is slightly more complicated. If the commandline invocation results
17325 * in the mainloop running (ie: because the use-count of the application
17326 * increased to a non-zero value) then the application is considered to
17327 * have been 'successful' in a certain sense, and the exit status is
17328 * always zero. If the application use count is zero, though, the exit
17329 * status of the local #GApplicationCommandLine is used.
17336 * g_application_get_application_id:
17337 * @application: a #GApplication
17339 * Gets the unique identifier for @application.
17341 * Returns: the identifier for @application, owned by @application
17347 * g_application_get_default:
17348 * @returns: (transfer none): the default application for this process, or %NULL
17350 * Returns the default #GApplication instance for this process.
17352 * Normally there is only one #GApplication per process and it becomes
17353 * the default when it is created. You can exercise more control over
17354 * this by using g_application_set_default().
17356 * If there is no default application then %NULL is returned.
17363 * g_application_get_flags:
17364 * @application: a #GApplication
17366 * Gets the flags for @application.
17368 * See #GApplicationFlags.
17370 * Returns: the flags for @application
17376 * g_application_get_inactivity_timeout:
17377 * @application: a #GApplication
17379 * Gets the current inactivity timeout for the application.
17381 * This is the amount of time (in milliseconds) after the last call to
17382 * g_application_release() before the application stops running.
17384 * Returns: the timeout, in milliseconds
17390 * g_application_get_is_registered:
17391 * @application: a #GApplication
17393 * Checks if @application is registered.
17395 * An application is registered if g_application_register() has been
17396 * successfully called.
17398 * Returns: %TRUE if @application is registered
17404 * g_application_get_is_remote:
17405 * @application: a #GApplication
17407 * Checks if @application is remote.
17409 * If @application is remote then it means that another instance of
17410 * application already exists (the 'primary' instance). Calls to
17411 * perform actions on @application will result in the actions being
17412 * performed by the primary instance.
17414 * The value of this property cannot be accessed before
17415 * g_application_register() has been called. See
17416 * g_application_get_is_registered().
17418 * Returns: %TRUE if @application is remote
17424 * g_application_hold:
17425 * @application: a #GApplication
17427 * Increases the use count of @application.
17429 * Use this function to indicate that the application has a reason to
17430 * continue to run. For example, g_application_hold() is called by GTK+
17431 * when a toplevel window is on the screen.
17433 * To cancel the hold, call g_application_release().
17438 * g_application_id_is_valid:
17439 * @application_id: a potential application identifier
17441 * Checks if @application_id is a valid application identifier.
17443 * A valid ID is required for calls to g_application_new() and
17444 * g_application_set_application_id().
17446 * For convenience, the restrictions on application identifiers are
17449 * <listitem>Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-." and must not begin with a digit.</listitem>
17450 * <listitem>Application identifiers must contain at least one '.' (period) character (and thus at least three elements).</listitem>
17451 * <listitem>Application identifiers must not begin or end with a '.' (period) character.</listitem>
17452 * <listitem>Application identifiers must not contain consecutive '.' (period) characters.</listitem>
17453 * <listitem>Application identifiers must not exceed 255 characters.</listitem>
17456 * Returns: %TRUE if @application_id is valid
17461 * g_application_new:
17462 * @application_id: the application id
17463 * @flags: the application flags
17465 * Creates a new #GApplication instance.
17467 * This function calls g_type_init() for you.
17469 * The application id must be valid. See g_application_id_is_valid().
17471 * Returns: a new #GApplication instance
17476 * g_application_open:
17477 * @application: a #GApplication
17478 * @files: (array length=n_files): an array of #GFiles to open
17479 * @n_files: the length of the @files array
17480 * @hint: a hint (or ""), but never %NULL
17482 * Opens the given files.
17484 * In essence, this results in the #GApplication::open signal being emitted
17485 * in the primary instance.
17487 * @n_files must be greater than zero.
17489 * @hint is simply passed through to the ::open signal. It is
17490 * intended to be used by applications that have multiple modes for
17491 * opening files (eg: "view" vs "edit", etc). Unless you have a need
17492 * for this functionality, you should use "".
17494 * The application must be registered before calling this function
17495 * and it must have the %G_APPLICATION_HANDLES_OPEN flag set.
17502 * g_application_register:
17503 * @application: a #GApplication
17504 * @cancellable: a #GCancellable, or %NULL
17505 * @error: a pointer to a NULL #GError, or %NULL
17507 * Attempts registration of the application.
17509 * This is the point at which the application discovers if it is the
17510 * primary instance or merely acting as a remote for an already-existing
17511 * primary instance. This is implemented by attempting to acquire the
17512 * application identifier as a unique bus name on the session bus using
17515 * Due to the internal architecture of GDBus, method calls can be
17516 * dispatched at any time (even if a main loop is not running). For
17517 * this reason, you must ensure that any object paths that you wish to
17518 * register are registered before calling this function.
17520 * If the application has already been registered then %TRUE is
17521 * returned with no work performed.
17523 * The #GApplication::startup signal is emitted if registration succeeds
17524 * and @application is the primary instance.
17526 * In the event of an error (such as @cancellable being cancelled, or a
17527 * failure to connect to the session bus), %FALSE is returned and @error
17528 * is set appropriately.
17530 * Note: the return value of this function is not an indicator that this
17531 * instance is or is not the primary instance of the application. See
17532 * g_application_get_is_remote() for that.
17534 * Returns: %TRUE if registration succeeded
17540 * g_application_release:
17541 * @application: a #GApplication
17543 * Decrease the use count of @application.
17545 * When the use count reaches zero, the application will stop running.
17547 * Never call this function except to cancel the effect of a previous
17548 * call to g_application_hold().
17553 * g_application_run:
17554 * @application: a #GApplication
17555 * @argc: the argc from main() (or 0 if @argv is %NULL)
17556 * @argv: (array length=argc) (allow-none): the argv from main(), or %NULL
17558 * Runs the application.
17560 * This function is intended to be run from main() and its return value
17561 * is intended to be returned by main(). Although you are expected to pass
17562 * the @argc, @argv parameters from main() to this function, it is possible
17563 * to pass %NULL if @argv is not available or commandline handling is not
17566 * First, the local_command_line() virtual function is invoked.
17567 * This function always runs on the local instance. It gets passed a pointer
17568 * to a %NULL-terminated copy of @argv and is expected to remove the arguments
17569 * that it handled (shifting up remaining arguments). See
17570 * <xref linkend="gapplication-example-cmdline2"/> for an example of
17571 * parsing @argv manually. Alternatively, you may use the #GOptionContext API,
17572 * after setting <literal>argc = g_strv_length (argv);</literal>.
17574 * The last argument to local_command_line() is a pointer to the @status
17575 * variable which can used to set the exit status that is returned from
17576 * g_application_run().
17578 * If local_command_line() returns %TRUE, the command line is expected
17579 * to be completely handled, including possibly registering as the primary
17580 * instance, calling g_application_activate() or g_application_open(), etc.
17582 * If local_command_line() returns %FALSE then the application is registered
17583 * and the #GApplication::command-line signal is emitted in the primary
17584 * instance (which may or may not be this instance). The signal handler
17585 * gets passed a #GApplicationCommandline object that (among other things)
17586 * contains the remaining commandline arguments that have not been handled
17587 * by local_command_line().
17589 * If the application has the %G_APPLICATION_HANDLES_COMMAND_LINE
17590 * flag set then the default implementation of local_command_line()
17591 * always returns %FALSE immediately, resulting in the commandline
17592 * always being handled in the primary instance.
17594 * Otherwise, the default implementation of local_command_line() tries
17595 * to do a couple of things that are probably reasonable for most
17596 * applications. First, g_application_register() is called to attempt
17597 * to register the application. If that works, then the command line
17598 * arguments are inspected. If no commandline arguments are given, then
17599 * g_application_activate() is called. If commandline arguments are
17600 * given and the %G_APPLICATION_HANDLES_OPEN flag is set then they
17601 * are assumed to be filenames and g_application_open() is called.
17603 * If you need to handle commandline arguments that are not filenames,
17604 * and you don't mind commandline handling to happen in the primary
17605 * instance, you should set %G_APPLICATION_HANDLED_COMMAND_LINE and
17606 * process the commandline arguments in your #GApplication::command-line
17607 * signal handler, either manually or using the #GOptionContext API.
17609 * If you are interested in doing more complicated local handling of the
17610 * commandline then you should implement your own #GApplication subclass
17611 * and override local_command_line(). In this case, you most likely want
17612 * to return %TRUE from your local_command_line() implementation to
17613 * suppress the default handling. See
17614 * <xref linkend="gapplication-example-cmdline2"/> for an example.
17616 * If, after the above is done, the use count of the application is zero
17617 * then the exit status is returned immediately. If the use count is
17618 * non-zero then the default main context is iterated until the use count
17619 * falls to zero, at which point 0 is returned.
17621 * If the %G_APPLICATION_IS_SERVICE flag is set, then the exiting at
17622 * use count of zero is delayed for a while (ie: the instance stays
17623 * around to provide its <emphasis>service</emphasis> to others).
17625 * Returns: the exit status
17631 * g_application_set_action_group:
17632 * @application: a #GApplication
17633 * @action_group: (allow-none): a #GActionGroup, or %NULL
17635 * This used to be how actions were associated with a #GApplication.
17636 * Now there is #GActionMap for that.
17639 * Deprecated:2.32:Use the #GActionMap interface instead. Never ever
17640 * mix use of this API with use of #GActionMap on the same @application
17641 * or things will go very badly wrong. This function is known to
17642 * introduce buggy behaviour (ie: signals not emitted on changes to the
17643 * action group), so you should really use #GActionMap instead.
17650 * g_application_set_application_id:
17651 * @application: a #GApplication
17652 * @application_id: the identifier for @application
17654 * Sets the unique identifier for @application.
17656 * The application id can only be modified if @application has not yet
17659 * The application id must be valid. See g_application_id_is_valid().
17666 * g_application_set_default:
17667 * @application: the application to set as default, or %NULL
17669 * Sets or unsets the default application for the process, as returned
17670 * by g_application_get_default().
17672 * This function does not take its own reference on @application. If
17673 * @application is destroyed then the default application will revert
17681 * g_application_set_flags:
17682 * @application: a #GApplication
17683 * @flags: the flags for @application
17685 * Sets the flags for @application.
17687 * The flags can only be modified if @application has not yet been
17690 * See #GApplicationFlags.
17697 * g_application_set_inactivity_timeout:
17698 * @application: a #GApplication
17699 * @inactivity_timeout: the timeout, in milliseconds
17701 * Sets the current inactivity timeout for the application.
17703 * This is the amount of time (in milliseconds) after the last call to
17704 * g_application_release() before the application stops running.
17706 * This call has no side effects of its own. The value set here is only
17707 * used for next time g_application_release() drops the use count to
17708 * zero. Any timeouts currently in progress are not impacted.
17715 * g_async_initable_init_async:
17716 * @initable: a #GAsyncInitable.
17717 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
17718 * @cancellable: optional #GCancellable object, %NULL to ignore.
17719 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
17720 * @user_data: the data to pass to callback function
17722 * Starts asynchronous initialization of the object implementing the
17723 * interface. This must be done before any real use of the object after
17724 * initial construction. If the object also implements #GInitable you can
17725 * optionally call g_initable_init() instead.
17727 * When the initialization is finished, @callback will be called. You can
17728 * then call g_async_initable_init_finish() to get the result of the
17731 * Implementations may also support cancellation. If @cancellable is not
17732 * %NULL, then initialization can be cancelled by triggering the cancellable
17733 * object from another thread. If the operation was cancelled, the error
17734 * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
17735 * the object doesn't support cancellable initialization, the error
17736 * %G_IO_ERROR_NOT_SUPPORTED will be returned.
17738 * As with #GInitable, if the object is not initialized, or initialization
17739 * returns with an error, then all operations on the object except
17740 * g_object_ref() and g_object_unref() are considered to be invalid, and
17741 * have undefined behaviour. They will often fail with g_critical() or
17742 * g_warning(), but this must not be relied on.
17744 * Implementations of this method must be idempotent: i.e. multiple calls
17745 * to this function with the same argument should return the same results.
17746 * Only the first call initializes the object; further calls return the result
17747 * of the first call. This is so that it's safe to implement the singleton
17748 * pattern in the GObject constructor function.
17750 * For classes that also support the #GInitable interface, the default
17751 * implementation of this method will run the g_initable_init() function
17752 * in a thread, so if you want to support asynchronous initialization via
17753 * threads, just implement the #GAsyncInitable interface without overriding
17754 * any interface methods.
17761 * g_async_initable_init_finish:
17762 * @initable: a #GAsyncInitable.
17763 * @res: a #GAsyncResult.
17764 * @error: a #GError location to store the error occurring, or %NULL to ignore.
17766 * Finishes asynchronous initialization and returns the result.
17767 * See g_async_initable_init_async().
17769 * will return %FALSE and set @error appropriately if present.
17771 * Returns: %TRUE if successful. If an error has occurred, this function
17777 * g_async_initable_new_async:
17778 * @object_type: a #GType supporting #GAsyncInitable.
17779 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
17780 * @cancellable: optional #GCancellable object, %NULL to ignore.
17781 * @callback: a #GAsyncReadyCallback to call when the initialization is finished
17782 * @user_data: the data to pass to callback function
17783 * @first_property_name: the name of the first property, or %NULL if no properties
17784 * @...: the value of the first property, followed by other property value pairs, and ended by %NULL.
17786 * Helper function for constructing #GAsyncInitable object. This is
17787 * similar to g_object_new() but also initializes the object asynchronously.
17789 * When the initialization is finished, @callback will be called. You can
17790 * then call g_async_initable_new_finish() to get the new object and check
17798 * g_async_initable_new_finish:
17799 * @initable: the #GAsyncInitable from the callback
17800 * @res: the #GAsyncResult from the callback
17801 * @error: return location for errors, or %NULL to ignore
17803 * Finishes the async construction for the various g_async_initable_new
17804 * calls, returning the created object or %NULL on error.
17806 * Free with g_object_unref().
17808 * Returns: (transfer full): a newly created #GObject, or %NULL on error.
17814 * g_async_initable_new_valist_async:
17815 * @object_type: a #GType supporting #GAsyncInitable.
17816 * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
17817 * @var_args: The var args list generated from @first_property_name.
17818 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
17819 * @cancellable: optional #GCancellable object, %NULL to ignore.
17820 * @callback: a #GAsyncReadyCallback to call when the initialization is finished
17821 * @user_data: the data to pass to callback function
17823 * Helper function for constructing #GAsyncInitable object. This is
17824 * similar to g_object_new_valist() but also initializes the object
17827 * When the initialization is finished, @callback will be called. You can
17828 * then call g_async_initable_new_finish() to get the new object and check
17836 * g_async_initable_newv_async:
17837 * @object_type: a #GType supporting #GAsyncInitable.
17838 * @n_parameters: the number of parameters in @parameters
17839 * @parameters: the parameters to use to construct the object
17840 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
17841 * @cancellable: optional #GCancellable object, %NULL to ignore.
17842 * @callback: a #GAsyncReadyCallback to call when the initialization is finished
17843 * @user_data: the data to pass to callback function
17845 * Helper function for constructing #GAsyncInitable object. This is
17846 * similar to g_object_newv() but also initializes the object asynchronously.
17848 * When the initialization is finished, @callback will be called. You can
17849 * then call g_async_initable_new_finish() to get the new object and check
17857 * g_async_result_get_source_object:
17858 * @res: a #GAsyncResult
17860 * Gets the source object from a #GAsyncResult.
17862 * or %NULL if there is none.
17864 * Returns: (transfer full): a new reference to the source object for the @res,
17869 * g_async_result_get_user_data:
17870 * @res: a #GAsyncResult.
17872 * Gets the user data from a #GAsyncResult.
17874 * Returns: (transfer full): the user data for @res.
17879 * g_buffered_input_stream_fill:
17880 * @stream: a #GBufferedInputStream
17881 * @count: the number of bytes that will be read from the stream
17882 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
17883 * @error: location to store the error occurring, or %NULL to ignore
17885 * Tries to read @count bytes from the stream into the buffer.
17886 * Will block during this read.
17888 * If @count is zero, returns zero and does nothing. A value of @count
17889 * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
17891 * On success, the number of bytes read into the buffer is returned.
17892 * It is not an error if this is not the same as the requested size, as it
17893 * can happen e.g. near the end of a file. Zero is returned on end of file
17894 * (or if @count is zero), but never otherwise.
17896 * If @count is -1 then the attempted read size is equal to the number of
17897 * bytes that are required to fill the buffer.
17899 * If @cancellable is not %NULL, then the operation can be cancelled by
17900 * triggering the cancellable object from another thread. If the operation
17901 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
17902 * operation was partially finished when the operation was cancelled the
17903 * partial result will be returned, without an error.
17905 * On error -1 is returned and @error is set accordingly.
17907 * For the asynchronous, non-blocking, version of this function, see
17908 * g_buffered_input_stream_fill_async().
17912 * Returns: the number of bytes read into @stream's buffer, up to @count,
17917 * g_buffered_input_stream_fill_async:
17918 * @stream: a #GBufferedInputStream
17919 * @count: the number of bytes that will be read from the stream
17920 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
17921 * @cancellable: (allow-none): optional #GCancellable object
17922 * @callback: (scope async): a #GAsyncReadyCallback
17923 * @user_data: (closure): a #gpointer
17925 * Reads data into @stream's buffer asynchronously, up to @count size.
17926 * @io_priority can be used to prioritize reads. For the synchronous
17927 * version of this function, see g_buffered_input_stream_fill().
17929 * If @count is -1 then the attempted read size is equal to the number
17930 * of bytes that are required to fill the buffer.
17935 * g_buffered_input_stream_fill_finish:
17936 * @stream: a #GBufferedInputStream
17937 * @result: a #GAsyncResult
17938 * @error: a #GError
17940 * Finishes an asynchronous read.
17942 * Returns: a #gssize of the read stream, or %-1 on an error.
17947 * g_buffered_input_stream_get_available:
17948 * @stream: #GBufferedInputStream
17950 * Gets the size of the available data within the stream.
17952 * Returns: size of the available stream.
17957 * g_buffered_input_stream_get_buffer_size:
17958 * @stream: a #GBufferedInputStream
17960 * Gets the size of the input buffer.
17962 * Returns: the current buffer size.
17967 * g_buffered_input_stream_new:
17968 * @base_stream: a #GInputStream
17970 * Creates a new #GInputStream from the given @base_stream, with
17971 * a buffer set to the default size (4 kilobytes).
17973 * Returns: a #GInputStream for the given @base_stream.
17978 * g_buffered_input_stream_new_sized:
17979 * @base_stream: a #GInputStream
17982 * Creates a new #GBufferedInputStream from the given @base_stream,
17983 * with a buffer set to @size.
17985 * Returns: a #GInputStream.
17990 * g_buffered_input_stream_peek:
17991 * @stream: a #GBufferedInputStream
17992 * @buffer: (array length=count) (element-type guint8): a pointer to an allocated chunk of memory
17993 * @offset: a #gsize
17996 * Peeks in the buffer, copying data of size @count into @buffer,
17997 * offset @offset bytes.
17999 * Returns: a #gsize of the number of bytes peeked, or -1 on error.
18004 * g_buffered_input_stream_peek_buffer:
18005 * @stream: a #GBufferedInputStream
18006 * @count: (out): a #gsize to get the number of bytes available in the buffer
18008 * Returns the buffer with the currently available bytes. The returned
18009 * buffer must not be modified and will become invalid when reading from
18010 * the stream or filling the buffer.
18014 * Returns: (array length=count) (element-type guint8) (transfer none):
18019 * g_buffered_input_stream_read_byte:
18020 * @stream: a #GBufferedInputStream
18021 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
18022 * @error: location to store the error occurring, or %NULL to ignore
18024 * Tries to read a single byte from the stream or the buffer. Will block
18025 * during this read.
18027 * On success, the byte read from the stream is returned. On end of stream
18028 * -1 is returned but it's not an exceptional error and @error is not set.
18030 * If @cancellable is not %NULL, then the operation can be cancelled by
18031 * triggering the cancellable object from another thread. If the operation
18032 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
18033 * operation was partially finished when the operation was cancelled the
18034 * partial result will be returned, without an error.
18036 * On error -1 is returned and @error is set accordingly.
18038 * Returns: the byte read from the @stream, or -1 on end of stream or error.
18043 * g_buffered_input_stream_set_buffer_size:
18044 * @stream: a #GBufferedInputStream
18047 * Sets the size of the internal buffer of @stream to @size, or to the
18048 * size of the contents of the buffer. The buffer can never be resized
18049 * smaller than its current contents.
18054 * g_buffered_output_stream_get_auto_grow:
18055 * @stream: a #GBufferedOutputStream.
18057 * Checks if the buffer automatically grows as data is added.
18059 * %FALSE otherwise.
18061 * Returns: %TRUE if the @stream's buffer automatically grows,
18066 * g_buffered_output_stream_get_buffer_size:
18067 * @stream: a #GBufferedOutputStream.
18069 * Gets the size of the buffer in the @stream.
18071 * Returns: the current size of the buffer.
18076 * g_buffered_output_stream_new:
18077 * @base_stream: a #GOutputStream.
18079 * Creates a new buffered output stream for a base stream.
18081 * Returns: a #GOutputStream for the given @base_stream.
18086 * g_buffered_output_stream_new_sized:
18087 * @base_stream: a #GOutputStream.
18090 * Creates a new buffered output stream with a given buffer size.
18092 * Returns: a #GOutputStream with an internal buffer set to @size.
18097 * g_buffered_output_stream_set_auto_grow:
18098 * @stream: a #GBufferedOutputStream.
18099 * @auto_grow: a #gboolean.
18101 * Sets whether or not the @stream's buffer should automatically grow.
18102 * If @auto_grow is true, then each write will just make the buffer
18103 * larger, and you must manually flush the buffer to actually write out
18104 * the data to the underlying stream.
18109 * g_buffered_output_stream_set_buffer_size:
18110 * @stream: a #GBufferedOutputStream.
18113 * Sets the size of the internal buffer to @size.
18119 * @bus_type: A #GBusType.
18120 * @cancellable: A #GCancellable or %NULL.
18121 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
18122 * @user_data: The data to pass to @callback.
18124 * Asynchronously connects to the message bus specified by @bus_type.
18126 * When the operation is finished, @callback will be invoked. You can
18127 * then call g_bus_get_finish() to get the result of the operation.
18129 * This is a asynchronous failable function. See g_bus_get_sync() for
18130 * the synchronous version.
18137 * g_bus_get_finish:
18138 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_bus_get().
18139 * @error: Return location for error or %NULL.
18141 * Finishes an operation started with g_bus_get().
18143 * The returned object is a singleton, that is, shared with other
18144 * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
18145 * event that you need a private message bus connection, use
18146 * g_dbus_address_get_for_bus_sync() and
18147 * g_dbus_connection_new_for_address().
18149 * Note that the returned #GDBusConnection object will (usually) have
18150 * the #GDBusConnection:exit-on-close property set to %TRUE.
18152 * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
18159 * @bus_type: A #GBusType.
18160 * @cancellable: A #GCancellable or %NULL.
18161 * @error: Return location for error or %NULL.
18163 * Synchronously connects to the message bus specified by @bus_type.
18164 * Note that the returned object may shared with other callers,
18165 * e.g. if two separate parts of a process calls this function with
18166 * the same @bus_type, they will share the same object.
18168 * This is a synchronous failable function. See g_bus_get() and
18169 * g_bus_get_finish() for the asynchronous version.
18171 * The returned object is a singleton, that is, shared with other
18172 * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
18173 * event that you need a private message bus connection, use
18174 * g_dbus_address_get_for_bus_sync() and
18175 * g_dbus_connection_new_for_address().
18177 * Note that the returned #GDBusConnection object will (usually) have
18178 * the #GDBusConnection:exit-on-close property set to %TRUE.
18180 * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
18187 * @bus_type: The type of bus to own a name on.
18188 * @name: The well-known name to own.
18189 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
18190 * @bus_acquired_handler: Handler to invoke when connected to the bus of type @bus_type or %NULL.
18191 * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
18192 * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
18193 * @user_data: User data to pass to handlers.
18194 * @user_data_free_func: Function for freeing @user_data or %NULL.
18196 * Starts acquiring @name on the bus specified by @bus_type and calls
18197 * @name_acquired_handler and @name_lost_handler when the name is
18198 * acquired respectively lost. Callbacks will be invoked in the <link
18199 * linkend="g-main-context-push-thread-default">thread-default main
18200 * loop</link> of the thread you are calling this function from.
18202 * You are guaranteed that one of the @name_acquired_handler and @name_lost_handler
18203 * callbacks will be invoked after calling this function - there are three
18207 * @name_lost_handler with a %NULL connection (if a connection to the bus can't be made).
18208 * </para></listitem>
18210 * @bus_acquired_handler then @name_lost_handler (if the name can't be obtained)
18211 * </para></listitem>
18213 * @bus_acquired_handler then @name_acquired_handler (if the name was obtained).
18214 * </para></listitem>
18216 * When you are done owning the name, just call g_bus_unown_name()
18217 * with the owner id this function returns.
18219 * If the name is acquired or lost (for example another application
18220 * could acquire the name if you allow replacement or the application
18221 * currently owning the name exits), the handlers are also invoked. If the
18222 * #GDBusConnection that is used for attempting to own the name
18223 * closes, then @name_lost_handler is invoked since it is no
18224 * longer possible for other processes to access the process.
18226 * You cannot use g_bus_own_name() several times for the same name (unless
18227 * interleaved with calls to g_bus_unown_name()) - only the first call
18230 * Another guarantee is that invocations of @name_acquired_handler
18231 * and @name_lost_handler are guaranteed to alternate; that
18232 * is, if @name_acquired_handler is invoked then you are
18233 * guaranteed that the next time one of the handlers is invoked, it
18234 * will be @name_lost_handler. The reverse is also true.
18236 * If you plan on exporting objects (using e.g.
18237 * g_dbus_connection_register_object()), note that it is generally too late
18238 * to export the objects in @name_acquired_handler. Instead, you can do this
18239 * in @bus_acquired_handler since you are guaranteed that this will run
18240 * before @name is requested from the bus.
18242 * This behavior makes it very simple to write applications that wants
18243 * to own names and export objects, see <xref linkend="gdbus-owning-names"/>.
18244 * Simply register objects to be exported in @bus_acquired_handler and
18245 * unregister the objects (if any) in @name_lost_handler.
18247 * g_bus_unown_name() to stop owning the name.
18249 * Returns: An identifier (never 0) that an be used with
18255 * g_bus_own_name_on_connection:
18256 * @connection: A #GDBusConnection.
18257 * @name: The well-known name to own.
18258 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
18259 * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
18260 * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
18261 * @user_data: User data to pass to handlers.
18262 * @user_data_free_func: Function for freeing @user_data or %NULL.
18264 * Like g_bus_own_name() but takes a #GDBusConnection instead of a
18267 * g_bus_unown_name() to stop owning the name.
18269 * Returns: An identifier (never 0) that an be used with
18275 * g_bus_own_name_on_connection_with_closures:
18276 * @connection: A #GDBusConnection.
18277 * @name: The well-known name to own.
18278 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
18279 * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
18280 * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
18282 * Version of g_bus_own_name_on_connection() using closures instead of callbacks for
18283 * easier binding in other languages.
18285 * g_bus_unown_name() to stop owning the name.
18287 * Returns: An identifier (never 0) that an be used with
18288 * Rename to: g_bus_own_name_on_connection
18294 * g_bus_own_name_with_closures:
18295 * @bus_type: The type of bus to own a name on.
18296 * @name: The well-known name to own.
18297 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
18298 * @bus_acquired_closure: (allow-none): #GClosure to invoke when connected to the bus of type @bus_type or %NULL.
18299 * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
18300 * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
18302 * Version of g_bus_own_name() using closures instead of callbacks for
18303 * easier binding in other languages.
18305 * g_bus_unown_name() to stop owning the name.
18307 * Returns: An identifier (never 0) that an be used with
18308 * Rename to: g_bus_own_name
18314 * g_bus_unown_name:
18315 * @owner_id: An identifier obtained from g_bus_own_name()
18317 * Stops owning a name.
18324 * g_bus_unwatch_name:
18325 * @watcher_id: An identifier obtained from g_bus_watch_name()
18327 * Stops watching a name.
18334 * g_bus_watch_name:
18335 * @bus_type: The type of bus to watch a name on.
18336 * @name: The name (well-known or unique) to watch.
18337 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
18338 * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
18339 * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
18340 * @user_data: User data to pass to handlers.
18341 * @user_data_free_func: Function for freeing @user_data or %NULL.
18343 * Starts watching @name on the bus specified by @bus_type and calls
18344 * @name_appeared_handler and @name_vanished_handler when the name is
18345 * known to have a owner respectively known to lose its
18346 * owner. Callbacks will be invoked in the <link
18347 * linkend="g-main-context-push-thread-default">thread-default main
18348 * loop</link> of the thread you are calling this function from.
18350 * You are guaranteed that one of the handlers will be invoked after
18351 * calling this function. When you are done watching the name, just
18352 * call g_bus_unwatch_name() with the watcher id this function
18355 * If the name vanishes or appears (for example the application owning
18356 * the name could restart), the handlers are also invoked. If the
18357 * #GDBusConnection that is used for watching the name disconnects, then
18358 * @name_vanished_handler is invoked since it is no longer
18359 * possible to access the name.
18361 * Another guarantee is that invocations of @name_appeared_handler
18362 * and @name_vanished_handler are guaranteed to alternate; that
18363 * is, if @name_appeared_handler is invoked then you are
18364 * guaranteed that the next time one of the handlers is invoked, it
18365 * will be @name_vanished_handler. The reverse is also true.
18367 * This behavior makes it very simple to write applications that wants
18368 * to take action when a certain name exists, see <xref
18369 * linkend="gdbus-watching-names"/>. Basically, the application
18370 * should create object proxies in @name_appeared_handler and destroy
18371 * them again (if any) in @name_vanished_handler.
18373 * g_bus_unwatch_name() to stop watching the name.
18375 * Returns: An identifier (never 0) that an be used with
18381 * g_bus_watch_name_on_connection:
18382 * @connection: A #GDBusConnection.
18383 * @name: The name (well-known or unique) to watch.
18384 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
18385 * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
18386 * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
18387 * @user_data: User data to pass to handlers.
18388 * @user_data_free_func: Function for freeing @user_data or %NULL.
18390 * Like g_bus_watch_name() but takes a #GDBusConnection instead of a
18393 * g_bus_unwatch_name() to stop watching the name.
18395 * Returns: An identifier (never 0) that an be used with
18401 * g_bus_watch_name_on_connection_with_closures:
18402 * @connection: A #GDBusConnection.
18403 * @name: The name (well-known or unique) to watch.
18404 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
18405 * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
18406 * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
18408 * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for
18409 * easier binding in other languages.
18411 * g_bus_unwatch_name() to stop watching the name.
18413 * Returns: An identifier (never 0) that an be used with
18414 * Rename to: g_bus_watch_name_on_connection
18420 * g_bus_watch_name_with_closures:
18421 * @bus_type: The type of bus to watch a name on.
18422 * @name: The name (well-known or unique) to watch.
18423 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
18424 * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
18425 * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
18427 * Version of g_bus_watch_name() using closures instead of callbacks for
18428 * easier binding in other languages.
18430 * g_bus_unwatch_name() to stop watching the name.
18432 * Returns: An identifier (never 0) that an be used with
18433 * Rename to: g_bus_watch_name
18439 * g_cancellable_cancel:
18440 * @cancellable: a #GCancellable object.
18442 * Will set @cancellable to cancelled, and will emit the
18443 * #GCancellable::cancelled signal. (However, see the warning about
18444 * race conditions in the documentation for that signal if you are
18445 * planning to connect to it.)
18447 * This function is thread-safe. In other words, you can safely call
18448 * it from a thread other than the one running the operation that was
18449 * passed the @cancellable.
18451 * The convention within gio is that cancelling an asynchronous
18452 * operation causes it to complete asynchronously. That is, if you
18453 * cancel the operation from the same thread in which it is running,
18454 * then the operation's #GAsyncReadyCallback will not be invoked until
18455 * the application returns to the main loop.
18460 * g_cancellable_connect:
18461 * @cancellable: A #GCancellable.
18462 * @callback: The #GCallback to connect.
18463 * @data: Data to pass to @callback.
18464 * @data_destroy_func: Free function for @data or %NULL.
18466 * Convenience function to connect to the #GCancellable::cancelled
18467 * signal. Also handles the race condition that may happen
18468 * if the cancellable is cancelled right before connecting.
18470 * @callback is called at most once, either directly at the
18471 * time of the connect if @cancellable is already cancelled,
18472 * or when @cancellable is cancelled in some thread.
18474 * @data_destroy_func will be called when the handler is
18475 * disconnected, or immediately if the cancellable is already
18478 * See #GCancellable::cancelled for details on how to use this.
18482 * Returns: The id of the signal handler or 0 if @cancellable has already
18488 * g_cancellable_disconnect:
18489 * @cancellable: A #GCancellable or %NULL.
18490 * @handler_id: Handler id of the handler to be disconnected, or %0.
18492 * Disconnects a handler from a cancellable instance similar to
18493 * g_signal_handler_disconnect(). Additionally, in the event that a
18494 * signal handler is currently running, this call will block until the
18495 * handler has finished. Calling this function from a
18496 * #GCancellable::cancelled signal handler will therefore result in a
18499 * This avoids a race condition where a thread cancels at the
18500 * same time as the cancellable operation is finished and the
18501 * signal handler is removed. See #GCancellable::cancelled for
18502 * details on how to use this.
18504 * If @cancellable is %NULL or @handler_id is %0 this function does
18512 * g_cancellable_get_current:
18514 * Gets the top cancellable from the stack.
18516 * if the stack is empty.
18518 * Returns: (transfer none): a #GCancellable from the top of the stack, or %NULL
18523 * g_cancellable_get_fd:
18524 * @cancellable: a #GCancellable.
18526 * Gets the file descriptor for a cancellable job. This can be used to
18527 * implement cancellable operations on Unix systems. The returned fd will
18528 * turn readable when @cancellable is cancelled.
18530 * You are not supposed to read from the fd yourself, just check for
18531 * readable status. Reading to unset the readable status is done
18532 * with g_cancellable_reset().
18534 * After a successful return from this function, you should use
18535 * g_cancellable_release_fd() to free up resources allocated for
18536 * the returned file descriptor.
18538 * See also g_cancellable_make_pollfd().
18540 * is not supported, or on errors.
18542 * Returns: A valid file descriptor. %-1 if the file descriptor
18547 * g_cancellable_is_cancelled:
18548 * @cancellable: (allow-none): a #GCancellable or %NULL
18550 * Checks if a cancellable job has been cancelled.
18552 * FALSE if called with %NULL or if item is not cancelled.
18554 * Returns: %TRUE if @cancellable is cancelled,
18559 * g_cancellable_make_pollfd:
18560 * @cancellable: a #GCancellable or %NULL
18561 * @pollfd: a pointer to a #GPollFD
18563 * Creates a #GPollFD corresponding to @cancellable; this can be passed
18564 * to g_poll() and used to poll for cancellation. This is useful both
18565 * for unix systems without a native poll and for portability to
18568 * When this function returns %TRUE, you should use
18569 * g_cancellable_release_fd() to free up resources allocated for the
18570 * @pollfd. After a %FALSE return, do not call g_cancellable_release_fd().
18572 * If this function returns %FALSE, either no @cancellable was given or
18573 * resource limits prevent this function from allocating the necessary
18574 * structures for polling. (On Linux, you will likely have reached
18575 * the maximum number of file descriptors.) The suggested way to handle
18576 * these cases is to ignore the @cancellable.
18578 * You are not supposed to read from the fd yourself, just check for
18579 * readable status. Reading to unset the readable status is done
18580 * with g_cancellable_reset().
18582 * failure to prepare the cancellable.
18584 * Returns: %TRUE if @pollfd was successfully initialized, %FALSE on
18590 * g_cancellable_new:
18592 * Creates a new #GCancellable object.
18594 * Applications that want to start one or more operations
18595 * that should be cancellable should create a #GCancellable
18596 * and pass it to the operations.
18598 * One #GCancellable can be used in multiple consecutive
18599 * operations or in multiple concurrent operations.
18601 * Returns: a #GCancellable.
18606 * g_cancellable_pop_current:
18607 * @cancellable: a #GCancellable object
18609 * Pops @cancellable off the cancellable stack (verifying that @cancellable
18610 * is on the top of the stack).
18615 * g_cancellable_push_current:
18616 * @cancellable: a #GCancellable object
18618 * Pushes @cancellable onto the cancellable stack. The current
18619 * cancellable can then be received using g_cancellable_get_current().
18621 * This is useful when implementing cancellable operations in
18622 * code that does not allow you to pass down the cancellable object.
18624 * This is typically called automatically by e.g. #GFile operations,
18625 * so you rarely have to call this yourself.
18630 * g_cancellable_release_fd:
18631 * @cancellable: a #GCancellable
18633 * Releases a resources previously allocated by g_cancellable_get_fd()
18634 * or g_cancellable_make_pollfd().
18636 * For compatibility reasons with older releases, calling this function
18637 * is not strictly required, the resources will be automatically freed
18638 * when the @cancellable is finalized. However, the @cancellable will
18639 * block scarce file descriptors until it is finalized if this function
18640 * is not called. This can cause the application to run out of file
18641 * descriptors when many #GCancellables are used at the same time.
18648 * g_cancellable_reset:
18649 * @cancellable: a #GCancellable object.
18651 * Resets @cancellable to its uncancelled state.
18653 * If cancellable is currently in use by any cancellable operation
18654 * then the behavior of this function is undefined.
18659 * g_cancellable_set_error_if_cancelled:
18660 * @cancellable: (allow-none): a #GCancellable or %NULL
18661 * @error: #GError to append error state to
18663 * If the @cancellable is cancelled, sets the error to notify
18664 * that the operation was cancelled.
18666 * Returns: %TRUE if @cancellable was cancelled, %FALSE if it was not
18671 * g_cancellable_source_new: (skip)
18672 * @cancellable: a #GCancellable, or %NULL
18674 * Creates a source that triggers if @cancellable is cancelled and
18675 * calls its callback of type #GCancellableSourceFunc. This is
18676 * primarily useful for attaching to another (non-cancellable) source
18677 * with g_source_add_child_source() to add cancellability to it.
18679 * For convenience, you can call this with a %NULL #GCancellable,
18680 * in which case the source will never trigger.
18682 * Returns: (transfer full): the new #GSource.
18688 * g_charset_converter_get_num_fallbacks:
18689 * @converter: a #GCharsetConverter
18691 * Gets the number of fallbacks that @converter has applied so far.
18693 * Returns: the number of fallbacks that @converter has applied
18699 * g_charset_converter_get_use_fallback:
18700 * @converter: a #GCharsetConverter
18702 * Gets the #GCharsetConverter:use-fallback property.
18704 * Returns: %TRUE if fallbacks are used by @converter
18710 * g_charset_converter_new:
18711 * @to_charset: destination charset
18712 * @from_charset: source charset
18713 * @error: #GError for error reporting, or %NULL to ignore.
18715 * Creates a new #GCharsetConverter.
18717 * Returns: a new #GCharsetConverter or %NULL on error.
18723 * g_charset_converter_set_use_fallback:
18724 * @converter: a #GCharsetConverter
18725 * @use_fallback: %TRUE to use fallbacks
18727 * Sets the #GCharsetConverter:use-fallback property.
18734 * g_content_type_can_be_executable:
18735 * @type: a content type string
18737 * Checks if a content type can be executable. Note that for instance
18738 * things like text files can be executables (i.e. scripts and batch files).
18740 * can be executable, %FALSE otherwise.
18742 * Returns: %TRUE if the file type corresponds to a type that
18747 * g_content_type_equals:
18748 * @type1: a content type string
18749 * @type2: a content type string
18751 * Compares two content types for equality.
18753 * %FALSE otherwise.
18755 * Returns: %TRUE if the two strings are identical or equivalent,
18760 * g_content_type_from_mime_type:
18761 * @mime_type: a mime type string
18763 * Tries to find a content type based on the mime type name.
18765 * or %NULL. Free with g_free()
18767 * Returns: (allow-none): Newly allocated string with content type
18773 * g_content_type_get_description:
18774 * @type: a content type string
18776 * Gets the human readable description of the content type.
18778 * returned string with g_free()
18780 * Returns: a short description of the content type @type. Free the
18785 * g_content_type_get_icon:
18786 * @type: a content type string
18788 * Gets the icon for a content type.
18790 * object with g_object_unref()
18792 * Returns: (transfer full): #GIcon corresponding to the content type. Free the returned
18797 * g_content_type_get_mime_type:
18798 * @type: a content type string
18800 * Gets the mime type for the content type, if one is registered.
18802 * or %NULL if unknown.
18804 * Returns: (allow-none): the registered mime type for the given @type,
18809 * g_content_type_guess:
18810 * @filename: (allow-none): a string, or %NULL
18811 * @data: (allow-none) (array length=data_size): a stream of data, or %NULL
18812 * @data_size: the size of @data
18813 * @result_uncertain: (allow-none) (out): return location for the certainty of the result, or %NULL
18815 * Guesses the content type based on example data. If the function is
18816 * uncertain, @result_uncertain will be set to %TRUE. Either @filename
18817 * or @data may be %NULL, in which case the guess will be based solely
18818 * on the other argument.
18820 * given data. Free with g_free()
18822 * Returns: a string indicating a guessed content type for the
18827 * g_content_type_guess_for_tree:
18828 * @root: the root of the tree to guess a type for
18830 * Tries to guess the type of the tree with root @root, by
18831 * looking at the files it contains. The result is an array
18832 * of content types, with the best guess coming first.
18834 * The types returned all have the form x-content/foo, e.g.
18835 * x-content/audio-cdda (for audio CDs) or x-content/image-dcf
18836 * (for a camera memory card). See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
18837 * specification for more on x-content types.
18839 * This function is useful in the implementation of
18840 * g_mount_guess_content_type().
18842 * array of zero or more content types. Free with g_strfreev()
18844 * Returns: (transfer full) (array zero-terminated=1): an %NULL-terminated
18850 * g_content_type_is_a:
18851 * @type: a content type string
18852 * @supertype: a content type string
18854 * Determines if @type is a subset of @supertype.
18856 * %FALSE otherwise.
18858 * Returns: %TRUE if @type is a kind of @supertype,
18863 * g_content_type_is_unknown:
18864 * @type: a content type string
18866 * Checks if the content type is the generic "unknown" type.
18867 * On UNIX this is the "application/octet-stream" mimetype,
18868 * while on win32 it is "*".
18870 * Returns: %TRUE if the type is the unknown type.
18875 * g_content_types_get_registered:
18877 * Gets a list of strings containing all the registered content types
18878 * known to the system. The list and its data should be freed using
18880 * g_list_free_full (list, g_free);
18881 * </programlisting>
18883 * Returns: (element-type utf8) (transfer full): #GList of the registered content types
18888 * g_converter_convert:
18889 * @converter: a #GConverter.
18890 * @inbuf: (array length=inbuf_size) (element-type guint8): the buffer containing the data to convert.
18891 * @inbuf_size: the number of bytes in @inbuf
18892 * @outbuf: a buffer to write converted data in.
18893 * @outbuf_size: the number of bytes in @outbuf, must be at least one
18894 * @flags: a #GConvertFlags controlling the conversion details
18895 * @bytes_read: (out): will be set to the number of bytes read from @inbuf on success
18896 * @bytes_written: (out): will be set to the number of bytes written to @outbuf on success
18897 * @error: location to store the error occurring, or %NULL to ignore
18899 * This is the main operation used when converting data. It is to be called
18900 * multiple times in a loop, and each time it will do some work, i.e.
18901 * producing some output (in @outbuf) or consuming some input (from @inbuf) or
18902 * both. If its not possible to do any work an error is returned.
18904 * Note that a single call may not consume all input (or any input at all).
18905 * Also a call may produce output even if given no input, due to state stored
18906 * in the converter producing output.
18908 * If any data was either produced or consumed, and then an error happens, then
18909 * only the successful conversion is reported and the error is returned on the
18912 * A full conversion loop involves calling this method repeatedly, each time
18913 * giving it new input and space output space. When there is no more input
18914 * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set.
18915 * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED
18916 * each time until all data is consumed and all output is produced, then
18917 * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED
18918 * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance
18919 * in a decompression converter where the end of data is detectable from the
18920 * data (and there might even be other data after the end of the compressed data).
18922 * When some data has successfully been converted @bytes_read and is set to
18923 * the number of bytes read from @inbuf, and @bytes_written is set to indicate
18924 * how many bytes was written to @outbuf. If there are more data to output
18925 * or consume (i.e. unless the %G_CONVERTER_INPUT_AT_END is specified) then
18926 * %G_CONVERTER_CONVERTED is returned, and if no more data is to be output
18927 * then %G_CONVERTER_FINISHED is returned.
18929 * On error %G_CONVERTER_ERROR is returned and @error is set accordingly.
18930 * Some errors need special handling:
18932 * %G_IO_ERROR_NO_SPACE is returned if there is not enough space
18933 * to write the resulting converted data, the application should
18934 * call the function again with a larger @outbuf to continue.
18936 * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough
18937 * input to fully determine what the conversion should produce,
18938 * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for
18939 * example with an incomplete multibyte sequence when converting text,
18940 * or when a regexp matches up to the end of the input (and may match
18941 * further input). It may also happen when @inbuf_size is zero and
18942 * there is no more data to produce.
18944 * When this happens the application should read more input and then
18945 * call the function again. If further input shows that there is no
18946 * more data call the function again with the same data but with
18947 * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion
18948 * to finish as e.g. in the regexp match case (or, to fail again with
18949 * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the
18950 * input is actually partial).
18952 * After g_converter_convert() has returned %G_CONVERTER_FINISHED the
18953 * converter object is in an invalid state where its not allowed
18954 * to call g_converter_convert() anymore. At this time you can only
18955 * free the object or call g_converter_reset() to reset it to the
18958 * If the flag %G_CONVERTER_FLUSH is set then conversion is modified
18959 * to try to write out all internal state to the output. The application
18960 * has to call the function multiple times with the flag set, and when
18961 * the available input has been consumed and all internal state has
18962 * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if
18963 * really at the end) is returned instead of %G_CONVERTER_CONVERTED.
18964 * This is somewhat similar to what happens at the end of the input stream,
18965 * but done in the middle of the data.
18967 * This has different meanings for different conversions. For instance
18968 * in a compression converter it would mean that we flush all the
18969 * compression state into output such that if you uncompress the
18970 * compressed data you get back all the input data. Doing this may
18971 * make the final file larger due to padding though. Another example
18972 * is a regexp conversion, where if you at the end of the flushed data
18973 * have a match, but there is also a potential longer match. In the
18974 * non-flushed case we would ask for more input, but when flushing we
18975 * treat this as the end of input and do the match.
18977 * Flushing is not always possible (like if a charset converter flushes
18978 * at a partial multibyte sequence). Converters are supposed to try
18979 * to produce as much output as possible and then return an error
18980 * (typically %G_IO_ERROR_PARTIAL_INPUT).
18982 * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error.
18988 * g_converter_input_stream_get_converter:
18989 * @converter_stream: a #GConverterInputStream
18991 * Gets the #GConverter that is used by @converter_stream.
18993 * Returns: (transfer none): the converter of the converter input stream
18999 * g_converter_input_stream_new:
19000 * @base_stream: a #GInputStream
19001 * @converter: a #GConverter
19003 * Creates a new converter input stream for the @base_stream.
19005 * Returns: a new #GInputStream.
19010 * g_converter_output_stream_get_converter:
19011 * @converter_stream: a #GConverterOutputStream
19013 * Gets the #GConverter that is used by @converter_stream.
19015 * Returns: (transfer none): the converter of the converter output stream
19021 * g_converter_output_stream_new:
19022 * @base_stream: a #GOutputStream
19023 * @converter: a #GConverter
19025 * Creates a new converter output stream for the @base_stream.
19027 * Returns: a new #GOutputStream.
19032 * g_converter_reset:
19033 * @converter: a #GConverter.
19035 * Resets all internal state in the converter, making it behave
19036 * as if it was just created. If the converter has any internal
19037 * state that would produce output then that output is lost.
19044 * g_credentials_get_native: (skip)
19045 * @credentials: A #GCredentials.
19046 * @native_type: The type of native credentials to get.
19048 * Gets a pointer to native credentials of type @native_type from
19051 * It is a programming error (which will cause an warning to be
19052 * logged) to use this method if there is no #GCredentials support for
19053 * the OS or if @native_type isn't supported by the OS.
19055 * operation there is no #GCredentials support for the OS or if
19056 * @native_type isn't supported by the OS. Do not free the returned
19057 * data, it is owned by @credentials.
19059 * Returns: The pointer to native credentials or %NULL if the
19065 * g_credentials_get_unix_user:
19066 * @credentials: A #GCredentials
19067 * @error: Return location for error or %NULL.
19069 * Tries to get the UNIX user identifier from @credentials. This
19070 * method is only available on UNIX platforms.
19072 * This operation can fail if #GCredentials is not supported on the
19073 * OS or if the native credentials type does not contain information
19074 * about the UNIX user.
19076 * Returns: The UNIX user identifier or -1 if @error is set.
19082 * g_credentials_is_same_user:
19083 * @credentials: A #GCredentials.
19084 * @other_credentials: A #GCredentials.
19085 * @error: Return location for error or %NULL.
19087 * Checks if @credentials and @other_credentials is the same user.
19089 * This operation can fail if #GCredentials is not supported on the
19092 * user, %FALSE otherwise or if @error is set.
19094 * Returns: %TRUE if @credentials and @other_credentials has the same
19100 * g_credentials_new:
19102 * Creates a new #GCredentials object with credentials matching the
19103 * the current process.
19105 * Returns: A #GCredentials. Free with g_object_unref().
19111 * g_credentials_set_native:
19112 * @credentials: A #GCredentials.
19113 * @native_type: The type of native credentials to set.
19114 * @native: A pointer to native credentials.
19116 * Copies the native credentials of type @native_type from @native
19117 * into @credentials.
19119 * It is a programming error (which will cause an warning to be
19120 * logged) to use this method if there is no #GCredentials support for
19121 * the OS or if @native_type isn't supported by the OS.
19128 * g_credentials_set_unix_user:
19129 * @credentials: A #GCredentials.
19130 * @uid: The UNIX user identifier to set.
19131 * @error: Return location for error or %NULL.
19133 * Tries to set the UNIX user identifier on @credentials. This method
19134 * is only available on UNIX platforms.
19136 * This operation can fail if #GCredentials is not supported on the
19137 * OS or if the native credentials type does not contain information
19138 * about the UNIX user.
19140 * Returns: %TRUE if @uid was set, %FALSE if error is set.
19146 * g_credentials_to_string:
19147 * @credentials: A #GCredentials object.
19149 * Creates a human-readable textual representation of @credentials
19150 * that can be used in logging and debug messages. The format of the
19151 * returned string may change in future GLib release.
19153 * Returns: A string that should be freed with g_free().
19159 * g_data_input_stream_get_byte_order:
19160 * @stream: a given #GDataInputStream.
19162 * Gets the byte order for the data input stream.
19164 * Returns: the @stream's current #GDataStreamByteOrder.
19169 * g_data_input_stream_get_newline_type:
19170 * @stream: a given #GDataInputStream.
19172 * Gets the current newline type for the @stream.
19174 * Returns: #GDataStreamNewlineType for the given @stream.
19179 * g_data_input_stream_new:
19180 * @base_stream: a #GInputStream.
19182 * Creates a new data input stream for the @base_stream.
19184 * Returns: a new #GDataInputStream.
19189 * g_data_input_stream_read_byte:
19190 * @stream: a given #GDataInputStream.
19191 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19192 * @error: #GError for error reporting.
19194 * Reads an unsigned 8-bit/1-byte value from @stream.
19196 * if an error occurred.
19198 * Returns: an unsigned 8-bit/1-byte value read from the @stream or %0
19203 * g_data_input_stream_read_int16:
19204 * @stream: a given #GDataInputStream.
19205 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19206 * @error: #GError for error reporting.
19208 * Reads a 16-bit/2-byte value from @stream.
19210 * In order to get the correct byte order for this read operation,
19211 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
19213 * an error occurred.
19215 * Returns: a signed 16-bit/2-byte value read from @stream or %0 if
19220 * g_data_input_stream_read_int32:
19221 * @stream: a given #GDataInputStream.
19222 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19223 * @error: #GError for error reporting.
19225 * Reads a signed 32-bit/4-byte value from @stream.
19227 * In order to get the correct byte order for this read operation,
19228 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
19230 * If @cancellable is not %NULL, then the operation can be cancelled by
19231 * triggering the cancellable object from another thread. If the operation
19232 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19234 * an error occurred.
19236 * Returns: a signed 32-bit/4-byte value read from the @stream or %0 if
19241 * g_data_input_stream_read_int64:
19242 * @stream: a given #GDataInputStream.
19243 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19244 * @error: #GError for error reporting.
19246 * Reads a 64-bit/8-byte value from @stream.
19248 * In order to get the correct byte order for this read operation,
19249 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
19251 * If @cancellable is not %NULL, then the operation can be cancelled by
19252 * triggering the cancellable object from another thread. If the operation
19253 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19255 * an error occurred.
19257 * Returns: a signed 64-bit/8-byte value read from @stream or %0 if
19262 * g_data_input_stream_read_line:
19263 * @stream: a given #GDataInputStream.
19264 * @length: (out): a #gsize to get the length of the data read in.
19265 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19266 * @error: #GError for error reporting.
19268 * Reads a line from the data input stream. Note that no encoding
19269 * checks or conversion is performed; the input is not guaranteed to
19270 * be UTF-8, and may in fact have embedded NUL characters.
19272 * If @cancellable is not %NULL, then the operation can be cancelled by
19273 * triggering the cancellable object from another thread. If the operation
19274 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19276 * NUL terminated byte array with the line that was read in (without
19277 * the newlines). Set @length to a #gsize to get the length of the
19278 * read line. On an error, it will return %NULL and @error will be
19279 * set. If there's no content to read, it will still return %NULL,
19280 * but @error won't be set.
19282 * Returns: (transfer full) (array zero-terminated=1) (element-type guint8): a
19287 * g_data_input_stream_read_line_async:
19288 * @stream: a given #GDataInputStream.
19289 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19290 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19291 * @callback: (scope async): callback to call when the request is satisfied.
19292 * @user_data: (closure): the data to pass to callback function.
19294 * The asynchronous version of g_data_input_stream_read_line(). It is
19295 * an error to have two outstanding calls to this function.
19297 * When the operation is finished, @callback will be called. You
19298 * can then call g_data_input_stream_read_line_finish() to get
19299 * the result of the operation.
19306 * g_data_input_stream_read_line_finish:
19307 * @stream: a given #GDataInputStream.
19308 * @result: the #GAsyncResult that was provided to the callback.
19309 * @length: (out): a #gsize to get the length of the data read in.
19310 * @error: #GError for error reporting.
19312 * Finish an asynchronous call started by
19313 * g_data_input_stream_read_line_async(). Note the warning about
19314 * string encoding in g_data_input_stream_read_line() applies here as
19317 * NUL-terminated byte array with the line that was read in
19318 * (without the newlines). Set @length to a #gsize to get the
19319 * length of the read line. On an error, it will return %NULL and
19320 * @error will be set. If there's no content to read, it will
19321 * still return %NULL, but @error won't be set.
19323 * Returns: (transfer full) (array zero-terminated=1) (element-type guint8): a
19329 * g_data_input_stream_read_line_finish_utf8:
19330 * @stream: a given #GDataInputStream.
19331 * @result: the #GAsyncResult that was provided to the callback.
19332 * @length: (out): a #gsize to get the length of the data read in.
19333 * @error: #GError for error reporting.
19335 * Finish an asynchronous call started by
19336 * g_data_input_stream_read_line_async().
19338 * (without the newlines). Set @length to a #gsize to get the length
19339 * of the read line. On an error, it will return %NULL and @error
19340 * will be set. For UTF-8 conversion errors, the set error domain is
19341 * %G_CONVERT_ERROR. If there's no content to read, it will still
19342 * return %NULL, but @error won't be set.
19344 * Returns: (transfer full): a string with the line that was read in
19350 * g_data_input_stream_read_line_utf8:
19351 * @stream: a given #GDataInputStream.
19352 * @length: (out): a #gsize to get the length of the data read in.
19353 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19354 * @error: #GError for error reporting.
19356 * Reads a UTF-8 encoded line from the data input stream.
19358 * If @cancellable is not %NULL, then the operation can be cancelled by
19359 * triggering the cancellable object from another thread. If the operation
19360 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19362 * line that was read in (without the newlines). Set @length to a
19363 * #gsize to get the length of the read line. On an error, it will
19364 * return %NULL and @error will be set. For UTF-8 conversion errors,
19365 * the set error domain is %G_CONVERT_ERROR. If there's no content to
19366 * read, it will still return %NULL, but @error won't be set.
19368 * Returns: (transfer full): a NUL terminated UTF-8 string with the
19374 * g_data_input_stream_read_uint16:
19375 * @stream: a given #GDataInputStream.
19376 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19377 * @error: #GError for error reporting.
19379 * Reads an unsigned 16-bit/2-byte value from @stream.
19381 * In order to get the correct byte order for this read operation,
19382 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
19384 * an error occurred.
19386 * Returns: an unsigned 16-bit/2-byte value read from the @stream or %0 if
19391 * g_data_input_stream_read_uint32:
19392 * @stream: a given #GDataInputStream.
19393 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19394 * @error: #GError for error reporting.
19396 * Reads an unsigned 32-bit/4-byte value from @stream.
19398 * In order to get the correct byte order for this read operation,
19399 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
19401 * If @cancellable is not %NULL, then the operation can be cancelled by
19402 * triggering the cancellable object from another thread. If the operation
19403 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19405 * an error occurred.
19407 * Returns: an unsigned 32-bit/4-byte value read from the @stream or %0 if
19412 * g_data_input_stream_read_uint64:
19413 * @stream: a given #GDataInputStream.
19414 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19415 * @error: #GError for error reporting.
19417 * Reads an unsigned 64-bit/8-byte value from @stream.
19419 * In order to get the correct byte order for this read operation,
19420 * see g_data_input_stream_get_byte_order().
19422 * If @cancellable is not %NULL, then the operation can be cancelled by
19423 * triggering the cancellable object from another thread. If the operation
19424 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19426 * an error occurred.
19428 * Returns: an unsigned 64-bit/8-byte read from @stream or %0 if
19433 * g_data_input_stream_read_until:
19434 * @stream: a given #GDataInputStream.
19435 * @stop_chars: characters to terminate the read.
19436 * @length: (out): a #gsize to get the length of the data read in.
19437 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19438 * @error: #GError for error reporting.
19440 * Reads a string from the data input stream, up to the first
19441 * occurrence of any of the stop characters.
19443 * Note that, in contrast to g_data_input_stream_read_until_async(),
19444 * this function consumes the stop character that it finds.
19446 * Don't use this function in new code. Its functionality is
19447 * inconsistent with g_data_input_stream_read_until_async(). Both
19448 * functions will be marked as deprecated in a future release. Use
19449 * g_data_input_stream_read_upto() instead, but note that that function
19450 * does not consume the stop character.
19452 * before encountering any of the stop characters. Set @length to
19453 * a #gsize to get the length of the string. This function will
19454 * return %NULL on an error.
19456 * Returns: (transfer full): a string with the data that was read
19461 * g_data_input_stream_read_until_async:
19462 * @stream: a given #GDataInputStream.
19463 * @stop_chars: characters to terminate the read.
19464 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19465 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19466 * @callback: (scope async): callback to call when the request is satisfied.
19467 * @user_data: (closure): the data to pass to callback function.
19469 * The asynchronous version of g_data_input_stream_read_until().
19470 * It is an error to have two outstanding calls to this function.
19472 * Note that, in contrast to g_data_input_stream_read_until(),
19473 * this function does not consume the stop character that it finds. You
19474 * must read it for yourself.
19476 * When the operation is finished, @callback will be called. You
19477 * can then call g_data_input_stream_read_until_finish() to get
19478 * the result of the operation.
19480 * Don't use this function in new code. Its functionality is
19481 * inconsistent with g_data_input_stream_read_until(). Both functions
19482 * will be marked as deprecated in a future release. Use
19483 * g_data_input_stream_read_upto_async() instead.
19490 * g_data_input_stream_read_until_finish:
19491 * @stream: a given #GDataInputStream.
19492 * @result: the #GAsyncResult that was provided to the callback.
19493 * @length: (out): a #gsize to get the length of the data read in.
19494 * @error: #GError for error reporting.
19496 * Finish an asynchronous call started by
19497 * g_data_input_stream_read_until_async().
19500 * before encountering any of the stop characters. Set @length to
19501 * a #gsize to get the length of the string. This function will
19502 * return %NULL on an error.
19505 * Returns: (transfer full): a string with the data that was read
19510 * g_data_input_stream_read_upto:
19511 * @stream: a #GDataInputStream
19512 * @stop_chars: characters to terminate the read
19513 * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
19514 * @length: (out): a #gsize to get the length of the data read in
19515 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
19516 * @error: #GError for error reporting
19518 * Reads a string from the data input stream, up to the first
19519 * occurrence of any of the stop characters.
19521 * In contrast to g_data_input_stream_read_until(), this function
19522 * does <emphasis>not</emphasis> consume the stop character. You have
19523 * to use g_data_input_stream_read_byte() to get it before calling
19524 * g_data_input_stream_read_upto() again.
19526 * Note that @stop_chars may contain '\0' if @stop_chars_len is
19529 * before encountering any of the stop characters. Set @length to
19530 * a #gsize to get the length of the string. This function will
19531 * return %NULL on an error
19533 * Returns: (transfer full): a string with the data that was read
19539 * g_data_input_stream_read_upto_async:
19540 * @stream: a #GDataInputStream
19541 * @stop_chars: characters to terminate the read
19542 * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
19543 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19544 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
19545 * @callback: (scope async): callback to call when the request is satisfied
19546 * @user_data: (closure): the data to pass to callback function
19548 * The asynchronous version of g_data_input_stream_read_upto().
19549 * It is an error to have two outstanding calls to this function.
19551 * In contrast to g_data_input_stream_read_until(), this function
19552 * does <emphasis>not</emphasis> consume the stop character. You have
19553 * to use g_data_input_stream_read_byte() to get it before calling
19554 * g_data_input_stream_read_upto() again.
19556 * Note that @stop_chars may contain '\0' if @stop_chars_len is
19559 * When the operation is finished, @callback will be called. You
19560 * can then call g_data_input_stream_read_upto_finish() to get
19561 * the result of the operation.
19568 * g_data_input_stream_read_upto_finish:
19569 * @stream: a #GDataInputStream
19570 * @result: the #GAsyncResult that was provided to the callback
19571 * @length: (out): a #gsize to get the length of the data read in
19572 * @error: #GError for error reporting
19574 * Finish an asynchronous call started by
19575 * g_data_input_stream_read_upto_async().
19577 * Note that this function does <emphasis>not</emphasis> consume the
19578 * stop character. You have to use g_data_input_stream_read_byte() to
19579 * get it before calling g_data_input_stream_read_upto_async() again.
19581 * before encountering any of the stop characters. Set @length to
19582 * a #gsize to get the length of the string. This function will
19583 * return %NULL on an error.
19585 * Returns: (transfer full): a string with the data that was read
19591 * g_data_input_stream_set_byte_order:
19592 * @stream: a given #GDataInputStream.
19593 * @order: a #GDataStreamByteOrder to set.
19595 * This function sets the byte order for the given @stream. All subsequent
19596 * reads from the @stream will be read in the given @order.
19601 * g_data_input_stream_set_newline_type:
19602 * @stream: a #GDataInputStream.
19603 * @type: the type of new line return as #GDataStreamNewlineType.
19605 * Sets the newline type for the @stream.
19607 * Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read
19608 * chunk ends in "CR" we must read an additional byte to know if this is "CR" or
19609 * "CR LF", and this might block if there is no more data available.
19614 * g_data_output_stream_get_byte_order:
19615 * @stream: a #GDataOutputStream.
19617 * Gets the byte order for the stream.
19619 * Returns: the #GDataStreamByteOrder for the @stream.
19624 * g_data_output_stream_new:
19625 * @base_stream: a #GOutputStream.
19627 * Creates a new data output stream for @base_stream.
19629 * Returns: #GDataOutputStream.
19634 * g_data_output_stream_put_byte:
19635 * @stream: a #GDataOutputStream.
19636 * @data: a #guchar.
19637 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19638 * @error: a #GError, %NULL to ignore.
19640 * Puts a byte into the output stream.
19642 * Returns: %TRUE if @data was successfully added to the @stream.
19647 * g_data_output_stream_put_int16:
19648 * @stream: a #GDataOutputStream.
19649 * @data: a #gint16.
19650 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19651 * @error: a #GError, %NULL to ignore.
19653 * Puts a signed 16-bit integer into the output stream.
19655 * Returns: %TRUE if @data was successfully added to the @stream.
19660 * g_data_output_stream_put_int32:
19661 * @stream: a #GDataOutputStream.
19662 * @data: a #gint32.
19663 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19664 * @error: a #GError, %NULL to ignore.
19666 * Puts a signed 32-bit integer into the output stream.
19668 * Returns: %TRUE if @data was successfully added to the @stream.
19673 * g_data_output_stream_put_int64:
19674 * @stream: a #GDataOutputStream.
19675 * @data: a #gint64.
19676 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19677 * @error: a #GError, %NULL to ignore.
19679 * Puts a signed 64-bit integer into the stream.
19681 * Returns: %TRUE if @data was successfully added to the @stream.
19686 * g_data_output_stream_put_string:
19687 * @stream: a #GDataOutputStream.
19689 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19690 * @error: a #GError, %NULL to ignore.
19692 * Puts a string into the output stream.
19694 * Returns: %TRUE if @string was successfully added to the @stream.
19699 * g_data_output_stream_put_uint16:
19700 * @stream: a #GDataOutputStream.
19701 * @data: a #guint16.
19702 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19703 * @error: a #GError, %NULL to ignore.
19705 * Puts an unsigned 16-bit integer into the output stream.
19707 * Returns: %TRUE if @data was successfully added to the @stream.
19712 * g_data_output_stream_put_uint32:
19713 * @stream: a #GDataOutputStream.
19714 * @data: a #guint32.
19715 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19716 * @error: a #GError, %NULL to ignore.
19718 * Puts an unsigned 32-bit integer into the stream.
19720 * Returns: %TRUE if @data was successfully added to the @stream.
19725 * g_data_output_stream_put_uint64:
19726 * @stream: a #GDataOutputStream.
19727 * @data: a #guint64.
19728 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19729 * @error: a #GError, %NULL to ignore.
19731 * Puts an unsigned 64-bit integer into the stream.
19733 * Returns: %TRUE if @data was successfully added to the @stream.
19738 * g_data_output_stream_set_byte_order:
19739 * @stream: a #GDataOutputStream.
19740 * @order: a %GDataStreamByteOrder.
19742 * Sets the byte order of the data output stream to @order.
19747 * g_dbus_action_group_get:
19748 * @connection: A #GDBusConnection
19749 * @bus_name: the bus name which exports the action group
19750 * @object_path: the object path at which the action group is exported
19752 * Obtains a #GDBusActionGroup for the action group which is exported at
19753 * the given @bus_name and @object_path.
19755 * The thread default main context is taken at the time of this call.
19756 * All signals on the menu model (and any linked models) are reported
19757 * with respect to this context. All calls on the returned menu model
19758 * (and linked models) must also originate from this same context, with
19759 * the thread default main context unchanged.
19761 * This call is non-blocking. The returned action group may or may not
19762 * already be filled in. The correct thing to do is connect the signals
19763 * for the action group to monitor for changes and then to call
19764 * g_action_group_list_actions() to get the initial list.
19766 * Returns: (transfer full): a #GDBusActionGroup
19772 * g_dbus_address_get_for_bus_sync:
19773 * @bus_type: A #GBusType.
19774 * @cancellable: A #GCancellable or %NULL.
19775 * @error: Return location for error or %NULL.
19777 * Synchronously looks up the D-Bus address for the well-known message
19778 * bus instance specified by @bus_type. This may involve using various
19779 * platform specific mechanisms.
19781 * Returns: A valid D-Bus address string for @bus_type or %NULL if @error is set.
19787 * g_dbus_address_get_stream:
19788 * @address: A valid D-Bus address.
19789 * @cancellable: A #GCancellable or %NULL.
19790 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
19791 * @user_data: Data to pass to @callback.
19793 * Asynchronously connects to an endpoint specified by @address and
19794 * sets up the connection so it is in a state to run the client-side
19795 * of the D-Bus authentication conversation.
19797 * When the operation is finished, @callback will be invoked. You can
19798 * then call g_dbus_address_get_stream_finish() to get the result of
19801 * This is an asynchronous failable function. See
19802 * g_dbus_address_get_stream_sync() for the synchronous version.
19809 * g_dbus_address_get_stream_finish:
19810 * @res: A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().
19811 * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
19812 * @error: Return location for error or %NULL.
19814 * Finishes an operation started with g_dbus_address_get_stream().
19816 * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
19822 * g_dbus_address_get_stream_sync:
19823 * @address: A valid D-Bus address.
19824 * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
19825 * @cancellable: A #GCancellable or %NULL.
19826 * @error: Return location for error or %NULL.
19828 * Synchronously connects to an endpoint specified by @address and
19829 * sets up the connection so it is in a state to run the client-side
19830 * of the D-Bus authentication conversation.
19832 * This is a synchronous failable function. See
19833 * g_dbus_address_get_stream() for the asynchronous version.
19835 * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
19841 * g_dbus_annotation_info_lookup:
19842 * @annotations: (array zero-terminated=1): A %NULL-terminated array of annotations or %NULL.
19843 * @name: The name of the annotation to look up.
19845 * Looks up the value of an annotation.
19847 * This cost of this function is O(n) in number of annotations.
19849 * Returns: The value or %NULL if not found. Do not free, it is owned by @annotations.
19855 * g_dbus_annotation_info_ref:
19856 * @info: A #GDBusNodeInfo
19858 * If @info is statically allocated does nothing. Otherwise increases
19859 * the reference count.
19861 * Returns: The same @info.
19867 * g_dbus_annotation_info_unref:
19868 * @info: A #GDBusAnnotationInfo.
19870 * If @info is statically allocated, does nothing. Otherwise decreases
19871 * the reference count of @info. When its reference count drops to 0,
19872 * the memory used is freed.
19879 * g_dbus_arg_info_ref:
19880 * @info: A #GDBusArgInfo
19882 * If @info is statically allocated does nothing. Otherwise increases
19883 * the reference count.
19885 * Returns: The same @info.
19891 * g_dbus_arg_info_unref:
19892 * @info: A #GDBusArgInfo.
19894 * If @info is statically allocated, does nothing. Otherwise decreases
19895 * the reference count of @info. When its reference count drops to 0,
19896 * the memory used is freed.
19903 * g_dbus_auth_observer_authorize_authenticated_peer:
19904 * @observer: A #GDBusAuthObserver.
19905 * @stream: A #GIOStream for the #GDBusConnection.
19906 * @credentials: Credentials received from the peer or %NULL.
19908 * Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.
19910 * Returns: %TRUE if the peer is authorized, %FALSE if not.
19916 * g_dbus_auth_observer_new:
19918 * Creates a new #GDBusAuthObserver object.
19920 * Returns: A #GDBusAuthObserver. Free with g_object_unref().
19926 * g_dbus_connection_add_filter:
19927 * @connection: A #GDBusConnection.
19928 * @filter_function: A filter function.
19929 * @user_data: User data to pass to @filter_function.
19930 * @user_data_free_func: Function to free @user_data with when filter is removed or %NULL.
19932 * Adds a message filter. Filters are handlers that are run on all
19933 * incoming and outgoing messages, prior to standard dispatch. Filters
19934 * are run in the order that they were added. The same handler can be
19935 * added as a filter more than once, in which case it will be run more
19936 * than once. Filters added during a filter callback won't be run on
19937 * the message being processed. Filter functions are allowed to modify
19938 * and even drop messages.
19940 * Note that filters are run in a dedicated message handling thread so
19941 * they can't block and, generally, can't do anything but signal a
19942 * worker thread. Also note that filters are rarely needed - use API
19943 * such as g_dbus_connection_send_message_with_reply(),
19944 * g_dbus_connection_signal_subscribe() or g_dbus_connection_call() instead.
19946 * If a filter consumes an incoming message the message is not
19947 * dispatched anywhere else - not even the standard dispatch machinery
19948 * (that API such as g_dbus_connection_signal_subscribe() and
19949 * g_dbus_connection_send_message_with_reply() relies on) will see the
19950 * message. Similary, if a filter consumes an outgoing message, the
19951 * message will not be sent to the other peer.
19953 * g_dbus_connection_remove_filter().
19955 * Returns: A filter identifier that can be used with
19961 * g_dbus_connection_call:
19962 * @connection: A #GDBusConnection.
19963 * @bus_name: (allow-none): A unique or well-known bus name or %NULL if @connection is not a message bus connection.
19964 * @object_path: Path of remote object.
19965 * @interface_name: D-Bus interface to invoke method on.
19966 * @method_name: The name of the method to invoke.
19967 * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
19968 * @reply_type: (allow-none): The expected type of the reply, or %NULL.
19969 * @flags: Flags from the #GDBusCallFlags enumeration.
19970 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
19971 * @cancellable: A #GCancellable or %NULL.
19972 * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
19973 * @user_data: The data to pass to @callback.
19975 * Asynchronously invokes the @method_name method on the
19976 * @interface_name D-Bus interface on the remote object at
19977 * @object_path owned by @bus_name.
19979 * If @connection is closed then the operation will fail with
19980 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
19981 * fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value
19982 * not compatible with the D-Bus protocol, the operation fails with
19983 * %G_IO_ERROR_INVALID_ARGUMENT.
19985 * If @reply_type is non-%NULL then the reply will be checked for having this type and an
19986 * error will be raised if it does not match. Said another way, if you give a @reply_type
19987 * then any non-%NULL return value will be of this type.
19989 * If the @parameters #GVariant is floating, it is consumed. This allows
19990 * convenient 'inline' use of g_variant_new(), e.g.:
19992 * g_dbus_connection_call (connection,
19993 * "org.freedesktop.StringThings",
19994 * "/org/freedesktop/StringThings",
19995 * "org.freedesktop.StringThings",
19997 * g_variant_new ("(ss)",
20001 * G_DBUS_CALL_FLAGS_NONE,
20004 * (GAsyncReadyCallback) two_strings_done,
20008 * This is an asynchronous method. When the operation is finished, @callback will be invoked
20009 * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
20010 * of the thread you are calling this method from. You can then call
20011 * g_dbus_connection_call_finish() to get the result of the operation.
20012 * See g_dbus_connection_call_sync() for the synchronous version of this
20020 * g_dbus_connection_call_finish:
20021 * @connection: A #GDBusConnection.
20022 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call().
20023 * @error: Return location for error or %NULL.
20025 * Finishes an operation started with g_dbus_connection_call().
20027 * return values. Free with g_variant_unref().
20029 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
20035 * g_dbus_connection_call_sync:
20036 * @connection: A #GDBusConnection.
20037 * @bus_name: A unique or well-known bus name.
20038 * @object_path: Path of remote object.
20039 * @interface_name: D-Bus interface to invoke method on.
20040 * @method_name: The name of the method to invoke.
20041 * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
20042 * @reply_type: (allow-none): The expected type of the reply, or %NULL.
20043 * @flags: Flags from the #GDBusCallFlags enumeration.
20044 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
20045 * @cancellable: A #GCancellable or %NULL.
20046 * @error: Return location for error or %NULL.
20048 * Synchronously invokes the @method_name method on the
20049 * @interface_name D-Bus interface on the remote object at
20050 * @object_path owned by @bus_name.
20052 * If @connection is closed then the operation will fail with
20053 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the
20054 * operation will fail with %G_IO_ERROR_CANCELLED. If @parameters
20055 * contains a value not compatible with the D-Bus protocol, the operation
20056 * fails with %G_IO_ERROR_INVALID_ARGUMENT.
20057 * If @reply_type is non-%NULL then the reply will be checked for having
20058 * this type and an error will be raised if it does not match. Said
20059 * another way, if you give a @reply_type then any non-%NULL return
20060 * value will be of this type.
20062 * If the @parameters #GVariant is floating, it is consumed.
20063 * This allows convenient 'inline' use of g_variant_new(), e.g.:
20065 * g_dbus_connection_call_sync (connection,
20066 * "org.freedesktop.StringThings",
20067 * "/org/freedesktop/StringThings",
20068 * "org.freedesktop.StringThings",
20070 * g_variant_new ("(ss)",
20074 * G_DBUS_CALL_FLAGS_NONE,
20080 * The calling thread is blocked until a reply is received. See
20081 * g_dbus_connection_call() for the asynchronous version of
20084 * return values. Free with g_variant_unref().
20086 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
20092 * g_dbus_connection_call_with_unix_fd_list:
20093 * @connection: A #GDBusConnection.
20094 * @bus_name: (allow-none): A unique or well-known bus name or %NULL if @connection is not a message bus connection.
20095 * @object_path: Path of remote object.
20096 * @interface_name: D-Bus interface to invoke method on.
20097 * @method_name: The name of the method to invoke.
20098 * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
20099 * @reply_type: (allow-none): The expected type of the reply, or %NULL.
20100 * @flags: Flags from the #GDBusCallFlags enumeration.
20101 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
20102 * @fd_list: (allow-none): A #GUnixFDList or %NULL.
20103 * @cancellable: A #GCancellable or %NULL.
20104 * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation.
20105 * @user_data: The data to pass to @callback.
20107 * Like g_dbus_connection_call() but also takes a #GUnixFDList object.
20109 * This method is only available on UNIX.
20116 * g_dbus_connection_call_with_unix_fd_list_finish:
20117 * @connection: A #GDBusConnection.
20118 * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
20119 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call_with_unix_fd_list().
20120 * @error: Return location for error or %NULL.
20122 * Finishes an operation started with g_dbus_connection_call_with_unix_fd_list().
20124 * return values. Free with g_variant_unref().
20126 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
20132 * g_dbus_connection_call_with_unix_fd_list_sync:
20133 * @connection: A #GDBusConnection.
20134 * @bus_name: A unique or well-known bus name.
20135 * @object_path: Path of remote object.
20136 * @interface_name: D-Bus interface to invoke method on.
20137 * @method_name: The name of the method to invoke.
20138 * @parameters: (allow-none): A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
20139 * @reply_type: (allow-none): The expected type of the reply, or %NULL.
20140 * @flags: Flags from the #GDBusCallFlags enumeration.
20141 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
20142 * @fd_list: (allow-none): A #GUnixFDList or %NULL.
20143 * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
20144 * @cancellable: A #GCancellable or %NULL.
20145 * @error: Return location for error or %NULL.
20147 * Like g_dbus_connection_call_sync() but also takes and returns #GUnixFDList objects.
20149 * This method is only available on UNIX.
20151 * return values. Free with g_variant_unref().
20153 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
20159 * g_dbus_connection_close:
20160 * @connection: A #GDBusConnection.
20161 * @cancellable: A #GCancellable or %NULL.
20162 * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
20163 * @user_data: The data to pass to @callback.
20165 * Closes @connection. Note that this never causes the process to
20166 * exit (this might only happen if the other end of a shared message
20167 * bus connection disconnects, see #GDBusConnection:exit-on-close).
20169 * Once the connection is closed, operations such as sending a message
20170 * will return with the error %G_IO_ERROR_CLOSED. Closing a connection
20171 * will not automatically flush the connection so queued messages may
20172 * be lost. Use g_dbus_connection_flush() if you need such guarantees.
20174 * If @connection is already closed, this method fails with
20175 * %G_IO_ERROR_CLOSED.
20177 * When @connection has been closed, the #GDBusConnection::closed
20178 * signal is emitted in the <link
20179 * linkend="g-main-context-push-thread-default">thread-default main
20180 * loop</link> of the thread that @connection was constructed in.
20182 * This is an asynchronous method. When the operation is finished,
20183 * @callback will be invoked in the <link
20184 * linkend="g-main-context-push-thread-default">thread-default main
20185 * loop</link> of the thread you are calling this method from. You can
20186 * then call g_dbus_connection_close_finish() to get the result of the
20187 * operation. See g_dbus_connection_close_sync() for the synchronous
20195 * g_dbus_connection_close_finish:
20196 * @connection: A #GDBusConnection.
20197 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_close().
20198 * @error: Return location for error or %NULL.
20200 * Finishes an operation started with g_dbus_connection_close().
20202 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
20208 * g_dbus_connection_close_sync:
20209 * @connection: A #GDBusConnection.
20210 * @cancellable: A #GCancellable or %NULL.
20211 * @error: Return location for error or %NULL.
20213 * Synchronously closees @connection. The calling thread is blocked
20214 * until this is done. See g_dbus_connection_close() for the
20215 * asynchronous version of this method and more details about what it
20218 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
20224 * g_dbus_connection_emit_signal:
20225 * @connection: A #GDBusConnection.
20226 * @destination_bus_name: (allow-none): The unique bus name for the destination for the signal or %NULL to emit to all listeners.
20227 * @object_path: Path of remote object.
20228 * @interface_name: D-Bus interface to emit a signal on.
20229 * @signal_name: The name of the signal to emit.
20230 * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
20231 * @error: Return location for error or %NULL.
20235 * If the parameters GVariant is floating, it is consumed.
20237 * This can only fail if @parameters is not compatible with the D-Bus protocol.
20239 * Returns: %TRUE unless @error is set.
20245 * g_dbus_connection_export_action_group:
20246 * @connection: a #GDBusConnection
20247 * @object_path: a D-Bus object path
20248 * @action_group: a #GActionGroup
20249 * @error: a pointer to a %NULL #GError, or %NULL
20251 * Exports @action_group on @connection at @object_path.
20253 * The implemented D-Bus API should be considered private. It is
20254 * subject to change in the future.
20256 * A given object path can only have one action group exported on it.
20257 * If this constraint is violated, the export will fail and 0 will be
20258 * returned (with @error set accordingly).
20260 * You can unexport the action group using
20261 * g_dbus_connection_unexport_action_group() with the return value of
20264 * The thread default main context is taken at the time of this call.
20265 * All incoming action activations and state change requests are
20266 * reported from this context. Any changes on the action group that
20267 * cause it to emit signals must also come from this same context.
20268 * Since incoming action activations and state change requests are
20269 * rather likely to cause changes on the action group, this effectively
20270 * limits a given action group to being exported from only one main
20273 * Returns: the ID of the export (never zero), or 0 in case of failure
20279 * g_dbus_connection_export_menu_model:
20280 * @connection: a #GDBusConnection
20281 * @object_path: a D-Bus object path
20282 * @menu: a #GMenuModel
20283 * @error: return location for an error, or %NULL
20285 * Exports @menu on @connection at @object_path.
20287 * The implemented D-Bus API should be considered private.
20288 * It is subject to change in the future.
20290 * An object path can only have one action group exported on it. If this
20291 * constraint is violated, the export will fail and 0 will be
20292 * returned (with @error set accordingly).
20294 * You can unexport the menu model using
20295 * g_dbus_connection_unexport_menu_model() with the return value of
20298 * Returns: the ID of the export (never zero), or 0 in case of failure
20304 * g_dbus_connection_flush:
20305 * @connection: A #GDBusConnection.
20306 * @cancellable: A #GCancellable or %NULL.
20307 * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
20308 * @user_data: The data to pass to @callback.
20310 * Asynchronously flushes @connection, that is, writes all queued
20311 * outgoing message to the transport and then flushes the transport
20312 * (using g_output_stream_flush_async()). This is useful in programs
20313 * that wants to emit a D-Bus signal and then exit
20314 * immediately. Without flushing the connection, there is no guarantee
20315 * that the message has been sent to the networking buffers in the OS
20318 * This is an asynchronous method. When the operation is finished,
20319 * @callback will be invoked in the <link
20320 * linkend="g-main-context-push-thread-default">thread-default main
20321 * loop</link> of the thread you are calling this method from. You can
20322 * then call g_dbus_connection_flush_finish() to get the result of the
20323 * operation. See g_dbus_connection_flush_sync() for the synchronous
20331 * g_dbus_connection_flush_finish:
20332 * @connection: A #GDBusConnection.
20333 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_flush().
20334 * @error: Return location for error or %NULL.
20336 * Finishes an operation started with g_dbus_connection_flush().
20338 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
20344 * g_dbus_connection_flush_sync:
20345 * @connection: A #GDBusConnection.
20346 * @cancellable: A #GCancellable or %NULL.
20347 * @error: Return location for error or %NULL.
20349 * Synchronously flushes @connection. The calling thread is blocked
20350 * until this is done. See g_dbus_connection_flush() for the
20351 * asynchronous version of this method and more details about what it
20354 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
20360 * g_dbus_connection_get_capabilities:
20361 * @connection: A #GDBusConnection.
20363 * Gets the capabilities negotiated with the remote peer
20365 * Returns: Zero or more flags from the #GDBusCapabilityFlags enumeration.
20371 * g_dbus_connection_get_exit_on_close:
20372 * @connection: A #GDBusConnection.
20374 * Gets whether the process is terminated when @connection is
20375 * closed by the remote peer. See
20376 * #GDBusConnection:exit-on-close for more details.
20378 * closed by the remote peer.
20380 * Returns: Whether the process is terminated when @connection is
20386 * g_dbus_connection_get_guid:
20387 * @connection: A #GDBusConnection.
20389 * The GUID of the peer performing the role of server when
20390 * authenticating. See #GDBusConnection:guid for more details.
20394 * Returns: The GUID. Do not free this string, it is owned by
20400 * g_dbus_connection_get_peer_credentials:
20401 * @connection: A #GDBusConnection.
20403 * Gets the credentials of the authenticated peer. This will always
20404 * return %NULL unless @connection acted as a server
20405 * (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed)
20406 * when set up and the client passed credentials as part of the
20407 * authentication process.
20409 * In a message bus setup, the message bus is always the server and
20410 * each application is a client. So this method will always return
20411 * %NULL for message bus clients.
20413 * this object, it is owned by @connection.
20415 * Returns: (transfer none): A #GCredentials or %NULL if not available. Do not free
20421 * g_dbus_connection_get_stream:
20422 * @connection: a #GDBusConnection
20424 * Gets the underlying stream used for IO.
20426 * While the #GDBusConnection is active, it will interact with this
20427 * stream from a worker thread, so it is not safe to interact with
20428 * the stream directly.
20430 * Returns: (transfer none): the stream used for IO
20436 * g_dbus_connection_get_unique_name:
20437 * @connection: A #GDBusConnection.
20439 * Gets the unique name of @connection as assigned by the message
20440 * bus. This can also be used to figure out if @connection is a
20441 * message bus connection.
20443 * bus connection. Do not free this string, it is owned by
20446 * Returns: The unique name or %NULL if @connection is not a message
20452 * g_dbus_connection_is_closed:
20453 * @connection: A #GDBusConnection.
20455 * Gets whether @connection is closed.
20457 * Returns: %TRUE if the connection is closed, %FALSE otherwise.
20463 * g_dbus_connection_new:
20464 * @stream: A #GIOStream.
20465 * @guid: (allow-none): The GUID to use if a authenticating as a server or %NULL.
20466 * @flags: Flags describing how to make the connection.
20467 * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
20468 * @cancellable: A #GCancellable or %NULL.
20469 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
20470 * @user_data: The data to pass to @callback.
20472 * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
20473 * with the end represented by @stream.
20475 * If @stream is a #GSocketConnection, then the corresponding #GSocket
20476 * will be put into non-blocking mode.
20478 * The D-Bus connection will interact with @stream from a worker thread.
20479 * As a result, the caller should not interact with @stream after this
20480 * method has been called, except by calling g_object_unref() on it.
20482 * If @observer is not %NULL it may be used to control the
20483 * authentication process.
20485 * When the operation is finished, @callback will be invoked. You can
20486 * then call g_dbus_connection_new_finish() to get the result of the
20489 * This is a asynchronous failable constructor. See
20490 * g_dbus_connection_new_sync() for the synchronous
20498 * g_dbus_connection_new_finish:
20499 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
20500 * @error: Return location for error or %NULL.
20502 * Finishes an operation started with g_dbus_connection_new().
20504 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
20510 * g_dbus_connection_new_for_address:
20511 * @address: A D-Bus address.
20512 * @flags: Flags describing how to make the connection.
20513 * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
20514 * @cancellable: A #GCancellable or %NULL.
20515 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
20516 * @user_data: The data to pass to @callback.
20518 * Asynchronously connects and sets up a D-Bus client connection for
20519 * exchanging D-Bus messages with an endpoint specified by @address
20520 * which must be in the D-Bus address format.
20522 * This constructor can only be used to initiate client-side
20523 * connections - use g_dbus_connection_new() if you need to act as the
20524 * server. In particular, @flags cannot contain the
20525 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
20526 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
20528 * When the operation is finished, @callback will be invoked. You can
20529 * then call g_dbus_connection_new_finish() to get the result of the
20532 * If @observer is not %NULL it may be used to control the
20533 * authentication process.
20535 * This is a asynchronous failable constructor. See
20536 * g_dbus_connection_new_for_address_sync() for the synchronous
20544 * g_dbus_connection_new_for_address_finish:
20545 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
20546 * @error: Return location for error or %NULL.
20548 * Finishes an operation started with g_dbus_connection_new_for_address().
20550 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
20556 * g_dbus_connection_new_for_address_sync:
20557 * @address: A D-Bus address.
20558 * @flags: Flags describing how to make the connection.
20559 * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
20560 * @cancellable: A #GCancellable or %NULL.
20561 * @error: Return location for error or %NULL.
20563 * Synchronously connects and sets up a D-Bus client connection for
20564 * exchanging D-Bus messages with an endpoint specified by @address
20565 * which must be in the D-Bus address format.
20567 * This constructor can only be used to initiate client-side
20568 * connections - use g_dbus_connection_new_sync() if you need to act
20569 * as the server. In particular, @flags cannot contain the
20570 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
20571 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
20573 * This is a synchronous failable constructor. See
20574 * g_dbus_connection_new_for_address() for the asynchronous version.
20576 * If @observer is not %NULL it may be used to control the
20577 * authentication process.
20579 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
20585 * g_dbus_connection_new_sync:
20586 * @stream: A #GIOStream.
20587 * @guid: (allow-none): The GUID to use if a authenticating as a server or %NULL.
20588 * @flags: Flags describing how to make the connection.
20589 * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
20590 * @cancellable: A #GCancellable or %NULL.
20591 * @error: Return location for error or %NULL.
20593 * Synchronously sets up a D-Bus connection for exchanging D-Bus messages
20594 * with the end represented by @stream.
20596 * If @stream is a #GSocketConnection, then the corresponding #GSocket
20597 * will be put into non-blocking mode.
20599 * The D-Bus connection will interact with @stream from a worker thread.
20600 * As a result, the caller should not interact with @stream after this
20601 * method has been called, except by calling g_object_unref() on it.
20603 * If @observer is not %NULL it may be used to control the
20604 * authentication process.
20606 * This is a synchronous failable constructor. See
20607 * g_dbus_connection_new() for the asynchronous version.
20609 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
20615 * g_dbus_connection_register_object:
20616 * @connection: A #GDBusConnection.
20617 * @object_path: The object path to register at.
20618 * @interface_info: Introspection data for the interface.
20619 * @vtable: (allow-none): A #GDBusInterfaceVTable to call into or %NULL.
20620 * @user_data: (allow-none): Data to pass to functions in @vtable.
20621 * @user_data_free_func: Function to call when the object path is unregistered.
20622 * @error: Return location for error or %NULL.
20624 * Registers callbacks for exported objects at @object_path with the
20625 * D-Bus interface that is described in @interface_info.
20627 * Calls to functions in @vtable (and @user_data_free_func) will
20628 * happen in the <link linkend="g-main-context-push-thread-default">thread-default main
20629 * loop</link> of the thread you are calling this method from.
20631 * Note that all #GVariant values passed to functions in @vtable will match
20632 * the signature given in @interface_info - if a remote caller passes
20633 * incorrect values, the <literal>org.freedesktop.DBus.Error.InvalidArgs</literal>
20634 * is returned to the remote caller.
20636 * Additionally, if the remote caller attempts to invoke methods or
20637 * access properties not mentioned in @interface_info the
20638 * <literal>org.freedesktop.DBus.Error.UnknownMethod</literal> resp.
20639 * <literal>org.freedesktop.DBus.Error.InvalidArgs</literal> errors
20640 * are returned to the caller.
20642 * It is considered a programming error if the
20643 * #GDBusInterfaceGetPropertyFunc function in @vtable returns a
20644 * #GVariant of incorrect type.
20646 * If an existing callback is already registered at @object_path and
20647 * @interface_name, then @error is set to #G_IO_ERROR_EXISTS.
20649 * GDBus automatically implements the standard D-Bus interfaces
20650 * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
20651 * and org.freedesktop.Peer, so you don't have to implement those for
20652 * the objects you export. You <emphasis>can</emphasis> implement
20653 * org.freedesktop.DBus.Properties yourself, e.g. to handle getting
20654 * and setting of properties asynchronously.
20656 * Note that the reference count on @interface_info will be
20657 * incremented by 1 (unless allocated statically, e.g. if the
20658 * reference count is -1, see g_dbus_interface_info_ref()) for as long
20659 * as the object is exported. Also note that @vtable will be copied.
20661 * See <xref linkend="gdbus-server"/> for an example of how to use this method.
20663 * that can be used with g_dbus_connection_unregister_object() .
20665 * Returns: 0 if @error is set, otherwise a registration id (never 0)
20671 * g_dbus_connection_register_subtree:
20672 * @connection: A #GDBusConnection.
20673 * @object_path: The object path to register the subtree at.
20674 * @vtable: A #GDBusSubtreeVTable to enumerate, introspect and dispatch nodes in the subtree.
20675 * @flags: Flags used to fine tune the behavior of the subtree.
20676 * @user_data: Data to pass to functions in @vtable.
20677 * @user_data_free_func: Function to call when the subtree is unregistered.
20678 * @error: Return location for error or %NULL.
20680 * Registers a whole subtree of <quote>dynamic</quote> objects.
20682 * The @enumerate and @introspection functions in @vtable are used to
20683 * convey, to remote callers, what nodes exist in the subtree rooted
20686 * When handling remote calls into any node in the subtree, first the
20687 * @enumerate function is used to check if the node exists. If the node exists
20688 * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set
20689 * the @introspection function is used to check if the node supports the
20690 * requested method. If so, the @dispatch function is used to determine
20691 * where to dispatch the call. The collected #GDBusInterfaceVTable and
20692 * #gpointer will be used to call into the interface vtable for processing
20695 * All calls into user-provided code will be invoked in the <link
20696 * linkend="g-main-context-push-thread-default">thread-default main
20697 * loop</link> of the thread you are calling this method from.
20699 * If an existing subtree is already registered at @object_path or
20700 * then @error is set to #G_IO_ERROR_EXISTS.
20702 * Note that it is valid to register regular objects (using
20703 * g_dbus_connection_register_object()) in a subtree registered with
20704 * g_dbus_connection_register_subtree() - if so, the subtree handler
20705 * is tried as the last resort. One way to think about a subtree
20706 * handler is to consider it a <quote>fallback handler</quote>
20707 * for object paths not registered via g_dbus_connection_register_object()
20708 * or other bindings.
20710 * Note that @vtable will be copied so you cannot change it after
20713 * See <xref linkend="gdbus-subtree-server"/> for an example of how to use this method.
20715 * that can be used with g_dbus_connection_unregister_subtree() .
20717 * Returns: 0 if @error is set, otherwise a subtree registration id (never 0)
20723 * g_dbus_connection_remove_filter:
20724 * @connection: a #GDBusConnection
20725 * @filter_id: an identifier obtained from g_dbus_connection_add_filter()
20727 * Removes a filter.
20734 * g_dbus_connection_send_message:
20735 * @connection: A #GDBusConnection.
20736 * @message: A #GDBusMessage
20737 * @flags: Flags affecting how the message is sent.
20738 * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
20739 * @error: Return location for error or %NULL.
20741 * Asynchronously sends @message to the peer represented by @connection.
20743 * Unless @flags contain the
20744 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
20745 * will be assigned by @connection and set on @message via
20746 * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
20747 * serial number used will be written to this location prior to
20748 * submitting the message to the underlying transport.
20750 * If @connection is closed then the operation will fail with
20751 * %G_IO_ERROR_CLOSED. If @message is not well-formed,
20752 * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
20754 * See <xref linkend="gdbus-server"/> and <xref
20755 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
20756 * low-level API to send and receive UNIX file descriptors.
20758 * Note that @message must be unlocked, unless @flags contain the
20759 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
20761 * transmission, %FALSE if @error is set.
20763 * Returns: %TRUE if the message was well-formed and queued for
20769 * g_dbus_connection_send_message_with_reply:
20770 * @connection: A #GDBusConnection.
20771 * @message: A #GDBusMessage.
20772 * @flags: Flags affecting how the message is sent.
20773 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
20774 * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
20775 * @cancellable: A #GCancellable or %NULL.
20776 * @callback: (allow-none): A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
20777 * @user_data: The data to pass to @callback.
20779 * Asynchronously sends @message to the peer represented by @connection.
20781 * Unless @flags contain the
20782 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
20783 * will be assigned by @connection and set on @message via
20784 * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
20785 * serial number used will be written to this location prior to
20786 * submitting the message to the underlying transport.
20788 * If @connection is closed then the operation will fail with
20789 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
20790 * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
20791 * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
20793 * This is an asynchronous method. When the operation is finished, @callback will be invoked
20794 * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
20795 * of the thread you are calling this method from. You can then call
20796 * g_dbus_connection_send_message_with_reply_finish() to get the result of the operation.
20797 * See g_dbus_connection_send_message_with_reply_sync() for the synchronous version.
20799 * Note that @message must be unlocked, unless @flags contain the
20800 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
20802 * See <xref linkend="gdbus-server"/> and <xref
20803 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
20804 * low-level API to send and receive UNIX file descriptors.
20811 * g_dbus_connection_send_message_with_reply_finish:
20812 * @connection: a #GDBusConnection
20813 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_send_message_with_reply().
20814 * @error: Return location for error or %NULL.
20816 * Finishes an operation started with g_dbus_connection_send_message_with_reply().
20818 * Note that @error is only set if a local in-process error
20819 * occurred. That is to say that the returned #GDBusMessage object may
20820 * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
20821 * g_dbus_message_to_gerror() to transcode this to a #GError.
20823 * See <xref linkend="gdbus-server"/> and <xref
20824 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
20825 * low-level API to send and receive UNIX file descriptors.
20827 * Returns: (transfer full): A locked #GDBusMessage or %NULL if @error is set.
20833 * g_dbus_connection_send_message_with_reply_sync:
20834 * @connection: A #GDBusConnection.
20835 * @message: A #GDBusMessage.
20836 * @flags: Flags affecting how the message is sent.
20837 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
20838 * @out_serial: (out) (allow-none): Return location for serial number assigned to @message when sending it or %NULL.
20839 * @cancellable: A #GCancellable or %NULL.
20840 * @error: Return location for error or %NULL.
20842 * Synchronously sends @message to the peer represented by @connection
20843 * and blocks the calling thread until a reply is received or the
20844 * timeout is reached. See g_dbus_connection_send_message_with_reply()
20845 * for the asynchronous version of this method.
20847 * Unless @flags contain the
20848 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
20849 * will be assigned by @connection and set on @message via
20850 * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
20851 * serial number used will be written to this location prior to
20852 * submitting the message to the underlying transport.
20854 * If @connection is closed then the operation will fail with
20855 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
20856 * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
20857 * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
20859 * Note that @error is only set if a local in-process error
20860 * occurred. That is to say that the returned #GDBusMessage object may
20861 * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
20862 * g_dbus_message_to_gerror() to transcode this to a #GError.
20864 * See <xref linkend="gdbus-server"/> and <xref
20865 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
20866 * low-level API to send and receive UNIX file descriptors.
20868 * Note that @message must be unlocked, unless @flags contain the
20869 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
20871 * Returns: (transfer full): A locked #GDBusMessage that is the reply to @message or %NULL if @error is set.
20877 * g_dbus_connection_set_exit_on_close:
20878 * @connection: A #GDBusConnection.
20879 * @exit_on_close: Whether the process should be terminated when @connection is closed by the remote peer.
20881 * Sets whether the process should be terminated when @connection is
20882 * closed by the remote peer. See #GDBusConnection:exit-on-close for
20885 * Note that this function should be used with care. Most modern UNIX
20886 * desktops tie the notion of a user session the session bus, and expect
20887 * all of a users applications to quit when their bus connection goes away.
20888 * If you are setting @exit_on_close to %FALSE for the shared session
20889 * bus connection, you should make sure that your application exits
20890 * when the user session ends.
20897 * g_dbus_connection_signal_subscribe:
20898 * @connection: A #GDBusConnection.
20899 * @sender: (allow-none): Sender name to match on (unique or well-known name) or %NULL to listen from all senders.
20900 * @interface_name: (allow-none): D-Bus interface name to match on or %NULL to match on all interfaces.
20901 * @member: (allow-none): D-Bus signal name to match on or %NULL to match on all signals.
20902 * @object_path: (allow-none): Object path to match on or %NULL to match on all object paths.
20903 * @arg0: (allow-none): Contents of first string argument to match on or %NULL to match on all kinds of arguments.
20904 * @flags: Flags describing how to subscribe to the signal (currently unused).
20905 * @callback: Callback to invoke when there is a signal matching the requested data.
20906 * @user_data: User data to pass to @callback.
20907 * @user_data_free_func: (allow-none): Function to free @user_data with when subscription is removed or %NULL.
20909 * Subscribes to signals on @connection and invokes @callback with a
20910 * whenever the signal is received. Note that @callback
20911 * will be invoked in the <link
20912 * linkend="g-main-context-push-thread-default">thread-default main
20913 * loop</link> of the thread you are calling this method from.
20915 * If @connection is not a message bus connection, @sender must be
20918 * If @sender is a well-known name note that @callback is invoked with
20919 * the unique name for the owner of @sender, not the well-known name
20920 * as one would expect. This is because the message bus rewrites the
20921 * name. As such, to avoid certain race conditions, users should be
20922 * tracking the name owner of the well-known name and use that when
20923 * processing the received signal.
20925 * Returns: A subscription identifier that can be used with g_dbus_connection_signal_unsubscribe().
20931 * g_dbus_connection_signal_unsubscribe:
20932 * @connection: A #GDBusConnection.
20933 * @subscription_id: A subscription id obtained from g_dbus_connection_signal_subscribe().
20935 * Unsubscribes from signals.
20942 * g_dbus_connection_start_message_processing:
20943 * @connection: A #GDBusConnection.
20945 * If @connection was created with
20946 * %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method
20947 * starts processing messages. Does nothing on if @connection wasn't
20948 * created with this flag or if the method has already been called.
20955 * g_dbus_connection_unexport_action_group:
20956 * @connection: a #GDBusConnection
20957 * @export_id: the ID from g_dbus_connection_export_action_group()
20959 * Reverses the effect of a previous call to
20960 * g_dbus_connection_export_action_group().
20962 * It is an error to call this function with an ID that wasn't returned
20963 * from g_dbus_connection_export_action_group() or to call it with the
20964 * same ID more than once.
20971 * g_dbus_connection_unexport_menu_model:
20972 * @connection: a #GDBusConnection
20973 * @export_id: the ID from g_dbus_connection_export_menu_model()
20975 * Reverses the effect of a previous call to
20976 * g_dbus_connection_export_menu_model().
20978 * It is an error to call this function with an ID that wasn't returned
20979 * from g_dbus_connection_export_menu_model() or to call it with the
20980 * same ID more than once.
20987 * g_dbus_connection_unregister_object:
20988 * @connection: A #GDBusConnection.
20989 * @registration_id: A registration id obtained from g_dbus_connection_register_object().
20991 * Unregisters an object.
20993 * Returns: %TRUE if the object was unregistered, %FALSE otherwise.
20999 * g_dbus_connection_unregister_subtree:
21000 * @connection: A #GDBusConnection.
21001 * @registration_id: A subtree registration id obtained from g_dbus_connection_register_subtree().
21003 * Unregisters a subtree.
21005 * Returns: %TRUE if the subtree was unregistered, %FALSE otherwise.
21011 * g_dbus_error_encode_gerror:
21012 * @error: A #GError.
21014 * Creates a D-Bus error name to use for @error. If @error matches
21015 * a registered error (cf. g_dbus_error_register_error()), the corresponding
21016 * D-Bus error name will be returned.
21018 * Otherwise the a name of the form
21019 * <literal>org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE</literal>
21020 * will be used. This allows other GDBus applications to map the error
21021 * on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
21023 * This function is typically only used in object mappings to put a
21024 * #GError on the wire. Regular applications should not use it.
21026 * Returns: A D-Bus error name (never %NULL). Free with g_free().
21032 * g_dbus_error_get_remote_error:
21033 * @error: A #GError.
21035 * Gets the D-Bus error name used for @error, if any.
21037 * This function is guaranteed to return a D-Bus error name for all
21038 * #GError<!-- -->s returned from functions handling remote method
21039 * calls (e.g. g_dbus_connection_call_finish()) unless
21040 * g_dbus_error_strip_remote_error() has been used on @error.
21042 * Returns: An allocated string or %NULL if the D-Bus error name could not be found. Free with g_free().
21048 * g_dbus_error_is_remote_error:
21049 * @error: A #GError.
21051 * Checks if @error represents an error received via D-Bus from a remote peer. If so,
21052 * use g_dbus_error_get_remote_error() to get the name of the error.
21054 * %FALSE otherwise.
21056 * Returns: %TRUE if @error represents an error from a remote peer,
21062 * g_dbus_error_new_for_dbus_error:
21063 * @dbus_error_name: D-Bus error name.
21064 * @dbus_error_message: D-Bus error message.
21066 * Creates a #GError based on the contents of @dbus_error_name and
21067 * @dbus_error_message.
21069 * Errors registered with g_dbus_error_register_error() will be looked
21070 * up using @dbus_error_name and if a match is found, the error domain
21071 * and code is used. Applications can use g_dbus_error_get_remote_error()
21072 * to recover @dbus_error_name.
21074 * If a match against a registered error is not found and the D-Bus
21075 * error name is in a form as returned by g_dbus_error_encode_gerror()
21076 * the error domain and code encoded in the name is used to
21077 * create the #GError. Also, @dbus_error_name is added to the error message
21078 * such that it can be recovered with g_dbus_error_get_remote_error().
21080 * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR
21081 * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is
21082 * added to the error message such that it can be recovered with
21083 * g_dbus_error_get_remote_error().
21085 * In all three cases, @dbus_error_name can always be recovered from the
21086 * returned #GError using the g_dbus_error_get_remote_error() function
21087 * (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
21089 * This function is typically only used in object mappings to prepare
21090 * #GError instances for applications. Regular applications should not use
21093 * Returns: An allocated #GError. Free with g_error_free().
21099 * g_dbus_error_register_error:
21100 * @error_domain: A #GQuark for a error domain.
21101 * @error_code: An error code.
21102 * @dbus_error_name: A D-Bus error name.
21104 * Creates an association to map between @dbus_error_name and
21105 * #GError<!-- -->s specified by @error_domain and @error_code.
21107 * This is typically done in the routine that returns the #GQuark for
21112 * Returns: %TRUE if the association was created, %FALSE if it already
21118 * g_dbus_error_register_error_domain:
21119 * @error_domain_quark_name: The error domain name.
21120 * @quark_volatile: A pointer where to store the #GQuark.
21121 * @entries: A pointer to @num_entries #GDBusErrorEntry struct items.
21122 * @num_entries: Number of items to register.
21124 * Helper function for associating a #GError error domain with D-Bus error names.
21131 * g_dbus_error_set_dbus_error:
21132 * @error: A pointer to a #GError or %NULL.
21133 * @dbus_error_name: D-Bus error name.
21134 * @dbus_error_message: D-Bus error message.
21135 * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
21136 * @...: Arguments for @format.
21138 * Does nothing if @error is %NULL. Otherwise sets *@error to
21139 * a new #GError created with g_dbus_error_new_for_dbus_error()
21140 * with @dbus_error_message prepend with @format (unless %NULL).
21147 * g_dbus_error_set_dbus_error_valist:
21148 * @error: A pointer to a #GError or %NULL.
21149 * @dbus_error_name: D-Bus error name.
21150 * @dbus_error_message: D-Bus error message.
21151 * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
21152 * @var_args: Arguments for @format.
21154 * Like g_dbus_error_set_dbus_error() but intended for language bindings.
21161 * g_dbus_error_strip_remote_error:
21162 * @error: A #GError.
21164 * Looks for extra information in the error message used to recover
21165 * the D-Bus error name and strips it if found. If stripped, the
21166 * message field in @error will correspond exactly to what was
21167 * received on the wire.
21169 * This is typically used when presenting errors to the end user.
21171 * Returns: %TRUE if information was stripped, %FALSE otherwise.
21177 * g_dbus_error_unregister_error:
21178 * @error_domain: A #GQuark for a error domain.
21179 * @error_code: An error code.
21180 * @dbus_error_name: A D-Bus error name.
21182 * Destroys an association previously set up with g_dbus_error_register_error().
21184 * Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found.
21190 * g_dbus_generate_guid:
21192 * Generate a D-Bus GUID that can be used with
21193 * e.g. g_dbus_connection_new().
21195 * See the D-Bus specification regarding what strings are valid D-Bus
21196 * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
21198 * Returns: A valid D-Bus GUID. Free with g_free().
21204 * g_dbus_gvalue_to_gvariant:
21205 * @gvalue: A #GValue to convert to a #GVariant.
21206 * @type: A #GVariantType.
21208 * Converts a #GValue to a #GVariant of the type indicated by the @type parameter.
21210 * The conversion is using the following rules:
21211 * <table frame='all'>
21212 * <title>#GValue / #GVariant conversion rules</title>
21213 * <tgroup cols='2' align='left' colsep='1' rowsep='1'>
21216 * <entry>If the #GType for @gvalue is...</entry>
21217 * <entry>... then @type must be</entry>
21222 * <entry>#G_TYPE_STRING</entry>
21223 * <entry><link linkend="G-VARIANT-TYPE-STRING:CAPS">'s'</link>, <link linkend="G-VARIANT-TYPE-OBJECT-PATH:CAPS">'o'</link>, <link linkend="G-VARIANT-TYPE-SIGNATURE:CAPS">'g'</link> or <link linkend="G-VARIANT-TYPE-BYTESTRING:CAPS">'ay'</link></entry>
21226 * <entry>#G_TYPE_STRV</entry>
21227 * <entry><link linkend="G-VARIANT-TYPE-STRING-ARRAY:CAPS">'as'</link>, <link linkend="G-VARIANT-TYPE-OBJECT-PATH-ARRAY:CAPS">'ao'</link> or <link linkend="G-VARIANT-TYPE-BYTESTRING-ARRAY:CAPS">'aay'</link></entry>
21230 * <entry>#G_TYPE_BOOLEAN</entry>
21231 * <entry><link linkend="G-VARIANT-TYPE-BOOLEAN:CAPS">'b'</link></entry>
21234 * <entry>#G_TYPE_UCHAR</entry>
21235 * <entry><link linkend="G-VARIANT-TYPE-BYTE:CAPS">'y'</link></entry>
21238 * <entry>#G_TYPE_INT</entry>
21239 * <entry><link linkend="G-VARIANT-TYPE-INT32:CAPS">'i'</link> or <link linkend="G-VARIANT-TYPE-INT16:CAPS">'n'</link></entry>
21242 * <entry>#G_TYPE_UINT</entry>
21243 * <entry><link linkend="G-VARIANT-TYPE-UINT32:CAPS">'u'</link> or <link linkend="G-VARIANT-TYPE-UINT16:CAPS">'q'</link></entry>
21246 * <entry>#G_TYPE_INT64</entry>
21247 * <entry><link linkend="G-VARIANT-TYPE-INT64:CAPS">'x'</link></entry>
21250 * <entry>#G_TYPE_UINT64</entry>
21251 * <entry><link linkend="G-VARIANT-TYPE-UINT64:CAPS">'t'</link></entry>
21254 * <entry>#G_TYPE_DOUBLE</entry>
21255 * <entry><link linkend="G-VARIANT-TYPE-DOUBLE:CAPS">'d'</link></entry>
21258 * <entry>#G_TYPE_VARIANT</entry>
21259 * <entry>Any #GVariantType</entry>
21264 * This can fail if e.g. @gvalue is of type #G_TYPE_STRING and @type
21265 * is <link linkend="G-VARIANT-TYPE-INT32:CAPS">'i'</link>. It will
21266 * also fail for any #GType (including e.g. #G_TYPE_OBJECT and
21267 * #G_TYPE_BOXED derived-types) not in the table above.
21269 * Note that if @gvalue is of type #G_TYPE_VARIANT and its value is
21270 * %NULL, the <emphasis>empty</emphasis> #GVariant instance (never
21271 * %NULL) for @type is returned (e.g. 0 for scalar types, the empty
21272 * string for string types, <literal>'/'</literal> for object path
21273 * types, the empty array for any array type and so on).
21275 * See the g_dbus_gvariant_to_gvalue() function for how to convert a
21276 * #GVariant to a #GValue.
21278 * @type holding the data from @gvalue or %NULL in case of
21279 * failure. Free with g_variant_unref().
21281 * Returns: A #GVariant (never floating) of #GVariantType
21287 * g_dbus_gvariant_to_gvalue:
21288 * @value: A #GVariant.
21289 * @out_gvalue: Return location pointing to a zero-filled (uninitialized) #GValue.
21291 * Converts a #GVariant to a #GValue. If @value is floating, it is consumed.
21293 * The rules specified in the g_dbus_gvalue_to_gvariant() function are
21294 * used - this function is essentially its reverse form.
21296 * The conversion never fails - a valid #GValue is always returned in
21304 * g_dbus_interface_get_info:
21305 * @interface_: An exported D-Bus interface.
21307 * Gets D-Bus introspection information for the D-Bus interface
21308 * implemented by @interface_.
21310 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
21316 * g_dbus_interface_get_object:
21317 * @interface_: An exported D-Bus interface.
21319 * Gets the #GDBusObject that @interface_ belongs to, if any.
21321 * reference belongs to @interface_ and should not be freed.
21323 * Returns: (transfer none): A #GDBusObject or %NULL. The returned
21329 * g_dbus_interface_info_cache_build:
21330 * @info: A #GDBusInterfaceInfo.
21332 * Builds a lookup-cache to speed up
21333 * g_dbus_interface_info_lookup_method(),
21334 * g_dbus_interface_info_lookup_signal() and
21335 * g_dbus_interface_info_lookup_property().
21337 * If this has already been called with @info, the existing cache is
21338 * used and its use count is increased.
21340 * Note that @info cannot be modified until
21341 * g_dbus_interface_info_cache_release() is called.
21348 * g_dbus_interface_info_cache_release:
21349 * @info: A GDBusInterfaceInfo
21351 * Decrements the usage count for the cache for @info built by
21352 * g_dbus_interface_info_cache_build() (if any) and frees the
21353 * resources used by the cache if the usage count drops to zero.
21360 * g_dbus_interface_info_generate_xml:
21361 * @info: A #GDBusNodeInfo
21362 * @indent: Indentation level.
21363 * @string_builder: (out): A #GString to to append XML data to.
21365 * Appends an XML representation of @info (and its children) to @string_builder.
21367 * This function is typically used for generating introspection XML
21368 * documents at run-time for handling the
21369 * <literal>org.freedesktop.DBus.Introspectable.Introspect</literal>
21377 * g_dbus_interface_info_lookup_method:
21378 * @info: A #GDBusInterfaceInfo.
21379 * @name: A D-Bus method name (typically in CamelCase)
21381 * Looks up information about a method.
21383 * This cost of this function is O(n) in number of methods unless
21384 * g_dbus_interface_info_cache_build() has been used on @info.
21386 * Returns: (transfer none): A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info.
21392 * g_dbus_interface_info_lookup_property:
21393 * @info: A #GDBusInterfaceInfo.
21394 * @name: A D-Bus property name (typically in CamelCase).
21396 * Looks up information about a property.
21398 * This cost of this function is O(n) in number of properties unless
21399 * g_dbus_interface_info_cache_build() has been used on @info.
21401 * Returns: (transfer none): A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info.
21407 * g_dbus_interface_info_lookup_signal:
21408 * @info: A #GDBusInterfaceInfo.
21409 * @name: A D-Bus signal name (typically in CamelCase)
21411 * Looks up information about a signal.
21413 * This cost of this function is O(n) in number of signals unless
21414 * g_dbus_interface_info_cache_build() has been used on @info.
21416 * Returns: (transfer none): A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info.
21422 * g_dbus_interface_info_ref:
21423 * @info: A #GDBusInterfaceInfo
21425 * If @info is statically allocated does nothing. Otherwise increases
21426 * the reference count.
21428 * Returns: The same @info.
21434 * g_dbus_interface_info_unref:
21435 * @info: A #GDBusInterfaceInfo.
21437 * If @info is statically allocated, does nothing. Otherwise decreases
21438 * the reference count of @info. When its reference count drops to 0,
21439 * the memory used is freed.
21446 * g_dbus_interface_set_object:
21447 * @interface_: An exported D-Bus interface.
21448 * @object: A #GDBusObject or %NULL.
21450 * Sets the #GDBusObject for @interface_ to @object.
21452 * Note that @interface_ will hold a weak reference to @object.
21459 * g_dbus_interface_skeleton_export:
21460 * @interface_: The D-Bus interface to export.
21461 * @connection: A #GDBusConnection to export @interface_ on.
21462 * @object_path: The path to export the interface at.
21463 * @error: Return location for error or %NULL.
21465 * Exports @interface_ at @object_path on @connection.
21467 * This can be called multiple times to export the same @interface_
21468 * onto multiple connections however the @object_path provided must be
21469 * the same for all connections.
21471 * Use g_dbus_interface_skeleton_unexport() to unexport the object.
21475 * Returns: %TRUE if the interface was exported on @connection, otherwise %FALSE with
21481 * g_dbus_interface_skeleton_flush:
21482 * @interface_: A #GDBusInterfaceSkeleton.
21484 * If @interface_ has outstanding changes, request for these changes to be
21485 * emitted immediately.
21487 * For example, an exported D-Bus interface may queue up property
21488 * changes and emit the
21489 * <literal>org.freedesktop.DBus.Properties::PropertiesChanged</literal>
21490 * signal later (e.g. in an idle handler). This technique is useful
21491 * for collapsing multiple property changes into one.
21498 * g_dbus_interface_skeleton_get_connection:
21499 * @interface_: A #GDBusInterfaceSkeleton.
21501 * Gets the first connection that @interface_ is exported on, if any.
21503 * not exported anywhere. Do not free, the object belongs to @interface_.
21505 * Returns: (transfer none): A #GDBusConnection or %NULL if @interface_ is
21511 * g_dbus_interface_skeleton_get_connections:
21512 * @interface_: A #GDBusInterfaceSkeleton.
21514 * Gets a list of the connections that @interface_ is exported on.
21516 * all the connections that @interface_ is exported on. The returned
21517 * list should be freed with g_list_free() after each element has
21518 * been freed with g_object_unref().
21520 * Returns: (element-type GDBusConnection) (transfer full): A list of
21526 * g_dbus_interface_skeleton_get_flags:
21527 * @interface_: A #GDBusInterfaceSkeleton.
21529 * Gets the #GDBusInterfaceSkeletonFlags that describes what the behavior
21532 * Returns: One or more flags from the #GDBusInterfaceSkeletonFlags enumeration.
21538 * g_dbus_interface_skeleton_get_info:
21539 * @interface_: A #GDBusInterfaceSkeleton.
21541 * Gets D-Bus introspection information for the D-Bus interface
21542 * implemented by @interface_.
21544 * Returns: (transfer none): A #GDBusInterfaceInfo (never %NULL). Do not free.
21550 * g_dbus_interface_skeleton_get_object_path:
21551 * @interface_: A #GDBusInterfaceSkeleton.
21553 * Gets the object path that @interface_ is exported on, if any.
21555 * anywhere. Do not free, the string belongs to @interface_.
21557 * Returns: A string owned by @interface_ or %NULL if @interface_ is not exported
21563 * g_dbus_interface_skeleton_get_properties:
21564 * @interface_: A #GDBusInterfaceSkeleton.
21566 * Gets all D-Bus properties for @interface_.
21568 * Returns: (transfer full): A #GVariant of type <link linkend="G-VARIANT-TYPE-VARDICT:CAPS">'a{sv}'</link>. Free with g_variant_unref().
21574 * g_dbus_interface_skeleton_get_vtable: (skip)
21575 * @interface_: A #GDBusInterfaceSkeleton.
21577 * Gets the interface vtable for the D-Bus interface implemented by
21578 * @interface_. The returned function pointers should expect @interface_
21579 * itself to be passed as @user_data.
21581 * Returns: A #GDBusInterfaceVTable (never %NULL).
21587 * g_dbus_interface_skeleton_has_connection:
21588 * @interface_: A #GDBusInterfaceSkeleton.
21589 * @connection: A #GDBusConnection.
21591 * Checks if @interface_ is export on @connection.
21593 * Returns: %TRUE if @interface_ is exported on @connection, %FALSE otherwise.
21599 * g_dbus_interface_skeleton_set_flags:
21600 * @interface_: A #GDBusInterfaceSkeleton.
21601 * @flags: Flags from the #GDBusInterfaceSkeletonFlags enumeration.
21603 * Sets flags describing what the behavior of @skeleton should be.
21610 * g_dbus_interface_skeleton_unexport:
21611 * @interface_: A #GDBusInterfaceSkeleton.
21613 * Stops exporting @interface_ on all connections it is exported on.
21615 * To unexport @interface_ from only a single connection, use
21616 * g_dbus_interface_skeleton_export_from_connection()
21623 * g_dbus_interface_skeleton_unexport_from_connection:
21624 * @interface_: A #GDBusInterfaceSkeleton.
21625 * @connection: A #GDBusConnection.
21627 * Stops exporting @interface_ on @connection.
21629 * To stop exporting on all connections the interface is exported on,
21630 * use g_dbus_interface_skeleton_unexport().
21637 * g_dbus_is_address:
21638 * @string: A string.
21640 * Checks if @string is a D-Bus address.
21642 * This doesn't check if @string is actually supported by #GDBusServer
21643 * or #GDBusConnection - use g_dbus_is_supported_address() to do more
21646 * Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise.
21653 * @string: The string to check.
21655 * Checks if @string is a D-Bus GUID.
21657 * See the D-Bus specification regarding what strings are valid D-Bus
21658 * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
21660 * Returns: %TRUE if @string is a guid, %FALSE otherwise.
21666 * g_dbus_is_interface_name:
21667 * @string: The string to check.
21669 * Checks if @string is a valid D-Bus interface name.
21671 * Returns: %TRUE if valid, %FALSE otherwise.
21677 * g_dbus_is_member_name:
21678 * @string: The string to check.
21680 * Checks if @string is a valid D-Bus member (e.g. signal or method) name.
21682 * Returns: %TRUE if valid, %FALSE otherwise.
21689 * @string: The string to check.
21691 * Checks if @string is a valid D-Bus bus name (either unique or well-known).
21693 * Returns: %TRUE if valid, %FALSE otherwise.
21699 * g_dbus_is_supported_address:
21700 * @string: A string.
21701 * @error: Return location for error or %NULL.
21703 * Like g_dbus_is_address() but also checks if the library suppors the
21704 * transports in @string and that key/value pairs for each transport
21707 * supported by this library, %FALSE if @error is set.
21709 * Returns: %TRUE if @string is a valid D-Bus address that is
21715 * g_dbus_is_unique_name:
21716 * @string: The string to check.
21718 * Checks if @string is a valid D-Bus unique bus name.
21720 * Returns: %TRUE if valid, %FALSE otherwise.
21726 * g_dbus_menu_model_get:
21727 * @connection: a #GDBusConnection
21728 * @bus_name: the bus name which exports the menu model
21729 * @object_path: the object path at which the menu model is exported
21731 * Obtains a #GDBusMenuModel for the menu model which is exported
21732 * at the given @bus_name and @object_path.
21734 * The thread default main context is taken at the time of this call.
21735 * All signals on the menu model (and any linked models) are reported
21736 * with respect to this context. All calls on the returned menu model
21737 * (and linked models) must also originate from this same context, with
21738 * the thread default main context unchanged.
21740 * g_object_unref().
21742 * Returns: (transfer full): a #GDBusMenuModel object. Free with
21748 * g_dbus_message_bytes_needed:
21749 * @blob: (array length=blob_len) (element-type guint8): A blob represent a binary D-Bus message.
21750 * @blob_len: The length of @blob (must be at least 16).
21751 * @error: Return location for error or %NULL.
21753 * Utility function to calculate how many bytes are needed to
21754 * completely deserialize the D-Bus message stored at @blob.
21756 * @blob contains invalid data or not enough data is available to
21757 * determine the size).
21759 * Returns: Number of bytes needed or -1 if @error is set (e.g. if
21765 * g_dbus_message_copy:
21766 * @message: A #GDBusMessage.
21767 * @error: Return location for error or %NULL.
21769 * Copies @message. The copy is a deep copy and the returned
21770 * #GDBusMessage is completely identical except that it is guaranteed
21771 * to not be locked.
21773 * This operation can fail if e.g. @message contains file descriptors
21774 * and the per-process or system-wide open files limit is reached.
21776 * Free with g_object_unref().
21778 * Returns: (transfer full): A new #GDBusMessage or %NULL if @error is set.
21784 * g_dbus_message_get_arg0:
21785 * @message: A #GDBusMessage.
21787 * Convenience to get the first item in the body of @message.
21789 * @message is not a string.
21791 * Returns: The string item or %NULL if the first item in the body of
21797 * g_dbus_message_get_body:
21798 * @message: A #GDBusMessage.
21800 * Gets the body of a message.
21802 * Returns: A #GVariant or %NULL if the body is empty. Do not free, it is owned by @message.
21808 * g_dbus_message_get_byte_order:
21809 * @message: A #GDBusMessage.
21811 * Gets the byte order of @message.
21813 * Returns: The byte order.
21818 * g_dbus_message_get_destination:
21819 * @message: A #GDBusMessage.
21821 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
21823 * Returns: The value.
21829 * g_dbus_message_get_error_name:
21830 * @message: A #GDBusMessage.
21832 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
21834 * Returns: The value.
21840 * g_dbus_message_get_flags:
21841 * @message: A #GDBusMessage.
21843 * Gets the flags for @message.
21845 * Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
21851 * g_dbus_message_get_header:
21852 * @message: A #GDBusMessage.
21853 * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
21855 * Gets a header field on @message.
21857 * otherwise. Do not free, it is owned by @message.
21859 * Returns: A #GVariant with the value if the header was found, %NULL
21865 * g_dbus_message_get_header_fields:
21866 * @message: A #GDBusMessage.
21868 * Gets an array of all header fields on @message that are set.
21870 * terminated by %G_DBUS_MESSAGE_HEADER_FIELD_INVALID. Each element
21871 * is a #guchar. Free with g_free().
21873 * Returns: (array zero-terminated=1): An array of header fields
21879 * g_dbus_message_get_interface:
21880 * @message: A #GDBusMessage.
21882 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
21884 * Returns: The value.
21890 * g_dbus_message_get_locked:
21891 * @message: A #GDBusMessage.
21893 * Checks whether @message is locked. To monitor changes to this
21894 * value, conncet to the #GObject::notify signal to listen for changes
21895 * on the #GDBusMessage:locked property.
21897 * Returns: %TRUE if @message is locked, %FALSE otherwise.
21903 * g_dbus_message_get_member:
21904 * @message: A #GDBusMessage.
21906 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
21908 * Returns: The value.
21914 * g_dbus_message_get_message_type:
21915 * @message: A #GDBusMessage.
21917 * Gets the type of @message.
21919 * Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
21925 * g_dbus_message_get_num_unix_fds:
21926 * @message: A #GDBusMessage.
21928 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
21930 * Returns: The value.
21936 * g_dbus_message_get_path:
21937 * @message: A #GDBusMessage.
21939 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
21941 * Returns: The value.
21947 * g_dbus_message_get_reply_serial:
21948 * @message: A #GDBusMessage.
21950 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
21952 * Returns: The value.
21958 * g_dbus_message_get_sender:
21959 * @message: A #GDBusMessage.
21961 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
21963 * Returns: The value.
21969 * g_dbus_message_get_serial:
21970 * @message: A #GDBusMessage.
21972 * Gets the serial for @message.
21974 * Returns: A #guint32.
21980 * g_dbus_message_get_signature:
21981 * @message: A #GDBusMessage.
21983 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
21985 * Returns: The value.
21991 * g_dbus_message_get_unix_fd_list:
21992 * @message: A #GDBusMessage.
21994 * Gets the UNIX file descriptors associated with @message, if any.
21996 * This method is only available on UNIX.
21998 * associated. Do not free, this object is owned by @message.
22000 * Returns: (transfer none): A #GUnixFDList or %NULL if no file descriptors are
22006 * g_dbus_message_lock:
22007 * @message: A #GDBusMessage.
22009 * If @message is locked, does nothing. Otherwise locks the message.
22016 * g_dbus_message_new:
22018 * Creates a new empty #GDBusMessage.
22020 * Returns: A #GDBusMessage. Free with g_object_unref().
22026 * g_dbus_message_new_from_blob:
22027 * @blob: (array length=blob_len) (element-type guint8): A blob represent a binary D-Bus message.
22028 * @blob_len: The length of @blob.
22029 * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
22030 * @error: Return location for error or %NULL.
22032 * Creates a new #GDBusMessage from the data stored at @blob. The byte
22033 * order that the message was in can be retrieved using
22034 * g_dbus_message_get_byte_order().
22036 * g_object_unref().
22038 * Returns: A new #GDBusMessage or %NULL if @error is set. Free with
22044 * g_dbus_message_new_method_call:
22045 * @name: A valid D-Bus name or %NULL.
22046 * @path: A valid object path.
22047 * @interface_: A valid D-Bus interface name or %NULL.
22048 * @method: A valid method name.
22050 * Creates a new #GDBusMessage for a method call.
22052 * Returns: A #GDBusMessage. Free with g_object_unref().
22058 * g_dbus_message_new_method_error:
22059 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
22060 * @error_name: A valid D-Bus error name.
22061 * @error_message_format: The D-Bus error message in a printf() format.
22062 * @...: Arguments for @error_message_format.
22064 * Creates a new #GDBusMessage that is an error reply to @method_call_message.
22066 * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
22072 * g_dbus_message_new_method_error_literal:
22073 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
22074 * @error_name: A valid D-Bus error name.
22075 * @error_message: The D-Bus error message.
22077 * Creates a new #GDBusMessage that is an error reply to @method_call_message.
22079 * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
22085 * g_dbus_message_new_method_error_valist:
22086 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
22087 * @error_name: A valid D-Bus error name.
22088 * @error_message_format: The D-Bus error message in a printf() format.
22089 * @var_args: Arguments for @error_message_format.
22091 * Like g_dbus_message_new_method_error() but intended for language bindings.
22093 * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
22099 * g_dbus_message_new_method_reply:
22100 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
22102 * Creates a new #GDBusMessage that is a reply to @method_call_message.
22104 * Returns: (transfer full): #GDBusMessage. Free with g_object_unref().
22110 * g_dbus_message_new_signal:
22111 * @path: A valid object path.
22112 * @interface_: A valid D-Bus interface name.
22113 * @signal: A valid signal name.
22115 * Creates a new #GDBusMessage for a signal emission.
22117 * Returns: A #GDBusMessage. Free with g_object_unref().
22123 * g_dbus_message_print:
22124 * @message: A #GDBusMessage.
22125 * @indent: Indentation level.
22127 * Produces a human-readable multi-line description of @message.
22129 * The contents of the description has no ABI guarantees, the contents
22130 * and formatting is subject to change at any time. Typical output
22131 * looks something like this:
22137 * path -> objectpath '/org/gtk/GDBus/TestObject'
22138 * interface -> 'org.gtk.GDBus.TestInterface'
22139 * member -> 'GimmeStdout'
22140 * destination -> ':1.146'
22142 * UNIX File Descriptors:
22144 * </programlisting>
22147 * Flags: no-reply-expected
22151 * reply-serial -> uint32 4
22152 * destination -> ':1.159'
22153 * sender -> ':1.146'
22154 * num-unix-fds -> uint32 1
22156 * UNIX File Descriptors:
22157 * fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
22158 * </programlisting>
22160 * Type: method-return
22161 * Returns: A string that should be freed with g_free().
22167 * g_dbus_message_set_body:
22168 * @message: A #GDBusMessage.
22169 * @body: Either %NULL or a #GVariant that is a tuple.
22171 * Sets the body @message. As a side-effect the
22172 * %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the
22173 * type string of @body (or cleared if @body is %NULL).
22175 * If @body is floating, @message assumes ownership of @body.
22182 * g_dbus_message_set_byte_order:
22183 * @message: A #GDBusMessage.
22184 * @byte_order: The byte order.
22186 * Sets the byte order of @message.
22191 * g_dbus_message_set_destination:
22192 * @message: A #GDBusMessage.
22193 * @value: The value to set.
22195 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
22202 * g_dbus_message_set_error_name:
22203 * @message: A #GDBusMessage.
22204 * @value: The value to set.
22206 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
22213 * g_dbus_message_set_flags:
22214 * @message: A #GDBusMessage.
22215 * @flags: Flags for @message that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
22217 * Sets the flags to set on @message.
22224 * g_dbus_message_set_header:
22225 * @message: A #GDBusMessage.
22226 * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
22227 * @value: A #GVariant to set the header field or %NULL to clear the header field.
22229 * Sets a header field on @message.
22231 * If @value is floating, @message assumes ownership of @value.
22238 * g_dbus_message_set_interface:
22239 * @message: A #GDBusMessage.
22240 * @value: The value to set.
22242 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
22249 * g_dbus_message_set_member:
22250 * @message: A #GDBusMessage.
22251 * @value: The value to set.
22253 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
22260 * g_dbus_message_set_message_type:
22261 * @message: A #GDBusMessage.
22262 * @type: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
22264 * Sets @message to be of @type.
22271 * g_dbus_message_set_num_unix_fds:
22272 * @message: A #GDBusMessage.
22273 * @value: The value to set.
22275 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
22282 * g_dbus_message_set_path:
22283 * @message: A #GDBusMessage.
22284 * @value: The value to set.
22286 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
22293 * g_dbus_message_set_reply_serial:
22294 * @message: A #GDBusMessage.
22295 * @value: The value to set.
22297 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
22304 * g_dbus_message_set_sender:
22305 * @message: A #GDBusMessage.
22306 * @value: The value to set.
22308 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
22315 * g_dbus_message_set_serial:
22316 * @message: A #GDBusMessage.
22317 * @serial: A #guint32.
22319 * Sets the serial for @message.
22326 * g_dbus_message_set_signature:
22327 * @message: A #GDBusMessage.
22328 * @value: The value to set.
22330 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
22337 * g_dbus_message_set_unix_fd_list:
22338 * @message: A #GDBusMessage.
22339 * @fd_list: (allow-none): A #GUnixFDList or %NULL.
22341 * Sets the UNIX file descriptors associated with @message. As a
22342 * side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header
22343 * field is set to the number of fds in @fd_list (or cleared if
22344 * @fd_list is %NULL).
22346 * This method is only available on UNIX.
22353 * g_dbus_message_to_blob:
22354 * @message: A #GDBusMessage.
22355 * @out_size: Return location for size of generated blob.
22356 * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
22357 * @error: Return location for error.
22359 * Serializes @message to a blob. The byte order returned by
22360 * g_dbus_message_get_byte_order() will be used.
22362 * valid binary D-Bus message of @out_size bytes generated by @message
22363 * or %NULL if @error is set. Free with g_free().
22365 * Returns: (array length=out_size) (transfer full): A pointer to a
22371 * g_dbus_message_to_gerror:
22372 * @message: A #GDBusMessage.
22373 * @error: The #GError to set.
22375 * If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does
22376 * nothing and returns %FALSE.
22378 * Otherwise this method encodes the error in @message as a #GError
22379 * using g_dbus_error_set_dbus_error() using the information in the
22380 * %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as
22381 * well as the first string item in @message's body.
22383 * Returns: %TRUE if @error was set, %FALSE otherwise.
22389 * g_dbus_method_info_ref:
22390 * @info: A #GDBusMethodInfo
22392 * If @info is statically allocated does nothing. Otherwise increases
22393 * the reference count.
22395 * Returns: The same @info.
22401 * g_dbus_method_info_unref:
22402 * @info: A #GDBusMethodInfo.
22404 * If @info is statically allocated, does nothing. Otherwise decreases
22405 * the reference count of @info. When its reference count drops to 0,
22406 * the memory used is freed.
22413 * g_dbus_method_invocation_get_connection:
22414 * @invocation: A #GDBusMethodInvocation.
22416 * Gets the #GDBusConnection the method was invoked on.
22418 * Returns: (transfer none): A #GDBusConnection. Do not free, it is owned by @invocation.
22424 * g_dbus_method_invocation_get_interface_name:
22425 * @invocation: A #GDBusMethodInvocation.
22427 * Gets the name of the D-Bus interface the method was invoked on.
22429 * Returns: A string. Do not free, it is owned by @invocation.
22435 * g_dbus_method_invocation_get_message:
22436 * @invocation: A #GDBusMethodInvocation.
22438 * Gets the #GDBusMessage for the method invocation. This is useful if
22439 * you need to use low-level protocol features, such as UNIX file
22440 * descriptor passing, that cannot be properly expressed in the
22443 * See <xref linkend="gdbus-server"/> and <xref
22444 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
22445 * low-level API to send and receive UNIX file descriptors.
22447 * Returns: (transfer none): #GDBusMessage. Do not free, it is owned by @invocation.
22453 * g_dbus_method_invocation_get_method_info:
22454 * @invocation: A #GDBusMethodInvocation.
22456 * Gets information about the method call, if any.
22458 * Returns: A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation.
22464 * g_dbus_method_invocation_get_method_name:
22465 * @invocation: A #GDBusMethodInvocation.
22467 * Gets the name of the method that was invoked.
22469 * Returns: A string. Do not free, it is owned by @invocation.
22475 * g_dbus_method_invocation_get_object_path:
22476 * @invocation: A #GDBusMethodInvocation.
22478 * Gets the object path the method was invoked on.
22480 * Returns: A string. Do not free, it is owned by @invocation.
22486 * g_dbus_method_invocation_get_parameters:
22487 * @invocation: A #GDBusMethodInvocation.
22489 * Gets the parameters of the method invocation. If there are no input
22490 * parameters then this will return a GVariant with 0 children rather than NULL.
22492 * Returns: (transfer none): A #GVariant tuple. Do not unref this because it is owned by @invocation.
22498 * g_dbus_method_invocation_get_sender:
22499 * @invocation: A #GDBusMethodInvocation.
22501 * Gets the bus name that invoked the method.
22503 * Returns: A string. Do not free, it is owned by @invocation.
22509 * g_dbus_method_invocation_get_user_data: (skip)
22510 * @invocation: A #GDBusMethodInvocation.
22512 * Gets the @user_data #gpointer passed to g_dbus_connection_register_object().
22514 * Returns: A #gpointer.
22520 * g_dbus_method_invocation_return_dbus_error:
22521 * @invocation: (transfer full): A #GDBusMethodInvocation.
22522 * @error_name: A valid D-Bus error name.
22523 * @error_message: A valid D-Bus error message.
22525 * Finishes handling a D-Bus method call by returning an error.
22527 * This method will free @invocation, you cannot use it afterwards.
22534 * g_dbus_method_invocation_return_error:
22535 * @invocation: (transfer full): A #GDBusMethodInvocation.
22536 * @domain: A #GQuark for the #GError error domain.
22537 * @code: The error code.
22538 * @format: printf()-style format.
22539 * @...: Parameters for @format.
22541 * Finishes handling a D-Bus method call by returning an error.
22543 * See g_dbus_error_encode_gerror() for details about what error name
22544 * will be returned on the wire. In a nutshell, if the given error is
22545 * registered using g_dbus_error_register_error() the name given
22546 * during registration is used. Otherwise, a name of the form
22547 * <literal>org.gtk.GDBus.UnmappedGError.Quark...</literal> is
22548 * used. This provides transparent mapping of #GError between
22549 * applications using GDBus.
22551 * If you are writing an application intended to be portable,
22552 * <emphasis>always</emphasis> register errors with g_dbus_error_register_error()
22553 * or use g_dbus_method_invocation_return_dbus_error().
22555 * This method will free @invocation, you cannot use it afterwards.
22562 * g_dbus_method_invocation_return_error_literal:
22563 * @invocation: (transfer full): A #GDBusMethodInvocation.
22564 * @domain: A #GQuark for the #GError error domain.
22565 * @code: The error code.
22566 * @message: The error message.
22568 * Like g_dbus_method_invocation_return_error() but without printf()-style formatting.
22570 * This method will free @invocation, you cannot use it afterwards.
22577 * g_dbus_method_invocation_return_error_valist:
22578 * @invocation: (transfer full): A #GDBusMethodInvocation.
22579 * @domain: A #GQuark for the #GError error domain.
22580 * @code: The error code.
22581 * @format: printf()-style format.
22582 * @var_args: #va_list of parameters for @format.
22584 * Like g_dbus_method_invocation_return_error() but intended for
22585 * language bindings.
22587 * This method will free @invocation, you cannot use it afterwards.
22594 * g_dbus_method_invocation_return_gerror:
22595 * @invocation: (transfer full): A #GDBusMethodInvocation.
22596 * @error: A #GError.
22598 * Like g_dbus_method_invocation_return_error() but takes a #GError
22599 * instead of the error domain, error code and message.
22601 * This method will free @invocation, you cannot use it afterwards.
22608 * g_dbus_method_invocation_return_value:
22609 * @invocation: (transfer full): A #GDBusMethodInvocation.
22610 * @parameters: (allow-none): A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
22612 * Finishes handling a D-Bus method call by returning @parameters.
22613 * If the @parameters GVariant is floating, it is consumed.
22615 * It is an error if @parameters is not of the right format.
22617 * This method will free @invocation, you cannot use it afterwards.
22624 * g_dbus_method_invocation_return_value_with_unix_fd_list:
22625 * @invocation: (transfer full): A #GDBusMethodInvocation.
22626 * @parameters: (allow-none): A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
22627 * @fd_list: (allow-none): A #GUnixFDList or %NULL.
22629 * Like g_dbus_method_invocation_return_value() but also takes a #GUnixFDList.
22631 * This method is only available on UNIX.
22633 * This method will free @invocation, you cannot use it afterwards.
22640 * g_dbus_method_invocation_take_error: (skip)
22641 * @invocation: (transfer full): A #GDBusMethodInvocation.
22642 * @error: (transfer full): A #GError.
22644 * Like g_dbus_method_invocation_return_gerror() but takes ownership
22645 * of @error so the caller does not need to free it.
22647 * This method will free @invocation, you cannot use it afterwards.
22654 * g_dbus_node_info_generate_xml:
22655 * @info: A #GDBusNodeInfo.
22656 * @indent: Indentation level.
22657 * @string_builder: (out): A #GString to to append XML data to.
22659 * Appends an XML representation of @info (and its children) to @string_builder.
22661 * This function is typically used for generating introspection XML documents at run-time for
22662 * handling the <literal>org.freedesktop.DBus.Introspectable.Introspect</literal> method.
22669 * g_dbus_node_info_lookup_interface:
22670 * @info: A #GDBusNodeInfo.
22671 * @name: A D-Bus interface name.
22673 * Looks up information about an interface.
22675 * This cost of this function is O(n) in number of interfaces.
22677 * Returns: (transfer none): A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info.
22683 * g_dbus_node_info_new_for_xml:
22684 * @xml_data: Valid D-Bus introspection XML.
22685 * @error: Return location for error.
22687 * Parses @xml_data and returns a #GDBusNodeInfo representing the data.
22689 * Note that this routine is using a
22690 * <link linkend="glib-Simple-XML-Subset-Parser.description">GMarkup</link>-based
22691 * parser that only accepts a subset of valid XML documents.
22693 * with g_dbus_node_info_unref().
22695 * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free
22701 * g_dbus_node_info_ref:
22702 * @info: A #GDBusNodeInfo
22704 * If @info is statically allocated does nothing. Otherwise increases
22705 * the reference count.
22707 * Returns: The same @info.
22713 * g_dbus_node_info_unref:
22714 * @info: A #GDBusNodeInfo.
22716 * If @info is statically allocated, does nothing. Otherwise decreases
22717 * the reference count of @info. When its reference count drops to 0,
22718 * the memory used is freed.
22725 * g_dbus_object_get_interface:
22726 * @object: A #GDBusObject.
22727 * @interface_name: A D-Bus interface name.
22729 * Gets the D-Bus interface with name @interface_name associated with
22732 * #GDBusInterface that must be freed with g_object_unref().
22734 * Returns: (transfer full): %NULL if not found, otherwise a
22740 * g_dbus_object_get_interfaces:
22741 * @object: A #GDBusObject.
22743 * Gets the D-Bus interfaces associated with @object.
22745 * The returned list must be freed by g_list_free() after each element has been freed
22746 * with g_object_unref().
22748 * Returns: (element-type GDBusInterface) (transfer full): A list of #GDBusInterface instances.
22754 * g_dbus_object_get_object_path:
22755 * @object: A #GDBusObject.
22757 * Gets the object path for @object.
22759 * Returns: A string owned by @object. Do not free.
22765 * g_dbus_object_manager_client_get_connection:
22766 * @manager: A #GDBusObjectManagerClient
22768 * Gets the #GDBusConnection used by @manager.
22770 * the object belongs to @manager.
22772 * Returns: (transfer none): A #GDBusConnection object. Do not free,
22778 * g_dbus_object_manager_client_get_flags:
22779 * @manager: A #GDBusObjectManagerClient
22781 * Gets the flags that @manager was constructed with.
22785 * Returns: Zero of more flags from the #GDBusObjectManagerClientFlags
22791 * g_dbus_object_manager_client_get_name:
22792 * @manager: A #GDBusObjectManagerClient
22794 * Gets the name that @manager is for.
22796 * belongs to @manager.
22798 * Returns: A unique or well-known name. Do not free, the string
22804 * g_dbus_object_manager_client_get_name_owner:
22805 * @manager: A #GDBusObjectManagerClient.
22807 * The unique name that owns the name that @manager is for or %NULL if
22808 * no-one currently owns that name. You can connect to the
22809 * #GObject::notify signal to track changes to the
22810 * #GDBusObjectManagerClient:name-owner property.
22814 * Returns: The name owner or %NULL if no name owner exists. Free with
22820 * g_dbus_object_manager_client_new:
22821 * @connection: A #GDBusConnection.
22822 * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
22823 * @name: The owner of the control object (unique or well-known name).
22824 * @object_path: The object path of the control object.
22825 * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
22826 * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
22827 * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
22828 * @cancellable: A #GCancellable or %NULL
22829 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
22830 * @user_data: The data to pass to @callback.
22832 * Asynchronously creates a new #GDBusObjectManagerClient object.
22834 * This is an asynchronous failable constructor. When the result is
22835 * ready, @callback will be invoked in the
22836 * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
22837 * of the thread you are calling this method from. You can
22838 * then call g_dbus_object_manager_client_new_finish() to get the result. See
22839 * g_dbus_object_manager_client_new_sync() for the synchronous version.
22846 * g_dbus_object_manager_client_new_finish:
22847 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new().
22848 * @error: Return location for error or %NULL.
22850 * Finishes an operation started with g_dbus_object_manager_client_new().
22852 * #GDBusObjectManagerClient object or %NULL if @error is set. Free
22853 * with g_object_unref().
22855 * Returns: (transfer full) (type GDBusObjectManagerClient): A
22861 * g_dbus_object_manager_client_new_for_bus:
22862 * @bus_type: A #GBusType.
22863 * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
22864 * @name: The owner of the control object (unique or well-known name).
22865 * @object_path: The object path of the control object.
22866 * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
22867 * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
22868 * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
22869 * @cancellable: A #GCancellable or %NULL
22870 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
22871 * @user_data: The data to pass to @callback.
22873 * Like g_dbus_object_manager_client_new() but takes a #GBusType instead of a
22874 * #GDBusConnection.
22876 * This is an asynchronous failable constructor. When the result is
22877 * ready, @callback will be invoked in the
22878 * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
22879 * of the thread you are calling this method from. You can
22880 * then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See
22881 * g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version.
22888 * g_dbus_object_manager_client_new_for_bus_finish:
22889 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_object_manager_client_new_for_bus().
22890 * @error: Return location for error or %NULL.
22892 * Finishes an operation started with g_dbus_object_manager_client_new_for_bus().
22894 * #GDBusObjectManagerClient object or %NULL if @error is set. Free
22895 * with g_object_unref().
22897 * Returns: (transfer full) (type GDBusObjectManagerClient): A
22903 * g_dbus_object_manager_client_new_for_bus_sync:
22904 * @bus_type: A #GBusType.
22905 * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
22906 * @name: The owner of the control object (unique or well-known name).
22907 * @object_path: The object path of the control object.
22908 * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
22909 * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
22910 * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
22911 * @cancellable: A #GCancellable or %NULL
22912 * @error: Return location for error or %NULL.
22914 * Like g_dbus_object_manager_client_new_sync() but takes a #GBusType instead
22915 * of a #GDBusConnection.
22917 * This is a synchronous failable constructor - the calling thread is
22918 * blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus()
22919 * for the asynchronous version.
22921 * #GDBusObjectManagerClient object or %NULL if @error is set. Free
22922 * with g_object_unref().
22924 * Returns: (transfer full) (type GDBusObjectManagerClient): A
22930 * g_dbus_object_manager_client_new_sync:
22931 * @connection: A #GDBusConnection.
22932 * @flags: Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
22933 * @name: The owner of the control object (unique or well-known name).
22934 * @object_path: The object path of the control object.
22935 * @get_proxy_type_func: A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
22936 * @get_proxy_type_user_data: User data to pass to @get_proxy_type_func.
22937 * @get_proxy_type_destroy_notify: (allow-none): Free function for @get_proxy_type_user_data or %NULL.
22938 * @cancellable: A #GCancellable or %NULL
22939 * @error: Return location for error or %NULL.
22941 * Creates a new #GDBusObjectManagerClient object.
22943 * This is a synchronous failable constructor - the calling thread is
22944 * blocked until a reply is received. See g_dbus_object_manager_client_new()
22945 * for the asynchronous version.
22947 * #GDBusObjectManagerClient object or %NULL if @error is set. Free
22948 * with g_object_unref().
22950 * Returns: (transfer full) (type GDBusObjectManagerClient): A
22956 * g_dbus_object_manager_get_interface:
22957 * @manager: A #GDBusObjectManager.
22958 * @object_path: Object path to lookup.
22959 * @interface_name: D-Bus interface name to lookup.
22961 * Gets the interface proxy for @interface_name at @object_path, if
22964 * with g_object_unref().
22966 * Returns: (transfer full): A #GDBusInterface instance or %NULL. Free
22972 * g_dbus_object_manager_get_object:
22973 * @manager: A #GDBusObjectManager.
22974 * @object_path: Object path to lookup.
22976 * Gets the #GDBusObjectProxy at @object_path, if any.
22978 * g_object_unref().
22980 * Returns: (transfer full): A #GDBusObject or %NULL. Free with
22986 * g_dbus_object_manager_get_object_path:
22987 * @manager: A #GDBusObjectManager.
22989 * Gets the object path that @manager is for.
22991 * Returns: A string owned by @manager. Do not free.
22997 * g_dbus_object_manager_get_objects:
22998 * @manager: A #GDBusObjectManager.
23000 * Gets all #GDBusObject objects known to @manager.
23002 * #GDBusObject objects. The returned list should be freed with
23003 * g_list_free() after each element has been freed with
23004 * g_object_unref().
23006 * Returns: (transfer full) (element-type GDBusObject): A list of
23012 * g_dbus_object_manager_server_export:
23013 * @manager: A #GDBusObjectManagerServer.
23014 * @object: A #GDBusObjectSkeleton.
23016 * Exports @object on @manager.
23018 * If there is already a #GDBusObject exported at the object path,
23019 * then the old object is removed.
23021 * The object path for @object must be in the hierarchy rooted by the
23022 * object path for @manager.
23024 * Note that @manager will take a reference on @object for as long as
23032 * g_dbus_object_manager_server_export_uniquely:
23033 * @manager: A #GDBusObjectManagerServer.
23034 * @object: An object.
23036 * Like g_dbus_object_manager_server_export() but appends a string of
23037 * the form <literal>_N</literal> (with N being a natural number) to
23038 * @object<!-- -->'s object path if an object with the given path
23039 * already exists. As such, the #GDBusObjectProxy:g-object-path property
23040 * of @object may be modified.
23047 * g_dbus_object_manager_server_get_connection:
23048 * @manager: A #GDBusObjectManagerServer
23050 * Gets the #GDBusConnection used by @manager.
23052 * @manager isn't exported on a connection. The returned object should
23053 * be freed with g_object_unref().
23055 * Returns: (transfer full): A #GDBusConnection object or %NULL if
23061 * g_dbus_object_manager_server_new:
23062 * @object_path: The object path to export the manager object at.
23064 * Creates a new #GDBusObjectManagerServer object.
23066 * The returned server isn't yet exported on any connection. To do so,
23067 * use g_dbus_object_manager_server_set_connection(). Normally you
23068 * want to export all of your objects before doing so to avoid <ulink
23069 * url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">InterfacesAdded</ulink>
23070 * signals being emitted.
23072 * Returns: A #GDBusObjectManagerServer object. Free with g_object_unref().
23078 * g_dbus_object_manager_server_set_connection:
23079 * @manager: A #GDBusObjectManagerServer.
23080 * @connection: (allow-none): A #GDBusConnection or %NULL.
23082 * Exports all objects managed by @manager on @connection. If
23083 * @connection is %NULL, stops exporting objects.
23088 * g_dbus_object_manager_server_unexport:
23089 * @manager: A #GDBusObjectManagerServer.
23090 * @object_path: An object path.
23092 * If @manager has an object at @path, removes the object. Otherwise
23095 * Note that @object_path must be in the hierarchy rooted by the
23096 * object path for @manager.
23098 * Returns: %TRUE if object at @object_path was removed, %FALSE otherwise.
23104 * g_dbus_object_proxy_get_connection:
23105 * @proxy: a #GDBusObjectProxy
23107 * Gets the connection that @proxy is for.
23109 * object is owned by @proxy.
23111 * Returns: (transfer none): A #GDBusConnection. Do not free, the
23117 * g_dbus_object_proxy_new:
23118 * @connection: a #GDBusConnection
23119 * @object_path: the object path
23121 * Creates a new #GDBusObjectProxy for the given connection and
23124 * Returns: a new #GDBusObjectProxy
23130 * g_dbus_object_skeleton_add_interface:
23131 * @object: A #GDBusObjectSkeleton.
23132 * @interface_: A #GDBusInterfaceSkeleton.
23134 * Adds @interface_ to @object.
23136 * If @object already contains a #GDBusInterfaceSkeleton with the same
23137 * interface name, it is removed before @interface_ is added.
23139 * Note that @object takes its own reference on @interface_ and holds
23140 * it until removed.
23147 * g_dbus_object_skeleton_flush:
23148 * @object: A #GDBusObjectSkeleton.
23150 * This method simply calls g_dbus_interface_skeleton_flush() on all
23151 * interfaces belonging to @object. See that method for when flushing
23159 * g_dbus_object_skeleton_new:
23160 * @object_path: An object path.
23162 * Creates a new #GDBusObjectSkeleton.
23164 * Returns: A #GDBusObjectSkeleton. Free with g_object_unref().
23170 * g_dbus_object_skeleton_remove_interface:
23171 * @object: A #GDBusObjectSkeleton.
23172 * @interface_: A #GDBusInterfaceSkeleton.
23174 * Removes @interface_ from @object.
23181 * g_dbus_object_skeleton_remove_interface_by_name:
23182 * @object: A #GDBusObjectSkeleton.
23183 * @interface_name: A D-Bus interface name.
23185 * Removes the #GDBusInterface with @interface_name from @object.
23187 * If no D-Bus interface of the given interface exists, this function
23195 * g_dbus_object_skeleton_set_object_path:
23196 * @object: A #GDBusObjectSkeleton.
23197 * @object_path: A valid D-Bus object path.
23199 * Sets the object path for @object.
23206 * g_dbus_property_info_ref:
23207 * @info: A #GDBusPropertyInfo
23209 * If @info is statically allocated does nothing. Otherwise increases
23210 * the reference count.
23212 * Returns: The same @info.
23218 * g_dbus_property_info_unref:
23219 * @info: A #GDBusPropertyInfo.
23221 * If @info is statically allocated, does nothing. Otherwise decreases
23222 * the reference count of @info. When its reference count drops to 0,
23223 * the memory used is freed.
23230 * g_dbus_proxy_call:
23231 * @proxy: A #GDBusProxy.
23232 * @method_name: Name of method to invoke.
23233 * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
23234 * @flags: Flags from the #GDBusCallFlags enumeration.
23235 * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
23236 * @cancellable: A #GCancellable or %NULL.
23237 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
23238 * @user_data: The data to pass to @callback.
23240 * Asynchronously invokes the @method_name method on @proxy.
23242 * If @method_name contains any dots, then @name is split into interface and
23243 * method name parts. This allows using @proxy for invoking methods on
23244 * other interfaces.
23246 * If the #GDBusConnection associated with @proxy is closed then
23247 * the operation will fail with %G_IO_ERROR_CLOSED. If
23248 * @cancellable is canceled, the operation will fail with
23249 * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
23250 * compatible with the D-Bus protocol, the operation fails with
23251 * %G_IO_ERROR_INVALID_ARGUMENT.
23253 * If the @parameters #GVariant is floating, it is consumed. This allows
23254 * convenient 'inline' use of g_variant_new(), e.g.:
23256 * g_dbus_proxy_call (proxy,
23258 * g_variant_new ("(ss)",
23261 * G_DBUS_CALL_FLAGS_NONE,
23264 * (GAsyncReadyCallback) two_strings_done,
23268 * If @proxy has an expected interface (see
23269 * #GDBusProxy:g-interface-info) and @method_name is referenced by it,
23270 * then the return value is checked against the return type.
23272 * This is an asynchronous method. When the operation is finished,
23273 * @callback will be invoked in the
23274 * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
23275 * of the thread you are calling this method from.
23276 * You can then call g_dbus_proxy_call_finish() to get the result of
23277 * the operation. See g_dbus_proxy_call_sync() for the synchronous
23278 * version of this method.
23285 * g_dbus_proxy_call_finish:
23286 * @proxy: A #GDBusProxy.
23287 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call().
23288 * @error: Return location for error or %NULL.
23290 * Finishes an operation started with g_dbus_proxy_call().
23292 * return values. Free with g_variant_unref().
23294 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
23300 * g_dbus_proxy_call_sync:
23301 * @proxy: A #GDBusProxy.
23302 * @method_name: Name of method to invoke.
23303 * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
23304 * @flags: Flags from the #GDBusCallFlags enumeration.
23305 * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
23306 * @cancellable: A #GCancellable or %NULL.
23307 * @error: Return location for error or %NULL.
23309 * Synchronously invokes the @method_name method on @proxy.
23311 * If @method_name contains any dots, then @name is split into interface and
23312 * method name parts. This allows using @proxy for invoking methods on
23313 * other interfaces.
23315 * If the #GDBusConnection associated with @proxy is disconnected then
23316 * the operation will fail with %G_IO_ERROR_CLOSED. If
23317 * @cancellable is canceled, the operation will fail with
23318 * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
23319 * compatible with the D-Bus protocol, the operation fails with
23320 * %G_IO_ERROR_INVALID_ARGUMENT.
23322 * If the @parameters #GVariant is floating, it is consumed. This allows
23323 * convenient 'inline' use of g_variant_new(), e.g.:
23325 * g_dbus_proxy_call_sync (proxy,
23327 * g_variant_new ("(ss)",
23330 * G_DBUS_CALL_FLAGS_NONE,
23336 * The calling thread is blocked until a reply is received. See
23337 * g_dbus_proxy_call() for the asynchronous version of this
23340 * If @proxy has an expected interface (see
23341 * #GDBusProxy:g-interface-info) and @method_name is referenced by it,
23342 * then the return value is checked against the return type.
23344 * return values. Free with g_variant_unref().
23346 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
23352 * g_dbus_proxy_call_with_unix_fd_list:
23353 * @proxy: A #GDBusProxy.
23354 * @method_name: Name of method to invoke.
23355 * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
23356 * @flags: Flags from the #GDBusCallFlags enumeration.
23357 * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
23358 * @fd_list: (allow-none): A #GUnixFDList or %NULL.
23359 * @cancellable: A #GCancellable or %NULL.
23360 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
23361 * @user_data: The data to pass to @callback.
23363 * Like g_dbus_proxy_call() but also takes a #GUnixFDList object.
23365 * This method is only available on UNIX.
23372 * g_dbus_proxy_call_with_unix_fd_list_finish:
23373 * @proxy: A #GDBusProxy.
23374 * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
23375 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call_with_unix_fd_list().
23376 * @error: Return location for error or %NULL.
23378 * Finishes an operation started with g_dbus_proxy_call_with_unix_fd_list().
23380 * return values. Free with g_variant_unref().
23382 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
23388 * g_dbus_proxy_call_with_unix_fd_list_sync:
23389 * @proxy: A #GDBusProxy.
23390 * @method_name: Name of method to invoke.
23391 * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
23392 * @flags: Flags from the #GDBusCallFlags enumeration.
23393 * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
23394 * @fd_list: (allow-none): A #GUnixFDList or %NULL.
23395 * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
23396 * @cancellable: A #GCancellable or %NULL.
23397 * @error: Return location for error or %NULL.
23399 * Like g_dbus_proxy_call_sync() but also takes and returns #GUnixFDList objects.
23401 * This method is only available on UNIX.
23403 * return values. Free with g_variant_unref().
23405 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
23411 * g_dbus_proxy_get_cached_property:
23412 * @proxy: A #GDBusProxy.
23413 * @property_name: Property name.
23415 * Looks up the value for a property from the cache. This call does no
23418 * If @proxy has an expected interface (see
23419 * #GDBusProxy:g-interface-info) and @property_name is referenced by
23420 * it, then @value is checked against the type of the property.
23422 * for @property_name or %NULL if the value is not in the cache. The
23423 * returned reference must be freed with g_variant_unref().
23425 * Returns: A reference to the #GVariant instance that holds the value
23431 * g_dbus_proxy_get_cached_property_names:
23432 * @proxy: A #GDBusProxy.
23434 * Gets the names of all cached properties on @proxy.
23436 * @proxy has no cached properties. Free the returned array with
23439 * Returns: (transfer full): A %NULL-terminated array of strings or %NULL if
23445 * g_dbus_proxy_get_connection:
23446 * @proxy: A #GDBusProxy.
23448 * Gets the connection @proxy is for.
23450 * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free.
23456 * g_dbus_proxy_get_default_timeout:
23457 * @proxy: A #GDBusProxy.
23459 * Gets the timeout to use if -1 (specifying default timeout) is
23460 * passed as @timeout_msec in the g_dbus_proxy_call() and
23461 * g_dbus_proxy_call_sync() functions.
23463 * See the #GDBusProxy:g-default-timeout property for more details.
23465 * Returns: Timeout to use for @proxy.
23471 * g_dbus_proxy_get_flags:
23472 * @proxy: A #GDBusProxy.
23474 * Gets the flags that @proxy was constructed with.
23476 * Returns: Flags from the #GDBusProxyFlags enumeration.
23482 * g_dbus_proxy_get_interface_info:
23483 * @proxy: A #GDBusProxy
23485 * Returns the #GDBusInterfaceInfo, if any, specifying the interface
23486 * that @proxy conforms to. See the #GDBusProxy:g-interface-info
23487 * property for more details.
23489 * object, it is owned by @proxy.
23491 * Returns: A #GDBusInterfaceInfo or %NULL. Do not unref the returned
23497 * g_dbus_proxy_get_interface_name:
23498 * @proxy: A #GDBusProxy.
23500 * Gets the D-Bus interface name @proxy is for.
23502 * Returns: A string owned by @proxy. Do not free.
23508 * g_dbus_proxy_get_name:
23509 * @proxy: A #GDBusProxy.
23511 * Gets the name that @proxy was constructed for.
23513 * Returns: A string owned by @proxy. Do not free.
23519 * g_dbus_proxy_get_name_owner:
23520 * @proxy: A #GDBusProxy.
23522 * The unique name that owns the name that @proxy is for or %NULL if
23523 * no-one currently owns that name. You may connect to the
23524 * #GObject::notify signal to track changes to the
23525 * #GDBusProxy:g-name-owner property.
23527 * Returns: The name owner or %NULL if no name owner exists. Free with g_free().
23533 * g_dbus_proxy_get_object_path:
23534 * @proxy: A #GDBusProxy.
23536 * Gets the object path @proxy is for.
23538 * Returns: A string owned by @proxy. Do not free.
23544 * g_dbus_proxy_new:
23545 * @connection: A #GDBusConnection.
23546 * @flags: Flags used when constructing the proxy.
23547 * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
23548 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
23549 * @object_path: An object path.
23550 * @interface_name: A D-Bus interface name.
23551 * @cancellable: A #GCancellable or %NULL.
23552 * @callback: Callback function to invoke when the proxy is ready.
23553 * @user_data: User data to pass to @callback.
23555 * Creates a proxy for accessing @interface_name on the remote object
23556 * at @object_path owned by @name at @connection and asynchronously
23557 * loads D-Bus properties unless the
23558 * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to
23559 * the #GDBusProxy::g-properties-changed signal to get notified about
23560 * property changes.
23562 * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
23563 * match rules for signals. Connect to the #GDBusProxy::g-signal signal
23564 * to handle signals from the remote object.
23566 * If @name is a well-known name and the
23567 * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
23568 * owner currently exists, the message bus will be requested to launch
23569 * a name owner for the name.
23571 * This is a failable asynchronous constructor - when the proxy is
23572 * ready, @callback will be invoked and you can use
23573 * g_dbus_proxy_new_finish() to get the result.
23575 * See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.
23577 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
23584 * g_dbus_proxy_new_finish:
23585 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new().
23586 * @error: Return location for error or %NULL.
23588 * Finishes creating a #GDBusProxy.
23590 * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
23596 * g_dbus_proxy_new_for_bus:
23597 * @bus_type: A #GBusType.
23598 * @flags: Flags used when constructing the proxy.
23599 * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
23600 * @name: A bus name (well-known or unique).
23601 * @object_path: An object path.
23602 * @interface_name: A D-Bus interface name.
23603 * @cancellable: A #GCancellable or %NULL.
23604 * @callback: Callback function to invoke when the proxy is ready.
23605 * @user_data: User data to pass to @callback.
23607 * Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
23609 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
23616 * g_dbus_proxy_new_for_bus_finish:
23617 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus().
23618 * @error: Return location for error or %NULL.
23620 * Finishes creating a #GDBusProxy.
23622 * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
23628 * g_dbus_proxy_new_for_bus_sync:
23629 * @bus_type: A #GBusType.
23630 * @flags: Flags used when constructing the proxy.
23631 * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
23632 * @name: A bus name (well-known or unique).
23633 * @object_path: An object path.
23634 * @interface_name: A D-Bus interface name.
23635 * @cancellable: A #GCancellable or %NULL.
23636 * @error: Return location for error or %NULL.
23638 * Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
23640 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
23642 * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
23648 * g_dbus_proxy_new_sync:
23649 * @connection: A #GDBusConnection.
23650 * @flags: Flags used when constructing the proxy.
23651 * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
23652 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
23653 * @object_path: An object path.
23654 * @interface_name: A D-Bus interface name.
23655 * @cancellable: (allow-none): A #GCancellable or %NULL.
23656 * @error: (allow-none): Return location for error or %NULL.
23658 * Creates a proxy for accessing @interface_name on the remote object
23659 * at @object_path owned by @name at @connection and synchronously
23660 * loads D-Bus properties unless the
23661 * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.
23663 * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
23664 * match rules for signals. Connect to the #GDBusProxy::g-signal signal
23665 * to handle signals from the remote object.
23667 * If @name is a well-known name and the
23668 * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
23669 * owner currently exists, the message bus will be requested to launch
23670 * a name owner for the name.
23672 * This is a synchronous failable constructor. See g_dbus_proxy_new()
23673 * and g_dbus_proxy_new_finish() for the asynchronous version.
23675 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
23677 * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
23683 * g_dbus_proxy_set_cached_property:
23684 * @proxy: A #GDBusProxy
23685 * @property_name: Property name.
23686 * @value: (allow-none): Value for the property or %NULL to remove it from the cache.
23688 * If @value is not %NULL, sets the cached value for the property with
23689 * name @property_name to the value in @value.
23691 * If @value is %NULL, then the cached value is removed from the
23694 * If @proxy has an expected interface (see
23695 * #GDBusProxy:g-interface-info) and @property_name is referenced by
23696 * it, then @value is checked against the type of the property.
23698 * If the @value #GVariant is floating, it is consumed. This allows
23699 * convenient 'inline' use of g_variant_new(), e.g.
23701 * g_dbus_proxy_set_cached_property (proxy,
23703 * g_variant_new ("(si)",
23708 * Normally you will not need to use this method since @proxy is
23709 * tracking changes using the
23710 * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
23711 * D-Bus signal. However, for performance reasons an object may decide
23712 * to not use this signal for some properties and instead use a
23713 * proprietary out-of-band mechanism to transmit changes.
23715 * As a concrete example, consider an object with a property
23716 * <literal>ChatroomParticipants</literal> which is an array of
23717 * strings. Instead of transmitting the same (long) array every time
23718 * the property changes, it is more efficient to only transmit the
23719 * delta using e.g. signals <literal>ChatroomParticipantJoined(String
23720 * name)</literal> and <literal>ChatroomParticipantParted(String
23728 * g_dbus_proxy_set_default_timeout:
23729 * @proxy: A #GDBusProxy.
23730 * @timeout_msec: Timeout in milliseconds.
23732 * Sets the timeout to use if -1 (specifying default timeout) is
23733 * passed as @timeout_msec in the g_dbus_proxy_call() and
23734 * g_dbus_proxy_call_sync() functions.
23736 * See the #GDBusProxy:g-default-timeout property for more details.
23743 * g_dbus_proxy_set_interface_info:
23744 * @proxy: A #GDBusProxy
23745 * @info: (allow-none): Minimum interface this proxy conforms to or %NULL to unset.
23747 * Ensure that interactions with @proxy conform to the given
23748 * interface. See the #GDBusProxy:g-interface-info property for more
23756 * g_dbus_server_get_client_address:
23757 * @server: A #GDBusServer.
23759 * Gets a D-Bus address string that can be used by clients to connect
23764 * Returns: A D-Bus address string. Do not free, the string is owned
23770 * g_dbus_server_get_flags:
23771 * @server: A #GDBusServer.
23773 * Gets the flags for @server.
23775 * Returns: A set of flags from the #GDBusServerFlags enumeration.
23781 * g_dbus_server_get_guid:
23782 * @server: A #GDBusServer.
23784 * Gets the GUID for @server.
23786 * Returns: A D-Bus GUID. Do not free this string, it is owned by @server.
23792 * g_dbus_server_is_active:
23793 * @server: A #GDBusServer.
23795 * Gets whether @server is active.
23797 * Returns: %TRUE if server is active, %FALSE otherwise.
23803 * g_dbus_server_new_sync:
23804 * @address: A D-Bus address.
23805 * @flags: Flags from the #GDBusServerFlags enumeration.
23806 * @guid: A D-Bus GUID.
23807 * @observer: (allow-none): A #GDBusAuthObserver or %NULL.
23808 * @cancellable: A #GCancellable or %NULL.
23809 * @error: Return location for server or %NULL.
23811 * Creates a new D-Bus server that listens on the first address in
23812 * @address that works.
23814 * Once constructed, you can use g_dbus_server_get_client_address() to
23815 * get a D-Bus address string that clients can use to connect.
23817 * Connect to the #GDBusServer::new-connection signal to handle
23818 * incoming connections.
23820 * The returned #GDBusServer isn't active - you have to start it with
23821 * g_dbus_server_start().
23823 * See <xref linkend="gdbus-peer-to-peer"/> for how #GDBusServer can
23826 * This is a synchronous failable constructor. See
23827 * g_dbus_server_new() for the asynchronous version.
23829 * g_object_unref().
23831 * Returns: A #GDBusServer or %NULL if @error is set. Free with
23837 * g_dbus_server_start:
23838 * @server: A #GDBusServer.
23847 * g_dbus_server_stop:
23848 * @server: A #GDBusServer.
23857 * g_dbus_signal_info_ref:
23858 * @info: A #GDBusSignalInfo
23860 * If @info is statically allocated does nothing. Otherwise increases
23861 * the reference count.
23863 * Returns: The same @info.
23869 * g_dbus_signal_info_unref:
23870 * @info: A #GDBusSignalInfo.
23872 * If @info is statically allocated, does nothing. Otherwise decreases
23873 * the reference count of @info. When its reference count drops to 0,
23874 * the memory used is freed.
23881 * g_desktop_app_info_get_categories:
23882 * @info: a #GDesktopAppInfo
23884 * Gets the categories from the desktop file.
23886 * i.e. no attempt is made to split it by ';' or validate it.
23888 * Returns: The unparsed Categories key from the desktop file;
23893 * g_desktop_app_info_get_filename:
23894 * @info: a #GDesktopAppInfo
23896 * When @info was created from a known filename, return it. In some
23897 * situations such as the #GDesktopAppInfo returned from
23898 * g_desktop_app_info_new_from_keyfile(), this function will return %NULL.
23900 * Returns: The full path to the file for @info, or %NULL if not known.
23906 * g_desktop_app_info_get_generic_name:
23907 * @info: a #GDesktopAppInfo
23909 * Gets the generic name from the destkop file.
23911 * Returns: The value of the GenericName key
23916 * g_desktop_app_info_get_is_hidden:
23917 * @info: a #GDesktopAppInfo.
23919 * A desktop file is hidden if the Hidden key in it is
23922 * Returns: %TRUE if hidden, %FALSE otherwise.
23927 * g_desktop_app_info_get_keywords:
23928 * @info: a #GDesktopAppInfo
23930 * Gets the keywords from the desktop file.
23932 * Returns: (transfer none): The value of the Keywords key
23938 * g_desktop_app_info_get_nodisplay:
23939 * @info: a #GDesktopAppInfo
23941 * Gets the value of the NoDisplay key, which helps determine if the
23942 * application info should be shown in menus. See
23943 * #G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show().
23945 * Returns: The value of the NoDisplay key
23951 * g_desktop_app_info_get_show_in:
23952 * @info: a #GDesktopAppInfo
23953 * @desktop_env: a string specifying a desktop name
23955 * Checks if the application info should be shown in menus that list available
23956 * applications for a specific name of the desktop, based on the
23957 * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal> keys.
23959 * If @desktop_env is %NULL, then the name of the desktop set with
23960 * g_desktop_app_info_set_desktop_env() is used.
23962 * Note that g_app_info_should_show() for @info will include this check (with
23963 * %NULL for @desktop_env) as well as additional checks.
23965 * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal> keys, %FALSE
23968 * Returns: %TRUE if the @info should be shown in @desktop_env according to the
23974 * g_desktop_app_info_launch_uris_as_manager:
23975 * @appinfo: a #GDesktopAppInfo
23976 * @uris: (element-type utf8): List of URIs
23977 * @launch_context: a #GAppLaunchContext
23978 * @spawn_flags: #GSpawnFlags, used for each process
23979 * @user_setup: (scope call): a #GSpawnChildSetupFunc, used once for each process.
23980 * @user_setup_data: (closure user_setup): User data for @user_setup
23981 * @pid_callback: (scope call): Callback for child processes
23982 * @pid_callback_data: (closure pid_callback): User data for @callback
23983 * @error: return location for a #GError, or %NULL
23985 * This function performs the equivalent of g_app_info_launch_uris(),
23986 * but is intended primarily for operating system components that
23987 * launch applications. Ordinary applications should use
23988 * g_app_info_launch_uris().
23990 * In contrast to g_app_info_launch_uris(), all processes created will
23991 * always be run directly as children as if by the UNIX fork()/exec()
23994 * This guarantee allows additional control over the exact environment
23995 * of the child processes, which is provided via a setup function
23996 * @user_setup, as well as the process identifier of each child process
23997 * via @pid_callback. See g_spawn_async() for more information about the
23998 * semantics of the @user_setup function.
24000 * Returns: %TRUE on successful launch, %FALSE otherwise.
24005 * g_desktop_app_info_lookup_get_default_for_uri_scheme:
24006 * @lookup: a #GDesktopAppInfoLookup
24007 * @uri_scheme: a string containing a URI scheme.
24009 * Gets the default application for launching applications
24010 * using this URI scheme for a particular GDesktopAppInfoLookup
24013 * The GDesktopAppInfoLookup interface and this function is used
24014 * to implement g_app_info_get_default_for_uri_scheme() backends
24015 * in a GIO module. There is no reason for applications to use it
24016 * directly. Applications should use g_app_info_get_default_for_uri_scheme().
24018 * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
24019 * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
24024 * g_desktop_app_info_new:
24025 * @desktop_id: the desktop file id
24027 * Creates a new #GDesktopAppInfo based on a desktop file id.
24029 * A desktop file id is the basename of the desktop file, including the
24030 * .desktop extension. GIO is looking for a desktop file with this name
24031 * in the <filename>applications</filename> subdirectories of the XDG data
24032 * directories (i.e. the directories specified in the
24033 * <envar>XDG_DATA_HOME</envar> and <envar>XDG_DATA_DIRS</envar> environment
24034 * variables). GIO also supports the prefix-to-subdirectory mapping that is
24035 * described in the <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Menu Spec</ulink>
24036 * (i.e. a desktop id of kde-foo.desktop will match
24037 * <filename>/usr/share/applications/kde/foo.desktop</filename>).
24039 * Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id
24044 * g_desktop_app_info_new_from_filename:
24045 * @filename: the path of a desktop file, in the GLib filename encoding
24047 * Creates a new #GDesktopAppInfo.
24049 * Returns: a new #GDesktopAppInfo or %NULL on error.
24054 * g_desktop_app_info_new_from_keyfile:
24055 * @key_file: an opened #GKeyFile
24057 * Creates a new #GDesktopAppInfo.
24059 * Returns: a new #GDesktopAppInfo or %NULL on error.
24065 * g_desktop_app_info_set_desktop_env:
24066 * @desktop_env: a string specifying what desktop this is
24068 * Sets the name of the desktop that the application is running in.
24069 * This is used by g_app_info_should_show() and
24070 * g_desktop_app_info_get_show_in() to evaluate the
24071 * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal>
24072 * desktop entry fields.
24074 * The <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Desktop
24075 * Menu specification</ulink> recognizes the following:
24077 * <member>GNOME</member>
24078 * <member>KDE</member>
24079 * <member>ROX</member>
24080 * <member>XFCE</member>
24081 * <member>LXDE</member>
24082 * <member>Unity</member>
24083 * <member>Old</member>
24086 * Should be called only once; subsequent calls are ignored.
24091 * g_drive_can_eject:
24092 * @drive: a #GDrive.
24094 * Checks if a drive can be ejected.
24096 * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise.
24101 * g_drive_can_poll_for_media:
24102 * @drive: a #GDrive.
24104 * Checks if a drive can be polled for media changes.
24106 * %FALSE otherwise.
24108 * Returns: %TRUE if the @drive can be polled for media changes,
24113 * g_drive_can_start:
24114 * @drive: a #GDrive.
24116 * Checks if a drive can be started.
24118 * Returns: %TRUE if the @drive can be started, %FALSE otherwise.
24124 * g_drive_can_start_degraded:
24125 * @drive: a #GDrive.
24127 * Checks if a drive can be started degraded.
24129 * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise.
24135 * g_drive_can_stop:
24136 * @drive: a #GDrive.
24138 * Checks if a drive can be stopped.
24140 * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise.
24147 * @drive: a #GDrive.
24148 * @flags: flags affecting the unmount if required for eject
24149 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24150 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24151 * @user_data: user data to pass to @callback
24153 * Asynchronously ejects a drive.
24155 * When the operation is finished, @callback will be called.
24156 * You can then call g_drive_eject_finish() to obtain the
24157 * result of the operation.
24159 * Deprecated: 2.22: Use g_drive_eject_with_operation() instead.
24164 * g_drive_eject_finish:
24165 * @drive: a #GDrive.
24166 * @result: a #GAsyncResult.
24167 * @error: a #GError, or %NULL
24169 * Finishes ejecting a drive.
24171 * %FALSE otherwise.
24173 * Returns: %TRUE if the drive has been ejected successfully,
24174 * Deprecated: 2.22: Use g_drive_eject_with_operation_finish() instead.
24179 * g_drive_eject_with_operation:
24180 * @drive: a #GDrive.
24181 * @flags: flags affecting the unmount if required for eject
24182 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24183 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24184 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24185 * @user_data: user data passed to @callback.
24187 * Ejects a drive. This is an asynchronous operation, and is
24188 * finished by calling g_drive_eject_with_operation_finish() with the @drive
24189 * and #GAsyncResult data returned in the @callback.
24196 * g_drive_eject_with_operation_finish:
24197 * @drive: a #GDrive.
24198 * @result: a #GAsyncResult.
24199 * @error: a #GError location to store the error occurring, or %NULL to ignore.
24201 * Finishes ejecting a drive. If any errors occurred during the operation,
24202 * @error will be set to contain the errors and %FALSE will be returned.
24204 * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise.
24210 * g_drive_enumerate_identifiers:
24211 * @drive: a #GDrive
24213 * Gets the kinds of identifiers that @drive has.
24214 * Use g_drive_get_identifer() to obtain the identifiers
24217 * array of strings containing kinds of identifiers. Use g_strfreev()
24220 * Returns: (transfer full) (array zero-terminated=1): a %NULL-terminated
24225 * g_drive_get_icon:
24226 * @drive: a #GDrive.
24228 * Gets the icon for @drive.
24230 * Free the returned object with g_object_unref().
24232 * Returns: (transfer full): #GIcon for the @drive.
24237 * g_drive_get_identifier:
24238 * @drive: a #GDrive
24239 * @kind: the kind of identifier to return
24241 * Gets the identifier of the given kind for @drive.
24243 * requested identfier, or %NULL if the #GDrive
24244 * doesn't have this kind of identifier.
24246 * Returns: a newly allocated string containing the
24251 * g_drive_get_name:
24252 * @drive: a #GDrive.
24254 * Gets the name of @drive.
24256 * string should be freed when no longer needed.
24258 * Returns: a string containing @drive's name. The returned
24263 * g_drive_get_sort_key:
24264 * @drive: A #GDrive.
24266 * Gets the sort key for @drive, if any.
24268 * Returns: Sorting key for @drive or %NULL if no such key is available.
24274 * g_drive_get_start_stop_type:
24275 * @drive: a #GDrive.
24277 * Gets a hint about how a drive can be started/stopped.
24279 * Returns: A value from the #GDriveStartStopType enumeration.
24285 * g_drive_get_volumes:
24286 * @drive: a #GDrive.
24288 * Get a list of mountable volumes for @drive.
24290 * The returned list should be freed with g_list_free(), after
24291 * its elements have been unreffed with g_object_unref().
24293 * Returns: (element-type GVolume) (transfer full): #GList containing any #GVolume objects on the given @drive.
24298 * g_drive_has_media:
24299 * @drive: a #GDrive.
24301 * Checks if the @drive has media. Note that the OS may not be polling
24302 * the drive for media changes; see g_drive_is_media_check_automatic()
24303 * for more details.
24305 * Returns: %TRUE if @drive has media, %FALSE otherwise.
24310 * g_drive_has_volumes:
24311 * @drive: a #GDrive.
24313 * Check if @drive has any mountable volumes.
24315 * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise.
24320 * g_drive_is_media_check_automatic:
24321 * @drive: a #GDrive.
24323 * Checks if @drive is capabable of automatically detecting media changes.
24325 * media changes, %FALSE otherwise.
24327 * Returns: %TRUE if the @drive is capabable of automatically detecting
24332 * g_drive_is_media_removable:
24333 * @drive: a #GDrive.
24335 * Checks if the @drive supports removable media.
24337 * Returns: %TRUE if @drive supports removable media, %FALSE otherwise.
24342 * g_drive_poll_for_media:
24343 * @drive: a #GDrive.
24344 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24345 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24346 * @user_data: user data to pass to @callback
24348 * Asynchronously polls @drive to see if media has been inserted or removed.
24350 * When the operation is finished, @callback will be called.
24351 * You can then call g_drive_poll_for_media_finish() to obtain the
24352 * result of the operation.
24357 * g_drive_poll_for_media_finish:
24358 * @drive: a #GDrive.
24359 * @result: a #GAsyncResult.
24360 * @error: a #GError, or %NULL
24362 * Finishes an operation started with g_drive_poll_for_media() on a drive.
24364 * %FALSE otherwise.
24366 * Returns: %TRUE if the drive has been poll_for_mediaed successfully,
24372 * @drive: a #GDrive.
24373 * @flags: flags affecting the start operation.
24374 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24375 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24376 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24377 * @user_data: user data to pass to @callback
24379 * Asynchronously starts a drive.
24381 * When the operation is finished, @callback will be called.
24382 * You can then call g_drive_start_finish() to obtain the
24383 * result of the operation.
24390 * g_drive_start_finish:
24391 * @drive: a #GDrive.
24392 * @result: a #GAsyncResult.
24393 * @error: a #GError, or %NULL
24395 * Finishes starting a drive.
24397 * %FALSE otherwise.
24399 * Returns: %TRUE if the drive has been started successfully,
24406 * @drive: a #GDrive.
24407 * @flags: flags affecting the unmount if required for stopping.
24408 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24409 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24410 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24411 * @user_data: user data to pass to @callback
24413 * Asynchronously stops a drive.
24415 * When the operation is finished, @callback will be called.
24416 * You can then call g_drive_stop_finish() to obtain the
24417 * result of the operation.
24424 * g_drive_stop_finish:
24425 * @drive: a #GDrive.
24426 * @result: a #GAsyncResult.
24427 * @error: a #GError, or %NULL
24429 * Finishes stopping a drive.
24431 * %FALSE otherwise.
24433 * Returns: %TRUE if the drive has been stopped successfully,
24439 * g_emblem_get_icon:
24440 * @emblem: a #GEmblem from which the icon should be extracted.
24442 * Gives back the icon from @emblem.
24444 * the emblem and should not be modified or freed.
24446 * Returns: (transfer none): a #GIcon. The returned object belongs to
24452 * g_emblem_get_origin:
24453 * @emblem: a #GEmblem
24455 * Gets the origin of the emblem.
24457 * Returns: (transfer none): the origin of the emblem
24464 * @icon: a GIcon containing the icon.
24466 * Creates a new emblem for @icon.
24468 * Returns: a new #GEmblem.
24474 * g_emblem_new_with_origin:
24475 * @icon: a GIcon containing the icon.
24476 * @origin: a GEmblemOrigin enum defining the emblem's origin
24478 * Creates a new emblem for @icon.
24480 * Returns: a new #GEmblem.
24486 * g_emblemed_icon_add_emblem:
24487 * @emblemed: a #GEmblemedIcon
24488 * @emblem: a #GEmblem
24490 * Adds @emblem to the #GList of #GEmblem <!-- -->s.
24497 * g_emblemed_icon_clear_emblems:
24498 * @emblemed: a #GEmblemedIcon
24500 * Removes all the emblems from @icon.
24507 * g_emblemed_icon_get_emblems:
24508 * @emblemed: a #GEmblemedIcon
24510 * Gets the list of emblems for the @icon.
24512 * #GEmblem <!-- -->s that is owned by @emblemed
24514 * Returns: (element-type Gio.Emblem) (transfer none): a #GList of
24520 * g_emblemed_icon_get_icon:
24521 * @emblemed: a #GEmblemedIcon
24523 * Gets the main icon for @emblemed.
24525 * Returns: (transfer none): a #GIcon that is owned by @emblemed
24531 * g_emblemed_icon_new:
24533 * @emblem: (allow-none): a #GEmblem, or %NULL
24535 * Creates a new emblemed icon for @icon with the emblem @emblem.
24537 * Returns: (transfer full) (type GEmblemedIcon): a new #GIcon
24543 * g_file_append_to:
24544 * @file: input #GFile.
24545 * @flags: a set of #GFileCreateFlags.
24546 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24547 * @error: a #GError, or %NULL
24549 * Gets an output stream for appending data to the file. If
24550 * the file doesn't already exist it is created.
24552 * By default files created are generally readable by everyone,
24553 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
24554 * will be made readable only to the current user, to the level that
24555 * is supported on the target filesystem.
24557 * If @cancellable is not %NULL, then the operation can be cancelled by
24558 * triggering the cancellable object from another thread. If the operation
24559 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24561 * Some file systems don't allow all file names, and may
24562 * return an %G_IO_ERROR_INVALID_FILENAME error.
24563 * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will be
24564 * returned. Other errors are possible too, and depend on what kind of
24565 * filesystem the file is on.
24567 * Free the returned object with g_object_unref().
24569 * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
24574 * g_file_append_to_async:
24575 * @file: input #GFile.
24576 * @flags: a set of #GFileCreateFlags.
24577 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
24578 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24579 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
24580 * @user_data: (closure): the data to pass to callback function
24582 * Asynchronously opens @file for appending.
24584 * For more details, see g_file_append_to() which is
24585 * the synchronous version of this call.
24587 * When the operation is finished, @callback will be called. You can then call
24588 * g_file_append_to_finish() to get the result of the operation.
24593 * g_file_append_to_finish:
24594 * @file: input #GFile.
24595 * @res: #GAsyncResult
24596 * @error: a #GError, or %NULL
24598 * Finishes an asynchronous file append operation started with
24599 * g_file_append_to_async().
24601 * Free the returned object with g_object_unref().
24603 * Returns: (transfer full): a valid #GFileOutputStream or %NULL on error.
24608 * g_file_attribute_info_list_add:
24609 * @list: a #GFileAttributeInfoList.
24610 * @name: the name of the attribute to add.
24611 * @type: the #GFileAttributeType for the attribute.
24612 * @flags: #GFileAttributeInfoFlags for the attribute.
24614 * Adds a new attribute with @name to the @list, setting
24615 * its @type and @flags.
24620 * g_file_attribute_info_list_dup:
24621 * @list: a #GFileAttributeInfoList to duplicate.
24623 * Makes a duplicate of a file attribute info list.
24625 * Returns: a copy of the given @list.
24630 * g_file_attribute_info_list_lookup:
24631 * @list: a #GFileAttributeInfoList.
24632 * @name: the name of the attribute to lookup.
24634 * Gets the file attribute with the name @name from @list.
24636 * attribute isn't found.
24638 * Returns: a #GFileAttributeInfo for the @name, or %NULL if an
24643 * g_file_attribute_info_list_new:
24645 * Creates a new file attribute info list.
24647 * Returns: a #GFileAttributeInfoList.
24652 * g_file_attribute_info_list_ref:
24653 * @list: a #GFileAttributeInfoList to reference.
24655 * References a file attribute info list.
24657 * Returns: #GFileAttributeInfoList or %NULL on error.
24662 * g_file_attribute_info_list_unref:
24663 * @list: The #GFileAttributeInfoList to unreference.
24665 * Removes a reference from the given @list. If the reference count
24666 * falls to zero, the @list is deleted.
24671 * g_file_attribute_matcher_enumerate_namespace:
24672 * @matcher: a #GFileAttributeMatcher.
24673 * @ns: a string containing a file attribute namespace.
24675 * Checks if the matcher will match all of the keys in a given namespace.
24676 * This will always return %TRUE if a wildcard character is in use (e.g. if
24677 * matcher was created with "standard::*" and @ns is "standard", or if matcher was created
24678 * using "*" and namespace is anything.)
24680 * TODO: this is awkwardly worded.
24682 * in the given @ns, %FALSE otherwise.
24684 * Returns: %TRUE if the matcher matches all of the entries
24689 * g_file_attribute_matcher_enumerate_next:
24690 * @matcher: a #GFileAttributeMatcher.
24692 * Gets the next matched attribute from a #GFileAttributeMatcher.
24694 * no more attribute exist.
24696 * Returns: a string containing the next attribute or %NULL if
24701 * g_file_attribute_matcher_matches:
24702 * @matcher: a #GFileAttributeMatcher.
24703 * @attribute: a file attribute key.
24705 * Checks if an attribute will be matched by an attribute matcher. If
24706 * the matcher was created with the "*" matching string, this function
24707 * will always return %TRUE.
24709 * Returns: %TRUE if @attribute matches @matcher. %FALSE otherwise.
24714 * g_file_attribute_matcher_matches_only:
24715 * @matcher: a #GFileAttributeMatcher.
24716 * @attribute: a file attribute key.
24718 * Checks if a attribute matcher only matches a given attribute. Always
24719 * returns %FALSE if "*" was used when creating the matcher.
24721 * Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise.
24726 * g_file_attribute_matcher_new:
24727 * @attributes: an attribute string to match.
24729 * Creates a new file attribute matcher, which matches attributes
24730 * against a given string. #GFileAttributeMatcher<!-- -->s are reference
24731 * counted structures, and are created with a reference count of 1. If
24732 * the number of references falls to 0, the #GFileAttributeMatcher is
24733 * automatically destroyed.
24735 * The @attribute string should be formatted with specific keys separated
24736 * from namespaces with a double colon. Several "namespace::key" strings may be
24737 * concatenated with a single comma (e.g. "standard::type,standard::is-hidden").
24738 * The wildcard "*" may be used to match all keys and namespaces, or
24739 * "namespace::*" will match all keys in a given namespace.
24741 * Examples of strings to use:
24743 * <title>File Attribute Matcher strings and results</title>
24744 * <tgroup cols='2' align='left'><thead>
24745 * <row><entry> Matcher String </entry><entry> Matches </entry></row></thead>
24747 * <row><entry>"*"</entry><entry>matches all attributes.</entry></row>
24748 * <row><entry>"standard::is-hidden"</entry><entry>matches only the key is-hidden in the standard namespace.</entry></row>
24749 * <row><entry>"standard::type,unix::*"</entry><entry>matches the type key in the standard namespace and
24750 * all keys in the unix namespace.</entry></row>
24751 * </tbody></tgroup>
24754 * Returns: a #GFileAttributeMatcher.
24759 * g_file_attribute_matcher_ref:
24760 * @matcher: a #GFileAttributeMatcher.
24762 * References a file attribute matcher.
24764 * Returns: a #GFileAttributeMatcher.
24769 * g_file_attribute_matcher_subtract:
24770 * @matcher: Matcher to subtract from
24771 * @subtract: The matcher to subtract
24773 * Subtracts all attributes of @subtract from @matcher and returns
24774 * a matcher that supports those attributes.
24776 * Note that currently it is not possible to remove a single
24777 * attribute when the @matcher matches the whole namespace - or remove
24778 * a namespace or attribute when the matcher matches everything. This
24779 * is a limitation of the current implementation, but may be fixed
24782 * @matcher that are not matched by @subtract
24784 * Returns: A file attribute matcher matching all attributes of
24789 * g_file_attribute_matcher_to_string:
24790 * @matcher: (allow-none): a #GFileAttributeMatcher.
24792 * Prints what the matcher is matching against. The format will be
24793 * equal to the format passed to g_file_attribute_matcher_new().
24794 * The output however, might not be identical, as the matcher may
24795 * decide to use a different order or omit needless parts.
24797 * against or %NULL if @matcher was %NULL.
24799 * Returns: a string describing the attributes the matcher matches
24805 * g_file_attribute_matcher_unref:
24806 * @matcher: a #GFileAttributeMatcher.
24808 * Unreferences @matcher. If the reference count falls below 1,
24809 * the @matcher is automatically freed.
24815 * @source: input #GFile.
24816 * @destination: destination #GFile
24817 * @flags: set of #GFileCopyFlags
24818 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
24819 * @progress_callback: (allow-none) (scope call): function to callback with progress information, or %NULL if progress information is not needed
24820 * @progress_callback_data: (closure): user data to pass to @progress_callback
24821 * @error: #GError to set on error, or %NULL
24823 * Copies the file @source to the location specified by @destination.
24824 * Can not handle recursive copies of directories.
24826 * If the flag #G_FILE_COPY_OVERWRITE is specified an already
24827 * existing @destination file is overwritten.
24829 * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
24830 * will be copied as symlinks, otherwise the target of the
24831 * @source symlink will be copied.
24833 * If @cancellable is not %NULL, then the operation can be cancelled by
24834 * triggering the cancellable object from another thread. If the operation
24835 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24837 * If @progress_callback is not %NULL, then the operation can be monitored by
24838 * setting this to a #GFileProgressCallback function. @progress_callback_data
24839 * will be passed to this function. It is guaranteed that this callback will
24840 * be called after all data has been transferred with the total number of bytes
24841 * copied during the operation.
24843 * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
24844 * error is returned, independent on the status of the @destination.
24846 * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
24847 * error G_IO_ERROR_EXISTS is returned.
24849 * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
24850 * error is returned. If trying to overwrite a directory with a directory the
24851 * G_IO_ERROR_WOULD_MERGE error is returned.
24853 * If the source is a directory and the target does not exist, or
24854 * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then the
24855 * G_IO_ERROR_WOULD_RECURSE error is returned.
24857 * If you are interested in copying the #GFile object itself (not the on-disk
24858 * file), see g_file_dup().
24860 * Returns: %TRUE on success, %FALSE otherwise.
24865 * g_file_copy_async: (skip)
24866 * @source: input #GFile.
24867 * @destination: destination #GFile
24868 * @flags: set of #GFileCopyFlags
24869 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
24870 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
24871 * @progress_callback: (allow-none): function to callback with progress information, or %NULL if progress information is not needed
24872 * @progress_callback_data: (closure): user data to pass to @progress_callback
24873 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
24874 * @user_data: the data to pass to callback function
24876 * Copies the file @source to the location specified by @destination
24877 * asynchronously. For details of the behaviour, see g_file_copy().
24879 * If @progress_callback is not %NULL, then that function that will be called
24880 * just like in g_file_copy(), however the callback will run in the main loop,
24881 * not in the thread that is doing the I/O operation.
24883 * When the operation is finished, @callback will be called. You can then call
24884 * g_file_copy_finish() to get the result of the operation.
24889 * g_file_copy_attributes:
24890 * @source: a #GFile with attributes.
24891 * @destination: a #GFile to copy attributes to.
24892 * @flags: a set of #GFileCopyFlags.
24893 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24894 * @error: a #GError, %NULL to ignore.
24896 * Copies the file attributes from @source to @destination.
24898 * Normally only a subset of the file attributes are copied,
24899 * those that are copies in a normal file copy operation
24900 * (which for instance does not include e.g. owner). However
24901 * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then
24902 * all the metadata that is possible to copy is copied. This
24903 * is useful when implementing move by copy + delete source.
24905 * Returns: %TRUE if the attributes were copied successfully, %FALSE otherwise.
24910 * g_file_copy_finish:
24911 * @file: input #GFile.
24912 * @res: a #GAsyncResult.
24913 * @error: a #GError, or %NULL
24915 * Finishes copying the file started with
24916 * g_file_copy_async().
24918 * Returns: a %TRUE on success, %FALSE on error.
24924 * @file: input #GFile.
24925 * @flags: a set of #GFileCreateFlags.
24926 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24927 * @error: a #GError, or %NULL
24929 * Creates a new file and returns an output stream for writing to it.
24930 * The file must not already exist.
24932 * By default files created are generally readable by everyone,
24933 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
24934 * will be made readable only to the current user, to the level that
24935 * is supported on the target filesystem.
24937 * If @cancellable is not %NULL, then the operation can be cancelled by
24938 * triggering the cancellable object from another thread. If the operation
24939 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24941 * If a file or directory with this name already exists the G_IO_ERROR_EXISTS
24942 * error will be returned.
24943 * Some file systems don't allow all file names, and may
24944 * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
24945 * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
24946 * Other errors are possible too, and depend on what kind of
24947 * filesystem the file is on.
24950 * Free the returned object with g_object_unref().
24952 * Returns: (transfer full): a #GFileOutputStream for the newly created file, or
24957 * g_file_create_async:
24958 * @file: input #GFile.
24959 * @flags: a set of #GFileCreateFlags.
24960 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
24961 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24962 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
24963 * @user_data: (closure): the data to pass to callback function
24965 * Asynchronously creates a new file and returns an output stream for writing to it.
24966 * The file must not already exist.
24968 * For more details, see g_file_create() which is
24969 * the synchronous version of this call.
24971 * When the operation is finished, @callback will be called. You can then call
24972 * g_file_create_finish() to get the result of the operation.
24977 * g_file_create_finish:
24978 * @file: input #GFile.
24979 * @res: a #GAsyncResult.
24980 * @error: a #GError, or %NULL
24982 * Finishes an asynchronous file create operation started with
24983 * g_file_create_async().
24985 * Free the returned object with g_object_unref().
24987 * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
24992 * g_file_create_readwrite:
24994 * @flags: a set of #GFileCreateFlags
24995 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
24996 * @error: return location for a #GError, or %NULL
24998 * Creates a new file and returns a stream for reading and writing to it.
24999 * The file must not already exist.
25001 * By default files created are generally readable by everyone,
25002 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
25003 * will be made readable only to the current user, to the level that
25004 * is supported on the target filesystem.
25006 * If @cancellable is not %NULL, then the operation can be cancelled by
25007 * triggering the cancellable object from another thread. If the operation
25008 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25010 * If a file or directory with this name already exists the %G_IO_ERROR_EXISTS
25011 * error will be returned. Some file systems don't allow all file names,
25012 * and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name
25013 * is too long, %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors
25014 * are possible too, and depend on what kind of filesystem the file is on.
25016 * Note that in many non-local file cases read and write streams are not
25017 * supported, so make sure you really need to do read and write streaming,
25018 * rather than just opening for reading or writing.
25020 * Free the returned object with g_object_unref().
25022 * Returns: (transfer full): a #GFileIOStream for the newly created file, or %NULL on error.
25028 * g_file_create_readwrite_async:
25029 * @file: input #GFile
25030 * @flags: a set of #GFileCreateFlags
25031 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
25032 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
25033 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25034 * @user_data: (closure): the data to pass to callback function
25036 * Asynchronously creates a new file and returns a stream for reading and
25037 * writing to it. The file must not already exist.
25039 * For more details, see g_file_create_readwrite() which is
25040 * the synchronous version of this call.
25042 * When the operation is finished, @callback will be called. You can then
25043 * call g_file_create_readwrite_finish() to get the result of the operation.
25050 * g_file_create_readwrite_finish:
25051 * @file: input #GFile
25052 * @res: a #GAsyncResult
25053 * @error: a #GError, or %NULL
25055 * Finishes an asynchronous file create operation started with
25056 * g_file_create_readwrite_async().
25058 * Free the returned object with g_object_unref().
25060 * Returns: (transfer full): a #GFileIOStream or %NULL on error.
25067 * @file: input #GFile.
25068 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25069 * @error: a #GError, or %NULL
25071 * Deletes a file. If the @file is a directory, it will only be deleted if it
25074 * If @cancellable is not %NULL, then the operation can be cancelled by
25075 * triggering the cancellable object from another thread. If the operation
25076 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25078 * Virtual: delete_file
25079 * Returns: %TRUE if the file was deleted. %FALSE otherwise.
25084 * g_file_descriptor_based_get_fd:
25085 * @fd_based: a #GFileDescriptorBased.
25087 * Gets the underlying file descriptor.
25089 * Returns: The file descriptor
25096 * @file: input #GFile.
25098 * Duplicates a #GFile handle. This operation does not duplicate
25099 * the actual file or directory represented by the #GFile; see
25100 * g_file_copy() if attempting to copy a file.
25102 * This call does no blocking i/o.
25104 * Returns: (transfer full): a new #GFile that is a duplicate of the given #GFile.
25109 * g_file_eject_mountable:
25110 * @file: input #GFile.
25111 * @flags: flags affecting the operation
25112 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25113 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
25114 * @user_data: (closure): the data to pass to callback function
25116 * Starts an asynchronous eject on a mountable.
25117 * When this operation has completed, @callback will be called with
25118 * @user_user data, and the operation can be finalized with
25119 * g_file_eject_mountable_finish().
25121 * If @cancellable is not %NULL, then the operation can be cancelled by
25122 * triggering the cancellable object from another thread. If the operation
25123 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25125 * Deprecated: 2.22: Use g_file_eject_mountable_with_operation() instead.
25130 * g_file_eject_mountable_finish:
25131 * @file: input #GFile.
25132 * @result: a #GAsyncResult.
25133 * @error: a #GError, or %NULL
25135 * Finishes an asynchronous eject operation started by
25136 * g_file_eject_mountable().
25140 * Returns: %TRUE if the @file was ejected successfully. %FALSE
25141 * Deprecated: 2.22: Use g_file_eject_mountable_with_operation_finish() instead.
25146 * g_file_eject_mountable_with_operation:
25147 * @file: input #GFile.
25148 * @flags: flags affecting the operation
25149 * @mount_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
25150 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25151 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
25152 * @user_data: (closure): the data to pass to callback function
25154 * Starts an asynchronous eject on a mountable.
25155 * When this operation has completed, @callback will be called with
25156 * @user_user data, and the operation can be finalized with
25157 * g_file_eject_mountable_with_operation_finish().
25159 * If @cancellable is not %NULL, then the operation can be cancelled by
25160 * triggering the cancellable object from another thread. If the operation
25161 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25168 * g_file_eject_mountable_with_operation_finish:
25169 * @file: input #GFile.
25170 * @result: a #GAsyncResult.
25171 * @error: a #GError, or %NULL
25173 * Finishes an asynchronous eject operation started by
25174 * g_file_eject_mountable_with_operation().
25178 * Returns: %TRUE if the @file was ejected successfully. %FALSE
25184 * g_file_enumerate_children:
25185 * @file: input #GFile.
25186 * @attributes: an attribute query string.
25187 * @flags: a set of #GFileQueryInfoFlags.
25188 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25189 * @error: #GError for error reporting.
25191 * Gets the requested information about the files in a directory. The result
25192 * is a #GFileEnumerator object that will give out #GFileInfo objects for
25193 * all the files in the directory.
25195 * The @attributes value is a string that specifies the file attributes that
25196 * should be gathered. It is not an error if it's not possible to read a particular
25197 * requested attribute from a file - it just won't be set. @attributes should
25198 * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
25199 * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
25200 * namespace. An example attribute query be "standard::*,owner::user".
25201 * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
25203 * If @cancellable is not %NULL, then the operation can be cancelled by
25204 * triggering the cancellable object from another thread. If the operation
25205 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25207 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
25208 * If the file is not a directory, the G_FILE_ERROR_NOTDIR error will be returned.
25209 * Other errors are possible too.
25211 * Free the returned object with g_object_unref().
25213 * Returns: (transfer full): A #GFileEnumerator if successful, %NULL on error.
25218 * g_file_enumerate_children_async:
25219 * @file: input #GFile.
25220 * @attributes: an attribute query string.
25221 * @flags: a set of #GFileQueryInfoFlags.
25222 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
25223 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25224 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25225 * @user_data: (closure): the data to pass to callback function
25227 * Asynchronously gets the requested information about the files in a directory. The result
25228 * is a #GFileEnumerator object that will give out #GFileInfo objects for
25229 * all the files in the directory.
25231 * For more details, see g_file_enumerate_children() which is
25232 * the synchronous version of this call.
25234 * When the operation is finished, @callback will be called. You can then call
25235 * g_file_enumerate_children_finish() to get the result of the operation.
25240 * g_file_enumerate_children_finish:
25241 * @file: input #GFile.
25242 * @res: a #GAsyncResult.
25243 * @error: a #GError.
25245 * Finishes an async enumerate children operation.
25246 * See g_file_enumerate_children_async().
25248 * Free the returned object with g_object_unref().
25250 * Returns: (transfer full): a #GFileEnumerator or %NULL if an error occurred.
25255 * g_file_enumerator_close:
25256 * @enumerator: a #GFileEnumerator.
25257 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25258 * @error: location to store the error occurring, or %NULL to ignore
25260 * Releases all resources used by this enumerator, making the
25261 * enumerator return %G_IO_ERROR_CLOSED on all calls.
25263 * This will be automatically called when the last reference
25264 * is dropped, but you might want to call this function to make
25265 * sure resources are released as early as possible.
25267 * Returns: #TRUE on success or #FALSE on error.
25272 * g_file_enumerator_close_async:
25273 * @enumerator: a #GFileEnumerator.
25274 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
25275 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25276 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25277 * @user_data: (closure): the data to pass to callback function
25279 * Asynchronously closes the file enumerator.
25281 * If @cancellable is not %NULL, then the operation can be cancelled by
25282 * triggering the cancellable object from another thread. If the operation
25283 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in
25284 * g_file_enumerator_close_finish().
25289 * g_file_enumerator_close_finish:
25290 * @enumerator: a #GFileEnumerator.
25291 * @result: a #GAsyncResult.
25292 * @error: a #GError location to store the error occurring, or %NULL to ignore.
25294 * Finishes closing a file enumerator, started from g_file_enumerator_close_async().
25296 * If the file enumerator was already closed when g_file_enumerator_close_async()
25297 * was called, then this function will report %G_IO_ERROR_CLOSED in @error, and
25298 * return %FALSE. If the file enumerator had pending operation when the close
25299 * operation was started, then this function will report %G_IO_ERROR_PENDING, and
25300 * return %FALSE. If @cancellable was not %NULL, then the operation may have been
25301 * cancelled by triggering the cancellable object from another thread. If the operation
25302 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
25305 * Returns: %TRUE if the close operation has finished successfully.
25310 * g_file_enumerator_get_container:
25311 * @enumerator: a #GFileEnumerator
25313 * Get the #GFile container which is being enumerated.
25315 * Returns: (transfer none): the #GFile which is being enumerated.
25321 * g_file_enumerator_has_pending:
25322 * @enumerator: a #GFileEnumerator.
25324 * Checks if the file enumerator has pending operations.
25326 * Returns: %TRUE if the @enumerator has pending operations.
25331 * g_file_enumerator_is_closed:
25332 * @enumerator: a #GFileEnumerator.
25334 * Checks if the file enumerator has been closed.
25336 * Returns: %TRUE if the @enumerator is closed.
25341 * g_file_enumerator_next_file:
25342 * @enumerator: a #GFileEnumerator.
25343 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25344 * @error: location to store the error occurring, or %NULL to ignore
25346 * Returns information for the next file in the enumerated object.
25347 * Will block until the information is available. The #GFileInfo
25348 * returned from this function will contain attributes that match the
25349 * attribute string that was passed when the #GFileEnumerator was created.
25351 * On error, returns %NULL and sets @error to the error. If the
25352 * enumerator is at the end, %NULL will be returned and @error will
25355 * Free the returned object with g_object_unref() when no longer needed.
25357 * Returns: (transfer full): A #GFileInfo or %NULL on error or end of enumerator.
25362 * g_file_enumerator_next_files_async:
25363 * @enumerator: a #GFileEnumerator.
25364 * @num_files: the number of file info objects to request
25365 * @io_priority: the <link linkend="gioscheduler">io priority</link> of the request.
25366 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25367 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25368 * @user_data: (closure): the data to pass to callback function
25370 * Request information for a number of files from the enumerator asynchronously.
25371 * When all i/o for the operation is finished the @callback will be called with
25372 * the requested information.
25374 * The callback can be called with less than @num_files files in case of error
25375 * or at the end of the enumerator. In case of a partial error the callback will
25376 * be called with any succeeding items and no error, and on the next request the
25377 * error will be reported. If a request is cancelled the callback will be called
25378 * with %G_IO_ERROR_CANCELLED.
25380 * During an async request no other sync and async calls are allowed, and will
25381 * result in %G_IO_ERROR_PENDING errors.
25383 * Any outstanding i/o request with higher priority (lower numerical value) will
25384 * be executed before an outstanding request with lower priority. Default
25385 * priority is %G_PRIORITY_DEFAULT.
25390 * g_file_enumerator_next_files_finish:
25391 * @enumerator: a #GFileEnumerator.
25392 * @result: a #GAsyncResult.
25393 * @error: a #GError location to store the error occurring, or %NULL to ignore.
25395 * Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
25397 * g_list_free() and unref the infos with g_object_unref() when you're
25400 * Returns: (transfer full) (element-type Gio.FileInfo): a #GList of #GFileInfo<!---->s. You must free the list with
25405 * g_file_enumerator_set_pending:
25406 * @enumerator: a #GFileEnumerator.
25407 * @pending: a boolean value.
25409 * Sets the file enumerator as having pending operations.
25415 * @file1: the first #GFile.
25416 * @file2: the second #GFile.
25418 * Checks equality of two given #GFile<!-- -->s. Note that two
25419 * #GFile<!-- -->s that differ can still refer to the same
25420 * file on the filesystem due to various forms of filename
25423 * This call does no blocking i/o.
25425 * %FALSE if either is not a #GFile.
25427 * Returns: %TRUE if @file1 and @file2 are equal.
25432 * g_file_find_enclosing_mount:
25433 * @file: input #GFile.
25434 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25435 * @error: a #GError.
25437 * Gets a #GMount for the #GFile.
25439 * If the #GFileIface for @file does not have a mount (e.g. possibly a
25440 * remote share), @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL
25441 * will be returned.
25443 * If @cancellable is not %NULL, then the operation can be cancelled by
25444 * triggering the cancellable object from another thread. If the operation
25445 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25447 * Free the returned object with g_object_unref().
25449 * Returns: (transfer full): a #GMount where the @file is located or %NULL on error.
25454 * g_file_find_enclosing_mount_async:
25456 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
25457 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25458 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25459 * @user_data: (closure): the data to pass to callback function
25461 * Asynchronously gets the mount for the file.
25463 * For more details, see g_file_find_enclosing_mount() which is
25464 * the synchronous version of this call.
25466 * When the operation is finished, @callback will be called. You can then call
25467 * g_file_find_enclosing_mount_finish() to get the result of the operation.
25472 * g_file_find_enclosing_mount_finish:
25474 * @res: a #GAsyncResult
25475 * @error: a #GError
25477 * Finishes an asynchronous find mount request.
25478 * See g_file_find_enclosing_mount_async().
25480 * Free the returned object with g_object_unref().
25482 * Returns: (transfer full): #GMount for given @file or %NULL on error.
25487 * g_file_get_basename:
25488 * @file: input #GFile.
25490 * Gets the base name (the last component of the path) for a given #GFile.
25492 * If called for the top level of a system (such as the filesystem root
25493 * or a uri like sftp://host/) it will return a single directory separator
25494 * (and on Windows, possibly a drive letter).
25496 * The base name is a byte string (*not* UTF-8). It has no defined encoding
25497 * or rules other than it may not contain zero bytes. If you want to use
25498 * filenames in a user interface you should use the display name that you
25499 * can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
25500 * attribute with g_file_query_info().
25502 * This call does no blocking i/o.
25504 * if given #GFile is invalid. The returned string should be
25505 * freed with g_free() when no longer needed.
25507 * Returns: string containing the #GFile's base name, or %NULL
25512 * g_file_get_child:
25513 * @file: input #GFile.
25514 * @name: string containing the child's basename.
25516 * Gets a child of @file with basename equal to @name.
25518 * Note that the file with that specific name might not exist, but
25519 * you can still have a #GFile that points to it. You can use this
25520 * for instance to create that file.
25522 * This call does no blocking i/o.
25524 * Free the returned object with g_object_unref().
25526 * Returns: (transfer full): a #GFile to a child specified by @name.
25531 * g_file_get_child_for_display_name:
25532 * @file: input #GFile.
25533 * @display_name: string to a possible child.
25536 * Gets the child of @file for a given @display_name (i.e. a UTF8
25537 * version of the name). If this function fails, it returns %NULL and @error will be
25538 * set. This is very useful when constructing a GFile for a new file
25539 * and the user entered the filename in the user interface, for instance
25540 * when you select a directory and type a filename in the file selector.
25542 * This call does no blocking i/o.
25544 * %NULL if the display name couldn't be converted.
25545 * Free the returned object with g_object_unref().
25547 * Returns: (transfer full): a #GFile to the specified child, or
25552 * g_file_get_parent:
25553 * @file: input #GFile.
25555 * Gets the parent directory for the @file.
25556 * If the @file represents the root directory of the
25557 * file system, then %NULL will be returned.
25559 * This call does no blocking i/o.
25561 * #GFile or %NULL if there is no parent.
25562 * Free the returned object with g_object_unref().
25564 * Returns: (transfer full): a #GFile structure to the parent of the given
25569 * g_file_get_parse_name:
25570 * @file: input #GFile.
25572 * Gets the parse name of the @file.
25573 * A parse name is a UTF-8 string that describes the
25574 * file such that one can get the #GFile back using
25575 * g_file_parse_name().
25577 * This is generally used to show the #GFile as a nice
25578 * full-pathname kind of string in a user interface,
25579 * like in a location entry.
25581 * For local files with names that can safely be converted
25582 * to UTF8 the pathname is used, otherwise the IRI is used
25583 * (a form of URI that allows UTF8 characters unescaped).
25585 * This call does no blocking i/o.
25587 * string should be freed with g_free() when no longer needed.
25589 * Returns: a string containing the #GFile's parse name. The returned
25595 * @file: input #GFile.
25597 * Gets the local pathname for #GFile, if one exists.
25599 * This call does no blocking i/o.
25601 * no such path exists. The returned string should be
25602 * freed with g_free() when no longer needed.
25604 * Returns: string containing the #GFile's path, or %NULL if
25609 * g_file_get_relative_path:
25610 * @parent: input #GFile.
25611 * @descendant: input #GFile.
25613 * Gets the path for @descendant relative to @parent.
25615 * This call does no blocking i/o.
25617 * to @parent, or %NULL if @descendant doesn't have @parent as prefix.
25618 * The returned string should be freed with g_free() when no longer needed.
25620 * Returns: string with the relative path from @descendant
25626 * @file: input #GFile.
25628 * Gets the URI for the @file.
25630 * This call does no blocking i/o.
25632 * The returned string should be freed with g_free() when no longer needed.
25634 * Returns: a string containing the #GFile's URI.
25639 * g_file_get_uri_scheme:
25640 * @file: input #GFile.
25642 * Gets the URI scheme for a #GFile.
25643 * RFC 3986 decodes the scheme as:
25645 * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
25646 * </programlisting>
25647 * Common schemes include "file", "http", "ftp", etc.
25649 * This call does no blocking i/o.
25651 * #GFile. The returned string should be freed with g_free()
25652 * when no longer needed.
25654 * Returns: a string containing the URI scheme for the given
25659 * g_file_has_parent:
25660 * @file: input #GFile
25661 * @parent: (allow-none): the parent to check for, or %NULL
25663 * Checks if @file has a parent, and optionally, if it is @parent.
25665 * If @parent is %NULL then this function returns %TRUE if @file has any
25666 * parent at all. If @parent is non-%NULL then %TRUE is only returned
25667 * if @file is a child of @parent.
25669 * case that @parent is %NULL).
25671 * Returns: %TRUE if @file is a child of @parent (or any parent in the
25677 * g_file_has_prefix:
25678 * @file: input #GFile.
25679 * @prefix: input #GFile.
25681 * Checks whether @file has the prefix specified by @prefix. In other word,
25682 * if the names of initial elements of @file<!-- -->s pathname match @prefix.
25683 * Only full pathname elements are matched, so a path like /foo is not
25684 * considered a prefix of /foobar, only of /foo/bar.
25686 * This call does no i/o, as it works purely on names. As such it can
25687 * sometimes return %FALSE even if @file is inside a @prefix (from a
25688 * filesystem point of view), because the prefix of @file is an alias
25691 * %FALSE otherwise.
25693 * Virtual: prefix_matches
25694 * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix.
25699 * g_file_has_uri_scheme:
25700 * @file: input #GFile.
25701 * @uri_scheme: a string containing a URI scheme.
25703 * Checks to see if a #GFile has a given URI scheme.
25705 * This call does no blocking i/o.
25707 * given URI scheme, %FALSE if URI scheme is %NULL,
25708 * not supported, or #GFile is invalid.
25710 * Returns: %TRUE if #GFile's backend supports the
25716 * @file: (type GFile): #gconstpointer to a #GFile.
25718 * Creates a hash value for a #GFile.
25720 * This call does no blocking i/o.
25722 * integer that can be used as hash value for the #GFile.
25723 * This function is intended for easily hashing a #GFile to
25724 * add to a #GHashTable or similar data structure.
25727 * Returns: 0 if @file is not a valid #GFile, otherwise an
25732 * g_file_icon_get_file:
25735 * Gets the #GFile associated with the given @icon.
25737 * Returns: (transfer none): a #GFile, or %NULL.
25745 * Creates a new icon for a file.
25747 * @file, or %NULL on error.
25749 * Returns: (transfer full) (type GFileIcon): a #GIcon for the given
25754 * g_file_info_clear_status:
25755 * @info: a #GFileInfo.
25757 * Clears the status information from @info.
25762 * g_file_info_copy_into:
25763 * @src_info: source to copy attributes from.
25764 * @dest_info: destination to copy attributes to.
25766 * Copies all of the #GFileAttribute<!-- -->s from @src_info to @dest_info.
25772 * @other: a #GFileInfo.
25774 * Duplicates a file info structure.
25776 * Returns: (transfer full): a duplicate #GFileInfo of @other.
25781 * g_file_info_get_attribute_as_string:
25782 * @info: a #GFileInfo.
25783 * @attribute: a file attribute key.
25785 * Gets the value of a attribute, formated as a string.
25786 * This escapes things as needed to make the string valid
25789 * When you're done with the string it must be freed with g_free().
25791 * Returns: a UTF-8 string associated with the given @attribute.
25796 * g_file_info_get_attribute_boolean:
25797 * @info: a #GFileInfo.
25798 * @attribute: a file attribute key.
25800 * Gets the value of a boolean attribute. If the attribute does not
25801 * contain a boolean value, %FALSE will be returned.
25803 * Returns: the boolean value contained within the attribute.
25808 * g_file_info_get_attribute_byte_string:
25809 * @info: a #GFileInfo.
25810 * @attribute: a file attribute key.
25812 * Gets the value of a byte string attribute. If the attribute does
25813 * not contain a byte string, %NULL will be returned.
25817 * Returns: the contents of the @attribute value as a byte string, or
25822 * g_file_info_get_attribute_data:
25823 * @info: a #GFileInfo
25824 * @attribute: a file attribute key
25825 * @type: (out) (allow-none): return location for the attribute type, or %NULL
25826 * @value_pp: (out) (allow-none): return location for the attribute value, or %NULL
25827 * @status: (out) (allow-none): return location for the attribute status, or %NULL
25829 * Gets the attribute type, value and status for an attribute key.
25831 * %FALSE otherwise.
25833 * Returns: (transfer none): %TRUE if @info has an attribute named @attribute,
25838 * g_file_info_get_attribute_int32:
25839 * @info: a #GFileInfo.
25840 * @attribute: a file attribute key.
25842 * Gets a signed 32-bit integer contained within the attribute. If the
25843 * attribute does not contain a signed 32-bit integer, or is invalid,
25844 * 0 will be returned.
25846 * Returns: a signed 32-bit integer from the attribute.
25851 * g_file_info_get_attribute_int64:
25852 * @info: a #GFileInfo.
25853 * @attribute: a file attribute key.
25855 * Gets a signed 64-bit integer contained within the attribute. If the
25856 * attribute does not contain an signed 64-bit integer, or is invalid,
25857 * 0 will be returned.
25859 * Returns: a signed 64-bit integer from the attribute.
25864 * g_file_info_get_attribute_object:
25865 * @info: a #GFileInfo.
25866 * @attribute: a file attribute key.
25868 * Gets the value of a #GObject attribute. If the attribute does
25869 * not contain a #GObject, %NULL will be returned.
25873 * Returns: (transfer none): a #GObject associated with the given @attribute, or
25878 * g_file_info_get_attribute_status:
25879 * @info: a #GFileInfo
25880 * @attribute: a file attribute key
25882 * Gets the attribute status for an attribute key.
25884 * %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.
25886 * Returns: a #GFileAttributeStatus for the given @attribute, or
25891 * g_file_info_get_attribute_string:
25892 * @info: a #GFileInfo.
25893 * @attribute: a file attribute key.
25895 * Gets the value of a string attribute. If the attribute does
25896 * not contain a string, %NULL will be returned.
25900 * Returns: the contents of the @attribute value as a UTF-8 string, or
25905 * g_file_info_get_attribute_stringv:
25906 * @info: a #GFileInfo.
25907 * @attribute: a file attribute key.
25909 * Gets the value of a stringv attribute. If the attribute does
25910 * not contain a stringv, %NULL will be returned.
25912 * %NULL otherwise. Do not free. These returned strings are UTF-8.
25914 * Returns: (transfer none): the contents of the @attribute value as a stringv, or
25920 * g_file_info_get_attribute_type:
25921 * @info: a #GFileInfo.
25922 * @attribute: a file attribute key.
25924 * Gets the attribute type for an attribute key.
25926 * %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.
25928 * Returns: a #GFileAttributeType for the given @attribute, or
25933 * g_file_info_get_attribute_uint32:
25934 * @info: a #GFileInfo.
25935 * @attribute: a file attribute key.
25937 * Gets an unsigned 32-bit integer contained within the attribute. If the
25938 * attribute does not contain an unsigned 32-bit integer, or is invalid,
25939 * 0 will be returned.
25941 * Returns: an unsigned 32-bit integer from the attribute.
25946 * g_file_info_get_attribute_uint64:
25947 * @info: a #GFileInfo.
25948 * @attribute: a file attribute key.
25950 * Gets a unsigned 64-bit integer contained within the attribute. If the
25951 * attribute does not contain an unsigned 64-bit integer, or is invalid,
25952 * 0 will be returned.
25954 * Returns: a unsigned 64-bit integer from the attribute.
25959 * g_file_info_get_content_type:
25960 * @info: a #GFileInfo.
25962 * Gets the file's content type.
25964 * Returns: a string containing the file's content type.
25969 * g_file_info_get_display_name:
25970 * @info: a #GFileInfo.
25972 * Gets a display name for a file.
25974 * Returns: a string containing the display name.
25979 * g_file_info_get_edit_name:
25980 * @info: a #GFileInfo.
25982 * Gets the edit name for a file.
25984 * Returns: a string containing the edit name.
25989 * g_file_info_get_etag:
25990 * @info: a #GFileInfo.
25992 * Gets the <link linkend="gfile-etag">entity tag</link> for a given
25993 * #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.
25995 * Returns: a string containing the value of the "etag:value" attribute.
26000 * g_file_info_get_file_type:
26001 * @info: a #GFileInfo.
26003 * Gets a file's type (whether it is a regular file, symlink, etc).
26004 * This is different from the file's content type, see g_file_info_get_content_type().
26006 * Returns: a #GFileType for the given file.
26011 * g_file_info_get_icon:
26012 * @info: a #GFileInfo.
26014 * Gets the icon for a file.
26016 * Returns: (transfer none): #GIcon for the given @info.
26021 * g_file_info_get_is_backup:
26022 * @info: a #GFileInfo.
26024 * Checks if a file is a backup file.
26026 * Returns: %TRUE if file is a backup file, %FALSE otherwise.
26031 * g_file_info_get_is_hidden:
26032 * @info: a #GFileInfo.
26034 * Checks if a file is hidden.
26036 * Returns: %TRUE if the file is a hidden file, %FALSE otherwise.
26041 * g_file_info_get_is_symlink:
26042 * @info: a #GFileInfo.
26044 * Checks if a file is a symlink.
26046 * Returns: %TRUE if the given @info is a symlink.
26051 * g_file_info_get_modification_time:
26052 * @info: a #GFileInfo.
26053 * @result: (out caller-allocates): a #GTimeVal.
26055 * Gets the modification time of the current @info and sets it
26061 * g_file_info_get_name:
26062 * @info: a #GFileInfo.
26064 * Gets the name for a file.
26066 * Returns: a string containing the file name.
26071 * g_file_info_get_size:
26072 * @info: a #GFileInfo.
26074 * Gets the file's size.
26076 * Returns: a #goffset containing the file's size.
26081 * g_file_info_get_sort_order:
26082 * @info: a #GFileInfo.
26084 * Gets the value of the sort_order attribute from the #GFileInfo.
26085 * See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
26087 * Returns: a #gint32 containing the value of the "standard::sort_order" attribute.
26092 * g_file_info_get_symlink_target:
26093 * @info: a #GFileInfo.
26095 * Gets the symlink target for a given #GFileInfo.
26097 * Returns: a string containing the symlink target.
26102 * g_file_info_has_attribute:
26103 * @info: a #GFileInfo.
26104 * @attribute: a file attribute key.
26106 * Checks if a file info structure has an attribute named @attribute.
26108 * %FALSE otherwise.
26110 * Returns: %TRUE if @Ginfo has an attribute named @attribute,
26115 * g_file_info_has_namespace:
26116 * @info: a #GFileInfo.
26117 * @name_space: a file attribute namespace.
26119 * Checks if a file info structure has an attribute in the
26120 * specified @name_space.
26122 * %FALSE otherwise.
26124 * Returns: %TRUE if @Ginfo has an attribute in @name_space,
26130 * g_file_info_list_attributes:
26131 * @info: a #GFileInfo.
26132 * @name_space: a file attribute key's namespace.
26134 * Lists the file info structure's attributes.
26136 * possible attribute types for the given @name_space, or
26139 * Returns: (array zero-terminated=1) (transfer full): a null-terminated array of strings of all of the
26146 * Creates a new file info structure.
26148 * Returns: a #GFileInfo.
26153 * g_file_info_remove_attribute:
26154 * @info: a #GFileInfo.
26155 * @attribute: a file attribute key.
26157 * Removes all cases of @attribute from @info if it exists.
26162 * g_file_info_set_attribute:
26163 * @info: a #GFileInfo.
26164 * @attribute: a file attribute key.
26165 * @type: a #GFileAttributeType
26166 * @value_p: pointer to the value
26168 * Sets the @attribute to contain the given value, if possible.
26173 * g_file_info_set_attribute_boolean:
26174 * @info: a #GFileInfo.
26175 * @attribute: a file attribute key.
26176 * @attr_value: a boolean value.
26178 * Sets the @attribute to contain the given @attr_value,
26184 * g_file_info_set_attribute_byte_string:
26185 * @info: a #GFileInfo.
26186 * @attribute: a file attribute key.
26187 * @attr_value: a byte string.
26189 * Sets the @attribute to contain the given @attr_value,
26195 * g_file_info_set_attribute_int32:
26196 * @info: a #GFileInfo.
26197 * @attribute: a file attribute key.
26198 * @attr_value: a signed 32-bit integer
26200 * Sets the @attribute to contain the given @attr_value,
26206 * g_file_info_set_attribute_int64:
26207 * @info: a #GFileInfo.
26208 * @attribute: attribute name to set.
26209 * @attr_value: int64 value to set attribute to.
26211 * Sets the @attribute to contain the given @attr_value,
26217 * g_file_info_set_attribute_mask:
26218 * @info: a #GFileInfo.
26219 * @mask: a #GFileAttributeMatcher.
26221 * Sets @mask on @info to match specific attribute types.
26226 * g_file_info_set_attribute_object:
26227 * @info: a #GFileInfo.
26228 * @attribute: a file attribute key.
26229 * @attr_value: a #GObject.
26231 * Sets the @attribute to contain the given @attr_value,
26237 * g_file_info_set_attribute_status:
26238 * @info: a #GFileInfo
26239 * @attribute: a file attribute key
26240 * @status: a #GFileAttributeStatus
26242 * Sets the attribute status for an attribute key. This is only
26243 * needed by external code that implement g_file_set_attributes_from_info()
26244 * or similar functions.
26246 * The attribute must exist in @info for this to work. Otherwise %FALSE
26247 * is returned and @info is unchanged.
26249 * Returns: %TRUE if the status was changed, %FALSE if the key was not set.
26255 * g_file_info_set_attribute_string:
26256 * @info: a #GFileInfo.
26257 * @attribute: a file attribute key.
26258 * @attr_value: a UTF-8 string.
26260 * Sets the @attribute to contain the given @attr_value,
26266 * g_file_info_set_attribute_stringv:
26267 * @info: a #GFileInfo.
26268 * @attribute: a file attribute key
26269 * @attr_value: (array) (element-type utf8): a %NULL terminated array of UTF-8 strings.
26271 * Sets the @attribute to contain the given @attr_value,
26279 * g_file_info_set_attribute_uint32:
26280 * @info: a #GFileInfo.
26281 * @attribute: a file attribute key.
26282 * @attr_value: an unsigned 32-bit integer.
26284 * Sets the @attribute to contain the given @attr_value,
26290 * g_file_info_set_attribute_uint64:
26291 * @info: a #GFileInfo.
26292 * @attribute: a file attribute key.
26293 * @attr_value: an unsigned 64-bit integer.
26295 * Sets the @attribute to contain the given @attr_value,
26301 * g_file_info_set_content_type:
26302 * @info: a #GFileInfo.
26303 * @content_type: a content type. See <link linkend="gio-GContentType">GContentType</link>.
26305 * Sets the content type attribute for a given #GFileInfo.
26306 * See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
26311 * g_file_info_set_display_name:
26312 * @info: a #GFileInfo.
26313 * @display_name: a string containing a display name.
26315 * Sets the display name for the current #GFileInfo.
26316 * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
26321 * g_file_info_set_edit_name:
26322 * @info: a #GFileInfo.
26323 * @edit_name: a string containing an edit name.
26325 * Sets the edit name for the current file.
26326 * See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
26331 * g_file_info_set_file_type:
26332 * @info: a #GFileInfo.
26333 * @type: a #GFileType.
26335 * Sets the file type in a #GFileInfo to @type.
26336 * See %G_FILE_ATTRIBUTE_STANDARD_TYPE.
26341 * g_file_info_set_icon:
26342 * @info: a #GFileInfo.
26345 * Sets the icon for a given #GFileInfo.
26346 * See %G_FILE_ATTRIBUTE_STANDARD_ICON.
26351 * g_file_info_set_is_hidden:
26352 * @info: a #GFileInfo.
26353 * @is_hidden: a #gboolean.
26355 * Sets the "is_hidden" attribute in a #GFileInfo according to @is_symlink.
26356 * See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
26361 * g_file_info_set_is_symlink:
26362 * @info: a #GFileInfo.
26363 * @is_symlink: a #gboolean.
26365 * Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
26366 * See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
26371 * g_file_info_set_modification_time:
26372 * @info: a #GFileInfo.
26373 * @mtime: a #GTimeVal.
26375 * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
26376 * info to the given time value.
26381 * g_file_info_set_name:
26382 * @info: a #GFileInfo.
26383 * @name: a string containing a name.
26385 * Sets the name attribute for the current #GFileInfo.
26386 * See %G_FILE_ATTRIBUTE_STANDARD_NAME.
26391 * g_file_info_set_size:
26392 * @info: a #GFileInfo.
26393 * @size: a #goffset containing the file's size.
26395 * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
26396 * to the given size.
26401 * g_file_info_set_sort_order:
26402 * @info: a #GFileInfo.
26403 * @sort_order: a sort order integer.
26405 * Sets the sort order attribute in the file info structure. See
26406 * %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
26411 * g_file_info_set_symlink_target:
26412 * @info: a #GFileInfo.
26413 * @symlink_target: a static string containing a path to a symlink target.
26415 * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
26416 * to the given symlink target.
26421 * g_file_info_unset_attribute_mask:
26422 * @info: #GFileInfo.
26424 * Unsets a mask set by g_file_info_set_attribute_mask(), if one
26430 * g_file_input_stream_query_info:
26431 * @stream: a #GFileInputStream.
26432 * @attributes: a file attribute query string.
26433 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26434 * @error: a #GError location to store the error occurring, or %NULL to ignore.
26436 * Queries a file input stream the given @attributes. This function blocks
26437 * while querying the stream. For the asynchronous (non-blocking) version
26438 * of this function, see g_file_input_stream_query_info_async(). While the
26439 * stream is blocked, the stream will set the pending flag internally, and
26440 * any other operations on the stream will fail with %G_IO_ERROR_PENDING.
26442 * Returns: (transfer full): a #GFileInfo, or %NULL on error.
26447 * g_file_input_stream_query_info_async:
26448 * @stream: a #GFileInputStream.
26449 * @attributes: a file attribute query string.
26450 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
26451 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26452 * @callback: (scope async): callback to call when the request is satisfied
26453 * @user_data: (closure): the data to pass to callback function
26455 * Queries the stream information asynchronously.
26456 * When the operation is finished @callback will be called.
26457 * You can then call g_file_input_stream_query_info_finish()
26458 * to get the result of the operation.
26460 * For the synchronous version of this function,
26461 * see g_file_input_stream_query_info().
26463 * If @cancellable is not %NULL, then the operation can be cancelled by
26464 * triggering the cancellable object from another thread. If the operation
26465 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set
26470 * g_file_input_stream_query_info_finish:
26471 * @stream: a #GFileInputStream.
26472 * @result: a #GAsyncResult.
26473 * @error: a #GError location to store the error occurring, or %NULL to ignore.
26475 * Finishes an asynchronous info query operation.
26477 * Returns: (transfer full): #GFileInfo.
26482 * g_file_io_stream_get_etag:
26483 * @stream: a #GFileIOStream.
26485 * Gets the entity tag for the file when it has been written.
26486 * This must be called after the stream has been written
26487 * and closed, as the etag can change while writing.
26489 * Returns: the entity tag for the stream.
26495 * g_file_io_stream_query_info:
26496 * @stream: a #GFileIOStream.
26497 * @attributes: a file attribute query string.
26498 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26499 * @error: a #GError, %NULL to ignore.
26501 * Queries a file io stream for the given @attributes.
26502 * This function blocks while querying the stream. For the asynchronous
26503 * version of this function, see g_file_io_stream_query_info_async().
26504 * While the stream is blocked, the stream will set the pending flag
26505 * internally, and any other operations on the stream will fail with
26506 * %G_IO_ERROR_PENDING.
26508 * Can fail if the stream was already closed (with @error being set to
26509 * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
26510 * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
26511 * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I
26512 * all cases of failure, %NULL will be returned.
26514 * If @cancellable is not %NULL, then the operation can be cancelled by
26515 * triggering the cancellable object from another thread. If the operation
26516 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
26519 * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
26525 * g_file_io_stream_query_info_async:
26526 * @stream: a #GFileIOStream.
26527 * @attributes: a file attribute query string.
26528 * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
26529 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26530 * @callback: (scope async): callback to call when the request is satisfied
26531 * @user_data: (closure): the data to pass to callback function
26533 * Asynchronously queries the @stream for a #GFileInfo. When completed,
26534 * @callback will be called with a #GAsyncResult which can be used to
26535 * finish the operation with g_file_io_stream_query_info_finish().
26537 * For the synchronous version of this function, see
26538 * g_file_io_stream_query_info().
26545 * g_file_io_stream_query_info_finish:
26546 * @stream: a #GFileIOStream.
26547 * @result: a #GAsyncResult.
26548 * @error: a #GError, %NULL to ignore.
26550 * Finalizes the asynchronous query started
26551 * by g_file_io_stream_query_info_async().
26553 * Returns: (transfer full): A #GFileInfo for the finished query.
26559 * g_file_is_native:
26560 * @file: input #GFile.
26562 * Checks to see if a file is native to the platform.
26564 * A native file s one expressed in the platform-native filename format,
26565 * e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
26566 * as it might be on a locally mounted remote filesystem.
26568 * On some systems non-native files may be available using
26569 * the native filesystem via a userspace filesystem (FUSE), in
26570 * these cases this call will return %FALSE, but g_file_get_path()
26571 * will still return a native path.
26573 * This call does no blocking i/o.
26575 * Returns: %TRUE if file is native.
26580 * g_file_load_contents:
26581 * @file: input #GFile.
26582 * @cancellable: optional #GCancellable object, %NULL to ignore.
26583 * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
26584 * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
26585 * @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
26586 * @error: a #GError, or %NULL
26588 * Loads the content of the file into memory. The data is always
26589 * zero-terminated, but this is not included in the resultant @length.
26590 * The returned @content should be freed with g_free() when no longer
26593 * If @cancellable is not %NULL, then the operation can be cancelled by
26594 * triggering the cancellable object from another thread. If the operation
26595 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26597 * %FALSE if there were errors.
26599 * Returns: %TRUE if the @file's contents were successfully loaded.
26604 * g_file_load_contents_async:
26605 * @file: input #GFile.
26606 * @cancellable: optional #GCancellable object, %NULL to ignore.
26607 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
26608 * @user_data: the data to pass to callback function
26610 * Starts an asynchronous load of the @file's contents.
26612 * For more details, see g_file_load_contents() which is
26613 * the synchronous version of this call.
26615 * When the load operation has completed, @callback will be called
26616 * with @user data. To finish the operation, call
26617 * g_file_load_contents_finish() with the #GAsyncResult returned by
26620 * If @cancellable is not %NULL, then the operation can be cancelled by
26621 * triggering the cancellable object from another thread. If the operation
26622 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26627 * g_file_load_contents_finish:
26628 * @file: input #GFile.
26629 * @res: a #GAsyncResult.
26630 * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
26631 * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
26632 * @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
26633 * @error: a #GError, or %NULL
26635 * Finishes an asynchronous load of the @file's contents.
26636 * The contents are placed in @contents, and @length is set to the
26637 * size of the @contents string. The @content should be freed with
26638 * g_free() when no longer needed. If @etag_out is present, it will be
26639 * set to the new entity tag for the @file.
26641 * present, it will be set appropriately.
26643 * Returns: %TRUE if the load was successful. If %FALSE and @error is
26648 * g_file_load_partial_contents_async: (skip)
26649 * @file: input #GFile.
26650 * @cancellable: optional #GCancellable object, %NULL to ignore.
26651 * @read_more_callback: a #GFileReadMoreCallback to receive partial data and to specify whether further data should be read.
26652 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
26653 * @user_data: the data to pass to the callback functions.
26655 * Reads the partial contents of a file. A #GFileReadMoreCallback should be
26656 * used to stop reading from the file when appropriate, else this function
26657 * will behave exactly as g_file_load_contents_async(). This operation
26658 * can be finished by g_file_load_partial_contents_finish().
26660 * Users of this function should be aware that @user_data is passed to
26661 * both the @read_more_callback and the @callback.
26663 * If @cancellable is not %NULL, then the operation can be cancelled by
26664 * triggering the cancellable object from another thread. If the operation
26665 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26670 * g_file_load_partial_contents_finish:
26671 * @file: input #GFile.
26672 * @res: a #GAsyncResult.
26673 * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
26674 * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
26675 * @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
26676 * @error: a #GError, or %NULL
26678 * Finishes an asynchronous partial load operation that was started
26679 * with g_file_load_partial_contents_async(). The data is always
26680 * zero-terminated, but this is not included in the resultant @length.
26681 * The returned @content should be freed with g_free() when no longer
26684 * present, it will be set appropriately.
26686 * Returns: %TRUE if the load was successful. If %FALSE and @error is
26691 * g_file_make_directory:
26692 * @file: input #GFile.
26693 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26694 * @error: a #GError, or %NULL
26696 * Creates a directory. Note that this will only create a child directory of
26697 * the immediate parent directory of the path or URI given by the #GFile. To
26698 * recursively create directories, see g_file_make_directory_with_parents().
26699 * This function will fail if the parent directory does not exist, setting
26700 * @error to %G_IO_ERROR_NOT_FOUND. If the file system doesn't support creating
26701 * directories, this function will fail, setting @error to
26702 * %G_IO_ERROR_NOT_SUPPORTED.
26704 * For a local #GFile the newly created directory will have the default
26705 * (current) ownership and permissions of the current process.
26707 * If @cancellable is not %NULL, then the operation can be cancelled by
26708 * triggering the cancellable object from another thread. If the operation
26709 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26711 * Returns: %TRUE on successful creation, %FALSE otherwise.
26716 * g_file_make_directory_with_parents:
26717 * @file: input #GFile.
26718 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26719 * @error: a #GError, or %NULL
26721 * Creates a directory and any parent directories that may not exist similar to
26722 * 'mkdir -p'. If the file system does not support creating directories, this
26723 * function will fail, setting @error to %G_IO_ERROR_NOT_SUPPORTED. If the
26724 * directory itself already exists, this function will fail setting @error
26725 * to %G_IO_ERROR_EXISTS, unlike the similar g_mkdir_with_parents().
26727 * For a local #GFile the newly created directories will have the default
26728 * (current) ownership and permissions of the current process.
26730 * If @cancellable is not %NULL, then the operation can be cancelled by
26731 * triggering the cancellable object from another thread. If the operation
26732 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26736 * Returns: %TRUE if all directories have been successfully created, %FALSE
26742 * g_file_make_symbolic_link:
26743 * @file: a #GFile with the name of the symlink to create
26744 * @symlink_value: a string with the path for the target of the new symlink
26745 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26746 * @error: a #GError.
26748 * Creates a symbolic link named @file which contains the string
26751 * If @cancellable is not %NULL, then the operation can be cancelled by
26752 * triggering the cancellable object from another thread. If the operation
26753 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26755 * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise.
26761 * @file: input #GFile
26762 * @flags: a set of #GFileMonitorFlags
26763 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
26764 * @error: a #GError, or %NULL
26766 * Obtains a file or directory monitor for the given file, depending
26767 * on the type of the file.
26769 * If @cancellable is not %NULL, then the operation can be cancelled by
26770 * triggering the cancellable object from another thread. If the operation
26771 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26773 * Free the returned object with g_object_unref().
26775 * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
26781 * g_file_monitor_cancel:
26782 * @monitor: a #GFileMonitor.
26784 * Cancels a file monitor.
26786 * Returns: %TRUE if monitor was cancelled.
26791 * g_file_monitor_directory:
26792 * @file: input #GFile.
26793 * @flags: a set of #GFileMonitorFlags.
26794 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26795 * @error: a #GError, or %NULL.
26797 * Obtains a directory monitor for the given file.
26798 * This may fail if directory monitoring is not supported.
26800 * If @cancellable is not %NULL, then the operation can be cancelled by
26801 * triggering the cancellable object from another thread. If the operation
26802 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26804 * Free the returned object with g_object_unref().
26806 * Virtual: monitor_dir
26807 * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
26812 * g_file_monitor_emit_event:
26813 * @monitor: a #GFileMonitor.
26814 * @child: a #GFile.
26815 * @other_file: a #GFile.
26816 * @event_type: a set of #GFileMonitorEvent flags.
26818 * Emits the #GFileMonitor::changed signal if a change
26819 * has taken place. Should be called from file monitor
26820 * implementations only.
26822 * The signal will be emitted from an idle handler (in the <link
26823 * linkend="g-main-context-push-thread-default">thread-default main
26829 * g_file_monitor_file:
26830 * @file: input #GFile.
26831 * @flags: a set of #GFileMonitorFlags.
26832 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26833 * @error: a #GError, or %NULL.
26835 * Obtains a file monitor for the given file. If no file notification
26836 * mechanism exists, then regular polling of the file is used.
26838 * If @cancellable is not %NULL, then the operation can be cancelled by
26839 * triggering the cancellable object from another thread. If the operation
26840 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26842 * Free the returned object with g_object_unref().
26844 * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
26849 * g_file_monitor_is_cancelled:
26850 * @monitor: a #GFileMonitor
26852 * Returns whether the monitor is canceled.
26854 * Returns: %TRUE if monitor is canceled. %FALSE otherwise.
26859 * g_file_monitor_set_rate_limit:
26860 * @monitor: a #GFileMonitor.
26861 * @limit_msecs: a non-negative integer with the limit in milliseconds to poll for changes
26863 * Sets the rate limit to which the @monitor will report
26864 * consecutive change events to the same file.
26869 * g_file_mount_enclosing_volume:
26870 * @location: input #GFile.
26871 * @flags: flags affecting the operation
26872 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
26873 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26874 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
26875 * @user_data: the data to pass to callback function
26877 * Starts a @mount_operation, mounting the volume that contains the file @location.
26879 * When this operation has completed, @callback will be called with
26880 * @user_user data, and the operation can be finalized with
26881 * g_file_mount_enclosing_volume_finish().
26883 * If @cancellable is not %NULL, then the operation can be cancelled by
26884 * triggering the cancellable object from another thread. If the operation
26885 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26890 * g_file_mount_enclosing_volume_finish:
26891 * @location: input #GFile.
26892 * @result: a #GAsyncResult.
26893 * @error: a #GError, or %NULL
26895 * Finishes a mount operation started by g_file_mount_enclosing_volume().
26897 * has occurred, this function will return %FALSE and set @error
26898 * appropriately if present.
26900 * Returns: %TRUE if successful. If an error
26905 * g_file_mount_mountable:
26906 * @file: input #GFile.
26907 * @flags: flags affecting the operation
26908 * @mount_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
26909 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26910 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
26911 * @user_data: (closure): the data to pass to callback function
26913 * Mounts a file of type G_FILE_TYPE_MOUNTABLE.
26914 * Using @mount_operation, you can request callbacks when, for instance,
26915 * passwords are needed during authentication.
26917 * If @cancellable is not %NULL, then the operation can be cancelled by
26918 * triggering the cancellable object from another thread. If the operation
26919 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26921 * When the operation is finished, @callback will be called. You can then call
26922 * g_file_mount_mountable_finish() to get the result of the operation.
26927 * g_file_mount_mountable_finish:
26928 * @file: input #GFile.
26929 * @result: a #GAsyncResult.
26930 * @error: a #GError, or %NULL
26932 * Finishes a mount operation. See g_file_mount_mountable() for details.
26934 * Finish an asynchronous mount operation that was started
26935 * with g_file_mount_mountable().
26937 * Free the returned object with g_object_unref().
26939 * Returns: (transfer full): a #GFile or %NULL on error.
26945 * @source: #GFile pointing to the source location.
26946 * @destination: #GFile pointing to the destination location.
26947 * @flags: set of #GFileCopyFlags.
26948 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26949 * @progress_callback: (allow-none) (scope call): #GFileProgressCallback function for updates.
26950 * @progress_callback_data: (closure): gpointer to user data for the callback function.
26951 * @error: #GError for returning error conditions, or %NULL
26953 * Tries to move the file or directory @source to the location specified by @destination.
26954 * If native move operations are supported then this is used, otherwise a copy + delete
26955 * fallback is used. The native implementation may support moving directories (for instance
26956 * on moves inside the same filesystem), but the fallback code does not.
26958 * If the flag #G_FILE_COPY_OVERWRITE is specified an already
26959 * existing @destination file is overwritten.
26961 * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
26962 * will be copied as symlinks, otherwise the target of the
26963 * @source symlink will be copied.
26965 * If @cancellable is not %NULL, then the operation can be cancelled by
26966 * triggering the cancellable object from another thread. If the operation
26967 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26969 * If @progress_callback is not %NULL, then the operation can be monitored by
26970 * setting this to a #GFileProgressCallback function. @progress_callback_data
26971 * will be passed to this function. It is guaranteed that this callback will
26972 * be called after all data has been transferred with the total number of bytes
26973 * copied during the operation.
26975 * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
26976 * error is returned, independent on the status of the @destination.
26978 * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
26979 * error G_IO_ERROR_EXISTS is returned.
26981 * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
26982 * error is returned. If trying to overwrite a directory with a directory the
26983 * G_IO_ERROR_WOULD_MERGE error is returned.
26985 * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
26986 * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
26987 * may be returned (if the native move operation isn't available).
26989 * Returns: %TRUE on successful move, %FALSE otherwise.
26994 * g_file_new_for_commandline_arg:
26995 * @arg: a command line string.
26997 * Creates a #GFile with the given argument from the command line. The value of
26998 * @arg can be either a URI, an absolute path or a relative path resolved
26999 * relative to the current working directory.
27000 * This operation never fails, but the returned object might not support any
27001 * I/O operation if @arg points to a malformed path.
27003 * Free the returned object with g_object_unref().
27005 * Returns: (transfer full): a new #GFile.
27010 * g_file_new_for_path:
27011 * @path: a string containing a relative or absolute path. The string must be encoded in the glib filename encoding.
27013 * Constructs a #GFile for a given path. This operation never
27014 * fails, but the returned object might not support any I/O
27015 * operation if @path is malformed.
27017 * Free the returned object with g_object_unref().
27019 * Returns: (transfer full): a new #GFile for the given @path.
27024 * g_file_new_for_uri:
27025 * @uri: a UTF8 string containing a URI.
27027 * Constructs a #GFile for a given URI. This operation never
27028 * fails, but the returned object might not support any I/O
27029 * operation if @uri is malformed or if the uri type is
27032 * Free the returned object with g_object_unref().
27034 * Returns: (transfer full): a new #GFile for the given @uri.
27040 * @tmpl: (type filename) (allow-none): Template for the file name, as in g_file_open_tmp(), or %NULL for a default template.
27041 * @iostream: (out): on return, a #GFileIOStream for the created file.
27042 * @error: a #GError, or %NULL
27044 * Opens a file in the preferred directory for temporary files (as
27045 * returned by g_get_tmp_dir()) and returns a #GFile and
27046 * #GFileIOStream pointing to it.
27048 * @template should be a string in the GLib file name encoding
27049 * containing a sequence of six 'X' characters, and containing no
27050 * directory components. If it is %NULL, a default template is used.
27052 * Unlike the other #GFile constructors, this will return %NULL if
27053 * a temporary file could not be created.
27055 * Free the returned object with g_object_unref().
27057 * Returns: (transfer full): a new #GFile.
27063 * g_file_open_readwrite:
27064 * @file: #GFile to open
27065 * @cancellable: (allow-none): a #GCancellable
27066 * @error: a #GError, or %NULL
27068 * Opens an existing file for reading and writing. The result is
27069 * a #GFileIOStream that can be used to read and write the contents of the file.
27071 * If @cancellable is not %NULL, then the operation can be cancelled by
27072 * triggering the cancellable object from another thread. If the operation
27073 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27075 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
27076 * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
27077 * Other errors are possible too, and depend on what kind of filesystem the file is on.
27078 * Note that in many non-local file cases read and write streams are not supported,
27079 * so make sure you really need to do read and write streaming, rather than
27080 * just opening for reading or writing.
27082 * Free the returned object with g_object_unref().
27084 * Returns: (transfer full): #GFileIOStream or %NULL on error.
27090 * g_file_open_readwrite_async:
27091 * @file: input #GFile.
27092 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27093 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27094 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
27095 * @user_data: (closure): the data to pass to callback function
27097 * Asynchronously opens @file for reading and writing.
27099 * For more details, see g_file_open_readwrite() which is
27100 * the synchronous version of this call.
27102 * When the operation is finished, @callback will be called. You can then call
27103 * g_file_open_readwrite_finish() to get the result of the operation.
27110 * g_file_open_readwrite_finish:
27111 * @file: input #GFile.
27112 * @res: a #GAsyncResult.
27113 * @error: a #GError, or %NULL
27115 * Finishes an asynchronous file read operation started with
27116 * g_file_open_readwrite_async().
27118 * Free the returned object with g_object_unref().
27120 * Returns: (transfer full): a #GFileIOStream or %NULL on error.
27126 * g_file_output_stream_get_etag:
27127 * @stream: a #GFileOutputStream.
27129 * Gets the entity tag for the file when it has been written.
27130 * This must be called after the stream has been written
27131 * and closed, as the etag can change while writing.
27133 * Returns: the entity tag for the stream.
27138 * g_file_output_stream_query_info:
27139 * @stream: a #GFileOutputStream.
27140 * @attributes: a file attribute query string.
27141 * @cancellable: optional #GCancellable object, %NULL to ignore.
27142 * @error: a #GError, %NULL to ignore.
27144 * Queries a file output stream for the given @attributes.
27145 * This function blocks while querying the stream. For the asynchronous
27146 * version of this function, see g_file_output_stream_query_info_async().
27147 * While the stream is blocked, the stream will set the pending flag
27148 * internally, and any other operations on the stream will fail with
27149 * %G_IO_ERROR_PENDING.
27151 * Can fail if the stream was already closed (with @error being set to
27152 * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
27153 * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
27154 * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
27155 * all cases of failure, %NULL will be returned.
27157 * If @cancellable is not %NULL, then the operation can be cancelled by
27158 * triggering the cancellable object from another thread. If the operation
27159 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
27162 * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
27167 * g_file_output_stream_query_info_async:
27168 * @stream: a #GFileOutputStream.
27169 * @attributes: a file attribute query string.
27170 * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
27171 * @cancellable: optional #GCancellable object, %NULL to ignore.
27172 * @callback: callback to call when the request is satisfied
27173 * @user_data: the data to pass to callback function
27175 * Asynchronously queries the @stream for a #GFileInfo. When completed,
27176 * @callback will be called with a #GAsyncResult which can be used to
27177 * finish the operation with g_file_output_stream_query_info_finish().
27179 * For the synchronous version of this function, see
27180 * g_file_output_stream_query_info().
27185 * g_file_output_stream_query_info_finish:
27186 * @stream: a #GFileOutputStream.
27187 * @result: a #GAsyncResult.
27188 * @error: a #GError, %NULL to ignore.
27190 * Finalizes the asynchronous query started
27191 * by g_file_output_stream_query_info_async().
27193 * Returns: (transfer full): A #GFileInfo for the finished query.
27198 * g_file_parse_name:
27199 * @parse_name: a file name or path to be parsed.
27201 * Constructs a #GFile with the given @parse_name (i.e. something given by g_file_get_parse_name()).
27202 * This operation never fails, but the returned object might not support any I/O
27203 * operation if the @parse_name cannot be parsed.
27205 * Returns: (transfer full): a new #GFile.
27210 * g_file_poll_mountable:
27211 * @file: input #GFile.
27212 * @cancellable: optional #GCancellable object, %NULL to ignore.
27213 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
27214 * @user_data: the data to pass to callback function
27216 * Polls a file of type G_FILE_TYPE_MOUNTABLE.
27218 * If @cancellable is not %NULL, then the operation can be cancelled by
27219 * triggering the cancellable object from another thread. If the operation
27220 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27222 * When the operation is finished, @callback will be called. You can then call
27223 * g_file_mount_mountable_finish() to get the result of the operation.
27230 * g_file_poll_mountable_finish:
27231 * @file: input #GFile.
27232 * @result: a #GAsyncResult.
27233 * @error: a #GError, or %NULL
27235 * Finishes a poll operation. See g_file_poll_mountable() for details.
27237 * Finish an asynchronous poll operation that was polled
27238 * with g_file_poll_mountable().
27242 * Returns: %TRUE if the operation finished successfully. %FALSE
27248 * g_file_query_default_handler:
27249 * @file: a #GFile to open.
27250 * @cancellable: optional #GCancellable object, %NULL to ignore.
27251 * @error: a #GError, or %NULL
27253 * Returns the #GAppInfo that is registered as the default
27254 * application to handle the file specified by @file.
27256 * If @cancellable is not %NULL, then the operation can be cancelled by
27257 * triggering the cancellable object from another thread. If the operation
27258 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27260 * When you are done with it, release it with g_object_unref()
27262 * Returns: (transfer full): a #GAppInfo if the handle was found, %NULL if there were errors.
27267 * g_file_query_exists:
27268 * @file: input #GFile.
27269 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27271 * Utility function to check if a particular file exists. This is
27272 * implemented using g_file_query_info() and as such does blocking I/O.
27274 * Note that in many cases it is racy to first check for file existence
27275 * and then execute something based on the outcome of that, because the
27276 * file might have been created or removed in between the operations. The
27277 * general approach to handling that is to not check, but just do the
27278 * operation and handle the errors as they come.
27280 * As an example of race-free checking, take the case of reading a file, and
27281 * if it doesn't exist, creating it. There are two racy versions: read it, and
27282 * on error create it; and: check if it exists, if not create it. These
27283 * can both result in two processes creating the file (with perhaps a partially
27284 * written file as the result). The correct approach is to always try to create
27285 * the file with g_file_create() which will either atomically create the file
27286 * or fail with a G_IO_ERROR_EXISTS error.
27288 * However, in many cases an existence check is useful in a user
27289 * interface, for instance to make a menu item sensitive/insensitive, so that
27290 * you don't have to fool users that something is possible and then just show
27291 * and error dialog. If you do this, you should make sure to also handle the
27292 * errors that can happen due to races when you execute the operation.
27294 * Returns: %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled).
27299 * g_file_query_file_type:
27300 * @file: input #GFile.
27301 * @flags: a set of #GFileQueryInfoFlags passed to g_file_query_info().
27302 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27304 * Utility function to inspect the #GFileType of a file. This is
27305 * implemented using g_file_query_info() and as such does blocking I/O.
27307 * The primary use case of this method is to check if a file is a regular file,
27308 * directory, or symlink.
27312 * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN if the file
27318 * g_file_query_filesystem_info:
27319 * @file: input #GFile.
27320 * @attributes: an attribute query string.
27321 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27322 * @error: a #GError.
27324 * Similar to g_file_query_info(), but obtains information
27325 * about the filesystem the @file is on, rather than the file itself.
27326 * For instance the amount of space available and the type of
27329 * The @attributes value is a string that specifies the file attributes that
27330 * should be gathered. It is not an error if it's not possible to read a particular
27331 * requested attribute from a file - it just won't be set. @attributes should
27332 * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
27333 * means all attributes, and a wildcard like "filesystem::*" means all attributes in the
27334 * filesystem namespace. The standard namespace for filesystem attributes is "filesystem".
27335 * Common attributes of interest are #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE
27336 * (the total size of the filesystem in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of
27337 * bytes available), and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
27339 * If @cancellable is not %NULL, then the operation can be cancelled by
27340 * triggering the cancellable object from another thread. If the operation
27341 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27343 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
27344 * Other errors are possible too, and depend on what kind of filesystem the file is on.
27346 * Free the returned object with g_object_unref().
27348 * Returns: (transfer full): a #GFileInfo or %NULL if there was an error.
27353 * g_file_query_filesystem_info_async:
27354 * @file: input #GFile.
27355 * @attributes: an attribute query string.
27356 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27357 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27358 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
27359 * @user_data: (closure): the data to pass to callback function
27361 * Asynchronously gets the requested information about the filesystem
27362 * that the specified @file is on. The result is a #GFileInfo object
27363 * that contains key-value attributes (such as type or size for the
27366 * For more details, see g_file_query_filesystem_info() which is the
27367 * synchronous version of this call.
27369 * When the operation is finished, @callback will be called. You can
27370 * then call g_file_query_info_finish() to get the result of the
27376 * g_file_query_filesystem_info_finish:
27377 * @file: input #GFile.
27378 * @res: a #GAsyncResult.
27379 * @error: a #GError.
27381 * Finishes an asynchronous filesystem info query. See
27382 * g_file_query_filesystem_info_async().
27384 * Free the returned object with g_object_unref().
27386 * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
27391 * g_file_query_info:
27392 * @file: input #GFile.
27393 * @attributes: an attribute query string.
27394 * @flags: a set of #GFileQueryInfoFlags.
27395 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27396 * @error: a #GError.
27398 * Gets the requested information about specified @file. The result
27399 * is a #GFileInfo object that contains key-value attributes (such as
27400 * the type or size of the file).
27402 * The @attributes value is a string that specifies the file attributes that
27403 * should be gathered. It is not an error if it's not possible to read a particular
27404 * requested attribute from a file - it just won't be set. @attributes should
27405 * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
27406 * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
27407 * namespace. An example attribute query be "standard::*,owner::user".
27408 * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
27410 * If @cancellable is not %NULL, then the operation can be cancelled by
27411 * triggering the cancellable object from another thread. If the operation
27412 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27414 * For symlinks, normally the information about the target of the
27415 * symlink is returned, rather than information about the symlink itself.
27416 * However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in @flags the
27417 * information about the symlink itself will be returned. Also, for symlinks
27418 * that point to non-existing files the information about the symlink itself
27419 * will be returned.
27421 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
27422 * Other errors are possible too, and depend on what kind of filesystem the file is on.
27424 * Free the returned object with g_object_unref().
27426 * Returns: (transfer full): a #GFileInfo for the given @file, or %NULL on error.
27431 * g_file_query_info_async:
27432 * @file: input #GFile.
27433 * @attributes: an attribute query string.
27434 * @flags: a set of #GFileQueryInfoFlags.
27435 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27436 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27437 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
27438 * @user_data: (closure): the data to pass to callback function
27440 * Asynchronously gets the requested information about specified @file. The result
27441 * is a #GFileInfo object that contains key-value attributes (such as type or size
27444 * For more details, see g_file_query_info() which is
27445 * the synchronous version of this call.
27447 * When the operation is finished, @callback will be called. You can then call
27448 * g_file_query_info_finish() to get the result of the operation.
27453 * g_file_query_info_finish:
27454 * @file: input #GFile.
27455 * @res: a #GAsyncResult.
27456 * @error: a #GError.
27458 * Finishes an asynchronous file info query.
27459 * See g_file_query_info_async().
27461 * Free the returned object with g_object_unref().
27463 * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
27468 * g_file_query_settable_attributes:
27469 * @file: input #GFile.
27470 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27471 * @error: a #GError, or %NULL
27473 * Obtain the list of settable attributes for the file.
27475 * Returns the type and full attribute name of all the attributes
27476 * that can be set on this file. This doesn't mean setting it will always
27477 * succeed though, you might get an access failure, or some specific
27478 * file may not support a specific attribute.
27480 * If @cancellable is not %NULL, then the operation can be cancelled by
27481 * triggering the cancellable object from another thread. If the operation
27482 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27484 * When you are done with it, release it with g_file_attribute_info_list_unref()
27486 * Returns: a #GFileAttributeInfoList describing the settable attributes.
27491 * g_file_query_writable_namespaces:
27492 * @file: input #GFile.
27493 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27494 * @error: a #GError, or %NULL
27496 * Obtain the list of attribute namespaces where new attributes
27497 * can be created by a user. An example of this is extended
27498 * attributes (in the "xattr" namespace).
27500 * If @cancellable is not %NULL, then the operation can be cancelled by
27501 * triggering the cancellable object from another thread. If the operation
27502 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27504 * When you are done with it, release it with g_file_attribute_info_list_unref()
27506 * Returns: a #GFileAttributeInfoList describing the writable namespaces.
27512 * @file: #GFile to read.
27513 * @cancellable: (allow-none): a #GCancellable
27514 * @error: a #GError, or %NULL
27516 * Opens a file for reading. The result is a #GFileInputStream that
27517 * can be used to read the contents of the file.
27519 * If @cancellable is not %NULL, then the operation can be cancelled by
27520 * triggering the cancellable object from another thread. If the operation
27521 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27523 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
27524 * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
27525 * Other errors are possible too, and depend on what kind of filesystem the file is on.
27527 * Free the returned object with g_object_unref().
27530 * Returns: (transfer full): #GFileInputStream or %NULL on error.
27535 * g_file_read_async:
27536 * @file: input #GFile
27537 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27538 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27539 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
27540 * @user_data: (closure): the data to pass to callback function
27542 * Asynchronously opens @file for reading.
27544 * For more details, see g_file_read() which is
27545 * the synchronous version of this call.
27547 * When the operation is finished, @callback will be called. You can then call
27548 * g_file_read_finish() to get the result of the operation.
27553 * g_file_read_finish:
27554 * @file: input #GFile.
27555 * @res: a #GAsyncResult.
27556 * @error: a #GError, or %NULL
27558 * Finishes an asynchronous file read operation started with
27559 * g_file_read_async().
27561 * Free the returned object with g_object_unref().
27563 * Returns: (transfer full): a #GFileInputStream or %NULL on error.
27569 * @file: input #GFile.
27570 * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore.
27571 * @make_backup: %TRUE if a backup should be created.
27572 * @flags: a set of #GFileCreateFlags.
27573 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27574 * @error: a #GError, or %NULL
27576 * Returns an output stream for overwriting the file, possibly
27577 * creating a backup copy of the file first. If the file doesn't exist,
27578 * it will be created.
27580 * This will try to replace the file in the safest way possible so
27581 * that any errors during the writing will not affect an already
27582 * existing copy of the file. For instance, for local files it
27583 * may write to a temporary file and then atomically rename over
27584 * the destination when the stream is closed.
27586 * By default files created are generally readable by everyone,
27587 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
27588 * will be made readable only to the current user, to the level that
27589 * is supported on the target filesystem.
27591 * If @cancellable is not %NULL, then the operation can be cancelled by
27592 * triggering the cancellable object from another thread. If the operation
27593 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27595 * If you pass in a non-#NULL @etag value, then this value is
27596 * compared to the current entity tag of the file, and if they differ
27597 * an G_IO_ERROR_WRONG_ETAG error is returned. This generally means
27598 * that the file has been changed since you last read it. You can get
27599 * the new etag from g_file_output_stream_get_etag() after you've
27600 * finished writing and closed the #GFileOutputStream. When you load
27601 * a new file you can use g_file_input_stream_query_info() to get
27602 * the etag of the file.
27604 * If @make_backup is %TRUE, this function will attempt to make a backup
27605 * of the current file before overwriting it. If this fails a G_IO_ERROR_CANT_CREATE_BACKUP
27606 * error will be returned. If you want to replace anyway, try again with
27607 * @make_backup set to %FALSE.
27609 * If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned,
27610 * and if the file is some other form of non-regular file then a
27611 * G_IO_ERROR_NOT_REGULAR_FILE error will be returned.
27612 * Some file systems don't allow all file names, and may
27613 * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
27614 * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
27615 * Other errors are possible too, and depend on what kind of
27616 * filesystem the file is on.
27618 * Free the returned object with g_object_unref().
27620 * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
27625 * g_file_replace_async:
27626 * @file: input #GFile.
27627 * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
27628 * @make_backup: %TRUE if a backup should be created.
27629 * @flags: a set of #GFileCreateFlags.
27630 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27631 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27632 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
27633 * @user_data: (closure): the data to pass to callback function
27635 * Asynchronously overwrites the file, replacing the contents, possibly
27636 * creating a backup copy of the file first.
27638 * For more details, see g_file_replace() which is
27639 * the synchronous version of this call.
27641 * When the operation is finished, @callback will be called. You can then call
27642 * g_file_replace_finish() to get the result of the operation.
27647 * g_file_replace_contents:
27648 * @file: input #GFile.
27649 * @contents: (element-type guint8) (array length=length): a string containing the new contents for @file.
27650 * @length: the length of @contents in bytes.
27651 * @etag: (allow-none): the old <link linkend="gfile-etag">entity tag</link> for the document, or %NULL
27652 * @make_backup: %TRUE if a backup should be created.
27653 * @flags: a set of #GFileCreateFlags.
27654 * @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
27655 * @cancellable: optional #GCancellable object, %NULL to ignore.
27656 * @error: a #GError, or %NULL
27658 * Replaces the contents of @file with @contents of @length bytes.
27659 * If @etag is specified (not %NULL) any existing file must have that etag, or
27660 * the error %G_IO_ERROR_WRONG_ETAG will be returned.
27662 * If @make_backup is %TRUE, this function will attempt to make a backup of @file.
27664 * If @cancellable is not %NULL, then the operation can be cancelled by
27665 * triggering the cancellable object from another thread. If the operation
27666 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27668 * The returned @new_etag can be used to verify that the file hasn't changed the
27669 * next time it is saved over.
27671 * has occurred, this function will return %FALSE and set @error
27672 * appropriately if present.
27674 * Returns: %TRUE if successful. If an error
27679 * g_file_replace_contents_async:
27680 * @file: input #GFile.
27681 * @contents: (element-type guint8) (array length=length): string of contents to replace the file with.
27682 * @length: the length of @contents in bytes.
27683 * @etag: (allow-none): a new <link linkend="gfile-etag">entity tag</link> for the @file, or %NULL
27684 * @make_backup: %TRUE if a backup should be created.
27685 * @flags: a set of #GFileCreateFlags.
27686 * @cancellable: optional #GCancellable object, %NULL to ignore.
27687 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
27688 * @user_data: the data to pass to callback function
27690 * Starts an asynchronous replacement of @file with the given
27691 * @contents of @length bytes. @etag will replace the document's
27692 * current entity tag.
27694 * When this operation has completed, @callback will be called with
27695 * @user_user data, and the operation can be finalized with
27696 * g_file_replace_contents_finish().
27698 * If @cancellable is not %NULL, then the operation can be cancelled by
27699 * triggering the cancellable object from another thread. If the operation
27700 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27702 * If @make_backup is %TRUE, this function will attempt to
27703 * make a backup of @file.
27708 * g_file_replace_contents_finish:
27709 * @file: input #GFile.
27710 * @res: a #GAsyncResult.
27711 * @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
27712 * @error: a #GError, or %NULL
27714 * Finishes an asynchronous replace of the given @file. See
27715 * g_file_replace_contents_async(). Sets @new_etag to the new entity
27716 * tag for the document, if present.
27718 * Returns: %TRUE on success, %FALSE on failure.
27723 * g_file_replace_finish:
27724 * @file: input #GFile.
27725 * @res: a #GAsyncResult.
27726 * @error: a #GError, or %NULL
27728 * Finishes an asynchronous file replace operation started with
27729 * g_file_replace_async().
27731 * Free the returned object with g_object_unref().
27733 * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
27738 * g_file_replace_readwrite:
27740 * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore
27741 * @make_backup: %TRUE if a backup should be created
27742 * @flags: a set of #GFileCreateFlags
27743 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
27744 * @error: return location for a #GError, or %NULL
27746 * Returns an output stream for overwriting the file in readwrite mode,
27747 * possibly creating a backup copy of the file first. If the file doesn't
27748 * exist, it will be created.
27750 * For details about the behaviour, see g_file_replace() which does the same
27751 * thing but returns an output stream only.
27753 * Note that in many non-local file cases read and write streams are not
27754 * supported, so make sure you really need to do read and write streaming,
27755 * rather than just opening for reading or writing.
27757 * Free the returned object with g_object_unref().
27759 * Returns: (transfer full): a #GFileIOStream or %NULL on error.
27765 * g_file_replace_readwrite_async:
27766 * @file: input #GFile.
27767 * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
27768 * @make_backup: %TRUE if a backup should be created.
27769 * @flags: a set of #GFileCreateFlags.
27770 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27771 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27772 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
27773 * @user_data: (closure): the data to pass to callback function
27775 * Asynchronously overwrites the file in read-write mode, replacing the
27776 * contents, possibly creating a backup copy of the file first.
27778 * For more details, see g_file_replace_readwrite() which is
27779 * the synchronous version of this call.
27781 * When the operation is finished, @callback will be called. You can then
27782 * call g_file_replace_readwrite_finish() to get the result of the operation.
27789 * g_file_replace_readwrite_finish:
27790 * @file: input #GFile.
27791 * @res: a #GAsyncResult.
27792 * @error: a #GError, or %NULL
27794 * Finishes an asynchronous file replace operation started with
27795 * g_file_replace_readwrite_async().
27797 * Free the returned object with g_object_unref().
27799 * Returns: (transfer full): a #GFileIOStream, or %NULL on error.
27805 * g_file_resolve_relative_path:
27806 * @file: input #GFile.
27807 * @relative_path: a given relative path string.
27809 * Resolves a relative path for @file to an absolute path.
27811 * This call does no blocking i/o.
27813 * is %NULL or if @file is invalid.
27814 * Free the returned object with g_object_unref().
27816 * Returns: (transfer full): #GFile to the resolved path. %NULL if @relative_path
27821 * g_file_set_attribute:
27822 * @file: input #GFile.
27823 * @attribute: a string containing the attribute's name.
27824 * @type: The type of the attribute
27825 * @value_p: (allow-none): a pointer to the value (or the pointer itself if the type is a pointer type)
27826 * @flags: a set of #GFileQueryInfoFlags.
27827 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27828 * @error: a #GError, or %NULL
27830 * Sets an attribute in the file with attribute name @attribute to @value.
27832 * Some attributes can be unset by setting @attribute to
27833 * %G_FILE_ATTRIBUTE_TYPE_INVALID and @value_p to %NULL.
27835 * If @cancellable is not %NULL, then the operation can be cancelled by
27836 * triggering the cancellable object from another thread. If the operation
27837 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27839 * Returns: %TRUE if the attribute was set, %FALSE otherwise.
27844 * g_file_set_attribute_byte_string:
27845 * @file: input #GFile.
27846 * @attribute: a string containing the attribute's name.
27847 * @value: a string containing the attribute's new value.
27848 * @flags: a #GFileQueryInfoFlags.
27849 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27850 * @error: a #GError, or %NULL
27852 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value.
27853 * If @attribute is of a different type, this operation will fail,
27854 * returning %FALSE.
27856 * If @cancellable is not %NULL, then the operation can be cancelled by
27857 * triggering the cancellable object from another thread. If the operation
27858 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27860 * in the @file, %FALSE otherwise.
27862 * Returns: %TRUE if the @attribute was successfully set to @value
27867 * g_file_set_attribute_int32:
27868 * @file: input #GFile.
27869 * @attribute: a string containing the attribute's name.
27870 * @value: a #gint32 containing the attribute's new value.
27871 * @flags: a #GFileQueryInfoFlags.
27872 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27873 * @error: a #GError, or %NULL
27875 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value.
27876 * If @attribute is of a different type, this operation will fail.
27878 * If @cancellable is not %NULL, then the operation can be cancelled by
27879 * triggering the cancellable object from another thread. If the operation
27880 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27882 * in the @file, %FALSE otherwise.
27884 * Returns: %TRUE if the @attribute was successfully set to @value
27889 * g_file_set_attribute_int64:
27890 * @file: input #GFile.
27891 * @attribute: a string containing the attribute's name.
27892 * @value: a #guint64 containing the attribute's new value.
27893 * @flags: a #GFileQueryInfoFlags.
27894 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27895 * @error: a #GError, or %NULL
27897 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value.
27898 * If @attribute is of a different type, this operation will fail.
27900 * If @cancellable is not %NULL, then the operation can be cancelled by
27901 * triggering the cancellable object from another thread. If the operation
27902 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27904 * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
27909 * g_file_set_attribute_string:
27910 * @file: input #GFile.
27911 * @attribute: a string containing the attribute's name.
27912 * @value: a string containing the attribute's value.
27913 * @flags: #GFileQueryInfoFlags.
27914 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27915 * @error: a #GError, or %NULL
27917 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value.
27918 * If @attribute is of a different type, this operation will fail.
27920 * If @cancellable is not %NULL, then the operation can be cancelled by
27921 * triggering the cancellable object from another thread. If the operation
27922 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27924 * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
27929 * g_file_set_attribute_uint32:
27930 * @file: input #GFile.
27931 * @attribute: a string containing the attribute's name.
27932 * @value: a #guint32 containing the attribute's new value.
27933 * @flags: a #GFileQueryInfoFlags.
27934 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27935 * @error: a #GError, or %NULL
27937 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value.
27938 * If @attribute is of a different type, this operation will fail.
27940 * If @cancellable is not %NULL, then the operation can be cancelled by
27941 * triggering the cancellable object from another thread. If the operation
27942 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27944 * in the @file, %FALSE otherwise.
27946 * Returns: %TRUE if the @attribute was successfully set to @value
27951 * g_file_set_attribute_uint64:
27952 * @file: input #GFile.
27953 * @attribute: a string containing the attribute's name.
27954 * @value: a #guint64 containing the attribute's new value.
27955 * @flags: a #GFileQueryInfoFlags.
27956 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27957 * @error: a #GError, or %NULL
27959 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value.
27960 * If @attribute is of a different type, this operation will fail.
27962 * If @cancellable is not %NULL, then the operation can be cancelled by
27963 * triggering the cancellable object from another thread. If the operation
27964 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
27966 * in the @file, %FALSE otherwise.
27968 * Returns: %TRUE if the @attribute was successfully set to @value
27973 * g_file_set_attributes_async:
27974 * @file: input #GFile.
27975 * @info: a #GFileInfo.
27976 * @flags: a #GFileQueryInfoFlags.
27977 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
27978 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27979 * @callback: (scope async): a #GAsyncReadyCallback.
27980 * @user_data: (closure): a #gpointer.
27982 * Asynchronously sets the attributes of @file with @info.
27984 * For more details, see g_file_set_attributes_from_info() which is
27985 * the synchronous version of this call.
27987 * When the operation is finished, @callback will be called. You can then call
27988 * g_file_set_attributes_finish() to get the result of the operation.
27993 * g_file_set_attributes_finish:
27994 * @file: input #GFile.
27995 * @result: a #GAsyncResult.
27996 * @info: (out) (transfer full): a #GFileInfo.
27997 * @error: a #GError, or %NULL
27999 * Finishes setting an attribute started in g_file_set_attributes_async().
28001 * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise.
28006 * g_file_set_attributes_from_info:
28007 * @file: input #GFile.
28008 * @info: a #GFileInfo.
28009 * @flags: #GFileQueryInfoFlags
28010 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28011 * @error: a #GError, or %NULL
28013 * Tries to set all attributes in the #GFileInfo on the target values,
28014 * not stopping on the first error.
28016 * If there is any error during this operation then @error will be set to
28017 * the first error. Error on particular fields are flagged by setting
28018 * the "status" field in the attribute value to
28019 * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can also detect
28022 * If @cancellable is not %NULL, then the operation can be cancelled by
28023 * triggering the cancellable object from another thread. If the operation
28024 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28026 * Returns: %TRUE if there was any error, %FALSE otherwise.
28031 * g_file_set_display_name:
28032 * @file: input #GFile.
28033 * @display_name: a string.
28034 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28035 * @error: a #GError, or %NULL
28037 * Renames @file to the specified display name.
28039 * The display name is converted from UTF8 to the correct encoding for the target
28040 * filesystem if possible and the @file is renamed to this.
28042 * If you want to implement a rename operation in the user interface the edit name
28043 * (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the initial value in the rename
28044 * widget, and then the result after editing should be passed to g_file_set_display_name().
28046 * On success the resulting converted filename is returned.
28048 * If @cancellable is not %NULL, then the operation can be cancelled by
28049 * triggering the cancellable object from another thread. If the operation
28050 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28052 * if there was an error.
28053 * Free the returned object with g_object_unref().
28055 * Returns: (transfer full): a #GFile specifying what @file was renamed to, or %NULL
28060 * g_file_set_display_name_async:
28061 * @file: input #GFile.
28062 * @display_name: a string.
28063 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
28064 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28065 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
28066 * @user_data: (closure): the data to pass to callback function
28068 * Asynchronously sets the display name for a given #GFile.
28070 * For more details, see g_file_set_display_name() which is
28071 * the synchronous version of this call.
28073 * When the operation is finished, @callback will be called. You can then call
28074 * g_file_set_display_name_finish() to get the result of the operation.
28079 * g_file_set_display_name_finish:
28080 * @file: input #GFile.
28081 * @res: a #GAsyncResult.
28082 * @error: a #GError, or %NULL
28084 * Finishes setting a display name started with
28085 * g_file_set_display_name_async().
28087 * Free the returned object with g_object_unref().
28089 * Returns: (transfer full): a #GFile or %NULL on error.
28094 * g_file_start_mountable:
28095 * @file: input #GFile.
28096 * @flags: flags affecting the operation
28097 * @start_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
28098 * @cancellable: optional #GCancellable object, %NULL to ignore.
28099 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
28100 * @user_data: the data to pass to callback function
28102 * Starts a file of type G_FILE_TYPE_MOUNTABLE.
28103 * Using @start_operation, you can request callbacks when, for instance,
28104 * passwords are needed during authentication.
28106 * If @cancellable is not %NULL, then the operation can be cancelled by
28107 * triggering the cancellable object from another thread. If the operation
28108 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28110 * When the operation is finished, @callback will be called. You can then call
28111 * g_file_mount_mountable_finish() to get the result of the operation.
28118 * g_file_start_mountable_finish:
28119 * @file: input #GFile.
28120 * @result: a #GAsyncResult.
28121 * @error: a #GError, or %NULL
28123 * Finishes a start operation. See g_file_start_mountable() for details.
28125 * Finish an asynchronous start operation that was started
28126 * with g_file_start_mountable().
28130 * Returns: %TRUE if the operation finished successfully. %FALSE
28136 * g_file_stop_mountable:
28137 * @file: input #GFile.
28138 * @flags: flags affecting the operation
28139 * @mount_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
28140 * @cancellable: optional #GCancellable object, %NULL to ignore.
28141 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
28142 * @user_data: the data to pass to callback function
28144 * Stops a file of type G_FILE_TYPE_MOUNTABLE.
28146 * If @cancellable is not %NULL, then the operation can be cancelled by
28147 * triggering the cancellable object from another thread. If the operation
28148 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28150 * When the operation is finished, @callback will be called. You can then call
28151 * g_file_stop_mountable_finish() to get the result of the operation.
28158 * g_file_stop_mountable_finish:
28159 * @file: input #GFile.
28160 * @result: a #GAsyncResult.
28161 * @error: a #GError, or %NULL
28163 * Finishes an stop operation, see g_file_stop_mountable() for details.
28165 * Finish an asynchronous stop operation that was started
28166 * with g_file_stop_mountable().
28170 * Returns: %TRUE if the operation finished successfully. %FALSE
28176 * g_file_supports_thread_contexts:
28179 * Checks if @file supports <link
28180 * linkend="g-main-context-push-thread-default-context">thread-default
28181 * contexts</link>. If this returns %FALSE, you cannot perform
28182 * asynchronous operations on @file in a thread that has a
28183 * thread-default context.
28185 * Returns: Whether or not @file supports thread-default contexts.
28192 * @file: #GFile to send to trash.
28193 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28194 * @error: a #GError, or %NULL
28196 * Sends @file to the "Trashcan", if possible. This is similar to
28197 * deleting it, but the user can recover it before emptying the trashcan.
28198 * Not all file systems support trashing, so this call can return the
28199 * %G_IO_ERROR_NOT_SUPPORTED error.
28202 * If @cancellable is not %NULL, then the operation can be cancelled by
28203 * triggering the cancellable object from another thread. If the operation
28204 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28206 * Returns: %TRUE on successful trash, %FALSE otherwise.
28211 * g_file_unmount_mountable:
28212 * @file: input #GFile.
28213 * @flags: flags affecting the operation
28214 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28215 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
28216 * @user_data: (closure): the data to pass to callback function
28218 * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
28220 * If @cancellable is not %NULL, then the operation can be cancelled by
28221 * triggering the cancellable object from another thread. If the operation
28222 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28224 * When the operation is finished, @callback will be called. You can then call
28225 * g_file_unmount_mountable_finish() to get the result of the operation.
28227 * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation() instead.
28232 * g_file_unmount_mountable_finish:
28233 * @file: input #GFile.
28234 * @result: a #GAsyncResult.
28235 * @error: a #GError, or %NULL
28237 * Finishes an unmount operation, see g_file_unmount_mountable() for details.
28239 * Finish an asynchronous unmount operation that was started
28240 * with g_file_unmount_mountable().
28244 * Returns: %TRUE if the operation finished successfully. %FALSE
28245 * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation_finish() instead.
28250 * g_file_unmount_mountable_with_operation:
28251 * @file: input #GFile.
28252 * @flags: flags affecting the operation
28253 * @mount_operation: (allow-none): a #GMountOperation, or %NULL to avoid user interaction.
28254 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28255 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
28256 * @user_data: (closure): the data to pass to callback function
28258 * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
28260 * If @cancellable is not %NULL, then the operation can be cancelled by
28261 * triggering the cancellable object from another thread. If the operation
28262 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28264 * When the operation is finished, @callback will be called. You can then call
28265 * g_file_unmount_mountable_finish() to get the result of the operation.
28272 * g_file_unmount_mountable_with_operation_finish:
28273 * @file: input #GFile.
28274 * @result: a #GAsyncResult.
28275 * @error: a #GError, or %NULL
28277 * Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.
28279 * Finish an asynchronous unmount operation that was started
28280 * with g_file_unmount_mountable_with_operation().
28284 * Returns: %TRUE if the operation finished successfully. %FALSE
28290 * g_filename_completer_get_completion_suffix:
28291 * @completer: the filename completer.
28292 * @initial_text: text to be completed.
28294 * Obtains a completion for @initial_text from @completer.
28296 * This string is not owned by GIO, so remember to g_free() it
28299 * Returns: a completed string, or %NULL if no completion exists.
28304 * g_filename_completer_get_completions:
28305 * @completer: the filename completer.
28306 * @initial_text: text to be completed.
28308 * Gets an array of completion strings for a given initial text.
28310 * This array must be freed by g_strfreev() when finished.
28312 * Returns: (array zero-terminated=1) (transfer full): array of strings with possible completions for @initial_text.
28317 * g_filename_completer_new:
28319 * Creates a new filename completer.
28321 * Returns: a #GFilenameCompleter.
28326 * g_filename_completer_set_dirs_only:
28327 * @completer: the filename completer.
28328 * @dirs_only: a #gboolean.
28330 * If @dirs_only is %TRUE, @completer will only
28331 * complete directory names, and not file names.
28336 * g_filter_input_stream_get_base_stream:
28337 * @stream: a #GFilterInputStream.
28339 * Gets the base stream for the filter stream.
28341 * Returns: (transfer none): a #GInputStream.
28346 * g_filter_input_stream_get_close_base_stream:
28347 * @stream: a #GFilterInputStream.
28349 * Returns whether the base stream will be closed when @stream is
28352 * Returns: %TRUE if the base stream will be closed.
28357 * g_filter_input_stream_set_close_base_stream:
28358 * @stream: a #GFilterInputStream.
28359 * @close_base: %TRUE to close the base stream.
28361 * Sets whether the base stream will be closed when @stream is closed.
28366 * g_filter_output_stream_get_base_stream:
28367 * @stream: a #GFilterOutputStream.
28369 * Gets the base stream for the filter stream.
28371 * Returns: (transfer none): a #GOutputStream.
28376 * g_filter_output_stream_get_close_base_stream:
28377 * @stream: a #GFilterOutputStream.
28379 * Returns whether the base stream will be closed when @stream is
28382 * Returns: %TRUE if the base stream will be closed.
28387 * g_filter_output_stream_set_close_base_stream:
28388 * @stream: a #GFilterOutputStream.
28389 * @close_base: %TRUE to close the base stream.
28391 * Sets whether the base stream will be closed when @stream is closed.
28397 * @icon1: (allow-none): pointer to the first #GIcon.
28398 * @icon2: (allow-none): pointer to the second #GIcon.
28400 * Checks if two icons are equal.
28402 * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise.
28408 * @icon: #gconstpointer to an icon object.
28410 * Gets a hash for an icon.
28412 * use in a #GHashTable or similar data structure.
28415 * Returns: a #guint containing a hash for the @icon, suitable for
28420 * g_icon_new_for_string:
28421 * @str: A string obtained via g_icon_to_string().
28422 * @error: Return location for error.
28424 * Generate a #GIcon instance from @str. This function can fail if
28425 * @str is not valid - see g_icon_to_string() for discussion.
28427 * If your application or library provides one or more #GIcon
28428 * implementations you need to ensure that each #GType is registered
28429 * with the type system prior to calling g_icon_new_for_string().
28431 * interface or %NULL if @error is set.
28433 * Returns: (transfer full): An object implementing the #GIcon
28439 * g_icon_to_string:
28442 * Generates a textual representation of @icon that can be used for
28443 * serialization such as when passing @icon to a different process or
28444 * saving it to persistent storage. Use g_icon_new_for_string() to
28445 * get @icon back from the returned string.
28447 * The encoding of the returned string is proprietary to #GIcon except
28448 * in the following two cases
28452 * If @icon is a #GFileIcon, the returned string is a native path
28453 * (such as <literal>/path/to/my icon.png</literal>) without escaping
28454 * if the #GFile for @icon is a native file. If the file is not
28455 * native, the returned string is the result of g_file_get_uri()
28456 * (such as <literal>sftp://path/to/my%20icon.png</literal>).
28457 * </para></listitem>
28459 * If @icon is a #GThemedIcon with exactly one name, the encoding is
28460 * simply the name (such as <literal>network-server</literal>).
28461 * </para></listitem>
28464 * be serialized. Use g_free() to free.
28466 * Virtual: to_tokens
28467 * Returns: An allocated NUL-terminated UTF8 string or %NULL if @icon can't
28473 * g_inet_address_equal:
28474 * @address: A #GInetAddress.
28475 * @other_address: Another #GInetAddress.
28477 * Checks if two #GInetAddress instances are equal, e.g. the same address.
28479 * Returns: %TRUE if @address and @other_address are equal, %FALSE otherwise.
28485 * g_inet_address_get_family:
28486 * @address: a #GInetAddress
28488 * Gets @address's family
28490 * Returns: @address's family
28496 * g_inet_address_get_is_any:
28497 * @address: a #GInetAddress
28499 * Tests whether @address is the "any" address for its family.
28501 * Returns: %TRUE if @address is the "any" address for its family.
28507 * g_inet_address_get_is_link_local:
28508 * @address: a #GInetAddress
28510 * Tests whether @address is a link-local address (that is, if it
28511 * identifies a host on a local network that is not connected to the
28514 * Returns: %TRUE if @address is a link-local address.
28520 * g_inet_address_get_is_loopback:
28521 * @address: a #GInetAddress
28523 * Tests whether @address is the loopback address for its family.
28525 * Returns: %TRUE if @address is the loopback address for its family.
28531 * g_inet_address_get_is_mc_global:
28532 * @address: a #GInetAddress
28534 * Tests whether @address is a global multicast address.
28536 * Returns: %TRUE if @address is a global multicast address.
28542 * g_inet_address_get_is_mc_link_local:
28543 * @address: a #GInetAddress
28545 * Tests whether @address is a link-local multicast address.
28547 * Returns: %TRUE if @address is a link-local multicast address.
28553 * g_inet_address_get_is_mc_node_local:
28554 * @address: a #GInetAddress
28556 * Tests whether @address is a node-local multicast address.
28558 * Returns: %TRUE if @address is a node-local multicast address.
28564 * g_inet_address_get_is_mc_org_local:
28565 * @address: a #GInetAddress
28567 * Tests whether @address is an organization-local multicast address.
28569 * Returns: %TRUE if @address is an organization-local multicast address.
28575 * g_inet_address_get_is_mc_site_local:
28576 * @address: a #GInetAddress
28578 * Tests whether @address is a site-local multicast address.
28580 * Returns: %TRUE if @address is a site-local multicast address.
28586 * g_inet_address_get_is_multicast:
28587 * @address: a #GInetAddress
28589 * Tests whether @address is a multicast address.
28591 * Returns: %TRUE if @address is a multicast address.
28597 * g_inet_address_get_is_site_local:
28598 * @address: a #GInetAddress
28600 * Tests whether @address is a site-local address such as 10.0.0.1
28601 * (that is, the address identifies a host on a local network that can
28602 * not be reached directly from the Internet, but which may have
28603 * outgoing Internet connectivity via a NAT or firewall).
28605 * Returns: %TRUE if @address is a site-local address.
28611 * g_inet_address_get_native_size:
28612 * @address: a #GInetAddress
28614 * Gets the size of the native raw binary address for @address. This
28615 * is the size of the data that you get from g_inet_address_to_bytes().
28617 * Returns: the number of bytes used for the native version of @address.
28623 * g_inet_address_mask_equal:
28624 * @mask: a #GInetAddressMask
28625 * @mask2: another #GInetAddressMask
28627 * Tests if @mask and @mask2 are the same mask.
28629 * Returns: whether @mask and @mask2 are the same mask
28635 * g_inet_address_mask_get_address:
28636 * @mask: a #GInetAddressMask
28638 * Gets @mask's base address
28640 * Returns: (transfer none): @mask's base address
28646 * g_inet_address_mask_get_family:
28647 * @mask: a #GInetAddressMask
28649 * Gets the #GSocketFamily of @mask's address
28651 * Returns: the #GSocketFamily of @mask's address
28657 * g_inet_address_mask_get_length:
28658 * @mask: a #GInetAddressMask
28660 * Gets @mask's length
28662 * Returns: @mask's length
28668 * g_inet_address_mask_matches:
28669 * @mask: a #GInetAddressMask
28670 * @address: a #GInetAddress
28672 * Tests if @address falls within the range described by @mask.
28676 * Returns: whether @address falls within the range described by
28682 * g_inet_address_mask_new:
28683 * @addr: a #GInetAddress
28684 * @length: number of bits of @addr to use
28685 * @error: return location for #GError, or %NULL
28687 * Creates a new #GInetAddressMask representing all addresses whose
28688 * first @length bits match @addr.
28690 * Returns: a new #GInetAddressMask, or %NULL on error
28696 * g_inet_address_mask_new_from_string:
28697 * @mask_string: an IP address or address/length string
28698 * @error: return location for #GError, or %NULL
28700 * Parses @mask_string as an IP address and (optional) length, and
28701 * creates a new #GInetAddressMask. The length, if present, is
28702 * delimited by a "/". If it is not present, then the length is
28703 * assumed to be the full length of the address.
28707 * Returns: a new #GInetAddressMask corresponding to @string, or %NULL
28713 * g_inet_address_mask_to_string:
28714 * @mask: a #GInetAddressMask
28716 * Converts @mask back to its corresponding string form.
28718 * Returns: a string corresponding to @mask.
28724 * g_inet_address_new_any:
28725 * @family: the address family
28727 * Creates a #GInetAddress for the "any" address (unassigned/"don't
28728 * care") for @family.
28732 * Returns: a new #GInetAddress corresponding to the "any" address
28738 * g_inet_address_new_from_bytes:
28739 * @bytes: (array) (element-type guint8): raw address data
28740 * @family: the address family of @bytes
28742 * Creates a new #GInetAddress from the given @family and @bytes.
28743 * @bytes should be 4 bytes for %G_INET_ADDRESS_IPV4 and 16 bytes for
28744 * %G_INET_ADDRESS_IPV6.
28746 * Returns: a new #GInetAddress corresponding to @family and @bytes.
28752 * g_inet_address_new_from_string:
28753 * @string: a string representation of an IP address
28755 * Parses @string as an IP address and creates a new #GInetAddress.
28757 * @string could not be parsed.
28759 * Returns: a new #GInetAddress corresponding to @string, or %NULL if
28765 * g_inet_address_new_loopback:
28766 * @family: the address family
28768 * Creates a #GInetAddress for the loopback address for @family.
28772 * Returns: a new #GInetAddress corresponding to the loopback address
28778 * g_inet_address_to_bytes: (skip)
28779 * @address: a #GInetAddress
28781 * Gets the raw binary address data from @address.
28783 * which should not be modified, stored, or freed. The size of this
28784 * array can be gotten with g_inet_address_get_native_size().
28786 * Returns: a pointer to an internal array of the bytes in @address,
28792 * g_inet_address_to_string:
28793 * @address: a #GInetAddress
28795 * Converts @address to string form.
28799 * Returns: a representation of @address as a string, which should be
28805 * g_inet_socket_address_get_address:
28806 * @address: a #GInetSocketAddress
28808 * Gets @address's #GInetAddress.
28810 * g_object_ref()'d if it will be stored
28812 * Returns: (transfer none): the #GInetAddress for @address, which must be
28818 * g_inet_socket_address_get_port:
28819 * @address: a #GInetSocketAddress
28821 * Gets @address's port.
28823 * Returns: the port for @address
28829 * g_inet_socket_address_new:
28830 * @address: a #GInetAddress
28831 * @port: a port number
28833 * Creates a new #GInetSocketAddress for @address and @port.
28835 * Returns: a new #GInetSocketAddress
28842 * @initable: a #GInitable.
28843 * @cancellable: optional #GCancellable object, %NULL to ignore.
28844 * @error: a #GError location to store the error occurring, or %NULL to ignore.
28846 * Initializes the object implementing the interface.
28848 * The object must be initialized before any real use after initial
28849 * construction, either with this function or g_async_initable_init_async().
28851 * Implementations may also support cancellation. If @cancellable is not %NULL,
28852 * then initialization can be cancelled by triggering the cancellable object
28853 * from another thread. If the operation was cancelled, the error
28854 * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
28855 * the object doesn't support cancellable initialization the error
28856 * %G_IO_ERROR_NOT_SUPPORTED will be returned.
28858 * If the object is not initialized, or initialization returns with an
28859 * error, then all operations on the object except g_object_ref() and
28860 * g_object_unref() are considered to be invalid, and have undefined
28861 * behaviour. See the <xref linkend="ginitable"/> section introduction
28862 * for more details.
28864 * Implementations of this method must be idempotent, i.e. multiple calls
28865 * to this function with the same argument should return the same results.
28866 * Only the first call initializes the object, further calls return the result
28867 * of the first call. This is so that it's safe to implement the singleton
28868 * pattern in the GObject constructor function.
28870 * return %FALSE and set @error appropriately if present.
28872 * Returns: %TRUE if successful. If an error has occurred, this function will
28879 * @object_type: a #GType supporting #GInitable.
28880 * @cancellable: optional #GCancellable object, %NULL to ignore.
28881 * @error: a #GError location to store the error occurring, or %NULL to ignore.
28882 * @first_property_name: the name of the first property, or %NULL if no properties
28883 * @...: the value if the first property, followed by and other property value pairs, and ended by %NULL.
28885 * Helper function for constructing #GInitiable object. This is
28886 * similar to g_object_new() but also initializes the object
28887 * and returns %NULL, setting an error on failure.
28889 * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
28895 * g_initable_new_valist:
28896 * @object_type: a #GType supporting #GInitable.
28897 * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
28898 * @var_args: The var args list generated from @first_property_name.
28899 * @cancellable: optional #GCancellable object, %NULL to ignore.
28900 * @error: a #GError location to store the error occurring, or %NULL to ignore.
28902 * Helper function for constructing #GInitiable object. This is
28903 * similar to g_object_new_valist() but also initializes the object
28904 * and returns %NULL, setting an error on failure.
28906 * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
28913 * @object_type: a #GType supporting #GInitable.
28914 * @n_parameters: the number of parameters in @parameters
28915 * @parameters: (array length=n_parameters): the parameters to use to construct the object
28916 * @cancellable: optional #GCancellable object, %NULL to ignore.
28917 * @error: a #GError location to store the error occurring, or %NULL to ignore.
28919 * Helper function for constructing #GInitiable object. This is
28920 * similar to g_object_newv() but also initializes the object
28921 * and returns %NULL, setting an error on failure.
28923 * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
28929 * g_input_stream_clear_pending:
28930 * @stream: input stream
28932 * Clears the pending flag on @stream.
28937 * g_input_stream_close:
28938 * @stream: A #GInputStream.
28939 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28940 * @error: location to store the error occurring, or %NULL to ignore
28942 * Closes the stream, releasing resources related to it.
28944 * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
28945 * Closing a stream multiple times will not return an error.
28947 * Streams will be automatically closed when the last reference
28948 * is dropped, but you might want to call this function to make sure
28949 * resources are released as early as possible.
28951 * Some streams might keep the backing store of the stream (e.g. a file descriptor)
28952 * open after the stream is closed. See the documentation for the individual
28953 * stream for details.
28955 * On failure the first error that happened will be reported, but the close
28956 * operation will finish as much as possible. A stream that failed to
28957 * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
28958 * is important to check and report the error to the user.
28960 * If @cancellable is not NULL, then the operation can be cancelled by
28961 * triggering the cancellable object from another thread. If the operation
28962 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
28963 * Cancelling a close will still leave the stream closed, but some streams
28964 * can use a faster close that doesn't block to e.g. check errors.
28966 * Returns: %TRUE on success, %FALSE on failure
28971 * g_input_stream_close_async:
28972 * @stream: A #GInputStream.
28973 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
28974 * @cancellable: (allow-none): optional cancellable object
28975 * @callback: (scope async): callback to call when the request is satisfied
28976 * @user_data: (closure): the data to pass to callback function
28978 * Requests an asynchronous closes of the stream, releasing resources related to it.
28979 * When the operation is finished @callback will be called.
28980 * You can then call g_input_stream_close_finish() to get the result of the
28983 * For behaviour details see g_input_stream_close().
28985 * The asyncronous methods have a default fallback that uses threads to implement
28986 * asynchronicity, so they are optional for inheriting classes. However, if you
28987 * override one you must override all.
28992 * g_input_stream_close_finish:
28993 * @stream: a #GInputStream.
28994 * @result: a #GAsyncResult.
28995 * @error: a #GError location to store the error occurring, or %NULL to ignore.
28997 * Finishes closing a stream asynchronously, started from g_input_stream_close_async().
28999 * Returns: %TRUE if the stream was closed successfully.
29004 * g_input_stream_has_pending:
29005 * @stream: input stream.
29007 * Checks if an input stream has pending actions.
29009 * Returns: %TRUE if @stream has pending actions.
29014 * g_input_stream_is_closed:
29015 * @stream: input stream.
29017 * Checks if an input stream is closed.
29019 * Returns: %TRUE if the stream is closed.
29024 * g_input_stream_read:
29025 * @stream: a #GInputStream.
29026 * @buffer: a buffer to read data into (which should be at least count bytes long).
29027 * @count: the number of bytes that will be read from the stream
29028 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29029 * @error: location to store the error occurring, or %NULL to ignore
29031 * Tries to read @count bytes from the stream into the buffer starting at
29032 * @buffer. Will block during this read.
29034 * If count is zero returns zero and does nothing. A value of @count
29035 * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
29037 * On success, the number of bytes read into the buffer is returned.
29038 * It is not an error if this is not the same as the requested size, as it
29039 * can happen e.g. near the end of a file. Zero is returned on end of file
29040 * (or if @count is zero), but never otherwise.
29042 * If @cancellable is not NULL, then the operation can be cancelled by
29043 * triggering the cancellable object from another thread. If the operation
29044 * was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an
29045 * operation was partially finished when the operation was cancelled the
29046 * partial result will be returned, without an error.
29048 * On error -1 is returned and @error is set accordingly.
29050 * Returns: Number of bytes read, or -1 on error
29055 * g_input_stream_read_all:
29056 * @stream: a #GInputStream.
29057 * @buffer: a buffer to read data into (which should be at least count bytes long).
29058 * @count: the number of bytes that will be read from the stream
29059 * @bytes_read: (out): location to store the number of bytes that was read from the stream
29060 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29061 * @error: location to store the error occurring, or %NULL to ignore
29063 * Tries to read @count bytes from the stream into the buffer starting at
29064 * @buffer. Will block during this read.
29066 * This function is similar to g_input_stream_read(), except it tries to
29067 * read as many bytes as requested, only stopping on an error or end of stream.
29069 * On a successful read of @count bytes, or if we reached the end of the
29070 * stream, %TRUE is returned, and @bytes_read is set to the number of bytes
29071 * read into @buffer.
29073 * If there is an error during the operation %FALSE is returned and @error
29074 * is set to indicate the error status, @bytes_read is updated to contain
29075 * the number of bytes read into @buffer before the error occurred.
29077 * Returns: %TRUE on success, %FALSE if there was an error
29082 * g_input_stream_read_async:
29083 * @stream: A #GInputStream.
29084 * @buffer: a buffer to read data into (which should be at least count bytes long).
29085 * @count: the number of bytes that will be read from the stream
29086 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
29087 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29088 * @callback: (scope async): callback to call when the request is satisfied
29089 * @user_data: (closure): the data to pass to callback function
29091 * Request an asynchronous read of @count bytes from the stream into the buffer
29092 * starting at @buffer. When the operation is finished @callback will be called.
29093 * You can then call g_input_stream_read_finish() to get the result of the
29096 * During an async request no other sync and async calls are allowed on @stream, and will
29097 * result in %G_IO_ERROR_PENDING errors.
29099 * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
29101 * On success, the number of bytes read into the buffer will be passed to the
29102 * callback. It is not an error if this is not the same as the requested size, as it
29103 * can happen e.g. near the end of a file, but generally we try to read
29104 * as many bytes as requested. Zero is returned on end of file
29105 * (or if @count is zero), but never otherwise.
29107 * Any outstanding i/o request with higher priority (lower numerical value) will
29108 * be executed before an outstanding request with lower priority. Default
29109 * priority is %G_PRIORITY_DEFAULT.
29111 * The asyncronous methods have a default fallback that uses threads to implement
29112 * asynchronicity, so they are optional for inheriting classes. However, if you
29113 * override one you must override all.
29118 * g_input_stream_read_finish:
29119 * @stream: a #GInputStream.
29120 * @result: a #GAsyncResult.
29121 * @error: a #GError location to store the error occurring, or %NULL to ignore.
29123 * Finishes an asynchronous stream read operation.
29125 * Returns: number of bytes read in, or -1 on error.
29130 * g_input_stream_set_pending:
29131 * @stream: input stream
29132 * @error: a #GError location to store the error occurring, or %NULL to ignore.
29134 * Sets @stream to have actions pending. If the pending flag is
29135 * already set or @stream is closed, it will return %FALSE and set
29138 * Returns: %TRUE if pending was previously unset and is now set.
29143 * g_input_stream_skip:
29144 * @stream: a #GInputStream.
29145 * @count: the number of bytes that will be skipped from the stream
29146 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29147 * @error: location to store the error occurring, or %NULL to ignore
29149 * Tries to skip @count bytes from the stream. Will block during the operation.
29151 * This is identical to g_input_stream_read(), from a behaviour standpoint,
29152 * but the bytes that are skipped are not returned to the user. Some
29153 * streams have an implementation that is more efficient than reading the data.
29155 * This function is optional for inherited classes, as the default implementation
29156 * emulates it using read.
29158 * If @cancellable is not %NULL, then the operation can be cancelled by
29159 * triggering the cancellable object from another thread. If the operation
29160 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
29161 * operation was partially finished when the operation was cancelled the
29162 * partial result will be returned, without an error.
29164 * Returns: Number of bytes skipped, or -1 on error
29169 * g_input_stream_skip_async:
29170 * @stream: A #GInputStream.
29171 * @count: the number of bytes that will be skipped from the stream
29172 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
29173 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29174 * @callback: (scope async): callback to call when the request is satisfied
29175 * @user_data: (closure): the data to pass to callback function
29177 * Request an asynchronous skip of @count bytes from the stream.
29178 * When the operation is finished @callback will be called.
29179 * You can then call g_input_stream_skip_finish() to get the result
29180 * of the operation.
29182 * During an async request no other sync and async calls are allowed,
29183 * and will result in %G_IO_ERROR_PENDING errors.
29185 * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
29187 * On success, the number of bytes skipped will be passed to the callback.
29188 * It is not an error if this is not the same as the requested size, as it
29189 * can happen e.g. near the end of a file, but generally we try to skip
29190 * as many bytes as requested. Zero is returned on end of file
29191 * (or if @count is zero), but never otherwise.
29193 * Any outstanding i/o request with higher priority (lower numerical value)
29194 * will be executed before an outstanding request with lower priority.
29195 * Default priority is %G_PRIORITY_DEFAULT.
29197 * The asynchronous methods have a default fallback that uses threads to
29198 * implement asynchronicity, so they are optional for inheriting classes.
29199 * However, if you override one, you must override all.
29204 * g_input_stream_skip_finish:
29205 * @stream: a #GInputStream.
29206 * @result: a #GAsyncResult.
29207 * @error: a #GError location to store the error occurring, or %NULL to ignore.
29209 * Finishes a stream skip operation.
29211 * Returns: the size of the bytes skipped, or %-1 on error.
29216 * g_io_error_from_errno:
29217 * @err_no: Error number as defined in errno.h.
29219 * Converts errno.h error codes into GIO error codes.
29221 * Returns: #GIOErrorEnum value for the given errno.h error number.
29226 * g_io_error_from_win32_error:
29227 * @error_code: Windows error number.
29229 * Converts some common error codes into GIO error codes. The
29230 * fallback value G_IO_ERROR_FAILED is returned for error codes not
29233 * Returns: #GIOErrorEnum value for the given error number.
29239 * g_io_error_quark:
29241 * Gets the GIO Error Quark.
29243 * Returns: a #GQuark.
29248 * g_io_extension_get_name:
29249 * @extension: a #GIOExtension
29251 * Gets the name under which @extension was registered.
29253 * Note that the same type may be registered as extension
29254 * for multiple extension points, under different names.
29256 * Returns: the name of @extension.
29261 * g_io_extension_get_priority:
29262 * @extension: a #GIOExtension
29264 * Gets the priority with which @extension was registered.
29266 * Returns: the priority of @extension
29271 * g_io_extension_get_type:
29272 * @extension: a #GIOExtension
29274 * Gets the type associated with @extension.
29276 * Returns: the type of @extension
29281 * g_io_extension_point_get_extension_by_name:
29282 * @extension_point: a #GIOExtensionPoint
29283 * @name: the name of the extension to get
29285 * Finds a #GIOExtension for an extension point by name.
29287 * given name, or %NULL if there is no extension with that name
29289 * Returns: (transfer none): the #GIOExtension for @extension_point that has the
29294 * g_io_extension_point_get_extensions:
29295 * @extension_point: a #GIOExtensionPoint
29297 * Gets a list of all extensions that implement this extension point.
29298 * The list is sorted by priority, beginning with the highest priority.
29300 * #GIOExtension<!-- -->s. The list is owned by GIO and should not be
29303 * Returns: (element-type GIOExtension) (transfer none): a #GList of
29308 * g_io_extension_point_get_required_type:
29309 * @extension_point: a #GIOExtensionPoint
29311 * Gets the required type for @extension_point.
29313 * or #G_TYPE_INVALID if the extension point has no required type
29315 * Returns: the #GType that all implementations must have,
29320 * g_io_extension_point_implement:
29321 * @extension_point_name: the name of the extension point
29322 * @type: the #GType to register as extension
29323 * @extension_name: the name for the extension
29324 * @priority: the priority for the extension
29326 * Registers @type as extension for the extension point with name
29327 * @extension_point_name.
29329 * If @type has already been registered as an extension for this
29330 * extension point, the existing #GIOExtension object is returned.
29332 * Returns: (transfer none): a #GIOExtension object for #GType
29337 * g_io_extension_point_lookup:
29338 * @name: the name of the extension point
29340 * Looks up an existing extension point.
29342 * is no registered extension point with the given name.
29344 * Returns: (transfer none): the #GIOExtensionPoint, or %NULL if there
29349 * g_io_extension_point_register:
29350 * @name: The name of the extension point
29352 * Registers an extension point.
29354 * owned by GIO and should not be freed.
29356 * Returns: (transfer none): the new #GIOExtensionPoint. This object is
29361 * g_io_extension_point_set_required_type:
29362 * @extension_point: a #GIOExtensionPoint
29363 * @type: the #GType to require
29365 * Sets the required type for @extension_point to @type.
29366 * All implementations must henceforth have this type.
29371 * g_io_extension_ref_class:
29372 * @extension: a #GIOExtension
29374 * Gets a reference to the class for the type that is
29375 * associated with @extension.
29377 * Returns: (transfer full): the #GTypeClass for the type of @extension
29382 * g_io_module_load:
29383 * @module: a #GIOModule.
29385 * Required API for GIO modules to implement.
29386 * This function is ran after the module has been loaded into GIO,
29387 * to initialize the module.
29393 * @filename: filename of the shared library module.
29395 * Creates a new GIOModule that will load the specific
29396 * shared library when in use.
29398 * or %NULL on error.
29400 * Returns: a #GIOModule from given @filename,
29405 * g_io_module_query:
29407 * Optional API for GIO modules to implement.
29409 * Should return a list of all the extension points that may be
29410 * implemented in this module.
29412 * This method will not be called in normal use, however it may be
29413 * called when probing existing modules and recording which extension
29414 * points that this model is used for. This means we won't have to
29415 * load and initialze this module unless its needed.
29417 * If this function is not implemented by the module the module will
29418 * always be loaded, initialized and then unloaded on application startup
29419 * so that it can register its extension points during init.
29421 * Note that a module need not actually implement all the extension points
29422 * that g_io_module_query returns, since the exact list of extension may
29423 * depend on runtime issues. However all extension points actually implemented
29424 * must be returned by g_io_module_query() (if defined).
29426 * When installing a module that implements g_io_module_query you must
29427 * run gio-querymodules in order to build the cache files required for
29430 * extension points of the module. The array must be suitable for
29431 * freeing with g_strfreev().
29433 * Returns: (transfer full): A %NULL-terminated array of strings, listing the supported
29439 * g_io_module_scope_block:
29440 * @scope: a module loading scope
29441 * @basename: the basename to block
29443 * Block modules with the given @basename from being loaded when
29444 * this scope is used with g_io_modules_scan_all_in_directory_with_scope()
29445 * or g_io_modules_load_all_in_directory_with_scope().
29452 * g_io_module_scope_free:
29453 * @scope: a module loading scope
29455 * Free a module scope.
29462 * g_io_module_scope_new:
29463 * @flags: flags for the new scope
29465 * Create a new scope for loading of IO modules. A scope can be used for
29466 * blocking duplicate modules, or blocking a module you don't want to load.
29468 * Specify the %G_IO_MODULES_SCOPE_BLOCK_DUPLICATES flag to block modules
29469 * which have the same base name as a module that has already been seen
29472 * Returns: (transfer full): the new module scope
29478 * g_io_module_unload:
29479 * @module: a #GIOModule.
29481 * Required API for GIO modules to implement.
29482 * This function is ran when the module is being unloaded from GIO,
29483 * to finalize the module.
29488 * g_io_modules_load_all_in_directory:
29489 * @dirname: pathname for a directory containing modules to load.
29491 * Loads all the modules in the specified directory.
29493 * If don't require all modules to be initialized (and thus registering
29494 * all gtypes) then you can use g_io_modules_scan_all_in_directory()
29495 * which allows delayed/lazy loading of modules.
29497 * from the directory,
29498 * All the modules are loaded into memory, if you want to
29499 * unload them (enabling on-demand loading) you must call
29500 * g_type_module_unuse() on all the modules. Free the list
29501 * with g_list_free().
29503 * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded
29508 * g_io_modules_load_all_in_directory_with_scope:
29509 * @dirname: pathname for a directory containing modules to load.
29510 * @scope: a scope to use when scanning the modules.
29512 * Loads all the modules in the specified directory.
29514 * If don't require all modules to be initialized (and thus registering
29515 * all gtypes) then you can use g_io_modules_scan_all_in_directory()
29516 * which allows delayed/lazy loading of modules.
29518 * from the directory,
29519 * All the modules are loaded into memory, if you want to
29520 * unload them (enabling on-demand loading) you must call
29521 * g_type_module_unuse() on all the modules. Free the list
29522 * with g_list_free().
29524 * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded
29530 * g_io_modules_scan_all_in_directory:
29531 * @dirname: pathname for a directory containing modules to scan.
29533 * Scans all the modules in the specified directory, ensuring that
29534 * any extension point implemented by a module is registered.
29536 * This may not actually load and initialize all the types in each
29537 * module, some modules may be lazily loaded and initialized when
29538 * an extension point it implementes is used with e.g.
29539 * g_io_extension_point_get_extensions() or
29540 * g_io_extension_point_get_extension_by_name().
29542 * If you need to guarantee that all types are loaded in all the modules,
29543 * use g_io_modules_load_all_in_directory().
29550 * g_io_modules_scan_all_in_directory_with_scope:
29551 * @dirname: pathname for a directory containing modules to scan.
29552 * @scope: a scope to use when scanning the modules
29554 * Scans all the modules in the specified directory, ensuring that
29555 * any extension point implemented by a module is registered.
29557 * This may not actually load and initialize all the types in each
29558 * module, some modules may be lazily loaded and initialized when
29559 * an extension point it implementes is used with e.g.
29560 * g_io_extension_point_get_extensions() or
29561 * g_io_extension_point_get_extension_by_name().
29563 * If you need to guarantee that all types are loaded in all the modules,
29564 * use g_io_modules_load_all_in_directory().
29571 * g_io_scheduler_cancel_all_jobs:
29573 * Cancels all cancellable I/O jobs.
29575 * A job is cancellable if a #GCancellable was passed into
29576 * g_io_scheduler_push_job().
29581 * g_io_scheduler_job_send_to_mainloop:
29582 * @job: a #GIOSchedulerJob
29583 * @func: a #GSourceFunc callback that will be called in the original thread
29584 * @user_data: data to pass to @func
29585 * @notify: a #GDestroyNotify for @user_data, or %NULL
29587 * Used from an I/O job to send a callback to be run in the thread
29588 * that the job was started from, waiting for the result (and thus
29589 * blocking the I/O job).
29591 * Returns: The return value of @func
29596 * g_io_scheduler_job_send_to_mainloop_async:
29597 * @job: a #GIOSchedulerJob
29598 * @func: a #GSourceFunc callback that will be called in the original thread
29599 * @user_data: data to pass to @func
29600 * @notify: a #GDestroyNotify for @user_data, or %NULL
29602 * Used from an I/O job to send a callback to be run asynchronously in
29603 * the thread that the job was started from. The callback will be run
29604 * when the main loop is available, but at that time the I/O job might
29605 * have finished. The return value from the callback is ignored.
29607 * Note that if you are passing the @user_data from g_io_scheduler_push_job()
29608 * on to this function you have to ensure that it is not freed before
29609 * @func is called, either by passing %NULL as @notify to
29610 * g_io_scheduler_push_job() or by using refcounting for @user_data.
29615 * g_io_scheduler_push_job:
29616 * @job_func: a #GIOSchedulerJobFunc.
29617 * @user_data: data to pass to @job_func
29618 * @notify: a #GDestroyNotify for @user_data, or %NULL
29619 * @io_priority: the <link linkend="gioscheduler">I/O priority</link> of the request.
29620 * @cancellable: optional #GCancellable object, %NULL to ignore.
29622 * Schedules the I/O job to run in another thread.
29624 * @notify will be called on @user_data after @job_func has returned,
29625 * regardless whether the job was cancelled or has run to completion.
29627 * If @cancellable is not %NULL, it can be used to cancel the I/O job
29628 * by calling g_cancellable_cancel() or by calling
29629 * g_io_scheduler_cancel_all_jobs().
29634 * g_io_stream_clear_pending:
29635 * @stream: a #GIOStream
29637 * Clears the pending flag on @stream.
29644 * g_io_stream_close:
29645 * @stream: a #GIOStream
29646 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
29647 * @error: location to store the error occurring, or %NULL to ignore
29649 * Closes the stream, releasing resources related to it. This will also
29650 * closes the individual input and output streams, if they are not already
29653 * Once the stream is closed, all other operations will return
29654 * %G_IO_ERROR_CLOSED. Closing a stream multiple times will not
29657 * Closing a stream will automatically flush any outstanding buffers
29660 * Streams will be automatically closed when the last reference
29661 * is dropped, but you might want to call this function to make sure
29662 * resources are released as early as possible.
29664 * Some streams might keep the backing store of the stream (e.g. a file
29665 * descriptor) open after the stream is closed. See the documentation for
29666 * the individual stream for details.
29668 * On failure the first error that happened will be reported, but the
29669 * close operation will finish as much as possible. A stream that failed
29670 * to close will still return %G_IO_ERROR_CLOSED for all operations.
29671 * Still, it is important to check and report the error to the user,
29672 * otherwise there might be a loss of data as all data might not be written.
29674 * If @cancellable is not NULL, then the operation can be cancelled by
29675 * triggering the cancellable object from another thread. If the operation
29676 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
29677 * Cancelling a close will still leave the stream closed, but some streams
29678 * can use a faster close that doesn't block to e.g. check errors.
29680 * The default implementation of this method just calls close on the
29681 * individual input/output streams.
29683 * Returns: %TRUE on success, %FALSE on failure
29689 * g_io_stream_close_async:
29690 * @stream: a #GIOStream
29691 * @io_priority: the io priority of the request
29692 * @cancellable: (allow-none): optional cancellable object
29693 * @callback: (scope async): callback to call when the request is satisfied
29694 * @user_data: (closure): the data to pass to callback function
29696 * Requests an asynchronous close of the stream, releasing resources
29697 * related to it. When the operation is finished @callback will be
29698 * called. You can then call g_io_stream_close_finish() to get
29699 * the result of the operation.
29701 * For behaviour details see g_io_stream_close().
29703 * The asynchronous methods have a default fallback that uses threads
29704 * to implement asynchronicity, so they are optional for inheriting
29705 * classes. However, if you override one you must override all.
29712 * g_io_stream_close_finish:
29713 * @stream: a #GIOStream
29714 * @result: a #GAsyncResult
29715 * @error: a #GError location to store the error occurring, or %NULL to ignore
29719 * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
29725 * g_io_stream_get_input_stream:
29726 * @stream: a #GIOStream
29728 * Gets the input stream for this object. This is used
29733 * Returns: (transfer none): a #GInputStream, owned by the #GIOStream.
29739 * g_io_stream_get_output_stream:
29740 * @stream: a #GIOStream
29742 * Gets the output stream for this object. This is used for
29747 * Returns: (transfer none): a #GOutputStream, owned by the #GIOStream.
29753 * g_io_stream_has_pending:
29754 * @stream: a #GIOStream
29756 * Checks if a stream has pending actions.
29758 * Returns: %TRUE if @stream has pending actions.
29764 * g_io_stream_is_closed:
29765 * @stream: a #GIOStream
29767 * Checks if a stream is closed.
29769 * Returns: %TRUE if the stream is closed.
29775 * g_io_stream_set_pending:
29776 * @stream: a #GIOStream
29777 * @error: a #GError location to store the error occurring, or %NULL to ignore
29779 * Sets @stream to have actions pending. If the pending flag is
29780 * already set or @stream is closed, it will return %FALSE and set
29783 * Returns: %TRUE if pending was previously unset and is now set.
29789 * g_io_stream_splice_async:
29790 * @stream1: a #GIOStream.
29791 * @stream2: a #GIOStream.
29792 * @flags: a set of #GIOStreamSpliceFlags.
29793 * @io_priority: the io priority of the request.
29794 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29795 * @callback: (scope async): a #GAsyncReadyCallback.
29796 * @user_data: (closure): user data passed to @callback.
29798 * Asyncronously splice the output stream of @stream1 to the input stream of
29799 * @stream2, and splice the output stream of @stream2 to the input stream of
29802 * When the operation is finished @callback will be called.
29803 * You can then call g_io_stream_splice_finish() to get the
29804 * result of the operation.
29811 * g_io_stream_splice_finish:
29812 * @result: a #GAsyncResult.
29813 * @error: a #GError location to store the error occurring, or %NULL to ignore.
29815 * Finishes an asynchronous io stream splice operation.
29817 * Returns: %TRUE on success, %FALSE otherwise.
29823 * g_keyfile_settings_backend_new:
29824 * @filename: the filename of the keyfile
29825 * @root_path: the path under which all settings keys appear
29826 * @root_group: (allow-none): the group name corresponding to @root_path, or %NULL
29828 * Creates a keyfile-backed #GSettingsBackend.
29830 * The filename of the keyfile to use is given by @filename.
29832 * All settings read to or written from the backend must fall under the
29833 * path given in @root_path (which must start and end with a slash and
29834 * not contain two consecutive slashes). @root_path may be "/".
29836 * If @root_group is non-%NULL then it specifies the name of the keyfile
29837 * group used for keys that are written directly below @root_path. For
29838 * example, if @root_path is "/apps/example/" and @root_group is
29839 * "toplevel", then settings the key "/apps/example/enabled" to a value
29840 * of %TRUE will cause the following to appear in the keyfile:
29847 * If @root_group is %NULL then it is not permitted to store keys
29848 * directly below the @root_path.
29850 * For keys not stored directly below @root_path (ie: in a sub-path),
29851 * the name of the subpath (with the final slash stripped) is used as
29852 * the name of the keyfile group. To continue the example, if
29853 * "/apps/example/profiles/default/font-size" were set to
29854 * 12 then the following would appear in the keyfile:
29857 * [profiles/default]
29861 * The backend will refuse writes (and return writability as being
29862 * %FALSE) for keys outside of @root_path and, in the event that
29863 * @root_group is %NULL, also for keys directly under @root_path.
29864 * Writes will also be refused if the backend detects that it has the
29865 * inability to rewrite the keyfile (ie: the containing directory is not
29868 * There is no checking done for your key namespace clashing with the
29869 * syntax of the key file format. For example, if you have '[' or ']'
29870 * characters in your path names or '=' in your key names you may be in
29873 * Returns: (transfer full): a keyfile-backed #GSettingsBackend
29878 * g_loadable_icon_load:
29879 * @icon: a #GLoadableIcon.
29880 * @size: an integer.
29881 * @type: (out) (allow-none): a location to store the type of the loaded icon, %NULL to ignore.
29882 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29883 * @error: a #GError location to store the error occurring, or %NULL to ignore.
29885 * Loads a loadable icon. For the asynchronous version of this function,
29886 * see g_loadable_icon_load_async().
29888 * Returns: (transfer full): a #GInputStream to read the icon from.
29893 * g_loadable_icon_load_async:
29894 * @icon: a #GLoadableIcon.
29895 * @size: an integer.
29896 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29897 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
29898 * @user_data: (closure): the data to pass to callback function
29900 * Loads an icon asynchronously. To finish this function, see
29901 * g_loadable_icon_load_finish(). For the synchronous, blocking
29902 * version of this function, see g_loadable_icon_load().
29907 * g_loadable_icon_load_finish:
29908 * @icon: a #GLoadableIcon.
29909 * @res: a #GAsyncResult.
29910 * @type: a location to store the type of the loaded icon, %NULL to ignore.
29911 * @error: a #GError location to store the error occurring, or %NULL to ignore.
29913 * Finishes an asynchronous icon load started in g_loadable_icon_load_async().
29915 * Returns: (transfer full): a #GInputStream to read the icon from.
29922 * Returns a new #GVfs handle for a local vfs.
29924 * Returns: a new #GVfs handle.
29930 * @loop: a #GMainLoop
29932 * Frees the memory allocated for the #GMainLoop.
29934 * Deprecated: 2.2: Use g_main_loop_unref() instead
29939 * g_main_is_running:
29940 * @loop: a #GMainLoop
29942 * Checks if the main loop is running.
29944 * Returns: %TRUE if the main loop is running
29945 * Deprecated: 2.2: Use g_main_loop_is_running() instead
29950 * g_main_iteration:
29951 * @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.
29953 * Runs a single iteration for the default #GMainContext.
29955 * Returns: %TRUE if more events are pending.
29956 * Deprecated: 2.2: Use g_main_context_iteration() instead.
29962 * @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.
29964 * Creates a new #GMainLoop for th default main context.
29966 * Returns: a new #GMainLoop
29967 * Deprecated: 2.2: Use g_main_loop_new() instead
29974 * Checks if any events are pending for the default #GMainContext
29975 * (i.e. ready to be processed).
29978 * Deprected: 2.2: Use g_main_context_pending() instead.
29980 * Returns: %TRUE if any events are pending.
29986 * @loop: a #GMainLoop
29988 * Stops the #GMainLoop.
29989 * If g_main_run() was called to run the #GMainLoop, it will now return.
29991 * Deprecated: 2.2: Use g_main_loop_quit() instead
29997 * @loop: a #GMainLoop
29999 * Runs a main loop until it stops running.
30001 * Deprecated: 2.2: Use g_main_loop_run() instead
30006 * g_main_set_poll_func:
30007 * @func: the function to call to poll all file descriptors
30009 * Sets the function to use for the handle polling of file descriptors
30010 * for the default main context.
30012 * Deprecated: 2.2: Use g_main_context_set_poll_func() again
30017 * g_memory_input_stream_add_data:
30018 * @stream: a #GMemoryInputStream
30019 * @data: (array length=len) (element-type guint8) (transfer full): input data
30020 * @len: length of the data, may be -1 if @data is a nul-terminated string
30021 * @destroy: (allow-none): function that is called to free @data, or %NULL
30023 * Appends @data to data that can be read from the input stream
30028 * g_memory_input_stream_new:
30030 * Creates a new empty #GMemoryInputStream.
30032 * Returns: a new #GInputStream
30037 * g_memory_input_stream_new_from_data:
30038 * @data: (array length=len) (element-type guint8) (transfer full): input data
30039 * @len: length of the data, may be -1 if @data is a nul-terminated string
30040 * @destroy: (allow-none): function that is called to free @data, or %NULL
30042 * Creates a new #GMemoryInputStream with data in memory of a given size.
30044 * Returns: new #GInputStream read from @data of @len bytes.
30049 * g_memory_output_stream_get_data:
30050 * @ostream: a #GMemoryOutputStream
30052 * Gets any loaded data from the @ostream.
30054 * Note that the returned pointer may become invalid on the next
30055 * write or truncate operation on the stream.
30057 * Returns: (transfer none): pointer to the stream's data
30062 * g_memory_output_stream_get_data_size:
30063 * @ostream: a #GMemoryOutputStream
30065 * Returns the number of bytes from the start up
30066 * to including the last byte written in the stream
30067 * that has not been truncated away.
30069 * Returns: the number of bytes written to the stream
30075 * g_memory_output_stream_get_size:
30076 * @ostream: a #GMemoryOutputStream
30078 * Gets the size of the currently allocated data area (available from
30079 * g_memory_output_stream_get_data()). If the stream isn't
30080 * growable (no realloc was passed to g_memory_output_stream_new()) then
30081 * this is the maximum size of the stream and further writes
30082 * will return %G_IO_ERROR_NO_SPACE.
30084 * Note that for growable streams the returned size may become invalid on
30085 * the next write or truncate operation on the stream.
30087 * If you want the number of bytes currently written to the stream, use
30088 * g_memory_output_stream_get_data_size().
30090 * Returns: the number of bytes allocated for the data buffer
30095 * g_memory_output_stream_new: (skip)
30096 * @data: pointer to a chunk of memory to use, or %NULL
30097 * @size: the size of @data
30098 * @realloc_function: a function with realloc() semantics (like g_realloc()) to be called when @data needs to be grown, or %NULL
30099 * @destroy_function: a function to be called on @data when the stream is finalized, or %NULL
30101 * Creates a new #GMemoryOutputStream.
30103 * If @data is non-%NULL, the stream will use that for its internal storage.
30104 * If @realloc_fn is non-%NULL, it will be used for resizing the internal
30105 * storage when necessary. To construct a fixed-size output stream,
30106 * pass %NULL as @realloc_fn.
30109 * /* a stream that can grow */
30110 * stream = g_memory_output_stream_new (NULL, 0, realloc, free);
30112 * /* another stream that can grow */
30113 * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
30115 * /* a fixed-size stream */
30116 * data = malloc (200);
30117 * stream3 = g_memory_output_stream_new (data, 200, NULL, free);
30120 * Returns: A newly created #GMemoryOutputStream object.
30125 * g_memory_output_stream_steal_data:
30126 * @ostream: a #GMemoryOutputStream
30128 * Gets any loaded data from the @ostream. Ownership of the data
30129 * is transferred to the caller; when no longer needed it must be
30130 * freed using the free function set in @ostream's
30131 * #GMemoryOutputStream:destroy-function property.
30133 * @ostream must be closed before calling this function.
30135 * Returns: (transfer full): the stream's data
30141 * g_memory_settings_backend_new:
30143 * Creates a memory-backed #GSettingsBackend.
30145 * This backend allows changes to settings, but does not write them
30146 * to any backing storage, so the next time you run your application,
30147 * the memory backend will start out with the default values again.
30149 * Returns: (transfer full): a newly created #GSettingsBackend
30157 * @label: (allow-none): the section label, or %NULL
30158 * @detailed_action: (allow-none): the detailed action string, or %NULL
30160 * Convenience function for appending a normal menu item to the end of
30161 * @menu. Combine g_menu_new() and g_menu_insert_item() for a more
30162 * flexible alternative.
30169 * g_menu_append_item:
30171 * @item: a #GMenuItem to append
30173 * Appends @item to the end of @menu.
30175 * See g_menu_insert_item() for more information.
30182 * g_menu_append_section:
30184 * @label: (allow-none): the section label, or %NULL
30185 * @section: a #GMenuModel with the items of the section
30187 * Convenience function for appending a section menu item to the end of
30188 * @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for a
30189 * more flexible alternative.
30196 * g_menu_append_submenu:
30198 * @label: (allow-none): the section label, or %NULL
30199 * @submenu: a #GMenuModel with the items of the submenu
30201 * Convenience function for appending a submenu menu item to the end of
30202 * @menu. Combine g_menu_new_submenu() and g_menu_insert_item() for a
30203 * more flexible alternative.
30210 * g_menu_attribute_iter_get_name:
30211 * @iter: a #GMenuAttributeIter
30213 * Gets the name of the attribute at the current iterator position, as
30216 * The iterator is not advanced.
30218 * Returns: the name of the attribute
30224 * g_menu_attribute_iter_get_next:
30225 * @iter: a #GMenuAttributeIter
30226 * @out_name: (out) (allow-none) (transfer none): the type of the attribute
30227 * @value: (out) (allow-none) (transfer full): the attribute value
30229 * This function combines g_menu_attribute_iter_next() with
30230 * g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value().
30232 * First the iterator is advanced to the next (possibly first) attribute.
30233 * If that fails, then %FALSE is returned and there are no other
30236 * If successful, @name and @value are set to the name and value of the
30237 * attribute that has just been advanced to. At this point,
30238 * g_menu_item_get_name() and g_menu_item_get_value() will return the
30239 * same values again.
30241 * The value returned in @name remains valid for as long as the iterator
30242 * remains at the current position. The value returned in @value must
30243 * be unreffed using g_variant_unref() when it is no longer in use.
30247 * Returns: %TRUE on success, or %FALSE if there is no additional
30253 * g_menu_attribute_iter_get_value:
30254 * @iter: a #GMenuAttributeIter
30256 * Gets the value of the attribute at the current iterator position.
30258 * The iterator is not advanced.
30260 * Returns: (transfer full): the value of the current attribute
30266 * g_menu_attribute_iter_next:
30267 * @iter: a #GMenuAttributeIter
30269 * Attempts to advance the iterator to the next (possibly first)
30272 * %TRUE is returned on success, or %FALSE if there are no more
30275 * You must call this function when you first acquire the iterator
30276 * to advance it to the first attribute (and determine if the first
30277 * attribute exists at all).
30279 * Returns: %TRUE on success, or %FALSE when there are no more attributes
30288 * Marks @menu as frozen.
30290 * After the menu is frozen, it is an error to attempt to make any
30291 * changes to it. In effect this means that the #GMenu API must no
30294 * This function causes g_menu_model_is_mutable() to begin returning
30295 * %FALSE, which has some positive performance implications.
30304 * @position: the position at which to insert the item
30305 * @label: (allow-none): the section label, or %NULL
30306 * @detailed_action: (allow-none): the detailed action string, or %NULL
30308 * Convenience function for inserting a normal menu item into @menu.
30309 * Combine g_menu_new() and g_menu_insert_item() for a more flexible
30317 * g_menu_insert_item:
30319 * @position: the position at which to insert the item
30320 * @item: the #GMenuItem to insert
30322 * Inserts @item into @menu.
30324 * The "insertion" is actually done by copying all of the attribute and
30325 * link values of @item and using them to form a new item within @menu.
30326 * As such, @item itself is not really inserted, but rather, a menu item
30327 * that is exactly the same as the one presently described by @item.
30329 * This means that @item is essentially useless after the insertion
30330 * occurs. Any changes you make to it are ignored unless it is inserted
30331 * again (at which point its updated values will be copied).
30333 * You should probably just free @item once you're done.
30335 * There are many convenience functions to take care of common cases.
30336 * See g_menu_insert(), g_menu_insert_section() and
30337 * g_menu_insert_submenu() as well as "prepend" and "append" variants of
30338 * each of these functions.
30345 * g_menu_insert_section:
30347 * @position: the position at which to insert the item
30348 * @label: (allow-none): the section label, or %NULL
30349 * @section: a #GMenuModel with the items of the section
30351 * Convenience function for inserting a section menu item into @menu.
30352 * Combine g_menu_item_new_section() and g_menu_insert_item() for a more
30353 * flexible alternative.
30360 * g_menu_insert_submenu:
30362 * @position: the position at which to insert the item
30363 * @label: (allow-none): the section label, or %NULL
30364 * @submenu: a #GMenuModel with the items of the submenu
30366 * Convenience function for inserting a submenu menu item into @menu.
30367 * Combine g_menu_new_submenu() and g_menu_insert_item() for a more
30368 * flexible alternative.
30376 * @label: (allow-none): the section label, or %NULL
30377 * @detailed_action: (allow-none): the detailed action string, or %NULL
30379 * Creates a new #GMenuItem.
30381 * If @label is non-%NULL it is used to set the "label" attribute of the
30384 * If @detailed_action is non-%NULL it is used to set the "action" and
30385 * possibly the "target" attribute of the new item. See
30386 * g_menu_item_set_detailed_action() for more information.
30388 * Returns: a new #GMenuItem
30394 * g_menu_item_new_section:
30395 * @label: (allow-none): the section label, or %NULL
30396 * @section: a #GMenuModel with the items of the section
30398 * Creates a new #GMenuItem representing a section.
30400 * This is a convenience API around g_menu_item_new() and
30401 * g_menu_item_set_section().
30403 * The effect of having one menu appear as a section of another is
30404 * exactly as it sounds: the items from @section become a direct part of
30405 * the menu that @menu_item is added to.
30407 * Visual separation is typically displayed between two non-empty
30408 * sections. If @label is non-%NULL then it will be encorporated into
30409 * this visual indication. This allows for labeled subsections of a
30412 * As a simple example, consider a typical "Edit" menu from a simple
30413 * program. It probably contains an "Undo" and "Redo" item, followed by
30414 * a separator, followed by "Cut", "Copy" and "Paste".
30416 * This would be accomplished by creating three #GMenu instances. The
30417 * first would be populated with the "Undo" and "Redo" items, and the
30418 * second with the "Cut", "Copy" and "Paste" items. The first and
30419 * second menus would then be added as submenus of the third. In XML
30420 * format, this would look something like the following:
30422 * <informalexample><programlisting><![CDATA[
30423 * <menu id='edit-menu'>
30425 * <item label='Undo'/>
30426 * <item label='Redo'/>
30429 * <item label='Cut'/>
30430 * <item label='Copy'/>
30431 * <item label='Paste'/>
30434 * ]]></programlisting></informalexample>
30436 * The following example is exactly equivalent. It is more illustrative
30437 * of the exact relationship between the menus and items (keeping in
30438 * mind that the 'link' element defines a new menu that is linked to the
30439 * containing one). The style of the second example is more verbose and
30440 * difficult to read (and therefore not recommended except for the
30441 * purpose of understanding what is really going on).
30443 * <informalexample><programlisting><![CDATA[
30444 * <menu id='edit-menu'>
30446 * <link name='section'>
30447 * <item label='Undo'/>
30448 * <item label='Redo'/>
30452 * <link name='section'>
30453 * <item label='Cut'/>
30454 * <item label='Copy'/>
30455 * <item label='Paste'/>
30459 * ]]></programlisting></informalexample>
30461 * Returns: a new #GMenuItem
30467 * g_menu_item_new_submenu:
30468 * @label: (allow-none): the section label, or %NULL
30469 * @submenu: a #GMenuModel with the items of the submenu
30471 * Creates a new #GMenuItem representing a submenu.
30473 * This is a convenience API around g_menu_item_new() and
30474 * g_menu_item_set_submenu().
30476 * Returns: a new #GMenuItem
30482 * g_menu_item_set_action_and_target:
30483 * @menu_item: a #GMenuItem
30484 * @action: (allow-none): the name of the action for this item
30485 * @format_string: (allow-none): a GVariant format string
30486 * @...: positional parameters, as per @format_string
30488 * Sets or unsets the "action" and "target" attributes of @menu_item.
30490 * If @action is %NULL then both the "action" and "target" attributes
30491 * are unset (and @format_string is ignored along with the positional
30494 * If @action is non-%NULL then the "action" attribute is set.
30495 * @format_string is then inspected. If it is non-%NULL then the proper
30496 * position parameters are collected to create a #GVariant instance to
30497 * use as the target value. If it is %NULL then the positional
30498 * parameters are ignored and the "target" attribute is unset.
30500 * See also g_menu_item_set_action_and_target_value() for an equivalent
30501 * call that directly accepts a #GVariant. See
30502 * g_menu_item_set_detailed_action() for a more convenient version that
30503 * works with string-typed targets.
30505 * See also g_menu_item_set_action_and_target_value() for a
30506 * description of the semantics of the action and target attributes.
30513 * g_menu_item_set_action_and_target_value:
30514 * @menu_item: a #GMenuItem
30515 * @action: (allow-none): the name of the action for this item
30516 * @target_value: (allow-none): a #GVariant to use as the action target
30518 * Sets or unsets the "action" and "target" attributes of @menu_item.
30520 * If @action is %NULL then both the "action" and "target" attributes
30521 * are unset (and @target_value is ignored).
30523 * If @action is non-%NULL then the "action" attribute is set. The
30524 * "target" attribute is then set to the value of @target_value if it is
30525 * non-%NULL or unset otherwise.
30527 * Normal menu items (ie: not submenu, section or other custom item
30528 * types) are expected to have the "action" attribute set to identify
30529 * the action that they are associated with. The state type of the
30530 * action help to determine the disposition of the menu item. See
30531 * #GAction and #GActionGroup for an overview of actions.
30533 * In general, clicking on the menu item will result in activation of
30534 * the named action with the "target" attribute given as the parameter
30535 * to the action invocation. If the "target" attribute is not set then
30536 * the action is invoked with no parameter.
30538 * If the action has no state then the menu item is usually drawn as a
30539 * plain menu item (ie: with no additional decoration).
30541 * If the action has a boolean state then the menu item is usually drawn
30542 * as a toggle menu item (ie: with a checkmark or equivalent
30543 * indication). The item should be marked as 'toggled' or 'checked'
30544 * when the boolean state is %TRUE.
30546 * If the action has a string state then the menu item is usually drawn
30547 * as a radio menu item (ie: with a radio bullet or equivalent
30548 * indication). The item should be marked as 'selected' when the string
30549 * state is equal to the value of the @target property.
30551 * See g_menu_item_set_action_and_target() or
30552 * g_menu_item_set_detailed_action() for two equivalent calls that are
30553 * probably more convenient for most uses.
30560 * g_menu_item_set_attribute:
30561 * @menu_item: a #GMenuItem
30562 * @attribute: the attribute to set
30563 * @format_string: (allow-none): a #GVariant format string, or %NULL
30564 * @...: positional parameters, as per @format_string
30566 * Sets or unsets an attribute on @menu_item.
30568 * The attribute to set or unset is specified by @attribute. This
30569 * can be one of the standard attribute names %G_MENU_ATTRIBUTE_LABEL,
30570 * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, or a custom
30572 * Attribute names are restricted to lowercase characters, numbers
30573 * and '-'. Furthermore, the names must begin with a lowercase character,
30574 * must not end with a '-', and must not contain consecutive dashes.
30576 * If @format_string is non-%NULL then the proper position parameters
30577 * are collected to create a #GVariant instance to use as the attribute
30578 * value. If it is %NULL then the positional parameterrs are ignored
30579 * and the named attribute is unset.
30581 * See also g_menu_item_set_attribute_value() for an equivalent call
30582 * that directly accepts a #GVariant.
30589 * g_menu_item_set_attribute_value:
30590 * @menu_item: a #GMenuItem
30591 * @attribute: the attribute to set
30592 * @value: (allow-none): a #GVariant to use as the value, or %NULL
30594 * Sets or unsets an attribute on @menu_item.
30596 * The attribute to set or unset is specified by @attribute. This
30597 * can be one of the standard attribute names %G_MENU_ATTRIBUTE_LABEL,
30598 * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, or a custom
30600 * Attribute names are restricted to lowercase characters, numbers
30601 * and '-'. Furthermore, the names must begin with a lowercase character,
30602 * must not end with a '-', and must not contain consecutive dashes.
30604 * must consist only of lowercase
30605 * ASCII characters, digits and '-'.
30607 * If @value is non-%NULL then it is used as the new value for the
30608 * attribute. If @value is %NULL then the attribute is unset. If
30609 * the @value #GVariant is floating, it is consumed.
30611 * See also g_menu_item_set_attribute() for a more convenient way to do
30619 * g_menu_item_set_detailed_action:
30620 * @menu_item: a #GMenuItem
30621 * @detailed_action: the "detailed" action string
30623 * Sets the "action" and possibly the "target" attribute of @menu_item.
30625 * If @detailed_action contains a double colon ("::") then it is used as
30626 * a separator between an action name and a target string. In this
30627 * case, this call is equivalent to calling
30628 * g_menu_item_set_action_and_target() with the part before the "::" and
30629 * g_menu_item_set_target_value() with a string-type #GVariant
30630 * containing the part following the "::".
30632 * If @detailed_action doesn't contain "::" then the action is set to
30633 * the given string (verbatim) and the target value is unset.
30635 * See g_menu_item_set_action_and_target() or
30636 * g_menu_item_set_action_and_target_value() for more flexible (but
30637 * slightly less convenient) alternatives.
30639 * See also g_menu_set_action_and_target_value() for a description of
30640 * the semantics of the action and target attributes.
30647 * g_menu_item_set_label:
30648 * @menu_item: a #GMenuItem
30649 * @label: (allow-none): the label to set, or %NULL to unset
30651 * Sets or unsets the "label" attribute of @menu_item.
30653 * If @label is non-%NULL it is used as the label for the menu item. If
30654 * it is %NULL then the label attribute is unset.
30661 * g_menu_item_set_link:
30662 * @menu_item: a #GMenuItem
30663 * @link: type of link to establish or unset
30664 * @model: (allow-none): the #GMenuModel to link to (or %NULL to unset)
30666 * Creates a link from @menu_item to @model if non-%NULL, or unsets it.
30668 * Links are used to establish a relationship between a particular menu
30669 * item and another menu. For example, %G_MENU_LINK_SUBMENU is used to
30670 * associate a submenu with a particular menu item, and %G_MENU_LINK_SECTION
30671 * is used to create a section. Other types of link can be used, but there
30672 * is no guarantee that clients will be able to make sense of them.
30673 * Link types are restricted to lowercase characters, numbers
30674 * and '-'. Furthermore, the names must begin with a lowercase character,
30675 * must not end with a '-', and must not contain consecutive dashes.
30682 * g_menu_item_set_section:
30683 * @menu_item: a #GMenuItem
30684 * @section: (allow-none): a #GMenuModel, or %NULL
30686 * Sets or unsets the "section" link of @menu_item to @section.
30688 * The effect of having one menu appear as a section of another is
30689 * exactly as it sounds: the items from @section become a direct part of
30690 * the menu that @menu_item is added to. See g_menu_item_new_section()
30691 * for more information about what it means for a menu item to be a
30699 * g_menu_item_set_submenu:
30700 * @menu_item: a #GMenuItem
30701 * @submenu: (allow-none): a #GMenuModel, or %NULL
30703 * Sets or unsets the "submenu" link of @menu_item to @submenu.
30705 * If @submenu is non-%NULL, it is linked to. If it is %NULL then the
30708 * The effect of having one menu appear as a submenu of another is
30709 * exactly as it sounds.
30716 * g_menu_link_iter_get_name:
30717 * @iter: a #GMenuLinkIter
30719 * Gets the name of the link at the current iterator position.
30721 * The iterator is not advanced.
30723 * Returns: the type of the link
30729 * g_menu_link_iter_get_next:
30730 * @iter: a #GMenuLinkIter
30731 * @out_link: (out) (allow-none) (transfer none): the name of the link
30732 * @value: (out) (allow-none) (transfer full): the linked #GMenuModel
30734 * This function combines g_menu_link_iter_next() with
30735 * g_menu_link_iter_get_name() and g_menu_link_iter_get_value().
30737 * First the iterator is advanced to the next (possibly first) link.
30738 * If that fails, then %FALSE is returned and there are no other effects.
30740 * If successful, @out_link and @value are set to the name and #GMenuModel
30741 * of the link that has just been advanced to. At this point,
30742 * g_menu_item_get_name() and g_menu_item_get_value() will return the
30743 * same values again.
30745 * The value returned in @out_link remains valid for as long as the iterator
30746 * remains at the current position. The value returned in @value must
30747 * be unreffed using g_object_unref() when it is no longer in use.
30749 * Returns: %TRUE on success, or %FALSE if there is no additional link
30755 * g_menu_link_iter_get_value:
30756 * @iter: a #GMenuLinkIter
30758 * Gets the linked #GMenuModel at the current iterator position.
30760 * The iterator is not advanced.
30762 * Returns: (transfer full): the #GMenuModel that is linked to
30768 * g_menu_link_iter_next:
30769 * @iter: a #GMenuLinkIter
30771 * Attempts to advance the iterator to the next (possibly first)
30774 * %TRUE is returned on success, or %FALSE if there are no more links.
30776 * You must call this function when you first acquire the iterator to
30777 * advance it to the first link (and determine if the first link exists
30780 * Returns: %TRUE on success, or %FALSE when there are no more links
30786 * g_menu_markup_parser_end:
30787 * @context: a #GMarkupParseContext
30789 * Stop the parsing of a set of menus and return the #GHashTable.
30791 * The #GHashTable maps strings to #GObject instances. The parser only
30792 * adds #GMenu instances to the table, but it may contain other types if
30793 * a table was provided to g_menu_markup_parser_start().
30795 * This call should be matched with g_menu_markup_parser_start().
30796 * See that function for more information
30798 * Returns: (transfer full): the #GHashTable containing the objects
30804 * g_menu_markup_parser_end_menu:
30805 * @context: a #GMarkupParseContext
30807 * Stop the parsing of a menu and return the newly-created #GMenu.
30809 * This call should be matched with g_menu_markup_parser_start_menu().
30810 * See that function for more information
30812 * Returns: (transfer full): the newly-created #GMenu
30818 * g_menu_markup_parser_start:
30819 * @context: a #GMarkupParseContext
30820 * @domain: (allow-none): translation domain for labels, or %NULL
30821 * @objects: (allow-none): a #GHashTable for the objects, or %NULL
30823 * Begin parsing a group of menus in XML form.
30825 * If @domain is not %NULL, it will be used to translate attributes
30826 * that are marked as translatable, using gettext().
30828 * If @objects is specified then it must be a #GHashTable that was
30829 * created using g_hash_table_new_full() with g_str_hash(),
30830 * g_str_equal(), g_free() and g_object_unref().
30831 * Any named menus (ie: <tag class="starttag">menu</tag>,
30832 * <tag class="starttag">submenu</tag>,
30833 * <tag class="starttag">section</tag> or <tag class="starttag">link</tag>
30834 * elements with an id='' attribute) that are encountered while parsing
30835 * will be added to this table. Each toplevel menu must be named.
30837 * If @objects is %NULL then an empty hash table will be created.
30839 * This function should be called from the start_element function for
30840 * the element representing the group containing the menus. In other
30841 * words, the content inside of this element is expected to be a list of
30849 * g_menu_markup_parser_start_menu:
30850 * @context: a #GMarkupParseContext
30851 * @domain: (allow-none): translation domain for labels, or %NULL
30852 * @objects: (allow-none): a #GHashTable for the objects, or %NULL
30854 * Begin parsing the XML definition of a menu.
30856 * This function should be called from the start_element function for
30857 * the element representing the menu itself. In other words, the
30858 * content inside of this element is expected to be a list of items.
30860 * If @domain is not %NULL, it will be used to translate attributes
30861 * that are marked as translatable, using gettext().
30863 * If @objects is specified then it must be a #GHashTable that was
30864 * created using g_hash_table_new_full() with g_str_hash(),
30865 * g_str_equal(), g_free() and g_object_unref().
30866 * Any named menus (ie: <tag class="starttag">submenu</tag>,
30867 * <tag class="starttag">section</tag> or <tag class="starttag">link</tag>
30868 * elements with an id='' attribute) that are encountered while parsing
30869 * will be added to this table.
30870 * Note that toplevel <tag class="starttag">menu</tag> is not added to
30871 * the hash table, even if it has an id attribute.
30873 * If @objects is %NULL then named menus will not be supported.
30875 * You should call g_menu_markup_parser_end_menu() from the
30876 * corresponding end_element function in order to collect the newly
30884 * g_menu_markup_print_stderr:
30885 * @model: a #GMenuModel
30887 * Print @model to stderr for debugging purposes.
30889 * This debugging function will be removed in the future.
30894 * g_menu_markup_print_string:
30895 * @string: a #GString
30896 * @model: the #GMenuModel to print
30897 * @indent: the intentation level to start at
30898 * @tabstop: how much to indent each level
30900 * Print the contents of @model to @string.
30901 * Note that you have to provide the containing
30902 * <tag class="starttag">menu</tag> element yourself.
30910 * g_menu_model_get_item_attribute:
30911 * @model: a #GMenuModel
30912 * @item_index: the index of the item
30913 * @attribute: the attribute to query
30914 * @format_string: a #GVariant format string
30915 * @...: positional parameters, as per @format_string
30917 * Queries item at position @item_index in @model for the attribute
30918 * specified by @attribute.
30920 * If the attribute exists and matches the #GVariantType corresponding
30921 * to @format_string then @format_string is used to deconstruct the
30922 * value into the positional parameters and %TRUE is returned.
30924 * If the attribute does not exist, or it does exist but has the wrong
30925 * type, then the positional parameters are ignored and %FALSE is
30930 * Returns: %TRUE if the named attribute was found with the expected
30936 * g_menu_model_get_item_attribute_value:
30937 * @model: a #GMenuModel
30938 * @item_index: the index of the item
30939 * @attribute: the attribute to query
30940 * @expected_type: (allow-none): the expected type of the attribute, or %NULL
30942 * Queries the item at position @item_index in @model for the attribute
30943 * specified by @attribute.
30945 * If @expected_type is non-%NULL then it specifies the expected type of
30946 * the attribute. If it is %NULL then any type will be accepted.
30948 * If the attribute exists and matches @expected_type (or if the
30949 * expected type is unspecified) then the value is returned.
30951 * If the attribute does not exist, or does not match the expected type
30952 * then %NULL is returned.
30954 * Returns: (transfer full): the value of the attribute
30960 * g_menu_model_get_item_link:
30961 * @model: a #GMenuModel
30962 * @item_index: the index of the item
30963 * @link: the link to query
30965 * Queries the item at position @item_index in @model for the link
30966 * specified by @link.
30968 * If the link exists, the linked #GMenuModel is returned. If the link
30969 * does not exist, %NULL is returned.
30971 * Returns: (transfer full): the linked #GMenuModel, or %NULL
30977 * g_menu_model_get_n_items:
30978 * @model: a #GMenuModel
30980 * Query the number of items in @model.
30982 * Returns: the number of items
30988 * g_menu_model_is_mutable:
30989 * @model: a #GMenuModel
30991 * Queries if @model is mutable.
30993 * An immutable #GMenuModel will never emit the #GMenuModel::items-changed
30994 * signal. Consumers of the model may make optimisations accordingly.
30998 * Returns: %TRUE if the model is mutable (ie: "items-changed" may be
31004 * g_menu_model_items_changed:
31005 * @model: a #GMenuModel
31006 * @position: the position of the change
31007 * @removed: the number of items removed
31008 * @added: the number of items added
31010 * Requests emission of the #GMenuModel::items-changed signal on @model.
31012 * This function should never be called except by #GMenuModel
31013 * subclasses. Any other calls to this function will very likely lead
31014 * to a violation of the interface of the model.
31016 * The implementation should update its internal representation of the
31017 * menu before emitting the signal. The implementation should further
31018 * expect to receive queries about the new state of the menu (and
31019 * particularly added menu items) while signal handlers are running.
31021 * The implementation must dispatch this call directly from a mainloop
31022 * entry and not in response to calls -- particularly those from the
31023 * #GMenuModel API. Said another way: the menu must not change while
31024 * user code is running without returning to the mainloop.
31031 * g_menu_model_iterate_item_attributes:
31032 * @model: a #GMenuModel
31033 * @item_index: the index of the item
31035 * Creates a #GMenuAttributeIter to iterate over the attributes of
31036 * the item at position @item_index in @model.
31038 * You must free the iterator with g_object_unref() when you are done.
31040 * Returns: (transfer full): a new #GMenuAttributeIter
31046 * g_menu_model_iterate_item_links:
31047 * @model: a #GMenuModel
31048 * @item_index: the index of the item
31050 * Creates a #GMenuLinkIter to iterate over the links of the item at
31051 * position @item_index in @model.
31053 * You must free the iterator with g_object_unref() when you are done.
31055 * Returns: (transfer full): a new #GMenuLinkIter
31063 * Creates a new #GMenu.
31065 * The new menu has no items.
31067 * Returns: a new #GMenu
31075 * @label: (allow-none): the section label, or %NULL
31076 * @detailed_action: (allow-none): the detailed action string, or %NULL
31078 * Convenience function for prepending a normal menu item to the start
31079 * of @menu. Combine g_menu_new() and g_menu_insert_item() for a more
31080 * flexible alternative.
31087 * g_menu_prepend_item:
31089 * @item: a #GMenuItem to prepend
31091 * Prepends @item to the start of @menu.
31093 * See g_menu_insert_item() for more information.
31100 * g_menu_prepend_section:
31102 * @label: (allow-none): the section label, or %NULL
31103 * @section: a #GMenuModel with the items of the section
31105 * Convenience function for prepending a section menu item to the start
31106 * of @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for
31107 * a more flexible alternative.
31114 * g_menu_prepend_submenu:
31116 * @label: (allow-none): the section label, or %NULL
31117 * @submenu: a #GMenuModel with the items of the submenu
31119 * Convenience function for prepending a submenu menu item to the start
31120 * of @menu. Combine g_menu_new_submenu() and g_menu_insert_item() for
31121 * a more flexible alternative.
31130 * @position: the position of the item to remove
31132 * Removes an item from the menu.
31134 * @position gives the index of the item to remove.
31136 * It is an error if position is not in range the range from 0 to one
31137 * less than the number of items in the menu.
31139 * It is not possible to remove items by identity since items are added
31140 * to the menu simply by copying their links and attributes (ie:
31141 * identity of the item itself is not preserved).
31148 * g_mount_can_eject:
31149 * @mount: a #GMount.
31151 * Checks if @mount can be eject.
31153 * Returns: %TRUE if the @mount can be ejected.
31158 * g_mount_can_unmount:
31159 * @mount: a #GMount.
31161 * Checks if @mount can be mounted.
31163 * Returns: %TRUE if the @mount can be unmounted.
31169 * @mount: a #GMount.
31170 * @flags: flags affecting the unmount if required for eject
31171 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31172 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31173 * @user_data: user data passed to @callback.
31175 * Ejects a mount. This is an asynchronous operation, and is
31176 * finished by calling g_mount_eject_finish() with the @mount
31177 * and #GAsyncResult data returned in the @callback.
31179 * Deprecated: 2.22: Use g_mount_eject_with_operation() instead.
31184 * g_mount_eject_finish:
31185 * @mount: a #GMount.
31186 * @result: a #GAsyncResult.
31187 * @error: a #GError location to store the error occurring, or %NULL to ignore.
31189 * Finishes ejecting a mount. If any errors occurred during the operation,
31190 * @error will be set to contain the errors and %FALSE will be returned.
31192 * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
31193 * Deprecated: 2.22: Use g_mount_eject_with_operation_finish() instead.
31198 * g_mount_eject_with_operation:
31199 * @mount: a #GMount.
31200 * @flags: flags affecting the unmount if required for eject
31201 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
31202 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31203 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31204 * @user_data: user data passed to @callback.
31206 * Ejects a mount. This is an asynchronous operation, and is
31207 * finished by calling g_mount_eject_with_operation_finish() with the @mount
31208 * and #GAsyncResult data returned in the @callback.
31215 * g_mount_eject_with_operation_finish:
31216 * @mount: a #GMount.
31217 * @result: a #GAsyncResult.
31218 * @error: a #GError location to store the error occurring, or %NULL to ignore.
31220 * Finishes ejecting a mount. If any errors occurred during the operation,
31221 * @error will be set to contain the errors and %FALSE will be returned.
31223 * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
31229 * g_mount_get_default_location:
31230 * @mount: a #GMount.
31232 * Gets the default location of @mount. The default location of the given
31233 * @mount is a path that reflects the main entry point for the user (e.g.
31234 * the home directory, or the root of the volume).
31236 * The returned object should be unreffed with
31237 * g_object_unref() when no longer needed.
31239 * Returns: (transfer full): a #GFile.
31244 * g_mount_get_drive:
31245 * @mount: a #GMount.
31247 * Gets the drive for the @mount.
31249 * This is a convenience method for getting the #GVolume and then
31250 * using that object to get the #GDrive.
31252 * The returned object should be unreffed with
31253 * g_object_unref() when no longer needed.
31255 * Returns: (transfer full): a #GDrive or %NULL if @mount is not associated with a volume or a drive.
31260 * g_mount_get_icon:
31261 * @mount: a #GMount.
31263 * Gets the icon for @mount.
31265 * The returned object should be unreffed with
31266 * g_object_unref() when no longer needed.
31268 * Returns: (transfer full): a #GIcon.
31273 * g_mount_get_name:
31274 * @mount: a #GMount.
31276 * Gets the name of @mount.
31278 * The returned string should be freed with g_free()
31279 * when no longer needed.
31281 * Returns: the name for the given @mount.
31286 * g_mount_get_root:
31287 * @mount: a #GMount.
31289 * Gets the root directory on @mount.
31291 * The returned object should be unreffed with
31292 * g_object_unref() when no longer needed.
31294 * Returns: (transfer full): a #GFile.
31299 * g_mount_get_sort_key:
31300 * @mount: A #GMount.
31302 * Gets the sort key for @mount, if any.
31304 * Returns: Sorting key for @mount or %NULL if no such key is available.
31310 * g_mount_get_uuid:
31311 * @mount: a #GMount.
31313 * Gets the UUID for the @mount. The reference is typically based on
31314 * the file system UUID for the mount in question and should be
31315 * considered an opaque string. Returns %NULL if there is no UUID
31318 * The returned string should be freed with g_free()
31319 * when no longer needed.
31321 * Returns: the UUID for @mount or %NULL if no UUID can be computed.
31326 * g_mount_get_volume:
31327 * @mount: a #GMount.
31329 * Gets the volume for the @mount.
31331 * The returned object should be unreffed with
31332 * g_object_unref() when no longer needed.
31334 * Returns: (transfer full): a #GVolume or %NULL if @mount is not associated with a volume.
31339 * g_mount_guess_content_type:
31340 * @mount: a #GMount
31341 * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
31342 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
31343 * @callback: a #GAsyncReadyCallback
31344 * @user_data: user data passed to @callback
31346 * Tries to guess the type of content stored on @mount. Returns one or
31347 * more textual identifiers of well-known content types (typically
31348 * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
31349 * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
31350 * specification for more on x-content types.
31352 * This is an asynchronous operation (see
31353 * g_mount_guess_content_type_sync() for the synchronous version), and
31354 * is finished by calling g_mount_guess_content_type_finish() with the
31355 * @mount and #GAsyncResult data returned in the @callback.
31362 * g_mount_guess_content_type_finish:
31363 * @mount: a #GMount
31364 * @result: a #GAsyncResult
31365 * @error: a #GError location to store the error occurring, or %NULL to ignore
31367 * Finishes guessing content types of @mount. If any errors occurred
31368 * during the operation, @error will be set to contain the errors and
31369 * %FALSE will be returned. In particular, you may get an
31370 * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
31373 * Caller should free this array with g_strfreev() when done with it.
31375 * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
31381 * g_mount_guess_content_type_sync:
31382 * @mount: a #GMount
31383 * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
31384 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
31385 * @error: a #GError location to store the error occurring, or %NULL to ignore
31387 * Tries to guess the type of content stored on @mount. Returns one or
31388 * more textual identifiers of well-known content types (typically
31389 * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
31390 * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
31391 * specification for more on x-content types.
31393 * This is an synchronous operation and as such may block doing IO;
31394 * see g_mount_guess_content_type() for the asynchronous version.
31396 * Caller should free this array with g_strfreev() when done with it.
31398 * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
31404 * g_mount_is_shadowed:
31405 * @mount: A #GMount.
31407 * Determines if @mount is shadowed. Applications or libraries should
31408 * avoid displaying @mount in the user interface if it is shadowed.
31410 * A mount is said to be shadowed if there exists one or more user
31411 * visible objects (currently #GMount objects) with a root that is
31412 * inside the root of @mount.
31414 * One application of shadow mounts is when exposing a single file
31415 * system that is used to address several logical volumes. In this
31416 * situation, a #GVolumeMonitor implementation would create two
31417 * #GVolume objects (for example, one for the camera functionality of
31418 * the device and one for a SD card reader on the device) with
31419 * activation URIs <literal>gphoto2://[usb:001,002]/store1/</literal>
31420 * and <literal>gphoto2://[usb:001,002]/store2/</literal>. When the
31421 * underlying mount (with root
31422 * <literal>gphoto2://[usb:001,002]/</literal>) is mounted, said
31423 * #GVolumeMonitor implementation would create two #GMount objects
31424 * (each with their root matching the corresponding volume activation
31425 * root) that would shadow the original mount.
31427 * The proxy monitor in GVfs 2.26 and later, automatically creates and
31428 * manage shadow mounts (and shadows the underlying mount) if the
31429 * activation root on a #GVolume is set.
31431 * Returns: %TRUE if @mount is shadowed.
31437 * g_mount_operation_get_anonymous:
31438 * @op: a #GMountOperation.
31440 * Check to see whether the mount operation is being used
31441 * for an anonymous user.
31443 * Returns: %TRUE if mount operation is anonymous.
31448 * g_mount_operation_get_choice:
31449 * @op: a #GMountOperation.
31451 * Gets a choice from the mount operation.
31453 * the choice's list, or %0.
31455 * Returns: an integer containing an index of the user's choice from
31460 * g_mount_operation_get_domain:
31461 * @op: a #GMountOperation.
31463 * Gets the domain of the mount operation.
31465 * Returns: a string set to the domain.
31470 * g_mount_operation_get_password:
31471 * @op: a #GMountOperation.
31473 * Gets a password from the mount operation.
31475 * Returns: a string containing the password within @op.
31480 * g_mount_operation_get_password_save:
31481 * @op: a #GMountOperation.
31483 * Gets the state of saving passwords for the mount operation.
31485 * Returns: a #GPasswordSave flag.
31490 * g_mount_operation_get_username:
31491 * @op: a #GMountOperation.
31493 * Get the user name from the mount operation.
31495 * Returns: a string containing the user name.
31500 * g_mount_operation_new:
31502 * Creates a new mount operation.
31504 * Returns: a #GMountOperation.
31509 * g_mount_operation_reply:
31510 * @op: a #GMountOperation
31511 * @result: a #GMountOperationResult
31513 * Emits the #GMountOperation::reply signal.
31518 * g_mount_operation_set_anonymous:
31519 * @op: a #GMountOperation.
31520 * @anonymous: boolean value.
31522 * Sets the mount operation to use an anonymous user if @anonymous is %TRUE.
31527 * g_mount_operation_set_choice:
31528 * @op: a #GMountOperation.
31529 * @choice: an integer.
31531 * Sets a default choice for the mount operation.
31536 * g_mount_operation_set_domain:
31537 * @op: a #GMountOperation.
31538 * @domain: the domain to set.
31540 * Sets the mount operation's domain.
31545 * g_mount_operation_set_password:
31546 * @op: a #GMountOperation.
31547 * @password: password to set.
31549 * Sets the mount operation's password to @password.
31554 * g_mount_operation_set_password_save:
31555 * @op: a #GMountOperation.
31556 * @save: a set of #GPasswordSave flags.
31558 * Sets the state of saving passwords for the mount operation.
31563 * g_mount_operation_set_username:
31564 * @op: a #GMountOperation.
31565 * @username: input username.
31567 * Sets the user name within @op to @username.
31573 * @mount: a #GMount.
31574 * @flags: flags affecting the operation
31575 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
31576 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31577 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31578 * @user_data: user data passed to @callback.
31580 * Remounts a mount. This is an asynchronous operation, and is
31581 * finished by calling g_mount_remount_finish() with the @mount
31582 * and #GAsyncResults data returned in the @callback.
31584 * Remounting is useful when some setting affecting the operation
31585 * of the volume has been changed, as these may need a remount to
31586 * take affect. While this is semantically equivalent with unmounting
31587 * and then remounting not all backends might need to actually be
31593 * g_mount_remount_finish:
31594 * @mount: a #GMount.
31595 * @result: a #GAsyncResult.
31596 * @error: a #GError location to store the error occurring, or %NULL to ignore.
31598 * Finishes remounting a mount. If any errors occurred during the operation,
31599 * @error will be set to contain the errors and %FALSE will be returned.
31601 * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise.
31607 * @mount: A #GMount.
31609 * Increments the shadow count on @mount. Usually used by
31610 * #GVolumeMonitor implementations when creating a shadow mount for
31611 * @mount, see g_mount_is_shadowed() for more information. The caller
31612 * will need to emit the #GMount::changed signal on @mount manually.
31620 * @mount: a #GMount.
31621 * @flags: flags affecting the operation
31622 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31623 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31624 * @user_data: user data passed to @callback.
31626 * Unmounts a mount. This is an asynchronous operation, and is
31627 * finished by calling g_mount_unmount_finish() with the @mount
31628 * and #GAsyncResult data returned in the @callback.
31630 * Deprecated: 2.22: Use g_mount_unmount_with_operation() instead.
31635 * g_mount_unmount_finish:
31636 * @mount: a #GMount.
31637 * @result: a #GAsyncResult.
31638 * @error: a #GError location to store the error occurring, or %NULL to ignore.
31640 * Finishes unmounting a mount. If any errors occurred during the operation,
31641 * @error will be set to contain the errors and %FALSE will be returned.
31643 * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
31644 * Deprecated: 2.22: Use g_mount_unmount_with_operation_finish() instead.
31649 * g_mount_unmount_with_operation:
31650 * @mount: a #GMount.
31651 * @flags: flags affecting the operation
31652 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
31653 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31654 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31655 * @user_data: user data passed to @callback.
31657 * Unmounts a mount. This is an asynchronous operation, and is
31658 * finished by calling g_mount_unmount_with_operation_finish() with the @mount
31659 * and #GAsyncResult data returned in the @callback.
31666 * g_mount_unmount_with_operation_finish:
31667 * @mount: a #GMount.
31668 * @result: a #GAsyncResult.
31669 * @error: a #GError location to store the error occurring, or %NULL to ignore.
31671 * Finishes unmounting a mount. If any errors occurred during the operation,
31672 * @error will be set to contain the errors and %FALSE will be returned.
31674 * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
31680 * g_mount_unshadow:
31681 * @mount: A #GMount.
31683 * Decrements the shadow count on @mount. Usually used by
31684 * #GVolumeMonitor implementations when destroying a shadow mount for
31685 * @mount, see g_mount_is_shadowed() for more information. The caller
31686 * will need to emit the #GMount::changed signal on @mount manually.
31693 * g_network_address_get_hostname:
31694 * @addr: a #GNetworkAddress
31696 * Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded,
31697 * depending on what @addr was created with.
31699 * Returns: @addr's hostname
31705 * g_network_address_get_port:
31706 * @addr: a #GNetworkAddress
31708 * Gets @addr's port number
31710 * Returns: @addr's port (which may be 0)
31716 * g_network_address_get_scheme:
31717 * @addr: a #GNetworkAddress
31719 * Gets @addr's scheme
31721 * Returns: @addr's scheme (%NULL if not built from URI)
31727 * g_network_address_new:
31728 * @hostname: the hostname
31731 * Creates a new #GSocketConnectable for connecting to the given
31732 * @hostname and @port.
31734 * Returns: (transfer full) (type GNetworkAddress): the new #GNetworkAddress
31740 * g_network_address_parse:
31741 * @host_and_port: the hostname and optionally a port
31742 * @default_port: the default port if not in @host_and_port
31743 * @error: a pointer to a #GError, or %NULL
31745 * Creates a new #GSocketConnectable for connecting to the given
31746 * @hostname and @port. May fail and return %NULL in case
31747 * parsing @host_and_port fails.
31749 * @host_and_port may be in any of a number of recognised formats; an IPv6
31750 * address, an IPv4 address, or a domain name (in which case a DNS
31751 * lookup is performed). Quoting with [] is supported for all address
31752 * types. A port override may be specified in the usual way with a
31755 * If no port is specified in @host_and_port then @default_port will be
31756 * used as the port number to connect to.
31758 * In general, @host_and_port is expected to be provided by the user
31759 * (allowing them to give the hostname, and a port overide if necessary)
31760 * and @default_port is expected to be provided by the application.
31762 * (The port component of @host_and_port can also be specified as a
31763 * service name rather than as a numeric port, but this functionality
31764 * is deprecated, because it depends on the contents of /etc/services,
31765 * which is generally quite sparse on platforms other than Linux.)
31767 * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
31773 * g_network_address_parse_uri:
31774 * @uri: the hostname and optionally a port
31775 * @default_port: The default port if none is found in the URI
31776 * @error: a pointer to a #GError, or %NULL
31778 * Creates a new #GSocketConnectable for connecting to the given
31779 * @uri. May fail and return %NULL in case parsing @uri fails.
31781 * Using this rather than g_network_address_new() or
31782 * g_network_address_parse_host() allows #GSocketClient to determine
31783 * when to use application-specific proxy protocols.
31785 * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
31791 * g_network_monitor_base_add_network:
31792 * @monitor: the #GNetworkMonitorBase
31793 * @network: a #GInetAddressMask
31795 * Adds @network to @monitor's list of available networks.
31802 * g_network_monitor_base_remove_network:
31803 * @monitor: the #GNetworkMonitorBase
31804 * @network: a #GInetAddressMask
31806 * Removes @network from @monitor's list of available networks.
31813 * g_network_monitor_base_set_networks:
31814 * @monitor: the #GNetworkMonitorBase
31815 * @networks: (array length=length): an array of #GInetAddressMask
31816 * @length: length of @networks
31818 * Drops @monitor's current list of available networks and replaces
31819 * it with @networks.
31824 * g_network_monitor_can_reach:
31825 * @monitor: a #GNetworkMonitor
31826 * @connectable: a #GSocketConnectable
31827 * @cancellable: a #GCancellable, or %NULL
31828 * @error: return location for a #GError, or %NULL
31830 * Attempts to determine whether or not the host pointed to by
31831 * @connectable can be reached, without actually trying to connect to
31834 * This may return %TRUE even when #GNetworkMonitor:network-available
31835 * is %FALSE, if, for example, @monitor can determine that
31836 * @connectable refers to a host on a local network.
31838 * If @monitor believes that an attempt to connect to @connectable
31839 * will succeed, it will return %TRUE. Otherwise, it will return
31840 * %FALSE and set @error to an appropriate error (such as
31841 * %G_IO_ERROR_HOST_UNREACHABLE).
31843 * Note that although this does not attempt to connect to
31844 * @connectable, it may still block for a brief period of time (eg,
31845 * trying to do multicast DNS on the local network), so if you do not
31846 * want to block, you should use g_network_monitor_can_reach_async().
31848 * Returns: %TRUE if @connectable is reachable, %FALSE if not.
31854 * g_network_monitor_get_default:
31856 * Gets the default #GNetworkMonitor for the system.
31858 * Returns: (transfer none): a #GNetworkMonitor
31864 * g_network_monitor_get_network_available:
31865 * @monitor: the #GNetworkMonitor
31867 * Checks if the network is available. "Available" here means that the
31868 * system has a default route available for at least one of IPv4 or
31869 * IPv6. It does not necessarily imply that the public Internet is
31870 * reachable. See #GNetworkMonitor:network-available for more details.
31872 * Returns: whether the network is available
31878 * g_network_service_get_domain:
31879 * @srv: a #GNetworkService
31881 * Gets the domain that @srv serves. This might be either UTF-8 or
31882 * ASCII-encoded, depending on what @srv was created with.
31884 * Returns: @srv's domain name
31890 * g_network_service_get_protocol:
31891 * @srv: a #GNetworkService
31893 * Gets @srv's protocol name (eg, "tcp").
31895 * Returns: @srv's protocol name
31901 * g_network_service_get_scheme:
31902 * @srv: a #GNetworkService
31904 * Get's the URI scheme used to resolve proxies. By default, the service name
31905 * is used as scheme.
31907 * Returns: @srv's scheme name
31913 * g_network_service_get_service:
31914 * @srv: a #GNetworkService
31916 * Gets @srv's service name (eg, "ldap").
31918 * Returns: @srv's service name
31924 * g_network_service_new:
31925 * @service: the service type to look up (eg, "ldap")
31926 * @protocol: the networking protocol to use for @service (eg, "tcp")
31927 * @domain: the DNS domain to look up the service in
31929 * Creates a new #GNetworkService representing the given @service,
31930 * @protocol, and @domain. This will initially be unresolved; use the
31931 * #GSocketConnectable interface to resolve it.
31933 * Returns: (transfer full) (type GNetworkService): a new #GNetworkService
31939 * g_network_service_set_scheme:
31940 * @srv: a #GNetworkService
31941 * @scheme: a URI scheme
31943 * Set's the URI scheme used to resolve proxies. By default, the service name
31944 * is used as scheme.
31952 * @struct_type: the type of the elements to allocate
31953 * @n_structs: the number of elements to allocate
31955 * Allocates @n_structs elements of type @struct_type.
31956 * The returned pointer is cast to a pointer to the given type.
31957 * If @n_structs is 0 it returns %NULL.
31958 * Care is taken to avoid overflow when calculating the size of the allocated block.
31960 * Since the returned pointer is already casted to the right type,
31961 * it is normally unnecessary to cast it explicitly, and doing
31962 * so might hide memory allocation errors.
31964 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
31970 * @struct_type: the type of the elements to allocate.
31971 * @n_structs: the number of elements to allocate.
31973 * Allocates @n_structs elements of type @struct_type, initialized to 0's.
31974 * The returned pointer is cast to a pointer to the given type.
31975 * If @n_structs is 0 it returns %NULL.
31976 * Care is taken to avoid overflow when calculating the size of the allocated block.
31978 * Since the returned pointer is already casted to the right type,
31979 * it is normally unnecessary to cast it explicitly, and doing
31980 * so might hide memory allocation errors.
31982 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
31988 * @struct_type: Type of memory chunks to be allocated
31989 * @n_structs: Number of chunks to be allocated
31991 * Wraps g_alloca() in a more typesafe manner.
31993 * Returns: Pointer to stack space for @n_structs chunks of type @struct_type
31999 * @parent: the #GNode to place the new #GNode under
32000 * @node: the #GNode to insert
32002 * Inserts a #GNode as the last child of the given parent.
32004 * Returns: the inserted #GNode
32009 * g_node_append_data:
32010 * @parent: the #GNode to place the new #GNode under
32011 * @data: the data for the new #GNode
32013 * Inserts a new #GNode as the last child of the given parent.
32015 * Returns: the new #GNode
32020 * g_node_first_child:
32023 * Gets the first child of a #GNode.
32025 * or has no children
32027 * Returns: the first child of @node, or %NULL if @node is %NULL
32032 * g_node_insert_data:
32033 * @parent: the #GNode to place the new #GNode under
32034 * @position: the position to place the new #GNode at. If position is -1, the new #GNode is inserted as the last child of @parent
32035 * @data: the data for the new #GNode
32037 * Inserts a new #GNode at the given position.
32039 * Returns: the new #GNode
32044 * g_node_insert_data_before:
32045 * @parent: the #GNode to place the new #GNode under
32046 * @sibling: the sibling #GNode to place the new #GNode before
32047 * @data: the data for the new #GNode
32049 * Inserts a new #GNode before the given sibling.
32051 * Returns: the new #GNode
32056 * g_node_next_sibling:
32059 * Gets the next sibling of a #GNode.
32063 * Returns: the next sibling of @node, or %NULL if @node is the last node
32068 * g_node_prepend_data:
32069 * @parent: the #GNode to place the new #GNode under
32070 * @data: the data for the new #GNode
32072 * Inserts a new #GNode as the first child of the given parent.
32074 * Returns: the new #GNode
32079 * g_node_prev_sibling:
32082 * Gets the previous sibling of a #GNode.
32086 * Returns: the previous sibling of @node, or %NULL if @node is the first
32091 * g_null_settings_backend_new:
32093 * Creates a readonly #GSettingsBackend.
32095 * This backend does not allow changes to settings, so all settings
32096 * will always have their default values.
32098 * Returns: (transfer full): a newly created #GSettingsBackend
32104 * g_output_stream_clear_pending:
32105 * @stream: output stream
32107 * Clears the pending flag on @stream.
32112 * g_output_stream_close:
32113 * @stream: A #GOutputStream.
32114 * @cancellable: (allow-none): optional cancellable object
32115 * @error: location to store the error occurring, or %NULL to ignore
32117 * Closes the stream, releasing resources related to it.
32119 * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
32120 * Closing a stream multiple times will not return an error.
32122 * Closing a stream will automatically flush any outstanding buffers in the
32125 * Streams will be automatically closed when the last reference
32126 * is dropped, but you might want to call this function to make sure
32127 * resources are released as early as possible.
32129 * Some streams might keep the backing store of the stream (e.g. a file descriptor)
32130 * open after the stream is closed. See the documentation for the individual
32131 * stream for details.
32133 * On failure the first error that happened will be reported, but the close
32134 * operation will finish as much as possible. A stream that failed to
32135 * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
32136 * is important to check and report the error to the user, otherwise
32137 * there might be a loss of data as all data might not be written.
32139 * If @cancellable is not NULL, then the operation can be cancelled by
32140 * triggering the cancellable object from another thread. If the operation
32141 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
32142 * Cancelling a close will still leave the stream closed, but there some streams
32143 * can use a faster close that doesn't block to e.g. check errors. On
32144 * cancellation (as with any error) there is no guarantee that all written
32145 * data will reach the target.
32147 * Returns: %TRUE on success, %FALSE on failure
32152 * g_output_stream_close_async:
32153 * @stream: A #GOutputStream.
32154 * @io_priority: the io priority of the request.
32155 * @cancellable: (allow-none): optional cancellable object
32156 * @callback: (scope async): callback to call when the request is satisfied
32157 * @user_data: (closure): the data to pass to callback function
32159 * Requests an asynchronous close of the stream, releasing resources
32160 * related to it. When the operation is finished @callback will be
32161 * called. You can then call g_output_stream_close_finish() to get
32162 * the result of the operation.
32164 * For behaviour details see g_output_stream_close().
32166 * The asyncronous methods have a default fallback that uses threads
32167 * to implement asynchronicity, so they are optional for inheriting
32168 * classes. However, if you override one you must override all.
32173 * g_output_stream_close_finish:
32174 * @stream: a #GOutputStream.
32175 * @result: a #GAsyncResult.
32176 * @error: a #GError location to store the error occurring, or %NULL to ignore.
32178 * Closes an output stream.
32180 * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
32185 * g_output_stream_flush:
32186 * @stream: a #GOutputStream.
32187 * @cancellable: (allow-none): optional cancellable object
32188 * @error: location to store the error occurring, or %NULL to ignore
32190 * Forces a write of all user-space buffered data for the given
32191 * @stream. Will block during the operation. Closing the stream will
32192 * implicitly cause a flush.
32194 * This function is optional for inherited classes.
32196 * If @cancellable is not %NULL, then the operation can be cancelled by
32197 * triggering the cancellable object from another thread. If the operation
32198 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
32200 * Returns: %TRUE on success, %FALSE on error
32205 * g_output_stream_flush_async:
32206 * @stream: a #GOutputStream.
32207 * @io_priority: the io priority of the request.
32208 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32209 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
32210 * @user_data: (closure): the data to pass to callback function
32212 * Forces an asynchronous write of all user-space buffered data for
32213 * the given @stream.
32214 * For behaviour details see g_output_stream_flush().
32216 * When the operation is finished @callback will be
32217 * called. You can then call g_output_stream_flush_finish() to get the
32218 * result of the operation.
32223 * g_output_stream_flush_finish:
32224 * @stream: a #GOutputStream.
32225 * @result: a GAsyncResult.
32226 * @error: a #GError location to store the error occurring, or %NULL to ignore.
32228 * Finishes flushing an output stream.
32230 * Returns: %TRUE if flush operation succeeded, %FALSE otherwise.
32235 * g_output_stream_has_pending:
32236 * @stream: a #GOutputStream.
32238 * Checks if an ouput stream has pending actions.
32240 * Returns: %TRUE if @stream has pending actions.
32245 * g_output_stream_is_closed:
32246 * @stream: a #GOutputStream.
32248 * Checks if an output stream has already been closed.
32250 * Returns: %TRUE if @stream is closed. %FALSE otherwise.
32255 * g_output_stream_is_closing:
32256 * @stream: a #GOutputStream.
32258 * Checks if an output stream is being closed. This can be
32259 * used inside e.g. a flush implementation to see if the
32260 * flush (or other i/o operation) is called from within
32261 * the closing operation.
32263 * Returns: %TRUE if @stream is being closed. %FALSE otherwise.
32269 * g_output_stream_set_pending:
32270 * @stream: a #GOutputStream.
32271 * @error: a #GError location to store the error occurring, or %NULL to ignore.
32273 * Sets @stream to have actions pending. If the pending flag is
32274 * already set or @stream is closed, it will return %FALSE and set
32277 * Returns: %TRUE if pending was previously unset and is now set.
32282 * g_output_stream_splice:
32283 * @stream: a #GOutputStream.
32284 * @source: a #GInputStream.
32285 * @flags: a set of #GOutputStreamSpliceFlags.
32286 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32287 * @error: a #GError location to store the error occurring, or %NULL to ignore.
32289 * Splices an input stream into an output stream.
32291 * -1 if an error occurred. Note that if the number of bytes
32292 * spliced is greater than %G_MAXSSIZE, then that will be
32293 * returned, and there is no way to determine the actual number
32294 * of bytes spliced.
32296 * Returns: a #gssize containing the size of the data spliced, or
32301 * g_output_stream_splice_async:
32302 * @stream: a #GOutputStream.
32303 * @source: a #GInputStream.
32304 * @flags: a set of #GOutputStreamSpliceFlags.
32305 * @io_priority: the io priority of the request.
32306 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32307 * @callback: (scope async): a #GAsyncReadyCallback.
32308 * @user_data: (closure): user data passed to @callback.
32310 * Splices a stream asynchronously.
32311 * When the operation is finished @callback will be called.
32312 * You can then call g_output_stream_splice_finish() to get the
32313 * result of the operation.
32315 * For the synchronous, blocking version of this function, see
32316 * g_output_stream_splice().
32321 * g_output_stream_splice_finish:
32322 * @stream: a #GOutputStream.
32323 * @result: a #GAsyncResult.
32324 * @error: a #GError location to store the error occurring, or %NULL to ignore.
32326 * Finishes an asynchronous stream splice operation.
32328 * number of bytes spliced is greater than %G_MAXSSIZE, then that
32329 * will be returned, and there is no way to determine the actual
32330 * number of bytes spliced.
32332 * Returns: a #gssize of the number of bytes spliced. Note that if the
32337 * g_output_stream_write:
32338 * @stream: a #GOutputStream.
32339 * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
32340 * @count: the number of bytes to write
32341 * @cancellable: (allow-none): optional cancellable object
32342 * @error: location to store the error occurring, or %NULL to ignore
32344 * Tries to write @count bytes from @buffer into the stream. Will block
32345 * during the operation.
32347 * If count is 0, returns 0 and does nothing. A value of @count
32348 * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
32350 * On success, the number of bytes written to the stream is returned.
32351 * It is not an error if this is not the same as the requested size, as it
32352 * can happen e.g. on a partial I/O error, or if there is not enough
32353 * storage in the stream. All writes block until at least one byte
32354 * is written or an error occurs; 0 is never returned (unless
32357 * If @cancellable is not NULL, then the operation can be cancelled by
32358 * triggering the cancellable object from another thread. If the operation
32359 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
32360 * operation was partially finished when the operation was cancelled the
32361 * partial result will be returned, without an error.
32363 * On error -1 is returned and @error is set accordingly.
32365 * Virtual: write_fn
32366 * Returns: Number of bytes written, or -1 on error
32371 * g_output_stream_write_all:
32372 * @stream: a #GOutputStream.
32373 * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
32374 * @count: the number of bytes to write
32375 * @bytes_written: (out): location to store the number of bytes that was written to the stream
32376 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32377 * @error: location to store the error occurring, or %NULL to ignore
32379 * Tries to write @count bytes from @buffer into the stream. Will block
32380 * during the operation.
32382 * This function is similar to g_output_stream_write(), except it tries to
32383 * write as many bytes as requested, only stopping on an error.
32385 * On a successful write of @count bytes, %TRUE is returned, and @bytes_written
32386 * is set to @count.
32388 * If there is an error during the operation FALSE is returned and @error
32389 * is set to indicate the error status, @bytes_written is updated to contain
32390 * the number of bytes written into the stream before the error occurred.
32392 * Returns: %TRUE on success, %FALSE if there was an error
32397 * g_output_stream_write_async:
32398 * @stream: A #GOutputStream.
32399 * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
32400 * @count: the number of bytes to write
32401 * @io_priority: the io priority of the request.
32402 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
32403 * @callback: (scope async): callback to call when the request is satisfied
32404 * @user_data: (closure): the data to pass to callback function
32406 * Request an asynchronous write of @count bytes from @buffer into
32407 * the stream. When the operation is finished @callback will be called.
32408 * You can then call g_output_stream_write_finish() to get the result of the
32411 * During an async request no other sync and async calls are allowed,
32412 * and will result in %G_IO_ERROR_PENDING errors.
32414 * A value of @count larger than %G_MAXSSIZE will cause a
32415 * %G_IO_ERROR_INVALID_ARGUMENT error.
32417 * On success, the number of bytes written will be passed to the
32418 * @callback. It is not an error if this is not the same as the
32419 * requested size, as it can happen e.g. on a partial I/O error,
32420 * but generally we try to write as many bytes as requested.
32422 * You are guaranteed that this method will never fail with
32423 * %G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the
32424 * method will just wait until this changes.
32426 * Any outstanding I/O request with higher priority (lower numerical
32427 * value) will be executed before an outstanding request with lower
32428 * priority. Default priority is %G_PRIORITY_DEFAULT.
32430 * The asyncronous methods have a default fallback that uses threads
32431 * to implement asynchronicity, so they are optional for inheriting
32432 * classes. However, if you override one you must override all.
32434 * For the synchronous, blocking version of this function, see
32435 * g_output_stream_write().
32440 * g_output_stream_write_finish:
32441 * @stream: a #GOutputStream.
32442 * @result: a #GAsyncResult.
32443 * @error: a #GError location to store the error occurring, or %NULL to ignore.
32445 * Finishes a stream write operation.
32447 * Returns: a #gssize containing the number of bytes written to the stream.
32452 * g_permission_acquire:
32453 * @permission: a #GPermission instance
32454 * @cancellable: a #GCancellable, or %NULL
32455 * @error: a pointer to a %NULL #GError, or %NULL
32457 * Attempts to acquire the permission represented by @permission.
32459 * The precise method by which this happens depends on the permission
32460 * and the underlying authentication mechanism. A simple example is
32461 * that a dialog may appear asking the user to enter their password.
32463 * You should check with g_permission_get_can_acquire() before calling
32466 * If the permission is acquired then %TRUE is returned. Otherwise,
32467 * %FALSE is returned and @error is set appropriately.
32469 * This call is blocking, likely for a very long time (in the case that
32470 * user interaction is required). See g_permission_acquire_async() for
32471 * the non-blocking version.
32473 * Returns: %TRUE if the permission was successfully acquired
32479 * g_permission_acquire_async:
32480 * @permission: a #GPermission instance
32481 * @cancellable: a #GCancellable, or %NULL
32482 * @callback: the #GAsyncReadyCallback to call when done
32483 * @user_data: the user data to pass to @callback
32485 * Attempts to acquire the permission represented by @permission.
32487 * This is the first half of the asynchronous version of
32488 * g_permission_acquire().
32495 * g_permission_acquire_finish:
32496 * @permission: a #GPermission instance
32497 * @result: the #GAsyncResult given to the #GAsyncReadyCallback
32498 * @error: a pointer to a %NULL #GError, or %NULL
32500 * Collects the result of attempting to acquire the permission
32501 * represented by @permission.
32503 * This is the second half of the asynchronous version of
32504 * g_permission_acquire().
32506 * Returns: %TRUE if the permission was successfully acquired
32512 * g_permission_get_allowed:
32513 * @permission: a #GPermission instance
32515 * Gets the value of the 'allowed' property. This property is %TRUE if
32516 * the caller currently has permission to perform the action that
32517 * @permission represents the permission to perform.
32519 * Returns: the value of the 'allowed' property
32525 * g_permission_get_can_acquire:
32526 * @permission: a #GPermission instance
32528 * Gets the value of the 'can-acquire' property. This property is %TRUE
32529 * if it is generally possible to acquire the permission by calling
32530 * g_permission_acquire().
32532 * Returns: the value of the 'can-acquire' property
32538 * g_permission_get_can_release:
32539 * @permission: a #GPermission instance
32541 * Gets the value of the 'can-release' property. This property is %TRUE
32542 * if it is generally possible to release the permission by calling
32543 * g_permission_release().
32545 * Returns: the value of the 'can-release' property
32551 * g_permission_impl_update:
32552 * @permission: a #GPermission instance
32553 * @allowed: the new value for the 'allowed' property
32554 * @can_acquire: the new value for the 'can-acquire' property
32555 * @can_release: the new value for the 'can-release' property
32557 * This function is called by the #GPermission implementation to update
32558 * the properties of the permission. You should never call this
32559 * function except from a #GPermission implementation.
32561 * GObject notify signals are generated, as appropriate.
32568 * g_permission_release:
32569 * @permission: a #GPermission instance
32570 * @cancellable: a #GCancellable, or %NULL
32571 * @error: a pointer to a %NULL #GError, or %NULL
32573 * Attempts to release the permission represented by @permission.
32575 * The precise method by which this happens depends on the permission
32576 * and the underlying authentication mechanism. In most cases the
32577 * permission will be dropped immediately without further action.
32579 * You should check with g_permission_get_can_release() before calling
32582 * If the permission is released then %TRUE is returned. Otherwise,
32583 * %FALSE is returned and @error is set appropriately.
32585 * This call is blocking, likely for a very long time (in the case that
32586 * user interaction is required). See g_permission_release_async() for
32587 * the non-blocking version.
32589 * Returns: %TRUE if the permission was successfully released
32595 * g_permission_release_async:
32596 * @permission: a #GPermission instance
32597 * @cancellable: a #GCancellable, or %NULL
32598 * @callback: the #GAsyncReadyCallback to call when done
32599 * @user_data: the user data to pass to @callback
32601 * Attempts to release the permission represented by @permission.
32603 * This is the first half of the asynchronous version of
32604 * g_permission_release().
32611 * g_permission_release_finish:
32612 * @permission: a #GPermission instance
32613 * @result: the #GAsyncResult given to the #GAsyncReadyCallback
32614 * @error: a pointer to a %NULL #GError, or %NULL
32616 * Collects the result of attempting to release the permission
32617 * represented by @permission.
32619 * This is the second half of the asynchronous version of
32620 * g_permission_release().
32622 * Returns: %TRUE if the permission was successfully released
32628 * g_poll_file_monitor_new:
32631 * Polls @file for changes.
32633 * Returns: a new #GFileMonitor for the given #GFile.
32638 * g_pollable_input_stream_can_poll:
32639 * @stream: a #GPollableInputStream.
32641 * Checks if @stream is actually pollable. Some classes may implement
32642 * #GPollableInputStream but have only certain instances of that class
32643 * be pollable. If this method returns %FALSE, then the behavior of
32644 * other #GPollableInputStream methods is undefined.
32646 * For any given stream, the value returned by this method is constant;
32647 * a stream cannot switch from pollable to non-pollable or vice versa.
32649 * Returns: %TRUE if @stream is pollable, %FALSE if not.
32655 * g_pollable_input_stream_create_source:
32656 * @stream: a #GPollableInputStream.
32657 * @cancellable: (allow-none): a #GCancellable, or %NULL
32659 * Creates a #GSource that triggers when @stream can be read, or
32660 * @cancellable is triggered or an error occurs. The callback on the
32661 * source is of the #GPollableSourceFunc type.
32663 * As with g_pollable_input_stream_is_readable(), it is possible that
32664 * the stream may not actually be readable even after the source
32665 * triggers, so you should use g_pollable_input_stream_read_nonblocking()
32666 * rather than g_input_stream_read() from the callback.
32668 * Returns: (transfer full): a new #GSource
32674 * g_pollable_input_stream_is_readable:
32675 * @stream: a #GPollableInputStream.
32677 * Checks if @stream can be read.
32679 * Note that some stream types may not be able to implement this 100%
32680 * reliably, and it is possible that a call to g_input_stream_read()
32681 * after this returns %TRUE would still block. To guarantee
32682 * non-blocking behavior, you should always use
32683 * g_pollable_input_stream_read_nonblocking(), which will return a
32684 * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
32686 * has occurred on @stream, this will result in
32687 * g_pollable_input_stream_is_readable() returning %TRUE, and the
32688 * next attempt to read will return the error.
32690 * Returns: %TRUE if @stream is readable, %FALSE if not. If an error
32696 * g_pollable_input_stream_read_nonblocking:
32697 * @stream: a #GPollableInputStream
32698 * @buffer: a buffer to read data into (which should be at least @size bytes long).
32699 * @size: the number of bytes you want to read
32700 * @cancellable: (allow-none): a #GCancellable, or %NULL
32701 * @error: #GError for error reporting, or %NULL to ignore.
32703 * Attempts to read up to @size bytes from @stream into @buffer, as
32704 * with g_input_stream_read(). If @stream is not currently readable,
32705 * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
32706 * use g_pollable_input_stream_create_source() to create a #GSource
32707 * that will be triggered when @stream is readable.
32709 * Note that since this method never blocks, you cannot actually
32710 * use @cancellable to cancel it. However, it will return an error
32711 * if @cancellable has already been cancelled when you call, which
32712 * may happen if you call this method after a source triggers due
32713 * to having been cancelled.
32715 * %G_IO_ERROR_WOULD_BLOCK).
32717 * Virtual: read_nonblocking
32718 * Returns: the number of bytes read, or -1 on error (including
32723 * g_pollable_output_stream_can_poll:
32724 * @stream: a #GPollableOutputStream.
32726 * Checks if @stream is actually pollable. Some classes may implement
32727 * #GPollableOutputStream but have only certain instances of that
32728 * class be pollable. If this method returns %FALSE, then the behavior
32729 * of other #GPollableOutputStream methods is undefined.
32731 * For any given stream, the value returned by this method is constant;
32732 * a stream cannot switch from pollable to non-pollable or vice versa.
32734 * Returns: %TRUE if @stream is pollable, %FALSE if not.
32740 * g_pollable_output_stream_create_source:
32741 * @stream: a #GPollableOutputStream.
32742 * @cancellable: (allow-none): a #GCancellable, or %NULL
32744 * Creates a #GSource that triggers when @stream can be written, or
32745 * @cancellable is triggered or an error occurs. The callback on the
32746 * source is of the #GPollableSourceFunc type.
32748 * As with g_pollable_output_stream_is_writable(), it is possible that
32749 * the stream may not actually be writable even after the source
32750 * triggers, so you should use g_pollable_output_stream_write_nonblocking()
32751 * rather than g_output_stream_write() from the callback.
32753 * Returns: (transfer full): a new #GSource
32759 * g_pollable_output_stream_is_writable:
32760 * @stream: a #GPollableOutputStream.
32762 * Checks if @stream can be written.
32764 * Note that some stream types may not be able to implement this 100%
32765 * reliably, and it is possible that a call to g_output_stream_write()
32766 * after this returns %TRUE would still block. To guarantee
32767 * non-blocking behavior, you should always use
32768 * g_pollable_output_stream_write_nonblocking(), which will return a
32769 * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
32771 * has occurred on @stream, this will result in
32772 * g_pollable_output_stream_is_writable() returning %TRUE, and the
32773 * next attempt to write will return the error.
32775 * Returns: %TRUE if @stream is writable, %FALSE if not. If an error
32781 * g_pollable_output_stream_write_nonblocking:
32782 * @stream: a #GPollableOutputStream
32783 * @buffer: (array length=size) (element-type guint8): a buffer to write data from
32784 * @size: the number of bytes you want to write
32785 * @cancellable: (allow-none): a #GCancellable, or %NULL
32786 * @error: #GError for error reporting, or %NULL to ignore.
32788 * Attempts to write up to @size bytes from @buffer to @stream, as
32789 * with g_output_stream_write(). If @stream is not currently writable,
32790 * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
32791 * use g_pollable_output_stream_create_source() to create a #GSource
32792 * that will be triggered when @stream is writable.
32794 * Note that since this method never blocks, you cannot actually
32795 * use @cancellable to cancel it. However, it will return an error
32796 * if @cancellable has already been cancelled when you call, which
32797 * may happen if you call this method after a source triggers due
32798 * to having been cancelled.
32800 * %G_IO_ERROR_WOULD_BLOCK).
32802 * Virtual: write_nonblocking
32803 * Returns: the number of bytes written, or -1 on error (including
32808 * g_pollable_source_new:
32809 * @pollable_stream: the stream associated with the new source
32811 * Utility method for #GPollableInputStream and #GPollableOutputStream
32812 * implementations. Creates a new #GSource that expects a callback of
32813 * type #GPollableSourceFunc. The new source does not actually do
32814 * anything on its own; use g_source_add_child_source() to add other
32815 * sources to it to cause it to trigger.
32817 * Returns: (transfer full): the new #GSource.
32823 * g_proxy_address_get_destination_hostname:
32824 * @proxy: a #GProxyAddress
32826 * Gets @proxy's destination hostname.
32828 * Returns: the @proxy's destination hostname
32834 * g_proxy_address_get_destination_port:
32835 * @proxy: a #GProxyAddress
32837 * Gets @proxy's destination port.
32839 * Returns: the @proxy's destination port
32845 * g_proxy_address_get_password:
32846 * @proxy: a #GProxyAddress
32848 * Gets @proxy's password.
32850 * Returns: the @proxy's password
32856 * g_proxy_address_get_protocol:
32857 * @proxy: a #GProxyAddress
32859 * Gets @proxy's protocol.
32861 * Returns: the @proxy's protocol
32867 * g_proxy_address_get_username:
32868 * @proxy: a #GProxyAddress
32870 * Gets @proxy's username.
32872 * Returns: the @proxy's username
32878 * g_proxy_address_new:
32879 * @inetaddr: The proxy server #GInetAddress.
32880 * @port: The proxy server port.
32881 * @protocol: The proxy protocol to support, in lower case (e.g. socks, http).
32882 * @dest_hostname: The destination hostname the the proxy should tunnel to.
32883 * @dest_port: The destination port to tunnel to.
32884 * @username: (allow-none): The username to authenticate to the proxy server (or %NULL).
32885 * @password: (allow-none): The password to authenticate to the proxy server (or %NULL).
32887 * Creates a new #GProxyAddress for @inetaddr with @protocol that should
32888 * tunnel through @dest_hostname and @dest_port.
32890 * Returns: a new #GProxyAddress
32897 * @proxy: a #GProxy
32898 * @connection: a #GIOStream
32899 * @proxy_address: a #GProxyAddress
32900 * @cancellable: (allow-none): a #GCancellable
32901 * @error: return #GError
32903 * Given @connection to communicate with a proxy (eg, a
32904 * #GSocketConnection that is connected to the proxy server), this
32905 * does the necessary handshake to connect to @proxy_address, and if
32906 * required, wraps the #GIOStream to handle proxy payload.
32908 * be the same as @connection, in which case a reference
32911 * Returns: (transfer full): a #GIOStream that will replace @connection. This might
32917 * g_proxy_connect_async:
32918 * @proxy: a #GProxy
32919 * @connection: a #GIOStream
32920 * @proxy_address: a #GProxyAddress
32921 * @cancellable: (allow-none): a #GCancellable
32922 * @callback: (scope async): a #GAsyncReadyCallback
32923 * @user_data: (closure): callback data
32925 * Asynchronous version of g_proxy_connect().
32932 * g_proxy_connect_finish:
32933 * @proxy: a #GProxy
32934 * @result: a #GAsyncResult
32935 * @error: return #GError
32937 * See g_proxy_connect().
32939 * Returns: (transfer full): a #GIOStream.
32945 * g_proxy_get_default_for_protocol:
32946 * @protocol: the proxy protocol name (e.g. http, socks, etc)
32948 * Lookup "gio-proxy" extension point for a proxy implementation that supports
32949 * specified protocol.
32951 * is not supported.
32953 * Returns: (transfer full): return a #GProxy or NULL if protocol
32959 * g_proxy_resolver_get_default:
32961 * Gets the default #GProxyResolver for the system.
32963 * Returns: (transfer none): the default #GProxyResolver.
32969 * g_proxy_resolver_is_supported:
32970 * @resolver: a #GProxyResolver
32972 * Checks if @resolver can be used on this system. (This is used
32973 * internally; g_proxy_resolver_get_default() will only return a proxy
32974 * resolver that returns %TRUE for this method.)
32976 * Returns: %TRUE if @resolver is supported.
32982 * g_proxy_resolver_lookup:
32983 * @resolver: a #GProxyResolver
32984 * @uri: a URI representing the destination to connect to
32985 * @cancellable: (allow-none): a #GCancellable, or %NULL
32986 * @error: return location for a #GError, or %NULL
32988 * Looks into the system proxy configuration to determine what proxy,
32989 * if any, to use to connect to @uri. The returned proxy URIs are of the
32990 * form <literal><protocol>://[user[:password]@]host:port</literal>
32991 * or <literal>direct://</literal>, where <protocol> could be
32992 * http, rtsp, socks or other proxying protocol.
32994 * If you don't know what network protocol is being used on the
32995 * socket, you should use <literal>none</literal> as the URI protocol.
32996 * In this case, the resolver might still return a generic proxy type
32997 * (such as SOCKS), but would not return protocol-specific proxy types
33000 * <literal>direct://</literal> is used when no proxy is needed.
33001 * Direct connection should not be attempted unless it is part of the
33002 * returned array of proxies.
33004 * NULL-terminated array of proxy URIs. Must be freed
33005 * with g_strfreev().
33007 * Returns: (transfer full) (array zero-terminated=1): A
33013 * g_proxy_resolver_lookup_async:
33014 * @resolver: a #GProxyResolver
33015 * @uri: a URI representing the destination to connect to
33016 * @cancellable: (allow-none): a #GCancellable, or %NULL
33017 * @callback: (scope async): callback to call after resolution completes
33018 * @user_data: (closure): data for @callback
33020 * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
33028 * g_proxy_resolver_lookup_finish:
33029 * @resolver: a #GProxyResolver
33030 * @result: the result passed to your #GAsyncReadyCallback
33031 * @error: return location for a #GError, or %NULL
33033 * Call this function to obtain the array of proxy URIs when
33034 * g_proxy_resolver_lookup_async() is complete. See
33035 * g_proxy_resolver_lookup() for more details.
33037 * NULL-terminated array of proxy URIs. Must be freed
33038 * with g_strfreev().
33040 * Returns: (transfer full) (array zero-terminated=1): A
33046 * g_proxy_supports_hostname:
33047 * @proxy: a #GProxy
33049 * Some proxy protocols expect to be passed a hostname, which they
33050 * will resolve to an IP address themselves. Others, like SOCKS4, do
33051 * not allow this. This function will return %FALSE if @proxy is
33052 * implementing such a protocol. When %FALSE is returned, the caller
33053 * should resolve the destination hostname first, and then pass a
33054 * #GProxyAddress containing the stringified IP address to
33055 * g_proxy_connect() or g_proxy_connect_async().
33057 * Returns: %TRUE if hostname resolution is supported.
33063 * g_remote_action_group_activate_action_full:
33064 * @remote: a #GRemoteActionGroup
33065 * @action_name: the name of the action to change the state of
33066 * @value: the new requested value for the state
33067 * @platform_data: the platform data to send
33069 * Changes the state of a remote action.
33071 * This is the same as g_action_group_change_action_state() except that
33072 * it allows for provision of "platform data" to be sent along with the
33073 * state change request. This typically contains details such as the
33074 * user interaction timestamp or startup notification information.
33076 * @platform_data must be non-%NULL and must have the type
33077 * %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.
33085 * @struct_type: the type of the elements to allocate
33086 * @mem: the currently allocated memory
33087 * @n_structs: the number of elements to allocate
33089 * Reallocates the memory pointed to by @mem, so that it now has space for
33090 * @n_structs elements of type @struct_type. It returns the new address of
33091 * the memory, which may have been moved.
33092 * Care is taken to avoid overflow when calculating the size of the allocated block.
33094 * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
33099 * g_resolver_error_quark:
33101 * Gets the #GResolver Error Quark.
33103 * Returns: a #GQuark.
33109 * g_resolver_free_addresses: (skip)
33110 * @addresses: a #GList of #GInetAddress
33112 * Frees @addresses (which should be the return value from
33113 * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()).
33114 * (This is a convenience method; you can also simply free the results
33122 * g_resolver_free_targets: (skip)
33123 * @targets: a #GList of #GSrvTarget
33125 * Frees @targets (which should be the return value from
33126 * g_resolver_lookup_service() or g_resolver_lookup_service_finish()).
33127 * (This is a convenience method; you can also simply free the
33128 * results by hand.)
33135 * g_resolver_get_default:
33137 * Gets the default #GResolver. You should unref it when you are done
33138 * with it. #GResolver may use its reference count as a hint about how
33139 * many threads it should allocate for concurrent DNS resolutions.
33141 * Returns: (transfer full): the default #GResolver.
33147 * g_resolver_lookup_by_address:
33148 * @resolver: a #GResolver
33149 * @address: the address to reverse-resolve
33150 * @cancellable: (allow-none): a #GCancellable, or %NULL
33151 * @error: return location for a #GError, or %NULL
33153 * Synchronously reverse-resolves @address to determine its
33154 * associated hostname.
33156 * If the DNS resolution fails, @error (if non-%NULL) will be set to
33157 * a value from #GResolverError.
33159 * If @cancellable is non-%NULL, it can be used to cancel the
33160 * operation, in which case @error (if non-%NULL) will be set to
33161 * %G_IO_ERROR_CANCELLED.
33163 * form), or %NULL on error.
33165 * Returns: a hostname (either ASCII-only, or in ASCII-encoded
33171 * g_resolver_lookup_by_address_async:
33172 * @resolver: a #GResolver
33173 * @address: the address to reverse-resolve
33174 * @cancellable: (allow-none): a #GCancellable, or %NULL
33175 * @callback: (scope async): callback to call after resolution completes
33176 * @user_data: (closure): data for @callback
33178 * Begins asynchronously reverse-resolving @address to determine its
33179 * associated hostname, and eventually calls @callback, which must
33180 * call g_resolver_lookup_by_address_finish() to get the final result.
33187 * g_resolver_lookup_by_address_finish:
33188 * @resolver: a #GResolver
33189 * @result: the result passed to your #GAsyncReadyCallback
33190 * @error: return location for a #GError, or %NULL
33192 * Retrieves the result of a previous call to
33193 * g_resolver_lookup_by_address_async().
33195 * If the DNS resolution failed, @error (if non-%NULL) will be set to
33196 * a value from #GResolverError. If the operation was cancelled,
33197 * @error will be set to %G_IO_ERROR_CANCELLED.
33199 * form), or %NULL on error.
33201 * Returns: a hostname (either ASCII-only, or in ASCII-encoded
33207 * g_resolver_lookup_by_name:
33208 * @resolver: a #GResolver
33209 * @hostname: the hostname to look up
33210 * @cancellable: (allow-none): a #GCancellable, or %NULL
33211 * @error: return location for a #GError, or %NULL
33213 * Synchronously resolves @hostname to determine its associated IP
33214 * address(es). @hostname may be an ASCII-only or UTF-8 hostname, or
33215 * the textual form of an IP address (in which case this just becomes
33216 * a wrapper around g_inet_address_new_from_string()).
33218 * On success, g_resolver_lookup_by_name() will return a #GList of
33219 * #GInetAddress, sorted in order of preference and guaranteed to not
33220 * contain duplicates. That is, if using the result to connect to
33221 * @hostname, you should attempt to connect to the first address
33222 * first, then the second if the first fails, etc. If you are using
33223 * the result to listen on a socket, it is appropriate to add each
33224 * result using e.g. g_socket_listener_add_address().
33226 * If the DNS resolution fails, @error (if non-%NULL) will be set to a
33227 * value from #GResolverError.
33229 * If @cancellable is non-%NULL, it can be used to cancel the
33230 * operation, in which case @error (if non-%NULL) will be set to
33231 * %G_IO_ERROR_CANCELLED.
33233 * If you are planning to connect to a socket on the resolved IP
33234 * address, it may be easier to create a #GNetworkAddress and use its
33235 * #GSocketConnectable interface.
33237 * of #GInetAddress, or %NULL on error. You
33238 * must unref each of the addresses and free the list when you are
33239 * done with it. (You can use g_resolver_free_addresses() to do this.)
33241 * Returns: (element-type GInetAddress) (transfer full): a #GList
33247 * g_resolver_lookup_by_name_async:
33248 * @resolver: a #GResolver
33249 * @hostname: the hostname to look up the address of
33250 * @cancellable: (allow-none): a #GCancellable, or %NULL
33251 * @callback: (scope async): callback to call after resolution completes
33252 * @user_data: (closure): data for @callback
33254 * Begins asynchronously resolving @hostname to determine its
33255 * associated IP address(es), and eventually calls @callback, which
33256 * must call g_resolver_lookup_by_name_finish() to get the result.
33257 * See g_resolver_lookup_by_name() for more details.
33264 * g_resolver_lookup_by_name_finish:
33265 * @resolver: a #GResolver
33266 * @result: the result passed to your #GAsyncReadyCallback
33267 * @error: return location for a #GError, or %NULL
33269 * Retrieves the result of a call to
33270 * g_resolver_lookup_by_name_async().
33272 * If the DNS resolution failed, @error (if non-%NULL) will be set to
33273 * a value from #GResolverError. If the operation was cancelled,
33274 * @error will be set to %G_IO_ERROR_CANCELLED.
33276 * of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name()
33277 * for more details.
33279 * Returns: (element-type GInetAddress) (transfer full): a #GList
33285 * g_resolver_lookup_service:
33286 * @resolver: a #GResolver
33287 * @service: the service type to look up (eg, "ldap")
33288 * @protocol: the networking protocol to use for @service (eg, "tcp")
33289 * @domain: the DNS domain to look up the service in
33290 * @cancellable: (allow-none): a #GCancellable, or %NULL
33291 * @error: return location for a #GError, or %NULL
33293 * Synchronously performs a DNS SRV lookup for the given @service and
33294 * @protocol in the given @domain and returns an array of #GSrvTarget.
33295 * @domain may be an ASCII-only or UTF-8 hostname. Note also that the
33296 * @service and @protocol arguments <emphasis>do not</emphasis>
33297 * include the leading underscore that appears in the actual DNS
33300 * On success, g_resolver_lookup_service() will return a #GList of
33301 * #GSrvTarget, sorted in order of preference. (That is, you should
33302 * attempt to connect to the first target first, then the second if
33303 * the first fails, etc.)
33305 * If the DNS resolution fails, @error (if non-%NULL) will be set to
33306 * a value from #GResolverError.
33308 * If @cancellable is non-%NULL, it can be used to cancel the
33309 * operation, in which case @error (if non-%NULL) will be set to
33310 * %G_IO_ERROR_CANCELLED.
33312 * If you are planning to connect to the service, it is usually easier
33313 * to create a #GNetworkService and use its #GSocketConnectable
33316 * or %NULL on error. You must free each of the targets and the list when you are
33317 * done with it. (You can use g_resolver_free_targets() to do this.)
33319 * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
33325 * g_resolver_lookup_service_async:
33326 * @resolver: a #GResolver
33327 * @service: the service type to look up (eg, "ldap")
33328 * @protocol: the networking protocol to use for @service (eg, "tcp")
33329 * @domain: the DNS domain to look up the service in
33330 * @cancellable: (allow-none): a #GCancellable, or %NULL
33331 * @callback: (scope async): callback to call after resolution completes
33332 * @user_data: (closure): data for @callback
33334 * Begins asynchronously performing a DNS SRV lookup for the given
33335 * @service and @protocol in the given @domain, and eventually calls
33336 * @callback, which must call g_resolver_lookup_service_finish() to
33337 * get the final result. See g_resolver_lookup_service() for more
33345 * g_resolver_lookup_service_finish:
33346 * @resolver: a #GResolver
33347 * @result: the result passed to your #GAsyncReadyCallback
33348 * @error: return location for a #GError, or %NULL
33350 * Retrieves the result of a previous call to
33351 * g_resolver_lookup_service_async().
33353 * If the DNS resolution failed, @error (if non-%NULL) will be set to
33354 * a value from #GResolverError. If the operation was cancelled,
33355 * @error will be set to %G_IO_ERROR_CANCELLED.
33357 * or %NULL on error. See g_resolver_lookup_service() for more details.
33359 * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
33365 * g_resolver_set_default:
33366 * @resolver: the new default #GResolver
33368 * Sets @resolver to be the application's default resolver (reffing
33369 * @resolver, and unreffing the previous default resolver, if any).
33370 * Future calls to g_resolver_get_default() will return this resolver.
33372 * This can be used if an application wants to perform any sort of DNS
33373 * caching or "pinning"; it can implement its own #GResolver that
33374 * calls the original default resolver for DNS operations, and
33375 * implements its own cache policies on top of that, and then set
33376 * itself as the default resolver for all later code to use.
33383 * g_seekable_can_seek:
33384 * @seekable: a #GSeekable.
33386 * Tests if the stream supports the #GSeekableIface.
33388 * Returns: %TRUE if @seekable can be seeked. %FALSE otherwise.
33393 * g_seekable_can_truncate:
33394 * @seekable: a #GSeekable.
33396 * Tests if the stream can be truncated.
33398 * Returns: %TRUE if the stream can be truncated, %FALSE otherwise.
33404 * @seekable: a #GSeekable.
33405 * @offset: a #goffset.
33406 * @type: a #GSeekType.
33407 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
33408 * @error: a #GError location to store the error occurring, or %NULL to ignore.
33410 * Seeks in the stream by the given @offset, modified by @type.
33412 * If @cancellable is not %NULL, then the operation can be cancelled by
33413 * triggering the cancellable object from another thread. If the operation
33414 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
33416 * has occurred, this function will return %FALSE and set @error
33417 * appropriately if present.
33419 * Returns: %TRUE if successful. If an error
33425 * @seekable: a #GSeekable.
33427 * Tells the current position within the stream.
33429 * Returns: the offset from the beginning of the buffer.
33434 * g_seekable_truncate:
33435 * @seekable: a #GSeekable.
33436 * @offset: a #goffset.
33437 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
33438 * @error: a #GError location to store the error occurring, or %NULL to ignore.
33440 * Truncates a stream with a given #offset.
33442 * If @cancellable is not %NULL, then the operation can be cancelled by
33443 * triggering the cancellable object from another thread. If the operation
33444 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
33445 * operation was partially finished when the operation was cancelled the
33446 * partial result will be returned, without an error.
33448 * has occurred, this function will return %FALSE and set @error
33449 * appropriately if present.
33451 * Virtual: truncate_fn
33452 * Returns: %TRUE if successful. If an error
33457 * g_settings_apply:
33458 * @settings: a #GSettings instance
33460 * Applies any changes that have been made to the settings. This
33461 * function does nothing unless @settings is in 'delay-apply' mode;
33462 * see g_settings_delay(). In the normal case settings are always
33463 * applied immediately.
33468 * g_settings_backend_changed:
33469 * @backend: a #GSettingsBackend implementation
33470 * @key: the name of the key
33471 * @origin_tag: the origin tag
33473 * Signals that a single key has possibly changed. Backend
33474 * implementations should call this if a key has possibly changed its
33477 * @key must be a valid key (ie starting with a slash, not containing
33478 * '//', and not ending with a slash).
33480 * The implementation must call this function during any call to
33481 * g_settings_backend_write(), before the call returns (except in the
33482 * case that no keys are actually changed and it cares to detect this
33483 * fact). It may not rely on the existence of a mainloop for
33484 * dispatching the signal later.
33486 * The implementation may call this function at any other time it likes
33487 * in response to other events (such as changes occurring outside of the
33488 * program). These calls may originate from a mainloop or may originate
33489 * in response to any other action (including from calls to
33490 * g_settings_backend_write()).
33492 * In the case that this call is in response to a call to
33493 * g_settings_backend_write() then @origin_tag must be set to the same
33494 * value that was passed to that call.
33501 * g_settings_backend_changed_tree:
33502 * @backend: a #GSettingsBackend implementation
33503 * @tree: a #GTree containing the changes
33504 * @origin_tag: the origin tag
33506 * This call is a convenience wrapper. It gets the list of changes from
33507 * @tree, computes the longest common prefix and calls
33508 * g_settings_backend_changed().
33515 * g_settings_backend_flatten_tree:
33516 * @tree: a #GTree containing the changes
33517 * @path: (out): the location to save the path
33518 * @keys: (out) (transfer container) (array zero-terminated=1): the location to save the relative keys
33519 * @values: (out) (allow-none) (transfer container) (array zero-terminated=1): the location to save the values, or %NULL
33521 * Calculate the longest common prefix of all keys in a tree and write
33522 * out an array of the key names relative to that prefix and,
33523 * optionally, the value to store at each of those keys.
33525 * You must free the value returned in @path, @keys and @values using
33526 * g_free(). You should not attempt to free or unref the contents of
33527 * @keys or @values.
33534 * g_settings_backend_get_default:
33536 * Returns the default #GSettingsBackend. It is possible to override
33537 * the default by setting the <envar>GSETTINGS_BACKEND</envar>
33538 * environment variable to the name of a settings backend.
33540 * The user gets a reference to the backend.
33542 * Returns: (transfer full): the default #GSettingsBackend
33548 * g_settings_backend_keys_changed:
33549 * @backend: a #GSettingsBackend implementation
33550 * @path: the path containing the changes
33551 * @items: (array zero-terminated=1): the %NULL-terminated list of changed keys
33552 * @origin_tag: the origin tag
33554 * Signals that a list of keys have possibly changed. Backend
33555 * implementations should call this if keys have possibly changed their
33558 * @path must be a valid path (ie starting and ending with a slash and
33559 * not containing '//'). Each string in @items must form a valid key
33560 * name when @path is prefixed to it (ie: each item must not start or
33561 * end with '/' and must not contain '//').
33563 * The meaning of this signal is that any of the key names resulting
33564 * from the contatenation of @path with each item in @items may have
33567 * The same rules for when notifications must occur apply as per
33568 * g_settings_backend_changed(). These two calls can be used
33569 * interchangeably if exactly one item has changed (although in that
33570 * case g_settings_backend_changed() is definitely preferred).
33572 * For efficiency reasons, the implementation should strive for @path to
33573 * be as long as possible (ie: the longest common prefix of all of the
33574 * keys that were changed) but this is not strictly required.
33581 * g_settings_backend_path_changed:
33582 * @backend: a #GSettingsBackend implementation
33583 * @path: the path containing the changes
33584 * @origin_tag: the origin tag
33586 * Signals that all keys below a given path may have possibly changed.
33587 * Backend implementations should call this if an entire path of keys
33588 * have possibly changed their values.
33590 * @path must be a valid path (ie starting and ending with a slash and
33591 * not containing '//').
33593 * The meaning of this signal is that any of the key which has a name
33594 * starting with @path may have changed.
33596 * The same rules for when notifications must occur apply as per
33597 * g_settings_backend_changed(). This call might be an appropriate
33598 * reasponse to a 'reset' call but implementations are also free to
33599 * explicitly list the keys that were affected by that call if they can
33602 * For efficiency reasons, the implementation should strive for @path to
33603 * be as long as possible (ie: the longest common prefix of all of the
33604 * keys that were changed) but this is not strictly required. As an
33605 * example, if this function is called with the path of "/" then every
33606 * single key in the application will be notified of a possible change.
33613 * g_settings_backend_path_writable_changed:
33614 * @backend: a #GSettingsBackend implementation
33615 * @path: the name of the path
33617 * Signals that the writability of all keys below a given path may have
33620 * Since GSettings performs no locking operations for itself, this call
33621 * will always be made in response to external events.
33628 * g_settings_backend_writable_changed:
33629 * @backend: a #GSettingsBackend implementation
33630 * @key: the name of the key
33632 * Signals that the writability of a single key has possibly changed.
33634 * Since GSettings performs no locking operations for itself, this call
33635 * will always be made in response to external events.
33643 * @settings: a #GSettings object
33644 * @key: the key to bind
33645 * @object: (type GObject.Object): a #GObject
33646 * @property: the name of the property to bind
33647 * @flags: flags for the binding
33649 * Create a binding between the @key in the @settings object
33650 * and the property @property of @object.
33652 * The binding uses the default GIO mapping functions to map
33653 * between the settings and property values. These functions
33654 * handle booleans, numeric types and string types in a
33655 * straightforward way. Use g_settings_bind_with_mapping() if
33656 * you need a custom mapping, or map between types that are not
33657 * supported by the default mapping functions.
33659 * Unless the @flags include %G_SETTINGS_BIND_NO_SENSITIVITY, this
33660 * function also establishes a binding between the writability of
33661 * @key and the "sensitive" property of @object (if @object has
33662 * a boolean property by that name). See g_settings_bind_writable()
33663 * for more details about writable bindings.
33665 * Note that the lifecycle of the binding is tied to the object,
33666 * and that you can have only one binding per object property.
33667 * If you bind the same property twice on the same object, the second
33668 * binding overrides the first one.
33675 * g_settings_bind_with_mapping: (skip)
33676 * @settings: a #GSettings object
33677 * @key: the key to bind
33678 * @object: (type GObject.Object): a #GObject
33679 * @property: the name of the property to bind
33680 * @flags: flags for the binding
33681 * @get_mapping: a function that gets called to convert values from @settings to @object, or %NULL to use the default GIO mapping
33682 * @set_mapping: a function that gets called to convert values from @object to @settings, or %NULL to use the default GIO mapping
33683 * @user_data: data that gets passed to @get_mapping and @set_mapping
33684 * @destroy: #GDestroyNotify function for @user_data
33686 * Create a binding between the @key in the @settings object
33687 * and the property @property of @object.
33689 * The binding uses the provided mapping functions to map between
33690 * settings and property values.
33692 * Note that the lifecycle of the binding is tied to the object,
33693 * and that you can have only one binding per object property.
33694 * If you bind the same property twice on the same object, the second
33695 * binding overrides the first one.
33702 * g_settings_bind_writable:
33703 * @settings: a #GSettings object
33704 * @key: the key to bind
33705 * @object: (type GObject.Object): a #GObject
33706 * @property: the name of a boolean property to bind
33707 * @inverted: whether to 'invert' the value
33709 * Create a binding between the writability of @key in the
33710 * @settings object and the property @property of @object.
33711 * The property must be boolean; "sensitive" or "visible"
33712 * properties of widgets are the most likely candidates.
33714 * Writable bindings are always uni-directional; changes of the
33715 * writability of the setting will be propagated to the object
33716 * property, not the other way.
33718 * When the @inverted argument is %TRUE, the binding inverts the
33719 * value as it passes from the setting to the object, i.e. @property
33720 * will be set to %TRUE if the key is <emphasis>not</emphasis>
33723 * Note that the lifecycle of the binding is tied to the object,
33724 * and that you can have only one binding per object property.
33725 * If you bind the same property twice on the same object, the second
33726 * binding overrides the first one.
33733 * g_settings_delay:
33734 * @settings: a #GSettings object
33736 * Changes the #GSettings object into 'delay-apply' mode. In this
33737 * mode, changes to @settings are not immediately propagated to the
33738 * backend, but kept locally until g_settings_apply() is called.
33746 * @settings: a #GSettings object
33747 * @key: the key to get the value for
33748 * @format: a #GVariant format string
33749 * @...: arguments as per @format
33751 * Gets the value that is stored at @key in @settings.
33753 * A convenience function that combines g_settings_get_value() with
33756 * It is a programmer error to give a @key that isn't contained in the
33757 * schema for @settings or for the #GVariantType of @format to mismatch
33758 * the type given in the schema.
33765 * g_settings_get_boolean:
33766 * @settings: a #GSettings object
33767 * @key: the key to get the value for
33769 * Gets the value that is stored at @key in @settings.
33771 * A convenience variant of g_settings_get() for booleans.
33773 * It is a programmer error to give a @key that isn't specified as
33774 * having a boolean type in the schema for @settings.
33776 * Returns: a boolean
33782 * g_settings_get_child:
33783 * @settings: a #GSettings object
33784 * @name: the name of the 'child' schema
33786 * Creates a 'child' settings object which has a base path of
33787 * <replaceable>base-path</replaceable>/@name, where
33788 * <replaceable>base-path</replaceable> is the base path of @settings.
33790 * The schema for the child settings object must have been declared
33791 * in the schema of @settings using a <tag class="starttag">child</tag> element.
33793 * Returns: (transfer full): a 'child' settings object
33799 * g_settings_get_double:
33800 * @settings: a #GSettings object
33801 * @key: the key to get the value for
33803 * Gets the value that is stored at @key in @settings.
33805 * A convenience variant of g_settings_get() for doubles.
33807 * It is a programmer error to give a @key that isn't specified as
33808 * having a 'double' type in the schema for @settings.
33810 * Returns: a double
33816 * g_settings_get_enum:
33817 * @settings: a #GSettings object
33818 * @key: the key to get the value for
33820 * Gets the value that is stored in @settings for @key and converts it
33821 * to the enum value that it represents.
33823 * In order to use this function the type of the value must be a string
33824 * and it must be marked in the schema file as an enumerated type.
33826 * It is a programmer error to give a @key that isn't contained in the
33827 * schema for @settings or is not marked as an enumerated type.
33829 * If the value stored in the configuration database is not a valid
33830 * value for the enumerated type then this function will return the
33833 * Returns: the enum value
33839 * g_settings_get_flags:
33840 * @settings: a #GSettings object
33841 * @key: the key to get the value for
33843 * Gets the value that is stored in @settings for @key and converts it
33844 * to the flags value that it represents.
33846 * In order to use this function the type of the value must be an array
33847 * of strings and it must be marked in the schema file as an flags type.
33849 * It is a programmer error to give a @key that isn't contained in the
33850 * schema for @settings or is not marked as a flags type.
33852 * If the value stored in the configuration database is not a valid
33853 * value for the flags type then this function will return the default
33856 * Returns: the flags value
33862 * g_settings_get_has_unapplied:
33863 * @settings: a #GSettings object
33865 * Returns whether the #GSettings object has any unapplied
33866 * changes. This can only be the case if it is in 'delayed-apply' mode.
33868 * Returns: %TRUE if @settings has unapplied changes
33874 * g_settings_get_int:
33875 * @settings: a #GSettings object
33876 * @key: the key to get the value for
33878 * Gets the value that is stored at @key in @settings.
33880 * A convenience variant of g_settings_get() for 32-bit integers.
33882 * It is a programmer error to give a @key that isn't specified as
33883 * having a int32 type in the schema for @settings.
33885 * Returns: an integer
33891 * g_settings_get_mapped:
33892 * @settings: a #GSettings object
33893 * @key: the key to get the value for
33894 * @mapping: (scope call): the function to map the value in the settings database to the value used by the application
33895 * @user_data: user data for @mapping
33897 * Gets the value that is stored at @key in @settings, subject to
33898 * application-level validation/mapping.
33900 * You should use this function when the application needs to perform
33901 * some processing on the value of the key (for example, parsing). The
33902 * @mapping function performs that processing. If the function
33903 * indicates that the processing was unsuccessful (due to a parse error,
33904 * for example) then the mapping is tried again with another value.
33906 * This allows a robust 'fall back to defaults' behaviour to be
33907 * implemented somewhat automatically.
33909 * The first value that is tried is the user's setting for the key. If
33910 * the mapping function fails to map this value, other values may be
33911 * tried in an unspecified order (system or site defaults, translated
33912 * schema default values, untranslated schema default values, etc).
33914 * If the mapping function fails for all possible values, one additional
33915 * attempt is made: the mapping function is called with a %NULL value.
33916 * If the mapping function still indicates failure at this point then
33917 * the application will be aborted.
33919 * The result parameter for the @mapping function is pointed to a
33920 * #gpointer which is initially set to %NULL. The same pointer is given
33921 * to each invocation of @mapping. The final value of that #gpointer is
33922 * what is returned by this function. %NULL is valid; it is returned
33923 * just as any other value would be.
33925 * Returns: (transfer full): the result, which may be %NULL
33930 * g_settings_get_range:
33931 * @settings: a #GSettings
33932 * @key: the key to query the range of
33934 * Queries the range of a key.
33936 * This function will return a #GVariant that fully describes the range
33937 * of values that are valid for @key.
33939 * The type of #GVariant returned is <literal>(sv)</literal>. The
33940 * string describes the type of range restriction in effect. The type
33941 * and meaning of the value contained in the variant depends on the
33944 * If the string is <literal>'type'</literal> then the variant contains
33945 * an empty array. The element type of that empty array is the expected
33946 * type of value and all values of that type are valid.
33948 * If the string is <literal>'enum'</literal> then the variant contains
33949 * an array enumerating the possible values. Each item in the array is
33950 * a possible valid value and no other values are valid.
33952 * If the string is <literal>'flags'</literal> then the variant contains
33953 * an array. Each item in the array is a value that may appear zero or
33954 * one times in an array to be used as the value for this key. For
33955 * example, if the variant contained the array <literal>['x',
33956 * 'y']</literal> then the valid values for the key would be
33957 * <literal>[]</literal>, <literal>['x']</literal>,
33958 * <literal>['y']</literal>, <literal>['x', 'y']</literal> and
33959 * <literal>['y', 'x']</literal>.
33961 * Finally, if the string is <literal>'range'</literal> then the variant
33962 * contains a pair of like-typed values -- the minimum and maximum
33963 * permissible values for this key.
33965 * This information should not be used by normal programs. It is
33966 * considered to be a hint for introspection purposes. Normal programs
33967 * should already know what is permitted by their own schema. The
33968 * format may change in any way in the future -- but particularly, new
33969 * forms may be added to the possibilities described above.
33971 * It is a programmer error to give a @key that isn't contained in the
33972 * schema for @settings.
33974 * You should free the returned value with g_variant_unref() when it is
33975 * no longer needed.
33977 * Returns: a #GVariant describing the range
33983 * g_settings_get_string:
33984 * @settings: a #GSettings object
33985 * @key: the key to get the value for
33987 * Gets the value that is stored at @key in @settings.
33989 * A convenience variant of g_settings_get() for strings.
33991 * It is a programmer error to give a @key that isn't specified as
33992 * having a string type in the schema for @settings.
33994 * Returns: a newly-allocated string
34000 * g_settings_get_strv:
34001 * @settings: a #GSettings object
34002 * @key: the key to get the value for
34004 * A convenience variant of g_settings_get() for string arrays.
34006 * It is a programmer error to give a @key that isn't specified as
34007 * having an array of strings type in the schema for @settings.
34009 * newly-allocated, %NULL-terminated array of strings, the value that
34010 * is stored at @key in @settings.
34012 * Returns: (array zero-terminated=1) (transfer full): a
34018 * g_settings_get_uint:
34019 * @settings: a #GSettings object
34020 * @key: the key to get the value for
34022 * Gets the value that is stored at @key in @settings.
34024 * A convenience variant of g_settings_get() for 32-bit unsigned
34027 * It is a programmer error to give a @key that isn't specified as
34028 * having a uint32 type in the schema for @settings.
34030 * Returns: an unsigned integer
34036 * g_settings_get_value:
34037 * @settings: a #GSettings object
34038 * @key: the key to get the value for
34040 * Gets the value that is stored in @settings for @key.
34042 * It is a programmer error to give a @key that isn't contained in the
34043 * schema for @settings.
34045 * Returns: a new #GVariant
34051 * g_settings_is_writable:
34052 * @settings: a #GSettings object
34053 * @name: the name of a key
34055 * Finds out if a key can be written or not
34057 * Returns: %TRUE if the key @name is writable
34063 * g_settings_list_children:
34064 * @settings: a #GSettings object
34066 * Gets the list of children on @settings.
34068 * The list is exactly the list of strings for which it is not an error
34069 * to call g_settings_get_child().
34071 * For GSettings objects that are lists, this value can change at any
34072 * time and you should connect to the "children-changed" signal to watch
34073 * for those changes. Note that there is a race condition here: you may
34074 * request a child after listing it only for it to have been destroyed
34075 * in the meantime. For this reason, g_settings_get_child() may return
34076 * %NULL even for a child that was listed by this function.
34078 * For GSettings objects that are not lists, you should probably not be
34079 * calling this function from "normal" code (since you should already
34080 * know what children are in your schema). This function may still be
34081 * useful there for introspection reasons, however.
34083 * You should free the return value with g_strfreev() when you are done
34086 * Returns: (transfer full) (element-type utf8): a list of the children on @settings
34091 * g_settings_list_keys:
34092 * @settings: a #GSettings object
34094 * Introspects the list of keys on @settings.
34096 * You should probably not be calling this function from "normal" code
34097 * (since you should already know what keys are in your schema). This
34098 * function is intended for introspection reasons.
34100 * You should free the return value with g_strfreev() when you are done
34103 * Returns: (transfer full) (element-type utf8): a list of the keys on @settings
34108 * g_settings_list_relocatable_schemas:
34110 * Gets a list of the relocatable #GSettings schemas installed on the
34111 * system. These are schemas that do not provide their own path. It is
34112 * usual to instantiate these schemas directly, but if you want to you
34113 * can use g_settings_new_with_path() to specify the path.
34115 * The output of this function, taken together with the output of
34116 * g_settings_list_schemas() represents the complete list of all
34117 * installed schemas.
34119 * #GSettings schemas that are available. The list must not be
34120 * modified or freed.
34122 * Returns: (element-type utf8) (transfer none): a list of relocatable
34128 * g_settings_list_schemas:
34130 * Gets a list of the #GSettings schemas installed on the system. The
34131 * returned list is exactly the list of schemas for which you may call
34132 * g_settings_new() without adverse effects.
34134 * This function does not list the schemas that do not provide their own
34135 * paths (ie: schemas for which you must use
34136 * g_settings_new_with_path()). See
34137 * g_settings_list_relocatable_schemas() for that.
34139 * schemas that are available. The list must not be modified or
34142 * Returns: (element-type utf8) (transfer none): a list of #GSettings
34149 * @schema_id: the id of the schema
34151 * Creates a new #GSettings object with the schema specified by
34154 * Signals on the newly created #GSettings object will be dispatched
34155 * via the thread-default #GMainContext in effect at the time of the
34156 * call to g_settings_new(). The new #GSettings will hold a reference
34157 * on the context. See g_main_context_push_thread_default().
34159 * Returns: a new #GSettings object
34165 * g_settings_new_full:
34166 * @schema: a #GSettingsSchema
34167 * @backend: (allow-none): a #GSettingsBackend
34168 * @path: (allow-none): the path to use
34170 * Creates a new #GSettings object with a given schema, backend and
34173 * It should be extremely rare that you ever want to use this function.
34174 * It is made available for advanced use-cases (such as plugin systems
34175 * that want to provide access to schemas loaded from custom locations,
34178 * At the most basic level, a #GSettings object is a pure composition of
34179 * 4 things: a #GSettingsSchema, a #GSettingsBackend, a path within that
34180 * backend, and a #GMainContext to which signals are dispatched.
34182 * This constructor therefore gives you full control over constructing
34183 * #GSettings instances. The first 4 parameters are given directly as
34184 * @schema, @backend and @path, and the main context is taken from the
34185 * thread-default (as per g_settings_new()).
34187 * If @backend is %NULL then the default backend is used.
34189 * If @path is %NULL then the path from the schema is used. It is an
34190 * error f @path is %NULL and the schema has no path of its own or if
34191 * @path is non-%NULL and not equal to the path that the schema does
34194 * Returns: a new #GSettings object
34200 * g_settings_new_with_backend:
34201 * @schema_id: the id of the schema
34202 * @backend: the #GSettingsBackend to use
34204 * Creates a new #GSettings object with the schema specified by
34205 * @schema_id and a given #GSettingsBackend.
34207 * Creating a #GSettings object with a different backend allows accessing
34208 * settings from a database other than the usual one. For example, it may make
34209 * sense to pass a backend corresponding to the "defaults" settings database on
34210 * the system to get a settings object that modifies the system default
34211 * settings instead of the settings for this user.
34213 * Returns: a new #GSettings object
34219 * g_settings_new_with_backend_and_path:
34220 * @schema_id: the id of the schema
34221 * @backend: the #GSettingsBackend to use
34222 * @path: the path to use
34224 * Creates a new #GSettings object with the schema specified by
34225 * @schema_id and a given #GSettingsBackend and path.
34227 * This is a mix of g_settings_new_with_backend() and
34228 * g_settings_new_with_path().
34230 * Returns: a new #GSettings object
34236 * g_settings_new_with_path:
34237 * @schema_id: the id of the schema
34238 * @path: the path to use
34240 * Creates a new #GSettings object with the relocatable schema specified
34241 * by @schema_id and a given path.
34243 * You only need to do this if you want to directly create a settings
34244 * object with a schema that doesn't have a specified path of its own.
34245 * That's quite rare.
34247 * It is a programmer error to call this function for a schema that
34248 * has an explicitly specified path.
34250 * Returns: a new #GSettings object
34256 * g_settings_range_check:
34257 * @settings: a #GSettings
34258 * @key: the key to check
34259 * @value: the value to check
34261 * Checks if the given @value is of the correct type and within the
34262 * permitted range for @key.
34264 * This API is not intended to be used by normal programs -- they should
34265 * already know what is permitted by their own schemas. This API is
34266 * meant to be used by programs such as editors or commandline tools.
34268 * It is a programmer error to give a @key that isn't contained in the
34269 * schema for @settings.
34271 * Returns: %TRUE if @value is valid for @key
34277 * g_settings_reset:
34278 * @settings: a #GSettings object
34279 * @key: the name of a key
34281 * Resets @key to its default value.
34283 * This call resets the key, as much as possible, to its default value.
34284 * That might the value specified in the schema or the one set by the
34290 * g_settings_revert:
34291 * @settings: a #GSettings instance
34293 * Reverts all non-applied changes to the settings. This function
34294 * does nothing unless @settings is in 'delay-apply' mode; see
34295 * g_settings_delay(). In the normal case settings are always applied
34298 * Change notifications will be emitted for affected keys.
34303 * g_settings_schema_get_id:
34304 * @schema: a #GSettingsSchema
34306 * Get the ID of @schema.
34308 * Returns: (transfer none): the ID
34313 * g_settings_schema_get_path:
34314 * @schema: a #GSettingsSchema
34316 * Gets the path associated with @schema, or %NULL.
34318 * Schemas may be single-instance or relocatable. Single-instance
34319 * schemas correspond to exactly one set of keys in the backend
34320 * database: those located at the path returned by this function.
34322 * Relocatable schemas can be referenced by other schemas and can
34323 * threfore describe multiple sets of keys at different locations. For
34324 * relocatable schemas, this function will return %NULL.
34326 * Returns: (transfer none): the path of the schema, or %NULL
34332 * g_settings_schema_ref:
34333 * @schema: a #GSettingsSchema
34335 * Increase the reference count of @schema, returning a new reference.
34337 * Returns: a new reference to @schema
34343 * g_settings_schema_source_get_default:
34345 * Gets the default system schema source.
34347 * This function is not required for normal uses of #GSettings but it
34348 * may be useful to authors of plugin management systems or to those who
34349 * want to introspect the content of schemas.
34351 * If no schemas are installed, %NULL will be returned.
34353 * The returned source may actually consist of multiple schema sources
34354 * from different directories, depending on which directories were given
34355 * in <envar>XDG_DATA_DIRS</envar> and
34356 * <envar>GSETTINGS_SCHEMA_DIR</envar>. For this reason, all lookups
34357 * performed against the default source should probably be done
34360 * Returns: (transfer none): the default schema source
34366 * g_settings_schema_source_lookup:
34367 * @source: a #GSettingsSchemaSource
34368 * @schema_id: a schema ID
34369 * @recursive: %TRUE if the lookup should be recursive
34371 * Looks up a schema with the identifier @schema_id in @source.
34373 * This function is not required for normal uses of #GSettings but it
34374 * may be useful to authors of plugin management systems or to those who
34375 * want to introspect the content of schemas.
34377 * If the schema isn't found directly in @source and @recursive is %TRUE
34378 * then the parent sources will also be checked.
34380 * If the schema isn't found, %NULL is returned.
34382 * Returns: (transfer full): a new #GSettingsSchema
34388 * g_settings_schema_source_new_from_directory:
34389 * @directory: the filename of a directory
34390 * @parent: (allow-none): a #GSettingsSchemaSource, or %NULL
34391 * @trusted: %TRUE, if the directory is trusted
34392 * @error: a pointer to a #GError pointer set to %NULL, or %NULL
34394 * Attempts to create a new schema source corresponding to the contents
34395 * of the given directory.
34397 * This function is not required for normal uses of #GSettings but it
34398 * may be useful to authors of plugin management systems.
34400 * The directory should contain a file called
34401 * <filename>gschemas.compiled</filename> as produced by
34402 * <command>glib-compile-schemas</command>.
34404 * If @trusted is %TRUE then <filename>gschemas.compiled</filename> is
34405 * trusted not to be corrupted. This assumption has a performance
34406 * advantage, but can result in crashes or inconsistent behaviour in the
34407 * case of a corrupted file. Generally, you should set @trusted to
34408 * %TRUE for files installed by the system and to %FALSE for files in
34409 * the home directory.
34411 * If @parent is non-%NULL then there are two effects.
34413 * First, if g_settings_schema_source_lookup() is called with the
34414 * @recursive flag set to %TRUE and the schema can not be found in the
34415 * source, the lookup will recurse to the parent.
34417 * Second, any references to other schemas specified within this
34418 * source (ie: <literal>child</literal> or <literal>extents</literal>)
34419 * references may be resolved from the @parent.
34421 * For this second reason, except in very unusual situations, the
34422 * @parent should probably be given as the default schema source, as
34423 * returned by g_settings_schema_source_get_default().
34430 * g_settings_schema_source_ref:
34431 * @source: a #GSettingsSchemaSource
34433 * Increase the reference count of @source, returning a new reference.
34435 * Returns: a new reference to @source
34441 * g_settings_schema_source_unref:
34442 * @source: a #GSettingsSchemaSource
34444 * Decrease the reference count of @source, possibly freeing it.
34451 * g_settings_schema_unref:
34452 * @schema: a #GSettingsSchema
34454 * Decrease the reference count of @schema, possibly freeing it.
34462 * @settings: a #GSettings object
34463 * @key: the name of the key to set
34464 * @format: a #GVariant format string
34465 * @...: arguments as per @format
34467 * Sets @key in @settings to @value.
34469 * A convenience function that combines g_settings_set_value() with
34472 * It is a programmer error to give a @key that isn't contained in the
34473 * schema for @settings or for the #GVariantType of @format to mismatch
34474 * the type given in the schema.
34476 * %FALSE if the key was not writable
34478 * Returns: %TRUE if setting the key succeeded,
34484 * g_settings_set_boolean:
34485 * @settings: a #GSettings object
34486 * @key: the name of the key to set
34487 * @value: the value to set it to
34489 * Sets @key in @settings to @value.
34491 * A convenience variant of g_settings_set() for booleans.
34493 * It is a programmer error to give a @key that isn't specified as
34494 * having a boolean type in the schema for @settings.
34496 * %FALSE if the key was not writable
34498 * Returns: %TRUE if setting the key succeeded,
34504 * g_settings_set_double:
34505 * @settings: a #GSettings object
34506 * @key: the name of the key to set
34507 * @value: the value to set it to
34509 * Sets @key in @settings to @value.
34511 * A convenience variant of g_settings_set() for doubles.
34513 * It is a programmer error to give a @key that isn't specified as
34514 * having a 'double' type in the schema for @settings.
34516 * %FALSE if the key was not writable
34518 * Returns: %TRUE if setting the key succeeded,
34524 * g_settings_set_enum:
34525 * @settings: a #GSettings object
34526 * @key: a key, within @settings
34527 * @value: an enumerated value
34529 * Looks up the enumerated type nick for @value and writes it to @key,
34530 * within @settings.
34532 * It is a programmer error to give a @key that isn't contained in the
34533 * schema for @settings or is not marked as an enumerated type, or for
34534 * @value not to be a valid value for the named type.
34536 * After performing the write, accessing @key directly with
34537 * g_settings_get_string() will return the 'nick' associated with
34540 * Returns: %TRUE, if the set succeeds
34545 * g_settings_set_flags:
34546 * @settings: a #GSettings object
34547 * @key: a key, within @settings
34548 * @value: a flags value
34550 * Looks up the flags type nicks for the bits specified by @value, puts
34551 * them in an array of strings and writes the array to @key, within
34554 * It is a programmer error to give a @key that isn't contained in the
34555 * schema for @settings or is not marked as a flags type, or for @value
34556 * to contain any bits that are not value for the named type.
34558 * After performing the write, accessing @key directly with
34559 * g_settings_get_strv() will return an array of 'nicks'; one for each
34562 * Returns: %TRUE, if the set succeeds
34567 * g_settings_set_int:
34568 * @settings: a #GSettings object
34569 * @key: the name of the key to set
34570 * @value: the value to set it to
34572 * Sets @key in @settings to @value.
34574 * A convenience variant of g_settings_set() for 32-bit integers.
34576 * It is a programmer error to give a @key that isn't specified as
34577 * having a int32 type in the schema for @settings.
34579 * %FALSE if the key was not writable
34581 * Returns: %TRUE if setting the key succeeded,
34587 * g_settings_set_string:
34588 * @settings: a #GSettings object
34589 * @key: the name of the key to set
34590 * @value: the value to set it to
34592 * Sets @key in @settings to @value.
34594 * A convenience variant of g_settings_set() for strings.
34596 * It is a programmer error to give a @key that isn't specified as
34597 * having a string type in the schema for @settings.
34599 * %FALSE if the key was not writable
34601 * Returns: %TRUE if setting the key succeeded,
34607 * g_settings_set_strv:
34608 * @settings: a #GSettings object
34609 * @key: the name of the key to set
34610 * @value: (allow-none) (array zero-terminated=1): the value to set it to, or %NULL
34612 * Sets @key in @settings to @value.
34614 * A convenience variant of g_settings_set() for string arrays. If
34615 * @value is %NULL, then @key is set to be the empty array.
34617 * It is a programmer error to give a @key that isn't specified as
34618 * having an array of strings type in the schema for @settings.
34620 * %FALSE if the key was not writable
34622 * Returns: %TRUE if setting the key succeeded,
34628 * g_settings_set_uint:
34629 * @settings: a #GSettings object
34630 * @key: the name of the key to set
34631 * @value: the value to set it to
34633 * Sets @key in @settings to @value.
34635 * A convenience variant of g_settings_set() for 32-bit unsigned
34638 * It is a programmer error to give a @key that isn't specified as
34639 * having a uint32 type in the schema for @settings.
34641 * %FALSE if the key was not writable
34643 * Returns: %TRUE if setting the key succeeded,
34649 * g_settings_set_value:
34650 * @settings: a #GSettings object
34651 * @key: the name of the key to set
34652 * @value: a #GVariant of the correct type
34654 * Sets @key in @settings to @value.
34656 * It is a programmer error to give a @key that isn't contained in the
34657 * schema for @settings or for @value to have the incorrect type, per
34660 * If @value is floating then this function consumes the reference.
34662 * %FALSE if the key was not writable
34664 * Returns: %TRUE if setting the key succeeded,
34672 * Ensures that all pending operations for the given are complete for
34673 * the default backend.
34675 * Writes made to a #GSettings are handled asynchronously. For this
34676 * reason, it is very unlikely that the changes have it to disk by the
34677 * time g_settings_set() returns.
34679 * This call will block until all of the writes have made it to the
34680 * backend. Since the mainloop is not running, no change notifications
34681 * will be dispatched during this call (but some may be queued by the
34682 * time the call is done).
34687 * g_settings_unbind:
34688 * @object: the object
34689 * @property: the property whose binding is removed
34691 * Removes an existing binding for @property on @object.
34693 * Note that bindings are automatically removed when the
34694 * object is finalized, so it is rarely necessary to call this
34702 * g_signal_connect:
34703 * @instance: the instance to connect to.
34704 * @detailed_signal: a string of the form "signal-name::detail".
34705 * @c_handler: the #GCallback to connect.
34706 * @data: data to pass to @c_handler calls.
34708 * Connects a #GCallback function to a signal for a particular object.
34710 * The handler will be called before the default handler of the signal.
34712 * Returns: the handler id
34717 * g_signal_connect_after:
34718 * @instance: the instance to connect to.
34719 * @detailed_signal: a string of the form "signal-name::detail".
34720 * @c_handler: the #GCallback to connect.
34721 * @data: data to pass to @c_handler calls.
34723 * Connects a #GCallback function to a signal for a particular object.
34725 * The handler will be called after the default handler of the signal.
34727 * Returns: the handler id
34732 * g_signal_connect_swapped:
34733 * @instance: the instance to connect to.
34734 * @detailed_signal: a string of the form "signal-name::detail".
34735 * @c_handler: the #GCallback to connect.
34736 * @data: data to pass to @c_handler calls.
34738 * Connects a #GCallback function to a signal for a particular object.
34740 * The instance on which the signal is emitted and @data will be swapped when
34741 * calling the handler.
34743 * Returns: the handler id
34748 * g_signal_handlers_block_by_func:
34749 * @instance: The instance to block handlers from.
34750 * @func: The C closure callback of the handlers (useless for non-C closures).
34751 * @data: The closure data of the handlers' closures.
34753 * Blocks all handlers on an instance that match @func and @data.
34755 * Returns: The number of handlers that matched.
34760 * g_signal_handlers_disconnect_by_func:
34761 * @instance: The instance to remove handlers from.
34762 * @func: The C closure callback of the handlers (useless for non-C closures).
34763 * @data: The closure data of the handlers' closures.
34765 * Disconnects all handlers on an instance that match @func and @data.
34767 * Returns: The number of handlers that matched.
34772 * g_signal_handlers_unblock_by_func:
34773 * @instance: The instance to unblock handlers from.
34774 * @func: The C closure callback of the handlers (useless for non-C closures).
34775 * @data: The closure data of the handlers' closures.
34777 * Unblocks all handlers on an instance that match @func and @data.
34779 * Returns: The number of handlers that matched.
34784 * g_simple_action_group_add_entries:
34785 * @simple: a #GSimpleActionGroup
34786 * @entries: (array length=n_entries): a pointer to the first item in an array of #GActionEntry structs
34787 * @n_entries: the length of @entries, or -1
34788 * @user_data: the user data for signal connections
34790 * A convenience function for creating multiple #GSimpleAction instances
34791 * and adding them to the action group.
34798 * g_simple_action_group_insert:
34799 * @simple: a #GSimpleActionGroup
34800 * @action: a #GAction
34802 * Adds an action to the action group.
34804 * If the action group already contains an action with the same name as
34805 * @action then the old action is dropped from the group.
34807 * The action group takes its own reference on @action.
34814 * g_simple_action_group_lookup:
34815 * @simple: a #GSimpleActionGroup
34816 * @action_name: the name of an action
34818 * Looks up the action with the name @action_name in the group.
34820 * If no such action exists, returns %NULL.
34822 * Returns: (transfer none): a #GAction, or %NULL
34828 * g_simple_action_group_new:
34830 * Creates a new, empty, #GSimpleActionGroup.
34832 * Returns: a new #GSimpleActionGroup
34838 * g_simple_action_group_remove:
34839 * @simple: a #GSimpleActionGroup
34840 * @action_name: the name of the action
34842 * Removes the named action from the action group.
34844 * If no action of this name is in the group then nothing happens.
34851 * g_simple_action_new:
34852 * @name: the name of the action
34853 * @parameter_type: (allow-none): the type of parameter to the activate function
34855 * Creates a new action.
34857 * The created action is stateless. See g_simple_action_new_stateful().
34859 * Returns: a new #GSimpleAction
34865 * g_simple_action_new_stateful:
34866 * @name: the name of the action
34867 * @parameter_type: (allow-none): the type of the parameter to the activate function
34868 * @state: the initial state of the action
34870 * Creates a new stateful action.
34872 * @state is the initial state of the action. All future state values
34873 * must have the same #GVariantType as the initial state.
34875 * If the @state GVariant is floating, it is consumed.
34877 * Returns: a new #GSimpleAction
34883 * g_simple_action_set_enabled:
34884 * @simple: a #GSimpleAction
34885 * @enabled: whether the action is enabled
34887 * Sets the action as enabled or not.
34889 * An action must be enabled in order to be activated or in order to
34890 * have its state changed from outside callers.
34892 * This should only be called by the implementor of the action. Users
34893 * of the action should not attempt to modify its enabled flag.
34900 * g_simple_action_set_state:
34901 * @simple: a #GSimpleAction
34902 * @value: the new #GVariant for the state
34904 * Sets the state of the action.
34906 * This directly updates the 'state' property to the given value.
34908 * This should only be called by the implementor of the action. Users
34909 * of the action should not attempt to directly modify the 'state'
34910 * property. Instead, they should call g_action_change_state() to
34911 * request the change.
34918 * g_simple_async_report_error_in_idle: (skip)
34919 * @object: (allow-none): a #GObject, or %NULL.
34920 * @callback: a #GAsyncReadyCallback.
34921 * @user_data: user data passed to @callback.
34922 * @domain: a #GQuark containing the error domain (usually #G_IO_ERROR).
34923 * @code: a specific error code.
34924 * @format: a formatted error reporting string.
34925 * @...: a list of variables to fill in @format.
34927 * Reports an error in an asynchronous function in an idle function by
34928 * directly setting the contents of the #GAsyncResult with the given error
34934 * g_simple_async_report_gerror_in_idle:
34935 * @object: (allow-none): a #GObject, or %NULL
34936 * @callback: (scope async): a #GAsyncReadyCallback.
34937 * @user_data: (closure): user data passed to @callback.
34938 * @error: the #GError to report
34940 * Reports an error in an idle function. Similar to
34941 * g_simple_async_report_error_in_idle(), but takes a #GError rather
34942 * than building a new one.
34947 * g_simple_async_report_take_gerror_in_idle: (skip)
34948 * @object: (allow-none): a #GObject, or %NULL
34949 * @callback: a #GAsyncReadyCallback.
34950 * @user_data: user data passed to @callback.
34951 * @error: the #GError to report
34953 * Reports an error in an idle function. Similar to
34954 * g_simple_async_report_gerror_in_idle(), but takes over the caller's
34955 * ownership of @error, so the caller does not have to free it any more.
34962 * g_simple_async_result_complete:
34963 * @simple: a #GSimpleAsyncResult.
34965 * Completes an asynchronous I/O job immediately. Must be called in
34966 * the thread where the asynchronous result was to be delivered, as it
34967 * invokes the callback directly. If you are in a different thread use
34968 * g_simple_async_result_complete_in_idle().
34970 * Calling this function takes a reference to @simple for as long as
34971 * is needed to complete the call.
34976 * g_simple_async_result_complete_in_idle:
34977 * @simple: a #GSimpleAsyncResult.
34979 * Completes an asynchronous function in an idle handler in the <link
34980 * linkend="g-main-context-push-thread-default">thread-default main
34981 * loop</link> of the thread that @simple was initially created in
34982 * (and re-pushes that context around the invocation of the callback).
34984 * Calling this function takes a reference to @simple for as long as
34985 * is needed to complete the call.
34990 * g_simple_async_result_get_op_res_gboolean:
34991 * @simple: a #GSimpleAsyncResult.
34993 * Gets the operation result boolean from within the asynchronous result.
34995 * if the operation's result was %FALSE.
34997 * Returns: %TRUE if the operation's result was %TRUE, %FALSE
35002 * g_simple_async_result_get_op_res_gpointer: (skip)
35003 * @simple: a #GSimpleAsyncResult.
35005 * Gets a pointer result as returned by the asynchronous function.
35007 * Returns: a pointer from the result.
35012 * g_simple_async_result_get_op_res_gssize:
35013 * @simple: a #GSimpleAsyncResult.
35015 * Gets a gssize from the asynchronous result.
35017 * Returns: a gssize returned from the asynchronous function.
35022 * g_simple_async_result_get_source_tag: (skip)
35023 * @simple: a #GSimpleAsyncResult.
35025 * Gets the source tag for the #GSimpleAsyncResult.
35027 * Returns: a #gpointer to the source object for the #GSimpleAsyncResult.
35032 * g_simple_async_result_is_valid:
35033 * @result: the #GAsyncResult passed to the _finish function.
35034 * @source: the #GObject passed to the _finish function.
35035 * @source_tag: the asynchronous function.
35037 * Ensures that the data passed to the _finish function of an async
35038 * operation is consistent. Three checks are performed.
35040 * First, @result is checked to ensure that it is really a
35041 * #GSimpleAsyncResult. Second, @source is checked to ensure that it
35042 * matches the source object of @result. Third, @source_tag is
35043 * checked to ensure that it is either %NULL (as it is when the result was
35044 * created by g_simple_async_report_error_in_idle() or
35045 * g_simple_async_report_gerror_in_idle()) or equal to the
35046 * @source_tag argument given to g_simple_async_result_new() (which, by
35047 * convention, is a pointer to the _async function corresponding to the
35048 * _finish function from which this function is called).
35050 * Returns: #TRUE if all checks passed or #FALSE if any failed.
35056 * g_simple_async_result_new:
35057 * @source_object: (allow-none): a #GObject, or %NULL.
35058 * @callback: (scope async): a #GAsyncReadyCallback.
35059 * @user_data: (closure): user data passed to @callback.
35060 * @source_tag: the asynchronous function.
35062 * Creates a #GSimpleAsyncResult.
35064 * Returns: a #GSimpleAsyncResult.
35069 * g_simple_async_result_new_error:
35070 * @source_object: (allow-none): a #GObject, or %NULL.
35071 * @callback: (scope async): a #GAsyncReadyCallback.
35072 * @user_data: (closure): user data passed to @callback.
35073 * @domain: a #GQuark.
35074 * @code: an error code.
35075 * @format: a string with format characters.
35076 * @...: a list of values to insert into @format.
35078 * Creates a new #GSimpleAsyncResult with a set error.
35080 * Returns: a #GSimpleAsyncResult.
35085 * g_simple_async_result_new_from_error:
35086 * @source_object: (allow-none): a #GObject, or %NULL.
35087 * @callback: (scope async): a #GAsyncReadyCallback.
35088 * @user_data: (closure): user data passed to @callback.
35089 * @error: a #GError
35091 * Creates a #GSimpleAsyncResult from an error condition.
35093 * Returns: a #GSimpleAsyncResult.
35098 * g_simple_async_result_new_take_error: (skip)
35099 * @source_object: (allow-none): a #GObject, or %NULL
35100 * @callback: (scope async): a #GAsyncReadyCallback
35101 * @user_data: (closure): user data passed to @callback
35102 * @error: a #GError
35104 * Creates a #GSimpleAsyncResult from an error condition, and takes over the
35105 * caller's ownership of @error, so the caller does not need to free it anymore.
35107 * Returns: a #GSimpleAsyncResult
35113 * g_simple_async_result_propagate_error:
35114 * @simple: a #GSimpleAsyncResult.
35115 * @dest: (out): a location to propagate the error to.
35117 * Propagates an error from within the simple asynchronous result to
35118 * a given destination.
35120 * Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise.
35125 * g_simple_async_result_run_in_thread: (skip)
35126 * @simple: a #GSimpleAsyncResult.
35127 * @func: a #GSimpleAsyncThreadFunc.
35128 * @io_priority: the io priority of the request.
35129 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
35131 * Runs the asynchronous job in a separate thread and then calls
35132 * g_simple_async_result_complete_in_idle() on @simple to return
35133 * the result to the appropriate main loop.
35135 * Calling this function takes a reference to @simple for as long as
35136 * is needed to run the job and report its completion.
35141 * g_simple_async_result_set_error: (skip)
35142 * @simple: a #GSimpleAsyncResult.
35143 * @domain: a #GQuark (usually #G_IO_ERROR).
35144 * @code: an error code.
35145 * @format: a formatted error reporting string.
35146 * @...: a list of variables to fill in @format.
35148 * Sets an error within the asynchronous result without a #GError.
35153 * g_simple_async_result_set_error_va: (skip)
35154 * @simple: a #GSimpleAsyncResult.
35155 * @domain: a #GQuark (usually #G_IO_ERROR).
35156 * @code: an error code.
35157 * @format: a formatted error reporting string.
35158 * @args: va_list of arguments.
35160 * Sets an error within the asynchronous result without a #GError.
35161 * Unless writing a binding, see g_simple_async_result_set_error().
35166 * g_simple_async_result_set_from_error:
35167 * @simple: a #GSimpleAsyncResult.
35170 * Sets the result from a #GError.
35175 * g_simple_async_result_set_handle_cancellation:
35176 * @simple: a #GSimpleAsyncResult.
35177 * @handle_cancellation: a #gboolean.
35179 * Sets whether to handle cancellation within the asynchronous operation.
35184 * g_simple_async_result_set_op_res_gboolean:
35185 * @simple: a #GSimpleAsyncResult.
35186 * @op_res: a #gboolean.
35188 * Sets the operation result to a boolean within the asynchronous result.
35193 * g_simple_async_result_set_op_res_gpointer: (skip)
35194 * @simple: a #GSimpleAsyncResult.
35195 * @op_res: a pointer result from an asynchronous function.
35196 * @destroy_op_res: a #GDestroyNotify function.
35198 * Sets the operation result within the asynchronous result to a pointer.
35203 * g_simple_async_result_set_op_res_gssize:
35204 * @simple: a #GSimpleAsyncResult.
35205 * @op_res: a #gssize.
35207 * Sets the operation result within the asynchronous result to
35208 * the given @op_res.
35213 * g_simple_async_result_take_error: (skip)
35214 * @simple: a #GSimpleAsyncResult
35215 * @error: a #GError
35217 * Sets the result from @error, and takes over the caller's ownership
35218 * of @error, so the caller does not need to free it any more.
35225 * g_simple_permission_new:
35226 * @allowed: %TRUE if the action is allowed
35228 * Creates a new #GPermission instance that represents an action that is
35229 * either always or never allowed.
35231 * Returns: the #GSimplePermission, as a #GPermission
35238 * @socket: a #GSocket.
35239 * @cancellable: (allow-none): a %GCancellable or %NULL
35240 * @error: #GError for error reporting, or %NULL to ignore.
35242 * Accept incoming connections on a connection-based socket. This removes
35243 * the first outstanding connection request from the listening socket and
35244 * creates a #GSocket object for it.
35246 * The @socket must be bound to a local address with g_socket_bind() and
35247 * must be listening for incoming connections (g_socket_listen()).
35249 * If there are no outstanding connections then the operation will block
35250 * or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.
35251 * To be notified of an incoming connection, wait for the %G_IO_IN condition.
35253 * Free the returned object with g_object_unref().
35255 * Returns: (transfer full): a new #GSocket, or %NULL on error.
35261 * g_socket_address_enumerator_next:
35262 * @enumerator: a #GSocketAddressEnumerator
35263 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
35264 * @error: a #GError.
35266 * Retrieves the next #GSocketAddress from @enumerator. Note that this
35267 * may block for some amount of time. (Eg, a #GNetworkAddress may need
35268 * to do a DNS lookup before it can return an address.) Use
35269 * g_socket_address_enumerator_next_async() if you need to avoid
35272 * If @enumerator is expected to yield addresses, but for some reason
35273 * is unable to (eg, because of a DNS error), then the first call to
35274 * g_socket_address_enumerator_next() will return an appropriate error
35275 * in *@error. However, if the first call to
35276 * g_socket_address_enumerator_next() succeeds, then any further
35277 * internal errors (other than @cancellable being triggered) will be
35280 * error (in which case *@error will be set) or if there are no
35283 * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
35288 * g_socket_address_enumerator_next_async:
35289 * @enumerator: a #GSocketAddressEnumerator
35290 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
35291 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
35292 * @user_data: (closure): the data to pass to callback function
35294 * Asynchronously retrieves the next #GSocketAddress from @enumerator
35295 * and then calls @callback, which must call
35296 * g_socket_address_enumerator_next_finish() to get the result.
35301 * g_socket_address_enumerator_next_finish:
35302 * @enumerator: a #GSocketAddressEnumerator
35303 * @result: a #GAsyncResult
35304 * @error: a #GError
35306 * Retrieves the result of a completed call to
35307 * g_socket_address_enumerator_next_async(). See
35308 * g_socket_address_enumerator_next() for more information about
35311 * error (in which case *@error will be set) or if there are no
35314 * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
35319 * g_socket_address_get_family:
35320 * @address: a #GSocketAddress
35322 * Gets the socket family type of @address.
35324 * Returns: the socket family type of @address.
35330 * g_socket_address_get_native_size:
35331 * @address: a #GSocketAddress
35333 * Gets the size of @address's native <type>struct sockaddr</type>.
35334 * You can use this to allocate memory to pass to
35335 * g_socket_address_to_native().
35337 * @address represents
35339 * Returns: the size of the native <type>struct sockaddr</type> that
35345 * g_socket_address_new_from_native:
35346 * @native: a pointer to a <type>struct sockaddr</type>
35347 * @len: the size of the memory location pointed to by @native
35349 * Creates a #GSocketAddress subclass corresponding to the native
35350 * <type>struct sockaddr</type> @native.
35354 * Returns: a new #GSocketAddress if @native could successfully be converted,
35360 * g_socket_address_to_native:
35361 * @address: a #GSocketAddress
35362 * @dest: a pointer to a memory location that will contain the native <type>struct sockaddr</type>.
35363 * @destlen: the size of @dest. Must be at least as large as g_socket_address_get_native_size().
35364 * @error: #GError for error reporting, or %NULL to ignore.
35366 * Converts a #GSocketAddress to a native <type>struct
35367 * sockaddr</type>, which can be passed to low-level functions like
35368 * connect() or bind().
35370 * If not enough space is available, a %G_IO_ERROR_NO_SPACE error is
35371 * returned. If the address type is not known on the system
35372 * then a %G_IO_ERROR_NOT_SUPPORTED error is returned.
35374 * Returns: %TRUE if @dest was filled in, %FALSE on error
35381 * @socket: a #GSocket.
35382 * @address: a #GSocketAddress specifying the local address.
35383 * @allow_reuse: whether to allow reusing this address
35384 * @error: #GError for error reporting, or %NULL to ignore.
35386 * When a socket is created it is attached to an address family, but it
35387 * doesn't have an address in this family. g_socket_bind() assigns the
35388 * address (sometimes called name) of the socket.
35390 * It is generally required to bind to a local address before you can
35391 * receive connections. (See g_socket_listen() and g_socket_accept() ).
35392 * In certain situations, you may also want to bind a socket that will be
35393 * used to initiate connections, though this is not normally required.
35395 * @allow_reuse should be %TRUE for server sockets (sockets that you will
35396 * eventually call g_socket_accept() on), and %FALSE for client sockets.
35397 * (Specifically, if it is %TRUE, then g_socket_bind() will set the
35398 * %SO_REUSEADDR flag on the socket, allowing it to bind @address even if
35399 * that address was previously used by another socket that has not yet been
35400 * fully cleaned-up by the kernel. Failing to set this flag on a server
35401 * socket may cause the bind call to return %G_IO_ERROR_ADDRESS_IN_USE if
35402 * the server program is stopped and then immediately restarted.)
35404 * Returns: %TRUE on success, %FALSE on error.
35410 * g_socket_check_connect_result:
35411 * @socket: a #GSocket
35412 * @error: #GError for error reporting, or %NULL to ignore.
35414 * Checks and resets the pending connect error for the socket.
35415 * This is used to check for errors when g_socket_connect() is
35416 * used in non-blocking mode.
35418 * Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error
35424 * g_socket_client_add_application_proxy:
35425 * @client: a #GSocketClient
35426 * @protocol: The proxy protocol
35428 * Enable proxy protocols to be handled by the application. When the
35429 * indicated proxy protocol is returned by the #GProxyResolver,
35430 * #GSocketClient will consider this protocol as supported but will
35431 * not try to find a #GProxy instance to handle handshaking. The
35432 * application must check for this case by calling
35433 * g_socket_connection_get_remote_address() on the returned
35434 * #GSocketConnection, and seeing if it's a #GProxyAddress of the
35435 * appropriate type, to determine whether or not it needs to handle
35436 * the proxy handshaking itself.
35438 * This should be used for proxy protocols that are dialects of
35439 * another protocol such as HTTP proxy. It also allows cohabitation of
35440 * proxy protocols that are reused between protocols. A good example
35441 * is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also
35442 * be use as generic socket proxy through the HTTP CONNECT method.
35444 * When the proxy is detected as being an application proxy, TLS handshake
35445 * will be skipped. This is required to let the application do the proxy
35446 * specific handshake.
35451 * g_socket_client_connect:
35452 * @client: a #GSocketClient.
35453 * @connectable: a #GSocketConnectable specifying the remote address.
35454 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
35455 * @error: #GError for error reporting, or %NULL to ignore.
35457 * Tries to resolve the @connectable and make a network connection to it.
35459 * Upon a successful connection, a new #GSocketConnection is constructed
35460 * and returned. The caller owns this new object and must drop their
35461 * reference to it when finished with it.
35463 * The type of the #GSocketConnection object returned depends on the type of
35464 * the underlying socket that is used. For instance, for a TCP/IP connection
35465 * it will be a #GTcpConnection.
35467 * The socket created will be the same family as the address that the
35468 * @connectable resolves to, unless family is set with g_socket_client_set_family()
35469 * or indirectly via g_socket_client_set_local_address(). The socket type
35470 * defaults to %G_SOCKET_TYPE_STREAM but can be set with
35471 * g_socket_client_set_socket_type().
35473 * If a local address is specified with g_socket_client_set_local_address() the
35474 * socket will be bound to this address before connecting.
35476 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
35482 * g_socket_client_connect_async:
35483 * @client: a #GSocketClient
35484 * @connectable: a #GSocketConnectable specifying the remote address.
35485 * @cancellable: (allow-none): a #GCancellable, or %NULL
35486 * @callback: (scope async): a #GAsyncReadyCallback
35487 * @user_data: (closure): user data for the callback
35489 * This is the asynchronous version of g_socket_client_connect().
35491 * When the operation is finished @callback will be
35492 * called. You can then call g_socket_client_connect_finish() to get
35493 * the result of the operation.
35500 * g_socket_client_connect_finish:
35501 * @client: a #GSocketClient.
35502 * @result: a #GAsyncResult.
35503 * @error: a #GError location to store the error occurring, or %NULL to ignore.
35505 * Finishes an async connect operation. See g_socket_client_connect_async()
35507 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
35513 * g_socket_client_connect_to_host:
35514 * @client: a #GSocketClient
35515 * @host_and_port: the name and optionally port of the host to connect to
35516 * @default_port: the default port to connect to
35517 * @cancellable: (allow-none): a #GCancellable, or %NULL
35518 * @error: a pointer to a #GError, or %NULL
35520 * This is a helper function for g_socket_client_connect().
35522 * Attempts to create a TCP connection to the named host.
35524 * @host_and_port may be in any of a number of recognized formats; an IPv6
35525 * address, an IPv4 address, or a domain name (in which case a DNS
35526 * lookup is performed). Quoting with [] is supported for all address
35527 * types. A port override may be specified in the usual way with a
35528 * colon. Ports may be given as decimal numbers or symbolic names (in
35529 * which case an /etc/services lookup is performed).
35531 * If no port override is given in @host_and_port then @default_port will be
35532 * used as the port number to connect to.
35534 * In general, @host_and_port is expected to be provided by the user (allowing
35535 * them to give the hostname, and a port override if necessary) and
35536 * @default_port is expected to be provided by the application.
35538 * In the case that an IP address is given, a single connection
35539 * attempt is made. In the case that a name is given, multiple
35540 * connection attempts may be made, in turn and according to the
35541 * number of address records in DNS, until a connection succeeds.
35543 * Upon a successful connection, a new #GSocketConnection is constructed
35544 * and returned. The caller owns this new object and must drop their
35545 * reference to it when finished with it.
35547 * In the event of any failure (DNS error, service not found, no hosts
35548 * connectable) %NULL is returned and @error (if non-%NULL) is set
35551 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
35557 * g_socket_client_connect_to_host_async:
35558 * @client: a #GSocketClient
35559 * @host_and_port: the name and optionally the port of the host to connect to
35560 * @default_port: the default port to connect to
35561 * @cancellable: (allow-none): a #GCancellable, or %NULL
35562 * @callback: (scope async): a #GAsyncReadyCallback
35563 * @user_data: (closure): user data for the callback
35565 * This is the asynchronous version of g_socket_client_connect_to_host().
35567 * When the operation is finished @callback will be
35568 * called. You can then call g_socket_client_connect_to_host_finish() to get
35569 * the result of the operation.
35576 * g_socket_client_connect_to_host_finish:
35577 * @client: a #GSocketClient.
35578 * @result: a #GAsyncResult.
35579 * @error: a #GError location to store the error occurring, or %NULL to ignore.
35581 * Finishes an async connect operation. See g_socket_client_connect_to_host_async()
35583 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
35589 * g_socket_client_connect_to_service:
35590 * @client: a #GSocketConnection
35591 * @domain: a domain name
35592 * @service: the name of the service to connect to
35593 * @cancellable: (allow-none): a #GCancellable, or %NULL
35594 * @error: a pointer to a #GError, or %NULL
35596 * Attempts to create a TCP connection to a service.
35598 * This call looks up the SRV record for @service at @domain for the
35599 * "tcp" protocol. It then attempts to connect, in turn, to each of
35600 * the hosts providing the service until either a connection succeeds
35601 * or there are no hosts remaining.
35603 * Upon a successful connection, a new #GSocketConnection is constructed
35604 * and returned. The caller owns this new object and must drop their
35605 * reference to it when finished with it.
35607 * In the event of any failure (DNS error, service not found, no hosts
35608 * connectable) %NULL is returned and @error (if non-%NULL) is set
35611 * Returns: (transfer full): a #GSocketConnection if successful, or %NULL on error
35616 * g_socket_client_connect_to_service_async:
35617 * @client: a #GSocketClient
35618 * @domain: a domain name
35619 * @service: the name of the service to connect to
35620 * @cancellable: (allow-none): a #GCancellable, or %NULL
35621 * @callback: (scope async): a #GAsyncReadyCallback
35622 * @user_data: (closure): user data for the callback
35624 * This is the asynchronous version of
35625 * g_socket_client_connect_to_service().
35632 * g_socket_client_connect_to_service_finish:
35633 * @client: a #GSocketClient.
35634 * @result: a #GAsyncResult.
35635 * @error: a #GError location to store the error occurring, or %NULL to ignore.
35637 * Finishes an async connect operation. See g_socket_client_connect_to_service_async()
35639 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
35645 * g_socket_client_connect_to_uri:
35646 * @client: a #GSocketClient
35647 * @uri: A network URI
35648 * @default_port: the default port to connect to
35649 * @cancellable: (allow-none): a #GCancellable, or %NULL
35650 * @error: a pointer to a #GError, or %NULL
35652 * This is a helper function for g_socket_client_connect().
35654 * Attempts to create a TCP connection with a network URI.
35656 * @uri may be any valid URI containing an "authority" (hostname/port)
35657 * component. If a port is not specified in the URI, @default_port
35658 * will be used. TLS will be negotiated if #GSocketClient:tls is %TRUE.
35659 * (#GSocketClient does not know to automatically assume TLS for
35660 * certain URI schemes.)
35662 * Using this rather than g_socket_client_connect() or
35663 * g_socket_client_connect_to_host() allows #GSocketClient to
35664 * determine when to use application-specific proxy protocols.
35666 * Upon a successful connection, a new #GSocketConnection is constructed
35667 * and returned. The caller owns this new object and must drop their
35668 * reference to it when finished with it.
35670 * In the event of any failure (DNS error, service not found, no hosts
35671 * connectable) %NULL is returned and @error (if non-%NULL) is set
35674 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
35680 * g_socket_client_connect_to_uri_async:
35681 * @client: a #GSocketClient
35682 * @uri: a network uri
35683 * @default_port: the default port to connect to
35684 * @cancellable: (allow-none): a #GCancellable, or %NULL
35685 * @callback: (scope async): a #GAsyncReadyCallback
35686 * @user_data: (closure): user data for the callback
35688 * This is the asynchronous version of g_socket_client_connect_to_uri().
35690 * When the operation is finished @callback will be
35691 * called. You can then call g_socket_client_connect_to_uri_finish() to get
35692 * the result of the operation.
35699 * g_socket_client_connect_to_uri_finish:
35700 * @client: a #GSocketClient.
35701 * @result: a #GAsyncResult.
35702 * @error: a #GError location to store the error occurring, or %NULL to ignore.
35704 * Finishes an async connect operation. See g_socket_client_connect_to_uri_async()
35706 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
35712 * g_socket_client_get_enable_proxy:
35713 * @client: a #GSocketClient.
35715 * Gets the proxy enable state; see g_socket_client_set_enable_proxy()
35717 * Returns: whether proxying is enabled
35723 * g_socket_client_get_family:
35724 * @client: a #GSocketClient.
35726 * Gets the socket family of the socket client.
35728 * See g_socket_client_set_family() for details.
35730 * Returns: a #GSocketFamily
35736 * g_socket_client_get_local_address:
35737 * @client: a #GSocketClient.
35739 * Gets the local address of the socket client.
35741 * See g_socket_client_set_local_address() for details.
35743 * Returns: (transfer none): a #GSocketAddress or %NULL. Do not free.
35749 * g_socket_client_get_protocol:
35750 * @client: a #GSocketClient
35752 * Gets the protocol name type of the socket client.
35754 * See g_socket_client_set_protocol() for details.
35756 * Returns: a #GSocketProtocol
35762 * g_socket_client_get_socket_type:
35763 * @client: a #GSocketClient.
35765 * Gets the socket type of the socket client.
35767 * See g_socket_client_set_socket_type() for details.
35769 * Returns: a #GSocketFamily
35775 * g_socket_client_get_timeout:
35776 * @client: a #GSocketClient
35778 * Gets the I/O timeout time for sockets created by @client.
35780 * See g_socket_client_set_timeout() for details.
35782 * Returns: the timeout in seconds
35788 * g_socket_client_get_tls:
35789 * @client: a #GSocketClient.
35791 * Gets whether @client creates TLS connections. See
35792 * g_socket_client_set_tls() for details.
35794 * Returns: whether @client uses TLS
35800 * g_socket_client_get_tls_validation_flags:
35801 * @client: a #GSocketClient.
35803 * Gets the TLS validation flags used creating TLS connections via
35806 * Returns: the TLS validation flags
35812 * g_socket_client_new:
35814 * Creates a new #GSocketClient with the default options.
35816 * Free the returned object with g_object_unref().
35818 * Returns: a #GSocketClient.
35824 * g_socket_client_set_enable_proxy:
35825 * @client: a #GSocketClient.
35826 * @enable: whether to enable proxies
35828 * Sets whether or not @client attempts to make connections via a
35829 * proxy server. When enabled (the default), #GSocketClient will use a
35830 * #GProxyResolver to determine if a proxy protocol such as SOCKS is
35831 * needed, and automatically do the necessary proxy negotiation.
35838 * g_socket_client_set_family:
35839 * @client: a #GSocketClient.
35840 * @family: a #GSocketFamily
35842 * Sets the socket family of the socket client.
35843 * If this is set to something other than %G_SOCKET_FAMILY_INVALID
35844 * then the sockets created by this object will be of the specified
35847 * This might be useful for instance if you want to force the local
35848 * connection to be an ipv4 socket, even though the address might
35849 * be an ipv6 mapped to ipv4 address.
35856 * g_socket_client_set_local_address:
35857 * @client: a #GSocketClient.
35858 * @address: a #GSocketAddress, or %NULL
35860 * Sets the local address of the socket client.
35861 * The sockets created by this object will bound to the
35862 * specified address (if not %NULL) before connecting.
35864 * This is useful if you want to ensure that the local
35865 * side of the connection is on a specific port, or on
35866 * a specific interface.
35873 * g_socket_client_set_protocol:
35874 * @client: a #GSocketClient.
35875 * @protocol: a #GSocketProtocol
35877 * Sets the protocol of the socket client.
35878 * The sockets created by this object will use of the specified
35881 * If @protocol is %0 that means to use the default
35882 * protocol for the socket family and type.
35889 * g_socket_client_set_socket_type:
35890 * @client: a #GSocketClient.
35891 * @type: a #GSocketType
35893 * Sets the socket type of the socket client.
35894 * The sockets created by this object will be of the specified
35897 * It doesn't make sense to specify a type of %G_SOCKET_TYPE_DATAGRAM,
35898 * as GSocketClient is used for connection oriented services.
35905 * g_socket_client_set_timeout:
35906 * @client: a #GSocketClient.
35907 * @timeout: the timeout
35909 * Sets the I/O timeout for sockets created by @client. @timeout is a
35910 * time in seconds, or 0 for no timeout (the default).
35912 * The timeout value affects the initial connection attempt as well,
35913 * so setting this may cause calls to g_socket_client_connect(), etc,
35914 * to fail with %G_IO_ERROR_TIMED_OUT.
35921 * g_socket_client_set_tls:
35922 * @client: a #GSocketClient.
35923 * @tls: whether to use TLS
35925 * Sets whether @client creates TLS (aka SSL) connections. If @tls is
35926 * %TRUE, @client will wrap its connections in a #GTlsClientConnection
35927 * and perform a TLS handshake when connecting.
35929 * Note that since #GSocketClient must return a #GSocketConnection,
35930 * but #GTlsClientConnection is not a #GSocketConnection, this
35931 * actually wraps the resulting #GTlsClientConnection in a
35932 * #GTcpWrapperConnection when returning it. You can use
35933 * g_tcp_wrapper_connection_get_base_io_stream() on the return value
35934 * to extract the #GTlsClientConnection.
35936 * If you need to modify the behavior of the TLS handshake (eg, by
35937 * setting a client-side certificate to use, or connecting to the
35938 * #GTlsConnection::accept-certificate signal), you can connect to
35939 * @client's #GSocketClient::event signal and wait for it to be
35940 * emitted with %G_SOCKET_CLIENT_TLS_HANDSHAKING, which will give you
35941 * a chance to see the #GTlsClientConnection before the handshake
35949 * g_socket_client_set_tls_validation_flags:
35950 * @client: a #GSocketClient.
35951 * @flags: the validation flags
35953 * Sets the TLS validation flags used when creating TLS connections
35954 * via @client. The default value is %G_TLS_CERTIFICATE_VALIDATE_ALL.
35962 * @socket: a #GSocket
35963 * @error: #GError for error reporting, or %NULL to ignore.
35965 * Closes the socket, shutting down any active connection.
35967 * Closing a socket does not wait for all outstanding I/O operations
35968 * to finish, so the caller should not rely on them to be guaranteed
35969 * to complete even if the close returns with no error.
35971 * Once the socket is closed, all other operations will return
35972 * %G_IO_ERROR_CLOSED. Closing a socket multiple times will not
35975 * Sockets will be automatically closed when the last reference
35976 * is dropped, but you might want to call this function to make sure
35977 * resources are released as early as possible.
35979 * Beware that due to the way that TCP works, it is possible for
35980 * recently-sent data to be lost if either you close a socket while the
35981 * %G_IO_IN condition is set, or else if the remote connection tries to
35982 * send something to you after you close the socket but before it has
35983 * finished reading all of the data you sent. There is no easy generic
35984 * way to avoid this problem; the easiest fix is to design the network
35985 * protocol such that the client will never send data "out of turn".
35986 * Another solution is for the server to half-close the connection by
35987 * calling g_socket_shutdown() with only the @shutdown_write flag set,
35988 * and then wait for the client to notice this and close its side of the
35989 * connection, after which the server can safely call g_socket_close().
35990 * (This is what #GTcpConnection does if you call
35991 * g_tcp_connection_set_graceful_disconnect(). But of course, this
35992 * only works if the client will close its connection after the server
35995 * Returns: %TRUE on success, %FALSE on error
36001 * g_socket_condition_check:
36002 * @socket: a #GSocket
36003 * @condition: a #GIOCondition mask to check
36005 * Checks on the readiness of @socket to perform operations.
36006 * The operations specified in @condition are checked for and masked
36007 * against the currently-satisfied conditions on @socket. The result
36010 * Note that on Windows, it is possible for an operation to return
36011 * %G_IO_ERROR_WOULD_BLOCK even immediately after
36012 * g_socket_condition_check() has claimed that the socket is ready for
36013 * writing. Rather than calling g_socket_condition_check() and then
36014 * writing to the socket if it succeeds, it is generally better to
36015 * simply try writing to the socket right away, and try again later if
36016 * the initial attempt returns %G_IO_ERROR_WOULD_BLOCK.
36018 * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition;
36019 * these conditions will always be set in the output if they are true.
36021 * This call never blocks.
36023 * Returns: the @GIOCondition mask of the current state
36029 * g_socket_condition_wait:
36030 * @socket: a #GSocket
36031 * @condition: a #GIOCondition mask to wait for
36032 * @cancellable: (allow-none): a #GCancellable, or %NULL
36033 * @error: a #GError pointer, or %NULL
36035 * Waits for @condition to become true on @socket. When the condition
36036 * is met, %TRUE is returned.
36038 * If @cancellable is cancelled before the condition is met, or if the
36039 * socket has a timeout set and it is reached before the condition is
36040 * met, then %FALSE is returned and @error, if non-%NULL, is set to
36041 * the appropriate value (%G_IO_ERROR_CANCELLED or
36042 * %G_IO_ERROR_TIMED_OUT).
36044 * Returns: %TRUE if the condition was met, %FALSE otherwise
36050 * g_socket_connect:
36051 * @socket: a #GSocket.
36052 * @address: a #GSocketAddress specifying the remote address.
36053 * @cancellable: (allow-none): a %GCancellable or %NULL
36054 * @error: #GError for error reporting, or %NULL to ignore.
36056 * Connect the socket to the specified remote address.
36058 * For connection oriented socket this generally means we attempt to make
36059 * a connection to the @address. For a connection-less socket it sets
36060 * the default address for g_socket_send() and discards all incoming datagrams
36061 * from other sources.
36063 * Generally connection oriented sockets can only connect once, but
36064 * connection-less sockets can connect multiple times to change the
36067 * If the connect call needs to do network I/O it will block, unless
36068 * non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
36069 * and the user can be notified of the connection finishing by waiting
36070 * for the G_IO_OUT condition. The result of the connection must then be
36071 * checked with g_socket_check_connect_result().
36073 * Returns: %TRUE if connected, %FALSE on error.
36079 * g_socket_connectable_enumerate:
36080 * @connectable: a #GSocketConnectable
36082 * Creates a #GSocketAddressEnumerator for @connectable.
36084 * Returns: (transfer full): a new #GSocketAddressEnumerator.
36090 * g_socket_connectable_proxy_enumerate:
36091 * @connectable: a #GSocketConnectable
36093 * Creates a #GSocketAddressEnumerator for @connectable that will
36094 * return #GProxyAddress<!-- -->es for addresses that you must connect
36097 * If @connectable does not implement
36098 * g_socket_connectable_proxy_enumerate(), this will fall back to
36099 * calling g_socket_connectable_enumerate().
36101 * Returns: (transfer full): a new #GSocketAddressEnumerator.
36107 * g_socket_connection_connect:
36108 * @connection: a #GSocketConnection
36109 * @address: a #GSocketAddress specifying the remote address.
36110 * @cancellable: (allow-none): a %GCancellable or %NULL
36111 * @error: #GError for error reporting, or %NULL to ignore.
36113 * Connect @connection to the specified remote address.
36115 * Returns: %TRUE if the connection succeeded, %FALSE on error
36121 * g_socket_connection_connect_async:
36122 * @connection: a #GSocketConnection
36123 * @address: a #GSocketAddress specifying the remote address.
36124 * @cancellable: (allow-none): a %GCancellable or %NULL
36125 * @callback: (scope async): a #GAsyncReadyCallback
36126 * @user_data: (closure): user data for the callback
36128 * Asynchronously connect @connection to the specified remote address.
36130 * This clears the #GSocket:blocking flag on @connection's underlying
36131 * socket if it is currently set.
36133 * Use g_socket_connection_connect_finish() to retrieve the result.
36140 * g_socket_connection_connect_finish:
36141 * @connection: a #GSocketConnection
36142 * @result: the #GAsyncResult
36143 * @error: #GError for error reporting, or %NULL to ignore.
36145 * Gets the result of a g_socket_connection_connect_async() call.
36147 * Returns: %TRUE if the connection succeeded, %FALSE on error
36153 * g_socket_connection_factory_create_connection:
36154 * @socket: a #GSocket
36156 * Creates a #GSocketConnection subclass of the right type for
36159 * Returns: (transfer full): a #GSocketConnection
36165 * g_socket_connection_factory_lookup_type:
36166 * @family: a #GSocketFamily
36167 * @type: a #GSocketType
36168 * @protocol_id: a protocol id
36170 * Looks up the #GType to be used when creating socket connections on
36171 * sockets with the specified @family, @type and @protocol_id.
36173 * If no type is registered, the #GSocketConnection base type is returned.
36175 * Returns: a #GType
36181 * g_socket_connection_factory_register_type:
36182 * @g_type: a #GType, inheriting from %G_TYPE_SOCKET_CONNECTION
36183 * @family: a #GSocketFamily
36184 * @type: a #GSocketType
36185 * @protocol: a protocol id
36187 * Looks up the #GType to be used when creating socket connections on
36188 * sockets with the specified @family, @type and @protocol.
36190 * If no type is registered, the #GSocketConnection base type is returned.
36197 * g_socket_connection_get_local_address:
36198 * @connection: a #GSocketConnection
36199 * @error: #GError for error reporting, or %NULL to ignore.
36201 * Try to get the local address of a socket connection.
36203 * Free the returned object with g_object_unref().
36205 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
36211 * g_socket_connection_get_remote_address:
36212 * @connection: a #GSocketConnection
36213 * @error: #GError for error reporting, or %NULL to ignore.
36215 * Try to get the remote address of a socket connection.
36217 * Free the returned object with g_object_unref().
36219 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
36225 * g_socket_connection_get_socket:
36226 * @connection: a #GSocketConnection
36228 * Gets the underlying #GSocket object of the connection.
36229 * This can be useful if you want to do something unusual on it
36230 * not supported by the #GSocketConnection APIs.
36232 * Returns: (transfer none): a #GSocketAddress or %NULL on error.
36238 * g_socket_connection_is_connected:
36239 * @connection: a #GSocketConnection
36241 * Checks if @connection is connected. This is equivalent to calling
36242 * g_socket_is_connected() on @connection's underlying #GSocket.
36244 * Returns: whether @connection is connected
36250 * g_socket_control_message_deserialize:
36251 * @level: a socket level
36252 * @type: a socket control message type for the given @level
36253 * @size: the size of the data in bytes
36254 * @data: (array length=size) (element-type guint8): pointer to the message data
36256 * Tries to deserialize a socket control message of a given
36257 * @level and @type. This will ask all known (to GType) subclasses
36258 * of #GSocketControlMessage if they can understand this kind
36259 * of message and if so deserialize it into a #GSocketControlMessage.
36261 * If there is no implementation for this kind of control message, %NULL
36262 * will be returned.
36264 * Returns: (transfer full): the deserialized message or %NULL
36270 * g_socket_control_message_get_level:
36271 * @message: a #GSocketControlMessage
36273 * Returns the "level" (i.e. the originating protocol) of the control message.
36274 * This is often SOL_SOCKET.
36276 * Returns: an integer describing the level
36282 * g_socket_control_message_get_msg_type:
36283 * @message: a #GSocketControlMessage
36285 * Returns the protocol specific type of the control message.
36286 * For instance, for UNIX fd passing this would be SCM_RIGHTS.
36288 * Returns: an integer describing the type of control message
36294 * g_socket_control_message_get_size:
36295 * @message: a #GSocketControlMessage
36297 * Returns the space required for the control message, not including
36298 * headers or alignment.
36300 * Returns: The number of bytes required.
36306 * g_socket_control_message_serialize:
36307 * @message: a #GSocketControlMessage
36308 * @data: A buffer to write data to
36310 * Converts the data in the message to bytes placed in the
36313 * @data is guaranteed to have enough space to fit the size
36314 * returned by g_socket_control_message_get_size() on this
36322 * g_socket_create_source: (skip)
36323 * @socket: a #GSocket
36324 * @condition: a #GIOCondition mask to monitor
36325 * @cancellable: (allow-none): a %GCancellable or %NULL
36327 * Creates a %GSource that can be attached to a %GMainContext to monitor
36328 * for the availibility of the specified @condition on the socket.
36330 * The callback on the source is of the #GSocketSourceFunc type.
36332 * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition;
36333 * these conditions will always be reported output if they are true.
36335 * @cancellable if not %NULL can be used to cancel the source, which will
36336 * cause the source to trigger, reporting the current condition (which
36337 * is likely 0 unless cancellation happened at the same time as a
36338 * condition change). You can check for this in the callback using
36339 * g_cancellable_is_cancelled().
36341 * If @socket has a timeout set, and it is reached before @condition
36342 * occurs, the source will then trigger anyway, reporting %G_IO_IN or
36343 * %G_IO_OUT depending on @condition. However, @socket will have been
36344 * marked as having had a timeout, and so the next #GSocket I/O method
36345 * you call will then fail with a %G_IO_ERROR_TIMED_OUT.
36347 * Returns: (transfer full): a newly allocated %GSource, free with g_source_unref().
36353 * g_socket_get_blocking:
36354 * @socket: a #GSocket.
36356 * Gets the blocking mode of the socket. For details on blocking I/O,
36357 * see g_socket_set_blocking().
36359 * Returns: %TRUE if blocking I/O is used, %FALSE otherwise.
36365 * g_socket_get_credentials:
36366 * @socket: a #GSocket.
36367 * @error: #GError for error reporting, or %NULL to ignore.
36369 * Returns the credentials of the foreign process connected to this
36370 * socket, if any (e.g. it is only supported for %G_SOCKET_FAMILY_UNIX
36373 * If this operation isn't supported on the OS, the method fails with
36374 * the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented
36375 * by reading the %SO_PEERCRED option on the underlying socket.
36377 * Other ways to obtain credentials from a foreign peer includes the
36378 * #GUnixCredentialsMessage type and
36379 * g_unix_connection_send_credentials() /
36380 * g_unix_connection_receive_credentials() functions.
36382 * that must be freed with g_object_unref().
36384 * Returns: (transfer full): %NULL if @error is set, otherwise a #GCredentials object
36390 * g_socket_get_family:
36391 * @socket: a #GSocket.
36393 * Gets the socket family of the socket.
36395 * Returns: a #GSocketFamily
36402 * @socket: a #GSocket.
36404 * Returns the underlying OS socket object. On unix this
36405 * is a socket file descriptor, and on windows this is
36406 * a Winsock2 SOCKET handle. This may be useful for
36407 * doing platform specific or otherwise unusual operations
36410 * Returns: the file descriptor of the socket.
36416 * g_socket_get_keepalive:
36417 * @socket: a #GSocket.
36419 * Gets the keepalive mode of the socket. For details on this,
36420 * see g_socket_set_keepalive().
36422 * Returns: %TRUE if keepalive is active, %FALSE otherwise.
36428 * g_socket_get_listen_backlog:
36429 * @socket: a #GSocket.
36431 * Gets the listen backlog setting of the socket. For details on this,
36432 * see g_socket_set_listen_backlog().
36434 * Returns: the maximum number of pending connections.
36440 * g_socket_get_local_address:
36441 * @socket: a #GSocket.
36442 * @error: #GError for error reporting, or %NULL to ignore.
36444 * Try to get the local address of a bound socket. This is only
36445 * useful if the socket has been bound to a local address,
36446 * either explicitly or implicitly when connecting.
36448 * Free the returned object with g_object_unref().
36450 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
36456 * g_socket_get_protocol:
36457 * @socket: a #GSocket.
36459 * Gets the socket protocol id the socket was created with.
36460 * In case the protocol is unknown, -1 is returned.
36462 * Returns: a protocol id, or -1 if unknown
36468 * g_socket_get_remote_address:
36469 * @socket: a #GSocket.
36470 * @error: #GError for error reporting, or %NULL to ignore.
36472 * Try to get the remove address of a connected socket. This is only
36473 * useful for connection oriented sockets that have been connected.
36475 * Free the returned object with g_object_unref().
36477 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
36483 * g_socket_get_socket_type:
36484 * @socket: a #GSocket.
36486 * Gets the socket type of the socket.
36488 * Returns: a #GSocketType
36494 * g_socket_get_timeout:
36495 * @socket: a #GSocket.
36497 * Gets the timeout setting of the socket. For details on this, see
36498 * g_socket_set_timeout().
36500 * Returns: the timeout in seconds
36506 * g_socket_is_closed:
36507 * @socket: a #GSocket
36509 * Checks whether a socket is closed.
36511 * Returns: %TRUE if socket is closed, %FALSE otherwise
36517 * g_socket_is_connected:
36518 * @socket: a #GSocket.
36520 * Check whether the socket is connected. This is only useful for
36521 * connection-oriented sockets.
36523 * Returns: %TRUE if socket is connected, %FALSE otherwise.
36530 * @socket: a #GSocket.
36531 * @error: #GError for error reporting, or %NULL to ignore.
36533 * Marks the socket as a server socket, i.e. a socket that is used
36534 * to accept incoming requests using g_socket_accept().
36536 * Before calling this the socket must be bound to a local address using
36539 * To set the maximum amount of outstanding clients, use
36540 * g_socket_set_listen_backlog().
36542 * Returns: %TRUE on success, %FALSE on error.
36548 * g_socket_listener_accept:
36549 * @listener: a #GSocketListener
36550 * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL
36551 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
36552 * @error: #GError for error reporting, or %NULL to ignore.
36554 * Blocks waiting for a client to connect to any of the sockets added
36555 * to the listener. Returns a #GSocketConnection for the socket that was
36558 * If @source_object is not %NULL it will be filled out with the source
36559 * object specified when the corresponding socket or address was added
36562 * If @cancellable is not %NULL, then the operation can be cancelled by
36563 * triggering the cancellable object from another thread. If the operation
36564 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
36566 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
36572 * g_socket_listener_accept_async:
36573 * @listener: a #GSocketListener
36574 * @cancellable: (allow-none): a #GCancellable, or %NULL
36575 * @callback: (scope async): a #GAsyncReadyCallback
36576 * @user_data: (closure): user data for the callback
36578 * This is the asynchronous version of g_socket_listener_accept().
36580 * When the operation is finished @callback will be
36581 * called. You can then call g_socket_listener_accept_socket()
36582 * to get the result of the operation.
36589 * g_socket_listener_accept_finish:
36590 * @listener: a #GSocketListener
36591 * @result: a #GAsyncResult.
36592 * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
36593 * @error: a #GError location to store the error occurring, or %NULL to ignore.
36595 * Finishes an async accept operation. See g_socket_listener_accept_async()
36597 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
36603 * g_socket_listener_accept_socket:
36604 * @listener: a #GSocketListener
36605 * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL.
36606 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
36607 * @error: #GError for error reporting, or %NULL to ignore.
36609 * Blocks waiting for a client to connect to any of the sockets added
36610 * to the listener. Returns the #GSocket that was accepted.
36612 * If you want to accept the high-level #GSocketConnection, not a #GSocket,
36613 * which is often the case, then you should use g_socket_listener_accept()
36616 * If @source_object is not %NULL it will be filled out with the source
36617 * object specified when the corresponding socket or address was added
36620 * If @cancellable is not %NULL, then the operation can be cancelled by
36621 * triggering the cancellable object from another thread. If the operation
36622 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
36624 * Returns: (transfer full): a #GSocket on success, %NULL on error.
36630 * g_socket_listener_accept_socket_async:
36631 * @listener: a #GSocketListener
36632 * @cancellable: (allow-none): a #GCancellable, or %NULL
36633 * @callback: (scope async): a #GAsyncReadyCallback
36634 * @user_data: (closure): user data for the callback
36636 * This is the asynchronous version of g_socket_listener_accept_socket().
36638 * When the operation is finished @callback will be
36639 * called. You can then call g_socket_listener_accept_socket_finish()
36640 * to get the result of the operation.
36647 * g_socket_listener_accept_socket_finish:
36648 * @listener: a #GSocketListener
36649 * @result: a #GAsyncResult.
36650 * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
36651 * @error: a #GError location to store the error occurring, or %NULL to ignore.
36653 * Finishes an async accept operation. See g_socket_listener_accept_socket_async()
36655 * Returns: (transfer full): a #GSocket on success, %NULL on error.
36661 * g_socket_listener_add_address:
36662 * @listener: a #GSocketListener
36663 * @address: a #GSocketAddress
36664 * @type: a #GSocketType
36665 * @protocol: a #GSocketProtocol
36666 * @source_object: (allow-none): Optional #GObject identifying this source
36667 * @effective_address: (out) (allow-none): location to store the address that was bound to, or %NULL.
36668 * @error: #GError for error reporting, or %NULL to ignore.
36670 * Creates a socket of type @type and protocol @protocol, binds
36671 * it to @address and adds it to the set of sockets we're accepting
36674 * Note that adding an IPv6 address, depending on the platform,
36675 * may or may not result in a listener that also accepts IPv4
36676 * connections. For more deterministic behavior, see
36677 * g_socket_listener_add_inet_port().
36679 * @source_object will be passed out in the various calls
36680 * to accept to identify this particular source, which is
36681 * useful if you're listening on multiple addresses and do
36682 * different things depending on what address is connected to.
36684 * If successful and @effective_address is non-%NULL then it will
36685 * be set to the address that the binding actually occurred at. This
36686 * is helpful for determining the port number that was used for when
36687 * requesting a binding to port 0 (ie: "any port"). This address, if
36688 * requested, belongs to the caller and must be freed.
36690 * Returns: %TRUE on success, %FALSE on error.
36696 * g_socket_listener_add_any_inet_port:
36697 * @listener: a #GSocketListener
36698 * @source_object: (allow-none): Optional #GObject identifying this source
36699 * @error: a #GError location to store the error occurring, or %NULL to ignore.
36701 * Listens for TCP connections on any available port number for both
36702 * IPv6 and IPv4 (if each is available).
36704 * This is useful if you need to have a socket for incoming connections
36705 * but don't care about the specific port number.
36707 * @source_object will be passed out in the various calls
36708 * to accept to identify this particular source, which is
36709 * useful if you're listening on multiple addresses and do
36710 * different things depending on what address is connected to.
36712 * Returns: the port number, or 0 in case of failure.
36718 * g_socket_listener_add_inet_port:
36719 * @listener: a #GSocketListener
36720 * @port: an IP port number (non-zero)
36721 * @source_object: (allow-none): Optional #GObject identifying this source
36722 * @error: #GError for error reporting, or %NULL to ignore.
36724 * Helper function for g_socket_listener_add_address() that
36725 * creates a TCP/IP socket listening on IPv4 and IPv6 (if
36726 * supported) on the specified port on all interfaces.
36728 * @source_object will be passed out in the various calls
36729 * to accept to identify this particular source, which is
36730 * useful if you're listening on multiple addresses and do
36731 * different things depending on what address is connected to.
36733 * Returns: %TRUE on success, %FALSE on error.
36739 * g_socket_listener_add_socket:
36740 * @listener: a #GSocketListener
36741 * @socket: a listening #GSocket
36742 * @source_object: (allow-none): Optional #GObject identifying this source
36743 * @error: #GError for error reporting, or %NULL to ignore.
36745 * Adds @socket to the set of sockets that we try to accept
36746 * new clients from. The socket must be bound to a local
36747 * address and listened to.
36749 * @source_object will be passed out in the various calls
36750 * to accept to identify this particular source, which is
36751 * useful if you're listening on multiple addresses and do
36752 * different things depending on what address is connected to.
36754 * Returns: %TRUE on success, %FALSE on error.
36760 * g_socket_listener_close:
36761 * @listener: a #GSocketListener
36763 * Closes all the sockets in the listener.
36770 * g_socket_listener_new:
36772 * Creates a new #GSocketListener with no sockets to listen for.
36773 * New listeners can be added with e.g. g_socket_listener_add_address()
36774 * or g_socket_listener_add_inet_port().
36776 * Returns: a new #GSocketListener.
36782 * g_socket_listener_set_backlog:
36783 * @listener: a #GSocketListener
36784 * @listen_backlog: an integer
36786 * Sets the listen backlog on the sockets in the listener.
36788 * See g_socket_set_listen_backlog() for details
36796 * @family: the socket family to use, e.g. %G_SOCKET_FAMILY_IPV4.
36797 * @type: the socket type to use.
36798 * @protocol: the id of the protocol to use, or 0 for default.
36799 * @error: #GError for error reporting, or %NULL to ignore.
36801 * Creates a new #GSocket with the defined family, type and protocol.
36802 * If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type
36803 * for the family and type is used.
36805 * The @protocol is a family and type specific int that specifies what
36806 * kind of protocol to use. #GSocketProtocol lists several common ones.
36807 * Many families only support one protocol, and use 0 for this, others
36808 * support several and using 0 means to use the default protocol for
36809 * the family and type.
36811 * The protocol id is passed directly to the operating
36812 * system, so you can use protocols not listed in #GSocketProtocol if you
36813 * know the protocol number used for it.
36815 * Free the returned object with g_object_unref().
36817 * Returns: a #GSocket or %NULL on error.
36823 * g_socket_new_from_fd:
36824 * @fd: a native socket file descriptor.
36825 * @error: #GError for error reporting, or %NULL to ignore.
36827 * Creates a new #GSocket from a native file descriptor
36828 * or winsock SOCKET handle.
36830 * This reads all the settings from the file descriptor so that
36831 * all properties should work. Note that the file descriptor
36832 * will be set to non-blocking mode, independent on the blocking
36833 * mode of the #GSocket.
36835 * Free the returned object with g_object_unref().
36837 * Returns: a #GSocket or %NULL on error.
36843 * g_socket_receive:
36844 * @socket: a #GSocket
36845 * @buffer: a buffer to read data into (which should be at least @size bytes long).
36846 * @size: the number of bytes you want to read from the socket
36847 * @cancellable: (allow-none): a %GCancellable or %NULL
36848 * @error: #GError for error reporting, or %NULL to ignore.
36850 * Receive data (up to @size bytes) from a socket. This is mainly used by
36851 * connection-oriented sockets; it is identical to g_socket_receive_from()
36852 * with @address set to %NULL.
36854 * For %G_SOCKET_TYPE_DATAGRAM and %G_SOCKET_TYPE_SEQPACKET sockets,
36855 * g_socket_receive() will always read either 0 or 1 complete messages from
36856 * the socket. If the received message is too large to fit in @buffer, then
36857 * the data beyond @size bytes will be discarded, without any explicit
36858 * indication that this has occurred.
36860 * For %G_SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any
36861 * number of bytes, up to @size. If more than @size bytes have been
36862 * received, the additional data will be returned in future calls to
36863 * g_socket_receive().
36865 * If the socket is in blocking mode the call will block until there
36866 * is some data to receive, the connection is closed, or there is an
36867 * error. If there is no data available and the socket is in
36868 * non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error will be
36869 * returned. To be notified when data is available, wait for the
36870 * %G_IO_IN condition.
36872 * On error -1 is returned and @error is set accordingly.
36874 * the peer, or -1 on error
36876 * Returns: Number of bytes read, or 0 if the connection was closed by
36882 * g_socket_receive_from:
36883 * @socket: a #GSocket
36884 * @address: (out) (allow-none): a pointer to a #GSocketAddress pointer, or %NULL
36885 * @buffer: (array length=size) (element-type guint8): a buffer to read data into (which should be at least @size bytes long).
36886 * @size: the number of bytes you want to read from the socket
36887 * @cancellable: (allow-none): a %GCancellable or %NULL
36888 * @error: #GError for error reporting, or %NULL to ignore.
36890 * Receive data (up to @size bytes) from a socket.
36892 * If @address is non-%NULL then @address will be set equal to the
36893 * source address of the received packet.
36894 * @address is owned by the caller.
36896 * See g_socket_receive() for additional information.
36898 * the peer, or -1 on error
36900 * Returns: Number of bytes read, or 0 if the connection was closed by
36906 * g_socket_receive_message:
36907 * @socket: a #GSocket
36908 * @address: (out) (allow-none): a pointer to a #GSocketAddress pointer, or %NULL
36909 * @vectors: (array length=num_vectors): an array of #GInputVector structs
36910 * @num_vectors: the number of elements in @vectors, or -1
36911 * @messages: (array length=num_messages) (allow-none): a pointer which may be filled with an array of #GSocketControlMessages, or %NULL
36912 * @num_messages: a pointer which will be filled with the number of elements in @messages, or %NULL
36913 * @flags: a pointer to an int containing #GSocketMsgFlags flags
36914 * @cancellable: (allow-none): a %GCancellable or %NULL
36915 * @error: a #GError pointer, or %NULL
36917 * Receive data from a socket. This is the most complicated and
36918 * fully-featured version of this call. For easier use, see
36919 * g_socket_receive() and g_socket_receive_from().
36921 * If @address is non-%NULL then @address will be set equal to the
36922 * source address of the received packet.
36923 * @address is owned by the caller.
36925 * @vector must point to an array of #GInputVector structs and
36926 * @num_vectors must be the length of this array. These structs
36927 * describe the buffers that received data will be scattered into.
36928 * If @num_vectors is -1, then @vectors is assumed to be terminated
36929 * by a #GInputVector with a %NULL buffer pointer.
36931 * As a special case, if @num_vectors is 0 (in which case, @vectors
36932 * may of course be %NULL), then a single byte is received and
36933 * discarded. This is to facilitate the common practice of sending a
36934 * single '\0' byte for the purposes of transferring ancillary data.
36936 * @messages, if non-%NULL, will be set to point to a newly-allocated
36937 * array of #GSocketControlMessage instances or %NULL if no such
36938 * messages was received. These correspond to the control messages
36939 * received from the kernel, one #GSocketControlMessage per message
36940 * from the kernel. This array is %NULL-terminated and must be freed
36941 * by the caller using g_free() after calling g_object_unref() on each
36942 * element. If @messages is %NULL, any control messages received will
36945 * @num_messages, if non-%NULL, will be set to the number of control
36946 * messages received.
36948 * If both @messages and @num_messages are non-%NULL, then
36949 * @num_messages gives the number of #GSocketControlMessage instances
36950 * in @messages (ie: not including the %NULL terminator).
36952 * @flags is an in/out parameter. The commonly available arguments
36953 * for this are available in the #GSocketMsgFlags enum, but the
36954 * values there are the same as the system values, and the flags
36955 * are passed in as-is, so you can pass in system-specific flags too
36956 * (and g_socket_receive_message() may pass system-specific flags out).
36958 * As with g_socket_receive(), data may be discarded if @socket is
36959 * %G_SOCKET_TYPE_DATAGRAM or %G_SOCKET_TYPE_SEQPACKET and you do not
36960 * provide enough buffer space to read a complete message. You can pass
36961 * %G_SOCKET_MSG_PEEK in @flags to peek at the current message without
36962 * removing it from the receive queue, but there is no portable way to find
36963 * out the length of the message other than by reading it into a
36964 * sufficiently-large buffer.
36966 * If the socket is in blocking mode the call will block until there
36967 * is some data to receive, the connection is closed, or there is an
36968 * error. If there is no data available and the socket is in
36969 * non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error will be
36970 * returned. To be notified when data is available, wait for the
36971 * %G_IO_IN condition.
36973 * On error -1 is returned and @error is set accordingly.
36975 * the peer, or -1 on error
36977 * Returns: Number of bytes read, or 0 if the connection was closed by
36983 * g_socket_receive_with_blocking:
36984 * @socket: a #GSocket
36985 * @buffer: a buffer to read data into (which should be at least @size bytes long).
36986 * @size: the number of bytes you want to read from the socket
36987 * @blocking: whether to do blocking or non-blocking I/O
36988 * @cancellable: (allow-none): a %GCancellable or %NULL
36989 * @error: #GError for error reporting, or %NULL to ignore.
36991 * This behaves exactly the same as g_socket_receive(), except that
36992 * the choice of blocking or non-blocking behavior is determined by
36993 * the @blocking argument rather than by @socket's properties.
36995 * the peer, or -1 on error
36997 * Returns: Number of bytes read, or 0 if the connection was closed by
37004 * @socket: a #GSocket
37005 * @buffer: (array length=size) (element-type guint8): the buffer containing the data to send.
37006 * @size: the number of bytes to send
37007 * @cancellable: (allow-none): a %GCancellable or %NULL
37008 * @error: #GError for error reporting, or %NULL to ignore.
37010 * Tries to send @size bytes from @buffer on the socket. This is
37011 * mainly used by connection-oriented sockets; it is identical to
37012 * g_socket_send_to() with @address set to %NULL.
37014 * If the socket is in blocking mode the call will block until there is
37015 * space for the data in the socket queue. If there is no space available
37016 * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
37017 * will be returned. To be notified when space is available, wait for the
37018 * %G_IO_OUT condition. Note though that you may still receive
37019 * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
37020 * notified of a %G_IO_OUT condition. (On Windows in particular, this is
37021 * very common due to the way the underlying APIs work.)
37023 * On error -1 is returned and @error is set accordingly.
37027 * Returns: Number of bytes written (which may be less than @size), or -1
37033 * g_socket_send_message:
37034 * @socket: a #GSocket
37035 * @address: a #GSocketAddress, or %NULL
37036 * @vectors: (array length=num_vectors): an array of #GOutputVector structs
37037 * @num_vectors: the number of elements in @vectors, or -1
37038 * @messages: (array length=num_messages) (allow-none): a pointer to an array of #GSocketControlMessages, or %NULL.
37039 * @num_messages: number of elements in @messages, or -1.
37040 * @flags: an int containing #GSocketMsgFlags flags
37041 * @cancellable: (allow-none): a %GCancellable or %NULL
37042 * @error: #GError for error reporting, or %NULL to ignore.
37044 * Send data to @address on @socket. This is the most complicated and
37045 * fully-featured version of this call. For easier use, see
37046 * g_socket_send() and g_socket_send_to().
37048 * If @address is %NULL then the message is sent to the default receiver
37049 * (set by g_socket_connect()).
37051 * @vectors must point to an array of #GOutputVector structs and
37052 * @num_vectors must be the length of this array. (If @num_vectors is -1,
37053 * then @vectors is assumed to be terminated by a #GOutputVector with a
37054 * %NULL buffer pointer.) The #GOutputVector structs describe the buffers
37055 * that the sent data will be gathered from. Using multiple
37056 * #GOutputVector<!-- -->s is more memory-efficient than manually copying
37057 * data from multiple sources into a single buffer, and more
37058 * network-efficient than making multiple calls to g_socket_send().
37060 * @messages, if non-%NULL, is taken to point to an array of @num_messages
37061 * #GSocketControlMessage instances. These correspond to the control
37062 * messages to be sent on the socket.
37063 * If @num_messages is -1 then @messages is treated as a %NULL-terminated
37066 * @flags modify how the message is sent. The commonly available arguments
37067 * for this are available in the #GSocketMsgFlags enum, but the
37068 * values there are the same as the system values, and the flags
37069 * are passed in as-is, so you can pass in system-specific flags too.
37071 * If the socket is in blocking mode the call will block until there is
37072 * space for the data in the socket queue. If there is no space available
37073 * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
37074 * will be returned. To be notified when space is available, wait for the
37075 * %G_IO_OUT condition. Note though that you may still receive
37076 * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
37077 * notified of a %G_IO_OUT condition. (On Windows in particular, this is
37078 * very common due to the way the underlying APIs work.)
37080 * On error -1 is returned and @error is set accordingly.
37084 * Returns: Number of bytes written (which may be less than @size), or -1
37090 * g_socket_send_to:
37091 * @socket: a #GSocket
37092 * @address: a #GSocketAddress, or %NULL
37093 * @buffer: (array length=size) (element-type guint8): the buffer containing the data to send.
37094 * @size: the number of bytes to send
37095 * @cancellable: (allow-none): a %GCancellable or %NULL
37096 * @error: #GError for error reporting, or %NULL to ignore.
37098 * Tries to send @size bytes from @buffer to @address. If @address is
37099 * %NULL then the message is sent to the default receiver (set by
37100 * g_socket_connect()).
37102 * See g_socket_send() for additional information.
37106 * Returns: Number of bytes written (which may be less than @size), or -1
37112 * g_socket_send_with_blocking:
37113 * @socket: a #GSocket
37114 * @buffer: (array length=size) (element-type guint8): the buffer containing the data to send.
37115 * @size: the number of bytes to send
37116 * @blocking: whether to do blocking or non-blocking I/O
37117 * @cancellable: (allow-none): a %GCancellable or %NULL
37118 * @error: #GError for error reporting, or %NULL to ignore.
37120 * This behaves exactly the same as g_socket_send(), except that
37121 * the choice of blocking or non-blocking behavior is determined by
37122 * the @blocking argument rather than by @socket's properties.
37126 * Returns: Number of bytes written (which may be less than @size), or -1
37132 * g_socket_service_is_active:
37133 * @service: a #GSocketService
37135 * Check whether the service is active or not. An active
37136 * service will accept new clients that connect, while
37137 * a non-active service will let connecting clients queue
37138 * up until the service is started.
37140 * Returns: %TRUE if the service is active, %FALSE otherwise
37146 * g_socket_service_new:
37148 * Creates a new #GSocketService with no sockets to listen for.
37149 * New listeners can be added with e.g. g_socket_listener_add_address()
37150 * or g_socket_listener_add_inet_port().
37152 * Returns: a new #GSocketService.
37158 * g_socket_service_start:
37159 * @service: a #GSocketService
37161 * Starts the service, i.e. start accepting connections
37162 * from the added sockets when the mainloop runs.
37164 * This call is thread-safe, so it may be called from a thread
37165 * handling an incoming client request.
37172 * g_socket_service_stop:
37173 * @service: a #GSocketService
37175 * Stops the service, i.e. stops accepting connections
37176 * from the added sockets when the mainloop runs.
37178 * This call is thread-safe, so it may be called from a thread
37179 * handling an incoming client request.
37186 * g_socket_set_blocking:
37187 * @socket: a #GSocket.
37188 * @blocking: Whether to use blocking I/O or not.
37190 * Sets the blocking mode of the socket. In blocking mode
37191 * all operations block until they succeed or there is an error. In
37192 * non-blocking mode all functions return results immediately or
37193 * with a %G_IO_ERROR_WOULD_BLOCK error.
37195 * All sockets are created in blocking mode. However, note that the
37196 * platform level socket is always non-blocking, and blocking mode
37197 * is a GSocket level feature.
37204 * g_socket_set_keepalive:
37205 * @socket: a #GSocket.
37206 * @keepalive: Value for the keepalive flag
37208 * Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When
37209 * this flag is set on a socket, the system will attempt to verify that the
37210 * remote socket endpoint is still present if a sufficiently long period of
37211 * time passes with no data being exchanged. If the system is unable to
37212 * verify the presence of the remote endpoint, it will automatically close
37215 * This option is only functional on certain kinds of sockets. (Notably,
37216 * %G_SOCKET_PROTOCOL_TCP sockets.)
37218 * The exact time between pings is system- and protocol-dependent, but will
37219 * normally be at least two hours. Most commonly, you would set this flag
37220 * on a server socket if you want to allow clients to remain idle for long
37221 * periods of time, but also want to ensure that connections are eventually
37222 * garbage-collected if clients crash or become unreachable.
37229 * g_socket_set_listen_backlog:
37230 * @socket: a #GSocket.
37231 * @backlog: the maximum number of pending connections.
37233 * Sets the maximum number of outstanding connections allowed
37234 * when listening on this socket. If more clients than this are
37235 * connecting to the socket and the application is not handling them
37236 * on time then the new connections will be refused.
37238 * Note that this must be called before g_socket_listen() and has no
37239 * effect if called after that.
37246 * g_socket_set_timeout:
37247 * @socket: a #GSocket.
37248 * @timeout: the timeout for @socket, in seconds, or 0 for none
37250 * Sets the time in seconds after which I/O operations on @socket will
37251 * time out if they have not yet completed.
37253 * On a blocking socket, this means that any blocking #GSocket
37254 * operation will time out after @timeout seconds of inactivity,
37255 * returning %G_IO_ERROR_TIMED_OUT.
37257 * On a non-blocking socket, calls to g_socket_condition_wait() will
37258 * also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources
37259 * created with g_socket_create_source() will trigger after
37260 * @timeout seconds of inactivity, with the requested condition
37261 * set, at which point calling g_socket_receive(), g_socket_send(),
37262 * g_socket_check_connect_result(), etc, will fail with
37263 * %G_IO_ERROR_TIMED_OUT.
37265 * If @timeout is 0 (the default), operations will never time out
37268 * Note that if an I/O operation is interrupted by a signal, this may
37269 * cause the timeout to be reset.
37276 * g_socket_shutdown:
37277 * @socket: a #GSocket
37278 * @shutdown_read: whether to shut down the read side
37279 * @shutdown_write: whether to shut down the write side
37280 * @error: #GError for error reporting, or %NULL to ignore.
37282 * Shut down part of a full-duplex connection.
37284 * If @shutdown_read is %TRUE then the receiving side of the connection
37285 * is shut down, and further reading is disallowed.
37287 * If @shutdown_write is %TRUE then the sending side of the connection
37288 * is shut down, and further writing is disallowed.
37290 * It is allowed for both @shutdown_read and @shutdown_write to be %TRUE.
37292 * One example where this is used is graceful disconnect for TCP connections
37293 * where you close the sending side, then wait for the other side to close
37294 * the connection, thus ensuring that the other side saw all sent data.
37296 * Returns: %TRUE on success, %FALSE on error
37302 * g_socket_speaks_ipv4:
37303 * @socket: a #GSocket
37305 * Checks if a socket is capable of speaking IPv4.
37307 * IPv4 sockets are capable of speaking IPv4. On some operating systems
37308 * and under some combinations of circumstances IPv6 sockets are also
37309 * capable of speaking IPv4. See RFC 3493 section 3.7 for more
37312 * No other types of sockets are currently considered as being capable
37313 * of speaking IPv4.
37315 * Returns: %TRUE if this socket can be used with IPv4.
37321 * g_srv_target_copy:
37322 * @target: a #GSrvTarget
37326 * Returns: a copy of @target
37332 * g_srv_target_free:
37333 * @target: a #GSrvTarget
37342 * g_srv_target_get_hostname:
37343 * @target: a #GSrvTarget
37345 * Gets @target's hostname (in ASCII form; if you are going to present
37346 * this to the user, you should use g_hostname_is_ascii_encoded() to
37347 * check if it contains encoded Unicode segments, and use
37348 * g_hostname_to_unicode() to convert it if it does.)
37350 * Returns: @target's hostname
37356 * g_srv_target_get_port:
37357 * @target: a #GSrvTarget
37359 * Gets @target's port
37361 * Returns: @target's port
37367 * g_srv_target_get_priority:
37368 * @target: a #GSrvTarget
37370 * Gets @target's priority. You should not need to look at this;
37371 * #GResolver already sorts the targets according to the algorithm in
37374 * Returns: @target's priority
37380 * g_srv_target_get_weight:
37381 * @target: a #GSrvTarget
37383 * Gets @target's weight. You should not need to look at this;
37384 * #GResolver already sorts the targets according to the algorithm in
37387 * Returns: @target's weight
37393 * g_srv_target_list_sort: (skip)
37394 * @targets: a #GList of #GSrvTarget
37396 * Sorts @targets in place according to the algorithm in RFC 2782.
37398 * Returns: (transfer full): the head of the sorted list.
37404 * g_srv_target_new:
37405 * @hostname: the host that the service is running on
37406 * @port: the port that the service is running on
37407 * @priority: the target's priority
37408 * @weight: the target's weight
37410 * Creates a new #GSrvTarget with the given parameters.
37412 * You should not need to use this; normally #GSrvTarget<!-- -->s are
37413 * created by #GResolver.
37415 * Returns: a new #GSrvTarget.
37421 * g_tcp_connection_get_graceful_disconnect:
37422 * @connection: a #GTcpConnection
37424 * Checks if graceful disconnects are used. See
37425 * g_tcp_connection_set_graceful_disconnect().
37427 * Returns: %TRUE if graceful disconnect is used on close, %FALSE otherwise
37433 * g_tcp_connection_set_graceful_disconnect:
37434 * @connection: a #GTcpConnection
37435 * @graceful_disconnect: Whether to do graceful disconnects or not
37437 * This enabled graceful disconnects on close. A graceful disconnect
37438 * means that we signal the receiving end that the connection is terminated
37439 * and wait for it to close the connection before closing the connection.
37441 * A graceful disconnect means that we can be sure that we successfully sent
37442 * all the outstanding data to the other end, or get an error reported.
37443 * However, it also means we have to wait for all the data to reach the
37444 * other side and for it to acknowledge this by closing the socket, which may
37445 * take a while. For this reason it is disabled by default.
37452 * g_tcp_wrapper_connection_get_base_io_stream:
37453 * @conn: a #GTcpWrapperConnection
37455 * Get's @conn's base #GIOStream
37457 * Returns: (transfer none): @conn's base #GIOStream
37462 * g_tcp_wrapper_connection_new:
37463 * @base_io_stream: the #GIOStream to wrap
37464 * @socket: the #GSocket associated with @base_io_stream
37466 * Wraps @base_io_stream and @socket together as a #GSocketConnection.
37468 * Returns: the new #GSocketConnection.
37474 * g_themed_icon_append_name:
37475 * @icon: a #GThemedIcon
37476 * @iconname: name of icon to append to list of icons from within @icon.
37478 * Append a name to the list of icons from within @icon.
37481 * Note that doing so invalidates the hash computed by prior calls
37482 * to g_icon_hash().
37488 * g_themed_icon_get_names:
37489 * @icon: a #GThemedIcon.
37491 * Gets the names of icons from within @icon.
37493 * Returns: (transfer none): a list of icon names.
37498 * g_themed_icon_new:
37499 * @iconname: a string containing an icon name.
37501 * Creates a new themed icon for @iconname.
37503 * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon.
37508 * g_themed_icon_new_from_names:
37509 * @iconnames: (array length=len): an array of strings containing icon names.
37510 * @len: the length of the @iconnames array, or -1 if @iconnames is %NULL-terminated
37512 * Creates a new themed icon for @iconnames.
37514 * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon
37519 * g_themed_icon_new_with_default_fallbacks:
37520 * @iconname: a string containing an icon name
37522 * Creates a new themed icon for @iconname, and all the names
37523 * that can be created by shortening @iconname at '-' characters.
37525 * In the following example, @icon1 and @icon2 are equivalent:
37527 * const char *names[] = {
37528 * "gnome-dev-cdrom-audio",
37529 * "gnome-dev-cdrom",
37534 * icon1 = g_themed_icon_new_from_names (names, 4);
37535 * icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
37538 * Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon.
37543 * g_themed_icon_prepend_name:
37544 * @icon: a #GThemedIcon
37545 * @iconname: name of icon to prepend to list of icons from within @icon.
37547 * Prepend a name to the list of icons from within @icon.
37550 * Note that doing so invalidates the hash computed by prior calls
37551 * to g_icon_hash().
37559 * g_threaded_socket_service_new:
37560 * @max_threads: the maximal number of threads to execute concurrently handling incoming clients, -1 means no limit
37562 * Creates a new #GThreadedSocketService with no listeners. Listeners
37563 * must be added with one of the #GSocketListener "add" methods.
37565 * Returns: a new #GSocketService.
37571 * g_tls_backend_get_certificate_type:
37572 * @backend: the #GTlsBackend
37574 * Gets the #GType of @backend's #GTlsCertificate implementation.
37578 * Returns: the #GType of @backend's #GTlsCertificate
37584 * g_tls_backend_get_client_connection_type:
37585 * @backend: the #GTlsBackend
37587 * Gets the #GType of @backend's #GTlsClientConnection implementation.
37591 * Returns: the #GType of @backend's #GTlsClientConnection
37597 * g_tls_backend_get_default:
37599 * Gets the default #GTlsBackend for the system.
37601 * Returns: (transfer none): a #GTlsBackend
37607 * g_tls_backend_get_default_database:
37608 * @backend: the #GTlsBackend
37610 * Gets the default #GTlsDatabase used to verify TLS connections.
37612 * unreffed when done.
37614 * Returns: (transfer full): the default database, which should be
37620 * g_tls_backend_get_file_database_type:
37621 * @backend: the #GTlsBackend
37623 * Gets the #GTyep of @backend's #GTlsFileDatabase implementation.
37625 * Returns: the #GType of backend's #GTlsFileDatabase implementation.
37631 * g_tls_backend_get_server_connection_type:
37632 * @backend: the #GTlsBackend
37634 * Gets the #GType of @backend's #GTlsServerConnection implementation.
37638 * Returns: the #GType of @backend's #GTlsServerConnection
37644 * g_tls_backend_supports_tls:
37645 * @backend: the #GTlsBackend
37647 * Checks if TLS is supported; if this returns %FALSE for the default
37648 * #GTlsBackend, it means no "real" TLS backend is available.
37650 * Returns: whether or not TLS is supported
37656 * g_tls_certificate_get_issuer:
37657 * @cert: a #GTlsCertificate
37659 * Gets the #GTlsCertificate representing @cert's issuer, if known
37661 * or %NULL if @cert is self-signed or signed with an unknown
37664 * Returns: (transfer none): The certificate of @cert's issuer,
37670 * g_tls_certificate_list_new_from_file:
37671 * @file: file containing PEM-encoded certificates to import
37672 * @error: #GError for error reporting, or %NULL to ignore.
37674 * Creates one or more #GTlsCertificate<!-- -->s from the PEM-encoded
37675 * data in @file. If @file cannot be read or parsed, the function will
37676 * return %NULL and set @error. If @file does not contain any
37677 * PEM-encoded certificates, this will return an empty list and not
37680 * #GList containing #GTlsCertificate objects. You must free the list
37681 * and its contents when you are done with it.
37683 * Returns: (element-type Gio.TlsCertificate) (transfer full): a
37689 * g_tls_certificate_new_from_file:
37690 * @file: file containing a PEM-encoded certificate to import
37691 * @error: #GError for error reporting, or %NULL to ignore.
37693 * Creates a #GTlsCertificate from the PEM-encoded data in @file. If
37694 * @file cannot be read or parsed, the function will return %NULL and
37695 * set @error. Otherwise, this behaves like
37696 * g_tls_certificate_new_from_pem().
37698 * Returns: the new certificate, or %NULL on error
37704 * g_tls_certificate_new_from_files:
37705 * @cert_file: file containing a PEM-encoded certificate to import
37706 * @key_file: file containing a PEM-encoded private key to import
37707 * @error: #GError for error reporting, or %NULL to ignore.
37709 * Creates a #GTlsCertificate from the PEM-encoded data in @cert_file
37710 * and @key_file. If either file cannot be read or parsed, the
37711 * function will return %NULL and set @error. Otherwise, this behaves
37712 * like g_tls_certificate_new_from_pem().
37714 * Returns: the new certificate, or %NULL on error
37720 * g_tls_certificate_new_from_pem:
37721 * @data: PEM-encoded certificate data
37722 * @length: the length of @data, or -1 if it's 0-terminated.
37723 * @error: #GError for error reporting, or %NULL to ignore.
37725 * Creates a new #GTlsCertificate from the PEM-encoded data in @data.
37726 * If @data includes both a certificate and a private key, then the
37727 * returned certificate will include the private key data as well. (See
37728 * the #GTlsCertificate:private-key-pem property for information about
37729 * supported formats.)
37731 * If @data includes multiple certificates, only the first one will be
37734 * Returns: the new certificate, or %NULL if @data is invalid
37740 * g_tls_certificate_verify:
37741 * @cert: a #GTlsCertificate
37742 * @identity: (allow-none): the expected peer identity
37743 * @trusted_ca: (allow-none): the certificate of a trusted authority
37745 * This verifies @cert and returns a set of #GTlsCertificateFlags
37746 * indicating any problems found with it. This can be used to verify a
37747 * certificate outside the context of making a connection, or to
37748 * check a certificate against a CA that is not part of the system
37751 * If @identity is not %NULL, @cert's name(s) will be compared against
37752 * it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return
37753 * value if it does not match. If @identity is %NULL, that bit will
37754 * never be set in the return value.
37756 * If @trusted_ca is not %NULL, then @cert (or one of the certificates
37757 * in its chain) must be signed by it, or else
37758 * %G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If
37759 * @trusted_ca is %NULL, that bit will never be set in the return
37762 * (All other #GTlsCertificateFlags values will always be set or unset
37765 * Returns: the appropriate #GTlsCertificateFlags
37771 * g_tls_client_connection_get_accepted_cas:
37772 * @conn: the #GTlsClientConnection
37774 * Gets the list of distinguished names of the Certificate Authorities
37775 * that the server will accept certificates from. This will be set
37776 * during the TLS handshake if the server requests a certificate.
37777 * Otherwise, it will be %NULL.
37779 * Each item in the list is a #GByteArray which contains the complete
37780 * subject DN of the certificate authority.
37782 * CA DNs. You should unref each element with g_byte_array_unref() and then
37783 * the free the list with g_list_free().
37785 * Returns: (element-type GByteArray) (transfer full): the list of
37791 * g_tls_client_connection_get_server_identity:
37792 * @conn: the #GTlsClientConnection
37794 * Gets @conn's expected server identity
37796 * expected server identity, or %NULL if the expected identity is not
37799 * Returns: (transfer none): a #GSocketConnectable describing the
37805 * g_tls_client_connection_get_use_ssl3:
37806 * @conn: the #GTlsClientConnection
37808 * Gets whether @conn will use SSL 3.0 rather than the
37809 * highest-supported version of TLS; see
37810 * g_tls_client_connection_set_use_ssl3().
37812 * Returns: whether @conn will use SSL 3.0
37818 * g_tls_client_connection_get_validation_flags:
37819 * @conn: the #GTlsClientConnection
37821 * Gets @conn's validation flags
37823 * Returns: the validation flags
37829 * g_tls_client_connection_new:
37830 * @base_io_stream: the #GIOStream to wrap
37831 * @server_identity: (allow-none): the expected identity of the server
37832 * @error: #GError for error reporting, or %NULL to ignore.
37834 * Creates a new #GTlsClientConnection wrapping @base_io_stream (which
37835 * must have pollable input and output streams) which is assumed to
37836 * communicate with the server identified by @server_identity.
37838 * #GTlsClientConnection, or %NULL on error
37840 * Returns: (transfer full) (type GTlsClientConnection): the new
37846 * g_tls_client_connection_set_server_identity:
37847 * @conn: the #GTlsClientConnection
37848 * @identity: a #GSocketConnectable describing the expected server identity
37850 * Sets @conn's expected server identity, which is used both to tell
37851 * servers on virtual hosts which certificate to present, and also
37852 * to let @conn know what name to look for in the certificate when
37853 * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.
37860 * g_tls_client_connection_set_use_ssl3:
37861 * @conn: the #GTlsClientConnection
37862 * @use_ssl3: whether to use SSL 3.0
37864 * If @use_ssl3 is %TRUE, this forces @conn to use SSL 3.0 rather than
37865 * trying to properly negotiate the right version of TLS or SSL to use.
37866 * This can be used when talking to servers that do not implement the
37867 * fallbacks correctly and which will therefore fail to handshake with
37868 * a "modern" TLS handshake attempt.
37875 * g_tls_client_connection_set_validation_flags:
37876 * @conn: the #GTlsClientConnection
37877 * @flags: the #GTlsCertificateFlags to use
37879 * Sets @conn's validation flags, to override the default set of
37880 * checks performed when validating a server certificate. By default,
37881 * %G_TLS_CERTIFICATE_VALIDATE_ALL is used.
37888 * g_tls_connection_emit_accept_certificate:
37889 * @conn: a #GTlsConnection
37890 * @peer_cert: the peer's #GTlsCertificate
37891 * @errors: the problems with @peer_cert
37893 * Used by #GTlsConnection implementations to emit the
37894 * #GTlsConnection::accept-certificate signal.
37896 * %TRUE to accept @peer_cert
37898 * Returns: %TRUE if one of the signal handlers has returned
37904 * g_tls_connection_get_certificate:
37905 * @conn: a #GTlsConnection
37907 * Gets @conn's certificate, as set by
37908 * g_tls_connection_set_certificate().
37910 * Returns: (transfer none): @conn's certificate, or %NULL
37916 * g_tls_connection_get_database:
37917 * @conn: a #GTlsConnection
37919 * Gets the certificate database that @conn uses to verify
37920 * peer certificates. See g_tls_connection_set_database().
37922 * Returns: (transfer none): the certificate database that @conn uses or %NULL
37928 * g_tls_connection_get_interaction:
37929 * @conn: a connection
37931 * Get the object that will be used to interact with the user. It will be used
37932 * for things like prompting the user for passwords. If %NULL is returned, then
37933 * no user interaction will occur for this connection.
37935 * Returns: (transfer none): The interaction object.
37941 * g_tls_connection_get_peer_certificate:
37942 * @conn: a #GTlsConnection
37944 * Gets @conn's peer's certificate after the handshake has completed.
37945 * (It is not set during the emission of
37946 * #GTlsConnection::accept-certificate.)
37948 * Returns: (transfer none): @conn's peer's certificate, or %NULL
37954 * g_tls_connection_get_peer_certificate_errors:
37955 * @conn: a #GTlsConnection
37957 * Gets the errors associated with validating @conn's peer's
37958 * certificate, after the handshake has completed. (It is not set
37959 * during the emission of #GTlsConnection::accept-certificate.)
37961 * Returns: @conn's peer's certificate errors
37967 * g_tls_connection_get_rehandshake_mode:
37968 * @conn: a #GTlsConnection
37970 * Gets @conn rehandshaking mode. See
37971 * g_tls_connection_set_rehandshake_mode() for details.
37973 * Returns: @conn's rehandshaking mode
37979 * g_tls_connection_get_require_close_notify:
37980 * @conn: a #GTlsConnection
37982 * Tests whether or not @conn expects a proper TLS close notification
37983 * when the connection is closed. See
37984 * g_tls_connection_set_require_close_notify() for details.
37988 * Returns: %TRUE if @conn requires a proper TLS close
37994 * g_tls_connection_get_use_system_certdb:
37995 * @conn: a #GTlsConnection
37997 * Gets whether @conn uses the system certificate database to verify
37998 * peer certificates. See g_tls_connection_set_use_system_certdb().
38000 * Returns: whether @conn uses the system certificate database
38001 * Deprecated: 2.30: Use g_tls_connection_get_database() instead
38006 * g_tls_connection_handshake:
38007 * @conn: a #GTlsConnection
38008 * @cancellable: a #GCancellable, or %NULL
38009 * @error: a #GError, or %NULL
38011 * Attempts a TLS handshake on @conn.
38013 * On the client side, it is never necessary to call this method;
38014 * although the connection needs to perform a handshake after
38015 * connecting (or after sending a "STARTTLS"-type command) and may
38016 * need to rehandshake later if the server requests it,
38017 * #GTlsConnection will handle this for you automatically when you try
38018 * to send or receive data on the connection. However, you can call
38019 * g_tls_connection_handshake() manually if you want to know for sure
38020 * whether the initial handshake succeeded or failed (as opposed to
38021 * just immediately trying to write to @conn's output stream, in which
38022 * case if it fails, it may not be possible to tell if it failed
38023 * before or after completing the handshake).
38025 * Likewise, on the server side, although a handshake is necessary at
38026 * the beginning of the communication, you do not need to call this
38027 * function explicitly unless you want clearer error reporting.
38028 * However, you may call g_tls_connection_handshake() later on to
38029 * renegotiate parameters (encryption methods, etc) with the client.
38031 * #GTlsConnection::accept_certificate may be emitted during the
38034 * Returns: success or failure
38040 * g_tls_connection_handshake_async:
38041 * @conn: a #GTlsConnection
38042 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
38043 * @cancellable: a #GCancellable, or %NULL
38044 * @callback: callback to call when the handshake is complete
38045 * @user_data: the data to pass to the callback function
38047 * Asynchronously performs a TLS handshake on @conn. See
38048 * g_tls_connection_handshake() for more information.
38055 * g_tls_connection_handshake_finish:
38056 * @conn: a #GTlsConnection
38057 * @result: a #GAsyncResult.
38058 * @error: a #GError pointer, or %NULL
38060 * Finish an asynchronous TLS handshake operation. See
38061 * g_tls_connection_handshake() for more information.
38063 * case @error will be set.
38065 * Returns: %TRUE on success, %FALSE on failure, in which
38071 * g_tls_connection_set_certificate:
38072 * @conn: a #GTlsConnection
38073 * @certificate: the certificate to use for @conn
38075 * This sets the certificate that @conn will present to its peer
38076 * during the TLS handshake. For a #GTlsServerConnection, it is
38077 * mandatory to set this, and that will normally be done at construct
38080 * For a #GTlsClientConnection, this is optional. If a handshake fails
38081 * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server
38082 * requires a certificate, and if you try connecting again, you should
38083 * call this method first. You can call
38084 * g_tls_client_connection_get_accepted_cas() on the failed connection
38085 * to get a list of Certificate Authorities that the server will
38086 * accept certificates from.
38088 * (It is also possible that a server will allow the connection with
38089 * or without a certificate; in that case, if you don't provide a
38090 * certificate, you can tell that the server requested one by the fact
38091 * that g_tls_client_connection_get_accepted_cas() will return
38099 * g_tls_connection_set_database:
38100 * @conn: a #GTlsConnection
38101 * @database: a #GTlsDatabase
38103 * Sets the certificate database that is used to verify peer certificates.
38104 * This is set to the default database by default. See
38105 * g_tls_backend_get_default_database(). If set to %NULL, then
38106 * peer certificate validation will always set the
38107 * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
38108 * #GTlsConnection::accept-certificate will always be emitted on
38109 * client-side connections, unless that bit is not set in
38110 * #GTlsClientConnection:validation-flags).
38117 * g_tls_connection_set_interaction:
38118 * @conn: a connection
38119 * @interaction: (allow-none): an interaction object, or %NULL
38121 * Set the object that will be used to interact with the user. It will be used
38122 * for things like prompting the user for passwords.
38124 * The @interaction argument will normally be a derived subclass of
38125 * #GTlsInteraction. %NULL can also be provided if no user interaction
38126 * should occur for this connection.
38133 * g_tls_connection_set_rehandshake_mode:
38134 * @conn: a #GTlsConnection
38135 * @mode: the rehandshaking mode
38137 * Sets how @conn behaves with respect to rehandshaking requests.
38139 * %G_TLS_REHANDSHAKE_NEVER means that it will never agree to
38140 * rehandshake after the initial handshake is complete. (For a client,
38141 * this means it will refuse rehandshake requests from the server, and
38142 * for a server, this means it will close the connection with an error
38143 * if the client attempts to rehandshake.)
38145 * %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a
38146 * rehandshake only if the other end of the connection supports the
38147 * TLS <literal>renegotiation_info</literal> extension. This is the
38148 * default behavior, but means that rehandshaking will not work
38149 * against older implementations that do not support that extension.
38151 * %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow
38152 * rehandshaking even without the
38153 * <literal>renegotiation_info</literal> extension. On the server side
38154 * in particular, this is not recommended, since it leaves the server
38155 * open to certain attacks. However, this mode is necessary if you
38156 * need to allow renegotiation with older client software.
38163 * g_tls_connection_set_require_close_notify:
38164 * @conn: a #GTlsConnection
38165 * @require_close_notify: whether or not to require close notification
38167 * Sets whether or not @conn expects a proper TLS close notification
38168 * before the connection is closed. If this is %TRUE (the default),
38169 * then @conn will expect to receive a TLS close notification from its
38170 * peer before the connection is closed, and will return a
38171 * %G_TLS_ERROR_EOF error if the connection is closed without proper
38172 * notification (since this may indicate a network error, or
38173 * man-in-the-middle attack).
38175 * In some protocols, the application will know whether or not the
38176 * connection was closed cleanly based on application-level data
38177 * (because the application-level data includes a length field, or is
38178 * somehow self-delimiting); in this case, the close notify is
38179 * redundant and sometimes omitted. (TLS 1.1 explicitly allows this;
38180 * in TLS 1.0 it is technically an error, but often done anyway.) You
38181 * can use g_tls_connection_set_require_close_notify() to tell @conn
38182 * to allow an "unannounced" connection close, in which case the close
38183 * will show up as a 0-length read, as in a non-TLS
38184 * #GSocketConnection, and it is up to the application to check that
38185 * the data has been fully received.
38187 * Note that this only affects the behavior when the peer closes the
38188 * connection; when the application calls g_io_stream_close() itself
38189 * on @conn, this will send a close notification regardless of the
38190 * setting of this property. If you explicitly want to do an unclean
38191 * close, you can close @conn's #GTlsConnection:base-io-stream rather
38192 * than closing @conn itself.
38199 * g_tls_connection_set_use_system_certdb:
38200 * @conn: a #GTlsConnection
38201 * @use_system_certdb: whether to use the system certificate database
38203 * Sets whether @conn uses the system certificate database to verify
38204 * peer certificates. This is %TRUE by default. If set to %FALSE, then
38205 * peer certificate validation will always set the
38206 * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
38207 * #GTlsConnection::accept-certificate will always be emitted on
38208 * client-side connections, unless that bit is not set in
38209 * #GTlsClientConnection:validation-flags).
38211 * Deprecated: 2.30: Use g_tls_connection_set_database() instead
38216 * g_tls_database_create_certificate_handle:
38217 * @self: a #GTlsDatabase
38218 * @certificate: certificate for which to create a handle.
38220 * Create a handle string for the certificate. The database will only be able
38221 * to create a handle for certificates that originate from the database. In
38222 * cases where the database cannot create a handle for a certificate, %NULL
38223 * will be returned.
38225 * This handle should be stable across various instances of the application,
38226 * and between applications. If a certificate is modified in the database,
38227 * then it is not guaranteed that this handle will continue to point to it.
38229 * Returns: (allow-none): a newly allocated string containing the handle.
38235 * g_tls_database_lookup_certificate_for_handle:
38236 * @self: a #GTlsDatabase
38237 * @handle: a certificate handle
38238 * @interaction: (allow-none): used to interact with the user if necessary
38239 * @flags: Flags which affect the lookup.
38240 * @cancellable: (allow-none): a #GCancellable, or %NULL
38241 * @error: (allow-none): a #GError, or %NULL
38243 * Lookup a certificate by its handle.
38245 * The handle should have been created by calling g_tls_database_create_handle()
38246 * on a #GTlsDatabase object of the same TLS backend. The handle is designed
38247 * to remain valid across instantiations of the database.
38249 * If the handle is no longer valid, or does not point to a certificate in
38250 * this database, then %NULL will be returned.
38252 * This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform
38253 * the lookup operation asynchronously.
38255 * #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate.
38257 * Returns: (transfer full) (allow-none): a newly allocated
38263 * g_tls_database_lookup_certificate_for_handle_async:
38264 * @self: a #GTlsDatabase
38265 * @handle: a certificate handle
38266 * @interaction: (allow-none): used to interact with the user if necessary
38267 * @flags: Flags which affect the lookup.
38268 * @cancellable: (allow-none): a #GCancellable, or %NULL
38269 * @callback: callback to call when the operation completes
38270 * @user_data: the data to pass to the callback function
38272 * Asynchronously lookup a certificate by its handle in the database. See
38273 * g_tls_database_lookup_handle() for more information.
38280 * g_tls_database_lookup_certificate_for_handle_finish:
38281 * @self: a #GTlsDatabase
38282 * @result: a #GAsyncResult.
38283 * @error: a #GError pointer, or %NULL
38285 * Finish an asynchronous lookup of a certificate by its handle. See
38286 * g_tls_database_lookup_handle() for more information.
38288 * If the handle is no longer valid, or does not point to a certificate in
38289 * this database, then %NULL will be returned.
38291 * Use g_object_unref() to release the certificate.
38293 * Returns: (transfer full): a newly allocated #GTlsCertificate object.
38299 * g_tls_database_lookup_certificate_issuer:
38300 * @self: a #GTlsDatabase
38301 * @certificate: a #GTlsCertificate
38302 * @interaction: (allow-none): used to interact with the user if necessary
38303 * @flags: flags which affect the lookup operation
38304 * @cancellable: (allow-none): a #GCancellable, or %NULL
38305 * @error: (allow-none): a #GError, or %NULL
38307 * Lookup the issuer of @certificate in the database.
38309 * The %issuer property
38310 * of @certificate is not modified, and the two certificates are not hooked
38313 * This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform
38314 * the lookup operation asynchronously.
38316 * or %NULL. Use g_object_unref() to release the certificate.
38318 * Returns: (transfer full): a newly allocated issuer #GTlsCertificate,
38324 * g_tls_database_lookup_certificate_issuer_async:
38325 * @self: a #GTlsDatabase
38326 * @certificate: a #GTlsCertificate
38327 * @interaction: (allow-none): used to interact with the user if necessary
38328 * @flags: flags which affect the lookup operation
38329 * @cancellable: (allow-none): a #GCancellable, or %NULL
38330 * @callback: callback to call when the operation completes
38331 * @user_data: the data to pass to the callback function
38333 * Asynchronously lookup the issuer of @certificate in the database. See
38334 * g_tls_database_lookup_certificate_issuer() for more information.
38341 * g_tls_database_lookup_certificate_issuer_finish:
38342 * @self: a #GTlsDatabase
38343 * @result: a #GAsyncResult.
38344 * @error: a #GError pointer, or %NULL
38346 * Finish an asynchronous lookup issuer operation. See
38347 * g_tls_database_lookup_certificate_issuer() for more information.
38349 * or %NULL. Use g_object_unref() to release the certificate.
38351 * Returns: (transfer full): a newly allocated issuer #GTlsCertificate,
38357 * g_tls_database_lookup_certificates_issued_by:
38358 * @self: a #GTlsDatabase
38359 * @issuer_raw_dn: a #GByteArray which holds the DER encoded issuer DN.
38360 * @interaction: (allow-none): used to interact with the user if necessary
38361 * @flags: Flags which affect the lookup operation.
38362 * @cancellable: (allow-none): a #GCancellable, or %NULL
38363 * @error: (allow-none): a #GError, or %NULL
38365 * Lookup certificates issued by this issuer in the database.
38367 * This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform
38368 * the lookup operation asynchronously.
38370 * objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list.
38372 * Returns: (transfer full) (element-type GTlsCertificate): a newly allocated list of #GTlsCertificate
38378 * g_tls_database_lookup_certificates_issued_by_async:
38379 * @self: a #GTlsDatabase
38380 * @issuer_raw_dn: a #GByteArray which holds the DER encoded issuer DN.
38381 * @interaction: (allow-none): used to interact with the user if necessary
38382 * @flags: Flags which affect the lookup operation.
38383 * @cancellable: (allow-none): a #GCancellable, or %NULL
38384 * @callback: callback to call when the operation completes
38385 * @user_data: the data to pass to the callback function
38387 * Asynchronously lookup certificates issued by this issuer in the database. See
38388 * g_tls_database_lookup_certificates_issued_by() for more information.
38390 * The database may choose to hold a reference to the issuer byte array for the duration
38391 * of of this asynchronous operation. The byte array should not be modified during
38399 * g_tls_database_lookup_certificates_issued_by_finish:
38400 * @self: a #GTlsDatabase
38401 * @result: a #GAsyncResult.
38402 * @error: a #GError pointer, or %NULL
38404 * Finish an asynchronous lookup of certificates. See
38405 * g_tls_database_lookup_certificates_issued_by() for more information.
38407 * Use g_object_unref() on each certificate, and g_list_free() on the release the list.
38409 * Returns: (transfer full): a newly allocated list of #GTlsCertificate objects.
38415 * g_tls_database_verify_chain:
38416 * @self: a #GTlsDatabase
38417 * @chain: a #GTlsCertificate chain
38418 * @purpose: the purpose that this certificate chain will be used for.
38419 * @identity: (allow-none): the expected peer identity
38420 * @interaction: (allow-none): used to interact with the user if necessary
38421 * @flags: additional verify flags
38422 * @cancellable: (allow-none): a #GCancellable, or %NULL
38423 * @error: (allow-none): a #GError, or %NULL
38425 * Verify's a certificate chain after looking up and adding any missing
38426 * certificates to the chain.
38428 * @chain is a chain of #GTlsCertificate objects each pointing to the next
38429 * certificate in the chain by its %issuer property. The chain may initially
38430 * consist of one or more certificates. After the verification process is
38431 * complete, @chain may be modified by adding missing certificates, or removing
38432 * extra certificates. If a certificate anchor was found, then it is added to
38435 * @purpose describes the purpose (or usage) for which the certificate
38436 * is being used. Typically @purpose will be set to #G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER
38437 * which means that the certificate is being used to authenticate a server
38438 * (and we are acting as the client).
38440 * The @identity is used to check for pinned certificates (trust exceptions)
38441 * in the database. These will override the normal verification process on a
38442 * host by host basis.
38444 * Currently there are no @flags, and %G_TLS_DATABASE_VERIFY_NONE should be
38447 * This function can block, use g_tls_database_verify_chain_async() to perform
38448 * the verification operation asynchronously.
38450 * result of verification.
38452 * Returns: the appropriate #GTlsCertificateFlags which represents the
38458 * g_tls_database_verify_chain_async:
38459 * @self: a #GTlsDatabase
38460 * @chain: a #GTlsCertificate chain
38461 * @purpose: the purpose that this certificate chain will be used for.
38462 * @identity: (allow-none): the expected peer identity
38463 * @interaction: (allow-none): used to interact with the user if necessary
38464 * @flags: additional verify flags
38465 * @cancellable: (allow-none): a #GCancellable, or %NULL
38466 * @callback: callback to call when the operation completes
38467 * @user_data: the data to pass to the callback function
38469 * Asynchronously verify's a certificate chain after looking up and adding
38470 * any missing certificates to the chain. See g_tls_database_verify_chain()
38471 * for more information.
38478 * g_tls_database_verify_chain_finish:
38479 * @self: a #GTlsDatabase
38480 * @result: a #GAsyncResult.
38481 * @error: a #GError pointer, or %NULL
38483 * Finish an asynchronous verify chain operation. See
38484 * g_tls_database_verify_chain() for more information. *
38485 * result of verification.
38487 * Returns: the appropriate #GTlsCertificateFlags which represents the
38493 * g_tls_error_quark:
38495 * Gets the TLS error quark.
38497 * Returns: a #GQuark.
38503 * g_tls_file_database_new:
38504 * @anchors: filename of anchor certificate authorities.
38505 * @error: #GError for error reporting, or %NULL to ignore.
38507 * Creates a new #GTlsFileDatabase which uses anchor certificate authorities
38508 * in @anchors to verify certificate chains.
38510 * The certificates in @anchors must be PEM encoded.
38512 * #GTlsFileDatabase, or %NULL on error
38514 * Returns: (transfer full) (type GTlsFileDatabase): the new
38520 * g_tls_interaction_ask_password:
38521 * @interaction: a #GTlsInteraction object
38522 * @password: a #GTlsPassword object
38523 * @cancellable: an optional #GCancellable cancellation object
38524 * @error: an optional location to place an error on failure
38526 * Run synchronous interaction to ask the user for a password. In general,
38527 * g_tls_interaction_invoke_ask_password() should be used instead of this
38530 * Derived subclasses usually implement a password prompt, although they may
38531 * also choose to provide a password from elsewhere. The @password value will
38532 * be filled in and then @callback will be called. Alternatively the user may
38533 * abort this password request, which will usually abort the TLS connection.
38535 * If the interaction is cancelled by the cancellation object, or by the
38536 * user then %G_TLS_INTERACTION_FAILED will be returned with an error that
38537 * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
38538 * not support immediate cancellation.
38540 * Returns: The status of the ask password interaction.
38546 * g_tls_interaction_ask_password_async:
38547 * @interaction: a #GTlsInteraction object
38548 * @password: a #GTlsPassword object
38549 * @cancellable: an optional #GCancellable cancellation object
38550 * @callback: (allow-none): will be called when the interaction completes
38551 * @user_data: (allow-none): data to pass to the @callback
38553 * Run asynchronous interaction to ask the user for a password. In general,
38554 * g_tls_interaction_invoke_ask_password() should be used instead of this
38557 * Derived subclasses usually implement a password prompt, although they may
38558 * also choose to provide a password from elsewhere. The @password value will
38559 * be filled in and then @callback will be called. Alternatively the user may
38560 * abort this password request, which will usually abort the TLS connection.
38562 * If the interaction is cancelled by the cancellation object, or by the
38563 * user then %G_TLS_INTERACTION_FAILED will be returned with an error that
38564 * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
38565 * not support immediate cancellation.
38567 * Certain implementations may not support immediate cancellation.
38574 * g_tls_interaction_ask_password_finish:
38575 * @interaction: a #GTlsInteraction object
38576 * @result: the result passed to the callback
38577 * @error: an optional location to place an error on failure
38579 * Complete an ask password user interaction request. This should be once
38580 * the g_tls_interaction_ask_password_async() completion callback is called.
38582 * If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsPassword passed
38583 * to g_tls_interaction_ask_password() will have its password filled in.
38585 * If the interaction is cancelled by the cancellation object, or by the
38586 * user then %G_TLS_INTERACTION_FAILED will be returned with an error that
38587 * contains a %G_IO_ERROR_CANCELLED error code.
38589 * Returns: The status of the ask password interaction.
38595 * g_tls_interaction_invoke_ask_password:
38596 * @interaction: a #GTlsInteraction object
38597 * @password: a #GTlsPassword object
38598 * @cancellable: an optional #GCancellable cancellation object
38599 * @error: an optional location to place an error on failure
38601 * Invoke the interaction to ask the user for a password. It invokes this
38602 * interaction in the main loop, specifically the #GMainContext returned by
38603 * g_main_context_get_thread_default() when the interaction is created. This
38604 * is called by called by #GTlsConnection or #GTlsDatabase to ask the user
38607 * Derived subclasses usually implement a password prompt, although they may
38608 * also choose to provide a password from elsewhere. The @password value will
38609 * be filled in and then @callback will be called. Alternatively the user may
38610 * abort this password request, which will usually abort the TLS connection.
38612 * The implementation can either be a synchronous (eg: modal dialog) or an
38613 * asynchronous one (eg: modeless dialog). This function will take care of
38614 * calling which ever one correctly.
38616 * If the interaction is cancelled by the cancellation object, or by the
38617 * user then %G_TLS_INTERACTION_FAILED will be returned with an error that
38618 * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may
38619 * not support immediate cancellation.
38621 * Returns: The status of the ask password interaction.
38627 * g_tls_password_get_description:
38628 * @password: a #GTlsPassword object
38630 * Get a description string about what the password will be used for.
38632 * Returns: The description of the password.
38638 * g_tls_password_get_flags:
38639 * @password: a #GTlsPassword object
38641 * Get flags about the password.
38643 * Returns: The flags about the password.
38649 * g_tls_password_get_value:
38650 * @password: a #GTlsPassword object
38651 * @length: (allow-none): location to place the length of the password.
38653 * Get the password value. If @length is not %NULL then it will be filled
38654 * in with the length of the password value.
38656 * Returns: The password value owned by the password object.
38662 * g_tls_password_get_warning:
38663 * @password: a #GTlsPassword object
38665 * Get a user readable translated warning. Usually this warning is a
38666 * representation of the password flags returned from
38667 * g_tls_password_get_flags().
38669 * Returns: The warning.
38675 * g_tls_password_new:
38676 * @flags: the password flags
38677 * @description: description of what the password is for
38679 * Create a new #GTlsPassword object.
38681 * Returns: (transfer full): The newly allocated password object
38686 * g_tls_password_set_description:
38687 * @password: a #GTlsPassword object
38688 * @description: The description of the password
38690 * Set a description string about what the password will be used for.
38697 * g_tls_password_set_flags:
38698 * @password: a #GTlsPassword object
38699 * @flags: The flags about the password
38701 * Set flags about the password.
38708 * g_tls_password_set_value:
38709 * @password: a #GTlsPassword object
38710 * @value: the new password value
38711 * @length: the length of the password, or -1
38713 * Set the value for this password. The @value will be copied by the password
38716 * Specify the @length, for a non-null-terminated password. Pass -1 as
38717 * @length if using a null-terminated password, and @length will be calculated
38725 * g_tls_password_set_value_full:
38726 * @password: a #GTlsPassword object
38727 * @value: the value for the password
38728 * @length: the length of the password, or -1
38729 * @destroy: (allow-none): a function to use to free the password.
38731 * Provide the value for this password.
38733 * The @value will be owned by the password object, and later freed using
38734 * the @destroy function callback.
38736 * Specify the @length, for a non-null-terminated password. Pass -1 as
38737 * @length if using a null-terminated password, and @length will be calculated
38740 * Virtual: set_value
38746 * g_tls_password_set_warning:
38747 * @password: a #GTlsPassword object
38748 * @warning: The user readable warning
38750 * Set a user readable translated warning. Usually this warning is a
38751 * representation of the password flags returned from
38752 * g_tls_password_get_flags().
38759 * g_tls_server_connection_new:
38760 * @base_io_stream: the #GIOStream to wrap
38761 * @certificate: (allow-none): the default server certificate, or %NULL
38762 * @error: #GError for error reporting, or %NULL to ignore.
38764 * Creates a new #GTlsServerConnection wrapping @base_io_stream (which
38765 * must have pollable input and output streams).
38767 * #GTlsServerConnection, or %NULL on error
38769 * Returns: (transfer full) (type GTlsServerConnection): the new
38776 * @struct_type: the type of the elements to allocate
38777 * @n_structs: the number of elements to allocate
38779 * Attempts to allocate @n_structs elements of type @struct_type, and returns
38780 * %NULL on failure. Contrast with g_new(), which aborts the program on failure.
38781 * The returned pointer is cast to a pointer to the given type.
38782 * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
38785 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
38791 * @struct_type: the type of the elements to allocate
38792 * @n_structs: the number of elements to allocate
38794 * Attempts to allocate @n_structs elements of type @struct_type, initialized
38795 * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts
38796 * the program on failure.
38797 * The returned pointer is cast to a pointer to the given type.
38798 * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
38801 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
38807 * @struct_type: the type of the elements to allocate
38808 * @mem: the currently allocated memory
38809 * @n_structs: the number of elements to allocate
38811 * Attempts to reallocate the memory pointed to by @mem, so that it now has
38812 * space for @n_structs elements of type @struct_type, and returns %NULL on
38813 * failure. Contrast with g_renew(), which aborts the program on failure.
38814 * It returns the new address of the memory, which may have been moved.
38815 * The function returns %NULL if an overflow occurs.
38818 * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
38823 * g_unix_connection_receive_credentials:
38824 * @connection: A #GUnixConnection.
38825 * @cancellable: (allow-none): A #GCancellable or %NULL.
38826 * @error: Return location for error or %NULL.
38828 * Receives credentials from the sending end of the connection. The
38829 * sending end has to call g_unix_connection_send_credentials() (or
38830 * similar) for this to work.
38832 * As well as reading the credentials this also reads (and discards) a
38833 * single byte from the stream, as this is required for credentials
38834 * passing to work on some implementations.
38836 * Other ways to exchange credentials with a foreign peer includes the
38837 * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
38839 * g_object_unref()), %NULL if @error is set.
38841 * Returns: (transfer full): Received credentials on success (free with
38847 * g_unix_connection_receive_fd:
38848 * @connection: a #GUnixConnection
38849 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
38850 * @error: (allow-none): #GError for error reporting, or %NULL to ignore
38852 * Receives a file descriptor from the sending end of the connection.
38853 * The sending end has to call g_unix_connection_send_fd() for this
38856 * As well as reading the fd this also reads a single byte from the
38857 * stream, as this is required for fd passing to work on some
38860 * Returns: a file descriptor on success, -1 on error.
38866 * g_unix_connection_send_credentials:
38867 * @connection: A #GUnixConnection.
38868 * @cancellable: (allow-none): A #GCancellable or %NULL.
38869 * @error: Return location for error or %NULL.
38871 * Passes the credentials of the current user the receiving side
38872 * of the connection. The receiving end has to call
38873 * g_unix_connection_receive_credentials() (or similar) to accept the
38876 * As well as sending the credentials this also writes a single NUL
38877 * byte to the stream, as this is required for credentials passing to
38878 * work on some implementations.
38880 * Other ways to exchange credentials with a foreign peer includes the
38881 * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
38883 * Returns: %TRUE on success, %FALSE if @error is set.
38889 * g_unix_connection_send_fd:
38890 * @connection: a #GUnixConnection
38891 * @fd: a file descriptor
38892 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
38893 * @error: (allow-none): #GError for error reporting, or %NULL to ignore.
38895 * Passes a file descriptor to the receiving side of the
38896 * connection. The receiving end has to call g_unix_connection_receive_fd()
38897 * to accept the file descriptor.
38899 * As well as sending the fd this also writes a single byte to the
38900 * stream, as this is required for fd passing to work on some
38903 * Returns: a %TRUE on success, %NULL on error.
38909 * g_unix_credentials_message_get_credentials:
38910 * @message: A #GUnixCredentialsMessage.
38912 * Gets the credentials stored in @message.
38914 * Returns: (transfer none): A #GCredentials instance. Do not free, it is owned by @message.
38920 * g_unix_credentials_message_is_supported:
38922 * Checks if passing #GCredentials on a #GSocket is supported on this platform.
38924 * Returns: %TRUE if supported, %FALSE otherwise
38930 * g_unix_credentials_message_new:
38932 * Creates a new #GUnixCredentialsMessage with credentials matching the current processes.
38934 * Returns: a new #GUnixCredentialsMessage
38940 * g_unix_credentials_message_new_with_credentials:
38941 * @credentials: A #GCredentials object.
38943 * Creates a new #GUnixCredentialsMessage holding @credentials.
38945 * Returns: a new #GUnixCredentialsMessage
38951 * g_unix_fd_list_append:
38952 * @list: a #GUnixFDList
38953 * @fd: a valid open file descriptor
38954 * @error: a #GError pointer
38956 * Adds a file descriptor to @list.
38958 * The file descriptor is duplicated using dup(). You keep your copy
38959 * of the descriptor and the copy contained in @list will be closed
38960 * when @list is finalized.
38962 * A possible cause of failure is exceeding the per-process or
38963 * system-wide file descriptor limit.
38965 * The index of the file descriptor in the list is returned. If you use
38966 * this index with g_unix_fd_list_get() then you will receive back a
38967 * duplicated copy of the same file descriptor.
38969 * (and @error is set)
38971 * Returns: the index of the appended fd in case of success, else -1
38977 * g_unix_fd_list_get:
38978 * @list: a #GUnixFDList
38979 * @index_: the index into the list
38980 * @error: a #GError pointer
38982 * Gets a file descriptor out of @list.
38984 * @index_ specifies the index of the file descriptor to get. It is a
38985 * programmer error for @index_ to be out of range; see
38986 * g_unix_fd_list_get_length().
38988 * The file descriptor is duplicated using dup() and set as
38989 * close-on-exec before being returned. You must call close() on it
38990 * when you are done.
38992 * A possible cause of failure is exceeding the per-process or
38993 * system-wide file descriptor limit.
38995 * Returns: the file descriptor, or -1 in case of error
39001 * g_unix_fd_list_get_length:
39002 * @list: a #GUnixFDList
39004 * Gets the length of @list (ie: the number of file descriptors
39005 * contained within).
39007 * Returns: the length of @list
39013 * g_unix_fd_list_new:
39015 * Creates a new #GUnixFDList containing no file descriptors.
39017 * Returns: a new #GUnixFDList
39023 * g_unix_fd_list_new_from_array:
39024 * @fds: (array length=n_fds): the initial list of file descriptors
39025 * @n_fds: the length of #fds, or -1
39027 * Creates a new #GUnixFDList containing the file descriptors given in
39028 * @fds. The file descriptors become the property of the new list and
39029 * may no longer be used by the caller. The array itself is owned by
39032 * Each file descriptor in the array should be set to close-on-exec.
39034 * If @n_fds is -1 then @fds must be terminated with -1.
39036 * Returns: a new #GUnixFDList
39042 * g_unix_fd_list_peek_fds:
39043 * @list: a #GUnixFDList
39044 * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
39046 * Returns the array of file descriptors that is contained in this
39049 * After this call, the descriptors remain the property of @list. The
39050 * caller must not close them and must not free the array. The array is
39051 * valid only until @list is changed in any way.
39053 * If @length is non-%NULL then it is set to the number of file
39054 * descriptors in the returned array. The returned array is also
39055 * terminated with -1.
39057 * This function never returns %NULL. In case there are no file
39058 * descriptors contained in @list, an empty array is returned.
39062 * Returns: (array length=length) (transfer none): an array of file
39068 * g_unix_fd_list_steal_fds:
39069 * @list: a #GUnixFDList
39070 * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
39072 * Returns the array of file descriptors that is contained in this
39075 * After this call, the descriptors are no longer contained in
39076 * @list. Further calls will return an empty list (unless more
39077 * descriptors have been added).
39079 * The return result of this function must be freed with g_free().
39080 * The caller is also responsible for closing all of the file
39081 * descriptors. The file descriptors in the array are set to
39084 * If @length is non-%NULL then it is set to the number of file
39085 * descriptors in the returned array. The returned array is also
39086 * terminated with -1.
39088 * This function never returns %NULL. In case there are no file
39089 * descriptors contained in @list, an empty array is returned.
39093 * Returns: (array length=length) (transfer full): an array of file
39099 * g_unix_fd_message_append_fd:
39100 * @message: a #GUnixFDMessage
39101 * @fd: a valid open file descriptor
39102 * @error: a #GError pointer
39104 * Adds a file descriptor to @message.
39106 * The file descriptor is duplicated using dup(). You keep your copy
39107 * of the descriptor and the copy contained in @message will be closed
39108 * when @message is finalized.
39110 * A possible cause of failure is exceeding the per-process or
39111 * system-wide file descriptor limit.
39113 * Returns: %TRUE in case of success, else %FALSE (and @error is set)
39119 * g_unix_fd_message_get_fd_list:
39120 * @message: a #GUnixFDMessage
39122 * Gets the #GUnixFDList contained in @message. This function does not
39123 * return a reference to the caller, but the returned list is valid for
39124 * the lifetime of @message.
39126 * Returns: (transfer none): the #GUnixFDList from @message
39132 * g_unix_fd_message_new:
39134 * Creates a new #GUnixFDMessage containing an empty file descriptor
39137 * Returns: a new #GUnixFDMessage
39143 * g_unix_fd_message_new_with_fd_list:
39144 * @fd_list: a #GUnixFDList
39146 * Creates a new #GUnixFDMessage containing @list.
39148 * Returns: a new #GUnixFDMessage
39154 * g_unix_fd_message_steal_fds:
39155 * @message: a #GUnixFDMessage
39156 * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
39158 * Returns the array of file descriptors that is contained in this
39161 * After this call, the descriptors are no longer contained in
39162 * @message. Further calls will return an empty list (unless more
39163 * descriptors have been added).
39165 * The return result of this function must be freed with g_free().
39166 * The caller is also responsible for closing all of the file
39169 * If @length is non-%NULL then it is set to the number of file
39170 * descriptors in the returned array. The returned array is also
39171 * terminated with -1.
39173 * This function never returns %NULL. In case there are no file
39174 * descriptors contained in @message, an empty array is returned.
39178 * Returns: (array length=length) (transfer full): an array of file
39184 * g_unix_input_stream_get_close_fd:
39185 * @stream: a #GUnixInputStream
39187 * Returns whether the file descriptor of @stream will be
39188 * closed when the stream is closed.
39190 * Returns: %TRUE if the file descriptor is closed when done
39196 * g_unix_input_stream_get_fd:
39197 * @stream: a #GUnixInputStream
39199 * Return the UNIX file descriptor that the stream reads from.
39201 * Returns: The file descriptor of @stream
39207 * g_unix_input_stream_new:
39208 * @fd: a UNIX file descriptor
39209 * @close_fd: %TRUE to close the file descriptor when done
39211 * Creates a new #GUnixInputStream for the given @fd.
39213 * If @close_fd is %TRUE, the file descriptor will be closed
39214 * when the stream is closed.
39216 * Returns: a new #GUnixInputStream
39221 * g_unix_input_stream_set_close_fd:
39222 * @stream: a #GUnixInputStream
39223 * @close_fd: %TRUE to close the file descriptor when done
39225 * Sets whether the file descriptor of @stream shall be closed
39226 * when the stream is closed.
39233 * g_unix_is_mount_path_system_internal:
39234 * @mount_path: a mount path, e.g. <filename>/media/disk</filename> or <filename>/usr</filename>
39236 * Determines if @mount_path is considered an implementation of the
39237 * OS. This is primarily used for hiding mountable and mounted volumes
39238 * that only are used in the OS and has little to no relevance to the
39243 * Returns: %TRUE if @mount_path is considered an implementation detail
39248 * g_unix_mount_at: (skip)
39249 * @mount_path: path for a possible unix mount.
39250 * @time_read: (out) (allow-none): guint64 to contain a timestamp.
39252 * Gets a #GUnixMountEntry for a given mount path. If @time_read
39253 * is set, it will be filled with a unix timestamp for checking
39254 * if the mounts have changed since with g_unix_mounts_changed_since().
39256 * Returns: (transfer full): a #GUnixMountEntry.
39261 * g_unix_mount_compare:
39262 * @mount1: first #GUnixMountEntry to compare.
39263 * @mount2: second #GUnixMountEntry to compare.
39265 * Compares two unix mounts.
39267 * or less than @mount2, respectively.
39269 * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
39274 * g_unix_mount_free:
39275 * @mount_entry: a #GUnixMount.
39277 * Frees a unix mount.
39282 * g_unix_mount_get_device_path:
39283 * @mount_entry: a #GUnixMount.
39285 * Gets the device path for a unix mount.
39287 * Returns: a string containing the device path.
39292 * g_unix_mount_get_fs_type:
39293 * @mount_entry: a #GUnixMount.
39295 * Gets the filesystem type for the unix mount.
39297 * Returns: a string containing the file system type.
39302 * g_unix_mount_get_mount_path:
39303 * @mount_entry: input #GUnixMountEntry to get the mount path for.
39305 * Gets the mount path for a unix mount.
39307 * Returns: the mount path for @mount_entry.
39312 * g_unix_mount_guess_can_eject:
39313 * @mount_entry: a #GUnixMountEntry
39315 * Guesses whether a Unix mount can be ejected.
39317 * Returns: %TRUE if @mount_entry is deemed to be ejectable.
39322 * g_unix_mount_guess_icon:
39323 * @mount_entry: a #GUnixMountEntry
39325 * Guesses the icon of a Unix mount.
39327 * Returns: (transfer full): a #GIcon
39332 * g_unix_mount_guess_name:
39333 * @mount_entry: a #GUnixMountEntry
39335 * Guesses the name of a Unix mount.
39336 * The result is a translated string.
39338 * be freed with g_free()
39340 * Returns: A newly allocated string that must
39345 * g_unix_mount_guess_should_display:
39346 * @mount_entry: a #GUnixMountEntry
39348 * Guesses whether a Unix mount should be displayed in the UI.
39350 * Returns: %TRUE if @mount_entry is deemed to be displayable.
39355 * g_unix_mount_is_readonly:
39356 * @mount_entry: a #GUnixMount.
39358 * Checks if a unix mount is mounted read only.
39360 * Returns: %TRUE if @mount_entry is read only.
39365 * g_unix_mount_is_system_internal:
39366 * @mount_entry: a #GUnixMount.
39368 * Checks if a unix mount is a system path.
39370 * Returns: %TRUE if the unix mount is for a system path.
39375 * g_unix_mount_monitor_new:
39377 * Gets a new #GUnixMountMonitor. The default rate limit for which the
39378 * monitor will report consecutive changes for the mount and mount
39379 * point entry files is the default for a #GFileMonitor. Use
39380 * g_unix_mount_monitor_set_rate_limit() to change this.
39382 * Returns: a #GUnixMountMonitor.
39387 * g_unix_mount_monitor_set_rate_limit:
39388 * @mount_monitor: a #GUnixMountMonitor
39389 * @limit_msec: a integer with the limit in milliseconds to poll for changes.
39391 * Sets the rate limit to which the @mount_monitor will report
39392 * consecutive change events to the mount and mount point entry files.
39399 * g_unix_mount_point_compare:
39400 * @mount1: a #GUnixMount.
39401 * @mount2: a #GUnixMount.
39403 * Compares two unix mount points.
39405 * or less than @mount2, respectively.
39407 * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
39412 * g_unix_mount_point_free:
39413 * @mount_point: unix mount point to free.
39415 * Frees a unix mount point.
39420 * g_unix_mount_point_get_device_path:
39421 * @mount_point: a #GUnixMountPoint.
39423 * Gets the device path for a unix mount point.
39425 * Returns: a string containing the device path.
39430 * g_unix_mount_point_get_fs_type:
39431 * @mount_point: a #GUnixMountPoint.
39433 * Gets the file system type for the mount point.
39435 * Returns: a string containing the file system type.
39440 * g_unix_mount_point_get_mount_path:
39441 * @mount_point: a #GUnixMountPoint.
39443 * Gets the mount path for a unix mount point.
39445 * Returns: a string containing the mount path.
39450 * g_unix_mount_point_get_options:
39451 * @mount_point: a #GUnixMountPoint.
39453 * Gets the options for the mount point.
39455 * Returns: a string containing the options.
39461 * g_unix_mount_point_guess_can_eject:
39462 * @mount_point: a #GUnixMountPoint
39464 * Guesses whether a Unix mount point can be ejected.
39466 * Returns: %TRUE if @mount_point is deemed to be ejectable.
39471 * g_unix_mount_point_guess_icon:
39472 * @mount_point: a #GUnixMountPoint
39474 * Guesses the icon of a Unix mount point.
39476 * Returns: (transfer full): a #GIcon
39481 * g_unix_mount_point_guess_name:
39482 * @mount_point: a #GUnixMountPoint
39484 * Guesses the name of a Unix mount point.
39485 * The result is a translated string.
39487 * be freed with g_free()
39489 * Returns: A newly allocated string that must
39494 * g_unix_mount_point_is_loopback:
39495 * @mount_point: a #GUnixMountPoint.
39497 * Checks if a unix mount point is a loopback device.
39499 * Returns: %TRUE if the mount point is a loopback. %FALSE otherwise.
39504 * g_unix_mount_point_is_readonly:
39505 * @mount_point: a #GUnixMountPoint.
39507 * Checks if a unix mount point is read only.
39509 * Returns: %TRUE if a mount point is read only.
39514 * g_unix_mount_point_is_user_mountable:
39515 * @mount_point: a #GUnixMountPoint.
39517 * Checks if a unix mount point is mountable by the user.
39519 * Returns: %TRUE if the mount point is user mountable.
39524 * g_unix_mount_points_changed_since:
39525 * @time: guint64 to contain a timestamp.
39527 * Checks if the unix mount points have changed since a given unix time.
39529 * Returns: %TRUE if the mount points have changed since @time.
39534 * g_unix_mount_points_get: (skip)
39535 * @time_read: (out) (allow-none): guint64 to contain a timestamp.
39537 * Gets a #GList of #GUnixMountPoint containing the unix mount points.
39538 * If @time_read is set, it will be filled with the mount timestamp,
39539 * allowing for checking if the mounts have changed with
39540 * g_unix_mount_points_changed_since().
39542 * a #GList of the UNIX mountpoints.
39544 * Returns: (element-type GUnixMountPoint) (transfer full):
39549 * g_unix_mounts_changed_since:
39550 * @time: guint64 to contain a timestamp.
39552 * Checks if the unix mounts have changed since a given unix time.
39554 * Returns: %TRUE if the mounts have changed since @time.
39559 * g_unix_mounts_get: (skip)
39560 * @time_read: (out) (allow-none): guint64 to contain a timestamp, or %NULL
39562 * Gets a #GList of #GUnixMountEntry containing the unix mounts.
39563 * If @time_read is set, it will be filled with the mount
39564 * timestamp, allowing for checking if the mounts have changed
39565 * with g_unix_mounts_changed_since().
39567 * a #GList of the UNIX mounts.
39569 * Returns: (element-type GUnixMountEntry) (transfer full):
39574 * g_unix_output_stream_get_close_fd:
39575 * @stream: a #GUnixOutputStream
39577 * Returns whether the file descriptor of @stream will be
39578 * closed when the stream is closed.
39580 * Returns: %TRUE if the file descriptor is closed when done
39586 * g_unix_output_stream_get_fd:
39587 * @stream: a #GUnixOutputStream
39589 * Return the UNIX file descriptor that the stream writes to.
39591 * Returns: The file descriptor of @stream
39597 * g_unix_output_stream_new:
39598 * @fd: a UNIX file descriptor
39599 * @close_fd: %TRUE to close the file descriptor when done
39601 * Creates a new #GUnixOutputStream for the given @fd.
39603 * If @close_fd, is %TRUE, the file descriptor will be closed when
39604 * the output stream is destroyed.
39606 * Returns: a new #GOutputStream
39611 * g_unix_output_stream_set_close_fd:
39612 * @stream: a #GUnixOutputStream
39613 * @close_fd: %TRUE to close the file descriptor when done
39615 * Sets whether the file descriptor of @stream shall be closed
39616 * when the stream is closed.
39623 * g_unix_socket_address_abstract_names_supported:
39625 * Checks if abstract unix domain socket names are supported.
39627 * Returns: %TRUE if supported, %FALSE otherwise
39633 * g_unix_socket_address_get_address_type:
39634 * @address: a #GInetSocketAddress
39636 * Gets @address's type.
39638 * Returns: a #GUnixSocketAddressType
39644 * g_unix_socket_address_get_is_abstract:
39645 * @address: a #GInetSocketAddress
39647 * Tests if @address is abstract.
39649 * Returns: %TRUE if the address is abstract, %FALSE otherwise
39651 * Deprecated: Use g_unix_socket_address_get_address_type()
39656 * g_unix_socket_address_get_path:
39657 * @address: a #GInetSocketAddress
39659 * Gets @address's path, or for abstract sockets the "name".
39661 * Guaranteed to be zero-terminated, but an abstract socket
39662 * may contain embedded zeros, and thus you should use
39663 * g_unix_socket_address_get_path_len() to get the true length
39666 * Returns: the path for @address
39672 * g_unix_socket_address_get_path_len:
39673 * @address: a #GInetSocketAddress
39675 * Gets the length of @address's path.
39677 * For details, see g_unix_socket_address_get_path().
39679 * Returns: the length of the path
39685 * g_unix_socket_address_new:
39686 * @path: the socket path
39688 * Creates a new #GUnixSocketAddress for @path.
39690 * To create abstract socket addresses, on systems that support that,
39691 * use g_unix_socket_address_new_abstract().
39693 * Returns: a new #GUnixSocketAddress
39699 * g_unix_socket_address_new_abstract:
39700 * @path: (array length=path_len) (element-type gchar): the abstract name
39701 * @path_len: the length of @path, or -1
39703 * Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
39704 * #GUnixSocketAddress for @path.
39706 * Returns: a new #GUnixSocketAddress
39707 * Deprecated: Use g_unix_socket_address_new_with_type().
39712 * g_unix_socket_address_new_with_type:
39713 * @path: (array length=path_len) (element-type gchar): the name
39714 * @path_len: the length of @path, or -1
39715 * @type: a #GUnixSocketAddressType
39717 * Creates a new #GUnixSocketAddress of type @type with name @path.
39719 * If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to
39720 * calling g_unix_socket_address_new().
39722 * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len
39723 * bytes of @path will be copied to the socket's path, and only those
39724 * bytes will be considered part of the name. (If @path_len is -1,
39725 * then @path is assumed to be NUL-terminated.) For example, if @path
39726 * was "test", then calling g_socket_address_get_native_size() on the
39727 * returned socket would return 7 (2 bytes of overhead, 1 byte for the
39728 * abstract-socket indicator byte, and 4 bytes for the name "test").
39730 * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then
39731 * @path_len bytes of @path will be copied to the socket's path, the
39732 * rest of the path will be padded with 0 bytes, and the entire
39733 * zero-padded buffer will be considered the name. (As above, if
39734 * @path_len is -1, then @path is assumed to be NUL-terminated.) In
39735 * this case, g_socket_address_get_native_size() will always return
39736 * the full size of a <literal>struct sockaddr_un</literal>, although
39737 * g_unix_socket_address_get_path_len() will still return just the
39740 * %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over
39741 * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course,
39742 * when connecting to a server created by another process, you must
39743 * use the appropriate type corresponding to how that process created
39744 * its listening socket.
39746 * Returns: a new #GUnixSocketAddress
39752 * g_utf8_next_char:
39753 * @p: Pointer to the start of a valid UTF-8 character
39755 * Skips to the next character in a UTF-8 string. The string must be
39756 * valid; this macro is as fast as possible, and has no error-checking.
39757 * You would use this macro to iterate over a string character by
39758 * character. The macro returns the start of the next UTF-8 character.
39759 * Before using this macro, use g_utf8_validate() to validate strings
39760 * that may contain invalid UTF-8.
39765 * g_vfs_get_default:
39767 * Gets the default #GVfs for the system.
39769 * Returns: (transfer none): a #GVfs.
39774 * g_vfs_get_file_for_path:
39776 * @path: a string containing a VFS path.
39778 * Gets a #GFile for @path.
39780 * Free the returned object with g_object_unref().
39782 * Returns: (transfer full): a #GFile.
39787 * g_vfs_get_file_for_uri:
39789 * @uri: a string containing a URI
39791 * Gets a #GFile for @uri.
39793 * This operation never fails, but the returned object
39794 * might not support any I/O operation if the URI
39795 * is malformed or if the URI scheme is not supported.
39797 * Free the returned object with g_object_unref().
39799 * Returns: (transfer full): a #GFile.
39806 * Gets the local #GVfs for the system.
39808 * Returns: (transfer none): a #GVfs.
39813 * g_vfs_get_supported_uri_schemes:
39816 * Gets a list of URI schemes supported by @vfs.
39818 * The returned array belongs to GIO and must
39819 * not be freed or modified.
39821 * Returns: (transfer none): a %NULL-terminated array of strings.
39829 * Checks if the VFS is active.
39831 * Returns: %TRUE if construction of the @vfs was successful and it is now active.
39836 * g_vfs_parse_name:
39838 * @parse_name: a string to be parsed by the VFS module.
39840 * This operation never fails, but the returned object might
39841 * not support any I/O operations if the @parse_name cannot
39842 * be parsed by the #GVfs module.
39844 * Free the returned object with g_object_unref().
39846 * Returns: (transfer full): a #GFile for the given @parse_name.
39851 * g_volume_can_eject:
39852 * @volume: a #GVolume.
39854 * Checks if a volume can be ejected.
39856 * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise.
39861 * g_volume_can_mount:
39862 * @volume: a #GVolume.
39864 * Checks if a volume can be mounted.
39866 * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise.
39872 * @volume: a #GVolume.
39873 * @flags: flags affecting the unmount if required for eject
39874 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
39875 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
39876 * @user_data: user data that gets passed to @callback
39878 * Ejects a volume. This is an asynchronous operation, and is
39879 * finished by calling g_volume_eject_finish() with the @volume
39880 * and #GAsyncResult returned in the @callback.
39882 * Deprecated: 2.22: Use g_volume_eject_with_operation() instead.
39887 * g_volume_eject_finish:
39888 * @volume: pointer to a #GVolume.
39889 * @result: a #GAsyncResult.
39890 * @error: a #GError location to store an error, or %NULL to ignore
39892 * Finishes ejecting a volume. If any errors occurred during the operation,
39893 * @error will be set to contain the errors and %FALSE will be returned.
39895 * Returns: %TRUE, %FALSE if operation failed.
39896 * Deprecated: 2.22: Use g_volume_eject_with_operation_finish() instead.
39901 * g_volume_eject_with_operation:
39902 * @volume: a #GVolume.
39903 * @flags: flags affecting the unmount if required for eject
39904 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
39905 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
39906 * @callback: a #GAsyncReadyCallback, or %NULL.
39907 * @user_data: user data passed to @callback.
39909 * Ejects a volume. This is an asynchronous operation, and is
39910 * finished by calling g_volume_eject_with_operation_finish() with the @volume
39911 * and #GAsyncResult data returned in the @callback.
39918 * g_volume_eject_with_operation_finish:
39919 * @volume: a #GVolume.
39920 * @result: a #GAsyncResult.
39921 * @error: a #GError location to store the error occurring, or %NULL to ignore.
39923 * Finishes ejecting a volume. If any errors occurred during the operation,
39924 * @error will be set to contain the errors and %FALSE will be returned.
39926 * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise.
39932 * g_volume_enumerate_identifiers:
39933 * @volume: a #GVolume
39935 * Gets the kinds of <link linkend="volume-identifier">identifiers</link>
39936 * that @volume has. Use g_volume_get_identifer() to obtain
39937 * the identifiers themselves.
39939 * of strings containing kinds of identifiers. Use g_strfreev() to free.
39941 * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated array
39946 * g_volume_get_activation_root:
39947 * @volume: a #GVolume
39949 * Gets the activation root for a #GVolume if it is known ahead of
39950 * mount time. Returns %NULL otherwise. If not %NULL and if @volume
39951 * is mounted, then the result of g_mount_get_root() on the
39952 * #GMount object obtained from g_volume_get_mount() will always
39953 * either be equal or a prefix of what this function returns. In
39954 * other words, in code
39958 * GFile *mount_root
39959 * GFile *volume_activation_root;
39961 * mount = g_volume_get_mount (volume); /* mounted, so never NULL */
39962 * mount_root = g_mount_get_root (mount);
39963 * volume_activation_root = g_volume_get_activation_root(volume); /* assume not NULL */
39964 * </programlisting>
39966 * then the expression
39969 * (g_file_has_prefix (volume_activation_root, mount_root) ||
39970 * </programlisting>
39972 * will always be %TRUE.
39974 * Activation roots are typically used in #GVolumeMonitor
39975 * implementations to find the underlying mount to shadow, see
39976 * g_mount_is_shadowed() for more details.
39978 * g_object_unref() to free.
39980 * Returns: (transfer full): the activation root of @volume or %NULL. Use
39986 * g_volume_get_drive:
39987 * @volume: a #GVolume.
39989 * Gets the drive for the @volume.
39991 * The returned object should be unreffed with g_object_unref()
39992 * when no longer needed.
39994 * Returns: (transfer full): a #GDrive or %NULL if @volume is not associated with a drive.
39999 * g_volume_get_icon:
40000 * @volume: a #GVolume.
40002 * Gets the icon for @volume.
40004 * The returned object should be unreffed with g_object_unref()
40005 * when no longer needed.
40007 * Returns: (transfer full): a #GIcon.
40012 * g_volume_get_identifier:
40013 * @volume: a #GVolume
40014 * @kind: the kind of identifier to return
40016 * Gets the identifier of the given kind for @volume.
40017 * See the <link linkend="volume-identifier">introduction</link>
40018 * for more information about volume identifiers.
40020 * requested identfier, or %NULL if the #GVolume
40021 * doesn't have this kind of identifier
40023 * Returns: a newly allocated string containing the
40028 * g_volume_get_mount:
40029 * @volume: a #GVolume.
40031 * Gets the mount for the @volume.
40033 * The returned object should be unreffed with g_object_unref()
40034 * when no longer needed.
40036 * Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted.
40041 * g_volume_get_name:
40042 * @volume: a #GVolume.
40044 * Gets the name of @volume.
40046 * be freed with g_free() when no longer needed.
40048 * Returns: the name for the given @volume. The returned string should
40053 * g_volume_get_sort_key:
40054 * @volume: A #GVolume.
40056 * Gets the sort key for @volume, if any.
40058 * Returns: Sorting key for @volume or %NULL if no such key is available.
40064 * g_volume_get_uuid:
40065 * @volume: a #GVolume.
40067 * Gets the UUID for the @volume. The reference is typically based on
40068 * the file system UUID for the volume in question and should be
40069 * considered an opaque string. Returns %NULL if there is no UUID
40072 * The returned string should be freed with g_free()
40073 * when no longer needed.
40075 * Returns: the UUID for @volume or %NULL if no UUID can be computed.
40080 * g_volume_monitor_adopt_orphan_mount:
40081 * @mount: a #GMount object to find a parent for
40083 * This function should be called by any #GVolumeMonitor
40084 * implementation when a new #GMount object is created that is not
40085 * associated with a #GVolume object. It must be called just before
40086 * emitting the @mount_added signal.
40088 * If the return value is not %NULL, the caller must associate the
40089 * returned #GVolume object with the #GMount. This involves returning
40090 * it in its g_mount_get_volume() implementation. The caller must
40091 * also listen for the "removed" signal on the returned object
40092 * and give up its reference when handling that signal
40094 * Similary, if implementing g_volume_monitor_adopt_orphan_mount(),
40095 * the implementor must take a reference to @mount and return it in
40096 * its g_volume_get_mount() implemented. Also, the implementor must
40097 * listen for the "unmounted" signal on @mount and give up its
40098 * reference upon handling that signal.
40100 * There are two main use cases for this function.
40102 * One is when implementing a user space file system driver that reads
40103 * blocks of a block device that is already represented by the native
40104 * volume monitor (for example a CD Audio file system driver). Such
40105 * a driver will generate its own #GMount object that needs to be
40106 * associated with the #GVolume object that represents the volume.
40108 * The other is for implementing a #GVolumeMonitor whose sole purpose
40109 * is to return #GVolume objects representing entries in the users
40110 * "favorite servers" list or similar.
40112 * if no wants to adopt the #GMount.
40114 * implementations should instead create shadow mounts with the URI of
40115 * the mount they intend to adopt. See the proxy volume monitor in
40116 * gvfs for an example of this. Also see g_mount_is_shadowed(),
40117 * g_mount_shadow() and g_mount_unshadow() functions.
40119 * Returns: (transfer full): the #GVolume object that is the parent for @mount or %NULL
40120 * Deprecated: 2.20: Instead of using this function, #GVolumeMonitor
40125 * g_volume_monitor_get:
40127 * Gets the volume monitor used by gio.
40129 * g_object_unref() when done with it.
40131 * Returns: (transfer full): a reference to the #GVolumeMonitor used by gio. Call
40136 * g_volume_monitor_get_connected_drives:
40137 * @volume_monitor: a #GVolumeMonitor.
40139 * Gets a list of drives connected to the system.
40141 * The returned list should be freed with g_list_free(), after
40142 * its elements have been unreffed with g_object_unref().
40144 * Returns: (element-type GDrive) (transfer full): a #GList of connected #GDrive objects.
40149 * g_volume_monitor_get_mount_for_uuid:
40150 * @volume_monitor: a #GVolumeMonitor.
40151 * @uuid: the UUID to look for
40153 * Finds a #GMount object by its UUID (see g_mount_get_uuid())
40155 * Free the returned object with g_object_unref().
40157 * Returns: (transfer full): a #GMount or %NULL if no such mount is available.
40162 * g_volume_monitor_get_mounts:
40163 * @volume_monitor: a #GVolumeMonitor.
40165 * Gets a list of the mounts on the system.
40167 * The returned list should be freed with g_list_free(), after
40168 * its elements have been unreffed with g_object_unref().
40170 * Returns: (element-type GMount) (transfer full): a #GList of #GMount objects.
40175 * g_volume_monitor_get_volume_for_uuid:
40176 * @volume_monitor: a #GVolumeMonitor.
40177 * @uuid: the UUID to look for
40179 * Finds a #GVolume object by its UUID (see g_volume_get_uuid())
40181 * Free the returned object with g_object_unref().
40183 * Returns: (transfer full): a #GVolume or %NULL if no such volume is available.
40188 * g_volume_monitor_get_volumes:
40189 * @volume_monitor: a #GVolumeMonitor.
40191 * Gets a list of the volumes on the system.
40193 * The returned list should be freed with g_list_free(), after
40194 * its elements have been unreffed with g_object_unref().
40196 * Returns: (element-type GVolume) (transfer full): a #GList of #GVolume objects.
40202 * @volume: a #GVolume.
40203 * @flags: flags affecting the operation
40204 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
40205 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
40206 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
40207 * @user_data: user data that gets passed to @callback
40209 * Mounts a volume. This is an asynchronous operation, and is
40210 * finished by calling g_volume_mount_finish() with the @volume
40211 * and #GAsyncResult returned in the @callback.
40213 * Virtual: mount_fn
40218 * g_volume_mount_finish:
40219 * @volume: a #GVolume
40220 * @result: a #GAsyncResult
40221 * @error: a #GError location to store an error, or %NULL to ignore
40223 * Finishes mounting a volume. If any errors occurred during the operation,
40224 * @error will be set to contain the errors and %FALSE will be returned.
40226 * If the mount operation succeeded, g_volume_get_mount() on @volume
40227 * is guaranteed to return the mount right after calling this
40228 * function; there's no need to listen for the 'mount-added' signal on
40231 * Returns: %TRUE, %FALSE if operation failed.
40236 * g_volume_should_automount:
40237 * @volume: a #GVolume
40239 * Returns whether the volume should be automatically mounted.
40241 * Returns: %TRUE if the volume should be automatically mounted.
40247 * @expr: the expression to check
40249 * Logs a warning if the expression is not true.
40256 * g_warn_if_reached:
40258 * Logs a critical warning.
40265 * g_win32_input_stream_get_close_handle:
40266 * @stream: a #GWin32InputStream
40268 * Returns whether the handle of @stream will be
40269 * closed when the stream is closed.
40271 * Returns: %TRUE if the handle is closed when done
40277 * g_win32_input_stream_get_handle:
40278 * @stream: a #GWin32InputStream
40280 * Return the Windows file handle that the stream reads from.
40282 * Returns: The file handle of @stream
40288 * g_win32_input_stream_new:
40289 * @handle: a Win32 file handle
40290 * @close_fd: %TRUE to close the handle when done
40292 * Creates a new #GWin32InputStream for the given @fd.
40294 * If @close_handle is %TRUE, the handle will be closed
40295 * when the stream is closed.
40297 * Note that "handle" here means a Win32 HANDLE, not a "file descriptor"
40298 * as used in the Windows C libraries.
40300 * Returns: a new #GWin32InputStream
40305 * g_win32_input_stream_set_close_handle:
40306 * @stream: a #GWin32InputStream
40307 * @close_handle: %TRUE to close the handle when done
40309 * Sets whether the handle of @stream shall be closed
40310 * when the stream is closed.
40317 * g_win32_output_stream_get_close_handle:
40318 * @stream: a #GWin32OutputStream
40320 * Returns whether the handle of @stream will be closed when the
40321 * stream is closed.
40323 * Returns: %TRUE if the handle is closed when done
40329 * g_win32_output_stream_get_handle:
40330 * @stream: a #GWin32OutputStream
40332 * Return the Windows handle that the stream writes to.
40334 * Returns: The handle descriptor of @stream
40340 * g_win32_output_stream_new:
40341 * @handle: a Win32 file handle
40342 * @close_handle: %TRUE to close the handle when done
40344 * Creates a new #GWin32OutputStream for the given @handle.
40346 * If @close_handle, is %TRUE, the handle will be closed when the
40347 * output stream is destroyed.
40349 * Returns: a new #GOutputStream
40355 * g_win32_output_stream_set_close_handle:
40356 * @stream: a #GWin32OutputStream
40357 * @close_handle: %TRUE to close the handle when done
40359 * Sets whether the handle of @stream shall be closed when the stream
40367 * g_zlib_compressor_get_file_info:
40368 * @compressor: a #GZlibCompressor
40370 * Returns the #GZlibCompressor:file-info property.
40372 * Returns: (transfer none): a #GFileInfo, or %NULL
40378 * g_zlib_compressor_new:
40379 * @format: The format to use for the compressed data
40380 * @level: compression level (0-9), -1 for default
40382 * Creates a new #GZlibCompressor.
40384 * Returns: a new #GZlibCompressor
40390 * g_zlib_compressor_set_file_info:
40391 * @compressor: a #GZlibCompressor
40392 * @file_info: (allow-none): a #GFileInfo
40394 * Sets @file_info in @compressor. If non-%NULL, and @compressor's
40395 * #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
40396 * it will be used to set the file name and modification time in
40397 * the GZIP header of the compressed data.
40399 * Note: it is an error to call this function while a compression is in
40400 * progress; it may only be called immediately after creation of @compressor,
40401 * or after resetting it with g_converter_reset().
40408 * g_zlib_decompressor_get_file_info:
40409 * @decompressor: a #GZlibDecompressor
40411 * Retrieves the #GFileInfo constructed from the GZIP header data
40412 * of compressed data processed by @compressor, or %NULL if @decompressor's
40413 * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
40414 * or the header data was not fully processed yet, or it not present in the
40415 * data stream at all.
40417 * Returns: (transfer none): a #GFileInfo, or %NULL
40423 * g_zlib_decompressor_new:
40424 * @format: The format to use for the compressed data
40426 * Creates a new #GZlibDecompressor.
40428 * Returns: a new #GZlibDecompressor
40436 * A C representable type name for #G_TYPE_STRING.
40441 * get_all_desktop_entries_for_mime_type:
40442 * @mime_type: a mime type.
40443 * @except: NULL or a strv list
40445 * Returns all the desktop ids for @mime_type. The desktop files
40446 * are listed in an order so that default applications are listed before
40447 * non-default ones, and handlers for inherited mimetypes are listed
40448 * after the base ones.
40450 * Optionally doesn't list the desktop ids given in the @except
40452 * to handle @mime_type.
40454 * Returns: a #GList containing the desktop ids which claim
40461 * A type which can hold any UTF-32 or UCS-4 character code,
40462 * also known as a Unicode code point.
40464 * If you want to produce the UTF-8 representation of a #gunichar,
40465 * use g_ucs4_to_utf8(). See also g_utf8_to_ucs4() for the reverse
40468 * To print/scan values of this type as integer, use
40469 * %G_GINT32_MODIFIER and/or %G_GUINT32_FORMAT.
40471 * The notation to express a Unicode code point in running text is
40472 * as a hexadecimal number with four to six digits and uppercase
40473 * letters, prefixed by the string "U+". Leading zeros are omitted,
40474 * unless the code point would have fewer than four hexadecimal digits.
40475 * For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point
40476 * in the U+-notation, use the format string "U+\%04"G_GINT32_FORMAT"X".
40477 * To scan, use the format string "U+\%06"G_GINT32_FORMAT"X".
40481 * sscanf ("U+0041", "U+%06"G_GINT32_FORMAT"X", &c)
40482 * g_print ("Read U+%04"G_GINT32_FORMAT"X", c);
40490 * A type which can hold any UTF-16 code
40491 * point<footnote id="utf16_surrogate_pairs">UTF-16 also has so called
40492 * <firstterm>surrogate pairs</firstterm> to encode characters beyond
40493 * the BMP as pairs of 16bit numbers. Surrogate pairs cannot be stored
40494 * in a single gunichar2 field, but all GLib functions accepting gunichar2
40495 * arrays will correctly interpret surrogate pairs.</footnote>.
40497 * To print/scan values of this type to/from text you need to convert
40498 * to/from UTF-8, using g_utf16_to_utf8()/g_utf8_to_utf16().
40500 * To print/scan values of this type as integer, use
40501 * %G_GINT16_MODIFIER and/or %G_GUINT16_FORMAT.
40506 * mime_info_cache_reload:
40507 * @dir: directory path which needs reloading.
40509 * Reload the mime information for the @dir.
40514 /************************************************************/
40515 /* THIS FILE IS GENERATED DO NOT EDIT */
40516 /************************************************************/