1 /************************************************************/
2 /* THIS FILE IS GENERATED DO NOT EDIT */
3 /************************************************************/
8 * If @action is currently enabled.
9 * If the action is disabled then calls to g_action_activate() and
10 * g_action_set_state() have no effect.
19 * The name of the action. This is mostly meaningful for identifying
20 * the action once it has been added to a #GActionGroup.
27 * GAction:parameter-type:
29 * The type of the parameter that must be given when activating the
39 * The state of the action, or %NULL if the action is stateless.
48 * The #GVariantType of the state that the action has, or %NULL if the
49 * action is stateless.
56 * GActionGroup::action-added:
57 * @action_group: the #GActionGroup that changed
58 * @action_name: the name of the action in @action_group
60 * Signals that a new action was just added to the group. This signal
61 * is emitted after the action has been added and is now visible.
68 * GActionGroup::action-enabled-changed:
69 * @action_group: the #GActionGroup that changed
70 * @action_name: the name of the action in @action_group
71 * @enabled: whether the action is enabled or not
73 * Signals that the enabled status of the named action has changed.
80 * GActionGroup::action-removed:
81 * @action_group: the #GActionGroup that changed
82 * @action_name: the name of the action in @action_group
84 * Signals that an action is just about to be removed from the group.
85 * This signal is emitted before the action is removed, so the action
86 * is still visible and can be queried from the signal handler.
93 * GActionGroup::action-state-changed:
94 * @action_group: the #GActionGroup that changed
95 * @action_name: the name of the action in @action_group
96 * @value: the new value of the state
98 * Signals that the state of the named action has changed.
105 * GActionGroupInterface:
106 * @has_action: the virtual function pointer for g_action_group_has_action()
107 * @list_actions: the virtual function pointer for g_action_group_list_actions()
108 * @get_parameter_type: the virtual function pointer for g_action_group_get_parameter_type()
109 * @get_state_type: the virtual function pointer for g_action_group_get_state_type()
110 * @get_state_hint: the virtual function pointer for g_action_group_get_state_hint()
111 * @get_enabled: the virtual function pointer for g_action_group_get_enabled()
112 * @get_state: the virtual function pointer for g_action_group_get_state()
113 * @set_state: the virtual function pointer for g_action_group_set_state()
114 * @activate: the virtual function pointer for g_action_group_activate()
115 * @action_added: the class closure for the action-added signal
116 * @action_removed: the class closure for the action-removed signal
117 * @action_enabled_changed: the class closure for the action-enabled-changed signal
118 * @action_state_changed: the class closure for the action-enabled-changed signal
120 * The virtual function table for #GActionGroup.
128 * @get_name: the virtual function pointer for g_action_get_name()
129 * @get_parameter_type: the virtual function pointer for g_action_get_parameter_type()
130 * @get_state_type: the virtual function pointer for g_action_get_state_type()
131 * @get_state_hint: the virtual function pointer for g_action_get_state_hint()
132 * @get_enabled: the virtual function pointer for g_action_get_enabled()
133 * @get_state: the virtual function pointer for g_action_get_state()
134 * @set_state: the virtual function pointer for g_action_set_state()
135 * @activate: the virtual function pointer for g_action_activate(). Note that #GAction does not have an 'activate' signal but that implementations of it may have one.
146 * Information about an installed application and methods to launch
147 * it (with file arguments).
152 * GAppInfoCreateFlags:
153 * @G_APP_INFO_CREATE_NONE: No flags.
154 * @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window.
155 * @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments.
156 * @G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION: Application supports startup notification. Since 2.26
158 * Flags used when creating a #GAppInfo.
164 * @g_iface: The parent interface.
165 * @dup: Copies a #GAppInfo.
166 * @equal: Checks two #GAppInfo<!-- -->s for equality.
167 * @get_id: Gets a string identifier for a #GAppInfo.
168 * @get_name: Gets the name of the application for a #GAppInfo.
169 * @get_description: Gets a short description for the application described by the #GAppInfo.
170 * @get_executable: Gets the executable name for the #GAppInfo.
171 * @get_icon: Gets the #GIcon for the #GAppInfo.
172 * @launch: Launches an application specified by the #GAppInfo.
173 * @supports_uris: Indicates whether the application specified supports launching URIs.
174 * @supports_files: Indicates whether the application specified accepts filename arguments.
175 * @launch_uris: Launches an application with a list of URIs.
176 * @should_show: Returns whether an application should be shown (e.g. when getting a list of installed applications). <ulink url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt"> <citetitle>FreeDesktop.Org Startup Notification Specification</citetitle></ulink>.
177 * @set_as_default_for_type: Sets an application as default for a given content type.
178 * @set_as_default_for_extension: Sets an application as default for a given file extension.
179 * @add_supports_type: Adds to the #GAppInfo information about supported file types.
180 * @can_remove_supports_type: Checks for support for removing supported file types from a #GAppInfo.
181 * @remove_supports_type: Removes a supported application type from a #GAppInfo.
182 * @can_delete: Checks if a #GAppInfo can be deleted. Since 2.20
183 * @do_delete: Deletes a #GAppInfo. Since 2.20
184 * @get_commandline: Gets the commandline for the #GAppInfo. Since 2.20
185 * @get_display_name: Gets the display name for the #GAppInfo. Since 2.24
187 * Application Information interface, for operating system portability.
194 * Integrating the launch with the launching application. This is used to
195 * handle for instance startup notification and launching the new application
196 * on the same screen as the launching window.
203 * The <structname>GApplication</structname> structure contains private
204 * data and should only be accessed using the provided API
211 * GApplication::activate:
212 * @application: the application
214 * The ::activate signal is emitted on the primary instance when an
215 * activation occurs. See g_application_activate().
220 * GApplication::command-line:
221 * @application: the application
222 * @command_line: a #GApplicationCommandLine representing the passed commandline
224 * The ::command-line signal is emitted on the primary instance when
225 * a commandline is not handled locally. See g_application_run() and
226 * the #GApplicationCommandline documentation for more information.
227 * process. See g_application_command_line_set_exit_status().
229 * Returns: An integer that is set as the exit status for the calling
234 * GApplication::open:
235 * @application: the application
236 * @files: (array length=n_files) (element-type GFile): an array of #GFiles
237 * @n_files: the length of @files
238 * @hint: a hint provided by the calling instance
240 * The ::open signal is emitted on the primary instance when there are
241 * files to open. See g_application_open() for more information.
246 * GApplication::startup:
247 * @application: the application
249 * The ::startup signal is emitted on the primary instance immediately
250 * after registration. See g_application_register().
256 * @startup: invoked on the primary instance immediately after registration
257 * @activate: invoked on the primary instance when an activation occurs
258 * @open: invoked on the primary instance when there are files to open
259 * @command_line: invoked on the primary instance when a command-line is not handled locally
260 * @local_command_line: invoked (locally) when the process has been invoked via commandline execution. The virtual function has the chance to inspect (and possibly replace) the list of command line arguments. See g_application_run() for more information.
261 * @before_emit: invoked on the primary instance before 'activate', 'open', 'command-line' or any action invocation, gets the 'platform data' from the calling instance
262 * @after_emit: invoked on the primary instance after 'activate', 'open', 'command-line' or any action invocation, gets the 'platform data' from the calling instance
263 * @add_platform_data: invoked (locally) to add 'platform data' to be sent to the primary instance when activating, opening or invoking actions
264 * @quit_mainloop: invoked on the primary instance when the use count of the application drops to zero (and after any inactivity timeout, if requested)
265 * @run_mainloop: invoked on the primary instance from g_application_run() if the use-count is non-zero
274 * GApplicationCommandLine:
276 * The <structname>GApplicationCommandLine</structname> structure contains private
277 * data and should only be accessed using the provided API
284 * GApplicationCommandLineClass:
286 * The <structname>GApplicationCommandLineClass</structname> structure contains
295 * @G_APPLICATION_FLAGS_NONE: Default
296 * @G_APPLICATION_IS_SERVICE: Run as a service. In this mode, registration fails if the service is already running, and the application will stay around for a while when the use count falls to zero.
297 * @G_APPLICATION_IS_LAUNCHER: Don't try to become the primary instance.
298 * @G_APPLICATION_HANDLES_OPEN: This application handles opening files (in the primary instance). Note that this flag only affects the default implementation of local_command_line(), and has no effect if %G_APPLICATION_HANDLES_COMMAND_LINE is given. See g_application_run() for details.
299 * @G_APPLICATION_HANDLES_COMMAND_LINE: This application handles command line arguments (in the primary instance). Note that this flag only affect the default implementation of local_command_line(). See g_application_run() for details.
300 * @G_APPLICATION_SEND_ENVIRONMENT: Send the environment of the launching process to the primary instance. Set this flag if your application is expected to behave differently depending on certain environment variables. For instance, an editor might be expected to use the <envar>GIT_COMMITTER_NAME</envar> environment variable when editing a git commit message. The environment is available to the #GApplication::command-line signal handler, via g_application_command_line_getenv().
302 * Flags used to define the behaviour of a #GApplication.
310 * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password.
311 * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username.
312 * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain.
313 * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings.
314 * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users.
316 * #GAskPasswordFlags are used to request specific information from the
317 * user, or to notify the user of their choices in an authentication
325 * Interface for asynchronously initializable objects.
332 * GAsyncInitableIface:
333 * @g_iface: The parent interface.
334 * @init_async: Starts initialization of the object.
335 * @init_finish: Finishes initialization of the object.
337 * Provides an interface for asynchronous initializing object such that
338 * initialization may fail.
345 * GAsyncReadyCallback:
346 * @source_object: the object the asynchronous operation was started with.
347 * @res: a #GAsyncResult.
348 * @user_data: user data passed to the callback.
350 * Type definition for a function that will be called back when an asynchronous
351 * operation within GIO has been completed.
358 * Holds results information for an asynchronous operation,
359 * usually passed directly to a asynchronous _finish() operation.
365 * @g_iface: The parent interface.
366 * @get_user_data: Gets the user data passed to the callback.
367 * @get_source_object: Gets the source object that issued the asynchronous operation.
369 * Interface definition for #GAsyncResult.
375 * @g_class: The #GTypeClass structure to finalize.
377 * A callback function used by the type system to finalize those portions
378 * of a derived types class structure that were setup from the corresponding
379 * GBaseInitFunc() function. Class finalization basically works the inverse
380 * way in which class intialization is performed.
381 * See GClassInitFunc() for a discussion of the class intialization process.
387 * @g_class: The #GTypeClass structure to initialize.
389 * A callback function used by the type system to do base initialization
390 * of the class structures of derived types. It is called as part of the
391 * initialization process of all derived classes and should reallocate
392 * or reset all dynamic class members copied over from the parent class.
393 * For example, class members (such as strings) that are not sufficiently
394 * handled by a plain memory copy of the parent class into the derived class
395 * have to be altered. See GClassInitFunc() for a discussion of the class
396 * intialization process.
403 * <structname>GBinding</structname> is an opaque structure whose members
404 * cannot be accessed directly.
412 * @G_BINDING_DEFAULT: The default binding; if the source property changes, the target property is updated with its value.
413 * @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the property of the source or the property of the target changes, the other is updated.
414 * @G_BINDING_SYNC_CREATE: Synchronize the values of the source and target properties when creating the binding; the direction of the synchronization is always from the source to the target.
415 * @G_BINDING_INVERT_BOOLEAN: If the two properties being bound are booleans, setting one to %TRUE will result in the other being set to %FALSE and vice versa. This flag will only work for boolean properties, and cannot be used when passing custom transformation functions to g_object_bind_property_full().
417 * Flags to be passed to g_object_bind_property() or
418 * g_object_bind_property_full().
419 * This enumeration can be extended at later date.
426 * GBindingTransformFunc:
427 * @binding: a #GBinding
428 * @source_value: the value of the source property
429 * @target_value: the value of the target property
430 * @user_data: data passed to the transform function
432 * A function to be called to transform the source property of @source
433 * from @source_value into the target property of @target
434 * using @target_value.
437 * Returns: %TRUE if the transformation was successful, and %FALSE
445 * The <structname>GBookmarkFile</structname> struct contains only
446 * private data and should not be directly accessed.
451 * GBookmarkFileError:
452 * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed
453 * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found
454 * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did not register a bookmark
455 * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found
456 * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed
457 * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in an unknown encoding
458 * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing
459 * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found
461 * Error codes returned by bookmark file parsing.
467 * @boxed: The boxed structure to be copied.
469 * This function is provided by the user and should produce a copy
470 * of the passed in boxed structure.
472 * Returns: The newly created copy of the boxed structure.
478 * @boxed: The boxed structure to be freed.
480 * This function is provided by the user and should free the boxed
486 * GBufferedInputStream:
488 * Implements #GFilterInputStream with a sized input buffer.
493 * GBufferedOutputStream:
495 * An implementation of #GFilterOutputStream with a sized buffer.
500 * GBusAcquiredCallback:
501 * @connection: The #GDBusConnection to a message bus.
502 * @name: The name that is requested to be owned.
503 * @user_data: User data passed to g_bus_own_name().
505 * Invoked when a connection to a message bus has been obtained.
512 * GBusNameAcquiredCallback:
513 * @connection: The #GDBusConnection on which to acquired the name.
514 * @name: The name being owned.
515 * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
517 * Invoked when the name is acquired.
524 * GBusNameAppearedCallback:
525 * @connection: The #GDBusConnection the name is being watched on.
526 * @name: The name being watched.
527 * @name_owner: Unique name of the owner of the name being watched.
528 * @user_data: User data passed to g_bus_watch_name().
530 * Invoked when the name being watched is known to have to have a owner.
537 * GBusNameLostCallback:
538 * @connection: The #GDBusConnection on which to acquire the name or %NULL if the connection was disconnected.
539 * @name: The name being owned.
540 * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
542 * Invoked when the name is lost or @connection has been closed.
549 * GBusNameOwnerFlags:
550 * @G_BUS_NAME_OWNER_FLAGS_NONE: No flags set.
551 * @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the the name.
552 * @G_BUS_NAME_OWNER_FLAGS_REPLACE: If another message bus connection owns the name and have specified #G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection.
554 * Flags used in g_bus_own_name().
561 * GBusNameVanishedCallback:
562 * @connection: The #GDBusConnection the name is being watched on.
563 * @name: The name being watched.
564 * @user_data: User data passed to g_bus_watch_name().
566 * Invoked when the name being watched is known not to have to have a owner.
573 * GBusNameWatcherFlags:
574 * @G_BUS_NAME_WATCHER_FLAGS_NONE: No flags set.
575 * @G_BUS_NAME_WATCHER_FLAGS_AUTO_START: If no-one owns the name when beginning to watch the name, ask the bus to launch an owner for the name.
577 * Flags used in g_bus_watch_name().
585 * @G_BUS_TYPE_STARTER: An alias for the message bus that activated the process, if any.
586 * @G_BUS_TYPE_NONE: Not a message bus.
587 * @G_BUS_TYPE_SYSTEM: The system-wide message bus.
588 * @G_BUS_TYPE_SESSION: The login session message bus.
590 * An enumeration for well-known message buses.
598 * @closure: the #GClosure
599 * @callback: the callback function
601 * A #GCClosure is a specialization of #GClosure for C function callbacks.
608 * The type used for callback functions in structure definitions and function
609 * signatures. This doesn't mean that all callback functions must take no
610 * parameters and return void. The required signature of a callback function
611 * is determined by the context in which is used (e.g. the signal to which it
612 * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback.
619 * Allows actions to be cancelled.
624 * GCancellable::cancelled:
625 * @cancellable: a #GCancellable.
627 * Emitted when the operation has been cancelled.
628 * Can be used by implementations of cancellable operations. If the
629 * operation is cancelled from another thread, the signal will be
630 * emitted in the thread that cancelled the operation, not the
631 * thread that is running the operation.
632 * Note that disconnecting from this signal (or any signal) in a
633 * multi-threaded program is prone to race conditions. For instance
634 * it is possible that a signal handler may be invoked even
635 * <emphasis>after</emphasis> a call to
636 * g_signal_handler_disconnect() for that handler has already
638 * There is also a problem when cancellation happen
639 * right before connecting to the signal. If this happens the
640 * signal will unexpectedly not be emitted, and checking before
641 * connecting to the signal leaves a race condition where this is
643 * In order to make it safe and easy to connect handlers there
644 * g_cancellable_disconnect() which protect against problems
646 * An example of how to us this:
648 * /<!-- -->* Make sure we don't do any unnecessary work if already cancelled *<!-- -->/
649 * if (g_cancellable_set_error_if_cancelled (cancellable))
651 * /<!-- -->* Set up all the data needed to be able to
652 * * handle cancellation of the operation *<!-- -->/
653 * my_data = my_data_new (...);
656 * id = g_cancellable_connect (cancellable,
657 * G_CALLBACK (cancelled_handler)
659 * /<!-- -->* cancellable operation here... *<!-- -->/
660 * g_cancellable_disconnect (cancellable, id);
661 * /<!-- -->* cancelled_handler is never called after this, it
662 * * is now safe to free the data *<!-- -->/
663 * my_data_free (my_data);
665 * Note that the cancelled signal is emitted in the thread that
666 * the user cancelled from, which may be the main thread. So, the
667 * cancellable signal should not do something that can block.
669 * Are two helper functions: g_cancellable_connect() and
674 * GCancellableSourceFunc:
675 * @cancellable: the #GCancellable
676 * @user_data: data passed in by the user.
678 * This is the function type of the callback used for the #GSource
679 * returned by g_cancellable_source_new().
681 * Returns: it should return %FALSE if the source should be removed.
689 * Conversions between character sets.
696 * An opaque structure representing a checksumming operation.
697 * To create a new GChecksum, use g_checksum_new(). To free
698 * a GChecksum, use g_checksum_free().
706 * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
707 * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
708 * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
710 * The hashing algorithm to be used by #GChecksum when performing the
711 * digest of some data.
712 * Note that the #GChecksumType enumeration may be extended at a later
713 * date to include new hashing algorithm types.
721 * @pid: the process id of the child process
722 * @status: Status information about the child process, see waitpid(2) for more information about this field
723 * @data: user data passed to g_child_watch_add()
725 * The type of functions to be called when a child exists.
730 * GClassFinalizeFunc:
731 * @g_class: The #GTypeClass structure to finalize.
732 * @class_data: The @class_data member supplied via the #GTypeInfo structure.
734 * A callback function used by the type system to finalize a class.
735 * This function is rarely needed, as dynamically allocated class resources
736 * should be handled by GBaseInitFunc() and GBaseFinalizeFunc().
737 * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo
738 * structure of a static type is invalid, because classes of static types
739 * will never be finalized (they are artificially kept alive when their
740 * reference count drops to zero).
746 * @g_class: The #GTypeClass structure to initialize.
747 * @class_data: The @class_data member supplied via the #GTypeInfo structure.
749 * A callback function used by the type system to initialize the class
750 * of a specific type. This function should initialize all static class
752 * The initialization process of a class involves:
755 * 1 - Copying common members from the parent class over to the
756 * derived class structure.
759 * 2 - Zero initialization of the remaining members not copied
760 * over from the parent class.
763 * 3 - Invocation of the GBaseInitFunc() initializers of all parent
764 * types and the class' type.
767 * 4 - Invocation of the class' GClassInitFunc() initializer.
770 * Since derived classes are partially initialized through a memory copy
771 * of the parent class, the general rule is that GBaseInitFunc() and
772 * GBaseFinalizeFunc() should take care of necessary reinitialization
773 * and release of those class members that were introduced by the type
774 * that specified these GBaseInitFunc()/GBaseFinalizeFunc().
775 * GClassInitFunc() should only care about initializing static
776 * class members, while dynamic class members (such as allocated strings
777 * or reference counted resources) are better handled by a GBaseInitFunc()
778 * for this type, so proper initialization of the dynamic class members
779 * is performed for class initialization of derived types as well.
780 * An example may help to correspond the intend of the different class
784 * GObjectClass parent_class;
785 * gint static_integer;
786 * gchar *dynamic_string;
789 * type_a_base_class_init (TypeAClass *class)
791 * class->dynamic_string = g_strdup ("some string");
794 * type_a_base_class_finalize (TypeAClass *class)
796 * g_free (class->dynamic_string);
799 * type_a_class_init (TypeAClass *class)
801 * class->static_integer = 42;
804 * TypeAClass parent_class;
805 * gfloat static_float;
806 * GString *dynamic_gstring;
809 * type_b_base_class_init (TypeBClass *class)
811 * class->dynamic_gstring = g_string_new ("some other string");
814 * type_b_base_class_finalize (TypeBClass *class)
816 * g_string_free (class->dynamic_gstring);
819 * type_b_class_init (TypeBClass *class)
821 * class->static_float = 3.14159265358979323846;
824 * Initialization of TypeBClass will first cause initialization of
825 * TypeAClass (derived classes reference their parent classes, see
826 * g_type_class_ref() on this).
827 * Initialization of TypeAClass roughly involves zero-initializing its fields,
828 * then calling its GBaseInitFunc() type_a_base_class_init() to allocate
829 * its dynamic members (dynamic_string), and finally calling its GClassInitFunc()
830 * type_a_class_init() to initialize its static members (static_integer).
831 * The first step in the initialization process of TypeBClass is then
832 * a plain memory copy of the contents of TypeAClass into TypeBClass and
833 * zero-initialization of the remaining fields in TypeBClass.
834 * The dynamic members of TypeAClass within TypeBClass now need
835 * reinitialization which is performed by calling type_a_base_class_init()
836 * with an argument of TypeBClass.
837 * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()
838 * is called to allocate the dynamic members of TypeBClass (dynamic_gstring),
839 * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(),
840 * is called to complete the initialization process with the static members
842 * Corresponding finalization counter parts to the GBaseInitFunc() functions
843 * have to be provided to release allocated resources at class finalization
850 * @in_marshal: Indicates whether the closure is currently being invoked with g_closure_invoke()
851 * @is_invalid: Indicates whether the closure has been invalidated by g_closure_invalidate()
853 * A #GClosure represents a callback supplied by the programmer.
859 * @closure: the #GClosure to which the marshaller belongs
860 * @return_value: a #GValue to store the return value. May be %NULL if the callback of @closure doesn't return a value.
861 * @n_param_values: the length of the @param_values array
862 * @param_values: an array of #GValue<!-- -->s holding the arguments on which to invoke the callback of @closure
863 * @invocation_hint: the invocation hint given as the last argument to g_closure_invoke()
864 * @marshal_data: additional data specified when registering the marshaller, see g_closure_set_marshal() and g_closure_set_meta_marshal()
866 * The type used for marshaller functions.
872 * @data: data specified when registering the notification callback
873 * @closure: the #GClosure on which the notification is emitted
875 * The type used for the various notification callbacks which can be registered
882 * @G_CONNECT_AFTER: whether the handler should be called before or after the default handler of the signal.
883 * @G_CONNECT_SWAPPED: whether the instance and data should be swapped when calling the handler.
885 * The connection flags are used to specify the behaviour of a signal's
892 * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character sets is not supported.
893 * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input.
894 * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason.
895 * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input.
896 * @G_CONVERT_ERROR_BAD_URI: URI is invalid.
897 * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path.
899 * Error codes returned by character set conversion routines.
906 * Seek object for streaming operations.
914 * @G_CONVERTER_NO_FLAGS: No flags.
915 * @G_CONVERTER_INPUT_AT_END: At end of input data
916 * @G_CONVERTER_FLUSH: Flush data
918 * Flags used when calling a g_converter_convert().
926 * @g_iface: The parent interface.
927 * @convert: Converts data.
928 * @reset: Reverts the internal state of the converter to its initial state.
930 * Provides an interface for converting data from one type
931 * to another type. The conversion can be stateful
932 * and may fail at any place.
939 * GConverterInputStream:
941 * An implementation of #GFilterInputStream that allows data
947 * GConverterOutputStream:
949 * An implementation of #GFilterOutputStream that allows data
956 * @G_CONVERTER_ERROR: There was an error during conversion.
957 * @G_CONVERTER_CONVERTED: Some data was consumed or produced
958 * @G_CONVERTER_FINISHED: The conversion is finished
959 * @G_CONVERTER_FLUSHED: Flushing is finished
961 * Results returned from g_converter_convert().
969 * @src: A pointer to the data which should be copied
970 * @data: Additional data
972 * A function of this signature is used to copy the node data
973 * when doing a deep-copy of a tree.
975 * Returns: A pointer to the copy
983 * The #GCredentials structure contains only private data and
984 * should only be accessed using the provided API.
993 * Class structure for #GCredentials.
1001 * @G_CREDENTIALS_TYPE_INVALID: Indicates an invalid native credential type.
1002 * @G_CREDENTIALS_TYPE_LINUX_UCRED: The native credentials type is a <type>struct ucred</type>.
1003 * @G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED: The native credentials type is a <type>struct cmsgcred</type>.
1005 * Enumeration describing different kinds of native credential types.
1012 * GDBusAnnotationInfo:
1013 * @ref_count: The reference count or -1 if statically allocated.
1014 * @key: The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".
1015 * @value: The value of the annotation.
1016 * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1018 * Information about an annotation.
1026 * @ref_count: The reference count or -1 if statically allocated.
1027 * @name: Name of the argument, e.g. @unix_user_id.
1028 * @signature: D-Bus signature of the argument (a single complete type).
1029 * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1031 * Information about an argument for a method or a signal.
1038 * GDBusAuthMechanism:credentials:
1040 * If authenticating as a server, this property contains the
1041 * received credentials, if any.
1042 * If authenticating as a client, the property contains the
1043 * credentials that were sent, if any.
1048 * GDBusAuthObserver:
1050 * The #GDBusAuthObserver structure contains only private data and
1051 * should only be accessed using the provided API.
1058 * GDBusAuthObserver::authorize-authenticated-peer:
1059 * @observer: The #GDBusAuthObserver emitting the signal.
1060 * @stream: A #GIOStream for the #GDBusConnection.
1061 * @credentials: Credentials received from the peer or %NULL.
1063 * Emitted to check if a peer that is successfully authenticated
1066 * Returns: %TRUE if the peer is authorized, %FALSE if not.
1072 * GDBusAuthObserverClass:
1073 * @authorize_authenticated_peer: Signal class handler for the #GDBusAuthObserver::authorize-authenticated-peer signal.
1075 * Class structure for #GDBusAuthObserverClass.
1083 * @G_DBUS_CALL_FLAGS_NONE: No flags set.
1084 * @G_DBUS_CALL_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this method invocation.
1086 * Flags used in g_dbus_connection_call() and similar APIs.
1093 * GDBusCapabilityFlags:
1094 * @G_DBUS_CAPABILITY_FLAGS_NONE: No flags set.
1095 * @G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING: The connection supports exchanging UNIX file descriptors with the remote peer.
1097 * Capabilities negotiated with the remote peer.
1106 * The #GDBusConnection structure contains only private data and
1107 * should only be accessed using the provided API.
1114 * GDBusConnection::closed:
1115 * @connection: The #GDBusConnection emitting the signal.
1116 * @remote_peer_vanished: %TRUE if @connection is closed because the remote peer closed its end of the connection.
1117 * @error: A #GError with more details about the event or %NULL.
1119 * Emitted when the connection is closed.
1120 * The cause of this event can be
1123 * If g_dbus_connection_close() is called. In this case
1124 * </para></listitem>
1126 * If the remote peer closes the connection. In this case
1127 * </para></listitem>
1129 * If the remote peer sends invalid or malformed data. In this
1130 * case @remote_peer_vanished is set to %FALSE and @error
1132 * </para></listitem>
1134 * Upon receiving this signal, you should give up your reference to
1142 * GDBusConnection:address:
1144 * A D-Bus address specifying potential endpoints that can be used
1145 * when establishing the connection.
1152 * GDBusConnection:authentication-observer:
1154 * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
1161 * GDBusConnection:capabilities:
1163 * Flags from the #GDBusCapabilityFlags enumeration
1164 * representing connection features negotiated with the other peer.
1171 * GDBusConnection:closed:
1173 * A boolean specifying whether the connection has been closed.
1180 * GDBusConnection:exit-on-close:
1182 * A boolean specifying whether the process will be terminated (by
1183 * calling <literal>raise(SIGTERM)</literal>) if the connection
1184 * is closed by the remote peer.
1191 * GDBusConnection:flags:
1193 * Flags from the #GDBusConnectionFlags enumeration.
1200 * GDBusConnection:guid:
1202 * The GUID of the peer performing the role of server when
1204 * If you are constructing a #GDBusConnection and pass
1205 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the
1206 * #GDBusConnection:flags property then you MUST also set this
1207 * property to a valid guid.
1208 * If you are constructing a #GDBusConnection and pass
1209 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
1210 * #GDBusConnection:flags property you will be able to read the GUID
1211 * of the other peer here after the connection has been successfully
1219 * GDBusConnection:locked:
1221 * A boolean specifying whether the message is locked.
1228 * GDBusConnection:stream:
1230 * The underlying #GIOStream used for I/O.
1237 * GDBusConnection:unique-name:
1239 * The unique name as assigned by the message bus or %NULL if the
1240 * connection is not open or not a message bus connection.
1247 * GDBusConnectionClass:
1248 * @closed: Signal class handler for the #GDBusConnection::closed signal.
1250 * Class structure for #GDBusConnection.
1257 * GDBusConnectionFlags:
1258 * @G_DBUS_CONNECTION_FLAGS_NONE: No flags set.
1259 * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT: Perform authentication against server.
1260 * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER: Perform authentication against client.
1261 * @G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: When authenticating as a server, allow the anonymous authentication method.
1262 * @G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION: Pass this flag if connecting to a peer that is a message bus. This means that the Hello() method will be invoked as part of the connection setup.
1263 * @G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING: If set, processing of D-Bus messages is delayed until g_dbus_connection_start_message_processing() is called.
1265 * Flags used when creating a new #GDBusConnection.
1274 * A generic error; "something went wrong" - see the error message for
1276 * There was not enough memory to complete an operation.
1277 * The bus doesn't know how to launch a service to supply the bus name
1279 * The bus name you referenced doesn't exist (i.e. no application owns
1281 * No reply to a message expecting one, usually means a timeout occurred.
1282 * Something went wrong reading or writing to a socket, for example.
1283 * A D-Bus bus address was malformed.
1284 * Requested operation isn't supported (like ENOSYS on UNIX).
1285 * Some limited resource is exhausted.
1286 * Security restrictions don't allow doing what you're trying to do.
1287 * Authentication didn't work.
1288 * Unable to connect to server (probably caused by ECONNREFUSED on a
1290 * Certain timeout errors, possibly ETIMEDOUT on a socket. Note that
1291 * %G_DBUS_ERROR_NO_REPLY is used for message reply timeouts. Warning:
1292 * this is confusingly-named given that %G_DBUS_ERROR_TIMED_OUT also
1293 * exists. We can't fix it for compatibility reasons so just be
1295 * No network access (probably ENETUNREACH on a socket).
1296 * Can't bind a socket since its address is in use (i.e. EADDRINUSE).
1297 * The connection is disconnected and you're trying to use it.
1298 * Invalid arguments passed to a method call.
1300 * Existing file and the operation you're using does not silently overwrite.
1301 * Method name you invoked isn't known by the object you invoked it on.
1302 * confusingly-named given that %G_DBUS_ERROR_TIMEOUT also exists. We
1303 * can't fix it for compatibility reasons so just be careful.
1304 * Tried to remove or modify a match rule that didn't exist.
1305 * The match rule isn't syntactically valid.
1306 * While starting a new process, the exec() call failed.
1307 * While starting a new process, the fork() call failed.
1308 * While starting a new process, the child exited with a status code.
1309 * While starting a new process, the child exited on a signal.
1310 * While starting a new process, something went wrong.
1311 * We failed to setup the environment correctly.
1312 * We failed to setup the config parser correctly.
1313 * Bus name was not valid.
1314 * Service file not found in system-services directory.
1315 * Permissions are incorrect on the setuid helper.
1316 * Service file invalid (Name, User or Exec missing).
1317 * Tried to get a UNIX process ID and it wasn't available.
1318 * Tried to get a UNIX process ID and it wasn't available.
1319 * A type signature is not valid.
1320 * A file contains invalid syntax or is otherwise broken.
1321 * Asked for SELinux security context and it wasn't available.
1322 * Asked for ADT audit data and it wasn't available.
1323 * There's already an object with the requested object path.
1324 * Error codes for the %G_DBUS_ERROR error domain.
1326 * Certain timeout errors, e.g. while starting a service. warning: this is
1333 * @error_code: An error code.
1334 * @dbus_error_name: The D-Bus error name to associate with @error_code.
1336 * Struct used in g_dbus_error_register_error_domain().
1343 * GDBusInterfaceGetPropertyFunc:
1344 * @connection: A #GDBusConnection.
1345 * @sender: The unique bus name of the remote caller.
1346 * @object_path: The object path that the method was invoked on.
1347 * @interface_name: The D-Bus interface name for the property.
1348 * @property_name: The name of the property to get the value of.
1349 * @error: Return location for error.
1350 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1352 * The type of the @get_property function in #GDBusInterfaceVTable.
1353 * consumed - otherwise its reference count is decreased by one.
1355 * Returns: A #GVariant with the value for @property_name or %NULL if
1361 * GDBusInterfaceInfo:
1362 * @ref_count: The reference count or -1 if statically allocated.
1363 * @name: The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".
1364 * @methods: A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods.
1365 * @signals: A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals.
1366 * @properties: A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties.
1367 * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1369 * Information about a D-Bus interface.
1376 * GDBusInterfaceMethodCallFunc:
1377 * @connection: A #GDBusConnection.
1378 * @sender: The unique bus name of the remote caller.
1379 * @object_path: The object path that the method was invoked on.
1380 * @interface_name: The D-Bus interface name the method was invoked on.
1381 * @method_name: The name of the method that was invoked.
1382 * @parameters: A #GVariant tuple with parameters.
1383 * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
1384 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1386 * The type of the @method_call function in #GDBusInterfaceVTable.
1393 * GDBusInterfaceSetPropertyFunc:
1394 * @connection: A #GDBusConnection.
1395 * @sender: The unique bus name of the remote caller.
1396 * @object_path: The object path that the method was invoked on.
1397 * @interface_name: The D-Bus interface name for the property.
1398 * @property_name: The name of the property to get the value of.
1399 * @value: The value to set the property to.
1400 * @error: Return location for error.
1401 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
1403 * The type of the @set_property function in #GDBusInterfaceVTable.
1405 * Returns: %TRUE if the property was set to @value, %FALSE if @error is set.
1411 * GDBusInterfaceVTable:
1412 * @method_call: Function for handling incoming method calls.
1413 * @get_property: Function for getting a property.
1414 * @set_property: Function for setting a property.
1416 * Virtual table for handling properties and method calls for a D-Bus
1418 * If you want to handle getting/setting D-Bus properties asynchronously, simply
1419 * register an object with the <literal>org.freedesktop.DBus.Properties</literal>
1420 * D-Bus interface using g_dbus_connection_register_object().
1429 * The #GDBusMessage structure contains only private data and should
1430 * only be accessed using the provided API.
1437 * GDBusMessageByteOrder:
1438 * @G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN: The byte order is big endian.
1439 * @G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN: The byte order is little endian.
1441 * Enumeration used to describe the byte order of a D-Bus message.
1448 * GDBusMessageClass:
1450 * Class structure for #GDBusMessage.
1457 * GDBusMessageFilterFunction:
1458 * @connection: (transfer none): A #GDBusConnection.
1459 * @message: (transfer full): A locked #GDBusMessage that the filter function takes ownership of.
1460 * @incoming: %TRUE if it is a message received from the other peer, %FALSE if it is a message to be sent to the other peer.
1461 * @user_data: User data passed when adding the filter.
1463 * Signature for function used in g_dbus_connection_add_filter().
1464 * A filter function is passed a #GDBusMessage and expected to return
1465 * a #GDBusMessage too. Passive filter functions that don't modify the
1466 * message can simply return the @message object:
1468 * static GDBusMessage *
1469 * passive_filter (GDBusConnection *connection
1470 * GDBusMessage *message,
1471 * gboolean incoming,
1472 * gpointer user_data)
1474 * /<!-- -->* inspect @message *<!-- -->/
1478 * Filter functions that wants to drop a message can simply return %NULL:
1480 * static GDBusMessage *
1481 * drop_filter (GDBusConnection *connection
1482 * GDBusMessage *message,
1483 * gboolean incoming,
1484 * gpointer user_data)
1486 * if (should_drop_message)
1488 * g_object_unref (message);
1494 * Finally, a filter function may modify a message by copying it:
1496 * static GDBusMessage *
1497 * modifying_filter (GDBusConnection *connection
1498 * GDBusMessage *message,
1499 * gboolean incoming,
1500 * gpointer user_data)
1502 * GDBusMessage *copy;
1505 * copy = g_dbus_message_copy (message, &error);
1506 * /<!-- -->* handle @error being is set *<!-- -->/
1507 * g_object_unref (message);
1508 * /<!-- -->* modify @copy *<!-- -->/
1512 * If the returned #GDBusMessage is different from @message and cannot
1513 * be sent on @connection (it could use features, such as file
1514 * descriptors, not compatible with @connection), then a warning is
1515 * logged to <emphasis>standard error</emphasis>. Applications can
1516 * check this ahead of time using g_dbus_message_to_blob() passing a
1517 * #GDBusCapabilityFlags value obtained from @connection.
1518 * g_object_unref() or %NULL to drop the message. Passive filter
1519 * functions can simply return the passed @message object.
1521 * Returns: (transfer full) (allow-none): A #GDBusMessage that will be freed with
1527 * GDBusMessageFlags:
1528 * @G_DBUS_MESSAGE_FLAGS_NONE: No flags set.
1529 * @G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED: A reply is not expected.
1530 * @G_DBUS_MESSAGE_FLAGS_NO_AUTO_START: The bus must not launch an owner for the destination name in response to this message.
1532 * Message flags used in #GDBusMessage.
1539 * GDBusMessageHeaderField:
1540 * @G_DBUS_MESSAGE_HEADER_FIELD_INVALID: Not a valid header field.
1541 * @G_DBUS_MESSAGE_HEADER_FIELD_PATH: The object path.
1542 * @G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE: The interface name.
1543 * @G_DBUS_MESSAGE_HEADER_FIELD_MEMBER: The method or signal name.
1544 * @G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME: The name of the error that occurred.
1545 * @G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL: The serial number the message is a reply to.
1546 * @G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION: The name the message is intended for.
1547 * @G_DBUS_MESSAGE_HEADER_FIELD_SENDER: Unique name of the sender of the message (filled in by the bus).
1548 * @G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE: The signature of the message body.
1549 * @G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS: The number of UNIX file descriptors that accompany the message.
1551 * Header fields used in #GDBusMessage.
1559 * @G_DBUS_MESSAGE_TYPE_INVALID: Message is of invalid type.
1560 * @G_DBUS_MESSAGE_TYPE_METHOD_CALL: Method call.
1561 * @G_DBUS_MESSAGE_TYPE_METHOD_RETURN: Method reply.
1562 * @G_DBUS_MESSAGE_TYPE_ERROR: Error reply.
1563 * @G_DBUS_MESSAGE_TYPE_SIGNAL: Signal emission.
1565 * Message types used in #GDBusMessage.
1573 * @ref_count: The reference count or -1 if statically allocated.
1574 * @name: The name of the D-Bus method, e.g. @RequestName.
1575 * @in_args: A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no in arguments.
1576 * @out_args: A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no out arguments.
1577 * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1579 * Information about a method on an D-Bus interface.
1586 * GDBusMethodInvocation:
1588 * The #GDBusMethodInvocation structure contains only private data and
1589 * should only be accessed using the provided API.
1596 * GDBusMethodInvocationClass:
1598 * Class structure for #GDBusMethodInvocation.
1606 * @ref_count: The reference count or -1 if statically allocated.
1607 * @path: The path of the node or %NULL if omitted. Note that this may be a relative path. See the D-Bus specification for more details.
1608 * @interfaces: A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces.
1609 * @nodes: A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes.
1610 * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1612 * Information about nodes in a remote object hierarchy.
1619 * GDBusPropertyInfo:
1620 * @ref_count: The reference count or -1 if statically allocated.
1621 * @name: The name of the D-Bus property, e.g. "SupportedFilesystems".
1622 * @signature: The D-Bus signature of the property (a single complete type).
1623 * @flags: Access control flags for the property.
1624 * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1626 * Information about a D-Bus property on a D-Bus interface.
1633 * GDBusPropertyInfoFlags:
1634 * @G_DBUS_PROPERTY_INFO_FLAGS_NONE: No flags set.
1635 * @G_DBUS_PROPERTY_INFO_FLAGS_READABLE: Property is readable.
1636 * @G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE: Property is writable.
1638 * Flags describing the access control of a D-Bus property.
1647 * The #GDBusProxy structure contains only private data and
1648 * should only be accessed using the provided API.
1655 * GDBusProxy::g-properties-changed:
1656 * @proxy: The #GDBusProxy emitting the signal.
1657 * @changed_properties: A #GVariant containing the properties that changed
1658 * @invalidated_properties: A %NULL terminated array of properties that was invalidated
1660 * Emitted when one or more D-Bus properties on @proxy changes. The
1661 * local cache has already been updated when this signal fires. Note
1662 * that both @changed_properties and @invalidated_properties are
1663 * guaranteed to never be %NULL (either may be empty though).
1664 * This signal corresponds to the
1665 * <literal>PropertiesChanged</literal> D-Bus signal on the
1666 * <literal>org.freedesktop.DBus.Properties</literal> interface.
1673 * GDBusProxy::g-signal:
1674 * @proxy: The #GDBusProxy emitting the signal.
1675 * @sender_name: The sender of the signal or %NULL if the connection is not a bus connection.
1676 * @signal_name: The name of the signal.
1677 * @parameters: A #GVariant tuple with parameters for the signal.
1679 * Emitted when a signal from the remote object and interface that @proxy is for, has been received.
1686 * GDBusProxy:g-bus-type:
1688 * If this property is not %G_BUS_TYPE_NONE, then
1689 * #GDBusProxy:g-connection must be %NULL and will be set to the
1690 * #GDBusConnection obtained by calling g_bus_get() with the value
1698 * GDBusProxy:g-connection:
1700 * The #GDBusConnection the proxy is for.
1707 * GDBusProxy:g-default-timeout:
1709 * The timeout to use if -1 (specifying default timeout) is passed
1710 * as @timeout_msec in the g_dbus_proxy_call() and
1711 * g_dbus_proxy_call_sync() functions.
1712 * This allows applications to set a proxy-wide timeout for all
1713 * remote method invocations on the proxy. If this property is -1,
1714 * the default timeout (typically 25 seconds) is used. If set to
1715 * %G_MAXINT, then no timeout is used.
1722 * GDBusProxy:g-flags:
1724 * Flags from the #GDBusProxyFlags enumeration.
1731 * GDBusProxy:g-interface-info:
1733 * Ensure that interactions with this proxy conform to the given
1734 * interface. For example, when completing a method call, if the
1735 * type signature of the message isn't what's expected, the given
1736 * #GError is set. Signals that have a type signature mismatch are
1744 * GDBusProxy:g-interface-name:
1746 * The D-Bus interface name the proxy is for.
1753 * GDBusProxy:g-name:
1755 * The well-known or unique name that the proxy is for.
1762 * GDBusProxy:g-name-owner:
1764 * The unique name that owns #GDBusProxy:name or %NULL if no-one
1765 * currently owns that name. You may connect to #GObject::notify signal to
1766 * track changes to this property.
1773 * GDBusProxy:g-object-path:
1775 * The object path the proxy is for.
1783 * @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal.
1784 * @g_signal: Signal class handler for the #GDBusProxy::g-signal signal.
1786 * Class structure for #GDBusProxy.
1794 * @G_DBUS_PROXY_FLAGS_NONE: No flags set.
1795 * @G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES: Don't load properties.
1796 * @G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS: Don't connect to signals on the remote object.
1797 * @G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START: If not set and the proxy if for a well-known name, then request the bus to launch an owner for the name if no-one owns the name. This flag can only be used in proxies for well-known names.
1799 * Flags used when constructing an instance of a #GDBusProxy derived class.
1806 * GDBusSendMessageFlags:
1807 * @G_DBUS_SEND_MESSAGE_FLAGS_NONE: No flags set.
1808 * @G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL: Do not automatically assign a serial number from the #GDBusConnection object when sending a message.
1810 * Flags used when sending #GDBusMessage<!-- -->s on a #GDBusConnection.
1819 * The #GDBusServer structure contains only private data and
1820 * should only be accessed using the provided API.
1827 * GDBusServer::new-connection:
1828 * @server: The #GDBusServer emitting the signal.
1829 * @connection: A #GDBusConnection for the new connection.
1831 * Emitted when a new authenticated connection has been made. Use
1832 * g_dbus_connection_get_peer_credentials() to figure out what
1833 * identity (if any), was authenticated.
1834 * If you want to accept the connection, take a reference to the
1835 * connection call g_dbus_connection_close() and give up your
1836 * reference. Note that the other peer may disconnect at any time -
1837 * a typical thing to do when accepting a connection is to listen to
1838 * the #GDBusConnection::closed signal.
1839 * If #GDBusServer:flags contains %G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
1840 * then the signal is emitted in a new thread dedicated to the
1841 * connection. Otherwise the signal is emitted in the <link
1842 * linkend="g-main-context-push-thread-default">thread-default main
1843 * loop</link> of the thread that @server was constructed in.
1844 * You are guaranteed that signal handlers for this signal runs
1845 * before incoming messages on @connection are processed. This means
1846 * that it's suitable to call g_dbus_connection_register_object() or
1847 * similar from the signal handler.
1850 * Returns: %TRUE to claim @connection, %FALSE to let other handlers
1856 * GDBusServer:active:
1858 * Whether the server is currently active.
1865 * GDBusServer:address:
1867 * The D-Bus address to listen on.
1874 * GDBusServer:authentication-observer:
1876 * A #GDBusAuthObserver object to assist in the authentication process or %NULL.
1883 * GDBusServer:client-address:
1885 * The D-Bus address that clients can use.
1892 * GDBusServer:flags:
1894 * Flags from the #GDBusServerFlags enumeration.
1903 * The guid of the server.
1911 * @new_connection: Signal class handler for the #GDBusServer::new-connection signal.
1913 * Class structure for #GDBusServer.
1921 * @G_DBUS_SERVER_FLAGS_NONE: No flags set.
1922 * @G_DBUS_SERVER_FLAGS_RUN_IN_THREAD: All #GDBusServer::new-connection signals will run in separated dedicated threads (see signal for details).
1923 * @G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS: Allow the anonymous authentication method.
1925 * Flags used when creating a #GDBusServer.
1932 * GDBusSignalCallback:
1933 * @connection: A #GDBusConnection.
1934 * @sender_name: The unique bus name of the sender of the signal.
1935 * @object_path: The object path that the signal was emitted on.
1936 * @interface_name: The name of the interface.
1937 * @signal_name: The name of the signal.
1938 * @parameters: A #GVariant tuple with parameters for the signal.
1939 * @user_data: User data passed when subscribing to the signal.
1941 * Signature for callback function used in g_dbus_connection_signal_subscribe().
1949 * @G_DBUS_SIGNAL_FLAGS_NONE: No flags set.
1950 * @G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE: Don't actually send the AddMatch DBus call for this signal subscription. This gives you more control over which match rules you add (but you must add them manually).
1952 * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe().
1960 * @ref_count: The reference count or -1 if statically allocated.
1961 * @name: The name of the D-Bus signal, e.g. "NameOwnerChanged".
1962 * @args: A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments.
1963 * @annotations: A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
1965 * Information about a signal on a D-Bus interface.
1972 * GDBusSubtreeDispatchFunc:
1973 * @connection: A #GDBusConnection.
1974 * @sender: The unique bus name of the remote caller.
1975 * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
1976 * @interface_name: The D-Bus interface name that the method call or property access is for.
1977 * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
1978 * @out_user_data: Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL).
1979 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
1981 * The type of the @dispatch function in #GDBusSubtreeVTable.
1982 * Subtrees are flat. @node, if non-%NULL, is always exactly one
1984 * Segment of the object path (ie: it never contains a slash).
1985 * Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.
1991 * GDBusSubtreeEnumerateFunc:
1992 * @connection: A #GDBusConnection.
1993 * @sender: The unique bus name of the remote caller.
1994 * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
1995 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
1997 * The type of the @enumerate function in #GDBusSubtreeVTable.
1998 * This function is called when generating introspection data and also
1999 * when preparing to dispatch incoming messages in the event that the
2000 * %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not
2001 * Hierarchies are not supported; the items that you return should not
2002 * contain the '/' character.
2003 * The return value will be freed with g_strfreev().
2005 * Specified (ie: to verify that the object path is valid).
2006 * Returns: A newly allocated array of strings for node names that are children of @object_path.
2012 * GDBusSubtreeFlags:
2013 * @G_DBUS_SUBTREE_FLAGS_NONE: No flags set.
2014 * @G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES: Method calls to objects not in the enumerated range will still be dispatched. This is useful if you want to dynamically spawn objects in the subtree.
2016 * Flags passed to g_dbus_connection_register_subtree().
2023 * GDBusSubtreeIntrospectFunc:
2024 * @connection: A #GDBusConnection.
2025 * @sender: The unique bus name of the remote caller.
2026 * @object_path: The object path that was registered with g_dbus_connection_register_subtree().
2027 * @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
2028 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
2030 * The type of the @introspect function in #GDBusSubtreeVTable.
2031 * Subtrees are flat. @node, if non-%NULL, is always exactly one
2032 * This function should return %NULL to indicate that there is no object
2034 * If this function returns non-%NULL, the return value is expected to
2035 * be a %NULL-terminated array of pointers to #GDBusInterfaceInfo
2036 * structures describing the interfaces implemented by @node. This
2037 * array will have g_dbus_interface_info_unref() called on each item
2038 * before being freed with g_free().
2039 * The difference between returning %NULL and an array containing zero
2040 * items is that the standard DBus interfaces will returned to the
2041 * remote introspector in the empty array case, but not in the %NULL
2044 * Segment of the object path (ie: it never contains a slash).
2045 * Returns: A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL.
2051 * GDBusSubtreeVTable:
2052 * @enumerate: Function for enumerating child nodes.
2053 * @introspect: Function for introspecting a child node.
2054 * @dispatch: Function for dispatching a remote call on a child node.
2056 * Virtual table for handling subtrees registered with g_dbus_connection_register_subtree().
2065 * An implementation of #GBufferedInputStream that allows for high-level
2066 * data manipulation of arbitrary data (including binary operations).
2071 * GDataOutputStream:
2073 * An implementation of #GBufferedOutputStream that allows for high-level
2074 * data manipulation of arbitrary data (including binary operations).
2079 * GDataOutputStream:byte-order:
2081 * Determines the byte ordering that is used when writing
2082 * multi-byte entities (such as integers) to the stream.
2087 * GDataStream:byte-order:
2089 * The ::byte-order property determines the byte ordering that
2090 * is used when reading multi-byte entities (such as integers)
2096 * GDataStream:newline-type:
2098 * The :newline-type property determines what is considered
2099 * as a line ending when reading complete lines from the stream.
2104 * GDataStreamByteOrder:
2105 * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order.
2106 * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order.
2107 * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture.
2109 * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources
2110 * across various machine architectures.
2115 * GDataStreamNewlineType:
2116 * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms.
2117 * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings.
2118 * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows.
2119 * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type.
2121 * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file.
2128 * <structname>GDateTime</structname> is an opaque structure whose members
2129 * cannot be accessed directly.
2138 * Information about an installed application from a desktop file.
2143 * GDesktopAppInfoLookup:
2145 * Interface that is used by backends to associate default
2146 * handlers with URI schemes.
2151 * GDesktopAppLaunchCallback:
2152 * @appinfo: a #GDesktopAppInfo
2153 * @pid: Process identifier
2154 * @user_data: User data
2156 * During invocation, g_desktop_app_info_launch_uris_as_manager() may
2157 * create one or more child processes. This callback is invoked once
2158 * for each, providing the process ID.
2165 * Opaque drive object.
2171 * @drive: a #GDrive.
2173 * Emitted when the drive's state has changed.
2178 * GDrive::disconnected:
2179 * @drive: a #GDrive.
2181 * This signal is emitted when the #GDrive have been
2182 * disconnected. If the recipient is holding references to the
2183 * object they should release them so the object can be
2189 * GDrive::eject-button:
2190 * @drive: a #GDrive.
2192 * Emitted when the physical eject button (if any) of a drive has
2198 * GDrive::stop-button:
2199 * @drive: a #GDrive.
2201 * Emitted when the physical stop button (if any) of a drive has
2210 * @g_iface: The parent interface.
2211 * @changed: Signal emitted when the drive is changed.
2212 * @disconnected: The removed signal that is emitted when the #GDrive have been disconnected. If the recipient is holding references to the object they should release them so the object can be finalized.
2213 * @eject_button: Signal emitted when the physical eject button (if any) of a drive have been pressed.
2214 * @get_name: Returns the name for the given #GDrive.
2215 * @get_icon: Returns a #GIcon for the given #GDrive.
2216 * @has_volumes: Returns %TRUE if the #GDrive has mountable volumes.
2217 * @get_volumes: Returns a list #GList of #GVolume for the #GDrive.
2218 * @is_media_removable: Returns %TRUE if the #GDrive supports removal and insertion of media.
2219 * @has_media: Returns %TRUE if the #GDrive has media inserted.
2220 * @is_media_check_automatic: Returns %TRUE if the #GDrive is capabable of automatically detecting media changes.
2221 * @can_poll_for_media: Returns %TRUE if the #GDrive is capable of manually polling for media change.
2222 * @can_eject: Returns %TRUE if the #GDrive can eject media.
2223 * @eject: Ejects a #GDrive.
2224 * @eject_finish: Finishes an eject operation.
2225 * @poll_for_media: Poll for media insertion/removal on a #GDrive.
2226 * @poll_for_media_finish: Finishes a media poll operation.
2227 * @get_identifier: Returns the identifier of the given kind, or %NULL if the #GDrive doesn't have one.
2228 * @enumerate_identifiers: Returns an array strings listing the kinds of identifiers which the #GDrive has.
2229 * @get_start_stop_type: Gets a #GDriveStartStopType with details about starting/stopping the drive. Since 2.22.
2230 * @can_stop: Returns %TRUE if a #GDrive can be stopped. Since 2.22.
2231 * @stop: Stops a #GDrive. Since 2.22.
2232 * @stop_finish: Finishes a stop operation. Since 2.22.
2233 * @can_start: Returns %TRUE if a #GDrive can be started. Since 2.22.
2234 * @can_start_degraded: Returns %TRUE if a #GDrive can be started degraded. Since 2.22.
2235 * @start: Starts a #GDrive. Since 2.22.
2236 * @start_finish: Finishes a start operation. Since 2.22.
2237 * @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.
2238 * @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22.
2239 * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
2241 * Interface for creating #GDrive implementations.
2247 * @G_DRIVE_START_NONE: No flags set.
2249 * Flags used when starting a drive.
2256 * GDriveStartStopType:
2257 * @G_DRIVE_START_STOP_TYPE_UNKNOWN: Unknown or drive doesn't support start/stop.
2258 * @G_DRIVE_START_STOP_TYPE_SHUTDOWN: The stop method will physically shut down the drive and e.g. power down the port the drive is attached to.
2259 * @G_DRIVE_START_STOP_TYPE_NETWORK: The start/stop methods are used for connecting/disconnect to the drive over the network.
2260 * @G_DRIVE_START_STOP_TYPE_MULTIDISK: The start/stop methods will assemble/disassemble a virtual drive from several physical drives.
2261 * @G_DRIVE_START_STOP_TYPE_PASSWORD: The start/stop methods will unlock/lock the disk (for example using the ATA <quote>SECURITY UNLOCK DEVICE</quote> command)
2263 * Enumeration describing how a drive can be started/stopped.
2272 * An object for Emblems
2278 * @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin
2279 * @G_EMBLEM_ORIGIN_DEVICE: Emblem adds device-specific information
2280 * @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly"
2281 * @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)
2283 * GEmblemOrigin is used to add information about the origin of the emblem
2293 * An implementation of #GIcon for icons with emblems.
2299 * @g_type_class: the parent class
2300 * @minimum: the smallest possible value.
2301 * @maximum: the largest possible value.
2302 * @n_values: the number of possible values.
2303 * @values: an array of #GEnumValue structs describing the individual values.
2305 * The class of an enumeration type holds information about its
2312 * @value: the enum value
2313 * @value_name: the name of the value
2314 * @value_nick: the nickname of the value
2316 * A structure which contains a single enum value, its name, and its
2324 * A handle to an object implementing the #GFileIface interface.
2325 * Generally stores a location within the file system. Handles do not
2326 * necessarily represent files or directories that currently exist.
2331 * GFileAttributeInfo:
2332 * @name: the name of the attribute.
2333 * @type: the #GFileAttributeType type of the attribute.
2334 * @flags: a set of #GFileAttributeInfoFlags.
2336 * Information about a specific attribute.
2341 * GFileAttributeInfoFlags:
2342 * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set.
2343 * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied.
2344 * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved.
2346 * Flags specifying the behaviour of an attribute.
2351 * GFileAttributeInfoList:
2352 * @infos: an array of #GFileAttributeInfo<!-- -->s.
2353 * @n_infos: the number of values in the array.
2355 * Acts as a lightweight registry for possible valid file attributes.
2356 * The registry stores Key-Value pair formats as #GFileAttributeInfo<!-- -->s.
2361 * GFileAttributeMatcher:
2363 * Determines if a string matches a file attribute.
2368 * GFileAttributeStatus:
2369 * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty).
2370 * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set.
2371 * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value.
2373 * Used by g_file_set_attributes_from_info() when setting file attributes.
2378 * GFileAttributeType:
2379 * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitalized type.
2380 * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string.
2381 * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes.
2382 * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value.
2383 * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer.
2384 * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer.
2385 * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer.
2386 * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer.
2387 * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject.
2388 * @G_FILE_ATTRIBUTE_TYPE_STRINGV: a %NULL terminated char **. Since 2.22
2390 * The data types for file attributes.
2396 * @G_FILE_COPY_NONE: No flags set.
2397 * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
2398 * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
2399 * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
2400 * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo).
2401 * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported.
2402 * @G_FILE_COPY_TARGET_DEFAULT_PERMS: Leaves target file with default perms, instead of setting the source file perms.
2404 * Flags used when copying or moving files.
2410 * @G_FILE_CREATE_NONE: No flags set.
2411 * @G_FILE_CREATE_PRIVATE: Create a file that can only be accessed by the current user.
2412 * @G_FILE_CREATE_REPLACE_DESTINATION: Replace the destination as if it didn't exist before. Don't try to keep any old permissions, replace instead of following links. This is generally useful if you're doing a "copy over" rather than a "save new version of" replace operation. You can think of it as "unlink destination" before writing to it, although the implementation may not be exactly like that. Since 2.20
2414 * Flags used when an operation may create a file.
2419 * GFileDescriptorBased:
2421 * An interface for file descriptor based io objects.
2426 * GFileDescriptorBasedIface:
2427 * @g_iface: The parent interface.
2436 * A per matched file iterator.
2443 * A subclass of GIOStream for opened files. This adds
2444 * a few file-specific operations and seeking and truncating.
2445 * #GFileIOStream implements GSeekable.
2452 * Gets an icon for a #GFile. Implements #GLoadableIcon.
2459 * The file containing the icon.
2465 * @g_iface: The parent interface.
2466 * @dup: Duplicates a #GFile.
2467 * @hash: Creates a hash of a #GFile.
2468 * @equal: Checks equality of two given #GFile<!-- -->s.
2469 * @is_native: Checks to see if a file is native to the system.
2470 * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
2471 * @get_uri_scheme: Gets the URI scheme for a #GFile.
2472 * @get_basename: Gets the basename for a given #GFile.
2473 * @get_path: Gets the current path within a #GFile.
2474 * @get_uri: Gets a URI for the path within a #GFile.
2475 * @get_parse_name: Gets the parsed name for the #GFile.
2476 * @get_parent: Gets the parent directory for the #GFile.
2477 * @prefix_matches: Checks whether a #GFile contains a specified file.
2478 * @get_relative_path: Gets the path for a #GFile relative to a given path.
2479 * @resolve_relative_path: Resolves a relative path for a #GFile to an absolute path.
2480 * @get_child_for_display_name: Gets the child #GFile for a given display name.
2481 * @enumerate_children: Gets a #GFileEnumerator with the children of a #GFile.
2482 * @enumerate_children_async: Asynchronously gets a #GFileEnumerator with the children of a #GFile.
2483 * @enumerate_children_finish: Finishes asynchronously enumerating the children.
2484 * @query_info: Gets the #GFileInfo for a #GFile.
2485 * @query_info_async: Asynchronously gets the #GFileInfo for a #GFile.
2486 * @query_info_finish: Finishes an asynchronous query info operation.
2487 * @query_filesystem_info: Gets a #GFileInfo for the file system #GFile is on.
2488 * @query_filesystem_info_async: Asynchronously gets a #GFileInfo for the file system #GFile is on.
2489 * @query_filesystem_info_finish: Finishes asynchronously getting the file system info.
2490 * @find_enclosing_mount: Gets a #GMount for the #GFile.
2491 * @find_enclosing_mount_async: Asynchronously gets the #GMount for a #GFile.
2492 * @find_enclosing_mount_finish: Finishes asynchronously getting the volume.
2493 * @set_display_name: Sets the display name for a #GFile.
2494 * @set_display_name_async: Asynchronously sets a #GFile's display name.
2495 * @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
2496 * @query_settable_attributes: Returns a list of #GFileAttribute<!-- -->s that can be set.
2497 * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttribute<!-- -->s that can be set.
2498 * @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
2499 * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
2500 * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
2501 * @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
2502 * @set_attribute: Sets a #GFileAttribute.
2503 * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
2504 * @set_attributes_async: Asynchronously sets a file's attributes.
2505 * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
2506 * @read_fn: Reads a file asynchronously.
2507 * @read_async: Asynchronously reads a file.
2508 * @read_finish: Finishes asynchronously reading a file.
2509 * @append_to: Writes to the end of a file.
2510 * @append_to_async: Asynchronously writes to the end of a file.
2511 * @append_to_finish: Finishes an asynchronous file append operation.
2512 * @create: Creates a new file.
2513 * @create_async: Asynchronously creates a file.
2514 * @create_finish: Finishes asynchronously creating a file.
2515 * @replace: Replaces the contents of a file.
2516 * @replace_async: Asynchronously replaces the contents of a file.
2517 * @replace_finish: Finishes asynchronously replacing a file.
2518 * @delete_file: Deletes a file.
2519 * @_delete_file_async: Asynchronously deletes a file.
2520 * @_delete_file_finish: Finishes an asynchronous delete.
2521 * @trash: Sends a #GFile to the Trash location.
2522 * @_trash_async: Asynchronously sends a #GFile to the Trash location.
2523 * @_trash_finish: Finishes an asynchronous file trashing operation.
2524 * @make_directory: Makes a directory.
2525 * @_make_directory_async: Asynchronously makes a directory.
2526 * @_make_directory_finish: Finishes making a directory asynchronously.
2527 * @make_symbolic_link: Makes a symbolic link.
2528 * @_make_symbolic_link_async: Asynchronously makes a symbolic link
2529 * @_make_symbolic_link_finish: Finishes making a symbolic link asynchronously.
2530 * @copy: Copies a file.
2531 * @copy_async: Asynchronously copies a file.
2532 * @copy_finish: Finishes an asynchronous copy operation.
2533 * @move: Moves a file.
2534 * @_move_async: Asynchronously moves a file.
2535 * @_move_finish: Finishes an asynchronous move operation.
2536 * @mount_mountable: Mounts a mountable object.
2537 * @mount_mountable_finish: Finishes a mounting operation.
2538 * @unmount_mountable: Unmounts a mountable object.
2539 * @unmount_mountable_finish: Finishes an unmount operation.
2540 * @eject_mountable: Ejects a mountable.
2541 * @eject_mountable_finish: Finishes an eject operation.
2542 * @mount_enclosing_volume: Mounts a specified location.
2543 * @mount_enclosing_volume_finish: Finishes mounting a specified location.
2544 * @monitor_dir: Creates a #GFileMonitor for the location.
2545 * @monitor_file: Creates a #GFileMonitor for the location.
2546 * @open_readwrite: Open file read/write. Since 2.22.
2547 * @open_readwrite_async: Asynchronously opens file read/write. Since 2.22.
2548 * @open_readwrite_finish: Finishes an asynchronous open read/write. Since 2.22.
2549 * @create_readwrite: Creates file read/write. Since 2.22.
2550 * @create_readwrite_async: Asynchronously creates file read/write. Since 2.22.
2551 * @create_readwrite_finish: Finishes an asynchronous creates read/write. Since 2.22.
2552 * @replace_readwrite: Replaces file read/write. Since 2.22.
2553 * @replace_readwrite_async: Asynchronously replaces file read/write. Since 2.22.
2554 * @replace_readwrite_finish: Finishes an asynchronous replace read/write. Since 2.22.
2555 * @start_mountable: Starts a mountable object. Since 2.22.
2556 * @start_mountable_finish: Finishes an start operation. Since 2.22.
2557 * @stop_mountable: Stops a mountable. Since 2.22.
2558 * @stop_mountable_finish: Finishes an stop operation. Since 2.22.
2559 * @supports_thread_contexts: a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22.
2560 * @unmount_mountable_with_operation: Unmounts a mountable object using a #GMountOperation. Since 2.22.
2561 * @unmount_mountable_with_operation_finish: Finishes an unmount operation using a #GMountOperation. Since 2.22.
2562 * @eject_mountable_with_operation: Ejects a mountable object using a #GMountOperation. Since 2.22.
2563 * @eject_mountable_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
2564 * @poll_mountable: Polls a mountable object for media changes. Since 2.22.
2565 * @poll_mountable_finish: Finishes an poll operation for media changes. Since 2.22.
2567 * An interface for writing VFS file handles.
2574 * Stores information about a file system object referenced by a #GFile.
2581 * A subclass of GInputStream for opened files. This adds
2582 * a few file-specific operations and seeking.
2583 * #GFileInputStream implements #GSeekable.
2590 * Watches for changes to a file.
2595 * GFileMonitor::changed:
2596 * @monitor: a #GFileMonitor.
2598 * @other_file: a #GFile or #NULL.
2599 * @event_type: a #GFileMonitorEvent.
2601 * Emitted when @file has been changed.
2602 * If using #G_FILE_MONITOR_SEND_MOVED flag and @event_type is
2603 * #G_FILE_MONITOR_SEND_MOVED, @file will be set to a #GFile containing the
2604 * old path, and @other_file will be set to a #GFile containing the new path.
2605 * In all the other cases, @other_file will be set to #NULL.
2610 * GFileMonitorEvent:
2611 * @G_FILE_MONITOR_EVENT_CHANGED: a file changed.
2612 * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes.
2613 * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted.
2614 * @G_FILE_MONITOR_EVENT_CREATED: a file was created.
2615 * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed.
2616 * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted.
2617 * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted.
2618 * @G_FILE_MONITOR_EVENT_MOVED: the file was moved.
2620 * Specifies what type of event a monitor event is.
2625 * GFileMonitorFlags:
2626 * @G_FILE_MONITOR_NONE: No flags set.
2627 * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
2628 * @G_FILE_MONITOR_SEND_MOVED: Pair DELETED and CREATED events caused by file renames (moves) and send a single G_FILE_MONITOR_EVENT_MOVED event instead (NB: not supported on all backends; the default behaviour -without specifying this flag- is to send single DELETED and CREATED events).
2630 * Flags used to set what a #GFileMonitor will watch for.
2635 * GFileOutputStream:
2637 * A subclass of GOutputStream for opened files. This adds
2638 * a few file-specific operations and seeking and truncating.
2639 * #GFileOutputStream implements GSeekable.
2644 * GFileProgressCallback:
2645 * @current_num_bytes: the current number of bytes in the operation.
2646 * @total_num_bytes: the total number of bytes in the operation.
2647 * @user_data: user data passed to the callback.
2649 * When doing file operations that may take a while, such as moving
2650 * a file or copying a file, a progress callback is used to pass how
2651 * far along that operation is to the application.
2656 * GFileQueryInfoFlags:
2657 * @G_FILE_QUERY_INFO_NONE: No flags set.
2658 * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
2660 * Flags used when querying a #GFileInfo.
2665 * GFileReadMoreCallback:
2666 * @file_contents: the data as currently read.
2667 * @file_size: the size of the data currently read.
2668 * @callback_data: data passed to the callback.
2670 * When loading the partial contents of a file with g_file_load_partial_contents_async(),
2671 * it may become necessary to determine if any more data from the file should be loaded.
2672 * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
2673 * should be read, or %FALSE otherwise.
2675 * Returns: %TRUE if more data should be read back. %FALSE otherwise.
2681 * @G_FILE_TYPE_UNKNOWN: File's type is unknown.
2682 * @G_FILE_TYPE_REGULAR: File handle represents a regular file.
2683 * @G_FILE_TYPE_DIRECTORY: File handle represents a directory.
2684 * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link (Unix systems).
2685 * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo, block device, or character device.
2686 * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems).
2687 * @G_FILE_TYPE_MOUNTABLE: File is a mountable location.
2689 * Indicates the file's on-disk type.
2694 * GFilenameCompleter:
2696 * Completes filenames based on files that exist within the file system.
2701 * GFilenameCompleter::got-completion-data:
2703 * Emitted when the file name completion information comes available.
2708 * GFilesystemPreviewType:
2709 * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it.
2710 * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files.
2711 * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files.
2713 * Indicates a hint from the file system whether files should be
2714 * previewed in a file manager. Returned as the value of the key
2715 * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW.
2720 * GFilterInputStream:
2722 * A base class for all input streams that work on an underlying stream.
2727 * GFilterOutputStream:
2729 * A base class for all output streams that work on an underlying stream.
2735 * @g_type_class: the parent class
2736 * @mask: a mask covering all possible values.
2737 * @n_values: the number of possible values.
2738 * @values: an array of #GFlagsValue structs describing the individual values.
2740 * The class of a flags type holds information about its
2747 * @value: the flags value
2748 * @value_name: the name of the value
2749 * @value_nick: the nickname of the value
2751 * A structure which contains a single flags value, its name, and its
2758 * @G_IO_ERROR_FAILED: Generic error condition for when any operation fails.
2759 * @G_IO_ERROR_NOT_FOUND: File not found error.
2760 * @G_IO_ERROR_EXISTS: File already exists error.
2761 * @G_IO_ERROR_IS_DIRECTORY: File is a directory error.
2762 * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory.
2763 * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty.
2764 * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file.
2765 * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link.
2766 * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted.
2767 * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters.
2768 * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters.
2769 * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links.
2770 * @G_IO_ERROR_NO_SPACE: No space left on drive.
2771 * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument.
2772 * @G_IO_ERROR_PERMISSION_DENIED: Permission denied.
2773 * @G_IO_ERROR_NOT_SUPPORTED: Operation not supported for the current backend.
2774 * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted.
2775 * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted.
2776 * @G_IO_ERROR_CLOSED: File was closed.
2777 * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable.
2778 * @G_IO_ERROR_PENDING: Operations are still pending.
2779 * @G_IO_ERROR_READ_ONLY: File is read only.
2780 * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created.
2781 * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect.
2782 * @G_IO_ERROR_TIMED_OUT: Operation timed out.
2783 * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive.
2784 * @G_IO_ERROR_BUSY: File is busy.
2785 * @G_IO_ERROR_WOULD_BLOCK: Operation would block.
2786 * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
2787 * @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
2788 * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has already interacted with the user. Do not display any error dialog.
2789 * @G_IO_ERROR_TOO_MANY_OPEN_FILES: The current process has too many files open and can't open any more. Duplicate descriptors do count toward this limit. Since 2.20
2790 * @G_IO_ERROR_NOT_INITIALIZED: The object has not been initialized. Since 2.22
2791 * @G_IO_ERROR_ADDRESS_IN_USE: The requested address is already in use. Since 2.22
2792 * @G_IO_ERROR_PARTIAL_INPUT: Need more input to finish operation. Since 2.24
2793 * @G_IO_ERROR_INVALID_DATA: There input data was invalid. Since 2.24
2794 * @G_IO_ERROR_DBUS_ERROR: A remote object generated an error that doesn't correspond to a locally registered #GError error domain. Use g_dbus_error_get_remote_error() to extract the D-Bus error name and g_dbus_error_strip_remote_error() to fix up the message so it matches what was received on the wire. Since 2.26.
2795 * @G_IO_ERROR_HOST_UNREACHABLE: Host unreachable. Since 2.26
2796 * @G_IO_ERROR_NETWORK_UNREACHABLE: Network unreachable. Since 2.26
2797 * @G_IO_ERROR_CONNECTION_REFUSED: Connection refused. Since 2.26
2798 * @G_IO_ERROR_PROXY_FAILED: Connection to proxy server failed. Since 2.26
2799 * @G_IO_ERROR_PROXY_AUTH_FAILED: Proxy authentication failed. Since 2.26
2800 * @G_IO_ERROR_PROXY_NEED_AUTH: Proxy server needs authentication. Since 2.26
2801 * @G_IO_ERROR_PROXY_NOT_ALLOWED: Proxy connection is not allowed by ruleset. Since 2.26
2803 * Error codes returned by GIO functions.
2810 * Opaque module base class for extending GIO.
2817 * Opaque class for definining and scheduling IO jobs.
2822 * GIOSchedulerJobFunc:
2823 * @job: a #GIOSchedulerJob.
2824 * @cancellable: optional #GCancellable object, %NULL to ignore.
2825 * @user_data: the data to pass to callback function
2828 * Note that depending on whether threads are available, the
2829 * #GIOScheduler may run jobs in separate threads or in an idle
2831 * Long-running jobs should periodically check the @cancellable
2832 * to see if they have been cancelled.
2833 * complete the job, %FALSE if the job is complete (or cancelled)
2835 * Returns: %TRUE if this function should be called again to
2842 * Base class for read-write streams.
2847 * GIOStreamSpliceFlags:
2848 * @G_IO_STREAM_SPLICE_NONE: Do not close either stream.
2849 * @G_IO_STREAM_SPLICE_CLOSE_STREAM1: Close the first stream after the splice.
2850 * @G_IO_STREAM_SPLICE_CLOSE_STREAM2: Close the second stream after the splice.
2851 * @G_IO_STREAM_SPLICE_WAIT_FOR_BOTH: Wait for both splice operations to finish before calling the callback.
2853 * GIOStreamSpliceFlags determine how streams should be spliced.
2862 * An abstract type that specifies an icon.
2868 * @g_iface: The parent interface.
2869 * @hash: A hash for a given #GIcon.
2870 * @equal: Checks if two #GIcon<!-- -->s are equal.
2871 * @to_tokens: Serializes a #GIcon into tokens. The tokens must not contain any whitespace. Don't implement if the #GIcon can't be serialized (Since 2.20).
2872 * @from_tokens: Constructs a #GIcon from tokens. Set the #GError if the tokens are malformed. Don't implement if the #GIcon can't be serialized (Since 2.20).
2874 * GIconIface is used to implement GIcon types for various
2875 * different systems. See #GThemedIcon and #GLoadableIcon for
2876 * examples of how to implement this interface.
2883 * The <structname>GIConv</structname> struct wraps an
2884 * iconv() conversion descriptor. It contains private data
2885 * and should only be accessed using the following functions.
2892 * An IPv4 or IPv6 internet address.
2897 * GInetAddress:is-any:
2899 * Whether this is the "any" address for its family.
2900 * See g_inet_address_get_is_any().
2907 * GInetAddress:is-link-local:
2909 * Whether this is a link-local address.
2910 * See g_inet_address_get_is_link_local().
2917 * GInetAddress:is-loopback:
2919 * Whether this is the loopback address for its family.
2920 * See g_inet_address_get_is_loopback().
2927 * GInetAddress:is-mc-global:
2929 * Whether this is a global multicast address.
2930 * See g_inet_address_get_is_mc_global().
2937 * GInetAddress:is-mc-link-local:
2939 * Whether this is a link-local multicast address.
2940 * See g_inet_address_get_is_mc_link_local().
2947 * GInetAddress:is-mc-node-local:
2949 * Whether this is a node-local multicast address.
2950 * See g_inet_address_get_is_mc_node_local().
2957 * GInetAddress:is-mc-org-local:
2959 * Whether this is an organization-local multicast address.
2960 * See g_inet_address_get_is_mc_org_local().
2967 * GInetAddress:is-mc-site-local:
2969 * Whether this is a site-local multicast address.
2970 * See g_inet_address_get_is_mc_site_local().
2977 * GInetAddress:is-multicast:
2979 * Whether this is a multicast address.
2980 * See g_inet_address_get_is_multicast().
2987 * GInetAddress:is-site-local:
2989 * Whether this is a site-local address.
2990 * See g_inet_address_get_is_loopback().
2997 * GInetSocketAddress:
2999 * An IPv4 or IPv6 socket address, corresponding to a <type>struct
3000 * sockaddr_in</type> or <type>struct sockaddr_in6</type>.
3007 * Interface for initializable objects.
3015 * @g_iface: The parent interface.
3016 * @init: Initializes the object.
3018 * Provides an interface for initializing object such that initialization
3026 * GInitiallyUnowned:
3028 * All the fields in the <structname>GInitiallyUnowned</structname> structure
3029 * are private to the #GInitiallyUnowned implementation and should never be
3030 * accessed directly.
3035 * GInitiallyUnownedClass:
3037 * The class structure for the <structname>GInitiallyUnowned</structname> type.
3044 * Base class for streaming input operations.
3050 * @buffer: Pointer to a buffer where data will be written.
3051 * @size: the available size in @buffer.
3053 * Structure used for scatter/gather data input.
3054 * You generally pass in an array of #GInputVector<!-- -->s
3055 * and the operation will store the read data starting in the
3056 * first buffer, switching to the next as needed.
3063 * GInstanceInitFunc:
3064 * @instance: The instance to initialize.
3065 * @g_class: The class of the type the instance is created for.
3067 * A callback function used by the type system to initialize a new
3068 * instance of a type. This function initializes all instance members and
3069 * allocates any resources required by it.
3070 * Initialization of a derived instance involves calling all its parent
3071 * types instance initializers, so the class member of the instance
3072 * is altered during its initialization to always point to the class that
3073 * belongs to the type the current initializer was introduced for.
3078 * GInterfaceFinalizeFunc:
3079 * @g_iface: The interface structure to finalize.
3080 * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3082 * A callback function used by the type system to finalize an interface.
3083 * This function should destroy any internal data and release any resources
3084 * allocated by the corresponding GInterfaceInitFunc() function.
3090 * @interface_init: location of the interface initialization function
3091 * @interface_finalize: location of the interface finalization function
3092 * @interface_data: user-supplied data passed to the interface init/finalize functions
3094 * A structure that provides information to the type system which is
3095 * used specifically for managing interface types.
3100 * GInterfaceInitFunc:
3101 * @g_iface: The interface structure to initialize.
3102 * @iface_data: The @interface_data supplied via the #GInterfaceInfo structure.
3104 * A callback function used by the type system to initialize a new
3105 * interface. This function should initialize all internal data and
3106 * allocate any resources required by the interface.
3113 * Generic type for all kinds of icons that can be loaded
3119 * GLoadableIconIface:
3120 * @g_iface: The parent interface.
3121 * @load: Loads an icon.
3122 * @load_async: Loads an icon asynchronously.
3123 * @load_finish: Finishes an asynchronous icon load.
3125 * Interface for icons that can be loaded as a stream.
3132 * The <structname>GMainContext</structname> struct is an opaque data
3133 * type representing a set of sources to be handled in a main loop.
3140 * The <structname>GMainLoop</structname> struct is an opaque data type
3141 * representing the main event loop of a GLib or GTK+ application.
3147 * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8
3148 * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace
3149 * @G_MARKUP_ERROR_PARSE: document was ill-formed
3150 * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser functions; element wasn't known
3151 * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser functions; attribute wasn't known
3152 * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser functions; content was invalid
3153 * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser functions; a required attribute was missing
3155 * Error codes returned by markup parsing.
3160 * GMarkupParseContext:
3162 * A parse context is used to parse a stream of bytes that
3163 * you expect to contain marked-up text.
3164 * See g_markup_parse_context_new(), #GMarkupParser, and so
3165 * on for more details.
3170 * GMarkupParseFlags:
3171 * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use
3172 * @G_MARKUP_TREAT_CDATA_AS_TEXT: When this flag is set, CDATA marked sections are not passed literally to the @passthrough function of the parser. Instead, the content of the section (without the <literal><![CDATA[</literal> and <literal>]]></literal>) is passed to the @text function. This flag was added in GLib 2.12
3173 * @G_MARKUP_PREFIX_ERROR_POSITION: Normally errors caught by GMarkup itself have line/column information prefixed to them to let the caller know the location of the error. When this flag is set the location information is also prefixed to errors generated by the #GMarkupParser implementation functions
3175 * Flags that affect the behaviour of the parser.
3181 * @start_element: Callback to invoke when the opening tag of an element is seen.
3182 * @end_element: Callback to invoke when the closing tag of an element is seen. Note that this is also called for empty tags like <literal><empty/></literal>.
3183 * @text: Callback to invoke when some text is seen (text is always inside an element). Note that the text of an element may be spread over multiple calls of this function. If the %G_MARKUP_TREAT_CDATA_AS_TEXT flag is set, this function is also called for the content of CDATA marked sections.
3184 * @passthrough: Callback to invoke for comments, processing instructions and doctype declarations; if you're re-writing the parsed document, write the passthrough text back out in the same position. If the %G_MARKUP_TREAT_CDATA_AS_TEXT flag is not set, this function is also called for CDATA marked sections.
3185 * @error: Callback to invoke when an error occurs.
3187 * Any of the fields in #GMarkupParser can be %NULL, in which case they
3188 * will be ignored. Except for the @error function, any of these callbacks
3189 * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT,
3190 * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT
3191 * errors are intended to be set from these callbacks. If you set an error
3192 * from a callback, g_markup_parse_context_parse() will report that error
3193 * back to its caller.
3199 * @malloc: function to use for allocating memory.
3200 * @realloc: function to use for reallocating memory.
3201 * @free: function to use to free memory.
3202 * @calloc: function to use for allocating zero-filled memory.
3203 * @try_malloc: function to use for allocating memory without a default error handler.
3204 * @try_realloc: function to use for reallocating memory without a default error handler.
3206 * A set of functions used to perform memory allocation. The same #GMemVTable must
3207 * be used for all allocations in the same program; a call to g_mem_set_vtable(),
3208 * if it exists, should be prior to any use of GLib.
3213 * GMemoryInputStream:
3215 * Implements #GInputStream for arbitrary memory chunks.
3220 * GMemoryOutputStream:
3222 * Implements #GOutputStream for arbitrary memory chunks.
3227 * GMemoryOutputStream:data:
3229 * Pointer to buffer where data will be written.
3236 * GMemoryOutputStream:data-size:
3238 * Size of data written to the buffer.
3245 * GMemoryOutputStream:destroy-function: (skip)
3247 * Function called with the buffer as argument when the stream is destroyed.
3254 * GMemoryOutputStream:realloc-function: (skip)
3256 * Function with realloc semantics called to enlarge the buffer.
3263 * GMemoryOutputStream:size:
3265 * Current size of the data buffer.
3274 * A handle to an object implementing the #GMountIface interface.
3280 * @mount: the object on which the signal is emitted
3282 * Emitted when the mount has been changed.
3287 * GMount::pre-unmount:
3288 * @mount: the object on which the signal is emitted
3290 * This signal is emitted when the #GMount is about to be
3298 * GMount::unmounted:
3299 * @mount: the object on which the signal is emitted
3301 * This signal is emitted when the #GMount have been
3302 * unmounted. If the recipient is holding references to the
3303 * object they should release them so the object can be
3310 * @g_iface: The parent interface.
3311 * @changed: Changed signal that is emitted when the mount's state has changed.
3312 * @unmounted: The unmounted signal that is emitted when the #GMount have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized.
3313 * @pre_unmount: The pre_unmout signal that is emitted when the #GMount will soon be emitted. If the recipient is somehow holding the mount open by keeping an open file on it it should close the file.
3314 * @get_root: Gets a #GFile to the root directory of the #GMount.
3315 * @get_name: Gets a string containing the name of the #GMount.
3316 * @get_icon: Gets a #GIcon for the #GMount.
3317 * @get_uuid: Gets the UUID for the #GMount. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available.
3318 * @get_volume: Gets a #GVolume the mount is located on. Returns %NULL if the #GMount is not associated with a #GVolume.
3319 * @get_drive: Gets a #GDrive the volume of the mount is located on. Returns %NULL if the #GMount is not associated with a #GDrive or a #GVolume. This is convenience method for getting the #GVolume and using that to get the #GDrive.
3320 * @can_unmount: Checks if a #GMount can be unmounted.
3321 * @can_eject: Checks if a #GMount can be ejected.
3322 * @unmount: Starts unmounting a #GMount.
3323 * @unmount_finish: Finishes an unmounting operation.
3324 * @eject: Starts ejecting a #GMount.
3325 * @eject_finish: Finishes an eject operation.
3326 * @remount: Starts remounting a #GMount.
3327 * @remount_finish: Finishes a remounting operation.
3328 * @guess_content_type: Starts guessing the type of the content of a #GMount. See g_mount_guess_content_type() for more information on content type guessing. This operation was added in 2.18.
3329 * @guess_content_type_finish: Finishes a contenet type guessing operation. Added in 2.18.
3330 * @guess_content_type_sync: Synchronous variant of @guess_content_type. Added in 2.18
3331 * @unmount_with_operation: Starts unmounting a #GMount using a #GMountOperation. Since 2.22.
3332 * @unmount_with_operation_finish: Finishes an unmounting operation using a #GMountOperation. Since 2.22.
3333 * @eject_with_operation: Starts ejecting a #GMount using a #GMountOperation. Since 2.22.
3334 * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
3335 * @get_default_location: Gets a #GFile indication a start location that can be use as the entry point for this mount. Since 2.24.
3337 * Interface for implementing operations for mounts.
3343 * @G_MOUNT_MOUNT_NONE: No flags set.
3345 * Flags used when mounting a mount.
3352 * Class for providing authentication methods for mounting operations,
3353 * such as mounting a file locally, or authenticating with a server.
3358 * GMountOperation::aborted:
3360 * Emitted by the backend when e.g. a device becomes unavailable
3361 * while a mount operation is in progress.
3362 * Implementations of GMountOperation should handle this signal
3363 * by dismissing open password dialogs.
3370 * GMountOperation::ask-password:
3371 * @op: a #GMountOperation requesting a password.
3372 * @message: string containing a message to display to the user.
3373 * @default_user: string containing the default user name.
3374 * @default_domain: string containing the default domain.
3375 * @flags: a set of #GAskPasswordFlags.
3377 * Emitted when a mount operation asks the user for a password.
3378 * If the message contains a line break, the first line should be
3379 * presented as a heading. For example, it may be used as the
3380 * primary text in a #GtkMessageDialog.
3385 * GMountOperation::ask-question:
3386 * @op: a #GMountOperation asking a question.
3387 * @message: string containing a message to display to the user.
3388 * @choices: an array of strings for each possible choice.
3390 * Emitted when asking the user a question and gives a list of
3391 * choices for the user to choose from.
3392 * If the message contains a line break, the first line should be
3393 * presented as a heading. For example, it may be used as the
3394 * primary text in a #GtkMessageDialog.
3399 * GMountOperation::reply:
3400 * @op: a #GMountOperation.
3401 * @result: a #GMountOperationResult indicating how the request was handled
3403 * Emitted when the user has replied to the mount operation.
3408 * GMountOperation::show-processes:
3409 * @op: a #GMountOperation.
3410 * @message: string containing a message to display to the user.
3411 * @processes: an array of #GPid for processes blocking the operation.
3412 * @choices: an array of strings for each possible choice.
3414 * Emitted when one or more processes are blocking an operation
3415 * e.g. unmounting/ejecting a #GMount or stopping a #GDrive.
3416 * Note that this signal may be emitted several times to update the
3417 * list of blocking processes as processes close files. The
3418 * application should only respond with g_mount_operation_reply() to
3419 * the latest signal (setting #GMountOperation:choice to the choice
3421 * If the message contains a line break, the first line should be
3422 * presented as a heading. For example, it may be used as the
3423 * primary text in a #GtkMessageDialog.
3430 * GMountOperation:anonymous:
3432 * Whether to use an anonymous user when authenticating.
3437 * GMountOperation:choice:
3439 * The index of the user's choice when a question is asked during the
3440 * mount operation. See the #GMountOperation::ask-question signal.
3445 * GMountOperation:domain:
3447 * The domain to use for the mount operation.
3452 * GMountOperation:password:
3454 * The password that is used for authentication when carrying out
3455 * the mount operation.
3460 * GMountOperation:password-save:
3462 * Determines if and how the password information should be saved.
3467 * GMountOperation:username:
3469 * The user name that is used for authentication when carrying out
3470 * the mount operation.
3475 * GMountOperationResult:
3476 * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the user specified data is now available
3477 * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation to be aborted
3478 * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not implemented)
3480 * #GMountOperationResult is returned as a result when a request for
3481 * information is send by the mounting operation.
3486 * GMountUnmountFlags:
3487 * @G_MOUNT_UNMOUNT_NONE: No flags set.
3488 * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding file operations on the mount.
3490 * Flags used when an unmounting a mount.
3497 * A #GSocketConnectable for resolving a hostname and connecting to
3505 * A #GSocketConnectable for resolving a SRV record and connecting to
3513 * All the fields in the <structname>GObject</structname> structure are private
3514 * to the #GObject implementation and should never be accessed directly.
3520 * @g_type_class: the parent class
3521 * @constructor: the @constructor function is called by g_object_new () to complete the object initialization after all the construction properties are set. The first thing a @constructor implementation must do is chain up to the needed, e.g. to handle construct properties, or to implement singletons.
3522 * @set_property: the generic setter for all properties of this type. Should be overridden for every type with properties. Implementations of @set_property don't need to emit property change notification explicitly, this is handled by the type system.
3523 * @get_property: the generic getter for all properties of this type. Should be overridden for every type with properties.
3524 * @dispose: the @dispose function is supposed to drop all references to other objects, but keep the instance otherwise intact, so that client method invocations still work. It may be run multiple times (due to reference loops). Before returning, @dispose should chain up to the @dispose method of the parent class.
3525 * @finalize: instance finalization function, should finish the finalization of the instance begun in @dispose and chain up to the @finalize method of the parent class.
3526 * @dispatch_properties_changed: emits property change notification for a bunch of properties. Overriding @dispatch_properties_changed should be rarely needed.
3527 * @notify: the class closure for the notify signal
3528 * @constructed: the @constructed function is called by g_object_new() as the final step of the object creation process. At the point of the call, all construction properties have been set on the object. The purpose of this call is to allow for object initialisation steps that can only be performed after construction properties have been set. @constructed implementors should chain up to the @constructed call of their parent class to allow it to complete its initialisation.
3530 * The class structure for the <structname>GObject</structname> type.
3532 * <title>Implementing singletons using a constructor</title>
3534 * static MySingleton *the_singleton = NULL;
3536 * my_singleton_constructor (GType type,
3537 * guint n_construct_params,
3538 * GObjectConstructParam *construct_params)
3541 * if (!the_singleton)
3543 * object = G_OBJECT_CLASS (parent_class)->constructor (type,
3544 * n_construct_params,
3545 * construct_params);
3546 * the_singleton = MY_SINGLETON (object);
3549 * object = g_object_ref (G_OBJECT (the_singleton));
3552 * </programlisting></example>
3557 * GObjectConstructParam:
3558 * @pspec: the #GParamSpec of the construct parameter
3559 * @value: the value to set the parameter to
3561 * The <structname>GObjectConstructParam</structname> struct is an auxiliary
3562 * structure used to hand #GParamSpec/#GValue pairs to the @constructor of
3568 * GObjectFinalizeFunc:
3569 * @object: the #GObject being finalized
3571 * The type of the @finalize function of #GObjectClass.
3576 * GObjectGetPropertyFunc:
3577 * @object: a #GObject
3578 * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
3579 * @value: a #GValue to return the property value in
3580 * @pspec: the #GParamSpec describing the property
3582 * The type of the @get_property function of #GObjectClass.
3587 * GObjectSetPropertyFunc:
3588 * @object: a #GObject
3589 * @property_id: the numeric id under which the property was registered with g_object_class_install_property().
3590 * @value: the new value for the property
3591 * @pspec: the #GParamSpec describing the property
3593 * The type of the @set_property function of #GObjectClass.
3599 * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags.
3600 * @G_OPTION_ARG_STRING: The option takes a string argument.
3601 * @G_OPTION_ARG_INT: The option takes an integer argument.
3602 * @G_OPTION_ARG_CALLBACK: The option provides a callback to parse the extra argument.
3603 * @G_OPTION_ARG_FILENAME: The option takes a filename as argument.
3604 * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple uses of the option are collected into an array of strings.
3605 * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, multiple uses of the option are collected into an array of strings.
3606 * @G_OPTION_ARG_DOUBLE: The option takes a double argument. The argument can be formatted either for the user's locale or for the "C" locale. Since 2.12
3607 * @G_OPTION_ARG_INT64: The option takes a 64-bit integer. Like %G_OPTION_ARG_INT but for larger numbers. The number can be in decimal base, or in hexadecimal (when prefixed with <literal>0x</literal>, for example, <literal>0xffffffff</literal>). Since 2.12
3609 * The #GOptionArg enum values determine which type of extra argument the
3610 * options expect to find. If an option expects an extra argument, it
3611 * can be specified in several ways; with a short option:
3612 * <option>-x arg</option>, with a long option: <option>--name arg</option>
3614 * Or combined in a single argument: <option>--name=arg</option>.
3620 * @option_name: The name of the option being parsed. This will be either a single dash followed by a single letter (for a short name) or two dashes followed by a long option name.
3621 * @value: The value to be parsed.
3622 * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
3623 * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED is intended to be used for errors in #GOptionArgFunc callbacks.
3625 * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK
3627 * occurred, in which case @error should be set with g_set_error()
3629 * Returns: %TRUE if the option was successfully parsed, %FALSE if an error
3636 * A <structname>GOptionContext</structname> struct defines which options
3637 * are accepted by the commandline option parser. The struct has only private
3638 * fields and should not be directly accessed.
3644 * @long_name: The long name of an option can be used to specify it in a commandline as --<replaceable>long_name</replaceable>. Every option must have a long name. To resolve conflicts if multiple option groups contain the same long name, it is also possible to specify the option as --<replaceable>groupname</replaceable>-<replaceable>long_name</replaceable>.
3645 * @short_name: If an option has a short name, it can be specified -<replaceable>short_name</replaceable> in a commandline. @short_name must be a printable ASCII character different from '-', or zero if the option has no short name.
3646 * @flags: Flags from #GOptionFlags.
3647 * @arg: The type of the option, as a #GOptionArg.
3648 * @arg_data: If the @arg type is %G_OPTION_ARG_CALLBACK, then @arg_data must point to a #GOptionArgFunc callback function, which will be called to handle the extra argument. Otherwise, @arg_data is a pointer to a location to store the value, the required type of the location depends on the @arg type: <variablelist> <varlistentry> <term>%G_OPTION_ARG_NONE</term> <listitem><para>%gboolean</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_STRING</term> <listitem><para>%gchar*</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_INT</term> <listitem><para>%gint</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_FILENAME</term> <listitem><para>%gchar*</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_STRING_ARRAY</term> <listitem><para>%gchar**</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_FILENAME_ARRAY</term> <listitem><para>%gchar**</para></listitem> </varlistentry> <varlistentry> <term>%G_OPTION_ARG_DOUBLE</term> <listitem><para>%gdouble</para></listitem> </varlistentry> </variablelist> If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME the location will contain a newly allocated string if the option was given. That string needs to be freed by the callee using g_free(). Likewise if @arg type is %G_OPTION_ARG_STRING_ARRAY or %G_OPTION_ARG_FILENAME_ARRAY, the data should be freed using g_strfreev().
3649 * @description: the description for the option in <option>--help</option> output. The @description is translated using the @translate_func of the group, see g_option_group_set_translation_domain().
3650 * @arg_description: The placeholder to use for the extra argument parsed by the option in <option>--help</option> output. The @arg_description is translated using the @translate_func of the group, see g_option_group_set_translation_domain().
3652 * A <structname>GOptionEntry</structname> defines a single option.
3653 * To have an effect, they must be added to a #GOptionGroup with
3654 * g_option_context_add_main_entries() or g_option_group_add_entries().
3660 * @G_OPTION_ERROR_UNKNOWN_OPTION: An option was not known to the parser. This error will only be reported, if the parser hasn't been instructed to ignore unknown options, see g_option_context_set_ignore_unknown_options().
3661 * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed.
3662 * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed.
3664 * Error codes returned by option parsing.
3670 * @context: The active #GOptionContext
3671 * @group: The group to which the function belongs
3672 * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
3673 * @error: The #GError containing details about the parse error
3675 * The type of function to be used as callback when a parse error occurs.
3681 * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in <option>--help</option> output.
3682 * @G_OPTION_FLAG_IN_MAIN: The option appears in the main section of the <option>--help</option> output, even if it is defined in a group.
3683 * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this flag indicates that the sense of the option is reversed.
3684 * @G_OPTION_FLAG_NO_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the callback does not take any argument (like a %G_OPTION_ARG_NONE option). Since 2.8
3685 * @G_OPTION_FLAG_FILENAME: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the argument should be passed to the callback in the GLib filename encoding rather than UTF-8. Since 2.8
3686 * @G_OPTION_FLAG_OPTIONAL_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, this flag indicates that the argument supply is optional. If no argument is given then data of %GOptionParseFunc will be set to NULL. Since 2.8
3687 * @G_OPTION_FLAG_NOALIAS: This flag turns off the automatic conflict resolution which prefixes long option names with <literal>groupname-</literal> if there is a conflict. This option should only be used in situations where aliasing is necessary to model some legacy commandline interface. It is not safe to use this option, unless all option groups are under your direct control. Since 2.8.
3689 * Flags which modify individual options.
3696 * A <structname>GOptionGroup</structname> struct defines the options in a single
3697 * group. The struct has only private fields and should not be directly accessed.
3698 * All options in a group share the same translation function. Libraries which
3699 * need to parse commandline options are expected to provide a function for
3700 * getting a <structname>GOptionGroup</structname> holding their options, which
3701 * the application can then add to its #GOptionContext.
3707 * @context: The active #GOptionContext
3708 * @group: The group to which the function belongs
3709 * @data: User data added to the #GOptionGroup containing the option when it was created with g_option_group_new()
3710 * @error: A return location for error details
3712 * The type of function that can be called before and after parsing.
3713 * occurred, in which case @error should be set with g_set_error()
3715 * Returns: %TRUE if the function completed successfully, %FALSE if an error
3722 * Base class for writing output.
3723 * All classes derived from GOutputStream should implement synchronous
3724 * writing, splicing, flushing and closing streams, but may implement
3725 * asynchronous versions.
3730 * GOutputStreamSpliceFlags:
3731 * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream.
3732 * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after the splice.
3733 * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after the splice.
3735 * GOutputStreamSpliceFlags determine how streams should be spliced.
3741 * @buffer: Pointer to a buffer of data to read.
3742 * @size: the size of @buffer.
3744 * Structure used for scatter/gather data output.
3745 * You generally pass in an array of #GOutputVector<!-- -->s
3746 * and the operation will use all the buffers as if they were
3755 * @G_PARAM_READABLE: the parameter is readable
3756 * @G_PARAM_WRITABLE: the parameter is writable
3757 * @G_PARAM_CONSTRUCT: the parameter will be set upon object construction
3758 * @G_PARAM_CONSTRUCT_ONLY: the parameter will only be set upon object construction
3759 * @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert()) strict validation is not required
3760 * @G_PARAM_STATIC_NAME: the string used as name when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8
3761 * @G_PARAM_STATIC_NICK: the string used as nick when constructing the parameter is guaranteed to remain valid and unmmodified for the lifetime of the parameter. Since 2.8
3762 * @G_PARAM_STATIC_BLURB: the string used as blurb when constructing the parameter is guaranteed to remain valid and unmodified for the lifetime of the parameter. Since 2.8
3763 * @G_PARAM_PRIVATE: internal
3764 * @G_PARAM_DEPRECATED: the parameter is deprecated and will be removed in a future version. A warning will be generated if it is used while running with G_ENABLE_DIAGNOSTIC=1. Since: 2.26
3766 * Through the #GParamFlags flag values, certain aspects of parameters
3767 * can be configured.
3773 * @g_type_instance: private #GTypeInstance portion
3774 * @name: name of this parameter
3775 * @flags: #GParamFlags flags for this parameter
3776 * @value_type: the #GValue type for this parameter
3777 * @owner_type: #GType type that uses (introduces) this parameter
3779 * All other fields of the <structname>GParamSpec</structname> struct are private and
3780 * should not be used directly.
3785 * GParamSpecBoolean:
3786 * @parent_instance: private #GParamSpec portion
3787 * @default_value: default value for the property specified
3789 * A #GParamSpec derived structure that contains the meta data for boolean properties.
3795 * @parent_instance: private #GParamSpec portion
3797 * A #GParamSpec derived structure that contains the meta data for boxed properties.
3803 * @parent_instance: private #GParamSpec portion
3804 * @minimum: minimum value for the property specified
3805 * @maximum: maximum value for the property specified
3806 * @default_value: default value for the property specified
3808 * A #GParamSpec derived structure that contains the meta data for character properties.
3814 * @g_type_class: the parent class
3815 * @value_type: the #GValue type for this parameter
3816 * @finalize: The instance finalization function (optional), should chain up to the finalize method of the parent class.
3817 * @value_set_default: Resets a @value to the default value for this type (recommended, the default is g_value_reset()), see g_param_value_set_default().
3818 * @value_validate: Ensures that the contents of @value comply with the specifications set out by this type (optional), see g_param_value_set_validate().
3819 * @values_cmp: Compares @value1 with @value2 according to this type (recommended, the default is memcmp()), see g_param_values_cmp().
3821 * The class structure for the <structname>GParamSpec</structname> type.
3822 * Normally, <structname>GParamSpec</structname> classes are filled by
3823 * g_param_type_register_static().
3829 * @parent_instance: private #GParamSpec portion
3830 * @minimum: minimum value for the property specified
3831 * @maximum: maximum value for the property specified
3832 * @default_value: default value for the property specified
3833 * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-90.
3835 * A #GParamSpec derived structure that contains the meta data for double properties.
3841 * @parent_instance: private #GParamSpec portion
3842 * @enum_class: the #GEnumClass for the enum
3843 * @default_value: default value for the property specified
3845 * A #GParamSpec derived structure that contains the meta data for enum
3852 * @parent_instance: private #GParamSpec portion
3853 * @flags_class: the #GFlagsClass for the flags
3854 * @default_value: default value for the property specified
3856 * A #GParamSpec derived structure that contains the meta data for flags
3863 * @parent_instance: private #GParamSpec portion
3864 * @minimum: minimum value for the property specified
3865 * @maximum: maximum value for the property specified
3866 * @default_value: default value for the property specified
3867 * @epsilon: values closer than @epsilon will be considered identical by g_param_values_cmp(); the default value is 1e-30.
3869 * A #GParamSpec derived structure that contains the meta data for float properties.
3875 * @parent_instance: private #GParamSpec portion
3876 * @is_a_type: a #GType whose subtypes can occur as values
3878 * A #GParamSpec derived structure that contains the meta data for #GType properties.
3886 * @parent_instance: private #GParamSpec portion
3887 * @minimum: minimum value for the property specified
3888 * @maximum: maximum value for the property specified
3889 * @default_value: default value for the property specified
3891 * A #GParamSpec derived structure that contains the meta data for integer properties.
3897 * @parent_instance: private #GParamSpec portion
3898 * @minimum: minimum value for the property specified
3899 * @maximum: maximum value for the property specified
3900 * @default_value: default value for the property specified
3902 * A #GParamSpec derived structure that contains the meta data for 64bit integer properties.
3908 * @parent_instance: private #GParamSpec portion
3909 * @minimum: minimum value for the property specified
3910 * @maximum: maximum value for the property specified
3911 * @default_value: default value for the property specified
3913 * A #GParamSpec derived structure that contains the meta data for long integer properties.
3919 * @parent_instance: private #GParamSpec portion
3921 * A #GParamSpec derived structure that contains the meta data for object properties.
3926 * GParamSpecOverride:
3928 * This is a type of #GParamSpec type that simply redirects operations to
3929 * another paramspec. All operations other than getting or
3930 * setting the value are redirected, including accessing the nick and
3931 * blurb, validating a value, and so forth. See
3932 * g_param_spec_get_redirect_target() for retrieving the overidden
3933 * property. #GParamSpecOverride is used in implementing
3934 * g_object_class_override_property(), and will not be directly useful
3935 * unless you are implementing a new base type similar to GObject.
3943 * @parent_instance: private #GParamSpec portion
3945 * A #GParamSpec derived structure that contains the meta data for %G_TYPE_PARAM
3951 * GParamSpecPointer:
3952 * @parent_instance: private #GParamSpec portion
3954 * A #GParamSpec derived structure that contains the meta data for pointer properties.
3960 * @parent_instance: private #GParamSpec portion
3961 * @default_value: default value for the property specified
3962 * @cset_first: a string containing the allowed values for the first byte
3963 * @cset_nth: a string containing the allowed values for the subsequent bytes
3964 * @substitutor: the replacement byte for bytes which don't match @cset_first or @cset_nth.
3965 * @null_fold_if_empty: replace empty string by %NULL
3966 * @ensure_non_null: replace %NULL strings by an empty string
3968 * A #GParamSpec derived structure that contains the meta data for string
3974 * GParamSpecTypeInfo:
3975 * @instance_size: Size of the instance (object) structure.
3976 * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
3977 * @instance_init: Location of the instance initialization function (optional).
3978 * @value_type: The #GType of values conforming to this #GParamSpec
3979 * @finalize: The instance finalization function (optional).
3980 * @value_set_default: Resets a @value to the default value for @pspec (recommended, the default is g_value_reset()), see g_param_value_set_default().
3981 * @value_validate: Ensures that the contents of @value comply with the specifications set out by @pspec (optional), see g_param_value_set_validate().
3982 * @values_cmp: Compares @value1 with @value2 according to @pspec (recommended, the default is memcmp()), see g_param_values_cmp().
3984 * This structure is used to provide the type system with the information
3985 * required to initialize and destruct (finalize) a parameter's class and
3986 * instances thereof.
3987 * The initialized structure is passed to the g_param_type_register_static()
3988 * The type system will perform a deep copy of this structure, so its memory
3989 * does not need to be persistent across invocation of
3990 * g_param_type_register_static().
3996 * @parent_instance: private #GParamSpec portion
3997 * @minimum: minimum value for the property specified
3998 * @maximum: maximum value for the property specified
3999 * @default_value: default value for the property specified
4001 * A #GParamSpec derived structure that contains the meta data for unsigned character properties.
4007 * @parent_instance: private #GParamSpec portion
4008 * @minimum: minimum value for the property specified
4009 * @maximum: maximum value for the property specified
4010 * @default_value: default value for the property specified
4012 * A #GParamSpec derived structure that contains the meta data for unsigned integer properties.
4018 * @parent_instance: private #GParamSpec portion
4019 * @minimum: minimum value for the property specified
4020 * @maximum: maximum value for the property specified
4021 * @default_value: default value for the property specified
4023 * A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
4029 * @parent_instance: private #GParamSpec portion
4030 * @minimum: minimum value for the property specified
4031 * @maximum: maximum value for the property specified
4032 * @default_value: default value for the property specified
4034 * A #GParamSpec derived structure that contains the meta data for unsigned long integer properties.
4039 * GParamSpecUnichar:
4040 * @parent_instance: private #GParamSpec portion
4041 * @default_value: default value for the property specified
4043 * A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
4048 * GParamSpecValueArray:
4049 * @parent_instance: private #GParamSpec portion
4050 * @element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
4051 * @fixed_n_elements: if greater than 0, arrays of this property will always have this many elements
4053 * A #GParamSpec derived structure that contains the meta data for #GValueArray properties.
4058 * GParamSpecVariant:
4059 * @parent_instance: private #GParamSpec portion
4060 * @type: a #GVariantType, or %NULL
4061 * @default_value: a #GVariant, or %NULL
4063 * A #GParamSpec derived structure that contains the meta data for #GVariant properties.
4071 * @name: the parameter name
4072 * @value: the parameter value
4074 * The <structname>GParameter</structname> struct is an auxiliary structure used
4075 * to hand parameter name/value pairs to g_object_newv().
4081 * @G_PASSWORD_SAVE_NEVER: never save a password.
4082 * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session.
4083 * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently.
4085 * #GPasswordSave is used to indicate the lifespan of a saved password.
4086 * #Gvfs stores passwords in the Gnome keyring when this flag allows it
4087 * to, and later retrieves it again from there.
4094 * #GPermission is an opaque data structure and can only be accessed
4095 * using the following functions.
4100 * GPermission:allowed:
4102 * %TRUE if the caller currently has permission to perform the action that
4107 * GPermission:can-acquire:
4109 * %TRUE if it is generally possible to acquire the permission by calling
4110 * g_permission_acquire().
4115 * GPermission:can-release:
4117 * %TRUE if it is generally possible to release the permission by calling
4118 * g_permission_release().
4125 * A type which is used to hold a process identification.
4126 * On UNIX, processes are identified by a process id (an integer),
4127 * while Windows uses process handles (which are pointers).
4133 * @fd: the file descriptor to poll (or a <type>HANDLE</type> on Win32)
4134 * @events: a bitwise combination from #GIOCondition, specifying which events should be polled for. Typically for reading from a file descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and for writing you would use %G_IO_OUT | %G_IO_ERR.
4135 * @revents: a bitwise combination of flags from #GIOCondition, returned from the poll() function to indicate which events occurred.
4143 * @ufds: an array of #GPollFD elements
4144 * @nfsd: the number of elements in @ufds
4145 * @timeout_: the maximum time to wait for an event of the file descriptors. A negative value indicates an infinite timeout.
4147 * Specifies the type of function passed to g_main_context_set_poll_func().
4148 * The semantics of the function should match those of the poll() system call.
4149 * reported, or -1 if an error occurred.
4151 * Returns: the number of #GPollFD elements which have events or errors
4156 * GPollableInputStream:
4158 * An interface for a #GInputStream that can be polled for readability.
4165 * GPollableInputStreamInterface:
4166 * @g_iface: The parent interface.
4167 * @can_poll: Checks if the #GPollableInputStream instance is actually pollable
4168 * @is_readable: Checks if the stream is readable
4169 * @create_source: Creates a #GSource to poll the stream
4170 * @read_nonblocking: Does a non-blocking read or returns %G_IO_ERROR_WOULD_BLOCK
4172 * The interface for pollable input streams.
4173 * The default implementation of @can_poll always returns %TRUE.
4174 * The default implementation of @read_nonblocking calls
4175 * g_pollable_input_stream_is_readable(), and then calls
4176 * g_input_stream_read() if it returns %TRUE. This means you only need
4177 * to override it if it is possible that your @is_readable
4178 * implementation may return %TRUE when the stream is not actually
4186 * GPollableOutputStream:
4188 * An interface for a #GOutputStream that can be polled for readability.
4195 * GPollableOutputStreamInterface:
4196 * @g_iface: The parent interface.
4197 * @can_poll: Checks if the #GPollableOutputStream instance is actually pollable
4198 * @is_writable: Checks if the stream is writable
4199 * @create_source: Creates a #GSource to poll the stream
4200 * @write_nonblocking: Does a non-blocking write or returns %G_IO_ERROR_WOULD_BLOCK
4202 * The interface for pollable output streams.
4203 * The default implementation of @can_poll always returns %TRUE.
4204 * The default implementation of @write_nonblocking calls
4205 * g_pollable_output_stream_is_writable(), and then calls
4206 * g_output_stream_write() if it returns %TRUE. This means you only
4207 * need to override it if it is possible that your @is_writable
4208 * implementation may return %TRUE when the stream is not actually
4216 * GPollableSourceFunc:
4217 * @pollable_stream: the #GPollableInputStream or #GPollableOutputStream
4218 * @user_data: data passed in by the user.
4220 * This is the function type of the callback used for the #GSource
4221 * returned by g_pollable_input_stream_create_source() and
4222 * g_pollable_output_stream_create_source().
4224 * Returns: it should return %FALSE if the source should be removed.
4232 * Interface that handles proxy connection and payload.
4241 * A #GInetSocketAddress representing a connection via a proxy server
4248 * GProxyAddressEnumerator:
4250 * A subclass of #GSocketAddressEnumerator that takes another address
4251 * enumerator and wraps its results in #GProxyAddress<!-- -->es as
4252 * directed by the default #GProxyResolver.
4258 * @g_iface: The parent interface.
4259 * @connect: Connect to proxy server and wrap (if required) the #connection to handle payload.
4260 * @connect_async: Same has connect() but asynchronous.
4261 * @connect_finish: Returns the result of connect_async()
4263 * Provides an interface for handling proxy connection and payload.
4272 * Interface that can be used to resolve proxy address.
4278 * @data: memory block to reallocate
4279 * @size: size to reallocate @data to
4281 * Changes the size of the memory block pointed to by @data to
4282 * The function should have the same semantics as realloc().
4284 * Returns: a pointer to the reallocated memory
4291 * A GRegex is the "compiled" form of a regular expression pattern. This
4292 * structure is opaque and its fields cannot be accessed directly.
4299 * GRegexCompileFlags:
4300 * @G_REGEX_CASELESS: Letters in the pattern match both upper- and lowercase letters. This option can be changed within a pattern by a "(?i)" option setting.
4301 * @G_REGEX_MULTILINE: By default, GRegex treats the strings as consisting of a single line of characters (even if it actually contains newlines). The "start of line" metacharacter ("^") matches only at the start of the string, while the "end of line" metacharacter ("$") matches only at the end of the string, or before a terminating newline (unless #G_REGEX_DOLLAR_ENDONLY is set). When #G_REGEX_MULTILINE is set, the "start of line" and "end of line" constructs match immediately following or immediately before any newline in the string, respectively, as well as at the very start and end. This can be changed within a pattern by a "(?m)" option setting.
4302 * @G_REGEX_DOTALL: A dot metacharater (".") in the pattern matches all characters, including newlines. Without it, newlines are excluded. This option can be changed within a pattern by a ("?s") option setting.
4303 * @G_REGEX_EXTENDED: Whitespace data characters in the pattern are totally ignored except when escaped or inside a character class. Whitespace does not include the VT character (code 11). In addition, characters between an unescaped "#" outside a character class and the next newline character, inclusive, are also ignored. This can be changed within a pattern by a "(?x)" option setting.
4304 * @G_REGEX_ANCHORED: The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharater.
4305 * @G_REGEX_DOLLAR_ENDONLY: A dollar metacharacter ("$") in the pattern matches only at the end of the string. Without this option, a dollar also matches immediately before the final character if it is a newline (but not before any other newlines). This option is ignored if #G_REGEX_MULTILINE is set.
4306 * @G_REGEX_UNGREEDY: Inverts the "greediness" of the quantifiers so that they are not greedy by default, but become greedy if followed by "?". It can also be set by a "(?U)" option setting within the pattern.
4307 * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this flag they are considered as a raw sequence of bytes.
4308 * @G_REGEX_NO_AUTO_CAPTURE: Disables the use of numbered capturing parentheses in the pattern. Any opening parenthesis that is not followed by "?" behaves as if it were followed by "?:" but named parentheses can still be used for capturing (and they acquire numbers in the usual way).
4309 * @G_REGEX_OPTIMIZE: Optimize the regular expression. If the pattern will be used many times, then it may be worth the effort to optimize it to improve the speed of matches.
4310 * @G_REGEX_DUPNAMES: Names used to identify capturing subpatterns need not be unique. This can be helpful for certain types of pattern when it is known that only one instance of the named subpattern can ever be matched.
4311 * @G_REGEX_NEWLINE_CR: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\r'.
4312 * @G_REGEX_NEWLINE_LF: Usually any newline character is recognized, if this option is set, the only recognized newline character is '\n'.
4313 * @G_REGEX_NEWLINE_CRLF: Usually any newline character is recognized, if this option is set, the only recognized newline character sequence is '\r\n'.
4315 * Flags specifying compile-time options.
4323 * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed.
4324 * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed.
4325 * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement string.
4326 * @G_REGEX_ERROR_MATCH: The match process failed.
4327 * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. Since 2.16
4328 * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16
4329 * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16
4330 * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". Since 2.16
4331 * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" quantifier. Since 2.16
4332 * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. Since 2.16
4333 * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for character class. Since 2.16
4334 * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence in character class. Since 2.16
4335 * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. Since 2.16
4336 * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16
4337 * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", "(?<" or "(?P". Since 2.16
4338 * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are supported only within a class. Since 2.16
4339 * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" without opening "(". Since 2.16
4340 * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent subpattern. Since 2.16
4341 * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. Since 2.16
4342 * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. Since 2.16
4343 * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16
4344 * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not fixed length. Since 2.16
4345 * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". Since 2.16
4346 * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains more than two branches. Since 2.16
4347 * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". Since 2.16
4348 * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. Since 2.16
4349 * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating elements are not supported. Since 2.16
4350 * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence is too large. Since 2.16
4351 * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16
4352 * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in lookbehind assertion. Since 2.16
4353 * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. Since 2.16
4354 * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator in subpattern name. Since 2.16
4355 * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have the same name. Since 2.16
4356 * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. Since 2.16
4357 * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or "\\p". Since 2.16
4358 * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long (maximum 32 characters). Since 2.16
4359 * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum 10,000). Since 2.16
4360 * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". Since 2.16
4361 * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more than one branch. Since 2.16
4362 * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. Since 2.16
4363 * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. Since 2.16
4364 * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced name or an optionally braced non-zero number. Since 2.16
4366 * Error codes returned by regular expressions functions.
4373 * GRegexEvalCallback:
4374 * @match_info: the #GMatchInfo generated by the match. Use g_match_info_get_regex() and g_match_info_get_string() if you need the #GRegex or the matched string.
4375 * @result: a #GString containing the new string
4376 * @user_data: user data passed to g_regex_replace_eval()
4378 * Specifies the type of the function passed to g_regex_replace_eval().
4379 * It is called for each occurance of the pattern in the string passed
4380 * to g_regex_replace_eval(), and it should append the replacement to
4382 * Returns: %FALSE to continue the replacement process, %TRUE to stop it
4389 * @G_REGEX_MATCH_ANCHORED: The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" metacharater.
4390 * @G_REGEX_MATCH_NOTBOL: Specifies that first character of the string is not the beginning of a line, so the circumflex metacharacter should not match before it. Setting this without #G_REGEX_MULTILINE (at compile time) causes circumflex never to match. This option affects only the behaviour of the circumflex metacharacter, it does not affect "\A".
4391 * @G_REGEX_MATCH_NOTEOL: Specifies that the end of the subject string is not the end of a line, so the dollar metacharacter should not match it nor (except in multiline mode) a newline immediately before it. Setting this without #G_REGEX_MULTILINE (at compile time) causes dollar never to match. This option affects only the behaviour of the dollar metacharacter, it does not affect "\Z" or "\z".
4392 * @G_REGEX_MATCH_NOTEMPTY: An empty string is not considered to be a valid match if this option is set. If there are alternatives in the pattern, they are tried. If all the alternatives match the empty string, the entire match fails. For example, if the pattern "a?b?" is applied to a string not beginning with "a" or "b", it matches the empty string at the start of the string. With this flag set, this match is not valid, so GRegex searches further into the string for occurrences of "a" or "b".
4393 * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more documentation on partial matching see g_match_info_is_partial_match().
4394 * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when creating a new #GRegex, setting the '\r' character as line terminator.
4395 * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when creating a new #GRegex, setting the '\n' character as line terminator.
4396 * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when creating a new #GRegex, setting the '\r\n' characters as line terminator.
4397 * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when creating a new #GRegex, any newline character or character sequence is recognized.
4399 * Flags specifying match-time options.
4408 * The object that handles DNS resolution. Use g_resolver_get_default()
4409 * to get the default resolver.
4414 * GResolver::reload:
4415 * @resolver: a #GResolver
4417 * Emitted when the resolver notices that the system resolver
4418 * configuration has changed.
4424 * @G_RESOLVER_ERROR_NOT_FOUND: the requested name/address/service was not found
4425 * @G_RESOLVER_ERROR_TEMPORARY_FAILURE: the requested information could not be looked up due to a network error or similar problem
4426 * @G_RESOLVER_ERROR_INTERNAL: unknown error
4428 * An error code used with %G_RESOLVER_ERROR in a #GError returned
4429 * from a #GResolver routine.
4438 * Seek object for streaming operations.
4444 * @g_iface: The parent interface.
4445 * @tell: Tells the current location within a stream.
4446 * @can_seek: Checks if seeking is supported by the stream.
4447 * @seek: Seeks to a location within a stream.
4448 * @can_truncate: Chekcs if truncation is suppored by the stream.
4449 * @truncate_fn: Truncates a stream.
4451 * Provides an interface for implementing seekable functionality on I/O Streams.
4456 * GSettings::change-event:
4457 * @settings: the object on which the signal was emitted
4458 * @keys: (array length=n_keys) (element-type GQuark) (allow-none): an array of #GQuark<!-- -->s for the changed keys, or %NULL
4459 * @n_keys: the length of the @keys array, or 0
4460 * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
4462 * The "change-event" signal is emitted once per change event that
4463 * affects this settings object. You should connect to this signal
4464 * only if you are interested in viewing groups of changes before they
4465 * are split out into multiple emissions of the "changed" signal.
4466 * For most use cases it is more appropriate to use the "changed" signal.
4467 * In the event that the change event applies to one or more specified
4468 * keys, @keys will be an array of #GQuark of length @n_keys. In the
4469 * event that the change event applies to the #GSettings object as a
4470 * be %NULL and @n_keys will be 0.
4471 * The default handler for this signal invokes the "changed" signal
4472 * for each affected key. If any other connected handler returns
4473 * %TRUE then this default functionality will be supressed.
4475 * Whole (ie: potentially every key has been changed) then @keys will
4480 * GSettings::changed:
4481 * @settings: the object on which the signal was emitted
4482 * @key: the name of the key that changed
4484 * The "changed" signal is emitted when a key has potentially changed.
4485 * You should call one of the g_settings_get() calls to check the new
4487 * This signal supports detailed connections. You can connect to the
4488 * detailed signal "changed::x" in order to only receive callbacks
4489 * when key "x" changes.
4494 * GSettings::writable-change-event:
4495 * @settings: the object on which the signal was emitted
4496 * @key: the quark of the key, or 0
4497 * @returns: %TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
4499 * The "writable-change-event" signal is emitted once per writability
4500 * change event that affects this settings object. You should connect
4501 * to this signal if you are interested in viewing groups of changes
4502 * before they are split out into multiple emissions of the
4503 * "writable-changed" signal. For most use cases it is more
4504 * appropriate to use the "writable-changed" signal.
4505 * In the event that the writability change applies only to a single
4506 * key, @key will be set to the #GQuark for that key. In the event
4507 * that the writability change affects the entire settings object,
4508 * The default handler for this signal invokes the "writable-changed"
4509 * and "changed" signals for each affected key. This is done because
4510 * changes in writability might also imply changes in value (if for
4511 * example, a new mandatory setting is introduced). If any other
4512 * connected handler returns %TRUE then this default functionality
4513 * will be supressed.
4518 * GSettings::writable-changed:
4519 * @settings: the object on which the signal was emitted
4522 * The "writable-changed" signal is emitted when the writability of a
4523 * key has potentially changed. You should call
4524 * g_settings_is_writable() in order to determine the new status.
4525 * This signal supports detailed connections. You can connect to the
4526 * detailed signal "writable-changed::x" in order to only receive
4527 * callbacks when the writability of "x" changes.
4532 * GSettings:context:
4534 * The name of the context that the settings are stored in.
4539 * GSettings:delay-apply:
4541 * Whether the #GSettings object is in 'delay-apply' mode. See
4542 * g_settings_delay() for details.
4549 * GSettings:has-unapplied:
4551 * If this property is %TRUE, the #GSettings object has outstanding
4552 * changes that will be applied when g_settings_apply() is called.
4559 * The path within the backend where the settings are stored.
4566 * The name of the schema that describes the types of keys
4567 * for this #GSettings object.
4574 * An implementation of a settings storage repository.
4579 * GSettingsBindFlags:
4580 * @G_SETTINGS_BIND_DEFAULT: Equivalent to <literal>G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET</literal>
4581 * @G_SETTINGS_BIND_GET: Update the #GObject property when the setting changes. It is an error to use this flag if the property is not writable.
4582 * @G_SETTINGS_BIND_SET: Update the setting when the #GObject property changes. It is an error to use this flag if the property is not readable.
4583 * @G_SETTINGS_BIND_NO_SENSITIVITY: Do not try to bind a "sensitivity" property to the writability of the setting
4584 * @G_SETTINGS_BIND_GET_NO_CHANGES: When set in addition to #G_SETTINGS_BIND_GET, set the #GObject property value initially from the setting, but do not listen for changes of the setting
4585 * @G_SETTINGS_BIND_INVERT_BOOLEAN: When passed to g_settings_bind(), uses a pair of mapping functions that invert the boolean value when mapping between the setting and the property. The setting and property must both be booleans. You cannot pass this flag to g_settings_bind_with_mapping().
4587 * Flags used when creating a binding. These flags determine in which
4588 * direction the binding works. The default is to synchronize in both
4594 * GSettingsBindGetMapping:
4595 * @value: return location for the property value
4596 * @variant: the #GVariant
4597 * @user_data: user data that was specified when the binding was created
4598 * @returns: %TRUE if the conversion succeeded, %FALSE in case of an error
4600 * The type for the function that is used to convert from #GSettings to
4601 * an object property. The @value is already initialized to hold values
4602 * of the appropriate type.
4607 * GSettingsBindSetMapping:
4608 * @value: a #GValue containing the property value to map
4609 * @expected_type: the #GVariantType to create
4610 * @user_data: user data that was specified when the binding was created
4611 * @returns: a new #GVariant holding the data from @value, or %NULL in case of an error
4613 * The type for the function that is used to convert an object property
4614 * value to a #GVariant for storing it in #GSettings.
4619 * GSettingsGetMapping:
4620 * @value: the #GVariant to map, or %NULL
4621 * @result: (out): the result of the mapping
4622 * @user_data: (closure): the user data that was passed to g_settings_get_mapped()
4623 * @returns: %TRUE if the conversion succeeded, %FALSE in case of an error
4625 * The type of the function that is used to convert from a value stored
4626 * in a #GSettings to a value that is useful to the application.
4627 * If the value is successfully mapped, the result should be stored at
4628 * is not in the right format) then %FALSE should be returned.
4629 * If @value is %NULL then it means that the mapping function is being
4630 * given a "last chance" to successfully return a valid value. %TRUE
4631 * must be returned in this case.
4636 * GSignalAccumulator:
4637 * @ihint: Signal invocation hint, see #GSignalInvocationHint.
4638 * @return_accu: Accumulator to collect callback return values in, this is the return value of the current signal emission.
4639 * @handler_return: A #GValue holding the return value of the signal handler.
4640 * @data: Callback data that was specified when creating the signal.
4642 * The signal accumulator is a special callback function that can be used
4643 * to collect return values of the various callbacks that are called
4644 * during a signal emission. The signal accumulator is specified at signal
4645 * creation time, if it is left %NULL, no accumulation of callback return
4646 * values is performed. The return value of signal emissions is then the
4647 * value returned by the last callback.
4648 * should be aborted. Returning %FALSE means to abort the
4649 * current emission and %TRUE is returned for continuation.
4651 * Returns: The accumulator function returns whether the signal emission
4656 * GSignalCMarshaller:
4658 * This is the signature of marshaller functions, required to marshall
4659 * arrays of parameter values to signal emissions into C language callback
4660 * invocations. It is merely an alias to #GClosureMarshal since the #GClosure
4661 * mechanism takes over responsibility of actual function invocation for the
4667 * GSignalEmissionHook:
4668 * @ihint: Signal invocation hint, see #GSignalInvocationHint.
4669 * @n_param_values: the number of parameters to the function, including the instance on which the signal was emitted.
4670 * @param_values: the instance on which the signal was emitted, followed by the parameters of the emission.
4671 * @data: user data associated with the hook.
4673 * A simple function pointer to get invoked when the signal is emitted. This
4674 * allows you to tie a hook to the signal type, so that it will trap all
4675 * emissions of that signal, from any object.
4676 * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.
4677 * hook is disconnected (and destroyed).
4679 * Returns: whether it wants to stay connected. If it returns %FALSE, the signal
4685 * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage.
4686 * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage.
4687 * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage.
4688 * @G_SIGNAL_NO_RECURSE: Signals being emitted for an object while currently being in emission for this very object will not be emitted recursively, but instead cause the first emission to be restarted.
4689 * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name upon handler connections and emissions.
4690 * @G_SIGNAL_ACTION: Action signals are signals that may freely be emitted on alive objects from user code via g_signal_emit() and friends, without the need of being embedded into extra code that performs pre or post emission adjustments on the object. They can also be thought of as object methods which can be called generically by third-party code.
4691 * @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
4692 * @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the arguments, even if there are no signal handlers connected. Since 2.30.
4694 * The signal flags are used to specify a signal's behaviour, the overall
4695 * signal description outlines how especially the RUN flags control the
4696 * stages of a signal emission.
4701 * GSignalInvocationHint:
4702 * @signal_id: The signal id of the signal invoking the callback
4703 * @detail: The detail passed on for this emission
4704 * @run_type: The stage the signal emission is currently in, this field will contain one of %G_SIGNAL_RUN_FIRST, %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP.
4706 * The #GSignalInvocationHint structure is used to pass on additional information
4707 * to callbacks during a signal emission.
4713 * @G_SIGNAL_MATCH_ID: The signal id must be equal.
4714 * @G_SIGNAL_MATCH_DETAIL: The signal detail be equal.
4715 * @G_SIGNAL_MATCH_CLOSURE: The closure must be the same.
4716 * @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same.
4717 * @G_SIGNAL_MATCH_DATA: The closure data must be the same.
4718 * @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may matched.
4720 * The match types specify what g_signal_handlers_block_matched(),
4721 * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
4728 * @signal_id: The signal id of the signal being queried, or 0 if the signal to be queried was unknown.
4729 * @signal_name: The signal name.
4730 * @itype: The interface/instance type that this signal can be emitted for.
4731 * @signal_flags: The signal flags as passed in to g_signal_new().
4732 * @return_type: The return type for user callbacks.
4733 * @n_params: The number of parameters that user callbacks take.
4734 * @param_types: The individual parameter types for user callbacks, note that the effective callback signature is: <programlisting> [#param_types param_names,] #gpointer data2); </programlisting>
4736 * A structure holding in-depth information for a specific signal. It is
4737 * filled in by the g_signal_query() function.
4744 * The <structname>GSimpleAction</structname> structure contains private
4745 * data and should only be accessed using the provided API
4752 * GSimpleAction::activate:
4753 * @simple: the #GSimpleAction
4754 * @parameter: (allow-none): the parameter to the activation
4756 * Indicates that the action was just activated.
4757 * an incorrect type was given, no signal will be emitted.
4764 * GSimpleAction:enabled:
4766 * If @action is currently enabled.
4767 * If the action is disabled then calls to g_simple_action_activate() and
4768 * g_simple_action_set_state() have no effect.
4775 * GSimpleAction:name:
4777 * The name of the action. This is mostly meaningful for identifying
4778 * the action once it has been added to a #GSimpleActionGroup.
4785 * GSimpleAction:parameter-type:
4787 * The type of the parameter that must be given when activating the
4795 * GSimpleAction:state:
4797 * The state of the action, or %NULL if the action is stateless.
4804 * GSimpleAction:state-type:
4806 * The #GVariantType of the state that the action has, or %NULL if the
4807 * action is stateless.
4814 * GSimpleActionClass:
4815 * @activate: the class closure for the activate signal
4824 * GSimpleActionGroup:
4826 * The #GSimpleActionGroup structure contains private data and should only be accessed using the provided API.
4833 * GSimpleAsyncResult:
4835 * A simple implementation of #GAsyncResult.
4840 * GSimpleAsyncThreadFunc:
4841 * @res: a #GSimpleAsyncResult.
4842 * @object: a #GObject.
4843 * @cancellable: optional #GCancellable object, %NULL to ignore.
4845 * Simple thread function that runs an asynchronous operation and
4846 * checks for cancellation.
4851 * GSimplePermission:
4853 * #GSimplePermission is an opaque data structure. There are no methods
4854 * except for those defined by #GPermission.
4861 * A lowlevel network socket object.
4870 * The timeout in seconds on socket I/O
4879 * A socket endpoint address, corresponding to <type>struct sockaddr</type>
4880 * or one of its subtypes.
4885 * GSocketAddressEnumerator:
4887 * Enumerator type for objects that contain or generate
4888 * #GSocketAddress<!-- -->es.
4895 * A helper class for network servers to listen for and accept connections.
4902 * GSocketConnectable:
4904 * Interface for objects that contain or generate #GSocketAddress<!-- -->es.
4909 * GSocketConnectableIface:
4910 * @g_iface: The parent interface.
4911 * @enumerate: Creates a #GSocketAddressEnumerator
4912 * @proxy_enumerate: Creates a #GProxyAddressEnumerator
4914 * Provides an interface for returning a #GSocketAddressEnumerator
4915 * and #GProxyAddressEnumerator
4920 * GSocketConnection:
4922 * A socket connection GIOStream object for connection-oriented sockets.
4929 * GSocketControlMessage:
4931 * Base class for socket-type specific control messages that can be sent and
4932 * received over #GSocket.
4937 * GSocketControlMessageClass:
4938 * @get_size: gets the size of the message.
4939 * @get_level: gets the protocol of the message.
4940 * @get_type: gets the protocol specific type of the message.
4941 * @serialize: Writes out the message data.
4942 * @deserialize: Tries to deserialize a message.
4950 * @G_SOCKET_FAMILY_INVALID: no address family
4951 * @G_SOCKET_FAMILY_IPV4: the IPv4 family
4952 * @G_SOCKET_FAMILY_IPV6: the IPv6 family
4953 * @G_SOCKET_FAMILY_UNIX: the UNIX domain family
4955 * The protocol family of a #GSocketAddress. (These values are
4956 * identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX,
4964 * GSocketListenerClass:
4965 * @changed: virtual method called when the set of socket listened to changes
4973 * @G_SOCKET_MSG_NONE: No flags.
4974 * @G_SOCKET_MSG_OOB: Request to send/receive out of band data.
4975 * @G_SOCKET_MSG_PEEK: Read data from the socket without removing it from the queue.
4976 * @G_SOCKET_MSG_DONTROUTE: Don't use a gateway to send out the packet, only send to hosts on directly connected networks.
4978 * Flags used in g_socket_receive_message() and g_socket_send_message().
4979 * The flags listed in the enum are some commonly available flags, but the
4980 * values used for them are the same as on the platform, and any other flags
4981 * are passed in/out as is. So to use a platform specific flag, just include
4982 * the right system header and pass in the flag.
4990 * @G_SOCKET_PROTOCOL_UNKNOWN: The protocol type is unknown
4991 * @G_SOCKET_PROTOCOL_DEFAULT: The default protocol for the family/type
4992 * @G_SOCKET_PROTOCOL_TCP: TCP over IP
4993 * @G_SOCKET_PROTOCOL_UDP: UDP over IP
4994 * @G_SOCKET_PROTOCOL_SCTP: SCTP over IP
4996 * A protocol identifier is specified when creating a #GSocket, which is a
4997 * family/type specific identifier, where 0 means the default protocol for
4998 * the particular family/type.
4999 * This enum contains a set of commonly available and used protocols. You
5000 * can also pass any other identifiers handled by the platform in order to
5001 * use protocols not listed here.
5010 * A helper class for handling accepting incomming connections in the
5018 * GSocketService::incoming:
5019 * @service: the #GSocketService.
5020 * @connection: a new #GSocketConnection object.
5021 * @source_object: the source_object passed to g_socket_listener_add_address().
5023 * The ::incoming signal is emitted when a new incoming connection
5024 * to @service needs to be handled. The handler must initiate the
5025 * handling of @connection, but may not block; in essence,
5026 * asynchronous operations must be used.
5028 * Returns: %TRUE to stop other handlers from being called
5034 * GSocketServiceClass:
5035 * @incomming: signal emitted when new connections are accepted
5042 * GSocketSourceFunc:
5043 * @socket: the #GSocket
5044 * @condition: the current condition at the source fired.
5045 * @user_data: data passed in by the user.
5047 * This is the function type of the callback used for the #GSource
5048 * returned by g_socket_create_source().
5050 * Returns: it should return %FALSE if the source should be removed.
5057 * @G_SOCKET_TYPE_INVALID: Type unknown or wrong
5058 * @G_SOCKET_TYPE_STREAM: Reliable connection-based byte streams (e.g. TCP).
5059 * @G_SOCKET_TYPE_DATAGRAM: Connectionless, unreliable datagram passing. (e.g. UDP)
5060 * @G_SOCKET_TYPE_SEQPACKET: Reliable connection-based passing of datagrams of fixed maximum length (e.g. SCTP).
5062 * Flags used when creating a #GSocket. Some protocols may not implement
5063 * all the socket types.
5072 * The <structname>GSource</structname> struct is an opaque data type
5073 * representing an event source.
5078 * GSourceCallbackFuncs:
5079 * @ref: Called when a reference is added to the callback object
5080 * @unref: Called when a reference to the callback object is dropped
5081 * @get: Called to extract the callback function and data from the callback object.
5083 * The <structname>GSourceCallbackFuncs</structname> struct contains
5084 * functions for managing callback objects.
5090 * @prepare: Called before all the file descriptors are polled. If the source can determine that it is ready here (without waiting for the results of the poll() call) it should return %TRUE. It can also return a @timeout_ value which should be the maximum timeout (in milliseconds) which should be passed to the poll() call. The actual timeout used will be -1 if all sources returned -1, or it will be the minimum of all the
5091 * @check: Called after all the file descriptors are polled. The source should return %TRUE if it is ready to be dispatched. Note that some time may have passed since the previous prepare function was called, so the source should be checked again here.
5092 * @dispatch: Called to dispatch the event source, after it has returned %TRUE in either its @prepare or its @check function. The @dispatch function is passed in a callback function and data. The callback function may be %NULL if the source was never connected to a callback using g_source_set_callback(). The @dispatch function should call the callback function with @user_data and whatever additional parameters are needed for this type of event source.
5093 * @finalize: Called when the source is finalized.
5095 * The <structname>GSourceFuncs</structname> struct contains a table of
5096 * functions used to handle event sources in a generic manner.
5097 * For idle sources, the prepare and check functions always return %TRUE
5098 * to indicate that the source is always ready to be processed. The prepare
5099 * function also returns a timeout value of 0 to ensure that the poll() call
5100 * doesn't block (since that would be time wasted which could have been spent
5101 * running the idle function).
5102 * For timeout sources, the prepare and check functions both return %TRUE
5103 * if the timeout interval has expired. The prepare function also returns
5104 * a timeout value to ensure that the poll() call doesn't block too long
5105 * and miss the next timeout.
5106 * For file descriptor sources, the prepare function typically returns %FALSE,
5107 * since it must wait until poll() has been called before it knows whether
5108 * any events need to be processed. It sets the returned timeout to -1 to
5109 * indicate that it doesn't mind how long the poll() call blocks. In the
5110 * check function, it tests the results of the poll() call to see if the
5111 * required condition has been met, and returns %TRUE if so.
5118 * A single target host/port that a network service is running on.
5125 * A C representable type name for #G_TYPE_STRV.
5132 * A #GSocketConnection for UNIX domain socket connections.
5139 * GTestLogFatalFunc:
5140 * @log_domain: the log domain of the message
5141 * @log_level: the log level of the message (including the fatal and recursion flags)
5142 * @message: the message to process
5143 * @user_data: user data, set in g_test_log_set_fatal_handler()
5145 * Specifies the prototype of fatal log handler functions.
5147 * Returns: %TRUE if the program should abort, %FALSE otherwise
5155 * An implementation of #GIcon for themed icons.
5167 * GThemedIcon:names:
5169 * A %NULL-terminated array of icon names.
5174 * GThemedIcon:use-default-fallbacks:
5176 * Whether to use the default fallbacks found by shortening the icon name
5177 * at '-' characters. If the "names" array has more than one element,
5178 * ignores any past the first.
5179 * For example, if the icon name was "gnome-dev-cdrom-audio", the array
5183 * "gnome-dev-cdrom-audio",
5184 * "gnome-dev-cdrom",
5194 * GThreadedSocketService:
5196 * A helper class for handling accepting incomming connections in the
5197 * glib mainloop and handling them in a thread.
5204 * GThreadedSocketService::run:
5205 * @service: the #GThreadedSocketService.
5206 * @connection: a new #GSocketConnection object.
5207 * @source_object: the source_object passed to g_socket_listener_add_address().
5209 * The ::run signal is emitted in a worker thread in response to an
5210 * incoming connection. This thread is dedicated to handling
5211 * not return until the connection is closed.
5213 * Returns: %TRUE to stope further signal handlers from being called
5220 * A value representing an interval of time, in microseconds.
5228 * @G_TIME_TYPE_STANDARD: the time is in local standard time
5229 * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time
5230 * @G_TIME_TYPE_UNIVERSAL: the time is in UTC
5232 * Disambiguates a given time in two ways.
5233 * First, specifies if the given time is in universal or local time.
5234 * Second, if the time is in local time, specifies if it is local
5235 * standard time or local daylight time. This is important for the case
5236 * where the same local time occurs twice (during daylight savings time
5237 * transitions, for example).
5242 * GTlsAuthenticationMode:
5243 * @G_TLS_AUTHENTICATION_NONE: client authentication not required
5244 * @G_TLS_AUTHENTICATION_REQUESTED: client authentication is requested
5245 * @G_TLS_AUTHENTICATION_REQUIRED: client authentication is required
5247 * The client authentication mode for a #GTlsServerConnection.
5256 * TLS (Transport Layer Security, aka SSL) backend. This is an
5257 * internal type used to coordinate the different classes implemented
5265 * GTlsBackendInterface:
5266 * @g_iface: The parent interface.
5267 * @get_certificate_type: returns the #GTlsCertificate implementation type
5268 * @get_client_connection_type: returns the #GTlsClientConnection implementation type
5269 * @get_server_connection_type: returns the #GTlsServerConnection implementation type
5271 * Provides an interface for describing TLS-related types.
5280 * Abstract base class for TLS certificate types.
5287 * GTlsCertificate:certificate:
5289 * The DER (binary) encoded representation of the certificate's
5290 * public key. This property and the
5291 * #GTlsCertificate:certificate-pem property represent the same
5292 * data, just in different forms.
5299 * GTlsCertificate:certificate-pem:
5301 * The PEM (ASCII) encoded representation of the certificate's
5302 * public key. This property and the #GTlsCertificate:certificate
5303 * property represent the same data, just in different forms.
5310 * GTlsCertificate:issuer:
5312 * A #GTlsCertificate representing the entity that issued this
5313 * certificate. If %NULL, this means that the certificate is either
5314 * self-signed, or else the certificate of the issuer is not
5322 * GTlsCertificate:private-key:
5324 * The DER (binary) encoded representation of the certificate's
5325 * private key. This property (or the
5326 * #GTlsCertificate:private-key-pem property) can be set when
5327 * constructing a key (eg, from a file), but cannot be read.
5334 * GTlsCertificate:private-key-pem:
5336 * The PEM (ASCII) encoded representation of the certificate's
5337 * private key. This property (or the #GTlsCertificate:private-key
5338 * property) can be set when constructing a key (eg, from a file),
5339 * but cannot be read.
5346 * GTlsCertificateFlags:
5347 * @G_TLS_CERTIFICATE_UNKNOWN_CA: The signing certificate authority is not known.
5348 * @G_TLS_CERTIFICATE_BAD_IDENTITY: The certificate does not match the expected identity of the site that it was retrieved from.
5349 * @G_TLS_CERTIFICATE_NOT_ACTIVATED: The certificate's activation time is still in the future
5350 * @G_TLS_CERTIFICATE_EXPIRED: The certificate has expired
5351 * @G_TLS_CERTIFICATE_REVOKED: The certificate has been revoked according to the #GTlsContext's certificate revocation list.
5352 * @G_TLS_CERTIFICATE_INSECURE: The certificate's algorithm is considered insecure.
5353 * @G_TLS_CERTIFICATE_GENERIC_ERROR: Some other error occurred validating the certificate
5354 * @G_TLS_CERTIFICATE_VALIDATE_ALL: the combination of all of the above flags
5356 * A set of flags describing TLS certification validation. This can be
5357 * used to set which validation steps to perform (eg, with
5358 * g_tls_client_connection_set_validation_flags()), or to describe why
5359 * a particular certificate was rejected (eg, in
5360 * #GTlsConnection::accept-certificate).
5367 * GTlsClientConnection:
5369 * TLS client-side connection; the client-side implementation of a
5377 * GTlsClientConnection:accepted-cas:
5379 * A list of the distinguished names of the Certificate Authorities
5380 * that the server will accept client certificates signed by. If the
5381 * server requests a client certificate during the handshake, then
5382 * this property will be set after the handshake completes.
5383 * Each item in the list is a #GByteArray which contains the complete
5384 * subject DN of the certificate authority.
5391 * GTlsClientConnection:server-identity:
5393 * A #GSocketConnectable describing the identity of the server that
5394 * is expected on the other end of the connection.
5395 * If the %G_TLS_CERTIFICATE_BAD_IDENTITY flag is set in
5396 * #GTlsClientConnection:validation-flags, this object will be used
5397 * to determine the expected identify of the remote end of the
5398 * connection; if #GTlsClientConnection:server-identity is not set,
5399 * or does not match the identity presented by the server, then the
5400 * %G_TLS_CERTIFICATE_BAD_IDENTITY validation will fail.
5401 * In addition to its use in verifying the server certificate,
5402 * this is also used to give a hint to the server about what
5403 * certificate we expect, which is useful for servers that serve
5411 * GTlsClientConnection:use-ssl3:
5413 * If %TRUE, tells the connection to use SSL 3.0 rather than trying
5414 * to negotiate the best version of TLS or SSL to use. This can be
5415 * used when talking to servers that don't implement version
5416 * negotiation correctly and therefore refuse to handshake at all with
5417 * a "modern" TLS handshake.
5424 * GTlsClientConnection:validation-flags:
5426 * What steps to perform when validating a certificate received from
5427 * a server. Server certificates that fail to validate in all of the
5428 * ways indicated here will be rejected unless the application
5429 * overrides the default via #GTlsConnection::accept-certificate.
5438 * TLS connection. This is an abstract type that will be subclassed by
5439 * a TLS-library-specific subtype.
5446 * GTlsConnection::accept-certificate:
5447 * @conn: a #GTlsConnection
5448 * @peer_cert: the peer's #GTlsCertificate
5449 * @errors: the problems with @peer_cert.
5451 * Emitted during the TLS handshake after the peer certificate has
5452 * been received. You can examine @peer_cert's certification path by
5453 * calling g_tls_certificate_get_issuer() on it.
5454 * For a client-side connection, @peer_cert is the server's
5455 * certificate, and the signal will only be emitted if the
5456 * certificate was not acceptable according to @conn's
5457 * #GTlsClientConnection:validation_flags. If you would like the
5458 * certificate to be accepted despite @errors, return %TRUE from the
5459 * signal handler. Otherwise, if no handler accepts the certificate,
5460 * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE.
5461 * For a server-side connection, @peer_cert is the certificate
5462 * presented by the client, if this was requested via the server's
5463 * #GTlsServerConnection:authentication_mode. On the server side,
5464 * the signal is always emitted when the client presents a
5465 * certificate, and the certificate will only be accepted if a
5466 * handler returns %TRUE.
5467 * Note that if this signal is emitted as part of asynchronous I/O
5468 * in the main thread, then you should not attempt to interact with
5469 * the user before returning from the signal handler. If you want to
5470 * let the user decide whether or not to accept the certificate, you
5471 * would have to return %FALSE from the signal handler on the first
5472 * attempt, and then after the connection attempt returns a
5473 * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if
5474 * the user decides to accept the certificate, remember that fact,
5475 * create a new connection, and return %TRUE from the signal handler
5477 * If you are doing I/O in another thread, you do not
5478 * need to worry about this, and can simply block in the signal
5479 * handler until the UI thread returns an answer.
5480 * immediately end the signal emission). %FALSE to allow the signal
5481 * emission to continue, which will cause the handshake to fail if
5482 * no one else overrides it.
5484 * Returns: %TRUE to accept @peer_cert (which will also
5490 * GTlsConnection:base-io-stream:
5492 * The #GIOStream that the connection wraps
5499 * GTlsConnection:certificate:
5501 * The connection's certificate; see
5502 * g_tls_connection_set_certificate().
5509 * GTlsConnection:peer-certificate:
5511 * The connection's peer's certificate, after the TLS handshake has
5512 * completed and the certificate has been accepted. Note in
5513 * particular that this is not yet set during the emission of
5514 * #GTlsConnection::accept-certificate.
5515 * (You can watch for a #GObject::notify signal on this property to
5516 * detect when a handshake has occurred.)
5523 * GTlsConnection:peer-certificate-errors:
5525 * The errors noticed-and-ignored while verifying
5526 * #GTlsConnection:peer-certificate. Normally this should be %0, but
5527 * it may not be if #GTlsClientConnection::validation-flags is not
5528 * %G_TLS_CERTIFICATE_VALIDATE_ALL, or if
5529 * #GTlsConnection::accept-certificate overrode the default
5537 * GTlsConnection:rehandshake-mode:
5539 * The rehandshaking mode. See
5540 * g_tls_connection_set_rehandshake_mode().
5547 * GTlsConnection:require-close-notify:
5549 * Whether or not proper TLS close notification is required.
5550 * See g_tls_connection_set_require_close_notify().
5557 * GTlsConnection:use-system-certdb:
5559 * Whether or not the system certificate database will be used to
5560 * verify peer certificates. See
5561 * g_tls_connection_set_use_system_certdb().
5569 * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available
5570 * @G_TLS_ERROR_MISC: Miscellaneous TLS error
5571 * @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed
5572 * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the peer does not seem to be a TLS server.
5573 * @G_TLS_ERROR_HANDSHAKE: The TLS handshake failed because the peer's certificate was not acceptable.
5574 * @G_TLS_ERROR_CERTIFICATE_REQUIRED: The TLS handshake failed because the server requested a client-side certificate, but none was provided. See g_tls_connection_set_certificate().
5575 * @G_TLS_ERROR_EOF: The TLS connection was closed without proper notice, which may indicate an attack. See g_tls_connection_set_require_close_notify().
5577 * An error code used with %G_TLS_ERROR in a #GError returned from a
5578 * TLS-related routine.
5585 * GTlsRehandshakeMode:
5586 * @G_TLS_REHANDSHAKE_NEVER: Never allow rehandshaking
5587 * @G_TLS_REHANDSHAKE_SAFELY: Allow safe rehandshaking only
5588 * @G_TLS_REHANDSHAKE_UNSAFELY: Allow unsafe rehandshaking
5590 * When to allow rehandshaking. See
5591 * g_tls_connection_set_rehandshake_mode().
5598 * GTlsServerConnection:
5600 * TLS server-side connection. This is the server-side implementation
5601 * of a #GTlsConnection.
5608 * GTlsServerConnection:authentication-mode:
5610 * The #GTlsAuthenticationMode for the server. This can be changed
5611 * before calling g_tls_connection_handshake() if you want to
5612 * rehandshake with a different mode from the initial handshake.
5620 * @data: Callback data passed to g_object_add_toggle_ref()
5621 * @object: The object on which g_object_add_toggle_ref() was called.
5622 * @is_last_ref: %TRUE if the toggle reference is now the last reference to the object. %FALSE if the toggle reference was the last reference and there are now other references.
5624 * A callback function used for notification when the state
5625 * of a toggle reference changes. See g_object_add_toggle_ref().
5631 * @str: the untranslated string
5632 * @data: user data specified when installing the function, e.g. in g_option_group_set_translate_func()
5634 * The type of functions which are used to translate user-visible
5635 * strings, for <option>--help</option> output.
5636 * The returned string is owned by GLib and must not be freed.
5638 * Returns: a translation of the string for the current locale.
5645 * A numerical value which represents the unique identifier of a registered
5653 * An opaque structure used as the base of all classes.
5658 * GTypeClassCacheFunc:
5659 * @cache_data: data that was given to the g_type_add_class_cache_func() call
5660 * @g_class: The #GTypeClass structure which is unreferenced
5662 * A callback function which is called when the reference count of a class
5663 * drops to zero. It may use g_type_class_ref() to prevent the class from
5664 * being freed. You should not call g_type_class_unref() from a
5665 * #GTypeClassCacheFunc function to prevent infinite recursion, use
5666 * g_type_class_unref_uncached() instead.
5667 * The functions have to check the class id passed in to figure
5668 * whether they actually want to cache the class of this type, since all
5669 * classes are routed through the same #GTypeClassCacheFunc chain.
5670 * called, %FALSE to continue.
5672 * Returns: %TRUE to stop further #GTypeClassCacheFunc<!-- -->s from being
5678 * @G_TYPE_DEBUG_NONE: Print no messages.
5679 * @G_TYPE_DEBUG_OBJECTS: Print messages about object bookkeeping.
5680 * @G_TYPE_DEBUG_SIGNALS: Print messages about signal emissions.
5681 * @G_TYPE_DEBUG_MASK: Mask covering all debug flags.
5683 * The <type>GTypeDebugFlags</type> enumeration values can be passed to
5684 * g_type_init_with_debug_flags() to trigger debugging messages during runtime.
5685 * Note that the messages can also be triggered by setting the
5686 * <envar>GOBJECT_DEBUG</envar> environment variable to a ':'-separated list of
5687 * "objects" and "signals".
5693 * @G_TYPE_FLAG_ABSTRACT: Indicates an abstract type. No instances can be created for an abstract type.
5694 * @G_TYPE_FLAG_VALUE_ABSTRACT: Indicates an abstract value type, i.e. a type that introduces a value table, but can't be used for g_value_init().
5696 * Bit masks used to check or determine characteristics of a type.
5701 * GTypeFundamentalFlags:
5702 * @G_TYPE_FLAG_CLASSED: Indicates a classed type.
5703 * @G_TYPE_FLAG_INSTANTIATABLE: Indicates an instantiable type (implies classed).
5704 * @G_TYPE_FLAG_DERIVABLE: Indicates a flat derivable type.
5705 * @G_TYPE_FLAG_DEEP_DERIVABLE: Indicates a deep derivable type (implies derivable).
5707 * Bit masks used to check or determine specific characteristics of a
5713 * GTypeFundamentalInfo:
5714 * @type_flags: #GTypeFundamentalFlags describing the characteristics of the fundamental type
5716 * A structure that provides information to the type system which is
5717 * used specifically for managing fundamental types.
5723 * @class_size: Size of the class structure (required for interface, classed and instantiatable types).
5724 * @base_init: Location of the base initialization function (optional).
5725 * @base_finalize: Location of the base finalization function (optional).
5726 * @class_init: Location of the class initialization function for classed and instantiatable types. Location of the default vtable inititalization function for interface types. (optional) This function is used both to fill in virtual functions in the class or default vtable, and to do type-specific setup such as registering signals and object properties.
5727 * @class_finalize: Location of the class finalization function for classed and instantiatable types. Location fo the default vtable finalization function for interface types. (optional)
5728 * @class_data: User-supplied data passed to the class init/finalize functions.
5729 * @instance_size: Size of the instance (object) structure (required for instantiatable types only).
5730 * @n_preallocs: Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
5731 * @instance_init: Location of the instance initialization function (optional, for instantiatable types only).
5732 * @value_table: A #GTypeValueTable function table for generic handling of GValues of this type (usually only useful for fundamental types).
5734 * This structure is used to provide the type system with the information
5735 * required to initialize and destruct (finalize) a type's class and
5737 * The initialized structure is passed to the g_type_register_static() function
5738 * (or is copied into the provided #GTypeInfo structure in the
5739 * g_type_plugin_complete_type_info()). The type system will perform a deep
5740 * copy of this structure, so its memory does not need to be persistent
5741 * across invocation of g_type_register_static().
5748 * An opaque structure used as the base of all type instances.
5755 * An opaque structure used as the base of all interface types.
5760 * GTypeInterfaceCheckFunc:
5761 * @check_data: data passed to g_type_add_interface_check().
5762 * @g_iface: the interface that has been initialized
5764 * A callback called after an interface vtable is initialized.
5765 * See g_type_add_interface_check().
5773 * @name: the name of the module
5775 * The members of the <structname>GTypeModule</structname> structure should not
5776 * be accessed directly, except for the @name field.
5782 * @parent_class: the parent class
5783 * @load: loads the module and registers one or more types using g_type_module_register_type().
5784 * @unload: unloads the module
5786 * In order to implement dynamic loading of types based on #GTypeModule,
5787 * the @load and @unload functions in #GTypeModuleClass must be implemented.
5794 * The <structname>GTypePlugin</structname> typedef is used as a placeholder
5795 * for objects that implement the <structname>GTypePlugin</structname>
5802 * @use_plugin: Increases the use count of the plugin.
5803 * @unuse_plugin: Decreases the use count of the plugin.
5804 * @complete_type_info: Fills in the #GTypeInfo and #GTypeValueTable structs for the type. The structs are initialized with <literal>memset(s, 0, sizeof (s))</literal> before calling this function.
5805 * @complete_interface_info: Fills in missing parts of the #GInterfaceInfo for the interface. The structs is initialized with <literal>memset(s, 0, sizeof (s))</literal> before calling this function.
5807 * The #GTypePlugin interface is used by the type system in order to handle
5808 * the lifecycle of dynamically loaded types.
5813 * GTypePluginCompleteInterfaceInfo:
5814 * @plugin: the #GTypePlugin
5815 * @instance_type: the #GType of an instantiable type to which the interface is added
5816 * @interface_type: the #GType of the interface whose info is completed
5817 * @info: the #GInterfaceInfo to fill in
5819 * The type of the @complete_interface_info function of #GTypePluginClass.
5824 * GTypePluginCompleteTypeInfo:
5825 * @plugin: the #GTypePlugin
5826 * @g_type: the #GType whose info is completed
5827 * @info: the #GTypeInfo struct to fill in
5828 * @value_table: the #GTypeValueTable to fill in
5830 * The type of the @complete_type_info function of #GTypePluginClass.
5836 * @plugin: the #GTypePlugin whose use count should be decreased
5838 * The type of the @unuse_plugin function of #GTypePluginClass.
5844 * @plugin: the #GTypePlugin whose use count should be increased
5846 * The type of the @use_plugin function of #GTypePluginClass, which gets called
5847 * to increase the use count of @plugin.
5853 * @type: the #GType value of the type.
5854 * @type_name: the name of the type.
5855 * @class_size: the size of the class structure.
5856 * @instance_size: the size of the instance structure.
5858 * A structure holding information for a specific type. It is
5859 * filled in by the g_type_query() function.
5865 * @value_init: Default initialize @values contents by poking values directly into the value->data array. The data array of the #GValue passed into this function was zero-filled with <function>memset()</function>, so no care has to be taken to free any old contents. E.g. for the implementation of a string value that may never be %NULL, the implementation might look like: |[ value->data[0].v_pointer = g_strdup (""); ]|
5866 * @value_free: Free any old contents that might be left in the data array of the passed in @value. No resources may remain allocated through the #GValue contents after this function returns. E.g. for our above string type: |[ // only free strings without a specific flag for static storage if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)) g_free (value->data[0].v_pointer); ]|
5867 * @value_copy: @dest_value is a #GValue with zero-filled data section and @src_value is a properly setup #GValue of same or derived type. The purpose of this function is to copy the contents of remain valid. String type example: |[ dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer); ]|
5868 * @value_peek_pointer: If the value contents fit into a pointer, such as objects or strings, return this pointer, so the caller can peek at the current contents. To extend on our above string example: |[ return value->data[0].v_pointer; ]|
5869 * @collect_format: A string format describing how to collect the contents of this value bit-by-bit. Each character in the format represents an argument to be collected, and the characters themselves indicate the type of the argument. Currently supported arguments are: <variablelist> <varlistentry><term /><listitem><para> 'i' - Integers. passed as collect_values[].v_int. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'l' - Longs. passed as collect_values[].v_long. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'd' - Doubles. passed as collect_values[].v_double. </para></listitem></varlistentry> <varlistentry><term /><listitem><para> 'p' - Pointers. passed as collect_values[].v_pointer. </para></listitem></varlistentry> </variablelist> It should be noted that for variable argument list construction, ANSI C promotes every type smaller than an integer to an int, and floats to doubles. So for collection of short int or char, 'i' needs to be used, and for collection of floats 'd'.
5870 * @collect_value: The collect_value() function is responsible for converting the values collected from a variable argument list into contents suitable for storage in a GValue. This function should setup does not allow %NULL pointers, it needs to either spew an error, or do an implicit conversion by storing an empty string. The @value passed in to this function has a zero-filled data array, so just like for value_init() it is guaranteed to not contain any old contents that might need freeing. and @collect_values is an array of unions #GTypeCValue with length @n_collect_values, containing the collected values according to @collect_format. It may contain the flag %G_VALUE_NOCOPY_CONTENTS indicating, that the collected value contents may be considered "static" for the duration of the @value lifetime. Thus an extra copy of the contents stored in @collect_values is not required for assignment to @value. For our above string example, we continue with: |[ if (!collect_values[0].v_pointer) value->data[0].v_pointer = g_strdup (""); else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { value->data[0].v_pointer = collect_values[0].v_pointer; // keep a flag for the value_free() implementation to not free this string value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS; } else value->data[0].v_pointer = g_strdup (collect_values[0].v_pointer); return NULL; ]| It should be noted, that it is generally a bad idea to follow the #G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to reentrancy requirements and reference count assertions performed by the #GSignal code, reference counts should always be incremented for reference counted contents stored in the value->data array. To deviate from our string example for a moment, and taking a look at an exemplary implementation for collect_value() of #GObject: |[ if (collect_values[0].v_pointer) { GObject *object = G_OBJECT (collect_values[0].v_pointer); // never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types value->data[0].v_pointer = g_object_ref (object); return NULL; } else return g_strdup_printf ("Object passed as invalid NULL pointer"); } ]| The reference count for valid objects is always incremented, regardless of @collect_flags. For invalid objects, the example returns a newly allocated string without altering @value. Upon success, collect_value() needs to return %NULL. If, however, an error condition occurred, collect_value() may spew an error by returning a newly allocated non-%NULL string, giving a suitable description of the error condition. The calling code makes no assumptions about the @value contents being valid upon error returns, @value is simply thrown away without further freeing. As such, it is a good idea to not allocate #GValue contents, prior to returning an error, however, collect_values() is not obliged to return a correctly setup @value for error returns, simply because any non-%NULL return is considered a fatal condition so further program behaviour is undefined.
5871 * @lcopy_format: Format description of the arguments to collect for @lcopy_value, analogous to @collect_format. Usually, @lcopy_format string consists only of 'p's to provide lcopy_value() with pointers to storage locations.
5872 * @lcopy_value: This function is responsible for storing the @value contents into arguments passed through a variable argument list which got collected into @collect_values according to @lcopy_format. and @collect_flags may contain %G_VALUE_NOCOPY_CONTENTS. In contrast to collect_value(), lcopy_value() is obliged to always properly support %G_VALUE_NOCOPY_CONTENTS. Similar to collect_value() the function may prematurely abort by returning a newly allocated string describing an error condition. To complete the string example: |[ gchar **string_p = collect_values[0].v_pointer; if (!string_p) return g_strdup_printf ("string location passed as NULL"); if (collect_flags & G_VALUE_NOCOPY_CONTENTS) *string_p = value->data[0].v_pointer; else *string_p = g_strdup (value->data[0].v_pointer); ]| And an illustrative version of lcopy_value() for reference-counted types: |[ GObject **object_p = collect_values[0].v_pointer; if (!object_p) return g_strdup_printf ("object location passed as NULL"); if (!value->data[0].v_pointer) *object_p = NULL; else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) /* always honour */ *object_p = value->data[0].v_pointer; else *object_p = g_object_ref (value->data[0].v_pointer); return NULL; ]|
5874 * The #GTypeValueTable provides the functions required by the #GValue implementation,
5875 * to serve as a container for values of a type.
5880 * GUnixCredentialsMessage:
5882 * The #GUnixCredentialsMessage structure contains only private data
5883 * and should only be accessed using the provided API.
5890 * GUnixCredentialsMessage:credentials:
5892 * The credentials stored in the message.
5899 * GUnixCredentialsMessageClass:
5901 * Class structure for #GUnixCredentialsMessage.
5910 * Implements #GInputStream for reading from selectable unix file descriptors
5915 * GUnixInputStream:close-fd:
5917 * Whether to close the file descriptor when the stream is closed.
5924 * GUnixInputStream:fd:
5926 * The file descriptor that the stream reads from.
5935 * Implementation of the #GMount interface for Unix systems.
5942 * Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>).
5943 * This corresponds roughly to a mtab entry.
5948 * GUnixMountMonitor:
5950 * Watches #GUnixMount<!-- -->s for changes.
5955 * GUnixMountMonitor::mountpoints-changed:
5956 * @monitor: the object on which the signal is emitted
5958 * Emitted when the unix mount points have changed.
5963 * GUnixMountMonitor::mounts-changed:
5964 * @monitor: the object on which the signal is emitted
5966 * Emitted when the unix mounts have changed.
5973 * Defines a Unix mount point (e.g. <filename>/dev</filename>).
5974 * This corresponds roughly to a fstab entry.
5979 * GUnixOutputStream:
5981 * Implements #GOutputStream for outputting to selectable unix file descriptors
5986 * GUnixOutputStream:close-fd:
5988 * Whether to close the file descriptor when the stream is closed.
5995 * GUnixOutputStream:fd:
5997 * The file descriptor that the stream writes to.
6004 * GUnixSocketAddress:
6006 * A UNIX-domain (local) socket address, corresponding to a
6007 * <type>struct sockaddr_un</type>.
6012 * GUnixSocketAddress:abstract:
6014 * Whether or not this is an abstract address
6015 * distinguishes between zero-padded and non-zero-padded
6016 * abstract addresses.
6018 * Deprecated: Use #GUnixSocketAddress:address-type, which
6023 * GUnixSocketAddressType:
6024 * @G_UNIX_SOCKET_ADDRESS_INVALID: invalid
6025 * @G_UNIX_SOCKET_ADDRESS_ANONYMOUS: anonymous
6026 * @G_UNIX_SOCKET_ADDRESS_PATH: a filesystem path
6027 * @G_UNIX_SOCKET_ADDRESS_ABSTRACT: an abstract name
6028 * @G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED: an abstract name, 0-padded to the full length of a unix socket name
6030 * The type of name used by a #GUnixSocketAddress.
6031 * %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain
6032 * socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS
6033 * indicates a socket not bound to any name (eg, a client-side socket,
6034 * or a socket created with socketpair()).
6035 * For abstract sockets, there are two incompatible ways of naming
6036 * them; the man pages suggest using the entire <literal>struct
6037 * sockaddr_un</literal> as the name, padding the unused parts of the
6038 * %sun_path field with zeroes; this corresponds to
6039 * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED. However, many programs
6040 * instead just use a portion of %sun_path, and pass an appropriate
6041 * smaller length to bind() or connect(). This is
6042 * %G_UNIX_SOCKET_ADDRESS_ABSTRACT.
6050 * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory
6051 * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory
6052 * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory
6053 * @G_USER_DIRECTORY_MUSIC: the user's Music directory
6054 * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory
6055 * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory
6056 * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory
6057 * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory
6058 * @G_USER_N_DIRECTORIES: the number of enum values
6060 * These are logical ids for special directories which are defined
6061 * depending on the platform used. You should use g_get_user_special_dir()
6062 * to retrieve the full path associated to the logical id.
6063 * The #GUserDirectory enumeration can be extended at later date. Not
6064 * every platform has a directory for every logical id in this
6074 * An opaque structure used to hold different types of values.
6075 * to functions within a #GTypeValueTable structure, or implementations of
6076 * the g_value_*() API. That is, code portions which implement new fundamental
6078 * #GValue users cannot make any assumptions about how data is stored
6079 * within the 2 element @data union, and the @g_type member should
6080 * only be accessed through the G_VALUE_TYPE() macro.
6082 * The data within the structure has protected scope: it is accessible only
6088 * @n_values: number of values contained in the array
6089 * @values: array of values
6091 * A #GValueArray contains an array of #GValue elements.
6097 * @src_value: Source value.
6098 * @dest_value: Target value.
6100 * The type of value transformation functions which can be registered with
6101 * g_value_register_transform_func().
6108 * A type in the GVariant type system.
6109 * Two types may not be compared by value; use g_variant_type_equal() or
6110 * g_variant_type_is_subtype_of(). May be copied using
6111 * g_variant_type_copy() and freed using g_variant_type_free().
6118 * Virtual File System object.
6125 * Opaque mountable volume object.
6132 * Emitted when the volume has been changed.
6139 * This signal is emitted when the #GVolume have been removed. If
6140 * the recipient is holding references to the object they should
6141 * release them so the object can be finalized.
6147 * @g_iface: The parent interface.
6148 * @changed: Changed signal that is emitted when the volume's state has changed.
6149 * @removed: The removed signal that is emitted when the #GVolume have been removed. If the recipient is holding references to the object they should release them so the object can be finalized.
6150 * @get_name: Gets a string containing the name of the #GVolume.
6151 * @get_icon: Gets a #GIcon for the #GVolume.
6152 * @get_uuid: Gets the UUID for the #GVolume. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available.
6153 * @get_drive: Gets a #GDrive the volume is located on. Returns %NULL if the #GVolume is not associated with a #GDrive.
6154 * @get_mount: Gets a #GMount representing the mounted volume. Returns %NULL if the #GVolume is not mounted.
6155 * @can_mount: Returns %TRUE if the #GVolume can be mounted.
6156 * @can_eject: Checks if a #GVolume can be ejected.
6157 * @mount_fn: Mounts a given #GVolume. #GVolume implementations must emit the #GMountOperation::aborted signal before completing a mount operation that is aborted while awaiting input from the user through a #GMountOperation instance.
6158 * @mount_finish: Finishes a mount operation.
6159 * @eject: Ejects a given #GVolume.
6160 * @eject_finish: Finishes an eject operation.
6161 * @get_identifier: Returns the <link linkend="volume-identifier">identifier</link> of the given kind, or %NULL if the #GVolume doesn't have one.
6162 * @enumerate_identifiers: Returns an array strings listing the kinds of <link linkend="volume-identifier">identifiers</link> which the #GVolume has.
6163 * @should_automount: Returns %TRUE if the #GVolume should be automatically mounted.
6164 * @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if it is not known.
6165 * @eject_with_operation: Starts ejecting a #GVolume using a #GMountOperation. Since 2.22.
6166 * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
6168 * Interface for implementing operations for mountable volumes.
6175 * A Volume Monitor that watches for volume events.
6180 * GVolumeMonitor::drive-changed:
6181 * @volume_monitor: The volume monitor emitting the signal.
6182 * @drive: the drive that changed
6184 * Emitted when a drive changes.
6189 * GVolumeMonitor::drive-connected:
6190 * @volume_monitor: The volume monitor emitting the signal.
6191 * @drive: a #GDrive that was connected.
6193 * Emitted when a drive is connected to the system.
6198 * GVolumeMonitor::drive-disconnected:
6199 * @volume_monitor: The volume monitor emitting the signal.
6200 * @drive: a #GDrive that was disconnected.
6202 * Emitted when a drive is disconnected from the system.
6207 * GVolumeMonitor::drive-eject-button:
6208 * @volume_monitor: The volume monitor emitting the signal.
6209 * @drive: the drive where the eject button was pressed
6211 * Emitted when the eject button is pressed on @drive.
6218 * GVolumeMonitor::drive-stop-button:
6219 * @volume_monitor: The volume monitor emitting the signal.
6220 * @drive: the drive where the stop button was pressed
6222 * Emitted when the stop button is pressed on @drive.
6229 * GVolumeMonitor::mount-added:
6230 * @volume_monitor: The volume monitor emitting the signal.
6231 * @mount: a #GMount that was added.
6233 * Emitted when a mount is added.
6238 * GVolumeMonitor::mount-changed:
6239 * @volume_monitor: The volume monitor emitting the signal.
6240 * @mount: a #GMount that changed.
6242 * Emitted when a mount changes.
6247 * GVolumeMonitor::mount-pre-unmount:
6248 * @volume_monitor: The volume monitor emitting the signal.
6249 * @mount: a #GMount that is being unmounted.
6251 * Emitted when a mount is about to be removed.
6256 * GVolumeMonitor::mount-removed:
6257 * @volume_monitor: The volume monitor emitting the signal.
6258 * @mount: a #GMount that was removed.
6260 * Emitted when a mount is removed.
6265 * GVolumeMonitor::volume-added:
6266 * @volume_monitor: The volume monitor emitting the signal.
6267 * @volume: a #GVolume that was added.
6269 * Emitted when a mountable volume is added to the system.
6274 * GVolumeMonitor::volume-changed:
6275 * @volume_monitor: The volume monitor emitting the signal.
6276 * @volume: a #GVolume that changed.
6278 * Emitted when mountable volume is changed.
6283 * GVolumeMonitor::volume-removed:
6284 * @volume_monitor: The volume monitor emitting the signal.
6285 * @volume: a #GVolume that was removed.
6287 * Emitted when a mountable volume is removed from the system.
6293 * @data: data that was provided when the weak reference was established
6294 * @where_the_object_was: the object being finalized
6296 * A #GWeakNotify function can be added to an object as a callback that gets
6297 * triggered when the object is finalized. Since the object is already being
6298 * finalized when the #GWeakNotify is called, there's not much you could do
6299 * with the object, apart from e.g. using its adress as hash-index or the like.
6304 * GWin32InputStream:
6306 * Implements #GInputStream for reading from selectable Windows file handles
6311 * GWin32InputStream:close-handle:
6313 * Whether to close the file handle when the stream is closed.
6320 * GWin32InputStream:handle:
6322 * The handle that the stream reads from.
6331 * Implementation of the #GMount interface for Win32 systems.
6336 * GWin32OutputStream:
6338 * Implements #GOutputStream for outputting to Windows file handles
6343 * GWin32OutputStream:close-handle:
6345 * Whether to close the file handle when the stream is closed.
6352 * GWin32OutputStream:handle:
6354 * The file handle that the stream writes to.
6363 * Zlib decompression
6368 * GZlibCompressor:file-info:
6370 * If set to a non-%NULL #GFileInfo object, and #GZlibCompressor:format is
6371 * %G_ZLIB_COMPRESSOR_FORMAT_GZIP, the compressor will write the file name
6372 * and modification time from the file info to the the GZIP header.
6379 * GZlibCompressorFormat:
6380 * @G_ZLIB_COMPRESSOR_FORMAT_ZLIB: deflate compression with zlib header
6381 * @G_ZLIB_COMPRESSOR_FORMAT_GZIP: gzip file format
6382 * @G_ZLIB_COMPRESSOR_FORMAT_RAW: deflate compression with no header
6384 * Used to select the type of data format to use for #GZlibDecompressor
6385 * and #GZlibCompressor.
6392 * GZlibDecompressor:
6394 * Zlib decompression
6399 * GZlibDecompressor:file-info:
6401 * A #GFileInfo containing the information found in the GZIP header
6402 * of the data stream processed, or %NULL if the header was not yet
6403 * fully processed, is not present at all, or the compressor's
6404 * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP.
6411 * G_BOOKMARK_FILE_ERROR:
6413 * Error domain for bookmark file parsing.
6414 * Errors in this domain will be from the #GBookmarkFileError
6415 * enumeration. See #GError for information on error domains.
6421 * @f: a function pointer.
6423 * Cast a function pointer to a #GCallback.
6428 * G_CCLOSURE_SWAP_DATA:
6429 * @cclosure: a #GCClosure
6431 * Checks whether the user data of the #GCClosure should be passed as the
6432 * first parameter to the callback. See g_cclosure_new_swap().
6434 * Returns: %TRUE if data has to be swapped.
6439 * G_CLOSURE_NEEDS_MARSHAL:
6440 * @closure: a #GClosure
6442 * Check if the closure still needs a marshaller. See g_closure_set_marshal().
6444 * Returns: %TRUE if a #GClosureMarshal marshaller has not yet been set on
6449 * G_CLOSURE_N_NOTIFIERS:
6452 * Get the total number of notifiers connected with the closure @cl.
6453 * The count includes the meta marshaller, the finalize and invalidate notifiers
6454 * and the marshal guards. Note that each guard counts as two notifiers.
6455 * See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(),
6456 * g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().
6458 * Returns: number of notifiers
6465 * Error domain for character set conversions. Errors in this domain will
6466 * be from the #GConvertError enumeration. See #GError for information on
6472 * G_DATALIST_FLAGS_MASK:
6474 * A bitmask that restricts the possible flags passed to
6475 * g_datalist_set_flags(). Passing a flags value where
6476 * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.
6483 * Error domain for errors generated by a remote message bus. Errors
6484 * in this domain will be from the #GDBusError enumeration. See
6485 * #GError for more information on error domains.
6486 * Note that errors in this error domain is intended only for
6487 * returning errors from a remote message bus process. Errors
6488 * generated locally in-process by e.g. #GDBusConnection is from the
6489 * %G_IO_ERROR domain.
6496 * G_DEFINE_ABSTRACT_TYPE:
6497 * @TN: The name of the new type, in Camel case.
6498 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6499 * @T_P: The #GType of the parent type.
6501 * A convenience macro for type implementations.
6502 * Similar to G_DEFINE_TYPE(), but defines an abstract type.
6503 * See G_DEFINE_TYPE_EXTENDED() for an example.
6510 * G_DEFINE_ABSTRACT_TYPE_WITH_CODE:
6511 * @TN: The name of the new type, in Camel case.
6512 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6513 * @T_P: The #GType of the parent type.
6514 * @_C_: Custom code that gets inserted in the @type_name_get_type() function.
6516 * A convenience macro for type implementations.
6517 * Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and allows you to
6518 * insert custom code into the *_get_type() function, e.g. interface implementations
6519 * via G_IMPLEMENT_INTERFACE(). See G_DEFINE_TYPE_EXTENDED() for an example.
6526 * G_DEFINE_BOXED_TYPE:
6527 * @TypeName: The name of the new type, in Camel case.
6528 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6529 * @copy_func: the #GBoxedCopyFunc for the new type
6530 * @free_func: the #GBoxedFreeFunc for the new type
6532 * A convenience macro for boxed type implementations, which defines a
6533 * type_name_get_type() function registering the boxed type.
6540 * G_DEFINE_BOXED_TYPE_WITH_CODE:
6541 * @TypeName: The name of the new type, in Camel case.
6542 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6543 * @copy_func: the #GBoxedCopyFunc for the new type
6544 * @free_func: the #GBoxedFreeFunc for the new type
6545 * @_C_: Custom code that gets inserted in the *_get_type() function.
6547 * A convenience macro for boxed type implementations.
6548 * Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the
6549 * type_name_get_type() function, e.g. to register value transformations with
6550 * g_value_register_transform_func().
6557 * G_DEFINE_DYNAMIC_TYPE:
6558 * @TN: The name of the new type, in Camel case.
6559 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6560 * @T_P: The #GType of the parent type.
6562 * A convenience macro for dynamic type implementations, which declares a
6563 * class initialization function, an instance initialization function (see
6564 * #GTypeInfo for information about these) and a static variable named
6565 * it defines a <function>*_get_type()</function> and a static
6566 * <function>*_register_type()</function> function for use in your
6567 * <function>module_init()</function>.
6568 * See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.
6575 * G_DEFINE_DYNAMIC_TYPE_EXTENDED:
6576 * @TypeName: The name of the new type, in Camel case.
6577 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6578 * @TYPE_PARENT: The #GType of the parent type.
6579 * @flags: #GTypeFlags to pass to g_type_module_register_type()
6580 * @CODE: Custom code that gets inserted in the *_get_type() function.
6582 * A more general version of G_DEFINE_DYNAMIC_TYPE() which
6583 * allows to specify #GTypeFlags and custom code.
6585 * G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
6589 * G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO,
6590 * gtk_gadget_gizmo_init));
6594 * static void gtk_gadget_init (GtkGadget *self);
6595 * static void gtk_gadget_class_init (GtkGadgetClass *klass);
6596 * static void gtk_gadget_class_finalize (GtkGadgetClass *klass);
6597 * static gpointer gtk_gadget_parent_class = NULL;
6598 * static GType gtk_gadget_type_id = 0;
6599 * static void gtk_gadget_class_intern_init (gpointer klass)
6601 * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
6602 * gtk_gadget_class_init ((GtkGadgetClass*) klass);
6605 * gtk_gadget_get_type (void)
6607 * return gtk_gadget_type_id;
6610 * gtk_gadget_register_type (GTypeModule *type_module)
6612 * const GTypeInfo g_define_type_info = {
6613 * sizeof (GtkGadgetClass),
6614 * (GBaseInitFunc) NULL,
6615 * (GBaseFinalizeFunc) NULL,
6616 * (GClassInitFunc) gtk_gadget_class_intern_init,
6617 * (GClassFinalizeFunc) gtk_gadget_class_finalize,
6618 * NULL, // class_data
6619 * sizeof (GtkGadget),
6621 * (GInstanceInitFunc) gtk_gadget_init,
6622 * NULL // value_table
6624 * gtk_gadget_type_id = g_type_module_register_type (type_module,
6627 * &g_define_type_info,
6628 * (GTypeFlags) flags);
6630 * const GInterfaceInfo g_implement_interface_info = {
6631 * (GInterfaceInitFunc) gtk_gadget_gizmo_init
6633 * g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
6643 * G_DEFINE_INTERFACE:
6644 * @TN: The name of the new type, in Camel case.
6645 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6646 * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
6648 * A convenience macro for #GTypeInterface definitions, which declares
6649 * a default vtable initialization function and defines a *_get_type()
6651 * The macro expects the interface initialization function to have the
6652 * name <literal>t_n ## _default_init</literal>, and the interface
6653 * structure to have the name <literal>TN ## Interface</literal>.
6660 * G_DEFINE_INTERFACE_WITH_CODE:
6661 * @TN: The name of the new type, in Camel case.
6662 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6663 * @T_P: The #GType of the prerequisite type for the interface, or 0 (%G_TYPE_INVALID) for no prerequisite type.
6664 * @_C_: Custom code that gets inserted in the *_get_type() function.
6666 * A convenience macro for #GTypeInterface definitions. Similar to
6667 * G_DEFINE_INTERFACE(), but allows you to insert custom code into the
6668 * *_get_type() function, e.g. additional interface implementations
6669 * via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See
6670 * G_DEFINE_TYPE_EXTENDED() for a similar example using
6671 * G_DEFINE_TYPE_WITH_CODE().
6678 * G_DEFINE_POINTER_TYPE:
6679 * @TypeName: The name of the new type, in Camel case.
6680 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6682 * A convenience macro for pointer type implementations, which defines a
6683 * type_name_get_type() function registering the pointer type.
6690 * G_DEFINE_POINTER_TYPE_WITH_CODE:
6691 * @TypeName: The name of the new type, in Camel case.
6692 * @type_name: The name of the new type, in lowercase, with words separated by '_'.
6693 * @_C_: Custom code that gets inserted in the *_get_type() function.
6695 * A convenience macro for pointer type implementations.
6696 * Similar to G_DEFINE_POINTER_TYPE(), but allows to insert custom code into the
6697 * type_name_get_type() function.
6705 * @TN: The name of the new type, in Camel case.
6706 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6707 * @T_P: The #GType of the parent type.
6709 * A convenience macro for type implementations, which declares a
6710 * class initialization function, an instance initialization function (see #GTypeInfo for information about
6711 * these) and a static variable named @t_n<!-- -->_parent_class pointing to the parent class. Furthermore, it defines
6712 * a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() for an example.
6719 * G_DEFINE_TYPE_EXTENDED:
6720 * @TN: The name of the new type, in Camel case.
6721 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
6722 * @T_P: The #GType of the parent type.
6723 * @_f_: #GTypeFlags to pass to g_type_register_static()
6724 * @_C_: Custom code that gets inserted in the *_get_type() function.
6726 * The most general convenience macro for type implementations, on which
6727 * G_DEFINE_TYPE(), etc are based.
6729 * G_DEFINE_TYPE_EXTENDED (GtkGadget,
6733 * G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
6734 * gtk_gadget_gizmo_init));
6738 * static void gtk_gadget_init (GtkGadget *self);
6739 * static void gtk_gadget_class_init (GtkGadgetClass *klass);
6740 * static gpointer gtk_gadget_parent_class = NULL;
6741 * static void gtk_gadget_class_intern_init (gpointer klass)
6743 * gtk_gadget_parent_class = g_type_class_peek_parent (klass);
6744 * gtk_gadget_class_init ((GtkGadgetClass*) klass);
6747 * gtk_gadget_get_type (void)
6749 * static volatile gsize g_define_type_id__volatile = 0;
6750 * if (g_once_init_enter (&g_define_type_id__volatile))
6752 * GType g_define_type_id =
6753 * g_type_register_static_simple (GTK_TYPE_WIDGET,
6754 * g_intern_static_string ("GtkGadget"),
6755 * sizeof (GtkGadgetClass),
6756 * (GClassInitFunc) gtk_gadget_class_intern_init,
6757 * sizeof (GtkGadget),
6758 * (GInstanceInitFunc) gtk_gadget_init,
6759 * (GTypeFlags) flags);
6761 * static const GInterfaceInfo g_implement_interface_info = {
6762 * (GInterfaceInitFunc) gtk_gadget_gizmo_init
6764 * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
6766 * g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
6768 * return g_define_type_id__volatile;
6771 * The only pieces which have to be manually provided are the definitions of
6772 * the instance and class structure and the definitions of the instance and
6773 * class init functions.
6780 * G_DEFINE_TYPE_WITH_CODE:
6781 * @TN: The name of the new type, in Camel case.
6782 * @t_n: The name of the new type in lowercase, with words separated by '_'.
6783 * @T_P: The #GType of the parent type.
6784 * @_C_: Custom code that gets inserted in the *_get_type() function.
6786 * A convenience macro for type implementations.
6787 * Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the
6788 * *_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
6789 * See G_DEFINE_TYPE_EXTENDED() for an example.
6796 * G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME:
6798 * Extension point for default handler to URI association. See
6799 * <link linkend="extending-gio">Extending GIO</link>.
6805 * @class: a valid #GEnumClass
6807 * Casts a derived #GEnumClass structure into a #GEnumClass structure.
6812 * G_ENUM_CLASS_TYPE:
6813 * @class: a #GEnumClass
6815 * Get the type identifier from a given #GEnumClass structure.
6817 * Returns: the #GType
6822 * G_ENUM_CLASS_TYPE_NAME:
6823 * @class: a #GEnumClass
6825 * Get the static type name from a given #GEnumClass structure.
6827 * Returns: the type name.
6832 * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE:
6834 * A key in the "access" namespace for checking deletion privileges.
6835 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6836 * This attribute will be %TRUE if the user is able to delete the file.
6841 * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE:
6843 * A key in the "access" namespace for getting execution privileges.
6844 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6845 * This attribute will be %TRUE if the user is able to execute the file.
6850 * G_FILE_ATTRIBUTE_ACCESS_CAN_READ:
6852 * A key in the "access" namespace for getting read privileges.
6853 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6854 * This attribute will be %TRUE if the user is able to read the file.
6859 * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME:
6861 * A key in the "access" namespace for checking renaming privileges.
6862 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6863 * This attribute will be %TRUE if the user is able to rename the file.
6868 * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH:
6870 * A key in the "access" namespace for checking trashing privileges.
6871 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6872 * This attribute will be %TRUE if the user is able to move the file to
6878 * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE:
6880 * A key in the "access" namespace for getting write privileges.
6881 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6882 * This attribute will be %TRUE if the user is able to write to the file.
6887 * G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE:
6889 * A key in the "dos" namespace for checking if the file's archive flag
6890 * is set. This attribute is %TRUE if the archive flag is set. This attribute
6891 * is only available for DOS file systems. Corresponding #GFileAttributeType
6892 * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6897 * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM:
6899 * A key in the "dos" namespace for checking if the file's backup flag
6900 * is set. This attribute is %TRUE if the backup flag is set. This attribute
6901 * is only available for DOS file systems. Corresponding #GFileAttributeType
6902 * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6907 * G_FILE_ATTRIBUTE_ETAG_VALUE:
6909 * A key in the "etag" namespace for getting the value of the file's
6910 * entity tag. Corresponding #GFileAttributeType is
6911 * %G_FILE_ATTRIBUTE_TYPE_STRING.
6916 * G_FILE_ATTRIBUTE_FILESYSTEM_FREE:
6918 * A key in the "filesystem" namespace for getting the number of bytes of free space left on the
6919 * file system. Corresponding #GFileAttributeType is
6920 * %G_FILE_ATTRIBUTE_TYPE_UINT64.
6925 * G_FILE_ATTRIBUTE_FILESYSTEM_READONLY:
6927 * A key in the "filesystem" namespace for checking if the file system
6928 * is read only. Is set to %TRUE if the file system is read only.
6929 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6934 * G_FILE_ATTRIBUTE_FILESYSTEM_SIZE:
6936 * A key in the "filesystem" namespace for getting the total size (in bytes) of the file system,
6937 * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType
6938 * is %G_FILE_ATTRIBUTE_TYPE_UINT64.
6943 * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE:
6945 * A key in the "filesystem" namespace for getting the file system's type.
6946 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
6951 * G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW:
6953 * A key in the "filesystem" namespace for hinting a file manager
6954 * application whether it should preview (e.g. thumbnail) files on the
6955 * file system. The value for this key contain a
6956 * #GFilesystemPreviewType.
6961 * G_FILE_ATTRIBUTE_GVFS_BACKEND:
6963 * A key in the "gvfs" namespace that gets the name of the current
6964 * GVFS backend in use. Corresponding #GFileAttributeType is
6965 * %G_FILE_ATTRIBUTE_TYPE_STRING.
6970 * G_FILE_ATTRIBUTE_ID_FILE:
6972 * A key in the "id" namespace for getting a file identifier.
6973 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
6974 * An example use would be during listing files, to avoid recursive
6975 * directory scanning.
6980 * G_FILE_ATTRIBUTE_ID_FILESYSTEM:
6982 * A key in the "id" namespace for getting the file system identifier.
6983 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
6984 * An example use would be during drag and drop to see if the source
6985 * and target are on the same filesystem (default to move) or not (default
6991 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT:
6993 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
6994 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
6999 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT:
7001 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
7002 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7007 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL:
7009 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
7010 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7017 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START:
7019 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
7020 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7027 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED:
7029 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started
7031 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7038 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP:
7040 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
7041 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7048 * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT:
7050 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable.
7051 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7056 * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI:
7058 * A key in the "mountable" namespace for getting the HAL UDI for the mountable
7059 * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7064 * G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC:
7066 * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)
7067 * is automatically polled for media.
7068 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7075 * G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE:
7077 * A key in the "mountable" namespace for getting the #GDriveStartStopType.
7078 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7085 * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE:
7087 * A key in the "mountable" namespace for getting the unix device.
7088 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7093 * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE:
7095 * A key in the "mountable" namespace for getting the unix device file.
7096 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7103 * G_FILE_ATTRIBUTE_OWNER_GROUP:
7105 * A key in the "owner" namespace for getting the file owner's group.
7106 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7111 * G_FILE_ATTRIBUTE_OWNER_USER:
7113 * A key in the "owner" namespace for getting the user name of the
7114 * file's owner. Corresponding #GFileAttributeType is
7115 * %G_FILE_ATTRIBUTE_TYPE_STRING.
7120 * G_FILE_ATTRIBUTE_OWNER_USER_REAL:
7122 * A key in the "owner" namespace for getting the real name of the
7123 * user that owns the file. Corresponding #GFileAttributeType is
7124 * %G_FILE_ATTRIBUTE_TYPE_STRING.
7129 * G_FILE_ATTRIBUTE_PREVIEW_ICON:
7131 * A key in the "preview" namespace for getting a #GIcon that can be
7132 * used to get preview of the file. For example, it may be a low
7133 * resolution thumbnail without metadata. Corresponding
7134 * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. The value
7135 * for this key should contain a #GIcon.
7142 * G_FILE_ATTRIBUTE_SELINUX_CONTEXT:
7144 * A key in the "selinux" namespace for getting the file's SELinux
7145 * context. Corresponding #GFileAttributeType is
7146 * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only
7147 * available if GLib has been built with SELinux support.
7152 * G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE:
7154 * A key in the "standard" namespace for getting the amount of disk space
7155 * that is consumed by the file (in bytes). This will generally be larger
7156 * than the file size (due to block size overhead) but can occasionally be
7157 * smaller (for example, for sparse files).
7158 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7165 * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE:
7167 * A key in the "standard" namespace for getting the content type of the file.
7168 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7169 * The value for this key should contain a valid content type.
7174 * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME:
7176 * A key in the "standard" namespace for getting the copy name of the file.
7177 * The copy name is an optional version of the name. If available it's always
7178 * in UTF8, and corresponds directly to the original filename (only transcoded to
7179 * UTF8). This is useful if you want to copy the file to another filesystem that
7180 * might have a different encoding. If the filename is not a valid string in the
7181 * encoding selected for the filesystem it is in then the copy name will not be set.
7182 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7187 * G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION:
7189 * A key in the "standard" namespace for getting the description of the file.
7190 * The description is a utf8 string that describes the file, generally containing
7191 * the filename, but can also contain furter information. Example descriptions
7192 * could be "filename (on hostname)" for a remote file or "filename (in trash)"
7193 * for a file in the trash. This is useful for instance as the window title
7194 * when displaying a directory or for a bookmarks menu.
7195 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7200 * G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME:
7202 * A key in the "standard" namespace for getting the display name of the file.
7203 * A display name is guaranteed to be in UTF8 and can thus be displayed in
7205 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7210 * G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME:
7212 * A key in the "standard" namespace for edit name of the file.
7213 * An edit name is similar to the display name, but it is meant to be
7214 * used when you want to rename the file in the UI. The display name
7215 * might contain information you don't want in the new filename (such as
7216 * "(invalid unicode)" if the filename was in an invalid encoding).
7217 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7222 * G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE:
7224 * A key in the "standard" namespace for getting the fast content type.
7225 * The fast content type isn't as reliable as the regular one, as it
7226 * only uses the filename to guess it, but it is faster to calculate than the
7227 * regular content type.
7228 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7233 * G_FILE_ATTRIBUTE_STANDARD_ICON:
7235 * A key in the "standard" namespace for getting the icon for the file.
7236 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
7237 * The value for this key should contain a #GIcon.
7242 * G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP:
7244 * A key in the "standard" namespace for checking if a file is a backup file.
7245 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7250 * G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN:
7252 * A key in the "standard" namespace for checking if a file is hidden.
7253 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7258 * G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK:
7260 * A key in the "standard" namespace for checking if the file is a symlink.
7261 * Typically the actual type is something else, if we followed the symlink
7263 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7268 * G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL:
7270 * A key in the "standard" namespace for checking if a file is virtual.
7271 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7276 * G_FILE_ATTRIBUTE_STANDARD_NAME:
7278 * A key in the "standard" namespace for getting the name of the file.
7279 * The name is the on-disk filename which may not be in any known encoding,
7280 * and can thus not be generally displayed as is.
7281 * Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the
7282 * name in a user interface.
7283 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7288 * G_FILE_ATTRIBUTE_STANDARD_SIZE:
7290 * A key in the "standard" namespace for getting the file's size (in bytes).
7291 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7296 * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER:
7298 * A key in the "standard" namespace for setting the sort order of a file.
7299 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
7300 * An example use would be in file managers, which would use this key
7301 * to set the order files are displayed. Files with smaller sort order
7302 * should be sorted first, and files without sort order as if sort order
7308 * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET:
7310 * A key in the "standard" namespace for getting the symlink target, if the file
7311 * is a symlink. Corresponding #GFileAttributeType is
7312 * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7317 * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI:
7319 * A key in the "standard" namespace for getting the target URI for the file, in
7320 * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
7321 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7326 * G_FILE_ATTRIBUTE_STANDARD_TYPE:
7328 * A key in the "standard" namespace for storing file types.
7329 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7330 * The value for this key should contain a #GFileType.
7335 * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED:
7337 * A key in the "thumbnail" namespace for checking if thumbnailing failed.
7338 * This attribute is %TRUE if thumbnailing failed. Corresponding
7339 * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7344 * G_FILE_ATTRIBUTE_THUMBNAIL_PATH:
7346 * A key in the "thumbnail" namespace for getting the path to the thumbnail
7347 * image. Corresponding #GFileAttributeType is
7348 * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
7353 * G_FILE_ATTRIBUTE_TIME_ACCESS:
7355 * A key in the "time" namespace for getting the time the file was last
7356 * accessed. Corresponding #GFileAttributeType is
7357 * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
7358 * file was last accessed.
7363 * G_FILE_ATTRIBUTE_TIME_ACCESS_USEC:
7365 * A key in the "time" namespace for getting the microseconds of the time
7366 * the file was last accessed. This should be used in conjunction with
7367 * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is
7368 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7373 * G_FILE_ATTRIBUTE_TIME_CHANGED:
7375 * A key in the "time" namespace for getting the time the file was last
7376 * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
7377 * and contains the UNIX time since the file was last changed.
7378 * This corresponds to the traditional UNIX ctime.
7383 * G_FILE_ATTRIBUTE_TIME_CHANGED_USEC:
7385 * A key in the "time" namespace for getting the microseconds of the time
7386 * the file was last changed. This should be used in conjunction with
7387 * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is
7388 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7393 * G_FILE_ATTRIBUTE_TIME_CREATED:
7395 * A key in the "time" namespace for getting the time the file was created.
7396 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
7397 * and contains the UNIX time since the file was created.
7398 * This corresponds to the NTFS ctime.
7403 * G_FILE_ATTRIBUTE_TIME_CREATED_USEC:
7405 * A key in the "time" namespace for getting the microseconds of the time
7406 * the file was created. This should be used in conjunction with
7407 * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is
7408 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7413 * G_FILE_ATTRIBUTE_TIME_MODIFIED:
7415 * A key in the "time" namespace for getting the time the file was last
7416 * modified. Corresponding #GFileAttributeType is
7417 * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
7418 * file was modified.
7423 * G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC:
7425 * A key in the "time" namespace for getting the miliseconds of the time
7426 * the file was last modified. This should be used in conjunction with
7427 * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is
7428 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7433 * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE:
7435 * A key in the "trash" namespace. When requested against
7436 * items in "trash:///", will return the date and time when the file
7437 * was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss.
7438 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
7445 * G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT:
7447 * A key in the "trash" namespace. When requested against
7448 * "trash:///" returns the number of (toplevel) items in the trash folder.
7449 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7454 * G_FILE_ATTRIBUTE_TRASH_ORIG_PATH:
7456 * A key in the "trash" namespace. When requested against
7457 * items in "trash:///", will return the original path to the file before it
7458 * was trashed. Corresponding #GFileAttributeType is
7459 * %G_FILE_ATTRIBUTE_TYPE_STRING.
7466 * G_FILE_ATTRIBUTE_UNIX_BLOCKS:
7468 * A key in the "unix" namespace for getting the number of blocks allocated
7469 * for the file. This attribute is only available for UNIX file systems.
7470 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7475 * G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE:
7477 * A key in the "unix" namespace for getting the block size for the file
7478 * system. This attribute is only available for UNIX file systems.
7479 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7484 * G_FILE_ATTRIBUTE_UNIX_DEVICE:
7486 * A key in the "unix" namespace for getting the device id of the device the
7487 * file is located on (see stat() documentation). This attribute is only
7488 * available for UNIX file systems. Corresponding #GFileAttributeType is
7489 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7494 * G_FILE_ATTRIBUTE_UNIX_GID:
7496 * A key in the "unix" namespace for getting the group ID for the file.
7497 * This attribute is only available for UNIX file systems.
7498 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7503 * G_FILE_ATTRIBUTE_UNIX_INODE:
7505 * A key in the "unix" namespace for getting the inode of the file.
7506 * This attribute is only available for UNIX file systems. Corresponding
7507 * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
7512 * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT:
7514 * A key in the "unix" namespace for checking if the file represents a
7515 * UNIX mount point. This attribute is %TRUE if the file is a UNIX mount
7516 * point. This attribute is only available for UNIX file systems.
7517 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
7522 * G_FILE_ATTRIBUTE_UNIX_MODE:
7524 * A key in the "unix" namespace for getting the mode of the file
7525 * (e.g. whether the file is a regular file, symlink, etc). See lstat()
7526 * documentation. This attribute is only available for UNIX file systems.
7527 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7532 * G_FILE_ATTRIBUTE_UNIX_NLINK:
7534 * A key in the "unix" namespace for getting the number of hard links
7535 * for a file. See lstat() documentation. This attribute is only available
7536 * for UNIX file systems. Corresponding #GFileAttributeType is
7537 * %G_FILE_ATTRIBUTE_TYPE_UINT32.
7542 * G_FILE_ATTRIBUTE_UNIX_RDEV:
7544 * A key in the "unix" namespace for getting the device ID for the file
7545 * (if it is a special file). See lstat() documentation. This attribute
7546 * is only available for UNIX file systems. Corresponding #GFileAttributeType
7547 * is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7552 * G_FILE_ATTRIBUTE_UNIX_UID:
7554 * A key in the "unix" namespace for getting the user ID for the file.
7555 * This attribute is only available for UNIX file systems.
7556 * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
7562 * @class: a valid #GFlagsClass
7564 * Casts a derived #GFlagsClass structure into a #GFlagsClass structure.
7569 * G_FLAGS_CLASS_TYPE:
7570 * @class: a #GFlagsClass
7572 * Get the type identifier from a given #GFlagsClass structure.
7574 * Returns: the #GType
7579 * G_FLAGS_CLASS_TYPE_NAME:
7580 * @class: a #GFlagsClass
7582 * Get the static type name from a given #GFlagsClass structure.
7584 * Returns: the type name.
7589 * G_IMPLEMENT_INTERFACE:
7590 * @TYPE_IFACE: The #GType of the interface to add
7591 * @iface_init: The interface init function
7593 * A convenience macro to ease interface addition in the @_C_ section
7594 * of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE().
7595 * See G_DEFINE_TYPE_EXTENDED() for an example.
7596 * Note that this macro can only be used together with the G_DEFINE_TYPE_*
7597 * macros, since it depends on variable names from those macros.
7604 * G_IMPLEMENT_INTERFACE_DYNAMIC:
7605 * @TYPE_IFACE: The #GType of the interface to add
7606 * @iface_init: The interface init function
7608 * A convenience macro to ease interface addition in the @_C_ section
7609 * of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED()
7611 * Note that this macro can only be used together with the
7612 * G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable
7613 * names from that macro.
7620 * G_INITIALLY_UNOWNED:
7621 * @object: Object which is subject to casting.
7623 * Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*)
7624 * pointer. Depending on the current debugging level, this function may invoke
7625 * certain runtime checks to identify invalid casts.
7630 * G_INITIALLY_UNOWNED_CLASS:
7631 * @class: a valid #GInitiallyUnownedClass
7633 * Casts a derived #GInitiallyUnownedClass structure into a
7634 * #GInitiallyUnownedClass structure.
7639 * G_INITIALLY_UNOWNED_GET_CLASS:
7640 * @object: a #GInitiallyUnowned instance.
7642 * Get the class structure associated to a #GInitiallyUnowned instance.
7644 * Returns: pointer to object class structure.
7651 * Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration.
7652 * See #GError for more information on error domains.
7658 * @class: a #GEnumClass
7660 * Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM
7667 * @class: a #GFlagsClass
7669 * Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS
7675 * G_IS_INITIALLY_UNOWNED:
7676 * @object: Instance to check for being a %G_TYPE_INITIALLY_UNOWNED.
7678 * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED.
7683 * G_IS_INITIALLY_UNOWNED_CLASS:
7684 * @class: a #GInitiallyUnownedClass
7686 * Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type
7687 * %G_TYPE_INITIALLY_UNOWNED or derived.
7693 * @object: Instance to check for being a %G_TYPE_OBJECT.
7695 * Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT.
7700 * G_IS_OBJECT_CLASS:
7701 * @class: a #GObjectClass
7703 * Checks whether @class "is a" valid #GObjectClass structure of type
7704 * %G_TYPE_OBJECT or derived.
7710 * @pspec: a #GParamSpec
7712 * Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM
7718 * G_IS_PARAM_SPEC_BOOLEAN:
7719 * @pspec: a valid #GParamSpec instance
7721 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.
7723 * Returns: %TRUE on success.
7728 * G_IS_PARAM_SPEC_BOXED:
7729 * @pspec: a valid #GParamSpec instance
7731 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED.
7733 * Returns: %TRUE on success.
7738 * G_IS_PARAM_SPEC_CHAR:
7739 * @pspec: a valid #GParamSpec instance
7741 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.
7743 * Returns: %TRUE on success.
7748 * G_IS_PARAM_SPEC_CLASS:
7749 * @pclass: a #GParamSpecClass
7751 * Checks whether @pclass "is a" valid #GParamSpecClass structure of type
7752 * %G_TYPE_PARAM or derived.
7757 * G_IS_PARAM_SPEC_DOUBLE:
7758 * @pspec: a valid #GParamSpec instance
7760 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE.
7762 * Returns: %TRUE on success.
7767 * G_IS_PARAM_SPEC_ENUM:
7768 * @pspec: a valid #GParamSpec instance
7770 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM.
7772 * Returns: %TRUE on success.
7777 * G_IS_PARAM_SPEC_FLAGS:
7778 * @pspec: a valid #GParamSpec instance
7780 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS.
7782 * Returns: %TRUE on success.
7787 * G_IS_PARAM_SPEC_FLOAT:
7788 * @pspec: a valid #GParamSpec instance
7790 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT.
7792 * Returns: %TRUE on success.
7797 * G_IS_PARAM_SPEC_GTYPE:
7798 * @pspec: a #GParamSpec
7800 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.
7803 * Returns: %TRUE on success.
7808 * G_IS_PARAM_SPEC_INT:
7809 * @pspec: a valid #GParamSpec instance
7811 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.
7813 * Returns: %TRUE on success.
7818 * G_IS_PARAM_SPEC_INT64:
7819 * @pspec: a valid #GParamSpec instance
7821 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64.
7823 * Returns: %TRUE on success.
7828 * G_IS_PARAM_SPEC_LONG:
7829 * @pspec: a valid #GParamSpec instance
7831 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.
7833 * Returns: %TRUE on success.
7838 * G_IS_PARAM_SPEC_OBJECT:
7839 * @pspec: a valid #GParamSpec instance
7841 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.
7843 * Returns: %TRUE on success.
7848 * G_IS_PARAM_SPEC_OVERRIDE:
7849 * @pspec: a #GParamSpec
7851 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.
7854 * Returns: %TRUE on success.
7859 * G_IS_PARAM_SPEC_PARAM:
7860 * @pspec: a valid #GParamSpec instance
7862 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM.
7864 * Returns: %TRUE on success.
7869 * G_IS_PARAM_SPEC_POINTER:
7870 * @pspec: a valid #GParamSpec instance
7872 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.
7874 * Returns: %TRUE on success.
7879 * G_IS_PARAM_SPEC_STRING:
7880 * @pspec: a valid #GParamSpec instance
7882 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING.
7884 * Returns: %TRUE on success.
7889 * G_IS_PARAM_SPEC_UCHAR:
7890 * @pspec: a valid #GParamSpec instance
7892 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.
7894 * Returns: %TRUE on success.
7899 * G_IS_PARAM_SPEC_UINT:
7900 * @pspec: a valid #GParamSpec instance
7902 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.
7904 * Returns: %TRUE on success.
7909 * G_IS_PARAM_SPEC_UINT64:
7910 * @pspec: a valid #GParamSpec instance
7912 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64.
7914 * Returns: %TRUE on success.
7919 * G_IS_PARAM_SPEC_ULONG:
7920 * @pspec: a valid #GParamSpec instance
7922 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG.
7924 * Returns: %TRUE on success.
7929 * G_IS_PARAM_SPEC_UNICHAR:
7930 * @pspec: a valid #GParamSpec instance
7932 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.
7934 * Returns: %TRUE on success.
7939 * G_IS_PARAM_SPEC_VALUE_ARRAY:
7940 * @pspec: a valid #GParamSpec instance
7942 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.
7944 * Returns: %TRUE on success.
7949 * G_IS_PARAM_SPEC_VARIANT:
7950 * @pspec: a #GParamSpec
7952 * Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT.
7954 * Returns: %TRUE on success
7961 * @value: A #GValue structure.
7963 * Checks if @value is a valid and initialized #GValue structure.
7965 * Returns: %TRUE on success.
7972 * Error domain for markup parsing.
7973 * Errors in this domain will be from the #GMarkupError enumeration.
7974 * See #GError for information on error domains.
7982 * Returns %TRUE if a #GNode is a leaf node.
7983 * (i.e. it has no children)
7985 * Returns: %TRUE if the #GNode is a leaf node
7993 * Returns %TRUE if a #GNode is the root of a tree.
7994 * (i.e. it has no parent or siblings)
7996 * Returns: %TRUE if the #GNode is the root of a tree
8002 * @object: Object which is subject to casting.
8004 * Casts a #GObject or derived pointer into a (GObject*) pointer.
8005 * Depending on the current debugging level, this function may invoke
8006 * certain runtime checks to identify invalid casts.
8012 * @class: a valid #GObjectClass
8014 * Casts a derived #GObjectClass structure into a #GObjectClass structure.
8019 * G_OBJECT_CLASS_NAME:
8020 * @class: a valid #GObjectClass
8022 * Return the name of a class structure's type.
8023 * should not be freed.
8025 * Returns: Type name of @class. The string is owned by the type system and
8030 * G_OBJECT_CLASS_TYPE:
8031 * @class: a valid #GObjectClass
8033 * Get the type id of a class structure.
8035 * Returns: Type id of @class.
8040 * G_OBJECT_GET_CLASS:
8041 * @object: a #GObject instance.
8043 * Get the class structure associated to a #GObject instance.
8045 * Returns: pointer to object class structure.
8051 * @object: Object to return the type id for.
8053 * Get the type id of an object.
8055 * Returns: Type id of @object.
8060 * G_OBJECT_TYPE_NAME:
8061 * @object: Object to return the type name for.
8063 * Get the name of an object's type.
8064 * should not be freed.
8066 * Returns: Type name of @object. The string is owned by the type system and
8071 * G_OBJECT_WARN_INVALID_PROPERTY_ID:
8072 * @object: the #GObject on which set_property() or get_property() was called
8073 * @property_id: the numeric id of the property
8074 * @pspec: the #GParamSpec of the property
8076 * This macro should be used to emit a standard warning about unexpected
8077 * properties in set_property() and get_property() implementations.
8084 * Error domain for option parsing. Errors in this domain will
8085 * be from the #GOptionError enumeration. See #GError for information on
8091 * G_OPTION_REMAINING:
8093 * If a long option in the main group has this name, it is not treated as a
8094 * regular option. Instead it collects all non-option arguments which would
8095 * otherwise be left in <literal>argv</literal>. The option must be of type
8096 * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY
8097 * or %G_OPTION_ARG_FILENAME_ARRAY.
8098 * Using #G_OPTION_REMAINING instead of simply scanning <literal>argv</literal>
8099 * for leftover arguments has the advantage that GOption takes care of
8100 * necessary encoding conversions for strings or filenames.
8109 * Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
8114 * G_PARAM_READWRITE:
8116 * #GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.
8122 * @pspec: a valid #GParamSpec
8124 * Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into
8125 * a #GParamSpec object.
8130 * G_PARAM_SPEC_BOOLEAN:
8131 * @pspec: a valid #GParamSpec instance
8133 * Cast a #GParamSpec instance into a #GParamSpecBoolean.
8138 * G_PARAM_SPEC_BOXED:
8139 * @pspec: a valid #GParamSpec instance
8141 * Cast a #GParamSpec instance into a #GParamSpecBoxed.
8146 * G_PARAM_SPEC_CHAR:
8147 * @pspec: a valid #GParamSpec instance
8149 * Cast a #GParamSpec instance into a #GParamSpecChar.
8154 * G_PARAM_SPEC_CLASS:
8155 * @pclass: a valid #GParamSpecClass
8157 * Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure.
8162 * G_PARAM_SPEC_DOUBLE:
8163 * @pspec: a valid #GParamSpec instance
8165 * Cast a #GParamSpec instance into a #GParamSpecDouble.
8170 * G_PARAM_SPEC_ENUM:
8171 * @pspec: a valid #GParamSpec instance
8173 * Cast a #GParamSpec instance into a #GParamSpecEnum.
8178 * G_PARAM_SPEC_FLAGS:
8179 * @pspec: a valid #GParamSpec instance
8181 * Cast a #GParamSpec instance into a #GParamSpecFlags.
8186 * G_PARAM_SPEC_FLOAT:
8187 * @pspec: a valid #GParamSpec instance
8189 * Cast a #GParamSpec instance into a #GParamSpecFloat.
8194 * G_PARAM_SPEC_GET_CLASS:
8195 * @pspec: a valid #GParamSpec
8197 * Retrieves the #GParamSpecClass of a #GParamSpec.
8202 * G_PARAM_SPEC_GTYPE:
8203 * @pspec: a #GParamSpec
8205 * Casts a #GParamSpec into a #GParamSpecGType.
8213 * @pspec: a valid #GParamSpec instance
8215 * Cast a #GParamSpec instance into a #GParamSpecInt.
8220 * G_PARAM_SPEC_INT64:
8221 * @pspec: a valid #GParamSpec instance
8223 * Cast a #GParamSpec instance into a #GParamSpecInt64.
8228 * G_PARAM_SPEC_LONG:
8229 * @pspec: a valid #GParamSpec instance
8231 * Cast a #GParamSpec instance into a #GParamSpecLong.
8236 * G_PARAM_SPEC_OBJECT:
8237 * @pspec: a valid #GParamSpec instance
8239 * Casts a #GParamSpec instance into a #GParamSpecObject.
8244 * G_PARAM_SPEC_OVERRIDE:
8245 * @pspec: a #GParamSpec
8247 * Casts a #GParamSpec into a #GParamSpecOverride.
8254 * G_PARAM_SPEC_PARAM:
8255 * @pspec: a valid #GParamSpec instance
8257 * Casts a #GParamSpec instance into a #GParamSpecParam.
8262 * G_PARAM_SPEC_POINTER:
8263 * @pspec: a valid #GParamSpec instance
8265 * Casts a #GParamSpec instance into a #GParamSpecPointer.
8270 * G_PARAM_SPEC_STRING:
8271 * @pspec: a valid #GParamSpec instance
8273 * Casts a #GParamSpec instance into a #GParamSpecString.
8278 * G_PARAM_SPEC_TYPE:
8279 * @pspec: a valid #GParamSpec
8281 * Retrieves the #GType of this @pspec.
8286 * G_PARAM_SPEC_TYPE_NAME:
8287 * @pspec: a valid #GParamSpec
8289 * Retrieves the #GType name of this @pspec.
8294 * G_PARAM_SPEC_UCHAR:
8295 * @pspec: a valid #GParamSpec instance
8297 * Cast a #GParamSpec instance into a #GParamSpecUChar.
8302 * G_PARAM_SPEC_UINT:
8303 * @pspec: a valid #GParamSpec instance
8305 * Cast a #GParamSpec instance into a #GParamSpecUInt.
8310 * G_PARAM_SPEC_UINT64:
8311 * @pspec: a valid #GParamSpec instance
8313 * Cast a #GParamSpec instance into a #GParamSpecUInt64.
8318 * G_PARAM_SPEC_ULONG:
8319 * @pspec: a valid #GParamSpec instance
8321 * Cast a #GParamSpec instance into a #GParamSpecULong.
8326 * G_PARAM_SPEC_UNICHAR:
8327 * @pspec: a valid #GParamSpec instance
8329 * Cast a #GParamSpec instance into a #GParamSpecUnichar.
8334 * G_PARAM_SPEC_VALUE_ARRAY:
8335 * @pspec: a valid #GParamSpec instance
8337 * Cast a #GParamSpec instance into a #GParamSpecValueArray.
8342 * G_PARAM_SPEC_VALUE_TYPE:
8343 * @pspec: a valid #GParamSpec
8345 * Retrieves the #GType to initialize a #GValue for this parameter.
8350 * G_PARAM_SPEC_VARIANT:
8351 * @pspec: a #GParamSpec
8353 * Casts a #GParamSpec into a #GParamSpecVariant.
8360 * G_PARAM_STATIC_STRINGS:
8362 * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.
8368 * G_PARAM_USER_SHIFT:
8370 * Minimum shift count to be used for user defined flags, to be stored in
8371 * #GParamSpec.flags. The maximum allowed is 30 + G_PARAM_USER_SHIFT.
8376 * G_PRIORITY_DEFAULT:
8378 * Use this for default priority event sources.
8379 * In GLib this priority is used when adding timeout functions
8380 * with g_timeout_add(). In GDK this priority is used for events
8381 * from the X server.
8386 * G_PRIORITY_DEFAULT_IDLE:
8388 * Use this for default priority idle functions.
8389 * In GLib this priority is used when adding idle functions with
8397 * Use this for high priority event sources.
8398 * It is not used within GLib or GTK+.
8403 * G_PRIORITY_HIGH_IDLE:
8405 * Use this for high priority idle functions.
8406 * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations,
8407 * and #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is
8408 * done to ensure that any pending resizes are processed before any
8409 * pending redraws, so that widgets are not redrawn twice unnecessarily.)
8416 * Use this for very low priority background tasks.
8417 * It is not used within GLib or GTK+.
8422 * G_PROXY_EXTENSION_POINT_NAME:
8424 * Extension point for proxy functionality.
8425 * See <link linkend="extending-gio">Extending GIO</link>.
8432 * G_PROXY_RESOLVER_EXTENSION_POINT_NAME:
8434 * Extension point for proxy resolving functionality.
8435 * See <link linkend="extending-gio">Extending GIO</link>.
8442 * Error domain for regular expressions. Errors in this domain will be
8443 * from the #GRegexError enumeration. See #GError for information on
8453 * Error domain for #GResolver. Errors in this domain will be from the
8454 * #GResolverError enumeration. See #GError for more information on
8460 * G_SETTINGS_BACKEND_EXTENSION_POINT_NAME:
8462 * Extension point for #GSettingsBackend functionality.
8467 * G_SIGNAL_FLAGS_MASK:
8469 * A mask for all #GSignalFlags bits.
8474 * G_SIGNAL_MATCH_MASK:
8476 * A mask for all #GSignalMatchType bits.
8481 * G_SIGNAL_TYPE_STATIC_SCOPE:
8483 * This macro flags signal argument types for which the signal system may
8484 * assume that instances thereof remain persistent across all signal emissions
8485 * they are used in. This is only useful for non ref-counted, value-copy types.
8486 * To flag a signal argument in this way, add
8487 * <literal>| G_SIGNAL_TYPE_STATIC_SCOPE</literal> to the corresponding argument
8488 * of g_signal_new().
8490 * g_signal_new ("size_request",
8491 * G_TYPE_FROM_CLASS (gobject_class),
8492 * G_SIGNAL_RUN_FIRST,
8493 * G_STRUCT_OFFSET (GtkWidgetClass, size_request),
8495 * _gtk_marshal_VOID__BOXED,
8497 * GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
8505 * Evaluates to a time span of one day.
8514 * Evaluates to a time span of one hour.
8521 * G_TIME_SPAN_MILLISECOND:
8523 * Evaluates to a time span of one millisecond.
8530 * G_TIME_SPAN_MINUTE:
8532 * Evaluates to a time span of one minute.
8539 * G_TIME_SPAN_SECOND:
8541 * Evaluates to a time span of one second.
8548 * G_TLS_BACKEND_EXTENSION_POINT_NAME:
8550 * Extension point for TLS functionality via #GTlsBackend.
8551 * See <link linkend="extending-gio">Extending GIO</link>.
8558 * Error domain for TLS. Errors in this domain will be from the
8559 * #GTlsError enumeration. See #GError for more information on error
8567 * The #GType for a boxed type holding a #GArray reference.
8576 * The fundamental type corresponding to #gboolean.
8583 * The fundamental type from which all boxed types are derived.
8588 * G_TYPE_BYTE_ARRAY:
8590 * The #GType for a boxed type holding a #GByteArray reference.
8599 * The fundamental type corresponding to #gchar.
8600 * The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer.
8601 * This may or may not be the same type a the C type "gchar".
8606 * G_TYPE_CHECK_CLASS_CAST:
8607 * @g_class: Location of a #GTypeClass structure.
8608 * @g_type: The type to be returned.
8609 * @c_type: The corresponding C type of class structure of @g_type.
8611 * Checks that @g_class is a class structure of the type identified by @g_type
8612 * and issues a warning if this is not the case. Returns @g_class casted
8613 * to a pointer to @c_type.
8614 * This macro should only be used in type implementations.
8619 * G_TYPE_CHECK_CLASS_TYPE:
8620 * @g_class: Location of a #GTypeClass structure.
8621 * @g_type: The type to be checked.
8623 * Checks if @g_class is a class structure of the type identified by
8624 * This macro should only be used in type implementations.
8626 * Returns: %TRUE on success.
8631 * G_TYPE_CHECK_INSTANCE:
8632 * @instance: Location of a #GTypeInstance structure.
8634 * Checks if @instance is a valid #GTypeInstance structure,
8635 * otherwise issues a warning and returns %FALSE.
8636 * This macro should only be used in type implementations.
8638 * Returns: %TRUE on success.
8643 * G_TYPE_CHECK_INSTANCE_CAST:
8644 * @instance: Location of a #GTypeInstance structure.
8645 * @g_type: The type to be returned.
8646 * @c_type: The corresponding C type of @g_type.
8648 * Checks that @instance is an instance of the type identified by @g_type
8649 * and issues a warning if this is not the case. Returns @instance casted
8650 * to a pointer to @c_type.
8651 * This macro should only be used in type implementations.
8656 * G_TYPE_CHECK_INSTANCE_TYPE:
8657 * @instance: Location of a #GTypeInstance structure.
8658 * @g_type: The type to be checked
8660 * Checks if @instance is an instance of the type identified by @g_type.
8661 * This macro should only be used in type implementations.
8663 * Returns: %TRUE on success.
8668 * G_TYPE_CHECK_VALUE:
8671 * Checks if @value has been initialized to hold values
8673 * This macro should only be used in type implementations.
8675 * Returns: %TRUE on success.
8680 * G_TYPE_CHECK_VALUE_TYPE:
8682 * @g_type: The type to be checked.
8684 * Checks if @value has been initialized to hold values
8686 * This macro should only be used in type implementations.
8688 * Returns: %TRUE on success.
8693 * G_TYPE_CLASS_GET_PRIVATE:
8694 * @klass: the class of a type deriving from @private_type.
8695 * @g_type: the type identifying which private data to retrieve.
8696 * @c_type: The C type for the private structure.
8698 * Gets the private class structure for a particular type.
8699 * The private structure must have been registered in the
8700 * get_type() function with g_type_add_class_private().
8701 * This macro should only be used in type implementations.
8704 * Returns: a pointer to the private data structure.
8711 * The #GType for #GClosure.
8718 * The #GType for #GDate.
8725 * The #GType for a boxed type holding a #GDateTime.
8732 * G_TYPE_DBUS_ANNOTATION_INFO:
8734 * The #GType for a boxed type holding a #GDBusAnnotationInfo.
8741 * G_TYPE_DBUS_ARG_INFO:
8743 * The #GType for a boxed type holding a #GDBusArgInfo.
8750 * G_TYPE_DBUS_INTERFACE_INFO:
8752 * The #GType for a boxed type holding a #GDBusInterfaceInfo.
8759 * G_TYPE_DBUS_METHOD_INFO:
8761 * The #GType for a boxed type holding a #GDBusMethodInfo.
8768 * G_TYPE_DBUS_NODE_INFO:
8770 * The #GType for a boxed type holding a #GDBusNodeInfo.
8777 * G_TYPE_DBUS_PROPERTY_INFO:
8779 * The #GType for a boxed type holding a #GDBusPropertyInfo.
8786 * G_TYPE_DBUS_SIGNAL_INFO:
8788 * The #GType for a boxed type holding a #GDBusSignalInfo.
8797 * The fundamental type corresponding to #gdouble.
8804 * The fundamental type from which all enumeration types are derived.
8811 * The #GType for a boxed type holding a #GError.
8820 * The fundamental type from which all flags types are derived.
8825 * G_TYPE_FLAG_RESERVED_ID_BIT:
8827 * A bit in the type number that's supposed to be left untouched.
8834 * The fundamental type corresponding to #gfloat.
8839 * G_TYPE_FROM_CLASS:
8840 * @g_class: Location of a valid #GTypeClass structure.
8842 * Get the type identifier from a given @class structure.
8843 * This macro should only be used in type implementations.
8845 * Returns: the #GType
8850 * G_TYPE_FROM_INSTANCE:
8851 * @instance: Location of a valid #GTypeInstance structure.
8853 * Get the type identifier from a given @instance structure.
8854 * This macro should only be used in type implementations.
8856 * Returns: the #GType
8861 * G_TYPE_FROM_INTERFACE:
8862 * @g_iface: Location of a valid #GTypeInterface structure.
8864 * Get the type identifier from a given @interface structure.
8865 * This macro should only be used in type implementations.
8867 * Returns: the #GType
8872 * G_TYPE_FUNDAMENTAL:
8873 * @type: A #GType value.
8875 * The fundamental type which is the ancestor of @type.
8876 * Fundamental types are types that serve as ultimate bases for the derived types,
8877 * thus they are the roots of distinct inheritance hierarchies.
8882 * G_TYPE_FUNDAMENTAL_MAX:
8884 * An integer constant that represents the number of identifiers reserved
8885 * for types that are assigned at compile-time.
8890 * G_TYPE_FUNDAMENTAL_SHIFT:
8892 * Shift value used in converting numbers to type IDs.
8899 * The #GType for #GString.
8906 * The type for #GType.
8911 * G_TYPE_HASH_TABLE:
8913 * The #GType for a boxed type holding a #GHashTable reference.
8920 * G_TYPE_HAS_VALUE_TABLE:
8921 * @type: A #GType value.
8923 * Checks if @type has a #GTypeValueTable.
8925 * Returns: %TRUE on success.
8930 * G_TYPE_INITIALLY_UNOWNED:
8932 * The type for #GInitiallyUnowned.
8937 * G_TYPE_INSTANCE_GET_CLASS:
8938 * @instance: Location of the #GTypeInstance structure.
8939 * @g_type: The #GType of the class to be returned.
8940 * @c_type: The C type of the class structure.
8942 * Get the class structure of a given @instance, casted
8943 * to a specified ancestor type @g_type of the instance.
8944 * Note that while calling a GInstanceInitFunc(), the class pointer gets
8945 * modified, so it might not always return the expected pointer.
8946 * This macro should only be used in type implementations.
8948 * Returns: a pointer to the class structure
8953 * G_TYPE_INSTANCE_GET_INTERFACE:
8954 * @instance: Location of the #GTypeInstance structure.
8955 * @g_type: The #GType of the interface to be returned.
8956 * @c_type: The C type of the interface structure.
8958 * Get the interface structure for interface @g_type of a given @instance.
8959 * This macro should only be used in type implementations.
8961 * Returns: a pointer to the interface structure
8966 * G_TYPE_INSTANCE_GET_PRIVATE:
8967 * @instance: the instance of a type deriving from @private_type.
8968 * @g_type: the type identifying which private data to retrieve.
8969 * @c_type: The C type for the private structure.
8971 * Gets the private structure for a particular type.
8972 * The private structure must have been registered in the
8973 * class_init function with g_type_class_add_private().
8974 * This macro should only be used in type implementations.
8977 * Returns: a pointer to the private data structure.
8984 * The fundamental type corresponding to #gint.
8991 * The fundamental type corresponding to #gint64.
8998 * The fundamental type from which all interfaces are derived.
9005 * An invalid #GType used as error return value in some functions which return
9011 * G_TYPE_IO_CHANNEL:
9013 * The #GType for #GIOChannel.
9018 * G_TYPE_IO_CONDITION:
9020 * The #GType for #GIOCondition.
9025 * G_TYPE_IS_ABSTRACT:
9026 * @type: A #GType value.
9028 * Checks if @type is an abstract type. An abstract type cannot be
9029 * instantiated and is normally used as an abstract base class for
9032 * Returns: %TRUE on success.
9037 * G_TYPE_IS_CLASSED:
9038 * @type: A #GType value.
9040 * Checks if @type is a classed type.
9042 * Returns: %TRUE on success.
9047 * G_TYPE_IS_DEEP_DERIVABLE:
9048 * @type: A #GType value.
9050 * Checks if @type is a deep derivable type. A deep derivable type
9051 * can be used as the base class of a deep (multi-level) class hierarchy.
9053 * Returns: %TRUE on success.
9058 * G_TYPE_IS_DERIVABLE:
9059 * @type: A #GType value.
9061 * Checks if @type is a derivable type. A derivable type can
9062 * be used as the base class of a flat (single-level) class hierarchy.
9064 * Returns: %TRUE on success.
9069 * G_TYPE_IS_DERIVED:
9070 * @type: A #GType value.
9072 * Checks if @type is derived (or in object-oriented terminology:
9073 * inherited) from another type (this holds true for all non-fundamental
9076 * Returns: %TRUE on success.
9082 * @type: a #GType ID.
9084 * Checks whether @type "is a" %G_TYPE_ENUM.
9086 * Returns: %TRUE if @type "is a" %G_TYPE_ENUM.
9092 * @type: a #GType ID.
9094 * Checks whether @type "is a" %G_TYPE_FLAGS.
9096 * Returns: %TRUE if @type "is a" %G_TYPE_FLAGS.
9101 * G_TYPE_IS_FUNDAMENTAL:
9102 * @type: A #GType value.
9104 * Checks if @type is a fundamental type.
9106 * Returns: %TRUE on success.
9111 * G_TYPE_IS_INSTANTIATABLE:
9112 * @type: A #GType value.
9114 * Checks if @type can be instantiated. Instantiation is the
9115 * process of creating an instance (object) of this type.
9117 * Returns: %TRUE on success.
9122 * G_TYPE_IS_INTERFACE:
9123 * @type: A #GType value.
9125 * Checks if @type is an interface type.
9126 * An interface type provides a pure API, the implementation
9127 * of which is provided by another type (which is then said to conform
9128 * to the interface). GLib interfaces are somewhat analogous to Java
9129 * interfaces and C++ classes containing only pure virtual functions,
9130 * with the difference that GType interfaces are not derivable (but see
9131 * g_type_interface_add_prerequisite() for an alternative).
9133 * Returns: %TRUE on success.
9139 * @type: Type id to check
9141 * Check if the passed in type id is a %G_TYPE_OBJECT or derived from it.
9143 * Returns: %FALSE or %TRUE, indicating whether @type is a %G_TYPE_OBJECT.
9149 * @type: a #GType ID
9151 * Checks whether @type "is a" %G_TYPE_PARAM.
9157 * @type: A #GType value.
9159 * Checks whether the passed in type ID can be used for g_value_init().
9160 * That is, this macro checks whether this type provides an implementation
9161 * of the #GTypeValueTable functions required for a type to create a #GValue of.
9163 * Returns: Whether @type is suitable as a #GValue type.
9168 * G_TYPE_IS_VALUE_ABSTRACT:
9169 * @type: A #GType value.
9171 * Checks if @type is an abstract value type. An abstract value type introduces
9172 * a value table, but can't be used for g_value_init() and is normally used as
9173 * an abstract base type for derived value types.
9175 * Returns: %TRUE on success.
9180 * G_TYPE_IS_VALUE_TYPE:
9181 * @type: A #GType value.
9183 * Checks if @type is a value type and can be used with g_value_init().
9185 * Returns: %TRUE on success.
9192 * The fundamental type corresponding to #glong.
9197 * G_TYPE_MAKE_FUNDAMENTAL:
9198 * @x: the fundamental type number.
9200 * Get the type ID for the fundamental type number @x.
9201 * Use g_type_fundamental_next() instead of this macro to create new fundamental
9204 * Returns: the GType
9211 * A fundamental type which is used as a replacement for the C
9212 * <literal>void</literal> return type.
9219 * The fundamental type for #GObject.
9226 * The fundamental type from which all #GParamSpec types are derived.
9231 * G_TYPE_PARAM_BOOLEAN:
9233 * The #GType of #GParamSpecBoolean.
9238 * G_TYPE_PARAM_BOXED:
9240 * The #GType of #GParamSpecBoxed.
9245 * G_TYPE_PARAM_CHAR:
9247 * The #GType of #GParamSpecChar.
9252 * G_TYPE_PARAM_DOUBLE:
9254 * The #GType of #GParamSpecDouble.
9259 * G_TYPE_PARAM_ENUM:
9261 * The #GType of #GParamSpecEnum.
9266 * G_TYPE_PARAM_FLAGS:
9268 * The #GType of #GParamSpecFlags.
9273 * G_TYPE_PARAM_FLOAT:
9275 * The #GType of #GParamSpecFloat.
9280 * G_TYPE_PARAM_GTYPE:
9282 * The #GType of #GParamSpecGType.
9291 * The #GType of #GParamSpecInt.
9296 * G_TYPE_PARAM_INT64:
9298 * The #GType of #GParamSpecInt64.
9303 * G_TYPE_PARAM_LONG:
9305 * The #GType of #GParamSpecLong.
9310 * G_TYPE_PARAM_OBJECT:
9312 * The #GType of #GParamSpecObject.
9317 * G_TYPE_PARAM_OVERRIDE:
9319 * The #GType of #GParamSpecOverride.
9326 * G_TYPE_PARAM_PARAM:
9328 * The #GType of #GParamSpecParam.
9333 * G_TYPE_PARAM_POINTER:
9335 * The #GType of #GParamSpecPointer.
9340 * G_TYPE_PARAM_STRING:
9342 * The #GType of #GParamSpecString.
9347 * G_TYPE_PARAM_UCHAR:
9349 * The #GType of #GParamSpecUChar.
9354 * G_TYPE_PARAM_UINT:
9356 * The #GType of #GParamSpecUInt.
9361 * G_TYPE_PARAM_UINT64:
9363 * The #GType of #GParamSpecUInt64.
9368 * G_TYPE_PARAM_ULONG:
9370 * The #GType of #GParamSpecULong.
9375 * G_TYPE_PARAM_UNICHAR:
9377 * The #GType of #GParamSpecUnichar.
9382 * G_TYPE_PARAM_VALUE_ARRAY:
9384 * The #GType of #GParamSpecValueArray.
9389 * G_TYPE_PARAM_VARIANT:
9391 * The #GType of #GParamSpecVariant.
9400 * The fundamental type corresponding to #gpointer.
9407 * The #GType for a boxed type holding a #GPtrArray reference.
9416 * The #GType for a boxed type holding a #GRegex reference.
9423 * G_TYPE_RESERVED_BSE_FIRST:
9425 * First fundamental type number to create a new fundamental type id with
9426 * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.
9431 * G_TYPE_RESERVED_BSE_LAST:
9433 * Last fundamental type number reserved for BSE.
9438 * G_TYPE_RESERVED_GLIB_FIRST:
9440 * First fundamental type number to create a new fundamental type id with
9441 * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.
9446 * G_TYPE_RESERVED_GLIB_LAST:
9448 * Last fundamental type number reserved for GLib.
9453 * G_TYPE_RESERVED_USER_FIRST:
9455 * First available fundamental type number to create new fundamental
9456 * type id with G_TYPE_MAKE_FUNDAMENTAL().
9463 * The fundamental type corresponding to nul-terminated C strings.
9470 * The #GType for a boxed type holding a %NULL-terminated array of strings.
9471 * The code fragments in the following example show the use of a property of
9472 * type #G_TYPE_STRV with g_object_class_install_property(), g_object_set()
9473 * and g_object_get().
9475 * g_object_class_install_property (object_class,
9477 * g_param_spec_boxed ("authors",
9479 * _("List of authors"),
9481 * G_PARAM_READWRITE));
9482 * gchar *authors[] = { "Owen", "Tim", NULL };
9483 * g_object_set (obj, "authors", authors, NULL);
9485 * g_object_get (obj, "authors", &writers, NULL);
9486 * /* do something with writers */
9487 * g_strfreev (writers);
9497 * The fundamental type corresponding to #guchar.
9504 * The fundamental type corresponding to #guint.
9511 * The fundamental type corresponding to #guint64.
9518 * The fundamental type corresponding to #gulong.
9525 * The type ID of the "GValue" type which is a boxed type,
9526 * used to pass around pointers to GValues.
9531 * G_TYPE_VALUE_ARRAY:
9533 * The type ID of the "GValueArray" type which is a boxed type,
9534 * used to pass around pointers to GValueArrays.
9541 * The fundamental type corresponding to #GVariant.
9542 * All floating #GVariant instances passed through the #GType system are
9544 * Note that callbacks in closures, and signal handlers
9545 * for signals of return type %G_TYPE_VARIANT, must never return floating
9547 * with this fundamental type in 2.26.
9549 * Note: GLib 2.24 did include a boxed type with this name. It was replaced
9555 * G_TYPE_VARIANT_TYPE:
9557 * The #GType for a boxed type holding a #GVariantType.
9564 * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH:
9566 * Allowed characters in a path. Includes "!$&'()*+,;=:@/".
9571 * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT:
9573 * Allowed characters in path elements. Includes "!$&'()*+,;=:@".
9578 * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO:
9580 * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".
9585 * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS:
9587 * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".
9592 * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS:
9594 * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
9600 * @value: A #GValue structure.
9601 * @type: A #GType value.
9603 * Checks if @value holds (or contains) a value of @type.
9604 * This macro will also check for @value != %NULL and issue a
9605 * warning if the check fails.
9607 * Returns: %TRUE if @value holds the @type.
9612 * G_VALUE_HOLDS_BOOLEAN:
9613 * @value: a valid #GValue structure
9615 * Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN.
9617 * Returns: %TRUE on success.
9622 * G_VALUE_HOLDS_BOXED:
9623 * @value: a valid #GValue structure
9625 * Checks whether the given #GValue can hold values derived
9626 * from type %G_TYPE_BOXED.
9628 * Returns: %TRUE on success.
9633 * G_VALUE_HOLDS_CHAR:
9634 * @value: a valid #GValue structure
9636 * Checks whether the given #GValue can hold values of type %G_TYPE_CHAR.
9638 * Returns: %TRUE on success.
9643 * G_VALUE_HOLDS_DOUBLE:
9644 * @value: a valid #GValue structure
9646 * Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE.
9648 * Returns: %TRUE on success.
9653 * G_VALUE_HOLDS_ENUM:
9654 * @value: a valid #GValue structure
9656 * Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM.
9658 * Returns: %TRUE on success.
9663 * G_VALUE_HOLDS_FLAGS:
9664 * @value: a valid #GValue structure
9666 * Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS.
9668 * Returns: %TRUE on success.
9673 * G_VALUE_HOLDS_FLOAT:
9674 * @value: a valid #GValue structure
9676 * Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT.
9678 * Returns: %TRUE on success.
9683 * G_VALUE_HOLDS_GTYPE:
9684 * @value: a valid #GValue structure
9686 * Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE.
9689 * Returns: %TRUE on success.
9694 * G_VALUE_HOLDS_INT:
9695 * @value: a valid #GValue structure
9697 * Checks whether the given #GValue can hold values of type %G_TYPE_INT.
9699 * Returns: %TRUE on success.
9704 * G_VALUE_HOLDS_INT64:
9705 * @value: a valid #GValue structure
9707 * Checks whether the given #GValue can hold values of type %G_TYPE_INT64.
9709 * Returns: %TRUE on success.
9714 * G_VALUE_HOLDS_LONG:
9715 * @value: a valid #GValue structure
9717 * Checks whether the given #GValue can hold values of type %G_TYPE_LONG.
9719 * Returns: %TRUE on success.
9724 * G_VALUE_HOLDS_OBJECT:
9725 * @value: a valid #GValue structure
9727 * Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT.
9729 * Returns: %TRUE on success.
9734 * G_VALUE_HOLDS_PARAM:
9735 * @value: a valid #GValue structure
9737 * Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM.
9739 * Returns: %TRUE on success.
9744 * G_VALUE_HOLDS_POINTER:
9745 * @value: a valid #GValue structure
9747 * Checks whether the given #GValue can hold values of type %G_TYPE_POINTER.
9749 * Returns: %TRUE on success.
9754 * G_VALUE_HOLDS_STRING:
9755 * @value: a valid #GValue structure
9757 * Checks whether the given #GValue can hold values of type %G_TYPE_STRING.
9759 * Returns: %TRUE on success.
9764 * G_VALUE_HOLDS_UCHAR:
9765 * @value: a valid #GValue structure
9767 * Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR.
9769 * Returns: %TRUE on success.
9774 * G_VALUE_HOLDS_UINT:
9775 * @value: a valid #GValue structure
9777 * Checks whether the given #GValue can hold values of type %G_TYPE_UINT.
9779 * Returns: %TRUE on success.
9784 * G_VALUE_HOLDS_UINT64:
9785 * @value: a valid #GValue structure
9787 * Checks whether the given #GValue can hold values of type %G_TYPE_UINT64.
9789 * Returns: %TRUE on success.
9794 * G_VALUE_HOLDS_ULONG:
9795 * @value: a valid #GValue structure
9797 * Checks whether the given #GValue can hold values of type %G_TYPE_ULONG.
9799 * Returns: %TRUE on success.
9804 * G_VALUE_HOLDS_VARIANT:
9805 * @value: a valid #GValue structure
9807 * Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT.
9809 * Returns: %TRUE on success.
9815 * G_VALUE_NOCOPY_CONTENTS:
9817 * If passed to G_VALUE_COLLECT(), allocated data won't be copied
9818 * but used verbatim. This does not affect ref-counted types like
9819 * objects. For more details, see the #GValueTable documentation.
9825 * @value: A #GValue structure.
9827 * Get the type identifier of @value.
9829 * Returns: the #GType.
9834 * G_VALUE_TYPE_NAME:
9835 * @value: A #GValue structure.
9837 * Gets the the type name of @value.
9839 * Returns: the type name.
9845 * @type_string: a well-formed #GVariantType type string
9847 * Converts a string to a const #GVariantType. Depending on the
9848 * current debugging level, this function may perform a runtime check
9849 * to ensure that @string is a valid GVariant type string.
9850 * It is always a programmer error to use this macro with an invalid
9857 * G_VARIANT_TYPE_ANY:
9859 * An indefinite type that is a supertype of every type (including
9865 * G_VARIANT_TYPE_ARRAY:
9867 * An indefinite type that is a supertype of every array type.
9872 * G_VARIANT_TYPE_BASIC:
9874 * An indefinite type that is a supertype of every basic (ie:
9875 * non-container) type.
9880 * G_VARIANT_TYPE_BOOLEAN:
9882 * The type of a value that can be either %TRUE or %FALSE.
9887 * G_VARIANT_TYPE_BYTE:
9889 * The type of an integer value that can range from 0 to 255.
9894 * G_VARIANT_TYPE_BYTESTRING:
9896 * The type of an array of bytes. This type is commonly used to pass
9897 * around strings that may not be valid utf8. In that case, the
9898 * convention is that the nul terminator character should be included as
9899 * the last character in the array.
9904 * G_VARIANT_TYPE_BYTESTRING_ARRAY:
9906 * The type of an array of byte strings (an array of arrays of bytes).
9911 * G_VARIANT_TYPE_DICTIONARY:
9913 * An indefinite type that is a supertype of every dictionary type --
9914 * that is, any array type that has an element type equal to any
9915 * dictionary entry type.
9920 * G_VARIANT_TYPE_DICT_ENTRY:
9922 * An indefinite type that is a supertype of every dictionary entry
9928 * G_VARIANT_TYPE_DOUBLE:
9930 * The type of a double precision IEEE754 floating point number.
9931 * These guys go up to about 1.80e308 (plus and minus) but miss out on
9932 * some numbers in between. In any case, that's far greater than the
9933 * estimated number of fundamental particles in the observable
9939 * G_VARIANT_TYPE_HANDLE:
9941 * The type of a 32bit signed integer value, that by convention, is used
9942 * as an index into an array of file descriptors that are sent alongside
9944 * If you are not interacting with DBus, then there is no reason to make
9950 * G_VARIANT_TYPE_INT16:
9952 * The type of an integer value that can range from -32768 to 32767.
9957 * G_VARIANT_TYPE_INT32:
9959 * The type of an integer value that can range from -2147483648 to
9965 * G_VARIANT_TYPE_INT64:
9967 * The type of an integer value that can range from
9968 * -9223372036854775808 to 9223372036854775807.
9973 * G_VARIANT_TYPE_MAYBE:
9975 * An indefinite type that is a supertype of every maybe type.
9980 * G_VARIANT_TYPE_OBJECT_PATH:
9982 * The type of a DBus object reference. These are strings of a
9983 * specific format used to identify objects at a given destination on
9985 * If you are not interacting with DBus, then there is no reason to make
9986 * use of this type. If you are, then the DBus specification contains a
9987 * precise description of valid object paths.
9992 * G_VARIANT_TYPE_SIGNATURE:
9994 * The type of a DBus type signature. These are strings of a specific
9995 * format used as type signatures for DBus methods and messages.
9996 * If you are not interacting with DBus, then there is no reason to make
9997 * use of this type. If you are, then the DBus specification contains a
9998 * precise description of valid signature strings.
10003 * G_VARIANT_TYPE_STRING:
10005 * The type of a string. "" is a string. %NULL is not a string.
10010 * G_VARIANT_TYPE_STRING_ARRAY:
10012 * The type of an array of strings.
10017 * G_VARIANT_TYPE_TUPLE:
10019 * An indefinite type that is a supertype of every tuple type,
10020 * regardless of the number of items in the tuple.
10025 * G_VARIANT_TYPE_UINT16:
10027 * The type of an integer value that can range from 0 to 65535.
10028 * There were about this many people living in Toronto in the 1870s.
10033 * G_VARIANT_TYPE_UINT32:
10035 * The type of an integer value that can range from 0 to 4294967295.
10036 * That's one number for everyone who was around in the late 1970s.
10041 * G_VARIANT_TYPE_UINT64:
10043 * The type of an integer value that can range from 0 to
10044 * 18446744073709551616. That's a really big number, but a Rubik's
10045 * cube can have a bit more than twice as many possible positions.
10050 * G_VARIANT_TYPE_UNIT:
10052 * The empty tuple type. Has only one instance. Known also as "triv"
10058 * G_VARIANT_TYPE_VARDICT:
10060 * The type of a dictionary mapping strings to variants (the ubiquitous
10066 * G_VARIANT_TYPE_VARIANT:
10068 * The type of a box that contains any other value (including another
10074 * G_VFS_EXTENSION_POINT_NAME:
10076 * Extension point for #GVfs functionality.
10077 * See <link linkend="extending-gio">Extending GIO</link>.
10082 * G_VOLUME_IDENTIFIER_KIND_HAL_UDI:
10084 * The string used to obtain a Hal UDI with g_volume_get_identifier().
10089 * G_VOLUME_IDENTIFIER_KIND_LABEL:
10091 * The string used to obtain a filesystem label with g_volume_get_identifier().
10096 * G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT:
10098 * The string used to obtain a NFS mount with g_volume_get_identifier().
10103 * G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE:
10105 * The string used to obtain a Unix device path with g_volume_get_identifier().
10110 * G_VOLUME_IDENTIFIER_KIND_UUID:
10112 * The string used to obtain a UUID with g_volume_get_identifier().
10117 * G_VOLUME_MONITOR_EXTENSION_POINT_NAME:
10119 * Extension point for volume monitor functionality.
10120 * See <link linkend="extending-gio">Extending GIO</link>.
10125 * SECTION:extensionpoints
10126 * @short_description: Extension Points
10128 * @see_also: <link linkend="extending-gio">Extending GIO</link>
10130 * #GIOExtensionPoint provides a mechanism for modules to extend the
10131 * functionality of the library or application that loaded it in an
10132 * organized fashion.
10133 * An extension point is identified by a name, and it may optionally
10134 * require that any implementation must by of a certain type (or derived
10135 * thereof). Use g_io_extension_point_register() to register an
10136 * extension point, and g_io_extension_point_set_required_type() to
10137 * set a required type.
10138 * A module can implement an extension point by specifying the #GType
10139 * that implements the functionality. Additionally, each implementation
10140 * of an extension point has a name, and a priority. Use
10141 * g_io_extension_point_implement() to implement an extension point.
10143 * GIOExtensionPoint *ep;
10144 * /* Register an extension point */
10145 * ep = g_io_extension_point_register ("my-extension-point");
10146 * g_io_extension_point_set_required_type (ep, MY_TYPE_EXAMPLE);
10149 * /* Implement an extension point */
10150 * G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE);
10151 * g_io_extension_point_implement ("my-extension-point",
10152 * my_example_impl_get_type (),
10156 * It is up to the code that registered the extension point how
10157 * it uses the implementations that have been associated with it.
10158 * Depending on the use case, it may use all implementations, or
10159 * only the one with the highest priority, or pick a specific
10161 * To avoid opening all modules just to find out what extension
10162 * points they implement, GIO makes use of a caching mechanism,
10163 * see <link linkend="gio-querymodules">gio-querymodules</link>.
10164 * You are expected to run this command after installing a
10172 * @short_description: An action
10174 * #GAction represents a single named action.
10175 * The main interface to an action is that it can be activated with
10176 * g_action_activate(). This results in the 'activate' signal being
10177 * emitted. An activation has a #GVariant parameter (which may be
10178 * %NULL). The correct type for the parameter is determined by a static
10179 * parameter type (which is given at construction time).
10180 * An action may optionally have a state, in which case the state may be
10181 * set with g_action_set_state(). This call takes a #GVariant. The
10182 * correct type for the state is determined by a static state type
10183 * (which is given at construction time).
10184 * The state may have a hint associated with it, specifying its valid
10186 * #GAction is merely the interface to the concept of an action, as
10187 * described above. Various implementations of actions exist, including
10188 * #GSimpleAction and #GtkAction.
10189 * In all cases, the implementing class is responsible for storing the
10190 * name of the action, the parameter type, the enabled state, the
10191 * optional state type and the state and emitting the appropriate
10192 * signals when these change. The implementor responsible for filtering
10193 * calls to g_action_activate() and g_action_set_state() for type safety
10194 * and for the state being enabled.
10195 * Probably the only useful thing to do with a #GAction is to put it
10196 * inside of a #GSimpleActionGroup.
10201 * SECTION:gactiongroup
10202 * @title: GActionGroup
10203 * @short_description: A group of actions
10205 * #GActionGroup represents a group of actions.
10206 * Each action in the group has a unique name (which is a string). All
10207 * method calls, except g_action_group_list_actions() take the name of
10208 * an action as an argument.
10209 * The #GActionGroup API is meant to be the 'public' API to the action
10210 * group. The calls here are exactly the interaction that 'external
10211 * the action group implementation) are found on subclasses. This is
10212 * why you will find -- for example -- g_action_group_get_enabled() but
10213 * not an equivalent <function>set()</function> call.
10214 * Signals are emitted on the action group in response to state changes
10215 * on individual actions.
10217 * Forces' (eg: UI, incoming D-Bus messages, etc.) are supposed to have
10218 * With actions. 'internal' apis (ie: ones meant only to be accessed by
10224 * @short_description: Application information and launch contexts
10225 * @include: gio/gio.h
10227 * #GAppInfo and #GAppLaunchContext are used for describing and launching
10228 * applications installed on the system.
10229 * As of GLib 2.20, URIs will always be converted to POSIX paths
10230 * (using g_file_get_path()) when using g_app_info_launch() even if
10231 * the application requested an URI and not a POSIX path. For example
10232 * for an desktop-file based application with Exec key <literal>totem
10233 * %%U</literal> and a single URI,
10234 * <literal>sftp://foo/file.avi</literal>, then
10235 * <literal>/home/user/.gvfs/sftp on foo/file.avi</literal> will be
10236 * passed. This will only work if a set of suitable GIO extensions
10237 * (such as gvfs 2.26 compiled with FUSE support), is available and
10238 * operational; if this is not the case, the URI will be passed
10239 * unmodified to the application. Some URIs, such as
10240 * <literal>mailto:</literal>, of course cannot be mapped to a POSIX
10241 * path (in gvfs there's no FUSE mount for it); such URIs will be
10242 * passed unmodified to the application.
10243 * Specifically for gvfs 2.26 and later, the POSIX URI will be mapped
10244 * back to the GIO URI in the #GFile constructors (since gvfs
10245 * implements the #GVfs extension point). As such, if the application
10246 * needs to examine the URI, it needs to use g_file_get_uri() or
10247 * similar on #GFile. In other words, an application cannot assume
10248 * that the URI passed to e.g. g_file_new_for_commandline_arg() is
10249 * equal to the result of g_file_get_uri(). The following snippet
10250 * illustrates this:
10254 * file = g_file_new_for_commandline_arg (uri_from_commandline);
10255 * uri = g_file_get_uri (file);
10256 * strcmp (uri, uri_from_commandline) == 0; // FALSE
10258 * if (g_file_has_uri_scheme (file, "cdda"))
10260 * // do something special with uri
10262 * g_object_unref (file);
10263 * </programlisting>
10264 * This code will work when both <literal>cdda://sr0/Track
10265 * 1.wav</literal> and <literal>/home/user/.gvfs/cdda on sr0/Track
10266 * 1.wav</literal> is passed to the application. It should be noted
10267 * that it's generally not safe for applications to rely on the format
10268 * of a particular URIs. Different launcher applications (e.g. file
10269 * managers) may have different ideas of what a given URI means.
10274 * SECTION:gapplication
10275 * @title: GApplication
10276 * @short_description: Core application class
10278 * A #GApplication is the foundation of an application, unique for a
10279 * given application identifier. The GApplication class wraps some
10280 * low-level platform-specific services and is intended to act as the
10281 * foundation for higher-level application classes such as
10282 * #GtkApplication or #MxApplication. In general, you should not use
10283 * this class outside of a higher level framework.
10284 * One of the core features that GApplication provides is process
10285 * uniqueness, in the context of a "session". The session concept is
10286 * platform-dependent, but corresponds roughly to a graphical desktop
10287 * login. When your application is launched again, its arguments
10288 * are passed through platform communication to the already running
10289 * program. The already running instance of the program is called the
10290 * <firstterm>primary instance</firstterm>.
10291 * Before using GApplication, you must choose an "application identifier".
10292 * The expected form of an application identifier is very close to that of
10293 * of a <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-interface">DBus bus name</ulink>.
10294 * For details on valid application identifiers, see
10295 * g_application_id_is_valid().
10296 * The application identifier is claimed by the application as a
10297 * well-known bus name on the user's session bus. This means that the
10298 * uniqueness of your application is scoped to the current session. It
10299 * also means that your application may provide additional services
10300 * (through registration of other object paths) at that bus name.
10301 * The registration of these object paths should be done with the shared
10302 * GDBus session bus. Note that due to the internal architecture of
10303 * GDBus, method calls can be dispatched at any time (even if a main
10304 * loop is not running). For this reason, you must ensure that any
10305 * object paths that you wish to register are registered before
10306 * #GApplication attempts to acquire the bus name of your application
10307 * (which happens in g_application_register()). Unfortunately, this
10308 * means that you cannot use g_application_get_is_remote() to decide if
10309 * you want to register object paths.
10310 * GApplication provides convenient life cycle management by maintaining
10311 * a <firstterm>use count</firstterm> for the primary application instance.
10312 * The use count can be changed using g_application_hold() and
10313 * g_application_release(). If it drops to zero, the application exits.
10314 * GApplication also implements the #GActionGroup interface and lets you
10315 * easily export actions by adding them with g_application_set_action_group().
10316 * When invoking an action by calling g_action_group_activate_action() on
10317 * the application, it is always invoked in the primary instance.
10318 * There is a number of different entry points into a #GApplication:
10320 * <listitem>via 'Activate' (i.e. just starting the application)</listitem>
10321 * <listitem>via 'Open' (i.e. opening some files)</listitem>
10322 * <listitem>by handling a command-line</listitem>
10323 * <listitem>via activating an action</listitem>
10325 * The #GApplication::startup signal lets you handle the application
10326 * initialization for all of these in a single place.
10327 * Regardless of which of these entry points is used to start the application,
10328 * GApplication passes some <firstterm id="platform-data">platform
10329 * data</firstterm> from the launching instance to the primary instance,
10330 * in the form of a #GVariant dictionary mapping strings to variants.
10331 * To use platform data, override the @before_emit or @after_emit virtual
10332 * functions in your #GApplication subclass. When dealing with
10333 * #GApplicationCommandline objects, the platform data is directly
10334 * available via g_application_command_line_get_cwd(),
10335 * g_application_command_line_get_environ() and
10336 * g_application_command_line_get_platform_data().
10337 * As the name indicates, the platform data may vary depending on the
10338 * operating system, but it always includes the current directory (key
10339 * "cwd"), and optionally the environment (ie the set of environment
10340 * variables and their values) of the calling process (key "environ").
10341 * The environment is only added to the platform data if the
10342 * #G_APPLICATION_SEND_ENVIONMENT flag is set. GApplication subclasses
10343 * can add their own platform data by overriding the @add_platform_data
10344 * virtual function. For instance, #GtkApplication adds startup notification
10345 * data in this way.
10346 * To parse commandline arguments you may handle the
10347 * #GApplication::command-line signal or override the local_command_line()
10348 * vfunc, to parse them in either the primary instance or the local instance,
10350 * <example id="gapplication-example-open"><title>Opening files with a GApplication</title>
10352 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-open.c">
10353 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10355 * </programlisting>
10357 * <example id="gapplication-example-actions"><title>A GApplication with actions</title>
10359 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-actions.c">
10360 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10362 * </programlisting>
10365 * Examples include: "com.example.MyApp", "org.example.internal-apps.Calculator".
10370 * SECTION:gapplicationcommandline
10371 * @title: GApplicationCommandLine
10372 * @short_description: A command-line invocation of an application
10373 * @see_also: #GApplication
10375 * #GApplicationCommandLine represents a command-line invocation of
10376 * an application. It is created by #GApplication and emitted
10377 * in the #GApplication::command-line signal and virtual function.
10378 * The class contains the list of arguments that the program was invoked
10379 * with. It is also possible to query if the commandline invocation was
10380 * commandline to this process).
10381 * The GApplicationCommandLine object can provide the @argc and @argv
10382 * parameters for use with the #GOptionContext command-line parsing API,
10383 * with the g_application_command_line_get_arguments() function. See
10384 * <xref linkend="gapplication-example-cmdline3"/> for an example.
10385 * The exit status of the originally-invoked process may be set and
10386 * messages can be printed to stdout or stderr of that process. The
10387 * lifecycle of the originally-invoked process is tied to the lifecycle
10389 * The main use for #GApplicationCommandline (and the
10390 * #GApplication::command-line signal) is 'Emacs server' like use cases:
10391 * You can set the <envar>EDITOR</envar> environment variable to have
10392 * e.g. git use your favourite editor to edit commit messages, and if you
10393 * already have an instance of the editor running, the editing will happen
10394 * in the running instance, instead of opening a new one. An important
10395 * aspect of this use case is that the process that gets started by git
10396 * does not return until the editing is done.
10397 * <example id="gapplication-example-cmdline"><title>Handling commandline arguments with GApplication</title>
10399 * A simple example where the commandline is completely handled
10400 * in the #GApplication::command-line handler. The launching instance exits
10401 * once the signal handler in the primary instance has returned, and the
10402 * return value of the signal handler becomes the exit status of the launching
10406 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline.c">
10407 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10409 * </programlisting>
10411 * <example id="gapplication-example-cmdline2"><title>Split commandline handling</title>
10413 * An example of split commandline handling. Options that start with
10414 * <literal>--local-</literal> are handled locally, all other options are
10415 * passed to the #GApplication::command-line handler which runs in the primary
10419 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline2.c">
10420 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10422 * </programlisting>
10424 * <example id="gapplication-example-cmdline3"><title>Deferred commandline handling</title>
10426 * An example of deferred commandline handling. Here, the commandline is
10427 * not completely handled before the #GApplication::command-line handler
10428 * returns. Instead, we keep a reference to the GApplicationCommandline
10429 * object and handle it later(in this example, in an idle). Note that it
10430 * is necessary to hold the application until you are done with the
10434 * This example also shows how to use #GOptionContext for parsing the
10435 * commandline arguments.
10438 * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gapplication-example-cmdline3.c">
10439 * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
10441 * </programlisting>
10444 * Local (ie: the current process is running in direct response to the
10445 * Invocation) or remote (ie: some other process forwarded the
10446 * Of this object (ie: the process exits when the last reference is
10451 * SECTION:gasynchelper
10452 * @short_description: Asynchronous Helper Functions
10453 * @include: gio/gio.h
10454 * @see_also: #GAsyncReady
10456 * Provides helper functions for asynchronous operations.
10461 * SECTION:gasyncinitable
10462 * @short_description: Asynchronously failable object initialization interface
10463 * @include: gio/gio.h
10464 * @see_also: #GInitable
10466 * This is the asynchronous version of #GInitable; it behaves the same
10467 * in all ways except that initialization is asynchronous. For more details
10468 * see the descriptions on #GInitable.
10469 * A class may implement both the #GInitable and #GAsyncInitable interfaces.
10470 * Users of objects implementing this are not intended to use the interface
10471 * method directly; instead it will be used automatically in various ways.
10472 * For C applications you generally just call g_async_initable_new_async()
10473 * directly, or indirectly via a foo_thing_new_async() wrapper. This will call
10474 * g_async_initable_init_async() under the cover, calling back with %NULL and
10475 * a set %GError on failure.
10476 * A typical implementation might look something like this:
10484 * _foo_ready_cb (Foo *self)
10487 * self->priv->state = INITIALIZED;
10488 * for (l = self->priv->init_results; l != NULL; l = l->next)
10490 * GSimpleAsyncResult *simple = l->data;
10491 * if (!self->priv->success)
10492 * g_simple_async_result_set_error (simple, ...);
10493 * g_simple_async_result_complete (simple);
10494 * g_object_unref (simple);
10496 * g_list_free (self->priv->init_results);
10497 * self->priv->init_results = NULL;
10500 * foo_init_async (GAsyncInitable *initable,
10502 * GCancellable *cancellable,
10503 * GAsyncReadyCallback callback,
10504 * gpointer user_data)
10506 * Foo *self = FOO (initable);
10507 * GSimpleAsyncResult *simple;
10508 * simple = g_simple_async_result_new (G_OBJECT (initable)
10512 * switch (self->priv->state)
10514 * case NOT_INITIALIZED:
10515 * _foo_get_ready (self);
10516 * self->priv->init_results = g_list_append (self->priv->init_results,
10518 * self->priv->state = INITIALIZING;
10520 * case INITIALIZING:
10521 * self->priv->init_results = g_list_append (self->priv->init_results,
10524 * case INITIALIZED:
10525 * if (!self->priv->success)
10526 * g_simple_async_result_set_error (simple, ...);
10527 * g_simple_async_result_complete_in_idle (simple);
10528 * g_object_unref (simple);
10533 * foo_init_finish (GAsyncInitable *initable,
10534 * GAsyncResult *result,
10537 * g_return_val_if_fail (g_simple_async_result_is_valid (result,
10538 * G_OBJECT (initable), foo_init_async), FALSE);
10539 * if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
10545 * foo_async_initable_iface_init (gpointer g_iface,
10548 * GAsyncInitableIface *iface = g_iface;
10549 * iface->init_async = foo_init_async;
10550 * iface->init_finish = foo_init_finish;
10557 * SECTION:gasyncresult
10558 * @short_description: Asynchronous Function Results
10559 * @include: gio/gio.h
10560 * @see_also: #GSimpleAsyncResult
10562 * Provides a base class for implementing asynchronous function results.
10563 * Asynchronous operations are broken up into two separate operations
10564 * which are chained together by a #GAsyncReadyCallback. To begin
10565 * an asynchronous operation, provide a #GAsyncReadyCallback to the
10566 * asynchronous function. This callback will be triggered when the
10567 * operation has completed, and will be passed a #GAsyncResult instance
10568 * filled with the details of the operation's success or failure, the
10569 * object the asynchronous function was started for and any error codes
10570 * returned. The asynchronous callback function is then expected to call
10571 * the corresponding "_finish()" function, passing the object the
10572 * function was called for, the #GAsyncResult instance, and (optionally)
10573 * an @error to grab any error conditions that may have occurred.
10574 * The "_finish()" function for an operation takes the generic result
10575 * (of type #GAsyncResult) and returns the specific result that the
10576 * operation in question yields (e.g. a #GFileEnumerator for a
10577 * "enumerate children" operation). If the result or error status of the
10578 * operation is not needed, there is no need to call the "_finish()"
10579 * function; GIO will take care of cleaning up the result and error
10580 * information after the #GAsyncReadyCallback returns. Applications may
10581 * also take a reference to the #GAsyncResult and call "_finish()"
10582 * later; however, the "_finish()" function may be called at most once.
10583 * Example of a typical asynchronous operation flow:
10585 * void _theoretical_frobnitz_async (Theoretical *t,
10587 * GAsyncReadyCallback *cb,
10589 * gboolean _theoretical_frobnitz_finish (Theoretical *t,
10590 * GAsyncResult *res,
10593 * frobnitz_result_func (GObject *source_object,
10594 * GAsyncResult *res,
10595 * gpointer user_data)
10597 * gboolean success = FALSE;
10598 * success = _theoretical_frobnitz_finish (source_object, res, NULL);
10600 * g_printf ("Hurray!\n");
10602 * g_printf ("Uh oh!\n");
10603 * /<!-- -->* ... *<!-- -->/
10605 * int main (int argc, void *argv[])
10607 * /<!-- -->* ... *<!-- -->/
10608 * _theoretical_frobnitz_async (theoretical_data,
10610 * frobnitz_result_func,
10612 * /<!-- -->* ... *<!-- -->/
10615 * The callback for an asynchronous operation is called only once, and is
10616 * always called, even in the case of a cancelled operation. On cancellation
10617 * the result is a %G_IO_ERROR_CANCELLED error.
10618 * Some asynchronous operations are implemented using synchronous calls.
10619 * These are run in a separate thread, if #GThread has been initialized, but
10620 * otherwise they are sent to the Main Event Loop and processed in an idle
10621 * function. So, if you truly need asynchronous operations, make sure to
10622 * initialize #GThread.
10627 * SECTION:gbufferedinputstream
10628 * @short_description: Buffered Input Stream
10629 * @include: gio/gio.h
10630 * @see_also: #GFilterInputStream, #GInputStream
10632 * Buffered input stream implements #GFilterInputStream and provides
10633 * for buffered reads.
10634 * By default, #GBufferedInputStream's buffer size is set at 4 kilobytes.
10635 * To create a buffered input stream, use g_buffered_input_stream_new(),
10636 * or g_buffered_input_stream_new_sized() to specify the buffer's size at
10638 * To get the size of a buffer within a buffered input stream, use
10639 * g_buffered_input_stream_get_buffer_size(). To change the size of a
10640 * buffered input stream's buffer, use
10641 * g_buffered_input_stream_set_buffer_size(). Note that the buffer's size
10642 * cannot be reduced below the size of the data within the buffer.
10647 * SECTION:gbufferedoutputstream
10648 * @short_description: Buffered Output Stream
10649 * @include: gio/gio.h
10650 * @see_also: #GFilterOutputStream, #GOutputStream
10652 * Buffered output stream implements #GFilterOutputStream and provides
10653 * for buffered writes.
10654 * By default, #GBufferedOutputStream's buffer size is set at 4 kilobytes.
10655 * To create a buffered output stream, use g_buffered_output_stream_new(),
10656 * or g_buffered_output_stream_new_sized() to specify the buffer's size
10658 * To get the size of a buffer within a buffered input stream, use
10659 * g_buffered_output_stream_get_buffer_size(). To change the size of a
10660 * buffered output stream's buffer, use
10661 * g_buffered_output_stream_set_buffer_size(). Note that the buffer's
10662 * size cannot be reduced below the size of the data within the buffer.
10667 * SECTION:gcancellable
10668 * @short_description: Thread-safe Operation Cancellation Stack
10669 * @include: gio/gio.h
10671 * GCancellable is a thread-safe operation cancellation stack used
10672 * throughout GIO to allow for cancellation of synchronous and
10673 * asynchronous operations.
10678 * SECTION:gcharsetconverter
10679 * @short_description: Convert between charsets
10680 * @include: gio/gio.h
10682 * #GCharsetConverter is an implementation of #GConverter based on
10688 * SECTION:gcontenttype
10689 * @short_description: Platform-specific content typing
10690 * @include: gio/gio.h
10692 * A content type is a platform specific string that defines the type
10693 * of a file. On unix it is a mime type, on win32 it is an extension string
10694 * like ".doc", ".txt" or a percieved string like "audio". Such strings
10695 * can be looked up in the registry at HKEY_CLASSES_ROOT.
10700 * SECTION:gconverter
10701 * @short_description: Data conversion interface
10702 * @include: gio/gio.h
10703 * @see_also: #GInputStream, #GOutputStream
10705 * #GConverter is implemented by objects that convert
10706 * binary data in various ways. The conversion can be
10707 * stateful and may fail at any place.
10708 * compression, decompression and regular expression
10711 * Some example conversions are: character set conversion,
10717 * SECTION:gconverterinputstream
10718 * @short_description: Converter Input Stream
10719 * @include: gio/gio.h
10720 * @see_also: #GInputStream, #GConverter
10722 * Converter input stream implements #GInputStream and allows
10723 * conversion of data of various types during reading.
10728 * SECTION:gconverteroutputstream
10729 * @short_description: Converter Output Stream
10730 * @include: gio/gio.h
10731 * @see_also: #GOutputStream, #GConverter
10733 * Converter output stream implements #GOutputStream and allows
10734 * conversion of data of various types during reading.
10739 * SECTION:gcredentials
10740 * @short_description: An object containing credentials
10741 * @include: gio/gio.h
10743 * The #GCredentials type is a reference-counted wrapper for native
10744 * credentials. This information is typically used for identifying,
10745 * authenticating and authorizing other processes.
10746 * Some operating systems supports looking up the credentials of the
10747 * remote peer of a communication endpoint - see e.g.
10748 * g_socket_get_credentials().
10749 * Some operating systems supports securely sending and receiving
10750 * credentials over a Unix Domain Socket, see
10751 * #GUnixCredentialsMessage, g_unix_connection_send_credentials() and
10752 * g_unix_connection_receive_credentials() for details.
10753 * On Linux, the native credential type is a <type>struct ucred</type>
10755 * <citerefentry><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry>
10756 * man page for details. This corresponds to
10757 * %G_CREDENTIALS_TYPE_LINUX_UCRED.
10758 * On FreeBSD, the native credential type is a <type>struct cmsgcred</type>.
10759 * This corresponds to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED.
10764 * SECTION:gdatainputstream
10765 * @short_description: Data Input Stream
10766 * @include: gio/gio.h
10767 * @see_also: #GInputStream
10769 * Data input stream implements #GInputStream and includes functions for
10770 * reading structured data directly from a binary input stream.
10775 * SECTION:gdataoutputstream
10776 * @short_description: Data Output Stream
10777 * @include: gio/gio.h
10778 * @see_also: #GOutputStream
10780 * Data output stream implements #GOutputStream and includes functions for
10781 * writing data directly to an output stream.
10786 * SECTION:gdbusaddress
10787 * @title: D-Bus Addresses
10788 * @short_description: D-Bus connection endpoints
10789 * @include: gio/gio.h
10791 * Routines for working with D-Bus addresses. A D-Bus address is a string
10792 * like "unix:tmpdir=/tmp/my-app-name". The exact format of addresses
10793 * is explained in detail in the <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html#addresses">D-Bus specification</link>.
10798 * SECTION:gdbusauthobserver
10799 * @short_description: Object used for authenticating connections
10800 * @include: gio/gio.h
10802 * The #GDBusAuthObserver type provides a mechanism for participating
10803 * in how a #GDBusServer (or a #GDBusConnection) authenticates remote
10804 * peers. Simply instantiate a #GDBusAuthObserver and connect to the
10805 * signals you are interested in. Note that new signals may be added
10807 * For example, if you only want to allow D-Bus connections from
10808 * processes owned by the same uid as the server, you would use a
10809 * signal handler like the following:
10810 * <example id="auth-observer"><title>Controlling Authentication</title><programlisting>
10812 * on_authorize_authenticated_peer (GDBusAuthObserver *observer,
10813 * GIOStream *stream,
10814 * GCredentials *credentials,
10815 * gpointer user_data)
10817 * gboolean authorized;
10818 * authorized = FALSE;
10819 * if (credentials != NULL)
10821 * GCredentials *own_credentials;
10822 * own_credentials = g_credentials_new ();
10823 * if (g_credentials_is_same_user (credentials, own_credentials, NULL))
10824 * authorized = TRUE;
10825 * g_object_unref (own_credentials);
10827 * return authorized;
10829 * </programlisting></example>
10834 * SECTION:gdbusconnection
10835 * @short_description: D-Bus Connections
10836 * @include: gio/gio.h
10838 * The #GDBusConnection type is used for D-Bus connections to remote
10839 * peers such as a message buses. It is a low-level API that offers a
10840 * lot of flexibility. For instance, it lets you establish a connection
10841 * over any transport that can by represented as an #GIOStream.
10842 * This class is rarely used directly in D-Bus clients. If you are writing
10843 * an D-Bus client, it is often easier to use the g_bus_own_name(),
10844 * g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs.
10845 * <example id="gdbus-server"><title>D-Bus server example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-server.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10846 * <example id="gdbus-subtree-server"><title>D-Bus subtree example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-subtree.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10847 * <example id="gdbus-unix-fd-client"><title>D-Bus UNIX File Descriptor example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-unix-fd-client.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10848 * <example id="gdbus-export"><title>Exporting a GObject</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-export.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10853 * SECTION:gdbuserror
10854 * @title: GDBusError
10855 * @short_description: Mapping D-Bus errors to and from GError
10856 * @include: gio/gio.h
10858 * All facilities that return errors from remote methods (such as
10859 * g_dbus_connection_call_sync()) use #GError to represent both D-Bus
10860 * errors (e.g. errors returned from the other peer) and locally
10861 * in-process generated errors.
10862 * To check if a returned #GError is an error from a remote peer, use
10863 * g_dbus_error_is_remote_error(). To get the actual D-Bus error name,
10864 * use g_dbus_error_get_remote_error(). Before presenting an error,
10865 * always use g_dbus_error_strip_remote_error().
10866 * In addition, facilities used to return errors to a remote peer also
10867 * use #GError. See g_dbus_method_invocation_return_error() for
10868 * discussion about how the D-Bus error name is set.
10869 * Applications can associate a #GError error domain with a set of D-Bus errors in order to
10870 * automatically map from D-Bus errors to #GError and back. This
10871 * is typically done in the function returning the #GQuark for the
10873 * <example id="error-registration"><title>Error Registration</title><programlisting>
10874 * /<!-- -->* foo-bar-error.h: *<!-- -->/
10875 * #define FOO_BAR_ERROR (foo_bar_error_quark ())
10876 * GQuark foo_bar_error_quark (void);
10879 * FOO_BAR_ERROR_FAILED,
10880 * FOO_BAR_ERROR_ANOTHER_ERROR,
10881 * FOO_BAR_ERROR_SOME_THIRD_ERROR,
10883 * /<!-- -->* foo-bar-error.c: *<!-- -->/
10884 * static const GDBusErrorEntry foo_bar_error_entries[] =
10886 * {FOO_BAR_ERROR_FAILED, "org.project.Foo.Bar.Error.Failed"},
10887 * {FOO_BAR_ERROR_ANOTHER_ERROR, "org.project.Foo.Bar.Error.AnotherError"},
10888 * {FOO_BAR_ERROR_SOME_THIRD_ERROR, "org.project.Foo.Bar.Error.SomeThirdError"},
10891 * foo_bar_error_quark (void)
10893 * static volatile gsize quark_volatile = 0;
10894 * g_dbus_error_register_error_domain ("foo-bar-error-quark",
10896 * foo_bar_error_entries,
10897 * G_N_ELEMENTS (foo_bar_error_entries));
10898 * G_STATIC_ASSERT (G_N_ELEMENTS (foo_bar_error_entries) - 1 == FOO_BAR_ERROR_SOME_THIRD_ERROR);
10899 * return (GQuark) quark_volatile;
10901 * </programlisting></example>
10902 * With this setup, a D-Bus peer can transparently pass e.g. %FOO_BAR_ERROR_ANOTHER_ERROR and
10903 * other peers will see the D-Bus error name <literal>org.project.Foo.Bar.Error.AnotherError</literal>.
10904 * If the other peer is using GDBus, the peer will see also %FOO_BAR_ERROR_ANOTHER_ERROR instead
10905 * of %G_IO_ERROR_DBUS_ERROR. Note that GDBus clients can still recover
10906 * <literal>org.project.Foo.Bar.Error.AnotherError</literal> using g_dbus_error_get_remote_error().
10907 * Note that errors in the %G_DBUS_ERROR error domain is intended only
10908 * for returning errors from a remote message bus process. Errors
10909 * generated locally in-process by e.g. #GDBusConnection is from the
10910 * %G_IO_ERROR domain.
10915 * SECTION:gdbusintrospection
10916 * @title: D-Bus Introspection Data
10917 * @short_description: Node and interface description data structures
10918 * @include: gio/gio.h
10920 * Various data structures and convenience routines to parse and
10921 * generate D-Bus introspection XML. Introspection information is
10922 * used when registering objects with g_dbus_connection_register_object().
10923 * The format of D-Bus introspection XML is specified in the
10924 * <link linkend="http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format">D-Bus specification</link>.
10929 * SECTION:gdbusmessage
10930 * @short_description: D-Bus Message
10931 * @include: gio/gio.h
10933 * A type for representing D-Bus messages that can be sent or received
10934 * on a #GDBusConnection.
10939 * SECTION:gdbusmethodinvocation
10940 * @short_description: Object for handling remote calls
10941 * @include: gio/gio.h
10943 * Instances of the #GDBusMethodInvocation class are used when
10944 * handling D-Bus method calls. It provides a way to asynchronously
10945 * return results and errors.
10946 * The normal way to obtain a #GDBusMethodInvocation object is to receive
10947 * it as an argument to the handle_method_call() function in a
10948 * #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object().
10953 * SECTION:gdbusnameowning
10954 * @title: Owning Bus Names
10955 * @short_description: Simple API for owning bus names
10956 * @include: gio/gio.h
10958 * Convenience API for owning bus names.
10959 * <example id="gdbus-owning-names"><title>Simple application owning a name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-own-name.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10964 * SECTION:gdbusnamewatching
10965 * @title: Watching Bus Names
10966 * @short_description: Simple API for watching bus names
10967 * @include: gio/gio.h
10969 * Convenience API for watching bus names.
10970 * <example id="gdbus-watching-names"><title>Simple application watching a name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-watch-name.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
10975 * SECTION:gdbusproxy
10976 * @short_description: Client-side proxies
10977 * @include: gio/gio.h
10979 * #GDBusProxy is a base class used for proxies to access a D-Bus
10980 * interface on a remote object. A #GDBusProxy can be constructed for
10981 * both well-known and unique names.
10982 * By default, #GDBusProxy will cache all properties (and listen to
10983 * changes) of the remote object, and proxy all signals that gets
10984 * emitted. This behaviour can be changed by passing suitable
10985 * #GDBusProxyFlags when the proxy is created. If the proxy is for a
10986 * well-known name, the property cache is flushed when the name owner
10987 * vanishes and reloaded when a name owner appears.
10988 * If a #GDBusProxy is used for a well-known name, the owner of the
10989 * name is tracked and can be read from
10990 * #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to
10991 * get notified of changes. Additionally, only signals and property
10992 * changes emitted from the current name owner are considered and
10993 * calls are always sent to the current name owner. This avoids a
10994 * number of race conditions when the name is lost by one owner and
10995 * claimed by another. However, if no name owner currently exists,
10996 * then calls will be sent to the well-known name which may result in
10997 * the message bus launching an owner (unless
10998 * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set).
10999 * The generic #GDBusProxy::g-properties-changed and #GDBusProxy::g-signal
11000 * signals are not very convenient to work with. Therefore, the recommended
11001 * way of working with proxies is to subclass #GDBusProxy, and have
11002 * more natural properties and signals in your derived class.
11003 * See <xref linkend="gdbus-example-proxy-subclass"/> for an example.
11004 * <example id="gdbus-wellknown-proxy"><title>GDBusProxy for a well-known-name</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-watch-proxy.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
11009 * SECTION:gdbusserver
11010 * @short_description: Helper for accepting connections
11011 * @include: gio/gio.h
11013 * #GDBusServer is a helper for listening to and accepting D-Bus
11015 * <example id="gdbus-peer-to-peer"><title>D-Bus peer-to-peer example</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/tests/gdbus-example-peer.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting></example>
11020 * SECTION:gdbusutils
11021 * @title: D-Bus Utilities
11022 * @short_description: Various utilities related to D-Bus.
11023 * @include: gio/gio.h
11025 * Various utility routines related to D-Bus.
11030 * SECTION:gdesktopappinfo
11031 * @title: GDesktopAppInfo
11032 * @short_description: Application information from desktop files
11033 * @include: gio/gdesktopappinfo.h
11035 * #GDesktopAppInfo is an implementation of #GAppInfo based on
11037 * Note that <filename><gio/gdesktopappinfo.h></filename> belongs to
11038 * the UNIX-specific GIO interfaces, thus you have to use the
11039 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
11045 * @short_description: Drive management
11046 * @include: gio/gio.h
11048 * #GDrive - this represent a piece of hardware connected to the machine.
11049 * It's generally only created for removable hardware or hardware with
11051 * #GDrive is a container class for #GVolume objects that stem from
11052 * the same piece of media. As such, #GDrive abstracts a drive with
11053 * (or without) removable media and provides operations for querying
11054 * whether media is available, determing whether media change is
11055 * automatically detected and ejecting the media.
11056 * If the #GDrive reports that media isn't automatically detected, one
11057 * can poll for media; typically one should not do this periodically
11058 * as a poll for media operation is potententially expensive and may
11059 * spin up the drive creating noise.
11060 * #GDrive supports starting and stopping drives with authentication
11061 * support for the former. This can be used to support a diverse set
11062 * of use cases including connecting/disconnecting iSCSI devices,
11063 * powering down external disk enclosures and starting/stopping
11064 * multi-disk devices such as RAID devices. Note that the actual
11065 * semantics and side-effects of starting/stopping a #GDrive may vary
11066 * according to implementation. To choose the correct verbs in e.g. a
11067 * file manager, use g_drive_get_start_stop_type().
11068 * For porting from GnomeVFS note that there is no equivalent of
11069 * #GDrive in that API.
11075 * @short_description: An object for emblems
11076 * @include: gio/gio.h
11077 * @see_also: #GIcon, #GEmblemedIcon, #GLoadableIcon, #GThemedIcon
11079 * #GEmblem is an implementation of #GIcon that supports
11080 * having an emblem, which is an icon with additional properties.
11081 * It can than be added to a #GEmblemedIcon.
11082 * Currently, only metainformation about the emblem's origin is
11083 * supported. More may be added in the future.
11088 * SECTION:gemblemedicon
11089 * @short_description: Icon with emblems
11090 * @include: gio/gio.h
11091 * @see_also: #GIcon, #GLoadableIcon, #GThemedIcon, #GEmblem
11093 * #GEmblemedIcon is an implementation of #GIcon that supports
11094 * adding an emblem to an icon. Adding multiple emblems to an
11095 * icon is ensured via g_emblemed_icon_add_emblem().
11096 * Note that #GEmblemedIcon allows no control over the position
11097 * of the emblems. See also #GEmblem for more information.
11103 * @short_description: File and Directory Handling
11104 * @include: gio/gio.h
11105 * @see_also: #GFileInfo, #GFileEnumerator
11107 * #GFile is a high level abstraction for manipulating files on a
11108 * virtual file system. #GFile<!-- -->s are lightweight, immutable
11109 * objects that do no I/O upon creation. It is necessary to understand that
11110 * #GFile objects do not represent files, merely an identifier for a file. All
11111 * file content I/O is implemented as streaming operations (see #GInputStream and
11113 * g_file_new_for_path() if you have a path.
11114 * g_file_new_for_uri() if you have a URI.
11115 * g_file_new_for_commandline_arg() for a command line argument.
11116 * g_file_parse_name() from a utf8 string gotten from g_file_get_parse_name().
11117 * One way to think of a #GFile is as an abstraction of a pathname. For normal
11118 * files the system pathname is what is stored internally, but as #GFile<!-- -->s
11119 * are extensible it could also be something else that corresponds to a pathname
11120 * in a userspace implementation of a filesystem.
11121 * #GFile<!-- -->s make up hierarchies of directories and files that correspond to the
11122 * files on a filesystem. You can move through the file system with #GFile using
11123 * g_file_get_parent() to get an identifier for the parent directory, g_file_get_child()
11124 * to get a child within a directory, g_file_resolve_relative_path() to resolve a relative
11125 * path between two #GFile<!-- -->s. There can be multiple hierarchies, so you may not
11126 * end up at the same root if you repeatedly call g_file_get_parent() on two different
11128 * All #GFile<!-- -->s have a basename (get with g_file_get_basename()). These names
11129 * are byte strings that are used to identify the file on the filesystem (relative to
11130 * its parent directory) and there is no guarantees that they have any particular charset
11131 * encoding or even make any sense at all. If you want to use filenames in a user
11132 * interface you should use the display name that you can get by requesting the
11133 * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info().
11134 * This is guaranteed to be in utf8 and can be used in a user interface. But always
11135 * store the real basename or the #GFile to use to actually access the file, because
11136 * there is no way to go from a display name to the actual name.
11137 * Using #GFile as an identifier has the same weaknesses as using a path in that
11138 * there may be multiple aliases for the same file. For instance, hard or
11139 * soft links may cause two different #GFile<!-- -->s to refer to the same file.
11140 * and long names on Fat/NTFS, or bind mounts in Linux. If you want to check if
11141 * two #GFile<!-- -->s point to the same file you can query for the
11142 * %G_FILE_ATTRIBUTE_ID_FILE attribute. Note that #GFile does some trivial
11143 * canonicalization of pathnames passed in, so that trivial differences in the
11144 * path string used at creation (duplicated slashes, slash at end of path, "."
11145 * or ".." path segments, etc) does not create different #GFile<!-- -->s.
11146 * Many #GFile operations have both synchronous and asynchronous versions
11147 * to suit your application. Asynchronous versions of synchronous functions
11148 * simply have _async() appended to their function names. The asynchronous
11149 * I/O functions call a #GAsyncReadyCallback which is then used to finalize
11150 * the operation, producing a GAsyncResult which is then passed to the
11151 * function's matching _finish() operation.
11152 * Some #GFile operations do not have synchronous analogs, as they may
11153 * take a very long time to finish, and blocking may leave an application
11154 * unusable. Notable cases include:
11155 * g_file_mount_mountable() to mount a mountable file.
11156 * g_file_unmount_mountable_with_operation() to unmount a mountable file.
11157 * g_file_eject_mountable_with_operation() to eject a mountable file.
11158 * <para id="gfile-etag"><indexterm><primary>entity tag</primary></indexterm>
11159 * One notable feature of #GFile<!-- -->s are entity tags, or "etags" for
11160 * short. Entity tags are somewhat like a more abstract version of the
11161 * traditional mtime, and can be used to quickly determine if the file has
11162 * been modified from the version on the file system. See the HTTP 1.1
11163 * <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">specification</ulink>
11164 * for HTTP Etag headers, which are a very similar concept.
11167 * To construct a #gfile, you can use:
11168 * Other possible causes for aliases are: case insensitive filesystems, short
11173 * SECTION:gfileattribute
11174 * @short_description: Key-Value Paired File Attributes
11175 * @include: gio/gio.h
11176 * @see_also: #GFile, #GFileInfo
11178 * File attributes in GIO consist of a list of key-value pairs.
11179 * Keys are strings that contain a key namespace and a key name, separated
11180 * by a colon, e.g. "namespace:keyname". Namespaces are included to sort
11181 * key-value pairs by namespaces for relevance. Keys can be retrived
11182 * using wildcards, e.g. "standard::*" will return all of the keys in the
11183 * "standard" namespace.
11184 * Values are stored within the list in #GFileAttributeValue structures.
11185 * Values can store different types, listed in the enum #GFileAttributeType.
11186 * Upon creation of a #GFileAttributeValue, the type will be set to
11187 * %G_FILE_ATTRIBUTE_TYPE_INVALID.
11188 * The list of possible attributes for a filesystem (pointed to by a #GFile) is
11189 * availible as a #GFileAttributeInfoList. This list is queryable by key names
11190 * as indicated earlier.
11191 * Classes that implement #GFileIface will create a #GFileAttributeInfoList and
11192 * install default keys and values for their given file system, architecture,
11193 * and other possible implementation details (e.g., on a UNIX system, a file
11194 * attribute key will be registered for the user id for a given file).
11197 * <title>GFileAttributes Default Namespaces</title>
11198 * <tgroup cols='2' align='left'><thead>
11199 * <row><entry>Namspace</entry><entry>Description</entry></row>
11202 * <row><entry>"standard"</entry><entry>The "Standard" namespace. General file
11203 * information that any application may need should be put in this namespace.
11204 * Examples include the file's name, type, and size.</entry></row>
11205 * <row><entry>"etag"</entry><entry>The <link linkend="gfile-etag">"Entity Tag"</link>
11206 * namespace. Currently, the only key in this namespace is "value", which contains
11207 * the value of the current entity tag.</entry></row>
11208 * <row><entry>"id"</entry><entry>The "Identification" namespace. This
11209 * namespace is used by file managers and applications that list directories
11210 * to check for loops and to uniquely identify files.</entry></row>
11211 * <row><entry>"access"</entry><entry>The "Access" namespace. Used to check
11212 * if a user has the proper privilidges to access files and perform
11213 * file operations. Keys in this namespace are made to be generic
11214 * and easily understood, e.g. the "can_read" key is %TRUE if
11215 * the current user has permission to read the file. UNIX permissions and
11216 * NTFS ACLs in Windows should be mapped to these values.</entry></row>
11217 * <row><entry>"mountable"</entry><entry>The "Mountable" namespace. Includes
11218 * simple boolean keys for checking if a file or path supports mount operations, e.g.
11219 * mount, unmount, eject. These are used for files of type %G_FILE_TYPE_MOUNTABLE.</entry></row>
11220 * <row><entry>"time"</entry><entry>The "Time" namespace. Includes file
11221 * access, changed, created times. </entry></row>
11222 * <row><entry>"unix"</entry><entry>The "Unix" namespace. Includes UNIX-specific
11223 * information and may not be available for all files. Examples include
11224 * the UNIX "UID", "GID", etc.</entry></row>
11225 * <row><entry>"dos"</entry><entry>The "DOS" namespace. Includes DOS-specific
11226 * information and may not be available for all files. Examples include
11227 * "is_system" for checking if a file is marked as a system file, and "is_archive"
11228 * for checking if a file is marked as an archive file.</entry></row>
11229 * <row><entry>"owner"</entry><entry>The "Owner" namespace. Includes information
11230 * about who owns a file. May not be available for all file systems. Examples include
11231 * "user" for getting the user name of the file owner. This information is often mapped from
11232 * some backend specific data such as a unix UID.</entry></row>
11233 * <row><entry>"thumbnail"</entry><entry>The "Thumbnail" namespace. Includes
11234 * information about file thumbnails and their location within the file system. Exaples of
11235 * keys in this namespace include "path" to get the location of a thumbnail, and "failed"
11236 * to check if thumbnailing of the file failed.</entry></row>
11237 * <row><entry>"filesystem"</entry><entry>The "Filesystem" namespace. Gets information
11238 * about the file system where a file is located, such as its type, how much
11239 * space is left available, and the overall size of the file system.</entry></row>
11240 * <row><entry>"gvfs"</entry><entry>The "GVFS" namespace. Keys in this namespace
11241 * contain information about the current GVFS backend in use. </entry></row>
11242 * <row><entry>"xattr"</entry><entry>The "xattr" namespace. Gets information
11243 * about extended user attributes. See attr(5). The "user." prefix of the
11244 * extended user attribute name is stripped away when constructing keys in
11245 * this namespace, e.g. "xattr::mime_type" for the extended attribute with
11246 * the name "user.mime_type". Note that this information is only available
11247 * if GLib has been built with extended attribute support.</entry></row>
11248 * <row><entry>"xattr-sys"</entry><entry>The "xattr-sys" namespace.
11249 * Gets information about extended attributes which are not user-specific.
11250 * See attr(5). Note that this information is only available if GLib
11251 * has been built with extended attribute support.</entry></row>
11252 * <row><entry>"selinux"</entry><entry>The "SELinux" namespace. Includes
11253 * information about the SELinux context of files. Note that this information
11254 * is only available if GLib has been built with SELinux support.</entry></row>
11259 * Please note that these are not all of the possible namespaces.
11260 * More namespaces can be added from GIO modules or by individual applications.
11261 * For more information about writing GIO modules, see #GIOModule.
11262 * <!-- TODO: Implementation note about using extended attributes on supported
11265 * <title>GFileAttributes Built-in Keys and Value Types</title>
11266 * <tgroup cols='3' align='left'><thead>
11267 * <row><entry>Enum Value</entry><entry>Namespace:Key</entry><entry>Value Type</entry></row>
11269 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TYPE</entry><entry>standard::type</entry><entry>uint32 (#GFileType)</entry></row>
11270 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</entry><entry>standard::is-hidden</entry><entry>boolean</entry></row>
11271 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP</entry><entry>standard::is-backup</entry><entry>boolean</entry></row>
11272 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</entry><entry>standard::is-symlink</entry><entry>boolean</entry></row>
11273 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL</entry><entry>standard::is-virtual</entry><entry>boolean</entry></row>
11274 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_NAME</entry><entry>standard::name</entry><entry>byte string</entry></row>
11275 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</entry><entry>standard::display-name</entry><entry>string</entry></row>
11276 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME</entry><entry>standard::edit-name</entry><entry>string</entry></row>
11277 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ICON</entry><entry>standard::icon</entry><entry>object (#GIcon)</entry></row>
11278 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</entry><entry>standard::content-type</entry><entry>string</entry></row>
11279 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE</entry><entry>standard::fast-content-type</entry><entry>string</entry></row>
11280 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SIZE</entry><entry>standard::size</entry><entry>uint64</entry></row>
11281 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE</entry><entry>standard::allocated-size</entry><entry>uint64</entry></row>
11282 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</entry><entry>standard::symlink-target</entry><entry>byte string</entry></row>
11283 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_TARGET_URI</entry><entry>standard::target-uri</entry><entry>string</entry></row>
11284 * <row><entry>%G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER</entry><entry>standard::sort-order</entry><entry>int32</entry></row>
11285 * <row><entry>%G_FILE_ATTRIBUTE_ETAG_VALUE</entry><entry>etag::value</entry><entry>string</entry></row>
11286 * <row><entry>%G_FILE_ATTRIBUTE_ID_FILE</entry><entry>id::file</entry><entry>string</entry></row>
11287 * <row><entry>%G_FILE_ATTRIBUTE_ID_FILESYSTEM</entry><entry>id::filesystem</entry><entry>string</entry></row>
11288 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_READ</entry><entry>access::can-read</entry><entry>boolean</entry></row>
11289 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE</entry><entry>access::can-write</entry><entry>boolean</entry></row>
11290 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE</entry><entry>access::can-execute</entry><entry>boolean</entry></row>
11291 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE</entry><entry>access::can-delete</entry><entry>boolean</entry></row>
11292 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH</entry><entry>access::can-trash</entry><entry>boolean</entry></row>
11293 * <row><entry>%G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME</entry><entry>access::can-rename</entry><entry>boolean</entry></row>
11294 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT</entry><entry>mountable::can-mount</entry><entry>boolean</entry></row>
11295 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT</entry><entry>mountable::can-unmount</entry><entry>boolean</entry></row>
11296 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT</entry><entry>mountable::can-eject</entry><entry>boolean</entry></row>
11297 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE</entry><entry>mountable::unix-device</entry><entry>uint32</entry></row>
11298 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE</entry><entry>mountable::unix-device-file</entry><entry>string</entry></row>
11299 * <row><entry>%G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI</entry><entry>mountable::hal-udi</entry><entry>string</entry></row>
11300 * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED</entry><entry>time::modified</entry><entry>uint64</entry></row>
11301 * <row><entry>%G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC</entry><entry>time::modified-usec</entry><entry>uint32</entry></row>
11302 * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS</entry><entry>time::access</entry><entry>uint64</entry></row>
11303 * <row><entry>%G_FILE_ATTRIBUTE_TIME_ACCESS_USEC</entry><entry>time::access-usec</entry><entry>uint32</entry></row>
11304 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED</entry><entry>time::changed</entry><entry>uint64</entry></row>
11305 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CHANGED_USEC</entry><entry>time::changed-usec</entry><entry>uint32</entry></row>
11306 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED</entry><entry>time::created</entry><entry>uint64</entry></row>
11307 * <row><entry>%G_FILE_ATTRIBUTE_TIME_CREATED_USEC</entry><entry>time::created-usec</entry><entry>uint32</entry></row>
11308 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_DEVICE</entry><entry>unix::device</entry><entry>uint32</entry></row>
11309 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_INODE</entry><entry>unix::inode</entry><entry>uint64</entry></row>
11310 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_MODE</entry><entry>unix::mode</entry><entry>uint32</entry></row>
11311 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_NLINK</entry><entry>unix::nlink</entry><entry>uint32</entry></row>
11312 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_UID</entry><entry>unix::uid</entry><entry>uint32</entry></row>
11313 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_GID</entry><entry>unix::gid</entry><entry>uint32</entry></row>
11314 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_RDEV</entry><entry>unix::rdev</entry><entry>uint32</entry></row>
11315 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE</entry><entry>unix::block-size</entry><entry>uint32</entry></row>
11316 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_BLOCKS</entry><entry>unix::blocks</entry><entry>uint64</entry></row>
11317 * <row><entry>%G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT</entry><entry>unix::is-mountpoint</entry><entry>boolean</entry></row>
11318 * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE</entry><entry>dos::is-archive</entry><entry>boolean</entry></row>
11319 * <row><entry>%G_FILE_ATTRIBUTE_DOS_IS_SYSTEM</entry><entry>dos::is-system</entry><entry>boolean</entry></row>
11320 * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER</entry><entry>owner::user</entry><entry>string</entry></row>
11321 * <row><entry>%G_FILE_ATTRIBUTE_OWNER_USER_REAL</entry><entry>owner::user-real</entry><entry>string</entry></row>
11322 * <row><entry>%G_FILE_ATTRIBUTE_OWNER_GROUP</entry><entry>owner::group</entry><entry>string</entry></row>
11323 * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAIL_PATH</entry><entry>thumbnail::path</entry><entry>bytestring</entry></row>
11324 * <row><entry>%G_FILE_ATTRIBUTE_THUMBNAILING_FAILED</entry><entry>thumbnail::failed</entry><entry>boolean</entry></row>
11325 * <row><entry>%G_FILE_ATTRIBUTE_PREVIEW_ICON</entry><entry>preview::icon</entry><entry>object (#GIcon)</entry></row>
11326 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_SIZE</entry><entry>filesystem::size</entry><entry>uint64</entry></row>
11327 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_FREE</entry><entry>filesystem::free</entry><entry>uint64</entry></row>
11328 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_TYPE</entry><entry>filesystem::type</entry><entry>string</entry></row>
11329 * <row><entry>%G_FILE_ATTRIBUTE_FILESYSTEM_READONLY</entry><entry>filesystem::readonly</entry><entry>boolean</entry></row>
11330 * <row><entry>%G_FILE_ATTRIBUTE_GVFS_BACKEND</entry><entry>gvfs::backend</entry><entry>string</entry></row>
11331 * <row><entry>%G_FILE_ATTRIBUTE_SELINUX_CONTEXT</entry><entry>selinux::context</entry><entry>string</entry></row>
11332 * </tbody></tgroup></table></para>
11333 * Note that there are no predefined keys in the "xattr" and "xattr-sys"
11334 * namespaces. Keys for the "xattr" namespace are constructed by stripping
11335 * away the "user." prefix from the extended user attribute, and prepending
11336 * "xattr::". Keys for the "xattr-sys" namespace are constructed by
11337 * concatenating "xattr-sys::" with the extended attribute name. All extended
11338 * attribute values are returned as hex-encoded strings in which bytes outside
11339 * the ASCII range are encoded as hexadecimal escape sequences of the form
11340 * \x<replaceable>nn</replaceable>.
11345 * SECTION:gfiledescriptorbased
11346 * @short_description: Interface for file descriptor based IO
11347 * @include: gio/gfiledescriptorbased.h
11348 * @see_also: #GInputStream, #GOutputStream
11350 * #GFileDescriptorBased is implemented by streams (implementations of
11351 * #GInputStream or #GOutputStream) that are based on file descriptors.
11352 * Note that <filename><gio/gfiledescriptorbased.h></filename> belongs to
11353 * the UNIX-specific GIO interfaces, thus you have to use the
11354 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
11361 * SECTION:gfileenumerator
11362 * @short_description: Enumerated Files Routines
11363 * @include: gio/gio.h
11365 * #GFileEnumerator allows you to operate on a set of #GFile<!-- -->s,
11366 * returning a #GFileInfo structure for each file enumerated (e.g.
11367 * g_file_enumerate_children() will return a #GFileEnumerator for each
11368 * of the children within a directory).
11369 * To get the next file's information from a #GFileEnumerator, use
11370 * g_file_enumerator_next_file() or its asynchronous version,
11371 * g_file_enumerator_next_files_async(). Note that the asynchronous
11372 * version will return a list of #GFileInfo<!---->s, whereas the
11373 * synchronous will only return the next file in the enumerator.
11374 * To close a #GFileEnumerator, use g_file_enumerator_close(), or
11375 * its asynchronous version, g_file_enumerator_close_async(). Once
11376 * a #GFileEnumerator is closed, no further actions may be performed
11377 * on it, and it should be freed with g_object_unref().
11382 * SECTION:gfileicon
11383 * @short_description: Icons pointing to an image file
11384 * @include: gio/gio.h
11385 * @see_also: #GIcon, #GLoadableIcon
11387 * #GFileIcon specifies an icon by pointing to an image file
11388 * to be used as icon.
11393 * SECTION:gfileinfo
11394 * @short_description: File Information and Attributes
11395 * @include: gio/gio.h
11396 * @see_also: #GFile, <link linkend="gio-GFileAttribute">GFileAttribute</link>
11398 * Functionality for manipulating basic metadata for files. #GFileInfo
11399 * implements methods for getting information that all files should
11400 * contain, and allows for manipulation of extended attributes.
11401 * See <link linkend="gio-GFileAttribute">GFileAttribute</link> for more
11402 * information on how GIO handles file attributes.
11403 * To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its
11404 * async variant). To obtain a #GFileInfo for a file input or output
11405 * stream, use g_file_input_stream_query_info() or
11406 * g_file_output_stream_query_info() (or their async variants).
11407 * To change the actual attributes of a file, you should then set the
11408 * attribute in the #GFileInfo and call g_file_set_attributes_from_info()
11409 * or g_file_set_attributes_async() on a GFile.
11410 * However, not all attributes can be changed in the file. For instance,
11411 * the actual size of a file cannot be changed via g_file_info_set_size().
11412 * You may call g_file_query_settable_attributes() and
11413 * g_file_query_writable_namespaces() to discover the settable attributes
11414 * of a particular file at runtime.
11415 * #GFileAttributeMatcher allows for searching through a #GFileInfo for
11421 * SECTION:gfileinputstream
11422 * @short_description: File input streaming operations
11423 * @include: gio/gio.h
11424 * @see_also: #GInputStream, #GDataInputStream, #GSeekable
11426 * GFileInputStream provides input streams that take their
11427 * content from a file.
11428 * GFileInputStream implements #GSeekable, which allows the input
11429 * stream to jump to arbitrary positions in the file, provided the
11430 * filesystem of the file allows it. To find the position of a file
11431 * input stream, use g_seekable_tell(). To find out if a file input
11432 * stream supports seeking, use g_seekable_stream_can_seek().
11433 * To position a file input stream, use g_seekable_seek().
11438 * SECTION:gfileiostream
11439 * @short_description: File read and write streaming operations
11440 * @include: gio/gio.h
11441 * @see_also: #GIOStream, #GFileInputStream, #GFileOutputStream, #GSeekable
11443 * GFileIOStream provides io streams that both read and write to the same
11445 * GFileIOStream implements #GSeekable, which allows the io
11446 * stream to jump to arbitrary positions in the file and to truncate
11447 * the file, provided the filesystem of the file supports these
11449 * To find the position of a file io stream, use
11450 * g_seekable_tell().
11451 * To find out if a file io stream supports seeking, use g_seekable_can_seek().
11452 * To position a file io stream, use g_seekable_seek().
11453 * To find out if a file io stream supports truncating, use
11454 * g_seekable_can_truncate(). To truncate a file io
11455 * stream, use g_seekable_truncate().
11456 * The default implementation of all the #GFileIOStream operations
11457 * and the implementation of #GSeekable just call into the same operations
11458 * on the output stream.
11465 * SECTION:gfilemonitor
11466 * @short_description: File Monitor
11467 * @include: gio/gio.h
11469 * Monitors a file or directory for changes.
11470 * To obtain a #GFileMonitor for a file or directory, use
11471 * g_file_monitor(), g_file_monitor_file(), or
11472 * g_file_monitor_directory().
11473 * To get informed about changes to the file or directory you are
11474 * monitoring, connect to the #GFileMonitor::changed signal. The
11475 * signal will be emitted in the <link
11476 * linkend="g-main-context-push-thread-default">thread-default main
11477 * context</link> of the thread that the monitor was created in
11478 * (though if the global default main context is blocked, this may
11479 * cause notifications to be blocked even if the thread-default
11480 * context is still running).
11485 * SECTION:gfilenamecompleter
11486 * @short_description: Filename Completer
11487 * @include: gio/gio.h
11489 * Completes partial file and directory names given a partial string by
11490 * looking in the file system for clues. Can return a list of possible
11491 * completion strings for widget implementations.
11496 * SECTION:gfileoutputstream
11497 * @short_description: File output streaming operations
11498 * @include: gio/gio.h
11499 * @see_also: #GOutputStream, #GDataOutputStream, #GSeekable
11501 * GFileOutputStream provides output streams that write their
11502 * content to a file.
11503 * GFileOutputStream implements #GSeekable, which allows the output
11504 * stream to jump to arbitrary positions in the file and to truncate
11505 * the file, provided the filesystem of the file supports these
11507 * To find the position of a file output stream, use g_seekable_tell().
11508 * To find out if a file output stream supports seeking, use
11509 * g_seekable_can_seek().To position a file output stream, use
11510 * g_seekable_seek(). To find out if a file output stream supports
11511 * truncating, use g_seekable_can_truncate(). To truncate a file output
11512 * stream, use g_seekable_truncate().
11517 * SECTION:gfilterinputstream
11518 * @short_description: Filter Input Stream
11519 * @include: gio/gio.h
11521 * Base class for input stream implementations that perform some
11522 * kind of filtering operation on a base stream. Typical examples
11523 * of filtering operations are character set conversion, compression
11524 * and byte order flipping.
11529 * SECTION:gfilteroutputstream
11530 * @short_description: Filter Output Stream
11531 * @include: gio/gio.h
11533 * Base class for output stream implementations that perform some
11534 * kind of filtering operation on a base stream. Typical examples
11535 * of filtering operations are character set conversion, compression
11536 * and byte order flipping.
11542 * @short_description: Interface for icons
11543 * @include: gio/gio.h
11545 * #GIcon is a very minimal interface for icons. It provides functions
11546 * for checking the equality of two icons, hashing of icons and
11547 * serializing an icon to and from strings.
11548 * #GIcon does not provide the actual pixmap for the icon as this is out
11549 * of GIO's scope, however implementations of #GIcon may contain the name
11550 * of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon).
11551 * To obtain a hash of a #GIcon, see g_icon_hash().
11552 * To check if two #GIcons are equal, see g_icon_equal().
11553 * For serializing a #GIcon, use g_icon_to_string() and
11554 * g_icon_new_for_string().
11555 * If your application or library provides one or more #GIcon
11556 * implementations you need to ensure that each #GType is registered
11557 * with the type system prior to calling g_icon_new_for_string().
11562 * SECTION:ginetaddress
11563 * @short_description: An IPv4/IPv6 address
11565 * #GInetAddress represents an IPv4 or IPv6 internet address. Use
11566 * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_async() to
11567 * look up the #GInetAddress for a hostname. Use
11568 * g_resolver_lookup_by_address() or
11569 * g_resolver_lookup_by_address_async() to look up the hostname for a
11571 * To actually connect to a remote host, you will need a
11572 * #GInetSocketAddress (which includes a #GInetAddress as well as a
11578 * SECTION:ginetsocketaddress
11579 * @short_description: Internet GSocketAddress
11581 * An IPv4 or IPv6 socket address; that is, the combination of a
11582 * #GInetAddress and a port number.
11587 * SECTION:ginitable
11588 * @short_description: Failable object initialization interface
11589 * @include: gio/gio.h
11590 * @see_also: #GAsyncInitable
11592 * #GInitable is implemented by objects that can fail during
11593 * initialization. If an object implements this interface the
11594 * g_initable_init() function must be called as the first thing
11595 * after construction. If g_initable_init() is not called, or if
11596 * it returns an error, all further operations on the object
11597 * should fail, generally with a %G_IO_ERROR_NOT_INITIALIZED error.
11598 * Users of objects implementing this are not intended to use
11599 * the interface method directly, instead it will be used automatically
11600 * in various ways. For C applications you generally just call
11601 * g_initable_new() directly, or indirectly via a foo_thing_new() wrapper.
11602 * This will call g_initable_init() under the cover, returning %NULL and
11603 * setting a #GError on failure (at which point the instance is
11605 * For bindings in languages where the native constructor supports
11606 * exceptions the binding could check for objects implemention %GInitable
11607 * during normal construction and automatically initialize them, throwing
11608 * an exception on failure.
11613 * SECTION:ginputstream
11614 * @short_description: Base class for implementing streaming input
11615 * @include: gio/gio.h
11617 * GInputStream has functions to read from a stream (g_input_stream_read()),
11618 * to close a stream (g_input_stream_close()) and to skip some content
11619 * (g_input_stream_skip()).
11620 * To copy the content of an input stream to an output stream without
11621 * manually handling the reads and writes, use g_output_stream_splice().
11622 * All of these functions have async variants too.
11628 * @short_description: Error helper functions
11629 * @include: gio/gio.h
11631 * Contains helper functions for reporting errors to the user.
11636 * SECTION:giomodule
11637 * @short_description: Loadable GIO Modules
11638 * @include: gio/gio.h
11640 * Provides an interface and default functions for loading and unloading
11641 * modules. This is used internally to make GIO extensible, but can also
11642 * be used by others to implement module loading.
11647 * SECTION:gioscheduler
11648 * @short_description: I/O Scheduler
11649 * @include: gio/gio.h
11651 * Schedules asynchronous I/O operations. #GIOScheduler integrates
11652 * into the main event loop (#GMainLoop) and may use threads if they
11654 * <para id="io-priority"><indexterm><primary>I/O priority</primary></indexterm>
11655 * Each I/O operation has a priority, and the scheduler uses the priorities
11656 * to determine the order in which operations are executed. They are
11657 * <emphasis>not</emphasis> used to determine system-wide I/O scheduling.
11658 * Priorities are integers, with lower numbers indicating higher priority.
11659 * It is recommended to choose priorities between %G_PRIORITY_LOW and
11660 * %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT as a default.
11666 * SECTION:giostream
11667 * @short_description: Base class for implementing read/write streams
11668 * @include: gio/gio.h
11669 * @see_also: #GInputStream, #GOutputStream
11671 * GIOStream represents an object that has both read and write streams.
11672 * Generally the two streams acts as separate input and output streams,
11673 * but they share some common resources and state. For instance, for
11674 * seekable streams they may use the same position in both streams.
11675 * Examples of #GIOStream objects are #GSocketConnection which represents
11676 * a two-way network connection, and #GFileIOStream which represent a
11677 * file handle opened in read-write mode.
11678 * To do the actual reading and writing you need to get the substreams
11679 * with g_io_stream_get_input_stream() and g_io_stream_get_output_stream().
11680 * The #GIOStream object owns the input and the output streams, not the other
11681 * way around, so keeping the substreams alive will not keep the #GIOStream
11682 * object alive. If the #GIOStream object is freed it will be closed, thus
11683 * closing the substream, so even if the substreams stay alive they will
11684 * always just return a %G_IO_ERROR_CLOSED for all operations.
11685 * To close a stream use g_io_stream_close() which will close the common
11686 * stream object and also the individual substreams. You can also close
11687 * the substreams themselves. In most cases this only marks the
11688 * substream as closed, so further I/O on it fails. However, some streams
11689 * may support "half-closed" states where one direction of the stream
11690 * is actually shut down.
11697 * SECTION:gloadableicon
11698 * @short_description: Loadable Icons
11699 * @include: gio/gio.h
11700 * @see_also: #GIcon, #GThemedIcon
11702 * Extends the #GIcon interface and adds the ability to
11703 * load icons from streams.
11708 * SECTION:gmemoryinputstream
11709 * @short_description: Streaming input operations on memory chunks
11710 * @include: gio/gio.h
11711 * @see_also: #GMemoryOutputStream
11713 * #GMemoryInputStream is a class for using arbitrary
11714 * memory chunks as input for GIO streaming input operations.
11719 * SECTION:gmemoryoutputstream
11720 * @short_description: Streaming output operations on memory chunks
11721 * @include: gio/gio.h
11722 * @see_also: #GMemoryInputStream
11724 * #GMemoryOutputStream is a class for using arbitrary
11725 * memory chunks as output for GIO streaming output operations.
11731 * @short_description: Mount management
11732 * @include: gio/gio.h
11733 * @see_also: GVolume, GUnixMount
11735 * The #GMount interface represents user-visible mounts. Note, when
11736 * porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.
11737 * #GMount is a "mounted" filesystem that you can access. Mounted is in
11738 * quotes because it's not the same as a unix mount, it might be a gvfs
11739 * mount, but you can still access the files on it if you use GIO. Might or
11740 * might not be related to a volume object.
11741 * Unmounting a #GMount instance is an asynchronous operation. For
11742 * more information about asynchronous operations, see #GAsyncReady
11743 * and #GSimpleAsyncReady. To unmount a #GMount instance, first call
11744 * g_mount_unmount_with_operation() with (at least) the #GMount instance and a
11745 * #GAsyncReadyCallback. The callback will be fired when the
11746 * operation has resolved (either with success or failure), and a
11747 * #GAsyncReady structure will be passed to the callback. That
11748 * callback should then call g_mount_unmount_with_operation_finish() with the #GMount
11749 * and the #GAsyncReady data to see if the operation was completed
11750 * successfully. If an @error is present when g_mount_unmount_with_operation_finish()
11751 * is called, then it will be filled with any error information.
11756 * SECTION:gmountoperation
11757 * @short_description: Object used for authentication and user interaction
11758 * @include: gio/gio.h
11760 * #GMountOperation provides a mechanism for interacting with the user.
11761 * It can be used for authenticating mountable operations, such as loop
11762 * mounting files, hard drive partitions or server locations. It can
11763 * also be used to ask the user questions or show a list of applications
11764 * preventing unmount or eject operations from completing.
11765 * Note that #GMountOperation is used for more than just #GMount
11766 * objects – for example it is also used in g_drive_start() and
11768 * Users should instantiate a subclass of this that implements all the
11769 * various callbacks to show the required dialogs, such as
11770 * #GtkMountOperation. If no user interaction is desired (for example
11771 * when automounting filesystems at login time), usually %NULL can be
11772 * passed, see each method taking a #GMountOperation for details.
11777 * SECTION:gnetworkaddress
11778 * @short_description: A GSocketConnectable for resolving hostnames
11779 * @include: gio/gio.h
11781 * #GNetworkAddress provides an easy way to resolve a hostname and
11782 * then attempt to connect to that host, handling the possibility of
11783 * multiple IP addresses and multiple address families.
11784 * See #GSocketConnectable for and example of using the connectable
11790 * SECTION:gnetworkservice
11791 * @short_description: A GSocketConnectable for resolving SRV records
11792 * @include: gio/gio.h
11794 * Like #GNetworkAddress does with hostnames, #GNetworkService
11795 * provides an easy way to resolve a SRV record, and then attempt to
11796 * connect to one of the hosts that implements that service, handling
11797 * service priority/weighting, multiple IP addresses, and multiple
11798 * address families.
11799 * See #GSrvTarget for more information about SRV records, and see
11800 * #GSocketConnectable for and example of using the connectable
11806 * SECTION:goutputstream
11807 * @short_description: Base class for implementing streaming output
11808 * @include: gio/gio.h
11810 * GOutputStream has functions to write to a stream (g_output_stream_write()),
11811 * to close a stream (g_output_stream_close()) and to flush pending writes
11812 * (g_output_stream_flush()).
11813 * To copy the content of an input stream to an output stream without
11814 * manually handling the reads and writes, use g_output_stream_splice().
11815 * All of these functions have async variants too.
11820 * SECTION:gpermission
11821 * @title: GPermission
11822 * @short_description: An object representing the permission to perform a certain action
11824 * A #GPermission represents the status of the caller's permission to
11825 * perform a certain action.
11826 * You can query if the action is currently allowed and if it is
11827 * possible to acquire the permission so that the action will be allowed
11829 * There is also an API to actually acquire the permission and one to
11831 * As an example, a #GPermission might represent the ability for the
11832 * user to write to a #GSettings object. This #GPermission object could
11833 * then be used to decide if it is appropriate to show a "Click here to
11834 * unlock" button in a dialog and to provide the mechanism to invoke
11835 * when that button is clicked.
11840 * SECTION:gpollableinputstream
11841 * @short_description: Interface for pollable input streams
11842 * @include: gio/gio.h
11843 * @see_also: #GInputStream, #GPollableOutputStream, #GFileDescriptorBased
11845 * #GPollableInputStream is implemented by #GInputStream<!-- -->s that
11846 * can be polled for readiness to read. This can be used when
11847 * interfacing with a non-GIO API that expects
11848 * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
11855 * SECTION:gpollableoutputstream
11856 * @short_description: Interface for pollable output streams
11857 * @include: gio/gio.h
11858 * @see_also: #GOutputStream, #GFileDescriptorBased, #GPollableInputStream
11860 * #GPollableOutputStream is implemented by #GOutputStream<!-- -->s that
11861 * can be polled for readiness to write. This can be used when
11862 * interfacing with a non-GIO API that expects
11863 * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
11871 * @short_description: Interface for proxy handling
11873 * A #GProxy handles connecting to a remote host via a given type of
11874 * proxy server. It is implemented by the 'gio-proxy' extension point.
11875 * The extensions are named after their proxy protocol name. As an
11876 * example, a SOCKS5 proxy implementation can be retrieved with the
11877 * name 'socks5' using the function
11878 * g_io_extension_point_get_extension_by_name().
11885 * SECTION:gproxyaddress
11886 * @short_description: An internet address with proxy information
11888 * Support for proxied #GInetSocketAddress.
11893 * SECTION:gproxyresolver
11894 * @short_description: Asynchronous and cancellable network proxy resolver
11895 * @include: gio/gio.h
11897 * #GProxyResolver provides synchronous and asynchronous network proxy
11898 * resolution. #GProxyResolver is used within #GClientSocket through
11899 * the method g_socket_connectable_proxy_enumerate().
11904 * SECTION:gresolver
11905 * @short_description: Asynchronous and cancellable DNS resolver
11906 * @include: gio/gio.h
11908 * #GResolver provides cancellable synchronous and asynchronous DNS
11909 * resolution, for hostnames (g_resolver_lookup_by_address(),
11910 * g_resolver_lookup_by_name() and their async variants) and SRV
11911 * (service) records (g_resolver_lookup_service()).
11912 * #GNetworkAddress and #GNetworkService provide wrappers around
11913 * #GResolver functionality that also implement #GSocketConnectable,
11914 * making it easy to connect to a remote host/service.
11919 * SECTION:gseekable
11920 * @short_description: Stream seeking interface
11921 * @include: gio/gio.h
11922 * @see_also: #GInputStream, #GOutputStream
11924 * #GSeekable is implemented by streams (implementations of
11925 * #GInputStream or #GOutputStream) that support seeking.
11930 * SECTION:gsettings
11931 * @short_description: High-level API for application settings
11933 * The #GSettings class provides a convenient API for storing and retrieving
11934 * application settings.
11935 * Reads and writes can be considered to be non-blocking. Reading
11936 * approximately the same order of magnitude (but slower than) a
11937 * #GHashTable lookup. Writing settings is also extremely fast in terms
11938 * of time to return to your application, but can be extremely expensive
11939 * for other threads and other processes. Many settings backends
11940 * (including dconf) have lazy initialisation which means in the common
11941 * case of the user using their computer without modifying any settings
11942 * a lot of work can be avoided. For dconf, the D-Bus service doesn't
11943 * even need to be started in this case. For this reason, you should
11944 * only ever modify #GSettings keys in response to explicit user action.
11945 * Particular care should be paid to ensure that modifications are not
11946 * made during startup -- for example, when settings the initial value
11947 * of preferences widgets. The built-in g_settings_bind() functionality
11948 * is careful not to write settings in response to notify signals as a
11949 * result of modifications that it makes to widgets.
11950 * When creating a GSettings instance, you have to specify a schema
11951 * that describes the keys in your settings and their types and default
11952 * values, as well as some other information.
11953 * Normally, a schema has as fixed path that determines where the settings
11954 * are stored in the conceptual global tree of settings. However, schemas
11955 * can also be 'relocatable', i.e. not equipped with a fixed path. This is
11956 * useful e.g. when the schema describes an 'account', and you want to be
11957 * able to store a arbitrary number of accounts.
11958 * Unlike other configuration systems (like GConf), GSettings does not
11959 * restrict keys to basic types like strings and numbers. GSettings stores
11960 * values as #GVariant, and allows any #GVariantType for keys. Key names
11961 * are restricted to lowercase characters, numbers and '-'. Furthermore,
11962 * the names must begin with a lowercase character, must not end
11963 * with a '-', and must not contain consecutive dashes. Key names can
11964 * be up to 32 characters long.
11965 * Similar to GConf, the default values in GSettings schemas can be
11966 * localized, but the localized values are stored in gettext catalogs
11967 * and looked up with the domain that is specified in the
11968 * <tag class="attribute">gettext-domain</tag> attribute of the
11969 * <tag class="starttag">schemalist</tag> or <tag class="starttag">schema</tag>
11970 * elements and the category that is specified in the l10n attribute of the
11971 * <tag class="starttag">key</tag> element.
11972 * GSettings uses schemas in a compact binary form that is created
11973 * by the <link linkend="glib-compile-schemas">glib-compile-schemas</link>
11974 * utility. The input is a schema description in an XML format that can be
11975 * described by the following DTD:
11976 * |[<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gio/gschema.dtd"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include>]|
11977 * glib-compile-schemas expects schema files to have the extension <filename>.gschema.xml</filename>
11978 * At runtime, schemas are identified by their id (as specified
11979 * in the <tag class="attribute">id</tag> attribute of the
11980 * <tag class="starttag">schema</tag> element). The
11981 * convention for schema ids is to use a dotted name, similar in
11982 * style to a D-Bus bus name, e.g. "org.gnome.SessionManager". In particular,
11983 * if the settings are for a specific service that owns a D-Bus bus name,
11984 * the D-Bus bus name and schema id should match. For schemas which deal
11985 * with settings not associated with one named application, the id should
11986 * not use StudlyCaps, e.g. "org.gnome.font-rendering".
11987 * In addition to #GVariant types, keys can have types that have enumerated
11988 * types. These can be described by a <tag class="starttag">choice</tag>,
11989 * <tag class="starttag">enum</tag> or <tag class="starttag">flags</tag> element, see
11990 * <xref linkend="schema-enumerated"/>. The underlying type of
11991 * such a key is string, but you can use g_settings_get_enum(),
11992 * g_settings_set_enum(), g_settings_get_flags(), g_settings_set_flags()
11993 * access the numeric values corresponding to the string value of enum
11995 * <example id="schema-default-values"><title>Default values</title>
11996 * <programlisting><![CDATA[
11998 * <schema id="org.gtk.Test" path="/tests/" gettext-domain="test">
11999 * <key name="greeting" type="s">
12000 * <default l10n="messages">"Hello, earthlings"</default>
12001 * <summary>A greeting</summary>
12003 * Greeting of the invading martians
12006 * <key name="box" type="(ii)">
12007 * <default>(20,30)</default>
12011 * ]]></programlisting></example>
12012 * <example id="schema-enumerated"><title>Ranges, choices and enumerated types</title>
12013 * <programlisting><![CDATA[
12015 * <enum id="myenum">
12016 * <value nick="first" value="1"/>
12017 * <value nick="second" value="2"/>
12019 * <enum id="myflags">
12020 * <value nick="flag1" value="1"/>
12021 * <value nick="flag2" value="2"/>
12022 * <value nick="flag3" value="4"/>
12024 * <schema id="org.gtk.Test">
12025 * <key name="key-with-range" type="i">
12026 * <range min="1" max="100"/>
12027 * <default>10</default>
12029 * <key name="key-with-choices" type="s">
12031 * <choice value='Elisabeth'/>
12032 * <choice value='Annabeth'/>
12033 * <choice value='Joe'/>
12036 * <alias value='Anna' target='Annabeth'/>
12037 * <alias value='Beth' target='Elisabeth'/>
12039 * <default>'Joe'</default>
12041 * <key name='enumerated-key' enum='myenum'>
12042 * <default>'first'</default>
12044 * <key name='flags-key' flags='myflags'>
12045 * <default>["flag1",flag2"]</default>
12049 * ]]></programlisting></example>
12051 * <title>Vendor overrides</title>
12053 * Default values are defined in the schemas that get installed by
12054 * an application. Sometimes, it is necessary for a vendor or distributor
12055 * to adjust these defaults. Since patching the XML source for the schema
12056 * is inconvenient and error-prone,
12057 * <link linkend="glib-compile-schemas">glib-compile-schemas</link> reads
12058 * so-called 'vendor override' files. These are keyfiles in the same
12059 * directory as the XML schema sources which can override default values.
12060 * The schema id serves as the group name in the key file, and the values
12061 * are expected in serialized GVariant form, as in the following example:
12062 * <informalexample><programlisting>
12063 * [org.gtk.Example]
12066 * </programlisting></informalexample>
12069 * glib-compile-schemas expects schema files to have the extension
12070 * <filename>.gschema.override</filename>
12074 * <title>Binding</title>
12076 * A very convenient feature of GSettings lets you bind #GObject properties
12077 * directly to settings, using g_settings_bind(). Once a GObject property
12078 * has been bound to a setting, changes on either side are automatically
12079 * propagated to the other side. GSettings handles details like
12080 * mapping between GObject and GVariant types, and preventing infinite
12084 * This makes it very easy to hook up a preferences dialog to the
12085 * underlying settings. To make this even more convenient, GSettings
12086 * looks for a boolean property with the name "sensitivity" and
12087 * automatically binds it to the writability of the bound setting.
12088 * If this 'magic' gets in the way, it can be suppressed with the
12089 * #G_SETTINGS_BIND_NO_SENSITIVITY flag.
12093 * Settings with #gsettings is typically extremely fast: on
12098 * SECTION:gsettingsbackend
12099 * @title: GSettingsBackend
12100 * @short_description: Interface for settings backend implementations
12101 * @include: gio/gsettingsbackend.h
12102 * @see_also: #GSettings, #GIOExtensionPoint
12104 * The #GSettingsBackend interface defines a generic interface for
12105 * non-strictly-typed data that is stored in a hierarchy. To implement
12106 * an alternative storage backend for #GSettings, you need to implement
12107 * the #GSettingsBackend interface and then make it implement the
12108 * extension point #G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.
12109 * The interface defines methods for reading and writing values, a
12110 * method for determining if writing of certain values will fail
12111 * (lockdown) and a change notification mechanism.
12112 * The semantics of the interface are very precisely defined and
12113 * implementations must carefully adhere to the expectations of
12114 * callers that are documented on each of the interface methods.
12115 * Some of the GSettingsBackend functions accept or return a #GTree.
12116 * These trees always have strings as keys and #GVariant as values.
12117 * g_settings_backend_create_tree() is a convenience function to create
12120 * The #GSettingsBackend API is exported to allow third-party
12121 * implementations, but does not carry the same stability guarantees
12122 * as the public GIO API. For this reason, you have to define the
12123 * C preprocessor symbol #G_SETTINGS_ENABLE_BACKEND before including
12124 * <filename>gio/gsettingsbackend.h</filename>
12130 * SECTION:gsimpleaction
12131 * @title: GSimpleAction
12132 * @short_description: A simple GSimpleAction
12134 * A #GSimpleAction is the obvious simple implementation of the #GSimpleAction
12135 * interface. This is the easiest way to create an action for purposes of
12136 * adding it to a #GSimpleActionGroup.
12137 * See also #GtkAction.
12142 * SECTION:gsimpleactiongroup
12143 * @title: GSimpleActionGroup
12144 * @short_description: A simple GActionGroup implementation
12146 * #GSimpleActionGroup is a hash table filled with #GAction objects,
12147 * implementing the #GActionGroup interface.
12152 * SECTION:gsimpleasyncresult
12153 * @short_description: Simple asynchronous results implementation
12154 * @include: gio/gio.h
12155 * @see_also: #GAsyncResult
12157 * Implements #GAsyncResult for simple cases. Most of the time, this
12158 * will be all an application needs, and will be used transparently.
12159 * Because of this, #GSimpleAsyncResult is used throughout GIO for
12160 * handling asynchronous functions.
12161 * GSimpleAsyncResult handles #GAsyncReadyCallback<!-- -->s, error
12162 * reporting, operation cancellation and the final state of an operation,
12163 * completely transparent to the application. Results can be returned
12164 * as a pointer e.g. for functions that return data that is collected
12165 * asynchronously, a boolean value for checking the success or failure
12166 * of an operation, or a #gssize for operations which return the number
12167 * of bytes modified by the operation; all of the simple return cases
12169 * Most of the time, an application will not need to know of the details
12170 * of this API; it is handled transparently, and any necessary operations
12171 * are handled by #GAsyncResult's interface. However, if implementing a
12172 * new GIO module, for writing language bindings, or for complex
12173 * applications that need better control of how asynchronous operations
12174 * are completed, it is important to understand this functionality.
12175 * GSimpleAsyncResults are tagged with the calling function to ensure
12176 * that asynchronous functions and their finishing functions are used
12177 * together correctly.
12178 * To create a new #GSimpleAsyncResult, call g_simple_async_result_new().
12179 * If the result needs to be created for a #GError, use
12180 * g_simple_async_result_new_from_error() or
12181 * g_simple_async_result_new_take_error(). If a #GError is not available
12182 * (e.g. the asynchronous operation's doesn't take a #GError argument),
12183 * but the result still needs to be created for an error condition, use
12184 * g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
12185 * if your application or binding requires passing a variable argument list
12186 * directly), and the error can then be propagated through the use of
12187 * g_simple_async_result_propagate_error().
12188 * An asynchronous operation can be made to ignore a cancellation event by
12189 * calling g_simple_async_result_set_handle_cancellation() with a
12190 * #GSimpleAsyncResult for the operation and %FALSE. This is useful for
12191 * operations that are dangerous to cancel, such as close (which would
12192 * cause a leak if cancelled before being run).
12193 * GSimpleAsyncResult can integrate into GLib's event loop, #GMainLoop,
12194 * or it can use #GThread<!-- -->s if available.
12195 * g_simple_async_result_complete() will finish an I/O task directly
12196 * from the point where it is called. g_simple_async_result_complete_in_idle()
12197 * will finish it from an idle handler in the <link
12198 * linkend="g-main-context-push-thread-default">thread-default main
12199 * context</link>. g_simple_async_result_run_in_thread() will run the
12200 * job in a separate thread and then deliver the result to the
12201 * thread-default main context.
12202 * To set the results of an asynchronous function,
12203 * g_simple_async_result_set_op_res_gpointer(),
12204 * g_simple_async_result_set_op_res_gboolean(), and
12205 * g_simple_async_result_set_op_res_gssize()
12206 * are provided, setting the operation's result to a gpointer, gboolean, or
12207 * gssize, respectively.
12208 * Likewise, to get the result of an asynchronous function,
12209 * g_simple_async_result_get_op_res_gpointer(),
12210 * g_simple_async_result_get_op_res_gboolean(), and
12211 * g_simple_async_result_get_op_res_gssize() are
12212 * provided, getting the operation's result as a gpointer, gboolean, and
12213 * gssize, respectively.
12214 * For the details of the requirements implementations must respect, see
12215 * #GAsyncResult. A typical implementation of an asynchronous operation
12216 * using GSimpleAsyncResult looks something like this:
12219 * baked_cb (Cake *cake,
12220 * gpointer user_data)
12222 * /* In this example, this callback is not given a reference to the cake, so
12223 * * the GSimpleAsyncResult has to take a reference to it.
12225 * GSimpleAsyncResult *result = user_data;
12226 * if (cake == NULL)
12227 * g_simple_async_result_set_error (result,
12229 * BAKER_ERROR_NO_FLOUR,
12230 * "Go to the supermarket");
12232 * g_simple_async_result_set_op_res_gpointer (result,
12233 * g_object_ref (cake),
12235 * /* In this example, we assume that baked_cb is called as a callback from
12236 * * the mainloop, so it's safe to complete the operation synchronously here.
12237 * * If, however, _baker_prepare_cake () might call its callback without
12238 * * first returning to the mainloop — inadvisable, but some APIs do so —
12239 * * we would need to use g_simple_async_result_complete_in_idle().
12241 * g_simple_async_result_complete (result);
12242 * g_object_unref (result);
12245 * baker_bake_cake_async (Baker *self,
12247 * GAsyncReadyCallback callback,
12248 * gpointer user_data)
12250 * GSimpleAsyncResult *simple;
12254 * g_simple_async_report_error_in_idle (G_OBJECT (self),
12258 * BAKER_ERROR_TOO_SMALL,
12259 * "%ucm radius cakes are silly",
12263 * simple = g_simple_async_result_new (G_OBJECT (self),
12266 * baker_bake_cake_async);
12267 * cake = _baker_get_cached_cake (self, radius);
12268 * if (cake != NULL)
12270 * g_simple_async_result_set_op_res_gpointer (simple,
12271 * g_object_ref (cake),
12273 * g_simple_async_result_complete_in_idle (simple);
12274 * g_object_unref (simple);
12275 * /* Drop the reference returned by _baker_get_cached_cake(); the
12276 * * GSimpleAsyncResult has taken its own reference.
12278 * g_object_unref (cake);
12281 * _baker_prepare_cake (self, radius, baked_cb, simple);
12284 * baker_bake_cake_finish (Baker *self,
12285 * GAsyncResult *result,
12288 * GSimpleAsyncResult *simple;
12290 * g_return_val_if_fail (g_simple_async_result_is_valid (result,
12292 * baker_bake_cake_async),
12294 * simple = (GSimpleAsyncResult *) result;
12295 * if (g_simple_async_result_propagate_error (simple, error))
12297 * cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple));
12298 * return g_object_ref (cake);
12305 * SECTION:gsimplepermission
12306 * @title: GSimplePermission
12307 * @short_description: A GPermission that doesn't change value
12309 * #GSimplePermission is a trivial implementation of #GPermission that
12310 * represents a permission that is either always or never allowed. The
12311 * value is given at constuction and doesn't change.
12312 * Calling request or release will result in errors.
12318 * @short_description: Low-level socket object
12319 * @include: gio/gio.h
12320 * @see_also: #GInitable
12322 * A #GSocket is a low-level networking primitive. It is a more or less
12323 * direct mapping of the BSD socket API in a portable GObject based API.
12324 * It supports both the UNIX socket implementations and winsock2 on Windows.
12325 * #GSocket is the platform independent base upon which the higher level
12326 * network primitives are based. Applications are not typically meant to
12327 * use it directly, but rather through classes like #GSocketClient,
12328 * #GSocketService and #GSocketConnection. However there may be cases where
12329 * direct use of #GSocket is useful.
12330 * #GSocket implements the #GInitable interface, so if it is manually constructed
12331 * by e.g. g_object_new() you must call g_initable_init() and check the
12332 * results before using the object. This is done automatically in
12333 * g_socket_new() and g_socket_new_from_fd(), so these functions can return
12335 * Sockets operate in two general modes, blocking or non-blocking. When
12336 * in blocking mode all operations block until the requested operation
12337 * is finished or there is an error. In non-blocking mode all calls that
12338 * would block return immediately with a %G_IO_ERROR_WOULD_BLOCK error.
12339 * To know when a call would successfully run you can call g_socket_condition_check(),
12340 * or g_socket_condition_wait(). You can also use g_socket_create_source() and
12341 * attach it to a #GMainContext to get callbacks when I/O is possible.
12342 * Note that all sockets are always set to non blocking mode in the system, and
12343 * blocking mode is emulated in GSocket.
12344 * When working in non-blocking mode applications should always be able to
12345 * handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other
12346 * function said that I/O was possible. This can easily happen in case
12347 * of a race condition in the application, but it can also happen for other
12348 * reasons. For instance, on Windows a socket is always seen as writable
12349 * until a write returns %G_IO_ERROR_WOULD_BLOCK.
12350 * #GSocket<!-- -->s can be either connection oriented or datagram based.
12351 * For connection oriented types you must first establish a connection by
12352 * either connecting to an address or accepting a connection from another
12353 * address. For connectionless socket types the target/source address is
12354 * specified or received in each I/O operation.
12355 * All socket file descriptors are set to be close-on-exec.
12356 * Note that creating a #GSocket causes the signal %SIGPIPE to be
12357 * ignored for the remainder of the program. If you are writing a
12358 * command-line utility that uses #GSocket, you may need to take into
12359 * account the fact that your program will not automatically be killed
12360 * if it tries to write to %stdout after it has been closed.
12367 * SECTION:gsocketaddress
12368 * @short_description: Abstract base class representing endpoints for socket communication
12370 * #GSocketAddress is the equivalent of <type>struct sockaddr</type>
12371 * in the BSD sockets API. This is an abstract class; use
12372 * #GInetSocketAddress for internet sockets, or #GUnixSocketAddress
12373 * for UNIX domain sockets.
12378 * SECTION:gsocketclient
12379 * @short_description: Helper for connecting to a network service
12380 * @include: gio/gio.h
12381 * @see_also: #GSocketConnection, #GSocketListener
12383 * #GSocketClient is a high-level utility class for connecting to a
12384 * network host using a connection oriented socket type.
12385 * You create a #GSocketClient object, set any options you want, then
12386 * call a sync or async connect operation, which returns a #GSocketConnection
12387 * subclass on success.
12388 * The type of the #GSocketConnection object returned depends on the type of
12389 * the underlying socket that is in use. For instance, for a TCP/IP connection
12390 * it will be a #GTcpConnection.
12397 * SECTION:gsocketconnectable
12398 * @short_description: Interface for potential socket endpoints
12400 * Objects that describe one or more potential socket endpoints
12401 * implement #GSocketConnectable. Callers can then use
12402 * g_socket_connectable_enumerate() to get a #GSocketAddressEnumerator
12403 * to try out each socket address in turn until one succeeds, as shown
12404 * in the sample code below.
12406 * MyConnectionType *
12407 * connect_to_host (const char *hostname,
12409 * GCancellable *cancellable,
12412 * MyConnection *conn = NULL;
12413 * GSocketConnectable *addr;
12414 * GSocketAddressEnumerator *enumerator;
12415 * GSocketAddress *sockaddr;
12416 * GError *conn_error = NULL;
12417 * addr = g_network_address_new ("www.gnome.org", 80);
12418 * enumerator = g_socket_connectable_enumerate (addr);
12419 * g_object_unref (addr);
12420 * /<!-- -->* Try each sockaddr until we succeed. Record the first
12421 * * connection error, but not any further ones (since they'll probably
12422 * * be basically the same as the first).
12424 * while (!conn && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
12426 * g_object_unref (sockaddr);
12428 * g_object_unref (enumerator);
12433 * /<!-- -->* We couldn't connect to the first address, but we succeeded
12434 * * in connecting to a later address.
12436 * g_error_free (conn_error);
12442 * /<!-- -->* Either the initial lookup failed, or else the caller
12446 * g_error_free (conn_error);
12451 * g_error_propagate (error, conn_error);
12457 * Conn = connect_to_sockaddr (sockaddr, conn_error ? null : &conn_error);
12462 * SECTION:gsocketconnection
12463 * @short_description: A socket connection
12464 * @include: gio/gio.h
12465 * @see_also: #GIOStream, #GSocketClient, #GSocketListener
12467 * #GSocketConnection is a #GIOStream for a connected socket. They
12468 * can be created either by #GSocketClient when connecting to a host,
12469 * or by #GSocketListener when accepting a new client.
12470 * The type of the #GSocketConnection object returned from these calls
12471 * depends on the type of the underlying socket that is in use. For
12472 * instance, for a TCP/IP connection it will be a #GTcpConnection.
12473 * Chosing what type of object to construct is done with the socket
12474 * connection factory, and it is possible for 3rd parties to register
12475 * custom socket connection types for specific combination of socket
12476 * family/type/protocol using g_socket_connection_factory_register_type().
12483 * SECTION:gsocketcontrolmessage
12484 * @title: GSocketControlMessage
12485 * @short_description: A GSocket control message
12486 * @see_also: #GSocket.
12488 * A #GSocketControlMessage is a special-purpose utility message that
12489 * can be sent to or received from a #GSocket. These types of
12490 * messages are often called "ancillary data".
12491 * The message can represent some sort of special instruction to or
12492 * information from the socket or can represent a special kind of
12493 * transfer to the peer (for example, sending a file description over
12495 * These messages are sent with g_socket_send_message() and received
12496 * with g_socket_receive_message().
12497 * To extend the set of control message that can be sent, subclass this
12498 * class and override the get_size, get_level, get_type and serialize
12500 * To extend the set of control messages that can be received, subclass
12501 * this class and implement the deserialize method. Also, make sure your
12502 * class is registered with the GType typesystem before calling
12503 * g_socket_receive_message() to read such a message.
12510 * SECTION:gsocketlistener
12511 * @title: GSocketListener
12512 * @short_description: Helper for accepting network client connections
12513 * @see_also: #GThreadedSocketService, #GSocketService.
12515 * A #GSocketListener is an object that keeps track of a set
12516 * of server sockets and helps you accept sockets from any of the
12517 * socket, either sync or async.
12518 * If you want to implement a network server, also look at #GSocketService
12519 * and #GThreadedSocketService which are subclass of #GSocketListener
12520 * that makes this even easier.
12527 * SECTION:gsocketservice
12528 * @title: GSocketService
12529 * @short_description: Make it easy to implement a network service
12530 * @see_also: #GThreadedSocketService, #GSocketListener.
12532 * A #GSocketService is an object that represents a service that is
12533 * provided to the network or over local sockets. When a new
12534 * connection is made to the service the #GSocketService:incoming
12535 * signal is emitted.
12536 * A #GSocketService is a subclass of #GSocketListener and you need
12537 * to add the addresses you want to accept connections on to the
12538 * with the #GSocketListener APIs.
12539 * There are two options for implementing a network service based on
12540 * #GSocketService. The first is to create the service using
12541 * g_socket_service_new() and to connect to the #GSocketService:incoming
12542 * signal. The second is to subclass #GSocketService and override the
12543 * default signal handler implementation.
12544 * In either case, the handler must immediately return, or else it
12545 * will block additional incoming connections from being serviced.
12546 * If you are interested in writing connection handlers that contain
12547 * blocking code then see #GThreadedSocketService.
12548 * The socket service runs on the main loop in the main thread, and is
12549 * not threadsafe in general. However, the calls to start and stop
12550 * the service are threadsafe so these can be used from threads that
12551 * handle incoming clients.
12558 * SECTION:gsrvtarget
12559 * @short_description: DNS SRV record target
12560 * @include: gio/gio.h
12562 * SRV (service) records are used by some network protocols to provide
12563 * service-specific aliasing and load-balancing. For example, XMPP
12564 * (Jabber) uses SRV records to locate the XMPP server for a domain;
12565 * rather than connecting directly to "example.com" or assuming a
12566 * specific server hostname like "xmpp.example.com", an XMPP client
12567 * would look up the "xmpp-client" SRV record for "example.com", and
12568 * then connect to whatever host was pointed to by that record.
12569 * You can use g_resolver_lookup_service() or
12570 * g_resolver_lookup_service_async() to find the #GSrvTarget<!-- -->s
12571 * for a given service. However, if you are simply planning to connect
12572 * to the remote service, you can use #GNetworkService's
12573 * #GSocketConnectable interface and not need to worry about
12574 * #GSrvTarget at all.
12579 * SECTION:gtcpconnection
12580 * @title: GTcpConnection
12581 * @short_description: A TCP GSocketConnection
12582 * @see_also: #GSocketConnection.
12584 * This is the subclass of #GSocketConnection that is created
12585 * for TCP/IP sockets.
12592 * SECTION:gtcpwrapperconnection
12593 * @title: GTcpWrapperConnection
12594 * @short_description: wrapper for non-GSocketConnection-based, GSocket-based GIOStreams
12595 * @see_also: #GSocketConnection.
12597 * A #GTcpWrapperConnection can be used to wrap a #GIOStream that is
12598 * based on a #GSocket, but which is not actually a
12599 * #GSocketConnection. This is used by #GSocketClient so that it can
12600 * always return a #GSocketConnection, even when the connection it has
12601 * actually created is not directly a #GSocketConnection.
12608 * SECTION:gthemedicon
12609 * @short_description: Icon theming support
12610 * @include: gio/gio.h
12611 * @see_also: #GIcon, #GLoadableIcon
12613 * #GThemedIcon is an implementation of #GIcon that supports icon themes.
12614 * #GThemedIcon contains a list of all of the icons present in an icon
12615 * theme, so that icons can be looked up quickly. #GThemedIcon does
12616 * not provide actual pixmaps for icons, just the icon names.
12617 * Ideally something like gtk_icon_theme_choose_icon() should be used to
12618 * resolve the list of names so that fallback icons work nicely with
12619 * themes that inherit other themes.
12624 * SECTION:gthreadedsocketservice
12625 * @title: GThreadedSocketService
12626 * @short_description: A threaded GSocketService
12627 * @see_also: #GSocketService.
12629 * A #GThreadedSocketService is a simple subclass of #GSocketService
12630 * that handles incoming connections by creating a worker thread and
12631 * dispatching the connection to it by emitting the ::run signal in
12633 * The signal handler may perform blocking IO and need not return
12634 * until the connection is closed.
12635 * The service is implemented using a thread pool, so there is a
12636 * limited amount of threads availible to serve incomming requests.
12637 * The service automatically stops the #GSocketService from accepting
12638 * new connections when all threads are busy.
12639 * As with #GSocketService, you may connect to #GThreadedSocketService:run,
12640 * or subclass and override the default handler.
12646 * @title: TLS Overview
12647 * @short_description: TLS (aka SSL) support for GSocketConnection
12648 * @include: gio/gio.h
12650 * #GTlsConnection and related classes provide TLS (Transport Layer
12651 * Security, previously known as SSL, Secure Sockets Layer) support for
12652 * gio-based network streams.
12653 * In the simplest case, for a client connection, you can just set the
12654 * #GSocketClient:tls flag on a #GSocketClient, and then any
12655 * connections created by that client will have TLS negotiated
12656 * automatically, using appropriate default settings, and rejecting
12657 * any invalid or self-signed certificates (unless you change that
12658 * default by setting the #GSocketClient:tls-validation-flags
12659 * property). The returned object will be a #GTcpWrapperConnection,
12660 * which wraps the underlying #GTlsClientConnection.
12661 * For greater control, you can create your own #GTlsClientConnection,
12662 * wrapping a #GSocketConnection (or an arbitrary #GIOStream with
12663 * pollable input and output streams) and then connect to its signals,
12664 * such as #GTlsConnection::accept-certificate, before starting the
12666 * Server-side TLS is similar, using #GTlsServerConnection. At the
12667 * moment, there is no support for automatically wrapping server-side
12668 * connections in the way #GSocketClient does for client-side
12674 * SECTION:gtlsbackend
12675 * @title: GTlsBackend
12676 * @short_description: TLS backend implementation
12677 * @include: gio/gio.h
12684 * SECTION:gtlscertificate
12685 * @title: GTlsCertificate
12686 * @short_description: TLS certificate
12687 * @see_also: #GTlsConnection
12689 * A certificate used for TLS authentication and encryption.
12690 * This can represent either a public key only (eg, the certificate
12691 * received by a client from a server), or the combination of
12692 * a public key and a private key (which is needed when acting as a
12693 * #GTlsServerConnection).
12700 * SECTION:gtlsclientconnection
12701 * @short_description: TLS client-side connection
12702 * @include: gio/gio.h
12704 * #GTlsClientConnection is the client-side subclass of
12705 * #GTlsConnection, representing a client-side TLS connection.
12710 * SECTION:gtlsconnection
12711 * @short_description: TLS connection type
12712 * @include: gio/gio.h
12714 * #GTlsConnection is the base TLS connection class type, which wraps
12715 * a #GIOStream and provides TLS encryption on top of it. Its
12716 * subclasses, #GTlsClientConnection and #GTlsServerConnection,
12717 * implement client-side and server-side TLS, respectively.
12724 * SECTION:gtlsserverconnection
12725 * @short_description: TLS server-side connection
12726 * @include: gio/gio.h
12728 * #GTlsServerConnection is the server-side subclass of #GTlsConnection,
12729 * representing a server-side TLS connection.
12736 * SECTION:gunixconnection
12737 * @title: GUnixConnection
12738 * @short_description: A UNIX domain GSocketConnection
12739 * @include: gio/gunixconnection.h
12740 * @see_also: #GSocketConnection.
12742 * This is the subclass of #GSocketConnection that is created
12743 * for UNIX domain sockets.
12744 * It contains functions to do some of the UNIX socket specific
12745 * functionality like passing file descriptors.
12746 * Note that <filename><gio/gunixconnection.h></filename> belongs to
12747 * the UNIX-specific GIO interfaces, thus you have to use the
12748 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12755 * SECTION:gunixcredentialsmessage
12756 * @title: GUnixCredentialsMessage
12757 * @short_description: A GSocketControlMessage containing credentials
12758 * @include: gio/gunixcredentialsmessage.h
12759 * @see_also: #GUnixConnection, #GSocketControlMessage
12761 * This #GSocketControlMessage contains a #GCredentials instance. It
12762 * may be sent using g_socket_send_message() and received using
12763 * %G_SOCKET_FAMILY_UNIX family).
12764 * For an easier way to send and receive credentials over
12765 * stream-oriented UNIX sockets, see
12766 * g_unix_connection_send_credentials() and
12767 * g_unix_connection_receive_credentials(). To receive credentials of
12768 * a foreign process connected to a socket, use
12769 * g_socket_get_credentials().
12771 * G_socket_receive_message() over unix sockets (ie: sockets in the
12776 * SECTION:gunixfdlist
12777 * @title: GUnixFDList
12778 * @short_description: An object containing a set of UNIX file descriptors
12779 * @include: gio/gunixfdlist.h
12780 * @see_also: #GUnixFDMessage
12782 * A #GUnixFDList contains a list of file descriptors. It owns the file
12783 * descriptors that it contains, closing them when finalized.
12784 * It may be wrapped in a #GUnixFDMessage and sent over a #GSocket in
12785 * the %G_SOCKET_ADDRESS_UNIX family by using g_socket_send_message()
12786 * and received using g_socket_receive_message().
12787 * Note that <filename><gio/gunixfdlist.h></filename> belongs to
12788 * the UNIX-specific GIO interfaces, thus you have to use the
12789 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12794 * SECTION:gunixfdmessage
12795 * @title: GUnixFDMessage
12796 * @short_description: A GSocketControlMessage containing a GUnixFDList
12797 * @include: gio/gunixfdmessage.h
12798 * @see_also: #GUnixConnection, #GUnixFDList, #GSocketControlMessage
12800 * This #GSocketControlMessage contains a #GUnixFDList.
12801 * It may be sent using g_socket_send_message() and received using
12802 * %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied
12803 * between processes by the kernel.
12804 * For an easier way to send and receive file descriptors over
12805 * stream-oriented UNIX sockets, see g_unix_connection_send_fd() and
12806 * g_unix_connection_receive_fd().
12807 * Note that <filename><gio/gunixfdmessage.h></filename> belongs to
12808 * the UNIX-specific GIO interfaces, thus you have to use the
12809 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12811 * G_socket_receive_message() over unix sockets (ie: sockets in the
12816 * SECTION:gunixinputstream
12817 * @short_description: Streaming input operations for UNIX file descriptors
12818 * @include: gio/gunixinputstream.h
12819 * @see_also: #GInputStream
12821 * #GUnixInputStream implements #GInputStream for reading from a
12822 * UNIX file descriptor, including asynchronous operations. The file
12823 * descriptor must be selectable, so it doesn't work with opened files.
12824 * Note that <filename><gio/gunixinputstream.h></filename> belongs
12825 * to the UNIX-specific GIO interfaces, thus you have to use the
12826 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12831 * SECTION:gunixmounts
12832 * @include: gio/gunixmounts.h
12833 * @short_description: UNIX mounts
12835 * Routines for managing mounted UNIX mount points and paths.
12836 * Note that <filename><gio/gunixmounts.h></filename> belongs to the
12837 * UNIX-specific GIO interfaces, thus you have to use the
12838 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12843 * SECTION:gunixoutputstream
12844 * @short_description: Streaming output operations for UNIX file descriptors
12845 * @include: gio/gunixoutputstream.h
12846 * @see_also: #GOutputStream
12848 * #GUnixOutputStream implements #GOutputStream for writing to a
12849 * UNIX file descriptor, including asynchronous operations. The file
12850 * descriptor must be selectable, so it doesn't work with opened files.
12851 * Note that <filename><gio/gunixoutputstream.h></filename> belongs
12852 * to the UNIX-specific GIO interfaces, thus you have to use the
12853 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12858 * SECTION:gunixsocketaddress
12859 * @short_description: UNIX GSocketAddress
12860 * @include: gio/gunixsocketaddress.h
12862 * Support for UNIX-domain (also known as local) sockets.
12863 * UNIX domain sockets are generally visible in the filesystem.
12864 * However, some systems support abstract socket names which are not
12865 * visible in the filesystem and not affected by the filesystem
12866 * permissions, visibility, etc. Currently this is only supported
12867 * under Linux. If you attempt to use abstract sockets on other
12868 * systems, function calls may return %G_IO_ERROR_NOT_SUPPORTED
12869 * errors. You can use g_unix_socket_address_abstract_names_supported()
12870 * to see if abstract names are supported.
12871 * Note that <filename><gio/gunixsocketaddress.h></filename> belongs to
12872 * the UNIX-specific GIO interfaces, thus you have to use the
12873 * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
12879 * @short_description: Virtual File System
12880 * @include: gio/gio.h
12882 * Entry point for using GIO functionality.
12888 * @short_description: Volume management
12889 * @include: gio/gio.h
12891 * The #GVolume interface represents user-visible objects that can be
12892 * mounted. Note, when porting from GnomeVFS, #GVolume is the moral
12893 * equivalent of #GnomeVFSDrive.
12894 * Mounting a #GVolume instance is an asynchronous operation. For more
12895 * information about asynchronous operations, see #GAsyncReady and
12896 * #GSimpleAsyncReady. To mount a #GVolume, first call
12897 * g_volume_mount() with (at least) the #GVolume instance, optionally
12898 * a #GMountOperation object and a #GAsyncReadyCallback.
12899 * Typically, one will only want to pass %NULL for the
12900 * #GMountOperation if automounting all volumes when a desktop session
12901 * starts since it's not desirable to put up a lot of dialogs asking
12903 * The callback will be fired when the operation has resolved (either
12904 * with success or failure), and a #GAsyncReady structure will be
12905 * passed to the callback. That callback should then call
12906 * g_volume_mount_finish() with the #GVolume instance and the
12907 * #GAsyncReady data to see if the operation was completed
12908 * successfully. If an @error is present when g_volume_mount_finish()
12909 * is called, then it will be filled with any error information.
12910 * <para id="volume-identifier">
12911 * It is sometimes necessary to directly access the underlying
12912 * operating system object behind a volume (e.g. for passing a volume
12913 * to an application via the commandline). For this purpose, GIO
12914 * allows to obtain an 'identifier' for the volume. There can be
12915 * different kinds of identifiers, such as Hal UDIs, filesystem labels,
12916 * traditional Unix devices (e.g. <filename>/dev/sda2</filename>),
12917 * uuids. GIO uses predefind strings as names for the different kinds
12918 * #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. Use g_volume_get_identifier()
12919 * to obtain an identifier for a volume.
12921 * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available
12922 * when the gvfs hal volume monitor is in use. Other volume monitors
12923 * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
12924 * identifier, which can be used to obtain a hal device by means of
12925 * libhal_manger_find_device_string_match().
12927 * Of identifiers: #G_VOLUME_IDENTIFIER_KIND_HAL_UDI,
12932 * SECTION:gvolumemonitor
12933 * @short_description: Volume Monitor
12934 * @include: gio/gio.h
12935 * @see_also: #GFileMonitor
12937 * #GVolumeMonitor is for listing the user interesting devices and volumes
12938 * on the computer. In other words, what a file selector or file manager
12939 * would show in a sidebar.
12940 * #GVolumeMonitor is not <link
12941 * linkend="g-main-context-push-thread-default">thread-default-context
12942 * aware</link>, and so should not be used other than from the main
12943 * thread, with no thread-default-context active.
12948 * SECTION:gwin32inputstream
12949 * @short_description: Streaming input operations for Windows file handles
12950 * @include: gio/gwin32inputstream.h
12951 * @see_also: #GInputStream
12953 * #GWin32InputStream implements #GInputStream for reading from a
12954 * Windows file handle.
12955 * Note that <filename><gio/gwin32inputstream.h></filename> belongs
12956 * to the Windows-specific GIO interfaces, thus you have to use the
12957 * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
12962 * SECTION:gwin32outputstream
12963 * @short_description: Streaming output operations for Windows file handles
12964 * @include: gio/gwin32outputstream.h
12965 * @see_also: #GOutputStream
12967 * #GWin32OutputStream implements #GOutputStream for writing to a
12968 * Windows file handle.
12969 * Note that <filename><gio/gwin32outputstream.h></filename> belongs
12970 * to the Windows-specific GIO interfaces, thus you have to use the
12971 * <filename>gio-windows-2.0.pc</filename> pkg-config file when using it.
12976 * SECTION:gzcompressor
12977 * @short_description: Zlib compressor
12978 * @include: gio/gio.h
12980 * #GZlibCompressor is an implementation of #GConverter that
12981 * compresses data using zlib.
12986 * SECTION:gzdecompressor
12987 * @short_description: Zlib decompressor
12988 * @include: gio/gio.h
12990 * #GZlibDecompressor is an implementation of #GConverter that
12991 * decompresses data compressed with zlib.
12996 * The string info map is an efficient data structure designed to be:
12998 * used with a small set of items. It is used by GSettings schemas for
13000 * 1) Implement <choices> with a list of valid strings
13001 * 2) Implement <alias> by mapping one string to another
13002 * 3) Implement enumerated types by mapping strings to integer values
13004 * The map is made out of an array of uint32s. Each entry in the array
13005 * is an integer value, followed by a specially formatted string value:
13006 * The string starts with the byte 0xff or 0xfe, followed by the
13007 * content of the string, followed by a nul byte, followed by
13008 * additional nul bytes for padding, followed by a 0xff byte.
13009 * Padding is added so that the entire formatted string takes up a
13010 * multiple of 4 bytes, and not less than 8 bytes. The requirement
13011 * for a string to take up 8 bytes is so that the scanner doesn't lose
13012 * synch and mistake a string for an integer value.
13013 * The first byte of the formatted string depends on if the integer is
13014 * an enum value (0xff) or an alias (0xfe). If it is an alias then the
13015 * number refers to the word offset within the info map at which the
13016 * integer corresponding to the "target" value is stored.
13017 * For example, consider the case of the string info map representing an
13018 * enumerated type of 'foo' (value 1) and 'bar' (value 2) and 'baz'
13019 * (alias for 'bar'). Note that string info maps are always little
13021 * x01 x00 x00 x00 xff 'f' 'o' 'o' x00 x00 x00 xff x02 x00 x00 x00
13022 * xff 'b' 'a' 'r' x00 x00 x00 xff x03 x00 x00 x00 xfe 'b' 'a' 'z'
13024 * The operations that someone may want to perform with the map:
13025 * - lookup if a string is valid (and not an alias)
13026 * - lookup the integer value for a enum 'nick'
13027 * - lookup the integer value for the target of an alias
13028 * - lookup an alias and convert it to its target string
13029 * - lookup the enum nick for a given value
13030 * In order to lookup if a string is valid, it is padded on either side
13031 * (as described) and scanned for in the array. For example, you might
13033 * xff 'f' 'o' 'o' x00 x00 x00 xff
13034 * In order to lookup the integer value for a nick, the string is padded
13035 * on either side and scanned for in the array, as above. Instead of
13036 * merely succeeding, we look at the integer value to the left of the
13037 * match. This is the enum value.
13038 * In order to lookup an alias and convert it to its target enum value,
13039 * the string is padded on either side (as described, with 0xfe) and
13040 * scanned for. For example, you might look for "baz":
13041 * xfe 'b' 'a' 'z' x00 x00 x00 xff
13042 * The integer immediately preceeding the match then contains the offset
13043 * of the integer value of the target. In our example, that's '3'.
13044 * This index is dereferenced to find the enum value of '2'.
13045 * To convert the alias to its target string, 5 bytes just need to be
13046 * added past the start of the integer value to find the start of the
13048 * To lookup the enum nick for a given value, the value is searched for
13049 * in the array. To ensure that the value isn't matching the inside of a
13050 * string, we must check that it is either the first item in the array or
13051 * immediately preceeded by the byte 0xff. It must also be immediately
13052 * followed by the byte 0xff.
13053 * Because strings always take up a minimum of 2 words, because 0xff or
13054 * 0xfe never appear inside of a utf-8 string and because no two integer
13055 * values ever appear in sequence, the only way we can have the
13057 * xff __ __ __ __ xff (or 0xfe)
13058 * is in the event of an integer nested between two strings.
13059 * For implementation simplicity/efficiency, strings may not be more
13060 * the value of each choice is set to zero and ignored.
13062 * Than 65 characters in length (ie: 17 32bit words after padding).
13063 * In the event that we are doing <choices> (ie: not an enum type) then
13068 * g_action_activate:
13069 * @action: a #GAction
13070 * @parameter: (allow-none): the parameter to the activation
13072 * Activates the action.
13073 * the parameter type given at construction time). If the parameter
13074 * type was %NULL then @parameter must also be %NULL.
13081 * g_action_get_enabled:
13082 * @action: a #GAction
13084 * Checks if @action is currently enabled.
13085 * An action must be enabled in order to be activated or in order to
13086 * have its state changed from outside callers.
13088 * Returns: whether the action is enabled
13094 * g_action_get_name:
13095 * @action: a #GAction
13097 * Queries the name of @action.
13099 * Returns: the name of the action
13105 * g_action_get_parameter_type:
13106 * @action: a #GAction
13108 * Queries the type of the parameter that must be given when activating
13109 * When activating the action using g_action_activate(), the #GVariant
13110 * given to that function must be of the type returned by this function.
13111 * In the case that this function returns %NULL, you must not give any
13112 * #GVariant, but %NULL instead.
13114 * Returns: (allow-none): the parameter type
13120 * g_action_get_state:
13121 * @action: a #GAction
13123 * Queries the current state of @action.
13124 * If the action is not stateful then %NULL will be returned. If the
13125 * action is stateful then the type of the return value is the type
13126 * given by g_action_get_state_type().
13127 * The return value (if non-%NULL) should be freed with
13128 * g_variant_unref() when it is no longer required.
13130 * Returns: (transfer full): the current state of the action
13136 * g_action_get_state_hint:
13137 * @action: a #GAction
13139 * Requests a hint about the valid range of values for the state of
13140 * If %NULL is returned it either means that the action is not stateful
13141 * or that there is no hint about the valid range of values for the
13142 * state of the action.
13143 * If a #GVariant array is returned then each item in the array is a
13144 * returned then the tuple specifies the inclusive lower and upper bound
13145 * of valid values for the state.
13146 * In any case, the information is merely a hint. It may be possible to
13147 * have a state value outside of the hinted range and setting a value
13148 * within the range may fail.
13149 * The return value (if non-%NULL) should be freed with
13150 * g_variant_unref() when it is no longer required.
13152 * Possible value for the state. if a #gvariant pair (ie: two-tuple) is
13153 * Returns: (transfer full): the state range hint
13159 * g_action_get_state_type:
13160 * @action: a #GAction
13162 * Queries the type of the state of @action.
13163 * g_action_new_stateful()) then this function returns the #GVariantType
13164 * of the state. This is the type of the initial value given as the
13165 * state. All calls to g_action_set_state() must give a #GVariant of
13166 * this type and g_action_get_state() will return a #GVariant of the
13168 * this function will return %NULL. In that case, g_action_get_state()
13169 * will return %NULL and you must not call g_action_set_state().
13171 * If the action is stateful (ie: was created with
13172 * If the action is not stateful (ie: created with g_action_new()) then
13173 * Returns: (allow-none): the state type, if the action is stateful
13179 * g_action_group_action_added:
13180 * @action_group: a #GActionGroup
13181 * @action_name: the name of an action in the group
13183 * Emits the #GActionGroup::action-added signal on @action_group.
13184 * This function should only be called by #GActionGroup implementations.
13191 * g_action_group_action_enabled_changed:
13192 * @action_group: a #GActionGroup
13193 * @action_name: the name of an action in the group
13194 * @enabled: whether or not the action is now enabled
13196 * Emits the #GActionGroup::action-enabled-changed signal on @action_group.
13197 * This function should only be called by #GActionGroup implementations.
13204 * g_action_group_action_removed:
13205 * @action_group: a #GActionGroup
13206 * @action_name: the name of an action in the group
13208 * Emits the #GActionGroup::action-removed signal on @action_group.
13209 * This function should only be called by #GActionGroup implementations.
13216 * g_action_group_action_state_changed:
13217 * @action_group: a #GActionGroup
13218 * @action_name: the name of an action in the group
13219 * @state: the new state of the named action
13221 * Emits the #GActionGroup::action-state-changed signal on @action_group.
13222 * This function should only be called by #GActionGroup implementations.
13229 * g_action_group_activate_action:
13230 * @action_group: a #GActionGroup
13231 * @action_name: the name of the action to activate
13232 * @parameter: (allow-none): parameters to the activation
13234 * Activate the named action within @action_group.
13235 * If the action is expecting a parameter, then the correct type of
13236 * parameter must be given as @parameter. If the action is expecting no
13237 * parameters then @parameter must be %NULL. See
13238 * g_action_group_get_parameter_type().
13245 * g_action_group_change_action_state:
13246 * @action_group: a #GActionGroup
13247 * @action_name: the name of the action to request the change on
13248 * @value: the new state
13250 * Request for the state of the named action within @action_group to be
13251 * changed to @value.
13252 * The action must be stateful and @value must be of the correct type.
13253 * See g_action_group_get_state_type().
13254 * This call merely requests a change. The action may refuse to change
13255 * its state or may change its state to something other than @value.
13256 * See g_action_group_get_state_hint().
13257 * If the @value GVariant is floating, it is consumed.
13264 * g_action_group_get_action_enabled:
13265 * @action_group: a #GActionGroup
13266 * @action_name: the name of the action to query
13268 * Checks if the named action within @action_group is currently enabled.
13269 * An action must be enabled in order to be activated or in order to
13270 * have its state changed from outside callers.
13272 * Returns: whether or not the action is currently enabled
13278 * g_action_group_get_action_parameter_type:
13279 * @action_group: a #GActionGroup
13280 * @action_name: the name of the action to query
13282 * Queries the type of the parameter that must be given when activating
13283 * the named action within @action_group.
13284 * When activating the action using g_action_group_activate(), the
13285 * #GVariant given to that function must be of the type returned by this
13287 * In the case that this function returns %NULL, you must not give any
13288 * #GVariant, but %NULL instead.
13289 * The parameter type of a particular action will never change but it is
13290 * possible for an action to be removed and for a new action to be added
13291 * with the same name but a different parameter type.
13293 * Returns: the parameter type
13299 * g_action_group_get_action_state:
13300 * @action_group: a #GActionGroup
13301 * @action_name: the name of the action to query
13303 * Queries the current state of the named action within @action_group.
13304 * If the action is not stateful then %NULL will be returned. If the
13305 * action is stateful then the type of the return value is the type
13306 * given by g_action_group_get_state_type().
13307 * The return value (if non-%NULL) should be freed with
13308 * g_variant_unref() when it is no longer required.
13310 * Returns: (allow-none): the current state of the action
13316 * g_action_group_get_action_state_hint:
13317 * @action_group: a #GActionGroup
13318 * @action_name: the name of the action to query
13320 * Requests a hint about the valid range of values for the state of the
13321 * named action within @action_group.
13322 * If %NULL is returned it either means that the action is not stateful
13323 * or that there is no hint about the valid range of values for the
13324 * state of the action.
13325 * If a #GVariant array is returned then each item in the array is a
13326 * returned then the tuple specifies the inclusive lower and upper bound
13327 * of valid values for the state.
13328 * In any case, the information is merely a hint. It may be possible to
13329 * have a state value outside of the hinted range and setting a value
13330 * within the range may fail.
13331 * The return value (if non-%NULL) should be freed with
13332 * g_variant_unref() when it is no longer required.
13334 * Possible value for the state. if a #gvariant pair (ie: two-tuple) is
13335 * Returns: (transfer full): the state range hint
13341 * g_action_group_get_action_state_type:
13342 * @action_group: a #GActionGroup
13343 * @action_name: the name of the action to query
13345 * Queries the type of the state of the named action within
13346 * If the action is stateful then this function returns the
13347 * #GVariantType of the state. All calls to g_action_group_set_state()
13348 * must give a #GVariant of this type and g_action_group_get_state()
13349 * will return a #GVariant of the same type.
13350 * If the action is not stateful then this function will return %NULL.
13351 * In that case, g_action_group_get_state() will return %NULL and you
13352 * must not call g_action_group_set_state().
13353 * The state type of a particular action will never change but it is
13354 * possible for an action to be removed and for a new action to be added
13355 * with the same name but a different state type.
13357 * Returns: (transfer full): the state type, if the action is stateful
13363 * g_action_group_has_action:
13364 * @action_group: a #GActionGroup
13365 * @action_name: the name of the action to check for
13367 * Checks if the named action exists within @action_group.
13369 * Returns: whether the named action exists
13375 * g_action_group_list_actions:
13376 * @action_group: a #GActionGroup
13378 * Lists the actions contained within @action_group.
13379 * The caller is responsible for freeing the list with g_strfreev() when
13380 * it is no longer required.
13381 * actions in the groupb
13383 * Returns: (transfer full): a %NULL-terminated array of the names of the
13389 * g_action_set_state:
13390 * @action: a #GAction
13391 * @value: the new state
13393 * Request for the state of @action to be changed to @value.
13394 * The action must be stateful and @value must be of the correct type.
13395 * See g_action_get_state_type().
13396 * This call merely requests a change. The action may refuse to change
13397 * its state or may change its state to something other than @value.
13398 * See g_action_get_state_hint().
13399 * If the @value GVariant is floating, it is consumed.
13407 * @size: number of bytes to allocate.
13409 * Allocates @size bytes on the stack; these bytes will be freed when the current
13410 * stack frame is cleaned up. This macro essentially just wraps the alloca()
13411 * function present on most UNIX variants.
13412 * Thus it provides the same advantages and pitfalls as alloca():
13414 * <varlistentry><term></term><listitem><para>
13415 * + alloca() is very fast, as on most systems it's implemented by just adjusting
13416 * the stack pointer register.
13417 * </para></listitem></varlistentry>
13418 * <varlistentry><term></term><listitem><para>
13419 * + It doesn't cause any memory fragmentation, within its scope, separate alloca()
13420 * blocks just build up and are released together at function end.
13421 * </para></listitem></varlistentry>
13422 * <varlistentry><term></term><listitem><para>
13423 * - Allocation sizes have to fit into the current stack frame. For instance in a
13424 * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes,
13425 * so be sparse with alloca() uses.
13426 * </para></listitem></varlistentry>
13427 * <varlistentry><term></term><listitem><para>
13428 * - Allocation failure due to insufficient stack space is not indicated with a %NULL
13429 * return like e.g. with malloc(). Instead, most systems probably handle it the same
13430 * way as out of stack space situations from infinite function recursion, i.e.
13431 * with a segmentation fault.
13432 * </para></listitem></varlistentry>
13433 * <varlistentry><term></term><listitem><para>
13434 * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays.
13435 * Stack space allocated with alloca() in the same scope as a variable sized array
13436 * will be freed together with the variable sized array upon exit of that scope, and
13437 * not upon exit of the enclosing function scope.
13438 * </para></listitem></varlistentry>
13441 * Returns: space for @size bytes, allocated on the stack
13446 * g_app_info_add_supports_type:
13447 * @appinfo: a #GAppInfo.
13448 * @content_type: a string.
13449 * @error: a #GError.
13451 * Adds a content type to the application information to indicate the
13452 * application is capable of opening files with the given content type.
13454 * Returns: %TRUE on success, %FALSE on error.
13459 * g_app_info_can_delete:
13460 * @appinfo: a #GAppInfo
13462 * Obtains the information whether the #GAppInfo can be deleted.
13463 * See g_app_info_delete().
13465 * Returns: %TRUE if @appinfo can be deleted
13471 * g_app_info_can_remove_supports_type:
13472 * @appinfo: a #GAppInfo.
13474 * Checks if a supported content type can be removed from an application.
13475 * content types from a given @appinfo, %FALSE if not.
13477 * Returns: %TRUE if it is possible to remove supported
13482 * g_app_info_create_from_commandline:
13483 * @commandline: the commandline to use
13484 * @application_name: (allow-none): the application name, or %NULL to use @commandline
13485 * @flags: flags that can specify details of the created #GAppInfo
13486 * @error: a #GError location to store the error occuring, %NULL to ignore.
13488 * Creates a new #GAppInfo from the given information.
13490 * Returns: (transfer full): new #GAppInfo for given command.
13495 * g_app_info_delete:
13496 * @appinfo: a #GAppInfo
13498 * Tries to delete a #GAppInfo.
13499 * On some platforms, there may be a difference between user-defined
13500 * #GAppInfo<!-- -->s which can be deleted, and system-wide ones which
13501 * cannot. See g_app_info_can_delete().
13503 * Virtual: do_delete
13504 * Returns: %TRUE if @appinfo has been deleted
13511 * @appinfo: a #GAppInfo.
13513 * Creates a duplicate of a #GAppInfo.
13515 * Returns: (transfer full): a duplicate of @appinfo.
13520 * g_app_info_equal:
13521 * @appinfo1: the first #GAppInfo.
13522 * @appinfo2: the second #GAppInfo.
13524 * Checks if two #GAppInfo<!-- -->s are equal.
13526 * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.
13531 * g_app_info_get_all:
13533 * Gets a list of all of the applications currently registered
13535 * For desktop files, this includes applications that have
13536 * <literal>NoDisplay=true</literal> set or are excluded from
13537 * display by means of <literal>OnlyShowIn</literal> or
13538 * <literal>NotShowIn</literal>. See g_app_info_should_show().
13539 * The returned list does not include applications which have
13540 * the <literal>Hidden</literal> key set.
13542 * Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfo<!---->s.
13547 * g_app_info_get_all_for_type:
13548 * @content_type: the content type to find a #GAppInfo for
13550 * Gets a list of all #GAppInfos for a given content type.
13551 * for given @content_type or %NULL on error.
13553 * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
13558 * g_app_info_get_commandline:
13559 * @appinfo: a #GAppInfo
13561 * Gets the commandline with which the application will be
13563 * or %NULL if this information is not available
13565 * Returns: a string containing the @appinfo's commandline,
13571 * g_app_info_get_default_for_type:
13572 * @content_type: the content type to find a #GAppInfo for
13573 * @must_support_uris: if %TRUE, the #GAppInfo is expected to support URIs
13575 * Gets the #GAppInfo that corresponds to a given content type.
13578 * Returns: (transfer full): #GAppInfo for given @content_type or
13583 * g_app_info_get_default_for_uri_scheme:
13584 * @uri_scheme: a string containing a URI scheme.
13586 * Gets the default application for launching applications
13587 * using this URI scheme. A URI scheme is the initial part
13588 * of the URI, up to but not including the ':', e.g. "http",
13591 * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
13596 * g_app_info_get_description:
13597 * @appinfo: a #GAppInfo.
13599 * Gets a human-readable description of an installed application.
13600 * application @appinfo, or %NULL if none.
13602 * Returns: a string containing a description of the
13607 * g_app_info_get_display_name:
13608 * @appinfo: a #GAppInfo.
13610 * Gets the display name of the application. The display name is often more
13611 * descriptive to the user than the name itself.
13612 * no display name is available.
13614 * Returns: the display name of the application for @appinfo, or the name if
13620 * g_app_info_get_executable:
13621 * @appinfo: a #GAppInfo
13623 * Gets the executable's name for the installed application.
13626 * Returns: a string containing the @appinfo's application
13631 * g_app_info_get_fallback_for_type:
13632 * @content_type: the content type to find a #GAppInfo for
13634 * Gets a list of fallback #GAppInfos for a given content type, i.e.
13635 * those applications which claim to support the given content type
13636 * by MIME type subclassing and not directly.
13637 * for given @content_type or %NULL on error.
13639 * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
13645 * g_app_info_get_icon:
13646 * @appinfo: a #GAppInfo.
13648 * Gets the icon for the application.
13650 * Returns: (transfer none): the default #GIcon for @appinfo.
13655 * g_app_info_get_id:
13656 * @appinfo: a #GAppInfo.
13658 * Gets the ID of an application. An id is a string that
13659 * identifies the application. The exact format of the id is
13660 * platform dependent. For instance, on Unix this is the
13661 * desktop file id from the xdg menu specification.
13662 * Note that the returned ID may be %NULL, depending on how
13663 * the @appinfo has been constructed.
13665 * Returns: a string containing the application's ID.
13670 * g_app_info_get_name:
13671 * @appinfo: a #GAppInfo.
13673 * Gets the installed name of the application.
13675 * Returns: the name of the application for @appinfo.
13680 * g_app_info_get_recommended_for_type:
13681 * @content_type: the content type to find a #GAppInfo for
13683 * Gets a list of recommended #GAppInfos for a given content type, i.e.
13684 * those applications which claim to support the given content type exactly,
13685 * and not by MIME type subclassing.
13686 * Note that the first application of the list is the last used one, i.e.
13687 * the last one for which #g_app_info_set_as_last_used_for_type has been
13689 * for given @content_type or %NULL on error.
13691 * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
13697 * g_app_info_launch:
13698 * @appinfo: a #GAppInfo
13699 * @files: (element-type GFile): a #GList of #GFile objects
13700 * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
13701 * @error: a #GError
13703 * Launches the application. Passes @files to the launched application
13704 * as arguments, using the optional @launch_context to get information
13705 * about the details of the launcher (like what screen it is on).
13706 * On error, @error will be set accordingly.
13707 * To launch the application without arguments pass a %NULL @files list.
13708 * Note that even if the launch is successful the application launched
13709 * can fail to start if it runs into problems during startup. There is
13710 * no way to detect this.
13711 * Some URIs can be changed when passed through a GFile (for instance
13712 * unsupported uris with strange formats like mailto:), so if you have
13713 * a textual uri you want to pass in as argument, consider using
13714 * g_app_info_launch_uris() instead.
13715 * On UNIX, this function sets the <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>
13716 * environment variable with the path of the launched desktop file and
13717 * <envar>GIO_LAUNCHED_DESKTOP_FILE_PID</envar> to the process
13718 * id of the launched process. This can be used to ignore
13719 * <envar>GIO_LAUNCHED_DESKTOP_FILE</envar>, should it be inherited
13720 * by further processes. The <envar>DISPLAY</envar> and
13721 * <envar>DESKTOP_STARTUP_ID</envar> environment variables are also
13722 * set, based on information provided in @launch_context.
13724 * Returns: %TRUE on successful launch, %FALSE otherwise.
13729 * g_app_info_launch_default_for_uri:
13730 * @uri: the uri to show
13731 * @launch_context: (allow-none): an optional #GAppLaunchContext.
13732 * @error: a #GError.
13734 * Utility function that launches the default application
13735 * registered to handle the specified uri. Synchronous I/O
13736 * is done on the uri to detect the type of the file if
13739 * Returns: %TRUE on success, %FALSE on error.
13744 * g_app_info_launch_uris:
13745 * @appinfo: a #GAppInfo
13746 * @uris: (element-type utf8): a #GList containing URIs to launch.
13747 * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
13748 * @error: a #GError
13750 * Launches the application. Passes @uris to the launched application
13751 * as arguments, using the optional @launch_context to get information
13752 * about the details of the launcher (like what screen it is on).
13753 * On error, @error will be set accordingly.
13754 * To lauch the application without arguments pass a %NULL @uris list.
13755 * Note that even if the launch is successful the application launched
13756 * can fail to start if it runs into problems during startup. There is
13757 * no way to detect this.
13759 * Returns: %TRUE on successful launch, %FALSE otherwise.
13764 * g_app_info_remove_supports_type:
13765 * @appinfo: a #GAppInfo.
13766 * @content_type: a string.
13767 * @error: a #GError.
13769 * Removes a supported type from an application, if possible.
13771 * Returns: %TRUE on success, %FALSE on error.
13776 * g_app_info_reset_type_associations:
13777 * @content_type: a content type
13779 * Removes all changes to the type associations done by
13780 * g_app_info_set_as_default_for_type(),
13781 * g_app_info_set_as_default_for_extension(),
13782 * g_app_info_add_supports_type() or g_app_info_remove_supports_type().
13789 * g_app_info_set_as_default_for_extension:
13790 * @appinfo: a #GAppInfo.
13791 * @extension: a string containing the file extension (without the dot).
13792 * @error: a #GError.
13794 * Sets the application as the default handler for the given file extension.
13796 * Returns: %TRUE on success, %FALSE on error.
13801 * g_app_info_set_as_default_for_type:
13802 * @appinfo: a #GAppInfo.
13803 * @content_type: the content type.
13804 * @error: a #GError.
13806 * Sets the application as the default handler for a given type.
13808 * Returns: %TRUE on success, %FALSE on error.
13813 * g_app_info_set_as_last_used_for_type:
13814 * @appinfo: a #GAppInfo.
13815 * @content_type: the content type.
13816 * @error: a #GError.
13818 * Sets the application as the last used application for a given type.
13819 * This will make the application appear as first in the list returned by
13820 * #g_app_info_get_recommended_for_type, regardless of the default application
13821 * for that content type.
13823 * Returns: %TRUE on success, %FALSE on error.
13828 * g_app_info_should_show:
13829 * @appinfo: a #GAppInfo.
13831 * Checks if the application info should be shown in menus that
13832 * list available applications.
13834 * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise.
13839 * g_app_info_supports_files:
13840 * @appinfo: a #GAppInfo.
13842 * Checks if the application accepts files as arguments.
13844 * Returns: %TRUE if the @appinfo supports files.
13849 * g_app_info_supports_uris:
13850 * @appinfo: a #GAppInfo.
13852 * Checks if the application supports reading files and directories from URIs.
13854 * Returns: %TRUE if the @appinfo supports URIs.
13859 * g_app_launch_context_get_display:
13860 * @context: a #GAppLaunchContext
13861 * @info: a #GAppInfo
13862 * @files: (element-type GFile): a #GList of #GFile objects
13864 * Gets the display string for the @context. This is used to ensure new
13865 * applications are started on the same display as the launching
13866 * application, by setting the <envar>DISPLAY</envar> environment variable.
13868 * Returns: a display string for the display.
13873 * g_app_launch_context_get_startup_notify_id:
13874 * @context: a #GAppLaunchContext
13875 * @info: a #GAppInfo
13876 * @files: (element-type GFile): a #GList of of #GFile objects
13878 * Initiates startup notification for the application and returns the
13879 * <envar>DESKTOP_STARTUP_ID</envar> for the launched operation,
13881 * Startup notification IDs are defined in the <ulink
13882 * url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">
13883 * FreeDesktop.Org Startup Notifications standard</ulink>.
13886 * Returns: a startup notification ID for the application, or %NULL if
13891 * g_app_launch_context_launch_failed:
13892 * @context: a #GAppLaunchContext.
13893 * @startup_notify_id: the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
13895 * Called when an application has failed to launch, so that it can cancel
13896 * the application startup notification started in g_app_launch_context_get_startup_notify_id().
13901 * g_app_launch_context_new:
13903 * Creates a new application launch context. This is not normally used,
13904 * instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
13906 * Returns: a #GAppLaunchContext.
13911 * g_application_activate:
13912 * @application: a #GApplication
13914 * Activates the application.
13915 * In essence, this results in the #GApplication::activate() signal being
13916 * emitted in the primary instance.
13917 * The application must be registered before calling this function.
13924 * g_application_command_line_get_arguments:
13925 * @cmdline: a #GApplicationCommandLine
13926 * @argc: (out): the length of the arguments array, or %NULL
13928 * Gets the list of arguments that was passed on the command line.
13929 * The strings in the array may contain non-utf8 data.
13930 * The return value is %NULL-terminated and should be freed using
13932 * containing the arguments (the argv)
13934 * Returns: (array length=argc) (transfer full): the string array
13940 * g_application_command_line_get_cwd:
13941 * @cmdline: a #GApplicationCommandLine
13943 * Gets the working directory of the command line invocation.
13944 * The string may contain non-utf8 data.
13945 * It is possible that the remote application did not send a working
13946 * directory, so this may be %NULL.
13947 * The return value should not be modified or freed and is valid for as
13948 * long as @cmdline exists.
13950 * Returns: the current directory, or %NULL
13956 * g_application_command_line_get_environ:
13957 * @cmdline: a #GApplicationCommandLine
13959 * Gets the contents of the 'environ' variable of the command line
13960 * invocation, as would be returned by g_get_environ(), ie as a
13961 * %NULL-terminated list of strings in the form 'NAME=VALUE'.
13962 * The strings may contain non-utf8 data.
13963 * The remote application usually does not send an environment. Use
13964 * %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag
13965 * set it is possible that the environment is still not available (due
13966 * to invocation messages from other applications).
13967 * The return value should not be modified or freed and is valid for as
13968 * long as @cmdline exists.
13969 * See g_application_command_line_getenv() if you are only interested
13970 * in the value of a single environment variable.
13971 * strings, or %NULL if they were not sent
13973 * Returns: (array zero-terminated=1) (transfer none): the environment
13979 * g_application_command_line_get_exit_status:
13980 * @cmdline: a #GApplicationCommandLine
13982 * Gets the exit status of @cmdline. See
13983 * g_application_command_line_set_exit_status() for more information.
13985 * Returns: the exit status
13991 * g_application_command_line_get_is_remote:
13992 * @cmdline: a #GApplicationCommandLine
13994 * Determines if @cmdline represents a remote invocation.
13996 * Returns: %TRUE if the invocation was remote
14002 * g_application_command_line_get_platform_data:
14003 * @cmdline: #GApplicationCommandLine
14005 * Gets the platform data associated with the invocation of @cmdline.
14006 * This is a #GVariant dictionary containing information about the
14007 * context in which the invocation occured. It typically contains
14008 * information like the current working directory and the startup
14010 * For local invocation, it will be %NULL.
14012 * Returns: the platform data, or %NULL
14018 * g_application_command_line_getenv:
14019 * @cmdline: a #GApplicationCommandLine
14020 * @name: the environment variable to get
14022 * Gets the value of a particular environment variable of the command
14023 * line invocation, as would be returned by g_getenv(). The strings may
14024 * contain non-utf8 data.
14025 * The remote application usually does not send an environment. Use
14026 * %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag
14027 * set it is possible that the environment is still not available (due
14028 * to invocation messages from other applications).
14029 * The return value should not be modified or freed and is valid for as
14030 * long as @cmdline exists.
14032 * Returns: the value of the variable, or %NULL if unset or unsent
14038 * g_application_command_line_print:
14039 * @cmdline: a #GApplicationCommandLine
14040 * @format: a printf-style format string
14041 * @...: arguments, as per @format
14043 * Formats a message and prints it using the stdout print handler in the
14044 * invoking process.
14045 * If @cmdline is a local invocation then this is exactly equivalent to
14046 * g_print(). If @cmdline is remote then this is equivalent to calling
14047 * g_print() in the invoking process.
14054 * g_application_command_line_printerr:
14055 * @cmdline: a #GApplicationCommandLine
14056 * @format: a printf-style format string
14057 * @...: arguments, as per @format
14059 * Formats a message and prints it using the stderr print handler in the
14060 * invoking process.
14061 * If @cmdline is a local invocation then this is exactly equivalent to
14062 * g_printerr(). If @cmdline is remote then this is equivalent to
14063 * calling g_printerr() in the invoking process.
14070 * g_application_command_line_set_exit_status:
14071 * @cmdline: a #GApplicationCommandLine
14072 * @exit_status: the exit status
14074 * Sets the exit status that will be used when the invoking process
14076 * The return value of the #GApplication::command-line signal is
14077 * passed to this function when the handler returns. This is the usual
14078 * way of setting the exit status.
14079 * In the event that you want the remote invocation to continue running
14080 * and want to decide on the exit status in the future, you can use this
14081 * call. For the case of a remote invocation, the remote process will
14082 * typically exit when the last reference is dropped on @cmdline. The
14083 * exit status of the remote process will be equal to the last value
14084 * that was set with this function.
14085 * In the case that the commandline invocation is local, the situation
14086 * is slightly more complicated. If the commandline invocation results
14087 * increased to a non-zero value) then the application is considered to
14088 * have been 'successful' in a certain sense, and the exit status is
14089 * always zero. If the application use count is zero, though, the exit
14090 * status of the local #GApplicationCommandLine is used.
14092 * In the mainloop running (ie: because the use-count of the application
14098 * g_application_get_application_id:
14099 * @application: a #GApplication
14100 * @returns: the identifier for @application, owned by @application
14102 * Gets the unique identifier for @application.
14109 * g_application_get_flags:
14110 * @application: a #GApplication
14111 * @returns: the flags for @application
14113 * Gets the flags for @application.
14114 * See #GApplicationFlags.
14121 * g_application_get_inactivity_timeout:
14122 * @application: a #GApplication
14124 * Gets the current inactivity timeout for the application.
14125 * This is the amount of time (in milliseconds) after the last call to
14126 * g_application_release() before the application stops running.
14128 * Returns: the timeout, in milliseconds
14134 * g_application_get_is_registered:
14135 * @application: a #GApplication
14136 * @returns: %TRUE if @application is registered
14138 * Checks if @application is registered.
14139 * An application is registered if g_application_register() has been
14140 * successfully called.
14147 * g_application_get_is_remote:
14148 * @application: a #GApplication
14149 * @returns: %TRUE if @application is remote
14151 * Checks if @application is remote.
14152 * If @application is remote then it means that another instance of
14153 * application already exists (the 'primary' instance). Calls to
14154 * perform actions on @application will result in the actions being
14155 * performed by the primary instance.
14156 * The value of this property cannot be accessed before
14157 * g_application_register() has been called. See
14158 * g_application_get_is_registered().
14165 * g_application_hold:
14166 * @application: a #GApplication
14168 * Increases the use count of @application.
14169 * Use this function to indicate that the application has a reason to
14170 * continue to run. For example, g_application_hold() is called by GTK+
14171 * when a toplevel window is on the screen.
14172 * To cancel the hold, call g_application_release().
14177 * g_application_id_is_valid:
14178 * @application_id: a potential application identifier
14179 * @returns: %TRUE if @application_id is valid
14181 * Checks if @application_id is a valid application identifier.
14182 * A valid ID is required for calls to g_application_new() and
14183 * g_application_set_application_id().
14184 * For convenience, the restrictions on application identifiers are
14187 * <listitem>Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-." and must not begin with a digit.</listitem>
14188 * <listitem>Application identifiers must contain at least one '.' (period) character (and thus at least three elements).</listitem>
14189 * <listitem>Application identifiers must not begin or end with a '.' (period) character.</listitem>
14190 * <listitem>Application identifiers must not contain consecutive '.' (period) characters.</listitem>
14191 * <listitem>Application identifiers must not exceed 255 characters.</listitem>
14197 * g_application_new:
14198 * @application_id: the application id
14199 * @flags: the application flags
14200 * @returns: a new #GApplication instance
14202 * Creates a new #GApplication instance.
14203 * This function calls g_type_init() for you.
14204 * The application id must be valid. See g_application_id_is_valid().
14209 * g_application_open:
14210 * @application: a #GApplication
14211 * @files: (array length=n_files): an array of #GFiles to open
14212 * @n_files: the length of the @files array
14213 * @hint: a hint (or ""), but never %NULL
14215 * Opens the given files.
14216 * In essence, this results in the #GApplication::open signal being emitted
14217 * in the primary instance.
14218 * intended to be used by applications that have multiple modes for
14219 * for this functionality, you should use "".
14220 * The application must be registered before calling this function
14221 * and it must have the %G_APPLICATION_HANDLES_OPEN flag set.
14223 * Opening files (eg: "view" vs "edit", etc). Unless you have a need
14229 * g_application_register:
14230 * @application: a #GApplication
14231 * @cancellable: a #GCancellable, or %NULL
14232 * @error: a pointer to a NULL #GError, or %NULL
14233 * @returns: %TRUE if registration succeeded
14235 * Attempts registration of the application.
14236 * This is the point at which the application discovers if it is the
14237 * primary instance or merely acting as a remote for an already-existing
14238 * primary instance. This is implemented by attempting to acquire the
14239 * application identifier as a unique bus name on the session bus using
14241 * Due to the internal architecture of GDBus, method calls can be
14242 * dispatched at any time (even if a main loop is not running). For
14243 * this reason, you must ensure that any object paths that you wish to
14244 * register are registered before calling this function.
14245 * If the application has already been registered then %TRUE is
14246 * returned with no work performed.
14247 * The #GApplication::startup signal is emitted if registration succeeds
14248 * and @application is the primary instance.
14249 * In the event of an error (such as @cancellable being cancelled, or a
14250 * failure to connect to the session bus), %FALSE is returned and @error
14251 * is set appropriately.
14252 * instance is or is not the primary instance of the application. See
14253 * g_application_get_is_remote() for that.
14255 * Note: the return value of this function is not an indicator that this
14261 * g_application_release:
14262 * @application: a #GApplication
14264 * Decrease the use count of @application.
14265 * When the use count reaches zero, the application will stop running.
14266 * Never call this function except to cancel the effect of a previous
14267 * call to g_application_hold().
14272 * g_application_run:
14273 * @application: a #GApplication
14274 * @argc: the argc from main() (or 0 if @argv is %NULL)
14275 * @argv: (array length=argc) (allow-none): the argv from main(), or %NULL
14276 * @returns: the exit status
14278 * Runs the application.
14279 * This function is intended to be run from main() and its return value
14280 * is intended to be returned by main(). Although you are expected to pass
14281 * the @argc, @argv parameters from main() to this function, it is possible
14282 * to pass %NULL if @argv is not available or commandline handling is not
14284 * First, the local_command_line() virtual function is invoked.
14285 * This function always runs on the local instance. It gets passed a pointer
14286 * to a %NULL-terminated copy of @argv and is expected to remove the arguments
14287 * that it handled (shifting up remaining arguments). See
14288 * <xref linkend="gapplication-example-cmdline2"/> for an example of
14289 * parsing @argv manually. Alternatively, you may use the #GOptionContext API,
14290 * after setting <literal>argc = g_strv_length (argv);</literal>.
14291 * The last argument to local_command_line() is a pointer to the @status
14292 * variable which can used to set the exit status that is returned from
14293 * g_application_run().
14294 * If local_command_line() returns %TRUE, the command line is expected
14295 * to be completely handled, including possibly registering as the primary
14296 * instance, calling g_application_activate() or g_application_open(), etc.
14297 * If local_command_line() returns %FALSE then the application is registered
14298 * and the #GApplication::command-line signal is emitted in the primary
14299 * instance (which may or may not be this instance). The signal handler
14300 * gets passed a #GApplicationCommandline object that (among other things)
14301 * contains the remaining commandline arguments that have not been handled
14302 * by local_command_line().
14303 * If the application has the %G_APPLICATION_HANDLES_COMMAND_LINE
14304 * flag set then the default implementation of local_command_line()
14305 * always returns %FALSE immediately, resulting in the commandline
14306 * always being handled in the primary instance.
14307 * Otherwise, the default implementation of local_command_line() tries
14308 * to do a couple of things that are probably reasonable for most
14309 * applications. First, g_application_register() is called to attempt
14310 * to register the application. If that works, then the command line
14311 * arguments are inspected. If no commandline arguments are given, then
14312 * g_application_activate() is called. If commandline arguments are
14313 * given and the %G_APPLICATION_HANDLES_OPEN flag is set then they
14314 * are assumed to be filenames and g_application_open() is called.
14315 * If you need to handle commandline arguments that are not filenames,
14316 * and you don't mind commandline handling to happen in the primary
14317 * instance, you should set %G_APPLICATION_HANDLED_COMMAND_LINE and
14318 * process the commandline arguments in your #GApplication::command-line
14319 * signal handler, either manually or using the #GOptionContext API.
14320 * If you are interested in doing more complicated local handling of the
14321 * commandline then you should implement your own #GApplication subclass
14322 * and override local_command_line(). In this case, you most likely want
14323 * to return %TRUE from your local_command_line() implementation to
14324 * suppress the default handling. See
14325 * <xref linkend="gapplication-example-cmdline2"/> for an example.
14326 * If, after the above is done, the use count of the application is zero
14327 * then the exit status is returned immediately. If the use count is
14328 * non-zero then the mainloop is run until the use count falls to zero,
14329 * at which point 0 is returned.
14330 * If the %G_APPLICATION_IS_SERVICE flag is set, then the exiting at
14331 * around to provide its <emphasis>service</emphasis> to others).
14333 * Use count of zero is delayed for a while (ie: the instance stays
14339 * g_application_set_action_group:
14340 * @application: a #GApplication
14341 * @action_group: (allow-none): a #GActionGroup, or %NULL
14343 * Sets or unsets the group of actions associated with the application.
14344 * These actions are the actions that can be remotely invoked.
14345 * It is an error to call this function after the application has been
14353 * g_application_set_application_id:
14354 * @application: a #GApplication
14355 * @application_id: the identifier for @application
14357 * Sets the unique identifier for @application.
14358 * The application id can only be modified if @application has not yet
14360 * The application id must be valid. See g_application_id_is_valid().
14367 * g_application_set_flags:
14368 * @application: a #GApplication
14369 * @flags: the flags for @application
14371 * Sets the flags for @application.
14372 * The flags can only be modified if @application has not yet been
14374 * See #GApplicationFlags.
14381 * g_application_set_inactivity_timeout:
14382 * @application: a #GApplication
14383 * @inactivity_timeout: the timeout, in milliseconds
14385 * Sets the current inactivity timeout for the application.
14386 * This is the amount of time (in milliseconds) after the last call to
14387 * g_application_release() before the application stops running.
14388 * This call has no side effects of its own. The value set here is only
14389 * used for next time g_application_release() drops the use count to
14390 * zero. Any timeouts currently in progress are not impacted.
14392 * Returns: the timeout, in milliseconds
14398 * g_async_initable_init_async:
14399 * @initable: a #GAsyncInitable.
14400 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14401 * @cancellable: optional #GCancellable object, %NULL to ignore.
14402 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
14403 * @user_data: the data to pass to callback function
14405 * Starts asynchronous initialization of the object implementing the
14406 * interface. This must be done before any real use of the object after
14407 * initial construction. If the object also implements #GInitable you can
14408 * optionally call g_initable_init() instead.
14409 * When the initialization is finished, @callback will be called. You can
14410 * then call g_async_initable_init_finish() to get the result of the
14412 * Implementations may also support cancellation. If @cancellable is not
14413 * %NULL, then initialization can be cancelled by triggering the cancellable
14414 * object from another thread. If the operation was cancelled, the error
14415 * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
14416 * the object doesn't support cancellable initialization, the error
14417 * %G_IO_ERROR_NOT_SUPPORTED will be returned.
14418 * If this function is not called, or returns with an error, then all
14419 * operations on the object should fail, generally returning the
14420 * error %G_IO_ERROR_NOT_INITIALIZED.
14421 * to this function with the same argument should return the same results.
14422 * Only the first call initializes the object; further calls return the result
14423 * of the first call. This is so that it's safe to implement the singleton
14424 * pattern in the GObject constructor function.
14425 * For classes that also support the #GInitable interface, the default
14426 * implementation of this method will run the g_initable_init() function
14427 * in a thread, so if you want to support asynchronous initialization via
14428 * threads, just implement the #GAsyncInitable interface without overriding
14429 * any interface methods.
14431 * Implementations of this method must be idempotent: i.e. multiple calls
14437 * g_async_initable_init_finish:
14438 * @initable: a #GAsyncInitable.
14439 * @res: a #GAsyncResult.
14440 * @error: a #GError location to store the error occuring, or %NULL to ignore.
14442 * Finishes asynchronous initialization and returns the result.
14443 * See g_async_initable_init_async().
14444 * will return %FALSE and set @error appropriately if present.
14446 * Returns: %TRUE if successful. If an error has occurred, this function
14452 * g_async_initable_new_async:
14453 * @object_type: a #GType supporting #GAsyncInitable.
14454 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14455 * @cancellable: optional #GCancellable object, %NULL to ignore.
14456 * @callback: a #GAsyncReadyCallback to call when the initialization is finished
14457 * @user_data: the data to pass to callback function
14458 * @first_property_name: the name of the first property, or %NULL if no properties
14459 * @...: the value of the first property, followed by other property value pairs, and ended by %NULL.
14461 * Helper function for constructing #GAsyncInitiable object. This is
14462 * similar to g_object_new() but also initializes the object asynchronously.
14463 * When the initialization is finished, @callback will be called. You can
14464 * then call g_async_initable_new_finish() to get the new object and check
14472 * g_async_initable_new_finish:
14473 * @initable: the #GAsyncInitable from the callback
14474 * @res: the #GAsyncResult.from the callback
14475 * @error: a #GError location to store the error occuring, or %NULL to ignore.
14477 * Finishes the async construction for the various g_async_initable_new calls,
14478 * returning the created object or %NULL on error.
14479 * g_object_unref().
14481 * Returns: (transfer full): a newly created #GObject, or %NULL on error. Free with
14487 * g_async_initable_new_valist_async:
14488 * @object_type: a #GType supporting #GAsyncInitable.
14489 * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
14490 * @var_args: The var args list generated from @first_property_name.
14491 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14492 * @cancellable: optional #GCancellable object, %NULL to ignore.
14493 * @callback: a #GAsyncReadyCallback to call when the initialization is finished
14494 * @user_data: the data to pass to callback function
14496 * Helper function for constructing #GAsyncInitiable object. This is
14497 * similar to g_object_new_valist() but also initializes the object
14499 * When the initialization is finished, @callback will be called. You can
14500 * then call g_async_initable_new_finish() to get the new object and check
14508 * g_async_initable_newv_async:
14509 * @object_type: a #GType supporting #GAsyncInitable.
14510 * @n_parameters: the number of parameters in @parameters
14511 * @parameters: the parameters to use to construct the object
14512 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the operation.
14513 * @cancellable: optional #GCancellable object, %NULL to ignore.
14514 * @callback: a #GAsyncReadyCallback to call when the initialization is finished
14515 * @user_data: the data to pass to callback function
14517 * Helper function for constructing #GAsyncInitiable object. This is
14518 * similar to g_object_newv() but also initializes the object asynchronously.
14519 * When the initialization is finished, @callback will be called. You can
14520 * then call g_async_initable_new_finish() to get the new object and check
14528 * g_async_result_get_source_object:
14529 * @res: a #GAsyncResult
14531 * Gets the source object from a #GAsyncResult.
14532 * or %NULL if there is none.
14534 * Returns: (transfer full): a new reference to the source object for the @res,
14539 * g_async_result_get_user_data:
14540 * @res: a #GAsyncResult.
14542 * Gets the user data from a #GAsyncResult.
14544 * Returns: (transfer full): the user data for @res.
14549 * g_atomic_int_dec_and_test:
14550 * @atomic: a pointer to an integer
14552 * Atomically decrements the integer pointed to by @atomic by 1.
14553 * after decrementing it
14555 * Returns: %TRUE if the integer pointed to by @atomic is 0
14561 * g_atomic_int_inc:
14562 * @atomic: a pointer to an integer.
14564 * Atomically increments the integer pointed to by @atomic by 1.
14571 * g_buffered_input_stream_fill:
14572 * @stream: a #GBufferedInputStream
14573 * @count: the number of bytes that will be read from the stream
14574 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
14575 * @error: location to store the error occuring, or %NULL to ignore
14577 * Tries to read @count bytes from the stream into the buffer.
14578 * Will block during this read.
14579 * If @count is zero, returns zero and does nothing. A value of @count
14580 * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
14581 * On success, the number of bytes read into the buffer is returned.
14582 * It is not an error if this is not the same as the requested size, as it
14583 * can happen e.g. near the end of a file. Zero is returned on end of file
14584 * (or if @count is zero), but never otherwise.
14585 * If @count is -1 then the attempted read size is equal to the number of
14586 * bytes that are required to fill the buffer.
14587 * If @cancellable is not %NULL, then the operation can be cancelled by
14588 * triggering the cancellable object from another thread. If the operation
14589 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
14590 * operation was partially finished when the operation was cancelled the
14591 * partial result will be returned, without an error.
14592 * On error -1 is returned and @error is set accordingly.
14593 * For the asynchronous, non-blocking, version of this function, see
14594 * g_buffered_input_stream_fill_async().
14597 * Returns: the number of bytes read into @stream's buffer, up to @count,
14602 * g_buffered_input_stream_fill_async:
14603 * @stream: a #GBufferedInputStream
14604 * @count: the number of bytes that will be read from the stream
14605 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
14606 * @cancellable: (allow-none): optional #GCancellable object
14607 * @callback: (scope async): a #GAsyncReadyCallback
14608 * @user_data: (closure): a #gpointer
14610 * Reads data into @stream's buffer asynchronously, up to @count size.
14611 * version of this function, see g_buffered_input_stream_fill().
14612 * If @count is -1 then the attempted read size is equal to the number
14613 * of bytes that are required to fill the buffer.
14618 * g_buffered_input_stream_fill_finish:
14619 * @stream: a #GBufferedInputStream
14620 * @result: a #GAsyncResult
14621 * @error: a #GError
14623 * Finishes an asynchronous read.
14625 * Returns: a #gssize of the read stream, or %-1 on an error.
14630 * g_buffered_input_stream_get_available:
14631 * @stream: #GBufferedInputStream
14633 * Gets the size of the available data within the stream.
14635 * Returns: size of the available stream.
14640 * g_buffered_input_stream_get_buffer_size:
14641 * @stream: a #GBufferedInputStream
14643 * Gets the size of the input buffer.
14645 * Returns: the current buffer size.
14650 * g_buffered_input_stream_new:
14651 * @base_stream: a #GInputStream
14653 * Creates a new #GInputStream from the given @base_stream, with
14654 * a buffer set to the default size (4 kilobytes).
14656 * Returns: a #GInputStream for the given @base_stream.
14661 * g_buffered_input_stream_new_sized:
14662 * @base_stream: a #GInputStream
14665 * Creates a new #GBufferedInputStream from the given @base_stream,
14666 * with a buffer set to @size.
14668 * Returns: a #GInputStream.
14673 * g_buffered_input_stream_peek:
14674 * @stream: a #GBufferedInputStream
14675 * @buffer: a pointer to an allocated chunk of memory
14676 * @offset: a #gsize
14679 * Peeks in the buffer, copying data of size @count into @buffer,
14680 * offset @offset bytes.
14682 * Returns: a #gsize of the number of bytes peeked, or -1 on error.
14687 * g_buffered_input_stream_peek_buffer:
14688 * @stream: a #GBufferedInputStream
14689 * @count: (out): a #gsize to get the number of bytes available in the buffer
14691 * Returns the buffer with the currently available bytes. The returned
14692 * buffer must not be modified and will become invalid when reading from
14693 * the stream or filling the buffer.
14696 * Returns: (array length=count) (element-type guint8) (transfer none):
14701 * g_buffered_input_stream_read_byte:
14702 * @stream: a #GBufferedInputStream
14703 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
14704 * @error: location to store the error occuring, or %NULL to ignore
14706 * Tries to read a single byte from the stream or the buffer. Will block
14707 * during this read.
14708 * On success, the byte read from the stream is returned. On end of stream
14709 * -1 is returned but it's not an exceptional error and @error is not set.
14710 * If @cancellable is not %NULL, then the operation can be cancelled by
14711 * triggering the cancellable object from another thread. If the operation
14712 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
14713 * operation was partially finished when the operation was cancelled the
14714 * partial result will be returned, without an error.
14715 * On error -1 is returned and @error is set accordingly.
14717 * Returns: the byte read from the @stream, or -1 on end of stream or error.
14722 * g_buffered_input_stream_set_buffer_size:
14723 * @stream: a #GBufferedInputStream
14726 * Sets the size of the internal buffer of @stream to @size, or to the
14727 * size of the contents of the buffer. The buffer can never be resized
14728 * smaller than its current contents.
14733 * g_buffered_output_stream_get_auto_grow:
14734 * @stream: a #GBufferedOutputStream.
14736 * Checks if the buffer automatically grows as data is added.
14737 * %FALSE otherwise.
14739 * Returns: %TRUE if the @stream's buffer automatically grows,
14744 * g_buffered_output_stream_get_buffer_size:
14745 * @stream: a #GBufferedOutputStream.
14747 * Gets the size of the buffer in the @stream.
14749 * Returns: the current size of the buffer.
14754 * g_buffered_output_stream_new:
14755 * @base_stream: a #GOutputStream.
14757 * Creates a new buffered output stream for a base stream.
14759 * Returns: a #GOutputStream for the given @base_stream.
14764 * g_buffered_output_stream_new_sized:
14765 * @base_stream: a #GOutputStream.
14768 * Creates a new buffered output stream with a given buffer size.
14770 * Returns: a #GOutputStream with an internal buffer set to @size.
14775 * g_buffered_output_stream_set_auto_grow:
14776 * @stream: a #GBufferedOutputStream.
14777 * @auto_grow: a #gboolean.
14779 * Sets whether or not the @stream's buffer should automatically grow.
14780 * If @auto_grow is true, then each write will just make the buffer
14781 * larger, and you must manually flush the buffer to actually write out
14782 * the data to the underlying stream.
14787 * g_buffered_output_stream_set_buffer_size:
14788 * @stream: a #GBufferedOutputStream.
14791 * Sets the size of the internal buffer to @size.
14797 * @bus_type: A #GBusType.
14798 * @cancellable: A #GCancellable or %NULL.
14799 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
14800 * @user_data: The data to pass to @callback.
14802 * Asynchronously connects to the message bus specified by @bus_type.
14803 * When the operation is finished, @callback will be invoked. You can
14804 * then call g_bus_get_finish() to get the result of the operation.
14805 * This is a asynchronous failable function. See g_bus_get_sync() for
14806 * the synchronous version.
14813 * g_bus_get_finish:
14814 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_bus_get().
14815 * @error: Return location for error or %NULL.
14817 * Finishes an operation started with g_bus_get().
14818 * The returned object is a singleton, that is, shared with other
14819 * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
14820 * event that you need a private message bus connection, use
14821 * g_dbus_address_get_for_bus() and
14822 * g_dbus_connection_new_for_address().
14823 * Note that the returned #GDBusConnection object will (usually) have
14824 * the #GDBusConnection:exit-on-close property set to %TRUE.
14826 * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
14833 * @bus_type: A #GBusType.
14834 * @cancellable: A #GCancellable or %NULL.
14835 * @error: Return location for error or %NULL.
14837 * Synchronously connects to the message bus specified by @bus_type.
14838 * Note that the returned object may shared with other callers,
14839 * e.g. if two separate parts of a process calls this function with
14840 * the same @bus_type, they will share the same object.
14841 * This is a synchronous failable function. See g_bus_get() and
14842 * g_bus_get_finish() for the asynchronous version.
14843 * The returned object is a singleton, that is, shared with other
14844 * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
14845 * event that you need a private message bus connection, use
14846 * g_dbus_address_get_for_bus_sync() and
14847 * g_dbus_connection_new_for_address().
14848 * Note that the returned #GDBusConnection object will (usually) have
14849 * the #GDBusConnection:exit-on-close property set to %TRUE.
14851 * Returns: (transfer full): A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
14858 * @bus_type: The type of bus to own a name on.
14859 * @name: The well-known name to own.
14860 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14861 * @bus_acquired_handler: Handler to invoke when connected to the bus of type @bus_type or %NULL.
14862 * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
14863 * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
14864 * @user_data: User data to pass to handlers.
14865 * @user_data_free_func: Function for freeing @user_data or %NULL.
14867 * Starts acquiring @name on the bus specified by @bus_type and calls
14868 * acquired respectively lost. Callbacks will be invoked in the <link
14869 * linkend="g-main-context-push-thread-default">thread-default main
14870 * loop</link> of the thread you are calling this function from.
14871 * You are guaranteed that one of the @name_acquired_handler and @name_lost_handler
14872 * callbacks will be invoked after calling this function - there are three
14876 * </para></listitem>
14878 * </para></listitem>
14880 * </para></listitem>
14882 * When you are done owning the name, just call g_bus_unown_name()
14883 * with the owner id this function returns.
14884 * If the name is acquired or lost (for example another application
14885 * could acquire the name if you allow replacement or the application
14886 * currently owning the name exits), the handlers are also invoked. If the
14887 * #GDBusConnection that is used for attempting to own the name
14888 * closes, then @name_lost_handler is invoked since it is no
14889 * longer possible for other processes to access the process.
14890 * You cannot use g_bus_own_name() several times for the same name (unless
14891 * interleaved with calls to g_bus_unown_name()) - only the first call
14893 * Another guarantee is that invocations of @name_acquired_handler
14894 * and @name_lost_handler are guaranteed to alternate; that
14895 * is, if @name_acquired_handler is invoked then you are
14896 * guaranteed that the next time one of the handlers is invoked, it
14897 * will be @name_lost_handler. The reverse is also true.
14898 * If you plan on exporting objects (using e.g.
14899 * g_dbus_connection_register_object()), note that it is generally too late
14900 * to export the objects in @name_acquired_handler. Instead, you can do this
14901 * in @bus_acquired_handler since you are guaranteed that this will run
14902 * before @name is requested from the bus.
14903 * This behavior makes it very simple to write applications that wants
14904 * to own names and export objects, see <xref linkend="gdbus-owning-names"/>.
14905 * Simply register objects to be exported in @bus_acquired_handler and
14906 * unregister the objects (if any) in @name_lost_handler.
14907 * g_bus_unown_name() to stop owning the name.
14909 * Returns: An identifier (never 0) that an be used with
14915 * g_bus_own_name_on_connection:
14916 * @connection: A #GDBusConnection.
14917 * @name: The well-known name to own.
14918 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14919 * @name_acquired_handler: Handler to invoke when @name is acquired or %NULL.
14920 * @name_lost_handler: Handler to invoke when @name is lost or %NULL.
14921 * @user_data: User data to pass to handlers.
14922 * @user_data_free_func: Function for freeing @user_data or %NULL.
14924 * Like g_bus_own_name() but takes a #GDBusConnection instead of a
14926 * g_bus_unown_name() to stop owning the name.
14928 * Returns: An identifier (never 0) that an be used with
14934 * g_bus_own_name_on_connection_with_closures:
14935 * @connection: A #GDBusConnection.
14936 * @name: The well-known name to own.
14937 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14938 * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
14939 * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
14941 * Version of g_bus_own_name_on_connection() using closures instead of callbacks for
14942 * easier binding in other languages.
14943 * g_bus_unown_name() to stop owning the name.
14945 * Returns: An identifier (never 0) that an be used with
14946 * Rename to: g_bus_own_name_on_connection
14952 * g_bus_own_name_with_closures:
14953 * @bus_type: The type of bus to own a name on.
14954 * @name: The well-known name to own.
14955 * @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
14956 * @bus_acquired_closure: (allow-none): #GClosure to invoke when connected to the bus of type @bus_type or %NULL.
14957 * @name_acquired_closure: (allow-none): #GClosure to invoke when @name is acquired or %NULL.
14958 * @name_lost_closure: (allow-none): #GClosure to invoke when @name is lost or %NULL.
14960 * Version of g_bus_own_name() using closures instead of callbacks for
14961 * easier binding in other languages.
14962 * g_bus_unown_name() to stop owning the name.
14964 * Returns: An identifier (never 0) that an be used with
14965 * Rename to: g_bus_own_name
14971 * g_bus_unown_name:
14972 * @owner_id: An identifier obtained from g_bus_own_name()
14974 * Stops owning a name.
14981 * g_bus_unwatch_name:
14982 * @watcher_id: An identifier obtained from g_bus_watch_name()
14984 * Stops watching a name.
14991 * g_bus_watch_name:
14992 * @bus_type: The type of bus to watch a name on.
14993 * @name: The name (well-known or unique) to watch.
14994 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
14995 * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
14996 * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
14997 * @user_data: User data to pass to handlers.
14998 * @user_data_free_func: Function for freeing @user_data or %NULL.
15000 * Starts watching @name on the bus specified by @bus_type and calls
15001 * known to have a owner respectively known to lose its
15002 * owner. Callbacks will be invoked in the <link
15003 * linkend="g-main-context-push-thread-default">thread-default main
15004 * loop</link> of the thread you are calling this function from.
15005 * You are guaranteed that one of the handlers will be invoked after
15006 * calling this function. When you are done watching the name, just
15007 * call g_bus_unwatch_name() with the watcher id this function
15009 * If the name vanishes or appears (for example the application owning
15010 * the name could restart), the handlers are also invoked. If the
15011 * #GDBusConnection that is used for watching the name disconnects, then
15012 * possible to access the name.
15013 * Another guarantee is that invocations of @name_appeared_handler
15014 * and @name_vanished_handler are guaranteed to alternate; that
15015 * is, if @name_appeared_handler is invoked then you are
15016 * guaranteed that the next time one of the handlers is invoked, it
15017 * will be @name_vanished_handler. The reverse is also true.
15018 * This behavior makes it very simple to write applications that wants
15019 * to take action when a certain name exists, see <xref
15020 * linkend="gdbus-watching-names"/>. Basically, the application
15021 * should create object proxies in @name_appeared_handler and destroy
15022 * them again (if any) in @name_vanished_handler.
15023 * g_bus_unwatch_name() to stop watching the name.
15025 * Returns: An identifier (never 0) that an be used with
15031 * g_bus_watch_name_on_connection:
15032 * @connection: A #GDBusConnection.
15033 * @name: The name (well-known or unique) to watch.
15034 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
15035 * @name_appeared_handler: Handler to invoke when @name is known to exist or %NULL.
15036 * @name_vanished_handler: Handler to invoke when @name is known to not exist or %NULL.
15037 * @user_data: User data to pass to handlers.
15038 * @user_data_free_func: Function for freeing @user_data or %NULL.
15040 * Like g_bus_watch_name() but takes a #GDBusConnection instead of a
15042 * g_bus_unwatch_name() to stop watching the name.
15044 * Returns: An identifier (never 0) that an be used with
15050 * g_bus_watch_name_on_connection_with_closures:
15051 * @connection: A #GDBusConnection.
15052 * @name: The name (well-known or unique) to watch.
15053 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
15054 * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
15055 * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
15057 * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for
15058 * easier binding in other languages.
15059 * g_bus_unwatch_name() to stop watching the name.
15061 * Returns: An identifier (never 0) that an be used with
15062 * Rename to: g_bus_watch_name_on_connection
15068 * g_bus_watch_name_with_closures:
15069 * @bus_type: The type of bus to watch a name on.
15070 * @name: The name (well-known or unique) to watch.
15071 * @flags: Flags from the #GBusNameWatcherFlags enumeration.
15072 * @name_appeared_closure: (allow-none): #GClosure to invoke when @name is known to exist or %NULL.
15073 * @name_vanished_closure: (allow-none): #GClosure to invoke when @name is known to not exist or %NULL.
15075 * Version of g_bus_watch_name() using closures instead of callbacks for
15076 * easier binding in other languages.
15077 * g_bus_unwatch_name() to stop watching the name.
15079 * Returns: An identifier (never 0) that an be used with
15080 * Rename to: g_bus_watch_name
15086 * g_cancellable_cancel:
15087 * @cancellable: a #GCancellable object.
15089 * Will set @cancellable to cancelled, and will emit the
15090 * #GCancellable::cancelled signal. (However, see the warning about
15091 * race conditions in the documentation for that signal if you are
15092 * planning to connect to it.)
15093 * This function is thread-safe. In other words, you can safely call
15094 * it from a thread other than the one running the operation that was
15095 * passed the @cancellable.
15096 * The convention within gio is that cancelling an asynchronous
15097 * operation causes it to complete asynchronously. That is, if you
15098 * cancel the operation from the same thread in which it is running,
15099 * then the operation's #GAsyncReadyCallback will not be invoked until
15100 * the application returns to the main loop.
15105 * g_cancellable_connect:
15106 * @cancellable: A #GCancellable.
15107 * @callback: The #GCallback to connect.
15108 * @data: Data to pass to @callback.
15109 * @data_destroy_func: Free function for @data or %NULL.
15111 * Convenience function to connect to the #GCancellable::cancelled
15112 * signal. Also handles the race condition that may happen
15113 * if the cancellable is cancelled right before connecting.
15114 * time of the connect if @cancellable is already cancelled,
15115 * or when @cancellable is cancelled in some thread.
15116 * disconnected, or immediately if the cancellable is already
15118 * See #GCancellable::cancelled for details on how to use this.
15121 * Returns: The id of the signal handler or 0 if @cancellable has already
15127 * g_cancellable_disconnect:
15128 * @cancellable: A #GCancellable or %NULL.
15129 * @handler_id: Handler id of the handler to be disconnected, or %0.
15131 * Disconnects a handler from a cancellable instance similar to
15132 * g_signal_handler_disconnect(). Additionally, in the event that a
15133 * signal handler is currently running, this call will block until the
15134 * handler has finished. Calling this function from a
15135 * #GCancellable::cancelled signal handler will therefore result in a
15137 * This avoids a race condition where a thread cancels at the
15138 * same time as the cancellable operation is finished and the
15139 * signal handler is removed. See #GCancellable::cancelled for
15140 * details on how to use this.
15141 * If @cancellable is %NULL or @handler_id is %0 this function does
15149 * g_cancellable_get_current:
15151 * Gets the top cancellable from the stack.
15152 * if the stack is empty.
15154 * Returns: (transfer none): a #GCancellable from the top of the stack, or %NULL
15159 * g_cancellable_get_fd:
15160 * @cancellable: a #GCancellable.
15162 * Gets the file descriptor for a cancellable job. This can be used to
15163 * implement cancellable operations on Unix systems. The returned fd will
15164 * turn readable when @cancellable is cancelled.
15165 * You are not supposed to read from the fd yourself, just check for
15166 * readable status. Reading to unset the readable status is done
15167 * with g_cancellable_reset().
15168 * After a successful return from this function, you should use
15169 * g_cancellable_release_fd() to free up resources allocated for
15170 * the returned file descriptor.
15171 * See also g_cancellable_make_pollfd().
15172 * is not supported, or on errors.
15174 * Returns: A valid file descriptor. %-1 if the file descriptor
15179 * g_cancellable_is_cancelled:
15180 * @cancellable: a #GCancellable or NULL.
15182 * Checks if a cancellable job has been cancelled.
15183 * FALSE if called with %NULL or if item is not cancelled.
15185 * Returns: %TRUE if @cancellable is cancelled,
15190 * g_cancellable_make_pollfd:
15191 * @cancellable: a #GCancellable or %NULL
15192 * @pollfd: a pointer to a #GPollFD
15194 * Creates a #GPollFD corresponding to @cancellable; this can be passed
15195 * to g_poll() and used to poll for cancellation. This is useful both
15196 * for unix systems without a native poll and for portability to
15198 * When this function returns %TRUE, you should use
15199 * g_cancellable_release_fd() to free up resources allocated for the
15200 * If this function returns %FALSE, either no @cancellable was given or
15201 * resource limits prevent this function from allocating the necessary
15202 * structures for polling. (On Linux, you will likely have reached
15203 * the maximum number of file descriptors.) The suggested way to handle
15204 * these cases is to ignore the @cancellable.
15205 * You are not supposed to read from the fd yourself, just check for
15206 * readable status. Reading to unset the readable status is done
15207 * with g_cancellable_reset().
15208 * failure to prepare the cancellable.
15210 * Returns: %TRUE if @pollfd was successfully initialized, %FALSE on
15216 * g_cancellable_new:
15218 * Creates a new #GCancellable object.
15219 * Applications that want to start one or more operations
15220 * that should be cancellable should create a #GCancellable
15221 * and pass it to the operations.
15222 * One #GCancellable can be used in multiple consecutive
15223 * operations, but not in multiple concurrent operations.
15225 * Returns: a #GCancellable.
15230 * g_cancellable_pop_current:
15231 * @cancellable: a #GCancellable object
15233 * Pops @cancellable off the cancellable stack (verifying that @cancellable
15234 * is on the top of the stack).
15239 * g_cancellable_push_current:
15240 * @cancellable: a #GCancellable object
15242 * Pushes @cancellable onto the cancellable stack. The current
15243 * cancellable can then be recieved using g_cancellable_get_current().
15244 * This is useful when implementing cancellable operations in
15245 * code that does not allow you to pass down the cancellable object.
15246 * This is typically called automatically by e.g. #GFile operations,
15247 * so you rarely have to call this yourself.
15252 * g_cancellable_release_fd:
15253 * @cancellable: a #GCancellable
15255 * Releases a resources previously allocated by g_cancellable_get_fd()
15256 * or g_cancellable_make_pollfd().
15257 * For compatibility reasons with older releases, calling this function
15258 * is not strictly required, the resources will be automatically freed
15259 * when the @cancellable is finalized. However, the @cancellable will
15260 * block scarce file descriptors until it is finalized if this function
15261 * is not called. This can cause the application to run out of file
15262 * descriptors when many #GCancellables are used at the same time.
15269 * g_cancellable_reset:
15270 * @cancellable: a #GCancellable object.
15272 * Resets @cancellable to its uncancelled state.
15277 * g_cancellable_set_error_if_cancelled:
15278 * @cancellable: a #GCancellable object.
15279 * @error: #GError to append error state to.
15281 * If the @cancellable is cancelled, sets the error to notify
15282 * that the operation was cancelled.
15284 * Returns: %TRUE if @cancellable was cancelled, %FALSE if it was not.
15289 * g_cancellable_source_new: (skip)
15290 * @cancellable: a #GCancellable, or %NULL
15292 * Creates a source that triggers if @cancellable is cancelled and
15293 * calls its callback of type #GCancellableSourceFunc. This is
15294 * primarily useful for attaching to another (non-cancellable) source
15295 * with g_source_add_child_source() to add cancellability to it.
15296 * For convenience, you can call this with a %NULL #GCancellable,
15297 * in which case the source will never trigger.
15299 * Returns: (transfer full): the new #GSource.
15305 * g_charset_converter_get_num_fallbacks:
15306 * @converter: a #GCharsetConverter
15308 * Gets the number of fallbacks that @converter has applied so far.
15310 * Returns: the number of fallbacks that @converter has applied
15316 * g_charset_converter_get_use_fallback:
15317 * @converter: a #GCharsetConverter
15319 * Gets the #GCharsetConverter:use-fallback property.
15321 * Returns: %TRUE if fallbacks are used by @converter
15327 * g_charset_converter_new:
15328 * @to_charset: destination charset
15329 * @from_charset: source charset
15330 * @error: #GError for error reporting, or %NULL to ignore.
15332 * Creates a new #GCharsetConverter.
15334 * Returns: a new #GCharsetConverter or %NULL on error.
15340 * g_charset_converter_set_use_fallback:
15341 * @converter: a #GCharsetConverter
15342 * @use_fallback: %TRUE to use fallbacks
15344 * Sets the #GCharsetConverter:use-fallback property.
15351 * g_content_type_can_be_executable:
15352 * @type: a content type string
15354 * Checks if a content type can be executable. Note that for instance
15355 * things like text files can be executables (i.e. scripts and batch files).
15356 * can be executable, %FALSE otherwise.
15358 * Returns: %TRUE if the file type corresponds to a type that
15363 * g_content_type_equals:
15364 * @type1: a content type string
15365 * @type2: a content type string
15367 * Compares two content types for equality.
15368 * %FALSE otherwise.
15370 * Returns: %TRUE if the two strings are identical or equivalent,
15375 * g_content_type_from_mime_type:
15376 * @mime_type: a mime type string
15378 * Tries to find a content type based on the mime type name.
15379 * or %NULL. Free with g_free()
15381 * Returns: (allow-none): Newly allocated string with content type
15387 * g_content_type_get_description:
15388 * @type: a content type string
15390 * Gets the human readable description of the content type.
15391 * returned string with g_free()
15393 * Returns: a short description of the content type @type. Free the
15398 * g_content_type_get_icon:
15399 * @type: a content type string
15401 * Gets the icon for a content type.
15402 * object with g_object_unref()
15404 * Returns: (transfer full): #GIcon corresponding to the content type. Free the returned
15409 * g_content_type_get_mime_type:
15410 * @type: a content type string
15412 * Gets the mime type for the content type, if one is registered.
15413 * or %NULL if unknown.
15415 * Returns: (allow-none): the registered mime type for the given @type,
15420 * g_content_type_guess:
15421 * @filename: (allow-none): a string, or %NULL
15422 * @data: (allow-none) (array length=data_size): a stream of data, or %NULL
15423 * @data_size: the size of @data
15424 * @result_uncertain: (allow-none) (out): return location for the certainty of the result, or %NULL
15426 * Guesses the content type based on example data. If the function is
15427 * uncertain, @result_uncertain will be set to %TRUE. Either @filename
15428 * or @data may be %NULL, in which case the guess will be based solely
15429 * on the other argument.
15430 * given data. Free with g_free()
15432 * Returns: a string indicating a guessed content type for the
15437 * g_content_type_guess_for_tree:
15438 * @root: the root of the tree to guess a type for
15440 * Tries to guess the type of the tree with root @root, by
15441 * looking at the files it contains. The result is an array
15442 * of content types, with the best guess coming first.
15443 * The types returned all have the form x-content/foo, e.g.
15444 * x-content/audio-cdda (for audio CDs) or x-content/image-dcf
15445 * (for a camera memory card). See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
15446 * specification for more on x-content types.
15447 * This function is useful in the implementation of
15448 * g_mount_guess_content_type().
15449 * array of zero or more content types, or %NULL. Free with g_strfreev()
15451 * Returns: (transfer full) (array zero-terminated=1): an %NULL-terminated
15457 * g_content_type_is_a:
15458 * @type: a content type string
15459 * @supertype: a content type string
15461 * Determines if @type is a subset of @supertype.
15462 * %FALSE otherwise.
15464 * Returns: %TRUE if @type is a kind of @supertype,
15469 * g_content_type_is_unknown:
15470 * @type: a content type string
15472 * Checks if the content type is the generic "unknown" type.
15473 * On UNIX this is the "application/octet-stream" mimetype,
15474 * while on win32 it is "*".
15476 * Returns: %TRUE if the type is the unknown type.
15481 * g_content_types_get_registered:
15483 * Gets a list of strings containing all the registered content types
15484 * known to the system. The list and its data should be freed using
15486 * g_list_foreach (list, g_free, NULL);
15487 * g_list_free (list);
15488 * </programlisting>
15490 * Returns: (element-type utf8) (transfer full): #GList of the registered content types
15495 * g_converter_convert:
15496 * @converter: a #GConverter.
15497 * @inbuf: (array length=inbuf_size) (element-type guint8): the buffer containing the data to convert.
15498 * @inbuf_size: the number of bytes in @inbuf
15499 * @outbuf: a buffer to write converted data in.
15500 * @outbuf_size: the number of bytes in @outbuf, must be at least one
15501 * @flags: a #GConvertFlags controlling the conversion details
15502 * @bytes_read: (out): will be set to the number of bytes read from @inbuf on success
15503 * @bytes_written: (out): will be set to the number of bytes written to @outbuf on success
15504 * @error: location to store the error occuring, or %NULL to ignore
15506 * This is the main operation used when converting data. It is to be called
15507 * multiple times in a loop, and each time it will do some work, i.e.
15508 * producing some output (in @outbuf) or consuming some input (from @inbuf) or
15509 * both. If its not possible to do any work an error is returned.
15510 * Note that a single call may not consume all input (or any input at all).
15511 * Also a call may produce output even if given no input, due to state stored
15512 * in the converter producing output.
15513 * If any data was either produced or consumed, and then an error happens, then
15514 * only the successful conversion is reported and the error is returned on the
15516 * A full conversion loop involves calling this method repeatedly, each time
15517 * giving it new input and space output space. When there is no more input
15518 * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set.
15519 * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED
15520 * each time until all data is consumed and all output is produced, then
15521 * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED
15522 * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance
15523 * in a decompression converter where the end of data is detectable from the
15524 * data (and there might even be other data after the end of the compressed data).
15525 * When some data has successfully been converted @bytes_read and is set to
15526 * the number of bytes read from @inbuf, and @bytes_written is set to indicate
15527 * how many bytes was written to @outbuf. If there are more data to output
15528 * or consume (i.e. unless the G_CONVERTER_INPUT_AT_END is specified) then
15529 * G_CONVERTER_CONVERTED is returned, and if no more data is to be output
15530 * then G_CONVERTER_FINISHED is returned.
15531 * On error %G_CONVERTER_ERROR is returned and @error is set accordingly.
15532 * Some errors need special handling:
15533 * %G_IO_ERROR_NO_SPACE is returned if there is not enough space
15534 * to write the resulting converted data, the application should
15535 * call the function again with a larger @outbuf to continue.
15536 * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough
15537 * input to fully determine what the conversion should produce,
15538 * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for
15539 * example with an incomplete multibyte sequence when converting text,
15540 * or when a regexp matches up to the end of the input (and may match
15541 * further input). It may also happen when @inbuf_size is zero and
15542 * there is no more data to produce.
15543 * When this happens the application should read more input and then
15544 * call the function again. If further input shows that there is no
15545 * more data call the function again with the same data but with
15546 * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion
15547 * to finish as e.g. in the regexp match case (or, to fail again with
15548 * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the
15549 * input is actually partial).
15550 * After g_converter_convert() has returned %G_CONVERTER_FINISHED the
15551 * converter object is in an invalid state where its not allowed
15552 * to call g_converter_convert() anymore. At this time you can only
15553 * free the object or call g_converter_reset() to reset it to the
15555 * If the flag %G_CONVERTER_FLUSH is set then conversion is modified
15556 * to try to write out all internal state to the output. The application
15557 * has to call the function multiple times with the flag set, and when
15558 * the availible input has been consumed and all internal state has
15559 * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if
15560 * really at the end) is returned instead of %G_CONVERTER_CONVERTED.
15561 * This is somewhat similar to what happens at the end of the input stream,
15562 * but done in the middle of the data.
15563 * This has different meanings for different conversions. For instance
15564 * in a compression converter it would mean that we flush all the
15565 * compression state into output such that if you uncompress the
15566 * compressed data you get back all the input data. Doing this may
15567 * make the final file larger due to padding though. Another example
15568 * is a regexp conversion, where if you at the end of the flushed data
15569 * have a match, but there is also a potential longer match. In the
15570 * non-flushed case we would ask for more input, but when flushing we
15571 * treat this as the end of input and do the match.
15572 * Flushing is not always possible (like if a charset converter flushes
15573 * at a partial multibyte sequence). Converters are supposed to try
15574 * to produce as much output as possible and then return an error
15575 * (typically %G_IO_ERROR_PARTIAL_INPUT).
15577 * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error.
15583 * g_converter_input_stream_get_converter:
15584 * @converter_stream: a #GConverterInputStream
15586 * Gets the #GConverter that is used by @converter_stream.
15588 * Returns: (transfer none): the converter of the converter input stream
15594 * g_converter_input_stream_new:
15595 * @base_stream: a #GInputStream
15596 * @converter: a #GConverter
15598 * Creates a new converter input stream for the @base_stream.
15600 * Returns: a new #GInputStream.
15605 * g_converter_output_stream_get_converter:
15606 * @converter_stream: a #GConverterOutputStream
15608 * Gets the #GConverter that is used by @converter_stream.
15610 * Returns: (transfer none): the converter of the converter output stream
15616 * g_converter_output_stream_new:
15617 * @base_stream: a #GOutputStream
15618 * @converter: a #GConverter
15620 * Creates a new converter output stream for the @base_stream.
15622 * Returns: a new #GOutputStream.
15627 * g_converter_reset:
15628 * @converter: a #GConverter.
15630 * Resets all internal state in the converter, making it behave
15631 * as if it was just created. If the converter has any internal
15632 * state that would produce output then that output is lost.
15639 * g_credentials_get_native: (skip)
15640 * @credentials: A #GCredentials.
15641 * @native_type: The type of native credentials to get.
15643 * Gets a pointer to native credentials of type @native_type from
15644 * It is a programming error (which will cause an warning to be
15645 * logged) to use this method if there is no #GCredentials support for
15646 * the OS or if @native_type isn't supported by the OS.
15647 * operation there is no #GCredentials support for the OS or if
15648 * data, it is owned by @credentials.
15650 * Returns: The pointer to native credentials or %NULL if the
15656 * g_credentials_get_unix_user:
15657 * @credentials: A #GCredentials
15658 * @error: Return location for error or %NULL.
15660 * Tries to get the UNIX user identifier from @credentials. This
15661 * method is only available on UNIX platforms.
15662 * This operation can fail if #GCredentials is not supported on the
15663 * OS or if the native credentials type does not contain information
15664 * about the UNIX user.
15666 * Returns: The UNIX user identifier or -1 if @error is set.
15672 * g_credentials_is_same_user:
15673 * @credentials: A #GCredentials.
15674 * @other_credentials: A #GCredentials.
15675 * @error: Return location for error or %NULL.
15677 * Checks if @credentials and @other_credentials is the same user.
15678 * This operation can fail if #GCredentials is not supported on the
15680 * user, %FALSE otherwise or if @error is set.
15682 * Returns: %TRUE if @credentials and @other_credentials has the same
15688 * g_credentials_new:
15690 * Creates a new #GCredentials object with credentials matching the
15691 * the current process.
15693 * Returns: A #GCredentials. Free with g_object_unref().
15699 * g_credentials_set_native:
15700 * @credentials: A #GCredentials.
15701 * @native_type: The type of native credentials to set.
15702 * @native: A pointer to native credentials.
15704 * Copies the native credentials of type @native_type from @native
15705 * into @credentials.
15706 * It is a programming error (which will cause an warning to be
15707 * logged) to use this method if there is no #GCredentials support for
15708 * the OS or if @native_type isn't supported by the OS.
15715 * g_credentials_set_unix_user:
15716 * @credentials: A #GCredentials.
15717 * @uid: The UNIX user identifier to set.
15718 * @error: Return location for error or %NULL.
15720 * Tries to set the UNIX user identifier on @credentials. This method
15721 * is only available on UNIX platforms.
15722 * This operation can fail if #GCredentials is not supported on the
15723 * OS or if the native credentials type does not contain information
15724 * about the UNIX user.
15726 * Returns: %TRUE if @uid was set, %FALSE if error is set.
15732 * g_credentials_to_string:
15733 * @credentials: A #GCredentials object.
15735 * Creates a human-readable textual representation of @credentials
15736 * that can be used in logging and debug messages. The format of the
15737 * returned string may change in future GLib release.
15739 * Returns: A string that should be freed with g_free().
15745 * g_data_input_stream_get_byte_order:
15746 * @stream: a given #GDataInputStream.
15748 * Gets the byte order for the data input stream.
15750 * Returns: the @stream's current #GDataStreamByteOrder.
15755 * g_data_input_stream_get_newline_type:
15756 * @stream: a given #GDataInputStream.
15758 * Gets the current newline type for the @stream.
15760 * Returns: #GDataStreamNewlineType for the given @stream.
15765 * g_data_input_stream_new:
15766 * @base_stream: a #GInputStream.
15768 * Creates a new data input stream for the @base_stream.
15770 * Returns: a new #GDataInputStream.
15775 * g_data_input_stream_read_byte:
15776 * @stream: a given #GDataInputStream.
15777 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15778 * @error: #GError for error reporting.
15780 * Reads an unsigned 8-bit/1-byte value from @stream.
15781 * if an error occurred.
15783 * Returns: an unsigned 8-bit/1-byte value read from the @stream or %0
15788 * g_data_input_stream_read_int16:
15789 * @stream: a given #GDataInputStream.
15790 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15791 * @error: #GError for error reporting.
15793 * Reads a 16-bit/2-byte value from @stream.
15794 * In order to get the correct byte order for this read operation,
15795 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15796 * an error occurred.
15798 * Returns: a signed 16-bit/2-byte value read from @stream or %0 if
15803 * g_data_input_stream_read_int32:
15804 * @stream: a given #GDataInputStream.
15805 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15806 * @error: #GError for error reporting.
15808 * Reads a signed 32-bit/4-byte value from @stream.
15809 * In order to get the correct byte order for this read operation,
15810 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15811 * If @cancellable is not %NULL, then the operation can be cancelled by
15812 * triggering the cancellable object from another thread. If the operation
15813 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15814 * an error occurred.
15816 * Returns: a signed 32-bit/4-byte value read from the @stream or %0 if
15821 * g_data_input_stream_read_int64:
15822 * @stream: a given #GDataInputStream.
15823 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15824 * @error: #GError for error reporting.
15826 * Reads a 64-bit/8-byte value from @stream.
15827 * In order to get the correct byte order for this read operation,
15828 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15829 * If @cancellable is not %NULL, then the operation can be cancelled by
15830 * triggering the cancellable object from another thread. If the operation
15831 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15832 * an error occurred.
15834 * Returns: a signed 64-bit/8-byte value read from @stream or %0 if
15839 * g_data_input_stream_read_line:
15840 * @stream: a given #GDataInputStream.
15841 * @length: (out): a #gsize to get the length of the data read in.
15842 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15843 * @error: #GError for error reporting.
15845 * Reads a line from the data input stream.
15846 * If @cancellable is not %NULL, then the operation can be cancelled by
15847 * triggering the cancellable object from another thread. If the operation
15848 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15849 * (without the newlines). Set @length to a #gsize to get the
15850 * length of the read line. On an error, it will return %NULL and
15851 * still return %NULL, but @error won't be set.
15853 * Returns: (transfer full): a string with the line that was read in
15858 * g_data_input_stream_read_line_async:
15859 * @stream: a given #GDataInputStream.
15860 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
15861 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15862 * @callback: (scope async): callback to call when the request is satisfied.
15863 * @user_data: (closure): the data to pass to callback function.
15865 * The asynchronous version of g_data_input_stream_read_line(). It is
15866 * an error to have two outstanding calls to this function.
15867 * When the operation is finished, @callback will be called. You
15868 * can then call g_data_input_stream_read_line_finish() to get
15869 * the result of the operation.
15876 * g_data_input_stream_read_line_finish:
15877 * @stream: a given #GDataInputStream.
15878 * @result: the #GAsyncResult that was provided to the callback.
15879 * @length: (out): a #gsize to get the length of the data read in.
15880 * @error: #GError for error reporting.
15882 * Finish an asynchronous call started by
15883 * g_data_input_stream_read_line_async().
15884 * (without the newlines). Set @length to a #gsize to get the
15885 * length of the read line. On an error, it will return %NULL and
15886 * still return %NULL, but @error won't be set.
15888 * Returns: (transfer full): a string with the line that was read in
15894 * g_data_input_stream_read_uint16:
15895 * @stream: a given #GDataInputStream.
15896 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15897 * @error: #GError for error reporting.
15899 * Reads an unsigned 16-bit/2-byte value from @stream.
15900 * In order to get the correct byte order for this read operation,
15901 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15902 * an error occurred.
15904 * Returns: an unsigned 16-bit/2-byte value read from the @stream or %0 if
15909 * g_data_input_stream_read_uint32:
15910 * @stream: a given #GDataInputStream.
15911 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15912 * @error: #GError for error reporting.
15914 * Reads an unsigned 32-bit/4-byte value from @stream.
15915 * In order to get the correct byte order for this read operation,
15916 * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
15917 * If @cancellable is not %NULL, then the operation can be cancelled by
15918 * triggering the cancellable object from another thread. If the operation
15919 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15920 * an error occurred.
15922 * Returns: an unsigned 32-bit/4-byte value read from the @stream or %0 if
15927 * g_data_input_stream_read_uint64:
15928 * @stream: a given #GDataInputStream.
15929 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15930 * @error: #GError for error reporting.
15932 * Reads an unsigned 64-bit/8-byte value from @stream.
15933 * In order to get the correct byte order for this read operation,
15934 * see g_data_input_stream_get_byte_order().
15935 * If @cancellable is not %NULL, then the operation can be cancelled by
15936 * triggering the cancellable object from another thread. If the operation
15937 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
15938 * an error occurred.
15940 * Returns: an unsigned 64-bit/8-byte read from @stream or %0 if
15945 * g_data_input_stream_read_until:
15946 * @stream: a given #GDataInputStream.
15947 * @stop_chars: characters to terminate the read.
15948 * @length: (out): a #gsize to get the length of the data read in.
15949 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15950 * @error: #GError for error reporting.
15952 * Reads a string from the data input stream, up to the first
15953 * occurrence of any of the stop characters.
15954 * Note that, in contrast to g_data_input_stream_read_until_async(),
15955 * this function consumes the stop character that it finds.
15956 * Don't use this function in new code. Its functionality is
15957 * inconsistent with g_data_input_stream_read_until_async(). Both
15958 * functions will be marked as deprecated in a future release. Use
15959 * g_data_input_stream_read_upto() instead, but note that that function
15960 * does not consume the stop character.
15961 * before encountering any of the stop characters. Set @length to
15962 * a #gsize to get the length of the string. This function will
15963 * return %NULL on an error.
15965 * Returns: (transfer full): a string with the data that was read
15970 * g_data_input_stream_read_until_async:
15971 * @stream: a given #GDataInputStream.
15972 * @stop_chars: characters to terminate the read.
15973 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
15974 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
15975 * @callback: (scope async): callback to call when the request is satisfied.
15976 * @user_data: (closure): the data to pass to callback function.
15978 * The asynchronous version of g_data_input_stream_read_until().
15979 * It is an error to have two outstanding calls to this function.
15980 * Note that, in contrast to g_data_input_stream_read_until(),
15981 * this function does not consume the stop character that it finds. You
15982 * must read it for yourself.
15983 * When the operation is finished, @callback will be called. You
15984 * can then call g_data_input_stream_read_until_finish() to get
15985 * the result of the operation.
15986 * Don't use this function in new code. Its functionality is
15987 * inconsistent with g_data_input_stream_read_until(). Both functions
15988 * will be marked as deprecated in a future release. Use
15989 * g_data_input_stream_read_upto_async() instead.
15996 * g_data_input_stream_read_until_finish:
15997 * @stream: a given #GDataInputStream.
15998 * @result: the #GAsyncResult that was provided to the callback.
15999 * @length: (out): a #gsize to get the length of the data read in.
16000 * @error: #GError for error reporting.
16002 * Finish an asynchronous call started by
16003 * g_data_input_stream_read_until_async().
16004 * before encountering any of the stop characters. Set @length to
16005 * a #gsize to get the length of the string. This function will
16006 * return %NULL on an error.
16009 * Returns: (transfer full): a string with the data that was read
16014 * g_data_input_stream_read_upto:
16015 * @stream: a #GDataInputStream
16016 * @stop_chars: characters to terminate the read
16017 * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
16018 * @length: (out): a #gsize to get the length of the data read in
16019 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
16020 * @error: #GError for error reporting
16022 * Reads a string from the data input stream, up to the first
16023 * occurrence of any of the stop characters.
16024 * In contrast to g_data_input_stream_read_until(), this function
16025 * does <emphasis>not</emphasis> consume the stop character. You have
16026 * to use g_data_input_stream_read_byte() to get it before calling
16027 * g_data_input_stream_read_upto() again.
16028 * Note that @stop_chars may contain '\0' if @stop_chars_len is
16030 * before encountering any of the stop characters. Set @length to
16031 * a #gsize to get the length of the string. This function will
16032 * return %NULL on an error
16034 * Returns: (transfer full): a string with the data that was read
16040 * g_data_input_stream_read_upto_async:
16041 * @stream: a #GDataInputStream
16042 * @stop_chars: characters to terminate the read
16043 * @stop_chars_len: length of @stop_chars. May be -1 if @stop_chars is nul-terminated
16044 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
16045 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
16046 * @callback: (scope async): callback to call when the request is satisfied
16047 * @user_data: (closure): the data to pass to callback function
16049 * The asynchronous version of g_data_input_stream_read_upto().
16050 * It is an error to have two outstanding calls to this function.
16051 * In contrast to g_data_input_stream_read_until(), this function
16052 * does <emphasis>not</emphasis> consume the stop character. You have
16053 * to use g_data_input_stream_read_byte() to get it before calling
16054 * g_data_input_stream_read_upto() again.
16055 * Note that @stop_chars may contain '\0' if @stop_chars_len is
16057 * When the operation is finished, @callback will be called. You
16058 * can then call g_data_input_stream_read_upto_finish() to get
16059 * the result of the operation.
16066 * g_data_input_stream_read_upto_finish:
16067 * @stream: a #GDataInputStream
16068 * @result: the #GAsyncResult that was provided to the callback
16069 * @length: (out): a #gsize to get the length of the data read in
16070 * @error: #GError for error reporting
16072 * Finish an asynchronous call started by
16073 * g_data_input_stream_read_upto_async().
16074 * Note that this function does <emphasis>not</emphasis> consume the
16075 * stop character. You have to use g_data_input_stream_read_byte() to
16076 * get it before calling g_data_input_stream_read_upto_async() again.
16077 * before encountering any of the stop characters. Set @length to
16078 * a #gsize to get the length of the string. This function will
16079 * return %NULL on an error.
16081 * Returns: (transfer full): a string with the data that was read
16087 * g_data_input_stream_set_byte_order:
16088 * @stream: a given #GDataInputStream.
16089 * @order: a #GDataStreamByteOrder to set.
16091 * This function sets the byte order for the given @stream. All subsequent
16092 * reads from the @stream will be read in the given @order.
16097 * g_data_input_stream_set_newline_type:
16098 * @stream: a #GDataInputStream.
16099 * @type: the type of new line return as #GDataStreamNewlineType.
16101 * Sets the newline type for the @stream.
16102 * Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read
16103 * chunk ends in "CR" we must read an additional byte to know if this is "CR" or
16104 * "CR LF", and this might block if there is no more data availible.
16109 * g_data_output_stream_get_byte_order:
16110 * @stream: a #GDataOutputStream.
16112 * Gets the byte order for the stream.
16114 * Returns: the #GDataStreamByteOrder for the @stream.
16119 * g_data_output_stream_new:
16120 * @base_stream: a #GOutputStream.
16122 * Creates a new data output stream for @base_stream.
16124 * Returns: #GDataOutputStream.
16129 * g_data_output_stream_put_byte:
16130 * @stream: a #GDataOutputStream.
16131 * @data: a #guchar.
16132 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16133 * @error: a #GError, %NULL to ignore.
16135 * Puts a byte into the output stream.
16137 * Returns: %TRUE if @data was successfully added to the @stream.
16142 * g_data_output_stream_put_int16:
16143 * @stream: a #GDataOutputStream.
16144 * @data: a #gint16.
16145 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16146 * @error: a #GError, %NULL to ignore.
16148 * Puts a signed 16-bit integer into the output stream.
16150 * Returns: %TRUE if @data was successfully added to the @stream.
16155 * g_data_output_stream_put_int32:
16156 * @stream: a #GDataOutputStream.
16157 * @data: a #gint32.
16158 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16159 * @error: a #GError, %NULL to ignore.
16161 * Puts a signed 32-bit integer into the output stream.
16163 * Returns: %TRUE if @data was successfully added to the @stream.
16168 * g_data_output_stream_put_int64:
16169 * @stream: a #GDataOutputStream.
16170 * @data: a #gint64.
16171 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16172 * @error: a #GError, %NULL to ignore.
16174 * Puts a signed 64-bit integer into the stream.
16176 * Returns: %TRUE if @data was successfully added to the @stream.
16181 * g_data_output_stream_put_string:
16182 * @stream: a #GDataOutputStream.
16184 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16185 * @error: a #GError, %NULL to ignore.
16187 * Puts a string into the output stream.
16189 * Returns: %TRUE if @string was successfully added to the @stream.
16194 * g_data_output_stream_put_uint16:
16195 * @stream: a #GDataOutputStream.
16196 * @data: a #guint16.
16197 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16198 * @error: a #GError, %NULL to ignore.
16200 * Puts an unsigned 16-bit integer into the output stream.
16202 * Returns: %TRUE if @data was successfully added to the @stream.
16207 * g_data_output_stream_put_uint32:
16208 * @stream: a #GDataOutputStream.
16209 * @data: a #guint32.
16210 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16211 * @error: a #GError, %NULL to ignore.
16213 * Puts an unsigned 32-bit integer into the stream.
16215 * Returns: %TRUE if @data was successfully added to the @stream.
16220 * g_data_output_stream_put_uint64:
16221 * @stream: a #GDataOutputStream.
16222 * @data: a #guint64.
16223 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
16224 * @error: a #GError, %NULL to ignore.
16226 * Puts an unsigned 64-bit integer into the stream.
16228 * Returns: %TRUE if @data was successfully added to the @stream.
16233 * g_data_output_stream_set_byte_order:
16234 * @stream: a #GDataOutputStream.
16235 * @order: a %GDataStreamByteOrder.
16237 * Sets the byte order of the data output stream to @order.
16242 * g_dbus_address_get_for_bus_sync:
16243 * @bus_type: A #GBusType.
16244 * @cancellable: A #GCancellable or %NULL.
16245 * @error: Return location for error or %NULL.
16247 * Synchronously looks up the D-Bus address for the well-known message
16248 * bus instance specified by @bus_type. This may involve using various
16249 * platform specific mechanisms.
16251 * Returns: A valid D-Bus address string for @bus_type or %NULL if @error is set.
16257 * g_dbus_address_get_stream:
16258 * @address: A valid D-Bus address.
16259 * @cancellable: A #GCancellable or %NULL.
16260 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
16261 * @user_data: Data to pass to @callback.
16263 * Asynchronously connects to an endpoint specified by @address and
16264 * sets up the connection so it is in a state to run the client-side
16265 * of the D-Bus authentication conversation.
16266 * When the operation is finished, @callback will be invoked. You can
16267 * then call g_dbus_address_get_stream_finish() to get the result of
16269 * This is an asynchronous failable function. See
16270 * g_dbus_address_get_stream_sync() for the synchronous version.
16277 * g_dbus_address_get_stream_finish:
16278 * @res: A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().
16279 * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
16280 * @error: Return location for error or %NULL.
16282 * Finishes an operation started with g_dbus_address_get_stream().
16284 * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
16290 * g_dbus_address_get_stream_sync:
16291 * @address: A valid D-Bus address.
16292 * @out_guid: %NULL or return location to store the GUID extracted from @address, if any.
16293 * @cancellable: A #GCancellable or %NULL.
16294 * @error: Return location for error or %NULL.
16296 * Synchronously connects to an endpoint specified by @address and
16297 * sets up the connection so it is in a state to run the client-side
16298 * of the D-Bus authentication conversation.
16299 * This is a synchronous failable function. See
16300 * g_dbus_address_get_stream() for the asynchronous version.
16302 * Returns: (transfer full): A #GIOStream or %NULL if @error is set.
16308 * g_dbus_annotation_info_lookup:
16309 * @annotations: A %NULL-terminated array of annotations or %NULL.
16310 * @name: The name of the annotation to look up.
16312 * Looks up the value of an annotation.
16313 * This cost of this function is O(n) in number of annotations.
16315 * Returns: The value or %NULL if not found. Do not free, it is owned by @annotations.
16321 * g_dbus_annotation_info_ref:
16322 * @info: A #GDBusNodeInfo
16324 * If @info is statically allocated does nothing. Otherwise increases
16325 * the reference count.
16327 * Returns: The same @info.
16333 * g_dbus_annotation_info_unref:
16334 * @info: A #GDBusAnnotationInfo.
16336 * If @info is statically allocated, does nothing. Otherwise decreases
16337 * the reference count of @info. When its reference count drops to 0,
16338 * the memory used is freed.
16345 * g_dbus_arg_info_ref:
16346 * @info: A #GDBusArgInfo
16348 * If @info is statically allocated does nothing. Otherwise increases
16349 * the reference count.
16351 * Returns: The same @info.
16357 * g_dbus_arg_info_unref:
16358 * @info: A #GDBusArgInfo.
16360 * If @info is statically allocated, does nothing. Otherwise decreases
16361 * the reference count of @info. When its reference count drops to 0,
16362 * the memory used is freed.
16369 * g_dbus_auth_observer_authorize_authenticated_peer:
16370 * @observer: A #GDBusAuthObserver.
16371 * @stream: A #GIOStream for the #GDBusConnection.
16372 * @credentials: Credentials received from the peer or %NULL.
16374 * Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.
16376 * Returns: %TRUE if the peer is authorized, %FALSE if not.
16382 * g_dbus_auth_observer_new:
16384 * Creates a new #GDBusAuthObserver object.
16386 * Returns: A #GDBusAuthObserver. Free with g_object_unref().
16392 * g_dbus_connection_add_filter:
16393 * @connection: A #GDBusConnection.
16394 * @filter_function: A filter function.
16395 * @user_data: User data to pass to @filter_function.
16396 * @user_data_free_func: Function to free @user_data with when filter is removed or %NULL.
16398 * Adds a message filter. Filters are handlers that are run on all
16399 * incoming and outgoing messages, prior to standard dispatch. Filters
16400 * are run in the order that they were added. The same handler can be
16401 * added as a filter more than once, in which case it will be run more
16402 * than once. Filters added during a filter callback won't be run on
16403 * the message being processed. Filter functions are allowed to modify
16404 * and even drop messages - see the #GDBusMessageFilterResult
16405 * enumeration for details.
16406 * Note that filters are run in a dedicated message handling thread so
16407 * they can't block and, generally, can't do anything but signal a
16408 * worker thread. Also note that filters are rarely needed - use API
16409 * such as g_dbus_connection_send_message_with_reply(),
16410 * g_dbus_connection_signal_subscribe() or
16411 * g_dbus_connection_call() instead.
16412 * If a filter consumes an incoming message the message is not
16413 * dispatched anywhere else - not even the standard dispatch machinery
16414 * (that API such as g_dbus_connection_signal_subscribe() and
16415 * g_dbus_connection_send_message_with_reply() relies on) will see the
16416 * message. Similary, if a filter consumes an outgoing message, the
16417 * message will not be sent to the other peer.
16418 * g_dbus_connection_remove_filter().
16420 * Returns: A filter identifier that can be used with
16426 * g_dbus_connection_call:
16427 * @connection: A #GDBusConnection.
16428 * @bus_name: A unique or well-known bus name or %NULL if @connection is not a message bus connection.
16429 * @object_path: Path of remote object.
16430 * @interface_name: D-Bus interface to invoke method on.
16431 * @method_name: The name of the method to invoke.
16432 * @parameters: A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
16433 * @reply_type: The expected type of the reply, or %NULL.
16434 * @flags: Flags from the #GDBusCallFlags enumeration.
16435 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
16436 * @cancellable: A #GCancellable or %NULL.
16437 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
16438 * @user_data: The data to pass to @callback.
16440 * Asynchronously invokes the @method_name method on the
16441 * If @connection is closed then the operation will fail with
16442 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
16443 * fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value
16444 * not compatible with the D-Bus protocol, the operation fails with
16445 * %G_IO_ERROR_INVALID_ARGUMENT.
16446 * If @reply_type is non-%NULL then the reply will be checked for having this type and an
16447 * error will be raised if it does not match. Said another way, if you give a @reply_type
16448 * then any non-%NULL return value will be of this type.
16449 * If the @parameters #GVariant is floating, it is consumed. This allows
16450 * convenient 'inline' use of g_variant_new(), e.g.:
16452 * g_dbus_connection_call (connection,
16453 * "org.freedesktop.StringThings",
16454 * "/org/freedesktop/StringThings",
16455 * "org.freedesktop.StringThings",
16457 * g_variant_new ("(ss)",
16461 * G_DBUS_CALL_FLAGS_NONE,
16464 * (GAsyncReadyCallback) two_strings_done,
16467 * This is an asynchronous method. When the operation is finished, @callback will be invoked
16468 * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
16469 * of the thread you are calling this method from. You can then call
16470 * g_dbus_connection_call_finish() to get the result of the operation.
16471 * See g_dbus_connection_call_sync() for the synchronous version of this
16479 * g_dbus_connection_call_finish:
16480 * @connection: A #GDBusConnection.
16481 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call().
16482 * @error: Return location for error or %NULL.
16484 * Finishes an operation started with g_dbus_connection_call().
16485 * return values. Free with g_variant_unref().
16487 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
16493 * g_dbus_connection_call_sync:
16494 * @connection: A #GDBusConnection.
16495 * @bus_name: A unique or well-known bus name.
16496 * @object_path: Path of remote object.
16497 * @interface_name: D-Bus interface to invoke method on.
16498 * @method_name: The name of the method to invoke.
16499 * @parameters: A #GVariant tuple with parameters for the method or %NULL if not passing parameters.
16500 * @reply_type: The expected type of the reply, or %NULL.
16501 * @flags: Flags from the #GDBusCallFlags enumeration.
16502 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
16503 * @cancellable: A #GCancellable or %NULL.
16504 * @error: Return location for error or %NULL.
16506 * Synchronously invokes the @method_name method on the
16507 * If @connection is closed then the operation will fail with
16508 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the
16509 * operation will fail with %G_IO_ERROR_CANCELLED. If @parameters
16510 * contains a value not compatible with the D-Bus protocol, the operation
16511 * fails with %G_IO_ERROR_INVALID_ARGUMENT.
16512 * If @reply_type is non-%NULL then the reply will be checked for having
16513 * this type and an error will be raised if it does not match. Said
16514 * another way, if you give a @reply_type then any non-%NULL return
16515 * value will be of this type.
16516 * If the @parameters #GVariant is floating, it is consumed.
16517 * This allows convenient 'inline' use of g_variant_new(), e.g.:
16519 * g_dbus_connection_call_sync (connection,
16520 * "org.freedesktop.StringThings",
16521 * "/org/freedesktop/StringThings",
16522 * "org.freedesktop.StringThings",
16524 * g_variant_new ("(ss)",
16528 * G_DBUS_CALL_FLAGS_NONE,
16533 * The calling thread is blocked until a reply is received. See
16534 * g_dbus_connection_call() for the asynchronous version of
16536 * return values. Free with g_variant_unref().
16538 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
16544 * g_dbus_connection_close:
16545 * @connection: A #GDBusConnection.
16546 * @cancellable: A #GCancellable or %NULL.
16547 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
16548 * @user_data: The data to pass to @callback.
16550 * Closes @connection. Note that this never causes the process to
16551 * exit (this might only happen if the other end of a shared message
16552 * bus connection disconnects, see #GDBusConnection:exit-on-close).
16553 * Once the connection is closed, operations such as sending a message
16554 * will return with the error %G_IO_ERROR_CLOSED. Closing a connection
16555 * will not automatically flush the connection so queued messages may
16556 * be lost. Use g_dbus_connection_flush() if you need such guarantees.
16557 * If @connection is already closed, this method fails with
16558 * %G_IO_ERROR_CLOSED.
16559 * When @connection has been closed, the #GDBusConnection::closed
16560 * signal is emitted in the <link
16561 * linkend="g-main-context-push-thread-default">thread-default main
16562 * loop</link> of the thread that @connection was constructed in.
16563 * This is an asynchronous method. When the operation is finished,
16564 * linkend="g-main-context-push-thread-default">thread-default main
16565 * loop</link> of the thread you are calling this method from. You can
16566 * then call g_dbus_connection_close_finish() to get the result of the
16567 * operation. See g_dbus_connection_close_sync() for the synchronous
16575 * g_dbus_connection_close_finish:
16576 * @connection: A #GDBusConnection.
16577 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_close().
16578 * @error: Return location for error or %NULL.
16580 * Finishes an operation started with g_dbus_connection_close().
16582 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16588 * g_dbus_connection_close_sync:
16589 * @connection: A #GDBusConnection.
16590 * @cancellable: A #GCancellable or %NULL.
16591 * @error: Return location for error or %NULL.
16593 * Synchronously closees @connection. The calling thread is blocked
16594 * until this is done. See g_dbus_connection_close() for the
16595 * asynchronous version of this method and more details about what it
16598 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16604 * g_dbus_connection_emit_signal:
16605 * @connection: A #GDBusConnection.
16606 * @destination_bus_name: The unique bus name for the destination for the signal or %NULL to emit to all listeners.
16607 * @object_path: Path of remote object.
16608 * @interface_name: D-Bus interface to emit a signal on.
16609 * @signal_name: The name of the signal to emit.
16610 * @parameters: A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
16611 * @error: Return location for error or %NULL.
16614 * If the parameters GVariant is floating, it is consumed.
16615 * This can only fail if @parameters is not compatible with the D-Bus protocol.
16617 * Returns: %TRUE unless @error is set.
16623 * g_dbus_connection_flush:
16624 * @connection: A #GDBusConnection.
16625 * @cancellable: A #GCancellable or %NULL.
16626 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
16627 * @user_data: The data to pass to @callback.
16629 * Asynchronously flushes @connection, that is, writes all queued
16630 * outgoing message to the transport and then flushes the transport
16631 * (using g_output_stream_flush_async()). This is useful in programs
16632 * that wants to emit a D-Bus signal and then exit
16633 * immediately. Without flushing the connection, there is no guarantee
16634 * that the message has been sent to the networking buffers in the OS
16636 * This is an asynchronous method. When the operation is finished,
16637 * linkend="g-main-context-push-thread-default">thread-default main
16638 * loop</link> of the thread you are calling this method from. You can
16639 * then call g_dbus_connection_flush_finish() to get the result of the
16640 * operation. See g_dbus_connection_flush_sync() for the synchronous
16648 * g_dbus_connection_flush_finish:
16649 * @connection: A #GDBusConnection.
16650 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_flush().
16651 * @error: Return location for error or %NULL.
16653 * Finishes an operation started with g_dbus_connection_flush().
16655 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16661 * g_dbus_connection_flush_sync:
16662 * @connection: A #GDBusConnection.
16663 * @cancellable: A #GCancellable or %NULL.
16664 * @error: Return location for error or %NULL.
16666 * Synchronously flushes @connection. The calling thread is blocked
16667 * until this is done. See g_dbus_connection_flush() for the
16668 * asynchronous version of this method and more details about what it
16671 * Returns: %TRUE if the operation succeeded, %FALSE if @error is set.
16677 * g_dbus_connection_get_capabilities:
16678 * @connection: A #GDBusConnection.
16680 * Gets the capabilities negotiated with the remote peer
16682 * Returns: Zero or more flags from the #GDBusCapabilityFlags enumeration.
16688 * g_dbus_connection_get_exit_on_close:
16689 * @connection: A #GDBusConnection.
16691 * Gets whether the process is terminated when @connection is
16692 * closed by the remote peer. See
16693 * #GDBusConnection:exit-on-close for more details.
16694 * closed by the remote peer.
16696 * Returns: Whether the process is terminated when @connection is
16702 * g_dbus_connection_get_guid:
16703 * @connection: A #GDBusConnection.
16705 * The GUID of the peer performing the role of server when
16706 * authenticating. See #GDBusConnection:guid for more details.
16708 * Returns: The GUID. Do not free this string, it is owned by
16714 * g_dbus_connection_get_peer_credentials:
16715 * @connection: A #GDBusConnection.
16717 * Gets the credentials of the authenticated peer. This will always
16718 * return %NULL unless @connection acted as a server
16719 * (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed)
16720 * when set up and the client passed credentials as part of the
16721 * authentication process.
16722 * In a message bus setup, the message bus is always the server and
16723 * each application is a client. So this method will always return
16724 * %NULL for message bus clients.
16725 * this object, it is owned by @connection.
16727 * Returns: (transfer none): A #GCredentials or %NULL if not available. Do not free
16733 * g_dbus_connection_get_stream:
16734 * @connection: a #GDBusConnection
16736 * Gets the underlying stream used for IO.
16738 * Returns: (transfer none): the stream used for IO
16744 * g_dbus_connection_get_unique_name:
16745 * @connection: A #GDBusConnection.
16747 * Gets the unique name of @connection as assigned by the message
16748 * bus. This can also be used to figure out if @connection is a
16749 * message bus connection.
16750 * bus connection. Do not free this string, it is owned by
16752 * Returns: The unique name or %NULL if @connection is not a message
16758 * g_dbus_connection_is_closed:
16759 * @connection: A #GDBusConnection.
16761 * Gets whether @connection is closed.
16763 * Returns: %TRUE if the connection is closed, %FALSE otherwise.
16769 * g_dbus_connection_new:
16770 * @stream: A #GIOStream.
16771 * @guid: The GUID to use if a authenticating as a server or %NULL.
16772 * @flags: Flags describing how to make the connection.
16773 * @observer: A #GDBusAuthObserver or %NULL.
16774 * @cancellable: A #GCancellable or %NULL.
16775 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
16776 * @user_data: The data to pass to @callback.
16778 * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
16779 * with the end represented by @stream.
16780 * If @observer is not %NULL it may be used to control the
16781 * authentication process.
16782 * When the operation is finished, @callback will be invoked. You can
16783 * then call g_dbus_connection_new_finish() to get the result of the
16785 * This is a asynchronous failable constructor. See
16786 * g_dbus_connection_new_sync() for the synchronous
16794 * g_dbus_connection_new_finish:
16795 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
16796 * @error: Return location for error or %NULL.
16798 * Finishes an operation started with g_dbus_connection_new().
16800 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16806 * g_dbus_connection_new_for_address:
16807 * @address: A D-Bus address.
16808 * @flags: Flags describing how to make the connection.
16809 * @observer: A #GDBusAuthObserver or %NULL.
16810 * @cancellable: A #GCancellable or %NULL.
16811 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
16812 * @user_data: The data to pass to @callback.
16814 * Asynchronously connects and sets up a D-Bus client connection for
16815 * exchanging D-Bus messages with an endpoint specified by @address
16816 * which must be in the D-Bus address format.
16817 * This constructor can only be used to initiate client-side
16818 * connections - use g_dbus_connection_new() if you need to act as the
16819 * server. In particular, @flags cannot contain the
16820 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
16821 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
16822 * When the operation is finished, @callback will be invoked. You can
16823 * then call g_dbus_connection_new_finish() to get the result of the
16825 * If @observer is not %NULL it may be used to control the
16826 * authentication process.
16827 * This is a asynchronous failable constructor. See
16828 * g_dbus_connection_new_for_address_sync() for the synchronous
16836 * g_dbus_connection_new_for_address_finish:
16837 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_new().
16838 * @error: Return location for error or %NULL.
16840 * Finishes an operation started with g_dbus_connection_new_for_address().
16842 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16848 * g_dbus_connection_new_for_address_sync:
16849 * @address: A D-Bus address.
16850 * @flags: Flags describing how to make the connection.
16851 * @observer: A #GDBusAuthObserver or %NULL.
16852 * @cancellable: A #GCancellable or %NULL.
16853 * @error: Return location for error or %NULL.
16855 * Synchronously connects and sets up a D-Bus client connection for
16856 * exchanging D-Bus messages with an endpoint specified by @address
16857 * which must be in the D-Bus address format.
16858 * This constructor can only be used to initiate client-side
16859 * connections - use g_dbus_connection_new_sync() if you need to act
16860 * as the server. In particular, @flags cannot contain the
16861 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or
16862 * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.
16863 * This is a synchronous failable constructor. See
16864 * g_dbus_connection_new_for_address() for the asynchronous version.
16865 * If @observer is not %NULL it may be used to control the
16866 * authentication process.
16868 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16874 * g_dbus_connection_new_sync:
16875 * @stream: A #GIOStream.
16876 * @guid: The GUID to use if a authenticating as a server or %NULL.
16877 * @flags: Flags describing how to make the connection.
16878 * @observer: A #GDBusAuthObserver or %NULL.
16879 * @cancellable: A #GCancellable or %NULL.
16880 * @error: Return location for error or %NULL.
16882 * Synchronously sets up a D-Bus connection for exchanging D-Bus messages
16883 * with the end represented by @stream.
16884 * If @observer is not %NULL it may be used to control the
16885 * authentication process.
16886 * This is a synchronous failable constructor. See
16887 * g_dbus_connection_new() for the asynchronous version.
16889 * Returns: A #GDBusConnection or %NULL if @error is set. Free with g_object_unref().
16895 * g_dbus_connection_register_object:
16896 * @connection: A #GDBusConnection.
16897 * @object_path: The object path to register at.
16898 * @interface_info: Introspection data for the interface.
16899 * @vtable: A #GDBusInterfaceVTable to call into or %NULL.
16900 * @user_data: Data to pass to functions in @vtable.
16901 * @user_data_free_func: Function to call when the object path is unregistered.
16902 * @error: Return location for error or %NULL.
16904 * Registers callbacks for exported objects at @object_path with the
16905 * D-Bus interface that is described in @interface_info.
16906 * Calls to functions in @vtable (and @user_data_free_func) will
16907 * happen in the <link linkend="g-main-context-push-thread-default">thread-default main
16908 * loop</link> of the thread you are calling this method from.
16909 * Note that all #GVariant values passed to functions in @vtable will match
16910 * the signature given in @interface_info - if a remote caller passes
16911 * incorrect values, the <literal>org.freedesktop.DBus.Error.InvalidArgs</literal>
16912 * is returned to the remote caller.
16913 * Additionally, if the remote caller attempts to invoke methods or
16914 * access properties not mentioned in @interface_info the
16915 * <literal>org.freedesktop.DBus.Error.UnknownMethod</literal> resp.
16916 * <literal>org.freedesktop.DBus.Error.InvalidArgs</literal> errors
16917 * are returned to the caller.
16918 * It is considered a programming error if the
16919 * #GDBusInterfaceGetPropertyFunc function in @vtable returns a
16920 * #GVariant of incorrect type.
16921 * If an existing callback is already registered at @object_path and
16922 * GDBus automatically implements the standard D-Bus interfaces
16923 * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
16924 * and org.freedesktop.Peer, so you don't have to implement those for
16925 * the objects you export. You <emphasis>can</emphasis> implement
16926 * org.freedesktop.DBus.Properties yourself, e.g. to handle getting
16927 * and setting of properties asynchronously.
16928 * Note that the reference count on @interface_info will be
16929 * incremented by 1 (unless allocated statically, e.g. if the
16930 * reference count is -1, see g_dbus_interface_info_ref()) for as long
16931 * as the object is exported. Also note that @vtable will be copied.
16932 * See <xref linkend="gdbus-server"/> for an example of how to use this method.
16933 * that can be used with g_dbus_connection_unregister_object() .
16935 * Returns: 0 if @error is set, otherwise a registration id (never 0)
16941 * g_dbus_connection_register_subtree:
16942 * @connection: A #GDBusConnection.
16943 * @object_path: The object path to register the subtree at.
16944 * @vtable: A #GDBusSubtreeVTable to enumerate, introspect and dispatch nodes in the subtree.
16945 * @flags: Flags used to fine tune the behavior of the subtree.
16946 * @user_data: Data to pass to functions in @vtable.
16947 * @user_data_free_func: Function to call when the subtree is unregistered.
16948 * @error: Return location for error or %NULL.
16950 * Registers a whole subtree of <quote>dynamic</quote> objects.
16951 * The @enumerate and @introspection functions in @vtable are used to
16952 * convey, to remote callers, what nodes exist in the subtree rooted
16954 * When handling remote calls into any node in the subtree, first the
16955 * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set
16956 * the @introspection function is used to check if the node supports the
16957 * requested method. If so, the @dispatch function is used to determine
16958 * where to dispatch the call. The collected #GDBusInterfaceVTable and
16959 * #gpointer will be used to call into the interface vtable for processing
16961 * All calls into user-provided code will be invoked in the <link
16962 * linkend="g-main-context-push-thread-default">thread-default main
16963 * loop</link> of the thread you are calling this method from.
16964 * If an existing subtree is already registered at @object_path or
16965 * then @error is set to #G_IO_ERROR_EXISTS.
16966 * Note that it is valid to register regular objects (using
16967 * g_dbus_connection_register_object()) in a subtree registered with
16968 * g_dbus_connection_register_subtree() - if so, the subtree handler
16969 * is tried as the last resort. One way to think about a subtree
16970 * handler is to consider it a <quote>fallback handler</quote>
16971 * for object paths not registered via g_dbus_connection_register_object()
16972 * or other bindings.
16973 * Note that @vtable will be copied so you cannot change it after
16975 * See <xref linkend="gdbus-subtree-server"/> for an example of how to use this method.
16976 * that can be used with g_dbus_connection_unregister_subtree() .
16978 * Returns: 0 if @error is set, otherwise a subtree registration id (never 0)
16984 * g_dbus_connection_remove_filter:
16985 * @connection: a #GDBusConnection
16986 * @filter_id: an identifier obtained from g_dbus_connection_add_filter()
16988 * Removes a filter.
16995 * g_dbus_connection_send_message:
16996 * @connection: A #GDBusConnection.
16997 * @message: A #GDBusMessage
16998 * @flags: Flags affecting how the message is sent.
16999 * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
17000 * @error: Return location for error or %NULL.
17002 * Asynchronously sends @message to the peer represented by @connection.
17003 * Unless @flags contain the
17004 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
17005 * will be assigned by @connection and set on @message via
17006 * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
17007 * serial number used will be written to this location prior to
17008 * submitting the message to the underlying transport.
17009 * If @connection is closed then the operation will fail with
17010 * %G_IO_ERROR_CLOSED. If @message is not well-formed,
17011 * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
17012 * See <xref linkend="gdbus-server"/> and <xref
17013 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17014 * low-level API to send and receive UNIX file descriptors.
17015 * Note that @message must be unlocked, unless @flags contain the
17016 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
17017 * transmission, %FALSE if @error is set.
17019 * Returns: %TRUE if the message was well-formed and queued for
17025 * g_dbus_connection_send_message_with_reply:
17026 * @connection: A #GDBusConnection.
17027 * @message: A #GDBusMessage.
17028 * @flags: Flags affecting how the message is sent.
17029 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
17030 * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
17031 * @cancellable: A #GCancellable or %NULL.
17032 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result.
17033 * @user_data: The data to pass to @callback.
17035 * Asynchronously sends @message to the peer represented by @connection.
17036 * Unless @flags contain the
17037 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
17038 * will be assigned by @connection and set on @message via
17039 * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
17040 * serial number used will be written to this location prior to
17041 * submitting the message to the underlying transport.
17042 * If @connection is closed then the operation will fail with
17043 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
17044 * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
17045 * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
17046 * This is an asynchronous method. When the operation is finished, @callback will be invoked
17047 * in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
17048 * of the thread you are calling this method from. You can then call
17049 * g_dbus_connection_send_message_with_reply_finish() to get the result of the operation.
17050 * See g_dbus_connection_send_message_with_reply_sync() for the synchronous version.
17051 * Note that @message must be unlocked, unless @flags contain the
17052 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
17053 * See <xref linkend="gdbus-server"/> and <xref
17054 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17055 * low-level API to send and receive UNIX file descriptors.
17062 * g_dbus_connection_send_message_with_reply_finish:
17063 * @connection: a #GDBusConnection
17064 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_send_message_with_reply().
17065 * @error: Return location for error or %NULL.
17067 * Finishes an operation started with g_dbus_connection_send_message_with_reply().
17068 * Note that @error is only set if a local in-process error
17069 * occured. That is to say that the returned #GDBusMessage object may
17070 * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
17071 * g_dbus_message_to_gerror() to transcode this to a #GError.
17072 * See <xref linkend="gdbus-server"/> and <xref
17073 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17074 * low-level API to send and receive UNIX file descriptors.
17076 * Returns: (transfer full): A locked #GDBusMessage or %NULL if @error is set.
17082 * g_dbus_connection_send_message_with_reply_sync:
17083 * @connection: A #GDBusConnection.
17084 * @message: A #GDBusMessage.
17085 * @flags: Flags affecting how the message is sent.
17086 * @timeout_msec: The timeout in milliseconds, -1 to use the default timeout or %G_MAXINT for no timeout.
17087 * @out_serial: Return location for serial number assigned to @message when sending it or %NULL.
17088 * @cancellable: A #GCancellable or %NULL.
17089 * @error: Return location for error or %NULL.
17091 * Synchronously sends @message to the peer represented by @connection
17092 * and blocks the calling thread until a reply is received or the
17093 * timeout is reached. See g_dbus_connection_send_message_with_reply()
17094 * for the asynchronous version of this method.
17095 * Unless @flags contain the
17096 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
17097 * will be assigned by @connection and set on @message via
17098 * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
17099 * serial number used will be written to this location prior to
17100 * submitting the message to the underlying transport.
17101 * If @connection is closed then the operation will fail with
17102 * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
17103 * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
17104 * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
17105 * Note that @error is only set if a local in-process error
17106 * occured. That is to say that the returned #GDBusMessage object may
17107 * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
17108 * g_dbus_message_to_gerror() to transcode this to a #GError.
17109 * See <xref linkend="gdbus-server"/> and <xref
17110 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
17111 * low-level API to send and receive UNIX file descriptors.
17112 * Note that @message must be unlocked, unless @flags contain the
17113 * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
17115 * Returns: (transfer full): A locked #GDBusMessage that is the reply to @message or %NULL if @error is set.
17121 * g_dbus_connection_set_exit_on_close:
17122 * @connection: A #GDBusConnection.
17123 * @exit_on_close: Whether the process should be terminated when @connection is closed by the remote peer.
17125 * Sets whether the process should be terminated when @connection is
17126 * closed by the remote peer. See #GDBusConnection:exit-on-close for
17134 * g_dbus_connection_signal_subscribe:
17135 * @connection: A #GDBusConnection.
17136 * @sender: Sender name to match on (unique or well-known name) or %NULL to listen from all senders.
17137 * @interface_name: D-Bus interface name to match on or %NULL to match on all interfaces.
17138 * @member: D-Bus signal name to match on or %NULL to match on all signals.
17139 * @object_path: Object path to match on or %NULL to match on all object paths.
17140 * @arg0: Contents of first string argument to match on or %NULL to match on all kinds of arguments.
17141 * @flags: Flags describing how to subscribe to the signal (currently unused).
17142 * @callback: Callback to invoke when there is a signal matching the requested data.
17143 * @user_data: User data to pass to @callback.
17144 * @user_data_free_func: Function to free @user_data with when subscription is removed or %NULL.
17146 * Subscribes to signals on @connection and invokes @callback with a
17147 * whenever the signal is received. Note that @callback
17148 * will be invoked in the <link
17149 * linkend="g-main-context-push-thread-default">thread-default main
17150 * loop</link> of the thread you are calling this method from.
17151 * If @connection is not a message bus connection, @sender must be
17153 * If @sender is a well-known name note that @callback is invoked with
17154 * the unique name for the owner of @sender, not the well-known name
17155 * as one would expect. This is because the message bus rewrites the
17156 * name. As such, to avoid certain race conditions, users should be
17157 * tracking the name owner of the well-known name and use that when
17158 * processing the received signal.
17160 * Returns: A subscription identifier that can be used with g_dbus_connection_signal_unsubscribe().
17166 * g_dbus_connection_signal_unsubscribe:
17167 * @connection: A #GDBusConnection.
17168 * @subscription_id: A subscription id obtained from g_dbus_connection_signal_subscribe().
17170 * Unsubscribes from signals.
17177 * g_dbus_connection_start_message_processing:
17178 * @connection: A #GDBusConnection.
17180 * If @connection was created with
17181 * %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method
17182 * starts processing messages. Does nothing on if @connection wasn't
17183 * created with this flag or if the method has already been called.
17190 * g_dbus_connection_unregister_object:
17191 * @connection: A #GDBusConnection.
17192 * @registration_id: A registration id obtained from g_dbus_connection_register_object().
17194 * Unregisters an object.
17196 * Returns: %TRUE if the object was unregistered, %FALSE otherwise.
17202 * g_dbus_connection_unregister_subtree:
17203 * @connection: A #GDBusConnection.
17204 * @registration_id: A subtree registration id obtained from g_dbus_connection_register_subtree().
17206 * Unregisters a subtree.
17208 * Returns: %TRUE if the subtree was unregistered, %FALSE otherwise.
17214 * g_dbus_error_encode_gerror:
17215 * @error: A #GError.
17217 * Creates a D-Bus error name to use for @error. If @error matches
17218 * a registered error (cf. g_dbus_error_register_error()), the corresponding
17219 * D-Bus error name will be returned.
17220 * Otherwise the a name of the form
17221 * <literal>org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE</literal>
17222 * will be used. This allows other GDBus applications to map the error
17223 * on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
17224 * This function is typically only used in object mappings to put a
17225 * #GError on the wire. Regular applications should not use it.
17227 * Returns: A D-Bus error name (never %NULL). Free with g_free().
17233 * g_dbus_error_get_remote_error:
17234 * @error: A #GError.
17236 * Gets the D-Bus error name used for @error, if any.
17237 * This function is guaranteed to return a D-Bus error name for all
17238 * #GError<!-- -->s returned from functions handling remote method
17239 * calls (e.g. g_dbus_connection_call_finish()) unless
17240 * g_dbus_error_strip_remote_error() has been used on @error.
17242 * Returns: An allocated string or %NULL if the D-Bus error name could not be found. Free with g_free().
17248 * g_dbus_error_is_remote_error:
17249 * @error: A #GError.
17251 * Checks if @error represents an error received via D-Bus from a remote peer. If so,
17252 * use g_dbus_error_get_remote_error() to get the name of the error.
17253 * %FALSE otherwise.
17255 * Returns: %TRUE if @error represents an error from a remote peer,
17261 * g_dbus_error_new_for_dbus_error:
17262 * @dbus_error_name: D-Bus error name.
17263 * @dbus_error_message: D-Bus error message.
17265 * Creates a #GError based on the contents of @dbus_error_name and
17266 * Errors registered with g_dbus_error_register_error() will be looked
17267 * up using @dbus_error_name and if a match is found, the error domain
17268 * and code is used. Applications can use g_dbus_error_get_remote_error()
17269 * to recover @dbus_error_name.
17270 * If a match against a registered error is not found and the D-Bus
17271 * error name is in a form as returned by g_dbus_error_encode_gerror()
17272 * the error domain and code encoded in the name is used to
17273 * create the #GError. Also, @dbus_error_name is added to the error message
17274 * such that it can be recovered with g_dbus_error_get_remote_error().
17275 * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR
17276 * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is
17277 * added to the error message such that it can be recovered with
17278 * g_dbus_error_get_remote_error().
17279 * In all three cases, @dbus_error_name can always be recovered from the
17280 * returned #GError using the g_dbus_error_get_remote_error() function
17281 * (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
17282 * This function is typically only used in object mappings to prepare
17283 * #GError instances for applications. Regular applications should not use
17286 * Returns: An allocated #GError. Free with g_error_free().
17292 * g_dbus_error_register_error:
17293 * @error_domain: A #GQuark for a error domain.
17294 * @error_code: An error code.
17295 * @dbus_error_name: A D-Bus error name.
17297 * Creates an association to map between @dbus_error_name and
17298 * #GError<!-- -->s specified by @error_domain and @error_code.
17299 * This is typically done in the routine that returns the #GQuark for
17303 * Returns: %TRUE if the association was created, %FALSE if it already
17309 * g_dbus_error_register_error_domain:
17310 * @error_domain_quark_name: The error domain name.
17311 * @quark_volatile: A pointer where to store the #GQuark.
17312 * @entries: A pointer to @num_entries #GDBusErrorEntry struct items.
17313 * @num_entries: Number of items to register.
17315 * Helper function for associating a #GError error domain with D-Bus error names.
17322 * g_dbus_error_set_dbus_error:
17323 * @error: A pointer to a #GError or %NULL.
17324 * @dbus_error_name: D-Bus error name.
17325 * @dbus_error_message: D-Bus error message.
17326 * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
17327 * @...: Arguments for @format.
17329 * Does nothing if @error is %NULL. Otherwise sets *@error to
17330 * a new #GError created with g_dbus_error_new_for_dbus_error()
17331 * with @dbus_error_message prepend with @format (unless %NULL).
17338 * g_dbus_error_set_dbus_error_valist:
17339 * @error: A pointer to a #GError or %NULL.
17340 * @dbus_error_name: D-Bus error name.
17341 * @dbus_error_message: D-Bus error message.
17342 * @format: printf()-style format to prepend to @dbus_error_message or %NULL.
17343 * @var_args: Arguments for @format.
17345 * Like g_dbus_error_set_dbus_error() but intended for language bindings.
17352 * g_dbus_error_strip_remote_error:
17353 * @error: A #GError.
17355 * Looks for extra information in the error message used to recover
17356 * the D-Bus error name and strips it if found. If stripped, the
17357 * message field in @error will correspond exactly to what was
17358 * received on the wire.
17359 * This is typically used when presenting errors to the end user.
17361 * Returns: %TRUE if information was stripped, %FALSE otherwise.
17367 * g_dbus_error_unregister_error:
17368 * @error_domain: A #GQuark for a error domain.
17369 * @error_code: An error code.
17370 * @dbus_error_name: A D-Bus error name.
17372 * Destroys an association previously set up with g_dbus_error_register_error().
17374 * Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found.
17380 * g_dbus_generate_guid:
17382 * Generate a D-Bus GUID that can be used with
17383 * e.g. g_dbus_connection_new().
17384 * See the D-Bus specification regarding what strings are valid D-Bus
17385 * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
17387 * Returns: A valid D-Bus GUID. Free with g_free().
17393 * g_dbus_interface_info_cache_build:
17394 * @info: A #GDBusInterfaceInfo.
17396 * Builds a lookup-cache to speed up
17397 * g_dbus_interface_info_lookup_method(),
17398 * g_dbus_interface_info_lookup_signal() and
17399 * g_dbus_interface_info_lookup_property().
17400 * If this has already been called with @info, the existing cache is
17401 * used and its use count is increased.
17402 * Note that @info cannot be modified until
17403 * g_dbus_interface_info_cache_release() is called.
17410 * g_dbus_interface_info_cache_release:
17411 * @info: A GDBusInterfaceInfo
17413 * Decrements the usage count for the cache for @info built by
17414 * g_dbus_interface_info_cache_build() (if any) and frees the
17415 * resources used by the cache if the usage count drops to zero.
17422 * g_dbus_interface_info_generate_xml:
17423 * @info: A #GDBusNodeInfo
17424 * @indent: Indentation level.
17425 * @string_builder: A #GString to to append XML data to.
17427 * Appends an XML representation of @info (and its children) to @string_builder.
17428 * This function is typically used for generating introspection XML
17429 * documents at run-time for handling the
17430 * <literal>org.freedesktop.DBus.Introspectable.Introspect</literal>
17438 * g_dbus_interface_info_lookup_method:
17439 * @info: A #GDBusInterfaceInfo.
17440 * @name: A D-Bus method name (typically in CamelCase)
17442 * Looks up information about a method.
17443 * This cost of this function is O(n) in number of methods unless
17444 * g_dbus_interface_info_cache_build() has been used on @info.
17446 * Returns: A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info.
17452 * g_dbus_interface_info_lookup_property:
17453 * @info: A #GDBusInterfaceInfo.
17454 * @name: A D-Bus property name (typically in CamelCase).
17456 * Looks up information about a property.
17457 * This cost of this function is O(n) in number of properties unless
17458 * g_dbus_interface_info_cache_build() has been used on @info.
17460 * Returns: A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info.
17466 * g_dbus_interface_info_lookup_signal:
17467 * @info: A #GDBusInterfaceInfo.
17468 * @name: A D-Bus signal name (typically in CamelCase)
17470 * Looks up information about a signal.
17471 * This cost of this function is O(n) in number of signals unless
17472 * g_dbus_interface_info_cache_build() has been used on @info.
17474 * Returns: A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info.
17480 * g_dbus_interface_info_ref:
17481 * @info: A #GDBusInterfaceInfo
17483 * If @info is statically allocated does nothing. Otherwise increases
17484 * the reference count.
17486 * Returns: The same @info.
17492 * g_dbus_interface_info_unref:
17493 * @info: A #GDBusInterfaceInfo.
17495 * If @info is statically allocated, does nothing. Otherwise decreases
17496 * the reference count of @info. When its reference count drops to 0,
17497 * the memory used is freed.
17504 * g_dbus_is_address:
17505 * @string: A string.
17507 * Checks if @string is a D-Bus address.
17508 * This doesn't check if @string is actually supported by #GDBusServer
17509 * or #GDBusConnection - use g_dbus_is_supported_address() to do more
17512 * Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise.
17519 * @string: The string to check.
17521 * Checks if @string is a D-Bus GUID.
17522 * See the D-Bus specification regarding what strings are valid D-Bus
17523 * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
17525 * Returns: %TRUE if @string is a guid, %FALSE otherwise.
17531 * g_dbus_is_interface_name:
17532 * @string: The string to check.
17534 * Checks if @string is a valid D-Bus interface name.
17536 * Returns: %TRUE if valid, %FALSE otherwise.
17542 * g_dbus_is_member_name:
17543 * @string: The string to check.
17545 * Checks if @string is a valid D-Bus member (e.g. signal or method) name.
17547 * Returns: %TRUE if valid, %FALSE otherwise.
17554 * @string: The string to check.
17556 * Checks if @string is a valid D-Bus bus name (either unique or well-known).
17558 * Returns: %TRUE if valid, %FALSE otherwise.
17564 * g_dbus_is_supported_address:
17565 * @string: A string.
17566 * @error: Return location for error or %NULL.
17568 * Like g_dbus_is_address() but also checks if the library suppors the
17569 * transports in @string and that key/value pairs for each transport
17571 * supported by this library, %FALSE if @error is set.
17573 * Returns: %TRUE if @string is a valid D-Bus address that is
17579 * g_dbus_is_unique_name:
17580 * @string: The string to check.
17582 * Checks if @string is a valid D-Bus unique bus name.
17584 * Returns: %TRUE if valid, %FALSE otherwise.
17590 * g_dbus_message_bytes_needed:
17591 * @blob: A blob represent a binary D-Bus message.
17592 * @blob_len: The length of @blob (must be at least 16).
17593 * @error: Return location for error or %NULL.
17595 * Utility function to calculate how many bytes are needed to
17596 * completely deserialize the D-Bus message stored at @blob.
17597 * determine the size).
17599 * Returns: Number of bytes needed or -1 if @error is set (e.g. if
17605 * g_dbus_message_copy:
17606 * @message: A #GDBusMessage.
17607 * @error: Return location for error or %NULL.
17609 * Copies @message. The copy is a deep copy and the returned
17610 * #GDBusMessage is completely identical except that it is guaranteed
17611 * to not be locked.
17612 * This operation can fail if e.g. @message contains file descriptors
17613 * and the per-process or system-wide open files limit is reached.
17614 * g_object_unref().
17616 * Returns: (transfer full): A new #GDBusMessage or %NULL if @error is set. Free with
17622 * g_dbus_message_get_arg0:
17623 * @message: A #GDBusMessage.
17625 * Convenience to get the first item in the body of @message.
17627 * Returns: The string item or %NULL if the first item in the body of
17633 * g_dbus_message_get_body:
17634 * @message: A #GDBusMessage.
17636 * Gets the body of a message.
17638 * Returns: A #GVariant or %NULL if the body is empty. Do not free, it is owned by @message.
17644 * g_dbus_message_get_byte_order:
17645 * @message: A #GDBusMessage.
17647 * Gets the byte order of @message.
17649 * Returns: The byte order.
17654 * g_dbus_message_get_destination:
17655 * @message: A #GDBusMessage.
17657 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
17659 * Returns: The value.
17665 * g_dbus_message_get_error_name:
17666 * @message: A #GDBusMessage.
17668 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
17670 * Returns: The value.
17676 * g_dbus_message_get_flags:
17677 * @message: A #GDBusMessage.
17679 * Gets the flags for @message.
17681 * Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
17687 * g_dbus_message_get_header:
17688 * @message: A #GDBusMessage.
17689 * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
17691 * Gets a header field on @message.
17692 * otherwise. Do not free, it is owned by @message.
17694 * Returns: A #GVariant with the value if the header was found, %NULL
17700 * g_dbus_message_get_header_fields:
17701 * @message: A #GDBusMessage.
17703 * Gets an array of all header fields on @message that are set.
17704 * %G_DBUS_MESSAGE_HEADER_FIELD_INVALID. Each element is a
17705 * #guchar. Free with g_free().
17707 * Returns: An array of header fields terminated by
17713 * g_dbus_message_get_interface:
17714 * @message: A #GDBusMessage.
17716 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
17718 * Returns: The value.
17724 * g_dbus_message_get_locked:
17725 * @message: A #GDBusMessage.
17727 * Checks whether @message is locked. To monitor changes to this
17728 * value, conncet to the #GObject::notify signal to listen for changes
17729 * on the #GDBusMessage:locked property.
17731 * Returns: %TRUE if @message is locked, %FALSE otherwise.
17737 * g_dbus_message_get_member:
17738 * @message: A #GDBusMessage.
17740 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
17742 * Returns: The value.
17748 * g_dbus_message_get_message_type:
17749 * @message: A #GDBusMessage.
17751 * Gets the type of @message.
17753 * Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
17759 * g_dbus_message_get_num_unix_fds:
17760 * @message: A #GDBusMessage.
17762 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
17764 * Returns: The value.
17770 * g_dbus_message_get_path:
17771 * @message: A #GDBusMessage.
17773 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
17775 * Returns: The value.
17781 * g_dbus_message_get_reply_serial:
17782 * @message: A #GDBusMessage.
17784 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
17786 * Returns: The value.
17792 * g_dbus_message_get_sender:
17793 * @message: A #GDBusMessage.
17795 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
17797 * Returns: The value.
17803 * g_dbus_message_get_serial:
17804 * @message: A #GDBusMessage.
17806 * Gets the serial for @message.
17808 * Returns: A #guint32.
17814 * g_dbus_message_get_signature:
17815 * @message: A #GDBusMessage.
17817 * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
17819 * Returns: The value.
17825 * g_dbus_message_get_unix_fd_list:
17826 * @message: A #GDBusMessage.
17828 * Gets the UNIX file descriptors associated with @message, if any.
17829 * This method is only available on UNIX.
17830 * associated. Do not free, this object is owned by @message.
17832 * Returns: (transfer none): A #GUnixFDList or %NULL if no file descriptors are
17838 * g_dbus_message_lock:
17839 * @message: A #GDBusMessage.
17841 * If @message is locked, does nothing. Otherwise locks the message.
17848 * g_dbus_message_new:
17850 * Creates a new empty #GDBusMessage.
17852 * Returns: A #GDBusMessage. Free with g_object_unref().
17858 * g_dbus_message_new_from_blob:
17859 * @blob: A blob represent a binary D-Bus message.
17860 * @blob_len: The length of @blob.
17861 * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
17862 * @error: Return location for error or %NULL.
17864 * Creates a new #GDBusMessage from the data stored at @blob. The byte
17865 * order that the message was in can be retrieved using
17866 * g_dbus_message_get_byte_order().
17867 * g_object_unref().
17869 * Returns: A new #GDBusMessage or %NULL if @error is set. Free with
17875 * g_dbus_message_new_method_call:
17876 * @name: A valid D-Bus name or %NULL.
17877 * @path: A valid object path.
17878 * @interface_: A valid D-Bus interface name or %NULL.
17879 * @method: A valid method name.
17881 * Creates a new #GDBusMessage for a method call.
17883 * Returns: A #GDBusMessage. Free with g_object_unref().
17889 * g_dbus_message_new_method_error:
17890 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17891 * @error_name: A valid D-Bus error name.
17892 * @error_message_format: The D-Bus error message in a printf() format.
17893 * @...: Arguments for @error_message_format.
17895 * Creates a new #GDBusMessage that is an error reply to @method_call_message.
17897 * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
17903 * g_dbus_message_new_method_error_literal:
17904 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17905 * @error_name: A valid D-Bus error name.
17906 * @error_message: The D-Bus error message.
17908 * Creates a new #GDBusMessage that is an error reply to @method_call_message.
17910 * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
17916 * g_dbus_message_new_method_error_valist:
17917 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17918 * @error_name: A valid D-Bus error name.
17919 * @error_message_format: The D-Bus error message in a printf() format.
17920 * @var_args: Arguments for @error_message_format.
17922 * Like g_dbus_message_new_method_error() but intended for language bindings.
17924 * Returns: (transfer full): A #GDBusMessage. Free with g_object_unref().
17930 * g_dbus_message_new_method_reply:
17931 * @method_call_message: A message of type %G_DBUS_MESSAGE_TYPE_METHOD_CALL to create a reply message to.
17933 * Creates a new #GDBusMessage that is a reply to @method_call_message.
17935 * Returns: (transfer full): #GDBusMessage. Free with g_object_unref().
17941 * g_dbus_message_new_signal:
17942 * @path: A valid object path.
17943 * @interface_: A valid D-Bus interface name.
17944 * @signal: A valid signal name.
17946 * Creates a new #GDBusMessage for a signal emission.
17948 * Returns: A #GDBusMessage. Free with g_object_unref().
17954 * g_dbus_message_print:
17955 * @message: A #GDBusMessage.
17956 * @indent: Indentation level.
17958 * Produces a human-readable multi-line description of @message.
17959 * The contents of the description has no ABI guarantees, the contents
17960 * and formatting is subject to change at any time. Typical output
17961 * looks something like this:
17964 * path -> objectpath '/org/gtk/GDBus/TestObject'
17965 * interface -> 'org.gtk.GDBus.TestInterface'
17966 * member -> 'GimmeStdout'
17967 * destination -> ':1.146'
17968 * UNIX File Descriptors:
17970 * </programlisting>
17974 * reply-serial -> uint32 4
17975 * destination -> ':1.159'
17976 * sender -> ':1.146'
17977 * num-unix-fds -> uint32 1
17978 * UNIX File Descriptors:
17979 * </programlisting>
17981 * Type: method-return
17982 * Flags: no-reply-expected
17986 * Fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
17987 * Returns: A string that should be freed with g_free().
17993 * g_dbus_message_set_body:
17994 * @message: A #GDBusMessage.
17995 * @body: Either %NULL or a #GVariant that is a tuple.
17997 * Sets the body @message. As a side-effect the
17998 * %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the
17999 * type string of @body (or cleared if @body is %NULL).
18000 * If @body is floating, @message assumes ownership of @body.
18007 * g_dbus_message_set_byte_order:
18008 * @message: A #GDBusMessage.
18009 * @byte_order: The byte order.
18011 * Sets the byte order of @message.
18016 * g_dbus_message_set_destination:
18017 * @message: A #GDBusMessage.
18018 * @value: The value to set.
18020 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
18027 * g_dbus_message_set_error_name:
18028 * @message: A #GDBusMessage.
18029 * @value: The value to set.
18031 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
18038 * g_dbus_message_set_flags:
18039 * @message: A #GDBusMessage.
18040 * @flags: Flags for @message that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together).
18042 * Sets the flags to set on @message.
18049 * g_dbus_message_set_header:
18050 * @message: A #GDBusMessage.
18051 * @header_field: A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration)
18052 * @value: A #GVariant to set the header field or %NULL to clear the header field.
18054 * Sets a header field on @message.
18055 * If @value is floating, @message assumes ownership of @value.
18062 * g_dbus_message_set_interface:
18063 * @message: A #GDBusMessage.
18064 * @value: The value to set.
18066 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
18073 * g_dbus_message_set_member:
18074 * @message: A #GDBusMessage.
18075 * @value: The value to set.
18077 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
18084 * g_dbus_message_set_message_type:
18085 * @message: A #GDBusMessage.
18086 * @type: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration).
18088 * Sets @message to be of @type.
18095 * g_dbus_message_set_num_unix_fds:
18096 * @message: A #GDBusMessage.
18097 * @value: The value to set.
18099 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
18106 * g_dbus_message_set_path:
18107 * @message: A #GDBusMessage.
18108 * @value: The value to set.
18110 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
18117 * g_dbus_message_set_reply_serial:
18118 * @message: A #GDBusMessage.
18119 * @value: The value to set.
18121 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
18128 * g_dbus_message_set_sender:
18129 * @message: A #GDBusMessage.
18130 * @value: The value to set.
18132 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
18139 * g_dbus_message_set_serial:
18140 * @message: A #GDBusMessage.
18141 * @serial: A #guint32.
18143 * Sets the serial for @message.
18150 * g_dbus_message_set_signature:
18151 * @message: A #GDBusMessage.
18152 * @value: The value to set.
18154 * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
18161 * g_dbus_message_set_unix_fd_list:
18162 * @message: A #GDBusMessage.
18163 * @fd_list: (allow-none): A #GUnixFDList or %NULL.
18165 * Sets the UNIX file descriptors associated with @message. As a
18166 * side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header
18167 * field is set to the number of fds in @fd_list (or cleared if
18168 * This method is only available on UNIX.
18175 * g_dbus_message_to_blob:
18176 * @message: A #GDBusMessage.
18177 * @out_size: Return location for size of generated blob.
18178 * @capabilities: A #GDBusCapabilityFlags describing what protocol features are supported.
18179 * @error: Return location for error.
18181 * Serializes @message to a blob. The byte order returned by
18182 * g_dbus_message_get_byte_order() will be used.
18183 * generated by @message or %NULL if @error is set. Free with g_free().
18185 * Returns: A pointer to a valid binary D-Bus message of @out_size bytes
18191 * g_dbus_message_to_gerror:
18192 * @message: A #GDBusMessage.
18193 * @error: The #GError to set.
18195 * If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does
18196 * nothing and returns %FALSE.
18197 * Otherwise this method encodes the error in @message as a #GError
18198 * using g_dbus_error_set_dbus_error() using the information in the
18199 * %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as
18200 * well as the first string item in @message's body.
18202 * Returns: %TRUE if @error was set, %FALSE otherwise.
18208 * g_dbus_method_info_ref:
18209 * @info: A #GDBusMethodInfo
18211 * If @info is statically allocated does nothing. Otherwise increases
18212 * the reference count.
18214 * Returns: The same @info.
18220 * g_dbus_method_info_unref:
18221 * @info: A #GDBusMethodInfo.
18223 * If @info is statically allocated, does nothing. Otherwise decreases
18224 * the reference count of @info. When its reference count drops to 0,
18225 * the memory used is freed.
18232 * g_dbus_method_invocation_get_connection:
18233 * @invocation: A #GDBusMethodInvocation.
18235 * Gets the #GDBusConnection the method was invoked on.
18237 * Returns: (transfer none): A #GDBusConnection. Do not free, it is owned by @invocation.
18243 * g_dbus_method_invocation_get_interface_name:
18244 * @invocation: A #GDBusMethodInvocation.
18246 * Gets the name of the D-Bus interface the method was invoked on.
18248 * Returns: A string. Do not free, it is owned by @invocation.
18254 * g_dbus_method_invocation_get_message:
18255 * @invocation: A #GDBusMethodInvocation.
18257 * Gets the #GDBusMessage for the method invocation. This is useful if
18258 * you need to use low-level protocol features, such as UNIX file
18259 * descriptor passing, that cannot be properly expressed in the
18261 * See <xref linkend="gdbus-server"/> and <xref
18262 * linkend="gdbus-unix-fd-client"/> for an example of how to use this
18263 * low-level API to send and receive UNIX file descriptors.
18265 * Returns: (transfer none): #GDBusMessage. Do not free, it is owned by @invocation.
18271 * g_dbus_method_invocation_get_method_info:
18272 * @invocation: A #GDBusMethodInvocation.
18274 * Gets information about the method call, if any.
18276 * Returns: A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation.
18282 * g_dbus_method_invocation_get_method_name:
18283 * @invocation: A #GDBusMethodInvocation.
18285 * Gets the name of the method that was invoked.
18287 * Returns: A string. Do not free, it is owned by @invocation.
18293 * g_dbus_method_invocation_get_object_path:
18294 * @invocation: A #GDBusMethodInvocation.
18296 * Gets the object path the method was invoked on.
18298 * Returns: A string. Do not free, it is owned by @invocation.
18304 * g_dbus_method_invocation_get_parameters:
18305 * @invocation: A #GDBusMethodInvocation.
18307 * Gets the parameters of the method invocation.
18309 * Returns: A #GVariant. Do not free, it is owned by @invocation.
18315 * g_dbus_method_invocation_get_sender:
18316 * @invocation: A #GDBusMethodInvocation.
18318 * Gets the bus name that invoked the method.
18320 * Returns: A string. Do not free, it is owned by @invocation.
18326 * g_dbus_method_invocation_get_user_data: (skip)
18327 * @invocation: A #GDBusMethodInvocation.
18329 * Gets the @user_data #gpointer passed to g_dbus_connection_register_object().
18331 * Returns: A #gpointer.
18337 * g_dbus_method_invocation_return_dbus_error:
18338 * @invocation: A #GDBusMethodInvocation.
18339 * @error_name: A valid D-Bus error name.
18340 * @error_message: A valid D-Bus error message.
18342 * Finishes handling a D-Bus method call by returning an error.
18343 * This method will free @invocation, you cannot use it afterwards.
18350 * g_dbus_method_invocation_return_error:
18351 * @invocation: A #GDBusMethodInvocation.
18352 * @domain: A #GQuark for the #GError error domain.
18353 * @code: The error code.
18354 * @format: printf()-style format.
18355 * @...: Parameters for @format.
18357 * Finishes handling a D-Bus method call by returning an error.
18358 * See g_dbus_error_encode_gerror() for details about what error name
18359 * will be returned on the wire. In a nutshell, if the given error is
18360 * registered using g_dbus_error_register_error() the name given
18361 * during registration is used. Otherwise, a name of the form
18362 * <literal>org.gtk.GDBus.UnmappedGError.Quark...</literal> is
18363 * used. This provides transparent mapping of #GError between
18364 * applications using GDBus.
18365 * If you are writing an application intended to be portable,
18366 * <emphasis>always</emphasis> register errors with g_dbus_error_register_error()
18367 * or use g_dbus_method_invocation_return_dbus_error().
18368 * This method will free @invocation, you cannot use it afterwards.
18375 * g_dbus_method_invocation_return_error_literal:
18376 * @invocation: A #GDBusMethodInvocation.
18377 * @domain: A #GQuark for the #GError error domain.
18378 * @code: The error code.
18379 * @message: The error message.
18381 * Like g_dbus_method_invocation_return_error() but without printf()-style formatting.
18382 * This method will free @invocation, you cannot use it afterwards.
18389 * g_dbus_method_invocation_return_error_valist:
18390 * @invocation: A #GDBusMethodInvocation.
18391 * @domain: A #GQuark for the #GError error domain.
18392 * @code: The error code.
18393 * @format: printf()-style format.
18394 * @var_args: #va_list of parameters for @format.
18396 * Like g_dbus_method_invocation_return_error() but intended for
18397 * language bindings.
18398 * This method will free @invocation, you cannot use it afterwards.
18405 * g_dbus_method_invocation_return_gerror:
18406 * @invocation: A #GDBusMethodInvocation.
18407 * @error: A #GError.
18409 * Like g_dbus_method_invocation_return_error() but takes a #GError
18410 * instead of the error domain, error code and message.
18411 * This method will free @invocation, you cannot use it afterwards.
18418 * g_dbus_method_invocation_return_value:
18419 * @invocation: A #GDBusMethodInvocation.
18420 * @parameters: A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters.
18422 * Finishes handling a D-Bus method call by returning @parameters.
18423 * If the @parameters GVariant is floating, it is consumed.
18424 * It is an error if @parameters is not of the right format.
18425 * This method will free @invocation, you cannot use it afterwards.
18432 * g_dbus_node_info_generate_xml:
18433 * @info: A #GDBusNodeInfo.
18434 * @indent: Indentation level.
18435 * @string_builder: A #GString to to append XML data to.
18437 * Appends an XML representation of @info (and its children) to @string_builder.
18438 * This function is typically used for generating introspection XML documents at run-time for
18439 * handling the <literal>org.freedesktop.DBus.Introspectable.Introspect</literal> method.
18446 * g_dbus_node_info_lookup_interface:
18447 * @info: A #GDBusNodeInfo.
18448 * @name: A D-Bus interface name.
18450 * Looks up information about an interface.
18451 * This cost of this function is O(n) in number of interfaces.
18453 * Returns: A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info.
18459 * g_dbus_node_info_new_for_xml:
18460 * @xml_data: Valid D-Bus introspection XML.
18461 * @error: Return location for error.
18463 * Parses @xml_data and returns a #GDBusNodeInfo representing the data.
18464 * with g_dbus_node_info_unref().
18466 * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free
18472 * g_dbus_node_info_ref:
18473 * @info: A #GDBusNodeInfo
18475 * If @info is statically allocated does nothing. Otherwise increases
18476 * the reference count.
18478 * Returns: The same @info.
18484 * g_dbus_node_info_unref:
18485 * @info: A #GDBusNodeInfo.
18487 * If @info is statically allocated, does nothing. Otherwise decreases
18488 * the reference count of @info. When its reference count drops to 0,
18489 * the memory used is freed.
18496 * g_dbus_property_info_ref:
18497 * @info: A #GDBusPropertyInfo
18499 * If @info is statically allocated does nothing. Otherwise increases
18500 * the reference count.
18502 * Returns: The same @info.
18508 * g_dbus_property_info_unref:
18509 * @info: A #GDBusPropertyInfo.
18511 * If @info is statically allocated, does nothing. Otherwise decreases
18512 * the reference count of @info. When its reference count drops to 0,
18513 * the memory used is freed.
18520 * g_dbus_proxy_call:
18521 * @proxy: A #GDBusProxy.
18522 * @method_name: Name of method to invoke.
18523 * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
18524 * @flags: Flags from the #GDBusCallFlags enumeration.
18525 * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
18526 * @cancellable: A #GCancellable or %NULL.
18527 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
18528 * @user_data: The data to pass to @callback.
18530 * Asynchronously invokes the @method_name method on @proxy.
18531 * If @method_name contains any dots, then @name is split into interface and
18532 * method name parts. This allows using @proxy for invoking methods on
18533 * other interfaces.
18534 * If the #GDBusConnection associated with @proxy is closed then
18535 * the operation will fail with %G_IO_ERROR_CLOSED. If
18536 * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
18537 * compatible with the D-Bus protocol, the operation fails with
18538 * %G_IO_ERROR_INVALID_ARGUMENT.
18539 * If the @parameters #GVariant is floating, it is consumed. This allows
18540 * convenient 'inline' use of g_variant_new(), e.g.:
18542 * g_dbus_proxy_call (proxy,
18544 * g_variant_new ("(ss)",
18547 * G_DBUS_CALL_FLAGS_NONE,
18550 * (GAsyncReadyCallback) two_strings_done,
18553 * This is an asynchronous method. When the operation is finished,
18554 * <link linkend="g-main-context-push-thread-default">thread-default
18555 * main loop</link> of the thread you are calling this method from.
18556 * You can then call g_dbus_proxy_call_finish() to get the result of
18557 * the operation. See g_dbus_proxy_call_sync() for the synchronous
18558 * version of this method.
18565 * g_dbus_proxy_call_finish:
18566 * @proxy: A #GDBusProxy.
18567 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call().
18568 * @error: Return location for error or %NULL.
18570 * Finishes an operation started with g_dbus_proxy_call().
18571 * return values. Free with g_variant_unref().
18573 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
18579 * g_dbus_proxy_call_sync:
18580 * @proxy: A #GDBusProxy.
18581 * @method_name: Name of method to invoke.
18582 * @parameters: (allow-none): A #GVariant tuple with parameters for the signal or %NULL if not passing parameters.
18583 * @flags: Flags from the #GDBusCallFlags enumeration.
18584 * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning "infinite") or -1 to use the proxy default timeout.
18585 * @cancellable: A #GCancellable or %NULL.
18586 * @error: Return location for error or %NULL.
18588 * Synchronously invokes the @method_name method on @proxy.
18589 * If @method_name contains any dots, then @name is split into interface and
18590 * method name parts. This allows using @proxy for invoking methods on
18591 * other interfaces.
18592 * If the #GDBusConnection associated with @proxy is disconnected then
18593 * the operation will fail with %G_IO_ERROR_CLOSED. If
18594 * %G_IO_ERROR_CANCELLED. If @parameters contains a value not
18595 * compatible with the D-Bus protocol, the operation fails with
18596 * %G_IO_ERROR_INVALID_ARGUMENT.
18597 * If the @parameters #GVariant is floating, it is consumed. This allows
18598 * convenient 'inline' use of g_variant_new(), e.g.:
18600 * g_dbus_proxy_call_sync (proxy,
18602 * g_variant_new ("(ss)",
18605 * G_DBUS_CALL_FLAGS_NONE,
18610 * The calling thread is blocked until a reply is received. See
18611 * g_dbus_proxy_call() for the asynchronous version of this
18613 * return values. Free with g_variant_unref().
18615 * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with
18621 * g_dbus_proxy_get_cached_property:
18622 * @proxy: A #GDBusProxy.
18623 * @property_name: Property name.
18625 * Looks up the value for a property from the cache. This call does no
18627 * If @proxy has an expected interface (see
18628 * #GDBusProxy:g-interface-info), then @property_name (for existence)
18629 * is checked against it.
18630 * for @property_name or %NULL if the value is not in the cache. The
18631 * returned reference must be freed with g_variant_unref().
18633 * Returns: A reference to the #GVariant instance that holds the value
18639 * g_dbus_proxy_get_cached_property_names:
18640 * @proxy: A #GDBusProxy.
18642 * Gets the names of all cached properties on @proxy.
18643 * no cached properties. Free the returned array with g_strfreev().
18645 * Returns: A %NULL-terminated array of strings or %NULL if @proxy has
18651 * g_dbus_proxy_get_connection:
18652 * @proxy: A #GDBusProxy.
18654 * Gets the connection @proxy is for.
18656 * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free.
18662 * g_dbus_proxy_get_default_timeout:
18663 * @proxy: A #GDBusProxy.
18665 * Gets the timeout to use if -1 (specifying default timeout) is
18666 * passed as @timeout_msec in the g_dbus_proxy_call() and
18667 * g_dbus_proxy_call_sync() functions.
18668 * See the #GDBusProxy:g-default-timeout property for more details.
18670 * Returns: Timeout to use for @proxy.
18676 * g_dbus_proxy_get_flags:
18677 * @proxy: A #GDBusProxy.
18679 * Gets the flags that @proxy was constructed with.
18681 * Returns: Flags from the #GDBusProxyFlags enumeration.
18687 * g_dbus_proxy_get_interface_info:
18688 * @proxy: A #GDBusProxy
18690 * Returns the #GDBusInterfaceInfo, if any, specifying the minimal
18691 * interface that @proxy conforms to.
18692 * See the #GDBusProxy:g-interface-info property for more details.
18693 * object, it is owned by @proxy.
18695 * Returns: A #GDBusInterfaceInfo or %NULL. Do not unref the returned
18701 * g_dbus_proxy_get_interface_name:
18702 * @proxy: A #GDBusProxy.
18704 * Gets the D-Bus interface name @proxy is for.
18706 * Returns: A string owned by @proxy. Do not free.
18712 * g_dbus_proxy_get_name:
18713 * @proxy: A #GDBusProxy.
18715 * Gets the name that @proxy was constructed for.
18717 * Returns: A string owned by @proxy. Do not free.
18723 * g_dbus_proxy_get_name_owner:
18724 * @proxy: A #GDBusProxy.
18726 * The unique name that owns the name that @proxy is for or %NULL if
18727 * no-one currently owns that name. You may connect to the
18728 * #GObject::notify signal to track changes to the
18729 * #GDBusProxy:g-name-owner property.
18731 * Returns: The name owner or %NULL if no name owner exists. Free with g_free().
18737 * g_dbus_proxy_get_object_path:
18738 * @proxy: A #GDBusProxy.
18740 * Gets the object path @proxy is for.
18742 * Returns: A string owned by @proxy. Do not free.
18748 * g_dbus_proxy_new:
18749 * @connection: A #GDBusConnection.
18750 * @flags: Flags used when constructing the proxy.
18751 * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18752 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
18753 * @object_path: An object path.
18754 * @interface_name: A D-Bus interface name.
18755 * @cancellable: A #GCancellable or %NULL.
18756 * @callback: Callback function to invoke when the proxy is ready.
18757 * @user_data: User data to pass to @callback.
18759 * Creates a proxy for accessing @interface_name on the remote object
18760 * at @object_path owned by @name at @connection and asynchronously
18761 * loads D-Bus properties unless the
18762 * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to
18763 * the #GDBusProxy::g-properties-changed signal to get notified about
18764 * property changes.
18765 * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
18766 * match rules for signals. Connect to the #GDBusProxy::g-signal signal
18767 * to handle signals from the remote object.
18768 * If @name is a well-known name and the
18769 * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
18770 * owner currently exists, the message bus will be requested to launch
18771 * a name owner for the name.
18772 * This is a failable asynchronous constructor - when the proxy is
18773 * ready, @callback will be invoked and you can use
18774 * g_dbus_proxy_new_finish() to get the result.
18775 * See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.
18776 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18783 * g_dbus_proxy_new_finish:
18784 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new().
18785 * @error: Return location for error or %NULL.
18787 * Finishes creating a #GDBusProxy.
18789 * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
18795 * g_dbus_proxy_new_for_bus:
18796 * @bus_type: A #GBusType.
18797 * @flags: Flags used when constructing the proxy.
18798 * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18799 * @name: A bus name (well-known or unique).
18800 * @object_path: An object path.
18801 * @interface_name: A D-Bus interface name.
18802 * @cancellable: A #GCancellable or %NULL.
18803 * @callback: Callback function to invoke when the proxy is ready.
18804 * @user_data: User data to pass to @callback.
18806 * Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
18807 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18814 * g_dbus_proxy_new_for_bus_finish:
18815 * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus().
18816 * @error: Return location for error or %NULL.
18818 * Finishes creating a #GDBusProxy.
18820 * Returns: A #GDBusProxy or %NULL if @error is set. Free with g_object_unref().
18826 * g_dbus_proxy_new_for_bus_sync:
18827 * @bus_type: A #GBusType.
18828 * @flags: Flags used when constructing the proxy.
18829 * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18830 * @name: A bus name (well-known or unique).
18831 * @object_path: An object path.
18832 * @interface_name: A D-Bus interface name.
18833 * @cancellable: A #GCancellable or %NULL.
18834 * @error: Return location for error or %NULL.
18836 * Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
18837 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18839 * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
18845 * g_dbus_proxy_new_sync:
18846 * @connection: A #GDBusConnection.
18847 * @flags: Flags used when constructing the proxy.
18848 * @info: (allow-none): A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL.
18849 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
18850 * @object_path: An object path.
18851 * @interface_name: A D-Bus interface name.
18852 * @cancellable: (allow-none): A #GCancellable or %NULL.
18853 * @error: (allow-none): Return location for error or %NULL.
18855 * Creates a proxy for accessing @interface_name on the remote object
18856 * at @object_path owned by @name at @connection and synchronously
18857 * loads D-Bus properties unless the
18858 * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.
18859 * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up
18860 * match rules for signals. Connect to the #GDBusProxy::g-signal signal
18861 * to handle signals from the remote object.
18862 * If @name is a well-known name and the
18863 * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name
18864 * owner currently exists, the message bus will be requested to launch
18865 * a name owner for the name.
18866 * This is a synchronous failable constructor. See g_dbus_proxy_new()
18867 * and g_dbus_proxy_new_finish() for the asynchronous version.
18868 * See <xref linkend="gdbus-wellknown-proxy"/> for an example of how #GDBusProxy can be used.
18870 * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref().
18876 * g_dbus_proxy_set_cached_property:
18877 * @proxy: A #GDBusProxy
18878 * @property_name: Property name.
18879 * @value: (allow-none): Value for the property or %NULL to remove it from the cache.
18881 * If @value is not %NULL, sets the cached value for the property with
18882 * name @property_name to the value in @value.
18883 * If @value is %NULL, then the cached value is removed from the
18885 * If @proxy has an expected interface (see
18886 * #GDBusProxy:g-interface-info), then @property_name (for existence)
18887 * and @value (for the type) is checked against it.
18888 * If the @value #GVariant is floating, it is consumed. This allows
18889 * convenient 'inline' use of g_variant_new(), e.g.
18891 * g_dbus_proxy_set_cached_property (proxy,
18893 * g_variant_new ("(si)",
18897 * Normally you will not need to use this method since @proxy is
18898 * tracking changes using the
18899 * <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal>
18900 * D-Bus signal. However, for performance reasons an object may decide
18901 * to not use this signal for some properties and instead use a
18902 * proprietary out-of-band mechanism to transmit changes.
18903 * As a concrete example, consider an object with a property
18904 * <literal>ChatroomParticipants</literal> which is an array of
18905 * strings. Instead of transmitting the same (long) array every time
18906 * the property changes, it is more efficient to only transmit the
18907 * delta using e.g. signals <literal>ChatroomParticipantJoined(String
18908 * name)</literal> and <literal>ChatroomParticipantParted(String
18916 * g_dbus_proxy_set_default_timeout:
18917 * @proxy: A #GDBusProxy.
18918 * @timeout_msec: Timeout in milliseconds.
18920 * Sets the timeout to use if -1 (specifying default timeout) is
18921 * passed as @timeout_msec in the g_dbus_proxy_call() and
18922 * g_dbus_proxy_call_sync() functions.
18923 * See the #GDBusProxy:g-default-timeout property for more details.
18930 * g_dbus_proxy_set_interface_info:
18931 * @proxy: A #GDBusProxy
18932 * @info: (allow-none): Minimum interface this proxy conforms to or %NULL to unset.
18934 * Ensure that interactions with @proxy conform to the given
18935 * interface. For example, when completing a method call, if the type
18936 * signature of the message isn't what's expected, the given #GError
18937 * is set. Signals that have a type signature mismatch are simply
18939 * See the #GDBusProxy:g-interface-info property for more details.
18946 * g_dbus_server_get_client_address:
18947 * @server: A #GDBusServer.
18949 * Gets a D-Bus address string that can be used by clients to connect
18953 * Returns: A D-Bus address string. Do not free, the string is owned
18959 * g_dbus_server_get_flags:
18960 * @server: A #GDBusServer.
18962 * Gets the flags for @server.
18964 * Returns: A set of flags from the #GDBusServerFlags enumeration.
18970 * g_dbus_server_get_guid:
18971 * @server: A #GDBusServer.
18973 * Gets the GUID for @server.
18975 * Returns: A D-Bus GUID. Do not free this string, it is owned by @server.
18981 * g_dbus_server_is_active:
18982 * @server: A #GDBusServer.
18984 * Gets whether @server is active.
18986 * Returns: %TRUE if server is active, %FALSE otherwise.
18992 * g_dbus_server_new_sync:
18993 * @address: A D-Bus address.
18994 * @flags: Flags from the #GDBusServerFlags enumeration.
18995 * @guid: A D-Bus GUID.
18996 * @observer: A #GDBusAuthObserver or %NULL.
18997 * @cancellable: A #GCancellable or %NULL.
18998 * @error: Return location for server or %NULL.
19000 * Creates a new D-Bus server that listens on the first address in
19001 * Once constructed, you can use g_dbus_server_get_client_address() to
19002 * get a D-Bus address string that clients can use to connect.
19003 * Connect to the #GDBusServer::new-connection signal to handle
19004 * incoming connections.
19005 * The returned #GDBusServer isn't active - you have to start it with
19006 * g_dbus_server_start().
19007 * See <xref linkend="gdbus-peer-to-peer"/> for how #GDBusServer can
19009 * This is a synchronous failable constructor. See
19010 * g_dbus_server_new() for the asynchronous version.
19011 * g_object_unref().
19013 * Returns: A #GDBusServer or %NULL if @error is set. Free with
19019 * g_dbus_server_start:
19020 * @server: A #GDBusServer.
19029 * g_dbus_server_stop:
19030 * @server: A #GDBusServer.
19039 * g_dbus_signal_info_ref:
19040 * @info: A #GDBusSignalInfo
19042 * If @info is statically allocated does nothing. Otherwise increases
19043 * the reference count.
19045 * Returns: The same @info.
19051 * g_dbus_signal_info_unref:
19052 * @info: A #GDBusSignalInfo.
19054 * If @info is statically allocated, does nothing. Otherwise decreases
19055 * the reference count of @info. When its reference count drops to 0,
19056 * the memory used is freed.
19063 * g_desktop_app_info_get_filename:
19064 * @info: a #GDesktopAppInfo
19066 * When @info was created from a known filename, return it. In some
19067 * situations such as the #GDesktopAppInfo returned from
19068 * g_desktop_app_info_new_from_keyfile(), this function will return %NULL.
19070 * Returns: The full path to the file for @info, or %NULL if not known.
19076 * g_desktop_app_info_get_is_hidden:
19077 * @info: a #GDesktopAppInfo.
19079 * A desktop file is hidden if the Hidden key in it is
19082 * Returns: %TRUE if hidden, %FALSE otherwise.
19087 * g_desktop_app_info_launch_uris_as_manager:
19088 * @appinfo: a #GDesktopAppInfo
19089 * @uris: (element-type utf8): List of URIs
19090 * @launch_context: a #GAppLaunchContext
19091 * @spawn_flags: #GSpawnFlags, used for each process
19092 * @user_setup: (scope call): a #GSpawnChildSetupFunc, used once for each process.
19093 * @user_setup_data: (closure user_setup): User data for @user_setup
19094 * @pid_callback: (scope call): Callback for child processes
19095 * @pid_callback_data: (closure pid_callback): User data for @callback
19096 * @error: a #GError
19098 * This function performs the equivalent of g_app_info_launch_uris(),
19099 * but is intended primarily for operating system components that
19100 * launch applications. Ordinary applications should use
19101 * g_app_info_launch_uris().
19102 * In contrast to g_app_info_launch_uris(), all processes created will
19103 * always be run directly as children as if by the UNIX fork()/exec()
19105 * This guarantee allows additional control over the exact environment
19106 * of the child processes, which is provided via a setup function
19107 * semantics of the @setup function.
19112 * g_desktop_app_info_lookup_get_default_for_uri_scheme:
19113 * @lookup: a #GDesktopAppInfoLookup
19114 * @uri_scheme: a string containing a URI scheme.
19116 * Gets the default application for launching applications
19117 * using this URI scheme for a particular GDesktopAppInfoLookup
19119 * The GDesktopAppInfoLookup interface and this function is used
19120 * to implement g_app_info_get_default_for_uri_scheme() backends
19121 * in a GIO module. There is no reason for applications to use it
19122 * directly. Applications should use g_app_info_get_default_for_uri_scheme().
19124 * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error.
19125 * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
19130 * g_desktop_app_info_new:
19131 * @desktop_id: the desktop file id
19133 * Creates a new #GDesktopAppInfo based on a desktop file id.
19134 * A desktop file id is the basename of the desktop file, including the
19135 * .desktop extension. GIO is looking for a desktop file with this name
19136 * in the <filename>applications</filename> subdirectories of the XDG data
19137 * directories (i.e. the directories specified in the
19138 * <envar>XDG_DATA_HOME</envar> and <envar>XDG_DATA_DIRS</envar> environment
19139 * variables). GIO also supports the prefix-to-subdirectory mapping that is
19140 * described in the <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Menu Spec</ulink>
19141 * (i.e. a desktop id of kde-foo.desktop will match
19142 * <filename>/usr/share/applications/kde/foo.desktop</filename>).
19144 * Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id
19149 * g_desktop_app_info_new_from_filename:
19150 * @filename: the path of a desktop file, in the GLib filename encoding
19152 * Creates a new #GDesktopAppInfo.
19154 * Returns: a new #GDesktopAppInfo or %NULL on error.
19159 * g_desktop_app_info_new_from_keyfile:
19160 * @key_file: an opened #GKeyFile
19162 * Creates a new #GDesktopAppInfo.
19164 * Returns: a new #GDesktopAppInfo or %NULL on error.
19170 * g_desktop_app_info_set_desktop_env:
19171 * @desktop_env: a string specifying what desktop this is
19173 * Sets the name of the desktop that the application is running in.
19174 * This is used by g_app_info_should_show() to evaluate the
19175 * <literal>OnlyShowIn</literal> and <literal>NotShowIn</literal>
19176 * desktop entry fields.
19177 * The <ulink url="http://standards.freedesktop.org/menu-spec/latest/">Desktop
19178 * Menu specification</ulink> recognizes the following:
19180 * <member>GNOME</member>
19181 * <member>KDE</member>
19182 * <member>ROX</member>
19183 * <member>XFCE</member>
19184 * <member>Old</member>
19186 * Should be called only once; subsequent calls are ignored.
19191 * g_drive_can_eject:
19192 * @drive: a #GDrive.
19194 * Checks if a drive can be ejected.
19196 * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise.
19201 * g_drive_can_poll_for_media:
19202 * @drive: a #GDrive.
19204 * Checks if a drive can be polled for media changes.
19205 * %FALSE otherwise.
19207 * Returns: %TRUE if the @drive can be polled for media changes,
19212 * g_drive_can_start:
19213 * @drive: a #GDrive.
19215 * Checks if a drive can be started.
19217 * Returns: %TRUE if the @drive can be started, %FALSE otherwise.
19223 * g_drive_can_start_degraded:
19224 * @drive: a #GDrive.
19226 * Checks if a drive can be started degraded.
19228 * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise.
19234 * g_drive_can_stop:
19235 * @drive: a #GDrive.
19237 * Checks if a drive can be stopped.
19239 * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise.
19246 * @drive: a #GDrive.
19247 * @flags: flags affecting the unmount if required for eject
19248 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19249 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
19250 * @user_data: user data to pass to @callback
19252 * Asynchronously ejects a drive.
19253 * When the operation is finished, @callback will be called.
19254 * You can then call g_drive_eject_finish() to obtain the
19255 * result of the operation.
19257 * Deprecated: 2.22: Use g_drive_eject_with_operation() instead.
19262 * g_drive_eject_finish:
19263 * @drive: a #GDrive.
19264 * @result: a #GAsyncResult.
19265 * @error: a #GError, or %NULL
19267 * Finishes ejecting a drive.
19268 * %FALSE otherwise.
19270 * Returns: %TRUE if the drive has been ejected successfully,
19271 * Deprecated: 2.22: Use g_drive_eject_with_operation_finish() instead.
19276 * g_drive_eject_with_operation:
19277 * @drive: a #GDrive.
19278 * @flags: flags affecting the unmount if required for eject
19279 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
19280 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19281 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
19282 * @user_data: user data passed to @callback.
19284 * Ejects a drive. This is an asynchronous operation, and is
19285 * finished by calling g_drive_eject_with_operation_finish() with the @drive
19286 * and #GAsyncResult data returned in the @callback.
19293 * g_drive_eject_with_operation_finish:
19294 * @drive: a #GDrive.
19295 * @result: a #GAsyncResult.
19296 * @error: a #GError location to store the error occuring, or %NULL to ignore.
19298 * Finishes ejecting a drive. If any errors occurred during the operation,
19300 * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise.
19306 * g_drive_enumerate_identifiers:
19307 * @drive: a #GDrive
19309 * Gets the kinds of identifiers that @drive has.
19310 * Use g_drive_get_identifer() to obtain the identifiers
19312 * array of strings containing kinds of identifiers. Use g_strfreev()
19315 * Returns: (transfer full) (array zero-terminated=1): a %NULL-terminated
19320 * g_drive_get_icon:
19321 * @drive: a #GDrive.
19323 * Gets the icon for @drive.
19324 * Free the returned object with g_object_unref().
19326 * Returns: (transfer full): #GIcon for the @drive.
19331 * g_drive_get_identifier:
19332 * @drive: a #GDrive
19333 * @kind: the kind of identifier to return
19335 * Gets the identifier of the given kind for @drive.
19336 * requested identfier, or %NULL if the #GDrive
19337 * doesn't have this kind of identifier.
19339 * Returns: a newly allocated string containing the
19344 * g_drive_get_name:
19345 * @drive: a #GDrive.
19347 * Gets the name of @drive.
19348 * string should be freed when no longer needed.
19350 * Returns: a string containing @drive's name. The returned
19355 * g_drive_get_start_stop_type:
19356 * @drive: a #GDrive.
19358 * Gets a hint about how a drive can be started/stopped.
19360 * Returns: A value from the #GDriveStartStopType enumeration.
19366 * g_drive_get_volumes:
19367 * @drive: a #GDrive.
19369 * Get a list of mountable volumes for @drive.
19370 * The returned list should be freed with g_list_free(), after
19371 * its elements have been unreffed with g_object_unref().
19373 * Returns: (element-type GVolume) (transfer full): #GList containing any #GVolume objects on the given @drive.
19378 * g_drive_has_media:
19379 * @drive: a #GDrive.
19381 * Checks if the @drive has media. Note that the OS may not be polling
19382 * the drive for media changes; see g_drive_is_media_check_automatic()
19383 * for more details.
19385 * Returns: %TRUE if @drive has media, %FALSE otherwise.
19390 * g_drive_has_volumes:
19391 * @drive: a #GDrive.
19393 * Check if @drive has any mountable volumes.
19395 * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise.
19400 * g_drive_is_media_check_automatic:
19401 * @drive: a #GDrive.
19403 * Checks if @drive is capabable of automatically detecting media changes.
19404 * media changes, %FALSE otherwise.
19406 * Returns: %TRUE if the @drive is capabable of automatically detecting
19411 * g_drive_is_media_removable:
19412 * @drive: a #GDrive.
19414 * Checks if the @drive supports removable media.
19416 * Returns: %TRUE if @drive supports removable media, %FALSE otherwise.
19421 * g_drive_poll_for_media:
19422 * @drive: a #GDrive.
19423 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19424 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
19425 * @user_data: user data to pass to @callback
19427 * Asynchronously polls @drive to see if media has been inserted or removed.
19428 * When the operation is finished, @callback will be called.
19429 * You can then call g_drive_poll_for_media_finish() to obtain the
19430 * result of the operation.
19435 * g_drive_poll_for_media_finish:
19436 * @drive: a #GDrive.
19437 * @result: a #GAsyncResult.
19438 * @error: a #GError, or %NULL
19440 * Finishes an operation started with g_drive_poll_for_media() on a drive.
19441 * %FALSE otherwise.
19443 * Returns: %TRUE if the drive has been poll_for_mediaed successfully,
19449 * @drive: a #GDrive.
19450 * @flags: flags affecting the start operation.
19451 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
19452 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19453 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
19454 * @user_data: user data to pass to @callback
19456 * Asynchronously starts a drive.
19457 * When the operation is finished, @callback will be called.
19458 * You can then call g_drive_start_finish() to obtain the
19459 * result of the operation.
19466 * g_drive_start_finish:
19467 * @drive: a #GDrive.
19468 * @result: a #GAsyncResult.
19469 * @error: a #GError, or %NULL
19471 * Finishes starting a drive.
19472 * %FALSE otherwise.
19474 * Returns: %TRUE if the drive has been started successfully,
19481 * @drive: a #GDrive.
19482 * @flags: flags affecting the unmount if required for stopping.
19483 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
19484 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19485 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
19486 * @user_data: user data to pass to @callback
19488 * Asynchronously stops a drive.
19489 * When the operation is finished, @callback will be called.
19490 * You can then call g_drive_stop_finish() to obtain the
19491 * result of the operation.
19498 * g_drive_stop_finish:
19499 * @drive: a #GDrive.
19500 * @result: a #GAsyncResult.
19501 * @error: a #GError, or %NULL
19503 * Finishes stopping a drive.
19504 * %FALSE otherwise.
19506 * Returns: %TRUE if the drive has been stopped successfully,
19512 * g_emblem_get_icon:
19513 * @emblem: a #GEmblem from which the icon should be extracted.
19515 * Gives back the icon from @emblem.
19516 * the emblem and should not be modified or freed.
19518 * Returns: (transfer none): a #GIcon. The returned object belongs to
19524 * g_emblem_get_origin:
19525 * @emblem: a #GEmblem
19527 * Gets the origin of the emblem.
19529 * Returns: (transfer none): the origin of the emblem
19536 * @icon: a GIcon containing the icon.
19538 * Creates a new emblem for @icon.
19540 * Returns: a new #GEmblem.
19546 * g_emblem_new_with_origin:
19547 * @icon: a GIcon containing the icon.
19548 * @origin: a GEmblemOrigin enum defining the emblem's origin
19550 * Creates a new emblem for @icon.
19552 * Returns: a new #GEmblem.
19558 * g_emblemed_icon_add_emblem:
19559 * @emblemed: a #GEmblemedIcon
19560 * @emblem: a #GEmblem
19562 * Adds @emblem to the #GList of #GEmblem <!-- -->s.
19569 * g_emblemed_icon_clear_emblems:
19570 * @emblemed: a #GEmblemedIcon
19572 * Removes all the emblems from @icon.
19579 * g_emblemed_icon_get_emblems:
19580 * @emblemed: a #GEmblemedIcon
19582 * Gets the list of emblems for the @icon.
19583 * #GEmblem <!-- -->s that is owned by @emblemed
19585 * Returns: (element-type Gio.Emblem) (transfer none): a #GList of
19591 * g_emblemed_icon_get_icon:
19592 * @emblemed: a #GEmblemedIcon
19594 * Gets the main icon for @emblemed.
19596 * Returns: (transfer none): a #GIcon that is owned by @emblemed
19602 * g_emblemed_icon_new:
19604 * @emblem: (allow-none): a #GEmblem, or %NULL
19606 * Creates a new emblemed icon for @icon with the emblem @emblem.
19608 * Returns: (transfer full): a new #GIcon
19614 * g_file_append_to:
19615 * @file: input #GFile.
19616 * @flags: a set of #GFileCreateFlags.
19617 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19618 * @error: a #GError, or %NULL
19620 * Gets an output stream for appending data to the file. If
19621 * the file doesn't already exist it is created.
19622 * By default files created are generally readable by everyone,
19623 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
19624 * will be made readable only to the current user, to the level that
19625 * is supported on the target filesystem.
19626 * If @cancellable is not %NULL, then the operation can be cancelled by
19627 * triggering the cancellable object from another thread. If the operation
19628 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19629 * Some file systems don't allow all file names, and may
19630 * return an %G_IO_ERROR_INVALID_FILENAME error.
19631 * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will be
19632 * returned. Other errors are possible too, and depend on what kind of
19633 * filesystem the file is on.
19634 * Free the returned object with g_object_unref().
19636 * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
19641 * g_file_append_to_async:
19642 * @file: input #GFile.
19643 * @flags: a set of #GFileCreateFlags.
19644 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19645 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19646 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19647 * @user_data: (closure): the data to pass to callback function
19649 * Asynchronously opens @file for appending.
19650 * For more details, see g_file_append_to() which is
19651 * the synchronous version of this call.
19652 * When the operation is finished, @callback will be called. You can then call
19653 * g_file_append_to_finish() to get the result of the operation.
19658 * g_file_append_to_finish:
19659 * @file: input #GFile.
19660 * @res: #GAsyncResult
19661 * @error: a #GError, or %NULL
19663 * Finishes an asynchronous file append operation started with
19664 * g_file_append_to_async().
19665 * Free the returned object with g_object_unref().
19667 * Returns: (transfer full): a valid #GFileOutputStream or %NULL on error.
19672 * g_file_attribute_info_list_add:
19673 * @list: a #GFileAttributeInfoList.
19674 * @name: the name of the attribute to add.
19675 * @type: the #GFileAttributeType for the attribute.
19676 * @flags: #GFileAttributeInfoFlags for the attribute.
19678 * Adds a new attribute with @name to the @list, setting
19679 * its @type and @flags.
19684 * g_file_attribute_info_list_dup:
19685 * @list: a #GFileAttributeInfoList to duplicate.
19687 * Makes a duplicate of a file attribute info list.
19689 * Returns: a copy of the given @list.
19694 * g_file_attribute_info_list_lookup:
19695 * @list: a #GFileAttributeInfoList.
19696 * @name: the name of the attribute to lookup.
19698 * Gets the file attribute with the name @name from @list.
19699 * attribute isn't found.
19701 * Returns: a #GFileAttributeInfo for the @name, or %NULL if an
19706 * g_file_attribute_info_list_new:
19708 * Creates a new file attribute info list.
19710 * Returns: a #GFileAttributeInfoList.
19715 * g_file_attribute_info_list_ref:
19716 * @list: a #GFileAttributeInfoList to reference.
19718 * References a file attribute info list.
19720 * Returns: #GFileAttributeInfoList or %NULL on error.
19725 * g_file_attribute_info_list_unref:
19726 * @list: The #GFileAttributeInfoList to unreference.
19728 * Removes a reference from the given @list. If the reference count
19729 * falls to zero, the @list is deleted.
19734 * g_file_attribute_matcher_enumerate_namespace:
19735 * @matcher: a #GFileAttributeMatcher.
19736 * @ns: a string containing a file attribute namespace.
19738 * Checks if the matcher will match all of the keys in a given namespace.
19739 * This will always return %TRUE if a wildcard character is in use (e.g. if
19740 * matcher was created with "standard::*" and @ns is "standard", or if matcher was created
19741 * using "*" and namespace is anything.)
19742 * in the given @ns, %FALSE otherwise.
19744 * Todo: this is awkwardly worded.
19745 * Returns: %TRUE if the matcher matches all of the entries
19750 * g_file_attribute_matcher_enumerate_next:
19751 * @matcher: a #GFileAttributeMatcher.
19753 * Gets the next matched attribute from a #GFileAttributeMatcher.
19754 * no more attribute exist.
19756 * Returns: a string containing the next attribute or %NULL if
19761 * g_file_attribute_matcher_matches:
19762 * @matcher: a #GFileAttributeMatcher.
19763 * @attribute: a file attribute key.
19765 * Checks if an attribute will be matched by an attribute matcher. If
19766 * the matcher was created with the "*" matching string, this function
19767 * will always return %TRUE.
19769 * Returns: %TRUE if @attribute matches @matcher. %FALSE otherwise.
19774 * g_file_attribute_matcher_matches_only:
19775 * @matcher: a #GFileAttributeMatcher.
19776 * @attribute: a file attribute key.
19778 * Checks if a attribute matcher only matches a given attribute. Always
19779 * returns %FALSE if "*" was used when creating the matcher.
19781 * Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise.
19786 * g_file_attribute_matcher_new:
19787 * @attributes: an attribute string to match.
19789 * Creates a new file attribute matcher, which matches attributes
19790 * against a given string. #GFileAttributeMatcher<!-- -->s are reference
19791 * counted structures, and are created with a reference count of 1. If
19792 * the number of references falls to 0, the #GFileAttributeMatcher is
19793 * automatically destroyed.
19794 * The @attribute string should be formatted with specific keys separated
19795 * from namespaces with a double colon. Several "namespace::key" strings may be
19796 * concatenated with a single comma (e.g. "standard::type,standard::is-hidden").
19797 * The wildcard "*" may be used to match all keys and namespaces, or
19798 * "namespace::*" will match all keys in a given namespace.
19799 * Examples of strings to use:
19801 * <title>File Attribute Matcher strings and results</title>
19802 * <tgroup cols='2' align='left'><thead>
19803 * <row><entry> Matcher String </entry><entry> Matches </entry></row></thead>
19805 * <row><entry>"*"</entry><entry>matches all attributes.</entry></row>
19806 * <row><entry>"standard::is-hidden"</entry><entry>matches only the key is-hidden in the standard namespace.</entry></row>
19807 * <row><entry>"standard::type,unix::*"</entry><entry>matches the type key in the standard namespace and
19808 * all keys in the unix namespace.</entry></row>
19809 * </tbody></tgroup>
19812 * Returns: a #GFileAttributeMatcher.
19817 * g_file_attribute_matcher_ref:
19818 * @matcher: a #GFileAttributeMatcher.
19820 * References a file attribute matcher.
19822 * Returns: a #GFileAttributeMatcher.
19827 * g_file_attribute_matcher_unref:
19828 * @matcher: a #GFileAttributeMatcher.
19830 * Unreferences @matcher. If the reference count falls below 1,
19831 * the @matcher is automatically freed.
19837 * @source: input #GFile.
19838 * @destination: destination #GFile
19839 * @flags: set of #GFileCopyFlags
19840 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19841 * @progress_callback: (scope call): function to callback with progress information
19842 * @progress_callback_data: (closure): user data to pass to @progress_callback
19843 * @error: #GError to set on error, or %NULL
19845 * Copies the file @source to the location specified by @destination.
19846 * Can not handle recursive copies of directories.
19847 * If the flag #G_FILE_COPY_OVERWRITE is specified an already
19848 * existing @destination file is overwritten.
19849 * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
19850 * will be copied as symlinks, otherwise the target of the
19851 * If @cancellable is not %NULL, then the operation can be cancelled by
19852 * triggering the cancellable object from another thread. If the operation
19853 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19854 * If @progress_callback is not %NULL, then the operation can be monitored by
19855 * setting this to a #GFileProgressCallback function. @progress_callback_data
19856 * will be passed to this function. It is guaranteed that this callback will
19857 * be called after all data has been transferred with the total number of bytes
19858 * copied during the operation.
19859 * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
19860 * error is returned, independent on the status of the @destination.
19861 * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
19862 * error G_IO_ERROR_EXISTS is returned.
19863 * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
19864 * error is returned. If trying to overwrite a directory with a directory the
19865 * G_IO_ERROR_WOULD_MERGE error is returned.
19866 * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
19867 * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
19869 * If you are interested in copying the #GFile object itself (not the on-disk
19870 * file), see g_file_dup().
19872 * Returns: %TRUE on success, %FALSE otherwise.
19877 * g_file_copy_async: (skip)
19878 * @source: input #GFile.
19879 * @destination: destination #GFile
19880 * @flags: set of #GFileCopyFlags
19881 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19882 * @cancellable: optional #GCancellable object, %NULL to ignore.
19883 * @progress_callback: function to callback with progress information
19884 * @progress_callback_data: user data to pass to @progress_callback
19885 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
19886 * @user_data: the data to pass to callback function
19888 * Copies the file @source to the location specified by @destination
19889 * asynchronously. For details of the behaviour, see g_file_copy().
19890 * If @progress_callback is not %NULL, then that function that will be called
19891 * just like in g_file_copy(), however the callback will run in the main loop,
19892 * not in the thread that is doing the I/O operation.
19893 * When the operation is finished, @callback will be called. You can then call
19894 * g_file_copy_finish() to get the result of the operation.
19899 * g_file_copy_attributes:
19900 * @source: a #GFile with attributes.
19901 * @destination: a #GFile to copy attributes to.
19902 * @flags: a set of #GFileCopyFlags.
19903 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19904 * @error: a #GError, %NULL to ignore.
19906 * Copies the file attributes from @source to @destination.
19907 * Normally only a subset of the file attributes are copied,
19908 * those that are copies in a normal file copy operation
19909 * (which for instance does not include e.g. owner). However
19910 * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then
19911 * all the metadata that is possible to copy is copied. This
19912 * is useful when implementing move by copy + delete source.
19914 * Returns: %TRUE if the attributes were copied successfully, %FALSE otherwise.
19919 * g_file_copy_finish:
19920 * @file: input #GFile.
19921 * @res: a #GAsyncResult.
19922 * @error: a #GError, or %NULL
19924 * Finishes copying the file started with
19925 * g_file_copy_async().
19927 * Returns: a %TRUE on success, %FALSE on error.
19933 * @file: input #GFile.
19934 * @flags: a set of #GFileCreateFlags.
19935 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19936 * @error: a #GError, or %NULL
19938 * Creates a new file and returns an output stream for writing to it.
19939 * The file must not already exist.
19940 * By default files created are generally readable by everyone,
19941 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
19942 * will be made readable only to the current user, to the level that
19943 * is supported on the target filesystem.
19944 * If @cancellable is not %NULL, then the operation can be cancelled by
19945 * triggering the cancellable object from another thread. If the operation
19946 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
19947 * If a file or directory with this name already exists the G_IO_ERROR_EXISTS
19948 * error will be returned.
19949 * Some file systems don't allow all file names, and may
19950 * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
19951 * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
19952 * Other errors are possible too, and depend on what kind of
19953 * filesystem the file is on.
19955 * Free the returned object with g_object_unref().
19957 * Returns: (transfer full): a #GFileOutputStream for the newly created file, or
19962 * g_file_create_async:
19963 * @file: input #GFile.
19964 * @flags: a set of #GFileCreateFlags.
19965 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
19966 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
19967 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
19968 * @user_data: (closure): the data to pass to callback function
19970 * Asynchronously creates a new file and returns an output stream for writing to it.
19971 * The file must not already exist.
19972 * For more details, see g_file_create() which is
19973 * the synchronous version of this call.
19974 * When the operation is finished, @callback will be called. You can then call
19975 * g_file_create_finish() to get the result of the operation.
19980 * g_file_create_finish:
19981 * @file: input #GFile.
19982 * @res: a #GAsyncResult.
19983 * @error: a #GError, or %NULL
19985 * Finishes an asynchronous file create operation started with
19986 * g_file_create_async().
19987 * Free the returned object with g_object_unref().
19989 * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
19994 * g_file_create_readwrite:
19996 * @flags: a set of #GFileCreateFlags
19997 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
19998 * @error: return location for a #GError, or %NULL
20000 * Creates a new file and returns a stream for reading and writing to it.
20001 * The file must not already exist.
20002 * By default files created are generally readable by everyone,
20003 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
20004 * will be made readable only to the current user, to the level that
20005 * is supported on the target filesystem.
20006 * If @cancellable is not %NULL, then the operation can be cancelled by
20007 * triggering the cancellable object from another thread. If the operation
20008 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20009 * If a file or directory with this name already exists the %G_IO_ERROR_EXISTS
20010 * error will be returned. Some file systems don't allow all file names,
20011 * and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name
20012 * is too long, %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors
20013 * are possible too, and depend on what kind of filesystem the file is on.
20014 * Note that in many non-local file cases read and write streams are not
20015 * supported, so make sure you really need to do read and write streaming,
20016 * rather than just opening for reading or writing.
20017 * Free the returned object with g_object_unref().
20019 * Returns: (transfer full): a #GFileIOStream for the newly created file, or %NULL on error.
20025 * g_file_create_readwrite_async:
20026 * @file: input #GFile
20027 * @flags: a set of #GFileCreateFlags
20028 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
20029 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
20030 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
20031 * @user_data: (closure): the data to pass to callback function
20033 * Asynchronously creates a new file and returns a stream for reading and
20034 * writing to it. The file must not already exist.
20035 * For more details, see g_file_create_readwrite() which is
20036 * the synchronous version of this call.
20037 * When the operation is finished, @callback will be called. You can then
20038 * call g_file_create_readwrite_finish() to get the result of the operation.
20045 * g_file_create_readwrite_finish:
20046 * @file: input #GFile
20047 * @res: a #GAsyncResult
20048 * @error: a #GError, or %NULL
20050 * Finishes an asynchronous file create operation started with
20051 * g_file_create_readwrite_async().
20052 * Free the returned object with g_object_unref().
20054 * Returns: (transfer full): a #GFileIOStream or %NULL on error.
20061 * @file: input #GFile.
20062 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20063 * @error: a #GError, or %NULL
20065 * Deletes a file. If the @file is a directory, it will only be deleted if it
20067 * If @cancellable is not %NULL, then the operation can be cancelled by
20068 * triggering the cancellable object from another thread. If the operation
20069 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20071 * Virtual: delete_file
20072 * Returns: %TRUE if the file was deleted. %FALSE otherwise.
20077 * g_file_descriptor_based_get_fd:
20078 * @fd_based: a #GFileDescriptorBased.
20080 * Gets the underlying file descriptor.
20082 * Returns: The file descriptor
20089 * @file: input #GFile.
20091 * Duplicates a #GFile handle. This operation does not duplicate
20092 * the actual file or directory represented by the #GFile; see
20093 * g_file_copy() if attempting to copy a file.
20094 * This call does no blocking i/o.
20096 * Returns: (transfer full): a new #GFile that is a duplicate of the given #GFile.
20101 * g_file_eject_mountable:
20102 * @file: input #GFile.
20103 * @flags: flags affecting the operation
20104 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20105 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
20106 * @user_data: (closure): the data to pass to callback function
20108 * Starts an asynchronous eject on a mountable.
20109 * When this operation has completed, @callback will be called with
20110 * g_file_eject_mountable_finish().
20111 * If @cancellable is not %NULL, then the operation can be cancelled by
20112 * triggering the cancellable object from another thread. If the operation
20113 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20115 * Deprecated: 2.22: Use g_file_eject_mountable_with_operation() instead.
20120 * g_file_eject_mountable_finish:
20121 * @file: input #GFile.
20122 * @result: a #GAsyncResult.
20123 * @error: a #GError, or %NULL
20125 * Finishes an asynchronous eject operation started by
20126 * g_file_eject_mountable().
20129 * Returns: %TRUE if the @file was ejected successfully. %FALSE
20130 * Deprecated: 2.22: Use g_file_eject_mountable_with_operation_finish() instead.
20135 * g_file_eject_mountable_with_operation:
20136 * @file: input #GFile.
20137 * @flags: flags affecting the operation
20138 * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
20139 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20140 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
20141 * @user_data: (closure): the data to pass to callback function
20143 * Starts an asynchronous eject on a mountable.
20144 * When this operation has completed, @callback will be called with
20145 * g_file_eject_mountable_with_operation_finish().
20146 * If @cancellable is not %NULL, then the operation can be cancelled by
20147 * triggering the cancellable object from another thread. If the operation
20148 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20155 * g_file_eject_mountable_with_operation_finish:
20156 * @file: input #GFile.
20157 * @result: a #GAsyncResult.
20158 * @error: a #GError, or %NULL
20160 * Finishes an asynchronous eject operation started by
20161 * g_file_eject_mountable_with_operation().
20164 * Returns: %TRUE if the @file was ejected successfully. %FALSE
20170 * g_file_enumerate_children:
20171 * @file: input #GFile.
20172 * @attributes: an attribute query string.
20173 * @flags: a set of #GFileQueryInfoFlags.
20174 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20175 * @error: #GError for error reporting.
20177 * Gets the requested information about the files in a directory. The result
20178 * is a #GFileEnumerator object that will give out #GFileInfo objects for
20179 * all the files in the directory.
20180 * The @attributes value is a string that specifies the file attributes that
20181 * should be gathered. It is not an error if it's not possible to read a particular
20182 * requested attribute from a file - it just won't be set. @attributes should
20183 * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
20184 * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
20185 * namespace. An example attribute query be "standard::*,owner::user".
20186 * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
20187 * If @cancellable is not %NULL, then the operation can be cancelled by
20188 * triggering the cancellable object from another thread. If the operation
20189 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20190 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
20191 * If the file is not a directory, the G_FILE_ERROR_NOTDIR error will be returned.
20192 * Other errors are possible too.
20193 * Free the returned object with g_object_unref().
20195 * Returns: (transfer full): A #GFileEnumerator if successful, %NULL on error.
20200 * g_file_enumerate_children_async:
20201 * @file: input #GFile.
20202 * @attributes: an attribute query string.
20203 * @flags: a set of #GFileQueryInfoFlags.
20204 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
20205 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20206 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
20207 * @user_data: (closure): the data to pass to callback function
20209 * Asynchronously gets the requested information about the files in a directory. The result
20210 * is a #GFileEnumerator object that will give out #GFileInfo objects for
20211 * all the files in the directory.
20212 * For more details, see g_file_enumerate_children() which is
20213 * the synchronous version of this call.
20214 * When the operation is finished, @callback will be called. You can then call
20215 * g_file_enumerate_children_finish() to get the result of the operation.
20220 * g_file_enumerate_children_finish:
20221 * @file: input #GFile.
20222 * @res: a #GAsyncResult.
20223 * @error: a #GError.
20225 * Finishes an async enumerate children operation.
20226 * See g_file_enumerate_children_async().
20227 * Free the returned object with g_object_unref().
20229 * Returns: (transfer full): a #GFileEnumerator or %NULL if an error occurred.
20234 * g_file_enumerator_close:
20235 * @enumerator: a #GFileEnumerator.
20236 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20237 * @error: location to store the error occuring, or %NULL to ignore
20239 * Releases all resources used by this enumerator, making the
20240 * enumerator return %G_IO_ERROR_CLOSED on all calls.
20241 * This will be automatically called when the last reference
20242 * is dropped, but you might want to call this function to make
20243 * sure resources are released as early as possible.
20245 * Returns: #TRUE on success or #FALSE on error.
20250 * g_file_enumerator_close_async:
20251 * @enumerator: a #GFileEnumerator.
20252 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
20253 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20254 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
20255 * @user_data: (closure): the data to pass to callback function
20257 * Asynchronously closes the file enumerator.
20258 * If @cancellable is not %NULL, then the operation can be cancelled by
20259 * triggering the cancellable object from another thread. If the operation
20260 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in
20261 * g_file_enumerator_close_finish().
20266 * g_file_enumerator_close_finish:
20267 * @enumerator: a #GFileEnumerator.
20268 * @result: a #GAsyncResult.
20269 * @error: a #GError location to store the error occuring, or %NULL to ignore.
20271 * Finishes closing a file enumerator, started from g_file_enumerator_close_async().
20272 * If the file enumerator was already closed when g_file_enumerator_close_async()
20273 * was called, then this function will report %G_IO_ERROR_CLOSED in @error, and
20274 * return %FALSE. If the file enumerator had pending operation when the close
20275 * operation was started, then this function will report %G_IO_ERROR_PENDING, and
20276 * return %FALSE. If @cancellable was not %NULL, then the operation may have been
20277 * cancelled by triggering the cancellable object from another thread. If the operation
20278 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
20281 * Returns: %TRUE if the close operation has finished successfully.
20286 * g_file_enumerator_get_container:
20287 * @enumerator: a #GFileEnumerator
20289 * Get the #GFile container which is being enumerated.
20291 * Returns: (transfer full): the #GFile which is being enumerated.
20297 * g_file_enumerator_has_pending:
20298 * @enumerator: a #GFileEnumerator.
20300 * Checks if the file enumerator has pending operations.
20302 * Returns: %TRUE if the @enumerator has pending operations.
20307 * g_file_enumerator_is_closed:
20308 * @enumerator: a #GFileEnumerator.
20310 * Checks if the file enumerator has been closed.
20312 * Returns: %TRUE if the @enumerator is closed.
20317 * g_file_enumerator_next_file:
20318 * @enumerator: a #GFileEnumerator.
20319 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20320 * @error: location to store the error occuring, or %NULL to ignore
20322 * Returns information for the next file in the enumerated object.
20323 * Will block until the information is available. The #GFileInfo
20324 * returned from this function will contain attributes that match the
20325 * attribute string that was passed when the #GFileEnumerator was created.
20326 * On error, returns %NULL and sets @error to the error. If the
20327 * enumerator is at the end, %NULL will be returned and @error will
20329 * Free the returned object with g_object_unref() when no longer needed.
20331 * Returns: (transfer full): A #GFileInfo or %NULL on error or end of enumerator.
20336 * g_file_enumerator_next_files_async:
20337 * @enumerator: a #GFileEnumerator.
20338 * @num_files: the number of file info objects to request
20339 * @io_priority: the <link linkend="gioscheduler">io priority</link> of the request.
20340 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20341 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
20342 * @user_data: (closure): the data to pass to callback function
20344 * Request information for a number of files from the enumerator asynchronously.
20345 * When all i/o for the operation is finished the @callback will be called with
20346 * the requested information.
20347 * The callback can be called with less than @num_files files in case of error
20348 * or at the end of the enumerator. In case of a partial error the callback will
20349 * be called with any succeeding items and no error, and on the next request the
20350 * error will be reported. If a request is cancelled the callback will be called
20351 * with %G_IO_ERROR_CANCELLED.
20352 * During an async request no other sync and async calls are allowed, and will
20353 * result in %G_IO_ERROR_PENDING errors.
20354 * Any outstanding i/o request with higher priority (lower numerical value) will
20355 * be executed before an outstanding request with lower priority. Default
20356 * priority is %G_PRIORITY_DEFAULT.
20361 * g_file_enumerator_next_files_finish:
20362 * @enumerator: a #GFileEnumerator.
20363 * @result: a #GAsyncResult.
20364 * @error: a #GError location to store the error occuring, or %NULL to ignore.
20366 * Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
20367 * g_list_free() and unref the infos with g_object_unref() when you're
20370 * Returns: (transfer full) (element-type Gio.FileInfo): a #GList of #GFileInfo<!---->s. You must free the list with
20375 * g_file_enumerator_set_pending:
20376 * @enumerator: a #GFileEnumerator.
20377 * @pending: a boolean value.
20379 * Sets the file enumerator as having pending operations.
20385 * @file1: the first #GFile.
20386 * @file2: the second #GFile.
20388 * Checks equality of two given #GFile<!-- -->s. Note that two
20389 * #GFile<!-- -->s that differ can still refer to the same
20390 * file on the filesystem due to various forms of filename
20392 * This call does no blocking i/o.
20393 * %FALSE if either is not a #GFile.
20395 * Returns: %TRUE if @file1 and @file2 are equal.
20400 * g_file_find_enclosing_mount:
20401 * @file: input #GFile.
20402 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20403 * @error: a #GError.
20405 * Gets a #GMount for the #GFile.
20406 * If the #GFileIface for @file does not have a mount (e.g. possibly a
20407 * remote share), @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL
20408 * will be returned.
20409 * If @cancellable is not %NULL, then the operation can be cancelled by
20410 * triggering the cancellable object from another thread. If the operation
20411 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
20412 * Free the returned object with g_object_unref().
20414 * Returns: (transfer full): a #GMount where the @file is located or %NULL on error.
20419 * g_file_find_enclosing_mount_async:
20421 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
20422 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
20423 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
20424 * @user_data: (closure): the data to pass to callback function
20426 * Asynchronously gets the mount for the file.
20427 * For more details, see g_file_find_enclosing_mount() which is
20428 * the synchronous version of this call.
20429 * When the operation is finished, @callback will be called. You can then call
20430 * g_file_find_enclosing_mount_finish() to get the result of the operation.
20435 * g_file_find_enclosing_mount_finish:
20437 * @res: a #GAsyncResult
20438 * @error: a #GError
20440 * Finishes an asynchronous find mount request.
20441 * See g_file_find_enclosing_mount_async().
20442 * Free the returned object with g_object_unref().
20444 * Returns: (transfer full): #GMount for given @file or %NULL on error.
20449 * g_file_get_basename:
20450 * @file: input #GFile.
20452 * Gets the base name (the last component of the path) for a given #GFile.
20453 * If called for the top level of a system (such as the filesystem root
20454 * or a uri like sftp://host/) it will return a single directory separator
20455 * (and on Windows, possibly a drive letter).
20456 * The base name is a byte string (*not* UTF-8). It has no defined encoding
20457 * or rules other than it may not contain zero bytes. If you want to use
20458 * filenames in a user interface you should use the display name that you
20459 * can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
20460 * attribute with g_file_query_info().
20461 * This call does no blocking i/o.
20462 * if given #GFile is invalid. The returned string should be
20463 * freed with g_free() when no longer needed.
20465 * Returns: string containing the #GFile's base name, or %NULL
20470 * g_file_get_child:
20471 * @file: input #GFile.
20472 * @name: string containing the child's basename.
20474 * Gets a child of @file with basename equal to @name.
20475 * Note that the file with that specific name might not exist, but
20476 * you can still have a #GFile that points to it. You can use this
20477 * for instance to create that file.
20478 * This call does no blocking i/o.
20479 * Free the returned object with g_object_unref().
20481 * Returns: (transfer full): a #GFile to a child specified by @name.
20486 * g_file_get_child_for_display_name:
20487 * @file: input #GFile.
20488 * @display_name: string to a possible child.
20491 * Gets the child of @file for a given @display_name (i.e. a UTF8
20492 * version of the name). If this function fails, it returns %NULL and @error will be
20493 * set. This is very useful when constructing a GFile for a new file
20494 * and the user entered the filename in the user interface, for instance
20495 * when you select a directory and type a filename in the file selector.
20496 * This call does no blocking i/o.
20497 * %NULL if the display name couldn't be converted.
20498 * Free the returned object with g_object_unref().
20500 * Returns: (transfer full): a #GFile to the specified child, or
20505 * g_file_get_parent:
20506 * @file: input #GFile.
20508 * Gets the parent directory for the @file.
20509 * If the @file represents the root directory of the
20510 * file system, then %NULL will be returned.
20511 * This call does no blocking i/o.
20512 * #GFile or %NULL if there is no parent.
20513 * Free the returned object with g_object_unref().
20515 * Returns: (transfer full): a #GFile structure to the parent of the given
20520 * g_file_get_parse_name:
20521 * @file: input #GFile.
20523 * Gets the parse name of the @file.
20524 * A parse name is a UTF-8 string that describes the
20525 * file such that one can get the #GFile back using
20526 * g_file_parse_name().
20527 * This is generally used to show the #GFile as a nice
20528 * full-pathname kind of string in a user interface,
20529 * like in a location entry.
20530 * For local files with names that can safely be converted
20531 * to UTF8 the pathname is used, otherwise the IRI is used
20532 * (a form of URI that allows UTF8 characters unescaped).
20533 * This call does no blocking i/o.
20534 * string should be freed with g_free() when no longer needed.
20536 * Returns: a string containing the #GFile's parse name. The returned
20542 * @file: input #GFile.
20544 * Gets the local pathname for #GFile, if one exists.
20545 * This call does no blocking i/o.
20546 * no such path exists. The returned string should be
20547 * freed with g_free() when no longer needed.
20549 * Returns: string containing the #GFile's path, or %NULL if
20554 * g_file_get_relative_path:
20555 * @parent: input #GFile.
20556 * @descendant: input #GFile.
20558 * Gets the path for @descendant relative to @parent.
20559 * This call does no blocking i/o.
20560 * to @parent, or %NULL if @descendant doesn't have @parent as prefix.
20561 * The returned string should be freed with g_free() when no longer needed.
20563 * Returns: string with the relative path from @descendant
20569 * @file: input #GFile.
20571 * Gets the URI for the @file.
20572 * This call does no blocking i/o.
20573 * The returned string should be freed with g_free() when no longer needed.
20575 * Returns: a string containing the #GFile's URI.
20580 * g_file_get_uri_scheme:
20581 * @file: input #GFile.
20583 * Gets the URI scheme for a #GFile.
20584 * RFC 3986 decodes the scheme as:
20586 * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
20587 * </programlisting>
20588 * Common schemes include "file", "http", "ftp", etc.
20589 * This call does no blocking i/o.
20590 * #GFile. The returned string should be freed with g_free()
20591 * when no longer needed.
20593 * Returns: a string containing the URI scheme for the given
20598 * g_file_has_parent:
20599 * @file: input #GFile
20600 * @parent: the parent to check for, or %NULL
20602 * Checks if @file has a parent, and optionally, if it is @parent.
20603 * If @parent is %NULL then this function returns %TRUE if @file has any
20604 * parent at all. If @parent is non-%NULL then %TRUE is only returned
20605 * if @file is a child of @parent.
20606 * case that @parent is %NULL).
20608 * Returns: %TRUE if @file is a child of @parent (or any parent in the
20614 * g_file_has_prefix:
20615 * @file: input #GFile.
20616 * @prefix: input #GFile.
20618 * Checks whether @file has the prefix specified by @prefix. In other word,
20619 * if the names of inital elements of @file<!-- -->s pathname match @prefix.
20620 * Only full pathname elements are matched, so a path like /foo is not
20621 * considered a prefix of /foobar, only of /foo/bar.
20622 * This call does no i/o, as it works purely on names. As such it can
20623 * sometimes return %FALSE even if @file is inside a @prefix (from a
20624 * filesystem point of view), because the prefix of @file is an alias
20626 * %FALSE otherwise.
20628 * Virtual: prefix_matches
20629 * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix.
20634 * g_file_has_uri_scheme:
20635 * @file: input #GFile.
20636 * @uri_scheme: a string containing a URI scheme.
20638 * Checks to see if a #GFile has a given URI scheme.
20639 * This call does no blocking i/o.
20640 * given URI scheme, %FALSE if URI scheme is %NULL,
20641 * not supported, or #GFile is invalid.
20643 * Returns: %TRUE if #GFile's backend supports the
20649 * @file: #gconstpointer to a #GFile.
20651 * Creates a hash value for a #GFile.
20652 * This call does no blocking i/o.
20653 * integer that can be used as hash value for the #GFile.
20654 * This function is intended for easily hashing a #GFile to
20655 * add to a #GHashTable or similar data structure.
20658 * Returns: 0 if @file is not a valid #GFile, otherwise an
20663 * g_file_icon_get_file:
20666 * Gets the #GFile associated with the given @icon.
20668 * Returns: (transfer none): a #GFile, or %NULL.
20676 * Creates a new icon for a file.
20678 * Returns: (transfer full): a #GIcon for the given @file, or %NULL on error.
20683 * g_file_info_clear_status:
20684 * @info: a #GFileInfo.
20686 * Clears the status information from @info.
20691 * g_file_info_copy_into:
20692 * @src_info: source to copy attributes from.
20693 * @dest_info: destination to copy attributes to.
20695 * Copies all of the #GFileAttribute<!-- -->s from @src_info to @dest_info.
20701 * @other: a #GFileInfo.
20703 * Duplicates a file info structure.
20705 * Returns: (transfer full): a duplicate #GFileInfo of @other.
20710 * g_file_info_get_attribute_as_string:
20711 * @info: a #GFileInfo.
20712 * @attribute: a file attribute key.
20714 * Gets the value of a attribute, formated as a string.
20715 * This escapes things as needed to make the string valid
20717 * When you're done with the string it must be freed with g_free().
20719 * Returns: a UTF-8 string associated with the given @attribute.
20724 * g_file_info_get_attribute_boolean:
20725 * @info: a #GFileInfo.
20726 * @attribute: a file attribute key.
20728 * Gets the value of a boolean attribute. If the attribute does not
20729 * contain a boolean value, %FALSE will be returned.
20731 * Returns: the boolean value contained within the attribute.
20736 * g_file_info_get_attribute_byte_string:
20737 * @info: a #GFileInfo.
20738 * @attribute: a file attribute key.
20740 * Gets the value of a byte string attribute. If the attribute does
20741 * not contain a byte string, %NULL will be returned.
20744 * Returns: the contents of the @attribute value as a byte string, or
20749 * g_file_info_get_attribute_data:
20750 * @info: a #GFileInfo
20751 * @attribute: a file attribute key
20752 * @type: (out) (allow-none): return location for the attribute type, or %NULL
20753 * @value_pp: (out) (allow-none): return location for the attribute value, or %NULL
20754 * @status: (out) (allow-none): return location for the attribute status, or %NULL
20756 * Gets the attribute type, value and status for an attribute key.
20757 * %FALSE otherwise.
20759 * Returns: (transfer none): %TRUE if @info has an attribute named @attribute,
20764 * g_file_info_get_attribute_int32:
20765 * @info: a #GFileInfo.
20766 * @attribute: a file attribute key.
20768 * Gets a signed 32-bit integer contained within the attribute. If the
20769 * attribute does not contain a signed 32-bit integer, or is invalid,
20770 * 0 will be returned.
20772 * Returns: a signed 32-bit integer from the attribute.
20777 * g_file_info_get_attribute_int64:
20778 * @info: a #GFileInfo.
20779 * @attribute: a file attribute key.
20781 * Gets a signed 64-bit integer contained within the attribute. If the
20782 * attribute does not contain an signed 64-bit integer, or is invalid,
20783 * 0 will be returned.
20785 * Returns: a signed 64-bit integer from the attribute.
20790 * g_file_info_get_attribute_object:
20791 * @info: a #GFileInfo.
20792 * @attribute: a file attribute key.
20794 * Gets the value of a #GObject attribute. If the attribute does
20795 * not contain a #GObject, %NULL will be returned.
20798 * Returns: (transfer none): a #GObject associated with the given @attribute, or
20803 * g_file_info_get_attribute_status:
20804 * @info: a #GFileInfo
20805 * @attribute: a file attribute key
20807 * Gets the attribute status for an attribute key.
20808 * %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.
20810 * Returns: a #GFileAttributeStatus for the given @attribute, or
20815 * g_file_info_get_attribute_string:
20816 * @info: a #GFileInfo.
20817 * @attribute: a file attribute key.
20819 * Gets the value of a string attribute. If the attribute does
20820 * not contain a string, %NULL will be returned.
20823 * Returns: the contents of the @attribute value as a UTF-8 string, or
20828 * g_file_info_get_attribute_stringv:
20829 * @info: a #GFileInfo.
20830 * @attribute: a file attribute key.
20832 * Gets the value of a stringv attribute. If the attribute does
20833 * not contain a stringv, %NULL will be returned.
20834 * %NULL otherwise. Do not free. These returned strings are UTF-8.
20836 * Returns: (transfer none): the contents of the @attribute value as a stringv, or
20842 * g_file_info_get_attribute_type:
20843 * @info: a #GFileInfo.
20844 * @attribute: a file attribute key.
20846 * Gets the attribute type for an attribute key.
20847 * %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.
20849 * Returns: a #GFileAttributeType for the given @attribute, or
20854 * g_file_info_get_attribute_uint32:
20855 * @info: a #GFileInfo.
20856 * @attribute: a file attribute key.
20858 * Gets an unsigned 32-bit integer contained within the attribute. If the
20859 * attribute does not contain an unsigned 32-bit integer, or is invalid,
20860 * 0 will be returned.
20862 * Returns: an unsigned 32-bit integer from the attribute.
20867 * g_file_info_get_attribute_uint64:
20868 * @info: a #GFileInfo.
20869 * @attribute: a file attribute key.
20871 * Gets a unsigned 64-bit integer contained within the attribute. If the
20872 * attribute does not contain an unsigned 64-bit integer, or is invalid,
20873 * 0 will be returned.
20875 * Returns: a unsigned 64-bit integer from the attribute.
20880 * g_file_info_get_content_type:
20881 * @info: a #GFileInfo.
20883 * Gets the file's content type.
20885 * Returns: a string containing the file's content type.
20890 * g_file_info_get_display_name:
20891 * @info: a #GFileInfo.
20893 * Gets a display name for a file.
20895 * Returns: a string containing the display name.
20900 * g_file_info_get_edit_name:
20901 * @info: a #GFileInfo.
20903 * Gets the edit name for a file.
20905 * Returns: a string containing the edit name.
20910 * g_file_info_get_etag:
20911 * @info: a #GFileInfo.
20913 * Gets the <link linkend="gfile-etag">entity tag</link> for a given
20914 * #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.
20916 * Returns: a string containing the value of the "etag:value" attribute.
20921 * g_file_info_get_file_type:
20922 * @info: a #GFileInfo.
20924 * Gets a file's type (whether it is a regular file, symlink, etc).
20925 * This is different from the file's content type, see g_file_info_get_content_type().
20927 * Returns: a #GFileType for the given file.
20932 * g_file_info_get_icon:
20933 * @info: a #GFileInfo.
20935 * Gets the icon for a file.
20937 * Returns: (transfer none): #GIcon for the given @info.
20942 * g_file_info_get_is_backup:
20943 * @info: a #GFileInfo.
20945 * Checks if a file is a backup file.
20947 * Returns: %TRUE if file is a backup file, %FALSE otherwise.
20952 * g_file_info_get_is_hidden:
20953 * @info: a #GFileInfo.
20955 * Checks if a file is hidden.
20957 * Returns: %TRUE if the file is a hidden file, %FALSE otherwise.
20962 * g_file_info_get_is_symlink:
20963 * @info: a #GFileInfo.
20965 * Checks if a file is a symlink.
20967 * Returns: %TRUE if the given @info is a symlink.
20972 * g_file_info_get_modification_time:
20973 * @info: a #GFileInfo.
20974 * @result: a #GTimeVal.
20976 * Gets the modification time of the current @info and sets it
20982 * g_file_info_get_name:
20983 * @info: a #GFileInfo.
20985 * Gets the name for a file.
20987 * Returns: a string containing the file name.
20992 * g_file_info_get_size:
20993 * @info: a #GFileInfo.
20995 * Gets the file's size.
20997 * Returns: a #goffset containing the file's size.
21002 * g_file_info_get_sort_order:
21003 * @info: a #GFileInfo.
21005 * Gets the value of the sort_order attribute from the #GFileInfo.
21006 * See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
21008 * Returns: a #gint32 containing the value of the "standard::sort_order" attribute.
21013 * g_file_info_get_symlink_target:
21014 * @info: a #GFileInfo.
21016 * Gets the symlink target for a given #GFileInfo.
21018 * Returns: a string containing the symlink target.
21023 * g_file_info_has_attribute:
21024 * @info: a #GFileInfo.
21025 * @attribute: a file attribute key.
21027 * Checks if a file info structure has an attribute named @attribute.
21028 * %FALSE otherwise.
21030 * Returns: %TRUE if @Ginfo has an attribute named @attribute,
21035 * g_file_info_has_namespace:
21036 * @info: a #GFileInfo.
21037 * @name_space: a file attribute namespace.
21039 * Checks if a file info structure has an attribute in the
21040 * specified @name_space.
21041 * %FALSE otherwise.
21043 * Returns: %TRUE if @Ginfo has an attribute in @name_space,
21049 * g_file_info_list_attributes:
21050 * @info: a #GFileInfo.
21051 * @name_space: a file attribute key's namespace.
21053 * Lists the file info structure's attributes.
21054 * possible attribute types for the given @name_space, or
21057 * Returns: (array zero-terminated=1) (transfer full): a null-terminated array of strings of all of the
21064 * Creates a new file info structure.
21066 * Returns: a #GFileInfo.
21071 * g_file_info_remove_attribute:
21072 * @info: a #GFileInfo.
21073 * @attribute: a file attribute key.
21075 * Removes all cases of @attribute from @info if it exists.
21080 * g_file_info_set_attribute:
21081 * @info: a #GFileInfo.
21082 * @attribute: a file attribute key.
21083 * @type: a #GFileAttributeType
21084 * @value_p: pointer to the value
21086 * Sets the @attribute to contain the given value, if possible.
21091 * g_file_info_set_attribute_boolean:
21092 * @info: a #GFileInfo.
21093 * @attribute: a file attribute key.
21094 * @attr_value: a boolean value.
21096 * Sets the @attribute to contain the given @attr_value,
21102 * g_file_info_set_attribute_byte_string:
21103 * @info: a #GFileInfo.
21104 * @attribute: a file attribute key.
21105 * @attr_value: a byte string.
21107 * Sets the @attribute to contain the given @attr_value,
21113 * g_file_info_set_attribute_int32:
21114 * @info: a #GFileInfo.
21115 * @attribute: a file attribute key.
21116 * @attr_value: a signed 32-bit integer
21118 * Sets the @attribute to contain the given @attr_value,
21124 * g_file_info_set_attribute_int64:
21125 * @info: a #GFileInfo.
21126 * @attribute: attribute name to set.
21127 * @attr_value: int64 value to set attribute to.
21129 * Sets the @attribute to contain the given @attr_value,
21135 * g_file_info_set_attribute_mask:
21136 * @info: a #GFileInfo.
21137 * @mask: a #GFileAttributeMatcher.
21139 * Sets @mask on @info to match specific attribute types.
21144 * g_file_info_set_attribute_object:
21145 * @info: a #GFileInfo.
21146 * @attribute: a file attribute key.
21147 * @attr_value: a #GObject.
21149 * Sets the @attribute to contain the given @attr_value,
21155 * g_file_info_set_attribute_status:
21156 * @info: a #GFileInfo
21157 * @attribute: a file attribute key
21158 * @status: a #GFileAttributeStatus
21160 * Sets the attribute status for an attribute key. This is only
21161 * needed by external code that implement g_file_set_attributes_from_info()
21162 * or similar functions.
21163 * The attribute must exist in @info for this to work. Otherwise %FALSE
21164 * is returned and @info is unchanged.
21166 * Returns: %TRUE if the status was changed, %FALSE if the key was not set.
21172 * g_file_info_set_attribute_string:
21173 * @info: a #GFileInfo.
21174 * @attribute: a file attribute key.
21175 * @attr_value: a UTF-8 string.
21177 * Sets the @attribute to contain the given @attr_value,
21183 * g_file_info_set_attribute_stringv:
21184 * @info: a #GFileInfo.
21185 * @attribute: a file attribute key
21186 * @attr_value: a %NULL terminated array of UTF-8 strings.
21188 * Sets the @attribute to contain the given @attr_value,
21196 * g_file_info_set_attribute_uint32:
21197 * @info: a #GFileInfo.
21198 * @attribute: a file attribute key.
21199 * @attr_value: an unsigned 32-bit integer.
21201 * Sets the @attribute to contain the given @attr_value,
21207 * g_file_info_set_attribute_uint64:
21208 * @info: a #GFileInfo.
21209 * @attribute: a file attribute key.
21210 * @attr_value: an unsigned 64-bit integer.
21212 * Sets the @attribute to contain the given @attr_value,
21218 * g_file_info_set_content_type:
21219 * @info: a #GFileInfo.
21220 * @content_type: a content type. See #GContentType.
21222 * Sets the content type attribute for a given #GFileInfo.
21223 * See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
21228 * g_file_info_set_display_name:
21229 * @info: a #GFileInfo.
21230 * @display_name: a string containing a display name.
21232 * Sets the display name for the current #GFileInfo.
21233 * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
21238 * g_file_info_set_edit_name:
21239 * @info: a #GFileInfo.
21240 * @edit_name: a string containing an edit name.
21242 * Sets the edit name for the current file.
21243 * See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
21248 * g_file_info_set_file_type:
21249 * @info: a #GFileInfo.
21250 * @type: a #GFileType.
21252 * Sets the file type in a #GFileInfo to @type.
21253 * See %G_FILE_ATTRIBUTE_STANDARD_TYPE.
21258 * g_file_info_set_icon:
21259 * @info: a #GFileInfo.
21262 * Sets the icon for a given #GFileInfo.
21263 * See %G_FILE_ATTRIBUTE_STANDARD_ICON.
21268 * g_file_info_set_is_hidden:
21269 * @info: a #GFileInfo.
21270 * @is_hidden: a #gboolean.
21272 * Sets the "is_hidden" attribute in a #GFileInfo according to @is_symlink.
21273 * See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
21278 * g_file_info_set_is_symlink:
21279 * @info: a #GFileInfo.
21280 * @is_symlink: a #gboolean.
21282 * Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
21283 * See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
21288 * g_file_info_set_modification_time:
21289 * @info: a #GFileInfo.
21290 * @mtime: a #GTimeVal.
21292 * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file
21293 * info to the given time value.
21298 * g_file_info_set_name:
21299 * @info: a #GFileInfo.
21300 * @name: a string containing a name.
21302 * Sets the name attribute for the current #GFileInfo.
21303 * See %G_FILE_ATTRIBUTE_STANDARD_NAME.
21308 * g_file_info_set_size:
21309 * @info: a #GFileInfo.
21310 * @size: a #goffset containing the file's size.
21312 * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info
21313 * to the given size.
21318 * g_file_info_set_sort_order:
21319 * @info: a #GFileInfo.
21320 * @sort_order: a sort order integer.
21322 * Sets the sort order attribute in the file info structure. See
21323 * %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
21328 * g_file_info_set_symlink_target:
21329 * @info: a #GFileInfo.
21330 * @symlink_target: a static string containing a path to a symlink target.
21332 * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
21333 * to the given symlink target.
21338 * g_file_info_unset_attribute_mask:
21339 * @info: #GFileInfo.
21341 * Unsets a mask set by g_file_info_set_attribute_mask(), if one
21347 * g_file_input_stream_query_info:
21348 * @stream: a #GFileInputStream.
21349 * @attributes: a file attribute query string.
21350 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21351 * @error: a #GError location to store the error occuring, or %NULL to ignore.
21353 * Queries a file input stream the given @attributes. This function blocks
21354 * while querying the stream. For the asynchronous (non-blocking) version
21355 * of this function, see g_file_input_stream_query_info_async(). While the
21356 * stream is blocked, the stream will set the pending flag internally, and
21357 * any other operations on the stream will fail with %G_IO_ERROR_PENDING.
21359 * Returns: (transfer full): a #GFileInfo, or %NULL on error.
21364 * g_file_input_stream_query_info_async:
21365 * @stream: a #GFileInputStream.
21366 * @attributes: a file attribute query string.
21367 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21368 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21369 * @callback: (scope async): callback to call when the request is satisfied
21370 * @user_data: (closure): the data to pass to callback function
21372 * Queries the stream information asynchronously.
21373 * When the operation is finished @callback will be called.
21374 * You can then call g_file_input_stream_query_info_finish()
21375 * to get the result of the operation.
21376 * For the synchronous version of this function,
21377 * see g_file_input_stream_query_info().
21378 * If @cancellable is not %NULL, then the operation can be cancelled by
21379 * triggering the cancellable object from another thread. If the operation
21380 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set
21385 * g_file_input_stream_query_info_finish:
21386 * @stream: a #GFileInputStream.
21387 * @result: a #GAsyncResult.
21388 * @error: a #GError location to store the error occuring, or %NULL to ignore.
21390 * Finishes an asynchronous info query operation.
21392 * Returns: (transfer full): #GFileInfo.
21397 * g_file_io_stream_get_etag:
21398 * @stream: a #GFileIOStream.
21400 * Gets the entity tag for the file when it has been written.
21401 * This must be called after the stream has been written
21402 * and closed, as the etag can change while writing.
21404 * Returns: the entity tag for the stream.
21410 * g_file_io_stream_query_info:
21411 * @stream: a #GFileIOStream.
21412 * @attributes: a file attribute query string.
21413 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21414 * @error: a #GError, %NULL to ignore.
21416 * Queries a file io stream for the given @attributes.
21417 * This function blocks while querying the stream. For the asynchronous
21418 * version of this function, see g_file_io_stream_query_info_async().
21419 * While the stream is blocked, the stream will set the pending flag
21420 * internally, and any other operations on the stream will fail with
21421 * %G_IO_ERROR_PENDING.
21422 * Can fail if the stream was already closed (with @error being set to
21423 * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
21424 * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
21425 * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I
21426 * all cases of failure, %NULL will be returned.
21427 * If @cancellable is not %NULL, then the operation can be cancelled by
21428 * triggering the cancellable object from another thread. If the operation
21429 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
21432 * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
21438 * g_file_io_stream_query_info_async:
21439 * @stream: a #GFileIOStream.
21440 * @attributes: a file attribute query string.
21441 * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
21442 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21443 * @callback: (scope async): callback to call when the request is satisfied
21444 * @user_data: (closure): the data to pass to callback function
21446 * Asynchronously queries the @stream for a #GFileInfo. When completed,
21447 * finish the operation with g_file_io_stream_query_info_finish().
21448 * For the synchronous version of this function, see
21449 * g_file_io_stream_query_info().
21456 * g_file_io_stream_query_info_finish:
21457 * @stream: a #GFileIOStream.
21458 * @result: a #GAsyncResult.
21459 * @error: a #GError, %NULL to ignore.
21461 * Finalizes the asynchronous query started
21462 * by g_file_io_stream_query_info_async().
21464 * Returns: (transfer full): A #GFileInfo for the finished query.
21470 * g_file_is_native:
21471 * @file: input #GFile.
21473 * Checks to see if a file is native to the platform.
21474 * A native file s one expressed in the platform-native filename format,
21475 * e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local,
21476 * as it might be on a locally mounted remote filesystem.
21477 * On some systems non-native files may be available using
21478 * the native filesystem via a userspace filesystem (FUSE), in
21479 * these cases this call will return %FALSE, but g_file_get_path()
21480 * will still return a native path.
21481 * This call does no blocking i/o.
21483 * Returns: %TRUE if file is native.
21488 * g_file_load_contents:
21489 * @file: input #GFile.
21490 * @cancellable: optional #GCancellable object, %NULL to ignore.
21491 * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
21492 * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
21493 * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
21494 * @error: a #GError, or %NULL
21496 * Loads the content of the file into memory. The data is always
21497 * zero-terminated, but this is not included in the resultant @length.
21498 * The returned @content should be freed with g_free() when no longer
21500 * If @cancellable is not %NULL, then the operation can be cancelled by
21501 * triggering the cancellable object from another thread. If the operation
21502 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21503 * %FALSE if there were errors.
21505 * Returns: %TRUE if the @file's contents were successfully loaded.
21510 * g_file_load_contents_async:
21511 * @file: input #GFile.
21512 * @cancellable: optional #GCancellable object, %NULL to ignore.
21513 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
21514 * @user_data: the data to pass to callback function
21516 * Starts an asynchronous load of the @file's contents.
21517 * For more details, see g_file_load_contents() which is
21518 * the synchronous version of this call.
21519 * When the load operation has completed, @callback will be called
21520 * with @user data. To finish the operation, call
21521 * g_file_load_contents_finish() with the #GAsyncResult returned by
21523 * If @cancellable is not %NULL, then the operation can be cancelled by
21524 * triggering the cancellable object from another thread. If the operation
21525 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21530 * g_file_load_contents_finish:
21531 * @file: input #GFile.
21532 * @res: a #GAsyncResult.
21533 * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
21534 * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
21535 * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
21536 * @error: a #GError, or %NULL
21538 * Finishes an asynchronous load of the @file's contents.
21539 * The contents are placed in @contents, and @length is set to the
21540 * size of the @contents string. The @content should be freed with
21541 * g_free() when no longer needed. If @etag_out is present, it will be
21542 * set to the new entity tag for the @file.
21543 * present, it will be set appropriately.
21545 * Returns: %TRUE if the load was successful. If %FALSE and @error is
21550 * g_file_load_partial_contents_async: (skip)
21551 * @file: input #GFile.
21552 * @cancellable: optional #GCancellable object, %NULL to ignore.
21553 * @read_more_callback: a #GFileReadMoreCallback to receive partial data and to specify whether further data should be read.
21554 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
21555 * @user_data: the data to pass to the callback functions.
21557 * Reads the partial contents of a file. A #GFileReadMoreCallback should be
21558 * used to stop reading from the file when appropriate, else this function
21559 * will behave exactly as g_file_load_contents_async(). This operation
21560 * can be finished by g_file_load_partial_contents_finish().
21561 * Users of this function should be aware that @user_data is passed to
21562 * both the @read_more_callback and the @callback.
21563 * If @cancellable is not %NULL, then the operation can be cancelled by
21564 * triggering the cancellable object from another thread. If the operation
21565 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21570 * g_file_load_partial_contents_finish:
21571 * @file: input #GFile.
21572 * @res: a #GAsyncResult.
21573 * @contents: (out) (transfer full) (element-type guint8) (array length=length): a location to place the contents of the file.
21574 * @length: (out) (allow-none): a location to place the length of the contents of the file, or %NULL if the length is not needed
21575 * @etag_out: (out) (allow-none): a location to place the current entity tag for the file, or %NULL if the entity tag is not needed
21576 * @error: a #GError, or %NULL
21578 * Finishes an asynchronous partial load operation that was started
21579 * with g_file_load_partial_contents_async(). The data is always
21580 * zero-terminated, but this is not included in the resultant @length.
21581 * The returned @content should be freed with g_free() when no longer
21583 * present, it will be set appropriately.
21585 * Returns: %TRUE if the load was successful. If %FALSE and @error is
21590 * g_file_make_directory:
21591 * @file: input #GFile.
21592 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21593 * @error: a #GError, or %NULL
21595 * Creates a directory. Note that this will only create a child directory of
21596 * the immediate parent directory of the path or URI given by the #GFile. To
21597 * recursively create directories, see g_file_make_directory_with_parents().
21598 * This function will fail if the parent directory does not exist, setting
21599 * directories, this function will fail, setting @error to
21600 * %G_IO_ERROR_NOT_SUPPORTED.
21601 * For a local #GFile the newly created directory will have the default
21602 * (current) ownership and permissions of the current process.
21603 * If @cancellable is not %NULL, then the operation can be cancelled by
21604 * triggering the cancellable object from another thread. If the operation
21605 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21607 * Returns: %TRUE on successful creation, %FALSE otherwise.
21612 * g_file_make_directory_with_parents:
21613 * @file: input #GFile.
21614 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21615 * @error: a #GError, or %NULL
21617 * Creates a directory and any parent directories that may not exist similar to
21618 * 'mkdir -p'. If the file system does not support creating directories, this
21619 * function will fail, setting @error to %G_IO_ERROR_NOT_SUPPORTED.
21620 * For a local #GFile the newly created directories will have the default
21621 * (current) ownership and permissions of the current process.
21622 * If @cancellable is not %NULL, then the operation can be cancelled by
21623 * triggering the cancellable object from another thread. If the operation
21624 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21627 * Returns: %TRUE if all directories have been successfully created, %FALSE
21633 * g_file_make_symbolic_link:
21634 * @file: a #GFile with the name of the symlink to create
21635 * @symlink_value: a string with the path for the target of the new symlink
21636 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21637 * @error: a #GError.
21639 * Creates a symbolic link named @file which contains the string
21640 * If @cancellable is not %NULL, then the operation can be cancelled by
21641 * triggering the cancellable object from another thread. If the operation
21642 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21644 * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise.
21650 * @file: input #GFile
21651 * @flags: a set of #GFileMonitorFlags
21652 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
21653 * @error: a #GError, or %NULL
21655 * Obtains a file or directory monitor for the given file, depending
21656 * on the type of the file.
21657 * If @cancellable is not %NULL, then the operation can be cancelled by
21658 * triggering the cancellable object from another thread. If the operation
21659 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21660 * Free the returned object with g_object_unref().
21662 * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
21668 * g_file_monitor_cancel:
21669 * @monitor: a #GFileMonitor.
21671 * Cancels a file monitor.
21673 * Returns: %TRUE if monitor was cancelled.
21678 * g_file_monitor_directory:
21679 * @file: input #GFile.
21680 * @flags: a set of #GFileMonitorFlags.
21681 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21682 * @error: a #GError, or %NULL.
21684 * Obtains a directory monitor for the given file.
21685 * This may fail if directory monitoring is not supported.
21686 * If @cancellable is not %NULL, then the operation can be cancelled by
21687 * triggering the cancellable object from another thread. If the operation
21688 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21689 * Free the returned object with g_object_unref().
21691 * Virtual: monitor_dir
21692 * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
21697 * g_file_monitor_emit_event:
21698 * @monitor: a #GFileMonitor.
21699 * @child: a #GFile.
21700 * @other_file: a #GFile.
21701 * @event_type: a set of #GFileMonitorEvent flags.
21703 * Emits the #GFileMonitor::changed signal if a change
21704 * has taken place. Should be called from file monitor
21705 * implementations only.
21706 * The signal will be emitted from an idle handler (in the <link
21707 * linkend="g-main-context-push-thread-default">thread-default main
21713 * g_file_monitor_file:
21714 * @file: input #GFile.
21715 * @flags: a set of #GFileMonitorFlags.
21716 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21717 * @error: a #GError, or %NULL.
21719 * Obtains a file monitor for the given file. If no file notification
21720 * mechanism exists, then regular polling of the file is used.
21721 * If @cancellable is not %NULL, then the operation can be cancelled by
21722 * triggering the cancellable object from another thread. If the operation
21723 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21724 * Free the returned object with g_object_unref().
21726 * Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error.
21731 * g_file_monitor_is_cancelled:
21732 * @monitor: a #GFileMonitor
21734 * Returns whether the monitor is canceled.
21736 * Returns: %TRUE if monitor is canceled. %FALSE otherwise.
21741 * g_file_monitor_set_rate_limit:
21742 * @monitor: a #GFileMonitor.
21743 * @limit_msecs: a non-negative integer with the limit in milliseconds to poll for changes
21745 * Sets the rate limit to which the @monitor will report
21746 * consecutive change events to the same file.
21751 * g_file_mount_enclosing_volume:
21752 * @location: input #GFile.
21753 * @flags: flags affecting the operation
21754 * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
21755 * @cancellable: optional #GCancellable object, %NULL to ignore.
21756 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
21757 * @user_data: the data to pass to callback function
21759 * Starts a @mount_operation, mounting the volume that contains the file @location.
21760 * When this operation has completed, @callback will be called with
21761 * g_file_mount_enclosing_volume_finish().
21762 * If @cancellable is not %NULL, then the operation can be cancelled by
21763 * triggering the cancellable object from another thread. If the operation
21764 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21769 * g_file_mount_enclosing_volume_finish:
21770 * @location: input #GFile.
21771 * @result: a #GAsyncResult.
21772 * @error: a #GError, or %NULL
21774 * Finishes a mount operation started by g_file_mount_enclosing_volume().
21775 * has occurred, this function will return %FALSE and set @error
21776 * appropriately if present.
21778 * Returns: %TRUE if successful. If an error
21783 * g_file_mount_mountable:
21784 * @file: input #GFile.
21785 * @flags: flags affecting the operation
21786 * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
21787 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21788 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
21789 * @user_data: (closure): the data to pass to callback function
21791 * Mounts a file of type G_FILE_TYPE_MOUNTABLE.
21792 * Using @mount_operation, you can request callbacks when, for instance,
21793 * passwords are needed during authentication.
21794 * If @cancellable is not %NULL, then the operation can be cancelled by
21795 * triggering the cancellable object from another thread. If the operation
21796 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21797 * When the operation is finished, @callback will be called. You can then call
21798 * g_file_mount_mountable_finish() to get the result of the operation.
21803 * g_file_mount_mountable_finish:
21804 * @file: input #GFile.
21805 * @result: a #GAsyncResult.
21806 * @error: a #GError, or %NULL
21808 * Finishes a mount operation. See g_file_mount_mountable() for details.
21809 * Finish an asynchronous mount operation that was started
21810 * with g_file_mount_mountable().
21811 * Free the returned object with g_object_unref().
21813 * Returns: (transfer full): a #GFile or %NULL on error.
21819 * @source: #GFile pointing to the source location.
21820 * @destination: #GFile pointing to the destination location.
21821 * @flags: set of #GFileCopyFlags.
21822 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21823 * @progress_callback: (scope call): #GFileProgressCallback function for updates.
21824 * @progress_callback_data: (closure): gpointer to user data for the callback function.
21825 * @error: #GError for returning error conditions, or %NULL
21827 * Tries to move the file or directory @source to the location specified by @destination.
21828 * If native move operations are supported then this is used, otherwise a copy + delete
21829 * fallback is used. The native implementation may support moving directories (for instance
21830 * on moves inside the same filesystem), but the fallback code does not.
21831 * If the flag #G_FILE_COPY_OVERWRITE is specified an already
21832 * existing @destination file is overwritten.
21833 * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks
21834 * will be copied as symlinks, otherwise the target of the
21835 * If @cancellable is not %NULL, then the operation can be cancelled by
21836 * triggering the cancellable object from another thread. If the operation
21837 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21838 * If @progress_callback is not %NULL, then the operation can be monitored by
21839 * setting this to a #GFileProgressCallback function. @progress_callback_data
21840 * will be passed to this function. It is guaranteed that this callback will
21841 * be called after all data has been transferred with the total number of bytes
21842 * copied during the operation.
21843 * If the @source file does not exist then the G_IO_ERROR_NOT_FOUND
21844 * error is returned, independent on the status of the @destination.
21845 * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then the
21846 * error G_IO_ERROR_EXISTS is returned.
21847 * If trying to overwrite a file over a directory the G_IO_ERROR_IS_DIRECTORY
21848 * error is returned. If trying to overwrite a directory with a directory the
21849 * G_IO_ERROR_WOULD_MERGE error is returned.
21850 * If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is
21851 * specified and the target is a file, then the G_IO_ERROR_WOULD_RECURSE error
21852 * may be returned (if the native move operation isn't available).
21854 * Returns: %TRUE on successful move, %FALSE otherwise.
21859 * g_file_new_for_commandline_arg:
21860 * @arg: a command line string.
21862 * Creates a #GFile with the given argument from the command line. The value of
21863 * relative to the current working directory.
21864 * This operation never fails, but the returned object might not support any
21865 * I/O operation if @arg points to a malformed path.
21867 * Returns: (transfer full): a new #GFile.
21872 * g_file_new_for_path:
21873 * @path: a string containing a relative or absolute path. The string must be encoded in the glib filename encoding.
21875 * Constructs a #GFile for a given path. This operation never
21876 * fails, but the returned object might not support any I/O
21877 * operation if @path is malformed.
21879 * Returns: (transfer full): a new #GFile for the given @path.
21884 * g_file_new_for_uri:
21885 * @uri: a UTF8 string containing a URI.
21887 * Constructs a #GFile for a given URI. This operation never
21888 * fails, but the returned object might not support any I/O
21889 * operation if @uri is malformed or if the uri type is
21892 * Returns: (transfer full): a #GFile for the given @uri.
21897 * g_file_open_readwrite:
21898 * @file: #GFile to open
21899 * @cancellable: (allow-none): a #GCancellable
21900 * @error: a #GError, or %NULL
21902 * Opens an existing file for reading and writing. The result is
21903 * a #GFileIOStream that can be used to read and write the contents of the file.
21904 * If @cancellable is not %NULL, then the operation can be cancelled by
21905 * triggering the cancellable object from another thread. If the operation
21906 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
21907 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
21908 * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
21909 * Other errors are possible too, and depend on what kind of filesystem the file is on.
21910 * Note that in many non-local file cases read and write streams are not supported,
21911 * so make sure you really need to do read and write streaming, rather than
21912 * just opening for reading or writing.
21913 * Free the returned object with g_object_unref().
21915 * Returns: (transfer full): #GFileIOStream or %NULL on error.
21921 * g_file_open_readwrite_async:
21922 * @file: input #GFile.
21923 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
21924 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
21925 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
21926 * @user_data: (closure): the data to pass to callback function
21928 * Asynchronously opens @file for reading and writing.
21929 * For more details, see g_file_open_readwrite() which is
21930 * the synchronous version of this call.
21931 * When the operation is finished, @callback will be called. You can then call
21932 * g_file_open_readwrite_finish() to get the result of the operation.
21939 * g_file_open_readwrite_finish:
21940 * @file: input #GFile.
21941 * @res: a #GAsyncResult.
21942 * @error: a #GError, or %NULL
21944 * Finishes an asynchronous file read operation started with
21945 * g_file_open_readwrite_async().
21946 * Free the returned object with g_object_unref().
21948 * Returns: (transfer full): a #GFileIOStream or %NULL on error.
21954 * g_file_output_stream_get_etag:
21955 * @stream: a #GFileOutputStream.
21957 * Gets the entity tag for the file when it has been written.
21958 * This must be called after the stream has been written
21959 * and closed, as the etag can change while writing.
21961 * Returns: the entity tag for the stream.
21966 * g_file_output_stream_query_info:
21967 * @stream: a #GFileOutputStream.
21968 * @attributes: a file attribute query string.
21969 * @cancellable: optional #GCancellable object, %NULL to ignore.
21970 * @error: a #GError, %NULL to ignore.
21972 * Queries a file output stream for the given @attributes.
21973 * This function blocks while querying the stream. For the asynchronous
21974 * version of this function, see g_file_output_stream_query_info_async().
21975 * While the stream is blocked, the stream will set the pending flag
21976 * internally, and any other operations on the stream will fail with
21977 * %G_IO_ERROR_PENDING.
21978 * Can fail if the stream was already closed (with @error being set to
21979 * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being
21980 * set to %G_IO_ERROR_PENDING), or if querying info is not supported for
21981 * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In
21982 * all cases of failure, %NULL will be returned.
21983 * If @cancellable is not %NULL, then the operation can be cancelled by
21984 * triggering the cancellable object from another thread. If the operation
21985 * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
21988 * Returns: (transfer full): a #GFileInfo for the @stream, or %NULL on error.
21993 * g_file_output_stream_query_info_async:
21994 * @stream: a #GFileOutputStream.
21995 * @attributes: a file attribute query string.
21996 * @io_priority: the <link linkend="gio-GIOScheduler">I/O priority</link> of the request.
21997 * @cancellable: optional #GCancellable object, %NULL to ignore.
21998 * @callback: callback to call when the request is satisfied
21999 * @user_data: the data to pass to callback function
22001 * Asynchronously queries the @stream for a #GFileInfo. When completed,
22002 * finish the operation with g_file_output_stream_query_info_finish().
22003 * For the synchronous version of this function, see
22004 * g_file_output_stream_query_info().
22009 * g_file_output_stream_query_info_finish:
22010 * @stream: a #GFileOutputStream.
22011 * @result: a #GAsyncResult.
22012 * @error: a #GError, %NULL to ignore.
22014 * Finalizes the asynchronous query started
22015 * by g_file_output_stream_query_info_async().
22017 * Returns: (transfer full): A #GFileInfo for the finished query.
22022 * g_file_parse_name:
22023 * @parse_name: a file name or path to be parsed.
22025 * Constructs a #GFile with the given @parse_name (i.e. something given by g_file_get_parse_name()).
22026 * This operation never fails, but the returned object might not support any I/O
22027 * operation if the @parse_name cannot be parsed.
22029 * Returns: (transfer full): a new #GFile.
22034 * g_file_poll_mountable:
22035 * @file: input #GFile.
22036 * @cancellable: optional #GCancellable object, %NULL to ignore.
22037 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22038 * @user_data: the data to pass to callback function
22040 * Polls a file of type G_FILE_TYPE_MOUNTABLE.
22041 * If @cancellable is not %NULL, then the operation can be cancelled by
22042 * triggering the cancellable object from another thread. If the operation
22043 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22044 * When the operation is finished, @callback will be called. You can then call
22045 * g_file_mount_mountable_finish() to get the result of the operation.
22052 * g_file_poll_mountable_finish:
22053 * @file: input #GFile.
22054 * @result: a #GAsyncResult.
22055 * @error: a #GError, or %NULL
22057 * Finishes a poll operation. See g_file_poll_mountable() for details.
22058 * Finish an asynchronous poll operation that was polled
22059 * with g_file_poll_mountable().
22062 * Returns: %TRUE if the operation finished successfully. %FALSE
22068 * g_file_query_default_handler:
22069 * @file: a #GFile to open.
22070 * @cancellable: optional #GCancellable object, %NULL to ignore.
22071 * @error: a #GError, or %NULL
22073 * Returns the #GAppInfo that is registered as the default
22074 * application to handle the file specified by @file.
22075 * If @cancellable is not %NULL, then the operation can be cancelled by
22076 * triggering the cancellable object from another thread. If the operation
22077 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22078 * When you are done with it, release it with g_object_unref()
22080 * Returns: (transfer full): a #GAppInfo if the handle was found, %NULL if there were errors.
22085 * g_file_query_exists:
22086 * @file: input #GFile.
22087 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22089 * Utility function to check if a particular file exists. This is
22090 * implemented using g_file_query_info() and as such does blocking I/O.
22091 * Note that in many cases it is racy to first check for file existence
22092 * and then execute something based on the outcome of that, because the
22093 * file might have been created or removed in between the operations. The
22094 * general approach to handling that is to not check, but just do the
22095 * operation and handle the errors as they come.
22096 * As an example of race-free checking, take the case of reading a file, and
22097 * can both result in two processes creating the file (with perhaps a partially
22098 * written file as the result). The correct approach is to always try to create
22099 * the file with g_file_create() which will either atomically create the file
22100 * or fail with a G_IO_ERROR_EXISTS error.
22101 * However, in many cases an existence check is useful in a user
22102 * interface, for instance to make a menu item sensitive/insensitive, so that
22103 * you don't have to fool users that something is possible and then just show
22104 * and error dialog. If you do this, you should make sure to also handle the
22105 * errors that can happen due to races when you execute the operation.
22107 * If it doesn't exist, creating it. there are two racy versions: read it, and
22108 * On error create it; and: check if it exists, if not create it. These
22109 * Returns: %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled).
22114 * g_file_query_file_type:
22115 * @file: input #GFile.
22116 * @flags: a set of #GFileQueryInfoFlags passed to g_file_query_info().
22117 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22119 * Utility function to inspect the #GFileType of a file. This is
22120 * implemented using g_file_query_info() and as such does blocking I/O.
22121 * The primary use case of this method is to check if a file is a regular file,
22122 * directory, or symlink.
22125 * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN if the file
22131 * g_file_query_filesystem_info:
22132 * @file: input #GFile.
22133 * @attributes: an attribute query string.
22134 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22135 * @error: a #GError.
22137 * Similar to g_file_query_info(), but obtains information
22138 * about the filesystem the @file is on, rather than the file itself.
22139 * For instance the amount of space available and the type of
22141 * The @attributes value is a string that specifies the file attributes that
22142 * should be gathered. It is not an error if it's not possible to read a particular
22143 * requested attribute from a file - it just won't be set. @attributes should
22144 * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
22145 * means all attributes, and a wildcard like "fs:*" means all attributes in the fs
22146 * namespace. The standard namespace for filesystem attributes is "fs".
22147 * Common attributes of interest are #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE
22148 * (the total size of the filesystem in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of
22149 * bytes available), and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).
22150 * If @cancellable is not %NULL, then the operation can be cancelled by
22151 * triggering the cancellable object from another thread. If the operation
22152 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22153 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
22154 * Other errors are possible too, and depend on what kind of filesystem the file is on.
22155 * Free the returned object with g_object_unref().
22157 * Returns: (transfer full): a #GFileInfo or %NULL if there was an error.
22162 * g_file_query_filesystem_info_async:
22163 * @file: input #GFile.
22164 * @attributes: an attribute query string.
22165 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22166 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22167 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22168 * @user_data: (closure): the data to pass to callback function
22170 * Asynchronously gets the requested information about the filesystem
22171 * that the specified @file is on. The result is a #GFileInfo object
22172 * that contains key-value attributes (such as type or size for the
22174 * For more details, see g_file_query_filesystem_info() which is the
22175 * synchronous version of this call.
22176 * When the operation is finished, @callback will be called. You can
22177 * then call g_file_query_info_finish() to get the result of the
22183 * g_file_query_filesystem_info_finish:
22184 * @file: input #GFile.
22185 * @res: a #GAsyncResult.
22186 * @error: a #GError.
22188 * Finishes an asynchronous filesystem info query. See
22189 * g_file_query_filesystem_info_async().
22190 * Free the returned object with g_object_unref().
22192 * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
22197 * g_file_query_info:
22198 * @file: input #GFile.
22199 * @attributes: an attribute query string.
22200 * @flags: a set of #GFileQueryInfoFlags.
22201 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22202 * @error: a #GError.
22204 * Gets the requested information about specified @file. The result
22205 * is a #GFileInfo object that contains key-value attributes (such as
22206 * the type or size of the file).
22207 * The @attributes value is a string that specifies the file attributes that
22208 * should be gathered. It is not an error if it's not possible to read a particular
22209 * requested attribute from a file - it just won't be set. @attributes should
22210 * be a comma-separated list of attributes or attribute wildcards. The wildcard "*"
22211 * means all attributes, and a wildcard like "standard::*" means all attributes in the standard
22212 * namespace. An example attribute query be "standard::*,owner::user".
22213 * The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME.
22214 * If @cancellable is not %NULL, then the operation can be cancelled by
22215 * triggering the cancellable object from another thread. If the operation
22216 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22217 * For symlinks, normally the information about the target of the
22218 * symlink is returned, rather than information about the symlink itself.
22219 * However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in @flags the
22220 * information about the symlink itself will be returned. Also, for symlinks
22221 * that point to non-existing files the information about the symlink itself
22222 * will be returned.
22223 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
22224 * Other errors are possible too, and depend on what kind of filesystem the file is on.
22225 * Free the returned object with g_object_unref().
22227 * Returns: (transfer full): a #GFileInfo for the given @file, or %NULL on error.
22232 * g_file_query_info_async:
22233 * @file: input #GFile.
22234 * @attributes: an attribute query string.
22235 * @flags: a set of #GFileQueryInfoFlags.
22236 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22237 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22238 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22239 * @user_data: (closure): the data to pass to callback function
22241 * Asynchronously gets the requested information about specified @file. The result
22242 * is a #GFileInfo object that contains key-value attributes (such as type or size
22244 * For more details, see g_file_query_info() which is
22245 * the synchronous version of this call.
22246 * When the operation is finished, @callback will be called. You can then call
22247 * g_file_query_info_finish() to get the result of the operation.
22252 * g_file_query_info_finish:
22253 * @file: input #GFile.
22254 * @res: a #GAsyncResult.
22255 * @error: a #GError.
22257 * Finishes an asynchronous file info query.
22258 * See g_file_query_info_async().
22259 * Free the returned object with g_object_unref().
22261 * Returns: (transfer full): #GFileInfo for given @file or %NULL on error.
22266 * g_file_query_settable_attributes:
22267 * @file: input #GFile.
22268 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22269 * @error: a #GError, or %NULL
22271 * Obtain the list of settable attributes for the file.
22272 * Returns the type and full attribute name of all the attributes
22273 * that can be set on this file. This doesn't mean setting it will always
22274 * succeed though, you might get an access failure, or some specific
22275 * file may not support a specific attribute.
22276 * If @cancellable is not %NULL, then the operation can be cancelled by
22277 * triggering the cancellable object from another thread. If the operation
22278 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22279 * When you are done with it, release it with g_file_attribute_info_list_unref()
22281 * Returns: a #GFileAttributeInfoList describing the settable attributes.
22286 * g_file_query_writable_namespaces:
22287 * @file: input #GFile.
22288 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22289 * @error: a #GError, or %NULL
22291 * Obtain the list of attribute namespaces where new attributes
22292 * can be created by a user. An example of this is extended
22293 * attributes (in the "xattr" namespace).
22294 * If @cancellable is not %NULL, then the operation can be cancelled by
22295 * triggering the cancellable object from another thread. If the operation
22296 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22297 * When you are done with it, release it with g_file_attribute_info_list_unref()
22299 * Returns: a #GFileAttributeInfoList describing the writable namespaces.
22305 * @file: #GFile to read.
22306 * @cancellable: (allow-none): a #GCancellable
22307 * @error: a #GError, or %NULL
22309 * Opens a file for reading. The result is a #GFileInputStream that
22310 * can be used to read the contents of the file.
22311 * If @cancellable is not %NULL, then the operation can be cancelled by
22312 * triggering the cancellable object from another thread. If the operation
22313 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22314 * If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be returned.
22315 * If the file is a directory, the G_IO_ERROR_IS_DIRECTORY error will be returned.
22316 * Other errors are possible too, and depend on what kind of filesystem the file is on.
22317 * Free the returned object with g_object_unref().
22320 * Returns: (transfer full): #GFileInputStream or %NULL on error.
22325 * g_file_read_async:
22326 * @file: input #GFile
22327 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22328 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22329 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22330 * @user_data: (closure): the data to pass to callback function
22332 * Asynchronously opens @file for reading.
22333 * For more details, see g_file_read() which is
22334 * the synchronous version of this call.
22335 * When the operation is finished, @callback will be called. You can then call
22336 * g_file_read_finish() to get the result of the operation.
22341 * g_file_read_finish:
22342 * @file: input #GFile.
22343 * @res: a #GAsyncResult.
22344 * @error: a #GError, or %NULL
22346 * Finishes an asynchronous file read operation started with
22347 * g_file_read_async().
22348 * Free the returned object with g_object_unref().
22350 * Returns: (transfer full): a #GFileInputStream or %NULL on error.
22356 * @file: input #GFile.
22357 * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore.
22358 * @make_backup: %TRUE if a backup should be created.
22359 * @flags: a set of #GFileCreateFlags.
22360 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22361 * @error: a #GError, or %NULL
22363 * Returns an output stream for overwriting the file, possibly
22364 * creating a backup copy of the file first. If the file doesn't exist,
22365 * it will be created.
22366 * This will try to replace the file in the safest way possible so
22367 * that any errors during the writing will not affect an already
22368 * existing copy of the file. For instance, for local files it
22369 * may write to a temporary file and then atomically rename over
22370 * the destination when the stream is closed.
22371 * By default files created are generally readable by everyone,
22372 * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
22373 * will be made readable only to the current user, to the level that
22374 * is supported on the target filesystem.
22375 * If @cancellable is not %NULL, then the operation can be cancelled by
22376 * triggering the cancellable object from another thread. If the operation
22377 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22378 * If you pass in a non-#NULL @etag value, then this value is
22379 * compared to the current entity tag of the file, and if they differ
22380 * an G_IO_ERROR_WRONG_ETAG error is returned. This generally means
22381 * that the file has been changed since you last read it. You can get
22382 * the new etag from g_file_output_stream_get_etag() after you've
22383 * finished writing and closed the #GFileOutputStream. When you load
22384 * a new file you can use g_file_input_stream_query_info() to get
22385 * the etag of the file.
22386 * If @make_backup is %TRUE, this function will attempt to make a backup
22387 * of the current file before overwriting it. If this fails a G_IO_ERROR_CANT_CREATE_BACKUP
22388 * error will be returned. If you want to replace anyway, try again with
22389 * If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will be returned,
22390 * and if the file is some other form of non-regular file then a
22391 * G_IO_ERROR_NOT_REGULAR_FILE error will be returned.
22392 * Some file systems don't allow all file names, and may
22393 * return an G_IO_ERROR_INVALID_FILENAME error, and if the name
22394 * is to long G_IO_ERROR_FILENAME_TOO_LONG will be returned.
22395 * Other errors are possible too, and depend on what kind of
22396 * filesystem the file is on.
22397 * Free the returned object with g_object_unref().
22399 * Returns: (transfer full): a #GFileOutputStream or %NULL on error.
22404 * g_file_replace_async:
22405 * @file: input #GFile.
22406 * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
22407 * @make_backup: %TRUE if a backup should be created.
22408 * @flags: a set of #GFileCreateFlags.
22409 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22410 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22411 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22412 * @user_data: (closure): the data to pass to callback function
22414 * Asynchronously overwrites the file, replacing the contents, possibly
22415 * creating a backup copy of the file first.
22416 * For more details, see g_file_replace() which is
22417 * the synchronous version of this call.
22418 * When the operation is finished, @callback will be called. You can then call
22419 * g_file_replace_finish() to get the result of the operation.
22424 * g_file_replace_contents:
22425 * @file: input #GFile.
22426 * @contents: (element-type guint8) (array length=length): a string containing the new contents for @file.
22427 * @length: the length of @contents in bytes.
22428 * @etag: (allow-none): the old <link linkend="gfile-etag">entity tag</link> for the document, or %NULL
22429 * @make_backup: %TRUE if a backup should be created.
22430 * @flags: a set of #GFileCreateFlags.
22431 * @new_etag: (allow-none) (out): a location to a new <link linkend="gfile-etag">entity tag</link> for the document. This should be freed with g_free() when no longer needed, or %NULL
22432 * @cancellable: optional #GCancellable object, %NULL to ignore.
22433 * @error: a #GError, or %NULL
22435 * Replaces the contents of @file with @contents of @length bytes.
22436 * If @etag is specified (not %NULL) any existing file must have that etag, or
22437 * the error %G_IO_ERROR_WRONG_ETAG will be returned.
22438 * If @make_backup is %TRUE, this function will attempt to make a backup of @file.
22439 * If @cancellable is not %NULL, then the operation can be cancelled by
22440 * triggering the cancellable object from another thread. If the operation
22441 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22442 * The returned @new_etag can be used to verify that the file hasn't changed the
22443 * next time it is saved over.
22444 * has occurred, this function will return %FALSE and set @error
22445 * appropriately if present.
22447 * Returns: %TRUE if successful. If an error
22452 * g_file_replace_contents_async:
22453 * @file: input #GFile.
22454 * @contents: (element-type guint8) (array length=length): string of contents to replace the file with.
22455 * @length: the length of @contents in bytes.
22456 * @etag: (allow-none): a new <link linkend="gfile-etag">entity tag</link> for the @file, or %NULL
22457 * @make_backup: %TRUE if a backup should be created.
22458 * @flags: a set of #GFileCreateFlags.
22459 * @cancellable: optional #GCancellable object, %NULL to ignore.
22460 * @callback: a #GAsyncReadyCallback to call when the request is satisfied
22461 * @user_data: the data to pass to callback function
22463 * Starts an asynchronous replacement of @file with the given
22464 * current entity tag.
22465 * When this operation has completed, @callback will be called with
22466 * g_file_replace_contents_finish().
22467 * If @cancellable is not %NULL, then the operation can be cancelled by
22468 * triggering the cancellable object from another thread. If the operation
22469 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22470 * If @make_backup is %TRUE, this function will attempt to
22471 * make a backup of @file.
22476 * g_file_replace_contents_finish:
22477 * @file: input #GFile.
22478 * @res: a #GAsyncResult.
22479 * @new_etag: (out) (allow-none): a location of a new <link linkend="gfile-etag">entity tag</link> for the document. This should be freed with g_free() when it is no longer needed, or %NULL
22480 * @error: a #GError, or %NULL
22482 * Finishes an asynchronous replace of the given @file. See
22483 * g_file_replace_contents_async(). Sets @new_etag to the new entity
22484 * tag for the document, if present.
22486 * Returns: %TRUE on success, %FALSE on failure.
22491 * g_file_replace_finish:
22492 * @file: input #GFile.
22493 * @res: a #GAsyncResult.
22494 * @error: a #GError, or %NULL
22496 * Finishes an asynchronous file replace operation started with
22497 * g_file_replace_async().
22498 * Free the returned object with g_object_unref().
22500 * Returns: (transfer full): a #GFileOutputStream, or %NULL on error.
22505 * g_file_replace_readwrite:
22507 * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the current #GFile, or #NULL to ignore
22508 * @make_backup: %TRUE if a backup should be created
22509 * @flags: a set of #GFileCreateFlags
22510 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
22511 * @error: return location for a #GError, or %NULL
22513 * Returns an output stream for overwriting the file in readwrite mode,
22514 * possibly creating a backup copy of the file first. If the file doesn't
22515 * exist, it will be created.
22516 * For details about the behaviour, see g_file_replace() which does the same
22517 * thing but returns an output stream only.
22518 * Note that in many non-local file cases read and write streams are not
22519 * supported, so make sure you really need to do read and write streaming,
22520 * rather than just opening for reading or writing.
22521 * Free the returned object with g_object_unref().
22523 * Returns: (transfer full): a #GFileIOStream or %NULL on error.
22529 * g_file_replace_readwrite_async:
22530 * @file: input #GFile.
22531 * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the current #GFile, or NULL to ignore.
22532 * @make_backup: %TRUE if a backup should be created.
22533 * @flags: a set of #GFileCreateFlags.
22534 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22535 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22536 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22537 * @user_data: (closure): the data to pass to callback function
22539 * Asynchronously overwrites the file in read-write mode, replacing the
22540 * contents, possibly creating a backup copy of the file first.
22541 * For more details, see g_file_replace_readwrite() which is
22542 * the synchronous version of this call.
22543 * When the operation is finished, @callback will be called. You can then
22544 * call g_file_replace_readwrite_finish() to get the result of the operation.
22551 * g_file_replace_readwrite_finish:
22552 * @file: input #GFile.
22553 * @res: a #GAsyncResult.
22554 * @error: a #GError, or %NULL
22556 * Finishes an asynchronous file replace operation started with
22557 * g_file_replace_readwrite_async().
22558 * Free the returned object with g_object_unref().
22560 * Returns: (transfer full): a #GFileIOStream, or %NULL on error.
22566 * g_file_resolve_relative_path:
22567 * @file: input #GFile.
22568 * @relative_path: a given relative path string.
22570 * Resolves a relative path for @file to an absolute path.
22571 * This call does no blocking i/o.
22572 * is %NULL or if @file is invalid.
22573 * Free the returned object with g_object_unref().
22575 * Returns: (transfer full): #GFile to the resolved path. %NULL if @relative_path
22580 * g_file_set_attribute:
22581 * @file: input #GFile.
22582 * @attribute: a string containing the attribute's name.
22583 * @type: The type of the attribute
22584 * @value_p: a pointer to the value (or the pointer itself if the type is a pointer type)
22585 * @flags: a set of #GFileQueryInfoFlags.
22586 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22587 * @error: a #GError, or %NULL
22589 * Sets an attribute in the file with attribute name @attribute to @value.
22590 * If @cancellable is not %NULL, then the operation can be cancelled by
22591 * triggering the cancellable object from another thread. If the operation
22592 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22594 * Returns: %TRUE if the attribute was set, %FALSE otherwise.
22599 * g_file_set_attribute_byte_string:
22600 * @file: input #GFile.
22601 * @attribute: a string containing the attribute's name.
22602 * @value: a string containing the attribute's new value.
22603 * @flags: a #GFileQueryInfoFlags.
22604 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22605 * @error: a #GError, or %NULL
22607 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value.
22608 * If @attribute is of a different type, this operation will fail,
22609 * returning %FALSE.
22610 * If @cancellable is not %NULL, then the operation can be cancelled by
22611 * triggering the cancellable object from another thread. If the operation
22612 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22613 * in the @file, %FALSE otherwise.
22615 * Returns: %TRUE if the @attribute was successfully set to @value
22620 * g_file_set_attribute_int32:
22621 * @file: input #GFile.
22622 * @attribute: a string containing the attribute's name.
22623 * @value: a #gint32 containing the attribute's new value.
22624 * @flags: a #GFileQueryInfoFlags.
22625 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22626 * @error: a #GError, or %NULL
22628 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value.
22629 * If @attribute is of a different type, this operation will fail.
22630 * If @cancellable is not %NULL, then the operation can be cancelled by
22631 * triggering the cancellable object from another thread. If the operation
22632 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22633 * in the @file, %FALSE otherwise.
22635 * Returns: %TRUE if the @attribute was successfully set to @value
22640 * g_file_set_attribute_int64:
22641 * @file: input #GFile.
22642 * @attribute: a string containing the attribute's name.
22643 * @value: a #guint64 containing the attribute's new value.
22644 * @flags: a #GFileQueryInfoFlags.
22645 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22646 * @error: a #GError, or %NULL
22648 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value.
22649 * If @attribute is of a different type, this operation will fail.
22650 * If @cancellable is not %NULL, then the operation can be cancelled by
22651 * triggering the cancellable object from another thread. If the operation
22652 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22654 * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
22659 * g_file_set_attribute_string:
22660 * @file: input #GFile.
22661 * @attribute: a string containing the attribute's name.
22662 * @value: a string containing the attribute's value.
22663 * @flags: #GFileQueryInfoFlags.
22664 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22665 * @error: a #GError, or %NULL
22667 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value.
22668 * If @attribute is of a different type, this operation will fail.
22669 * If @cancellable is not %NULL, then the operation can be cancelled by
22670 * triggering the cancellable object from another thread. If the operation
22671 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22673 * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise.
22678 * g_file_set_attribute_uint32:
22679 * @file: input #GFile.
22680 * @attribute: a string containing the attribute's name.
22681 * @value: a #guint32 containing the attribute's new value.
22682 * @flags: a #GFileQueryInfoFlags.
22683 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22684 * @error: a #GError, or %NULL
22686 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value.
22687 * If @attribute is of a different type, this operation will fail.
22688 * If @cancellable is not %NULL, then the operation can be cancelled by
22689 * triggering the cancellable object from another thread. If the operation
22690 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22691 * in the @file, %FALSE otherwise.
22693 * Returns: %TRUE if the @attribute was successfully set to @value
22698 * g_file_set_attribute_uint64:
22699 * @file: input #GFile.
22700 * @attribute: a string containing the attribute's name.
22701 * @value: a #guint64 containing the attribute's new value.
22702 * @flags: a #GFileQueryInfoFlags.
22703 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22704 * @error: a #GError, or %NULL
22706 * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value.
22707 * If @attribute is of a different type, this operation will fail.
22708 * If @cancellable is not %NULL, then the operation can be cancelled by
22709 * triggering the cancellable object from another thread. If the operation
22710 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22711 * in the @file, %FALSE otherwise.
22713 * Returns: %TRUE if the @attribute was successfully set to @value
22718 * g_file_set_attributes_async:
22719 * @file: input #GFile.
22720 * @info: a #GFileInfo.
22721 * @flags: a #GFileQueryInfoFlags.
22722 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22723 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22724 * @callback: (scope async): a #GAsyncReadyCallback.
22725 * @user_data: (closure): a #gpointer.
22727 * Asynchronously sets the attributes of @file with @info.
22728 * For more details, see g_file_set_attributes_from_info() which is
22729 * the synchronous version of this call.
22730 * When the operation is finished, @callback will be called. You can then call
22731 * g_file_set_attributes_finish() to get the result of the operation.
22736 * g_file_set_attributes_finish:
22737 * @file: input #GFile.
22738 * @result: a #GAsyncResult.
22739 * @info: (out) (transfer full): a #GFileInfo.
22740 * @error: a #GError, or %NULL
22742 * Finishes setting an attribute started in g_file_set_attributes_async().
22744 * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise.
22749 * g_file_set_attributes_from_info:
22750 * @file: input #GFile.
22751 * @info: a #GFileInfo.
22752 * @flags: #GFileQueryInfoFlags
22753 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22754 * @error: a #GError, or %NULL
22756 * Tries to set all attributes in the #GFileInfo on the target values,
22757 * not stopping on the first error.
22758 * If there is any error during this operation then @error will be set to
22759 * the first error. Error on particular fields are flagged by setting
22760 * the "status" field in the attribute value to
22761 * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can also detect
22763 * If @cancellable is not %NULL, then the operation can be cancelled by
22764 * triggering the cancellable object from another thread. If the operation
22765 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22767 * Returns: %TRUE if there was any error, %FALSE otherwise.
22772 * g_file_set_display_name:
22773 * @file: input #GFile.
22774 * @display_name: a string.
22775 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22776 * @error: a #GError, or %NULL
22778 * Renames @file to the specified display name.
22779 * The display name is converted from UTF8 to the correct encoding for the target
22780 * filesystem if possible and the @file is renamed to this.
22781 * If you want to implement a rename operation in the user interface the edit name
22782 * (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the initial value in the rename
22783 * widget, and then the result after editing should be passed to g_file_set_display_name().
22784 * On success the resulting converted filename is returned.
22785 * If @cancellable is not %NULL, then the operation can be cancelled by
22786 * triggering the cancellable object from another thread. If the operation
22787 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22788 * if there was an error.
22789 * Free the returned object with g_object_unref().
22791 * Returns: (transfer full): a #GFile specifying what @file was renamed to, or %NULL
22796 * g_file_set_display_name_async:
22797 * @file: input #GFile.
22798 * @display_name: a string.
22799 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
22800 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22801 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
22802 * @user_data: (closure): the data to pass to callback function
22804 * Asynchronously sets the display name for a given #GFile.
22805 * For more details, see g_file_set_display_name() which is
22806 * the synchronous version of this call.
22807 * When the operation is finished, @callback will be called. You can then call
22808 * g_file_set_display_name_finish() to get the result of the operation.
22813 * g_file_set_display_name_finish:
22814 * @file: input #GFile.
22815 * @res: a #GAsyncResult.
22816 * @error: a #GError, or %NULL
22818 * Finishes setting a display name started with
22819 * g_file_set_display_name_async().
22820 * Free the returned object with g_object_unref().
22822 * Returns: (transfer full): a #GFile or %NULL on error.
22827 * g_file_start_mountable:
22828 * @file: input #GFile.
22829 * @flags: flags affecting the operation
22830 * @start_operation: a #GMountOperation, or %NULL to avoid user interaction.
22831 * @cancellable: optional #GCancellable object, %NULL to ignore.
22832 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22833 * @user_data: the data to pass to callback function
22835 * Starts a file of type G_FILE_TYPE_MOUNTABLE.
22836 * Using @start_operation, you can request callbacks when, for instance,
22837 * passwords are needed during authentication.
22838 * If @cancellable is not %NULL, then the operation can be cancelled by
22839 * triggering the cancellable object from another thread. If the operation
22840 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22841 * When the operation is finished, @callback will be called. You can then call
22842 * g_file_mount_mountable_finish() to get the result of the operation.
22849 * g_file_start_mountable_finish:
22850 * @file: input #GFile.
22851 * @result: a #GAsyncResult.
22852 * @error: a #GError, or %NULL
22854 * Finishes a start operation. See g_file_start_mountable() for details.
22855 * Finish an asynchronous start operation that was started
22856 * with g_file_start_mountable().
22859 * Returns: %TRUE if the operation finished successfully. %FALSE
22865 * g_file_stop_mountable:
22866 * @file: input #GFile.
22867 * @flags: flags affecting the operation
22868 * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
22869 * @cancellable: optional #GCancellable object, %NULL to ignore.
22870 * @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22871 * @user_data: the data to pass to callback function
22873 * Stops a file of type G_FILE_TYPE_MOUNTABLE.
22874 * If @cancellable is not %NULL, then the operation can be cancelled by
22875 * triggering the cancellable object from another thread. If the operation
22876 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22877 * When the operation is finished, @callback will be called. You can then call
22878 * g_file_stop_mountable_finish() to get the result of the operation.
22885 * g_file_stop_mountable_finish:
22886 * @file: input #GFile.
22887 * @result: a #GAsyncResult.
22888 * @error: a #GError, or %NULL
22890 * Finishes an stop operation, see g_file_stop_mountable() for details.
22891 * Finish an asynchronous stop operation that was started
22892 * with g_file_stop_mountable().
22895 * Returns: %TRUE if the operation finished successfully. %FALSE
22901 * g_file_supports_thread_contexts:
22904 * Checks if @file supports <link
22905 * linkend="g-main-context-push-thread-default-context">thread-default
22906 * contexts</link>. If this returns %FALSE, you cannot perform
22907 * asynchronous operations on @file in a thread that has a
22908 * thread-default context.
22910 * Returns: Whether or not @file supports thread-default contexts.
22917 * @file: #GFile to send to trash.
22918 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22919 * @error: a #GError, or %NULL
22921 * Sends @file to the "Trashcan", if possible. This is similar to
22922 * deleting it, but the user can recover it before emptying the trashcan.
22923 * Not all file systems support trashing, so this call can return the
22924 * %G_IO_ERROR_NOT_SUPPORTED error.
22925 * If @cancellable is not %NULL, then the operation can be cancelled by
22926 * triggering the cancellable object from another thread. If the operation
22927 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22929 * Returns: %TRUE on successful trash, %FALSE otherwise.
22934 * g_file_unmount_mountable:
22935 * @file: input #GFile.
22936 * @flags: flags affecting the operation
22937 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22938 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22939 * @user_data: (closure): the data to pass to callback function
22941 * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
22942 * If @cancellable is not %NULL, then the operation can be cancelled by
22943 * triggering the cancellable object from another thread. If the operation
22944 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22945 * When the operation is finished, @callback will be called. You can then call
22946 * g_file_unmount_mountable_finish() to get the result of the operation.
22948 * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation() instead.
22953 * g_file_unmount_mountable_finish:
22954 * @file: input #GFile.
22955 * @result: a #GAsyncResult.
22956 * @error: a #GError, or %NULL
22958 * Finishes an unmount operation, see g_file_unmount_mountable() for details.
22959 * Finish an asynchronous unmount operation that was started
22960 * with g_file_unmount_mountable().
22963 * Returns: %TRUE if the operation finished successfully. %FALSE
22964 * Deprecated: 2.22: Use g_file_unmount_mountable_with_operation_finish() instead.
22969 * g_file_unmount_mountable_with_operation:
22970 * @file: input #GFile.
22971 * @flags: flags affecting the operation
22972 * @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
22973 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
22974 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
22975 * @user_data: (closure): the data to pass to callback function
22977 * Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
22978 * If @cancellable is not %NULL, then the operation can be cancelled by
22979 * triggering the cancellable object from another thread. If the operation
22980 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
22981 * When the operation is finished, @callback will be called. You can then call
22982 * g_file_unmount_mountable_finish() to get the result of the operation.
22989 * g_file_unmount_mountable_with_operation_finish:
22990 * @file: input #GFile.
22991 * @result: a #GAsyncResult.
22992 * @error: a #GError, or %NULL
22994 * Finishes an unmount operation, see g_file_unmount_mountable_with_operation() for details.
22995 * Finish an asynchronous unmount operation that was started
22996 * with g_file_unmount_mountable_with_operation().
22999 * Returns: %TRUE if the operation finished successfully. %FALSE
23005 * g_filename_completer_get_completion_suffix:
23006 * @completer: the filename completer.
23007 * @initial_text: text to be completed.
23009 * Obtains a completion for @initial_text from @completer.
23010 * This string is not owned by GIO, so remember to g_free() it
23013 * Returns: a completed string, or %NULL if no completion exists.
23018 * g_filename_completer_get_completions:
23019 * @completer: the filename completer.
23020 * @initial_text: text to be completed.
23022 * Gets an array of completion strings for a given initial text.
23023 * This array must be freed by g_strfreev() when finished.
23025 * Returns: (array zero-terminated=1) (transfer full): array of strings with possible completions for @initial_text.
23030 * g_filename_completer_new:
23032 * Creates a new filename completer.
23034 * Returns: a #GFilenameCompleter.
23039 * g_filename_completer_set_dirs_only:
23040 * @completer: the filename completer.
23041 * @dirs_only: a #gboolean.
23043 * If @dirs_only is %TRUE, @completer will only
23044 * complete directory names, and not file names.
23049 * g_filter_input_stream_get_base_stream:
23050 * @stream: a #GFilterInputStream.
23052 * Gets the base stream for the filter stream.
23054 * Returns: (transfer none): a #GInputStream.
23059 * g_filter_input_stream_get_close_base_stream:
23060 * @stream: a #GFilterInputStream.
23062 * Returns whether the base stream will be closed when @stream is
23065 * Returns: %TRUE if the base stream will be closed.
23070 * g_filter_input_stream_set_close_base_stream:
23071 * @stream: a #GFilterInputStream.
23072 * @close_base: %TRUE to close the base stream.
23074 * Sets whether the base stream will be closed when @stream is closed.
23079 * g_filter_output_stream_get_base_stream:
23080 * @stream: a #GFilterOutputStream.
23082 * Gets the base stream for the filter stream.
23084 * Returns: (transfer none): a #GOutputStream.
23089 * g_filter_output_stream_get_close_base_stream:
23090 * @stream: a #GFilterOutputStream.
23092 * Returns whether the base stream will be closed when @stream is
23095 * Returns: %TRUE if the base stream will be closed.
23100 * g_filter_output_stream_set_close_base_stream:
23101 * @stream: a #GFilterOutputStream.
23102 * @close_base: %TRUE to close the base stream.
23104 * Sets whether the base stream will be closed when @stream is closed.
23109 * g_hash_table_freeze:
23110 * @hash_table: a #GHashTable
23112 * This function is deprecated and will be removed in the next major
23113 * release of GLib. It does nothing.
23118 * g_hash_table_thaw:
23119 * @hash_table: a #GHashTable
23121 * This function is deprecated and will be removed in the next major
23122 * release of GLib. It does nothing.
23128 * @icon1: pointer to the first #GIcon.
23129 * @icon2: pointer to the second #GIcon.
23131 * Checks if two icons are equal.
23133 * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise.
23139 * @icon: #gconstpointer to an icon object.
23141 * Gets a hash for an icon.
23142 * use in a #GHashTable or similar data structure.
23145 * Returns: a #guint containing a hash for the @icon, suitable for
23150 * g_icon_new_for_string:
23151 * @str: A string obtained via g_icon_to_string().
23152 * @error: Return location for error.
23154 * Generate a #GIcon instance from @str. This function can fail if
23155 * If your application or library provides one or more #GIcon
23156 * implementations you need to ensure that each #GType is registered
23157 * with the type system prior to calling g_icon_new_for_string().
23158 * interface or %NULL if @error is set.
23160 * Returns: (transfer full): An object implementing the #GIcon
23166 * g_icon_to_string:
23169 * Generates a textual representation of @icon that can be used for
23170 * serialization such as when passing @icon to a different process or
23171 * saving it to persistent storage. Use g_icon_new_for_string() to
23172 * get @icon back from the returned string.
23173 * The encoding of the returned string is proprietary to #GIcon except
23174 * in the following two cases
23177 * If @icon is a #GFileIcon, the returned string is a native path
23178 * (such as <literal>/path/to/my icon.png</literal>) without escaping
23179 * if the #GFile for @icon is a native file. If the file is not
23180 * native, the returned string is the result of g_file_get_uri()
23181 * (such as <literal>sftp://path/to/my%%20icon.png</literal>).
23182 * </para></listitem>
23184 * If @icon is a #GThemedIcon with exactly one name, the encoding is
23185 * simply the name (such as <literal>network-server</literal>).
23186 * </para></listitem>
23188 * be serialized. Use g_free() to free.
23190 * Virtual: to_tokens
23191 * Returns: An allocated NUL-terminated UTF8 string or %NULL if @icon can't
23197 * g_inet_address_get_family:
23198 * @address: a #GInetAddress
23200 * Gets @address's family
23202 * Returns: @address's family
23208 * g_inet_address_get_is_any:
23209 * @address: a #GInetAddress
23211 * Tests whether @address is the "any" address for its family.
23213 * Returns: %TRUE if @address is the "any" address for its family.
23219 * g_inet_address_get_is_link_local:
23220 * @address: a #GInetAddress
23222 * Tests whether @address is a link-local address (that is, if it
23223 * identifies a host on a local network that is not connected to the
23226 * Returns: %TRUE if @address is a link-local address.
23232 * g_inet_address_get_is_loopback:
23233 * @address: a #GInetAddress
23235 * Tests whether @address is the loopback address for its family.
23237 * Returns: %TRUE if @address is the loopback address for its family.
23243 * g_inet_address_get_is_mc_global:
23244 * @address: a #GInetAddress
23246 * Tests whether @address is a global multicast address.
23248 * Returns: %TRUE if @address is a global multicast address.
23254 * g_inet_address_get_is_mc_link_local:
23255 * @address: a #GInetAddress
23257 * Tests whether @address is a link-local multicast address.
23259 * Returns: %TRUE if @address is a link-local multicast address.
23265 * g_inet_address_get_is_mc_node_local:
23266 * @address: a #GInetAddress
23268 * Tests whether @address is a node-local multicast address.
23270 * Returns: %TRUE if @address is a node-local multicast address.
23276 * g_inet_address_get_is_mc_org_local:
23277 * @address: a #GInetAddress
23279 * Tests whether @address is an organization-local multicast address.
23281 * Returns: %TRUE if @address is an organization-local multicast address.
23287 * g_inet_address_get_is_mc_site_local:
23288 * @address: a #GInetAddress
23290 * Tests whether @address is a site-local multicast address.
23292 * Returns: %TRUE if @address is a site-local multicast address.
23298 * g_inet_address_get_is_multicast:
23299 * @address: a #GInetAddress
23301 * Tests whether @address is a multicast address.
23303 * Returns: %TRUE if @address is a multicast address.
23309 * g_inet_address_get_is_site_local:
23310 * @address: a #GInetAddress
23312 * Tests whether @address is a site-local address such as 10.0.0.1
23313 * (that is, the address identifies a host on a local network that can
23314 * not be reached directly from the Internet, but which may have
23315 * outgoing Internet connectivity via a NAT or firewall).
23317 * Returns: %TRUE if @address is a site-local address.
23323 * g_inet_address_get_native_size:
23324 * @address: a #GInetAddress
23326 * Gets the size of the native raw binary address for @address. This
23327 * is the size of the data that you get from g_inet_address_to_bytes().
23329 * Returns: the number of bytes used for the native version of @address.
23335 * g_inet_address_new_any:
23336 * @family: the address family
23338 * Creates a #GInetAddress for the "any" address (unassigned/"don't
23339 * care") for @family.
23342 * Returns: a new #GInetAddress corresponding to the "any" address
23348 * g_inet_address_new_from_bytes:
23349 * @bytes: raw address data
23350 * @family: the address family of @bytes
23352 * Creates a new #GInetAddress from the given @family and @bytes.
23353 * %G_INET_ADDRESS_IPV6.
23355 * Returns: a new #GInetAddress corresponding to @family and @bytes.
23361 * g_inet_address_new_from_string:
23362 * @string: a string representation of an IP address
23364 * Parses @string as an IP address and creates a new #GInetAddress.
23366 * Returns: a new #GInetAddress corresponding to @string, or %NULL if
23372 * g_inet_address_new_loopback:
23373 * @family: the address family
23375 * Creates a #GInetAddress for the loopback address for @family.
23378 * Returns: a new #GInetAddress corresponding to the loopback address
23384 * g_inet_address_to_bytes: (skip)
23385 * @address: a #GInetAddress
23387 * Gets the raw binary address data from @address.
23388 * which should not be modified, stored, or freed. The size of this
23389 * array can be gotten with g_inet_address_get_native_size().
23391 * Returns: a pointer to an internal array of the bytes in @address,
23397 * g_inet_address_to_string:
23398 * @address: a #GInetAddress
23400 * Converts @address to string form.
23403 * Returns: a representation of @address as a string, which should be
23409 * g_inet_socket_address_get_address:
23410 * @address: a #GInetSocketAddress
23412 * Gets @address's #GInetAddress.
23413 * g_object_ref()'d if it will be stored
23415 * Returns: (transfer none): the #GInetAddress for @address, which must be
23421 * g_inet_socket_address_get_port:
23422 * @address: a #GInetSocketAddress
23424 * Gets @address's port.
23426 * Returns: the port for @address
23432 * g_inet_socket_address_new:
23433 * @address: a #GInetAddress
23434 * @port: a port number
23436 * Creates a new #GInetSocketAddress for @address and @port.
23438 * Returns: a new #GInetSocketAddress
23445 * @initable: a #GInitable.
23446 * @cancellable: optional #GCancellable object, %NULL to ignore.
23447 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23449 * Initializes the object implementing the interface. This must be
23450 * done before any real use of the object after initial construction.
23451 * Implementations may also support cancellation. If @cancellable is not %NULL,
23452 * then initialization can be cancelled by triggering the cancellable object
23453 * from another thread. If the operation was cancelled, the error
23454 * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
23455 * the object doesn't support cancellable initialization the error
23456 * %G_IO_ERROR_NOT_SUPPORTED will be returned.
23457 * If this function is not called, or returns with an error then all
23458 * operations on the object should fail, generally returning the
23459 * error %G_IO_ERROR_NOT_INITIALIZED.
23460 * Implementations of this method must be idempotent, i.e. multiple calls
23461 * to this function with the same argument should return the same results.
23462 * Only the first call initializes the object, further calls return the result
23463 * of the first call. This is so that its safe to implement the singleton
23464 * pattern in the GObject constructor function.
23465 * return %FALSE and set @error appropriately if present.
23467 * Returns: %TRUE if successful. If an error has occurred, this function will
23474 * @object_type: a #GType supporting #GInitable.
23475 * @cancellable: optional #GCancellable object, %NULL to ignore.
23476 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23477 * @first_property_name: the name of the first property, or %NULL if no properties
23478 * @...: the value if the first property, followed by and other property value pairs, and ended by %NULL.
23480 * Helper function for constructing #GInitiable object. This is
23481 * similar to g_object_new() but also initializes the object
23482 * and returns %NULL, setting an error on failure.
23484 * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
23490 * g_initable_new_valist:
23491 * @object_type: a #GType supporting #GInitable.
23492 * @first_property_name: the name of the first property, followed by the value, and other property value pairs, and ended by %NULL.
23493 * @var_args: The var args list generated from @first_property_name.
23494 * @cancellable: optional #GCancellable object, %NULL to ignore.
23495 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23497 * Helper function for constructing #GInitiable object. This is
23498 * similar to g_object_new_valist() but also initializes the object
23499 * and returns %NULL, setting an error on failure.
23501 * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
23508 * @object_type: a #GType supporting #GInitable.
23509 * @n_parameters: the number of parameters in @parameters
23510 * @parameters: the parameters to use to construct the object
23511 * @cancellable: optional #GCancellable object, %NULL to ignore.
23512 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23514 * Helper function for constructing #GInitiable object. This is
23515 * similar to g_object_newv() but also initializes the object
23516 * and returns %NULL, setting an error on failure.
23518 * Returns: (transfer full): a newly allocated #GObject, or %NULL on error
23524 * g_input_stream_clear_pending:
23525 * @stream: input stream
23527 * Clears the pending flag on @stream.
23532 * g_input_stream_close:
23533 * @stream: A #GInputStream.
23534 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23535 * @error: location to store the error occuring, or %NULL to ignore
23537 * Closes the stream, releasing resources related to it.
23538 * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
23539 * Closing a stream multiple times will not return an error.
23540 * Streams will be automatically closed when the last reference
23541 * is dropped, but you might want to call this function to make sure
23542 * resources are released as early as possible.
23543 * Some streams might keep the backing store of the stream (e.g. a file descriptor)
23544 * open after the stream is closed. See the documentation for the individual
23545 * stream for details.
23546 * On failure the first error that happened will be reported, but the close
23547 * operation will finish as much as possible. A stream that failed to
23548 * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
23549 * is important to check and report the error to the user.
23550 * If @cancellable is not NULL, then the operation can be cancelled by
23551 * triggering the cancellable object from another thread. If the operation
23552 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
23553 * Cancelling a close will still leave the stream closed, but some streams
23554 * can use a faster close that doesn't block to e.g. check errors.
23556 * Returns: %TRUE on success, %FALSE on failure
23561 * g_input_stream_close_async:
23562 * @stream: A #GInputStream.
23563 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23564 * @cancellable: (allow-none): optional cancellable object
23565 * @callback: (scope async): callback to call when the request is satisfied
23566 * @user_data: (closure): the data to pass to callback function
23568 * Requests an asynchronous closes of the stream, releasing resources related to it.
23569 * When the operation is finished @callback will be called.
23570 * You can then call g_input_stream_close_finish() to get the result of the
23572 * For behaviour details see g_input_stream_close().
23573 * The asyncronous methods have a default fallback that uses threads to implement
23574 * asynchronicity, so they are optional for inheriting classes. However, if you
23575 * override one you must override all.
23580 * g_input_stream_close_finish:
23581 * @stream: a #GInputStream.
23582 * @result: a #GAsyncResult.
23583 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23585 * Finishes closing a stream asynchronously, started from g_input_stream_close_async().
23587 * Returns: %TRUE if the stream was closed successfully.
23592 * g_input_stream_has_pending:
23593 * @stream: input stream.
23595 * Checks if an input stream has pending actions.
23597 * Returns: %TRUE if @stream has pending actions.
23602 * g_input_stream_is_closed:
23603 * @stream: input stream.
23605 * Checks if an input stream is closed.
23607 * Returns: %TRUE if the stream is closed.
23612 * g_input_stream_read:
23613 * @stream: a #GInputStream.
23614 * @buffer: a buffer to read data into (which should be at least count bytes long).
23615 * @count: the number of bytes that will be read from the stream
23616 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23617 * @error: location to store the error occuring, or %NULL to ignore
23619 * Tries to read @count bytes from the stream into the buffer starting at
23620 * If count is zero returns zero and does nothing. A value of @count
23621 * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
23622 * On success, the number of bytes read into the buffer is returned.
23623 * It is not an error if this is not the same as the requested size, as it
23624 * can happen e.g. near the end of a file. Zero is returned on end of file
23625 * (or if @count is zero), but never otherwise.
23626 * If @cancellable is not NULL, then the operation can be cancelled by
23627 * triggering the cancellable object from another thread. If the operation
23628 * was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an
23629 * operation was partially finished when the operation was cancelled the
23630 * partial result will be returned, without an error.
23631 * On error -1 is returned and @error is set accordingly.
23633 * Returns: Number of bytes read, or -1 on error
23638 * g_input_stream_read_all:
23639 * @stream: a #GInputStream.
23640 * @buffer: a buffer to read data into (which should be at least count bytes long).
23641 * @count: the number of bytes that will be read from the stream
23642 * @bytes_read: (out): location to store the number of bytes that was read from the stream
23643 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23644 * @error: location to store the error occuring, or %NULL to ignore
23646 * Tries to read @count bytes from the stream into the buffer starting at
23647 * This function is similar to g_input_stream_read(), except it tries to
23648 * read as many bytes as requested, only stopping on an error or end of stream.
23649 * On a successful read of @count bytes, or if we reached the end of the
23650 * stream, %TRUE is returned, and @bytes_read is set to the number of bytes
23651 * read into @buffer.
23652 * If there is an error during the operation %FALSE is returned and @error
23653 * is set to indicate the error status, @bytes_read is updated to contain
23654 * the number of bytes read into @buffer before the error occurred.
23656 * Returns: %TRUE on success, %FALSE if there was an error
23661 * g_input_stream_read_async:
23662 * @stream: A #GInputStream.
23663 * @buffer: a buffer to read data into (which should be at least count bytes long).
23664 * @count: the number of bytes that will be read from the stream
23665 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23666 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23667 * @callback: (scope async): callback to call when the request is satisfied
23668 * @user_data: (closure): the data to pass to callback function
23670 * Request an asynchronous read of @count bytes from the stream into the buffer
23671 * starting at @buffer. When the operation is finished @callback will be called.
23672 * You can then call g_input_stream_read_finish() to get the result of the
23674 * During an async request no other sync and async calls are allowed on @stream, and will
23675 * result in %G_IO_ERROR_PENDING errors.
23676 * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
23677 * On success, the number of bytes read into the buffer will be passed to the
23678 * callback. It is not an error if this is not the same as the requested size, as it
23679 * can happen e.g. near the end of a file, but generally we try to read
23680 * as many bytes as requested. Zero is returned on end of file
23681 * (or if @count is zero), but never otherwise.
23682 * Any outstanding i/o request with higher priority (lower numerical value) will
23683 * be executed before an outstanding request with lower priority. Default
23684 * priority is %G_PRIORITY_DEFAULT.
23685 * The asyncronous methods have a default fallback that uses threads to implement
23686 * asynchronicity, so they are optional for inheriting classes. However, if you
23687 * override one you must override all.
23692 * g_input_stream_read_finish:
23693 * @stream: a #GInputStream.
23694 * @result: a #GAsyncResult.
23695 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23697 * Finishes an asynchronous stream read operation.
23699 * Returns: number of bytes read in, or -1 on error.
23704 * g_input_stream_set_pending:
23705 * @stream: input stream
23706 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23708 * Sets @stream to have actions pending. If the pending flag is
23709 * already set or @stream is closed, it will return %FALSE and set
23711 * Returns: %TRUE if pending was previously unset and is now set.
23716 * g_input_stream_skip:
23717 * @stream: a #GInputStream.
23718 * @count: the number of bytes that will be skipped from the stream
23719 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23720 * @error: location to store the error occuring, or %NULL to ignore
23722 * Tries to skip @count bytes from the stream. Will block during the operation.
23723 * This is identical to g_input_stream_read(), from a behaviour standpoint,
23724 * but the bytes that are skipped are not returned to the user. Some
23725 * streams have an implementation that is more efficient than reading the data.
23726 * This function is optional for inherited classes, as the default implementation
23727 * emulates it using read.
23728 * If @cancellable is not %NULL, then the operation can be cancelled by
23729 * triggering the cancellable object from another thread. If the operation
23730 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
23731 * operation was partially finished when the operation was cancelled the
23732 * partial result will be returned, without an error.
23734 * Returns: Number of bytes skipped, or -1 on error
23739 * g_input_stream_skip_async:
23740 * @stream: A #GInputStream.
23741 * @count: the number of bytes that will be skipped from the stream
23742 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
23743 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
23744 * @callback: (scope async): callback to call when the request is satisfied
23745 * @user_data: (closure): the data to pass to callback function
23747 * Request an asynchronous skip of @count bytes from the stream.
23748 * When the operation is finished @callback will be called.
23749 * You can then call g_input_stream_skip_finish() to get the result
23750 * of the operation.
23751 * During an async request no other sync and async calls are allowed,
23752 * and will result in %G_IO_ERROR_PENDING errors.
23753 * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
23754 * On success, the number of bytes skipped will be passed to the callback.
23755 * It is not an error if this is not the same as the requested size, as it
23756 * can happen e.g. near the end of a file, but generally we try to skip
23757 * as many bytes as requested. Zero is returned on end of file
23758 * (or if @count is zero), but never otherwise.
23759 * Any outstanding i/o request with higher priority (lower numerical value)
23760 * will be executed before an outstanding request with lower priority.
23761 * Default priority is %G_PRIORITY_DEFAULT.
23762 * The asynchronous methods have a default fallback that uses threads to
23763 * implement asynchronicity, so they are optional for inheriting classes.
23764 * However, if you override one, you must override all.
23769 * g_input_stream_skip_finish:
23770 * @stream: a #GInputStream.
23771 * @result: a #GAsyncResult.
23772 * @error: a #GError location to store the error occuring, or %NULL to ignore.
23774 * Finishes a stream skip operation.
23776 * Returns: the size of the bytes skipped, or %-1 on error.
23781 * g_io_error_from_errno:
23782 * @err_no: Error number as defined in errno.h.
23784 * Converts errno.h error codes into GIO error codes.
23786 * Returns: #GIOErrorEnum value for the given errno.h error number.
23791 * g_io_error_from_win32_error:
23792 * @error_code: Windows error number.
23794 * Converts some common error codes into GIO error codes. The
23795 * fallback value G_IO_ERROR_FAILED is returned for error codes not
23798 * Returns: #GIOErrorEnum value for the given error number.
23804 * g_io_error_quark:
23806 * Gets the GIO Error Quark.
23808 * Returns: a #GQuark.
23813 * g_io_extension_get_name:
23814 * @extension: a #GIOExtension
23816 * Gets the name under which @extension was registered.
23817 * Note that the same type may be registered as extension
23818 * for multiple extension points, under different names.
23820 * Returns: the name of @extension.
23825 * g_io_extension_get_priority:
23826 * @extension: a #GIOExtension
23828 * Gets the priority with which @extension was registered.
23830 * Returns: the priority of @extension
23835 * g_io_extension_get_type:
23836 * @extension: a #GIOExtension
23838 * Gets the type associated with @extension.
23840 * Returns: the type of @extension
23845 * g_io_extension_point_get_extension_by_name:
23846 * @extension_point: a #GIOExtensionPoint
23847 * @name: the name of the extension to get
23849 * Finds a #GIOExtension for an extension point by name.
23850 * given name, or %NULL if there is no extension with that name
23852 * Returns: (transfer none): the #GIOExtension for @extension_point that has the
23857 * g_io_extension_point_get_extensions:
23858 * @extension_point: a #GIOExtensionPoint
23860 * Gets a list of all extensions that implement this extension point.
23861 * The list is sorted by priority, beginning with the highest priority.
23862 * #GIOExtension<!-- -->s. The list is owned by GIO and should not be
23865 * Returns: (element-type GIOExtension) (transfer none): a #GList of
23870 * g_io_extension_point_get_required_type:
23871 * @extension_point: a #GIOExtensionPoint
23873 * Gets the required type for @extension_point.
23874 * or #G_TYPE_INVALID if the extension point has no required type
23876 * Returns: the #GType that all implementations must have,
23881 * g_io_extension_point_implement:
23882 * @extension_point_name: the name of the extension point
23883 * @type: the #GType to register as extension
23884 * @extension_name: the name for the extension
23885 * @priority: the priority for the extension
23887 * Registers @type as extension for the extension point with name
23888 * If @type has already been registered as an extension for this
23889 * extension point, the existing #GIOExtension object is returned.
23891 * Returns: a #GIOExtension object for #GType
23896 * g_io_extension_point_lookup:
23897 * @name: the name of the extension point
23899 * Looks up an existing extension point.
23900 * registered extension point with the given name
23902 * Returns: the #GIOExtensionPoint, or %NULL if there is no
23907 * g_io_extension_point_register:
23908 * @name: The name of the extension point
23910 * Registers an extension point.
23911 * and should not be freed
23913 * Returns: the new #GIOExtensionPoint. This object is owned by GIO
23918 * g_io_extension_point_set_required_type:
23919 * @extension_point: a #GIOExtensionPoint
23920 * @type: the #GType to require
23922 * Sets the required type for @extension_point to @type.
23923 * All implementations must henceforth have this type.
23928 * g_io_extension_ref_class:
23929 * @extension: a #GIOExtension
23931 * Gets a reference to the class for the type that is
23932 * associated with @extension.
23934 * Returns: (transfer full): the #GTypeClass for the type of @extension
23939 * g_io_module_load:
23940 * @module: a #GIOModule.
23942 * Required API for GIO modules to implement.
23943 * This function is ran after the module has been loaded into GIO,
23944 * to initialize the module.
23950 * @filename: filename of the shared library module.
23952 * Creates a new GIOModule that will load the specific
23953 * shared library when in use.
23954 * or %NULL on error.
23956 * Returns: a #GIOModule from given @filename,
23961 * g_io_module_query:
23963 * Optional API for GIO modules to implement.
23964 * Should return a list of all the extension points that may be
23965 * implemented in this module.
23966 * This method will not be called in normal use, however it may be
23967 * called when probing existing modules and recording which extension
23968 * points that this modle is used for. This means we won't have to
23969 * load and initialze this module unless its needed.
23970 * If this function is not implemented by the module the module will
23971 * always be loaded, initialized and then unloaded on application startup
23972 * so that it can register its extension points during init.
23973 * Note that a module need not actually implement all the extension points
23974 * that g_io_module_query returns, since the exact list of extension may
23975 * depend on runtime issues. However all extension points actually implemented
23976 * must be returned by g_io_module_query() (if defined).
23977 * When installing a module that implements g_io_module_query you must
23978 * run gio-querymodules in order to build the cache files required for
23980 * extension points of the module. The array must be suitable for
23981 * freeing with g_strfreev().
23983 * Returns: (transfer full): A %NULL-terminated array of strings, listing the supported
23989 * g_io_module_unload:
23990 * @module: a #GIOModule.
23992 * Required API for GIO modules to implement.
23993 * This function is ran when the module is being unloaded from GIO,
23994 * to finalize the module.
23999 * g_io_modules_load_all_in_directory:
24000 * @dirname: pathname for a directory containing modules to load.
24002 * Loads all the modules in the specified directory.
24003 * If don't require all modules to be initialized (and thus registering
24004 * all gtypes) then you can use g_io_modules_scan_all_in_directory()
24005 * which allows delayed/lazy loading of modules.
24006 * from the directory,
24007 * All the modules are loaded into memory, if you want to
24008 * unload them (enabling on-demand loading) you must call
24009 * g_type_module_unuse() on all the modules. Free the list
24010 * with g_list_free().
24012 * Returns: (element-type GIOModule) (transfer full): a list of #GIOModules loaded
24017 * g_io_modules_scan_all_in_directory:
24018 * @dirname: pathname for a directory containing modules to scan.
24020 * Scans all the modules in the specified directory, ensuring that
24021 * any extension point implemented by a module is registered.
24022 * This may not actually load and initialize all the types in each
24023 * module, some modules may be lazily loaded and initialized when
24024 * an extension point it implementes is used with e.g.
24025 * g_io_extension_point_get_extensions() or
24026 * g_io_extension_point_get_extension_by_name().
24027 * If you need to guarantee that all types are loaded in all the modules,
24028 * use g_io_modules_load_all_in_directory().
24035 * g_io_scheduler_cancel_all_jobs:
24037 * Cancels all cancellable I/O jobs.
24038 * A job is cancellable if a #GCancellable was passed into
24039 * g_io_scheduler_push_job().
24044 * g_io_scheduler_job_send_to_mainloop:
24045 * @job: a #GIOSchedulerJob
24046 * @func: a #GSourceFunc callback that will be called in the original thread
24047 * @user_data: data to pass to @func
24048 * @notify: a #GDestroyNotify for @user_data, or %NULL
24050 * Used from an I/O job to send a callback to be run in the thread
24051 * that the job was started from, waiting for the result (and thus
24052 * blocking the I/O job).
24054 * Returns: The return value of @func
24059 * g_io_scheduler_job_send_to_mainloop_async:
24060 * @job: a #GIOSchedulerJob
24061 * @func: a #GSourceFunc callback that will be called in the original thread
24062 * @user_data: data to pass to @func
24063 * @notify: a #GDestroyNotify for @user_data, or %NULL
24065 * Used from an I/O job to send a callback to be run asynchronously in
24066 * the thread that the job was started from. The callback will be run
24067 * when the main loop is available, but at that time the I/O job might
24068 * have finished. The return value from the callback is ignored.
24069 * Note that if you are passing the @user_data from g_io_scheduler_push_job()
24070 * on to this function you have to ensure that it is not freed before
24071 * g_io_scheduler_push_job() or by using refcounting for @user_data.
24076 * g_io_scheduler_push_job:
24077 * @job_func: a #GIOSchedulerJobFunc.
24078 * @user_data: data to pass to @job_func
24079 * @notify: a #GDestroyNotify for @user_data, or %NULL
24080 * @io_priority: the <link linkend="gioscheduler">I/O priority</link> of the request.
24081 * @cancellable: optional #GCancellable object, %NULL to ignore.
24083 * Schedules the I/O job to run.
24084 * regardless whether the job was cancelled or has run to completion.
24085 * If @cancellable is not %NULL, it can be used to cancel the I/O job
24086 * by calling g_cancellable_cancel() or by calling
24087 * g_io_scheduler_cancel_all_jobs().
24092 * g_io_stream_clear_pending:
24093 * @stream: a #GIOStream
24095 * Clears the pending flag on @stream.
24102 * g_io_stream_close:
24103 * @stream: a #GIOStream
24104 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
24105 * @error: location to store the error occuring, or %NULL to ignore
24107 * Closes the stream, releasing resources related to it. This will also
24108 * closes the individual input and output streams, if they are not already
24110 * Once the stream is closed, all other operations will return
24111 * %G_IO_ERROR_CLOSED. Closing a stream multiple times will not
24113 * Closing a stream will automatically flush any outstanding buffers
24115 * Streams will be automatically closed when the last reference
24116 * is dropped, but you might want to call this function to make sure
24117 * resources are released as early as possible.
24118 * Some streams might keep the backing store of the stream (e.g. a file
24119 * descriptor) open after the stream is closed. See the documentation for
24120 * the individual stream for details.
24121 * On failure the first error that happened will be reported, but the
24122 * close operation will finish as much as possible. A stream that failed
24123 * to close will still return %G_IO_ERROR_CLOSED for all operations.
24124 * Still, it is important to check and report the error to the user,
24125 * otherwise there might be a loss of data as all data might not be written.
24126 * If @cancellable is not NULL, then the operation can be cancelled by
24127 * triggering the cancellable object from another thread. If the operation
24128 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
24129 * Cancelling a close will still leave the stream closed, but some streams
24130 * can use a faster close that doesn't block to e.g. check errors.
24131 * The default implementation of this method just calls close on the
24132 * individual input/output streams.
24134 * Returns: %TRUE on success, %FALSE on failure
24140 * g_io_stream_close_async:
24141 * @stream: a #GIOStream
24142 * @io_priority: the io priority of the request
24143 * @cancellable: (allow-none): optional cancellable object
24144 * @callback: (scope async): callback to call when the request is satisfied
24145 * @user_data: (closure): the data to pass to callback function
24147 * Requests an asynchronous close of the stream, releasing resources
24148 * related to it. When the operation is finished @callback will be
24149 * called. You can then call g_io_stream_close_finish() to get
24150 * the result of the operation.
24151 * For behaviour details see g_io_stream_close().
24152 * The asynchronous methods have a default fallback that uses threads
24153 * to implement asynchronicity, so they are optional for inheriting
24154 * classes. However, if you override one you must override all.
24161 * g_io_stream_close_finish:
24162 * @stream: a #GIOStream
24163 * @result: a #GAsyncResult
24164 * @error: a #GError location to store the error occuring, or %NULL to ignore
24168 * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
24174 * g_io_stream_get_input_stream:
24175 * @stream: a #GIOStream
24177 * Gets the input stream for this object. This is used
24181 * Returns: (transfer none): a #GInputStream, owned by the #GIOStream.
24187 * g_io_stream_get_output_stream:
24188 * @stream: a #GIOStream
24190 * Gets the output stream for this object. This is used for
24194 * Returns: (transfer none): a #GOutputStream, owned by the #GIOStream.
24200 * g_io_stream_has_pending:
24201 * @stream: a #GIOStream
24203 * Checks if a stream has pending actions.
24205 * Returns: %TRUE if @stream has pending actions.
24211 * g_io_stream_is_closed:
24212 * @stream: a #GIOStream
24214 * Checks if a stream is closed.
24216 * Returns: %TRUE if the stream is closed.
24222 * g_io_stream_set_pending:
24223 * @stream: a #GIOStream
24224 * @error: a #GError location to store the error occuring, or %NULL to ignore
24226 * Sets @stream to have actions pending. If the pending flag is
24227 * already set or @stream is closed, it will return %FALSE and set
24229 * Returns: %TRUE if pending was previously unset and is now set.
24235 * g_io_stream_splice_async:
24236 * @stream1: a #GIOStream.
24237 * @stream2: a #GIOStream.
24238 * @flags: a set of #GIOStreamSpliceFlags.
24239 * @io_priority: the io priority of the request.
24240 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24241 * @callback: (scope async): a #GAsyncReadyCallback.
24242 * @user_data: (closure): user data passed to @callback.
24244 * Asyncronously splice the output stream of @stream1 to the input stream of
24245 * When the operation is finished @callback will be called.
24246 * You can then call g_io_stream_splice_finish() to get the
24247 * result of the operation.
24254 * g_io_stream_splice_finish:
24255 * @result: a #GAsyncResult.
24256 * @error: a #GError location to store the error occuring, or %NULL to ignore.
24258 * Finishes an asynchronous io stream splice operation.
24260 * Returns: %TRUE on success, %FALSE otherwise.
24266 * g_keyfile_settings_backend_new:
24267 * @filename: the filename of the keyfile
24268 * @root_path: the path under which all settings keys appear
24269 * @root_group: (allow-none): the group name corresponding to
24270 * @returns: (transfer full): a keyfile-backed #GSettingsBackend
24272 * Creates a keyfile-backed #GSettingsBackend.
24273 * The filename of the keyfile to use is given by @filename.
24274 * All settings read to or written from the backend must fall under the
24275 * path given in @root_path (which must start and end with a slash and
24276 * not contain two consecutive slashes). @root_path may be "/".
24277 * If @root_group is non-%NULL then it specifies the name of the keyfile
24278 * group used for keys that are written directly below @root_path. For
24279 * example, if @root_path is "/apps/example/" and @root_group is
24280 * "toplevel", then settings the key "/apps/example/enabled" to a value
24281 * of %TRUE will cause the following to appear in the keyfile:
24286 * If @root_group is %NULL then it is not permitted to store keys
24287 * directly below the @root_path.
24288 * the name of the subpath (with the final slash stripped) is used as
24289 * the name of the keyfile group. To continue the example, if
24290 * "/apps/example/profiles/default/font-size" were set to
24291 * 12 then the following would appear in the keyfile:
24293 * [profiles/default]
24296 * The backend will refuse writes (and return writability as being
24297 * %FALSE) for keys outside of @root_path and, in the event that
24298 * Writes will also be refused if the backend detects that it has the
24300 * There is no checking done for your key namespace clashing with the
24301 * syntax of the key file format. For example, if you have '[' or ']'
24302 * characters in your path names or '=' in your key names you may be in
24305 * For keys not stored directly below @root_path (ie: in a sub-path),
24306 * Inability to rewrite the keyfile (ie: the containing directory is not
24311 * g_loadable_icon_load:
24312 * @icon: a #GLoadableIcon.
24313 * @size: an integer.
24314 * @type: (out) (allow-none): a location to store the type of the loaded icon, %NULL to ignore.
24315 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24316 * @error: a #GError location to store the error occuring, or %NULL to ignore.
24318 * Loads a loadable icon. For the asynchronous version of this function,
24319 * see g_loadable_icon_load_async().
24321 * Returns: (transfer full): a #GInputStream to read the icon from.
24326 * g_loadable_icon_load_async:
24327 * @icon: a #GLoadableIcon.
24328 * @size: an integer.
24329 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24330 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
24331 * @user_data: (closure): the data to pass to callback function
24333 * Loads an icon asynchronously. To finish this function, see
24334 * g_loadable_icon_load_finish(). For the synchronous, blocking
24335 * version of this function, see g_loadable_icon_load().
24340 * g_loadable_icon_load_finish:
24341 * @icon: a #GLoadableIcon.
24342 * @res: a #GAsyncResult.
24343 * @type: a location to store the type of the loaded icon, %NULL to ignore.
24344 * @error: a #GError location to store the error occuring, or %NULL to ignore.
24346 * Finishes an asynchronous icon load started in g_loadable_icon_load_async().
24348 * Returns: (transfer full): a #GInputStream to read the icon from.
24355 * Returns a new #GVfs handle for a local vfs.
24357 * Returns: a new #GVfs handle.
24363 * @loop: a #GMainLoop
24365 * Frees the memory allocated for the #GMainLoop.
24367 * Deprecated: 2.2: Use g_main_loop_unref() instead
24372 * g_main_is_running:
24373 * @loop: a #GMainLoop
24375 * Checks if the main loop is running.
24377 * Returns: %TRUE if the main loop is running
24378 * Deprecated: 2.2: Use g_main_loop_is_running() instead
24383 * g_main_iteration:
24384 * @may_block: set to %TRUE if it should block (i.e. wait) until an event source becomes ready. It will return after an event source has been processed. If set to %FALSE it will return immediately if no event source is ready to be processed.
24386 * Runs a single iteration for the default #GMainContext.
24388 * Returns: %TRUE if more events are pending.
24389 * Deprecated: 2.2: Use g_main_context_iteration() instead.
24395 * @is_running: set to %TRUE to indicate that the loop is running. This is not very important since calling g_main_run() will set this to %TRUE anyway.
24397 * Creates a new #GMainLoop for th default main context.
24399 * Returns: a new #GMainLoop
24400 * Deprecated: 2.2: Use g_main_loop_new() instead
24407 * Checks if any events are pending for the default #GMainContext
24408 * (i.e. ready to be processed).
24410 * Returns: %TRUE if any events are pending.
24411 * Deprected: 2.2: Use g_main_context_pending() instead.
24417 * @loop: a #GMainLoop
24419 * Stops the #GMainLoop.
24420 * If g_main_run() was called to run the #GMainLoop, it will now return.
24422 * Deprecated: 2.2: Use g_main_loop_quit() instead
24428 * @loop: a #GMainLoop
24430 * Runs a main loop until it stops running.
24432 * Deprecated: 2.2: Use g_main_loop_run() instead
24437 * g_main_set_poll_func:
24438 * @func: the function to call to poll all file descriptors
24440 * Sets the function to use for the handle polling of file descriptors
24441 * for the default main context.
24443 * Deprecated: 2.2: Use g_main_context_set_poll_func() again
24448 * g_memory_input_stream_add_data:
24449 * @stream: a #GMemoryInputStream
24450 * @data: (array length=len) (element-type guint8): input data
24451 * @len: length of the data, may be -1 if @data is a nul-terminated string
24452 * @destroy: (allow-none): function that is called to free @data, or %NULL
24454 * Appends @data to data that can be read from the input stream
24459 * g_memory_input_stream_new:
24461 * Creates a new empty #GMemoryInputStream.
24463 * Returns: a new #GInputStream
24468 * g_memory_input_stream_new_from_data:
24469 * @data: (array length=len) (element-type guint8): input data
24470 * @len: length of the data, may be -1 if @data is a nul-terminated string
24471 * @destroy: (allow-none): function that is called to free @data, or %NULL
24473 * Creates a new #GMemoryInputStream with data in memory of a given size.
24475 * Returns: new #GInputStream read from @data of @len bytes.
24480 * g_memory_output_stream_get_data:
24481 * @ostream: a #GMemoryOutputStream
24483 * Gets any loaded data from the @ostream.
24484 * Note that the returned pointer may become invalid on the next
24485 * write or truncate operation on the stream.
24487 * Returns: (transfer none): pointer to the stream's data
24492 * g_memory_output_stream_get_data_size:
24493 * @ostream: a #GMemoryOutputStream
24495 * Returns the number of bytes from the start up
24496 * to including the last byte written in the stream
24497 * that has not been truncated away.
24499 * Returns: the number of bytes written to the stream
24505 * g_memory_output_stream_get_size:
24506 * @ostream: a #GMemoryOutputStream
24508 * Gets the size of the currently allocated data area (available from
24509 * g_memory_output_stream_get_data()). If the stream isn't
24510 * growable (no realloc was passed to g_memory_output_stream_new()) then
24511 * this is the maximum size of the stream and further writes
24512 * will return %G_IO_ERROR_NO_SPACE.
24513 * Note that for growable streams the returned size may become invalid on
24514 * the next write or truncate operation on the stream.
24515 * If you want the number of bytes currently written to the stream, use
24516 * g_memory_output_stream_get_data_size().
24518 * Returns: the number of bytes allocated for the data buffer
24523 * g_memory_output_stream_new: (skip)
24524 * @data: pointer to a chunk of memory to use, or %NULL
24525 * @size: the size of @data
24526 * @realloc_function: a function with realloc() semantics (like g_realloc()) to be called when @data needs to be grown, or %NULL
24527 * @destroy_function: a function to be called on @data when the stream is finalized, or %NULL
24529 * Creates a new #GMemoryOutputStream.
24530 * If @data is non-%NULL, the stream will use that for its internal storage.
24531 * If @realloc_fn is non-%NULL, it will be used for resizing the internal
24532 * storage when necessary. To construct a fixed-size output stream,
24533 * pass %NULL as @realloc_fn.
24535 * /* a stream that can grow */
24536 * stream = g_memory_output_stream_new (NULL, 0, realloc, free);
24537 * /* another stream that can grow */
24538 * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
24539 * /* a fixed-size stream */
24540 * data = malloc (200);
24541 * stream3 = g_memory_output_stream_new (data, 200, NULL, free);
24544 * Returns: A newly created #GMemoryOutputStream object.
24549 * g_memory_output_stream_steal_data:
24550 * @ostream: a #GMemoryOutputStream
24552 * Gets any loaded data from the @ostream. Ownership of the data
24553 * is transferred to the caller; when no longer needed it must be
24554 * freed using the free function set in @ostream's
24555 * #GMemoryOutputStream:destroy-function property.
24557 * Returns: (transfer full): the stream's data
24563 * g_memory_settings_backend_new:
24565 * Creates a memory-backed #GSettingsBackend.
24566 * This backend allows changes to settings, but does not write them
24567 * to any backing storage, so the next time you run your application,
24568 * the memory backend will start out with the default values again.
24570 * Returns: (transfer full): a newly created #GSettingsBackend
24576 * g_mount_can_eject:
24577 * @mount: a #GMount.
24579 * Checks if @mount can be eject.
24581 * Returns: %TRUE if the @mount can be ejected.
24586 * g_mount_can_unmount:
24587 * @mount: a #GMount.
24589 * Checks if @mount can be mounted.
24591 * Returns: %TRUE if the @mount can be unmounted.
24597 * @mount: a #GMount.
24598 * @flags: flags affecting the unmount if required for eject
24599 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24600 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24601 * @user_data: user data passed to @callback.
24603 * Ejects a mount. This is an asynchronous operation, and is
24604 * finished by calling g_mount_eject_finish() with the @mount
24605 * and #GAsyncResult data returned in the @callback.
24607 * Deprecated: 2.22: Use g_mount_eject_with_operation() instead.
24612 * g_mount_eject_finish:
24613 * @mount: a #GMount.
24614 * @result: a #GAsyncResult.
24615 * @error: a #GError location to store the error occuring, or %NULL to ignore.
24617 * Finishes ejecting a mount. If any errors occurred during the operation,
24619 * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
24620 * Deprecated: 2.22: Use g_mount_eject_with_operation_finish() instead.
24625 * g_mount_eject_with_operation:
24626 * @mount: a #GMount.
24627 * @flags: flags affecting the unmount if required for eject
24628 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24629 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24630 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24631 * @user_data: user data passed to @callback.
24633 * Ejects a mount. This is an asynchronous operation, and is
24634 * finished by calling g_mount_eject_with_operation_finish() with the @mount
24635 * and #GAsyncResult data returned in the @callback.
24642 * g_mount_eject_with_operation_finish:
24643 * @mount: a #GMount.
24644 * @result: a #GAsyncResult.
24645 * @error: a #GError location to store the error occuring, or %NULL to ignore.
24647 * Finishes ejecting a mount. If any errors occurred during the operation,
24649 * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise.
24655 * g_mount_get_default_location:
24656 * @mount: a #GMount.
24658 * Gets the default location of @mount. The default location of the given
24659 * the home directory, or the root of the volume).
24660 * The returned object should be unreffed with
24661 * g_object_unref() when no longer needed.
24663 * Returns: (transfer full): a #GFile.
24668 * g_mount_get_drive:
24669 * @mount: a #GMount.
24671 * Gets the drive for the @mount.
24672 * This is a convenience method for getting the #GVolume and then
24673 * using that object to get the #GDrive.
24674 * The returned object should be unreffed with
24675 * g_object_unref() when no longer needed.
24677 * Returns: (transfer full): a #GDrive or %NULL if @mount is not associated with a volume or a drive.
24682 * g_mount_get_icon:
24683 * @mount: a #GMount.
24685 * Gets the icon for @mount.
24686 * The returned object should be unreffed with
24687 * g_object_unref() when no longer needed.
24689 * Returns: (transfer full): a #GIcon.
24694 * g_mount_get_name:
24695 * @mount: a #GMount.
24697 * Gets the name of @mount.
24698 * The returned string should be freed with g_free()
24699 * when no longer needed.
24701 * Returns: the name for the given @mount.
24706 * g_mount_get_root:
24707 * @mount: a #GMount.
24709 * Gets the root directory on @mount.
24710 * The returned object should be unreffed with
24711 * g_object_unref() when no longer needed.
24713 * Returns: (transfer full): a #GFile.
24718 * g_mount_get_uuid:
24719 * @mount: a #GMount.
24721 * Gets the UUID for the @mount. The reference is typically based on
24722 * the file system UUID for the mount in question and should be
24723 * considered an opaque string. Returns %NULL if there is no UUID
24725 * The returned string should be freed with g_free()
24726 * when no longer needed.
24728 * Returns: the UUID for @mount or %NULL if no UUID can be computed.
24733 * g_mount_get_volume:
24734 * @mount: a #GMount.
24736 * Gets the volume for the @mount.
24737 * The returned object should be unreffed with
24738 * g_object_unref() when no longer needed.
24740 * Returns: (transfer full): a #GVolume or %NULL if @mount is not associated with a volume.
24745 * g_mount_guess_content_type:
24746 * @mount: a #GMount
24747 * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
24748 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
24749 * @callback: a #GAsyncReadyCallback
24750 * @user_data: user data passed to @callback
24752 * Tries to guess the type of content stored on @mount. Returns one or
24753 * more textual identifiers of well-known content types (typically
24754 * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
24755 * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
24756 * specification for more on x-content types.
24757 * This is an asynchronous operation (see
24758 * g_mount_guess_content_type_sync() for the synchronous version), and
24759 * is finished by calling g_mount_guess_content_type_finish() with the
24766 * g_mount_guess_content_type_finish:
24767 * @mount: a #GMount
24768 * @result: a #GAsyncResult
24769 * @error: a #GError location to store the error occuring, or %NULL to ignore
24771 * Finishes guessing content types of @mount. If any errors occured
24772 * during the operation, @error will be set to contain the errors and
24773 * %FALSE will be returned. In particular, you may get an
24774 * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
24776 * Caller should free this array with g_strfreev() when done with it.
24778 * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
24784 * g_mount_guess_content_type_sync:
24785 * @mount: a #GMount
24786 * @force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available
24787 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
24788 * @error: a #GError location to store the error occuring, or %NULL to ignore
24790 * Tries to guess the type of content stored on @mount. Returns one or
24791 * more textual identifiers of well-known content types (typically
24792 * prefixed with "x-content/"), e.g. x-content/image-dcf for camera
24793 * memory cards. See the <ulink url="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">shared-mime-info</ulink>
24794 * specification for more on x-content types.
24795 * This is an synchronous operation and as such may block doing IO;
24796 * see g_mount_guess_content_type() for the asynchronous version.
24797 * Caller should free this array with g_strfreev() when done with it.
24799 * Returns: (transfer full) (element-type utf8): a %NULL-terminated array of content types or %NULL on error.
24805 * g_mount_is_shadowed:
24806 * @mount: A #GMount.
24808 * Determines if @mount is shadowed. Applications or libraries should
24809 * avoid displaying @mount in the user interface if it is shadowed.
24810 * A mount is said to be shadowed if there exists one or more user
24811 * visible objects (currently #GMount objects) with a root that is
24812 * inside the root of @mount.
24813 * One application of shadow mounts is when exposing a single file
24814 * system that is used to address several logical volumes. In this
24815 * situation, a #GVolumeMonitor implementation would create two
24816 * #GVolume objects (for example, one for the camera functionality of
24817 * the device and one for a SD card reader on the device) with
24818 * activation URIs <literal>gphoto2://[usb:001,002]/store1/</literal>
24819 * and <literal>gphoto2://[usb:001,002]/store2/</literal>. When the
24820 * underlying mount (with root
24821 * <literal>gphoto2://[usb:001,002]/</literal>) is mounted, said
24822 * #GVolumeMonitor implementation would create two #GMount objects
24823 * (each with their root matching the corresponding volume activation
24824 * root) that would shadow the original mount.
24825 * The proxy monitor in GVfs 2.26 and later, automatically creates and
24826 * manage shadow mounts (and shadows the underlying mount) if the
24827 * activation root on a #GVolume is set.
24829 * Returns: %TRUE if @mount is shadowed.
24835 * g_mount_operation_get_anonymous:
24836 * @op: a #GMountOperation.
24838 * Check to see whether the mount operation is being used
24839 * for an anonymous user.
24841 * Returns: %TRUE if mount operation is anonymous.
24846 * g_mount_operation_get_choice:
24847 * @op: a #GMountOperation.
24849 * Gets a choice from the mount operation.
24850 * the choice's list, or %0.
24852 * Returns: an integer containing an index of the user's choice from
24857 * g_mount_operation_get_domain:
24858 * @op: a #GMountOperation.
24860 * Gets the domain of the mount operation.
24862 * Returns: a string set to the domain.
24867 * g_mount_operation_get_password:
24868 * @op: a #GMountOperation.
24870 * Gets a password from the mount operation.
24872 * Returns: a string containing the password within @op.
24877 * g_mount_operation_get_password_save:
24878 * @op: a #GMountOperation.
24880 * Gets the state of saving passwords for the mount operation.
24882 * Returns: a #GPasswordSave flag.
24887 * g_mount_operation_get_username:
24888 * @op: a #GMountOperation.
24890 * Get the user name from the mount operation.
24892 * Returns: a string containing the user name.
24897 * g_mount_operation_new:
24899 * Creates a new mount operation.
24901 * Returns: a #GMountOperation.
24906 * g_mount_operation_reply:
24907 * @op: a #GMountOperation
24908 * @result: a #GMountOperationResult
24910 * Emits the #GMountOperation::reply signal.
24915 * g_mount_operation_set_anonymous:
24916 * @op: a #GMountOperation.
24917 * @anonymous: boolean value.
24919 * Sets the mount operation to use an anonymous user if @anonymous is %TRUE.
24924 * g_mount_operation_set_choice:
24925 * @op: a #GMountOperation.
24926 * @choice: an integer.
24928 * Sets a default choice for the mount operation.
24933 * g_mount_operation_set_domain:
24934 * @op: a #GMountOperation.
24935 * @domain: the domain to set.
24937 * Sets the mount operation's domain.
24942 * g_mount_operation_set_password:
24943 * @op: a #GMountOperation.
24944 * @password: password to set.
24946 * Sets the mount operation's password to @password.
24951 * g_mount_operation_set_password_save:
24952 * @op: a #GMountOperation.
24953 * @save: a set of #GPasswordSave flags.
24955 * Sets the state of saving passwords for the mount operation.
24960 * g_mount_operation_set_username:
24961 * @op: a #GMountOperation.
24962 * @username: input username.
24964 * Sets the user name within @op to @username.
24970 * @mount: a #GMount.
24971 * @flags: flags affecting the operation
24972 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
24973 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
24974 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
24975 * @user_data: user data passed to @callback.
24977 * Remounts a mount. This is an asynchronous operation, and is
24978 * finished by calling g_mount_remount_finish() with the @mount
24979 * and #GAsyncResults data returned in the @callback.
24980 * Remounting is useful when some setting affecting the operation
24981 * of the volume has been changed, as these may need a remount to
24982 * take affect. While this is semantically equivalent with unmounting
24983 * and then remounting not all backends might need to actually be
24989 * g_mount_remount_finish:
24990 * @mount: a #GMount.
24991 * @result: a #GAsyncResult.
24992 * @error: a #GError location to store the error occuring, or %NULL to ignore.
24994 * Finishes remounting a mount. If any errors occurred during the operation,
24996 * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise.
25002 * @mount: A #GMount.
25004 * Increments the shadow count on @mount. Usually used by
25005 * #GVolumeMonitor implementations when creating a shadow mount for
25006 * will need to emit the #GMount::changed signal on @mount manually.
25014 * @mount: a #GMount.
25015 * @flags: flags affecting the operation
25016 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25017 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
25018 * @user_data: user data passed to @callback.
25020 * Unmounts a mount. This is an asynchronous operation, and is
25021 * finished by calling g_mount_unmount_finish() with the @mount
25022 * and #GAsyncResult data returned in the @callback.
25024 * Deprecated: 2.22: Use g_mount_unmount_with_operation() instead.
25029 * g_mount_unmount_finish:
25030 * @mount: a #GMount.
25031 * @result: a #GAsyncResult.
25032 * @error: a #GError location to store the error occuring, or %NULL to ignore.
25034 * Finishes unmounting a mount. If any errors occurred during the operation,
25036 * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
25037 * Deprecated: 2.22: Use g_mount_unmount_with_operation_finish() instead.
25042 * g_mount_unmount_with_operation:
25043 * @mount: a #GMount.
25044 * @flags: flags affecting the operation
25045 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
25046 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25047 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
25048 * @user_data: user data passed to @callback.
25050 * Unmounts a mount. This is an asynchronous operation, and is
25051 * finished by calling g_mount_unmount_with_operation_finish() with the @mount
25052 * and #GAsyncResult data returned in the @callback.
25059 * g_mount_unmount_with_operation_finish:
25060 * @mount: a #GMount.
25061 * @result: a #GAsyncResult.
25062 * @error: a #GError location to store the error occuring, or %NULL to ignore.
25064 * Finishes unmounting a mount. If any errors occurred during the operation,
25066 * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise.
25072 * g_mount_unshadow:
25073 * @mount: A #GMount.
25075 * Decrements the shadow count on @mount. Usually used by
25076 * #GVolumeMonitor implementations when destroying a shadow mount for
25077 * will need to emit the #GMount::changed signal on @mount manually.
25084 * g_network_address_get_hostname:
25085 * @addr: a #GNetworkAddress
25087 * Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded,
25088 * depending on what @addr was created with.
25090 * Returns: @addr's hostname
25096 * g_network_address_get_port:
25097 * @addr: a #GNetworkAddress
25099 * Gets @addr's port number
25101 * Returns: @addr's port (which may be 0)
25107 * g_network_address_get_scheme:
25108 * @addr: a #GNetworkAddress
25110 * Gets @addr's scheme
25112 * Returns: @addr's scheme (%NULL if not built from URI)
25118 * g_network_address_new:
25119 * @hostname: the hostname
25122 * Creates a new #GSocketConnectable for connecting to the given
25124 * Returns: (transfer full): the new #GNetworkAddress
25130 * g_network_address_parse:
25131 * @host_and_port: the hostname and optionally a port
25132 * @default_port: the default port if not in @host_and_port
25133 * @error: a pointer to a #GError, or %NULL
25135 * Creates a new #GSocketConnectable for connecting to the given
25136 * parsing @host_and_port fails.
25137 * address, an IPv4 address, or a domain name (in which case a DNS
25138 * lookup is performed). Quoting with [] is supported for all address
25139 * types. A port override may be specified in the usual way with a
25140 * colon. Ports may be given as decimal numbers or symbolic names (in
25141 * which case an /etc/services lookup is performed).
25142 * If no port is specified in @host_and_port then @default_port will be
25143 * used as the port number to connect to.
25144 * In general, @host_and_port is expected to be provided by the user
25145 * (allowing them to give the hostname, and a port overide if necessary)
25146 * and @default_port is expected to be provided by the application.
25148 * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
25154 * g_network_address_parse_uri:
25155 * @uri: the hostname and optionally a port
25156 * @default_port: The default port if none is found in the URI
25157 * @error: a pointer to a #GError, or %NULL
25159 * Creates a new #GSocketConnectable for connecting to the given
25160 * Using this rather than g_network_address_new() or
25161 * g_network_address_parse_host() allows #GSocketClient to determine
25162 * when to use application-specific proxy protocols.
25164 * Returns: (transfer full): the new #GNetworkAddress, or %NULL on error
25170 * g_network_service_get_domain:
25171 * @srv: a #GNetworkService
25173 * Gets the domain that @srv serves. This might be either UTF-8 or
25174 * ASCII-encoded, depending on what @srv was created with.
25176 * Returns: @srv's domain name
25182 * g_network_service_get_protocol:
25183 * @srv: a #GNetworkService
25185 * Gets @srv's protocol name (eg, "tcp").
25187 * Returns: @srv's protocol name
25193 * g_network_service_get_scheme:
25194 * @srv: a #GNetworkService
25196 * Get's the URI scheme used to resolve proxies. By default, the service name
25197 * is used as scheme.
25199 * Returns: @srv's scheme name
25205 * g_network_service_get_service:
25206 * @srv: a #GNetworkService
25208 * Gets @srv's service name (eg, "ldap").
25210 * Returns: @srv's service name
25216 * g_network_service_new:
25217 * @service: the service type to look up (eg, "ldap")
25218 * @protocol: the networking protocol to use for @service (eg, "tcp")
25219 * @domain: the DNS domain to look up the service in
25221 * Creates a new #GNetworkService representing the given @service,
25222 * #GSocketConnectable interface to resolve it.
25224 * Returns: (transfer full): a new #GNetworkService
25230 * g_network_service_set_scheme:
25231 * @srv: a #GNetworkService
25232 * @scheme: a URI scheme
25234 * Set's the URI scheme used to resolve proxies. By default, the service name
25235 * is used as scheme.
25243 * @struct_type: the type of the elements to allocate
25244 * @n_structs: the number of elements to allocate
25246 * Allocates @n_structs elements of type @struct_type.
25247 * The returned pointer is cast to a pointer to the given type.
25248 * If @n_structs is 0 it returns %NULL.
25249 * Care is taken to avoid overflow when calculating the size of the allocated block.
25250 * Since the returned pointer is already casted to the right type,
25251 * it is normally unnecessary to cast it explicitly, and doing
25252 * so might hide memory allocation errors.
25254 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
25260 * @struct_type: the type of the elements to allocate.
25261 * @n_structs: the number of elements to allocate.
25263 * Allocates @n_structs elements of type @struct_type, initialized to 0's.
25264 * The returned pointer is cast to a pointer to the given type.
25265 * If @n_structs is 0 it returns %NULL.
25266 * Care is taken to avoid overflow when calculating the size of the allocated block.
25267 * Since the returned pointer is already casted to the right type,
25268 * it is normally unnecessary to cast it explicitly, and doing
25269 * so might hide memory allocation errors.
25271 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
25277 * @struct_type: Type of memory chunks to be allocated
25278 * @n_structs: Number of chunks to be allocated
25280 * Wraps g_alloca() in a more typesafe manner.
25282 * Returns: Pointer to stack space for @n_structs chunks of type @struct_type
25288 * @parent: the #GNode to place the new #GNode under
25289 * @node: the #GNode to insert
25291 * Inserts a #GNode as the last child of the given parent.
25293 * Returns: the inserted #GNode
25298 * g_node_append_data:
25299 * @parent: the #GNode to place the new #GNode under
25300 * @data: the data for the new #GNode
25302 * Inserts a new #GNode as the last child of the given parent.
25304 * Returns: the new #GNode
25309 * g_node_first_child:
25312 * Gets the first child of a #GNode.
25313 * or has no children
25315 * Returns: the first child of @node, or %NULL if @node is %NULL
25320 * g_node_insert_data:
25321 * @parent: the #GNode to place the new #GNode under
25322 * @position: the position to place the new #GNode at. If position is -1, the new #GNode is inserted as the last child of @parent
25323 * @data: the data for the new #GNode
25325 * Inserts a new #GNode at the given position.
25327 * Returns: the new #GNode
25332 * g_node_insert_data_before:
25333 * @parent: the #GNode to place the new #GNode under
25334 * @sibling: the sibling #GNode to place the new #GNode before
25335 * @data: the data for the new #GNode
25337 * Inserts a new #GNode before the given sibling.
25339 * Returns: the new #GNode
25344 * g_node_next_sibling:
25347 * Gets the next sibling of a #GNode.
25350 * Returns: the next sibling of @node, or %NULL if @node is the last node
25355 * g_node_prepend_data:
25356 * @parent: the #GNode to place the new #GNode under
25357 * @data: the data for the new #GNode
25359 * Inserts a new #GNode as the first child of the given parent.
25361 * Returns: the new #GNode
25366 * g_node_prev_sibling:
25369 * Gets the previous sibling of a #GNode.
25372 * Returns: the previous sibling of @node, or %NULL if @node is the first
25377 * g_null_settings_backend_new:
25379 * Creates a readonly #GSettingsBackend.
25380 * This backend does not allow changes to settings, so all settings
25381 * will always have their default values.
25383 * Returns: (transfer full): a newly created #GSettingsBackend
25389 * g_output_stream_clear_pending:
25390 * @stream: output stream
25392 * Clears the pending flag on @stream.
25397 * g_output_stream_close:
25398 * @stream: A #GOutputStream.
25399 * @cancellable: (allow-none): optional cancellable object
25400 * @error: location to store the error occuring, or %NULL to ignore
25402 * Closes the stream, releasing resources related to it.
25403 * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED.
25404 * Closing a stream multiple times will not return an error.
25405 * Closing a stream will automatically flush any outstanding buffers in the
25407 * Streams will be automatically closed when the last reference
25408 * is dropped, but you might want to call this function to make sure
25409 * resources are released as early as possible.
25410 * Some streams might keep the backing store of the stream (e.g. a file descriptor)
25411 * open after the stream is closed. See the documentation for the individual
25412 * stream for details.
25413 * On failure the first error that happened will be reported, but the close
25414 * operation will finish as much as possible. A stream that failed to
25415 * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it
25416 * is important to check and report the error to the user, otherwise
25417 * there might be a loss of data as all data might not be written.
25418 * If @cancellable is not NULL, then the operation can be cancelled by
25419 * triggering the cancellable object from another thread. If the operation
25420 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25421 * Cancelling a close will still leave the stream closed, but there some streams
25422 * can use a faster close that doesn't block to e.g. check errors. On
25423 * cancellation (as with any error) there is no guarantee that all written
25424 * data will reach the target.
25426 * Returns: %TRUE on success, %FALSE on failure
25431 * g_output_stream_close_async:
25432 * @stream: A #GOutputStream.
25433 * @io_priority: the io priority of the request.
25434 * @cancellable: (allow-none): optional cancellable object
25435 * @callback: (scope async): callback to call when the request is satisfied
25436 * @user_data: (closure): the data to pass to callback function
25438 * Requests an asynchronous close of the stream, releasing resources
25439 * related to it. When the operation is finished @callback will be
25440 * called. You can then call g_output_stream_close_finish() to get
25441 * the result of the operation.
25442 * For behaviour details see g_output_stream_close().
25443 * The asyncronous methods have a default fallback that uses threads
25444 * to implement asynchronicity, so they are optional for inheriting
25445 * classes. However, if you override one you must override all.
25450 * g_output_stream_close_finish:
25451 * @stream: a #GOutputStream.
25452 * @result: a #GAsyncResult.
25453 * @error: a #GError location to store the error occuring, or %NULL to ignore.
25455 * Closes an output stream.
25457 * Returns: %TRUE if stream was successfully closed, %FALSE otherwise.
25462 * g_output_stream_flush:
25463 * @stream: a #GOutputStream.
25464 * @cancellable: (allow-none): optional cancellable object
25465 * @error: location to store the error occuring, or %NULL to ignore
25467 * Flushed any outstanding buffers in the stream. Will block during
25468 * the operation. Closing the stream will implicitly cause a flush.
25469 * This function is optional for inherited classes.
25470 * If @cancellable is not %NULL, then the operation can be cancelled by
25471 * triggering the cancellable object from another thread. If the operation
25472 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
25474 * Returns: %TRUE on success, %FALSE on error
25479 * g_output_stream_flush_async:
25480 * @stream: a #GOutputStream.
25481 * @io_priority: the io priority of the request.
25482 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25483 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
25484 * @user_data: (closure): the data to pass to callback function
25486 * Flushes a stream asynchronously.
25487 * For behaviour details see g_output_stream_flush().
25488 * When the operation is finished @callback will be
25489 * called. You can then call g_output_stream_flush_finish() to get the
25490 * result of the operation.
25495 * g_output_stream_flush_finish:
25496 * @stream: a #GOutputStream.
25497 * @result: a GAsyncResult.
25498 * @error: a #GError location to store the error occuring, or %NULL to ignore.
25500 * Finishes flushing an output stream.
25502 * Returns: %TRUE if flush operation suceeded, %FALSE otherwise.
25507 * g_output_stream_has_pending:
25508 * @stream: a #GOutputStream.
25510 * Checks if an ouput stream has pending actions.
25512 * Returns: %TRUE if @stream has pending actions.
25517 * g_output_stream_is_closed:
25518 * @stream: a #GOutputStream.
25520 * Checks if an output stream has already been closed.
25522 * Returns: %TRUE if @stream is closed. %FALSE otherwise.
25527 * g_output_stream_is_closing:
25528 * @stream: a #GOutputStream.
25530 * Checks if an output stream is being closed. This can be
25531 * used inside e.g. a flush implementation to see if the
25532 * flush (or other i/o operation) is called from within
25533 * the closing operation.
25535 * Returns: %TRUE if @stream is being closed. %FALSE otherwise.
25541 * g_output_stream_set_pending:
25542 * @stream: a #GOutputStream.
25543 * @error: a #GError location to store the error occuring, or %NULL to ignore.
25545 * Sets @stream to have actions pending. If the pending flag is
25546 * already set or @stream is closed, it will return %FALSE and set
25548 * Returns: %TRUE if pending was previously unset and is now set.
25553 * g_output_stream_splice:
25554 * @stream: a #GOutputStream.
25555 * @source: a #GInputStream.
25556 * @flags: a set of #GOutputStreamSpliceFlags.
25557 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25558 * @error: a #GError location to store the error occuring, or %NULL to ignore.
25560 * Splices an input stream into an output stream.
25561 * -1 if an error occurred.
25563 * Returns: a #gssize containing the size of the data spliced, or
25568 * g_output_stream_splice_async:
25569 * @stream: a #GOutputStream.
25570 * @source: a #GInputStream.
25571 * @flags: a set of #GOutputStreamSpliceFlags.
25572 * @io_priority: the io priority of the request.
25573 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25574 * @callback: (scope async): a #GAsyncReadyCallback.
25575 * @user_data: (closure): user data passed to @callback.
25577 * Splices a stream asynchronously.
25578 * When the operation is finished @callback will be called.
25579 * You can then call g_output_stream_splice_finish() to get the
25580 * result of the operation.
25581 * For the synchronous, blocking version of this function, see
25582 * g_output_stream_splice().
25587 * g_output_stream_splice_finish:
25588 * @stream: a #GOutputStream.
25589 * @result: a #GAsyncResult.
25590 * @error: a #GError location to store the error occuring, or %NULL to ignore.
25592 * Finishes an asynchronous stream splice operation.
25594 * Returns: a #gssize of the number of bytes spliced.
25599 * g_output_stream_write:
25600 * @stream: a #GOutputStream.
25601 * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
25602 * @count: the number of bytes to write
25603 * @cancellable: (allow-none): optional cancellable object
25604 * @error: location to store the error occuring, or %NULL to ignore
25606 * Tries to write @count bytes from @buffer into the stream. Will block
25607 * during the operation.
25608 * If count is 0, returns 0 and does nothing. A value of @count
25609 * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
25610 * On success, the number of bytes written to the stream is returned.
25611 * It is not an error if this is not the same as the requested size, as it
25612 * can happen e.g. on a partial I/O error, or if there is not enough
25613 * storage in the stream. All writes block until at least one byte
25614 * is written or an error occurs; 0 is never returned (unless
25615 * If @cancellable is not NULL, then the operation can be cancelled by
25616 * triggering the cancellable object from another thread. If the operation
25617 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
25618 * operation was partially finished when the operation was cancelled the
25619 * partial result will be returned, without an error.
25620 * On error -1 is returned and @error is set accordingly.
25622 * Returns: Number of bytes written, or -1 on error
25627 * g_output_stream_write_all:
25628 * @stream: a #GOutputStream.
25629 * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
25630 * @count: the number of bytes to write
25631 * @bytes_written: (out): location to store the number of bytes that was written to the stream
25632 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25633 * @error: location to store the error occuring, or %NULL to ignore
25635 * Tries to write @count bytes from @buffer into the stream. Will block
25636 * during the operation.
25637 * This function is similar to g_output_stream_write(), except it tries to
25638 * write as many bytes as requested, only stopping on an error.
25639 * On a successful write of @count bytes, %TRUE is returned, and @bytes_written
25640 * is set to @count.
25641 * If there is an error during the operation FALSE is returned and @error
25642 * is set to indicate the error status, @bytes_written is updated to contain
25643 * the number of bytes written into the stream before the error occurred.
25645 * Returns: %TRUE on success, %FALSE if there was an error
25650 * g_output_stream_write_async:
25651 * @stream: A #GOutputStream.
25652 * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
25653 * @count: the number of bytes to write
25654 * @io_priority: the io priority of the request.
25655 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
25656 * @callback: (scope async): callback to call when the request is satisfied
25657 * @user_data: (closure): the data to pass to callback function
25659 * Request an asynchronous write of @count bytes from @buffer into
25660 * the stream. When the operation is finished @callback will be called.
25661 * You can then call g_output_stream_write_finish() to get the result of the
25663 * During an async request no other sync and async calls are allowed,
25664 * and will result in %G_IO_ERROR_PENDING errors.
25665 * A value of @count larger than %G_MAXSSIZE will cause a
25666 * %G_IO_ERROR_INVALID_ARGUMENT error.
25667 * On success, the number of bytes written will be passed to the
25668 * requested size, as it can happen e.g. on a partial I/O error,
25669 * but generally we try to write as many bytes as requested.
25670 * You are guaranteed that this method will never fail with
25671 * %G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the
25672 * method will just wait until this changes.
25673 * Any outstanding I/O request with higher priority (lower numerical
25674 * value) will be executed before an outstanding request with lower
25675 * priority. Default priority is %G_PRIORITY_DEFAULT.
25676 * The asyncronous methods have a default fallback that uses threads
25677 * to implement asynchronicity, so they are optional for inheriting
25678 * classes. However, if you override one you must override all.
25679 * For the synchronous, blocking version of this function, see
25680 * g_output_stream_write().
25685 * g_output_stream_write_finish:
25686 * @stream: a #GOutputStream.
25687 * @result: a #GAsyncResult.
25688 * @error: a #GError location to store the error occuring, or %NULL to ignore.
25690 * Finishes a stream write operation.
25692 * Returns: a #gssize containing the number of bytes written to the stream.
25697 * g_permission_acquire:
25698 * @permission: a #GPermission instance
25699 * @cancellable: a #GCancellable, or %NULL
25700 * @error: a pointer to a %NULL #GError, or %NULL
25701 * @returns: %TRUE if the permission was successfully acquired
25703 * Attempts to acquire the permission represented by @permission.
25704 * The precise method by which this happens depends on the permission
25705 * and the underlying authentication mechanism. A simple example is
25706 * that a dialog may appear asking the user to enter their password.
25707 * You should check with g_permission_get_can_acquire() before calling
25709 * If the permission is acquired then %TRUE is returned. Otherwise,
25710 * %FALSE is returned and @error is set appropriately.
25711 * This call is blocking, likely for a very long time (in the case that
25712 * user interaction is required). See g_permission_acquire_async() for
25713 * the non-blocking version.
25720 * g_permission_acquire_async:
25721 * @permission: a #GPermission instance
25722 * @cancellable: a #GCancellable, or %NULL
25723 * @callback: the #GAsyncReadyCallback to call when done
25724 * @user_data: the user data to pass to @callback
25726 * Attempts to acquire the permission represented by @permission.
25727 * This is the first half of the asynchronous version of
25728 * g_permission_acquire().
25735 * g_permission_acquire_finish:
25736 * @permission: a #GPermission instance
25737 * @result: the #GAsyncResult given to the #GAsyncReadyCallback
25738 * @error: a pointer to a %NULL #GError, or %NULL
25739 * @returns: %TRUE if the permission was successfully acquired
25741 * Collects the result of attempting to acquire the permission
25742 * represented by @permission.
25743 * This is the second half of the asynchronous version of
25744 * g_permission_acquire().
25751 * g_permission_get_allowed:
25752 * @permission: a #GPermission instance
25753 * @returns: the value of the 'allowed' property
25755 * Gets the value of the 'allowed' property. This property is %TRUE if
25756 * the caller currently has permission to perform the action that
25763 * g_permission_get_can_acquire:
25764 * @permission: a #GPermission instance
25765 * @returns: the value of the 'can-acquire' property
25767 * Gets the value of the 'can-acquire' property. This property is %TRUE
25768 * if it is generally possible to acquire the permission by calling
25769 * g_permission_acquire().
25776 * g_permission_get_can_release:
25777 * @permission: a #GPermission instance
25778 * @returns: the value of the 'can-release' property
25780 * Gets the value of the 'can-release' property. This property is %TRUE
25781 * if it is generally possible to release the permission by calling
25782 * g_permission_release().
25789 * g_permission_impl_update:
25790 * @permission: a #GPermission instance
25791 * @allowed: the new value for the 'allowed' property
25792 * @can_acquire: the new value for the 'can-acquire' property
25793 * @can_release: the new value for the 'can-release' property
25795 * This function is called by the #GPermission implementation to update
25796 * the properties of the permission. You should never call this
25797 * function except from a #GPermission implementation.
25798 * GObject notify signals are generated, as appropriate.
25805 * g_permission_release:
25806 * @permission: a #GPermission instance
25807 * @cancellable: a #GCancellable, or %NULL
25808 * @error: a pointer to a %NULL #GError, or %NULL
25809 * @returns: %TRUE if the permission was successfully released
25811 * Attempts to release the permission represented by @permission.
25812 * The precise method by which this happens depends on the permission
25813 * and the underlying authentication mechanism. In most cases the
25814 * permission will be dropped immediately without further action.
25815 * You should check with g_permission_get_can_release() before calling
25817 * If the permission is released then %TRUE is returned. Otherwise,
25818 * %FALSE is returned and @error is set appropriately.
25819 * This call is blocking, likely for a very long time (in the case that
25820 * user interaction is required). See g_permission_release_async() for
25821 * the non-blocking version.
25828 * g_permission_release_async:
25829 * @permission: a #GPermission instance
25830 * @cancellable: a #GCancellable, or %NULL
25831 * @callback: the #GAsyncReadyCallback to call when done
25832 * @user_data: the user data to pass to @callback
25834 * Attempts to release the permission represented by @permission.
25835 * This is the first half of the asynchronous version of
25836 * g_permission_release().
25843 * g_permission_release_finish:
25844 * @permission: a #GPermission instance
25845 * @result: the #GAsyncResult given to the #GAsyncReadyCallback
25846 * @error: a pointer to a %NULL #GError, or %NULL
25847 * @returns: %TRUE if the permission was successfully released
25849 * Collects the result of attempting to release the permission
25850 * represented by @permission.
25851 * This is the second half of the asynchronous version of
25852 * g_permission_release().
25859 * g_poll_file_monitor_new:
25862 * Polls @file for changes.
25864 * Returns: a new #GFileMonitor for the given #GFile.
25869 * g_pollable_input_stream_can_poll:
25870 * @stream: a #GPollableInputStream.
25872 * Checks if @stream is actually pollable. Some classes may implement
25873 * #GPollableInputStream but have only certain instances of that class
25874 * be pollable. If this method returns %FALSE, then the behavior of
25875 * other #GPollableInputStream methods is undefined.
25876 * For any given stream, the value returned by this method is constant;
25877 * a stream cannot switch from pollable to non-pollable or vice versa.
25879 * Returns: %TRUE if @stream is pollable, %FALSE if not.
25885 * g_pollable_input_stream_create_source: (skip)
25886 * @stream: a #GPollableInputStream.
25887 * @cancellable: (allow-none): a #GCancellable, or %NULL
25889 * Creates a #GSource that triggers when @stream can be read, or
25890 * source is of the #GPollableSourceFunc type.
25891 * As with g_pollable_input_stream_is_readable(), it is possible that
25892 * the stream may not actually be readable even after the source
25893 * triggers, so you should use g_pollable_input_stream_read_nonblocking()
25894 * rather than g_input_stream_read() from the callback.
25896 * Returns: (transfer full): a new #GSource
25902 * g_pollable_input_stream_is_readable:
25903 * @stream: a #GPollableInputStream.
25905 * Checks if @stream can be read.
25906 * Note that some stream types may not be able to implement this 100%
25907 * reliably, and it is possible that a call to g_input_stream_read()
25908 * after this returns %TRUE would still block. To guarantee
25909 * non-blocking behavior, you should always use
25910 * g_pollable_input_stream_read_nonblocking(), which will return a
25911 * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
25912 * has occurred on @stream, this will result in
25913 * g_pollable_input_stream_is_readable() returning %TRUE, and the
25914 * next attempt to read will return the error.
25916 * Returns: %TRUE if @stream is readable, %FALSE if not. If an error
25922 * g_pollable_input_stream_read_nonblocking:
25923 * @stream: a #GPollableInputStream
25924 * @buffer: a buffer to read data into (which should be at least @size bytes long).
25925 * @size: the number of bytes you want to read
25926 * @cancellable: (allow-none): a #GCancellable, or %NULL
25927 * @error: #GError for error reporting, or %NULL to ignore.
25929 * Attempts to read up to @size bytes from @stream into @buffer, as
25930 * with g_input_stream_read(). If @stream is not currently readable,
25931 * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
25932 * use g_pollable_input_stream_create_source() to create a #GSource
25933 * that will be triggered when @stream is readable.
25934 * Note that since this method never blocks, you cannot actually
25935 * use @cancellable to cancel it. However, it will return an error
25936 * if @cancellable has already been cancelled when you call, which
25937 * may happen if you call this method after a source triggers due
25938 * to having been cancelled.
25939 * %G_IO_ERROR_WOULD_BLOCK).
25941 * Virtual: read_nonblocking
25942 * Returns: the number of bytes read, or -1 on error (including
25947 * g_pollable_output_stream_can_poll:
25948 * @stream: a #GPollableOutputStream.
25950 * Checks if @stream is actually pollable. Some classes may implement
25951 * #GPollableOutputStream but have only certain instances of that
25952 * class be pollable. If this method returns %FALSE, then the behavior
25953 * of other #GPollableOutputStream methods is undefined.
25954 * For any given stream, the value returned by this method is constant;
25955 * a stream cannot switch from pollable to non-pollable or vice versa.
25957 * Returns: %TRUE if @stream is pollable, %FALSE if not.
25963 * g_pollable_output_stream_create_source: (skip)
25964 * @stream: a #GPollableOutputStream.
25965 * @cancellable: (allow-none): a #GCancellable, or %NULL
25967 * Creates a #GSource that triggers when @stream can be written, or
25968 * source is of the #GPollableSourceFunc type.
25969 * As with g_pollable_output_stream_is_writable(), it is possible that
25970 * the stream may not actually be writable even after the source
25971 * triggers, so you should use g_pollable_output_stream_write_nonblocking()
25972 * rather than g_output_stream_write() from the callback.
25974 * Returns: (transfer full): a new #GSource
25980 * g_pollable_output_stream_is_writable:
25981 * @stream: a #GPollableOutputStream.
25983 * Checks if @stream can be written.
25984 * Note that some stream types may not be able to implement this 100%
25985 * reliably, and it is possible that a call to g_output_stream_write()
25986 * after this returns %TRUE would still block. To guarantee
25987 * non-blocking behavior, you should always use
25988 * g_pollable_output_stream_write_nonblocking(), which will return a
25989 * %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
25990 * has occurred on @stream, this will result in
25991 * g_pollable_output_stream_is_writable() returning %TRUE, and the
25992 * next attempt to write will return the error.
25994 * Returns: %TRUE if @stream is writable, %FALSE if not. If an error
26000 * g_pollable_output_stream_write_nonblocking:
26001 * @stream: a #GPollableOutputStream
26002 * @buffer: (array length=size) (element-type guint8): a buffer to write data from
26003 * @size: the number of bytes you want to write
26004 * @cancellable: (allow-none): a #GCancellable, or %NULL
26005 * @error: #GError for error reporting, or %NULL to ignore.
26007 * Attempts to write up to @size bytes from @buffer to @stream, as
26008 * with g_output_stream_write(). If @stream is not currently writable,
26009 * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can
26010 * use g_pollable_output_stream_create_source() to create a #GSource
26011 * that will be triggered when @stream is writable.
26012 * Note that since this method never blocks, you cannot actually
26013 * use @cancellable to cancel it. However, it will return an error
26014 * if @cancellable has already been cancelled when you call, which
26015 * may happen if you call this method after a source triggers due
26016 * to having been cancelled.
26017 * %G_IO_ERROR_WOULD_BLOCK).
26019 * Virtual: write_nonblocking
26020 * Returns: the number of bytes written, or -1 on error (including
26025 * g_pollable_source_new: (skip)
26026 * @pollable_stream: the stream associated with the new source
26028 * Utility method for #GPollableInputStream and #GPollableOutputStream
26029 * implementations. Creates a new #GSource that expects a callback of
26030 * type #GPollableSourceFunc. The new source does not actually do
26031 * anything on its own; use g_source_add_child_source() to add other
26032 * sources to it to cause it to trigger.
26034 * Returns: (transfer full): the new #GSource.
26040 * g_proxy_address_get_destination_hostname:
26041 * @proxy: a #GProxyAddress
26043 * Gets @proxy's destination hostname.
26045 * Returns: the @proxy's destination hostname
26051 * g_proxy_address_get_destination_port:
26052 * @proxy: a #GProxyAddress
26054 * Gets @proxy's destination port.
26056 * Returns: the @proxy's destination port
26062 * g_proxy_address_get_password:
26063 * @proxy: a #GProxyAddress
26065 * Gets @proxy's password.
26067 * Returns: the @proxy's password
26073 * g_proxy_address_get_protocol:
26074 * @proxy: a #GProxyAddress
26076 * Gets @proxy's protocol.
26078 * Returns: the @proxy's protocol
26084 * g_proxy_address_get_username:
26085 * @proxy: a #GProxyAddress
26087 * Gets @proxy's username.
26089 * Returns: the @proxy's username
26095 * g_proxy_address_new:
26096 * @inetaddr: The proxy server #GInetAddress.
26097 * @port: The proxy server port.
26098 * @protocol: The proxy protocol to support, in lower case (e.g. socks, http).
26099 * @dest_hostname: The destination hostname the the proxy should tunnel to.
26100 * @dest_port: The destination port to tunnel to.
26101 * @username: (allow-none): The username to authenticate to the proxy server (or %NULL).
26102 * @password: (allow-none): The password to authenticate to the proxy server (or %NULL).
26104 * Creates a new #GProxyAddress for @inetaddr with @protocol that should
26105 * tunnel through @dest_hostname and @dest_port.
26107 * Returns: a new #GProxyAddress
26114 * @proxy: a #GProxy
26115 * @connection: a #GIOStream
26116 * @proxy_address: a #GProxyAddress
26117 * @cancellable: (allow-none): a #GCancellable
26118 * @error: return #GError
26120 * Given @connection to communicate with a proxy (eg, a
26121 * #GSocketConnection that is connected to the proxy server), this
26122 * does the necessary handshake to connect to @proxy_address, and if
26123 * required, wraps the #GIOStream to handle proxy payload.
26124 * be the same as @connection, in which case a reference
26127 * Returns: (transfer full): a #GIOStream that will replace @connection. This might
26133 * g_proxy_connect_async:
26134 * @proxy: a #GProxy
26135 * @connection: a #GIOStream
26136 * @proxy_address: a #GProxyAddress
26137 * @cancellable: (allow-none): a #GCancellable
26138 * @callback: (scope async): a #GAsyncReadyCallback
26139 * @user_data: (closure): callback data
26141 * Asynchronous version of g_proxy_connect().
26148 * g_proxy_connect_finish:
26149 * @proxy: a #GProxy
26150 * @result: a #GAsyncRetult
26151 * @error: return #GError
26153 * See g_proxy_connect().
26155 * Returns: (transfer full): a #GIOStream.
26161 * g_proxy_get_default_for_protocol:
26162 * @protocol: the proxy protocol name (e.g. http, socks, etc)
26164 * Lookup "gio-proxy" extension point for a proxy implementation that supports
26165 * specified protocol.
26166 * is not supported.
26168 * Returns: (transfer full): return a #GProxy or NULL if protocol
26174 * g_proxy_resolver_get_default:
26176 * Gets the default #GProxyResolver for the system.
26178 * Returns: (transfer none): the default #GProxyResolver.
26184 * g_proxy_resolver_is_supported:
26185 * @resolver: a #GProxyResolver
26187 * Checks if @resolver can be used on this system. (This is used
26188 * internally; g_proxy_resolver_get_default() will only return a proxy
26189 * resolver that returns %TRUE for this method.)
26191 * Returns: %TRUE if @resolver is supported.
26197 * g_proxy_resolver_lookup:
26198 * @resolver: a #GProxyResolver
26199 * @uri: a URI representing the destination to connect to
26200 * @cancellable: (allow-none): a #GCancellable, or %NULL
26201 * @error: return location for a #GError, or %NULL
26203 * Looks into the system proxy configuration to determine what proxy,
26204 * if any, to use to connect to @uri. The returned proxy URIs are of the
26205 * form <literal><protocol>://[user[:password]@]host:port</literal>
26206 * or <literal>direct://</literal>, where <protocol> could be
26207 * http, rtsp, socks or other proxying protocol.
26208 * If you don't know what network protocol is being used on the
26209 * socket, you should use <literal>none</literal> as the URI protocol.
26210 * In this case, the resolver might still return a generic proxy type
26211 * (such as SOCKS), but would not return protocol-specific proxy types
26213 * <literal>direct://</literal> is used when no proxy is needed.
26214 * Direct connection should not be attempted unless it is part of the
26215 * returned array of proxies.
26216 * NULL-terminated array of proxy URIs. Must be freed
26217 * with g_strfreev().
26219 * Returns: (transfer full) (array zero-terminated=1): A
26225 * g_proxy_resolver_lookup_async:
26226 * @resolver: a #GProxyResolver
26227 * @uri: a URI representing the destination to connect to
26228 * @cancellable: (allow-none): a #GCancellable, or %NULL
26229 * @callback: (scope async): callback to call after resolution completes
26230 * @user_data: (closure): data for @callback
26232 * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
26240 * g_proxy_resolver_lookup_finish:
26241 * @resolver: a #GProxyResolver
26242 * @result: the result passed to your #GAsyncReadyCallback
26243 * @error: return location for a #GError, or %NULL
26245 * Call this function to obtain the array of proxy URIs when
26246 * g_proxy_resolver_lookup_async() is complete. See
26247 * g_proxy_resolver_lookup() for more details.
26248 * NULL-terminated array of proxy URIs. Must be freed
26249 * with g_strfreev().
26251 * Returns: (transfer full) (array zero-terminated=1): A
26257 * g_proxy_supports_hostname:
26258 * @proxy: a #GProxy
26260 * Some proxy protocols expect to be passed a hostname, which they
26261 * will resolve to an IP address themselves. Others, like SOCKS4, do
26262 * not allow this. This function will return %FALSE if @proxy is
26263 * implementing such a protocol. When %FALSE is returned, the caller
26264 * should resolve the destination hostname first, and then pass a
26265 * #GProxyAddress containing the stringified IP address to
26266 * g_proxy_connect() or g_proxy_connect_async().
26268 * Returns: %TRUE if hostname resolution is supported.
26275 * @struct_type: the type of the elements to allocate
26276 * @mem: the currently allocated memory
26277 * @n_structs: the number of elements to allocate
26279 * Reallocates the memory pointed to by @mem, so that it now has space for
26280 * the memory, which may have been moved.
26281 * Care is taken to avoid overflow when calculating the size of the allocated block.
26283 * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
26288 * g_resolver_error_quark:
26290 * Gets the #GResolver Error Quark.
26292 * Returns: a #GQuark.
26298 * g_resolver_free_addresses: (skip)
26299 * @addresses: a #GList of #GInetAddress
26301 * Frees @addresses (which should be the return value from
26302 * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()).
26303 * (This is a convenience method; you can also simply free the results
26311 * g_resolver_free_targets: (skip)
26312 * @targets: a #GList of #GSrvTarget
26314 * Frees @targets (which should be the return value from
26315 * g_resolver_lookup_service() or g_resolver_lookup_service_finish()).
26316 * (This is a convenience method; you can also simply free the
26317 * results by hand.)
26324 * g_resolver_get_default:
26326 * Gets the default #GResolver. You should unref it when you are done
26327 * with it. #GResolver may use its reference count as a hint about how
26328 * many threads/processes, etc it should allocate for concurrent DNS
26331 * Returns: (transfer full): the default #GResolver.
26337 * g_resolver_lookup_by_address:
26338 * @resolver: a #GResolver
26339 * @address: the address to reverse-resolve
26340 * @cancellable: (allow-none): a #GCancellable, or %NULL
26341 * @error: return location for a #GError, or %NULL
26343 * Synchronously reverse-resolves @address to determine its
26344 * associated hostname.
26345 * If the DNS resolution fails, @error (if non-%NULL) will be set to
26346 * a value from #GResolverError.
26347 * If @cancellable is non-%NULL, it can be used to cancel the
26348 * operation, in which case @error (if non-%NULL) will be set to
26349 * %G_IO_ERROR_CANCELLED.
26350 * form), or %NULL on error.
26352 * Returns: a hostname (either ASCII-only, or in ASCII-encoded
26358 * g_resolver_lookup_by_address_async:
26359 * @resolver: a #GResolver
26360 * @address: the address to reverse-resolve
26361 * @cancellable: (allow-none): a #GCancellable, or %NULL
26362 * @callback: (scope async): callback to call after resolution completes
26363 * @user_data: (closure): data for @callback
26365 * Begins asynchronously reverse-resolving @address to determine its
26366 * associated hostname, and eventually calls @callback, which must
26367 * call g_resolver_lookup_by_address_finish() to get the final result.
26374 * g_resolver_lookup_by_address_finish:
26375 * @resolver: a #GResolver
26376 * @result: the result passed to your #GAsyncReadyCallback
26377 * @error: return location for a #GError, or %NULL
26379 * Retrieves the result of a previous call to
26380 * g_resolver_lookup_by_address_async().
26381 * If the DNS resolution failed, @error (if non-%NULL) will be set to
26382 * a value from #GResolverError. If the operation was cancelled,
26383 * form), or %NULL on error.
26385 * Returns: a hostname (either ASCII-only, or in ASCII-encoded
26391 * g_resolver_lookup_by_name:
26392 * @resolver: a #GResolver
26393 * @hostname: the hostname to look up
26394 * @cancellable: (allow-none): a #GCancellable, or %NULL
26395 * @error: return location for a #GError, or %NULL
26397 * Synchronously resolves @hostname to determine its associated IP
26398 * address(es). @hostname may be an ASCII-only or UTF-8 hostname, or
26399 * the textual form of an IP address (in which case this just becomes
26400 * a wrapper around g_inet_address_new_from_string()).
26401 * On success, g_resolver_lookup_by_name() will return a #GList of
26402 * #GInetAddress, sorted in order of preference. (That is, you should
26403 * attempt to connect to the first address first, then the second if
26404 * the first fails, etc.)
26405 * If the DNS resolution fails, @error (if non-%NULL) will be set to a
26406 * value from #GResolverError.
26407 * If @cancellable is non-%NULL, it can be used to cancel the
26408 * operation, in which case @error (if non-%NULL) will be set to
26409 * %G_IO_ERROR_CANCELLED.
26410 * If you are planning to connect to a socket on the resolved IP
26411 * address, it may be easier to create a #GNetworkAddress and use its
26412 * #GSocketConnectable interface.
26413 * of #GInetAddress, or %NULL on error. You
26414 * must unref each of the addresses and free the list when you are
26415 * done with it. (You can use g_resolver_free_addresses() to do this.)
26417 * Returns: (element-type GInetAddress) (transfer full): a #GList
26423 * g_resolver_lookup_by_name_async:
26424 * @resolver: a #GResolver
26425 * @hostname: the hostname to look up the address of
26426 * @cancellable: (allow-none): a #GCancellable, or %NULL
26427 * @callback: (scope async): callback to call after resolution completes
26428 * @user_data: (closure): data for @callback
26430 * Begins asynchronously resolving @hostname to determine its
26431 * associated IP address(es), and eventually calls @callback, which
26432 * must call g_resolver_lookup_by_name_finish() to get the result.
26433 * See g_resolver_lookup_by_name() for more details.
26440 * g_resolver_lookup_by_name_finish:
26441 * @resolver: a #GResolver
26442 * @result: the result passed to your #GAsyncReadyCallback
26443 * @error: return location for a #GError, or %NULL
26445 * Retrieves the result of a call to
26446 * g_resolver_lookup_by_name_async().
26447 * If the DNS resolution failed, @error (if non-%NULL) will be set to
26448 * a value from #GResolverError. If the operation was cancelled,
26449 * of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name()
26450 * for more details.
26452 * Returns: (element-type GInetAddress) (transfer full): a #GList
26458 * g_resolver_lookup_service:
26459 * @resolver: a #GResolver
26460 * @service: the service type to look up (eg, "ldap")
26461 * @protocol: the networking protocol to use for @service (eg, "tcp")
26462 * @domain: the DNS domain to look up the service in
26463 * @cancellable: (allow-none): a #GCancellable, or %NULL
26464 * @error: return location for a #GError, or %NULL
26466 * Synchronously performs a DNS SRV lookup for the given @service and
26467 * include the leading underscore that appears in the actual DNS
26469 * On success, g_resolver_lookup_service() will return a #GList of
26470 * #GSrvTarget, sorted in order of preference. (That is, you should
26471 * attempt to connect to the first target first, then the second if
26472 * the first fails, etc.)
26473 * If the DNS resolution fails, @error (if non-%NULL) will be set to
26474 * a value from #GResolverError.
26475 * If @cancellable is non-%NULL, it can be used to cancel the
26476 * operation, in which case @error (if non-%NULL) will be set to
26477 * %G_IO_ERROR_CANCELLED.
26478 * If you are planning to connect to the service, it is usually easier
26479 * to create a #GNetworkService and use its #GSocketConnectable
26481 * or %NULL on error. You must free each of the targets and the list when you are
26482 * done with it. (You can use g_resolver_free_targets() to do this.)
26484 * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
26490 * g_resolver_lookup_service_async:
26491 * @resolver: a #GResolver
26492 * @service: the service type to look up (eg, "ldap")
26493 * @protocol: the networking protocol to use for @service (eg, "tcp")
26494 * @domain: the DNS domain to look up the service in
26495 * @cancellable: (allow-none): a #GCancellable, or %NULL
26496 * @callback: (scope async): callback to call after resolution completes
26497 * @user_data: (closure): data for @callback
26499 * Begins asynchronously performing a DNS SRV lookup for the given
26500 * get the final result. See g_resolver_lookup_service() for more
26508 * g_resolver_lookup_service_finish:
26509 * @resolver: a #GResolver
26510 * @result: the result passed to your #GAsyncReadyCallback
26511 * @error: return location for a #GError, or %NULL
26513 * Retrieves the result of a previous call to
26514 * g_resolver_lookup_service_async().
26515 * If the DNS resolution failed, @error (if non-%NULL) will be set to
26516 * a value from #GResolverError. If the operation was cancelled,
26517 * or %NULL on error. See g_resolver_lookup_service() for more details.
26519 * Returns: (element-type GSrvTarget) (transfer full): a #GList of #GSrvTarget,
26525 * g_resolver_set_default:
26526 * @resolver: the new default #GResolver
26528 * Sets @resolver to be the application's default resolver (reffing
26529 * Future calls to g_resolver_get_default() will return this resolver.
26530 * This can be used if an application wants to perform any sort of DNS
26531 * caching or "pinning"; it can implement its own #GResolver that
26532 * calls the original default resolver for DNS operations, and
26533 * implements its own cache policies on top of that, and then set
26534 * itself as the default resolver for all later code to use.
26541 * g_seekable_can_seek:
26542 * @seekable: a #GSeekable.
26544 * Tests if the stream supports the #GSeekableIface.
26546 * Returns: %TRUE if @seekable can be seeked. %FALSE otherwise.
26551 * g_seekable_can_truncate:
26552 * @seekable: a #GSeekable.
26554 * Tests if the stream can be truncated.
26556 * Returns: %TRUE if the stream can be truncated, %FALSE otherwise.
26562 * @seekable: a #GSeekable.
26563 * @offset: a #goffset.
26564 * @type: a #GSeekType.
26565 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26566 * @error: a #GError location to store the error occuring, or %NULL to ignore.
26568 * Seeks in the stream by the given @offset, modified by @type.
26569 * If @cancellable is not %NULL, then the operation can be cancelled by
26570 * triggering the cancellable object from another thread. If the operation
26571 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
26572 * has occurred, this function will return %FALSE and set @error
26573 * appropriately if present.
26575 * Returns: %TRUE if successful. If an error
26581 * @seekable: a #GSeekable.
26583 * Tells the current position within the stream.
26585 * Returns: the offset from the beginning of the buffer.
26590 * g_seekable_truncate:
26591 * @seekable: a #GSeekable.
26592 * @offset: a #goffset.
26593 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
26594 * @error: a #GError location to store the error occuring, or %NULL to ignore.
26596 * Truncates a stream with a given #offset.
26597 * If @cancellable is not %NULL, then the operation can be cancelled by
26598 * triggering the cancellable object from another thread. If the operation
26599 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
26600 * operation was partially finished when the operation was cancelled the
26601 * partial result will be returned, without an error.
26602 * has occurred, this function will return %FALSE and set @error
26603 * appropriately if present.
26605 * Virtual: truncate_fn
26606 * Returns: %TRUE if successful. If an error
26611 * g_settings_apply:
26612 * @settings: a #GSettings instance
26614 * Applies any changes that have been made to the settings. This
26615 * function does nothing unless @settings is in 'delay-apply' mode;
26616 * see g_settings_delay(). In the normal case settings are always
26617 * applied immediately.
26622 * g_settings_backend_changed:
26623 * @backend: a #GSettingsBackend implementation
26624 * @key: the name of the key
26625 * @origin_tag: the origin tag
26627 * Signals that a single key has possibly changed. Backend
26628 * implementations should call this if a key has possibly changed its
26630 * '//', and not ending with a slash).
26631 * The implementation must call this function during any call to
26632 * g_settings_backend_write(), before the call returns (except in the
26633 * case that no keys are actually changed and it cares to detect this
26634 * fact). It may not rely on the existence of a mainloop for
26635 * dispatching the signal later.
26636 * The implementation may call this function at any other time it likes
26637 * in response to other events (such as changes occuring outside of the
26638 * program). These calls may originate from a mainloop or may originate
26639 * in response to any other action (including from calls to
26640 * g_settings_backend_write()).
26641 * In the case that this call is in response to a call to
26642 * g_settings_backend_write() then @origin_tag must be set to the same
26643 * value that was passed to that call.
26650 * g_settings_backend_changed_tree:
26651 * @backend: a #GSettingsBackend implementation
26652 * @tree: a #GTree containing the changes
26653 * @origin_tag: the origin tag
26655 * This call is a convenience wrapper. It gets the list of changes from
26656 * g_settings_backend_changed().
26663 * g_settings_backend_flatten_tree:
26664 * @tree: a #GTree containing the changes
26665 * @path: (out): the location to save the path
26666 * @keys: (out) (transfer container) (array zero-terminated=1): the location to save the relative keys
26667 * @values: (out) (allow-none) (transfer container) (array zero-terminated=1): the location to save the values, or %NULL
26669 * Calculate the longest common prefix of all keys in a tree and write
26670 * out an array of the key names relative to that prefix and,
26671 * optionally, the value to store at each of those keys.
26672 * You must free the value returned in @path, @keys and @values using
26673 * g_free(). You should not attempt to free or unref the contents of
26680 * g_settings_backend_get_default:
26681 * @returns: (transfer full): the default #GSettingsBackend
26683 * Returns the default #GSettingsBackend. It is possible to override
26684 * the default by setting the <envar>GSETTINGS_BACKEND</envar>
26685 * environment variable to the name of a settings backend.
26686 * The user gets a reference to the backend.
26693 * g_settings_backend_keys_changed:
26694 * @backend: a #GSettingsBackend implementation
26695 * @path: the path containing the changes
26696 * @items: (array zero-terminated=1): the %NULL-terminated list of changed keys
26697 * @origin_tag: the origin tag
26699 * Signals that a list of keys have possibly changed. Backend
26700 * implementations should call this if keys have possibly changed their
26702 * not containing '//'). Each string in @items must form a valid key
26703 * end with '/' and must not contain '//').
26704 * The meaning of this signal is that any of the key names resulting
26705 * from the contatenation of @path with each item in @items may have
26707 * The same rules for when notifications must occur apply as per
26708 * g_settings_backend_changed(). These two calls can be used
26709 * interchangeably if exactly one item has changed (although in that
26710 * case g_settings_backend_changed() is definitely preferred).
26711 * For efficiency reasons, the implementation should strive for @path to
26712 * keys that were changed) but this is not strictly required.
26714 * Name when @path is prefixed to it (ie: each item must not start or
26715 * Be as long as possible (ie: the longest common prefix of all of the
26721 * g_settings_backend_path_changed:
26722 * @backend: a #GSettingsBackend implementation
26723 * @path: the path containing the changes
26724 * @origin_tag: the origin tag
26726 * Signals that all keys below a given path may have possibly changed.
26727 * Backend implementations should call this if an entire path of keys
26728 * have possibly changed their values.
26729 * not containing '//').
26730 * The meaning of this signal is that any of the key which has a name
26731 * starting with @path may have changed.
26732 * The same rules for when notifications must occur apply as per
26733 * g_settings_backend_changed(). This call might be an appropriate
26734 * reasponse to a 'reset' call but implementations are also free to
26735 * explicitly list the keys that were affected by that call if they can
26737 * For efficiency reasons, the implementation should strive for @path to
26738 * keys that were changed) but this is not strictly required. As an
26739 * example, if this function is called with the path of "/" then every
26740 * single key in the application will be notified of a possible change.
26742 * Be as long as possible (ie: the longest common prefix of all of the
26748 * g_settings_backend_path_writable_changed:
26749 * @backend: a #GSettingsBackend implementation
26750 * @path: the name of the path
26752 * Signals that the writability of all keys below a given path may have
26754 * Since GSettings performs no locking operations for itself, this call
26755 * will always be made in response to external events.
26762 * g_settings_backend_writable_changed:
26763 * @backend: a #GSettingsBackend implementation
26764 * @key: the name of the key
26766 * Signals that the writability of a single key has possibly changed.
26767 * Since GSettings performs no locking operations for itself, this call
26768 * will always be made in response to external events.
26776 * @settings: a #GSettings object
26777 * @key: the key to bind
26778 * @object: (type GObject.Object): a #GObject
26779 * @property: the name of the property to bind
26780 * @flags: flags for the binding
26782 * Create a binding between the @key in the @settings object
26783 * and the property @property of @object.
26784 * The binding uses the default GIO mapping functions to map
26785 * between the settings and property values. These functions
26786 * handle booleans, numeric types and string types in a
26787 * straightforward way. Use g_settings_bind_with_mapping() if
26788 * you need a custom mapping, or map between types that are not
26789 * supported by the default mapping functions.
26790 * Unless the @flags include %G_SETTINGS_BIND_NO_SENSITIVITY, this
26791 * function also establishes a binding between the writability of
26792 * a boolean property by that name). See g_settings_bind_writable()
26793 * for more details about writable bindings.
26794 * Note that the lifecycle of the binding is tied to the object,
26795 * and that you can have only one binding per object property.
26796 * If you bind the same property twice on the same object, the second
26797 * binding overrides the first one.
26804 * g_settings_bind_with_mapping: (skip)
26805 * @settings: a #GSettings object
26806 * @key: the key to bind
26807 * @object: (type GObject.Object): a #GObject
26808 * @property: the name of the property to bind
26809 * @flags: flags for the binding
26810 * @get_mapping: a function that gets called to convert values from @settings to @object, or %NULL to use the default GIO mapping
26811 * @set_mapping: a function that gets called to convert values from @object to @settings, or %NULL to use the default GIO mapping
26812 * @user_data: data that gets passed to @get_mapping and @set_mapping
26813 * @destroy: #GDestroyNotify function for @user_data
26815 * Create a binding between the @key in the @settings object
26816 * and the property @property of @object.
26817 * The binding uses the provided mapping functions to map between
26818 * settings and property values.
26819 * Note that the lifecycle of the binding is tied to the object,
26820 * and that you can have only one binding per object property.
26821 * If you bind the same property twice on the same object, the second
26822 * binding overrides the first one.
26829 * g_settings_bind_writable:
26830 * @settings: a #GSettings object
26831 * @key: the key to bind
26832 * @object: (type GObject.Object): a #GObject
26833 * @property: the name of a boolean property to bind
26834 * @inverted: whether to 'invert' the value
26836 * Create a binding between the writability of @key in the
26837 * The property must be boolean; "sensitive" or "visible"
26838 * properties of widgets are the most likely candidates.
26839 * Writable bindings are always uni-directional; changes of the
26840 * writability of the setting will be propagated to the object
26841 * property, not the other way.
26842 * When the @inverted argument is %TRUE, the binding inverts the
26843 * value as it passes from the setting to the object, i.e. @property
26844 * will be set to %TRUE if the key is <emphasis>not</emphasis>
26846 * Note that the lifecycle of the binding is tied to the object,
26847 * and that you can have only one binding per object property.
26848 * If you bind the same property twice on the same object, the second
26849 * binding overrides the first one.
26856 * g_settings_delay:
26857 * @settings: a #GSettings object
26859 * Changes the #GSettings object into 'delay-apply' mode. In this
26860 * mode, changes to @settings are not immediately propagated to the
26861 * backend, but kept locally until g_settings_apply() is called.
26869 * @settings: a #GSettings object
26870 * @key: the key to get the value for
26871 * @format: a #GVariant format string
26872 * @...: arguments as per @format
26874 * Gets the value that is stored at @key in @settings.
26875 * A convenience function that combines g_settings_get_value() with
26877 * It is a programmer error to give a @key that isn't contained in the
26878 * schema for @settings or for the #GVariantType of @format to mismatch
26879 * the type given in the schema.
26886 * g_settings_get_boolean:
26887 * @settings: a #GSettings object
26888 * @key: the key to get the value for
26889 * @returns: a boolean
26891 * Gets the value that is stored at @key in @settings.
26892 * A convenience variant of g_settings_get() for booleans.
26893 * It is a programmer error to give a @key that isn't specified as
26894 * having a boolean type in the schema for @settings.
26901 * g_settings_get_child:
26902 * @settings: a #GSettings object
26903 * @name: the name of the 'child' schema
26904 * @returns: (transfer full): a 'child' settings object
26906 * Creates a 'child' settings object which has a base path of
26907 * <replaceable>base-path</replaceable>/@name, where
26908 * <replaceable>base-path</replaceable> is the base path of @settings.
26909 * The schema for the child settings object must have been declared
26910 * in the schema of @settings using a <tag class="starttag">child</tag> element.
26917 * g_settings_get_double:
26918 * @settings: a #GSettings object
26919 * @key: the key to get the value for
26920 * @returns: a double
26922 * Gets the value that is stored at @key in @settings.
26923 * A convenience variant of g_settings_get() for doubles.
26924 * It is a programmer error to give a @key that isn't specified as
26925 * having a 'double' type in the schema for @settings.
26932 * g_settings_get_enum:
26933 * @settings: a #GSettings object
26934 * @key: the key to get the value for
26935 * @returns: the enum value
26937 * Gets the value that is stored in @settings for @key and converts it
26938 * to the enum value that it represents.
26939 * In order to use this function the type of the value must be a string
26940 * and it must be marked in the schema file as an enumerated type.
26941 * It is a programmer error to give a @key that isn't contained in the
26942 * schema for @settings or is not marked as an enumerated type.
26943 * If the value stored in the configuration database is not a valid
26944 * value for the enumerated type then this function will return the
26952 * g_settings_get_flags:
26953 * @settings: a #GSettings object
26954 * @key: the key to get the value for
26955 * @returns: the flags value
26957 * Gets the value that is stored in @settings for @key and converts it
26958 * to the flags value that it represents.
26959 * In order to use this function the type of the value must be an array
26960 * of strings and it must be marked in the schema file as an flags type.
26961 * It is a programmer error to give a @key that isn't contained in the
26962 * schema for @settings or is not marked as a flags type.
26963 * If the value stored in the configuration database is not a valid
26964 * value for the flags type then this function will return the default
26972 * g_settings_get_has_unapplied:
26973 * @settings: a #GSettings object
26974 * @returns: %TRUE if @settings has unapplied changes
26976 * Returns whether the #GSettings object has any unapplied
26977 * changes. This can only be the case if it is in 'delayed-apply' mode.
26984 * g_settings_get_int:
26985 * @settings: a #GSettings object
26986 * @key: the key to get the value for
26987 * @returns: an integer
26989 * Gets the value that is stored at @key in @settings.
26990 * A convenience variant of g_settings_get() for 32-bit integers.
26991 * It is a programmer error to give a @key that isn't specified as
26992 * having a int32 type in the schema for @settings.
26999 * g_settings_get_mapped:
27000 * @settings: a #GSettings object
27001 * @key: the key to get the value for
27002 * @mapping: (scope call): the function to map the value in the settings database to the value used by the application
27003 * @user_data: user data for @mapping
27004 * @returns: (transfer full): the result, which may be %NULL
27006 * Gets the value that is stored at @key in @settings, subject to
27007 * application-level validation/mapping.
27008 * You should use this function when the application needs to perform
27009 * some processing on the value of the key (for example, parsing). The
27010 * indicates that the processing was unsuccessful (due to a parse error,
27011 * for example) then the mapping is tried again with another value.
27012 * This allows a robust 'fall back to defaults' behaviour to be
27013 * implemented somewhat automatically.
27014 * The first value that is tried is the user's setting for the key. If
27015 * the mapping function fails to map this value, other values may be
27016 * tried in an unspecified order (system or site defaults, translated
27017 * schema default values, untranslated schema default values, etc).
27018 * If the mapping function fails for all possible values, one additional
27019 * If the mapping function still indicates failure at this point then
27020 * the application will be aborted.
27021 * The result parameter for the @mapping function is pointed to a
27022 * #gpointer which is initially set to %NULL. The same pointer is given
27023 * to each invocation of @mapping. The final value of that #gpointer is
27024 * what is returned by this function. %NULL is valid; it is returned
27025 * just as any other value would be.
27027 * Attempt is made: the mapping function is called with a %NULL value.
27032 * g_settings_get_range:
27033 * @settings: a #GSettings
27034 * @key: the key to query the range of
27035 * @returns: a #GVariant describing the range
27037 * Queries the range of a key.
27038 * This function will return a #GVariant that fully describes the range
27039 * of values that are valid for @key.
27040 * The type of #GVariant returned is <literal>(sv)</literal>. The
27041 * string describes the type of range restriction in effect. The type
27042 * and meaning of the value contained in the variant depends on the
27044 * If the string is <literal>'type'</literal> then the variant contains
27045 * an empty array. The element type of that empty array is the expected
27046 * type of value and all values of that type are valid.
27047 * If the string is <literal>'enum'</literal> then the variant contains
27048 * an array enumerating the possible values. Each item in the array is
27049 * a possible valid value and no other values are valid.
27050 * If the string is <literal>'flags'</literal> then the variant contains
27051 * an array. Each item in the array is a value that may appear zero or
27052 * one times in an array to be used as the value for this key. For
27053 * example, if the variant contained the array <literal>['x',
27054 * 'y']</literal> then the valid values for the key would be
27055 * <literal>[]</literal>, <literal>['x']</literal>,
27056 * <literal>['y']</literal>, <literal>['x', 'y']</literal> and
27057 * <literal>['y', 'x']</literal>.
27058 * Finally, if the string is <literal>'range'</literal> then the variant
27059 * contains a pair of like-typed values -- the minimum and maximum
27060 * permissible values for this key.
27061 * This information should not be used by normal programs. It is
27062 * considered to be a hint for introspection purposes. Normal programs
27063 * should already know what is permitted by their own schema. The
27064 * format may change in any way in the future -- but particularly, new
27065 * forms may be added to the possibilities described above.
27066 * It is a programmer error to give a @key that isn't contained in the
27067 * schema for @settings.
27068 * You should free the returned value with g_variant_unref() when it is
27069 * no longer needed.
27076 * g_settings_get_string:
27077 * @settings: a #GSettings object
27078 * @key: the key to get the value for
27079 * @returns: a newly-allocated string
27081 * Gets the value that is stored at @key in @settings.
27082 * A convenience variant of g_settings_get() for strings.
27083 * It is a programmer error to give a @key that isn't specified as
27084 * having a string type in the schema for @settings.
27091 * g_settings_get_strv:
27092 * @settings: a #GSettings object
27093 * @key: the key to get the value for
27094 * @returns: (array zero-terminated=1) (transfer full): a newly-allocated, %NULL-terminated array of strings, the value that is stored at @key in @settings.
27096 * A convenience variant of g_settings_get() for string arrays.
27097 * It is a programmer error to give a @key that isn't specified as
27098 * having an array of strings type in the schema for @settings.
27105 * g_settings_get_value:
27106 * @settings: a #GSettings object
27107 * @key: the key to get the value for
27108 * @returns: a new #GVariant
27110 * Gets the value that is stored in @settings for @key.
27111 * It is a programmer error to give a @key that isn't contained in the
27112 * schema for @settings.
27119 * g_settings_is_writable:
27120 * @settings: a #GSettings object
27121 * @name: the name of a key
27122 * @returns: %TRUE if the key @name is writable
27124 * Finds out if a key can be written or not
27131 * g_settings_list_children:
27132 * @settings: a #GSettings object
27133 * @returns: (transfer full) (element-type utf8): a list of the children on @settings
27135 * Gets the list of children on @settings.
27136 * The list is exactly the list of strings for which it is not an error
27137 * to call g_settings_get_child().
27138 * For GSettings objects that are lists, this value can change at any
27139 * time and you should connect to the "children-changed" signal to watch
27140 * request a child after listing it only for it to have been destroyed
27141 * in the meantime. For this reason, g_settings_get_child() may return
27142 * %NULL even for a child that was listed by this function.
27143 * For GSettings objects that are not lists, you should probably not be
27144 * calling this function from "normal" code (since you should already
27145 * know what children are in your schema). This function may still be
27146 * useful there for introspection reasons, however.
27147 * You should free the return value with g_strfreev() when you are done
27150 * For those changes. note that there is a race condition here: you may
27155 * g_settings_list_keys:
27156 * @settings: a #GSettings object
27157 * @returns: (transfer full) (element-type utf8): a list of the keys on @settings
27159 * Introspects the list of keys on @settings.
27160 * You should probably not be calling this function from "normal" code
27161 * (since you should already know what keys are in your schema). This
27162 * function is intended for introspection reasons.
27163 * You should free the return value with g_strfreev() when you are done
27169 * g_settings_list_relocatable_schemas:
27171 * Gets a list of the relocatable #GSettings schemas installed on the
27172 * system. These are schemas that do not provide their own path. It is
27173 * usual to instantiate these schemas directly, but if you want to you
27174 * can use g_settings_new_with_path() to specify the path.
27175 * The output of this function, tTaken together with the output of
27176 * g_settings_list_schemas() represents the complete list of all
27177 * installed schemas.
27178 * #GSettings schemas that are available. The list must not be
27179 * modified or freed.
27181 * Returns: (element-type utf8) (transfer none): a list of relocatable
27187 * g_settings_list_schemas:
27189 * Gets a list of the #GSettings schemas installed on the system. The
27190 * returned list is exactly the list of schemas for which you may call
27191 * g_settings_new() without adverse effects.
27192 * This function does not list the schemas that do not provide their own
27193 * g_settings_new_with_path()). See
27194 * g_settings_list_relocatable_schemas() for that.
27195 * schemas that are available. The list must not be modified or
27198 * Paths (ie: schemas for which you must use
27199 * Returns: (element-type utf8) (transfer none): a list of #GSettings
27206 * @schema: the name of the schema
27207 * @returns: a new #GSettings object
27209 * Creates a new #GSettings object with a given schema.
27210 * Signals on the newly created #GSettings object will be dispatched
27211 * via the thread-default #GMainContext in effect at the time of the
27212 * call to g_settings_new(). The new #GSettings will hold a reference
27213 * on the context. See g_main_context_push_thread_default().
27220 * g_settings_new_with_backend:
27221 * @schema: the name of the schema
27222 * @backend: the #GSettingsBackend to use
27223 * @returns: a new #GSettings object
27225 * Creates a new #GSettings object with a given schema and backend.
27226 * Creating settings objects with an different backend allows accessing settings
27227 * from a database other than the usual one. For example, it may make
27228 * sense to pass a backend corresponding to the "defaults" settings database on
27229 * the system to get a settings object that modifies the system default
27230 * settings instead of the settings for this user.
27237 * g_settings_new_with_backend_and_path:
27238 * @schema: the name of the schema
27239 * @backend: the #GSettingsBackend to use
27240 * @path: the path to use
27241 * @returns: a new #GSettings object
27243 * Creates a new #GSettings object with a given schema, backend and
27245 * This is a mix of g_settings_new_with_backend() and
27246 * g_settings_new_with_path().
27253 * g_settings_new_with_path:
27254 * @schema: the name of the schema
27255 * @path: the path to use
27256 * @returns: a new #GSettings object
27258 * Creates a new #GSettings object with a given schema and path.
27259 * You only need to do this if you want to directly create a settings
27260 * object with a schema that doesn't have a specified path of its own.
27261 * That's quite rare.
27262 * It is a programmer error to call this function for a schema that
27263 * has an explicitly specified path.
27270 * g_settings_range_check:
27271 * @settings: a #GSettings
27272 * @key: the key to check
27273 * @value: the value to check
27274 * @returns: %TRUE if @value is valid for @key
27276 * Checks if the given @value is of the correct type and within the
27277 * permitted range for @key.
27278 * This API is not intended to be used by normal programs -- they should
27279 * already know what is permitted by their own schemas. This API is
27280 * meant to be used by programs such as editors or commandline tools.
27281 * It is a programmer error to give a @key that isn't contained in the
27282 * schema for @settings.
27289 * g_settings_reset:
27290 * @settings: a #GSettings object
27291 * @key: the name of a key
27293 * Resets @key to its default value.
27294 * This call resets the key, as much as possible, to its default value.
27295 * That might the value specified in the schema or the one set by the
27301 * g_settings_revert:
27302 * @settings: a #GSettings instance
27304 * Reverts all non-applied changes to the settings. This function
27305 * does nothing unless @settings is in 'delay-apply' mode; see
27306 * g_settings_delay(). In the normal case settings are always applied
27308 * Change notifications will be emitted for affected keys.
27314 * @settings: a #GSettings object
27315 * @key: the name of the key to set
27316 * @format: a #GVariant format string
27317 * @...: arguments as per @format
27318 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
27320 * Sets @key in @settings to @value.
27321 * A convenience function that combines g_settings_set_value() with
27323 * It is a programmer error to give a @key that isn't contained in the
27324 * schema for @settings or for the #GVariantType of @format to mismatch
27325 * the type given in the schema.
27332 * g_settings_set_boolean:
27333 * @settings: a #GSettings object
27334 * @key: the name of the key to set
27335 * @value: the value to set it to
27336 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
27338 * Sets @key in @settings to @value.
27339 * A convenience variant of g_settings_set() for booleans.
27340 * It is a programmer error to give a @key that isn't specified as
27341 * having a boolean type in the schema for @settings.
27348 * g_settings_set_double:
27349 * @settings: a #GSettings object
27350 * @key: the name of the key to set
27351 * @value: the value to set it to
27352 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
27354 * Sets @key in @settings to @value.
27355 * A convenience variant of g_settings_set() for doubles.
27356 * It is a programmer error to give a @key that isn't specified as
27357 * having a 'double' type in the schema for @settings.
27364 * g_settings_set_enum:
27365 * @settings: a #GSettings object
27366 * @key: a key, within @settings
27367 * @value: an enumerated value
27368 * @returns: %TRUE, if the set succeeds
27370 * Looks up the enumerated type nick for @value and writes it to @key,
27371 * within @settings.
27372 * It is a programmer error to give a @key that isn't contained in the
27373 * schema for @settings or is not marked as an enumerated type, or for
27374 * After performing the write, accessing @key directly with
27375 * g_settings_get_string() will return the 'nick' associated with
27380 * g_settings_set_flags:
27381 * @settings: a #GSettings object
27382 * @key: a key, within @settings
27383 * @value: a flags value
27384 * @returns: %TRUE, if the set succeeds
27386 * Looks up the flags type nicks for the bits specified by @value, puts
27387 * them in an array of strings and writes the array to @key, withing
27388 * It is a programmer error to give a @key that isn't contained in the
27389 * schema for @settings or is not marked as a flags type, or for @value
27390 * to contain any bits that are not value for the named type.
27391 * After performing the write, accessing @key directly with
27392 * g_settings_get_strv() will return an array of 'nicks'; one for each
27398 * g_settings_set_int:
27399 * @settings: a #GSettings object
27400 * @key: the name of the key to set
27401 * @value: the value to set it to
27402 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
27404 * Sets @key in @settings to @value.
27405 * A convenience variant of g_settings_set() for 32-bit integers.
27406 * It is a programmer error to give a @key that isn't specified as
27407 * having a int32 type in the schema for @settings.
27414 * g_settings_set_string:
27415 * @settings: a #GSettings object
27416 * @key: the name of the key to set
27417 * @value: the value to set it to
27418 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
27420 * Sets @key in @settings to @value.
27421 * A convenience variant of g_settings_set() for strings.
27422 * It is a programmer error to give a @key that isn't specified as
27423 * having a string type in the schema for @settings.
27430 * g_settings_set_strv:
27431 * @settings: a #GSettings object
27432 * @key: the name of the key to set
27433 * @value: (allow-none) (array zero-terminated=1): the value to set it to, or %NULL
27434 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
27436 * Sets @key in @settings to @value.
27437 * A convenience variant of g_settings_set() for string arrays. If
27438 * It is a programmer error to give a @key that isn't specified as
27439 * having an array of strings type in the schema for @settings.
27446 * g_settings_set_value:
27447 * @settings: a #GSettings object
27448 * @key: the name of the key to set
27449 * @value: a #GVariant of the correct type
27450 * @returns: %TRUE if setting the key succeeded, %FALSE if the key was not writable
27452 * Sets @key in @settings to @value.
27453 * It is a programmer error to give a @key that isn't contained in the
27454 * schema for @settings or for @value to have the incorrect type, per
27456 * If @value is floating then this function consumes the reference.
27465 * Ensures that all pending operations for the given are complete for
27466 * the default backend.
27467 * Writes made to a #GSettings are handled asynchronously. For this
27468 * reason, it is very unlikely that the changes have it to disk by the
27469 * time g_settings_set() returns.
27470 * This call will block until all of the writes have made it to the
27471 * backend. Since the mainloop is not running, no change notifications
27472 * will be dispatched during this call (but some may be queued by the
27473 * time the call is done).
27478 * g_settings_unbind:
27479 * @object: the object
27480 * @property: the property whose binding is removed
27482 * Removes an existing binding for @property on @object.
27483 * Note that bindings are automatically removed when the
27484 * object is finalized, so it is rarely necessary to call this
27492 * g_signal_connect:
27493 * @instance: the instance to connect to.
27494 * @detailed_signal: a string of the form "signal-name::detail".
27495 * @c_handler: the #GCallback to connect.
27496 * @data: data to pass to @c_handler calls.
27498 * Connects a #GCallback function to a signal for a particular object.
27499 * The handler will be called before the default handler of the signal.
27501 * Returns: the handler id
27506 * g_signal_connect_after:
27507 * @instance: the instance to connect to.
27508 * @detailed_signal: a string of the form "signal-name::detail".
27509 * @c_handler: the #GCallback to connect.
27510 * @data: data to pass to @c_handler calls.
27512 * Connects a #GCallback function to a signal for a particular object.
27513 * The handler will be called after the default handler of the signal.
27515 * Returns: the handler id
27520 * g_signal_connect_swapped:
27521 * @instance: the instance to connect to.
27522 * @detailed_signal: a string of the form "signal-name::detail".
27523 * @c_handler: the #GCallback to connect.
27524 * @data: data to pass to @c_handler calls.
27526 * Connects a #GCallback function to a signal for a particular object.
27527 * The instance on which the signal is emitted and @data will be swapped when
27528 * calling the handler.
27530 * Returns: the handler id
27535 * g_signal_handlers_block_by_func:
27536 * @instance: The instance to block handlers from.
27537 * @func: The C closure callback of the handlers (useless for non-C closures).
27538 * @data: The closure data of the handlers' closures.
27540 * Blocks all handlers on an instance that match @func and @data.
27542 * Returns: The number of handlers that matched.
27547 * g_signal_handlers_disconnect_by_func:
27548 * @instance: The instance to remove handlers from.
27549 * @func: The C closure callback of the handlers (useless for non-C closures).
27550 * @data: The closure data of the handlers' closures.
27552 * Disconnects all handlers on an instance that match @func and @data.
27554 * Returns: The number of handlers that matched.
27559 * g_signal_handlers_unblock_by_func:
27560 * @instance: The instance to unblock handlers from.
27561 * @func: The C closure callback of the handlers (useless for non-C closures).
27562 * @data: The closure data of the handlers' closures.
27564 * Unblocks all handlers on an instance that match @func and @data.
27566 * Returns: The number of handlers that matched.
27571 * g_simple_action_group_insert:
27572 * @simple: a #GSimpleActionGroup
27573 * @action: a #GAction
27575 * Adds an action to the action group.
27576 * If the action group already contains an action with the same name as
27577 * The action group takes its own reference on @action.
27584 * g_simple_action_group_lookup:
27585 * @simple: a #GSimpleActionGroup
27586 * @action_name: the name of an action
27588 * Looks up the action with the name @action_name in the group.
27589 * If no such action exists, returns %NULL.
27591 * Returns: (transfer none): a #GAction, or %NULL
27597 * g_simple_action_group_new:
27599 * Creates a new, empty, #GSimpleActionGroup.
27601 * Returns: a new #GSimpleActionGroup
27607 * g_simple_action_group_remove:
27608 * @simple: a #GSimpleActionGroup
27609 * @action_name: the name of the action
27611 * Removes the named action from the action group.
27612 * If no action of this name is in the group then nothing happens.
27619 * g_simple_action_new:
27620 * @name: the name of the action
27621 * @parameter_type: (allow-none): the type of parameter to the activate function
27623 * Creates a new action.
27624 * The created action is stateless. See g_simple_action_new_stateful().
27626 * Returns: a new #GSimpleAction
27632 * g_simple_action_new_stateful:
27633 * @name: the name of the action
27634 * @parameter_type: (allow-none): the type of the parameter to the activate function
27635 * @state: the initial state of the action
27637 * Creates a new stateful action.
27638 * must have the same #GVariantType as the initial state.
27639 * If the @state GVariant is floating, it is consumed.
27641 * Returns: a new #GSimpleAction
27647 * g_simple_action_set_enabled:
27648 * @simple: a #GSimpleAction
27649 * @enabled: whether the action is enabled
27651 * Sets the action as enabled or not.
27652 * An action must be enabled in order to be activated or in order to
27653 * have its state changed from outside callers.
27660 * g_simple_async_report_error_in_idle: (skip)
27661 * @object: (allow-none): a #GObject, or %NULL.
27662 * @callback: a #GAsyncReadyCallback.
27663 * @user_data: user data passed to @callback.
27664 * @domain: a #GQuark containing the error domain (usually #G_IO_ERROR).
27665 * @code: a specific error code.
27666 * @format: a formatted error reporting string.
27667 * @...: a list of variables to fill in @format.
27669 * Reports an error in an asynchronous function in an idle function by
27670 * directly setting the contents of the #GAsyncResult with the given error
27676 * g_simple_async_report_gerror_in_idle:
27677 * @object: (allow-none): a #GObject, or %NULL
27678 * @callback: (scope async): a #GAsyncReadyCallback.
27679 * @user_data: (closure): user data passed to @callback.
27680 * @error: the #GError to report
27682 * Reports an error in an idle function. Similar to
27683 * g_simple_async_report_error_in_idle(), but takes a #GError rather
27684 * than building a new one.
27689 * g_simple_async_report_take_gerror_in_idle: (skip)
27690 * @object: (allow-none): a #GObject, or %NULL
27691 * @callback: a #GAsyncReadyCallback.
27692 * @user_data: user data passed to @callback.
27693 * @error: the #GError to report
27695 * Reports an error in an idle function. Similar to
27696 * g_simple_async_report_gerror_in_idle(), but takes over the caller's
27697 * ownership of @error, so the caller does not have to free it any more.
27704 * g_simple_async_result_complete:
27705 * @simple: a #GSimpleAsyncResult.
27707 * Completes an asynchronous I/O job immediately. Must be called in
27708 * the thread where the asynchronous result was to be delivered, as it
27709 * invokes the callback directly. If you are in a different thread use
27710 * g_simple_async_result_complete_in_idle().
27711 * Calling this function takes a reference to @simple for as long as
27712 * is needed to complete the call.
27717 * g_simple_async_result_complete_in_idle:
27718 * @simple: a #GSimpleAsyncResult.
27720 * Completes an asynchronous function in an idle handler in the <link
27721 * linkend="g-main-context-push-thread-default">thread-default main
27722 * loop</link> of the thread that @simple was initially created in.
27723 * Calling this function takes a reference to @simple for as long as
27724 * is needed to complete the call.
27729 * g_simple_async_result_get_op_res_gboolean:
27730 * @simple: a #GSimpleAsyncResult.
27732 * Gets the operation result boolean from within the asynchronous result.
27733 * if the operation's result was %FALSE.
27735 * Returns: %TRUE if the operation's result was %TRUE, %FALSE
27740 * g_simple_async_result_get_op_res_gpointer: (skip)
27741 * @simple: a #GSimpleAsyncResult.
27743 * Gets a pointer result as returned by the asynchronous function.
27745 * Returns: a pointer from the result.
27750 * g_simple_async_result_get_op_res_gssize:
27751 * @simple: a #GSimpleAsyncResult.
27753 * Gets a gssize from the asynchronous result.
27755 * Returns: a gssize returned from the asynchronous function.
27760 * g_simple_async_result_get_source_tag: (skip)
27761 * @simple: a #GSimpleAsyncResult.
27763 * Gets the source tag for the #GSimpleAsyncResult.
27765 * Returns: a #gpointer to the source object for the #GSimpleAsyncResult.
27770 * g_simple_async_result_is_valid:
27771 * @result: the #GAsyncResult passed to the _finish function.
27772 * @source: the #GObject passed to the _finish function.
27773 * @source_tag: the asynchronous function.
27775 * Ensures that the data passed to the _finish function of an async
27776 * operation is consistent. Three checks are performed.
27777 * First, @result is checked to ensure that it is really a
27778 * #GSimpleAsyncResult. Second, @source is checked to ensure that it
27779 * matches the source object of @result. Third, @source_tag is
27780 * checked to ensure that it is either %NULL (as it is when the result was
27781 * created by g_simple_async_report_error_in_idle() or
27782 * g_simple_async_report_gerror_in_idle()) or equal to the
27783 * convention, is a pointer to the _async function corresponding to the
27784 * _finish function from which this function is called).
27786 * Returns: #TRUE if all checks passed or #FALSE if any failed.
27792 * g_simple_async_result_new:
27793 * @source_object: (allow-none): a #GObject, or %NULL.
27794 * @callback: (scope async): a #GAsyncReadyCallback.
27795 * @user_data: (closure): user data passed to @callback.
27796 * @source_tag: the asynchronous function.
27798 * Creates a #GSimpleAsyncResult.
27800 * Returns: a #GSimpleAsyncResult.
27805 * g_simple_async_result_new_error:
27806 * @source_object: (allow-none): a #GObject, or %NULL.
27807 * @callback: (scope async): a #GAsyncReadyCallback.
27808 * @user_data: (closure): user data passed to @callback.
27809 * @domain: a #GQuark.
27810 * @code: an error code.
27811 * @format: a string with format characters.
27812 * @...: a list of values to insert into @format.
27814 * Creates a new #GSimpleAsyncResult with a set error.
27816 * Returns: a #GSimpleAsyncResult.
27821 * g_simple_async_result_new_from_error:
27822 * @source_object: (allow-none): a #GObject, or %NULL.
27823 * @callback: (scope async): a #GAsyncReadyCallback.
27824 * @user_data: (closure): user data passed to @callback.
27825 * @error: a #GError
27827 * Creates a #GSimpleAsyncResult from an error condition.
27829 * Returns: a #GSimpleAsyncResult.
27834 * g_simple_async_result_new_take_error: (skip)
27835 * @source_object: (allow-none): a #GObject, or %NULL
27836 * @callback: (scope async): a #GAsyncReadyCallback
27837 * @user_data: (closure): user data passed to @callback
27838 * @error: a #GError
27840 * Creates a #GSimpleAsyncResult from an error condition, and takes over the
27841 * caller's ownership of @error, so the caller does not need to free it anymore.
27843 * Returns: a #GSimpleAsyncResult
27849 * g_simple_async_result_propagate_error:
27850 * @simple: a #GSimpleAsyncResult.
27851 * @dest: (out): a location to propagate the error to.
27853 * Propagates an error from within the simple asynchronous result to
27854 * a given destination.
27856 * Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise.
27861 * g_simple_async_result_run_in_thread: (skip)
27862 * @simple: a #GSimpleAsyncResult.
27863 * @func: a #GSimpleAsyncThreadFunc.
27864 * @io_priority: the io priority of the request.
27865 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27867 * Runs the asynchronous job in a separate thread and then calls
27868 * g_simple_async_result_complete_in_idle() on @simple to return
27869 * the result to the appropriate main loop.
27870 * Calling this function takes a reference to @simple for as long as
27871 * is needed to run the job and report its completion.
27876 * g_simple_async_result_set_error: (skip)
27877 * @simple: a #GSimpleAsyncResult.
27878 * @domain: a #GQuark (usually #G_IO_ERROR).
27879 * @code: an error code.
27880 * @format: a formatted error reporting string.
27881 * @...: a list of variables to fill in @format.
27883 * Sets an error within the asynchronous result without a #GError.
27888 * g_simple_async_result_set_error_va: (skip)
27889 * @simple: a #GSimpleAsyncResult.
27890 * @domain: a #GQuark (usually #G_IO_ERROR).
27891 * @code: an error code.
27892 * @format: a formatted error reporting string.
27893 * @args: va_list of arguments.
27895 * Sets an error within the asynchronous result without a #GError.
27896 * Unless writing a binding, see g_simple_async_result_set_error().
27901 * g_simple_async_result_set_from_error:
27902 * @simple: a #GSimpleAsyncResult.
27905 * Sets the result from a #GError.
27910 * g_simple_async_result_set_handle_cancellation:
27911 * @simple: a #GSimpleAsyncResult.
27912 * @handle_cancellation: a #gboolean.
27914 * Sets whether to handle cancellation within the asynchronous operation.
27919 * g_simple_async_result_set_op_res_gboolean:
27920 * @simple: a #GSimpleAsyncResult.
27921 * @op_res: a #gboolean.
27923 * Sets the operation result to a boolean within the asynchronous result.
27928 * g_simple_async_result_set_op_res_gpointer: (skip)
27929 * @simple: a #GSimpleAsyncResult.
27930 * @op_res: a pointer result from an asynchronous function.
27931 * @destroy_op_res: a #GDestroyNotify function.
27933 * Sets the operation result within the asynchronous result to a pointer.
27938 * g_simple_async_result_set_op_res_gssize:
27939 * @simple: a #GSimpleAsyncResult.
27940 * @op_res: a #gssize.
27942 * Sets the operation result within the asynchronous result to
27943 * the given @op_res.
27948 * g_simple_async_result_take_error: (skip)
27949 * @simple: a #GSimpleAsyncResult
27950 * @error: a #GError
27952 * Sets the result from @error, and takes over the caller's ownership
27953 * of @error, so the caller does not need to free it any more.
27960 * g_simple_permission_new:
27961 * @allowed: %TRUE if the action is allowed
27962 * @returns: the #GSimplePermission, as a #GPermission
27964 * Creates a new #GPermission instance that represents an action that is
27965 * either always or never allowed.
27973 * @socket: a #GSocket.
27974 * @cancellable: (allow-none): a %GCancellable or %NULL
27975 * @error: #GError for error reporting, or %NULL to ignore.
27977 * Accept incoming connections on a connection-based socket. This removes
27978 * the first outstanding connection request from the listening socket and
27979 * creates a #GSocket object for it.
27980 * The @socket must be bound to a local address with g_socket_bind() and
27981 * must be listening for incoming connections (g_socket_listen()).
27982 * If there are no outstanding connections then the operation will block
27983 * or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.
27984 * To be notified of an incoming connection, wait for the %G_IO_IN condition.
27985 * Free the returned object with g_object_unref().
27987 * Returns: (transfer full): a new #GSocket, or %NULL on error.
27993 * g_socket_address_enumerator_next:
27994 * @enumerator: a #GSocketAddressEnumerator
27995 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
27996 * @error: a #GError.
27998 * Retrieves the next #GSocketAddress from @enumerator. Note that this
27999 * may block for some amount of time. (Eg, a #GNetworkAddress may need
28000 * to do a DNS lookup before it can return an address.) Use
28001 * g_socket_address_enumerator_next_async() if you need to avoid
28003 * If @enumerator is expected to yield addresses, but for some reason
28004 * is unable to (eg, because of a DNS error), then the first call to
28005 * g_socket_address_enumerator_next() will return an appropriate error
28006 * in *@error. However, if the first call to
28007 * g_socket_address_enumerator_next() succeeds, then any further
28008 * internal errors (other than @cancellable being triggered) will be
28010 * error (in which case *@error will be set) or if there are no
28013 * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
28018 * g_socket_address_enumerator_next_async:
28019 * @enumerator: a #GSocketAddressEnumerator
28020 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28021 * @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied
28022 * @user_data: (closure): the data to pass to callback function
28024 * Asynchronously retrieves the next #GSocketAddress from @enumerator
28025 * and then calls @callback, which must call
28026 * g_socket_address_enumerator_next_finish() to get the result.
28031 * g_socket_address_enumerator_next_finish:
28032 * @enumerator: a #GSocketAddressEnumerator
28033 * @result: a #GAsyncResult
28034 * @error: a #GError
28036 * Retrieves the result of a completed call to
28037 * g_socket_address_enumerator_next_async(). See
28038 * g_socket_address_enumerator_next() for more information about
28040 * error (in which case *@error will be set) or if there are no
28043 * Returns: (transfer full): a #GSocketAddress (owned by the caller), or %NULL on
28048 * g_socket_address_get_family:
28049 * @address: a #GSocketAddress
28051 * Gets the socket family type of @address.
28053 * Returns: the socket family type of @address.
28059 * g_socket_address_get_native_size:
28060 * @address: a #GSocketAddress
28062 * Gets the size of @address's native <type>struct sockaddr</type>.
28063 * You can use this to allocate memory to pass to
28064 * g_socket_address_to_native().
28066 * Returns: the size of the native <type>struct sockaddr</type> that
28072 * g_socket_address_new_from_native:
28073 * @native: a pointer to a <type>struct sockaddr</type>
28074 * @len: the size of the memory location pointed to by @native
28076 * Creates a #GSocketAddress subclass corresponding to the native
28077 * <type>struct sockaddr</type> @native.
28080 * Returns: a new #GSocketAddress if @native could successfully be converted,
28086 * g_socket_address_to_native:
28087 * @address: a #GSocketAddress
28088 * @dest: a pointer to a memory location that will contain the native <type>struct sockaddr</type>.
28089 * @destlen: the size of @dest. Must be at least as large as g_socket_address_get_native_size().
28090 * @error: #GError for error reporting, or %NULL to ignore.
28092 * Converts a #GSocketAddress to a native <type>struct
28093 * sockaddr</type>, which can be passed to low-level functions like
28094 * connect() or bind().
28095 * If not enough space is availible, a %G_IO_ERROR_NO_SPACE error is
28096 * returned. If the address type is not known on the system
28097 * then a %G_IO_ERROR_NOT_SUPPORTED error is returned.
28099 * Returns: %TRUE if @dest was filled in, %FALSE on error
28106 * @socket: a #GSocket.
28107 * @address: a #GSocketAddress specifying the local address.
28108 * @allow_reuse: whether to allow reusing this address
28109 * @error: #GError for error reporting, or %NULL to ignore.
28111 * When a socket is created it is attached to an address family, but it
28112 * doesn't have an address in this family. g_socket_bind() assigns the
28113 * address (sometimes called name) of the socket.
28114 * It is generally required to bind to a local address before you can
28115 * receive connections. (See g_socket_listen() and g_socket_accept() ).
28116 * In certain situations, you may also want to bind a socket that will be
28117 * used to initiate connections, though this is not normally required.
28118 * eventually call g_socket_accept() on), and %FALSE for client sockets.
28119 * (Specifically, if it is %TRUE, then g_socket_bind() will set the
28120 * %SO_REUSEADDR flag on the socket, allowing it to bind @address even if
28121 * that address was previously used by another socket that has not yet been
28122 * fully cleaned-up by the kernel. Failing to set this flag on a server
28123 * socket may cause the bind call to return %G_IO_ERROR_ADDRESS_IN_USE if
28124 * the server program is stopped and then immediately restarted.)
28126 * Returns: %TRUE on success, %FALSE on error.
28132 * g_socket_check_connect_result:
28133 * @socket: a #GSocket
28134 * @error: #GError for error reporting, or %NULL to ignore.
28136 * Checks and resets the pending connect error for the socket.
28137 * This is used to check for errors when g_socket_connect() is
28138 * used in non-blocking mode.
28140 * Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error
28146 * g_socket_client_add_application_proxy:
28147 * @client: a #GSocketClient
28148 * @protocol: The proxy protocol
28150 * Enable proxy protocols to be handled by the application. When the
28151 * indicated proxy protocol is returned by the #GProxyResolver,
28152 * #GSocketClient will consider this protocol as supported but will
28153 * not try find a #GProxy instance to handle handshaking. The
28154 * application must check for this case by calling
28155 * g_socket_connection_get_remote_address() on the returned
28156 * #GSocketConnection, and seeing if it's a #GProxyAddress of the
28157 * appropriate type, to determine whether or not it needs to handle
28158 * the proxy handshaking itself.
28159 * This should be used for proxy protocols that are dialects of
28160 * another protocol such as HTTP proxy. It also allows cohabitation of
28161 * proxy protocols that are reused between protocols. A good example
28162 * is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also
28163 * be use as generic socket proxy through the HTTP CONNECT method.
28168 * g_socket_client_connect:
28169 * @client: a #GSocketClient.
28170 * @connectable: a #GSocketConnectable specifying the remote address.
28171 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
28172 * @error: #GError for error reporting, or %NULL to ignore.
28174 * Tries to resolve the @connectable and make a network connection to it..
28175 * Upon a successful connection, a new #GSocketConnection is constructed
28176 * and returned. The caller owns this new object and must drop their
28177 * reference to it when finished with it.
28178 * The type of the #GSocketConnection object returned depends on the type of
28179 * the underlying socket that is used. For instance, for a TCP/IP connection
28180 * it will be a #GTcpConnection.
28181 * The socket created will be the same family as the the address that the
28182 * or indirectly via g_socket_client_set_local_address(). The socket type
28183 * defaults to %G_SOCKET_TYPE_STREAM but can be set with
28184 * g_socket_client_set_socket_type().
28185 * If a local address is specified with g_socket_client_set_local_address() the
28186 * socket will be bound to this address before connecting.
28188 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28194 * g_socket_client_connect_async:
28195 * @client: a #GTcpClient
28196 * @connectable: a #GSocketConnectable specifying the remote address.
28197 * @cancellable: (allow-none): a #GCancellable, or %NULL
28198 * @callback: (scope async): a #GAsyncReadyCallback
28199 * @user_data: (closure): user data for the callback
28201 * This is the asynchronous version of g_socket_client_connect().
28202 * When the operation is finished @callback will be
28203 * called. You can then call g_socket_client_connect_finish() to get
28204 * the result of the operation.
28211 * g_socket_client_connect_finish:
28212 * @client: a #GSocketClient.
28213 * @result: a #GAsyncResult.
28214 * @error: a #GError location to store the error occuring, or %NULL to ignore.
28216 * Finishes an async connect operation. See g_socket_client_connect_async()
28218 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28224 * g_socket_client_connect_to_host:
28225 * @client: a #GSocketClient
28226 * @host_and_port: the name and optionally port of the host to connect to
28227 * @default_port: the default port to connect to
28228 * @cancellable: (allow-none): a #GCancellable, or %NULL
28229 * @error: a pointer to a #GError, or %NULL
28231 * This is a helper function for g_socket_client_connect().
28232 * Attempts to create a TCP connection to the named host.
28233 * address, an IPv4 address, or a domain name (in which case a DNS
28234 * lookup is performed). Quoting with [] is supported for all address
28235 * types. A port override may be specified in the usual way with a
28236 * colon. Ports may be given as decimal numbers or symbolic names (in
28237 * which case an /etc/services lookup is performed).
28238 * If no port override is given in @host_and_port then @default_port will be
28239 * used as the port number to connect to.
28240 * In general, @host_and_port is expected to be provided by the user (allowing
28241 * them to give the hostname, and a port overide if necessary) and
28242 * In the case that an IP address is given, a single connection
28243 * attempt is made. In the case that a name is given, multiple
28244 * connection attempts may be made, in turn and according to the
28245 * number of address records in DNS, until a connection succeeds.
28246 * Upon a successful connection, a new #GSocketConnection is constructed
28247 * and returned. The caller owns this new object and must drop their
28248 * reference to it when finished with it.
28249 * In the event of any failure (DNS error, service not found, no hosts
28250 * connectable) %NULL is returned and @error (if non-%NULL) is set
28253 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28259 * g_socket_client_connect_to_host_async:
28260 * @client: a #GTcpClient
28261 * @host_and_port: the name and optionally the port of the host to connect to
28262 * @default_port: the default port to connect to
28263 * @cancellable: (allow-none): a #GCancellable, or %NULL
28264 * @callback: (scope async): a #GAsyncReadyCallback
28265 * @user_data: (closure): user data for the callback
28267 * This is the asynchronous version of g_socket_client_connect_to_host().
28268 * When the operation is finished @callback will be
28269 * called. You can then call g_socket_client_connect_to_host_finish() to get
28270 * the result of the operation.
28277 * g_socket_client_connect_to_host_finish:
28278 * @client: a #GSocketClient.
28279 * @result: a #GAsyncResult.
28280 * @error: a #GError location to store the error occuring, or %NULL to ignore.
28282 * Finishes an async connect operation. See g_socket_client_connect_to_host_async()
28284 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28290 * g_socket_client_connect_to_service:
28291 * @client: a #GSocketConnection
28292 * @domain: a domain name
28293 * @service: the name of the service to connect to
28294 * @cancellable: (allow-none): a #GCancellable, or %NULL
28295 * @error: a pointer to a #GError, or %NULL
28296 * @returns: (transfer full): a #GSocketConnection if successful, or %NULL on error
28298 * Attempts to create a TCP connection to a service.
28299 * This call looks up the SRV record for @service at @domain for the
28300 * "tcp" protocol. It then attempts to connect, in turn, to each of
28301 * the hosts providing the service until either a connection succeeds
28302 * or there are no hosts remaining.
28303 * Upon a successful connection, a new #GSocketConnection is constructed
28304 * and returned. The caller owns this new object and must drop their
28305 * reference to it when finished with it.
28306 * In the event of any failure (DNS error, service not found, no hosts
28307 * connectable) %NULL is returned and @error (if non-%NULL) is set
28313 * g_socket_client_connect_to_service_async:
28314 * @client: a #GSocketClient
28315 * @domain: a domain name
28316 * @service: the name of the service to connect to
28317 * @cancellable: (allow-none): a #GCancellable, or %NULL
28318 * @callback: (scope async): a #GAsyncReadyCallback
28319 * @user_data: (closure): user data for the callback
28321 * This is the asynchronous version of
28322 * g_socket_client_connect_to_service().
28329 * g_socket_client_connect_to_service_finish:
28330 * @client: a #GSocketClient.
28331 * @result: a #GAsyncResult.
28332 * @error: a #GError location to store the error occuring, or %NULL to ignore.
28334 * Finishes an async connect operation. See g_socket_client_connect_to_service_async()
28336 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28342 * g_socket_client_connect_to_uri:
28343 * @client: a #GSocketClient
28344 * @uri: A network URI
28345 * @default_port: the default port to connect to
28346 * @cancellable: (allow-none): a #GCancellable, or %NULL
28347 * @error: a pointer to a #GError, or %NULL
28349 * This is a helper function for g_socket_client_connect().
28350 * Attempts to create a TCP connection with a network URI.
28351 * component. If a port is not specified in the URI, @default_port
28352 * will be used. TLS will be negotiated if #GSocketClient:tls is %TRUE.
28353 * (#GSocketClient does not know to automatically assume TLS for
28354 * certain URI schemes.)
28355 * Using this rather than g_socket_client_connect() or
28356 * g_socket_client_connect_to_host() allows #GSocketClient to
28357 * determine when to use application-specific proxy protocols.
28358 * Upon a successful connection, a new #GSocketConnection is constructed
28359 * and returned. The caller owns this new object and must drop their
28360 * reference to it when finished with it.
28361 * In the event of any failure (DNS error, service not found, no hosts
28362 * connectable) %NULL is returned and @error (if non-%NULL) is set
28365 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28371 * g_socket_client_connect_to_uri_async:
28372 * @client: a #GSocketClient
28373 * @uri: a network uri
28374 * @default_port: the default port to connect to
28375 * @cancellable: (allow-none): a #GCancellable, or %NULL
28376 * @callback: (scope async): a #GAsyncReadyCallback
28377 * @user_data: (closure): user data for the callback
28379 * This is the asynchronous version of g_socket_client_connect_to_uri().
28380 * When the operation is finished @callback will be
28381 * called. You can then call g_socket_client_connect_to_uri_finish() to get
28382 * the result of the operation.
28389 * g_socket_client_connect_to_uri_finish:
28390 * @client: a #GSocketClient.
28391 * @result: a #GAsyncResult.
28392 * @error: a #GError location to store the error occuring, or %NULL to ignore.
28394 * Finishes an async connect operation. See g_socket_client_connect_to_uri_async()
28396 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
28402 * g_socket_client_get_enable_proxy:
28403 * @client: a #GSocketClient.
28405 * Gets the proxy enable state; see g_socket_client_set_enable_proxy()
28407 * Returns: whether proxying is enabled
28413 * g_socket_client_get_family:
28414 * @client: a #GSocketClient.
28416 * Gets the socket family of the socket client.
28417 * See g_socket_client_set_family() for details.
28419 * Returns: a #GSocketFamily
28425 * g_socket_client_get_local_address:
28426 * @client: a #GSocketClient.
28428 * Gets the local address of the socket client.
28429 * See g_socket_client_set_local_address() for details.
28431 * Returns: (transfer none): a #GSocketAddres or %NULL. don't free
28437 * g_socket_client_get_protocol:
28438 * @client: a #GSocketClient
28440 * Gets the protocol name type of the socket client.
28441 * See g_socket_client_set_protocol() for details.
28443 * Returns: a #GSocketProtocol
28449 * g_socket_client_get_socket_type:
28450 * @client: a #GSocketClient.
28452 * Gets the socket type of the socket client.
28453 * See g_socket_client_set_socket_type() for details.
28455 * Returns: a #GSocketFamily
28461 * g_socket_client_get_timeout:
28462 * @client: a #GSocketClient
28464 * Gets the I/O timeout time for sockets created by @client.
28465 * See g_socket_client_set_timeout() for details.
28467 * Returns: the timeout in seconds
28473 * g_socket_client_get_tls:
28474 * @client: a #GSocketClient.
28476 * Gets whether @client creates TLS connections. See
28477 * g_socket_client_set_tls() for details.
28479 * Returns: whether @client uses TLS
28485 * g_socket_client_get_tls_validation_flags:
28486 * @client: a #GSocketClient.
28488 * Gets the TLS validation flags used creating TLS connections via
28490 * Returns: the TLS validation flags
28496 * g_socket_client_new:
28498 * Creates a new #GSocketClient with the default options.
28499 * Free the returned object with g_object_unref().
28501 * Returns: a #GSocketClient.
28507 * g_socket_client_set_enable_proxy:
28508 * @client: a #GSocketClient.
28509 * @enable: whether to enable proxies
28511 * Sets whether or not @client attempts to make connections via a
28512 * proxy server. When enabled (the default), #GSocketClient will use a
28513 * #GProxyResolver to determine if a proxy protocol such as SOCKS is
28514 * needed, and automatically do the necessary proxy negotiation.
28521 * g_socket_client_set_family:
28522 * @client: a #GSocketClient.
28523 * @family: a #GSocketFamily
28525 * Sets the socket family of the socket client.
28526 * If this is set to something other than %G_SOCKET_FAMILY_INVALID
28527 * then the sockets created by this object will be of the specified
28529 * This might be useful for instance if you want to force the local
28530 * connection to be an ipv4 socket, even though the address might
28531 * be an ipv6 mapped to ipv4 address.
28538 * g_socket_client_set_local_address:
28539 * @client: a #GSocketClient.
28540 * @address: a #GSocketAddress, or %NULL
28542 * Sets the local address of the socket client.
28543 * The sockets created by this object will bound to the
28544 * specified address (if not %NULL) before connecting.
28545 * This is useful if you want to ensure the the local
28546 * side of the connection is on a specific port, or on
28547 * a specific interface.
28554 * g_socket_client_set_protocol:
28555 * @client: a #GSocketClient.
28556 * @protocol: a #GSocketProtocol
28558 * Sets the protocol of the socket client.
28559 * The sockets created by this object will use of the specified
28561 * If @protocol is %0 that means to use the default
28562 * protocol for the socket family and type.
28569 * g_socket_client_set_socket_type:
28570 * @client: a #GSocketClient.
28571 * @type: a #GSocketType
28573 * Sets the socket type of the socket client.
28574 * The sockets created by this object will be of the specified
28576 * It doesn't make sense to specify a type of %G_SOCKET_TYPE_DATAGRAM,
28577 * as GSocketClient is used for connection oriented services.
28584 * g_socket_client_set_timeout:
28585 * @client: a #GSocketClient.
28586 * @timeout: the timeout
28588 * Sets the I/O timeout for sockets created by @client. @timeout is a
28589 * time in seconds, or 0 for no timeout (the default).
28590 * The timeout value affects the initial connection attempt as well,
28591 * so setting this may cause calls to g_socket_client_connect(), etc,
28592 * to fail with %G_IO_ERROR_TIMED_OUT.
28599 * g_socket_client_set_tls:
28600 * @client: a #GSocketClient.
28601 * @tls: whether to use TLS
28603 * Sets whether @client creates TLS (aka SSL) connections. If @tls is
28604 * %TRUE, @client will wrap its connections in a #GTlsClientConnection
28605 * and perform a TLS handshake when connecting.
28606 * Note that since #GSocketClient must return a #GSocketConnection,
28607 * but #GTlsClientConnection is not a #GSocketConnection, this
28608 * actually wraps the resulting #GTlsClientConnection in a
28609 * #GTcpWrapperConnection when returning it. You can use
28610 * g_tcp_wrapper_connection_get_base_io_stream() on the return value
28611 * to extract the #GTlsClientConnection.
28618 * g_socket_client_set_tls_validation_flags:
28619 * @client: a #GSocketClient.
28620 * @flags: the validation flags
28622 * Sets the TLS validation flags used when creating TLS connections
28623 * via @client. The default value is %G_TLS_CERTIFICATE_VALIDATE_ALL.
28631 * @socket: a #GSocket
28632 * @error: #GError for error reporting, or %NULL to ignore.
28634 * Closes the socket, shutting down any active connection.
28635 * Closing a socket does not wait for all outstanding I/O operations
28636 * to finish, so the caller should not rely on them to be guaranteed
28637 * to complete even if the close returns with no error.
28638 * Once the socket is closed, all other operations will return
28639 * %G_IO_ERROR_CLOSED. Closing a socket multiple times will not
28641 * Sockets will be automatically closed when the last reference
28642 * is dropped, but you might want to call this function to make sure
28643 * resources are released as early as possible.
28644 * Beware that due to the way that TCP works, it is possible for
28645 * recently-sent data to be lost if either you close a socket while the
28646 * %G_IO_IN condition is set, or else if the remote connection tries to
28647 * send something to you after you close the socket but before it has
28648 * finished reading all of the data you sent. There is no easy generic
28649 * way to avoid this problem; the easiest fix is to design the network
28650 * protocol such that the client will never send data "out of turn".
28651 * Another solution is for the server to half-close the connection by
28652 * calling g_socket_shutdown() with only the @shutdown_write flag set,
28653 * and then wait for the client to notice this and close its side of the
28654 * connection, after which the server can safely call g_socket_close().
28655 * (This is what #GTcpConnection does if you call
28656 * g_tcp_connection_set_graceful_disconnect(). But of course, this
28657 * only works if the client will close its connection after the server
28660 * Returns: %TRUE on success, %FALSE on error
28666 * g_socket_condition_check:
28667 * @socket: a #GSocket
28668 * @condition: a #GIOCondition mask to check
28670 * Checks on the readiness of @socket to perform operations.
28671 * The operations specified in @condition are checked for and masked
28672 * against the currently-satisfied conditions on @socket. The result
28674 * Note that on Windows, it is possible for an operation to return
28675 * %G_IO_ERROR_WOULD_BLOCK even immediately after
28676 * g_socket_condition_check() has claimed that the socket is ready for
28677 * writing. Rather than calling g_socket_condition_check() and then
28678 * writing to the socket if it succeeds, it is generally better to
28679 * simply try writing to the socket right away, and try again later if
28680 * the initial attempt returns %G_IO_ERROR_WOULD_BLOCK.
28681 * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition;
28682 * these conditions will always be set in the output if they are true.
28683 * This call never blocks.
28685 * Returns: the @GIOCondition mask of the current state
28691 * g_socket_condition_wait:
28692 * @socket: a #GSocket
28693 * @condition: a #GIOCondition mask to wait for
28694 * @cancellable: (allow-none): a #GCancellable, or %NULL
28695 * @error: a #GError pointer, or %NULL
28697 * Waits for @condition to become true on @socket. When the condition
28698 * is met, %TRUE is returned.
28699 * If @cancellable is cancelled before the condition is met, or if the
28700 * socket has a timeout set and it is reached before the condition is
28701 * met, then %FALSE is returned and @error, if non-%NULL, is set to
28702 * the appropriate value (%G_IO_ERROR_CANCELLED or
28703 * %G_IO_ERROR_TIMED_OUT).
28705 * Returns: %TRUE if the condition was met, %FALSE otherwise
28711 * g_socket_connect:
28712 * @socket: a #GSocket.
28713 * @address: a #GSocketAddress specifying the remote address.
28714 * @cancellable: (allow-none): a %GCancellable or %NULL
28715 * @error: #GError for error reporting, or %NULL to ignore.
28717 * Connect the socket to the specified remote address.
28718 * For connection oriented socket this generally means we attempt to make
28719 * a connection to the @address. For a connection-less socket it sets
28720 * the default address for g_socket_send() and discards all incoming datagrams
28721 * from other sources.
28722 * Generally connection oriented sockets can only connect once, but
28723 * connection-less sockets can connect multiple times to change the
28725 * If the connect call needs to do network I/O it will block, unless
28726 * non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned
28727 * and the user can be notified of the connection finishing by waiting
28728 * for the G_IO_OUT condition. The result of the connection can then be
28729 * checked with g_socket_check_connect_result().
28731 * Returns: %TRUE if connected, %FALSE on error.
28737 * g_socket_connectable_enumerate:
28738 * @connectable: a #GSocketConnectable
28740 * Creates a #GSocketAddressEnumerator for @connectable.
28742 * Returns: (transfer full): a new #GSocketAddressEnumerator.
28748 * g_socket_connectable_proxy_enumerate:
28749 * @connectable: a #GSocketConnectable
28751 * Creates a #GSocketAddressEnumerator for @connectable that will
28752 * return #GProxyAddress<!-- -->es for addresses that you must connect
28754 * If @connectable does not implement
28755 * g_socket_connectable_proxy_enumerate(), this will fall back to
28756 * calling g_socket_connectable_enumerate().
28758 * Returns: (transfer full): a new #GSocketAddressEnumerator.
28764 * g_socket_connection_factory_create_connection:
28765 * @socket: a #GSocket
28767 * Creates a #GSocketConnection subclass of the right type for
28769 * Returns: (transfer full): a #GSocketConnection
28775 * g_socket_connection_factory_lookup_type:
28776 * @family: a #GSocketFamily
28777 * @type: a #GSocketType
28778 * @protocol_id: a protocol id
28780 * Looks up the #GType to be used when creating socket connections on
28781 * sockets with the specified @family,@type and @protocol_id.
28782 * If no type is registered, the #GSocketConnection base type is returned.
28784 * Returns: a #GType
28790 * g_socket_connection_factory_register_type:
28791 * @g_type: a #GType, inheriting from %G_TYPE_SOCKET_CONNECTION
28792 * @family: a #GSocketFamily
28793 * @type: a #GSocketType
28794 * @protocol: a protocol id
28796 * Looks up the #GType to be used when creating socket connections on
28797 * sockets with the specified @family,@type and @protocol.
28798 * If no type is registered, the #GSocketConnection base type is returned.
28805 * g_socket_connection_get_local_address:
28806 * @connection: a #GSocketConnection
28807 * @error: #GError for error reporting, or %NULL to ignore.
28809 * Try to get the local address of a socket connection.
28810 * Free the returned object with g_object_unref().
28812 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
28818 * g_socket_connection_get_remote_address:
28819 * @connection: a #GSocketConnection
28820 * @error: #GError for error reporting, or %NULL to ignore.
28822 * Try to get the remote address of a socket connection.
28823 * Free the returned object with g_object_unref().
28825 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
28831 * g_socket_connection_get_socket:
28832 * @connection: a #GSocketConnection
28834 * Gets the underlying #GSocket object of the connection.
28835 * This can be useful if you want to do something unusual on it
28836 * not supported by the #GSocketConnection APIs.
28838 * Returns: (transfer none): a #GSocketAddress or %NULL on error.
28844 * g_socket_control_message_deserialize:
28845 * @level: a socket level
28846 * @type: a socket control message type for the given @level
28847 * @size: the size of the data in bytes
28848 * @data: (array length=size) (element-type guint8): pointer to the message data
28850 * Tries to deserialize a socket control message of a given
28851 * of #GSocketControlMessage if they can understand this kind
28852 * of message and if so deserialize it into a #GSocketControlMessage.
28853 * If there is no implementation for this kind of control message, %NULL
28854 * will be returned.
28856 * Returns: (transfer full): the deserialized message or %NULL
28862 * g_socket_control_message_get_level:
28863 * @message: a #GSocketControlMessage
28865 * Returns the "level" (i.e. the originating protocol) of the control message.
28866 * This is often SOL_SOCKET.
28868 * Returns: an integer describing the level
28874 * g_socket_control_message_get_msg_type:
28875 * @message: a #GSocketControlMessage
28877 * Returns the protocol specific type of the control message.
28878 * For instance, for UNIX fd passing this would be SCM_RIGHTS.
28880 * Returns: an integer describing the type of control message
28886 * g_socket_control_message_get_size:
28887 * @message: a #GSocketControlMessage
28889 * Returns the space required for the control message, not including
28890 * headers or alignment.
28892 * Returns: The number of bytes required.
28898 * g_socket_control_message_serialize:
28899 * @message: a #GSocketControlMessage
28900 * @data: A buffer to write data to
28902 * Converts the data in the message to bytes placed in the
28904 * returned by g_socket_control_message_get_size() on this
28912 * g_socket_create_source: (skip)
28913 * @socket: a #GSocket
28914 * @condition: a #GIOCondition mask to monitor
28915 * @cancellable: (allow-none): a %GCancellable or %NULL
28917 * Creates a %GSource that can be attached to a %GMainContext to monitor
28918 * for the availibility of the specified @condition on the socket.
28919 * The callback on the source is of the #GSocketSourceFunc type.
28920 * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition;
28921 * these conditions will always be reported output if they are true.
28922 * cause the source to trigger, reporting the current condition (which
28923 * is likely 0 unless cancellation happened at the same time as a
28924 * condition change). You can check for this in the callback using
28925 * g_cancellable_is_cancelled().
28926 * If @socket has a timeout set, and it is reached before @condition
28927 * occurs, the source will then trigger anyway, reporting %G_IO_IN or
28928 * %G_IO_OUT depending on @condition. However, @socket will have been
28929 * marked as having had a timeout, and so the next #GSocket I/O method
28930 * you call will then fail with a %G_IO_ERROR_TIMED_OUT.
28932 * Returns: (transfer full): a newly allocated %GSource, free with g_source_unref().
28938 * g_socket_get_blocking:
28939 * @socket: a #GSocket.
28941 * Gets the blocking mode of the socket. For details on blocking I/O,
28942 * see g_socket_set_blocking().
28944 * Returns: %TRUE if blocking I/O is used, %FALSE otherwise.
28950 * g_socket_get_credentials:
28951 * @socket: a #GSocket.
28952 * @error: #GError for error reporting, or %NULL to ignore.
28954 * Returns the credentials of the foreign process connected to this
28955 * socket, if any (e.g. it is only supported for %G_SOCKET_FAMILY_UNIX
28957 * If this operation isn't supported on the OS, the method fails with
28958 * the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented
28959 * by reading the %SO_PEERCRED option on the underlying socket.
28960 * Other ways to obtain credentials from a foreign peer includes the
28961 * #GUnixCredentialsMessage type and
28962 * g_unix_connection_send_credentials() /
28963 * g_unix_connection_receive_credentials() functions.
28964 * that must be freed with g_object_unref().
28966 * Returns: (transfer full): %NULL if @error is set, otherwise a #GCredentials object
28972 * g_socket_get_family:
28973 * @socket: a #GSocket.
28975 * Gets the socket family of the socket.
28977 * Returns: a #GSocketFamily
28984 * @socket: a #GSocket.
28986 * Returns the underlying OS socket object. On unix this
28987 * is a socket file descriptor, and on windows this is
28988 * a Winsock2 SOCKET handle. This may be useful for
28989 * doing platform specific or otherwise unusual operations
28992 * Returns: the file descriptor of the socket.
28998 * g_socket_get_keepalive:
28999 * @socket: a #GSocket.
29001 * Gets the keepalive mode of the socket. For details on this,
29002 * see g_socket_set_keepalive().
29004 * Returns: %TRUE if keepalive is active, %FALSE otherwise.
29010 * g_socket_get_listen_backlog:
29011 * @socket: a #GSocket.
29013 * Gets the listen backlog setting of the socket. For details on this,
29014 * see g_socket_set_listen_backlog().
29016 * Returns: the maximum number of pending connections.
29022 * g_socket_get_local_address:
29023 * @socket: a #GSocket.
29024 * @error: #GError for error reporting, or %NULL to ignore.
29026 * Try to get the local address of a bound socket. This is only
29027 * useful if the socket has been bound to a local address,
29028 * either explicitly or implicitly when connecting.
29029 * Free the returned object with g_object_unref().
29031 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
29037 * g_socket_get_protocol:
29038 * @socket: a #GSocket.
29040 * Gets the socket protocol id the socket was created with.
29041 * In case the protocol is unknown, -1 is returned.
29043 * Returns: a protocol id, or -1 if unknown
29049 * g_socket_get_remote_address:
29050 * @socket: a #GSocket.
29051 * @error: #GError for error reporting, or %NULL to ignore.
29053 * Try to get the remove address of a connected socket. This is only
29054 * useful for connection oriented sockets that have been connected.
29055 * Free the returned object with g_object_unref().
29057 * Returns: (transfer full): a #GSocketAddress or %NULL on error.
29063 * g_socket_get_socket_type:
29064 * @socket: a #GSocket.
29066 * Gets the socket type of the socket.
29068 * Returns: a #GSocketType
29074 * g_socket_get_timeout:
29075 * @socket: a #GSocket.
29077 * Gets the timeout setting of the socket. For details on this, see
29078 * g_socket_set_timeout().
29080 * Returns: the timeout in seconds
29086 * g_socket_is_closed:
29087 * @socket: a #GSocket
29089 * Checks whether a socket is closed.
29091 * Returns: %TRUE if socket is closed, %FALSE otherwise
29097 * g_socket_is_connected:
29098 * @socket: a #GSocket.
29100 * Check whether the socket is connected. This is only useful for
29101 * connection-oriented sockets.
29103 * Returns: %TRUE if socket is connected, %FALSE otherwise.
29110 * @socket: a #GSocket.
29111 * @error: #GError for error reporting, or %NULL to ignore.
29113 * Marks the socket as a server socket, i.e. a socket that is used
29114 * to accept incoming requests using g_socket_accept().
29115 * Before calling this the socket must be bound to a local address using
29117 * To set the maximum amount of outstanding clients, use
29118 * g_socket_set_listen_backlog().
29120 * Returns: %TRUE on success, %FALSE on error.
29126 * g_socket_listener_accept:
29127 * @listener: a #GSocketListener
29128 * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL
29129 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29130 * @error: #GError for error reporting, or %NULL to ignore.
29132 * Blocks waiting for a client to connect to any of the sockets added
29133 * to the listener. Returns a #GSocketConnection for the socket that was
29135 * If @source_object is not %NULL it will be filled out with the source
29136 * object specified when the corresponding socket or address was added
29138 * If @cancellable is not %NULL, then the operation can be cancelled by
29139 * triggering the cancellable object from another thread. If the operation
29140 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
29142 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
29148 * g_socket_listener_accept_async:
29149 * @listener: a #GSocketListener
29150 * @cancellable: (allow-none): a #GCancellable, or %NULL
29151 * @callback: (scope async): a #GAsyncReadyCallback
29152 * @user_data: (closure): user data for the callback
29154 * This is the asynchronous version of g_socket_listener_accept().
29155 * When the operation is finished @callback will be
29156 * called. You can then call g_socket_listener_accept_socket()
29157 * to get the result of the operation.
29164 * g_socket_listener_accept_finish:
29165 * @listener: a #GSocketListener
29166 * @result: a #GAsyncResult.
29167 * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
29168 * @error: a #GError location to store the error occuring, or %NULL to ignore.
29170 * Finishes an async accept operation. See g_socket_listener_accept_async()
29172 * Returns: (transfer full): a #GSocketConnection on success, %NULL on error.
29178 * g_socket_listener_accept_socket:
29179 * @listener: a #GSocketListener
29180 * @source_object: (out) (transfer none) (allow-none): location where #GObject pointer will be stored, or %NULL.
29181 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
29182 * @error: #GError for error reporting, or %NULL to ignore.
29184 * Blocks waiting for a client to connect to any of the sockets added
29185 * to the listener. Returns the #GSocket that was accepted.
29186 * If you want to accept the high-level #GSocketConnection, not a #GSocket,
29187 * which is often the case, then you should use g_socket_listener_accept()
29189 * If @source_object is not %NULL it will be filled out with the source
29190 * object specified when the corresponding socket or address was added
29192 * If @cancellable is not %NULL, then the operation can be cancelled by
29193 * triggering the cancellable object from another thread. If the operation
29194 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
29196 * Returns: (transfer full): a #GSocket on success, %NULL on error.
29202 * g_socket_listener_accept_socket_async:
29203 * @listener: a #GSocketListener
29204 * @cancellable: (allow-none): a #GCancellable, or %NULL
29205 * @callback: (scope async): a #GAsyncReadyCallback
29206 * @user_data: (closure): user data for the callback
29208 * This is the asynchronous version of g_socket_listener_accept_socket().
29209 * When the operation is finished @callback will be
29210 * called. You can then call g_socket_listener_accept_socket_finish()
29211 * to get the result of the operation.
29218 * g_socket_listener_accept_socket_finish:
29219 * @listener: a #GSocketListener
29220 * @result: a #GAsyncResult.
29221 * @source_object: (out) (transfer none) (allow-none): Optional #GObject identifying this source
29222 * @error: a #GError location to store the error occuring, or %NULL to ignore.
29224 * Finishes an async accept operation. See g_socket_listener_accept_socket_async()
29226 * Returns: (transfer full): a #GSocket on success, %NULL on error.
29232 * g_socket_listener_add_address:
29233 * @listener: a #GSocketListener
29234 * @address: a #GSocketAddress
29235 * @type: a #GSocketType
29236 * @protocol: a #GSocketProtocol
29237 * @source_object: (allow-none): Optional #GObject identifying this source
29238 * @effective_address: (out) (allow-none): location to store the address that was bound to, or %NULL.
29239 * @error: #GError for error reporting, or %NULL to ignore.
29241 * Creates a socket of type @type and protocol @protocol, binds
29242 * it to @address and adds it to the set of sockets we're accepting
29244 * Note that adding an IPv6 address, depending on the platform,
29245 * may or may not result in a listener that also accepts IPv4
29246 * connections. For more determinstic behaviour, see
29247 * g_socket_listener_add_inet_port().
29248 * to accept to identify this particular source, which is
29249 * useful if you're listening on multiple addresses and do
29250 * different things depending on what address is connected to.
29251 * If successful and @effective_address is non-%NULL then it will
29252 * be set to the address that the binding actually occured at. This
29253 * is helpful for determining the port number that was used for when
29254 * requested, belongs to the caller and must be freed.
29256 * Requesting a binding to port 0 (ie: "any port"). This address, if
29257 * Returns: %TRUE on success, %FALSE on error.
29263 * g_socket_listener_add_any_inet_port:
29264 * @listener: a #GSocketListener
29265 * @source_object: (allow-none): Optional #GObject identifying this source
29266 * @error: a #GError location to store the error occuring, or %NULL to ignore.
29268 * Listens for TCP connections on any available port number for both
29269 * IPv6 and IPv4 (if each are available).
29270 * This is useful if you need to have a socket for incoming connections
29271 * but don't care about the specific port number.
29272 * to accept to identify this particular source, which is
29273 * useful if you're listening on multiple addresses and do
29274 * different things depending on what address is connected to.
29276 * Returns: the port number, or 0 in case of failure.
29282 * g_socket_listener_add_inet_port:
29283 * @listener: a #GSocketListener
29284 * @port: an IP port number (non-zero)
29285 * @source_object: (allow-none): Optional #GObject identifying this source
29286 * @error: #GError for error reporting, or %NULL to ignore.
29288 * Helper function for g_socket_listener_add_address() that
29289 * creates a TCP/IP socket listening on IPv4 and IPv6 (if
29290 * supported) on the specified port on all interfaces.
29291 * to accept to identify this particular source, which is
29292 * useful if you're listening on multiple addresses and do
29293 * different things depending on what address is connected to.
29295 * Returns: %TRUE on success, %FALSE on error.
29301 * g_socket_listener_add_socket:
29302 * @listener: a #GSocketListener
29303 * @socket: a listening #GSocket
29304 * @source_object: (allow-none): Optional #GObject identifying this source
29305 * @error: #GError for error reporting, or %NULL to ignore.
29307 * Adds @socket to the set of sockets that we try to accept
29308 * new clients from. The socket must be bound to a local
29309 * address and listened to.
29310 * to accept to identify this particular source, which is
29311 * useful if you're listening on multiple addresses and do
29312 * different things depending on what address is connected to.
29314 * Returns: %TRUE on success, %FALSE on error.
29320 * g_socket_listener_close:
29321 * @listener: a #GSocketListener
29323 * Closes all the sockets in the listener.
29330 * g_socket_listener_new:
29332 * Creates a new #GSocketListener with no sockets to listen for.
29333 * New listeners can be added with e.g. g_socket_listener_add_address()
29334 * or g_socket_listener_add_inet_port().
29336 * Returns: a new #GSocketListener.
29342 * g_socket_listener_set_backlog:
29343 * @listener: a #GSocketListener
29344 * @listen_backlog: an integer
29346 * Sets the listen backlog on the sockets in the listener.
29347 * See g_socket_set_listen_backlog() for details
29355 * @family: the socket family to use, e.g. %G_SOCKET_FAMILY_IPV4.
29356 * @type: the socket type to use.
29357 * @protocol: the id of the protocol to use, or 0 for default.
29358 * @error: #GError for error reporting, or %NULL to ignore.
29360 * Creates a new #GSocket with the defined family, type and protocol.
29361 * If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type
29362 * for the family and type is used.
29363 * The @protocol is a family and type specific int that specifies what
29364 * kind of protocol to use. #GSocketProtocol lists several common ones.
29365 * Many families only support one protocol, and use 0 for this, others
29366 * support several and using 0 means to use the default protocol for
29367 * the family and type.
29368 * The protocol id is passed directly to the operating
29369 * system, so you can use protocols not listed in #GSocketProtocol if you
29370 * know the protocol number used for it.
29371 * Free the returned object with g_object_unref().
29373 * Returns: a #GSocket or %NULL on error.
29379 * g_socket_new_from_fd:
29380 * @fd: a native socket file descriptor.
29381 * @error: #GError for error reporting, or %NULL to ignore.
29383 * Creates a new #GSocket from a native file descriptor
29384 * or winsock SOCKET handle.
29385 * This reads all the settings from the file descriptor so that
29386 * all properties should work. Note that the file descriptor
29387 * will be set to non-blocking mode, independent on the blocking
29388 * mode of the #GSocket.
29389 * Free the returned object with g_object_unref().
29391 * Returns: a #GSocket or %NULL on error.
29397 * g_socket_receive:
29398 * @socket: a #GSocket
29399 * @buffer: a buffer to read data into (which should be at least @size bytes long).
29400 * @size: the number of bytes you want to read from the socket
29401 * @cancellable: (allow-none): a %GCancellable or %NULL
29402 * @error: #GError for error reporting, or %NULL to ignore.
29404 * Receive data (up to @size bytes) from a socket. This is mainly used by
29405 * connection-oriented sockets; it is identical to g_socket_receive_from()
29406 * with @address set to %NULL.
29407 * For %G_SOCKET_TYPE_DATAGRAM and %G_SOCKET_TYPE_SEQPACKET sockets,
29408 * g_socket_receive() will always read either 0 or 1 complete messages from
29409 * the socket. If the received message is too large to fit in @buffer, then
29410 * the data beyond @size bytes will be discarded, without any explicit
29411 * indication that this has occurred.
29412 * For %G_SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any
29413 * number of bytes, up to @size. If more than @size bytes have been
29414 * received, the additional data will be returned in future calls to
29415 * g_socket_receive().
29416 * If the socket is in blocking mode the call will block until there is
29417 * some data to receive or there is an error. If there is no data available
29418 * and the socket is in non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error
29419 * will be returned. To be notified when data is available, wait for the
29420 * %G_IO_IN condition.
29421 * On error -1 is returned and @error is set accordingly.
29423 * Returns: Number of bytes read, or -1 on error
29429 * g_socket_receive_from:
29430 * @socket: a #GSocket
29431 * @address: a pointer to a #GSocketAddress pointer, or %NULL
29432 * @buffer: a buffer to read data into (which should be at least @size bytes long).
29433 * @size: the number of bytes you want to read from the socket
29434 * @cancellable: (allow-none): a %GCancellable or %NULL
29435 * @error: #GError for error reporting, or %NULL to ignore.
29437 * Receive data (up to @size bytes) from a socket.
29438 * If @address is non-%NULL then @address will be set equal to the
29439 * source address of the received packet.
29440 * See g_socket_receive() for additional information.
29442 * Returns: Number of bytes read, or -1 on error
29448 * g_socket_receive_message:
29449 * @socket: a #GSocket
29450 * @address: a pointer to a #GSocketAddress pointer, or %NULL
29451 * @vectors: (array length=num_vectors): an array of #GInputVector structs
29452 * @num_vectors: the number of elements in @vectors, or -1
29453 * @messages: (array length=num_messages) (allow-none): a pointer which may be filled with an array of #GSocketControlMessages, or %NULL
29454 * @num_messages: a pointer which will be filled with the number of elements in @messages, or %NULL
29455 * @flags: a pointer to an int containing #GSocketMsgFlags flags
29456 * @cancellable: (allow-none): a %GCancellable or %NULL
29457 * @error: a #GError pointer, or %NULL
29459 * Receive data from a socket. This is the most complicated and
29460 * fully-featured version of this call. For easier use, see
29461 * g_socket_receive() and g_socket_receive_from().
29462 * If @address is non-%NULL then @address will be set equal to the
29463 * source address of the received packet.
29464 * describe the buffers that received data will be scattered into.
29465 * If @num_vectors is -1, then @vectors is assumed to be terminated
29466 * by a #GInputVector with a %NULL buffer pointer.
29467 * As a special case, if @num_vectors is 0 (in which case, @vectors
29468 * may of course be %NULL), then a single byte is received and
29469 * discarded. This is to facilitate the common practice of sending a
29470 * single '\0' byte for the purposes of transferring ancillary data.
29471 * array of #GSocketControlMessage instances or %NULL if no such
29472 * messages was received. These correspond to the control messages
29473 * received from the kernel, one #GSocketControlMessage per message
29474 * from the kernel. This array is %NULL-terminated and must be freed
29475 * by the caller using g_free() after calling g_object_unref() on each
29476 * element. If @messages is %NULL, any control messages received will
29478 * messages received.
29479 * If both @messages and @num_messages are non-%NULL, then
29480 * for this are available in the #GSocketMsgFlags enum, but the
29481 * values there are the same as the system values, and the flags
29482 * are passed in as-is, so you can pass in system-specific flags too
29483 * (and g_socket_receive_message() may pass system-specific flags out).
29484 * As with g_socket_receive(), data may be discarded if @socket is
29485 * %G_SOCKET_TYPE_DATAGRAM or %G_SOCKET_TYPE_SEQPACKET and you do not
29486 * provide enough buffer space to read a complete message. You can pass
29487 * %G_SOCKET_MSG_PEEK in @flags to peek at the current message without
29488 * removing it from the receive queue, but there is no portable way to find
29489 * out the length of the message other than by reading it into a
29490 * sufficiently-large buffer.
29491 * If the socket is in blocking mode the call will block until there
29492 * is some data to receive or there is an error. If there is no data
29493 * available and the socket is in non-blocking mode, a
29494 * %G_IO_ERROR_WOULD_BLOCK error will be returned. To be notified when
29495 * data is available, wait for the %G_IO_IN condition.
29496 * On error -1 is returned and @error is set accordingly.
29498 * In @messages (ie: not including the %NULL terminator).
29499 * Returns: Number of bytes read, or -1 on error
29505 * g_socket_receive_with_blocking:
29506 * @socket: a #GSocket
29507 * @buffer: a buffer to read data into (which should be at least @size bytes long).
29508 * @size: the number of bytes you want to read from the socket
29509 * @blocking: whether to do blocking or non-blocking I/O
29510 * @cancellable: (allow-none): a %GCancellable or %NULL
29511 * @error: #GError for error reporting, or %NULL to ignore.
29513 * This behaves exactly the same as g_socket_receive(), except that
29514 * the choice of blocking or non-blocking behavior is determined by
29515 * the @blocking argument rather than by @socket's properties.
29517 * Returns: Number of bytes read, or -1 on error
29524 * @socket: a #GSocket
29525 * @buffer: (array length=size): the buffer containing the data to send.
29526 * @size: the number of bytes to send
29527 * @cancellable: (allow-none): a %GCancellable or %NULL
29528 * @error: #GError for error reporting, or %NULL to ignore.
29530 * Tries to send @size bytes from @buffer on the socket. This is
29531 * mainly used by connection-oriented sockets; it is identical to
29532 * g_socket_send_to() with @address set to %NULL.
29533 * If the socket is in blocking mode the call will block until there is
29534 * space for the data in the socket queue. If there is no space available
29535 * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
29536 * will be returned. To be notified when space is available, wait for the
29537 * %G_IO_OUT condition. Note though that you may still receive
29538 * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
29539 * notified of a %G_IO_OUT condition. (On Windows in particular, this is
29540 * very common due to the way the underlying APIs work.)
29541 * On error -1 is returned and @error is set accordingly.
29544 * Returns: Number of bytes written (which may be less than @size), or -1
29550 * g_socket_send_message:
29551 * @socket: a #GSocket
29552 * @address: a #GSocketAddress, or %NULL
29553 * @vectors: (array length=num_vectors): an array of #GOutputVector structs
29554 * @num_vectors: the number of elements in @vectors, or -1
29555 * @messages: (array length=num_messages) (allow-none): a pointer to an array of #GSocketControlMessages, or %NULL.
29556 * @num_messages: number of elements in @messages, or -1.
29557 * @flags: an int containing #GSocketMsgFlags flags
29558 * @cancellable: (allow-none): a %GCancellable or %NULL
29559 * @error: #GError for error reporting, or %NULL to ignore.
29561 * Send data to @address on @socket. This is the most complicated and
29562 * fully-featured version of this call. For easier use, see
29563 * g_socket_send() and g_socket_send_to().
29564 * If @address is %NULL then the message is sent to the default receiver
29565 * (set by g_socket_connect()).
29566 * then @vectors is assumed to be terminated by a #GOutputVector with a
29567 * %NULL buffer pointer.) The #GOutputVector structs describe the buffers
29568 * that the sent data will be gathered from. Using multiple
29569 * #GOutputVector<!-- -->s is more memory-efficient than manually copying
29570 * data from multiple sources into a single buffer, and more
29571 * network-efficient than making multiple calls to g_socket_send().
29572 * #GSocketControlMessage instances. These correspond to the control
29573 * messages to be sent on the socket.
29574 * If @num_messages is -1 then @messages is treated as a %NULL-terminated
29576 * for this are available in the #GSocketMsgFlags enum, but the
29577 * values there are the same as the system values, and the flags
29578 * are passed in as-is, so you can pass in system-specific flags too.
29579 * If the socket is in blocking mode the call will block until there is
29580 * space for the data in the socket queue. If there is no space available
29581 * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
29582 * will be returned. To be notified when space is available, wait for the
29583 * %G_IO_OUT condition. Note though that you may still receive
29584 * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
29585 * notified of a %G_IO_OUT condition. (On Windows in particular, this is
29586 * very common due to the way the underlying APIs work.)
29587 * On error -1 is returned and @error is set accordingly.
29590 * Returns: Number of bytes written (which may be less than @size), or -1
29596 * g_socket_send_to:
29597 * @socket: a #GSocket
29598 * @address: a #GSocketAddress, or %NULL
29599 * @buffer: (array length=size): the buffer containing the data to send.
29600 * @size: the number of bytes to send
29601 * @cancellable: (allow-none): a %GCancellable or %NULL
29602 * @error: #GError for error reporting, or %NULL to ignore.
29604 * Tries to send @size bytes from @buffer to @address. If @address is
29605 * %NULL then the message is sent to the default receiver (set by
29606 * g_socket_connect()).
29607 * See g_socket_send() for additional information.
29610 * Returns: Number of bytes written (which may be less than @size), or -1
29616 * g_socket_send_with_blocking:
29617 * @socket: a #GSocket
29618 * @buffer: (array length=size): the buffer containing the data to send.
29619 * @size: the number of bytes to send
29620 * @blocking: whether to do blocking or non-blocking I/O
29621 * @cancellable: (allow-none): a %GCancellable or %NULL
29622 * @error: #GError for error reporting, or %NULL to ignore.
29624 * This behaves exactly the same as g_socket_send(), except that
29625 * the choice of blocking or non-blocking behavior is determined by
29626 * the @blocking argument rather than by @socket's properties.
29629 * Returns: Number of bytes written (which may be less than @size), or -1
29635 * g_socket_service_is_active:
29636 * @service: a #GSocketService
29638 * Check whether the service is active or not. An active
29639 * service will accept new clients that connect, while
29640 * a non-active service will let connecting clients queue
29641 * up until the service is started.
29643 * Returns: %TRUE if the service is active, %FALSE otherwise
29649 * g_socket_service_new:
29651 * Creates a new #GSocketService with no sockets to listen for.
29652 * New listeners can be added with e.g. g_socket_listener_add_address()
29653 * or g_socket_listener_add_inet_port().
29655 * Returns: a new #GSocketService.
29661 * g_socket_service_start:
29662 * @service: a #GSocketService
29664 * Starts the service, i.e. start accepting connections
29665 * from the added sockets when the mainloop runs.
29666 * This call is threadsafe, so it may be called from a thread
29667 * handling an incomming client request.
29674 * g_socket_service_stop:
29675 * @service: a #GSocketService
29677 * Stops the service, i.e. stops accepting connections
29678 * from the added sockets when the mainloop runs.
29679 * This call is threadsafe, so it may be called from a thread
29680 * handling an incomming client request.
29687 * g_socket_set_blocking:
29688 * @socket: a #GSocket.
29689 * @blocking: Whether to use blocking I/O or not.
29691 * Sets the blocking mode of the socket. In blocking mode
29692 * all operations block until they succeed or there is an error. In
29693 * non-blocking mode all functions return results immediately or
29694 * with a %G_IO_ERROR_WOULD_BLOCK error.
29695 * All sockets are created in blocking mode. However, note that the
29696 * platform level socket is always non-blocking, and blocking mode
29697 * is a GSocket level feature.
29704 * g_socket_set_keepalive:
29705 * @socket: a #GSocket.
29706 * @keepalive: Value for the keepalive flag
29708 * Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When
29709 * this flag is set on a socket, the system will attempt to verify that the
29710 * remote socket endpoint is still present if a sufficiently long period of
29711 * time passes with no data being exchanged. If the system is unable to
29712 * verify the presence of the remote endpoint, it will automatically close
29714 * This option is only functional on certain kinds of sockets. (Notably,
29715 * %G_SOCKET_PROTOCOL_TCP sockets.)
29716 * The exact time between pings is system- and protocol-dependent, but will
29717 * normally be at least two hours. Most commonly, you would set this flag
29718 * on a server socket if you want to allow clients to remain idle for long
29719 * periods of time, but also want to ensure that connections are eventually
29720 * garbage-collected if clients crash or become unreachable.
29727 * g_socket_set_listen_backlog:
29728 * @socket: a #GSocket.
29729 * @backlog: the maximum number of pending connections.
29731 * Sets the maximum number of outstanding connections allowed
29732 * when listening on this socket. If more clients than this are
29733 * connecting to the socket and the application is not handling them
29734 * on time then the new connections will be refused.
29735 * Note that this must be called before g_socket_listen() and has no
29736 * effect if called after that.
29743 * g_socket_set_timeout:
29744 * @socket: a #GSocket.
29745 * @timeout: the timeout for @socket, in seconds, or 0 for none
29747 * Sets the time in seconds after which I/O operations on @socket will
29748 * time out if they have not yet completed.
29749 * On a blocking socket, this means that any blocking #GSocket
29750 * operation will time out after @timeout seconds of inactivity,
29751 * returning %G_IO_ERROR_TIMED_OUT.
29752 * On a non-blocking socket, calls to g_socket_condition_wait() will
29753 * also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources
29754 * created with g_socket_create_source() will trigger after
29755 * set, at which point calling g_socket_receive(), g_socket_send(),
29756 * g_socket_check_connect_result(), etc, will fail with
29757 * %G_IO_ERROR_TIMED_OUT.
29758 * If @timeout is 0 (the default), operations will never time out
29760 * Note that if an I/O operation is interrupted by a signal, this may
29761 * cause the timeout to be reset.
29768 * g_socket_shutdown:
29769 * @socket: a #GSocket
29770 * @shutdown_read: whether to shut down the read side
29771 * @shutdown_write: whether to shut down the write side
29772 * @error: #GError for error reporting, or %NULL to ignore.
29774 * Shut down part of a full-duplex connection.
29775 * If @shutdown_read is %TRUE then the recieving side of the connection
29776 * is shut down, and further reading is disallowed.
29777 * If @shutdown_write is %TRUE then the sending side of the connection
29778 * is shut down, and further writing is disallowed.
29779 * It is allowed for both @shutdown_read and @shutdown_write to be %TRUE.
29780 * One example where this is used is graceful disconnect for TCP connections
29781 * where you close the sending side, then wait for the other side to close
29782 * the connection, thus ensuring that the other side saw all sent data.
29784 * Returns: %TRUE on success, %FALSE on error
29790 * g_socket_speaks_ipv4:
29791 * @socket: a #GSocket
29793 * Checks if a socket is capable of speaking IPv4.
29794 * IPv4 sockets are capable of speaking IPv4. On some operating systems
29795 * and under some combinations of circumstances IPv6 sockets are also
29796 * capable of speaking IPv4. See RFC 3493 section 3.7 for more
29798 * No other types of sockets are currently considered as being capable
29799 * of speaking IPv4.
29801 * Returns: %TRUE if this socket can be used with IPv4.
29807 * g_srv_target_copy:
29808 * @target: a #GSrvTarget
29812 * Returns: a copy of @target
29818 * g_srv_target_free:
29819 * @target: a #GSrvTarget
29828 * g_srv_target_get_hostname:
29829 * @target: a #GSrvTarget
29831 * Gets @target's hostname (in ASCII form; if you are going to present
29832 * this to the user, you should use g_hostname_is_ascii_encoded() to
29833 * check if it contains encoded Unicode segments, and use
29834 * g_hostname_to_unicode() to convert it if it does.)
29836 * Returns: @target's hostname
29842 * g_srv_target_get_port:
29843 * @target: a #GSrvTarget
29845 * Gets @target's port
29847 * Returns: @target's port
29853 * g_srv_target_get_priority:
29854 * @target: a #GSrvTarget
29856 * Gets @target's priority. You should not need to look at this;
29857 * #GResolver already sorts the targets according to the algorithm in
29860 * Returns: @target's priority
29866 * g_srv_target_get_weight:
29867 * @target: a #GSrvTarget
29869 * Gets @target's weight. You should not need to look at this;
29870 * #GResolver already sorts the targets according to the algorithm in
29873 * Returns: @target's weight
29879 * g_srv_target_list_sort: (skip)
29880 * @targets: a #GList of #GSrvTarget
29882 * Sorts @targets in place according to the algorithm in RFC 2782.
29884 * Returns: (transfer full): the head of the sorted list.
29890 * g_srv_target_new:
29891 * @hostname: the host that the service is running on
29892 * @port: the port that the service is running on
29893 * @priority: the target's priority
29894 * @weight: the target's weight
29896 * Creates a new #GSrvTarget with the given parameters.
29897 * You should not need to use this; normally #GSrvTarget<!-- -->s are
29898 * created by #GResolver.
29900 * Returns: a new #GSrvTarget.
29906 * g_tcp_connection_get_graceful_disconnect:
29907 * @connection: a #GTcpConnection
29909 * Checks if graceful disconnects are used. See
29910 * g_tcp_connection_set_graceful_disconnect().
29912 * Returns: %TRUE if graceful disconnect is used on close, %FALSE otherwise
29918 * g_tcp_connection_set_graceful_disconnect:
29919 * @connection: a #GTcpConnection
29920 * @graceful_disconnect: Whether to do graceful disconnects or not
29922 * This enabled graceful disconnects on close. A graceful disconnect
29923 * means that we signal the recieving end that the connection is terminated
29924 * and wait for it to close the connection before closing the connection.
29925 * A graceful disconnect means that we can be sure that we successfully sent
29926 * all the outstanding data to the other end, or get an error reported.
29927 * However, it also means we have to wait for all the data to reach the
29928 * other side and for it to acknowledge this by closing the socket, which may
29929 * take a while. For this reason it is disabled by default.
29936 * g_tcp_wrapper_connection_get_base_io_stream:
29937 * @conn: a #GTcpWrapperConnection
29939 * Get's @conn's base #GIOStream
29941 * Returns: (transfer none): @conn's base #GIOStream
29946 * g_tcp_wrapper_connection_new:
29947 * @base_io_stream: the #GIOStream to wrap
29948 * @socket: the #GSocket associated with @base_io_stream
29950 * Wraps @base_io_stream and @socket together as a #GSocketConnection.
29952 * Returns: the new #GSocketConnection.
29958 * g_themed_icon_append_name:
29959 * @icon: a #GThemedIcon
29960 * @iconname: name of icon to append to list of icons from within @icon.
29962 * Append a name to the list of icons from within @icon.
29964 * Note that doing so invalidates the hash computed by prior calls
29965 * to g_icon_hash().
29971 * g_themed_icon_get_names:
29972 * @icon: a #GThemedIcon.
29974 * Gets the names of icons from within @icon.
29976 * Returns: (transfer none): a list of icon names.
29981 * g_themed_icon_new:
29982 * @iconname: a string containing an icon name.
29984 * Creates a new themed icon for @iconname.
29986 * Returns: (transfer full): a new #GThemedIcon.
29991 * g_themed_icon_new_from_names:
29992 * @iconnames: (array length=len): an array of strings containing icon names.
29993 * @len: the length of the @iconnames array, or -1 if @iconnames is %NULL-terminated
29995 * Creates a new themed icon for @iconnames.
29997 * Returns: (transfer full): a new #GThemedIcon
30002 * g_themed_icon_new_with_default_fallbacks:
30003 * @iconname: a string containing an icon name
30005 * Creates a new themed icon for @iconname, and all the names
30006 * that can be created by shortening @iconname at '-' characters.
30007 * In the following example, @icon1 and @icon2 are equivalent:
30009 * const char *names[] = {
30010 * "gnome-dev-cdrom-audio",
30011 * "gnome-dev-cdrom",
30015 * icon1 = g_themed_icon_new_from_names (names, 4);
30016 * icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
30019 * Returns: (transfer full): a new #GThemedIcon.
30024 * g_themed_icon_prepend_name:
30025 * @icon: a #GThemedIcon
30026 * @iconname: name of icon to prepend to list of icons from within @icon.
30028 * Prepend a name to the list of icons from within @icon.
30030 * Note that doing so invalidates the hash computed by prior calls
30031 * to g_icon_hash().
30039 * g_threaded_socket_service_new:
30040 * @max_threads: the maximal number of threads to execute concurrently handling incoming clients, -1 means no limit
30042 * Creates a new #GThreadedSocketService with no listeners. Listeners
30043 * must be added with g_socket_service_add_listeners().
30045 * Returns: a new #GSocketService.
30051 * g_tls_backend_get_certificate_type:
30052 * @backend: the #GTlsBackend
30054 * Gets the #GType of @backend's #GTlsCertificate implementation.
30057 * Returns: the #GType of @backend's #GTlsCertificate
30063 * g_tls_backend_get_client_connection_type:
30064 * @backend: the #GTlsBackend
30066 * Gets the #GType of @backend's #GTlsClientConnection implementation.
30069 * Returns: the #GType of @backend's #GTlsClientConnection
30075 * g_tls_backend_get_default:
30077 * Gets the default #GTlsBackend for the system.
30079 * Returns: (transfer none): a #GTlsBackend
30085 * g_tls_backend_get_server_connection_type:
30086 * @backend: the #GTlsBackend
30088 * Gets the #GType of @backend's #GTlsServerConnection implementation.
30091 * Returns: the #GType of @backend's #GTlsServerConnection
30097 * g_tls_backend_supports_tls:
30098 * @backend: the #GTlsBackend
30100 * Checks if TLS is supported; if this returns %FALSE for the default
30101 * #GTlsBackend, it means no "real" TLS backend is available.
30103 * Returns: whether or not TLS is supported
30109 * g_tls_certificate_get_issuer:
30110 * @cert: a #GTlsCertificate
30112 * Gets the #GTlsCertificate representing @cert's issuer, if known
30113 * or %NULL if @cert is self-signed or signed with an unknown
30116 * Returns: (transfer none): The certificate of @cert's issuer,
30122 * g_tls_certificate_list_new_from_file:
30123 * @file: file containing PEM-encoded certificates to import
30124 * @error: #GError for error reporting, or %NULL to ignore.
30126 * Creates one or more #GTlsCertificate<!-- -->s from the PEM-encoded
30127 * data in @file. If @file cannot be read or parsed, the function will
30128 * return %NULL and set @error. If @file does not contain any
30129 * PEM-encoded certificates, this will return an empty list and not
30131 * #GList containing #GTlsCertificate objects. You must free the list
30132 * and its contents when you are done with it.
30134 * Returns: (element-type Gio.TlsCertificate) (transfer full): a
30140 * g_tls_certificate_new_from_file:
30141 * @file: file containing a PEM-encoded certificate to import
30142 * @error: #GError for error reporting, or %NULL to ignore.
30144 * Creates a #GTlsCertificate from the PEM-encoded data in @file. If
30145 * set @error. Otherwise, this behaves like g_tls_certificate_new().
30147 * Returns: the new certificate, or %NULL on error
30153 * g_tls_certificate_new_from_files:
30154 * @cert_file: file containing a PEM-encoded certificate to import
30155 * @key_file: file containing a PEM-encoded private key to import
30156 * @error: #GError for error reporting, or %NULL to ignore.
30158 * Creates a #GTlsCertificate from the PEM-encoded data in @cert_file
30159 * and @key_file. If either file cannot be read or parsed, the
30160 * function will return %NULL and set @error. Otherwise, this behaves
30161 * like g_tls_certificate_new().
30163 * Returns: the new certificate, or %NULL on error
30169 * g_tls_certificate_new_from_pem:
30170 * @data: PEM-encoded certificate data
30171 * @length: the length of @data, or -1 if it's 0-terminated.
30172 * @error: #GError for error reporting, or %NULL to ignore.
30174 * Creates a new #GTlsCertificate from the PEM-encoded data in @data.
30175 * If @data includes both a certificate and a private key, then the
30176 * returned certificate will include the private key data as well.
30177 * If @data includes multiple certificates, only the first one will be
30180 * Returns: the new certificate, or %NULL if @data is invalid
30186 * g_tls_certificate_verify:
30187 * @cert: a #GTlsCertificate
30188 * @identity: (allow-none): the expected peer identity
30189 * @trusted_ca: (allow-none): the certificate of a trusted authority
30191 * This verifies @cert and returns a set of #GTlsCertificateFlags
30192 * indicating any problems found with it. This can be used to verify a
30193 * certificate outside the context of making a connection, or to
30194 * check a certificate against a CA that is not part of the system
30196 * If @identity is not %NULL, @cert's name(s) will be compared against
30197 * it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return
30198 * value if it does not match. If @identity is %NULL, that bit will
30199 * never be set in the return value.
30200 * If @trusted_ca is not %NULL, then @cert (or one of the certificates
30201 * in its chain) must be signed by it, or else
30202 * %G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If
30204 * (All other #GTlsCertificateFlags values will always be set or unset
30207 * Returns: the appropriate #GTlsCertificateFlags
30213 * g_tls_client_connection_get_accepted_cas:
30214 * @conn: the #GTlsClientConnection
30216 * Gets the list of distinguished names of the Certificate Authorities
30217 * that the server will accept certificates from. This will be set
30218 * during the TLS handshake if the server requests a certificate.
30219 * Otherwise, it will be %NULL.
30220 * Each item in the list is a #GByteArray which contains the complete
30221 * subject DN of the certificate authority.
30222 * CA DNs. You should unref each element with g_byte_array_unref() and then
30223 * the free the list with g_list_free().
30225 * Returns: (element-type GByteArray) (transfer full): the list of
30231 * g_tls_client_connection_get_server_identity:
30232 * @conn: the #GTlsClientConnection
30234 * Gets @conn's expected server identity
30235 * expected server identity, or %NULL if the expected identity is not
30238 * Returns: (transfer none): a #GSocketConnectable describing the
30244 * g_tls_client_connection_get_use_ssl3:
30245 * @conn: the #GTlsClientConnection
30247 * Gets whether @conn will use SSL 3.0 rather than the
30248 * highest-supported version of TLS; see
30249 * g_tls_client_connection_set_use_ssl3().
30251 * Returns: whether @conn will use SSL 3.0
30257 * g_tls_client_connection_get_validation_flags:
30258 * @conn: the #GTlsClientConnection
30260 * Gets @conn's validation flags
30262 * Returns: the validation flags
30268 * g_tls_client_connection_new:
30269 * @base_io_stream: the #GIOStream to wrap
30270 * @server_identity: (allow-none): the expected identity of the server
30271 * @error: #GError for error reporting, or %NULL to ignore.
30273 * Creates a new #GTlsClientConnection wrapping @base_io_stream (which
30274 * must have pollable input and output streams) which is assumed to
30275 * communicate with the server identified by @server_identity.
30277 * Returns: the new #GTlsClientConnection, or %NULL on error
30283 * g_tls_client_connection_set_server_identity:
30284 * @conn: the #GTlsClientConnection
30285 * @identity: a #GSocketConnectable describing the expected server identity
30287 * Sets @conn's expected server identity, which is used both to tell
30288 * servers on virtual hosts which certificate to present, and also
30289 * to let @conn know what name to look for in the certificate when
30290 * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.
30297 * g_tls_client_connection_set_use_ssl3:
30298 * @conn: the #GTlsClientConnection
30299 * @use_ssl3: whether to use SSL 3.0
30301 * If @use_ssl3 is %TRUE, this forces @conn to use SSL 3.0 rather than
30302 * trying to properly negotiate the right version of TLS or SSL to use.
30303 * This can be used when talking to servers that do not implement the
30304 * fallbacks correctly and which will therefore fail to handshake with
30305 * a "modern" TLS handshake attempt.
30312 * g_tls_client_connection_set_validation_flags:
30313 * @conn: the #GTlsClientConnection
30314 * @flags: the #GTlsCertificateFlags to use
30316 * Sets @conn's validation flags, to override the default set of
30317 * checks performed when validating a server certificate. By default,
30318 * %G_TLS_CERTIFICATE_VALIDATE_ALL is used.
30325 * g_tls_connection_emit_accept_certificate:
30326 * @conn: a #GTlsConnection
30327 * @peer_cert: the peer's #GTlsCertificate
30328 * @errors: the problems with @peer_cert
30330 * Used by #GTlsConnection implementations to emit the
30331 * #GTlsConnection::accept-certificate signal.
30332 * %TRUE to accept @peer_cert
30334 * Returns: %TRUE if one of the signal handlers has returned
30340 * g_tls_connection_get_certificate:
30341 * @conn: a #GTlsConnection
30343 * Gets @conn's certificate, as set by
30344 * g_tls_connection_set_certificate().
30346 * Returns: (transfer none): @conn's certificate, or %NULL
30352 * g_tls_connection_get_peer_certificate:
30353 * @conn: a #GTlsConnection
30355 * Gets @conn's peer's certificate after the handshake has completed.
30356 * (It is not set during the emission of
30357 * #GTlsConnection::accept-certificate.)
30359 * Returns: (transfer none): @conn's peer's certificate, or %NULL
30365 * g_tls_connection_get_peer_certificate_errors:
30366 * @conn: a #GTlsConnection
30368 * Gets the errors associated with validating @conn's peer's
30369 * certificate, after the handshake has completed. (It is not set
30370 * during the emission of #GTlsConnection::accept-certificate.)
30372 * Returns: @conn's peer's certificate errors
30378 * g_tls_connection_get_rehandshake_mode:
30379 * @conn: a #GTlsConnection
30381 * Gets @conn rehandshaking mode. See
30382 * g_tls_connection_set_rehandshake() for details.
30384 * Returns: @conn's rehandshaking mode
30390 * g_tls_connection_get_require_close_notify:
30391 * @conn: a #GTlsConnection
30393 * Tests whether or not @conn expects a proper TLS close notification
30394 * when the connection is closed. See
30395 * g_tls_connection_set_require_close_notify() for details.
30398 * Returns: %TRUE if @conn requires a proper TLS close
30404 * g_tls_connection_get_use_system_certdb:
30405 * @conn: a #GTlsConnection
30407 * Gets whether @conn uses the system certificate database to verify
30408 * peer certificates. See g_tls_connection_set_use_system_certdb().
30410 * Returns: whether @conn uses the system certificate database
30416 * g_tls_connection_handshake:
30417 * @conn: a #GTlsConnection
30418 * @cancellable: a #GCancellable, or %NULL
30419 * @error: a #GError, or %NULL
30421 * Attempts a TLS handshake on @conn.
30422 * On the client side, it is never necessary to call this method;
30423 * although the connection needs to perform a handshake after
30424 * connecting (or after sending a "STARTTLS"-type command) and may
30425 * need to rehandshake later if the server requests it,
30426 * #GTlsConnection will handle this for you automatically when you try
30427 * to send or receive data on the connection. However, you can call
30428 * g_tls_connection_handshake() manually if you want to know for sure
30429 * whether the initial handshake succeeded or failed (as opposed to
30430 * just immediately trying to write to @conn's output stream, in which
30431 * case if it fails, it may not be possible to tell if it failed
30432 * before or after completing the handshake).
30433 * Likewise, on the server side, although a handshake is necessary at
30434 * the beginning of the communication, you do not need to call this
30435 * function explicitly unless you want clearer error reporting.
30436 * However, you may call g_tls_connection_handshake() later on to
30437 * renegotiate parameters (encryption methods, etc) with the client.
30438 * #GTlsConnection::accept_certificate may be emitted during the
30441 * Returns: success or failure
30447 * g_tls_connection_handshake_async:
30448 * @conn: a #GTlsConnection
30449 * @io_priority: the <link linkend="io-priority">I/O priority</link> of the request.
30450 * @cancellable: a #GCancellable, or %NULL
30451 * @callback: callback to call when the handshake is complete
30452 * @user_data: the data to pass to the callback function
30454 * Asynchronously performs a TLS handshake on @conn. See
30455 * g_tls_connection_handshake() for more information.
30462 * g_tls_connection_handshake_finish:
30463 * @conn: a #GTlsConnection
30464 * @result: a #GAsyncResult.
30465 * @error: a #GError pointer, or %NULL
30467 * Finish an asynchronous TLS handshake operation. See
30468 * g_tls_connection_handshake() for more information.
30469 * case @error will be set.
30471 * Returns: %TRUE on success, %FALSE on failure, in which
30477 * g_tls_connection_set_certificate:
30478 * @conn: a #GTlsConnection
30479 * @certificate: the certificate to use for @conn
30481 * This sets the certificate that @conn will present to its peer
30482 * during the TLS handshake. For a #GTlsServerConnection, it is
30483 * mandatory to set this, and that will normally be done at construct
30485 * For a #GTlsClientConnection, this is optional. If a handshake fails
30486 * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server
30487 * requires a certificate, and if you try connecting again, you should
30488 * call this method first. You can call
30489 * g_tls_client_connection_get_accepted_cas() on the failed connection
30490 * to get a list of Certificate Authorities that the server will
30491 * accept certificates from.
30492 * (It is also possible that a server will allow the connection with
30493 * or without a certificate; in that case, if you don't provide a
30494 * certificate, you can tell that the server requested one by the fact
30495 * that g_tls_client_connection_get_accepted_cas() will return
30503 * g_tls_connection_set_rehandshake_mode:
30504 * @conn: a #GTlsConnection
30505 * @mode: the rehandshaking mode
30507 * Sets how @conn behaves with respect to rehandshaking requests.
30508 * %G_TLS_REHANDSHAKE_NEVER means that it will never agree to
30509 * rehandshake after the initial handshake is complete. (For a client,
30510 * this means it will refuse rehandshake requests from the server, and
30511 * for a server, this means it will close the connection with an error
30512 * if the client attempts to rehandshake.)
30513 * %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a
30514 * rehandshake only if the other end of the connection supports the
30515 * TLS <literal>renegotiation_info</literal> extension. This is the
30516 * default behavior, but means that rehandshaking will not work
30517 * against older implementations that do not support that extension.
30518 * %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow
30519 * rehandshaking even without the
30520 * <literal>renegotiation_info</literal> extension. On the server side
30521 * in particular, this is not recommended, since it leaves the server
30522 * open to certain attacks. However, this mode is necessary if you
30523 * need to allow renegotiation with older client software.
30530 * g_tls_connection_set_require_close_notify:
30531 * @conn: a #GTlsConnection
30532 * @require_close_notify: whether or not to require close notification
30534 * Sets whether or not @conn expects a proper TLS close notification
30535 * before the connection is closed. If this is %TRUE (the default),
30536 * then @conn will expect to receive a TLS close notification from its
30537 * peer before the connection is closed, and will return a
30538 * %G_TLS_ERROR_EOF error if the connection is closed without proper
30539 * notification (since this may indicate a network error, or
30540 * man-in-the-middle attack).
30541 * In some protocols, the application will know whether or not the
30542 * connection was closed cleanly based on application-level data
30543 * (because the application-level data includes a length field, or is
30544 * somehow self-delimiting); in this case, the close notify is
30545 * redundant and sometimes omitted. (TLS 1.1 explicitly allows this;
30546 * in TLS 1.0 it is technically an error, but often done anyway.) You
30547 * can use g_tls_connection_set_require_close_notify() to tell @conn
30548 * to allow an "unannounced" connection close, in which case the close
30549 * will show up as a 0-length read, as in a non-TLS
30550 * #GSocketConnection, and it is up to the application to check that
30551 * the data has been fully received.
30552 * Note that this only affects the behavior when the peer closes the
30553 * connection; when the application calls g_io_stream_close() itself
30554 * on @conn, this will send a close notification regardless of the
30555 * setting of this property. If you explicitly want to do an unclean
30556 * close, you can close @conn's #GTlsConnection:base-io-stream rather
30557 * than closing @conn itself.
30564 * g_tls_connection_set_use_system_certdb:
30565 * @conn: a #GTlsConnection
30566 * @use_system_certdb: whether to use the system certificate database
30568 * Sets whether @conn uses the system certificate database to verify
30569 * peer certificates. This is %TRUE by default. If set to %FALSE, then
30570 * peer certificate validation will always set the
30571 * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
30572 * #GTlsConnection::accept-certificate will always be emitted on
30573 * client-side connections, unless that bit is not set in
30574 * #GTlsClientConnection:validation-flags).
30581 * g_tls_error_quark:
30583 * Gets the TLS error quark.
30585 * Returns: a #GQuark.
30591 * g_tls_server_connection_new:
30592 * @base_io_stream: the #GIOStream to wrap
30593 * @certificate: (allow-none): the default server certificate, or %NULL
30594 * @error: #GError for error reporting, or %NULL to ignore.
30596 * Creates a new #GTlsServerConnection wrapping @base_io_stream (which
30597 * must have pollable input and output streams).
30599 * Returns: the new #GTlsServerConnection, or %NULL on error
30606 * @struct_type: the type of the elements to allocate
30607 * @n_structs: the number of elements to allocate
30609 * Attempts to allocate @n_structs elements of type @struct_type, and returns
30610 * %NULL on failure. Contrast with g_new(), which aborts the program on failure.
30611 * The returned pointer is cast to a pointer to the given type.
30612 * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
30615 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
30621 * @struct_type: the type of the elements to allocate
30622 * @n_structs: the number of elements to allocate
30624 * Attempts to allocate @n_structs elements of type @struct_type, initialized
30625 * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts
30626 * the program on failure.
30627 * The returned pointer is cast to a pointer to the given type.
30628 * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
30631 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
30637 * @struct_type: the type of the elements to allocate
30638 * @mem: the currently allocated memory
30639 * @n_structs: the number of elements to allocate
30641 * Attempts to reallocate the memory pointed to by @mem, so that it now has
30642 * space for @n_structs elements of type @struct_type, and returns %NULL on
30643 * failure. Contrast with g_renew(), which aborts the program on failure.
30644 * It returns the new address of the memory, which may have been moved.
30645 * The function returns %NULL if an overflow occurs.
30648 * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
30653 * g_unix_connection_receive_credentials:
30654 * @connection: A #GUnixConnection.
30655 * @cancellable: (allow-none): A #GCancellable or %NULL.
30656 * @error: Return location for error or %NULL.
30658 * Receives credentials from the sending end of the connection. The
30659 * sending end has to call g_unix_connection_send_credentials() (or
30660 * similar) for this to work.
30661 * As well as reading the credentials this also reads (and discards) a
30662 * single byte from the stream, as this is required for credentials
30663 * passing to work on some implementations.
30664 * Other ways to exchange credentials with a foreign peer includes the
30665 * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
30666 * g_object_unref()), %NULL if @error is set.
30668 * Returns: (transfer full): Received credentials on success (free with
30674 * g_unix_connection_receive_fd:
30675 * @connection: a #GUnixConnection
30676 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
30677 * @error: (allow-none): #GError for error reporting, or %NULL to ignore
30679 * Receives a file descriptor from the sending end of the connection.
30680 * The sending end has to call g_unix_connection_send_fd() for this
30682 * As well as reading the fd this also reads a single byte from the
30683 * stream, as this is required for fd passing to work on some
30686 * Returns: a file descriptor on success, -1 on error.
30692 * g_unix_connection_send_credentials:
30693 * @connection: A #GUnixConnection.
30694 * @cancellable: (allow-none): A #GCancellable or %NULL.
30695 * @error: Return location for error or %NULL.
30697 * Passes the credentials of the current user the receiving side
30698 * of the connection. The recieving end has to call
30699 * g_unix_connection_receive_credentials() (or similar) to accept the
30701 * As well as sending the credentials this also writes a single NUL
30702 * byte to the stream, as this is required for credentials passing to
30703 * work on some implementations.
30704 * Other ways to exchange credentials with a foreign peer includes the
30705 * #GUnixCredentialsMessage type and g_socket_get_credentials() function.
30707 * Returns: %TRUE on success, %FALSE if @error is set.
30713 * g_unix_connection_send_fd:
30714 * @connection: a #GUnixConnection
30715 * @fd: a file descriptor
30716 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
30717 * @error: (allow-none): #GError for error reporting, or %NULL to ignore.
30719 * Passes a file descriptor to the recieving side of the
30720 * connection. The recieving end has to call g_unix_connection_receive_fd()
30721 * to accept the file descriptor.
30722 * As well as sending the fd this also writes a single byte to the
30723 * stream, as this is required for fd passing to work on some
30726 * Returns: a %TRUE on success, %NULL on error.
30732 * g_unix_credentials_message_get_credentials:
30733 * @message: A #GUnixCredentialsMessage.
30735 * Gets the credentials stored in @message.
30737 * Returns: (transfer none): A #GCredentials instance. Do not free, it is owned by @message.
30743 * g_unix_credentials_message_is_supported:
30745 * Checks if passing a #GCredential on a #GSocket is supported on this platform.
30747 * Returns: %TRUE if supported, %FALSE otherwise
30753 * g_unix_credentials_message_new:
30755 * Creates a new #GUnixCredentialsMessage with credentials matching the current processes.
30757 * Returns: a new #GUnixCredentialsMessage
30763 * g_unix_credentials_message_new_with_credentials:
30764 * @credentials: A #GCredentials object.
30766 * Creates a new #GUnixCredentialsMessage holding @credentials.
30768 * Returns: a new #GUnixCredentialsMessage
30774 * g_unix_fd_list_append:
30775 * @list: a #GUnixFDList
30776 * @fd: a valid open file descriptor
30777 * @error: a #GError pointer
30779 * Adds a file descriptor to @list.
30780 * The file descriptor is duplicated using dup(). You keep your copy
30781 * of the descriptor and the copy contained in @list will be closed
30782 * when @list is finalized.
30783 * A possible cause of failure is exceeding the per-process or
30784 * system-wide file descriptor limit.
30785 * The index of the file descriptor in the list is returned. If you use
30786 * this index with g_unix_fd_list_get() then you will receive back a
30787 * duplicated copy of the same file descriptor.
30788 * (and @error is set)
30790 * Returns: the index of the appended fd in case of success, else -1
30796 * g_unix_fd_list_get:
30797 * @list: a #GUnixFDList
30798 * @index_: the index into the list
30799 * @error: a #GError pointer
30801 * Gets a file descriptor out of @list.
30802 * programmer error for @index_ to be out of range; see
30803 * g_unix_fd_list_get_length().
30804 * The file descriptor is duplicated using dup() and set as
30805 * close-on-exec before being returned. You must call close() on it
30806 * when you are done.
30807 * A possible cause of failure is exceeding the per-process or
30808 * system-wide file descriptor limit.
30810 * Returns: the file descriptor, or -1 in case of error
30816 * g_unix_fd_list_get_length:
30817 * @list: a #GUnixFDList
30819 * contained within).
30821 * Gets the length of @list (ie: the number of file descriptors
30822 * Returns: the length of @list
30828 * g_unix_fd_list_new:
30830 * Creates a new #GUnixFDList containing no file descriptors.
30832 * Returns: a new #GUnixFDList
30838 * g_unix_fd_list_new_from_array:
30839 * @fds: (array length=n_fds): the initial list of file descriptors
30840 * @n_fds: the length of #fds, or -1
30842 * Creates a new #GUnixFDList containing the file descriptors given in
30843 * may no longer be used by the caller. The array itself is owned by
30845 * Each file descriptor in the array should be set to close-on-exec.
30846 * If @n_fds is -1 then @fds must be terminated with -1.
30848 * Returns: a new #GUnixFDList
30854 * g_unix_fd_list_peek_fds:
30855 * @list: a #GUnixFDList
30856 * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
30858 * Returns the array of file descriptors that is contained in this
30860 * After this call, the descriptors remain the property of @list. The
30861 * caller must not close them and must not free the array. The array is
30862 * valid only until @list is changed in any way.
30863 * If @length is non-%NULL then it is set to the number of file
30864 * descriptors in the returned array. The returned array is also
30865 * terminated with -1.
30866 * This function never returns %NULL. In case there are no file
30867 * descriptors contained in @list, an empty array is returned.
30870 * Returns: (array length=length) (transfer none): an array of file
30876 * g_unix_fd_list_steal_fds:
30877 * @list: a #GUnixFDList
30878 * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
30880 * Returns the array of file descriptors that is contained in this
30882 * After this call, the descriptors are no longer contained in
30883 * descriptors have been added).
30884 * The return result of this function must be freed with g_free().
30885 * The caller is also responsible for closing all of the file
30886 * descriptors. The file descriptors in the array are set to
30888 * If @length is non-%NULL then it is set to the number of file
30889 * descriptors in the returned array. The returned array is also
30890 * terminated with -1.
30891 * This function never returns %NULL. In case there are no file
30892 * descriptors contained in @list, an empty array is returned.
30895 * Returns: (array length=length) (transfer full): an array of file
30901 * g_unix_fd_message_append_fd:
30902 * @message: a #GUnixFDMessage
30903 * @fd: a valid open file descriptor
30904 * @error: a #GError pointer
30906 * Adds a file descriptor to @message.
30907 * The file descriptor is duplicated using dup(). You keep your copy
30908 * of the descriptor and the copy contained in @message will be closed
30909 * when @message is finalized.
30910 * A possible cause of failure is exceeding the per-process or
30911 * system-wide file descriptor limit.
30913 * Returns: %TRUE in case of success, else %FALSE (and @error is set)
30919 * g_unix_fd_message_get_fd_list:
30920 * @message: a #GUnixFDMessage
30922 * Gets the #GUnixFDList contained in @message. This function does not
30923 * return a reference to the caller, but the returned list is valid for
30924 * the lifetime of @message.
30926 * Returns: (transfer none): the #GUnixFDList from @message
30932 * g_unix_fd_message_new:
30934 * Creates a new #GUnixFDMessage containing an empty file descriptor
30937 * Returns: a new #GUnixFDMessage
30943 * g_unix_fd_message_new_with_fd_list:
30944 * @fd_list: a #GUnixFDList
30946 * Creates a new #GUnixFDMessage containing @list.
30948 * Returns: a new #GUnixFDMessage
30954 * g_unix_fd_message_steal_fds:
30955 * @message: a #GUnixFDMessage
30956 * @length: (out) (allow-none): pointer to the length of the returned array, or %NULL
30958 * Returns the array of file descriptors that is contained in this
30960 * After this call, the descriptors are no longer contained in
30961 * descriptors have been added).
30962 * The return result of this function must be freed with g_free().
30963 * The caller is also responsible for closing all of the file
30965 * If @length is non-%NULL then it is set to the number of file
30966 * descriptors in the returned array. The returned array is also
30967 * terminated with -1.
30968 * This function never returns %NULL. In case there are no file
30969 * descriptors contained in @message, an empty array is returned.
30972 * Returns: (array length=length) (transfer full): an array of file
30978 * g_unix_input_stream_get_close_fd:
30979 * @stream: a #GUnixInputStream
30981 * Returns whether the file descriptor of @stream will be
30982 * closed when the stream is closed.
30984 * Returns: %TRUE if the file descriptor is closed when done
30990 * g_unix_input_stream_get_fd:
30991 * @stream: a #GUnixInputStream
30993 * Return the UNIX file descriptor that the stream reads from.
30995 * Returns: The file descriptor of @stream
31001 * g_unix_input_stream_new:
31002 * @fd: a UNIX file descriptor
31003 * @close_fd: %TRUE to close the file descriptor when done
31005 * Creates a new #GUnixInputStream for the given @fd.
31006 * If @close_fd is %TRUE, the file descriptor will be closed
31007 * when the stream is closed.
31009 * Returns: a new #GUnixInputStream
31014 * g_unix_input_stream_set_close_fd:
31015 * @stream: a #GUnixInputStream
31016 * @close_fd: %TRUE to close the file descriptor when done
31018 * Sets whether the file descriptor of @stream shall be closed
31019 * when the stream is closed.
31026 * g_unix_is_mount_path_system_internal:
31027 * @mount_path: a mount path, e.g. <filename>/media/disk</filename> or <filename>/usr</filename>
31029 * Determines if @mount_path is considered an implementation of the
31030 * OS. This is primarily used for hiding mountable and mounted volumes
31031 * that only are used in the OS and has little to no relevance to the
31035 * Returns: %TRUE if @mount_path is considered an implementation detail
31040 * g_unix_mount_at: (skip)
31041 * @mount_path: path for a possible unix mount.
31042 * @time_read: (out) (allow-none): guint64 to contain a timestamp.
31044 * Gets a #GUnixMountEntry for a given mount path. If @time_read
31045 * is set, it will be filled with a unix timestamp for checking
31046 * if the mounts have changed since with g_unix_mounts_changed_since().
31048 * Returns: (transfer full): a #GUnixMountEntry.
31053 * g_unix_mount_compare:
31054 * @mount1: first #GUnixMountEntry to compare.
31055 * @mount2: second #GUnixMountEntry to compare.
31057 * Compares two unix mounts.
31058 * or less than @mount2, respectively.
31060 * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
31065 * g_unix_mount_free:
31066 * @mount_entry: a #GUnixMount.
31068 * Frees a unix mount.
31073 * g_unix_mount_get_device_path:
31074 * @mount_entry: a #GUnixMount.
31076 * Gets the device path for a unix mount.
31078 * Returns: a string containing the device path.
31083 * g_unix_mount_get_fs_type:
31084 * @mount_entry: a #GUnixMount.
31086 * Gets the filesystem type for the unix mount.
31088 * Returns: a string containing the file system type.
31093 * g_unix_mount_get_mount_path:
31094 * @mount_entry: input #GUnixMountEntry to get the mount path for.
31096 * Gets the mount path for a unix mount.
31098 * Returns: the mount path for @mount_entry.
31103 * g_unix_mount_guess_can_eject:
31104 * @mount_entry: a #GUnixMountEntry
31106 * Guesses whether a Unix mount can be ejected.
31108 * Returns: %TRUE if @mount_entry is deemed to be ejectable.
31113 * g_unix_mount_guess_icon:
31114 * @mount_entry: a #GUnixMountEntry
31116 * Guesses the icon of a Unix mount.
31118 * Returns: (transfer full): a #GIcon
31123 * g_unix_mount_guess_name:
31124 * @mount_entry: a #GUnixMountEntry
31126 * Guesses the name of a Unix mount.
31127 * The result is a translated string.
31128 * be freed with g_free()
31130 * Returns: A newly allocated string that must
31135 * g_unix_mount_guess_should_display:
31136 * @mount_entry: a #GUnixMountEntry
31138 * Guesses whether a Unix mount should be displayed in the UI.
31140 * Returns: %TRUE if @mount_entry is deemed to be displayable.
31145 * g_unix_mount_is_readonly:
31146 * @mount_entry: a #GUnixMount.
31148 * Checks if a unix mount is mounted read only.
31150 * Returns: %TRUE if @mount_entry is read only.
31155 * g_unix_mount_is_system_internal:
31156 * @mount_entry: a #GUnixMount.
31158 * Checks if a unix mount is a system path.
31160 * Returns: %TRUE if the unix mount is for a system path.
31165 * g_unix_mount_monitor_new:
31167 * Gets a new #GUnixMountMonitor. The default rate limit for which the
31168 * monitor will report consecutive changes for the mount and mount
31169 * point entry files is the default for a #GFileMonitor. Use
31170 * g_unix_mount_monitor_set_rate_limit() to change this.
31172 * Returns: a #GUnixMountMonitor.
31177 * g_unix_mount_monitor_set_rate_limit:
31178 * @mount_monitor: a #GUnixMountMonitor
31179 * @limit_msec: a integer with the limit in milliseconds to poll for changes.
31181 * Sets the rate limit to which the @mount_monitor will report
31182 * consecutive change events to the mount and mount point entry files.
31189 * g_unix_mount_point_compare:
31190 * @mount1: a #GUnixMount.
31191 * @mount2: a #GUnixMount.
31193 * Compares two unix mount points.
31194 * or less than @mount2, respectively.
31196 * Returns: 1, 0 or -1 if @mount1 is greater than, equal to,
31201 * g_unix_mount_point_free:
31202 * @mount_point: unix mount point to free.
31204 * Frees a unix mount point.
31209 * g_unix_mount_point_get_device_path:
31210 * @mount_point: a #GUnixMountPoint.
31212 * Gets the device path for a unix mount point.
31214 * Returns: a string containing the device path.
31219 * g_unix_mount_point_get_fs_type:
31220 * @mount_point: a #GUnixMountPoint.
31222 * Gets the file system type for the mount point.
31224 * Returns: a string containing the file system type.
31229 * g_unix_mount_point_get_mount_path:
31230 * @mount_point: a #GUnixMountPoint.
31232 * Gets the mount path for a unix mount point.
31234 * Returns: a string containing the mount path.
31239 * g_unix_mount_point_guess_can_eject:
31240 * @mount_point: a #GUnixMountPoint
31242 * Guesses whether a Unix mount point can be ejected.
31244 * Returns: %TRUE if @mount_point is deemed to be ejectable.
31249 * g_unix_mount_point_guess_icon:
31250 * @mount_point: a #GUnixMountPoint
31252 * Guesses the icon of a Unix mount point.
31254 * Returns: (transfer full): a #GIcon
31259 * g_unix_mount_point_guess_name:
31260 * @mount_point: a #GUnixMountPoint
31262 * Guesses the name of a Unix mount point.
31263 * The result is a translated string.
31264 * be freed with g_free()
31266 * Returns: A newly allocated string that must
31271 * g_unix_mount_point_is_loopback:
31272 * @mount_point: a #GUnixMountPoint.
31274 * Checks if a unix mount point is a loopback device.
31276 * Returns: %TRUE if the mount point is a loopback. %FALSE otherwise.
31281 * g_unix_mount_point_is_readonly:
31282 * @mount_point: a #GUnixMountPoint.
31284 * Checks if a unix mount point is read only.
31286 * Returns: %TRUE if a mount point is read only.
31291 * g_unix_mount_point_is_user_mountable:
31292 * @mount_point: a #GUnixMountPoint.
31294 * Checks if a unix mount point is mountable by the user.
31296 * Returns: %TRUE if the mount point is user mountable.
31301 * g_unix_mount_points_changed_since:
31302 * @time: guint64 to contain a timestamp.
31304 * Checks if the unix mount points have changed since a given unix time.
31306 * Returns: %TRUE if the mount points have changed since @time.
31311 * g_unix_mount_points_get: (skip)
31312 * @time_read: (out) (allow-none): guint64 to contain a timestamp.
31314 * Gets a #GList of #GUnixMountPoint containing the unix mount points.
31315 * If @time_read is set, it will be filled with the mount timestamp,
31316 * allowing for checking if the mounts have changed with
31317 * g_unix_mounts_points_changed_since().
31318 * a #GList of the UNIX mountpoints.
31320 * Returns: (element-type GUnixMountPoint) (transfer full):
31325 * g_unix_mounts_changed_since:
31326 * @time: guint64 to contain a timestamp.
31328 * Checks if the unix mounts have changed since a given unix time.
31330 * Returns: %TRUE if the mounts have changed since @time.
31335 * g_unix_mounts_get: (skip)
31336 * @time_read: (out) (allow-none): guint64 to contain a timestamp, or %NULL
31338 * Gets a #GList of #GUnixMountEntry containing the unix mounts.
31339 * If @time_read is set, it will be filled with the mount
31340 * timestamp, allowing for checking if the mounts have changed
31341 * with g_unix_mounts_changed_since().
31342 * a #GList of the UNIX mounts.
31344 * Returns: (element-type GUnixMountEntry) (transfer full):
31349 * g_unix_output_stream_get_close_fd:
31350 * @stream: a #GUnixOutputStream
31352 * Returns whether the file descriptor of @stream will be
31353 * closed when the stream is closed.
31355 * Returns: %TRUE if the file descriptor is closed when done
31361 * g_unix_output_stream_get_fd:
31362 * @stream: a #GUnixOutputStream
31364 * Return the UNIX file descriptor that the stream writes to.
31366 * Returns: The file descriptor of @stream
31372 * g_unix_output_stream_new:
31373 * @fd: a UNIX file descriptor
31374 * @close_fd: %TRUE to close the file descriptor when done
31376 * Creates a new #GUnixOutputStream for the given @fd.
31377 * If @close_fd, is %TRUE, the file descriptor will be closed when
31378 * the output stream is destroyed.
31380 * Returns: a new #GOutputStream
31385 * g_unix_output_stream_set_close_fd:
31386 * @stream: a #GUnixOutputStream
31387 * @close_fd: %TRUE to close the file descriptor when done
31389 * Sets whether the file descriptor of @stream shall be closed
31390 * when the stream is closed.
31397 * g_unix_socket_address_abstract_names_supported:
31399 * Checks if abstract unix domain socket names are supported.
31401 * Returns: %TRUE if supported, %FALSE otherwise
31407 * g_unix_socket_address_get_address_type:
31408 * @address: a #GInetSocketAddress
31410 * Gets @address's type.
31412 * Returns: a #GUnixSocketAddressType
31418 * g_unix_socket_address_get_is_abstract:
31419 * @address: a #GInetSocketAddress
31421 * Tests if @address is abstract.
31423 * Returns: %TRUE if the address is abstract, %FALSE otherwise
31425 * Deprecated: Use g_unix_socket_address_get_address_type()
31430 * g_unix_socket_address_get_path:
31431 * @address: a #GInetSocketAddress
31433 * Gets @address's path, or for abstract sockets the "name".
31434 * Guaranteed to be zero-terminated, but an abstract socket
31435 * may contain embedded zeros, and thus you should use
31436 * g_unix_socket_address_get_path_len() to get the true length
31439 * Returns: the path for @address
31445 * g_unix_socket_address_get_path_len:
31446 * @address: a #GInetSocketAddress
31448 * Gets the length of @address's path.
31449 * For details, see g_unix_socket_address_get_path().
31451 * Returns: the length of the path
31457 * g_unix_socket_address_new:
31458 * @path: the socket path
31460 * Creates a new #GUnixSocketAddress for @path.
31461 * To create abstract socket addresses, on systems that support that,
31462 * use g_unix_socket_address_new_abstract().
31464 * Returns: a new #GUnixSocketAddress
31470 * g_unix_socket_address_new_abstract:
31471 * @path: (array length=path_len) (element-type gchar): the abstract name
31472 * @path_len: the length of @path, or -1
31474 * Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED
31475 * #GUnixSocketAddress for @path.
31477 * Returns: a new #GUnixSocketAddress
31478 * Deprecated: Use g_unix_socket_address_new_with_type().
31483 * g_unix_socket_address_new_with_type:
31484 * @path: (array length=path_len) (element-type gchar): the name
31485 * @path_len: the length of @path, or -1
31486 * @type: a #GUnixSocketAddressType
31488 * Creates a new #GUnixSocketAddress of type @type with name @path.
31489 * If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to
31490 * calling g_unix_socket_address_new().
31491 * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len
31492 * bytes of @path will be copied to the socket's path, and only those
31493 * bytes will be considered part of the name. (If @path_len is -1,
31494 * then @path is assumed to be NUL-terminated.) For example, if @path
31495 * was "test", then calling g_socket_address_get_native_size() on the
31496 * returned socket would return 7 (2 bytes of overhead, 1 byte for the
31497 * abstract-socket indicator byte, and 4 bytes for the name "test").
31498 * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then
31499 * rest of the path will be padded with 0 bytes, and the entire
31500 * zero-padded buffer will be considered the name. (As above, if
31501 * this case, g_socket_address_get_native_size() will always return
31502 * the full size of a <literal>struct sockaddr_un</literal>, although
31503 * g_unix_socket_address_get_path_len() will still return just the
31505 * %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over
31506 * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course,
31507 * when connecting to a server created by another process, you must
31508 * use the appropriate type corresponding to how that process created
31509 * its listening socket.
31511 * Returns: a new #GUnixSocketAddress
31517 * g_vfs_get_default:
31519 * Gets the default #GVfs for the system.
31521 * Returns: (transfer none): a #GVfs.
31526 * g_vfs_get_file_for_path:
31528 * @path: a string containing a VFS path.
31530 * Gets a #GFile for @path.
31531 * Free the returned object with g_object_unref().
31533 * Returns: (transfer full): a #GFile.
31538 * g_vfs_get_file_for_uri:
31540 * @uri: a string containing a URI
31542 * Gets a #GFile for @uri.
31543 * This operation never fails, but the returned object
31544 * might not support any I/O operation if the URI
31545 * is malformed or if the URI scheme is not supported.
31546 * Free the returned object with g_object_unref().
31548 * Returns: (transfer full): a #GFile.
31555 * Gets the local #GVfs for the system.
31557 * Returns: (transfer none): a #GVfs.
31562 * g_vfs_get_supported_uri_schemes:
31565 * Gets a list of URI schemes supported by @vfs.
31566 * The returned array belongs to GIO and must
31567 * not be freed or modified.
31569 * Returns: (transfer none): a %NULL-terminated array of strings.
31577 * Checks if the VFS is active.
31579 * Returns: %TRUE if construction of the @vfs was successful and it is now active.
31584 * g_vfs_parse_name:
31586 * @parse_name: a string to be parsed by the VFS module.
31588 * This operation never fails, but the returned object might
31589 * not support any I/O operations if the @parse_name cannot
31590 * be parsed by the #GVfs module.
31591 * Free the returned object with g_object_unref().
31593 * Returns: (transfer full): a #GFile for the given @parse_name.
31598 * g_volume_can_eject:
31599 * @volume: a #GVolume.
31601 * Checks if a volume can be ejected.
31603 * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise.
31608 * g_volume_can_mount:
31609 * @volume: a #GVolume.
31611 * Checks if a volume can be mounted.
31613 * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise.
31619 * @volume: a #GVolume.
31620 * @flags: flags affecting the unmount if required for eject
31621 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31622 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31623 * @user_data: user data that gets passed to @callback
31625 * Ejects a volume. This is an asynchronous operation, and is
31626 * finished by calling g_volume_eject_finish() with the @volume
31627 * and #GAsyncResult returned in the @callback.
31629 * Deprecated: 2.22: Use g_volume_eject_with_operation() instead.
31634 * g_volume_eject_finish:
31635 * @volume: pointer to a #GVolume.
31636 * @result: a #GAsyncResult.
31637 * @error: a #GError location to store an error, or %NULL to ignore
31639 * Finishes ejecting a volume. If any errors occured during the operation,
31641 * Returns: %TRUE, %FALSE if operation failed.
31642 * Deprecated: 2.22: Use g_volume_eject_with_operation_finish() instead.
31647 * g_volume_eject_with_operation:
31648 * @volume: a #GVolume.
31649 * @flags: flags affecting the unmount if required for eject
31650 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
31651 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31652 * @callback: a #GAsyncReadyCallback, or %NULL.
31653 * @user_data: user data passed to @callback.
31655 * Ejects a volume. This is an asynchronous operation, and is
31656 * finished by calling g_volume_eject_with_operation_finish() with the @volume
31657 * and #GAsyncResult data returned in the @callback.
31664 * g_volume_eject_with_operation_finish:
31665 * @volume: a #GVolume.
31666 * @result: a #GAsyncResult.
31667 * @error: a #GError location to store the error occuring, or %NULL to ignore.
31669 * Finishes ejecting a volume. If any errors occurred during the operation,
31671 * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise.
31677 * g_volume_enumerate_identifiers:
31678 * @volume: a #GVolume
31680 * Gets the kinds of <link linkend="volume-identifier">identifiers</link>
31681 * that @volume has. Use g_volume_get_identifer() to obtain
31682 * the identifiers themselves.
31683 * of strings containing kinds of identifiers. Use g_strfreev() to free.
31685 * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated array
31690 * g_volume_get_activation_root:
31691 * @volume: a #GVolume
31693 * Gets the activation root for a #GVolume if it is known ahead of
31694 * mount time. Returns %NULL otherwise. If not %NULL and if @volume
31695 * is mounted, then the result of g_mount_get_root() on the
31696 * #GMount object obtained from g_volume_get_mount() will always
31697 * either be equal or a prefix of what this function returns. In
31698 * other words, in code
31701 * GFile *mount_root
31702 * GFile *volume_activation_root;
31703 * mount = g_volume_get_mount (volume); /* mounted, so never NULL */
31704 * mount_root = g_mount_get_root (mount);
31705 * volume_activation_root = g_volume_get_activation_root(volume); /* assume not NULL */
31706 * </programlisting>
31707 * then the expression
31709 * (g_file_has_prefix (volume_activation_root, mount_root) ||
31710 * </programlisting>
31711 * will always be %TRUE.
31712 * Activation roots are typically used in #GVolumeMonitor
31713 * implementations to find the underlying mount to shadow, see
31714 * g_mount_is_shadowed() for more details.
31715 * g_object_unref() to free.
31717 * Returns: (transfer full): the activation root of @volume or %NULL. Use
31723 * g_volume_get_drive:
31724 * @volume: a #GVolume.
31726 * Gets the drive for the @volume.
31727 * The returned object should be unreffed with g_object_unref()
31728 * when no longer needed.
31730 * Returns: (transfer full): a #GDrive or %NULL if @volume is not associated with a drive.
31735 * g_volume_get_icon:
31736 * @volume: a #GVolume.
31738 * Gets the icon for @volume.
31739 * The returned object should be unreffed with g_object_unref()
31740 * when no longer needed.
31742 * Returns: (transfer full): a #GIcon.
31747 * g_volume_get_identifier:
31748 * @volume: a #GVolume
31749 * @kind: the kind of identifier to return
31751 * Gets the identifier of the given kind for @volume.
31752 * See the <link linkend="volume-identifier">introduction</link>
31753 * for more information about volume identifiers.
31754 * requested identfier, or %NULL if the #GVolume
31755 * doesn't have this kind of identifier
31757 * Returns: a newly allocated string containing the
31762 * g_volume_get_mount:
31763 * @volume: a #GVolume.
31765 * Gets the mount for the @volume.
31766 * The returned object should be unreffed with g_object_unref()
31767 * when no longer needed.
31769 * Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted.
31774 * g_volume_get_name:
31775 * @volume: a #GVolume.
31777 * Gets the name of @volume.
31778 * be freed with g_free() when no longer needed.
31780 * Returns: the name for the given @volume. The returned string should
31785 * g_volume_get_uuid:
31786 * @volume: a #GVolume.
31788 * Gets the UUID for the @volume. The reference is typically based on
31789 * the file system UUID for the volume in question and should be
31790 * considered an opaque string. Returns %NULL if there is no UUID
31792 * The returned string should be freed with g_free()
31793 * when no longer needed.
31795 * Returns: the UUID for @volume or %NULL if no UUID can be computed.
31800 * g_volume_monitor_adopt_orphan_mount:
31801 * @mount: a #GMount object to find a parent for
31803 * This function should be called by any #GVolumeMonitor
31804 * implementation when a new #GMount object is created that is not
31805 * associated with a #GVolume object. It must be called just before
31806 * emitting the @mount_added signal.
31807 * If the return value is not %NULL, the caller must associate the
31808 * returned #GVolume object with the #GMount. This involves returning
31809 * it in its g_mount_get_volume() implementation. The caller must
31810 * also listen for the "removed" signal on the returned object
31811 * and give up its reference when handling that signal
31812 * Similary, if implementing g_volume_monitor_adopt_orphan_mount(),
31813 * the implementor must take a reference to @mount and return it in
31814 * its g_volume_get_mount() implemented. Also, the implementor must
31815 * listen for the "unmounted" signal on @mount and give up its
31816 * reference upon handling that signal.
31817 * There are two main use cases for this function.
31818 * One is when implementing a user space file system driver that reads
31819 * blocks of a block device that is already represented by the native
31820 * volume monitor (for example a CD Audio file system driver). Such
31821 * a driver will generate its own #GMount object that needs to be
31822 * assoicated with the #GVolume object that represents the volume.
31823 * The other is for implementing a #GVolumeMonitor whose sole purpose
31824 * is to return #GVolume objects representing entries in the users
31825 * "favorite servers" list or similar.
31826 * if no wants to adopt the #GMount.
31827 * implementations should instead create shadow mounts with the URI of
31828 * the mount they intend to adopt. See the proxy volume monitor in
31829 * gvfs for an example of this. Also see g_mount_is_shadowed(),
31830 * g_mount_shadow() and g_mount_unshadow() functions.
31832 * Returns: (transfer full): the #GVolume object that is the parent for @mount or %NULL
31833 * Deprecated: 2.20: Instead of using this function, #GVolumeMonitor
31838 * g_volume_monitor_get:
31840 * Gets the volume monitor used by gio.
31841 * g_object_unref() when done with it.
31843 * Returns: (transfer full): a reference to the #GVolumeMonitor used by gio. Call
31848 * g_volume_monitor_get_connected_drives:
31849 * @volume_monitor: a #GVolumeMonitor.
31851 * Gets a list of drives connected to the system.
31852 * The returned list should be freed with g_list_free(), after
31853 * its elements have been unreffed with g_object_unref().
31855 * Returns: (element-type GDrive) (transfer full): a #GList of connected #GDrive objects.
31860 * g_volume_monitor_get_mount_for_uuid:
31861 * @volume_monitor: a #GVolumeMonitor.
31862 * @uuid: the UUID to look for
31864 * Finds a #GMount object by its UUID (see g_mount_get_uuid())
31865 * Free the returned object with g_object_unref().
31867 * Returns: (transfer full): a #GMount or %NULL if no such mount is available.
31872 * g_volume_monitor_get_mounts:
31873 * @volume_monitor: a #GVolumeMonitor.
31875 * Gets a list of the mounts on the system.
31876 * The returned list should be freed with g_list_free(), after
31877 * its elements have been unreffed with g_object_unref().
31879 * Returns: (element-type GMount) (transfer full): a #GList of #GMount objects.
31884 * g_volume_monitor_get_volume_for_uuid:
31885 * @volume_monitor: a #GVolumeMonitor.
31886 * @uuid: the UUID to look for
31888 * Finds a #GVolume object by its UUID (see g_volume_get_uuid())
31889 * Free the returned object with g_object_unref().
31891 * Returns: (transfer full): a #GVolume or %NULL if no such volume is available.
31896 * g_volume_monitor_get_volumes:
31897 * @volume_monitor: a #GVolumeMonitor.
31899 * Gets a list of the volumes on the system.
31900 * The returned list should be freed with g_list_free(), after
31901 * its elements have been unreffed with g_object_unref().
31903 * Returns: (element-type GVolume) (transfer full): a #GList of #GVolume objects.
31909 * @volume: a #GVolume.
31910 * @flags: flags affecting the operation
31911 * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
31912 * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
31913 * @callback: (allow-none): a #GAsyncReadyCallback, or %NULL.
31914 * @user_data: user data that gets passed to @callback
31916 * Mounts a volume. This is an asynchronous operation, and is
31917 * finished by calling g_volume_mount_finish() with the @volume
31918 * and #GAsyncResult returned in the @callback.
31920 * Virtual: mount_fn
31925 * g_volume_mount_finish:
31926 * @volume: a #GVolume
31927 * @result: a #GAsyncResult
31928 * @error: a #GError location to store an error, or %NULL to ignore
31930 * Finishes mounting a volume. If any errors occured during the operation,
31931 * If the mount operation succeeded, g_volume_get_mount() on @volume
31932 * is guaranteed to return the mount right after calling this
31933 * function; there's no need to listen for the 'mount-added' signal on
31936 * Returns: %TRUE, %FALSE if operation failed.
31941 * g_volume_should_automount:
31942 * @volume: a #GVolume
31944 * Returns whether the volume should be automatically mounted.
31946 * Returns: %TRUE if the volume should be automatically mounted.
31951 * g_win32_input_stream_get_close_handle:
31952 * @stream: a #GWin32InputStream
31954 * Returns whether the handle of @stream will be
31955 * closed when the stream is closed.
31957 * Returns: %TRUE if the handle is closed when done
31963 * g_win32_input_stream_get_handle:
31964 * @stream: a #GWin32InputStream
31966 * Return the Windows file handle that the stream reads from.
31968 * Returns: The file handle of @stream
31974 * g_win32_input_stream_new:
31975 * @handle: a Win32 file handle
31976 * @close_fd: %TRUE to close the handle when done
31978 * Creates a new #GWin32InputStream for the given @fd.
31979 * If @close_handle is %TRUE, the handle will be closed
31980 * when the stream is closed.
31981 * Note that "handle" here means a Win32 HANDLE, not a "file descriptor"
31982 * as used in the Windows C libraries.
31984 * Returns: a new #GWin32InputStream
31989 * g_win32_input_stream_set_close_handle:
31990 * @stream: a #GWin32InputStream
31991 * @close_handle: %TRUE to close the handle when done
31993 * Sets whether the handle of @stream shall be closed
31994 * when the stream is closed.
32001 * g_win32_output_stream_get_close_handle:
32002 * @stream: a #GWin32OutputStream
32004 * Returns whether the handle of @stream will be closed when the
32005 * stream is closed.
32007 * Returns: %TRUE if the handle is closed when done
32013 * g_win32_output_stream_get_handle:
32014 * @stream: a #GWin32OutputStream
32016 * Return the Windows handle that the stream writes to.
32018 * Returns: The handle descriptor of @stream
32024 * g_win32_output_stream_new:
32025 * @handle: a Win32 file handle
32026 * @close_handle: %TRUE to close the handle when done
32028 * Creates a new #GWin32OutputStream for the given @handle.
32029 * If @close_handle, is %TRUE, the handle will be closed when the
32030 * output stream is destroyed.
32032 * Returns: a new #GOutputStream
32038 * g_win32_output_stream_set_close_handle:
32039 * @stream: a #GWin32OutputStream
32040 * @close_handle: %TRUE to close the handle when done
32042 * Sets whether the handle of @stream shall be closed when the stream
32050 * g_zlib_compressor_get_file_info:
32051 * @compressor: a #GZlibCompressor
32053 * Returns the #GZlibCompressor:file-info property.
32055 * Returns: (transfer none): a #GFileInfo, or %NULL
32061 * g_zlib_compressor_new:
32062 * @format: The format to use for the compressed data
32063 * @level: compression level (0-9), -1 for default
32065 * Creates a new #GZlibCompressor.
32067 * Returns: a new #GZlibCompressor
32073 * g_zlib_compressor_set_file_info:
32074 * @compressor: a #GZlibCompressor
32075 * @file_info: (allow-none): a #GFileInfo
32077 * Sets @file_info in @compressor. If non-%NULL, and @compressor's
32078 * #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
32079 * it will be used to set the file name and modification time in
32080 * the GZIP header of the compressed data.
32081 * progress; it may only be called immediately after creation of @compressor,
32082 * or after resetting it with g_converter_reset().
32084 * Note: it is an error to call this function while a compression is in
32090 * g_zlib_decompressor_get_file_info:
32091 * @decompressor: a #GZlibDecompressor
32093 * Retrieves the #GFileInfo constructed from the GZIP header data
32094 * of compressed data processed by @compressor, or %NULL if @decompressor's
32095 * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
32096 * or the header data was not fully processed yet, or it not present in the
32097 * data stream at all.
32099 * Returns: (transfer none): a #GFileInfo, or %NULL
32105 * g_zlib_decompressor_new:
32106 * @format: The format to use for the compressed data
32108 * Creates a new #GZlibDecompressor.
32110 * Returns: a new #GZlibDecompressor
32118 * A C representable type name for #G_TYPE_STRING.
32123 * get_all_desktop_entries_for_mime_type:
32124 * @mime_type: a mime type.
32125 * @except: NULL or a strv list
32127 * Returns all the desktop ids for @mime_type. The desktop files
32128 * are listed in an order so that default applications are listed before
32129 * non-default ones, and handlers for inherited mimetypes are listed
32130 * after the base ones.
32131 * Optionally doesn't list the desktop ids given in the @except
32132 * to handle @mime_type.
32134 * Returns: a #GList containing the desktop ids which claim
32139 * mime_info_cache_reload:
32140 * @dir: directory path which needs reloading.
32142 * Reload the mime information for the @dir.
32147 /************************************************************/
32148 /* THIS FILE IS GENERATED DO NOT EDIT */
32149 /************************************************************/